summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/allarch.bbclass7
-rw-r--r--meta/classes/archiver.bbclass9
-rw-r--r--meta/classes/autotools.bbclass55
-rw-r--r--meta/classes/base.bbclass151
-rw-r--r--meta/classes/binconfig-disabled.bbclass13
-rw-r--r--meta/classes/boot-directdisk.bbclass24
-rw-r--r--meta/classes/bootimg.bbclass42
-rw-r--r--meta/classes/buildhistory.bbclass56
-rw-r--r--meta/classes/chrpath.bbclass1
-rw-r--r--meta/classes/cmake.bbclass9
-rw-r--r--meta/classes/cml1.bbclass7
-rw-r--r--meta/classes/compress_doc.bbclass260
-rw-r--r--meta/classes/core-image.bbclass5
-rw-r--r--meta/classes/cpan.bbclass4
-rw-r--r--meta/classes/cpan_build.bbclass5
-rw-r--r--meta/classes/cross-canadian.bbclass16
-rw-r--r--meta/classes/crosssdk.bbclass3
-rw-r--r--meta/classes/debian.bbclass16
-rw-r--r--meta/classes/distrodata.bbclass492
-rw-r--r--meta/classes/externalsrc.bbclass3
-rw-r--r--meta/classes/fontcache.bbclass7
-rw-r--r--meta/classes/gnomebase.bbclass14
-rw-r--r--meta/classes/grub-efi.bbclass2
-rw-r--r--meta/classes/icecc.bbclass15
-rw-r--r--meta/classes/image-buildinfo.bbclass69
-rw-r--r--meta/classes/image-live.bbclass2
-rw-r--r--meta/classes/image-mklibs.bbclass2
-rw-r--r--meta/classes/image-swab.bbclass2
-rw-r--r--meta/classes/image-vmdk.bbclass2
-rw-r--r--meta/classes/image.bbclass101
-rw-r--r--meta/classes/image_types.bbclass38
-rw-r--r--meta/classes/insane.bbclass205
-rw-r--r--meta/classes/kernel-module-split.bbclass16
-rw-r--r--meta/classes/kernel-yocto.bbclass220
-rw-r--r--meta/classes/kernel.bbclass171
-rw-r--r--meta/classes/kernelsrc.bbclass10
-rw-r--r--meta/classes/libc-common.bbclass19
-rw-r--r--meta/classes/libc-package.bbclass5
-rw-r--r--meta/classes/license.bbclass104
-rw-r--r--meta/classes/linux-kernel-base.bbclass13
-rw-r--r--meta/classes/metadata_scm.bbclass2
-rw-r--r--meta/classes/module-base.bbclass12
-rw-r--r--meta/classes/module.bbclass6
-rw-r--r--meta/classes/multilib.bbclass6
-rw-r--r--meta/classes/multilib_global.bbclass117
-rw-r--r--meta/classes/native.bbclass27
-rw-r--r--meta/classes/nativesdk.bbclass3
-rw-r--r--meta/classes/oelint.bbclass251
-rw-r--r--meta/classes/package.bbclass211
-rw-r--r--meta/classes/package_deb.bbclass17
-rw-r--r--meta/classes/package_ipk.bbclass29
-rw-r--r--meta/classes/package_rpm.bbclass38
-rw-r--r--meta/classes/packagegroup.bbclass7
-rw-r--r--meta/classes/populate_sdk_base.bbclass255
-rw-r--r--meta/classes/populate_sdk_deb.bbclass13
-rw-r--r--meta/classes/populate_sdk_ipk.bbclass3
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass16
-rw-r--r--meta/classes/prserv.bbclass31
-rw-r--r--meta/classes/ptest-gnome.bbclass8
-rw-r--r--meta/classes/pythonnative.bbclass2
-rw-r--r--meta/classes/qemu.bbclass28
-rw-r--r--meta/classes/qt4e.bbclass3
-rw-r--r--meta/classes/qt4x11.bbclass8
-rw-r--r--meta/classes/report-error.bbclass13
-rw-r--r--meta/classes/rm_work.bbclass21
-rw-r--r--meta/classes/rootfs_deb.bbclass15
-rw-r--r--meta/classes/rootfs_ipk.bbclass3
-rw-r--r--meta/classes/rootfs_rpm.bbclass21
-rw-r--r--meta/classes/sanity.bbclass107
-rw-r--r--meta/classes/siteconfig.bbclass8
-rw-r--r--meta/classes/siteinfo.bbclass8
-rw-r--r--meta/classes/spdx.bbclass338
-rw-r--r--meta/classes/sstate.bbclass110
-rw-r--r--meta/classes/staging.bbclass1
-rw-r--r--meta/classes/syslinux.bbclass2
-rw-r--r--meta/classes/systemd.bbclass7
-rw-r--r--meta/classes/testimage.bbclass109
-rw-r--r--meta/classes/toaster.bbclass56
-rw-r--r--meta/classes/toolchain-scripts.bbclass24
-rw-r--r--meta/classes/uboot-config.bbclass3
-rw-r--r--meta/classes/uninative.bbclass44
-rw-r--r--meta/classes/update-rc.d.bbclass3
-rw-r--r--meta/classes/useradd-staticids.bbclass8
-rw-r--r--meta/classes/useradd.bbclass4
-rw-r--r--meta/classes/utils.bbclass2
-rw-r--r--meta/conf/abi_version.conf2
-rw-r--r--meta/conf/bitbake.conf40
-rw-r--r--meta/conf/distro/defaultsetup.conf2
-rw-r--r--meta/conf/distro/include/default-distrovars.inc6
-rw-r--r--meta/conf/distro/include/default-providers.inc3
-rw-r--r--meta/conf/distro/include/default-versions.inc5
-rw-r--r--meta/conf/distro/include/security_flags.inc11
-rw-r--r--meta/conf/distro/include/tclibc-eglibc.inc40
-rw-r--r--meta/conf/distro/include/tclibc-glibc.inc40
-rw-r--r--meta/conf/distro/include/tclibc-musl.inc4
-rw-r--r--meta/conf/distro/include/tclibc-uclibc.inc4
-rw-r--r--meta/conf/distro/include/tcmode-default.inc25
-rw-r--r--meta/conf/documentation.conf23
-rw-r--r--meta/conf/layer.conf8
-rw-r--r--meta/conf/licenses.conf27
-rw-r--r--meta/conf/machine/include/arm/arch-arm64.inc36
-rw-r--r--meta/conf/machine/include/arm/arch-armv8.inc1
-rw-r--r--meta/conf/machine/include/arm/feature-arm-thumb.inc10
-rw-r--r--meta/conf/machine/include/mips/arch-mips.inc4
-rw-r--r--meta/conf/machine/include/tune-mips32r2.inc2
-rw-r--r--meta/conf/machine/include/tune-mips64.inc2
-rw-r--r--meta/conf/machine/include/tune-power5.inc21
-rw-r--r--meta/conf/machine/include/tune-power6.inc21
-rw-r--r--meta/conf/machine/include/tune-power7.inc21
-rw-r--r--meta/conf/machine/qemuarm64.conf12
-rw-r--r--meta/conf/machine/qemumips.conf2
-rw-r--r--meta/conf/machine/qemux86-64.conf2
-rw-r--r--meta/conf/machine/qemux86.conf2
-rw-r--r--meta/conf/multilib.conf2
-rw-r--r--meta/conf/sanity.conf2
-rw-r--r--meta/conf/toasterconf.json84
-rw-r--r--meta/files/common-licenses/SMAIL_GPL164
-rw-r--r--meta/files/common-licenses/XSL48
-rw-r--r--meta/files/fs-perms.txt16
-rw-r--r--meta/files/toolchain-shar-template.sh190
-rw-r--r--meta/lib/oe/classextend.py14
-rw-r--r--meta/lib/oe/image.py34
-rw-r--r--meta/lib/oe/package.py29
-rw-r--r--meta/lib/oe/package_manager.py217
-rw-r--r--meta/lib/oe/patch.py158
-rw-r--r--meta/lib/oe/recipeutils.py279
-rw-r--r--meta/lib/oe/rootfs.py122
-rw-r--r--meta/lib/oe/sdk.py4
-rw-r--r--meta/lib/oe/sstatesig.py108
-rw-r--r--meta/lib/oe/terminal.py6
-rw-r--r--meta/lib/oe/utils.py33
-rw-r--r--meta/lib/oeqa/oetest.py57
-rw-r--r--meta/lib/oeqa/runtime/_ptest.py124
-rw-r--r--meta/lib/oeqa/runtime/buildcvs.py3
-rw-r--r--meta/lib/oeqa/runtime/buildiptables.py3
-rw-r--r--meta/lib/oeqa/runtime/buildsudoku.py3
-rw-r--r--meta/lib/oeqa/runtime/connman.py2
-rw-r--r--meta/lib/oeqa/runtime/date.py1
-rw-r--r--meta/lib/oeqa/runtime/df.py1
-rw-r--r--meta/lib/oeqa/runtime/dmesg.py3
-rw-r--r--meta/lib/oeqa/runtime/files/test.cpp3
-rw-r--r--meta/lib/oeqa/runtime/gcc.py10
-rw-r--r--meta/lib/oeqa/runtime/kernelmodule.py1
-rw-r--r--meta/lib/oeqa/runtime/ldd.py3
-rw-r--r--meta/lib/oeqa/runtime/logrotate.py1
-rw-r--r--meta/lib/oeqa/runtime/multilib.py1
-rw-r--r--meta/lib/oeqa/runtime/pam.py9
-rw-r--r--meta/lib/oeqa/runtime/parselogs.py202
-rw-r--r--meta/lib/oeqa/runtime/perl.py1
-rw-r--r--meta/lib/oeqa/runtime/python.py1
-rw-r--r--meta/lib/oeqa/runtime/rpm.py3
-rw-r--r--meta/lib/oeqa/runtime/scanelf.py2
-rw-r--r--meta/lib/oeqa/runtime/scp.py3
-rw-r--r--meta/lib/oeqa/runtime/skeletoninit.py3
-rw-r--r--meta/lib/oeqa/runtime/smart.py13
-rw-r--r--meta/lib/oeqa/runtime/ssh.py1
-rw-r--r--meta/lib/oeqa/runtime/syslog.py2
-rw-r--r--meta/lib/oeqa/runtime/systemd.py4
-rw-r--r--meta/lib/oeqa/runtime/vnc.py3
-rw-r--r--meta/lib/oeqa/runtime/x32lib.py1
-rw-r--r--meta/lib/oeqa/runtime/xorg.py4
-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/buildiptables.py26
-rw-r--r--meta/lib/oeqa/sdk/buildsudoku.py26
-rw-r--r--meta/lib/oeqa/selftest/_toaster.py94
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py27
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py29
-rw-r--r--meta/lib/oeqa/selftest/devtool.py241
-rw-r--r--meta/lib/oeqa/selftest/oescripts.py12
-rw-r--r--meta/lib/oeqa/selftest/prservice.py10
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py35
-rw-r--r--meta/lib/oeqa/utils/commands.py14
-rw-r--r--meta/lib/oeqa/utils/decorators.py133
-rw-r--r--meta/lib/oeqa/utils/httpserver.py2
-rw-r--r--meta/lib/oeqa/utils/logparser.py125
-rw-r--r--meta/lib/oeqa/utils/targetbuild.py94
-rw-r--r--meta/recipes-bsp/acpid/acpid.inc23
-rw-r--r--meta/recipes-bsp/acpid/acpid/acpid.service10
-rw-r--r--meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch10
-rw-r--r--meta/recipes-bsp/acpid/acpid_2.0.23.bb (renamed from meta/recipes-bsp/acpid/acpid_1.0.10.bb)5
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb23
-rw-r--r--meta/recipes-bsp/formfactor/formfactor_0.0.bb2
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch22
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb40
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb33
-rw-r--r--meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch32
-rw-r--r--meta/recipes-bsp/grub/files/cfg2
-rw-r--r--meta/recipes-bsp/grub/files/fix-endianness-problem.patch44
-rw-r--r--meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch28
-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.patch (renamed from meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch)0
-rw-r--r--meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch104
-rw-r--r--meta/recipes-bsp/grub/files/remove-gets.patch (renamed from meta/recipes-bsp/grub/grub-2.00/remove-gets.patch)0
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.00.bb49
-rw-r--r--meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch34
-rw-r--r--meta/recipes-bsp/grub/grub2.inc44
-rw-r--r--meta/recipes-bsp/grub/grub_2.00.bb30
-rw-r--r--meta/recipes-bsp/grub/grub_git.bb20
-rw-r--r--meta/recipes-bsp/hostap/hostap-conf_1.0.bb2
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch27
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb1
-rw-r--r--meta/recipes-bsp/keymaps/keymaps_1.0.bb34
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch92
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.3.0.bb (renamed from meta/recipes-bsp/pciutils/pciutils_3.2.1.bb)23
-rw-r--r--meta/recipes-bsp/pcmciautils/pcmciautils.inc4
-rw-r--r--meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb2
-rw-r--r--meta/recipes-bsp/setserial/setserial/ldflags.patch24
-rw-r--r--meta/recipes-bsp/setserial/setserial_2.17.bb3
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch74
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb38
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb35
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb47
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb29
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb34
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc11
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2013.07.bb25
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2014.07.bb9
-rw-r--r--meta/recipes-bsp/usbutils/usbutils-008/iconv.patch41
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_008.bb28
-rw-r--r--meta/recipes-bsp/v86d/v86d/uvesafb.conf2
-rw-r--r--meta/recipes-bsp/v86d/v86d_0.1.10.bb31
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb7
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc8
-rw-r--r--meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch35
-rw-r--r--meta/recipes-connectivity/bind/bind/bind92
-rw-r--r--meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch990
-rw-r--r--meta/recipes-connectivity/bind/bind/conf.patch18
-rw-r--r--meta/recipes-connectivity/bind/bind/generate-rndc-key.sh2
-rw-r--r--meta/recipes-connectivity/bind/bind/named.service2
-rw-r--r--meta/recipes-connectivity/bind/bind_9.9.5.bb27
-rw-r--r--meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb2
-rw-r--r--meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5.inc31
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf1
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.21.bb3
-rw-r--r--meta/recipes-connectivity/bluez5/bluez5_5.27.bb51
-rw-r--r--meta/recipes-connectivity/connman/connman-conf.bb2
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch187
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome_0.7.bb7
-rw-r--r--meta/recipes-connectivity/connman/connman.inc17
-rw-r--r--meta/recipes-connectivity/connman/connman_1.26.bb (renamed from meta/recipes-connectivity/connman/connman_1.24.bb)6
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc29
-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/fixsepbuild.patch112
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch176
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/site.h21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb (renamed from meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb)5
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcpd.service11
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcrelay.service9
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb (renamed from meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb)4
-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.bb18
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb10
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc12
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch24
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb (renamed from meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb)8
-rw-r--r--meta/recipes-connectivity/neard/neard.inc4
-rw-r--r--meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch33
-rw-r--r--meta/recipes-connectivity/neard/neard/neard.service.in6
-rw-r--r--meta/recipes-connectivity/neard/neard/parallel-build.patch2
-rw-r--r--meta/recipes-connectivity/neard/neard_0.14.bb2
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch41
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb)13
-rw-r--r--meta/recipes-connectivity/ofono/ofono.inc16
-rw-r--r--meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch1270
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.14.bb13
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.15.bb12
-rw-r--r--meta/recipes-connectivity/openssh/openssh/init12
-rw-r--r--meta/recipes-connectivity/openssh/openssh/nostrip.patch20
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch29
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch22
-rw-r--r--meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch114
-rw-r--r--meta/recipes-connectivity/openssh/openssh/ssh_config4
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd@.service1
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd_config30
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service1
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.7p1.bb (renamed from meta/recipes-connectivity/openssh/openssh_6.6p1.bb)25
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc35
-rw-r--r--meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch45
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.1j.bb (renamed from meta/recipes-connectivity/openssl/openssl_1.0.1h.bb)5
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc22
-rw-r--r--meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch (renamed from meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch)0
-rw-r--r--meta/recipes-connectivity/portmap/portmap/portmap.service10
-rw-r--r--meta/recipes-connectivity/portmap/portmap/tcpd-config.patch (renamed from meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch)0
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb9
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb2
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb (renamed from meta/recipes-connectivity/ppp/ppp_2.4.6.bb)4
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf4
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch20
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb (renamed from meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb)21
-rw-r--r--meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch29
-rw-r--r--meta/recipes-connectivity/socat/socat_1.7.2.4.bb2
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch18
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch15
-rw-r--r--meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb23
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb16
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch15
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb17
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch76
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb51
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch43
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch26
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch26
-rw-r--r--meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb32
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc28
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig (renamed from meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls)2
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch14
-rw-r--r--meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb (renamed from meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb)0
-rw-r--r--meta/recipes-core/base-files/base-files/profile6
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb29
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.29.bb6
-rw-r--r--meta/recipes-core/busybox/busybox.inc5
-rw-r--r--meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch41
-rw-r--r--meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch71
-rw-r--r--meta/recipes-core/busybox/busybox/defconfig6
-rw-r--r--meta/recipes-core/busybox/busybox/recognize_connmand.patch21
-rw-r--r--meta/recipes-core/busybox/busybox_1.22.1.bb4
-rw-r--r--meta/recipes-core/busybox/busybox_git.bb1
-rw-r--r--meta/recipes-core/busybox/files/find-touchscreen.sh7
-rwxr-xr-xmeta/recipes-core/busybox/files/mdev12
-rw-r--r--meta/recipes-core/busybox/files/mdev-mount.sh63
-rw-r--r--meta/recipes-core/busybox/files/mdev.conf5
-rw-r--r--meta/recipes-core/busybox/files/simple.script4
-rw-r--r--meta/recipes-core/busybox/files/syslog2
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch)12
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch39
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch (renamed from meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch)0
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.23.bb (renamed from meta/recipes-core/coreutils/coreutils_8.22.bb)12
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc1
-rw-r--r--meta/recipes-core/dbus/dbus-glib/no-examples.patch (renamed from meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch)0
-rw-r--r--meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch (renamed from meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch)57
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.100.2.bb5
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.102.bb5
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.8.10.bb (renamed from meta/recipes-core/dbus/dbus-test_1.8.2.bb)4
-rw-r--r--meta/recipes-core/dbus/dbus.inc2
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.10.bb4
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.2.bb4
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc9
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch2
-rw-r--r--meta/recipes-core/dropbear/dropbear_2014.63.bb4
-rw-r--r--meta/recipes-core/dropbear/dropbear_2014.66.bb4
-rw-r--r--meta/recipes-core/eglibc/cross-localedef-native_2.19.bb48
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch912
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch169
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch176
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch143
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch22
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch32
-rw-r--r--meta/recipes-core/eglibc/eglibc-common.inc9
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial_2.19.bb11
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale_2.19.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace.inc13
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts.inc16
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts_2.19.bb1
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.4/parallel.patch (renamed from meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch)13
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template53
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgzbin37591 -> 0 bytes
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch43
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING)2
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in)47
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgzbin0 -> 39744 bytes
-rwxr-xr-xmeta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath)18
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin (renamed from meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin)0
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb (renamed from meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb)3
-rw-r--r--meta/recipes-core/gettext/gettext_0.19.4.bb (renamed from meta/recipes-core/gettext/gettext_0.18.3.2.bb)4
-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_2.42.1.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb)5
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc40
-rw-r--r--meta/recipes-core/glib-networking/glib-networking_2.38.0.bb2
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch (renamed from meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch)6
-rw-r--r--meta/recipes-core/glibc/cross-localedef-native_2.20.bb56
-rw-r--r--meta/recipes-core/glibc/glibc-collateral.inc (renamed from meta/recipes-core/eglibc/eglibc-collateral.inc)2
-rw-r--r--meta/recipes-core/glibc/glibc-common.inc9
-rw-r--r--meta/recipes-core/glibc/glibc-initial.inc (renamed from meta/recipes-core/eglibc/eglibc-initial.inc)46
-rw-r--r--meta/recipes-core/glibc/glibc-initial_2.20.bb11
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc (renamed from meta/recipes-core/eglibc/eglibc-ld.inc)6
-rw-r--r--meta/recipes-core/glibc/glibc-locale.inc (renamed from meta/recipes-core/eglibc/eglibc-locale.inc)48
-rw-r--r--meta/recipes-core/glibc/glibc-locale_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace.inc13
-rw-r--r--meta/recipes-core/glibc/glibc-mtrace_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-options.inc (renamed from meta/recipes-core/eglibc/eglibc-options.inc)82
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc (renamed from meta/recipes-core/eglibc/eglibc-package.inc)83
-rw-r--r--meta/recipes-core/glibc/glibc-scripts.inc16
-rw-r--r--meta/recipes-core/glibc/glibc-scripts_2.20.bb1
-rw-r--r--meta/recipes-core/glibc/glibc-testing.inc (renamed from meta/recipes-core/eglibc/eglibc-testing.inc)72
-rw-r--r--meta/recipes-core/glibc/glibc.inc (renamed from meta/recipes-core/eglibc/eglibc.inc)27
-rw-r--r--meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch)10
-rw-r--r--meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch)13
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch339
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch215
-rw-r--r--meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch65
-rw-r--r--meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch529
-rw-r--r--meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch85
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch109
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch68
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch54
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch42
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch16543
-rw-r--r--meta/recipes-core/glibc/glibc/eglibc.patch602
-rw-r--r--meta/recipes-core/glibc/glibc/etc/ld.so.conf (renamed from meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf)0
-rw-r--r--meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch)16
-rw-r--r--meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch29
-rw-r--r--meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch)38
-rw-r--r--meta/recipes-core/glibc/glibc/generate-supported.mk (renamed from meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk)0
-rw-r--r--meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch)114
-rw-r--r--meta/recipes-core/glibc/glibc/grok_gold.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch)16
-rw-r--r--meta/recipes-core/glibc/glibc/initgroups_keys.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch)14
-rw-r--r--meta/recipes-core/glibc/glibc/ld-search-order.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch)20
-rw-r--r--meta/recipes-core/glibc/glibc/mips-rld-map-check.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch)7
-rw-r--r--meta/recipes-core/glibc/glibc/multilib_readlib.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch)8
-rw-r--r--meta/recipes-core/glibc/glibc/option-groups.patch1397
-rw-r--r--meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch)136
-rw-r--r--meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/relocatable_sdk.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch (renamed from meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch)0
-rw-r--r--meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch38
-rw-r--r--meta/recipes-core/glibc/glibc_2.20.bb (renamed from meta/recipes-core/eglibc/eglibc_2.19.bb)50
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/README (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/README)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch47
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2 (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2)bin21491 -> 21491 bytes
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch (renamed from meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch)0
-rw-r--r--meta/recipes-core/glibc/ldconfig-native_2.12.1.bb (renamed from meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb)1
-rw-r--r--meta/recipes-core/glibc/site_config/funcs (renamed from meta/recipes-core/eglibc/site_config/funcs)0
-rw-r--r--meta/recipes-core/glibc/site_config/headers (renamed from meta/recipes-core/eglibc/site_config/headers)0
-rw-r--r--meta/recipes-core/glibc/site_config/types (renamed from meta/recipes-core/eglibc/site_config/types)0
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx58
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf2
-rw-r--r--meta/recipes-core/images/build-appliance-image_12.0.1.bb (renamed from meta/recipes-core/images/build-appliance-image_8.0.bb)2
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces5
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh141
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh4
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh10
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb6
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb2
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh16
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/hostname.sh2
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh2
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/urandom21
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb8
-rw-r--r--meta/recipes-core/kbd/kbd_2.0.2.bb (renamed from meta/recipes-core/kbd/kbd_2.0.1.bb)6
-rw-r--r--meta/recipes-core/libxml/libxml2.inc19
-rw-r--r--meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch30
-rw-r--r--meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch45
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch204
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch147
-rw-r--r--meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch17
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.2.bb (renamed from meta/recipes-core/libxml/libxml2_2.9.1.bb)7
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb33
-rw-r--r--meta/recipes-core/meta/meta-environment.bb46
-rw-r--r--meta/recipes-core/meta/meta-ide-support.bb1
-rw-r--r--meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb19
-rw-r--r--meta/recipes-core/meta/package-index.bb1
-rw-r--r--meta/recipes-core/meta/uninative-tarball.bb48
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc2
-rw-r--r--meta/recipes-core/netbase/netbase_5.3.bb (renamed from meta/recipes-core/netbase/netbase_5.2.bb)6
-rw-r--r--meta/recipes-core/os-release/os-release.bb36
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-base.bb17
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-boot.bb11
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-nfs.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-sdk.bb18
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb5
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb9
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb9
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb7
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-self-hosted.bb46
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb12
-rw-r--r--meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch32
-rw-r--r--meta/recipes-core/readline/readline-6.3/readline63-00343
-rw-r--r--meta/recipes-core/readline/readline_6.3.bb3
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service2
-rw-r--r--meta/recipes-core/systemd/systemd-systemctl-native.bb2
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl45
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch180
-rw-r--r--meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch138
-rw-r--r--meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch176
-rw-r--r--meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch56
-rw-r--r--meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch142
-rw-r--r--meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest2
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-older-kernel.patch56
-rw-r--r--meta/recipes-core/systemd/systemd_216.bb (renamed from meta/recipes-core/systemd/systemd_213.bb)75
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb4
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/01_bootlogd1
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/bootlogd.init14
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/rc3
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb7
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc6
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch75
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch33
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch377
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch75
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch125
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc6
-rw-r--r--meta/recipes-core/udev/udev-extraconf/automount.rules2
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh3
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.1.bb2
-rw-r--r--meta/recipes-core/udev/udev.inc5
-rw-r--r--meta/recipes-core/udev/udev/add-install-ptest.patch19
-rw-r--r--meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch59
-rw-r--r--meta/recipes-core/udev/udev/init66
-rw-r--r--meta/recipes-core/udev/udev/run-ptest2
-rw-r--r--meta/recipes-core/udev/udev/udev-cache45
-rw-r--r--meta/recipes-core/udev/udev/udev-cache.default2
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc55
-rw-r--r--meta/recipes-core/util-linux/util-linux/MCONFIG223
-rw-r--r--meta/recipes-core/util-linux/util-linux/defines.h10
-rw-r--r--meta/recipes-core/util-linux/util-linux/fix-configure.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/make_include17
-rw-r--r--meta/recipes-core/util-linux/util-linux/swapargs.h3
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch34
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native.patch54
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch24
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.25.2.bb (renamed from meta/recipes-core/util-linux/util-linux_2.24.2.bb)8
-rw-r--r--meta/recipes-core/volatile-binds/files/COPYING.MIT17
-rwxr-xr-xmeta/recipes-core/volatile-binds/files/mount-copybind34
-rw-r--r--meta/recipes-core/volatile-binds/files/volatile-binds.service.in19
-rw-r--r--meta/recipes-core/volatile-binds/volatile-binds.bb69
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch45
-rw-r--r--meta/recipes-core/zlib/zlib_1.2.8.bb1
-rw-r--r--meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch193
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc1
-rw-r--r--meta/recipes-devtools/apt/apt.inc1
-rw-r--r--meta/recipes-devtools/apt/apt_0.9.9.4.bb2
-rw-r--r--meta/recipes-devtools/autoconf/autoconf.inc1
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch13
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.69.bb3
-rw-r--r--meta/recipes-devtools/autogen/autogen-native_5.18.4.bb (renamed from meta/recipes-devtools/autogen/autogen-native_5.18.3.bb)6
-rw-r--r--meta/recipes-devtools/automake/automake_1.15.bb (renamed from meta/recipes-devtools/automake/automake_1.14.1.bb)4
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.24.inc8
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc2
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch67
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch102
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch60
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch89
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch523
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch47
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch75
-rw-r--r--meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch177
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch27
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh18
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2_git.bb157
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch58
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch22
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch31
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb11
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb4
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb1
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc8
-rw-r--r--meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake18
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch37
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch40
-rw-r--r--meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh1
-rw-r--r--meta/recipes-devtools/cmake/cmake_2.8.12.2.bb14
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch20
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/aclocal.patch38
-rw-r--r--meta/recipes-devtools/diffstat/diffstat/dirfix.patch27
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.59.bb (renamed from meta/recipes-devtools/diffstat/diffstat_1.58.bb)7
-rwxr-xr-xmeta/recipes-devtools/distcc/files/distcc5
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode_2.12.bb2
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS16
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch515
-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.bb64
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch24
-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.78.1.bb69
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb5
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc7
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch68
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch97
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch24
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.17.21.bb (renamed from meta/recipes-devtools/dpkg/dpkg_1.17.4.bb)6
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch54
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m453
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb14
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/arm_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff (renamed from meta/recipes-devtools/elfutils/elfutils/elf_additions.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch36
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/mips_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch (renamed from meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch (renamed from meta/recipes-devtools/elfutils/elfutils/remove-unused.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch27
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff77
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch34
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff1756
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch256
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff)382
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch166
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch83
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff)588
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch29
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb22
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.161.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.158.bb)27
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.bb5
-rw-r--r--meta/recipes-devtools/fdisk/gptfdisk_git.bb22
-rw-r--r--meta/recipes-devtools/file/file/debian-742262.patch19
-rw-r--r--meta/recipes-devtools/file/file/dump81
-rw-r--r--meta/recipes-devtools/file/file/filesystems812
-rw-r--r--meta/recipes-devtools/file/file_5.22.bb (renamed from meta/recipes-devtools/file/file_5.18.bb)17
-rw-r--r--meta/recipes-devtools/flex/flex.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc187
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch66
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch81
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9.inc193
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch66
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch98
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch61
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch32
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch113
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch59
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch81
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc48
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc77
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc26
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc38
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc31
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc35
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc185
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc117
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-shared-source.inc9
-rw-r--r--meta/recipes-devtools/gcc/gcc-source.inc34
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_4.8.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_4.9.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc110
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc6
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc42
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc31
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.8.1.inc (renamed from meta/recipes-devtools/gdb/gdb-7.7.inc)5
-rw-r--r--meta/recipes-devtools/gdb/gdb-common.inc6
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc2
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross.inc13
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross_7.7.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc3
-rw-r--r--meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb_7.7.bb)0
-rw-r--r--meta/recipes-devtools/git/git.inc22
-rw-r--r--meta/recipes-devtools/git/git_2.2.1.bb (renamed from meta/recipes-devtools/git/git_1.9.0.bb)6
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20120814.bb2
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_git.bb2
-rw-r--r--meta/recipes-devtools/guile/files/arm_aarch64.patch19
-rw-r--r--meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch42
-rw-r--r--meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch60
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.11.bb5
-rw-r--r--meta/recipes-devtools/help2man/help2man-native_1.46.4.bb (renamed from meta/recipes-devtools/help2man/help2man-native_1.45.1.bb)4
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk (renamed from meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk)0
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb26
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb34
-rw-r--r--meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb4
-rw-r--r--meta/recipes-devtools/insserv/files/run-ptest2
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal3
-rw-r--r--meta/recipes-devtools/installer/adt-installer_1.0.bb2
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.12.bb (renamed from meta/recipes-devtools/json-c/json-c_0.11.bb)6
-rw-r--r--meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb2
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.5.inc (renamed from meta/recipes-devtools/libtool/libtool-2.4.2.inc)19
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb (renamed from meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb)24
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.4.5.bb (renamed from meta/recipes-devtools/libtool/libtool-native_2.4.2.bb)3
-rw-r--r--meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch39
-rw-r--r--meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch32
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch30
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch15
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/fixinstall.patch35
-rw-r--r--meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch27
-rw-r--r--meta/recipes-devtools/libtool/libtool/norm-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch121
-rw-r--r--meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch68
-rw-r--r--meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch53
-rw-r--r--meta/recipes-devtools/libtool/libtool/trailingslash.patch11
-rw-r--r--meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch12
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.2.bb15
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.5.bb26
-rw-r--r--meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb (renamed from meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb)4
-rw-r--r--meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb4
-rw-r--r--meta/recipes-devtools/m4/m4.inc1
-rw-r--r--meta/recipes-devtools/make/make_4.1.bb (renamed from meta/recipes-devtools/make/make_4.0.bb)4
-rw-r--r--meta/recipes-devtools/makedevs/makedevs_1.0.1.bb6
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage_git.bb2
-rw-r--r--meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch18
-rw-r--r--meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb (renamed from meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb)9
-rw-r--r--meta/recipes-devtools/mmc/mmc-utils_git.bb2
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch44
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_git.bb1
-rw-r--r--meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch23
-rw-r--r--meta/recipes-devtools/mtools/mtools_3.9.9.bb4
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.11.06.bb (renamed from meta/recipes-devtools/nasm/nasm_2.11.02.bb)4
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb2
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral.bb4
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc2
-rw-r--r--meta/recipes-devtools/opkg/opkg/add-exclude.patch32
-rw-r--r--meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch39
-rw-r--r--meta/recipes-devtools/opkg/opkg/no-install-recommends.patch26
-rw-r--r--meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch32
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.2.bb12
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.4.bb14
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.18.bb6
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.23.bb (renamed from meta/recipes-devtools/orc/orc.inc)6
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch26
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb1
-rw-r--r--meta/recipes-devtools/patchelf/patchelf_0.8.bb12
-rw-r--r--meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb (renamed from meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb)6
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb (renamed from meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb)8
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb2
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/config.sh7
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch21
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch30
-rw-r--r--meta/recipes-devtools/perl/perl-5.20.0/run-ptest2
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.20.0.bb11
-rw-r--r--meta/recipes-devtools/perl/perl-ptest.inc2
-rw-r--r--meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc22
-rw-r--r--meta/recipes-devtools/perl/perl_5.20.0.bb23
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig.inc2
-rw-r--r--meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb (renamed from meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb)6
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb2
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch190
-rw-r--r--meta/recipes-devtools/pseudo/files/fallback-group2
-rw-r--r--meta/recipes-devtools/pseudo/files/fallback-passwd1
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch18
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch264
-rw-r--r--meta/recipes-devtools/pseudo/files/shutdownping.patch53
-rw-r--r--meta/recipes-devtools/pseudo/files/symver.patch26
-rw-r--r--meta/recipes-devtools/pseudo/pseudo.inc6
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.5.1.bb16
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.6.4.bb19
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb4
-rw-r--r--meta/recipes-devtools/python/fix-path.inc22
-rw-r--r--meta/recipes-devtools/python/python-2.7-manifest.inc18
-rw-r--r--meta/recipes-devtools/python/python-3.3-manifest.inc14
-rw-r--r--meta/recipes-devtools/python/python-argparse_1.2.1.bb17
-rw-r--r--meta/recipes-devtools/python/python-dbus_1.2.0.bb4
-rw-r--r--meta/recipes-devtools/python/python-distribute_0.6.32.bb8
-rw-r--r--meta/recipes-devtools/python/python-docutils_0.12.bb (renamed from meta/recipes-devtools/python/python-docutils_0.11.bb)6
-rw-r--r--meta/recipes-devtools/python/python-git_0.3.3.bb (renamed from meta/recipes-devtools/python/python-git_0.3.2.RC1.bb)5
-rw-r--r--meta/recipes-devtools/python/python-gitdb_0.6.1.bb (renamed from meta/recipes-devtools/python/python-gitdb_0.5.4.bb)5
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.3.bb5
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/powerpc64/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy_1.7.0.bb12
-rw-r--r--meta/recipes-devtools/python/python-pycairo_1.10.0.bb2
-rw-r--r--meta/recipes-devtools/python/python-pycurl/no-static-link.patch24
-rw-r--r--meta/recipes-devtools/python/python-pycurl_7.19.5.bb (renamed from meta/recipes-devtools/python/python-pycurl_7.19.3.bb)11
-rw-r--r--meta/recipes-devtools/python/python-pygobject_2.28.3.bb4
-rw-r--r--meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch13
-rw-r--r--meta/recipes-devtools/python/python-pygtk_2.24.0.bb30
-rw-r--r--meta/recipes-devtools/python/python-scons-native_2.3.2.bb (renamed from meta/recipes-devtools/python/python-scons-native_2.3.0.bb)2
-rw-r--r--meta/recipes-devtools/python/python-scons_2.3.2.bb (renamed from meta/recipes-devtools/python/python-scons_2.3.0.bb)6
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch37
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt.patch82
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-dflags.patch53
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch2
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch49
-rw-r--r--meta/recipes-devtools/python/python-smartpm_1.4.1.bb6
-rw-r--r--meta/recipes-devtools/python/python.inc4
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch15
-rw-r--r--meta/recipes-devtools/python/python/json-flaw-fix.patch27
-rw-r--r--meta/recipes-devtools/python/python/posix_close.patch43
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch75
-rw-r--r--meta/recipes-devtools/python/python/python2.7.3-nossl3.patch37
-rw-r--r--meta/recipes-devtools/python/python/remove-BOM-insection-code.patch24
-rw-r--r--meta/recipes-devtools/python/python3-distribute_0.6.32.bb2
-rw-r--r--meta/recipes-devtools/python/python3-native_3.3.3.bb2
-rw-r--r--meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.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/setup.py-check-cross_compiling-when-get-FLAGS.patch50
-rw-r--r--meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch54
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb31
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb18
-rw-r--r--meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch10
-rw-r--r--meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch93
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc14
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc52
-rw-r--r--meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch32
-rw-r--r--meta/recipes-devtools/qemu/qemu/no-strip.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu/wacom.patch130
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu_2.0.0.bb)19
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb2
-rw-r--r--meta/recipes-devtools/quilt/quilt-0.63.inc4
-rwxr-xr-xmeta/recipes-devtools/quilt/quilt/run-ptest2
-rw-r--r--meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch39
-rw-r--r--meta/recipes-devtools/remake/remake_git.bb4
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch20
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch19
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh16
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch26
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch194
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch384
-rw-r--r--meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch38
-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/rpm-disable-Wno-override-init.patch32
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-realpath.patch24
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch32
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.11.2.bb135
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4+cvs.bb6
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.14.bb9
-rw-r--r--meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c8
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.0.bb26
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.1.bb27
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service1
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb2
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch72
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch190
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch38
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch215
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb (renamed from meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb)21
-rw-r--r--meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch28
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch53
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/git-version-gen (renamed from meta/recipes-devtools/strace/strace-4.8/git-version-gen)0
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/run-ptest (renamed from meta/recipes-devtools/strace/strace-4.8/run-ptest)0
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch (renamed from meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch)37
-rw-r--r--meta/recipes-devtools/strace/strace_4.9.bb (renamed from meta/recipes-devtools/strace/strace_4.8.bb)7
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch20
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch48
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch32
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch42
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch15
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch130
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch68
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch (renamed from meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch)0
-rw-r--r--meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch439
-rw-r--r--meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch29
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.6.15.bb5
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.7.10.bb45
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.8.10.bb49
-rw-r--r--meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch50
-rw-r--r--meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch450
-rw-r--r--meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch87
-rw-r--r--meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch65
-rw-r--r--meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch40
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch (renamed from meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch)17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch34
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.03.bb (renamed from meta/recipes-devtools/syslinux/syslinux_6.01.bb)18
-rw-r--r--meta/recipes-devtools/tcltk/tcl/run-ptest4
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.3.bb (renamed from meta/recipes-devtools/tcltk/tcl_8.6.1.bb)5
-rw-r--r--meta/recipes-devtools/ubootchart/files/sysvinit.patch14
-rw-r--r--meta/recipes-devtools/ubootchart/files/ubootchart-stop3
-rw-r--r--meta/recipes-devtools/ubootchart/files/ubootchart.desktop6
-rw-r--r--meta/recipes-devtools/ubootchart/ubootchart_svn.bb39
-rw-r--r--meta/recipes-devtools/unifdef/files/unifdef.c1005
-rw-r--r--meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb21
-rw-r--r--meta/recipes-devtools/unifdef/unifdef_2.10.bb15
-rw-r--r--meta/recipes-devtools/vala/vala.inc8
-rw-r--r--meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch (renamed from meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch)2
-rw-r--r--meta/recipes-devtools/vala/vala_0.16.0.bb8
-rw-r--r--meta/recipes-devtools/vala/vala_0.26.1.bb6
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/add-ptest.patch68
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch23
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch30
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch20
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch26
-rwxr-xr-xmeta/recipes-devtools/valgrind/valgrind/run-ptest3
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch25
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.10.1.bb (renamed from meta/recipes-devtools/valgrind/valgrind_3.9.0.bb)10
-rw-r--r--meta/recipes-devtools/xmlto/files/catalog.xml19
-rw-r--r--meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch30
-rw-r--r--meta/recipes-devtools/xmlto/xmlto_0.0.26.bb38
-rw-r--r--meta/recipes-extended/at/at/atd.init (renamed from meta/recipes-extended/at/files/S99at)0
-rw-r--r--meta/recipes-extended/at/at/atd.service (renamed from meta/recipes-extended/at/files/atd.service)0
-rw-r--r--meta/recipes-extended/at/at/configure-add-enable-pam.patch (renamed from meta/recipes-extended/at/files/configure-add-enable-pam.patch)0
-rw-r--r--meta/recipes-extended/at/at/file_replacement_with_gplv2.patch (renamed from meta/recipes-extended/at/files/file_replacement_with_gplv2.patch)0
-rw-r--r--meta/recipes-extended/at/at/fix_parallel_build_error.patch (renamed from meta/recipes-extended/at/files/fix_parallel_build_error.patch)0
-rw-r--r--meta/recipes-extended/at/at/pam.conf.patch (renamed from meta/recipes-extended/at/files/pam.conf.patch)24
-rw-r--r--meta/recipes-extended/at/at/posixtm.c (renamed from meta/recipes-extended/at/files/posixtm.c)0
-rw-r--r--meta/recipes-extended/at/at/posixtm.h (renamed from meta/recipes-extended/at/files/posixtm.h)0
-rw-r--r--meta/recipes-extended/at/at_3.1.16.bb (renamed from meta/recipes-extended/at/at_3.1.14.bb)17
-rw-r--r--meta/recipes-extended/bash/bash.inc9
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb39
-rw-r--r--meta/recipes-extended/bash/bash_4.3.bb93
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb4
-rw-r--r--meta/recipes-extended/byacc/byacc_20141128.bb (renamed from meta/recipes-extended/byacc/byacc_20140422.bb)4
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac2
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb14
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch220
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch217
-rw-r--r--meta/recipes-extended/cpio/cpio_2.11.bb3
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb7
-rw-r--r--meta/recipes-extended/cracklib/cracklib_2.9.2.bb (renamed from meta/recipes-extended/cracklib/cracklib_2.9.1.bb)10
-rw-r--r--meta/recipes-extended/cronie/cronie/crontab6
-rw-r--r--meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch31
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.12.bb (renamed from meta/recipes-extended/cronie/cronie_1.4.11.bb)16
-rw-r--r--meta/recipes-extended/cups/cups.inc34
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch35
-rw-r--r--meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch34
-rw-r--r--meta/recipes-extended/cups/cups/cups-no-gcrypt.patch49
-rw-r--r--meta/recipes-extended/cups/cups/cups-str4402.patch190
-rw-r--r--meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--meta/recipes-extended/cups/cups/cups.socket8
-rw-r--r--meta/recipes-extended/cups/cups_1.7.3.bb6
-rw-r--r--meta/recipes-extended/cups/cups_2.0.1.bb6
-rw-r--r--meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb10
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.3.bb2
-rw-r--r--meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch50
-rw-r--r--meta/recipes-extended/ethtool/ethtool_3.16.bb (renamed from meta/recipes-extended/ethtool/ethtool_3.14.bb)5
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch781
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch294
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch58
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch84
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch22
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch40
-rw-r--r--meta/recipes-extended/findutils/findutils.inc2
-rw-r--r--meta/recipes-extended/findutils/findutils_4.4.2.bb25
-rw-r--r--meta/recipes-extended/findutils/findutils_4.5.14.bb15
-rw-r--r--meta/recipes-extended/gawk/gawk-4.1.1/run-ptest4
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch31
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch99
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.15.bb (renamed from meta/recipes-extended/ghostscript/ghostscript_9.14.bb)15
-rw-r--r--meta/recipes-extended/grep/grep_2.21.bb (renamed from meta/recipes-extended/grep/grep_2.19.bb)5
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb2
-rw-r--r--meta/recipes-extended/groff/groff_1.18.1.4.bb2
-rw-r--r--meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch31
-rw-r--r--meta/recipes-extended/gzip/gzip.inc3
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.45.bb (renamed from meta/recipes-extended/hdparm/hdparm_9.43.bb)4
-rw-r--r--meta/recipes-extended/images/core-image-kernel-dev.bb17
-rw-r--r--meta/recipes-extended/less/less_471.bb (renamed from meta/recipes-extended/less/less_458.bb)4
-rw-r--r--meta/recipes-extended/libaio/libaio/00_arches.patch208
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio-aarch64.patch28
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch58
-rw-r--r--meta/recipes-extended/libaio/libaio/toolchain.patch27
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.110.bb (renamed from meta/recipes-extended/libaio/libaio_0.3.109.bb)12
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.1.2.bb1
-rw-r--r--meta/recipes-extended/libidn/libidn_0.6.14.bb1
-rw-r--r--meta/recipes-extended/libidn/libidn_1.29.bb (renamed from meta/recipes-extended/libidn/libidn_1.28.bb)10
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb (renamed from meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb)6
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb6
-rw-r--r--meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch14
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.7.bb29
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.8.bb62
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb12
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts_9.60.bb (renamed from meta/recipes-extended/lsb/lsbinitscripts_9.54.bb)7
-rw-r--r--meta/recipes-extended/lsb/lsbtest/LSB_Test.sh2
-rw-r--r--meta/recipes-extended/lsof/lsof_4.88.bb (renamed from meta/recipes-extended/lsof/lsof_4.87.bb)15
-rw-r--r--meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch39
-rw-r--r--meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch37
-rw-r--r--meta/recipes-extended/ltp/ltp/make-setregid02-work.patch61
-rw-r--r--meta/recipes-extended/ltp/ltp_20150119.bb (renamed from meta/recipes-extended/ltp/ltp_20140422.bb)23
-rw-r--r--meta/recipes-extended/man-pages/man-pages_3.76.bb (renamed from meta/recipes-extended/man-pages/man-pages_3.69.bb)11
-rw-r--r--meta/recipes-extended/man/man/man.conf3
-rw-r--r--meta/recipes-extended/man/man_1.6g.bb17
-rw-r--r--meta/recipes-extended/mc/mc/mc-CTRL.patch31
-rw-r--r--meta/recipes-extended/mc/mc_4.7.5.2.bb4
-rw-r--r--meta/recipes-extended/mc/mc_4.8.13.bb (renamed from meta/recipes-extended/mc/mc_4.8.12.bb)8
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.2.bb (renamed from meta/recipes-extended/mdadm/mdadm_3.3.bb)7
-rw-r--r--meta/recipes-extended/mingetty/mingetty_1.08.bb2
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.6.1.bb (renamed from meta/recipes-extended/msmtp/msmtp_1.4.32.bb)8
-rw-r--r--meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch32
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-25.bb5
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.18.bb (renamed from meta/recipes-extended/newt/libnewt-python_0.52.17.bb)0
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.18.bb (renamed from meta/recipes-extended/newt/libnewt_0.52.17.bb)13
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb20
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch226
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb51
-rw-r--r--meta/recipes-extended/parted/files/Makefile (renamed from meta/recipes-extended/parted/parted-3.1/Makefile)0
-rw-r--r--meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch57
-rw-r--r--meta/recipes-extended/parted/files/fix-doc-mandir.patch (renamed from meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch)0
-rw-r--r--meta/recipes-extended/parted/files/no_check.patch (renamed from meta/recipes-extended/parted/parted-3.1/no_check.patch)0
-rw-r--r--meta/recipes-extended/parted/files/run-ptest (renamed from meta/recipes-extended/parted/parted-3.1/run-ptest)0
-rw-r--r--meta/recipes-extended/parted/files/syscalls.patch (renamed from meta/recipes-extended/parted/parted-3.1/syscalls.patch)0
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch34
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch35
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch43
-rw-r--r--meta/recipes-extended/parted/parted_3.2.bb (renamed from meta/recipes-extended/parted/parted_3.1.bb)10
-rw-r--r--meta/recipes-extended/pax/pax_3.4.bb4
-rw-r--r--meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb (renamed from meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb)4
-rw-r--r--meta/recipes-extended/pigz/pigz.inc26
-rw-r--r--meta/recipes-extended/pigz/pigz/link-order.patch38
-rw-r--r--meta/recipes-extended/pigz/pigz_2.3.3.bb (renamed from meta/recipes-extended/pigz/pigz_2.3.1.bb)6
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch54
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch26
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch44
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/install.patch39
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch15
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procmodule.patch38
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch111
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch19
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch82
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/psmodule.patch23
-rw-r--r--meta/recipes-extended/procps/procps.inc31
-rw-r--r--meta/recipes-extended/procps/procps/fix-configure.patch19
-rw-r--r--meta/recipes-extended/procps/procps/sysctl.conf (renamed from meta/recipes-extended/procps/procps-3.2.8/sysctl.conf)0
-rw-r--r--meta/recipes-extended/procps/procps_3.2.8.bb32
-rw-r--r--meta/recipes-extended/procps/procps_3.3.10.bb62
-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_22.21.bb4
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch34
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service10
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket8
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb (renamed from meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb)18
-rw-r--r--meta/recipes-extended/screen/screen_4.0.3.bb3
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb1
-rw-r--r--meta/recipes-extended/sed/sed_4.2.2.bb3
-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-su.c-fix-to-exec-command-correctly.patch25
-rw-r--r--meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch109
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch75
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_options.patch1384
-rw-r--r--meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch215
-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/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch46
-rw-r--r--meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch36
-rw-r--r--meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch28
-rw-r--r--meta/recipes-extended/shadow/files/securetty31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch36
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow.automake-1.11.patch106
-rw-r--r--meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch23
-rw-r--r--meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch63
-rw-r--r--meta/recipes-extended/shadow/files/useradd.patch17
-rw-r--r--meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch33
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb)2
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb)0
-rw-r--r--meta/recipes-extended/shadow/shadow.inc46
-rw-r--r--meta/recipes-extended/shadow/shadow_4.2.1.bb (renamed from meta/recipes-extended/shadow/shadow_4.1.4.3.bb)0
-rw-r--r--meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch116
-rw-r--r--meta/recipes-extended/slang/slang_2.2.4.bb3
-rw-r--r--meta/recipes-extended/sudo/files/volatiles.99_sudo1
-rw-r--r--meta/recipes-extended/sudo/sudo.inc16
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.11p2.bb (renamed from meta/recipes-extended/sudo/sudo_1.8.10p3.bb)13
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb4
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.bb5
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc2
-rw-r--r--meta/recipes-extended/sysstat/sysstat_10.2.1.bb6
-rw-r--r--meta/recipes-extended/sysstat/sysstat_11.0.2.bb6
-rw-r--r--meta/recipes-extended/tar/tar-replacement-native_1.28.bb (renamed from meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb)0
-rw-r--r--meta/recipes-extended/tar/tar_1.28.bb (renamed from meta/recipes-extended/tar/tar_1.27.1.bb)5
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb15
-rw-r--r--meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch31
-rw-r--r--meta/recipes-extended/texi2html/texi2html_5.0.bb15
-rw-r--r--meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py2
-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_4.8.bb56
-rw-r--r--meta/recipes-extended/texinfo/texinfo_5.2.bb21
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native.inc2
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2014e.bb11
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2015a.bb10
-rw-r--r--meta/recipes-extended/tzdata/tzdata.inc2
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2014e.bb6
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2015a.bb6
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch (renamed from meta/recipes-extended/watchdog/files/fix-ping-failure.patch)56
-rw-r--r--meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch (renamed from meta/recipes-extended/watchdog/files/fixsepbuild.patch)0
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.14.bb (renamed from meta/recipes-extended/watchdog/watchdog_5.13.bb)5
-rw-r--r--meta/recipes-extended/wget/wget.inc10
-rw-r--r--meta/recipes-extended/wget/wget_1.15.bb7
-rw-r--r--meta/recipes-extended/wget/wget_1.16.1.bb8
-rw-r--r--meta/recipes-extended/which/which-2.18/automake-foreign.patch28
-rw-r--r--meta/recipes-extended/which/which-2.20/automake.patch15
-rw-r--r--meta/recipes-extended/which/which_2.18.bb4
-rw-r--r--meta/recipes-extended/which/which_2.20.bb1
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.service13
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb12
-rw-r--r--meta/recipes-extended/xz/xz_5.2.0.bb (renamed from meta/recipes-extended/xz/xz_5.1.3alpha.bb)6
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb (renamed from meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb)16
-rw-r--r--meta/recipes-gnome/gnome/gnome-common_3.14.0.bb (renamed from meta/recipes-gnome/gnome/gnome-common_3.7.4.bb)4
-rw-r--r--meta/recipes-gnome/gnome/gnome-desktop.inc23
-rw-r--r--meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb7
-rw-r--r--meta/recipes-gnome/gnome/gnome-doc-utils.inc2
-rw-r--r--meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb16
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch48
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch30
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch31
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch21
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch87
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch105
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch1814
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch23
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch35
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/toggle-font.diff (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+/xsettings.patch (renamed from meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch)0
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc8
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch43
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb (renamed from meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb)5
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.25.bb (renamed from meta/recipes-gnome/gtk+/gtk+_2.24.22.bb)21
-rw-r--r--meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb4
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/files/index.theme1731
-rw-r--r--meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb (renamed from meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb)17
-rw-r--r--meta/recipes-gnome/json-glib/json-glib_1.0.2.bb (renamed from meta/recipes-gnome/json-glib/json-glib_1.0.0.bb)4
-rw-r--r--meta/recipes-gnome/libffi/libffi_3.2.1.bb (renamed from meta/recipes-gnome/libffi/libffi_3.1.bb)4
-rw-r--r--meta/recipes-gnome/librsvg/librsvg/vapigen.m496
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.40.6.bb (renamed from meta/recipes-gnome/librsvg/librsvg_2.40.2.bb)20
-rw-r--r--meta/recipes-graphics/builder/files/builder_hob_start.sh4
-rw-r--r--meta/recipes-graphics/cairo/cairo_1.12.18.bb (renamed from meta/recipes-graphics/cairo/cairo_1.12.16.bb)4
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0.inc7
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch20
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0/run-ptest3
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb8
-rw-r--r--meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb10
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0.inc19
-rw-r--r--meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch28
-rw-r--r--meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb1
-rw-r--r--meta/recipes-graphics/directfb/directfb.inc3
-rw-r--r--meta/recipes-graphics/directfb/directfb/fixsepbuild.patch19
-rw-r--r--meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch345
-rw-r--r--meta/recipes-graphics/directfb/directfb_1.7.6.bb (renamed from meta/recipes-graphics/directfb/directfb_1.7.4.bb)8
-rw-r--r--meta/recipes-graphics/drm/libdrm.inc7
-rw-r--r--meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch30
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.53.bb8
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.58.bb6
-rw-r--r--meta/recipes-graphics/freetype/freetype_2.5.4.bb (renamed from meta/recipes-graphics/freetype/freetype_2.5.3.bb)4
-rw-r--r--meta/recipes-graphics/glew/glew/autotools.patch (renamed from meta/recipes-graphics/glew/files/autotools.patch)0
-rw-r--r--meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch (renamed from meta/recipes-graphics/glew/files/fix-glew.pc-install.patch)23
-rw-r--r--meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch (renamed from meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch)0
-rw-r--r--meta/recipes-graphics/glew/glew_1.11.0.bb (renamed from meta/recipes-graphics/glew/glew_1.10.0.bb)4
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb (renamed from meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb)5
-rw-r--r--meta/recipes-graphics/menu-cache/files/Fix-segfault.patch31
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb21
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb16
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch33
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/glut.patch)28
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch424
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch)32
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch)74
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch (renamed from meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch)24
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch74
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch101
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch73
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb (renamed from meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb)38
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb (renamed from meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb)0
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc8
-rw-r--r--meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch52
-rw-r--r--meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch362
-rw-r--r--meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch48
-rw-r--r--meta/recipes-graphics/mesa/mesa_10.3.4.bb (renamed from meta/recipes-graphics/mesa/mesa_10.1.3.bb)9
-rw-r--r--meta/recipes-graphics/mesa/mesa_git.bb12
-rw-r--r--meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch (renamed from meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch)0
-rw-r--r--meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch (renamed from meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch)0
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb5
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb2
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb5
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb9
-rw-r--r--meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb8
-rw-r--r--meta/recipes-graphics/pango/pango.inc6
-rw-r--r--meta/recipes-graphics/pango/pango_1.36.8.bb (renamed from meta/recipes-graphics/pango/pango_1.36.3.bb)4
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb11
-rw-r--r--meta/recipes-graphics/tslib/tslib_1.1.bb2
-rw-r--r--meta/recipes-graphics/wayland/libinput_0.7.0.bb14
-rw-r--r--meta/recipes-graphics/wayland/wayland_1.6.0.bb (renamed from meta/recipes-graphics/wayland/wayland_1.5.0.bb)5
-rw-r--r--meta/recipes-graphics/wayland/weston_1.6.0.bb (renamed from meta/recipes-graphics/wayland/weston_1.5.0.bb)8
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init.bb2
-rwxr-xr-xmeta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm4
-rw-r--r--meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb (renamed from meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/rgb_1.0.6.bb (renamed from meta/recipes-graphics/xorg-app/rgb_1.0.5.bb)5
-rw-r--r--meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xinit_1.3.4.bb (renamed from meta/recipes-graphics/xorg-app/xinit_1.3.3.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb (renamed from meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb)4
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch60
-rw-r--r--meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xorg-app-common.inc5
-rw-r--r--meta/recipes-graphics/xorg-app/xprop_1.2.2.bb2
-rw-r--r--meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb (renamed from meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb)6
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb)4
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch60
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb)8
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch81
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb2
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb13
-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_2.99.917.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.910.bb)21
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb)4
-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.bb1
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch37
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch98
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch72
-rw-r--r--meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb (renamed from meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb)7
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-common.inc8
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-input.inc5
-rw-r--r--meta/recipes-graphics/xorg-driver/xorg-driver-video.inc5
-rw-r--r--meta/recipes-graphics/xorg-font/font-util_1.3.0.bb2
-rw-r--r--meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb4
-rw-r--r--meta/recipes-graphics/xorg-lib/libice_1.0.9.bb (renamed from meta/recipes-graphics/xorg-lib/libice_1.0.8.bb)7
-rw-r--r--meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb7
-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.2.bb1
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.10.bb10
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.11.bb10
-rw-r--r--meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb (renamed from meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb (renamed from meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft/freetype.patch39
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb (renamed from meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb)6
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb (renamed from meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxi_git.bb18
-rw-r--r--meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb (renamed from meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb)8
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch22
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb (renamed from meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb)5
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb11
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb11
-rw-r--r--meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb (renamed from meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb)4
-rw-r--r--meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb (renamed from meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb)6
-rw-r--r--meta/recipes-graphics/xorg-lib/xorg-lib-common.inc9
-rw-r--r--meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb (renamed from meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb (renamed from meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb (renamed from meta/recipes-graphics/xorg-proto/inputproto_2.3.bb)5
-rw-r--r--meta/recipes-graphics/xorg-proto/presentproto_git.bb4
-rw-r--r--meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb (renamed from meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb)4
-rw-r--r--meta/recipes-graphics/xorg-proto/xorg-proto-common.inc7
-rw-r--r--meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb (renamed from meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb)4
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb2
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg.inc5
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch41
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch35
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch22
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch29
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch32
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb (renamed from meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb)10
-rw-r--r--meta/recipes-kernel/blktrace/blktrace/ldflags.patch8
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev_1.6.inc2
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc12
-rw-r--r--meta/recipes-kernel/dtc/dtc_git.bb4
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools.inc17
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch801
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb13
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb19
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb12
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc11
-rw-r--r--meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch21
-rwxr-xr-xmeta/recipes-kernel/kmod/kmod/run-ptest2
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb9
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb10
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_git.bb50
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb7
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb74
-rw-r--r--meta/recipes-kernel/linux/linux-dummy.bb9
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb3
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb30
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb12
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb21
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb26
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc3
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.10.bb37
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.14.bb40
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.17.bb39
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.4.bb38
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch17
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch54
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.2.4.bb (renamed from meta/recipes-kernel/lttng/babeltrace_1.2.1.bb)11
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch130
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb36
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.4.1.bb)13
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch47
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb60
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb60
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb76
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch19
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb32
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb)9
-rw-r--r--meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb13
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc10
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch31
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch123
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch12
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch41
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/opstart.patch245
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch134
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/run-ptest3
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_0.9.9.bb15
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_1.0.0.bb13
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_git.bb11
-rw-r--r--meta/recipes-kernel/perf/perf.bb102
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.7.bb (renamed from meta/recipes-kernel/powertop/powertop_2.5.bb)10
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_git.bb6
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb2
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch39
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/system_map_location.patch23
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb3
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc6
-rw-r--r--meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb8
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch61
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch38
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch96
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch30
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb23
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb41
-rw-r--r--meta/recipes-lsb4/libpng/libpng12_1.2.52.bb (renamed from meta/recipes-lsb4/libpng/libpng12_1.2.51.bb)8
-rw-r--r--meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb (renamed from meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb)6
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch32
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch34
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch345
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch31
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch68
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb)21
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch16
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb)13
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb)2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch42
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch48
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb (renamed from meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb)11
-rw-r--r--meta/recipes-multimedia/flac/flac_1.3.0.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch34
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch40
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch50
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch81
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch145
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch39
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch45
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch58
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch183
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch68
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch100
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch9304
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb24
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb (renamed from meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb)7
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo.inc5
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb7
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb1
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb4
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch47
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb9
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins.inc6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb)12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb)4
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb18
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc45
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch41
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch64
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.2.4.bb)8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch57
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb)11
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc9
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch62
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch25
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb)10
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb)6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb9
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb)7
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb5
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb4
-rw-r--r--meta/recipes-multimedia/libav/libav.inc15
-rw-r--r--meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch23
-rw-r--r--meta/recipes-multimedia/libav/libav_0.8.11.bb18
-rw-r--r--meta/recipes-multimedia/libav/libav_9.13.bb13
-rw-r--r--meta/recipes-multimedia/libav/libav_9.16.bb4
-rw-r--r--meta/recipes-multimedia/libav/libpostproc_git.bb46
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch3
-rw-r--r--meta/recipes-multimedia/libmad/libmad/automake-foreign.patch12
-rw-r--r--meta/recipes-multimedia/libmad/libmad_0.15.1b.bb1
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch36
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb10
-rw-r--r--meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch31
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.10.bb29
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.16.bb28
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch786
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.3.bb1
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb7
-rw-r--r--meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch239
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb3
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc4
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch52
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb4
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.3.bb (renamed from meta/recipes-multimedia/sbc/sbc_1.2.bb)4
-rw-r--r--meta/recipes-qt/meta/meta-toolchain-qt.inc25
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-core-qt.bb7
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb7
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb4
-rw-r--r--meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc2
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init10
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb2
-rw-r--r--meta/recipes-qt/qt4/qt-mobility_1.2.0.inc2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6.inc13
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch2
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch53
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch491
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch124
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch18
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch40
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch98
-rw-r--r--meta/recipes-qt/qt4/qt4-4.8.6/g++.conf25
-rw-r--r--meta/recipes-qt/qt4/qt4-embedded.inc4
-rw-r--r--meta/recipes-qt/qt4/qt4-native.inc4
-rw-r--r--meta/recipes-qt/qt4/qt4.inc2
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc1
-rw-r--r--meta/recipes-sato/images/core-image-sato-sdk.bb3
-rw-r--r--meta/recipes-sato/midori/midori_0.5.5.bb47
-rw-r--r--meta/recipes-sato/midori/midori_0.5.8.bb26
-rw-r--r--meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb9
-rw-r--r--meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb (renamed from meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb)8
-rw-r--r--meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch52
-rw-r--r--meta/recipes-sato/puzzles/puzzles_r10116.bb4
-rw-r--r--meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb65
-rw-r--r--meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb2
-rw-r--r--meta/recipes-support/apr/apr-util_1.5.4.bb (renamed from meta/recipes-support/apr/apr-util_1.5.3.bb)21
-rw-r--r--meta/recipes-support/apr/apr_1.5.1.bb8
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.6.1.bb2
-rw-r--r--meta/recipes-support/atk/at-spi2-atk_2.14.1.bb (renamed from meta/recipes-support/atk/at-spi2-atk_2.12.0.bb)4
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.14.1.bb (renamed from meta/recipes-support/atk/at-spi2-core_2.12.0.bb)7
-rw-r--r--meta/recipes-support/atk/atk_2.14.0.bb (renamed from meta/recipes-support/atk/atk_2.12.0.bb)8
-rw-r--r--meta/recipes-support/attr/acl.inc2
-rw-r--r--meta/recipes-support/attr/attr.inc2
-rw-r--r--meta/recipes-support/attr/ea-acl.inc2
-rw-r--r--meta/recipes-support/bdwgc/bdwgc_7.4.2.bb (renamed from meta/recipes-support/bdwgc/bdwgc_7.2d.bb)19
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--meta/recipes-support/beecrypt/beecrypt/run-ptest2
-rw-r--r--meta/recipes-support/beecrypt/beecrypt_4.2.1.bb1
-rw-r--r--meta/recipes-support/boost/bjam-native_1.57.0.bb (renamed from meta/recipes-support/boost/bjam-native_1.55.0.bb)0
-rw-r--r--meta/recipes-support/boost/boost-1.57.0.inc (renamed from meta/recipes-support/boost/boost-1.55.0.inc)4
-rw-r--r--meta/recipes-support/boost/boost.inc41
-rw-r--r--meta/recipes-support/boost/boost_1.55.0.bb4
-rw-r--r--meta/recipes-support/boost/boost_1.57.0.bb6
-rw-r--r--meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
-rw-r--r--meta/recipes-support/consolekit/consolekit_0.4.6.bb9
-rw-r--r--meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch8203
-rw-r--r--meta/recipes-support/curl/curl_7.40.0.bb (renamed from meta/recipes-support/curl/curl_7.37.0.bb)38
-rw-r--r--meta/recipes-support/db/db_5.3.28.bb1
-rw-r--r--meta/recipes-support/db/db_6.0.30.bb1
-rw-r--r--meta/recipes-support/debianutils/debianutils_4.4.bb35
-rw-r--r--meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch22
-rw-r--r--meta/recipes-support/gdbm/gdbm_1.8.3.bb3
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/configure.patch209
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch33
-rw-r--r--meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch48
-rw-r--r--meta/recipes-support/gmp/gmp.inc7
-rw-r--r--meta/recipes-support/gmp/gmp/append_user_provided_flags.patch (renamed from meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch)0
-rw-r--r--meta/recipes-support/gmp/gmp/configure.patch (renamed from meta/recipes-support/gmp/gmp-5.1.1/configure.patch)128
-rw-r--r--meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch26
-rw-r--r--meta/recipes-support/gmp/gmp_4.2.1.bb20
-rw-r--r--meta/recipes-support/gmp/gmp_5.1.1.bb11
-rw-r--r--meta/recipes-support/gmp/gmp_6.0.0.bb14
-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_2014.1.bb8
-rw-r--r--meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch62
-rw-r--r--meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch16
-rw-r--r--meta/recipes-support/gnupg/gnupg/pkgconfig.patch24
-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.bb5
-rw-r--r--meta/recipes-support/gnupg/gnupg_2.1.1.bb (renamed from meta/recipes-support/gnupg/gnupg_2.0.23.bb)17
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc8
-rw-r--r--meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch31
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.12.bb7
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.5.bb7
-rw-r--r--meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc10
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.4.3.bb8
-rw-r--r--meta/recipes-support/icu/icu.inc3
-rw-r--r--meta/recipes-support/icu/icu_54.1.bb (renamed from meta/recipes-support/icu/icu_53.1.bb)6
-rw-r--r--meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch38
-rw-r--r--meta/recipes-support/libassuan/libassuan_2.2.0.bb (renamed from meta/recipes-support/libassuan/libassuan_2.1.1.bb)6
-rw-r--r--meta/recipes-support/libbsd/libbsd_0.7.0.bb (renamed from meta/recipes-support/libbsd/libbsd_0.6.0.bb)7
-rw-r--r--meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch39
-rw-r--r--meta/recipes-support/libcap/libcap_2.22.bb6
-rw-r--r--meta/recipes-support/libcap/libcap_2.24.bb (renamed from meta/recipes-support/libcap/libcap.inc)14
-rw-r--r--meta/recipes-support/libcheck/libcheck_0.9.14.bb (renamed from meta/recipes-support/libcheck/libcheck_0.9.13.bb)4
-rw-r--r--meta/recipes-support/libcroco/libcroco_0.6.8.bb4
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.3.bb13
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch31
-rw-r--r--meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch14
-rw-r--r--meta/recipes-support/libfm/libfm-extra_1.2.3.bb23
-rw-r--r--meta/recipes-support/libfm/libfm_1.1.2.2.bb25
-rw-r--r--meta/recipes-support/libfm/libfm_1.2.3.bb38
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt.inc8
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb4
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb4
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch (renamed from meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch)69
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.12.bb31
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.17.bb56
-rw-r--r--meta/recipes-support/libical/files/pthread-fix.patch52
-rw-r--r--meta/recipes-support/libical/libical_0.48.bb16
-rw-r--r--meta/recipes-support/libical/libical_1.0.0.bb13
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.11.1.bb4
-rw-r--r--meta/recipes-support/libiconv/libiconv_1.14.bb4
-rw-r--r--meta/recipes-support/libksba/libksba_1.3.2.bb (renamed from meta/recipes-support/libksba/libksba_1.3.0.bb)5
-rw-r--r--meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch37
-rw-r--r--meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch14
-rw-r--r--meta/recipes-support/libnl/libnl_3.2.25.bb (renamed from meta/recipes-support/libnl/libnl_3.2.24.bb)9
-rw-r--r--meta/recipes-support/libpcre/libpcre/Makefile2
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.36.bb (renamed from meta/recipes-support/libpcre/libpcre_8.35.bb)4
-rw-r--r--meta/recipes-support/libproxy/libproxy_0.4.11.bb2
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb2
-rw-r--r--meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch20
-rw-r--r--meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch81
-rw-r--r--meta/recipes-support/libunistring/libunistring/parallelmake.patch26
-rw-r--r--meta/recipes-support/libunistring/libunistring_0.9.4.bb (renamed from meta/recipes-support/libunistring/libunistring_0.9.3.bb)8
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch2529
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch28
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch72
-rw-r--r--meta/recipes-support/libunwind/libunwind.inc31
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.1.bb10
-rw-r--r--meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch47
-rw-r--r--meta/recipes-support/liburcu/liburcu/aarch64.patch19
-rw-r--r--meta/recipes-support/liburcu/liburcu_0.8.6.bb (renamed from meta/recipes-support/liburcu/liburcu_0.8.4.bb)6
-rw-r--r--meta/recipes-support/libxslt/libxslt_1.1.28.bb5
-rw-r--r--meta/recipes-support/lz4/lz4_svn.bb4
-rw-r--r--meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch70
-rw-r--r--meta/recipes-support/lzo/lzo/acinclude.m4 (renamed from meta/recipes-support/lzo/lzo-2.06/acinclude.m4)0
-rw-r--r--meta/recipes-support/lzo/lzo_2.08.bb (renamed from meta/recipes-support/lzo/lzo_2.06.bb)8
-rw-r--r--meta/recipes-support/nettle/nettle_2.7.1.bb2
-rw-r--r--meta/recipes-support/npth/npth/pkgconfig.patch49
-rw-r--r--meta/recipes-support/npth/npth_1.1.bb (renamed from meta/recipes-support/npth/npth_0.91.bb)6
-rw-r--r--meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch31
-rw-r--r--meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch67
-rw-r--r--meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch62
-rw-r--r--meta/recipes-support/nspr/nspr_4.10.7.bb (renamed from meta/recipes-support/nspr/nspr_4.10.3.bb)22
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb9
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch81
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch92
-rw-r--r--meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch18
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2013-1740.patch916
-rw-r--r--meta/recipes-support/nss/files/nss-CVE-2014-1492.patch68
-rw-r--r--meta/recipes-support/nss/nss.inc22
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch (renamed from meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch35
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch (renamed from meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch (renamed from meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch)0
-rw-r--r--meta/recipes-support/nss/nss/nss.pc.in (renamed from meta/recipes-support/nss/files/nss.pc.in)0
-rw-r--r--meta/recipes-support/nss/nss/signlibs.sh (renamed from meta/recipes-support/nss/files/signlibs.sh)0
-rw-r--r--meta/recipes-support/nss/nss_3.15.1.bb9
-rw-r--r--meta/recipes-support/nss/nss_3.17.3.bb7
-rw-r--r--meta/recipes-support/pinentry/pinentry_0.9.0.bb29
-rw-r--r--meta/recipes-support/ptest-runner/files/ptest-runner8
-rw-r--r--meta/recipes-support/ptest-runner/ptest-runner_1.0.bb2
-rw-r--r--meta/recipes-support/serf/serf/env.patch28
-rw-r--r--meta/recipes-support/serf/serf/norpath.patch42
-rw-r--r--meta/recipes-support/serf/serf_1.3.8.bb26
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb7
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb7
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb (renamed from meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb)6
-rw-r--r--meta/site/arm-3247
-rw-r--r--meta/site/arm-6446
-rw-r--r--meta/site/arm-common38
-rw-r--r--meta/site/common-darwin2
-rw-r--r--meta/site/common-mingw2
1623 files changed, 66602 insertions, 39248 deletions
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index d41dd4bee8..4bc99272c4 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -28,9 +28,16 @@ python () {
d.setVar("SDK_ARCH", "none")
d.setVar("SDK_CC_ARCH", "none")
+ # Avoid this being unnecessarily different due to nuances of
+ # the target machine that aren't important for "all" arch
+ # packages.
+ d.setVar("LDFLAGS", "")
+
# No need to do shared library processing or debug symbol handling
d.setVar("EXCLUDE_FROM_SHLIBS", "1")
d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
d.setVar("INHIBIT_PACKAGE_STRIP", "1")
+ 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))
}
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index efd413bdc4..b598aa3ad6 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -136,7 +136,7 @@ python do_ar_original() {
bb.note('Archiving the original source...')
fetch = bb.fetch2.Fetch([], d)
for url in fetch.urls:
- local = fetch.localpath(url)
+ local = fetch.localpath(url).rstrip("/");
if os.path.isfile(local):
shutil.copy(local, ar_outdir)
elif os.path.isdir(local):
@@ -146,7 +146,12 @@ python do_ar_original() {
fetch.unpack(tmpdir, (url,))
os.chdir(tmpdir)
- tarname = os.path.join(ar_outdir, basename + '.tar.gz')
+ # We eliminate any AUTOINC+ in the revision.
+ try:
+ src_rev = bb.fetch2.get_srcrev(d).replace('AUTOINC+','')
+ except:
+ src_rev = 'NOREV'
+ tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
tar = tarfile.open(tarname, 'w:gz')
tar.add('.')
tar.close()
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 19edc54f6d..402ee1bf01 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -109,7 +109,12 @@ autotools_preconfigure() {
else
# At least remove the .la files since automake won't automatically
# regenerate them even if CFLAGS/LDFLAGS are different
- cd ${S}; find ${S} -name \*.la -delete
+ cd ${S}
+ if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
+ echo "Running \"${MAKE} clean\" in ${S}"
+ ${MAKE} clean
+ fi
+ find ${S} -name \*.la -delete
fi
fi
fi
@@ -135,23 +140,59 @@ python autotools_copy_aclocals () {
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 = []
+
for dep in taskdepdata:
data = taskdepdata[dep]
- if data[1] == "do_configure" and data[0] != pn:
- configuredeps.append(data[0])
+ if data[1] == "do_configure" and data[0] == pn:
+ start = dep
+ break
+ if start is None:
+ bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+
+ # We need to find configure tasks which are either from <target> -> <target>
+ # or <native> -> <native> but not <target> -> <native> unless they're direct
+ # dependencies. This mirrors what would get restored from sstate.
+ done = [dep]
+ next = [dep]
+ while next:
+ new = []
+ for dep in next:
+ data = taskdepdata[dep]
+ for datadep in data[3]:
+ if datadep in done:
+ continue
+ done.append(datadep)
+ if (not data[0].endswith("-native")) and taskdepdata[datadep][0].endswith("-native") and dep != start:
+ continue
+ new.append(datadep)
+ if taskdepdata[datadep][1] == "do_configure":
+ configuredeps.append(taskdepdata[datadep][0])
+ next = new
+
+ #configuredeps2 = []
+ #for dep in taskdepdata:
+ # data = taskdepdata[dep]
+ # if data[1] == "do_configure" and data[0] != pn:
+ # configuredeps2.append(data[0])
+ #configuredeps.sort()
+ #configuredeps2.sort()
+ #bb.warn(str(configuredeps))
+ #bb.warn(str(configuredeps2))
cp = []
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}-%s.populate_sysroot" % c)
- elif "-cross-" in c or "-crosssdk-" in c:
+ 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)
@@ -168,7 +209,7 @@ python autotools_copy_aclocals () {
if not os.path.exists(t):
os.symlink(c, t)
}
-autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH BB_TASKDEPDATA"
+autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
autotools_do_configure() {
# WARNING: gross hack follows:
@@ -195,7 +236,7 @@ autotools_do_configure() {
else
acpaths="${acpaths}"
fi
- AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
+ AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'`
automake --version
echo "AUTOV is $AUTOV"
if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index c0d2c8ec88..789af3b10b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -97,6 +97,7 @@ PATH_prepend = "${@extra_path_elements(d)}"
addtask fetch
do_fetch[dirs] = "${DL_DIR}"
do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
+do_fetch[vardeps] += "SRCREV"
python base_do_fetch() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
@@ -112,7 +113,6 @@ python base_do_fetch() {
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
-do_unpack[cleandirs] = "${S}/patches"
python base_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
@@ -120,11 +120,21 @@ python base_do_unpack() {
rootdir = d.getVar('WORKDIR', True)
+ # Ensure that we cleanup ${S}/patches
+ # TODO: Investigate if we can remove
+ # the entire ${S} in this case.
+ s_dir = d.getVar('S', True)
+ p_dir = os.path.join(s_dir, 'patches')
+ bb.utils.remove(p_dir, True)
+
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.unpack(rootdir)
except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
+
+ if not os.path.exists(s_dir):
+ bb.warn("%s ('S') don't exist, you must set 'S' to a proper value" % s_dir)
}
def pkgarch_mapping(d):
@@ -133,113 +143,6 @@ def pkgarch_mapping(d):
if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
d.setVar("TUNE_PKGARCH", "armv7a")
-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 ""
- if not multilibs:
- return
-
- prefixes = []
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- prefixes.append(eext[1])
-
- versions = []
- providers = []
- for v in d.keys():
- if v.startswith("PREFERRED_VERSION_"):
- versions.append(v)
- if v.startswith("PREFERRED_PROVIDER_"):
- providers.append(v)
-
- for v in versions:
- val = d.getVar(v, False)
- pkg = v.replace("PREFERRED_VERSION_", "")
- if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
- continue
- if '-cross-' in pkg and '${' in pkg:
- for p in prefixes:
- 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(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
- if newname != v:
- newval = localdata.expand(val)
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- vexp = d.expand(v)
- if v != vexp and d.getVar(v, False):
- d.renameVar(v, vexp)
- continue
- for p in prefixes:
- newname = "PREFERRED_VERSION_" + p + "-" + pkg
- if not d.getVar(newname, False):
- d.setVar(newname, val)
-
- for prov in providers:
- val = d.getVar(prov, False)
- pkg = prov.replace("PREFERRED_PROVIDER_", "")
- if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
- continue
- if 'cross-canadian' in pkg:
- for p in prefixes:
- 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)
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- provexp = d.expand(prov)
- if prov != provexp and d.getVar(prov, False):
- d.renameVar(prov, provexp)
- continue
- virt = ""
- if pkg.startswith("virtual/"):
- pkg = pkg.replace("virtual/", "")
- virt = "virtual/"
- for p in prefixes:
- if pkg != "kernel":
- newval = p + "-" + val
-
- # implement variable keys
- 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))
-
- # implement alternative multilib name
- newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
- if not d.getVar(newname, False):
- d.setVar(newname, newval)
- # Avoid future variable key expansion
- provexp = d.expand(prov)
- if prov != provexp and d.getVar(prov, False):
- d.renameVar(prov, provexp)
-
-
- mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) 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:
- continue
- virt = ""
- if p.startswith("virtual/"):
- p = p.replace("virtual/", "")
- virt = "virtual/"
- for pref in prefixes:
- extramp.append(virt + pref + "-" + p)
- d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
-
-
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS", True) or "").split()
layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
@@ -290,7 +193,6 @@ python base_eventhandler() {
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
e.data.setVar('BB_VERSION', bb.__version__)
pkgarch_mapping(e.data)
- preferred_ml_updates(e.data)
oe.utils.features_backfill("DISTRO_FEATURES", e.data)
oe.utils.features_backfill("MACHINE_FEATURES", e.data)
@@ -323,15 +225,29 @@ python base_eventhandler() {
}
+CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
+CLEANBROKEN = "0"
+
addtask configure after do_patch
-do_configure[dirs] = "${S} ${B}"
+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
+ cd ${B}
+ if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
+ oe_runmake clean
+ fi
+ find ${B} -name \*.la -delete
+ fi
+ fi
+ if [ -n "${CONFIGURESTAMPFILE}" ]; then
+ echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+ fi
}
addtask compile after do_configure
-do_compile[dirs] = "${S} ${B}"
+do_compile[dirs] = "${B}"
base_do_compile() {
if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
oe_runmake || die "make failed"
@@ -341,7 +257,7 @@ base_do_compile() {
}
addtask install after do_compile
-do_install[dirs] = "${D} ${S} ${B}"
+do_install[dirs] = "${D} ${B}"
# Remove and re-create ${D} so that is it guaranteed to be empty
do_install[cleandirs] = "${D}"
@@ -354,8 +270,6 @@ base_do_package() {
}
addtask build after do_populate_sysroot
-do_build = ""
-do_build[func] = "1"
do_build[noexec] = "1"
do_build[recrdeptask] += "do_deploy"
do_build () {
@@ -442,8 +356,6 @@ python () {
extrardeps = []
extraconf = []
for flag, flagval in sorted(pkgconfigflags.items()):
- if flag == "defaultval":
- continue
items = flagval.split(",")
num = len(items)
if num > 4:
@@ -471,7 +383,7 @@ python () {
# obsolete. Return a warning to the user.
princ = d.getVar('PRINC', True)
if princ and princ != "0":
- bb.warn("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated. The PR server should be used to automatically increment the PR. See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
+ bb.error("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated. The PR server should be used to automatically increment the PR. See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
pr = d.getVar('PR', True)
pr_prefix = re.search("\D+",pr)
prval = re.search("\d+",pr)
@@ -487,6 +399,7 @@ python () {
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"
@@ -540,6 +453,8 @@ python () {
check_license = False
if check_license and bad_licenses:
+ bad_licenses = expand_wildcard_licenses(d, bad_licenses)
+
whitelist = []
for lic in bad_licenses:
for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:
diff --git a/meta/classes/binconfig-disabled.bbclass b/meta/classes/binconfig-disabled.bbclass
index 27f904eb42..0acc9648b0 100644
--- a/meta/classes/binconfig-disabled.bbclass
+++ b/meta/classes/binconfig-disabled.bbclass
@@ -10,6 +10,19 @@ FILES_${PN}-dev += "${bindir}/*-config"
do_install_append () {
for x in ${BINCONFIG}; do
echo "#!/bin/sh" > ${D}$x
+ # Make the disabled script emit invalid parameters for those configure
+ # scripts which call it without checking the return code.
+ echo "echo '--should-not-have-used-$x'" > ${D}$x
echo "exit 1" >> ${D}$x
done
}
+
+SYSROOT_PREPROCESS_FUNCS += "binconfig_disabled_sysroot_preprocess"
+
+binconfig_disabled_sysroot_preprocess () {
+ for x in ${BINCONFIG}; do
+ configname=`basename $x`
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ install ${D}$x ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ done
+}
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 0da9932f4f..44f738b02e 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -20,6 +20,7 @@
# ${ROOTFS} - the rootfs image to incorporate
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 \
@@ -69,12 +70,21 @@ boot_direct_populate() {
install -d $dest
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz
-
- if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
- install -m 0644 ${INITRD} $dest/initrd
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage $dest/vmlinuz
+
+ # initrd is made of concatenation of multiple filesystem images
+ if [ -n "${INITRD}" ]; then
+ rm -f $dest/initrd
+ for fs in ${INITRD}
+ do
+ if [ -s "${fs}" ]; then
+ cat ${fs} >> $dest/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
+ fi
+ done
+ chmod 0644 $dest/initrd
fi
-
}
build_boot_dd() {
@@ -93,9 +103,9 @@ build_boot_dd() {
if [ "${IS_VMDK}" = "true" ]; then
if [ "x${AUTO_SYSLINUXMENU}" = "x1" ] ; then
- install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 ${HDDDIR}${SYSLINUXDIR}/vesamenu.c32
+ install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 $HDDDIR/${SYSLINUXDIR}/
if [ "x${SYSLINUX_SPLASH}" != "x" ] ; then
- install -m 0644 ${SYSLINUX_SPLASH} ${HDDDIR}${SYSLINUXDIR}/splash.lss
+ install -m 0644 ${SYSLINUX_SPLASH} $HDDDIR/${SYSLINUXDIR}/splash.lss
fi
fi
fi
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 7678567600..b1c03ba068 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -18,15 +18,17 @@
# an hdd)
# External variables (also used by syslinux.bbclass)
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${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)
do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
cdrtools-native:do_populate_sysroot \
+ virtual/kernel:do_deploy \
${@oe.utils.ifelse(d.getVar('COMPRESSISO'),'zisofs-tools-native:do_populate_sysroot','')}"
PACKAGES = " "
@@ -65,10 +67,20 @@ populate() {
install -d ${DEST}
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
-
- if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
- install -m 0644 ${INITRD} ${DEST}/initrd
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage ${DEST}/vmlinuz
+
+ # initrd is made of concatenation of multiple filesystem images
+ if [ -n "${INITRD}" ]; then
+ rm -f ${DEST}/initrd
+ for fs in ${INITRD}
+ do
+ if [ -s "${fs}" ]; then
+ cat ${fs} >> ${DEST}/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
+ fi
+ done
+ chmod 0644 ${DEST}/initrd
fi
if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
@@ -79,10 +91,19 @@ populate() {
build_iso() {
# Only create an ISO if we have an INITRD and NOISO was not set
- if [ -z "${INITRD}" ] || [ ! -s "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
+ if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
bbnote "ISO image will not be created."
return
fi
+ # ${INITRD} is a list of multiple filesystem images
+ for fs in ${INITRD}
+ do
+ if [ ! -s "${fs}" ]; then
+ bbnote "ISO image will not be created. ${fs} is invalid."
+ return
+ fi
+ done
+
populate ${ISODIR}
@@ -193,7 +214,14 @@ build_fat_img() {
FATSIZE="-F 32"
fi
- mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} ${BLOCKS}
+ if [ -z "${HDDIMG_ID}" ]; then
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ ${BLOCKS}
+ else
+ mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+ ${BLOCKS} -i ${HDDIMG_ID}
+ fi
+
# Copy FATSOURCEDIR recursively into the image file directly
mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
}
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 20382ce410..90cfe4f954 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -17,7 +17,7 @@ BUILDHISTORY_COMMIT ?= "0"
BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
BUILDHISTORY_PUSH_REPO ?= ""
-SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
+SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory"
# We want to avoid influence the signatures of sstate tasks - first the function itself:
sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
# then the value added to SSTATEPOSTINSTFUNCS:
@@ -155,7 +155,7 @@ python buildhistory_emit_pkghistory() {
with open(os.path.join(pkgdata_dir, pn)) as f:
for line in f.readlines():
if line.startswith('PACKAGES: '):
- packages = squashspaces(line.split(': ', 1)[1])
+ packages = oe.utils.squashspaces(line.split(': ', 1)[1])
break
except IOError as e:
if e.errno == errno.ENOENT:
@@ -181,7 +181,7 @@ python buildhistory_emit_pkghistory() {
rcpinfo.pe = pe
rcpinfo.pv = pv
rcpinfo.pr = pr
- rcpinfo.depends = sortlist(squashspaces(d.getVar('DEPENDS', True) or ""))
+ rcpinfo.depends = sortlist(oe.utils.squashspaces(d.getVar('DEPENDS', True) or ""))
rcpinfo.packages = packages
write_recipehistory(rcpinfo, d)
@@ -222,13 +222,13 @@ python buildhistory_emit_pkghistory() {
pkginfo.pkge = pkge
pkginfo.pkgv = pkgv
pkginfo.pkgr = pkgr
- pkginfo.rprovides = sortpkglist(squashspaces(pkgdata.get('RPROVIDES', "")))
- pkginfo.rdepends = sortpkglist(squashspaces(pkgdata.get('RDEPENDS', "")))
- pkginfo.rrecommends = sortpkglist(squashspaces(pkgdata.get('RRECOMMENDS', "")))
- pkginfo.rsuggests = sortpkglist(squashspaces(pkgdata.get('RSUGGESTS', "")))
- pkginfo.rreplaces = sortpkglist(squashspaces(pkgdata.get('RREPLACES', "")))
- pkginfo.rconflicts = sortpkglist(squashspaces(pkgdata.get('RCONFLICTS', "")))
- pkginfo.files = squashspaces(pkgdata.get('FILES', ""))
+ pkginfo.rprovides = sortpkglist(oe.utils.squashspaces(pkgdata.get('RPROVIDES', "")))
+ pkginfo.rdepends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RDEPENDS', "")))
+ pkginfo.rrecommends = sortpkglist(oe.utils.squashspaces(pkgdata.get('RRECOMMENDS', "")))
+ pkginfo.rsuggests = sortpkglist(oe.utils.squashspaces(pkgdata.get('RSUGGESTS', "")))
+ pkginfo.rreplaces = sortpkglist(oe.utils.squashspaces(pkgdata.get('RREPLACES', "")))
+ pkginfo.rconflicts = sortpkglist(oe.utils.squashspaces(pkgdata.get('RCONFLICTS', "")))
+ pkginfo.files = oe.utils.squashspaces(pkgdata.get('FILES', ""))
for filevar in pkginfo.filevars:
pkginfo.filevars[filevar] = pkgdata.get(filevar, "")
@@ -461,10 +461,10 @@ END
echo "IMAGESIZE = $imagesize" >> ${BUILDHISTORY_DIR_IMAGE}/image-info.txt
# Add some configuration information
- echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${BUILDHISTORY_DIR_IMAGE}/build-id
+ echo "${MACHINE}: ${IMAGE_BASENAME} configured for ${DISTRO} ${DISTRO_VERSION}" > ${BUILDHISTORY_DIR_IMAGE}/build-id.txt
- cat >> ${BUILDHISTORY_DIR_IMAGE}/build-id <<END
-${@buildhistory_get_layers(d)}
+ cat >> ${BUILDHISTORY_DIR_IMAGE}/build-id.txt <<END
+${@buildhistory_get_build_id(d)}
END
}
@@ -484,8 +484,9 @@ END
echo "SDKSIZE = $sdksize" >> ${BUILDHISTORY_DIR_SDK}/sdk-info.txt
}
-# By prepending we get in before the removal of packaging files
-ROOTFS_POSTPROCESS_COMMAND =+ " buildhistory_list_installed_image ;\
+# 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 ; "
IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
@@ -498,11 +499,23 @@ POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host ;
SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; "
-def buildhistory_get_layers(d):
+def buildhistory_get_build_id(d):
if d.getVar('BB_WORKERCONTEXT', True) != '1':
return ""
- layertext = "Configured metadata layers:\n%s\n" % '\n'.join(get_layers_branch_rev(d))
- return layertext
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+ statuslines = []
+ for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
+ g = globals()
+ if func not in g:
+ bb.warn("Build configuration function '%s' does not exist" % func)
+ else:
+ flines = g[func](localdata)
+ if flines:
+ statuslines.extend(flines)
+
+ statusheader = d.getVar('BUILDCFG_HEADER', True)
+ return('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
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
@@ -513,11 +526,6 @@ def buildhistory_get_metadata_revs(d):
for i in layers]
return '\n'.join(medadata_revs)
-
-def squashspaces(string):
- import re
- return re.sub("\s+", " ", string).strip()
-
def outputvars(vars, listvars, d):
vars = vars.split()
listvars = listvars.split()
@@ -526,7 +534,7 @@ def outputvars(vars, listvars, d):
value = d.getVar(var, True) or ""
if var in listvars:
# Squash out spaces
- value = squashspaces(value)
+ value = oe.utils.squashspaces(value)
ret += "%s = %s\n" % (var, value)
return ret.rstrip('\n')
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 7765020e98..77b19372ba 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -54,7 +54,6 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
continue
newpath = "@loader_path/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/")))
- bb.warn("%s %s %s %s" % (fpath, rpath, newpath, rootdir))
p = sub.Popen([d.expand("${HOST_PREFIX}install_name_tool"), '-change', rpath, newpath, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
err, out = p.communicate()
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index ab2adec782..3549c38f15 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -13,10 +13,11 @@ inherit autotools
# C/C++ Compiler (without cpu arch/tune arguments)
OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
+OECMAKE_AR ?= "${AR}"
# Compiler flags
OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
-OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive"
+OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}"
OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CFLAGS} -DNDEBUG"
OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG"
OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
@@ -34,10 +35,14 @@ set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).
set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} )
set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} )
set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
+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" )
set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
+set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
+set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
@@ -76,6 +81,8 @@ cmake_do_configure() {
rm -rf ${B}
mkdir -p ${B}
cd ${B}
+ else
+ find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
fi
# Just like autotools cmake can use a site file to cache result that need generated binaries to run
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 34c0c4e6c7..43acfd531b 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -9,10 +9,11 @@ addtask configure after do_unpack do_patch before do_compile
inherit terminal
-OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO"
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
HOSTLDFLAGS = "${BUILD_LDFLAGS}"
-HOST_LOADLIBES = "-lncurses"
+CROSS_CURSES_LIB = "-lncurses -ltinfo"
+CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
python do_menuconfig() {
@@ -58,7 +59,7 @@ python do_diffconfig() {
bb.fatal("No config files found. Did you do menuconfig ?\n%s" % e)
if isdiff:
- statement = 'diff -Nurp ' + configorig + ' ' + config + '| sed -n "s/^\+//p" >' + fragment
+ statement = 'diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment
subprocess.call(statement, shell=True)
shutil.copy(configorig, config)
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
new file mode 100644
index 0000000000..9b58d82ce5
--- /dev/null
+++ b/meta/classes/compress_doc.bbclass
@@ -0,0 +1,260 @@
+# Compress man pages in ${mandir} and info pages in ${infodir}
+#
+# 1. The doc will be compressed to gz format by default.
+#
+# 2. It will automatically correct the compressed doc which is not
+# in ${DOC_COMPRESS} but in ${DOC_COMPRESS_LIST} to the format
+# of ${DOC_COMPRESS} policy
+#
+# 3. It is easy to add a new type compression by editing
+# local.conf, such as:
+# DOC_COMPRESS_LIST_append = ' abc'
+# DOC_COMPRESS = 'abc'
+# DOC_COMPRESS_CMD[abc] = 'abc compress cmd ***'
+# DOC_DECOMPRESS_CMD[abc] = 'abc decompress cmd ***'
+
+# All supported compression policy
+DOC_COMPRESS_LIST ?= "gz xz bz2"
+
+# Compression policy, must be one of ${DOC_COMPRESS_LIST}
+DOC_COMPRESS ?= "gz"
+
+# Compression shell command
+DOC_COMPRESS_CMD[gz] ?= 'gzip -v -9 -n'
+DOC_COMPRESS_CMD[bz2] ?= "bzip2 -v -9"
+DOC_COMPRESS_CMD[xz] ?= "xz -v"
+
+# Decompression shell command
+DOC_DECOMPRESS_CMD[gz] ?= 'gunzip -v'
+DOC_DECOMPRESS_CMD[bz2] ?= "bunzip2 -v"
+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()
+ 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)
+ compress_cmds = {}
+ decompress_cmds = {}
+ for mode in compress_list:
+ 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))
+ 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))
+ if os.path.exists(infodir):
+ # Decompress doc files which format is not compress_mode
+ decompress_doc(infodir, compress_mode, decompress_cmds)
+ compress_doc(infodir, compress_mode, compress_cmds)
+}
+
+def _get_compress_format(file, compress_format_list):
+ for compress_format in compress_format_list:
+ compress_suffix = '.' + compress_format
+ if file.endswith(compress_suffix):
+ return compress_format
+
+ return ''
+
+# Collect hardlinks to dict, each element in dict lists hardlinks
+# which points to the same doc file.
+# {hardlink10: [hardlink11, hardlink12],,,}
+# The hardlink10, hardlink11 and hardlink12 are the same file.
+def _collect_hardlink(hardlink_dict, file):
+ for hardlink in hardlink_dict:
+ # Add to the existed hardlink
+ if os.path.samefile(hardlink, file):
+ hardlink_dict[hardlink].append(file)
+ return hardlink_dict
+
+ hardlink_dict[file] = []
+ return hardlink_dict
+
+def _process_hardlink(hardlink_dict, compress_mode, shell_cmds, decompress=False):
+ for target in hardlink_dict:
+ if decompress:
+ compress_format = _get_compress_format(target, shell_cmds.keys())
+ cmd = "%s -f %s" % (shell_cmds[compress_format], target)
+ bb.note('decompress hardlink %s' % target)
+ else:
+ cmd = "%s -f %s" % (shell_cmds[compress_mode], target)
+ bb.note('compress hardlink %s' % target)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("de/compress file failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ return
+
+ for hardlink_dup in hardlink_dict[target]:
+ if decompress:
+ # Remove compress suffix
+ compress_suffix = '.' + compress_format
+ new_hardlink = hardlink_dup[:-len(compress_suffix)]
+ new_target = target[:-len(compress_suffix)]
+ else:
+ # Append compress suffix
+ compress_suffix = '.' + compress_mode
+ new_hardlink = hardlink_dup + compress_suffix
+ new_target = target + compress_suffix
+
+ bb.note('hardlink %s-->%s' % (new_hardlink, new_target))
+ if not os.path.exists(new_hardlink):
+ os.link(new_target, new_hardlink)
+ if os.path.exists(hardlink_dup):
+ os.unlink(hardlink_dup)
+
+def _process_symlink(file, compress_format, decompress=False):
+ compress_suffix = '.' + compress_format
+ if decompress:
+ # Remove compress suffix
+ new_linkname = file[:-len(compress_suffix)]
+ new_source = os.readlink(file)[:-len(compress_suffix)]
+ else:
+ # Append compress suffix
+ new_linkname = file + compress_suffix
+ new_source = os.readlink(file) + compress_suffix
+
+ bb.note('symlink %s-->%s' % (new_linkname, new_source))
+ if not os.path.exists(new_linkname):
+ os.symlink(new_source, new_linkname)
+
+ os.unlink(file)
+
+def _is_info(file):
+ flags = '.info .info-'.split()
+ for flag in flags:
+ if flag in os.path.basename(file):
+ return True
+
+ return False
+
+def _is_man(file):
+ import re
+
+ # It refers MANSECT-var in man(1.6g)'s man.config
+ # ".1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o"
+ # Not start with '.', and contain the above colon-seperate element
+ p = re.compile(r'[^\.]+\.([1-9lnop]|0p|tcl)')
+ if p.search(file):
+ return True
+
+ return False
+
+def _is_compress_doc(file, compress_format_list):
+ compress_format = _get_compress_format(file, compress_format_list)
+ compress_suffix = '.' + compress_format
+ if file.endswith(compress_suffix):
+ # Remove the compress suffix
+ uncompress_file = file[:-len(compress_suffix)]
+ if _is_info(uncompress_file) or _is_man(uncompress_file):
+ return True, compress_format
+
+ return False, ''
+
+def compress_doc(topdir, compress_mode, compress_cmds):
+ hardlink_dict = {}
+ for root, dirs, files in os.walk(topdir):
+ for f in files:
+ file = os.path.join(root, f)
+ if os.path.isdir(file):
+ continue
+
+ if _is_info(file) or _is_man(file):
+ # Symlink
+ if os.path.islink(file):
+ _process_symlink(file, compress_mode)
+ # Hardlink
+ elif os.lstat(file).st_nlink > 1:
+ _collect_hardlink(hardlink_dict, file)
+ # Normal file
+ elif os.path.isfile(file):
+ cmd = "%s %s" % (compress_cmds[compress_mode], file)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("compress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ continue
+ bb.note('compress file %s' % file)
+
+ _process_hardlink(hardlink_dict, compress_mode, compress_cmds)
+
+# Decompress doc files which format is not compress_mode
+def decompress_doc(topdir, compress_mode, decompress_cmds):
+ hardlink_dict = {}
+ decompress = True
+ for root, dirs, files in os.walk(topdir):
+ for f in files:
+ file = os.path.join(root, f)
+ if os.path.isdir(file):
+ continue
+
+ res, compress_format = _is_compress_doc(file, decompress_cmds.keys())
+ # Decompress files which format is not compress_mode
+ if res and compress_mode!=compress_format:
+ # Symlink
+ if os.path.islink(file):
+ _process_symlink(file, compress_format, decompress)
+ # Hardlink
+ elif os.lstat(file).st_nlink > 1:
+ _collect_hardlink(hardlink_dict, file)
+ # Normal file
+ elif os.path.isfile(file):
+ cmd = "%s %s" % (decompress_cmds[compress_format], file)
+ (retval, output) = oe.utils.getstatusoutput(cmd)
+ if retval:
+ bb.warn("decompress failed %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
+ continue
+ bb.note('decompress file %s' % file)
+
+ _process_hardlink(hardlink_dict, compress_mode, decompress_cmds, decompress)
+
+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()
+ 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
+ # Sometimes old_target is specified as relative to the link name.
+ old_target = os.path.join(os.path.dirname(old_link), old_target)
+
+ # The updatealternatives used for compress doc
+ if mandir in old_target or infodir in old_target:
+ new_name = old_name + '.' + compress_mode
+ new_link = old_link + '.' + compress_mode
+ 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):
+ 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):
+ d.delVarFlag('ALTERNATIVE_TARGET', old_name)
+ d.setVarFlag('ALTERNATIVE_TARGET', new_name, new_target)
+ elif d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True):
+ d.setVar('ALTERNATIVE_TARGET_%s' % pkg, new_target)
+ elif d.getVar('ALTERNATIVE_TARGET', old_name, True):
+ d.setVar('ALTERNATIVE_TARGET', new_target)
+
+ new_names.append(new_name)
+
+ if new_names:
+ d.setVar('ALTERNATIVE_%s' % pkg, ' '.join(new_names))
+}
+
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 1b36cba773..62363fb334 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
# IMAGE_FEATURES control content of the core reference images
#
-# By default we install packagegroup-core-boot and packagegroup-base packages - this gives us
-# working (console only) rootfs.
+# By default we install packagegroup-core-boot and packagegroup-base-extended packages;
+# this gives us working (console only) rootfs.
#
# Available IMAGE_FEATURES:
#
@@ -30,6 +30,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
# - 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
+# - ptest-pkgs - ptest packages for all ptest-enabled recipes
# - read-only-rootfs - tweaks an image to support read-only rootfs
#
FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 7088039fa0..e2bbd2f63a 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -47,8 +47,8 @@ cpan_do_compile () {
cpan_do_install () {
oe_runmake DESTDIR="${D}" install_vendor
- for PERLSCRIPT in `grep -rIEl '#!${bindir}/perl-native.*/perl' ${D}`; do
- sed -i -e 's|^#!${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' $PERLSCRIPT
+ for PERLSCRIPT in `grep -rIEl '#! *${bindir}/perl-native.*/perl' ${D}`; do
+ sed -i -e 's|${bindir}/perl-native.*/perl|/usr/bin/env nativeperl|' $PERLSCRIPT
done
}
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 5b0ad61b4c..2eb8162314 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -3,6 +3,8 @@
#
inherit cpan-base perlnative
+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)}"
@@ -36,7 +38,8 @@ cpan_build_do_configure () {
--install_path script=${bindir} \
--install_path bin=${bindir} \
--install_path bindoc=${mandir}/man1 \
- --install_path libdoc=${mandir}/man3
+ --install_path libdoc=${mandir}/man3 \
+ ${EXTRA_CPAN_BUILD_FLAGS}
}
cpan_build_do_compile () {
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 25e246ddc3..a8565e91e3 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -16,6 +16,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
#
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
CANADIANEXTRAOS = ""
+MODIFYTOS ??= "1"
python () {
archs = d.getVar('PACKAGE_ARCHS', True).split()
sdkarchs = []
@@ -23,6 +24,9 @@ python () {
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":
+ return
# PowerPC can build "linux" and "linux-gnuspe"
tarch = d.getVar("TARGET_ARCH", True)
if tarch == "powerpc":
@@ -84,11 +88,12 @@ EXTRANATIVEPATH += "chrpath-native"
# Path mangling needed by the cross packaging
# Note that we use := here to ensure that libdir and includedir are
# target paths.
-target_libdir := "${libdir}"
-target_includedir := "${includedir}"
-target_base_libdir := "${base_libdir}"
+target_base_prefix := "${base_prefix}"
target_prefix := "${prefix}"
target_exec_prefix := "${exec_prefix}"
+target_base_libdir = "${target_base_prefix}/${baselib}"
+target_libdir = "${target_exec_prefix}/${baselib}"
+target_includedir := "${includedir}"
# Change to place files in SDKPATH
base_prefix = "${SDKPATHNATIVE}"
@@ -110,6 +115,7 @@ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
do_populate_sysroot[stamp-extra-info] = ""
+do_packagedata[stamp-extra-info] = ""
USE_NLS = "${SDKUSE_NLS}"
@@ -119,8 +125,8 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
# If MLPREFIX is set by multilib code, shlibs
# points to the wrong place so force it
-SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs"
-SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs"
+SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2"
+SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2"
cross_canadian_bindirlinks () {
for i in ${CANADIANEXTRAOS}
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 261a37465e..87d5cf5d37 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,6 +1,7 @@
inherit cross
CLASSOVERRIDE = "class-crosssdk"
+MACHINEOVERRIDES = ""
PACKAGE_ARCH = "${SDK_ARCH}"
python () {
# set TUNE_PKGARCH to SDK_ARCH
@@ -30,6 +31,6 @@ do_populate_sysroot[stamp-extra-info] = ""
do_packagedata[stamp-extra-info] = ""
# Need to force this to ensure consitency accross architectures
-EXTRA_OECONF_FPU = ""
+EXTRA_OECONF_GCC_FLOAT = ""
USE_NLS = "no"
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index d7ea151a5d..c859703669 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -8,6 +8,11 @@
#
# Better expressed as ensure all RDEPENDS package before we package
# This means we can't have circular RDEPENDS/RRECOMMENDS
+
+AUTO_LIBNAME_PKGS = "${PACKAGES}"
+
+inherit package
+
DEBIANRDEP = "do_packagedata"
do_package_write_ipk[rdeptask] = "${DEBIANRDEP}"
do_package_write_deb[rdeptask] = "${DEBIANRDEP}"
@@ -47,6 +52,13 @@ python debian_package_name_hook () {
return 0
return (s[stat.ST_MODE] & stat.S_IEXEC)
+ def add_rprovides(pkg, d):
+ newpkg = d.getVar('PKG_' + pkg)
+ if newpkg and newpkg != pkg:
+ provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
+ if pkg not in provs:
+ d.appendVar('RPROVIDES_' + pkg, " " + pkg)
+
def auto_libname(packages, orig_pkg):
sonames = []
has_bins = 0
@@ -94,6 +106,7 @@ python debian_package_name_hook () {
(pkgname, devname) = soname_result
for pkg in packages.split():
if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
+ add_rprovides(pkg, d)
continue
debian_pn = d.getVar('DEBIANNAME_' + pkg)
if debian_pn:
@@ -108,6 +121,9 @@ python debian_package_name_hook () {
newpkg = mlpre + newpkg
if newpkg != pkg:
d.setVar('PKG_' + pkg, newpkg)
+ add_rprovides(pkg, d)
+ else:
+ add_rprovides(orig_pkg, d)
# reversed sort is needed when some package is substring of another
# ie in ncurses we get without reverse sort:
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index a890de7911..83aa381fe7 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -268,240 +268,6 @@ python do_checkpkg() {
import tempfile
import subprocess
- """
- sanity check to ensure same name and type. Match as many patterns as possible
- such as:
- gnome-common-2.20.0.tar.gz (most common format)
- gtk+-2.90.1.tar.gz
- xf86-input-synaptics-12.6.9.tar.gz
- dri2proto-2.3.tar.gz
- blktool_4.orig.tar.gz
- libid3tag-0.15.1b.tar.gz
- unzip552.tar.gz
- icu4c-3_6-src.tgz
- genext2fs_1.3.orig.tar.gz
- gst-fluendo-mp3
- """
- prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*\+?[\-_]" # match most patterns which uses "-" as separator to version digits
- prefix2 = "[a-zA-Z]+" # a loose pattern such as for unzip552.tar.gz
- prefix3 = "[0-9]+[\-]?[a-zA-Z]+" # a loose pattern such as for 80325-quicky-0.4.tar.gz
- prefix = "(%s|%s|%s)" % (prefix1, prefix2, prefix3)
- ver_regex = "(([A-Z]*\d+[a-zA-Z]*[\.\-_]*)+)"#"((\d+[\.\-_[a-z]])+)"
- # src.rpm extension was added only for rpm package. Can be removed if the rpm
- # packaged will always be considered as having to be manually upgraded
- suffix = "(tar\.gz|tgz|tar\.bz2|tar\.lz4|zip|xz|rpm|bz2|lz4|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)"
-
- suffixtuple = ("tar.gz", "tgz", "zip", "tar.bz2", "tar.xz", "tar.lz4", "bz2", "lz4", "orig.tar.gz", "src.tar.gz", "src.rpm", "src.tgz", "svnr\d+.tar.bz2", "stable.tar.gz", "src.rpm")
- sinterstr = "(?P<name>%s?)v?(?P<ver>%s)(\-source)?" % (prefix, ver_regex)
- sdirstr = "(?P<name>%s)\.?v?(?P<ver>%s)(\-source)?[\.\-](?P<type>%s$)" % (prefix, ver_regex, suffix)
-
- def parse_inter(s):
- m = re.search(sinterstr, s)
- if not m:
- return None
- else:
- return (m.group('name'), m.group('ver'), "")
-
- def parse_dir(s):
- m = re.search(sdirstr, s)
- if not m:
- return None
- else:
- return (m.group('name'), m.group('ver'), m.group('type'))
-
- def modelate_version(version):
- if version[0] in ['.', '-']:
- if version[1].isdigit():
- version = version[1] + version[0] + version[2:len(version)]
- else:
- version = version[1:len(version)]
-
- version = re.sub('\-', '.', version)
- version = re.sub('_', '.', version)
- version = re.sub('(rc)+', '.-1.', version)
- version = re.sub('(alpha)+', '.-3.', version)
- version = re.sub('(beta)+', '.-2.', version)
- if version[0] == 'v':
- version = version[1:len(version)]
- return version
-
- """
- Check whether 'new' is newer than 'old' version. We use existing vercmp() for the
- purpose. PE is cleared in comparison as it's not for build, and PV is cleared too
- for simplicity as it's somehow difficult to get from various upstream format
- """
- def __vercmp(old, new):
- (on, ov, ot) = old
- (en, ev, et) = new
- if on != en or (et and et not in suffixtuple):
- return False
- ov = modelate_version(ov)
- ev = modelate_version(ev)
-
- result = bb.utils.vercmp(("0", ov, ""), ("0", ev, ""))
- if result < 0:
- return True
- else:
- return False
-
- """
- wrapper for fetch upstream directory info
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'tmpf' - tmpfile for fetcher output
- We don't want to exit whole build due to one recipe error. So handle all exceptions
- gracefully w/o leaking to outer.
- """
- def internal_fetch_wget(url, ud, d, tmpf):
- status = "ErrFetchUnknown"
-
- agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
- fetchcmd = "/usr/bin/env wget -t 1 --passive-ftp -O %s --user-agent=\"%s\" '%s'" % (tmpf.name, agent, url)
- try:
- fetcher = bb.fetch2.wget.Wget(d)
- fetcher._runwget(ud, d, fetchcmd, True)
- status = "SUCC"
- except bb.fetch2.BBFetchException, e:
- status = "ErrFetch"
-
- return status
-
- """
- Check on middle version directory such as "2.4/" in "http://xxx/2.4/pkg-2.4.1.tar.gz",
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'curver' - current version
- Return new version if success, or else error in "Errxxxx" style
- """
- def check_new_dir(url, curver, ud, d):
- pn = d.getVar('PN', True)
- f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-1-" % pn)
- status = internal_fetch_wget(url, ud, d, f)
- fhtml = f.read()
- if status == "SUCC" and len(fhtml):
- newver = parse_inter(curver)
-
- """
- match "*4.1/">*4.1/ where '*' matches chars
- N.B. add package name, only match for digits
- """
- regex = d.getVar('REGEX', True)
- if regex == '':
- regex = "^%s" %prefix
- m = re.search("^%s" % regex, curver)
- if m:
- s = "%s[^\d\"]*?(\d+[\.\-_])+\d+/?" % m.group()
- else:
- s = "(\d+[\.\-_])+\d+/?"
-
- searchstr = "[hH][rR][eE][fF]=\"%s\">" % s
-
- reg = re.compile(searchstr)
- valid = 0
- for line in fhtml.split("\n"):
- if line.find(curver) >= 0:
- valid = 1
- m = reg.search(line)
- if m:
- ver = m.group().split("\"")[1]
- ver = ver.strip("/")
- ver = parse_inter(ver)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
-
- """Expect a match for curver in directory list, or else it indicates unknown format"""
- if not valid:
- status = "ErrParseInterDir"
- else:
- """rejoin the path name"""
- status = newver[0] + newver[1]
- elif not len(fhtml):
- status = "ErrHostNoDir"
-
- f.close()
- if status != "ErrHostNoDir" and re.match("Err", status):
- logpath = d.getVar('LOG_DIR', True)
- subprocess.call("cp %s %s/" % (f.name, logpath), shell=True)
- os.unlink(f.name)
- return status
-
- """
- Check on the last directory to search '2.4.1' in "http://xxx/2.4/pkg-2.4.1.tar.gz",
- 'url' - upstream link customized by regular expression
- 'd' - database
- 'curname' - current package name
- Return new version if success, or else error in "Errxxxx" style
- """
- def check_new_version(url, curname, ud, d):
- """possible to have no version in pkg name, such as spectrum-fw"""
- if not re.search("\d+", curname):
- return pcurver
- pn = d.getVar('PN', True)
- newver_regex = d.getVar('REGEX', True)
- f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-2-" % pn)
- status = internal_fetch_wget(url, ud, d, f)
- fhtml = f.read()
-
- if status == "SUCC" and len(fhtml):
- newver = parse_dir(curname)
-
- if not newver_regex:
- """this is the default matching pattern, if recipe does not """
- """provide a regex expression """
- """match "{PN}-5.21.1.tar.gz">{PN}-5.21.1.tar.gz """
- pn1 = re.search("^%s" % prefix, curname).group()
- s = "[^\"]*%s[^\d\"]*?(\d+[\.\-_])+[^\"]*" % pn1
- searchstr = "[hH][rR][eE][fF]=\"%s\".*[>\"]" % s
- reg = searchstr
- else:
- reg = newver_regex
- valid = 0
- count = 0
- for line in fhtml.split("\n"):
- if pn == 'kconfig-frontends':
- m = re.findall(reg, line)
- if m:
- valid = 1
- for match in m:
- (on, ov, oe) = newver
- ver = (on, match[0], oe)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
- continue
- count += 1
- m = re.search(reg, line)
- if m:
- valid = 1
- if not newver_regex:
- ver = m.group().split("\"")[1].split("/")[-1]
- if ver == "download":
- ver = m.group().split("\"")[1].split("/")[-2]
- ver = parse_dir(ver)
- else:
- """ we cheat a little here, but we assume that the
- regular expression in the recipe will extract exacly
- the version """
- (on, ov, oe) = newver
- ver = (on, m.group('pver'), oe)
- if ver and __vercmp(newver, ver) == True:
- newver = ver
- """Expect a match for curver in directory list, or else it indicates unknown format"""
- if not valid:
- status = "ErrParseDir"
- else:
- """newver still contains a full package name string"""
- status = re.sub('_', '.', newver[1])
- elif not len(fhtml):
- status = "ErrHostNoDir"
-
- f.close()
- """if host hasn't directory information, no need to save tmp file"""
- if status != "ErrHostNoDir" and re.match("Err", status):
- logpath = d.getVar('LOG_DIR', True)
- subprocess.call("cp %s %s/" % (f.name, logpath), shell=True)
- os.unlink(f.name)
- return status
-
"""first check whether a uri is provided"""
src_uri = d.getVar('SRC_URI', True)
if not src_uri:
@@ -543,9 +309,6 @@ python do_checkpkg() {
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
bb.data.update_data(localdata)
- chk_uri = d.getVar('REGEX_URI', True)
- if not chk_uri:
- chk_uri = src_uri
pdesc = localdata.getVar('DESCRIPTION', True)
pgrp = localdata.getVar('SECTION', True)
if localdata.getVar('PRSPV', True):
@@ -562,232 +325,63 @@ python do_checkpkg() {
psrcuri = localdata.getVar('SRC_URI', True)
maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
+ """ Get upstream version version """
+ pupver = None
+ pstatus = "ErrUnknown"
found = 0
+
for uri in src_uri.split():
- m = re.compile('(?P<type>[^:]*)').match(uri)
- if not m:
- raise MalformedUrl(uri)
- elif m.group('type') in ('http', 'https', 'ftp', 'cvs', 'svn', 'git'):
- found = 1
- pproto = m.group('type')
- break
+ m = re.compile('(?P<type>[^:]*)').match(uri)
+ if not m:
+ raise MalformedUrl(uri)
+ elif m.group('type') in ('http', 'https', 'ftp', 'cvs', 'svn', 'git'):
+ found = 1
+ psrcuri = uri
+ pproto = m.group('type')
+ break
if not found:
pproto = "file"
- pupver = "N/A"
- pstatus = "ErrUnknown"
-
- (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(uri)
- if type in ['http', 'https', 'ftp']:
- if d.getVar('PRSPV', True):
- pcurver = d.getVar('PRSPV', True)
- else:
- pcurver = d.getVar('PV', True)
- else:
- if d.getVar('PRSPV', True):
- pcurver = d.getVar('PRSPV', True)
- else:
- pcurver = d.getVar("SRCREV", True)
-
-
- if type in ['http', 'https', 'ftp']:
- ud = bb.fetch2.FetchData(uri, d)
- newver = pcurver
- altpath = path
- dirver = "-"
- curname = "-"
-
- """
- match version number amid the path, such as "5.7" in:
- http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz
- N.B. how about sth. like "../5.7/5.8/..."? Not find such example so far :-P
- """
- m = re.search(r"[^/]*(\d+\.)+\d+([\-_]r\d+)*/", path)
- if m:
- altpath = path.split(m.group())[0]
- dirver = m.group().strip("/")
-
- """use new path and remove param. for wget only param is md5sum"""
- alturi = bb.fetch.encodeurl([type, host, altpath, user, pswd, {}])
- my_uri = d.getVar('REGEX_URI', True)
- if my_uri:
- if d.getVar('PRSPV', True):
- newver = d.getVar('PRSPV', True)
- else:
- newver = d.getVar('PV', True)
- else:
- newver = check_new_dir(alturi, dirver, ud, d)
- altpath = path
- if not re.match("Err", newver) and dirver != newver:
- altpath = altpath.replace(dirver, newver, True)
- # For folder in folder cases - try to enter the folder again and then try parsing
- """Now try to acquire all remote files in current directory"""
- if not re.match("Err", newver):
- curname = altpath.split("/")[-1]
-
- """get remote name by skipping pacakge name"""
- m = re.search(r"/.*/", altpath)
- if not m:
- altpath = "/"
- else:
- altpath = m.group()
-
- chk_uri = d.getVar('REGEX_URI', True)
- if not chk_uri:
- alturi = bb.fetch.encodeurl([type, host, altpath, user, pswd, {}])
- else:
- alturi = chk_uri
- newver = check_new_version(alturi, curname, ud, d)
- while(newver == "ErrHostNoDir"):
- if alturi == "/download":
- break
- else:
- alturi = "/".join(alturi.split("/")[0:-2]) + "/download"
- newver = check_new_version(alturi, curname, ud, d)
- if not re.match("Err", newver):
- pupver = newver
- if pupver != pcurver:
- pstatus = "UPDATE"
- else:
- pstatus = "MATCH"
-
- if re.match("Err", newver):
- pstatus = newver + ":" + altpath + ":" + dirver + ":" + curname
- elif type == 'git':
- if user:
- gituser = user + '@'
- else:
- gituser = ""
-
- if 'protocol' in parm:
- gitproto = parm['protocol']
- else:
- gitproto = "git"
- # Get all tags and HEAD
- if d.getVar('GIT_REGEX', True):
- gitcmd = "git ls-remote %s://%s%s%s %s 2>&1" % (gitproto, gituser, host, path, d.getVar('GIT_REGEX', True))
- else:
- gitcmd = "git ls-remote %s://%s%s%s *tag* 2>&1" % (gitproto, gituser, host, path)
- gitcmd2 = "git ls-remote %s://%s%s%s HEAD 2>&1" % (gitproto, gituser, host, path)
-
- tmp = os.popen(gitcmd).read()
- if 'unable to connect' in tmp:
- tmp = None
- tmp2 = os.popen(gitcmd2).read()
- if 'unable to connect' in tmp2:
- tmp2 = None
- #This is for those repos have tag like: refs/tags/1.2.2
- phash = pversion.rsplit("+")[-1]
- if tmp:
- tmpline = tmp.split("\n")
- verflag = 0
- pupver = pversion
- for line in tmpline:
- if len(line)==0:
- break;
- puptag = line.split("/")[-1]
- upstr_regex = d.getVar('REGEX', True)
- if upstr_regex:
- puptag = re.search(upstr_regex, puptag)
- else:
- puptag = re.search("(?P<pver>([0-9][\.|_]?)+)", puptag)
- if puptag == None:
- continue
- puptag = puptag.group('pver')
- puptag = re.sub("_",".",puptag)
- plocaltag = pupver.split("+git")[0]
- if "git" in plocaltag:
- plocaltag = plocaltag.split("-")[0]
- result = bb.utils.vercmp(("0", puptag, ""), ("0", plocaltag, ""))
-
- if result > 0:
- verflag = 1
- pupver = puptag
- elif verflag == 0 :
- pupver = plocaltag
- #This is for those no tag repo
- elif tmp2:
+ if pproto in ['http', 'https', 'ftp', 'git']:
+ try:
+ ud = bb.fetch2.FetchData(psrcuri, d)
+ pupver = ud.method.latest_versionstring(ud, d)
+ if pproto == 'git':
+ if pupver == "":
pupver = pversion.rsplit("+")[0]
- phash = pupver
- else:
- pstatus = "ErrGitAccess"
- if not ('ErrGitAccess' in pstatus):
-
- latest_head = tmp2.rsplit("\t")[0][:7]
- tmp3 = re.search('(?P<git_ver>(\d+[\.-]?)+)(?P<git_prefix>(\+git[r|\-|]?)AUTOINC\+)(?P<head_md5>([\w|_]+))', pversion)
- tmp4 = re.search('(?P<git_ver>(\d+[\.-]?)+)(?P<git_prefix>(\+git[r|\-|]?)AUTOINC\+)(?P<head_md5>([\w|_]+))', pupver)
- if not tmp4:
- tmp4 = re.search('(?P<git_ver>(\d+[\.-]?)+)', pupver)
-
- if tmp3:
- # Get status of the package - MATCH/UPDATE
- result = bb.utils.vercmp(("0", tmp3.group('git_ver'), ""), ("0",tmp3.group('git_ver') , ""))
- # Get the latest tag
- pstatus = 'MATCH'
- if result < 0:
- latest_pv = tmp3.group('git_ver')
- else:
- latest_pv = pupver
- if not(tmp3.group('head_md5')[:7] in latest_head) or not(latest_head in tmp3.group('head_md5')[:7]):
- pstatus = 'UPDATE'
-
- git_prefix = tmp3.group('git_prefix')
- pupver = latest_pv + tmp3.group('git_prefix') + latest_head
- else:
- if not tmp3:
- bb.plain("#DEBUG# Package %s: current version (%s) doesn't match the usual pattern" %(pname, pversion))
- elif type == 'svn':
- ud = bb.fetch2.FetchData(uri, d)
-
- svnFetcher = bb.fetch2.svn.Svn(d)
- svnFetcher.urldata_init(ud, d)
- try:
- pupver = svnFetcher.latest_revision(ud, d, ud.names[0])
- except bb.fetch2.FetchError:
- pstatus = "ErrSvnAccess"
-
- if pupver:
- if pupver in pversion:
- pstatus = "MATCH"
- else:
- pstatus = "UPDATE"
- else:
- pstatus = "ErrSvnAccess"
-
- if 'rev' in ud.parm:
- pcurver = ud.parm['rev']
-
- if pstatus != "ErrSvnAccess":
- tag = pversion.rsplit("+svn")[0]
- svn_prefix = re.search('(\+svn[r|\-]?)', pversion)
- if tag and svn_prefix:
- pupver = tag + svn_prefix.group() + pupver
-
- elif type == 'cvs':
- pupver = "HEAD"
- pstatus = "UPDATE"
- elif type == 'file':
- """local file is always up-to-date"""
- pupver = pcurver
- pstatus = "MATCH"
+ if re.search(pversion, "gitrAUTOINC"):
+ pupver += "+gitrAUTOINC+"
+ else:
+ pupver += "+gitAUTOINC+"
+ latest_revision = ud.method.latest_revision(ud, d, ud.names[0])
+ pupver += latest_revision[:10]
+ except Exception as inst:
+ bb.warn("%s: unexpected error: %s" % (pname, repr(inst)))
+ pstatus = "ErrAccess"
+ elif pproto == "file":
+ """Local files are always updated"""
+ pupver = pversion
else:
- pstatus = "ErrUnsupportedProto"
+ pstatus = "ErrUnsupportedProto"
+ bb.note("do_checkpkg, protocol %s isn't implemented" % pproto)
- if re.match("Err", pstatus):
- pstatus += ":%s%s" % (host, path)
+ if not pupver:
+ pupver = "N/A"
+ elif pupver == pversion:
+ pstatus = "MATCH"
+ else:
+ pstatus = "UPDATE"
"""Read from manual distro tracking fields as alternative"""
pmver = d.getVar("RECIPE_UPSTREAM_VERSION", True)
if not pmver:
- pmver = "N/A"
- pmstatus = "ErrNoRecipeData"
+ pmver = "N/A"
+ pmstatus = "ErrNoRecipeData"
+ elif pmver == pupver:
+ pmstatus = "MATCH"
else:
- if pmver == pcurver:
- pmstatus = "MATCH"
- else:
- pmstatus = "UPDATE"
+ pmstatus = "UPDATE"
- psrcuri = psrcuri.split()[0]
pdepends = "".join(pdepends.split("\t"))
pdesc = "".join(pdesc.split("\t"))
no_upgr_reason = d.getVar('RECIPE_NO_UPDATE_REASON', True)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 2ac62747a2..4e429d78d8 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -49,5 +49,8 @@ python () {
for task in d.getVar("SRCTREECOVEREDTASKS", True).split():
bb.build.deltask(task, d)
+
+ # Ensure compilation happens every time
+ d.setVarFlag('do_compile', 'nostamp', '1')
}
diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index afd3fd2252..2bf1e4bd1b 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -18,13 +18,16 @@ else
fi
}
-python populate_packages_append() {
+python () {
font_pkgs = d.getVar('FONT_PACKAGES', True).split()
deps = d.getVar("FONT_EXTRA_RDEPENDS", True)
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():
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)
if not postinst:
@@ -38,3 +41,5 @@ python populate_packages_append() {
postrm += d.getVar('fontcache_common', True)
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
+
+PACKAGEFUNCS += "add_fontcache_postinsts"
diff --git a/meta/classes/gnomebase.bbclass b/meta/classes/gnomebase.bbclass
index 739bf60649..6ca13cb1e0 100644
--- a/meta/classes/gnomebase.bbclass
+++ b/meta/classes/gnomebase.bbclass
@@ -9,13 +9,13 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}
DEPENDS += "gnome-common-native"
FILES_${PN} += "${datadir}/application-registry \
- ${datadir}/mime-info \
- ${datadir}/mime/packages \
- ${datadir}/mime/application \
- ${datadir}/gnome-2.0 \
- ${datadir}/polkit* \
- ${datadir}/GConf \
- ${datadir}/glib-2.0/schemas \
+ ${datadir}/mime-info \
+ ${datadir}/mime/packages \
+ ${datadir}/mime/application \
+ ${datadir}/gnome-2.0 \
+ ${datadir}/polkit* \
+ ${datadir}/GConf \
+ ${datadir}/glib-2.0/schemas \
"
FILES_${PN}-doc += "${datadir}/devhelp"
diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 505d032cc8..47bd35e049 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -7,7 +7,7 @@
# Provide grub-efi specific functions for building bootable images.
# External variables
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${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
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 3ec8c0667d..2f9e3cf8ef 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -91,6 +91,10 @@ def create_path(compilers, bb, d):
return staging
def use_icc(bb,d):
+ if d.getVar('ICECC_DISABLED') == "1":
+ # don't even try it, when explicitly disabled
+ return "no"
+
# allarch recipes don't use compiler
if icc_is_allarch(bb, d):
return "no"
@@ -133,8 +137,7 @@ def use_icc(bb,d):
return "yes"
def icc_is_allarch(bb, d):
- return \
- bb.data.inherits_class("allarch", d);
+ return d.getVar("PACKAGE_ARCH") == "all"
def icc_is_kernel(bb, d):
return \
@@ -148,10 +151,6 @@ def icc_is_native(bb, d):
# Don't pollute allarch signatures with TARGET_FPU
icc_version[vardepsexclude] += "TARGET_FPU"
def icc_version(bb, d):
- if d.getVar('ICECC_DISABLED') == "1":
- # don't even try it, when explicitly disabled
- return ""
-
if use_icc(bb, d) == "no":
return ""
@@ -179,7 +178,7 @@ def icc_version(bb, d):
return tar_file
def icc_path(bb,d):
- if d.getVar('ICECC_DISABLED') == "1":
+ if use_icc(bb, d) == "no":
# don't create unnecessary directories when icecc is disabled
return
@@ -246,7 +245,7 @@ def set_icecc_env():
return
set_icecc_env() {
- if [ "${ICECC_DISABLED}" = "1" ]
+ if [ "${@use_icc(bb, d)}" = "no" ]
then
return
fi
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass
new file mode 100644
index 0000000000..aa17cc8f9e
--- /dev/null
+++ b/meta/classes/image-buildinfo.bbclass
@@ -0,0 +1,69 @@
+#
+# Writes build information to target filesystem on /etc/build
+#
+# Copyright (C) 2014 Intel Corporation
+# Author: Alejandro Enedino Hernandez Samaniego <alejandro.hernandez@intel.com>
+#
+# Licensed under the MIT license, see COPYING.MIT for details
+#
+# Usage: add INHERIT += "image-buildinfo" to your conf file
+#
+
+# Desired variables to display
+IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
+
+# From buildhistory.bbclass
+def image_buildinfo_outputvars(vars, listvars, d):
+ vars = vars.split()
+ listvars = listvars.split()
+ ret = ""
+ for var in vars:
+ value = d.getVar(var, True) or ""
+ if (d.getVarFlag(var, 'type') == "list"):
+ value = oe.utils.squashspaces(value)
+ ret += "%s = %s\n" % (var, value)
+ return ret.rstrip('\n')
+
+# Gets git branch's status (clean or dirty)
+def get_layer_git_status(path):
+ f = os.popen("cd %s; git diff --stat 2>&1 | tail -n 1" % path)
+ data = f.read()
+ if f.close() is None:
+ if len(data) != 0:
+ return "-- modified"
+ return ""
+
+# Returns layer revisions along with their respective status
+def get_layer_revs(d):
+ layers = (d.getVar("BBLAYERS", True) 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), \
+ get_layer_git_status(i)) \
+ for i in layers]
+ return '\n'.join(medadata_revs)
+
+def buildinfo_target(d):
+ # Get context
+ if d.getVar('BB_WORKERCONTEXT', True) != '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)
+
+# Write build information to target filesystem
+buildinfo () {
+cat > ${IMAGE_ROOTFS}${sysconfdir}/build << END
+-----------------------
+Build Configuration: |
+-----------------------
+${@buildinfo_target(d)}
+-----------------------
+Layer Revisions: |
+-----------------------
+${@get_layer_revs(d)}
+END
+}
+
+IMAGE_PREPROCESS_COMMAND += "buildinfo;"
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index c7e6937fa9..7b770fb353 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -2,7 +2,7 @@
AUTO_SYSLINUXCFG = "1"
INITRD_IMAGE ?= "core-image-minimal-initramfs"
INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz"
-SYSLINUX_ROOT = "root=/dev/ram0 "
+SYSLINUX_ROOT = "root=/dev/ram0"
SYSLINUX_TIMEOUT ?= "10"
SYSLINUX_LABELS ?= "boot install"
LABELS_append = " ${SYSLINUX_LABELS} "
diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index 11f082b373..c455a8e2d4 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -16,7 +16,7 @@ mklibs_optimize_image_doit() {
> ${WORKDIR}/mklibs/executables.list
case ${TARGET_ARCH} in
- powerpc | mips | microblaze )
+ powerpc | mips | mipsel | microblaze )
dynamic_loader="${base_libdir}/ld.so.1"
;;
powerpc64)
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index 124a090605..89318560db 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -11,7 +11,7 @@ BB_DEFAULT_TASK = "generate_swabber_report"
# Ideally these should be fixed but as a temporary measure disable parallel
# builds for troublesome recipes
PARALLEL_MAKE_pn-openssl = ""
-PARALLEL_MAKE_pn-eglibc = ""
+PARALLEL_MAKE_pn-glibc = ""
PARALLEL_MAKE_pn-glib-2.0 = ""
PARALLEL_MAKE_pn-libxml2 = ""
PARALLEL_MAKE_pn-readline = ""
diff --git a/meta/classes/image-vmdk.bbclass b/meta/classes/image-vmdk.bbclass
index 703c00ea3c..77b7facd41 100644
--- a/meta/classes/image-vmdk.bbclass
+++ b/meta/classes/image-vmdk.bbclass
@@ -1,7 +1,7 @@
#NOISO = "1"
-SYSLINUX_ROOT = "root=/dev/hda2 "
+SYSLINUX_ROOT ?= "root=/dev/sda2"
SYSLINUX_PROMPT ?= "0"
SYSLINUX_TIMEOUT ?= "10"
SYSLINUX_LABELS = "boot"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a03b880402..b2a3e97820 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -52,7 +52,10 @@ def check_image_features(d):
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
for feature in features:
if feature not in valid_features:
- bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
+ if bb.utils.contains('EXTRA_IMAGE_FEATURES', feature, True, False, d):
+ raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES (added via EXTRA_IMAGE_FEATURES) is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
+ else:
+ raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
IMAGE_INSTALL ?= ""
IMAGE_INSTALL[type] = "list"
@@ -63,6 +66,7 @@ PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
EXCLUDE_FROM_WORLD = "1"
USE_DEVFS ?= "1"
+USE_DEPMOD ?= "1"
PID = "${@os.getpid()}"
@@ -72,10 +76,37 @@ LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
LDCONFIGDEPEND_libc-uclibc = ""
LDCONFIGDEPEND_libc-musl = ""
-do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}"
-do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot"
+do_rootfs[depends] += " \
+ makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND} \
+ virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot \
+ virtual/kernel:do_packagedata"
do_rootfs[recrdeptask] += "do_packagedata"
-do_rootfs[vardeps] += "BAD_RECOMMENDATIONS NO_RECOMMENDATIONS"
+
+def command_variables(d):
+ return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND',
+ 'IMAGE_PREPROCESS_COMMAND','ROOTFS_POSTPROCESS_COMMAND','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
+ 'RPM_POSTPROCESS_COMMANDS']
+
+python () {
+ variables = command_variables(d)
+ for var in variables:
+ if d.getVar(var):
+ d.setVarFlag(var, 'func', '1')
+}
+
+def rootfs_variables(d):
+ from oe.rootfs import variable_depends
+ variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPEDEP_','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','SDK_OS',
+ 'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','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_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','BUILDNAME','USE_DEVFS',
+ 'COMPRESSIONTYPES']
+ variables.extend(command_variables(d))
+ variables.extend(variable_depends(d))
+ return " ".join(variables)
+
+do_rootfs[vardeps] += "${@rootfs_variables(d)}"
do_build[depends] += "virtual/kernel:do_deploy"
@@ -120,17 +151,6 @@ python () {
d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
- # Ensure we have the vendor list for complementary package handling
- ml_vendor_list = ""
- multilibs = 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(d)
- vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False)
- ml_vendor_list += " " + vendor
- d.setVar('MULTILIB_VENDORS', ml_vendor_list)
-
check_image_features(d)
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
if initramfs_image != "":
@@ -138,18 +158,17 @@ python () {
d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_rootfs" % initramfs_image)
}
-IMAGE_CLASSES ?= "image_types"
+IMAGE_CLASSES += "image_types"
inherit ${IMAGE_CLASSES}
IMAGE_POSTPROCESS_COMMAND ?= ""
-MACHINE_POSTPROCESS_COMMAND ?= ""
# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
# Enable postinst logging if debug-tweaks is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
# Write manifest
IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
-ROOTFS_POSTPROCESS_COMMAND =+ "write_image_manifest ; "
+ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
# Set default postinst log file
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
# Set default target for systemd images
@@ -161,7 +180,9 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', True).split()))}"
-PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
+# Prefer image, but use the fallback files for lookups if the image ones
+# aren't yet available.
+PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
@@ -172,17 +193,17 @@ do_rootfs[cleandirs] += "${S}"
do_rootfs[umask] = "022"
# A hook function to support read-only-rootfs IMAGE_FEATURES
-# Currently, it only supports sysvinit system.
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 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
- # 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
- # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
+ # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS
fi
- # Run populate-volatile.sh at rootfs time to set up basic files
- # and directories to support read-only rootfs.
+ # Run populate-volatile.sh at rootfs time to set up basic files
+ # and directories to support read-only rootfs.
if [ -x ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh ]; then
${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
fi
@@ -199,6 +220,27 @@ read_only_rootfs_hook () {
fi
fi
fi
+
+ if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+ # Update user database files so that services don't fail for a read-only systemd system
+ for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
+ [ -e $conffile ] || continue
+ grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
+ if [ "$type" = "u" ]; then
+ useradd_params=""
+ [ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
+ [ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
+ useradd_params="$useradd_params --system $name"
+ eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
+ elif [ "$type" = "g" ]; then
+ groupadd_params=""
+ [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
+ groupadd_params="$groupadd_params --system $name"
+ eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
+ fi
+ done
+ done
+ fi
}
PACKAGE_EXCLUDE ??= ""
@@ -350,16 +392,10 @@ python write_image_manifest () {
image_manifest.write(image_list_installed_packages(d, 'ver'))
}
-# Make login manager(s) enable automatic login.
-# Useful for devices where we do not want to log in at all (e.g. phones)
-set_image_autologin () {
- sed -i 's%^AUTOLOGIN=\"false"%AUTOLOGIN="true"%g' ${IMAGE_ROOTFS}/etc/sysconfig/gpelogin
-}
-
# Can be use 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 >${IMAGE_ROOTFS}/etc/timestamp
+ date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
}
# Prevent X from being started
@@ -393,6 +429,7 @@ do_compile[noexec] = "1"
do_install[noexec] = "1"
do_populate_sysroot[noexec] = "1"
do_package[noexec] = "1"
+do_package_qa[noexec] = "1"
do_packagedata[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 99a07da0fc..d6cc87f79d 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -13,7 +13,7 @@ def imagetypes_getdepends(d):
deps = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
- if type == "vmdk" or type == "live" or type == "iso" or type == "hddimg":
+ if type in ["vmdk", "live", "iso", "hddimg"]:
type = "ext3"
basetype = type
for ctype in ctypes:
@@ -21,6 +21,8 @@ def imagetypes_getdepends(d):
basetype = type[:-len("." + ctype)]
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
break
+ for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
+ adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
depstr = ""
@@ -57,19 +59,24 @@ IMAGE_CMD_ext3 = "oe_mkext234fs ext3 ${EXTRA_IMAGECMD}"
IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ${EXTRA_IMAGECMD}"
IMAGE_CMD_btrfs () {
- touch ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
- mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
+ dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs count=${ROOTFS_SIZE} bs=1024
+ mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
}
IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
+IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
IMAGE_CMD_tar = "tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ."
+do_rootfs[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
- if [ ! -e ${IMAGE_ROOTFS}/init ]; then
- mkdir -p ${WORKDIR}/cpio_append
- touch ${WORKDIR}/cpio_append/init
+ if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then
+ if [ -L ${IMAGE_ROOTFS}/sbin/init -o -e ${IMAGE_ROOTFS}/sbin/init ]; then
+ ln -sf /sbin/init ${WORKDIR}/cpio_append/init
+ else
+ touch ${WORKDIR}/cpio_append/init
+ fi
(cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
fi
}
@@ -96,6 +103,8 @@ IMAGE_CMD_ubi () {
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}
ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg
}
+IMAGE_TYPEDEP_ubi = "ubifs"
+
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
EXTRA_IMAGECMD = ""
@@ -121,12 +130,27 @@ 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"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 jffs2.sum cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz tar.lz4 cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 vmdk elf"
+IMAGE_TYPES = " \
+ jffs2 jffs2.sum \
+ cramfs \
+ ext2 ext2.gz ext2.bz2 ext2.lzma \
+ ext3 ext3.gz \
+ btrfs \
+ iso \
+ hddimg \
+ squashfs squashfs-xz squashfs-lzo \
+ ubi ubifs \
+ tar tar.gz tar.bz2 tar.xz tar.lz4 \
+ cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
+ vmdk \
+ elf \
+"
COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 9ffe6751d8..143ec46c55 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -29,7 +29,7 @@ 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 \
+ pn-overrides infodir build-deps file-rdeps \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -151,24 +151,24 @@ def package_qa_clean_path(path,d):
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
return path.replace(d.getVar('TMPDIR',True),"")
-def package_qa_write_error(error, d):
+def package_qa_write_error(type, error, d):
logfile = d.getVar('QA_LOGFILE', True)
if logfile:
p = d.getVar('P', True)
f = file( logfile, "a+")
- print >> f, "%s: %s" % (p, error)
+ print >> f, "%s: %s [%s]" % (p, error, type)
f.close()
def package_qa_handle_error(error_class, error_msg, d):
- package_qa_write_error(error_msg, d)
+ package_qa_write_error(error_class, error_msg, d)
if error_class in (d.getVar("ERROR_QA", True) or "").split():
- bb.error("QA Issue: %s" % error_msg)
+ 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():
- bb.warn("QA Issue: %s" % error_msg)
+ bb.warn("QA Issue: %s [%s]" % (error_msg, error_class))
else:
- bb.note("QA Issue: %s" % error_msg)
+ bb.note("QA Issue: %s [%s]" % (error_msg, error_class))
return True
QAPATHTEST[libexec] = "package_qa_check_libexec"
@@ -180,7 +180,7 @@ def package_qa_check_libexec(path,name, d, elf, messages):
return True
if 'libexec' in path.split(os.path.sep):
- messages.append("%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec))
+ messages["libexec"] = "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)
return False
return True
@@ -208,7 +208,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
rpath = m.group(1)
for dir in bad_dirs:
if dir in rpath:
- messages.append("package %s contains bad RPATH %s in file %s" % (name, rpath, file))
+ messages["rpaths"] = "package %s contains bad RPATH %s in file %s" % (name, rpath, file)
QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths"
def package_qa_check_useless_rpaths(file, name, d, elf, messages):
@@ -238,7 +238,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
- messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
+ messages["useless-rpaths"] = "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)
QAPATHTEST[dev-so] = "package_qa_check_dev"
def package_qa_check_dev(path, name, d, elf, messages):
@@ -247,8 +247,8 @@ def package_qa_check_dev(path, name, d, elf, messages):
"""
if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
- messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
- (name, package_qa_clean_path(path,d)))
+ messages["dev-so"] = "non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
+ (name, package_qa_clean_path(path,d))
QAPATHTEST[staticdev] = "package_qa_check_staticdev"
def package_qa_check_staticdev(path, name, d, elf, messages):
@@ -260,8 +260,8 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
"""
if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a"):
- messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
- (name, package_qa_clean_path(path,d)))
+ messages["staticdev"] = "non -staticdev package contains static .a library: %s path '%s'" % \
+ (name, package_qa_clean_path(path,d))
def package_qa_check_libdir(d):
"""
@@ -315,8 +315,8 @@ 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.append("non debug package contains .debug directory: %s path %s" % \
- (name, package_qa_clean_path(path,d)))
+ 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):
@@ -461,16 +461,16 @@ def package_qa_check_arch(path,name,d, elf, messages):
# 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"))):
- messages.append("Architecture did not match (%d to %d) on %s" % \
- (machine, elf.machine(), package_qa_clean_path(path,d)))
+ ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ 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"))):
- messages.append("Bit size did not match (%d to %d) %s on %s" % \
- (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
+ ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ 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():
- messages.append("Endiannes did not match (%d to %d) on %s" % \
- (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
+ messages["arch"] = "Endiannes did not match (%d to %d) on %s" % \
+ (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d))
QAPATHTEST[desktop] = "package_qa_check_desktop"
def package_qa_check_desktop(path, name, d, elf, messages):
@@ -482,7 +482,7 @@ def package_qa_check_desktop(path, name, d, elf, messages):
output = os.popen("%s %s" % (desktop_file_validate, path))
# This only produces output on errors
for l in output:
- messages.append("Desktop file issue: " + l.strip())
+ messages["desktop"] = "Desktop file issue: " + l.strip()
QAPATHTEST[textrel] = "package_qa_textrel"
def package_qa_textrel(path, name, d, elf, messages):
@@ -506,7 +506,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = False
if not sane:
- messages.append("ELF binary '%s' has relocations in .text" % path)
+ messages["textrel"] = "ELF binary '%s' has relocations in .text" % path
QAPATHTEST[ldflags] = "package_qa_hash_style"
def package_qa_hash_style(path, name, d, elf, messages):
@@ -541,7 +541,7 @@ def package_qa_hash_style(path, name, d, elf, messages):
sane = True
if has_syms and not sane:
- messages.append("No GNU_HASH in the elf binary: '%s'" % path)
+ messages["ldflags"] = "No GNU_HASH in the elf binary: '%s'" % path
QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
@@ -561,7 +561,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
with open(path) as f:
file_content = f.read()
if tmpdir in file_content:
- messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
+ messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
@@ -580,7 +580,7 @@ def package_qa_check_xorg_driver_abi(path, name, d, elf, messages):
for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + name, True) or ""):
if rdep.startswith("%sxorg-abi-" % mlprefix):
return
- messages.append("Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path)))
+ messages["xorg-driver-abi"] = "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path))
QAPATHTEST[infodir] = "package_qa_check_infodir"
def package_qa_check_infodir(path, name, d, elf, messages):
@@ -590,7 +590,7 @@ def package_qa_check_infodir(path, name, d, elf, messages):
infodir = d.expand("${infodir}/dir")
if infodir in path:
- messages.append("The /usr/share/info/dir file is not meant to be shipped in a particular package.")
+ messages["infodir"] = "The /usr/share/info/dir file is not meant to be shipped in a particular package."
QAPATHTEST[symlink-to-sysroot] = "package_qa_check_symlink_to_sysroot"
def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
@@ -603,7 +603,7 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
tmpdir = d.getVar('TMPDIR', True)
if target.startswith(tmpdir):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
- messages.append("Symlink %s in %s points to TMPDIR" % (trimmed, name))
+ messages["symlink-to-sysroot"] = "Symlink %s in %s points to TMPDIR" % (trimmed, name)
def package_qa_check_license(workdir, d):
"""
@@ -735,8 +735,8 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
- warnings = []
- errors = []
+ warnings = {}
+ errors = {}
for path in pkgfiles[package]:
elf = oe.qa.ELFFile(path)
try:
@@ -749,15 +749,13 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
func(path, package, d, elf, errors)
for w in warnings:
- bb.warn("QA Issue: %s" % w)
- package_qa_write_error(w, d)
+ package_qa_handle_error(w, warnings[w], d)
for e in errors:
- bb.error("QA Issue: %s" % e)
- package_qa_write_error(e, d)
+ package_qa_handle_error(e, errors[e], d)
return len(errors) == 0
-def package_qa_check_rdepends(pkg, pkgdest, skip, d):
+def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# Don't do this check for kernel/module recipes, there aren't too many debug/development
# packages and you can get false positives e.g. on kernel-module-lirc-dev
if bb.data.inherits_class("kernel", d) or bb.data.inherits_class("module-base", d):
@@ -773,13 +771,102 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
# Now do the sanity check!!!
- for rdepend in rdepends:
- if "-dbg" in rdepend and "debug-deps" not in skip:
- error_msg = "%s rdepends on %s" % (pkg,rdepend)
- sane = package_qa_handle_error("debug-deps", error_msg, d)
- if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
- error_msg = "%s rdepends on %s" % (pkg, rdepend)
- sane = package_qa_handle_error("dev-deps", error_msg, d)
+ if "build-deps" not in skip:
+ for rdepend in rdepends:
+ if "-dbg" in rdepend and "debug-deps" not in skip:
+ error_msg = "%s rdepends on %s" % (pkg,rdepend)
+ sane = package_qa_handle_error("debug-deps", error_msg, d)
+ if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
+ error_msg = "%s rdepends on %s" % (pkg, rdepend)
+ sane = package_qa_handle_error("dev-deps", error_msg, d)
+ if rdepend not in packages:
+ rdep_data = oe.packagedata.read_subpkgdata(rdepend, 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)
+ try:
+ possibles = os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdepend))
+ except OSError:
+ possibles = []
+ for p in possibles:
+ rdep_data = oe.packagedata.read_subpkgdata(p, d)
+ if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
+ break
+ if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
+ continue
+ error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
+ sane = package_qa_handle_error("build-deps", error_msg, 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'])
+ # For Saving the FILERDEPENDS
+ filerdepends = set()
+ rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
+ for key in rdep_data:
+ if key.startswith("FILERDEPENDS_"):
+ for subkey in rdep_data[key].split():
+ filerdepends.add(subkey)
+ filerdepends -= ignored_file_rdeps
+
+ 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)
+
+ # 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" ]:
+ if py in done:
+ filerdepends.discard("/usr/bin/python")
+ done.remove(py)
+ for rdep in done:
+ # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
+ rdep_rprovides = set()
+ 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():
+ rdep_rprovides.add(subkey)
+ # Add the files list to the rprovides
+ if key == "FILES_INFO":
+ # Use eval() to make it as a dict
+ for subkey in eval(rdep_data[key]):
+ rdep_rprovides.add(subkey)
+ filerdepends -= rdep_rprovides
+ if not filerdepends:
+ # Break if all the file rdepends are met
+ break
+ else:
+ # Clear it for the next loop
+ rdep_rprovides.clear()
+ if filerdepends:
+ error_msg = "%s requires %s, but no providers in its RDEPENDS" % \
+ (pkg, ', '.join(str(e) for e in filerdepends))
+ sane = package_qa_handle_error("file-rdeps", error_msg, d)
return sane
@@ -822,6 +909,7 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
+ import oe.packagedata
bb.note("DO PACKAGE QA")
@@ -872,6 +960,11 @@ python do_package_qa () {
# The package name matches the [a-z0-9.+-]+ regular expression
pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
+ taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+ taskdeps = set()
+ for dep in taskdepdata:
+ taskdeps.add(taskdepdata[dep][0])
+
g = globals()
walk_sane = True
rdepends_sane = True
@@ -902,7 +995,7 @@ python do_package_qa () {
path = "%s/%s" % (pkgdest, package)
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
walk_sane = False
- if not package_qa_check_rdepends(package, pkgdest, skip, d):
+ if not package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d):
rdepends_sane = False
if not package_qa_check_deps(package, pkgdest, skip, d):
deps_sane = False
@@ -917,7 +1010,8 @@ python do_package_qa () {
bb.note("DONE with PACKAGE QA")
}
-addtask do_package_qa after do_package before do_build
+do_package_qa[rdeptask] = "do_packagedata"
+addtask do_package_qa after do_packagedata do_package before do_build
SSTATETASKS += "do_package_qa"
do_package_qa[sstate-inputdirs] = ""
@@ -1018,12 +1112,25 @@ do_configure[postfuncs] += "do_qa_configure "
python () {
tests = d.getVar('ALL_QA', True).split()
if "desktop" in tests:
- d.appendVar("PACKAGE_DEPENDS", "desktop-file-utils-native")
+ d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
###########################################################################
# Check various variables
###########################################################################
+ # Checking ${FILESEXTRAPATHS}
+ extrapaths = (d.getVar("FILESEXTRAPATHS", True) 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"
+ msg += "Please assign it with the format of:\n"
+ msg += " FILESEXTRAPATHS_append := \":${THISDIR}/Your_Files_Path\" or\n"
+ msg += " FILESEXTRAPATHS_prepend := \"${THISDIR}/Your_Files_Path:\"\n"
+ msg += "in your bbappend file\n\n"
+ msg += "Your incorrect assignment is:\n"
+ msg += "%s\n" % extrapaths
+ bb.warn(msg)
+
if d.getVar('do_stage', True) is not None:
bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with OE-core" % d.getVar("FILE", True))
@@ -1040,6 +1147,8 @@ python () {
for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
if d.getVar(var):
issues.append(var)
+ 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)
}
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 0c045c91e9..32b80856e0 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -70,12 +70,12 @@ python split_kernel_module_packages () {
m = kerverrexp.match(kernelver)
if m:
kernelver_stripped = m.group(1)
- staging_kernel_dir = d.getVar("STAGING_KERNEL_DIR", True)
+ staging_kernel_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
system_map_file = "%s/boot/System.map-%s" % (dvar, kernelver)
if not os.path.exists(system_map_file):
system_map_file = "%s/System.map-%s" % (staging_kernel_dir, kernelver)
if not os.path.exists(system_map_file):
- bb.fatal("System.map-%s does not exist in '%s/boot' nor STAGING_KERNEL_DIR '%s'" % (kernelver, dvar, staging_kernel_dir))
+ bb.fatal("System.map-%s does not exist in '%s/boot' nor STAGING_KERNEL_BUILDDIR '%s'" % (kernelver, dvar, staging_kernel_dir))
cmd = "depmod -n -a -b %s -F %s %s" % (dvar, system_map_file, kernelver_stripped)
f = os.popen(cmd, 'r')
@@ -132,12 +132,18 @@ python split_kernel_module_packages () {
# appropriate modprobe commands to the postinst
autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split()
autoload = d.getVar('module_autoload_%s' % basename, True)
- if autoload:
- bb.error("KERNEL_MODULE_AUTOLOAD has replaced module_autoload_%s, please replace it!" % 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:
+ bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
if basename in autoloadlist:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
- f.write('%s\n' % basename)
+ if autoload:
+ for m in autoload.split():
+ f.write('%s\n' % m)
+ else:
+ f.write('%s\n' % basename)
f.close()
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
if not postinst:
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 6010dc94e0..223825e546 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -1,5 +1,3 @@
-S = "${WORKDIR}/linux"
-
# remove tasks that modify the source tree in case externalsrc is inherited
SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_patch"
@@ -71,6 +69,11 @@ do_patch() {
fi
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+ machine_srcrev="${SRCREV_machine}"
+ if [ -z "${machine_srcrev}" ]; then
+ # fallback to SRCREV if a non machine_meta tree is being built
+ machine_srcrev="${SRCREV}"
+ fi
# if we have a defined/set meta branch we should not be generating
# any meta data. The passed branch has what we need.
@@ -80,8 +83,7 @@ do_patch() {
createme ${createme_flags} ${ARCH} ${machine_branch}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not create ${machine_branch}"
- exit 1
+ bbfatal "Could not create ${machine_branch}"
fi
sccs="${@" ".join(find_sccs(d))}"
@@ -110,36 +112,27 @@ do_patch() {
done
fi
- if [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ]; then
- updateme_flags="--branch ${machine_branch}"
- fi
-
# updates or generates the target description
updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
${includes} ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not update ${machine_branch}"
- exit 1
+ bbfatal "Could not update ${machine_branch}"
fi
# executes and modifies the source tree as required
patchme ${KMACHINE}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not apply patches for ${KMACHINE}."
- echo " Patch failures can be resolved in the devshell (bitbake -c devshell ${PN})"
- exit 1
+ bberror "Could not apply patches for ${KMACHINE}."
+ bbfatal "Patch failures can be resolved in the devshell (bitbake -c devshell ${PN})"
fi
- # Perform a final check. If something other than the default kernel
- # branch was requested, and that's not where we ended up, then we
- # should thrown an error, since we aren't building what was expected
- final_branch="$(git symbolic-ref HEAD 2>/dev/null)"
- final_branch=${final_branch##refs/heads/}
- if [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ] &&
- [ "${final_branch}" != "${machine_branch}" ]; then
- echo "ERROR: branch ${machine_branch} was requested, but was not properly"
- echo " configured to be built. The current branch is ${final_branch}"
- exit 1
+ # check to see if the specified SRCREV is reachable from the final branch.
+ # if it wasn't something wrong has happened, and we should error.
+ if [ "${machine_srcrev}" != "AUTOINC" ]; then
+ if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
+ bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
+ bbfatal "Check the BSP description for incorrect branch selection, or other errors."
+ fi
fi
}
@@ -183,36 +176,17 @@ do_kernel_checkout() {
cd ${S}
if [ ! -f "Makefile" ]; then
- echo "[ERROR]: S is not set to the linux source directory. Check "
- echo " the recipe and set S to the proper extracted subdirectory"
- exit 1
+ bberror "S is not set to the linux source directory. Check "
+ bbfatal "the recipe and set S to the proper extracted subdirectory"
fi
+ rm -f .gitignore
git init
git add .
git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
+ git clean -d -f
fi
# end debare
- # If KMETA is defined, the branch must exist, but a machine branch
- # can be missing since it may be created later by the tools.
- if [ -n "${KMETA}" ]; then
- git branch -a --no-color | grep -q ${KMETA}
- if [ $? -ne 0 ]; then
- echo "ERROR. The branch '${KMETA}' is required and was not"
- echo "found. Ensure that the SRC_URI points to a valid linux-yocto"
- echo "kernel repository"
- exit 1
- fi
- fi
-
- machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
-
- if [ "${KBRANCH}" != "${machine_branch}" ]; then
- echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same."
- echo " KBRANCH will be adjusted to match, but this typically is a"
- echo " misconfiguration and should be checked."
- fi
-
# convert any remote branches to local tracking ones
for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
@@ -222,15 +196,27 @@ do_kernel_checkout() {
fi
done
+ # If KMETA is defined, the branch must exist, but a machine branch
+ # can be missing since it may be created later by the tools.
+ if [ -n "${KMETA}" ]; then
+ git show-ref --quiet --verify -- "refs/heads/${KMETA}"
+ if [ $? -eq 1 ]; then
+ bberror "The branch '${KMETA}' is required and was not found"
+ bberror "Ensure that the SRC_URI points to a valid linux-yocto"
+ bbfatal "kernel repository"
+ fi
+ fi
+
+
# Create a working tree copy of the kernel by checking out a branch
+ machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 0 ]; then
- # checkout and clobber any unimportant files
- git checkout -f ${machine_branch}
- else
- echo "Not checking out ${machine_branch}, it will be created later"
- git checkout -f master
+ if [ $? -ne 0 ]; then
+ machine_branch="master"
fi
+
+ # checkout and clobber any unimportant files
+ git checkout -f ${machine_branch}
}
do_kernel_checkout[dirs] = "${S}"
@@ -238,7 +224,7 @@ addtask kernel_checkout before do_patch after do_unpack
do_kernel_configme[dirs] += "${S} ${B}"
do_kernel_configme() {
- echo "[INFO] doing kernel configme"
+ bbnote "kernel configme"
export KMETA=${KMETA}
if [ -n "${KCONFIG_MODE}" ]; then
@@ -255,8 +241,7 @@ do_kernel_configme() {
PATH=${PATH}:${S}/scripts/util
configme ${configmeflags} --reconfig --output ${B} ${LINUX_KERNEL_TYPE} ${KMACHINE}
if [ $? -ne 0 ]; then
- echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
- exit 1
+ bbfatal "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
fi
echo "# Global settings from linux recipe" >> ${B}/.config
@@ -292,104 +277,66 @@ python do_kernel_configcheck() {
# their SRCREV values. If they are NOT on the right commits, the branches
# are corrected to the proper commit.
do_validate_branches() {
+ set +e
cd ${S}
export KMETA=${KMETA}
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+ machine_srcrev="${SRCREV_machine}"
- set +e
# if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to
# check and we can exit early
- if [ "${SRCREV_machine}" = "AUTOINC" ] || [ "${SRCREV_machine}" = "INVALID" ] ||
- [ "${SRCREV_machine}" = "" ]; then
- return
- fi
-
- # If something other than the default branch was requested, it must
- # exist in the tree, and it's a hard error if it wasn't
- git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 1 ]; then
- if [ -n "${KBRANCH_DEFAULT}" ] &&
- [ "${machine_branch}" != "${KBRANCH_DEFAULT}" ]; then
- echo "ERROR: branch ${machine_branch} was set for kernel compilation, "
- echo " but it does not exist in the kernel repository."
- echo " Check the value of KBRANCH and ensure that it describes"
- echo " a valid banch in the source kernel repository"
- exit 1
+ if [ "${machine_srcrev}" = "AUTOINC" ]; then
+ bbnote "SRCREV validation is not required for AUTOREV"
+ elif [ "${machine_srcrev}" = "" ]; then
+ if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then
+ # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
+ # that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
+ # this case, we need to reset to the give SRCREV before heading to patching
+ bbnote "custom recipe is being built, forcing SRCREV to ${SRCREV}"
+ force_srcrev="${SRCREV}"
fi
- fi
-
- if [ -z "${SRCREV_machine}" ]; then
- target_branch_head="${SRCREV}"
else
- target_branch_head="${SRCREV_machine}"
- fi
-
- # $SRCREV could have also been AUTOINC, so check again
- if [ "${target_branch_head}" = "AUTOINC" ]; then
- return
- fi
-
- ref=`git show ${target_branch_head} 2>&1 | head -n1 || true`
- if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
- echo "ERROR ${target_branch_head} is not a valid commit ID."
- echo "The kernel source tree may be out of sync"
- exit 1
+ git cat-file -t ${machine_srcrev} > /dev/null
+ if [ $? -ne 0 ]; then
+ bberror "${machine_srcrev} is not a valid commit ID."
+ bbfatal "The kernel source tree may be out of sync"
+ fi
+ force_srcrev=${machine_srcrev}
fi
- containing_branches=`git branch --contains $target_branch_head | sed 's/^..//'`
- if [ -z "$containing_branches" ]; then
- echo "ERROR: SRCREV was set to \"$target_branch_head\", but no branches"
- echo " contain this commit"
- exit 1
- fi
+ ## KMETA branch validation.
+ target_meta_head="${SRCREV_meta}"
+ if [ "${target_meta_head}" = "AUTOINC" ] || [ "${target_meta_head}" = "" ]; then
+ bbnote "SRCREV validation skipped for AUTOREV or empty meta branch"
+ else
+ meta_head=`git show-ref -s --heads ${KMETA}`
- # force the SRCREV in each branch that contains the specified
- # SRCREV (if it isn't the current HEAD of that branch)
- git checkout -q master
- for b in $containing_branches; do
- branch_head=`git show-ref -s --heads ${b}`
- if [ "$branch_head" != "$target_branch_head" ]; then
- echo "[INFO] Setting branch $b to ${target_branch_head}"
- if [ "$b" = "master" ]; then
- git reset --hard $target_branch_head > /dev/null
- else
- git branch -D $b > /dev/null
- git branch $b $target_branch_head > /dev/null
- fi
+ git cat-file -t ${target_meta_head} > /dev/null
+ if [ $? -ne 0 ]; then
+ bberror "${target_meta_head} is not a valid commit ID"
+ bbfatal "The kernel source tree may be out of sync"
fi
- done
-
- ## KMETA branch validation.
- ## We do validation if the meta branch exists, and AUTOREV hasn't been set
- meta_head=`git show-ref -s --heads ${KMETA}`
- target_meta_head="${SRCREV_meta}"
- git show-ref --quiet --verify -- "refs/heads/${KMETA}"
- if [ $? -eq 0 ] && [ "${target_meta_head}" != "AUTOINC" ]; then
if [ "$meta_head" != "$target_meta_head" ]; then
- ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
- if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
- echo "ERROR ${target_meta_head} is not a valid commit ID"
- echo "The kernel source tree may be out of sync"
- exit 1
- else
- echo "[INFO] Setting branch ${KMETA} to ${target_meta_head}"
- git branch -m ${KMETA} ${KMETA}-orig
- git checkout -q -b ${KMETA} ${target_meta_head}
- if [ $? -ne 0 ];then
- echo "ERROR: could not checkout ${KMETA} branch from known hash ${target_meta_head}"
- exit 1
- fi
+ bbnote "Setting branch ${KMETA} to ${target_meta_head}"
+ git branch -m ${KMETA} ${KMETA}-orig
+ git checkout -q -b ${KMETA} ${target_meta_head}
+ if [ $? -ne 0 ];then
+ bbfatal "Could not checkout ${KMETA} branch from known hash ${target_meta_head}"
fi
fi
fi
- git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
- if [ $? -eq 0 ]; then
- # restore the branch for builds
- git checkout -q -f ${machine_branch}
- else
- git checkout -q master
+ git checkout -q -f ${machine_branch}
+ if [ -n "${force_srcrev}" ]; then
+ # see if the branch we are about to patch has been properly reset to the defined
+ # SRCREV .. if not, we reset it.
+ branch_head=`git rev-parse HEAD`
+ if [ "${force_srcrev}" != "${branch_head}" ]; then
+ current_branch=`git rev-parse --abbrev-ref HEAD`
+ git branch "$current_branch-orig"
+ git reset --hard ${force_srcrev}
+ fi
fi
}
@@ -405,8 +352,7 @@ do_kernel_link_vmlinux() {
ln -sf ../../../vmlinux
}
-OE_TERMINAL_EXPORTS += "GUILT_BASE KBUILD_OUTPUT"
-GUILT_BASE = "meta"
+OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
KBUILD_OUTPUT = "${B}"
python () {
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b2e9d4cb36..125ed88406 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,12 @@
inherit linux-kernel-base kernel-module-split
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native"
+
+S = "${STAGING_KERNEL_DIR}"
+B = "${WORKDIR}/build"
+KBUILD_OUTPUT = "${B}"
+OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
# we include gcc above, we dont need virtual/libc
INHIBIT_DEFAULT_DEPS = "1"
@@ -12,7 +17,7 @@ INITRAMFS_TASK ?= ""
INITRAMFS_IMAGE_BUNDLE ?= ""
python __anonymous () {
- kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or ''
+ kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
if kerneltype == 'uImage':
depends = d.getVar("DEPENDS", True)
depends = "%s u-boot-mkimage-native" % depends
@@ -31,6 +36,26 @@ python __anonymous () {
d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}')
}
+# Old style kernels may set ${S} = ${WORKDIR}/git for example
+# We need to move these over to STAGING_KERNEL_DIR. We can't just
+# create the symlink in advance as the git fetcher can't cope with
+# 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)
+ 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)
+ if s != kernsrc:
+ bb.utils.mkdirhier(kernsrc)
+ bb.utils.remove(kernsrc, recurse=True)
+ import subprocess
+ subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True)
+ os.symlink(kernsrc, s)
+}
+
inherit kernel-arch deploy
PACKAGES_DYNAMIC += "^kernel-module-.*"
@@ -55,7 +80,7 @@ KERNEL_IMAGEDEST = "boot"
#
export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
-KERNEL_VERSION = "${@get_kernelversion('${B}')}"
+KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
KERNEL_LOCALVERSION ?= ""
@@ -206,114 +231,70 @@ kernel_do_install() {
[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
install -d ${D}${sysconfdir}/modules-load.d
install -d ${D}${sysconfdir}/modprobe.d
+}
+do_install[prefuncs] += "package_get_auto_pr"
- #
- # Support for external module building - create a minimal copy of the
- # kernel source tree.
- #
- kerneldir=${D}${KERNEL_SRC_PATH}
- install -d $kerneldir
-
- #
- # Store the kernel version in sysroots for module-base.bbclass
- #
-
- echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
+addtask shared_workdir after do_compile before do_install
- #
- # Store kernel image name to allow use during image generation
- #
+emit_depmod_pkgdata() {
+ # Stash data for depmod
+ install -d ${PKGDESTWORK}/kernel-depmod/
+ echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
+ cp System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+}
- echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name
+PACKAGEFUNCS += "emit_depmod_pkgdata"
- #
- # Copy the entire source tree. In case an external build directory is
- # used, copy the build directory over first, then copy over the source
- # dir. This ensures the original Makefiles are used and not the
- # redirecting Makefiles in the build directory.
- #
- find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./Documentation*" -not -path "./source*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
- cp .config $kerneldir
- if [ "${S}" != "${B}" ]; then
- pwd="$PWD"
- cd "${S}"
- find . -depth -not -path "./Documentation*" -not -path "./.*" -print0 | cpio --null -pdlu $kerneldir
- cd "$pwd"
- fi
-
- # Test to ensure that the output file and image type are not actually
- # the same file. If hardlinking is used, they will be the same, and there's
- # no need to install.
- ! [ ${KERNEL_OUTPUT} -ef $kerneldir/${KERNEL_IMAGETYPE} ] && install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
- install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
+do_shared_workdir () {
+ cd ${B}
- # Dummy Makefile so the clean below works
- mkdir $kerneldir/Documentation
- touch $kerneldir/Documentation/Makefile
+ kerneldir=${STAGING_KERNEL_BUILDDIR}
+ install -d $kerneldir
#
- # Clean and remove files not needed for building modules.
- # Some distributions go through a lot more trouble to strip out
- # unecessary headers, for now, we just prune the obvious bits.
- #
- # We don't want to leave host-arch binaries in /sysroots, so
- # we clean the scripts dir while leaving the generated config
- # and include files.
+ # Store the kernel version in sysroots for module-base.bbclass
#
- oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
- # hide directories that shouldn't have their .c, s and S files deleted
- for d in tools scripts lib; do
- mv $kerneldir/$d $kerneldir/.$d
- done
-
- # delete .c, .s and .S files, unless we hid a directory as .<dir>. This technique is
- # much faster than find -prune and -exec
- find $kerneldir -not -path '*/\.*' -type f -name "*.[csS]" -delete
+ echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion
- # put the hidden dirs back
- for d in tools scripts lib; do
- mv $kerneldir/.$d $kerneldir/$d
- done
+ # Copy files required for module builds
+ cp System.map $kerneldir/System.map-${KERNEL_VERSION}
+ cp Module.symvers $kerneldir/
+ cp .config $kerneldir/
+ mkdir -p $kerneldir/include/config
+ cp include/config/kernel.release $kerneldir/include/config/kernel.release
+
+ # We can also copy over all the generated files and avoid special cases
+ # like version.h, but we've opted to keep this small until file creep starts
+ # to happen
+ if [ -e include/linux/version.h ]; then
+ mkdir -p $kerneldir/include/linux
+ cp include/linux/version.h $kerneldir/include/linux/version.h
+ fi
# 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
- cp -l arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
- # Necessary for building modules like compat-wireless.
- if [ -f include/generated/bounds.h ]; then
- cp -l include/generated/bounds.h $kerneldir/include/generated/bounds.h
- fi
+ mkdir -p $kerneldir/include/generated/
+ cp -fR include/generated/* $kerneldir/include/generated/
+
if [ -d arch/${ARCH}/include/generated ]; then
mkdir -p $kerneldir/arch/${ARCH}/include/generated/
- cp -flR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
- fi
-
- # Remove the following binaries which cause strip or arch QA errors
- # during do_package for cross-compiled platforms
- bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
- arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
- scripts/kconfig/conf.o scripts/kconfig/kxgettext.o"
- for entry in $bin_files; do
- rm -f $kerneldir/$entry
- done
-
- # kernels <2.6.30 don't have $kerneldir/tools directory so we check if it exists before calling sed
- if [ -f $kerneldir/tools/perf/Makefile ]; then
- # Fix SLANG_INC for slang.h
- sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile
+ cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
fi
}
-do_install[prefuncs] += "package_get_auto_pr"
-python sysroot_stage_all () {
- oe.path.copyhardlinktree(d.expand("${D}${KERNEL_SRC_PATH}"), d.expand("${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}"))
+# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
+sysroot_stage_all () {
+ :
}
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call oldnoconfig || yes '' | oe_runmake oldconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
@@ -322,6 +303,10 @@ kernel_do_configure() {
# $ make kernelrelease => 2.6.37+
touch ${B}/.scmversion ${S}/.scmversion
+ if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
+ mv "${S}/.config" "${B}/.config"
+ fi
+
# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
@@ -346,7 +331,7 @@ PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-mod
FILES_${PN} = ""
FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order /lib/modules/${KERNEL_VERSION}/modules.builtin"
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
+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"
@@ -384,14 +369,12 @@ pkg_postrm_kernel-image () {
PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
python split_kernel_packages () {
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
}
do_strip() {
if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then
- if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then
+ if [ "${KERNEL_IMAGETYPE}" != "vmlinux" ]; then
bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}"
return
fi
@@ -403,7 +386,7 @@ do_strip() {
gawk '{print $1}'`
for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
- if [[ "$headers" != *"$str"* ]]; then
+ if [ "$headers" != *"$str"* ]; then
bbwarn "Section not found: $str";
fi
@@ -499,7 +482,7 @@ kernel_do_deploy() {
do_deploy[dirs] = "${DEPLOYDIR} ${B}"
do_deploy[prefuncs] += "package_get_auto_pr"
-addtask deploy before do_build after do_install
+addtask deploy after do_populate_sysroot
EXPORT_FUNCTIONS do_deploy
diff --git a/meta/classes/kernelsrc.bbclass b/meta/classes/kernelsrc.bbclass
new file mode 100644
index 0000000000..4208eff6fc
--- /dev/null
+++ b/meta/classes/kernelsrc.bbclass
@@ -0,0 +1,10 @@
+S = "${STAGING_KERNEL_DIR}"
+do_fetch[noexec] = "1"
+do_unpack[depends] += "virtual/kernel:do_patch"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_package[depends] += "virtual/kernel:do_populate_sysroot"
+KERNEL_VERSION = "${@get_kernelversion_file("${S}")}"
+
+inherit linux-kernel-base
+
diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
index daf499d3eb..bbc80167dd 100644
--- a/meta/classes/libc-common.bbclass
+++ b/meta/classes/libc-common.bbclass
@@ -25,12 +25,19 @@ def get_libc_fpu_setting(bb, d):
python populate_packages_prepend () {
if d.getVar('DEBIAN_NAMES', True):
+ pkgs = d.getVar('PACKAGES', True).split()
bpn = d.getVar('BPN', True)
- d.setVar('PKG_'+bpn, 'libc6')
- d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
- d.setVar('PKG_'+bpn+'-dbg', 'libc6-dbg')
+ prefix = d.getVar('MLPREFIX', True) or ""
+ # Set the base package...
+ d.setVar('PKG_' + prefix + bpn, prefix + 'libc6')
+ libcprefix = prefix + bpn + '-'
+ for p in pkgs:
+ # And all the subpackages.
+ if p.startswith(libcprefix):
+ renamed = p.replace(bpn, 'libc6', 1)
+ d.setVar('PKG_' + p, renamed)
# For backward compatibility with old -dbg package
- d.appendVar('RPROVIDES_' + bpn + '-dbg', ' libc-dbg')
- d.appendVar('RCONFLICTS_' + bpn + '-dbg', ' libc-dbg')
- d.appendVar('RREPLACES_' + bpn + '-dbg', ' libc-dbg')
+ d.appendVar('RPROVIDES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
+ d.appendVar('RCONFLICTS_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
+ d.appendVar('RREPLACES_' + libcprefix + 'dbg', ' ' + prefix + 'libc-dbg')
}
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index c1bc399c18..793936e10b 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -268,6 +268,7 @@ python package_do_split_gconvs () {
locale_arch_options = { \
"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 ", \
@@ -298,9 +299,7 @@ python package_do_split_gconvs () {
--inputfile=%s/i18n/locales/%s --charmap=%s %s" \
% (treedir, datadir, locale, encoding, name)
- qemu_options = d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True)
- if not qemu_options:
- qemu_options = d.getVar('QEMU_OPTIONS', True)
+ qemu_options = d.getVar('QEMU_OPTIONS', True)
cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
-E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 08f0665e7d..d659b767c5 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -17,12 +17,12 @@ 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
- open(os.path.join(license_image_dir, 'package.manifest'),
- 'w+').write(image_list_installed_packages(d))
+ # 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
+ open(os.path.join(license_image_dir, 'package.manifest'),
+ 'w+').write(image_list_installed_packages(d))
}
license_create_manifest() {
@@ -49,24 +49,25 @@ license_create_manifest() {
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
pkged_name="$(basename $(readlink ${filename}))"
- pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
if [ -z ${pkged_lic} ]; then
# fallback checking value of LICENSE
- pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
fi
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
- printf "LICENSE:" >> ${LICENSE_MANIFEST}
- for lic in ${pkged_lic}; do
+ echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
+ echo "" >> ${LICENSE_MANIFEST}
+
+ lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
+ for lic in ${lics}; do
# to reference a license file trim trailing + symbol
if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
fi
- printf " ${lic}" >> ${LICENSE_MANIFEST}
done
- printf "\n\n" >> ${LICENSE_MANIFEST}
done
# Two options here:
@@ -145,9 +146,16 @@ def copy_license_files(lic_files_paths, destdir):
bb.utils.mkdirhier(destdir)
for (basename, path) in lic_files_paths:
try:
- ret = shutil.copyfile(path, os.path.join(destdir, basename))
+ src = path
+ dst = os.path.join(destdir, basename)
+ if os.path.exists(dst):
+ os.remove(dst)
+ if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
+ os.link(src, dst)
+ else:
+ shutil.copyfile(src, dst)
except Exception as e:
- bb.warn("Could not copy license file %s: %s" % (basename, e))
+ bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
def find_license_files(d):
"""
@@ -264,10 +272,50 @@ def return_spdx(d, license):
"""
return d.getVarFlag('SPDXLICENSEMAP', license, True)
+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+),
+ or the passed license if there is no canonical form.
+ """
+ lic = d.getVarFlag('SPDXLICENSEMAP', license, True) or ""
+ if not lic and license.endswith('+'):
+ lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True)
+ if lic:
+ lic += '+'
+ return lic or license
+
+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.
+ """
+ import fnmatch
+ licenses = []
+ spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
+ for wld_lic in wildcard_licenses:
+ spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
+ licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
+
+ spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES') or '').split()
+ for wld_lic in wildcard_licenses:
+ licenses += fnmatch.filter(spdx_lics, wld_lic)
+
+ licenses = list(set(licenses))
+ return 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 = expand_wildcard_licenses(d, bad_licenses)
+ return truevalue if license in bad_licenses else falsevalue
+
def incompatible_license(d, dont_want_licenses, package=None):
"""
- This function checks if a recipe has only incompatible licenses. It also take into consideration 'or'
- operand.
+ This function checks if a recipe has only incompatible licenses. It also
+ take into consideration 'or' operand. dont_want_licenses should be passed
+ as canonical (SPDX) names.
"""
import re
import oe.license
@@ -298,7 +346,7 @@ def incompatible_license(d, dont_want_licenses, package=None):
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 license_ok(l) for l in licenses)
+ return any(not license_ok(canonical_license(d, l)) for l in licenses)
def check_license_flags(d):
"""
@@ -361,6 +409,28 @@ def check_license_flags(d):
return unmatched_flag
return None
+def check_license_format(d):
+ """
+ This function checks if LICENSE is well defined,
+ Validate operators in LICENSES.
+ No spaces are allowed between LICENSES.
+ """
+ pn = d.getVar('PN', True)
+ licenses = d.getVar('LICENSE', True)
+ from oe.license import license_operator
+ from oe.license import license_pattern
+
+ elements = filter(lambda x: x.strip(), license_operator.split(licenses))
+ for pos, element in enumerate(elements):
+ if license_pattern.match(element):
+ if pos > 0 and license_pattern.match(elements[pos - 1]):
+ bb.warn("Recipe %s, LICENSE (%s) has invalid format, " \
+ "LICENSES must have operator \"%s\" between them." %
+ (pn, licenses, license_operator.pattern))
+ elif not license_operator.match(element):
+ bb.warn("Recipe %s, LICENSE (%s) has invalid operator (%s) not in" \
+ " \"%s\"." % (pn, licenses, element, license_operator.pattern))
+
SSTATETASKS += "do_populate_lic"
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
diff --git a/meta/classes/linux-kernel-base.bbclass b/meta/classes/linux-kernel-base.bbclass
index 4f2b0a4a98..89ce71605c 100644
--- a/meta/classes/linux-kernel-base.bbclass
+++ b/meta/classes/linux-kernel-base.bbclass
@@ -1,5 +1,5 @@
# parse kernel ABI version out of <linux/version.h>
-def get_kernelversion(p):
+def get_kernelversion_headers(p):
import re
fn = p + '/include/linux/utsrelease.h'
@@ -9,7 +9,6 @@ def get_kernelversion(p):
if not os.path.isfile(fn):
fn = p + '/include/linux/version.h'
- import re
try:
f = open(fn, 'r')
except IOError:
@@ -24,6 +23,16 @@ def get_kernelversion(p):
return m.group(1)
return None
+
+def get_kernelversion_file(p):
+ fn = p + '/kernel-abiversion'
+
+ try:
+ with open(fn, 'r') as f:
+ return f.readlines()[0].strip()
+ except IOError:
+ 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()))
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index ba0edf9486..237e61821d 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -60,7 +60,7 @@ def base_get_metadata_svn_revision(path, d):
try:
with open("%s/.svn/entries" % path) as f:
revision = f.readlines()[3].strip()
- except IOError, IndexError:
+ except (IOError, IndexError):
pass
return revision
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
index 9537ba9f43..3eb2e9226e 100644
--- a/meta/classes/module-base.bbclass
+++ b/meta/classes/module-base.bbclass
@@ -3,16 +3,24 @@ inherit kernel-arch
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
+# This points to the build artefacts from the main kernel build
+# such as .config and System.map
+# Confusingly it is not the module build output (which is ${B}) but
+# we didn't pick the name.
+export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
+
+export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
KERNEL_OBJECT_SUFFIX = ".ko"
# kernel modules are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
# Function to ensure the kernel scripts are created. Expected to
# be called before do_compile. See module.bbclass for an exmaple.
do_make_scripts() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
- -C ${STAGING_KERNEL_DIR} scripts
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts
}
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index ad6f7af1bb..a03cc74de4 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -6,21 +6,23 @@ addtask make_scripts after do_patch before do_compile
do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
do_make_scripts[deptask] = "do_populate_sysroot"
+EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
+
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
KERNEL_VERSION=${KERNEL_VERSION} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" \
+ O=${STAGING_KERNEL_BUILDDIR} \
${MAKE_TARGETS}
}
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ O=${STAGING_KERNEL_BUILDDIR} \
modules_install
}
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 9a1cb1d916..eea2fd59a1 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -21,6 +21,9 @@ 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))
+ 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):
@@ -50,7 +53,7 @@ python multilib_virtclass_handler () {
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
# Expand the WHITELISTs with multilib prefix
- for whitelist in ["HOSTTOOLS_WHITELIST_GPLv3", "WHITELIST_GPLv3", "LGPLv2_WHITELIST_GPLv3"]:
+ for whitelist in ["HOSTTOOLS_WHITELIST_GPL-3.0", "WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
pkgs = e.data.getVar(whitelist, True)
for pkg in pkgs.split():
pkgs += " " + variant + "-" + pkg
@@ -60,6 +63,7 @@ python multilib_virtclass_handler () {
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
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 3315ba9327..8ea2a5a4b8 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -1,11 +1,122 @@
-python multilib_virtclass_handler_global () {
- if not e.data:
+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 ""
+ if not multilibs:
return
- if isinstance(e, bb.event.RecipePreFinalise):
+ prefixes = []
+ for ext in multilibs.split():
+ eext = ext.split(':')
+ if len(eext) > 1 and eext[0] == 'multilib':
+ prefixes.append(eext[1])
+
+ versions = []
+ providers = []
+ for v in d.keys():
+ if v.startswith("PREFERRED_VERSION_"):
+ versions.append(v)
+ if v.startswith("PREFERRED_PROVIDER_"):
+ providers.append(v)
+
+ for v in versions:
+ val = d.getVar(v, False)
+ pkg = v.replace("PREFERRED_VERSION_", "")
+ if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+ continue
+ if '-cross-' in pkg and '${' in pkg:
+ for p in prefixes:
+ 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(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
+ if newname != v:
+ newval = localdata.expand(val)
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ vexp = d.expand(v)
+ if v != vexp and d.getVar(v, False):
+ d.renameVar(v, vexp)
+ continue
+ for p in prefixes:
+ newname = "PREFERRED_VERSION_" + p + "-" + pkg
+ if not d.getVar(newname, False):
+ d.setVar(newname, val)
+
+ for prov in providers:
+ val = d.getVar(prov, False)
+ pkg = prov.replace("PREFERRED_PROVIDER_", "")
+ if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
+ continue
+ if 'cross-canadian' in pkg:
+ for p in prefixes:
+ 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)
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+ continue
+ virt = ""
+ if pkg.startswith("virtual/"):
+ pkg = pkg.replace("virtual/", "")
+ virt = "virtual/"
+ for p in prefixes:
+ if pkg != "kernel":
+ newval = p + "-" + val
+
+ # implement variable keys
+ 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))
+
+ # implement alternative multilib name
+ newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
+ if not d.getVar(newname, False):
+ d.setVar(newname, newval)
+ # Avoid future variable key expansion
+ provexp = d.expand(prov)
+ if prov != provexp and d.getVar(prov, False):
+ d.renameVar(prov, provexp)
+
+
+ mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) 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:
+ continue
+ virt = ""
+ if p.startswith("virtual/"):
+ p = p.replace("virtual/", "")
+ virt = "virtual/"
+ for pref in prefixes:
+ extramp.append(virt + pref + "-" + p)
+ d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
+
+python multilib_virtclass_handler_vendor () {
+ if isinstance(e, bb.event.ConfigParsed):
for v in e.data.getVar("MULTILIB_VARIANTS", True).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)
+}
+addhandler multilib_virtclass_handler_vendor
+multilib_virtclass_handler_vendor[eventmask] = "bb.event.ConfigParsed"
+
+python multilib_virtclass_handler_global () {
+ if not e.data:
+ return
variant = e.data.getVar("BBEXTENDVARIANT", True)
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 9dec318aa8..5ca5c95b4d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -61,16 +61,17 @@ PTEST_ENABLED = "0"
export CONFIG_SITE = "${COREBASE}/meta/site/native"
# set the compiler as well. It could have been set to something else
-export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
-export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}"
-export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}"
-export CPP = "${HOST_PREFIX}gcc ${HOST_CC_ARCH} -E"
-export LD = "${HOST_PREFIX}ld ${HOST_LD_ARCH} "
-export CCLD = "${CC}"
-export AR = "${HOST_PREFIX}ar"
-export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
-export RANLIB = "${HOST_PREFIX}ranlib"
-export STRIP = "${HOST_PREFIX}strip"
+export CC = "${BUILD_CC}"
+export CXX = "${BUILD_CXX}"
+export FC = "${BUILD_FC}"
+export CPP = "${BUILD_CPP}"
+export LD = "${BUILD_LD}"
+export CCLD = "${BUILD_CCLD}"
+export AR = "${BUILD_AR}"
+export AS = "${BUILD_AS}"
+export RANLIB = "${BUILD_RANLIB}"
+export STRIP = "${BUILD_STRIP}"
+export NM = "${BUILD_NM}"
# Path prefixes
base_prefix = "${STAGING_DIR_NATIVE}"
@@ -109,6 +110,7 @@ PKG_CONFIG_SYSROOT_DIR = ""
# we dont want libc-uclibc or libc-glibc to kick in for native recipes
LIBCOVERRIDE = ""
CLASSOVERRIDE = "class-native"
+MACHINEOVERRIDES = ""
PATH_prepend = "${COREBASE}/scripts/native-intercept:"
@@ -130,7 +132,9 @@ python native_virtclass_handler () {
deps = bb.utils.explode_deps(deps)
newdeps = []
for dep in deps:
- if "-cross-" in dep:
+ if dep == pn:
+ continue
+ elif "-cross-" in dep:
newdeps.append(dep.replace("-cross", "-native"))
elif not dep.endswith("-native"):
newdeps.append(dep + "-native")
@@ -162,6 +166,7 @@ native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
deltask package
deltask packagedata
+deltask package_qa
deltask package_write_ipk
deltask package_write_deb
deltask package_write_rpm
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 7f94258bf1..5e78116ab8 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -8,6 +8,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
NATIVESDKLIBC ?= "libc-glibc"
LIBCOVERRIDE = ":${NATIVESDKLIBC}"
CLASSOVERRIDE = "class-nativesdk"
+MACHINEOVERRIDES = ""
#
# Update PACKAGE_ARCH and PACKAGE_ARCHS
@@ -42,7 +43,7 @@ TARGET_CC_ARCH = "${SDK_CC_ARCH}"
TARGET_LD_ARCH = "${SDK_LD_ARCH}"
TARGET_AS_ARCH = "${SDK_AS_ARCH}"
TARGET_FPU = ""
-EXTRA_OECONF_FPU = ""
+EXTRA_OECONF_GCC_FLOAT = ""
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
CFLAGS = "${BUILDSDK_CFLAGS}"
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
index f2e7540dcf..d00f468d9a 100644
--- a/meta/classes/oelint.bbclass
+++ b/meta/classes/oelint.bbclass
@@ -1,174 +1,85 @@
addtask lint before do_fetch
do_lint[nostamp] = "1"
python do_lint() {
- def testVar(var, explain=None):
- try:
- s = d[var]
- return s["content"]
- except KeyError:
- bb.error("%s is not set" % var)
- if explain: bb.note(explain)
- return None
-
-
- ##############################
- # Test that DESCRIPTION exists
- #
- testVar("DESCRIPTION")
-
-
- ##############################
- # Test that HOMEPAGE exists
- #
- s = testVar("HOMEPAGE")
- if s=="unknown":
- bb.error("HOMEPAGE is not set")
- elif not s.startswith("http://"):
- bb.error("HOMEPAGE doesn't start with http://")
-
-
-
- ##############################
- # Test for valid LICENSE
- #
- valid_licenses = {
- "GPL-2" : "GPLv2",
- "GPL LGPL FDL" : True,
- "GPL PSF" : True,
- "GPL/QPL" : True,
- "GPL" : True,
- "GPLv2" : True,
- "IBM" : True,
- "LGPL GPL" : True,
- "LGPL" : True,
- "MIT" : True,
- "OSL" : True,
- "Perl" : True,
- "Public Domain" : True,
- "QPL" : "GPL/QPL",
- }
- s = testVar("LICENSE")
- if s=="unknown":
- bb.error("LICENSE is not set")
- elif s.startswith("Vendor"):
- pass
- else:
- try:
- newlic = valid_licenses[s]
- if newlic == False:
- bb.note("LICENSE '%s' is not recommended" % s)
- elif newlic != True:
- bb.note("LICENSE '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- bb.note("LICENSE '%s' is not recommended" % s)
-
-
- ##############################
- # Test for valid MAINTAINER
- #
- s = testVar("MAINTAINER")
- if s=="OpenEmbedded Team <openembedded-devel@openembedded.org>":
- bb.error("explicit MAINTAINER is missing, using default")
- elif s and s.find("@") == -1:
- bb.error("You forgot to put an e-mail address into MAINTAINER")
-
-
- ##############################
- # Test for valid SECTION
- #
- # if Correct section: True section name is valid
- # False section name is invalid, no suggestion
- # string section name is invalid, better name suggested
- #
- valid_sections = {
- # Current Section Correct section
- "apps" : True,
- "audio" : True,
- "base" : True,
- "console/games" : True,
- "console/net" : "console/network",
- "console/network" : True,
- "console/utils" : True,
- "devel" : True,
- "developing" : "devel",
- "devel/python" : True,
- "fonts" : True,
- "games" : True,
- "games/libs" : True,
- "gnome/base" : True,
- "gnome/libs" : True,
- "gpe" : True,
- "gpe/libs" : True,
- "gui" : False,
- "libc" : "libs",
- "libs" : True,
- "libs/net" : True,
- "multimedia" : True,
- "net" : "network",
- "NET" : "network",
- "network" : True,
- "opie/applets" : True,
- "opie/applications" : True,
- "opie/base" : True,
- "opie/codecs" : True,
- "opie/decorations" : True,
- "opie/fontfactories" : True,
- "opie/fonts" : True,
- "opie/games" : True,
- "opie/help" : True,
- "opie/inputmethods" : True,
- "opie/libs" : True,
- "opie/multimedia" : True,
- "opie/pim" : True,
- "opie/setting" : "opie/settings",
- "opie/settings" : True,
- "opie/Shell" : False,
- "opie/styles" : True,
- "opie/today" : True,
- "scientific" : True,
- "utils" : True,
- "x11" : True,
- "x11/libs" : True,
- "x11/wm" : True,
- }
- s = testVar("SECTION")
- if s:
- try:
- newsect = valid_sections[s]
- if newsect == False:
- bb.note("SECTION '%s' is not recommended" % s)
- elif newsect != True:
- bb.note("SECTION '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- bb.note("SECTION '%s' is not recommended" % s)
-
- if not s.islower():
- bb.error("SECTION should only use lower case")
-
-
-
-
- ##############################
- # Test for valid PRIORITY
- #
- valid_priorities = {
- "standard" : True,
- "required" : True,
- "optional" : True,
- "extra" : True,
- }
- s = testVar("PRIORITY")
- if s:
- try:
- newprio = valid_priorities[s]
- if newprio == False:
- bb.note("PRIORITY '%s' is not recommended" % s)
- elif newprio != True:
- bb.note("PRIORITY '%s' is not recommended, better use '%s'" % (s, newprio))
- except:
- bb.note("PRIORITY '%s' is not recommended" % s)
-
- if not s.islower():
- bb.error("PRIORITY should only use lower case")
-
+ pkgname = d.getVar("PN", True)
+
+ ##############################
+ # Test that DESCRIPTION exists
+ #
+ description = d.getVar("DESCRIPTION")
+ if description[1:10] == '{SUMMARY}':
+ bb.warn("%s: DESCRIPTION is not set" % pkgname)
+
+
+ ##############################
+ # Test that HOMEPAGE exists
+ #
+ homepage = d.getVar("HOMEPAGE")
+ if homepage == '':
+ bb.warn("%s: HOMEPAGE is not set" % pkgname)
+ elif not homepage.startswith("http://") and not homepage.startswith("https://"):
+ bb.warn("%s: HOMEPAGE doesn't start with http:// or https://" % pkgname)
+
+
+ ##############################
+ # Test for valid SECTION
+ #
+ section = d.getVar("SECTION")
+ if section == '':
+ bb.warn("%s: SECTION is not set" % pkgname)
+ elif not section.islower():
+ bb.warn("%s: SECTION should only use lower case" % pkgname)
+
+
+ ##############################
+ # Check that all patches have Signed-off-by and Upstream-Status
+ #
+ srcuri = d.getVar("SRC_URI").split()
+ fpaths = (d.getVar('FILESPATH', True) or '').split(':')
+
+ def findPatch(patchname):
+ for dir in fpaths:
+ patchpath = dir + patchname
+ if os.path.exists(patchpath):
+ return patchpath
+
+ def findKey(path, key):
+ ret = True
+ f = file('%s' % path, mode = 'r')
+ line = f.readline()
+ while line:
+ if line.find(key) != -1:
+ ret = False
+ line = f.readline()
+ f.close()
+ return ret
+
+ length = len("file://")
+ for item in srcuri:
+ if item.startswith("file://"):
+ item = item[length:]
+ if item.endswith(".patch") or item.endswith(".diff"):
+ path = findPatch(item)
+ if findKey(path, "Signed-off-by"):
+ bb.warn("%s: %s doesn't have Signed-off-by" % (pkgname, item))
+ if findKey(path, "Upstream-Status"):
+ bb.warn("%s: %s doesn't have Upstream-Status" % (pkgname, item))
+
+
+ ##############################
+ # Check for ${PN} or ${P} usage in SRC_URI or S
+ # Should use ${BPN} or ${BP} instead to avoid breaking multilib
+ #
+ for s in srcuri:
+ if not s.startswith("file://"):
+ if not s.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in SRC_URI" % pkgname)
+ if not s.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in SRC_URI" % pkgname)
+
+ srcpath = d.getVar("S")
+ if not srcpath.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in S" % pkgname)
+ if not srcpath.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in S" % pkgname)
}
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 735837667f..f6c92cb620 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -208,16 +208,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
else:
the_files.append(aux_files_pattern_verbatim % m.group(1))
d.setVar('FILES_' + pkg, " ".join(the_files))
- if extra_depends != '':
- d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
- d.setVar('DESCRIPTION_' + pkg, description % on)
- d.setVar('SUMMARY_' + pkg, summary % on)
- if postinst:
- d.setVar('pkg_postinst_' + pkg, postinst)
- if postrm:
- d.setVar('pkg_postrm_' + pkg, postrm)
else:
d.setVar('FILES_' + pkg, oldfiles + " " + newfile)
+ if extra_depends != '':
+ d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
+ if not d.getVar('DESCRIPTION_' + pkg, True):
+ d.setVar('DESCRIPTION_' + pkg, description % on)
+ if not d.getVar('SUMMARY_' + pkg, True):
+ d.setVar('SUMMARY_' + pkg, summary % on)
+ if postinst:
+ d.setVar('pkg_postinst_' + pkg, postinst)
+ if postrm:
+ d.setVar('pkg_postrm_' + pkg, postrm)
if callable(hook):
hook(f, pkg, file_regex, output_pattern, m.group(1))
@@ -374,6 +376,9 @@ def get_package_additional_metadata (pkg_type, d):
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
+
new_depends = {}
deps = bb.utils.explode_dep_versions2(d.getVar(varname, True) or "")
for depend in deps:
@@ -389,28 +394,53 @@ def runtime_mapping_rename (varname, pkg, d):
#
python package_get_auto_pr() {
- # per recipe PRSERV_HOST
+ import oe.prservice
+ import re
+
+ # Support per recipe PRSERV_HOST
pn = d.getVar('PN', True)
host = d.getVar("PRSERV_HOST_" + pn, True)
if not (host is None):
d.setVar("PRSERV_HOST", host)
- if d.getVar('PRSERV_HOST', True):
- try:
- auto_pr=prserv_get_pr_auto(d)
- except Exception as e:
- bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
- if auto_pr is None:
- if d.getVar('PRSERV_LOCKDOWN', True):
- bb.fatal("Can NOT get PRAUTO from lockdown exported file")
- else:
- bb.fatal("Can NOT get PRAUTO from remote PR service")
- return
- d.setVar('PRAUTO',str(auto_pr))
- else:
- pkgv = d.getVar("PKGV", True)
+ pkgv = d.getVar("PKGV", True)
+
+ # PR Server not active, handle AUTOINC
+ if not d.getVar('PRSERV_HOST', True):
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)
+
+ if d.getVar('PRSERV_LOCKDOWN', True):
+ auto_pr = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) 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)
+ if conn is None:
+ conn = oe.prservice.prserv_make_conn(d)
+ if conn is not None:
+ if "AUTOINC" in pkgv:
+ srcpv = bb.fetch2.get_srcrev(d)
+ base_ver = "AUTOINC-%s" % version[:version.find(srcpv)]
+ value = conn.getPR(base_ver, pkgarch, srcpv)
+ d.setVar("PKGV", pkgv.replace("AUTOINC", str(value)))
+
+ auto_pr = conn.getPR(version, pkgarch, checksum)
+ except Exception as e:
+ bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
+ if auto_pr is None:
+ bb.fatal("Can NOT get PRAUTO from remote PR service")
+ d.setVar('PRAUTO',str(auto_pr))
}
LOCALEBASEPN ??= "${PN}"
@@ -928,13 +958,7 @@ python split_and_strip_files () {
for f in kernmods:
sfiles.append((f, 16, strip))
-
- import multiprocessing
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- processed = list(pool.imap(oe.package.runstrip, sfiles))
- pool.close()
- pool.join()
+ oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
#
# End of strip
@@ -1119,6 +1143,18 @@ python package_fixsymlinks () {
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
+
+python package_package_name_hook() {
+ """
+ A package_name_hook function can be used to rewrite the package names by
+ changing PKG. For an example, see debian.bbclass.
+ """
+ pass
+}
+
+EXPORT_FUNCTIONS package_name_hook
+
+
PKGDESTWORK = "${WORKDIR}/pkgdata"
python emit_pkgdata() {
@@ -1232,10 +1268,6 @@ python emit_pkgdata() {
sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
sf.close()
- # Symlinks needed for reverse lookups (from the final package name)
- subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
- oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
-
# Symlinks needed for rprovides lookup
if rprov:
for p in rprov.strip().split():
@@ -1250,6 +1282,10 @@ python emit_pkgdata() {
os.chdir(root)
g = glob('*')
if g or allow_empty == "1":
+ # Symlinks needed for reverse lookups (from the final package name)
+ subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
+ oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
+
packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
open(packagedfile, 'w').close()
@@ -1299,12 +1335,7 @@ python package_do_filedeps() {
for files in chunks(pkgfiles[pkg], 100):
pkglist.append((pkg, files, rpmdeps, pkgdest))
- import multiprocessing
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- processed = list(pool.imap(oe.package.filedeprunner, pkglist))
- pool.close()
- pool.join()
+ processed = oe.utils.multiprocess_exec( pkglist, oe.package.filedeprunner)
provides_files = {}
requires_files = {}
@@ -1338,6 +1369,7 @@ SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
python package_do_shlibs() {
import re, pipes
+ import subprocess as sub
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
if exclude_shlibs:
@@ -1360,32 +1392,11 @@ python package_do_shlibs() {
pkgdest = d.getVar('PKGDEST', True)
- shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
- def read_shlib_providers():
- list_re = re.compile('^(.*)\.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):
- m = list_re.match(file)
- if m:
- dep_pkg = m.group(1)
- fd = open(os.path.join(dir, file))
- lines = fd.readlines()
- fd.close()
- for l in lines:
- s = l.strip().split(":")
- if s[0] not in shlib_provider:
- shlib_provider[s[0]] = {}
- shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
-
def linux_so(file, needed, sonames, renames, pkgver):
needs_ldconfig = False
ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
@@ -1422,7 +1433,7 @@ python package_do_shlibs() {
def darwin_so(file, needed, sonames, renames, pkgver):
if not os.path.exists(file):
return
- ldir = os.path.dirname(file).replace(pkgdest, '')
+ ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
def get_combinations(base):
#
@@ -1447,38 +1458,29 @@ python package_do_shlibs() {
prov = (combo, ldir, pkgver)
sonames.append(prov)
if file.endswith('.dylib') or file.endswith('.so'):
- lafile = file.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
- # Drop suffix
- lafile = lafile.rsplit(".",1)[0]
- lapath = os.path.dirname(lafile)
- lafile = os.path.basename(lafile)
- # Find all combinations
- combos = get_combinations(lafile)
- for combo in combos:
- if os.path.exists(lapath + '/' + combo + '.la'):
- break
- lafile = lapath + '/' + combo + '.la'
-
- #bb.note("Foo2: %s" % lafile)
- #bb.note("Foo %s" % file)
- if os.path.exists(lafile):
- fd = open(lafile, 'r')
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s*dependency_libs=\s*'(.*)'", l)
- if m:
- deps = m.group(1).split(" ")
- for dep in deps:
- #bb.note("Trying %s for %s" % (dep, pkg))
- name = None
- if dep.endswith(".la"):
- name = os.path.basename(dep).replace(".la", "")
- elif dep.startswith("-l"):
- name = dep.replace("-l", "lib")
- if name and name not in needed[pkg]:
- needed[pkg].append((name, lafile, []))
- #bb.note("Adding %s for %s" % (name, pkg))
+ rpath = []
+ p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
+ err, out = p.communicate()
+ # If returned succesfully, process stderr for results
+ if p.returncode == 0:
+ for l in err.split("\n"):
+ l = l.strip()
+ 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)
+ err, out = p.communicate()
+ # If returned succesfully, process stderr for results
+ if p.returncode == 0:
+ for l in err.split("\n"):
+ l = l.strip()
+ if not l or l.endswith(":"):
+ continue
+ if "is not an object file" in l:
+ continue
+ name = os.path.basename(l.split()[0]).rsplit(".", 1)[0]
+ if name and name not in needed[pkg]:
+ needed[pkg].append((name, file, []))
if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
snap_symlinks = True
@@ -1491,8 +1493,7 @@ python package_do_shlibs() {
use_ldconfig = False
needed = {}
- shlib_provider = {}
- read_shlib_providers()
+ 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 ""
@@ -1558,6 +1559,8 @@ python package_do_shlibs() {
if len(dep_pkg) == 2:
lib_ver = dep_pkg[1]
dep_pkg = dep_pkg[0]
+ if l not in shlib_provider:
+ shlib_provider[l] = {}
shlib_provider[l][libdir] = (dep_pkg, lib_ver)
libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]
@@ -1572,12 +1575,15 @@ 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 in private_libs:
+ if private_libs and n[0] in private_libs:
bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0]))
continue
if n[0] in shlib_provider.keys():
+ shlib_provider_path = list()
+ for k in shlib_provider[n[0]].keys():
+ shlib_provider_path.append(k)
match = None
- for p in n[2] + libsearchpath:
+ for p in n[2] + shlib_provider_path + libsearchpath:
if p in shlib_provider[n[0]]:
match = p
break
@@ -1934,9 +1940,9 @@ python do_package () {
# Optimisations
###########################################################################
- # Contunually rexpanding complex expressions is inefficient, particularly when
- # we write to the datastore and invalidate the expansion cache. This code
- # pre-expands some frequently used variables
+ # Continually expanding complex expressions is inefficient, particularly
+ # when we write to the datastore and invalidate the expansion cache. This
+ # code pre-expands some frequently used variables
def expandVar(x, d):
d.setVar(x, d.getVar(x, True))
@@ -2025,7 +2031,4 @@ def mapping_rename_hook(d):
runtime_mapping_rename("RDEPENDS", pkg, d)
runtime_mapping_rename("RRECOMMENDS", pkg, d)
runtime_mapping_rename("RSUGGESTS", pkg, d)
- runtime_mapping_rename("RPROVIDES", pkg, d)
- runtime_mapping_rename("RREPLACES", pkg, d)
- runtime_mapping_rename("RCONFLICTS", pkg, d)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 7bc29df165..5b5f7e2c9a 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -239,13 +239,26 @@ python do_package_deb () {
scriptvar = localdata.getVar('pkg_%s' % script, True)
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.write("#!/bin/sh\n")
- scriptfile.write(scriptvar)
+
+ if scriptvar.startswith("#!"):
+ pos = scriptvar.find("\n") + 1
+ scriptfile.write(scriptvar[:pos])
+ else:
+ pos = 0
+ scriptfile.write("#!/bin/sh\n")
+
+ # Prevent the prerm/postrm scripts from being run during an upgrade
+ if script in ('prerm', 'postrm'):
+ scriptfile.write('[ "$1" != "upgrade" ] || exit 0\n')
+
+ scriptfile.write(scriptvar[pos:])
+ scriptfile.write('\n')
scriptfile.close()
os.chmod(os.path.join(controldir, script), 0755)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 2949d1d2e0..44fd3eb29c 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -63,7 +63,32 @@ python do_package_ipk () {
bb.data.update_data(localdata)
basedir = os.path.join(os.path.dirname(root))
arch = localdata.getVar('PACKAGE_ARCH', True)
- pkgoutdir = "%s/%s" % (outdir, arch)
+
+ if localdata.getVar('IPK_HIERARCHICAL_FEED') == "1":
+ # Spread packages across subdirectories so each isn't too crowded
+ if pkgname.startswith('lib'):
+ pkg_prefix = 'lib' + pkgname[3]
+ else:
+ pkg_prefix = pkgname[0]
+
+ # Keep -dbg, -dev, -doc, -staticdev, -locale and -locale-* packages
+ # together. These package suffixes are taken from the definitions of
+ # PACKAGES and PACKAGES_DYNAMIC in meta/conf/bitbake.conf
+ if pkgname[-4:] in ('-dbg', '-dev', '-doc'):
+ pkg_subdir = pkgname[:-4]
+ elif pkgname.endswith('-staticdev'):
+ pkg_subdir = pkgname[:-10]
+ elif pkgname.endswith('-locale'):
+ pkg_subdir = pkgname[:-7]
+ elif '-locale-' in pkgname:
+ pkg_subdir = pkgname[:pkgname.find('-locale-')]
+ else:
+ pkg_subdir = pkgname
+
+ pkgoutdir = "%s/%s/%s/%s" % (outdir, arch, pkg_prefix, pkg_subdir)
+ else:
+ pkgoutdir = "%s/%s" % (outdir, arch)
+
bb.utils.mkdirhier(pkgoutdir)
os.chdir(root)
cleanupcontrol(root)
@@ -182,7 +207,7 @@ 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) or "None"
+ 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()))
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 0a32b3e5dc..92ddf7a30f 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -185,7 +185,7 @@ python write_specfile () {
if not len(depends_dict[dep]):
array.append("%s: %s" % (tag, dep))
- def walk_files(walkpath, target, conffiles):
+ def walk_files(walkpath, target, conffiles, dirfiles):
# We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
# when packaging. We just ignore these files which are created in
# packages-split/ and not package/
@@ -196,11 +196,24 @@ python write_specfile () {
path = rootpath.replace(walkpath, "")
if path.endswith("DEBIAN") or path.endswith("CONTROL"):
continue
- for dir in dirs:
- if dir == "CONTROL" or dir == "DEBIAN":
- continue
- # All packages own the directories their files are in...
- target.append('%dir "' + path + '/' + dir + '"')
+
+ # Directory handling can happen in two ways, either DIRFILES is not set at all
+ # in which case we fall back to the older behaviour of packages owning all their
+ # directories
+ if dirfiles is None:
+ for dir in dirs:
+ if dir == "CONTROL" or dir == "DEBIAN":
+ continue
+ # All packages own the directories their files are in...
+ target.append('%dir "' + path + '/' + dir + '"')
+ else:
+ # packages own only empty directories or explict directory.
+ # This will prevent the overlapping of security permission.
+ if path and not files and not dirs:
+ target.append('%dir "' + path + '"')
+ elif path and path in dirfiles:
+ target.append('%dir "' + path + '"')
+
for file in files:
if file == "CONTROL" or file == "DEBIAN":
continue
@@ -293,6 +306,7 @@ python write_specfile () {
spec_files_bottom = []
perfiledeps = (d.getVar("MERGEPERFILEDEPS", True) or "0") == "0"
+ extra_pkgdata = (d.getVar("RPM_EXTRA_PKGDATA", True) or "0") == "1"
for pkg in packages.split():
localdata = bb.data.createCopy(d)
@@ -311,6 +325,9 @@ python write_specfile () {
bb.data.update_data(localdata)
conffiles = (localdata.getVar('CONFFILES', True) or "").split()
+ dirfiles = localdata.getVar('DIRFILES', True)
+ if dirfiles is not None:
+ dirfiles = dirfiles.split()
splitname = strip_multilib(pkgname, d)
@@ -367,12 +384,14 @@ python write_specfile () {
srcrpostrm = splitrpostrm
file_list = []
- walk_files(root, file_list, conffiles)
+ walk_files(root, file_list, conffiles, dirfiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "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)
spec_files_top.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
@@ -474,11 +493,13 @@ python write_specfile () {
# Now process files
file_list = []
- walk_files(root, file_list, conffiles)
+ walk_files(root, file_list, conffiles, dirfiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
+ if extra_pkgdata:
+ package_rpm_extra_pkgdata(splitname, spec_files_bottom, localdata)
spec_files_bottom.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
@@ -669,6 +690,7 @@ python do_package_rpm () {
cmd = rpmbuild
cmd = cmd + " --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 '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
if perfiledeps:
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 6606bc6f71..56cfead82a 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -9,7 +9,12 @@ 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
-inherit allarch
+PACKAGE_ARCH ?= "all"
+
+# Fully expanded - so it applies the overrides as well
+PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
+
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
# This automatically adds -dbg and -dev flavours of all PACKAGES
# to the list. Their dependencies (RRECOMMENDS) are handled as usual
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a12bf1169e..8b7e9ea8dd 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -20,7 +20,7 @@ def complementary_globs(featurevar, d):
SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs"
SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
-inherit populate_sdk_${IMAGE_PKGTYPE}
+inherit rootfs_${IMAGE_PKGTYPE}
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
@@ -32,12 +32,15 @@ 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 ?= "packagegroup-core-standalone-sdk-target packagegroup-core-standalone-sdk-target-dbg"
+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_ATTEMPTONLY ?= ""
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native sed-native"
+SDK_DEPENDS = "virtual/fakeroot-native"
# We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
# could be set to the MACHINE_ARCH
@@ -48,6 +51,19 @@ PID = "${@os.getpid()}"
EXCLUDE_FROM_WORLD = "1"
SDK_PACKAGING_FUNC ?= "create_shar"
+SDK_POST_INSTALL_COMMAND ?= ""
+
+SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest"
+python write_target_sdk_manifest () {
+ from oe.sdk import sdk_list_installed_packages
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_MANIFEST", True))
+ if not os.path.exists(sdkmanifestdir):
+ bb.utils.mkdirhier(sdkmanifestdir)
+ with open(d.getVar('SDK_MANIFEST', True), 'w') as output:
+ output.write(sdk_list_installed_packages(d, True, 'ver'))
+}
+
+POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; "
fakeroot python do_populate_sdk() {
from oe.sdk import populate_sdk
@@ -57,6 +73,13 @@ fakeroot python do_populate_sdk() {
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d)
runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d)
+ ld = bb.data.createCopy(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))
+
# create target/host SDK manifests
create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True),
manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
@@ -65,25 +88,8 @@ fakeroot python do_populate_sdk() {
populate_sdk(d)
- # 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))
-
- # make sure we only use the SDKTARGETSYSROOT value from 'd'
- localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
-
# Process DEFAULTTUNE
- bb.build.exec_func("create_sdk_files", localdata)
-
- variants = d.getVar("MULTILIB_VARIANTS", True) 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)
- bb.data.update_data(localdata)
- bb.build.exec_func("create_sdk_files", localdata)
+ bb.build.exec_func("create_sdk_files", d)
bb.build.exec_func("tar_sdk", d)
@@ -91,14 +97,6 @@ fakeroot python do_populate_sdk() {
}
fakeroot create_sdk_files() {
- # Setup site file for external use
- toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
-
- toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
-
- # Add version information
- toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
-
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
# Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
@@ -117,190 +115,21 @@ fakeroot tar_sdk() {
}
fakeroot create_shar() {
- cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
-#!/bin/bash
-
-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/")
-
-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!"
- exit 1
- fi
-fi
-
-DEFAULT_INSTALL_DIR="${SDKPATH}"
-SUDO_EXEC=""
-target_sdk_dir=""
-answer=""
-relocate=1
-savescripts=0
-verbose=0
-while getopts ":yd:DRS" OPT; do
- case $OPT in
- y)
- answer="Y"
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
- ;;
- d)
- target_sdk_dir=$OPTARG
- ;;
- D)
- verbose=1
- ;;
- R)
- relocate=0
- savescripts=1
- ;;
- S)
- savescripts=1
- ;;
- *)
- echo "Usage: $(basename $0) [-y] [-d <dir>]"
- echo " -y Automatic yes to all prompts"
- echo " -d <dir> Install the SDK to <dir>"
- echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
- echo " -S Save relocation scripts"
- echo " -R Do not relocate executables"
- echo " -D use set -x to see what is going on"
- exit 1
- ;;
- esac
-done
-
-if [ $verbose = 1 ] ; then
- set -x
-fi
-
-if [ "$target_sdk_dir" = "" ]; then
- read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
-fi
-
-eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
-if [ -d "$target_sdk_dir" ]; then
- target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
-else
- target_sdk_dir=$(readlink -m "$target_sdk_dir")
-fi
-
-if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
- echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
- exit 1
-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]?"
-
- default_answer="n"
-else
- printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
-
- default_answer="y"
-fi
-
-if [ "$answer" = "" ]; then
- read answer
- [ "$answer" = "" ] && answer="$default_answer"
-else
- echo $answer
-fi
-
-if [ "$answer" != "Y" -a "$answer" != "y" ]; then
- echo "Installation aborted!"
- exit 1
-fi
-
-# Try to create the directory (this will not succeed if user doesn't have rights)
-mkdir -p $target_sdk_dir >/dev/null 2>&1
-
-# if don't have the right to access dir, gain by sudo
-if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
- SUDO_EXEC=$(which "sudo")
- if [ -z $SUDO_EXEC ]; then
- echo "No command 'sudo' found, please install sudo first. Abort!"
- exit 1
- fi
-
- # test sudo could gain root right
- $SUDO_EXEC pwd >/dev/null 2>&1
- [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
-
- # now that we have sudo rights, create the directory
- $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
-fi
-
-payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
-
-printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir
-echo "done"
-
-printf "Setting it up..."
-# fix environment paths
-for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
- $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
-done
-
-# fix dynamic loader paths in all ELF SDK binaries
-native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
-dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
-if [ "$dl_path" = "" ] ; then
- echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
- exit 1
-fi
-executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111)
-
-tdir=`mktemp -d`
-if [ x$tdir = x ] ; then
- echo "SDK relocate failed, could not create a temporary directory"
- exit 1
-fi
-echo "#!/bin/bash" > $tdir/relocate_sdk.sh
-echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
-$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
-$SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
-rm -rf $tdir
-if [ $relocate = 1 ] ; then
- $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.sh
- if [ $? -ne 0 ]; then
- echo "SDK could not be set up. Relocate script failed. Abort!"
- exit 1
- fi
-fi
-
-# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
-$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
-
-# change all symlinks pointing to ${SDKPATH}
-for l in $($SUDO_EXEC find $native_sysroot -type l); do
- $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
-done
-
-# find out all perl scripts in $native_sysroot and modify them replacing the
-# host perl with SDK perl.
-for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do
- $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
- "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
-done
-
-echo done
-
-# delete the relocating script, so that user is forced to re-run the installer
-# if he/she wants another location for the sdk
-if [ $savescripts = 0 ] ; then
- $SUDO_EXEC rm ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
-fi
-
-echo "SDK has been successfully set up and is ready to be used."
-
-exit 0
-
-MARKER:
+ # copy in the template shar extractor script
+ cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
+ cat << "EOF" > ${T}/post_install_command
+${SDK_POST_INSTALL_COMMAND}
EOF
+ sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
+ # substitute variables
+ sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \
+ -e 's#@SDKPATH@#${SDKPATH}#g' \
+ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
+ -e '/@SDK_POST_INSTALL_COMMAND@/d' \
+ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+
# add execution permission
chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
@@ -329,7 +158,7 @@ populate_sdk_log_check() {
}
do_populate_sdk[dirs] = "${TOPDIR}"
-do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])}"
+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[recrdeptask] += "do_packagedata do_package_write_rpm do_package_write_ipk do_package_write_deb"
addtask populate_sdk
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
deleted file mode 100644
index acb1f73983..0000000000
--- a/meta/classes/populate_sdk_deb.bbclass
+++ /dev/null
@@ -1,13 +0,0 @@
-do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
-
-DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\
- [d.getVar('SDK_ARCH', True) in \
- ["x86", "i486", "i586", "i686", "pentium"]]}"
-
-DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "amd64"]\
- [d.getVar('SDK_ARCH', True) == "x86_64"]}"
-
-do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
-
-# 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/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
deleted file mode 100644
index 8b2cb6dc48..0000000000
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ /dev/null
@@ -1,3 +0,0 @@
-do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
-
-do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
deleted file mode 100644
index 4954d00490..0000000000
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ /dev/null
@@ -1,16 +0,0 @@
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-do_populate_sdk[depends] += "rpm-native:do_populate_sysroot"
-do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot"
-do_populate_sdk[depends] += "python-smartpm-native:do_populate_sysroot"
-
-# Needed for update-alternatives
-do_populate_sdk[depends] += "opkg-native:do_populate_sysroot"
-
-# Creating the repo info in do_rootfs
-do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot"
-
-rpmlibdir = "/var/lib/rpm"
-
-do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
diff --git a/meta/classes/prserv.bbclass b/meta/classes/prserv.bbclass
index b440d863ef..139597f9cb 100644
--- a/meta/classes/prserv.bbclass
+++ b/meta/classes/prserv.bbclass
@@ -1,33 +1,2 @@
-def prserv_get_pr_auto(d):
- import oe.prservice
- import re
- pv = d.getVar("PV", True)
- if not d.getVar('PRSERV_HOST', True):
- if 'AUTOINC' in pv:
- d.setVar("PKGV", pv.replace("AUTOINC", "0"))
- bb.warn("Not using network based PR service")
- return None
- version = d.getVar("PRAUTOINX", True)
- pkgarch = d.getVar("PACKAGE_ARCH", True)
- checksum = d.getVar("BB_TASKHASH", True)
-
- conn = d.getVar("__PRSERV_CONN", True)
- if conn is None:
- conn = oe.prservice.prserv_make_conn(d)
- if conn is None:
- return None
-
- if "AUTOINC" in pv:
- srcpv = bb.fetch2.get_srcrev(d)
- base_ver = "AUTOINC-%s" % version[:version.find(srcpv)]
- value = conn.getPR(base_ver, pkgarch, srcpv)
- d.setVar("PKGV", pv.replace("AUTOINC", str(value)))
-
- if d.getVar('PRSERV_LOCKDOWN', True):
- auto_rev = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
- else:
- auto_rev = conn.getPR(version, pkgarch, checksum)
-
- return auto_rev
diff --git a/meta/classes/ptest-gnome.bbclass b/meta/classes/ptest-gnome.bbclass
new file mode 100644
index 0000000000..b2949af9bb
--- /dev/null
+++ b/meta/classes/ptest-gnome.bbclass
@@ -0,0 +1,8 @@
+inherit ptest
+
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
+
+FILES_${PN}-ptest += "${libexecdir}/installed-tests/ \
+ ${datadir}/installed-tests/"
+
+RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index fdd22bbc86..97029dc525 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -2,5 +2,7 @@
inherit python-dir
PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
+# PYTHON_EXECUTABLE is used by cmake
+PYTHON_EXECUTABLE="${PYTHON}"
EXTRANATIVEPATH += "${PYTHON_PN}-native"
DEPENDS += " ${PYTHON_PN}-native "
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index abee8aaa7c..601f587534 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -29,19 +29,23 @@ def qemu_run_binary(data, rootfs_path, binary):
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
+ qemu_options = data.getVar("QEMU_OPTIONS", True)
- return "PSEUDO_UNLOAD=1 " + qemu_binary + " -L " + rootfs_path\
+ return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ rootfs_path + binary
-QEMU_OPTIONS = ""
-QEMU_OPTIONS_iwmmxt = "-cpu pxa270-c5"
-QEMU_OPTIONS_armv6 = "-cpu arm1136"
-QEMU_OPTIONS_armv7a = "-cpu cortex-a8"
-QEMU_OPTIONS_e500v2 = "-cpu e500v2"
-QEMU_OPTIONS_e500mc = "-cpu e500mc"
-QEMU_OPTIONS_e5500 = "-cpu e5500"
-QEMU_OPTIONS_e5500-64b = "-cpu e5500"
-QEMU_OPTIONS_e6500 = "-cpu e6500"
-QEMU_OPTIONS_e6500-64b = "-cpu e6500"
-QEMU_OPTIONS_ppc7400 = "-cpu 7400"
+# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are
+# PACKAGE_ARCH, not overrides and hence have to do this dance. Simply being arch
+# specific isn't good enough.
+QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
+QEMU_EXTRAOPTIONS_iwmmxt = " -cpu pxa270-c5"
+QEMU_EXTRAOPTIONS_armv6 = " -cpu arm1136"
+QEMU_EXTRAOPTIONS_armv7a = " -cpu cortex-a8"
+QEMU_EXTRAOPTIONS_e500v2 = " -cpu e500v2"
+QEMU_EXTRAOPTIONS_e500mc = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_e5500 = " -cpu e5500"
+QEMU_EXTRAOPTIONS_e5500-64b = " -cpu e5500"
+QEMU_EXTRAOPTIONS_e6500 = " -cpu e6500"
+QEMU_EXTRAOPTIONS_e6500-64b = " -cpu e6500"
+QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
diff --git a/meta/classes/qt4e.bbclass b/meta/classes/qt4e.bbclass
index 850bb6a717..13b1050aac 100644
--- a/meta/classes/qt4e.bbclass
+++ b/meta/classes/qt4e.bbclass
@@ -19,6 +19,3 @@ EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
# Qt4 uses atomic instructions not supported in thumb mode
ARM_INSTRUCTION_SET = "arm"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
diff --git a/meta/classes/qt4x11.bbclass b/meta/classes/qt4x11.bbclass
index 65d196afc6..6f06d34755 100644
--- a/meta/classes/qt4x11.bbclass
+++ b/meta/classes/qt4x11.bbclass
@@ -1,7 +1,10 @@
QT4DEPENDS ?= "qt4-x11 "
DEPENDS_prepend = "${QT4DEPENDS}"
-inherit qmake2
+# depends on qt4-x11
+REQUIRED_DISTRO_FEATURES += "x11"
+
+inherit qmake2 distro_features_check
QT_BASE_NAME = "qt4"
QT_DIR_NAME = "qt4"
@@ -9,6 +12,3 @@ QT_LIBINFIX = ""
# Qt4 uses atomic instructions not supported in thumb mode
ARM_INSTRUCTION_SET = "arm"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass
index 5fe2355842..5f155e332b 100644
--- a/meta/classes/report-error.bbclass
+++ b/meta/classes/report-error.bbclass
@@ -44,11 +44,18 @@ python errorreport_handler () {
task = e.task
taskdata={}
log = e.data.getVar('BB_LOGFILE', True)
- logFile = open(log, 'r')
taskdata['package'] = e.data.expand("${PF}")
taskdata['task'] = task
- taskdata['log'] = logFile.read()
- logFile.close()
+ if log:
+ try:
+ logFile = open(log, 'r')
+ taskdata['log'] = logFile.read().decode('utf-8')
+ logFile.close()
+ except:
+ taskdata['log'] = "Unable to read log file"
+
+ else:
+ taskdata['log'] = "No Log"
jsondata = json.loads(errorreport_getdata(e))
jsondata['failures'].append(taskdata)
errorreport_savedata(e, jsondata, "error-report.txt")
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index f0f6d18249..e68d02a783 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -97,3 +97,24 @@ do_rm_work_all () {
}
do_rm_work_all[recrdeptask] = "do_rm_work"
addtask rm_work_all after do_rm_work
+
+do_populate_sdk[postfuncs] += "rm_work_populatesdk"
+rm_work_populatesdk () {
+ :
+}
+rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
+
+do_rootfs[postfuncs] += "rm_work_rootfs"
+rm_work_rootfs () {
+ :
+}
+rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
+
+python () {
+ # 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)
+ if pn in excludes:
+ d.delVarFlag('rm_work_rootfs', 'cleandirs')
+ d.delVarFlag('rm_work_populatesdk', 'cleandirs')
+}
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index a42a472822..d51b4582d2 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -6,11 +6,13 @@ 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"
rootfs_deb_do_rootfs[vardepsexclude] += "BUILDNAME"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
python rootfs_deb_bad_recommendations() {
if d.getVar("BAD_RECOMMENDATIONS", True):
@@ -22,3 +24,16 @@ DEB_POSTPROCESS_COMMANDS = ""
opkglibdir = "${localstatedir}/lib/opkg"
+python () {
+ # Map TARGET_ARCH to Debian's ideas about architectures
+ darch = d.getVar('SDK_ARCH', True)
+ if darch in ["x86", "i486", "i586", "i686", "pentium"]:
+ d.setVar('DEB_SDK_ARCH', 'i386')
+ elif darch == "x86_64":
+ d.setVar('DEB_SDK_ARCH', 'amd64')
+ 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 f5fef00166..6139cc7d59 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -10,11 +10,13 @@ ROOTFS_PKGMANAGE = "opkg opkg-collateral ${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[vardeps] += "PACKAGE_FEED_URIS"
rootfs_ipk_do_rootfs[vardepsexclude] += "BUILDNAME"
do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
+do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
OPKG_PREPROCESS_COMMANDS = ""
@@ -35,4 +37,3 @@ python () {
d.setVar('OPKG_PREPROCESS_COMMANDS', "")
d.setVar('OPKG_POSTPROCESS_COMMANDS', '')
}
-
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 9e97d341d9..d85d001a62 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -11,15 +11,15 @@ IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smar
# Smart is python based, so be sure python-native is available to us.
EXTRANATIVEPATH += "python-native"
-do_rootfs[depends] += "rpm-native:do_populate_sysroot"
-do_rootfs[depends] += "rpmresolve-native:do_populate_sysroot"
-do_rootfs[depends] += "python-smartpm-native:do_populate_sysroot"
+# 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 \
+ opkg-native:do_populate_sysroot"
-# Needed for update-alternatives
-do_rootfs[depends] += "opkg-native:do_populate_sysroot"
-
-# Creating the repo info in do_rootfs
-do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
+do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
+do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
do_rootfs[recrdeptask] += "do_package_write_rpm"
rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
@@ -28,6 +28,7 @@ do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
python () {
if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
@@ -40,3 +41,7 @@ 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/sanity.bbclass b/meta/classes/sanity.bbclass
index ed65814be2..2f75558104 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -87,17 +87,54 @@ def raise_sanity_error(msg, d, network_error=False):
%s""" % msg)
+# Check flags associated with a tuning.
+def check_toolchain_tune_args(data, tune, multilib, errs):
+ found_errors = False
+ if check_toolchain_args_present(data, tune, multilib, errs, 'CCARGS'):
+ found_errors = True
+ if check_toolchain_args_present(data, tune, multilib, errs, 'ASARGS'):
+ found_errors = True
+ if check_toolchain_args_present(data, tune, multilib, errs, 'LDARGS'):
+ found_errors = True
+
+ 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_missing = []
+
+ # If no args are listed/required, we are done.
+ if not args_wanted:
+ return
+ for arg in args_wanted:
+ if arg not in args_set:
+ args_missing.append(arg)
+
+ found_errors = False
+ if args_missing:
+ found_errors = True
+ tune_errors.append("TUNEABI for %s requires '%s' in TUNE_%s (%s)." %
+ (tune, ' '.join(args_missing), which, ' '.join(args_set)))
+ return found_errors
+
# Check a single tune for validity.
def check_toolchain_tune(data, tune, multilib):
tune_errors = []
if not tune:
return "No tuning found for %s multilib." % multilib
+ localdata = bb.data.createCopy(data)
+ if multilib != "default":
+ # 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 = (data.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
+ features = (localdata.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
if not features:
return "Tuning '%s' has no defined features, and cannot be used." % tune
- valid_tunes = data.getVarFlags('TUNEVALID') or {}
- conflicts = data.getVarFlags('TUNECONFLICTS') or {}
+ valid_tunes = localdata.getVarFlags('TUNEVALID') or {}
+ conflicts = localdata.getVarFlags('TUNECONFLICTS') or {}
# [doc] is the documentation for the variable, not a real feature
if 'doc' in valid_tunes:
del valid_tunes['doc']
@@ -113,15 +150,17 @@ 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 = data.getVar("TUNEABI_WHITELIST", True) or ''
- override = data.getVar("TUNEABI_OVERRIDE", True) or ''
+ whitelist = localdata.getVar("TUNEABI_WHITELIST", True)
if whitelist:
- tuneabi = data.getVar("TUNEABI_tune-%s" % tune, True) or ''
+ tuneabi = localdata.getVar("TUNEABI_tune-%s" % tune, True)
if not tuneabi:
tuneabi = tune
if True not in [x in whitelist.split() for x in tuneabi.split()]:
tune_errors.append("Tuning '%s' (%s) cannot be used with any supported tuning/ABI." %
(tune, tuneabi))
+ else:
+ if not check_toolchain_tune_args(localdata, tuneabi, multilib, tune_errors):
+ bb.debug(2, "Sanity check: Compiler args OK for %s." % tune)
if tune_errors:
return "Tuning '%s' has the following errors:\n" % tune + '\n'.join(tune_errors)
@@ -225,7 +264,7 @@ def check_connectivity(d):
# CONNECTIVITY_CHECK_URIS are set
network_enabled = not d.getVar('BB_NO_NETWORK', True)
check_enabled = len(test_uris)
- # Take a copy of the data store and unset MIRRORS and PREMIRROS
+ # Take a copy of the data store and unset MIRRORS and PREMIRRORS
data = bb.data.createCopy(d)
data.delVar('PREMIRRORS')
data.delVar('MIRRORS')
@@ -480,6 +519,16 @@ def sanity_handle_abichanges(status, d):
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 != 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))
@@ -514,6 +563,7 @@ def check_sanity_version_change(status, d):
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
status.addresult(check_make_version(d))
status.addresult(check_tar_version(d))
@@ -566,6 +616,11 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
tmpdir = d.getVar('TMPDIR', True)
status.addresult(check_create_long_filename(tmpdir, "TMPDIR"))
+ tmpdirmode = os.stat(tmpdir).st_mode
+ if (tmpdirmode & stat.S_ISGID):
+ status.addresult("TMPDIR is setgid, please don't build in a setgid directory")
+ if (tmpdirmode & stat.S_ISUID):
+ status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
# Some third-party software apparently relies on chmod etc. being suid root (!!)
import stat
@@ -708,6 +763,44 @@ def check_sanity_everybuild(status, d):
if oeroot.find(' ') != -1:
status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.")
+ # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
+ import re
+ mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
+ protocols = ['http', 'ftp', 'file', 'https', \
+ 'git', 'gitsm', 'hg', 'osc', 'p4', 'svk', 'svn', \
+ 'bzr', 'cvs']
+ 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
+
+ try:
+ pattern, mirror = mirror_entry.split()
+ except ValueError:
+ bb.warn('Invalid %s: %s, should be 2 members.' % (mirror_var, mirror_entry.strip()))
+ continue
+
+ decoded = bb.fetch2.decodeurl(pattern)
+ try:
+ pattern_scheme = re.compile(decoded[0])
+ except re.error as exc:
+ bb.warn('Invalid scheme regex (%s) in %s; %s' % (pattern, mirror_var, mirror_entry))
+ continue
+
+ if not any(pattern_scheme.match(protocol) for protocol in protocols):
+ bb.warn('Invalid protocol (%s) in %s: %s' % (decoded[0], mirror_var, mirror_entry))
+ continue
+
+ if not any(mirror.startswith(protocol + '://') for protocol in protocols):
+ bb.warn('Invalid protocol in %s: %s' % (mirror_var, mirror_entry))
+ continue
+
+ if mirror.startswith('file://') and not mirror.startswith('file:///'):
+ bb.warn('Invalid file url in %s: %s, must be absolute path (file:///)' % (mirror_var, mirror_entry))
+
# Check that TMPDIR hasn't changed location since the last time we were run
tmpdir = d.getVar('TMPDIR', True)
checkfile = os.path.join(tmpdir, "saved_tmpdir")
diff --git a/meta/classes/siteconfig.bbclass b/meta/classes/siteconfig.bbclass
index 9a4d03b887..45dce489de 100644
--- a/meta/classes/siteconfig.bbclass
+++ b/meta/classes/siteconfig.bbclass
@@ -18,13 +18,13 @@ siteconfig_do_siteconfig_gencache () {
>${WORKDIR}/site_config_${MACHINE}/configure.ac
cd ${WORKDIR}/site_config_${MACHINE}
autoconf
- rm -f ${PN}_cache
- CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
+ rm -f ${BPN}_cache
+ CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
- < ${PN}_cache > ${PN}_config
+ < ${BPN}_cache > ${BPN}_config
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
- cp ${PN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
+ cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
}
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index e90632aeef..b41db46bc0 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -18,10 +18,10 @@
def siteinfo_data(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",
- "aarch64_be": "endian-big bit-64 arm-common",
- "arm": "endian-little bit-32 arm-common",
- "armeb": "endian-big bit-32 arm-common",
+ "aarch64": "endian-little bit-64 arm-common arm-64",
+ "aarch64_be": "endian-big bit-64 arm-common arm-64",
+ "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",
"bfin": "endian-little bit-32 bfin-common",
"i386": "endian-little bit-32 ix86-common",
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 55ce3aff4f..454c53e96f 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -15,252 +15,291 @@
# SPDX file will be output to the path which is defined as[SPDX_MANIFEST_DIR]
# in ./meta/conf/licenses.conf.
-SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir"
SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir"
+# If ${S} isn't actually the top-level source directory, set SPDX_S to point at
+# the real top-level directory.
+SPDX_S ?= "${S}"
+
python do_spdx () {
import os, sys
- import json
+ import json, shutil
info = {}
- info['workdir'] = (d.getVar('WORKDIR', True) or "")
- info['sourcedir'] = (d.getVar('S', True) or "")
- info['pn'] = (d.getVar( 'PN', True ) or "")
- info['pv'] = (d.getVar( 'PV', True ) or "")
- info['src_uri'] = (d.getVar( 'SRC_URI', True ) or "")
- info['spdx_version'] = (d.getVar('SPDX_VERSION', True) or '')
- info['data_license'] = (d.getVar('DATA_LICENSE', True) or '')
-
- spdx_sstate_dir = (d.getVar('SPDXSSTATEDIR', True) or "")
- manifest_dir = (d.getVar('SPDX_MANIFEST_DIR', True) or "")
+ 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)
+ sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] + ".spdx")
+
+ manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True)
info['outfile'] = os.path.join(manifest_dir, info['pn'] + ".spdx" )
- sstatefile = os.path.join(spdx_sstate_dir,
- info['pn'] + info['pv'] + ".spdx" )
- info['spdx_temp_dir'] = (d.getVar('SPDX_TEMP_DIR', True) or "")
- info['tar_file'] = os.path.join( info['workdir'], info['pn'] + ".tar.gz" )
+ info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True)
+ info['tar_file'] = os.path.join(info['workdir'], info['pn'] + ".tar.gz" )
+
+ # Make sure important dirs exist
+ try:
+ bb.utils.mkdirhier(manifest_dir)
+ bb.utils.mkdirhier(sstatedir)
+ bb.utils.mkdirhier(info['spdx_temp_dir'])
+ except OSError as e:
+ bb.error("SPDX: Could not set up required directories: " + str(e))
+ return
## get everything from cache. use it to decide if
## something needs to be rerun
- cur_ver_code = get_ver_code( info['sourcedir'] )
+ cur_ver_code = get_ver_code(info['sourcedir'])
cache_cur = False
- if not os.path.exists( spdx_sstate_dir ):
- bb.utils.mkdirhier( spdx_sstate_dir )
- if not os.path.exists( info['spdx_temp_dir'] ):
- bb.utils.mkdirhier( info['spdx_temp_dir'] )
- if os.path.exists( sstatefile ):
+ if os.path.exists(sstatefile):
## cache for this package exists. read it in
- cached_spdx = get_cached_spdx( sstatefile )
+ cached_spdx = get_cached_spdx(sstatefile)
if cached_spdx['PackageVerificationCode'] == cur_ver_code:
- bb.warn(info['pn'] + "'s ver code same as cache's. do nothing")
+ bb.warn("SPDX: Verification code for " + info['pn']
+ + "is same as cache's. do nothing")
cache_cur = True
else:
- local_file_info = setup_foss_scan( info,
- True, cached_spdx['Files'] )
+ local_file_info = setup_foss_scan(info, True, cached_spdx['Files'])
else:
- local_file_info = setup_foss_scan( info, False, None )
+ local_file_info = setup_foss_scan(info, False, None)
if cache_cur:
spdx_file_info = cached_spdx['Files']
+ foss_package_info = cached_spdx['Package']
+ foss_license_info = cached_spdx['Licenses']
else:
## setup fossology command
- foss_server = (d.getVar('FOSS_SERVER', True) or "")
- foss_flags = (d.getVar('FOSS_WGET_FLAGS', True) or "")
+ 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_command = "wget %s --post-file=%s %s"\
- % (foss_flags,info['tar_file'],foss_server)
+ % (foss_flags, info['tar_file'], foss_server)
- #bb.warn(info['pn'] + json.dumps(local_file_info))
- foss_file_info = run_fossology( foss_command )
- spdx_file_info = create_spdx_doc( local_file_info, foss_file_info )
- ## write to cache
- write_cached_spdx(sstatefile,cur_ver_code,spdx_file_info)
+ foss_result = run_fossology(foss_command, foss_full_spdx)
+ if foss_result is not None:
+ (foss_package_info, foss_file_info, foss_license_info) = foss_result
+ spdx_file_info = create_spdx_doc(local_file_info, foss_file_info)
+ ## write to cache
+ write_cached_spdx(sstatefile, cur_ver_code, foss_package_info,
+ spdx_file_info, foss_license_info)
+ else:
+ bb.error("SPDX: Could not communicate with FOSSology server. Command was: " + foss_command)
+ return
## Get document and package level information
- spdx_header_info = get_header_info(info, cur_ver_code, spdx_file_info)
+ spdx_header_info = get_header_info(info, cur_ver_code, foss_package_info)
## CREATE MANIFEST
- create_manifest(info,spdx_header_info,spdx_file_info)
+ create_manifest(info, spdx_header_info, spdx_file_info, foss_license_info)
## clean up the temp stuff
- remove_dir_tree( info['spdx_temp_dir'] )
+ shutil.rmtree(info['spdx_temp_dir'], ignore_errors=True)
if os.path.exists(info['tar_file']):
- remove_file( info['tar_file'] )
+ remove_file(info['tar_file'])
}
addtask spdx after do_patch before do_configure
-def create_manifest(info,header,files):
- with open(info['outfile'], 'w') as f:
+def create_manifest(info, header, files, licenses):
+ import codecs
+ with codecs.open(info['outfile'], mode='w', encoding='utf-8') as f:
+ # Write header
f.write(header + '\n')
+
+ # Write file data
for chksum, block in files.iteritems():
+ f.write("FileName: " + block['FileName'] + '\n')
+ for key, value in block.iteritems():
+ if not key == 'FileName':
+ f.write(key + ": " + value + '\n')
+ f.write('\n')
+
+ # Write license data
+ for id, block in licenses.iteritems():
+ f.write("LicenseID: " + id + '\n')
for key, value in block.iteritems():
- f.write(key + ": " + value)
- f.write('\n')
+ f.write(key + ": " + value + '\n')
f.write('\n')
-def get_cached_spdx( sstatefile ):
+def get_cached_spdx(sstatefile):
import json
+ import codecs
cached_spdx_info = {}
- with open( sstatefile, 'r' ) as f:
+ with codecs.open(sstatefile, mode='r', encoding='utf-8') as f:
try:
cached_spdx_info = json.load(f)
except ValueError as e:
cached_spdx_info = None
return cached_spdx_info
-def write_cached_spdx( sstatefile, ver_code, files ):
+def write_cached_spdx(sstatefile, ver_code, package_info, files, license_info):
import json
+ import codecs
spdx_doc = {}
spdx_doc['PackageVerificationCode'] = ver_code
spdx_doc['Files'] = {}
spdx_doc['Files'] = files
- with open( sstatefile, 'w' ) as f:
+ spdx_doc['Package'] = {}
+ spdx_doc['Package'] = package_info
+ spdx_doc['Licenses'] = {}
+ spdx_doc['Licenses'] = license_info
+ with codecs.open(sstatefile, mode='w', encoding='utf-8') as f:
f.write(json.dumps(spdx_doc))
-def setup_foss_scan( info, cache, cached_files ):
+def setup_foss_scan(info, cache, cached_files):
import errno, shutil
import tarfile
file_info = {}
cache_dict = {}
- for f_dir, f in list_files( info['sourcedir'] ):
- full_path = os.path.join( f_dir, f )
+ for f_dir, f in list_files(info['sourcedir']):
+ full_path = os.path.join(f_dir, f)
abs_path = os.path.join(info['sourcedir'], full_path)
- dest_dir = os.path.join( info['spdx_temp_dir'], f_dir )
- dest_path = os.path.join( info['spdx_temp_dir'], full_path )
- try:
- stats = os.stat(abs_path)
- except OSError as e:
- bb.warn( "Stat failed" + str(e) + "\n")
- continue
-
- checksum = hash_file( abs_path )
- mtime = time.asctime(time.localtime(stats.st_mtime))
-
- ## retain cache information if it exists
- file_info[checksum] = {}
- if cache and checksum in cached_files:
- file_info[checksum] = cached_files[checksum]
- else:
- file_info[checksum]['FileName'] = full_path
-
- try:
- os.makedirs( dest_dir )
- except OSError as e:
- if e.errno == errno.EEXIST and os.path.isdir(dest_dir):
- pass
+ dest_dir = os.path.join(info['spdx_temp_dir'], f_dir)
+ dest_path = os.path.join(info['spdx_temp_dir'], full_path)
+
+ checksum = hash_file(abs_path)
+ if not checksum is None:
+ file_info[checksum] = {}
+ ## retain cache information if it exists
+ if cache and checksum in cached_files:
+ file_info[checksum] = cached_files[checksum]
+ ## have the file included in what's sent to the FOSSology server
else:
- bb.warn( "mkdir failed " + str(e) + "\n" )
- continue
-
- if(cache and checksum not in cached_files) or not cache:
- try:
- shutil.copyfile( abs_path, dest_path )
- except shutil.Error as e:
- bb.warn( str(e) + "\n" )
- except IOError as e:
- bb.warn( str(e) + "\n" )
+ file_info[checksum]['FileName'] = full_path
+ try:
+ bb.utils.mkdirhier(dest_dir)
+ shutil.copyfile(abs_path, dest_path)
+ except OSError as e:
+ bb.warn("SPDX: mkdirhier failed: " + str(e))
+ except shutil.Error as e:
+ bb.warn("SPDX: copyfile failed: " + str(e))
+ except IOError as e:
+ bb.warn("SPDX: copyfile failed: " + str(e))
+ else:
+ bb.warn("SPDX: Could not get checksum for file: " + f)
- with tarfile.open( info['tar_file'], "w:gz" ) as tar:
- tar.add( info['spdx_temp_dir'], arcname=os.path.basename(info['spdx_temp_dir']) )
- tar.close()
+ with tarfile.open(info['tar_file'], "w:gz") as tar:
+ tar.add(info['spdx_temp_dir'], arcname=os.path.basename(info['spdx_temp_dir']))
return file_info
-
-def remove_dir_tree( dir_name ):
- import shutil
+def remove_file(file_name):
try:
- shutil.rmtree( dir_name )
- except:
- pass
-
-def remove_file( file_name ):
- try:
- os.remove( file_name )
+ os.remove(file_name)
except OSError as e:
pass
-def list_files( dir ):
- for root, subFolders, files in os.walk( dir ):
+def list_files(dir):
+ for root, subFolders, files in os.walk(dir):
for f in files:
- rel_root = os.path.relpath( root, dir )
+ rel_root = os.path.relpath(root, dir)
yield rel_root, f
return
-def hash_file( file_name ):
+def hash_file(file_name):
try:
- f = open( file_name, 'rb' )
- data_string = f.read()
+ with open(file_name, 'rb') as f:
+ data_string = f.read()
+ sha1 = hash_string(data_string)
+ return sha1
except:
- return None
- finally:
- f.close()
- sha1 = hash_string( data_string )
- return sha1
+ return None
-def hash_string( data ):
+def hash_string(data):
import hashlib
sha1 = hashlib.sha1()
- sha1.update( data )
+ sha1.update(data)
return sha1.hexdigest()
-def run_fossology( foss_command ):
+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()
-
- records = []
- records = re.findall('FileName:.*?</text>', foss_output, re.S)
+ if p.returncode != 0:
+ return None
+
+ foss_output = unicode(foss_output, "utf-8")
+ foss_output = string.replace(foss_output, '\r', '')
+
+ # Package info
+ package_info = {}
+ if full_spdx:
+ # All mandatory, only one occurance
+ package_info['PackageCopyrightText'] = re.findall('PackageCopyrightText: (.*?</text>)', foss_output, re.S)[0]
+ package_info['PackageLicenseDeclared'] = re.findall('PackageLicenseDeclared: (.*)', foss_output)[0]
+ package_info['PackageLicenseConcluded'] = re.findall('PackageLicenseConcluded: (.*)', foss_output)[0]
+ # These may be more than one
+ package_info['PackageLicenseInfoFromFiles'] = re.findall('PackageLicenseInfoFromFiles: (.*)', foss_output)
+ else:
+ DEFAULT = "NOASSERTION"
+ package_info['PackageCopyrightText'] = "<text>" + DEFAULT + "</text>"
+ package_info['PackageLicenseDeclared'] = DEFAULT
+ package_info['PackageLicenseConcluded'] = DEFAULT
+ package_info['PackageLicenseInfoFromFiles'] = []
+ # File info
file_info = {}
+ records = []
+ # FileName is also in PackageFileName, so we match on FileType as well.
+ records = re.findall('FileName:.*?FileType:.*?</text>', foss_output, re.S)
for rec in records:
- rec = string.replace( rec, '\r', '' )
- chksum = re.findall( 'FileChecksum: SHA1: (.*)\n', rec)[0]
+ chksum = re.findall('FileChecksum: SHA1: (.*)\n', rec)[0]
file_info[chksum] = {}
- file_info[chksum]['FileCopyrightText'] = re.findall( 'FileCopyrightText: '
+ file_info[chksum]['FileCopyrightText'] = re.findall('FileCopyrightText: '
+ '(.*?</text>)', rec, re.S )[0]
- fields = ['FileType','LicenseConcluded',
- 'LicenseInfoInFile','FileName']
+ fields = ['FileName', 'FileType', 'LicenseConcluded', 'LicenseInfoInFile']
for field in fields:
file_info[chksum][field] = re.findall(field + ': (.*)', rec)[0]
- return file_info
+ # Licenses
+ license_info = {}
+ licenses = []
+ licenses = re.findall('LicenseID:.*?LicenseName:.*?\n', foss_output, re.S)
+ for lic in licenses:
+ license_id = re.findall('LicenseID: (.*)\n', lic)[0]
+ license_info[license_id] = {}
+ license_info[license_id]['ExtractedText'] = re.findall('ExtractedText: (.*?</text>)', lic, re.S)[0]
+ license_info[license_id]['LicenseName'] = re.findall('LicenseName: (.*)', lic)[0]
+
+ return (package_info, file_info, license_info)
-def create_spdx_doc( file_info, scanned_files ):
+def create_spdx_doc(file_info, scanned_files):
import json
## push foss changes back into cache
for chksum, lic_info in scanned_files.iteritems():
if chksum in file_info:
- file_info[chksum]['FileName'] = file_info[chksum]['FileName']
file_info[chksum]['FileType'] = lic_info['FileType']
file_info[chksum]['FileChecksum: SHA1'] = chksum
file_info[chksum]['LicenseInfoInFile'] = lic_info['LicenseInfoInFile']
file_info[chksum]['LicenseConcluded'] = lic_info['LicenseConcluded']
file_info[chksum]['FileCopyrightText'] = lic_info['FileCopyrightText']
else:
- bb.warn(lic_info['FileName'] + " : " + chksum
+ bb.warn("SPDX: " + lic_info['FileName'] + " : " + chksum
+ " : is not in the local file info: "
- + json.dumps(lic_info,indent=1))
+ + json.dumps(lic_info, indent=1))
return file_info
-def get_ver_code( dirname ):
+def get_ver_code(dirname):
chksums = []
- for f_dir, f in list_files( dirname ):
- try:
- stats = os.stat(os.path.join(dirname,f_dir,f))
- except OSError as e:
- bb.warn( "Stat failed" + str(e) + "\n")
- continue
- chksums.append(hash_file(os.path.join(dirname,f_dir,f)))
- ver_code_string = ''.join( chksums ).lower()
- ver_code = hash_string( ver_code_string )
+ for f_dir, f in list_files(dirname):
+ hash = hash_file(os.path.join(dirname, f_dir, f))
+ if not hash is None:
+ chksums.append(hash)
+ else:
+ bb.warn("SPDX: Could not hash file: " + path)
+ ver_code_string = ''.join(chksums).lower()
+ ver_code = hash_string(ver_code_string)
return ver_code
-def get_header_info( info, spdx_verification_code, spdx_files ):
+def get_header_info(info, spdx_verification_code, package_info):
"""
Put together the header SPDX information.
Eventually this needs to become a lot less
@@ -271,14 +310,12 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head = []
DEFAULT = "NOASSERTION"
- #spdx_verification_code = get_ver_code( info['sourcedir'] )
- package_checksum = ''
- if os.path.exists(info['tar_file']):
- package_checksum = hash_file( info['tar_file'] )
- else:
+ package_checksum = hash_file(info['tar_file'])
+ if package_checksum is None:
package_checksum = DEFAULT
## document level information
+ head.append("## SPDX Document Information")
head.append("SPDXVersion: " + info['spdx_version'])
head.append("DataLicense: " + info['data_license'])
head.append("DocumentComment: <text>SPDX for "
@@ -286,9 +323,11 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head.append("")
## Creator information
- now = datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
+ ## Note that this does not give time in UTC.
+ now = datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ')
head.append("## Creation Information")
- head.append("Creator: fossology-spdx")
+ ## Tools are supposed to have a version, but FOSSology+SPDX provides none.
+ head.append("Creator: Tool: FOSSology+SPDX")
head.append("Created: " + now)
head.append("CreatorComment: <text>UNO</text>")
head.append("")
@@ -297,21 +336,26 @@ def get_header_info( info, spdx_verification_code, spdx_files ):
head.append("## Package Information")
head.append("PackageName: " + info['pn'])
head.append("PackageVersion: " + info['pv'])
- head.append("PackageDownloadLocation: " + DEFAULT)
- head.append("PackageSummary: <text></text>")
head.append("PackageFileName: " + os.path.basename(info['tar_file']))
head.append("PackageSupplier: Person:" + DEFAULT)
+ head.append("PackageDownloadLocation: " + DEFAULT)
+ head.append("PackageSummary: <text></text>")
head.append("PackageOriginator: Person:" + DEFAULT)
head.append("PackageChecksum: SHA1: " + package_checksum)
head.append("PackageVerificationCode: " + spdx_verification_code)
head.append("PackageDescription: <text>" + info['pn']
+ " version " + info['pv'] + "</text>")
head.append("")
- head.append("PackageCopyrightText: <text>" + DEFAULT + "</text>")
+ head.append("PackageCopyrightText: "
+ + package_info['PackageCopyrightText'])
head.append("")
- head.append("PackageLicenseDeclared: " + DEFAULT)
- head.append("PackageLicenseConcluded: " + DEFAULT)
- head.append("PackageLicenseInfoFromFiles: " + DEFAULT)
+ head.append("PackageLicenseDeclared: "
+ + package_info['PackageLicenseDeclared'])
+ head.append("PackageLicenseConcluded: "
+ + package_info['PackageLicenseConcluded'])
+
+ for licref in package_info['PackageLicenseInfoFromFiles']:
+ head.append("PackageLicenseInfoFromFiles: " + licref)
head.append("")
## header for file level
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 90119732dd..ace6bdb57a 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -21,7 +21,8 @@ SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC
# of the system, we let the sstate paths take care of this.
SSTATE_EXTRAPATH[vardepvalue] = ""
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/"
+# 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/"
# Avoid docbook/sgml catalog warnings for now
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
@@ -32,24 +33,34 @@ BB_HASHFILENAME = "${SSTATE_EXTRAPATH} ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
-SSTATEPREINSTFUNCS ?= ""
-SSTATEPOSTINSTFUNCS ?= ""
+SSTATECREATEFUNCS = "sstate_hardcode_path"
+SSTATEPOSTCREATEFUNCS = ""
+SSTATEPREINSTFUNCS = ""
+SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
+SSTATEPOSTINSTFUNCS = ""
EXTRA_STAGING_FIXMES ?= ""
+SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
+
# Specify dirs in which the shell function is executed and don't use ${B}
# as default dirs to avoid possible race about ${B} with other task.
sstate_create_package[dirs] = "${SSTATE_BUILDDIR}"
sstate_unpack_package[dirs] = "${SSTATE_INSTDIR}"
+# Do not run sstate_hardcode_path() in ${B}:
+# the ${B} maybe removed by cmake_do_configure() while
+# sstate_hardcode_path() running.
+sstate_hardcode_path[dirs] = "${SSTATE_BUILDDIR}"
+
python () {
if bb.data.inherits_class('native', d):
d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))
elif bb.data.inherits_class('crosssdk', d):
- d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}"))
+ d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross', d):
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${TARGET_ARCH}"))
elif bb.data.inherits_class('nativesdk', d):
- d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}"))
+ 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":
@@ -182,7 +193,29 @@ def sstate_install(ss, d):
if search_output != "":
match.append("Matched in %s" % search_output.rstrip())
if match:
- bb.warn("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 package should provide the above files." % (d.getVar('PN', True), "\n ".join(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 " \
+ "several months later). If the system knew how to recover from this " \
+ "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 " \
+ "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 " \
+ "also be your build is including two different conflicting versions of " \
+ "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)))
+ 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.")
# Write out the manifest
f = open(manifest, "w")
@@ -239,16 +272,32 @@ def sstate_installpkg(ss, d):
d.setVar('SSTATE_INSTDIR', sstateinst)
d.setVar('SSTATE_PKG', sstatepkg)
- for preinst in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split():
- bb.build.exec_func(preinst, d)
+ for f in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split() + ['sstate_unpack_package'] + (d.getVar('SSTATEPOSTUNPACKFUNCS', True) or '').split():
+ bb.build.exec_func(f, d)
- bb.build.exec_func('sstate_unpack_package', d)
+ 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)
+ src = sstateinst + "/" + plain.replace(workdir, '')
+ dest = plain
+ bb.utils.mkdirhier(src)
+ prepdir(dest)
+ os.rename(src, dest)
+
+ return True
+
+python sstate_hardcode_path_unpack () {
# Fixup hardcoded paths
#
# Note: The logic below must match the reverse logic in
# sstate_hardcode_path(d)
+ import subprocess
+ sstateinst = d.getVar('SSTATE_INSTDIR', True)
fixmefn = sstateinst + "fixmepath"
if os.path.isfile(fixmefn):
staging = d.getVar('STAGING_DIR', True)
@@ -276,21 +325,7 @@ def sstate_installpkg(ss, d):
# Need to remove this or we'd copy it into the target directory and may
# conflict with another writer
os.remove(fixmefn)
-
- 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)
- src = sstateinst + "/" + plain.replace(workdir, '')
- dest = plain
- bb.utils.mkdirhier(src)
- prepdir(dest)
- os.rename(src, dest)
-
- return True
+}
def sstate_clean_cachefile(ss, d):
import oe.path
@@ -395,7 +430,7 @@ python sstate_cleanall() {
sstate_clean(shared_state, ld)
}
-def sstate_hardcode_path(d):
+python sstate_hardcode_path () {
import subprocess, platform
# Need to remove hardcoded paths and fix these when we install the
@@ -413,7 +448,7 @@ def sstate_hardcode_path(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|%s)'" % (staging_target, staging)
+ 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_grep_cmd = "grep -l -e '%s'" % (staging_host)
@@ -449,6 +484,7 @@ def sstate_hardcode_path(d):
else:
bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
subprocess.call(sstate_filelist_relative_cmd, shell=True)
+}
def sstate_package(ss, d):
import oe.path
@@ -506,9 +542,11 @@ def sstate_package(ss, d):
d.setVar('SSTATE_BUILDDIR', sstatebuild)
d.setVar('SSTATE_PKG', sstatepkg)
- sstate_hardcode_path(d)
- bb.build.exec_func('sstate_create_package', d)
-
+
+ for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + ['sstate_create_package'] + \
+ (d.getVar('SSTATEPOSTCREATEFUNCS', True) or '').split():
+ bb.build.exec_func(f, d)
+
bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
return
@@ -591,7 +629,8 @@ sstate_create_package () {
if [ "$(ls -A)" ]; then
set +e
tar -czf $TFILE *
- if [ $? -ne 0 ] && [ $? -ne 1 ]; then
+ ret=$?
+ if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then
exit 1
fi
set -e
@@ -612,6 +651,8 @@ sstate_unpack_package () {
mkdir -p ${SSTATE_INSTDIR}
cd ${SSTATE_INSTDIR}
tar -xmvzf ${SSTATE_PKG}
+ # Use "! -w ||" to return true for read only files
+ [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
}
BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
@@ -704,6 +745,9 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
evdata['found'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )
bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d)
+ if hasattr(bb.parse.siggen, "checkhashes"):
+ bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)
+
return ret
BB_SETSCENE_DEPVALID = "setscene_depvalid"
@@ -733,15 +777,15 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
if dep in notneeded:
continue
# 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']:
+ 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']:
+ 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
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']:
+ 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']:
continue
# Consider sysroot depending on sysroot tasks
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 7c43e7618d..57b2743196 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -106,6 +106,7 @@ python do_populate_sysroot () {
}
do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}"
+do_populate_sysroot[vardepsexclude] += "MULTI_PROVIDER_WHITELIST"
SSTATETASKS += "do_populate_sysroot"
do_populate_sysroot[cleandirs] = "${SYSROOT_DESTDIR}"
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index b9701bf237..d6498d98bb 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -5,7 +5,7 @@
# Provide syslinux specific functions for building bootable images.
# External variables
-# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
+# ${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)
# ${AUTO_SYSLINUXMENU} - set this to 1 to enable creating an automatic menu
# ${LABELS} - a list of targets for the automatic config
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index a6ad723dfd..c34884bd38 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -55,6 +55,8 @@ fi
systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
+systemd_populate_packages[vardepsexclude] += "OVERRIDES"
+
python systemd_populate_packages() {
if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
@@ -141,10 +143,7 @@ python systemd_populate_packages() {
if has_exactly_one_service:
has_exactly_one_service = len(get_package_var(d, 'SYSTEMD_SERVICE', systemd_packages).split()) == 1
- keys = 'Also' # Conflicts??
- if has_exactly_one_service:
- # single service gets also the /dev/null dummies
- keys = 'Also Conflicts'
+ keys = 'Also'
# scan for all in SYSTEMD_SERVICE[]
for pkg_systemd in systemd_packages.split():
for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split():
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 285c6a9d42..683173854d 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -19,7 +19,7 @@
# Note that order in TEST_SUITES is important (it's the order tests run) and it influences tests dependencies.
# A layer can add its own tests in lib/oeqa/runtime, provided it extends BBPATH as normal in its layer.conf.
-# TEST_LOG_DIR contains a ssh log (what command is running, output and return codes) and a qemu boot log till login
+# 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.
@@ -30,8 +30,9 @@ TEST_EXPORT_ONLY ?= "0"
DEFAULT_TEST_SUITES = "ping auto"
DEFAULT_TEST_SUITES_pn-core-image-minimal = "ping"
-DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg python"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart kernelmodule dmesg python"
+DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg python parselogs"
+DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart kernelmodule dmesg python parselogs"
+DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
@@ -53,8 +54,15 @@ do_testimage[nostamp] = "1"
do_testimage[depends] += "${TESTIMAGEDEPENDS}"
do_testimage[lockfiles] += "${TESTIMAGELOCK}"
+python do_testsdk() {
+ testsdk_main(d)
+}
+addtask testsdk
+do_testsdk[nostamp] = "1"
+do_testsdk[depends] += "${TESTIMAGEDEPENDS}"
+do_testsdk[lockfiles] += "${TESTIMAGELOCK}"
-def get_tests_list(d):
+def get_tests_list(d, type="runtime"):
testsuites = d.getVar("TEST_SUITES", True).split()
bbpath = d.getVar("BBPATH", True).split(':')
@@ -65,12 +73,12 @@ def get_tests_list(d):
if testname != "auto":
found = False
for p in bbpath:
- if os.path.exists(os.path.join(p, 'lib', 'oeqa', 'runtime', testname + '.py')):
- testslist.append("oeqa.runtime." + testname)
+ if os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname + '.py')):
+ testslist.append("oeqa." + type + "." + testname)
found = True
break
if not found:
- bb.error('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
+ bb.fatal('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
if "auto" in testsuites:
def add_auto_list(path):
@@ -78,12 +86,12 @@ def get_tests_list(d):
bb.fatal('Tests 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('_')])
for f in files:
- module = 'oeqa.runtime.' + f[:-3]
+ module = 'oeqa.' + type + '.' + f[:-3]
if module not in testslist:
testslist.append(module)
for p in bbpath:
- testpath = os.path.join(p, 'lib', 'oeqa', 'runtime')
+ testpath = os.path.join(p, 'lib', 'oeqa', type)
bb.debug(2, 'Searching for tests in %s' % testpath)
if os.path.exists(testpath):
add_auto_list(testpath)
@@ -230,3 +238,86 @@ def testimage_main(d):
target.stop()
testimage_main[vardepsexclude] =+ "BB_ORIGENV"
+
+
+def testsdk_main(d):
+ import unittest
+ import os
+ import glob
+ import oeqa.runtime
+ import oeqa.sdk
+ import time
+ import subprocess
+ from oeqa.oetest import loadTests, runTests
+
+ pn = d.getVar("PN", True)
+ bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+
+ # tests in TEST_SUITES become required tests
+ # they won't be skipped even if they aren't suitable.
+ # testslist is what we'll actually pass to the unittest loader
+ testslist = get_tests_list(d, "sdk")
+ testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"]
+
+ sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
+ bb.utils.remove(sdktestdir, True)
+ bb.utils.mkdirhier(sdktestdir)
+
+ 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 meta-toolchain' .")
+ subprocess.call("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
+
+ targets = glob.glob(d.expand(sdktestdir + "/tc/sysroots/*${TARGET_VENDOR}-linux*"))
+ if len(targets) > 1:
+ bb.fatal("Error, multiple targets within the SDK found and we don't know which to test? %s" % str(targets))
+ sdkenv = sdktestdir + "/tc/environment-setup-" + os.path.basename(targets[0])
+
+ class TestContext(object):
+ def __init__(self):
+ self.d = d
+ self.testslist = testslist
+ self.testsrequired = testsrequired
+ self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files")
+ self.sdktestdir = sdktestdir
+ self.sdkenv = sdkenv
+ self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
+ self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
+ manifest = os.path.join(d.getVar("SDK_MANIFEST", True))
+ try:
+ with open(manifest) as f:
+ self.pkgmanifest = f.read()
+ except IOError as e:
+ bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
+
+ # test context
+ tc = TestContext()
+
+ # this is a dummy load of tests
+ # we are doing that to find compile errors in the tests themselves
+ # before booting the image
+ try:
+ loadTests(tc, "sdk")
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ try:
+ starttime = time.time()
+ result = runTests(tc, "sdk")
+ 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)
+ else:
+ raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
+ finally:
+ pass
+ bb.utils.remove(sdktestdir, True)
+
+testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
+
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 95499a5cdd..55d0d28157 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -71,7 +71,7 @@ python toaster_layerinfo_dumpdata() {
layer_url = 'http://layers.openembedded.org/layerindex/layer/{layer}/'
layer_url_name = _get_url_map_name(layer_name)
- layer_info['name'] = layer_name
+ layer_info['name'] = layer_url_name
layer_info['local_path'] = layer_path
layer_info['layer_index_url'] = layer_url.format(layer=layer_url_name)
layer_info['version'] = _get_layer_version_information(layer_path)
@@ -149,14 +149,26 @@ python toaster_image_dumpdata() {
image_name = d.getVar('IMAGE_NAME', True);
image_info_data = {}
+ artifact_info_data = {}
+ # collect all artifacts
for dirpath, dirnames, filenames in os.walk(deploy_dir_image):
for fn in filenames:
- if fn.startswith(image_name):
- image_output = os.path.join(dirpath, fn)
- image_info_data[image_output] = os.stat(image_output).st_size
+ try:
+ if fn.startswith(image_name):
+ image_output = os.path.join(dirpath, fn)
+ image_info_data[image_output] = os.stat(image_output).st_size
+ else:
+ import stat
+ artifact_path = os.path.join(dirpath, fn)
+ filestat = os.stat(artifact_path)
+ if stat.S_ISREG(filestat.st_mode):
+ artifact_info_data[artifact_path] = filestat.st_size
+ except OSError as e:
+ bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
bb.event.fire(bb.event.MetadataEvent("ImageFileSize",image_info_data), d)
+ bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d)
}
@@ -187,8 +199,10 @@ python toaster_collect_task_stats() {
def _read_stats(filename):
cpu_usage = 0
disk_io = 0
- startio = ''
- endio = ''
+ startio = '0'
+ endio = '0'
+ started = '0'
+ ended = '0'
pn = ''
taskname = ''
statinfo = {}
@@ -198,20 +212,28 @@ python toaster_collect_task_stats() {
k,v = line.strip().split(": ", 1)
statinfo[k] = v
- try:
- cpu_usage = statinfo["CPU usage"]
- endio = statinfo["EndTimeIO"]
- startio = statinfo["StartTimeIO"]
- except KeyError:
- pass # we may have incomplete data here
+ if "CPU usage" in statinfo:
+ cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
+
+ if "EndTimeIO" in statinfo:
+ endio = str(statinfo["EndTimeIO"]).strip('% \n\r')
+
+ if "StartTimeIO" in statinfo:
+ startio = str(statinfo["StartTimeIO"]).strip('% \n\r')
+
+ if "Started" in statinfo:
+ started = str(statinfo["Started"]).strip('% \n\r')
+
+ if "Ended" in statinfo:
+ ended = str(statinfo["Ended"]).strip('% \n\r')
+
+ disk_io = int(endio) - int(startio)
- if startio and endio:
- disk_io = int(endio.strip('\n ')) - int(startio.strip('\n '))
+ elapsed_time = float(ended) - float(started)
- if cpu_usage:
- cpu_usage = float(cpu_usage.strip('% \n'))
+ cpu_usage = float(cpu_usage)
- return {'cpu_usage': cpu_usage, 'disk_io': disk_io}
+ return {'cpu_usage': cpu_usage, 'disk_io': disk_io, 'elapsed_time': elapsed_time}
if isinstance(e, (bb.build.TaskSucceeded, bb.build.TaskFailed)):
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 413effecfa..9836db4a4c 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -16,9 +16,10 @@ toolchain_create_sdk_env_script () {
echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
EXTRAPATH=""
for i in ${CANADIANEXTRAOS}; do
- EXTRAPATH="$EXTRAPATH:"`echo ${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS} | sed -e 's,${TARGET_PREFIX},${TARGET_PREFIX}$i,g'`
+ EXTRAPATH="$EXTRAPATH:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$PATH' >> $script
+ echo 'export CCACHE_PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}'$EXTRAPATH':$CCACHE_PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
@@ -37,6 +38,7 @@ toolchain_create_tree_env_script () {
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 '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
@@ -68,15 +70,31 @@ toolchain_shared_env_script () {
echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
+ echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
+
+ cat >> $script <<EOF
+
+# Append environment subscripts
+if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+EOF
}
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
-TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
+TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE = "${TCLIBC} ncurses"
#This function create a site config file
@@ -116,5 +134,7 @@ python __anonymous () {
deps = ""
for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
deps += " %s:do_populate_sysroot" % dep
+ for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
+ deps += " %s-%s:do_populate_sysroot" % (variant, dep)
d.appendVarFlag('do_configure', 'depends', deps)
}
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 8ac1b71bc2..b467659cbb 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -38,9 +38,6 @@ python () {
ubootconfig = ubootconfig[0]
for f, v in ubootconfigflags.items():
- if f == 'defaultval':
- continue
-
items = v.split(',')
if items[0] and len(items) > 2:
raise bb.parse.SkipPackage('Only config,images can be specified!')
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
new file mode 100644
index 0000000000..51391dbc4a
--- /dev/null
+++ b/meta/classes/uninative.bbclass
@@ -0,0 +1,44 @@
+NATIVELSBSTRING = "universal"
+
+UNINATIVE_LOADER = "${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2"
+
+addhandler uninative_eventhandler
+uninative_eventhandler[eventmask] = "bb.event.BuildStarted"
+
+python uninative_eventhandler() {
+ loader = e.data.getVar("UNINATIVE_LOADER", True)
+ if not os.path.exists(loader):
+ import subprocess
+ cmd = e.data.expand("mkdir -p ${STAGING_DIR}; cd ${STAGING_DIR}; tar -xjf ${COREBASE}/${BUILD_ARCH}-nativesdk-libc.tar.bz2; ${STAGING_DIR}/relocate_sdk.py ${STAGING_DIR_NATIVE} ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_BINDIR_NATIVE}/patchelf-uninative")
+ #bb.warn("nativesdk lib extraction: " + cmd)
+ subprocess.check_call(cmd, shell=True)
+}
+
+SSTATEPOSTUNPACKFUNCS_append = " uninative_changeinterp"
+
+python uninative_changeinterp () {
+ import subprocess
+ import stat
+ import oe.qa
+
+ 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)
+ for walkroot, dirs, files in os.walk(sstateinst):
+ for file in files:
+ f = os.path.join(walkroot, file)
+ if os.path.islink(f):
+ continue
+ s = os.stat(f)
+ if not ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH)):
+ continue
+ elf = oe.qa.ELFFile(f)
+ try:
+ elf.open()
+ except:
+ continue
+
+ #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
+ subprocess.call("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f), shell=True)
+}
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 19b081d235..bc1aa7dad6 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -72,6 +72,7 @@ PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd "
PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
+populate_packages_updatercd[vardepsexclude] += "OVERRIDES"
python populate_packages_updatercd () {
def update_rcd_auto_depend(pkg):
@@ -121,7 +122,7 @@ python populate_packages_updatercd () {
# Check that this class isn't being inhibited (generally, by
# systemd.bbclass) before doing any work.
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
+ if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass
index a89cb10a4a..421a70a6ab 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -58,7 +58,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
except:
@@ -194,7 +196,9 @@ def update_useradd_static_config(d):
newparams = []
for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
- param=param.strip()
+ param = param.strip()
+ if not param:
+ continue
try:
# If we're processing multiple lines, we could have left over values here...
gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index ea15dabb84..0b9a843b24 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -24,6 +24,8 @@ if test "x$D" != "x"; then
# Installing into a sysroot
SYSROOT="$D"
OPT="--root $D"
+ # user/group lookups should match useradd/groupadd --root
+ export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}"
fi
# If we're not doing a special SSTATE/SYSROOT install
@@ -126,7 +128,7 @@ SYSROOTPOSTFUNC_class-cross = ""
SYSROOTPOSTFUNC_class-native = ""
SYSROOTPOSTFUNC_class-nativesdk = ""
-USERADDSETSCENEDEPS = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
+USERADDSETSCENEDEPS = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
USERADDSETSCENEDEPS_class-cross = ""
USERADDSETSCENEDEPS_class-native = ""
USERADDSETSCENEDEPS_class-nativesdk = ""
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 0ee13e04d7..0f2a484091 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -312,6 +312,8 @@ def explode_deps(s):
def base_set_filespath(path, d):
filespath = []
extrapaths = (d.getVar("FILESEXTRAPATHS", True) 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
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf
index e8cf9a3127..2867850688 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 = "9"
+OELAYOUT_ABI = "10"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 311e9a04c4..b5b54b7819 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -133,7 +133,7 @@ SDK_LD_ARCH = "${BUILD_LD_ARCH}"
SDK_AS_ARCH = "${BUILD_AS_ARCH}"
TUNE_PKGARCH ??= ""
-PACKAGE_ARCH = "${TUNE_PKGARCH}"
+PACKAGE_ARCH ??= "${TUNE_PKGARCH}"
MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}"
PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
@@ -169,7 +169,8 @@ ASSUME_PROVIDED = "\
python-native-runtime \
tar-native \
virtual/libintl-native \
- texinfo-native\
+ texinfo-native \
+ bash-native \
"
# gzip-native should be listed above?
@@ -311,6 +312,8 @@ FILES_${PN}-locale = "${datadir}/locale"
FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}"
# FILESPATH is set in base.bbclass
#FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+# This default was only used for checking
+FILESEXTRAPATHS ?= "__default:"
##################################################################
# General work and output directories for the build system.
@@ -391,8 +394,9 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
# Kernel info.
##################################################################
-OLDEST_KERNEL = "2.6.16"
-STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/usr/src/kernel"
+OLDEST_KERNEL = "2.6.32"
+STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
+STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
##################################################################
# Specific image creation and rootfs population info.
@@ -456,7 +460,7 @@ PYTHON = "${@sys.executable}"
export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
-export BUILD_CPP = "${BUILD_PREFIX}cpp ${BUILD_CC_ARCH}"
+export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
export BUILD_AR = "${BUILD_PREFIX}ar"
@@ -516,6 +520,8 @@ 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']}"
export LDFLAGS = "${TARGET_LDFLAGS}"
@@ -583,7 +589,7 @@ SRC_URI = ""
# Use pseudo as the fakeroot implementation
PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
-PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}"
+PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
export PSEUDO_DISABLED = "1"
#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
#export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
@@ -599,9 +605,6 @@ PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
# Miscellaneous utilities.
##################################################################
-MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
-MKTEMPCMD = "mktemp -q ${TMPBASE}"
-
# GNU patch tries to be intellgent about checking out read-only files from
# a RCS, which freaks out those special folks with active Perforce clients
# the following makes patch ignore RCS:
@@ -627,9 +630,6 @@ export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
-# library package naming
-AUTO_LIBNAME_PKGS = "${PACKAGES}"
-
###
### Config file processing
###
@@ -688,12 +688,22 @@ IMAGE_FSTYPES ?= "tar.gz"
INITRAMFS_FSTYPES ?= "cpio.gz"
DEFAULT_TASK_PROVIDER ?= "packagegroup-base"
MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
-IMAGE_ROOTFS_SIZE ?= "65536"
+
+# The size in Kbytes for the generated image if it is larger than
+# the required size (du -ks IMAGE_ROOTFS * IMAGE_OVERHEAD_FACTOR),
+# and no effect if less than it.
+IMAGE_ROOTFS_SIZE ??= "65536"
# Forcefully set CACHE now so future changes to things like
# MACHINE don't change the path to the cache
CACHE := "${CACHE}"
+# Default to setting automatically based on cpu count
+BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+
+# Default to setting automatically based on cpu count
+PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+
##################################################################
# Magic Cookie for SANITY CHECK
##################################################################
@@ -764,11 +774,11 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
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 \
- WARN_QA ERROR_QA WORKDIR STAMPCLEAN"
+ WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR"
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"
-BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends \
+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 \
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 4437267ff3..71c65b1462 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -6,7 +6,7 @@ include conf/distro/include/world-broken.inc
TCMODE ?= "default"
require conf/distro/include/tcmode-${TCMODE}.inc
-TCLIBC ?= "eglibc"
+TCLIBC ?= "glibc"
require conf/distro/include/tclibc-${TCLIBC}.inc
# Allow single libc distros to disable this code
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 1bc8e46b8a..04037c3399 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -23,9 +23,9 @@ IMAGE_FEATURES ?= ""
# This is a list of packages that are used by the build system to build the distribution, they are not
# directly part of the distribution.
-HOSTTOOLS_WHITELIST_GPLv3 ?= ""
-WHITELIST_GPLv3 ?= "less"
-LGPLv2_WHITELIST_GPLv3 ?= "libassuan gnutls libtasn1 libidn libgcc libgcc-initial gcc-runtime"
+HOSTTOOLS_WHITELIST_GPL-3.0 ?= ""
+WHITELIST_GPL-3.0 ?= "less"
+LGPLv2_WHITELIST_GPL-3.0 ?= "libassuan gnutls libtasn1 libidn gcc-source libgcc libgcc-initial gcc-runtime"
COMMERCIAL_AUDIO_PLUGINS ?= ""
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index a1167fdfbf..4dc42a7add 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -21,6 +21,7 @@ PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"
VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg"
VIRTUAL-RUNTIME_apm ?= "apm"
VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
+VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
#
# Default recipe providers
@@ -43,5 +44,7 @@ PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','sy
# There are issues with runtime packages and PREFERRED_PROVIDER, see YOCTO #5044 for details
# on this rather strange entry.
PREFERRED_PROVIDER_bluez4 ?= "bluez4"
+PREFERRED_PROVIDER_bluez-hcidump ?= "bluez-hcidump"
# 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"
diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc
index a9a931d772..6e92aa5499 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -10,5 +10,6 @@ PREFERRED_VERSION_python-native ?= "2.7.3"
# Force the older version of liberation-fonts until we fix the fontforge issue
PREFERRED_VERSION_liberation-fonts ?= "1.04"
-# Intel video stack 2013Q3 and newer need a version >=2.99.902
-PREFERRED_VERSION_xf86-video-intel ?= "2.99.910"
+# 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/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index fa604fd5a4..16a5748680 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -16,18 +16,21 @@ 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-blktrace = "${SECURITY_NO_PIE_CFLAGS}"
# Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assigned
# to CPPFLAGS it gets picked into CFLAGS in bitbake.
#TARGET_CPPFLAGS_pn-curl += "-D_FORTIFY_SOURCE=2"
-SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CLAGS}"
+SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-curl = "-fstack-protector-all -pie -fpie"
SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-directfb = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-eglibc = ""
-SECURITY_CFLAGS_pn-eglibc-initial = ""
+SECURITY_CFLAGS_pn-glibc = ""
+SECURITY_CFLAGS_pn-glibc-initial = ""
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-runtime = "${SECURITY_NO_PIE_CFLAGS}"
+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}"
@@ -43,6 +46,7 @@ SECURITY_CFLAGS_pn-gst-plugins-gl = "${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-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}"
@@ -51,6 +55,7 @@ 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-ltp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-lttng-ust = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa-gl = "${SECURITY_NO_PIE_CFLAGS}"
diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
deleted file mode 100644
index 15f5ee5a30..0000000000
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# eglibc specific configuration
-#
-
-LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
-
-# Add glibc overrides to the overrides for eglibc.
-LIBCOVERRIDE = ":libc-glibc"
-OVERRIDES .= "${LIBCOVERRIDE}"
-
-PREFERRED_PROVIDER_virtual/libiconv ?= "eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/libintl ?= "eglibc"
-PREFERRED_PROVIDER_virtual/libc ?= "eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libc ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/libc-locale ?= "eglibc-locale"
-
-CXXFLAGS += "-fvisibility-inlines-hidden"
-
-LIBC_DEPENDENCIES = "libsegfault \
- eglibc \
- eglibc-dbg \
- eglibc-dev \
- eglibc-utils \
- eglibc-thread-db \
- ${@get_libc_locales_dependencies(d)}"
-
-LIBC_LOCALE_DEPENDENCIES = "\
- eglibc-localedata-i18n \
- eglibc-gconv-ibm850 \
- eglibc-gconv-cp1252 \
- eglibc-gconv-iso8859-1 \
- eglibc-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 ''
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
new file mode 100644
index 0000000000..649918fd2b
--- /dev/null
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -0,0 +1,40 @@
+#
+# glibc specific configuration
+#
+
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) 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"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/libintl ?= "glibc"
+PREFERRED_PROVIDER_virtual/libc ?= "glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libc ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/libc-locale ?= "glibc-locale"
+
+CXXFLAGS += "-fvisibility-inlines-hidden"
+
+LIBC_DEPENDENCIES = "libsegfault \
+ glibc \
+ glibc-dbg \
+ 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 ''
diff --git a/meta/conf/distro/include/tclibc-musl.inc b/meta/conf/distro/include/tclibc-musl.inc
index d375d8d31d..d1272a39a0 100644
--- a/meta/conf/distro/include/tclibc-musl.inc
+++ b/meta/conf/distro/include/tclibc-musl.inc
@@ -11,8 +11,8 @@ OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libc ?= "musl"
PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
USE_NLS ?= "no"
diff --git a/meta/conf/distro/include/tclibc-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc
index a4d8c3920d..14c3cdbb8a 100644
--- a/meta/conf/distro/include/tclibc-uclibc.inc
+++ b/meta/conf/distro/include/tclibc-uclibc.inc
@@ -11,8 +11,8 @@ OVERRIDES .= "${LIBCOVERRIDE}"
PREFERRED_PROVIDER_virtual/libc ?= "uclibc"
PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-eglibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-eglibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
USE_NLS ?= "no"
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 3488c925a5..7428aa99ff 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -9,7 +9,7 @@ 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_ARCH}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= "binutils-crosssdk-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = "gcc-crosssdk-initial-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_ARCH}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_ARCH}"
@@ -25,9 +25,9 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "4.9%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.24"
-EGLIBCVERSION ?= "2.19"
+GLIBCVERSION ?= "2.20"
UCLIBCVERSION ?= "0.9.33+git%"
-LINUXLIBCVERSION ?= "3.14"
+LINUXLIBCVERSION ?= "3.17.7"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -36,26 +36,31 @@ PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-runtime ?= "${GCCVERSION}"
+PREFERRED_VERSION_gcc-sanitizers ?= "${GCCVERSION}"
+PREFERRED_VERSION_gcc-source ?= "${GCCVERSION}"
PREFERRED_VERSION_nativesdk-gcc-runtime ?= "${SDKGCCVERSION}"
+PREFERRED_VERSION_nativesdk-gcc-sanitizers ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_libgcc ?= "${GCCVERSION}"
PREFERRED_VERSION_libgcc-initial ?= "${GCCVERSION}"
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-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${BINUVERSION}"
PREFERRED_VERSION_linux-libc-headers ?= "${LINUXLIBCVERSION}"
PREFERRED_VERSION_nativesdk-linux-libc-headers ?= "${LINUXLIBCVERSION}"
-PREFERRED_VERSION_eglibc ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_eglibc-locale ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_nativesdk-eglibc ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_eglibc-initial ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_nativesdk-eglibc-initial ?= "${EGLIBCVERSION}"
-PREFERRED_VERSION_cross-localedef-native ?= "${EGLIBCVERSION}"
+PREFERRED_VERSION_glibc ?= "${GLIBCVERSION}"
+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}"
-PREFERRED_VERSION_elfutils ?= "0.148"
# 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.6"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 7fa3f318b9..3a918e8bbf 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -18,6 +18,7 @@ do_compile_ptest_base[doc] = "Compiles the runtime test suite included in the so
do_configure[doc] = "Configures the source by enabling and disabling any build-time and configuration options for the software being built"
do_configure_ptest_base[doc] = "Configures the runtime test suite included in the software being built"
do_deploy[doc] = "Writes deployable output files to the deploy directory"
+do_devpyshell[doc] = "Starts an interactive Python shell for development/debugging"
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"
@@ -33,7 +34,7 @@ do_listtasks[doc] = "Lists all defined tasks for a target"
do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
do_package[doc] = "Analyzes the content of the holding area and splits it into subsets based on available packages and files"
do_package_index[doc] = "Creates or updates the index in the Package Feed area"
-do_package_write[doc] = "Creates the actual packages and places them in the Package Feed area"
+do_package_qa[doc] = "Runs QA checks on packaged files"
do_package_write_deb[doc] = "Creates the actual DEB packages and places them in the Package Feed area"
do_package_write_ipk[doc] = "Creates the actual IPK packages and places them in the Package Feed area"
do_package_write_rpm[doc] = "Creates the actual RPM packages and places them in the Package Feed area"
@@ -52,6 +53,7 @@ do_spdx[doc] = "A build stage that takes the source code and scans it on a remot
do_strip[doc] = "Strips unneeded sections out of the Linux kernel image"
do_testimage[doc] = "Boots an image and performs runtime tests within the image"
do_testimage_auto[doc] = "Boots an image and performs runtime tests within the image immediately after it has been built"
+do_testsdk[doc] = "Installs an SDK and performs runtime tests on the tools installed by it"
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"
@@ -75,7 +77,7 @@ AUTOREV[doc] = "When SRCREV is set to the value of this variable, it specifies t
#B
B[doc] = "The Build Directory. The OpenEmbedded build system places generated objects into the Build Directory during a recipe's build process."
-BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK packaging backend."
+BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK or RPM packaging backends."
BB_DANGLINGAPPENDS_WARNONLY[doc] = "Defines how BitBake handles situations where an append file (.bbappend) has no corresponding recipe file (.bb)."
BB_DISKMON_DIRS[doc] = "Monitors disk space and available inodes during the build and allows you to control the build based on these parameters."
BB_DISKMON_WARNINTERVAL[doc] = "Defines the disk space and free inode warning intervals. To set these intervals, define the variable in the conf/local.conf file in the Build Directory."
@@ -108,6 +110,7 @@ BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, specifies whether to split th
CACHE[doc] = "The directory holding the cache of the metadata."
CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as TARGET_CFLAGS."
CLASSOVERRIDE[doc] = "An internal variable specifying the special class override that should currently apply (e.g. "class-target", "class-native", and so forth)."
+CLEANBROKEN[doc] = "Specifies if 'make clean' does not work for a recipe (and therefore the build system should not try to use it during do_configure)"
COMBINED_FEATURES[doc] = "A set of features common between MACHINE_FEATURES and DISTRO_FEATURES."
COMMON_LICENSE_DIR[doc] = "Points to meta/files/common-licenses in the Source Directory, which is where generic license files reside."
COMPATIBLE_HOST[doc] = "A regular expression that resolves to one or more hosts (when the recipe is native) or one or more targets (when the recipe is non-native) with which a recipe is compatible."
@@ -148,7 +151,7 @@ DL_DIR[doc] = "The central download directory used by the build process to store
#E
-ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for eglibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
+ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for glibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
ERROR_QA[doc] = "Specifies the quality assurance checks whose failures are reported as errors by the OpenEmbedded build system."
EXCLUDE_FROM_WORLD[doc] = "Directs BitBake to exclude a recipe from world builds (i.e. bitbake world)."
EXTENDPE[doc] = "Used with file and pathnames to create a prefix for a recipe's version based on the recipe's PE value. If PE is set and greater than zero for a recipe, EXTENDPE becomes that value."
@@ -205,6 +208,7 @@ ICECC_USER_CLASS_BL[doc] = "Identifies user classes that you do not want the Ice
ICECC_USER_PACKAGE_BL[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider."
ICECC_USER_PACKAGE_WL[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support."
IMAGE_BASENAME[doc] = "The base name of image output files."
+IMAGE_BOOT_FILES[doc] = "Whitespace separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition. Entries will be installed under a same name as the source file. To change the destination file name, pass a desired name after a semicolon (eg. u-boot.img;uboot)."
IMAGE_CLASSES[doc] = "A list of classes that all images should inherit."
IMAGE_FEATURES[doc] = "The primary list of features to include in an image. Configure this variable in an image recipe."
IMAGE_FSTYPES[doc] = "Formats of root filesystem images that you want to have created."
@@ -219,13 +223,13 @@ IMAGE_ROOTFS_EXTRA_SPACE[doc] = "Defines additional free disk space created in t
IMAGE_ROOTFS_SIZE[doc] = "Defines the size in Kbytes for the generated image."
IMAGE_TYPES[doc] = "Specifies the complete list of supported image types by default."
INC_PR[doc] = "Helps define the recipe revision for recipes that share a common include file."
-INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build."
+INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build. Wildcard is supported, such as '*GPLv3'"
INHIBIT_DEFAULT_DEPS[doc] = "Prevents the default dependencies, namely the C compiler and standard C library (libc), from being added to DEPENDS."
INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binaries in resulting packages."
INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk (initramfs), which is used during boot."
-INITRD[doc] = "Indicates a filesystem image to use as an initial RAM disk (initrd)."
+INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
INITSCRIPT_NAME[doc] = "The filename of the initialization script as installed to ${sysconfdir}/init.d."
INITSCRIPT_PACKAGES[doc] = "A list of the packages that contain initscripts. This variable is used in recipes when using update-rc.d.bbclass. The variable is optional and defaults to the PN variable."
INITSCRIPT_PARAMS[doc] = "Specifies the options to pass to update-rc.d. The variable is mandatory and is used in recipes when using update-rc.d.bbclass."
@@ -240,6 +244,8 @@ KBRANCH_DEFAULT[doc] = "Defines the Linux kernel source repository's default bra
KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel."
KERNEL_FEATURES[doc] = "Includes additional metadata from the Yocto Project kernel Git repository. The metadata you add through this variable includes config fragments and features descriptions."
KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'."
+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_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."
@@ -407,11 +413,16 @@ 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 'eglibc' or 'uclibc'."
+TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'glibc' or 'uclibc'."
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."
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"
+TEST_POWERCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_POWERCONTROL_CMD"
+TEST_SERIALCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to connect to the serial console of the target machine under test"
+TEST_SERIALCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_SERIALCONTROL_CMD"
+TEST_TARGET[doc] = "For automated runtime testing, specifies the method of deploying the image and running tests on the target machine"
THISDIR[doc] = "The directory in which the file BitBake is currently parsing is located."
TIME[doc] = "The time the build was started using HMS format."
TMPDIR[doc] = "The temporary directory the OpenEmbedded build system uses when it does its work building images. By default, the TMPDIR variable is named tmp within the Build Directory."
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 75ca2325d1..de96548bd2 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -14,6 +14,7 @@ LAYERVERSION_core = "4"
# Set a variable to get to the top of the metadata location
COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
+# opkg-utils is for update-altnernatives :(
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
sysvinit-inittab \
shadow-securetty \
@@ -30,10 +31,15 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += " \
udev-extraconf \
packagegroup-x11-xserver \
systemd-serialgetty \
+ initscripts \
+ shadow \
+ shadow-sysroot \
+ base-passwd \
+ opkg-utils \
"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
- gcc-cross-${TARGET_ARCH}->eglibc \
+ gcc-cross-${TARGET_ARCH}->glibc \
gcc-cross-${TARGET_ARCH}->musl \
gcc-cross-${TARGET_ARCH}->uclibc \
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index c378a415d3..629916b6a5 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -36,7 +36,7 @@ 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.1 Xnet YPL-1.1"
+SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows 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
@@ -49,7 +49,6 @@ SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
#
# We should NEVER have a GPL/LGPL without a version!!!!
# Any mapping to MPL/LGPL/GPL should be fixed
-# see: https://wiki.yoctoproject.org/wiki/License_Audit
# AGPL variations
SPDXLICENSEMAP[AGPL-3] = "AGPL-3.0"
@@ -144,7 +143,7 @@ DATA_LICENSE = "CC0-1.0"
# information.
#
-FOSS_COPYRIGHT = "true"
+FOSS_NO_COPYRIGHT = "true"
# A option defined as[FOSS_RECURSIVE_UNPACK] in ./meta/conf/licenses.conf. is
# used to control if FOSSology server need recursively unpack tar.gz file which
@@ -160,12 +159,30 @@ FOSS_COPYRIGHT = "true"
FOSS_RECURSIVE_UNPACK = "false"
-# FOSSologySPDX instance server.
+# An option defined as [FOSS_FULL_SPDX] in ./meta/conf/licenses.conf is used to
+# control what kind of SPDX output to get from the FOSSology server.
+#
+# FOSS_FULL_SPDX = "true":
+# Tell FOSSology server to return full SPDX output, like if the program was
+# run from the command line. This is needed in order to get license refs for
+# the full package rather than individual files only.
+#
+# FOSS_FULL_SPDX = "false":
+# Tell FOSSology to only process license information for files. All package
+# license tags in the report will be "NOASSERTION"
+#
+
+FOSS_FULL_SPDX = "true"
+
+# FOSSologySPDX instance server. http://localhost/repo is the default
+# installation location for FOSSology.
+#
# For more information on FOSSologySPDX commandline:
# https://github.com/spdx-tools/fossology-spdx/wiki/Fossology-SPDX-Web-API
#
-FOSS_SERVER = "http://localhost//?mod=spdx_license_once&noCopyright=${FOSS_COPYRIGHT}&recursiveUnpack=${FOSS_RECURSIVE_UNPACK}"
+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/machine/include/arm/arch-arm64.inc b/meta/conf/machine/include/arm/arch-arm64.inc
new file mode 100644
index 0000000000..5376b87dd6
--- /dev/null
+++ b/meta/conf/machine/include/arm/arch-arm64.inc
@@ -0,0 +1,36 @@
+DEFAULTTUNE ?= "aarch64"
+
+require conf/machine/include/arm/arch-armv7a.inc
+
+TUNEVALID[aarch64] = "Enable instructions for aarch64"
+
+MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}"
+
+# Little Endian base configs
+AVAILTUNES += "aarch64 aarch64_be"
+ARMPKGARCH_tune-aarch64 ?= "aarch64"
+ARMPKGARCH_tune-aarch64_be ?= "aarch64_be"
+TUNE_FEATURES_tune-aarch64 ?= "aarch64"
+TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian"
+BASE_LIB_tune-aarch64 = "lib64"
+BASE_LIB_tune-aarch64_be = "lib64"
+
+PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
+PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
+
+ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}"
+TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
+TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
+ABIEXTENSION_64 = ""
+TARGET_FPU_64 = ""
+
+# Duplicated from arch-arm.inc
+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('ARMPKGSFX_FPU', True).strip('-') 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)}"
+ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}"
+TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"
diff --git a/meta/conf/machine/include/arm/arch-armv8.inc b/meta/conf/machine/include/arm/arch-armv8.inc
new file mode 100644
index 0000000000..5e832fae6d
--- /dev/null
+++ b/meta/conf/machine/include/arm/arch-armv8.inc
@@ -0,0 +1 @@
+require conf/machine/include/arm/arch-arm64.inc
diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index a94386f577..0db5ec136a 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -18,6 +18,8 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d
# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
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)
if selected == None:
return
@@ -37,8 +39,10 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_
# arm system and vice versa. It is strongly recommended that DISTROs not
# turn this off - the actual cost is very small.
TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
-OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
+THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
+THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}"
+OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${THUMB_OVERRIDES}', '', d)}"
# what about armv7m devices which don't support -marm (e.g. Cortex-M3)?
-TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
+TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index 02626d300e..c41fa5e864 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -100,3 +100,7 @@ TUNE_FEATURES_tune-mips64el-nf = "n64"
BASE_LIB_tune-mips64el-nf = "lib64"
MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
+
+# On mips we need to redefine this to include the ABIEXTENSION
+# we can avoid the python bit as there are no _ or - to translate
+TRANSLATED_TARGET_ARCH = "${TARGET_ARCH}${ABIEXTENSION}"
diff --git a/meta/conf/machine/include/tune-mips32r2.inc b/meta/conf/machine/include/tune-mips32r2.inc
index fb60592a8b..c9deff84e2 100644
--- a/meta/conf/machine/include/tune-mips32r2.inc
+++ b/meta/conf/machine/include/tune-mips32r2.inc
@@ -1,6 +1,6 @@
DEFAULTTUNE ?= "mips32r2"
-require conf/machine/include/mips/arch-mips.inc
+require conf/machine/include/tune-mips32.inc
TUNEVALID[mips32r2] = "Enable mips32r2 specific processor optimizations"
TUNECONFLICTS[mips32r2] = "n64 n32"
diff --git a/meta/conf/machine/include/tune-mips64.inc b/meta/conf/machine/include/tune-mips64.inc
index ba79e2b53f..9be0e0f8d9 100644
--- a/meta/conf/machine/include/tune-mips64.inc
+++ b/meta/conf/machine/include/tune-mips64.inc
@@ -1,3 +1,3 @@
DEFAULTTUNE ?= "mips64"
-require conf/machine/include/mips/arch-mips.inc
+require conf/machine/include/tune-mips32r2.inc
diff --git a/meta/conf/machine/include/tune-power5.inc b/meta/conf/machine/include/tune-power5.inc
new file mode 100644
index 0000000000..30be86941a
--- /dev/null
+++ b/meta/conf/machine/include/tune-power5.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppc64p5"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+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"
+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"
+BASE_LIB_tune-ppc64p5 = "lib64"
+TUNE_PKGARCH_tune-ppc64p5 = "ppc64p5"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p5"
+
+# 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)}"
diff --git a/meta/conf/machine/include/tune-power6.inc b/meta/conf/machine/include/tune-power6.inc
new file mode 100644
index 0000000000..7563798120
--- /dev/null
+++ b/meta/conf/machine/include/tune-power6.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppcpr6"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+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"
+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"
+BASE_LIB_tune-ppc64p6 = "lib64"
+TUNE_PKGARCH_tune-ppc64p6 = "ppc64p6"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p6"
+
+# 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)}"
diff --git a/meta/conf/machine/include/tune-power7.inc b/meta/conf/machine/include/tune-power7.inc
new file mode 100644
index 0000000000..7069e75026
--- /dev/null
+++ b/meta/conf/machine/include/tune-power7.inc
@@ -0,0 +1,21 @@
+DEFAULTTUNE ?= "ppcpr7"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+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"
+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"
+BASE_LIB_tune-ppc64p7 = "lib64"
+TUNE_PKGARCH_tune-ppc64p7 = "ppc64p7"
+PACKAGE_EXTRA_ARCHS_tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p7"
+
+# 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)}"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
new file mode 100644
index 0000000000..20bcfbac99
--- /dev/null
+++ b/meta/conf/machine/qemuarm64.conf
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: generic armv8 machine
+#@DESCRIPTION: Machine configuration for running a generic armv8
+
+require conf/machine/include/arm/arch-armv8.inc
+require conf/machine/include/qemu.inc
+
+MACHINE_FEATURES = ""
+
+KERNEL_IMAGETYPE = "Image"
+
+SERIAL_CONSOLE = "38400 ttyAMA0"
diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index ce1c419d1e..d9d2421616 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -3,7 +3,7 @@
#@DESCRIPTION: mti_malta32_be
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-mips32.inc
+require conf/machine/include/tune-mips32r2.inc
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index 642a2d9b52..837f9f4ab0 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -20,6 +20,8 @@ XSERVER = "xserver-xorg \
xf86-input-vmmouse \
xf86-input-keyboard \
xf86-input-evdev \
+ xf86-video-cirrus \
+ xf86-video-fbdev \
xf86-video-vmware"
MACHINE_FEATURES += "x86"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index ebc27dba47..3562276932 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -19,6 +19,8 @@ XSERVER = "xserver-xorg \
xf86-input-vmmouse \
xf86-input-keyboard \
xf86-input-evdev \
+ xf86-video-cirrus \
+ xf86-video-fbdev \
xf86-video-vmware"
MACHINE_FEATURES += "x86"
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 733236d6bb..37e8481112 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -14,6 +14,6 @@ INHERIT += "multilib_global"
BBCLASSEXTEND_append = " ${MULTILIBS}"
-MULTILIB_GLOBAL_VARIANTS = "lib32 lib64 libx32"
+MULTILIB_GLOBAL_VARIANTS ?= "lib32 lib64 libx32"
OPKG_ARGS_append = " --force-maintainer --force-overwrite"
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index e518b84146..1d55fa71d9 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.23.1"
+BB_MIN_VERSION = "1.25.0"
SANITY_ABIFILE = "${TMPDIR}/abi_version"
diff --git a/meta/conf/toasterconf.json b/meta/conf/toasterconf.json
new file mode 100644
index 0000000000..fe1564ec26
--- /dev/null
+++ b/meta/conf/toasterconf.json
@@ -0,0 +1,84 @@
+{
+ "config": {"MACHINE": "qemux86", "DISTRO": "poky"},
+ "layersources": [
+ {
+ "name": "Local OpenEmbedded",
+ "sourcetype": "local",
+ "apiurl": "../../",
+ "branches": ["HEAD", "master", "dizzy"],
+ "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", "dizzy"]
+ },
+ {
+ "name": "Imported layers",
+ "sourcetype": "imported",
+ "apiurl": "",
+ "branches": ["master", "dizzy", "HEAD"]
+
+ }
+ ],
+ "bitbake" : [
+ {
+ "name": "master",
+ "giturl": "git://git.openembedded.org/bitbake",
+ "branch": "master",
+ "dirpath": ""
+ },
+ {
+ "name": "dizzy",
+ "giturl": "git://git.openembedded.org/bitbake",
+ "branch": "1.24",
+ "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 OpenEmbedded master branch, where active development takes place. This is not a stable branch, so your builds might not work as expected."
+ },
+ {
+ "name": "dizzy",
+ "description": "OpenEmbedded Dizzy",
+ "bitbake": "dizzy",
+ "branch": "dizzy",
+ "defaultlayers": [ "openembedded-core" ],
+ "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
+ "helptext": "Toaster will run your builds with the OpenEmbedded Dizzy release"
+ },
+ {
+ "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/SMAIL_GPL b/meta/files/common-licenses/SMAIL_GPL
new file mode 100644
index 0000000000..dfc3fd16cf
--- /dev/null
+++ b/meta/files/common-licenses/SMAIL_GPL
@@ -0,0 +1,164 @@
+This is the Debian GNU/Linux package debianutils.
+
+It is an original Debian package. Programs in it were maintained by
+Guy Maor <maor@debian.org>, and are now maintained by Clint Adams
+<schizo@debian.org>.
+
+All its programs except readlink, savelog, and which may be
+redistributed under the terms of the GNU GPL, Version 2 or later,
+found on Debian systems in the file /usr/share/common-licenses/GPL.
+
+which is in the public domain.
+
+readlink is Copyright (c) 1997 Kenneth Stailey, and may also be
+distributed under the terms of the BSD copyright.
+
+savelog may be redistributed under the following terms: (The rest of
+this file consists of savelog's distribution terms.)
+
+#ident "@(#)smail:RELEASE-3_2:COPYING,v 1.2 1996/06/14 18:59:10 woods Exp"
+
+ SMAIL GENERAL PUBLIC LICENSE
+ (Clarified 11 Feb 1988)
+
+ Copyright (C) 1988 Landon Curt Noll & Ronald S. Karr
+ Copyright (C) 1992 Ronald S. Karr
+ Copyleft (GNU) 1988 Landon Curt Noll & Ronald S. Karr
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license, but changing it is not allowed. You can also
+ use this wording to make the terms for other programs.
+
+ The license agreements of most software companies keep you at the
+mercy of those companies. By contrast, our general public license is
+intended to give everyone the right to share SMAIL. To make sure that
+you get the rights we want you to have, we need to make restrictions
+that forbid anyone to deny you these rights or to ask you to surrender
+the rights. Hence this license agreement.
+
+ Specifically, we want to make sure that you have the right to give
+away copies of SMAIL, that you receive source code or else can get it
+if you want it, that you can change SMAIL or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To make sure that everyone has such rights, we have to forbid you to
+deprive anyone else of these rights. For example, if you distribute
+copies of SMAIL, 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 tell them their rights.
+
+ Also, for our own protection, we must make certain that everyone
+finds out that there is no warranty for SMAIL. If SMAIL is modified by
+someone else and passed on, we want its recipients to know that what
+they have is not what we distributed, so that any problems introduced
+by others will not reflect on our reputation.
+
+ Therefore we (Landon Curt Noll and Ronald S. Karr) make the following
+terms which say what you must do to be allowed to distribute or change
+SMAIL.
+
+
+ COPYING POLICIES
+
+ 1. You may copy and distribute verbatim copies of SMAIL source code
+as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy a valid copyright notice "Copyright
+(C) 1988 Landon Curt Noll & Ronald S. Karr" (or with whatever year is
+appropriate); keep intact the notices on all files that refer to this
+License Agreement and to the absence of any warranty; and give any
+other recipients of the SMAIL program a copy of this License
+Agreement along with the program. You may charge a distribution fee
+for the physical act of transferring a copy.
+
+ 2. You may modify your copy or copies of SMAIL or any portion of it,
+and copy and distribute such modifications under the terms of
+Paragraph 1 above, provided that you also do the following:
+
+ a) cause the modified files to carry prominent notices stating
+ that you changed the files and the date of any change; and
+
+ b) cause the whole of any work that you distribute or publish,
+ that in whole or in part contains or is a derivative of SMAIL or
+ any part thereof, to be licensed at no charge to all third
+ parties on terms identical to those contained in this License
+ Agreement (except that you may choose to grant more extensive
+ warranty protection to some or all third parties, at your option).
+
+ c) You may charge a distribution fee for the physical act of
+ transferring a copy, and you may at your option offer warranty
+ protection in exchange for a fee.
+
+Mere aggregation of another unrelated program with this program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other program under the scope of these terms.
+
+ 3. You may copy and distribute SMAIL (or a portion or derivative of it,
+under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 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
+ Paragraphs 1 and 2 above; or,
+
+ b) accompany it with a written offer, valid for at least three
+ years, to give any third party free (except for a nominal
+ shipping charge) a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ c) accompany it with the information you received as to where the
+ corresponding source code may be obtained. (This alternative is
+ allowed only for non-commercial distribution and only if you
+ received the program in object code or executable form alone.)
+
+For an executable file, complete source code means all the source code for
+all modules it contains; but, as a special exception, it need not include
+source code for modules which are standard libraries that accompany the
+operating system on which the executable file runs.
+
+ 4. You may not copy, sublicense, distribute or transfer SMAIL
+except as expressly provided under this License Agreement. Any attempt
+otherwise to copy, sublicense, distribute or transfer SMAIL is void and
+your rights to use the program under this License agreement shall be
+automatically terminated. However, parties who have received computer
+software programs from you with this License Agreement will not have
+their licenses terminated so long as such parties remain in full compliance.
+
+ 5. If you wish to incorporate parts of SMAIL into other free
+programs whose distribution conditions are different, write to Landon
+Curt Noll & Ronald S. Karr via the Free Software Foundation at 51
+Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. We have not yet
+worked out a simple rule that can be stated here, but we will often
+permit this. We 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.
+
+Your comments and suggestions about our licensing policies and our
+software are welcome! This contract was based on the contract made by
+the Free Software Foundation. Please contact the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+USA, or call (617) 542-5942 for details on copylefted material in
+general.
+
+ NO WARRANTY
+
+ BECAUSE SMAIL IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO
+WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING, LANDON CURT NOLL & RONALD S. KARR AND/OR
+OTHER PARTIES PROVIDE SMAIL "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 SMAIL IS WITH
+YOU. SHOULD SMAIL PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL LANDON CURT NOLL &
+RONALD S. KARR AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
+SMAIL AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) SMAIL, EVEN IF YOU HAVE
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY
+ANY OTHER PARTY.
diff --git a/meta/files/common-licenses/XSL b/meta/files/common-licenses/XSL
new file mode 100644
index 0000000000..0a82d60c1c
--- /dev/null
+++ b/meta/files/common-licenses/XSL
@@ -0,0 +1,48 @@
+Copyright
+---------
+Copyright (C) 1999-2007 Norman Walsh
+Copyright (C) 2003 Jiří Kosek
+Copyright (C) 2004-2007 Steve Ball
+Copyright (C) 2005-2008 The DocBook Project
+Copyright (C) 2011-2012 O'Reilly Media
+
+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.
+
+Except as contained in this notice, the names of individuals
+credited with contribution to this software shall not be used in
+advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization
+from the individuals in question.
+
+Any stylesheet derived from this Software that is publically
+distributed will be identified with a different name and the
+version strings in any derived Software will be changed so that
+no possibility of confusion between the derived package and this
+Software will exist.
+
+Warranty
+--------
+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 NORMAN WALSH OR ANY OTHER
+CONTRIBUTOR 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.
+
+Contacting the Author
+---------------------
+The DocBook XSL stylesheets are maintained by Norman Walsh,
+<ndw@nwalsh.com>, and members of the DocBook Project,
+<docbook-developers@sf.net>
diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index c829bece2b..109cbe553c 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -50,18 +50,18 @@ ${localstatedir}/log link volatile/log
${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 2775
-/home 02755 root root false - - -
-${prefix}/src 02755 root root false - - -
-${localstatedir}/local 02755 root root false - - -
-
-# Set 3755
+# Set 755-lsb
/srv 0755 root root false - - -
-# Set 4775
-/var/mail 02755 root root false - - -
+# Set 2775-lsb
+/var/mail 02775 root mail false - - -
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh
new file mode 100644
index 0000000000..0d679a66db
--- /dev/null
+++ b/meta/files/toolchain-shar-template.sh
@@ -0,0 +1,190 @@
+#!/bin/bash
+
+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/")
+
+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!"
+ exit 1
+ fi
+fi
+
+DEFAULT_INSTALL_DIR="@SDKPATH@"
+SUDO_EXEC=""
+target_sdk_dir=""
+answer=""
+relocate=1
+savescripts=0
+verbose=0
+while getopts ":yd:DRS" OPT; do
+ case $OPT in
+ y)
+ answer="Y"
+ [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+ ;;
+ d)
+ target_sdk_dir=$OPTARG
+ ;;
+ D)
+ verbose=1
+ ;;
+ R)
+ relocate=0
+ savescripts=1
+ ;;
+ S)
+ savescripts=1
+ ;;
+ *)
+ echo "Usage: $(basename $0) [-y] [-d <dir>]"
+ echo " -y Automatic yes to all prompts"
+ echo " -d <dir> Install the SDK to <dir>"
+ echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
+ echo " -S Save relocation scripts"
+ echo " -R Do not relocate executables"
+ echo " -D use set -x to see what is going on"
+ exit 1
+ ;;
+ esac
+done
+
+if [ $verbose = 1 ] ; then
+ set -x
+fi
+
+if [ "$target_sdk_dir" = "" ]; then
+ read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
+ [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+fi
+
+eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
+if [ -d "$target_sdk_dir" ]; then
+ target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
+else
+ target_sdk_dir=$(readlink -m "$target_sdk_dir")
+fi
+
+if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
+ echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
+ exit 1
+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]?"
+
+ default_answer="n"
+else
+ printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
+
+ default_answer="y"
+fi
+
+if [ "$answer" = "" ]; then
+ read answer
+ [ "$answer" = "" ] && answer="$default_answer"
+else
+ echo $answer
+fi
+
+if [ "$answer" != "Y" -a "$answer" != "y" ]; then
+ echo "Installation aborted!"
+ exit 1
+fi
+
+# Try to create the directory (this will not succeed if user doesn't have rights)
+mkdir -p $target_sdk_dir >/dev/null 2>&1
+
+# if don't have the right to access dir, gain by sudo
+if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
+ SUDO_EXEC=$(which "sudo")
+ if [ -z $SUDO_EXEC ]; then
+ echo "No command 'sudo' found, please install sudo first. Abort!"
+ exit 1
+ fi
+
+ # test sudo could gain root right
+ $SUDO_EXEC pwd >/dev/null 2>&1
+ [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
+
+ # now that we have sudo rights, create the directory
+ $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
+fi
+
+payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
+
+printf "Extracting SDK..."
+tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir
+echo "done"
+
+printf "Setting it up..."
+# fix environment paths
+for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
+ $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
+done
+
+# fix dynamic loader paths in all ELF SDK binaries
+native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
+dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
+if [ "$dl_path" = "" ] ; then
+ echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
+ exit 1
+fi
+executable_files=$($SUDO_EXEC find $native_sysroot -type f \
+ \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
+
+tdir=`mktemp -d`
+if [ x$tdir = x ] ; then
+ echo "SDK relocate failed, could not create a temporary directory"
+ exit 1
+fi
+echo "#!/bin/bash" > $tdir/relocate_sdk.sh
+echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
+$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
+$SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
+rm -rf $tdir
+if [ $relocate = 1 ] ; then
+ $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.sh
+ if [ $? -ne 0 ]; then
+ echo "SDK could not be set up. Relocate script failed. Abort!"
+ exit 1
+ fi
+fi
+
+# replace @SDKPATH@ with the new prefix in all text files: configs/scripts/etc
+for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
+ $SUDO_EXEC find $replace -type f -exec file '{}' \; | \
+ grep ":.*\(ASCII\|script\|source\).*text" | \
+ awk -F':' '{printf "\"%s\"\n", $1}' | \
+ $SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
+done
+
+# change all symlinks pointing to @SDKPATH@
+for l in $($SUDO_EXEC find $native_sysroot -type l); do
+ $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
+done
+
+# find out all perl scripts in $native_sysroot and modify them replacing the
+# host perl with SDK perl.
+for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep -l "^#!.*perl" '{}' \;); do
+ $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
+ "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
+done
+
+echo done
+
+@SDK_POST_INSTALL_COMMAND@
+
+# delete the relocating script, so that user is forced to re-run the installer
+# if he/she wants another location for the sdk
+if [ $savescripts = 0 ] ; then
+ $SUDO_EXEC rm ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
+fi
+
+echo "SDK has been successfully set up and is ready to be used."
+
+exit 0
+
+MARKER:
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index 71c7759e91..8da87b771a 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -57,20 +57,32 @@ class ClassExtender(object):
if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep) or ('-crosssdk-' in dep):
return dep
else:
+ # Do not extend for that already have multilib prefix
+ var = self.d.getVar("MULTILIB_VARIANTS", True)
+ if var:
+ var = var.split()
+ for v in var:
+ if dep.startswith(v):
+ return dep
return self.extend_name(dep)
def map_depends_variable(self, varname, suffix = ""):
+ # We need to preserve EXTENDPKGV so it can be expanded correctly later
if suffix:
varname = varname + "_" + suffix
+ orig = self.d.getVar("EXTENDPKGV", False)
+ self.d.setVar("EXTENDPKGV", "EXTENDPKGV")
deps = self.d.getVar(varname, True)
if not deps:
+ self.d.setVar("EXTENDPKGV", orig)
return
deps = bb.utils.explode_dep_versions2(deps)
newdeps = {}
for dep in deps:
newdeps[self.map_depends(dep)] = deps[dep]
- self.d.setVar(varname, bb.utils.join_deps(newdeps, False))
+ self.d.setVar(varname, bb.utils.join_deps(newdeps, False).replace("EXTENDPKGV", "${EXTENDPKGV}"))
+ self.d.setVar("EXTENDPKGV", orig)
def map_packagevars(self):
for pkg in (self.d.getVar("PACKAGES", True).split() + [""]):
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index c9b9033132..0ce303d570 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -48,11 +48,13 @@ class ImageDepGraph(object):
graph = dict()
def add_node(node):
+ base_type = self._image_base_type(node)
deps = (self.d.getVar('IMAGE_TYPEDEP_' + node, True) or "")
- if deps != "":
+ base_deps = (self.d.getVar('IMAGE_TYPEDEP_' + base_type, True) or "")
+ if deps != "" or base_deps != "":
graph[node] = deps
- for dep in deps.split():
+ for dep in deps.split() + base_deps.split():
if not dep in graph:
add_node(dep)
else:
@@ -72,6 +74,18 @@ class ImageDepGraph(object):
for item in remove_list:
self.graph.pop(item, None)
+ def _image_base_type(self, type):
+ ctypes = self.d.getVar('COMPRESSIONTYPES', True).split()
+ if type in ["vmdk", "live", "iso", "hddimg"]:
+ type = "ext3"
+ basetype = type
+ for ctype in ctypes:
+ if type.endswith("." + ctype):
+ basetype = type[:-len("." + ctype)]
+ break
+
+ return basetype
+
def _compute_dependencies(self):
"""
returns dict object of nodes with [no_of_depends_on, no_of_depended_by]
@@ -109,7 +123,7 @@ class ImageDepGraph(object):
# remove added nodes from deps_array
for item in group:
for node in self.graph:
- if item in self.graph[node]:
+ if item in self.graph[node].split():
self.deps_array[node][0] -= 1
self.deps_array.pop(item, None)
@@ -144,6 +158,7 @@ class Image(ImageDepGraph):
overhead_factor = float(self.d.getVar('IMAGE_OVERHEAD_FACTOR', True))
rootfs_req_size = int(self.d.getVar('IMAGE_ROOTFS_SIZE', True))
rootfs_extra_space = eval(self.d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
+ rootfs_maxsize = self.d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
output = subprocess.check_output(['du', '-ks',
self.d.getVar('IMAGE_ROOTFS', True)])
@@ -158,6 +173,13 @@ class Image(ImageDepGraph):
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
+ if rootfs_maxsize:
+ rootfs_maxsize_int = int(rootfs_maxsize)
+ if base_size > rootfs_maxsize_int:
+ bb.fatal("The rootfs size %d(K) overrides the max size %d(K)" % \
+ (base_size, rootfs_maxsize_int))
+
return base_size
def _create_symlinks(self, subimages):
@@ -274,7 +296,11 @@ class Image(ImageDepGraph):
bb.data.update_data(localdata)
localdata.setVar('type', type)
- cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
+ image_cmd = localdata.getVar("IMAGE_CMD", True)
+ if image_cmd:
+ cmds.append("\t" + image_cmd)
+ else:
+ bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % type)
cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
if type in cimages:
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index f8b532220a..7c728fcd23 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -30,7 +30,8 @@ def runstrip(arg):
elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
- stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ # Use mv to break hardlinks
+ stripcmd = "'%s' %s '%s' -o '%s.tmp' && mv '%s.tmp' '%s'" % (strip, extraflags, file, file, file, file)
bb.debug(1, "runstrip: %s" % stripcmd)
ret = subprocess.call(stripcmd, shell=True)
@@ -97,3 +98,29 @@ def filedeprunner(arg):
raise e
return (pkg, provides, requires)
+
+
+def read_shlib_providers(d):
+ import re
+
+ shlib_provider = {}
+ shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
+ list_re = re.compile('^(.*)\.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):
+ m = list_re.match(file)
+ if m:
+ dep_pkg = m.group(1)
+ fd = open(os.path.join(dir, file))
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ s = l.strip().split(":")
+ if s[0] not in shlib_provider:
+ shlib_provider[s[0]] = {}
+ shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
+ return shlib_provider
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5444422305..6f49c69110 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -7,6 +7,7 @@ import multiprocessing
import re
import bb
import tempfile
+import oe.utils
# this can be used by all PM backends to create the index files in parallel
@@ -15,11 +16,14 @@ def create_index(arg):
try:
bb.note("Executing '%s' ..." % index_cmd)
- subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
return("Index creation command '%s' failed with return code %d:\n%s" %
(e.cmd, e.returncode, e.output))
+ if result:
+ bb.note(result)
+
return None
@@ -62,6 +66,9 @@ class RpmIndexer(Indexer):
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)
@@ -116,15 +123,9 @@ class RpmIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
-
- for result in results:
- if result is not None:
- return(result)
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
class OpkgIndexer(Indexer):
@@ -161,15 +162,10 @@ class OpkgIndexer(Indexer):
bb.note("There are no packages in %s!" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
- for result in results:
- if result is not None:
- return(result)
class DpkgIndexer(Indexer):
@@ -183,6 +179,9 @@ class DpkgIndexer(Indexer):
if a not in pkg_archs:
arch_list.append(a)
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').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")
gzip = bb.utils.which(os.getenv('PATH'), "gzip")
@@ -210,15 +209,10 @@ class DpkgIndexer(Indexer):
bb.note("There are no packages in %s" % self.deploy_dir)
return
- nproc = multiprocessing.cpu_count()
- pool = bb.utils.multiprocessingpool(nproc)
- results = list(pool.imap(create_index, index_cmds))
- pool.close()
- pool.join()
+ result = oe.utils.multiprocess_exec(index_cmds, create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
- for result in results:
- if result is not None:
- return(result)
class PkgsList(object):
@@ -243,6 +237,15 @@ class RpmPkgsList(PkgsList):
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)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Getting rpm version failed. Command '%s' "
+ "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ self.rpm_version = int(output.split()[-1].split('.')[0])
+
'''
Translate the RPM/Smart format names to the OE multilib format names
'''
@@ -291,11 +294,16 @@ class RpmPkgsList(PkgsList):
def list(self, format=None):
if format == "deps":
+ if self.rpm_version == 4:
+ bb.fatal("'deps' format dependency listings are not supported with rpm 4 since rpmresolve does not work")
return self._list_pkg_deps()
cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
cmd += ' -D "_dbpath /var/lib/rpm" -qa'
- cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+ if self.rpm_version == 4:
+ cmd += " --qf '[%{NAME} %{ARCH} %{VERSION}\n]'"
+ else:
+ cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
try:
# bb.note(cmd)
@@ -312,7 +320,10 @@ class RpmPkgsList(PkgsList):
pkg = line.split()[0]
arch = line.split()[1]
ver = line.split()[2]
- pkgorigin = line.split()[3]
+ if self.rpm_version == 4:
+ pkgorigin = "unknown"
+ else:
+ pkgorigin = line.split()[3]
new_pkg, new_arch = self._pkg_translate_smart_to_oe(pkg, arch)
if format == "arch":
@@ -567,7 +578,7 @@ class RpmPM(PackageManager):
self.install_dir = os.path.join(self.target_rootfs, "install")
self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
- self.smart_opt = "--data-dir=" + os.path.join(target_rootfs,
+ self.smart_opt = "--quiet --data-dir=" + os.path.join(target_rootfs,
'var/lib/smart')
self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
@@ -580,6 +591,7 @@ class RpmPM(PackageManager):
self.indexer = RpmIndexer(self.d, self.deploy_dir)
self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
+ self.rpm_version = self.pkgs_list.rpm_version
self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
@@ -769,43 +781,46 @@ class RpmPM(PackageManager):
# 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)
+ if self.rpm_version == 5:
+ 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)
- cmd = "%s --root %s --dbpath /var/lib/rpm -qa > /dev/null" % (
- self.rpm_cmd,
- self.target_rootfs)
+ opt = "-qa"
+ if self.rpm_version == 4:
+ opt = "--initdb"
+ 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:
@@ -821,11 +836,31 @@ class RpmPM(PackageManager):
self._invoke_smart('config --set rpm-extra-macros._var=%s' %
self.d.getVar('localstatedir', True))
cmd = 'config --set rpm-extra-macros._tmppath=/install/tmp'
+
+ 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)
@@ -864,6 +899,11 @@ class RpmPM(PackageManager):
# If we ever run into needing more the 899 scripts, we'll have to.
# change num to start with 1000.
#
+ if self.rpm_version == 4:
+ scriptletcmd = "$2 $3 $4\n"
+ else:
+ scriptletcmd = "$2 $1/$3 $4\n"
+
SCRIPTLET_FORMAT = "#!/bin/bash\n" \
"\n" \
"export PATH=%s\n" \
@@ -874,7 +914,7 @@ class RpmPM(PackageManager):
"export INTERCEPT_DIR=%s\n" \
"export NATIVE_ROOT=%s\n" \
"\n" \
- "$2 $1/$3 $4\n" \
+ + scriptletcmd + \
"if [ $? -ne 0 ]; then\n" \
" if [ $4 -eq 1 ]; then\n" \
" mkdir -p $1/etc/rpm-postinsts\n" \
@@ -1234,9 +1274,9 @@ class OpkgPM(PackageManager):
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),
- arch)
+ (arch,
+ self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
+ arch))
def _create_config(self):
with open(self.config_file, "w+") as config_file:
@@ -1383,6 +1423,10 @@ class OpkgPM(PackageManager):
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.
'''
@@ -1453,6 +1497,10 @@ class DpkgPM(PackageManager):
self.apt_args = d.getVar("APT_ARGS", True)
+ self.all_arch_list = archs.split()
+ all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').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)
@@ -1610,8 +1658,8 @@ class DpkgPM(PackageManager):
sources_conf = os.path.join("%s/etc/apt/sources.list"
% self.target_rootfs)
arch_list = []
- archs = self.d.getVar('PACKAGE_ARCHS', True)
- for arch in archs.split():
+
+ for arch in self.all_arch_list:
if not os.path.exists(os.path.join(self.deploy_dir, arch)):
continue
arch_list.append(arch)
@@ -1634,7 +1682,7 @@ class DpkgPM(PackageManager):
bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
arch_list = []
- for arch in archs.split():
+ for arch in self.all_arch_list:
if not os.path.exists(os.path.join(self.deploy_dir, arch)):
continue
arch_list.append(arch)
@@ -1650,7 +1698,7 @@ class DpkgPM(PackageManager):
priority += 5
pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
- for pkg in pkg_exclude:
+ for pkg in pkg_exclude.split():
prefs_file.write(
"Package: %s\n"
"Pin: release *\n"
@@ -1663,15 +1711,28 @@ class DpkgPM(PackageManager):
sources_file.write("deb file:%s/ ./\n" %
os.path.join(self.deploy_dir, arch))
+ base_arch_list = base_archs.split()
+ multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True);
+ for variant in multilib_variants.split():
+ if variant == "lib32":
+ base_arch_list.append("i386")
+ elif variant == "lib64":
+ base_arch_list.append("amd64")
+
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"):
- line = re.sub("Architecture \".*\";",
- "Architecture \"%s\";" % base_archs, line)
- line = re.sub("#ROOTFS#", self.target_rootfs, line)
- line = re.sub("#APTCONF#", self.apt_conf_dir, line)
-
- apt_conf.write(line + "\n")
+ match_arch = re.match(" Architecture \".*\";$", line)
+ architectures = ""
+ if match_arch:
+ for base_arch in base_arch_list:
+ architectures += "\"%s\";" % base_arch
+ 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)
+ apt_conf.write(line + "\n")
target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "info"))
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index b085c9d6b5..b838be80be 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -199,10 +199,108 @@ class PatchTree(PatchSet):
self.Pop(all=True)
class GitApplyTree(PatchTree):
+ patch_line_prefix = '%% original patch'
+
def __init__(self, dir, d):
PatchTree.__init__(self, dir, d)
+ @staticmethod
+ def extractPatchHeader(patchfile):
+ """
+ Extract just the header lines from the top of a patch file
+ """
+ lines = []
+ with open(patchfile, 'r') as f:
+ for line in f.readlines():
+ if line.startswith('Index: ') or line.startswith('diff -') or line.startswith('---'):
+ break
+ lines.append(line)
+ return lines
+
+ @staticmethod
+ def prepareCommit(patchfile):
+ """
+ Prepare a git commit command line based on the header from a patch file
+ (typically this is useful for patches that cannot be applied with "git am" due to formatting)
+ """
+ import tempfile
+ import re
+ author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>')
+ # Process patch header and extract useful information
+ lines = GitApplyTree.extractPatchHeader(patchfile)
+ outlines = []
+ author = None
+ date = None
+ for line in lines:
+ if line.startswith('Subject: '):
+ subject = line.split(':', 1)[1]
+ # Remove any [PATCH][oe-core] etc.
+ subject = re.sub(r'\[.+?\]\s*', '', subject)
+ outlines.insert(0, '%s\n\n' % subject.strip())
+ continue
+ if line.startswith('From: ') or line.startswith('Author: '):
+ authorval = line.split(':', 1)[1].strip().replace('"', '')
+ # git is fussy about author formatting i.e. it must be Name <email@domain>
+ if author_re.match(authorval):
+ author = authorval
+ continue
+ if line.startswith('Date: '):
+ if date is None:
+ dateval = line.split(':', 1)[1].strip()
+ # Very crude check for date format, since git will blow up if it's not in the right
+ # format. Without e.g. a python-dateutils dependency we can't do a whole lot more
+ if len(dateval) > 12:
+ date = dateval
+ continue
+ if line.startswith('Signed-off-by: '):
+ authorval = line.split(':', 1)[1].strip().replace('"', '')
+ # git is fussy about author formatting i.e. it must be Name <email@domain>
+ if author_re.match(authorval):
+ author = authorval
+ outlines.append(line)
+ # Write out commit message to a file
+ with tempfile.NamedTemporaryFile('w', delete=False) as tf:
+ tmpfile = tf.name
+ for line in outlines:
+ tf.write(line)
+ # Prepare git command
+ cmd = ["git", "commit", "-F", tmpfile]
+ # git doesn't like plain email addresses as authors
+ if author and '<' in author:
+ cmd.append('--author="%s"' % author)
+ if date:
+ cmd.append('--date="%s"' % date)
+ return (tmpfile, cmd)
+
+ @staticmethod
+ def extractPatches(tree, startcommit, outdir):
+ import tempfile
+ import shutil
+ tempdir = tempfile.mkdtemp(prefix='oepatch')
+ try:
+ shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
+ out = runcmd(["sh", "-c", " ".join(shellcmd)], tree)
+ if out:
+ for srcfile in out.split():
+ patchlines = []
+ outfile = None
+ with open(srcfile, 'r') as f:
+ for line in f:
+ if line.startswith(GitApplyTree.patch_line_prefix):
+ outfile = line.split()[-1].strip()
+ continue
+ patchlines.append(line)
+ if not outfile:
+ outfile = os.path.basename(srcfile)
+ with open(os.path.join(outdir, outfile), 'w') as of:
+ for line in patchlines:
+ of.write(line)
+ finally:
+ shutil.rmtree(tempdir)
+
def _applypatch(self, patch, force = False, reverse = False, run = True):
+ import shutil
+
def _applypatchhelper(shellcmd, patch, force = False, reverse = False, run = True):
if reverse:
shellcmd.append('-R')
@@ -214,12 +312,62 @@ class GitApplyTree(PatchTree):
return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Add hooks which add a pointer to the original patch file name in the commit message
+ commithook = os.path.join(self.dir, '.git', 'hooks', 'commit-msg')
+ commithook_backup = commithook + '.devtool-orig'
+ applyhook = os.path.join(self.dir, '.git', 'hooks', 'applypatch-msg')
+ applyhook_backup = applyhook + '.devtool-orig'
+ if os.path.exists(commithook):
+ shutil.move(commithook, commithook_backup)
+ if os.path.exists(applyhook):
+ shutil.move(applyhook, applyhook_backup)
+ with open(commithook, 'w') as f:
+ # NOTE: the formatting here is significant; if you change it you'll also need to
+ # change other places which read it back
+ f.write('echo >> $1\n')
+ f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix)
+ os.chmod(commithook, 0755)
+ shutil.copy2(commithook, applyhook)
try:
- shellcmd = ["git", "--work-tree=.", "am", "-3", "-p%s" % patch['strippath']]
- return _applypatchhelper(shellcmd, patch, force, reverse, run)
- except CmdError:
- shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
- return _applypatchhelper(shellcmd, patch, force, reverse, run)
+ patchfilevar = 'PATCHFILE="%s"' % os.path.basename(patch['file'])
+ try:
+ shellcmd = [patchfilevar, "git", "--work-tree=.", "am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
+ return _applypatchhelper(shellcmd, patch, force, reverse, run)
+ except CmdError:
+ # Need to abort the git am, or we'll still be within it at the end
+ try:
+ shellcmd = ["git", "--work-tree=.", "am", "--abort"]
+ runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ except CmdError:
+ pass
+ # Fall back to git apply
+ shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
+ try:
+ output = _applypatchhelper(shellcmd, patch, force, reverse, run)
+ except CmdError:
+ # Fall back to patch
+ output = PatchTree._applypatch(self, patch, force, reverse, run)
+ # Add all files
+ shellcmd = ["git", "add", "-f", "."]
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Exclude the patches directory
+ shellcmd = ["git", "reset", "HEAD", self.patchdir]
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ # Commit the result
+ (tmpfile, shellcmd) = self.prepareCommit(patch['file'])
+ try:
+ shellcmd.insert(0, patchfilevar)
+ output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ finally:
+ os.remove(tmpfile)
+ return output
+ finally:
+ os.remove(commithook)
+ os.remove(applyhook)
+ if os.path.exists(commithook_backup):
+ shutil.move(commithook_backup, commithook)
+ if os.path.exists(applyhook_backup):
+ shutil.move(applyhook_backup, applyhook)
class QuiltTree(PatchSet):
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
new file mode 100644
index 0000000000..1758dcecba
--- /dev/null
+++ b/meta/lib/oe/recipeutils.py
@@ -0,0 +1,279 @@
+# Utility functions for reading and modifying recipes
+#
+# Some code borrowed from the OE layer index
+#
+# Copyright (C) 2013-2014 Intel Corporation
+#
+
+import sys
+import os
+import os.path
+import tempfile
+import textwrap
+import difflib
+import utils
+import shutil
+import re
+from collections import OrderedDict, defaultdict
+
+
+# Help us to find places to insert values
+recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRC_URI', 'do_fetch', 'do_unpack', 'do_patch', 'EXTRA_OECONF', 'do_configure', 'EXTRA_OEMAKE', 'do_compile', 'do_install', 'do_populate_sysroot', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'do_package', 'do_deploy']
+# Variables that sometimes are a bit long but shouldn't be wrapped
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER']
+list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
+meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
+
+
+def pn_to_recipe(cooker, pn):
+ """Convert a recipe name (PN) to the path to the recipe file"""
+ import bb.providers
+
+ if pn in cooker.recipecache.pkg_pn:
+ filenames = cooker.recipecache.pkg_pn[pn]
+ best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecache, cooker.recipecache.pkg_pn)
+ return best[3]
+ 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(fn, d):
+ """Parse an individual recipe"""
+ import bb.cache
+ envdata = bb.cache.Cache.loadDataFull(fn, [], d)
+ return envdata
+
+
+def get_var_files(fn, varlist, d):
+ """Find the file in which each of a list of variables is set.
+ Note: requires variable history to be enabled when parsing.
+ """
+ envdata = parse_recipe(fn, d)
+ varfiles = {}
+ for v in varlist:
+ history = envdata.varhistory.variable(v)
+ files = []
+ for event in history:
+ if 'file' in event and not 'flag' in event:
+ files.append(event['file'])
+ if files:
+ actualfile = files[-1]
+ else:
+ actualfile = None
+ varfiles[v] = actualfile
+
+ return varfiles
+
+
+def patch_recipe_file(fn, values, patch=False, relpath=''):
+ """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
+ since this cannot handle all situations.
+ """
+ remainingnames = {}
+ for k in values.keys():
+ remainingnames[k] = recipe_progression.index(k) if k in recipe_progression else -1
+ remainingnames = OrderedDict(sorted(remainingnames.iteritems(), key=lambda x: x[1]))
+
+ with tempfile.NamedTemporaryFile('w', delete=False) as tf:
+ def outputvalue(name):
+ rawtext = '%s = "%s"\n' % (name, values[name])
+ if name in nowrap_vars:
+ tf.write(rawtext)
+ elif name in list_vars:
+ splitvalue = values[name].split()
+ if len(splitvalue) > 1:
+ linesplit = ' \\\n' + (' ' * (len(name) + 4))
+ tf.write('%s = "%s%s"\n' % (name, linesplit.join(splitvalue), linesplit))
+ else:
+ tf.write(rawtext)
+ else:
+ wrapped = textwrap.wrap(rawtext)
+ for wrapline in wrapped[:-1]:
+ tf.write('%s \\\n' % wrapline)
+ tf.write('%s\n' % wrapped[-1])
+
+ tfn = tf.name
+ with open(fn, 'r') as f:
+ # First runthrough - find existing names (so we know not to insert based on recipe_progression)
+ # Second runthrough - make the changes
+ existingnames = []
+ for runthrough in [1, 2]:
+ currname = None
+ for line in f:
+ if not currname:
+ insert = False
+ for k in remainingnames.keys():
+ for p in recipe_progression:
+ if re.match('^%s[ ?:=]' % p, line):
+ if remainingnames[k] > -1 and recipe_progression.index(p) > remainingnames[k] and runthrough > 1 and not k in existingnames:
+ outputvalue(k)
+ del remainingnames[k]
+ break
+ for k in remainingnames.keys():
+ if re.match('^%s[ ?:=]' % k, line):
+ currname = k
+ if runthrough == 1:
+ existingnames.append(k)
+ else:
+ del remainingnames[k]
+ break
+ if currname and runthrough > 1:
+ outputvalue(currname)
+
+ if currname:
+ sline = line.rstrip()
+ if not sline.endswith('\\'):
+ currname = None
+ continue
+ if runthrough > 1:
+ tf.write(line)
+ f.seek(0)
+ if remainingnames:
+ tf.write('\n')
+ for k in remainingnames.keys():
+ outputvalue(k)
+
+ with open(tfn, 'U') as f:
+ tolines = f.readlines()
+ if patch:
+ with open(fn, 'U') as f:
+ fromlines = f.readlines()
+ relfn = os.path.relpath(fn, relpath)
+ diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
+ os.remove(tfn)
+ return diff
+ else:
+ with open(fn, 'w') as f:
+ f.writelines(tolines)
+ os.remove(tfn)
+ return None
+
+def localise_file_vars(fn, varfiles, varlist):
+ """Given a list of variables and variable history (fetched with get_var_files())
+ find where each variable should be set/changed. This handles for example where a
+ recipe includes an inc file where variables might be changed - in most cases
+ we want to update the inc file when changing the variable value rather than adding
+ it to the recipe itself.
+ """
+ fndir = os.path.dirname(fn) + os.sep
+
+ first_meta_file = None
+ for v in meta_vars:
+ f = varfiles.get(v, None)
+ if f:
+ actualdir = os.path.dirname(f) + os.sep
+ if actualdir.startswith(fndir):
+ first_meta_file = f
+ break
+
+ filevars = defaultdict(list)
+ for v in varlist:
+ f = varfiles[v]
+ # Only return files that are in the same directory as the recipe or in some directory below there
+ # (this excludes bbclass files and common inc files that wouldn't be appropriate to set the variable
+ # in if we were going to set a value specific to this recipe)
+ if f:
+ actualfile = f
+ else:
+ # Variable isn't in a file, if it's one of the "meta" vars, use the first file with a meta var in it
+ if first_meta_file:
+ actualfile = first_meta_file
+ else:
+ actualfile = fn
+
+ actualdir = os.path.dirname(actualfile) + os.sep
+ if not actualdir.startswith(fndir):
+ actualfile = fn
+ filevars[actualfile].append(v)
+
+ return filevars
+
+def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
+ """Modify a list of variable values in the specified recipe. Handles inc files if
+ used by the recipe.
+ """
+ varlist = varvalues.keys()
+ varfiles = get_var_files(fn, varlist, d)
+ locs = localise_file_vars(fn, varfiles, varlist)
+ patches = []
+ for f,v in locs.iteritems():
+ vals = {k: varvalues[k] for k in v}
+ patchdata = patch_recipe_file(f, vals, patch, relpath)
+ if patch:
+ patches.append(patchdata)
+
+ if patch:
+ return patches
+ else:
+ return None
+
+
+
+def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
+ """Copy (local) recipe files, including both files included via include/require,
+ and files referred to in the SRC_URI variable."""
+ import bb.fetch2
+ import oe.path
+
+ # 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()
+
+ # Copy local files to target directory and gather any remote files
+ bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep
+ remotes = []
+ 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:
+ # Only import files that are under the meta directory
+ if path.startswith(bb_dir):
+ if not whole_dir:
+ relpath = os.path.relpath(path, bb_dir)
+ subdir = os.path.join(tgt_dir, os.path.dirname(relpath))
+ if not os.path.exists(subdir):
+ os.makedirs(subdir)
+ shutil.copy2(path, os.path.join(tgt_dir, relpath))
+ else:
+ remotes.append(path)
+ # Simply copy whole meta dir, if requested
+ if whole_dir:
+ shutil.copytree(bb_dir, tgt_dir)
+
+ return remotes
+
+
+def get_recipe_patches(d):
+ """Get a list of the patches included in SRC_URI within a recipe."""
+ 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)
+ return patchfiles
+
+
+def validate_pn(pn):
+ """Perform validation on a recipe name (PN) for a new recipe."""
+ reserved_names = ['forcevariable', 'append', 'prepend', 'remove']
+ if not re.match('[0-9a-z-]+', pn):
+ return 'Recipe name "%s" is invalid: only characters 0-9, a-z and - are allowed' % pn
+ elif pn in reserved_names:
+ return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
+ elif pn.startswith('pn-'):
+ return 'Recipe name "%s" is invalid: names starting with "pn-" are reserved' % pn
+ return ''
+
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index bc2524f593..f42a2ae7b3 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -111,24 +111,25 @@ class Rootfs(object):
True, False, self.d):
delayed_postinsts = self._get_delayed_postinsts()
if delayed_postinsts is not None:
- bb.fatal("The following packages could not be configured"
+ bb.fatal("The following packages could not be configured "
"offline and rootfs is read-only: %s" %
delayed_postinsts)
if self.d.getVar('USE_DEVFS', True) != "1":
self._create_devfs()
- self._uninstall_uneeded()
+ self._uninstall_unneeded()
self._insert_feed_uris()
self._run_ldconfig()
- self._generate_kernel_module_deps()
+ if self.d.getVar('USE_DEPMOD', True) != "0":
+ self._generate_kernel_module_deps()
self._cleanup()
- def _uninstall_uneeded(self):
+ def _uninstall_unneeded(self):
# Remove unneeded init script symlinks
delayed_postinsts = self._get_delayed_postinsts()
if delayed_postinsts is None:
@@ -137,34 +138,39 @@ class Rootfs(object):
self.d.getVar('IMAGE_ROOTFS', True),
"run-postinsts", "remove"])
- # Remove unneeded package-management related components
- if bb.utils.contains("IMAGE_FEATURES", "package-management",
- True, False, self.d):
- return
+ runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
+ True, False, self.d)
+ if not runtime_pkgmanage:
+ # Remove components that we don't need if we're not going to install
+ # additional packages at runtime
+ if delayed_postinsts is None:
+ installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
+ pkgs_to_remove = list()
+ with open(installed_pkgs_dir, "r+") as installed_pkgs:
+ pkgs_installed = installed_pkgs.read().split('\n')
+ for pkg_installed in pkgs_installed[:]:
+ pkg = pkg_installed.split()[0]
+ if pkg in ["update-rc.d",
+ "base-passwd",
+ self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
+ ]:
+ pkgs_to_remove.append(pkg)
+ pkgs_installed.remove(pkg_installed)
+
+ if len(pkgs_to_remove) > 0:
+ self.pm.remove(pkgs_to_remove, False)
+ # Update installed_pkgs.txt
+ open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
- if delayed_postinsts is None:
- installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
- pkgs_to_remove = list()
- with open(installed_pkgs_dir, "r+") as installed_pkgs:
- pkgs_installed = installed_pkgs.read().split('\n')
- for pkg_installed in pkgs_installed[:]:
- pkg = pkg_installed.split()[0]
- if pkg in ["update-rc.d",
- "base-passwd",
- self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
- ]:
- pkgs_to_remove.append(pkg)
- pkgs_installed.remove(pkg_installed)
-
- if len(pkgs_to_remove) > 0:
- self.pm.remove(pkgs_to_remove, False)
- # Update installed_pkgs.txt
- open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
+ else:
+ self._save_postinsts()
- else:
- self._save_postinsts()
+ post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True)
+ execute_pre_post_process(self.d, post_uninstall_cmds)
- self.pm.remove_packaging_data()
+ if not runtime_pkgmanage:
+ # 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),
@@ -209,16 +215,17 @@ class Rootfs(object):
'new', '-v'])
def _generate_kernel_module_deps(self):
- kernel_abi_ver_file = os.path.join(self.d.getVar('STAGING_KERNEL_DIR', True),
+ kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR', True), "kernel-depmod",
'kernel-abiversion')
- if os.path.exists(kernel_abi_ver_file):
- kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
- modules_dir = os.path.join(self.image_rootfs, 'lib', 'modules', kernel_ver)
+ 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)
+
+ kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
+ modules_dir = os.path.join(self.image_rootfs, 'lib', 'modules', kernel_ver)
- bb.utils.mkdirhier(modules_dir)
+ bb.utils.mkdirhier(modules_dir)
- self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs,
- kernel_ver])
+ self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver])
"""
Create devfs:
@@ -327,6 +334,11 @@ class RpmRootfs(Rootfs):
self.pm.rpm_setup_smart_target_config()
+ @staticmethod
+ def _depends_list():
+ return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
+ 'RPM_POSTPROCESS_COMMANDS', 'RPM_PREFER_ELF_ARCH']
+
def _get_delayed_postinsts(self):
postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
if os.path.isdir(postinst_dir):
@@ -342,7 +354,21 @@ class RpmRootfs(Rootfs):
# already saved in /etc/rpm-postinsts
pass
- def _log_check(self):
+ def _log_check_warn(self):
+ r = re.compile('^(warn|Warn|NOTE: warn|NOTE: Warn)')
+ log_path = self.d.expand("${T}/log.do_rootfs")
+ with open(log_path, 'r') as log:
+ for line in log.read().split('\n'):
+ if 'log_check' in line:
+ continue
+
+ m = r.search(line)
+ if m:
+ bb.warn('log_check: There is a warn message in the logfile')
+ bb.warn('log_check: Matched keyword: [%s]' % m.group())
+ bb.warn('log_check: %s\n' % line)
+
+ def _log_check_error(self):
r = re.compile('(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)')
log_path = self.d.expand("${T}/log.do_rootfs")
with open(log_path, 'r') as log:
@@ -365,6 +391,10 @@ class RpmRootfs(Rootfs):
if found_error == 6:
bb.fatal(message)
+ def _log_check(self):
+ 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)
@@ -379,6 +409,7 @@ class RpmRootfs(Rootfs):
# __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()
+ bb.utils.remove(self.image_rootfs + "/install", True)
class DpkgRootfs(Rootfs):
@@ -417,6 +448,10 @@ class DpkgRootfs(Rootfs):
self.pm.run_pre_post_installs()
+ @staticmethod
+ def _depends_list():
+ return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND']
+
def _get_delayed_postinsts(self):
pkg_list = []
with open(self.image_rootfs + "/var/lib/dpkg/status") as status:
@@ -679,6 +714,10 @@ class OpkgRootfs(Rootfs):
if self.inc_opkg_image_gen == "1":
self.pm.backup_packaging_data()
+ @staticmethod
+ def _depends_list():
+ return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
+
def _get_delayed_postinsts(self):
pkg_list = []
status_file = os.path.join(self.image_rootfs,
@@ -722,6 +761,15 @@ class OpkgRootfs(Rootfs):
def _cleanup(self):
pass
+def get_class_for_type(imgtype):
+ return {"rpm": RpmRootfs,
+ "ipk": OpkgRootfs,
+ "deb": DpkgRootfs}[imgtype]
+
+def variable_depends(d, manifest_dir=None):
+ img_type = d.getVar('IMAGE_PKGTYPE', True)
+ cls = get_class_for_type(img_type)
+ return cls._depends_list()
def create_rootfs(d, manifest_dir=None):
env_bkp = os.environ.copy()
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index ca349c433c..a6767412c7 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -269,6 +269,8 @@ class DpkgSdk(Sdk):
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))
+
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -303,7 +305,7 @@ def sdk_list_installed_packages(d, target, format=None, rootfs_dir=None):
os_var = ["SDK_OS", None][target is True]
return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list(format)
elif img_type == "ipk":
- conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_Target"][target is True]
+ conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list(format)
elif img_type == "deb":
return DpkgPkgsList(d, rootfs_dir).list(format)
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index d58147f78f..af7617ee61 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -14,6 +14,9 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
def isPackageGroup(fn):
inherits = " ".join(dataCache.inherits[fn])
return "/packagegroup.bbclass" in inherits
+ def isAllArch(fn):
+ inherits = " ".join(dataCache.inherits[fn])
+ return "/allarch.bbclass" in inherits
def isImage(fn):
return "/image.bbclass" in " ".join(dataCache.inherits[fn])
@@ -36,8 +39,8 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Only target packages beyond here
- # packagegroups are assumed to have well behaved names which don't change between architecures/tunes
- if isPackageGroup(fn):
+ # allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes
+ if isPackageGroup(fn) and isAllArch(fn):
return False
# Exclude well defined machine specific configurations which don't change ABI
@@ -58,6 +61,18 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
# Default to keep dependencies
return True
+def sstate_lockedsigs(d):
+ sigs = {}
+ types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split()
+ for t in types:
+ lockedsigs = (d.getVar("SIGGEN_LOCKEDSIGS_%s" % t, True) or "").split()
+ for ls in lockedsigs:
+ pn, task, h = ls.split(":", 2)
+ if pn not in sigs:
+ sigs[pn] = {}
+ sigs[pn][task] = h
+ return sigs
+
class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
name = "OEBasic"
def init_rundepcheck(self, data):
@@ -72,10 +87,99 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
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.lockedsigs = sstate_lockedsigs(data)
+ self.lockedhashes = {}
+ self.lockedpnmap = {}
+ self.lockedhashfn = {}
+ self.machine = data.getVar("MACHINE", True)
+ self.mismatch_msgs = []
pass
def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
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)
+
+ def set_taskdata(self, data):
+ coredata, self.lockedpnmap, self.lockedhashfn = data
+ super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
+
+ def dump_sigs(self, dataCache, options):
+ self.dump_lockedsigs()
+ 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)
+
+ recipename = dataCache.pkg_fn[fn]
+ self.lockedpnmap[fn] = recipename
+ self.lockedhashfn[fn] = dataCache.hashfn[fn]
+ if recipename in self.lockedsigs:
+ if task in self.lockedsigs[recipename]:
+ k = fn + "." + task
+ h_locked = self.lockedsigs[recipename][task]
+ self.lockedhashes[k] = h_locked
+ self.taskhash[k] = h_locked
+ #bb.warn("Using %s %s %s" % (recipename, task, h))
+
+ if h != h_locked:
+ self.mismatch_msgs.append('The %s:%s sig (%s) changed, use locked sig %s to instead'
+ % (recipename, task, h, h_locked))
+
+ return h_locked
+ #bb.warn("%s %s %s" % (recipename, task, h))
+ return h
+
+ def dump_sigtask(self, fn, task, stampbase, runtime):
+ k = fn + "." + task
+ if k in self.lockedhashes:
+ return
+ super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime)
+
+ def dump_lockedsigs(self, sigfile=None):
+ if not sigfile:
+ sigfile = os.getcwd() + "/locked-sigs.inc"
+
+ bb.plain("Writing locked sigs to %s" % sigfile)
+ types = {}
+ for k in self.runtaskdeps:
+ fn = k.rsplit(".",1)[0]
+ t = self.lockedhashfn[fn].split(" ")[1].split(":")[5]
+ t = 't-' + t.replace('_', '-')
+ if t not in types:
+ types[t] = []
+ types[t].append(k)
+
+ with open(sigfile, "w") as f:
+ for t in types:
+ 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:
+ continue
+ f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n")
+ f.write(' "\n')
+ f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
+
+ def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_CHECK_LEVEL", True)
+ for task in range(len(sq_fn)):
+ if task not in ret:
+ for pn in self.lockedsigs:
+ if sq_hash[task] in self.lockedsigs[pn].itervalues():
+ self.mismatch_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
+ % (pn, sq_task[task], sq_hash[task]))
+
+ if self.mismatch_msgs and checklevel == 'warn':
+ bb.warn("\n".join(self.mismatch_msgs))
+ elif self.mismatch_msgs and checklevel == 'error':
+ bb.fatal("\n".join(self.mismatch_msgs))
+
+
# Insert these classes into siggen's namespace so it can see and select them
bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 0a623c75b1..17d09045e4 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -52,7 +52,7 @@ class XTerminal(Terminal):
raise UnsupportedTerminal(self.name)
class Gnome(XTerminal):
- command = 'gnome-terminal -t "{title}" -x {command}'
+ command = 'gnome-terminal -t "{title}" --disable-factory -x {command}'
priority = 2
class Mate(XTerminal):
@@ -63,6 +63,10 @@ class Xfce(XTerminal):
command = 'xfce4-terminal -T "{title}" -e "{command}"'
priority = 2
+class Terminology(XTerminal):
+ command = 'terminology -T="{title}" -e {command}'
+ priority = 2
+
class Konsole(XTerminal):
command = 'konsole -T "{title}" -e {command}'
priority = 2
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 0a1d1080c9..1f84ba4b25 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -151,3 +151,36 @@ def execute_pre_post_process(d, cmds):
if cmd != '':
bb.note("Executing %s ..." % cmd)
bb.build.exec_func(cmd, d)
+
+def multiprocess_exec(commands, function):
+ import signal
+ import multiprocessing
+
+ if not commands:
+ return []
+
+ def init_worker():
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+
+ 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 squashspaces(string):
+ import re
+ return re.sub("\s+", " ", string).strip()
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 0db6cb80a9..0b7e7dc42d 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -10,25 +10,29 @@
import os, re, mmap
import unittest
import inspect
-
-
-def loadTests(tc):
-
- # set the context object passed from the test class
- setattr(oeTest, "tc", tc)
- # set ps command to use
- setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
- # prepare test suite, loader and runner
- suite = unittest.TestSuite()
+import subprocess
+from oeqa.utils.decorators import LogResults
+
+def loadTests(tc, type="runtime"):
+ if type == "runtime":
+ # set the context object passed from the test class
+ setattr(oeTest, "tc", tc)
+ # set ps command to use
+ setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
+ # prepare test suite, loader and runner
+ suite = unittest.TestSuite()
+ elif type == "sdk":
+ # set the context object passed from the test class
+ setattr(oeTest, "tc", tc)
testloader = unittest.TestLoader()
testloader.sortTestMethodsUsing = None
suite = testloader.loadTestsFromNames(tc.testslist)
return suite
-def runTests(tc):
+def runTests(tc, type="runtime"):
- suite = loadTests(tc)
+ suite = loadTests(tc, type)
print("Test modules %s" % tc.testslist)
print("Found %s tests" % suite.countTestCases())
runner = unittest.TextTestRunner(verbosity=2)
@@ -36,24 +40,10 @@ def runTests(tc):
return result
-
+@LogResults
class oeTest(unittest.TestCase):
longMessage = True
- testFailures = []
- testSkipped = []
- testErrors = []
-
- def run(self, result=None):
- super(oeTest, self).run(result)
-
- # we add to our own lists the results, we use those for decorators
- if len(result.failures) > len(oeTest.testFailures):
- oeTest.testFailures.append(str(result.failures[-1][0]).split()[0])
- if len(result.skipped) > len(oeTest.testSkipped):
- oeTest.testSkipped.append(str(result.skipped[-1][0]).split()[0])
- if len(result.errors) > len(oeTest.testErrors):
- oeTest.testErrors.append(str(result.errors[-1][0]).split()[0])
@classmethod
def hasPackage(self, pkg):
@@ -71,13 +61,22 @@ class oeTest(unittest.TestCase):
else:
return False
-
class oeRuntimeTest(oeTest):
-
def __init__(self, methodName='runTest'):
self.target = oeRuntimeTest.tc.target
super(oeRuntimeTest, self).__init__(methodName)
+ #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 oeSDKTest(oeTest):
+ def __init__(self, methodName='runTest'):
+ self.sdktestdir = oeSDKTest.tc.sdktestdir
+ super(oeSDKTest, self).__init__(methodName)
def getmodule(pos=2):
# stack returns a list of tuples containg frame information
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
new file mode 100644
index 0000000000..4c58dc1d7f
--- /dev/null
+++ b/meta/lib/oeqa/runtime/_ptest.py
@@ -0,0 +1,124 @@
+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("smart"):
+ 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"),
+ "glob", oeRuntimeTest.tc.d.getVar('PKGDATA_DIR', True), 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 setUp(self):
+ self.buildhist_dir = oeRuntimeTest.tc.d.getVar("BUILDHISTORY_DIR_IMAGE", True)
+ self.assertTrue(os.path.exists(self.buildhist_dir))
+ 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()
+ cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest")
+ if not cond:
+ self.install_packages(self.install_complementary("*-ptest"))
+ self.install_packages(['ptest-runner'])
+
+ self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0)
+ self.target.copy_from('/tmp/ptest.log', self.ptest_log)
+ shutil.copyfile(self.ptest_log, os.path.join(self.buildhist_dir, "ptest.log"))
+
+ result = self.parse_ptest(os.path.join(self.buildhist_dir, "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 = ['fail'])
diff --git a/meta/lib/oeqa/runtime/buildcvs.py b/meta/lib/oeqa/runtime/buildcvs.py
index f1fbf19c1f..fe6cbfbcd5 100644
--- a/meta/lib/oeqa/runtime/buildcvs.py
+++ b/meta/lib/oeqa/runtime/buildcvs.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class BuildCvsTest(oeRuntimeTest):
"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,
diff --git a/meta/lib/oeqa/runtime/buildiptables.py b/meta/lib/oeqa/runtime/buildiptables.py
index f6061a7f98..09e252df8c 100644
--- a/meta/lib/oeqa/runtime/buildiptables.py
+++ b/meta/lib/oeqa/runtime/buildiptables.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class BuildIptablesTest(oeRuntimeTest):
"http://netfilter.org/projects/iptables/files/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,
diff --git a/meta/lib/oeqa/runtime/buildsudoku.py b/meta/lib/oeqa/runtime/buildsudoku.py
index a754f1d9ea..802b060010 100644
--- a/meta/lib/oeqa/runtime/buildsudoku.py
+++ b/meta/lib/oeqa/runtime/buildsudoku.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import TargetBuildProject
@@ -14,6 +14,7 @@ class SudokuTest(oeRuntimeTest):
"http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
self.project.download_archive()
+ @testcase(207)
@skipUnlessPassed("test_ssh")
def test_sudoku(self):
self.assertEqual(self.project.run_configure(), 0,
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
index c03688206f..cc537f7766 100644
--- a/meta/lib/oeqa/runtime/connman.py
+++ b/meta/lib/oeqa/runtime/connman.py
@@ -21,7 +21,7 @@ class ConnmanTest(oeRuntimeTest):
(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')
diff --git a/meta/lib/oeqa/runtime/date.py b/meta/lib/oeqa/runtime/date.py
index a208e29ada..97e8ee42ad 100644
--- a/meta/lib/oeqa/runtime/date.py
+++ b/meta/lib/oeqa/runtime/date.py
@@ -4,6 +4,7 @@ import re
class DateTest(oeRuntimeTest):
+ @testcase(211)
@skipUnlessPassed("test_ssh")
def test_date(self):
(status, output) = self.target.run('date +"%Y-%m-%d %T"')
diff --git a/meta/lib/oeqa/runtime/df.py b/meta/lib/oeqa/runtime/df.py
index b6da35027c..09569d5ff6 100644
--- a/meta/lib/oeqa/runtime/df.py
+++ b/meta/lib/oeqa/runtime/df.py
@@ -5,6 +5,7 @@ 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}'")
diff --git a/meta/lib/oeqa/runtime/dmesg.py b/meta/lib/oeqa/runtime/dmesg.py
index 64247ea704..5831471e50 100644
--- a/meta/lib/oeqa/runtime/dmesg.py
+++ b/meta/lib/oeqa/runtime/dmesg.py
@@ -5,7 +5,8 @@ from oeqa.utils.decorators import *
class DmesgTest(oeRuntimeTest):
+ @testcase(215)
@skipUnlessPassed('test_ssh')
def test_dmesg(self):
- (status, output) = self.target.run('dmesg | grep -v mmci-pl18x | grep -v "error changing net interface name" | grep -iv "dma timeout" | grep -i error')
+ (status, output) = self.target.run('dmesg | grep -v mmci-pl18x | grep -v "error changing net interface name" | grep -iv "dma timeout" | grep -v usbhid | grep -i error')
self.assertEqual(status, 1, msg = "Error messages in dmesg log: %s" % output)
diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/runtime/files/test.cpp
new file mode 100644
index 0000000000..9e1a76473d
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/test.cpp
@@ -0,0 +1,3 @@
+#include <limits>
+
+int main() {} \ No newline at end of file
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index b63badd3e4..a7f62e1758 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -14,19 +14,29 @@ class GccCompileTest(oeRuntimeTest):
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)
+ 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)
diff --git a/meta/lib/oeqa/runtime/kernelmodule.py b/meta/lib/oeqa/runtime/kernelmodule.py
index cbc5742eff..2e81720327 100644
--- a/meta/lib/oeqa/runtime/kernelmodule.py
+++ b/meta/lib/oeqa/runtime/kernelmodule.py
@@ -14,6 +14,7 @@ class KernelModuleTest(oeRuntimeTest):
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):
diff --git a/meta/lib/oeqa/runtime/ldd.py b/meta/lib/oeqa/runtime/ldd.py
index 4374530fc4..bce56c4270 100644
--- a/meta/lib/oeqa/runtime/ldd.py
+++ b/meta/lib/oeqa/runtime/ldd.py
@@ -1,5 +1,5 @@
import unittest
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -13,6 +13,7 @@ class LddTest(oeRuntimeTest):
(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')
diff --git a/meta/lib/oeqa/runtime/logrotate.py b/meta/lib/oeqa/runtime/logrotate.py
index 80489a3267..86d791c300 100644
--- a/meta/lib/oeqa/runtime/logrotate.py
+++ b/meta/lib/oeqa/runtime/logrotate.py
@@ -19,6 +19,7 @@ class LogrotateTest(oeRuntimeTest):
(status, output) = self.target.run("sed -i 's#wtmp {#wtmp {\\n olddir /home/root/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')
diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
index 13a3b54b18..ab0a6ccd69 100644
--- a/meta/lib/oeqa/runtime/multilib.py
+++ b/meta/lib/oeqa/runtime/multilib.py
@@ -10,6 +10,7 @@ def setUpModule():
class MultilibTest(oeRuntimeTest):
+ @testcase('279')
@skipUnlessPassed('test_ssh')
def test_file_connman(self):
self.assertTrue(oeRuntimeTest.hasPackage('connman-gnome'), msg="This test assumes connman-gnome is installed")
diff --git a/meta/lib/oeqa/runtime/pam.py b/meta/lib/oeqa/runtime/pam.py
index 52e1eb88e6..c8205c9abc 100644
--- a/meta/lib/oeqa/runtime/pam.py
+++ b/meta/lib/oeqa/runtime/pam.py
@@ -2,7 +2,7 @@
# Note that the image under test must have "pam" in DISTRO_FEATURES
import unittest
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -12,13 +12,14 @@ def setUpModule():
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, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
+ 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, 2, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
+ 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, 2, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))
+ 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
new file mode 100644
index 0000000000..2953742f23
--- /dev/null
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -0,0 +1,202 @@
+import os
+import unittest
+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 glx",
+ "[drm] Cannot find any crtc or sizes - going 1024x768"
+ ]
+
+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',
+] + common_errors
+
+qemux86_common = [
+ 'Fast TSC calibration',
+ '_OSC failed (AE_NOT_FOUND); disabling ASPM',
+ 'Open ACPI failed (/var/run/acpid.socket) (No such file or directory)',
+ 'wrong ELF class',
+] + common_errors
+
+ignore_errors = {
+ 'default' : common_errors,
+ 'qemux86' : [
+ 'Failed to access perfctr msr (MSR c1 is 0)',
+ "fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.",
+ ] + qemux86_common,
+ 'qemux86-64' : qemux86_common,
+ 'qemumips' : [
+ 'Failed to load module "glx"',
+ ] + 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"',
+ ] + 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"'
+ ] + common_errors,
+ 'emenlow' : x86_common,
+ 'crownbay' : x86_common,
+ 'genericx86' : x86_common,
+ 'genericx86-64' : x86_common,
+ 'edgerouter' : [
+ 'Fatal server error:',
+ ] + common_errors,
+ 'minnow' : [
+ 'netlink init failed',
+ 'NETLINK INITIALIZATION FAILED',
+ ] + common_errors,
+ 'jasperforest' : [
+ 'Activated service \'org.bluez\' failed:',
+ 'Unable to find NFC netlink family',
+ 'netlink init failed',
+ 'NETLINK INITIALIZATION FAILED',
+ ] + common_errors,
+}
+
+log_locations = ["/var/log/","/var/log/dmesg", "/tmp/dmesg_output.log"]
+
+class ParseLogsTest(oeRuntimeTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.errors = errors
+ self.ignore_errors = ignore_errors
+ self.log_locations = log_locations
+ self.msg = ""
+
+ def getMachine(self):
+ (status, output) = self.target.run("uname -n")
+ return output
+
+ #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
+
+ #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("*", "\*")
+ 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 = []
+ for log in logs:
+ thegrep = self.build_grepcmd(errors, ignore_errors, log)
+ try:
+ (status, result) = self.target.run(thegrep)
+ except:
+ pass
+ if result:
+ results[log] = {}
+ rez = result.splitlines()
+ for xrez in rez:
+ command = "grep \"\\"+str(xrez)+"\" -B "+str(lines_before)+" -A "+str(lines_after)+" "+str(log)
+ try:
+ (status, yrez) = self.target.run(command)
+ except:
+ pass
+ results[log][xrez]=yrez
+ 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")
+ (status, dmesg2) = self.target.run("echo \""+str(dmesg)+"\" > /tmp/dmesg_output.log")
+
+ @skipUnlessPassed('test_ssh')
+ def test_parselogs(self):
+ self.write_dmesg()
+ log_list = self.getLogList(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
index c9bb684c11..65da028d4b 100644
--- a/meta/lib/oeqa/runtime/perl.py
+++ b/meta/lib/oeqa/runtime/perl.py
@@ -18,6 +18,7 @@ class PerlTest(oeRuntimeTest):
(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)
diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py
index c037ab2c18..0387b9a03e 100644
--- a/meta/lib/oeqa/runtime/python.py
+++ b/meta/lib/oeqa/runtime/python.py
@@ -18,6 +18,7 @@ class PythonTest(oeRuntimeTest):
(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)
diff --git a/meta/lib/oeqa/runtime/rpm.py b/meta/lib/oeqa/runtime/rpm.py
index 084d22f96b..b17e8b46a8 100644
--- a/meta/lib/oeqa/runtime/rpm.py
+++ b/meta/lib/oeqa/runtime/rpm.py
@@ -18,6 +18,7 @@ class RpmBasicTest(oeRuntimeTest):
(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')
@@ -34,11 +35,13 @@ class RpmInstallRemoveTest(oeRuntimeTest):
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')
diff --git a/meta/lib/oeqa/runtime/scanelf.py b/meta/lib/oeqa/runtime/scanelf.py
index b9abf24640..43a024ab9a 100644
--- a/meta/lib/oeqa/runtime/scanelf.py
+++ b/meta/lib/oeqa/runtime/scanelf.py
@@ -11,6 +11,7 @@ class ScanelfTest(oeRuntimeTest):
def setUp(self):
self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path'
+ @testcase(966)
@skipUnlessPassed('test_ssh')
def test_scanelf_textrel(self):
# print TEXTREL information
@@ -18,6 +19,7 @@ class ScanelfTest(oeRuntimeTest):
(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
diff --git a/meta/lib/oeqa/runtime/scp.py b/meta/lib/oeqa/runtime/scp.py
index 03095bf966..48e87d2d0b 100644
--- a/meta/lib/oeqa/runtime/scp.py
+++ b/meta/lib/oeqa/runtime/scp.py
@@ -1,6 +1,6 @@
import os
from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import skipUnlessPassed
+from oeqa.utils.decorators import skipUnlessPassed, testcase
def setUpModule():
if not (oeRuntimeTest.hasPackage("dropbear") or oeRuntimeTest.hasPackage("openssh-sshd")):
@@ -8,6 +8,7 @@ def setUpModule():
class ScpTest(oeRuntimeTest):
+ @testcase(220)
@skipUnlessPassed('test_ssh')
def test_scp_file(self):
test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
diff --git a/meta/lib/oeqa/runtime/skeletoninit.py b/meta/lib/oeqa/runtime/skeletoninit.py
index 557e715a3e..7c7f402e5d 100644
--- a/meta/lib/oeqa/runtime/skeletoninit.py
+++ b/meta/lib/oeqa/runtime/skeletoninit.py
@@ -2,7 +2,7 @@
# 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
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
@@ -20,6 +20,7 @@ class SkeletonBasicTest(oeRuntimeTest):
(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"), "Not appropiate for systemd image")
def test_skeleton_script(self):
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 195f1170c6..3b49314df7 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -1,6 +1,6 @@
import unittest
import re
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.httpserver import HTTPService
@@ -25,6 +25,7 @@ class SmartTest(oeRuntimeTest):
class SmartBasicTest(SmartTest):
+ @testcase(716)
@skipUnlessPassed('test_ssh')
def test_smart_help(self):
self.smart('--help')
@@ -32,15 +33,19 @@ class SmartBasicTest(SmartTest):
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')
@@ -58,6 +63,7 @@ class SmartRepoTest(SmartTest):
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)
@@ -76,6 +82,7 @@ class SmartRepoTest(SmartTest):
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')
@@ -86,17 +93,20 @@ class SmartRepoTest(SmartTest):
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')
@@ -105,6 +115,7 @@ class SmartRepoTest(SmartTest):
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')
diff --git a/meta/lib/oeqa/runtime/ssh.py b/meta/lib/oeqa/runtime/ssh.py
index e64866019f..0e76d5d512 100644
--- a/meta/lib/oeqa/runtime/ssh.py
+++ b/meta/lib/oeqa/runtime/ssh.py
@@ -10,6 +10,7 @@ def setUpModule():
class SshTest(oeRuntimeTest):
+ @testcase(224)
@skipUnlessPassed('test_ping')
def test_ssh(self):
(status, output) = self.target.run('uname -a')
diff --git a/meta/lib/oeqa/runtime/syslog.py b/meta/lib/oeqa/runtime/syslog.py
index b95b36175a..7fa018e97f 100644
--- a/meta/lib/oeqa/runtime/syslog.py
+++ b/meta/lib/oeqa/runtime/syslog.py
@@ -13,6 +13,7 @@ class SyslogTest(oeRuntimeTest):
(status,output) = self.target.run('/sbin/syslogd --help')
self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
+ @testcase(201)
@skipUnlessPassed("test_syslog_help")
def test_syslog_running(self):
(status,output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [s]yslogd')
@@ -33,6 +34,7 @@ class SyslogTestConfig(oeRuntimeTest):
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"), "Not appropiate for systemd image")
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
index 6de84f891b..1451698bb3 100644
--- a/meta/lib/oeqa/runtime/systemd.py
+++ b/meta/lib/oeqa/runtime/systemd.py
@@ -28,6 +28,7 @@ class SystemdBasicTests(SystemdTest):
def test_systemd_basic(self):
self.systemctl('--version')
+ @testcase(551)
@skipUnlessPassed('test_system_basic')
def test_systemd_list(self):
self.systemctl('list-unit-files')
@@ -51,6 +52,7 @@ class SystemdBasicTests(SystemdTest):
return (False, output)
time.sleep(10)
+ @testcase(550)
@skipUnlessPassed('test_systemd_basic')
def test_systemd_failed(self):
settled, output = self.settle()
@@ -69,6 +71,7 @@ class SystemdServiceTests(SystemdTest):
def test_systemd_status(self):
self.systemctl('status --full', 'avahi-daemon.service')
+ @testcase(695)
@skipUnlessPassed('test_systemd_status')
def test_systemd_stop_start(self):
self.systemctl('stop', 'avahi-daemon.service')
@@ -76,6 +79,7 @@ class SystemdServiceTests(SystemdTest):
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.systemctl('disable', 'avahi-daemon.service')
diff --git a/meta/lib/oeqa/runtime/vnc.py b/meta/lib/oeqa/runtime/vnc.py
index 5ed10727bc..f31deff306 100644
--- a/meta/lib/oeqa/runtime/vnc.py
+++ b/meta/lib/oeqa/runtime/vnc.py
@@ -1,4 +1,4 @@
-from oeqa.oetest import oeRuntimeTest
+from oeqa.oetest import oeRuntimeTest, skipModuleUnless
from oeqa.utils.decorators import *
import re
@@ -7,6 +7,7 @@ def setUpModule():
class VNCTest(oeRuntimeTest):
+ @testcase(213)
@skipUnlessPassed('test_ssh')
def test_vnc(self):
(status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log')
diff --git a/meta/lib/oeqa/runtime/x32lib.py b/meta/lib/oeqa/runtime/x32lib.py
index 6bad201b12..ce5e214035 100644
--- a/meta/lib/oeqa/runtime/x32lib.py
+++ b/meta/lib/oeqa/runtime/x32lib.py
@@ -10,6 +10,7 @@ def setUpModule():
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]
diff --git a/meta/lib/oeqa/runtime/xorg.py b/meta/lib/oeqa/runtime/xorg.py
index 12dccd8198..a07031e5c8 100644
--- a/meta/lib/oeqa/runtime/xorg.py
+++ b/meta/lib/oeqa/runtime/xorg.py
@@ -14,8 +14,4 @@ class XorgTest(oeRuntimeTest):
(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])
- @skipUnlessPassed('test_ssh')
- def test_xorg_error(self):
- (status, output) = self.target.run('cat /var/log/Xorg.0.log | grep -v "(EE) error," | grep -v "PreInit" | grep -v "evdev:" | grep -v "glx" | grep "(EE)"')
- self.assertEqual(status, 1, msg="Errors in Xorg log: %s" % output)
diff --git a/meta/lib/oeqa/sdk/__init__.py b/meta/lib/oeqa/sdk/__init__.py
new file mode 100644
index 0000000000..4cf3fa76b6
--- /dev/null
+++ b/meta/lib/oeqa/sdk/__init__.py
@@ -0,0 +1,3 @@
+# 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
new file mode 100644
index 0000000000..c7146fa4af
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildcvs.py
@@ -0,0 +1,25 @@
+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/buildiptables.py b/meta/lib/oeqa/sdk/buildiptables.py
new file mode 100644
index 0000000000..062e5316e7
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildiptables.py
@@ -0,0 +1,26 @@
+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://netfilter.org/projects/iptables/files/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/buildsudoku.py b/meta/lib/oeqa/sdk/buildsudoku.py
new file mode 100644
index 0000000000..dea77c6599
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildsudoku.py
@@ -0,0 +1,26 @@
+from oeqa.oetest import oeSDKTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import SDKBuildProject
+
+def setUpModule():
+ if not oeSDKTest.hasPackage("gtk\+"):
+ skipModule("Image doesn't have gtk+ in manifest")
+
+class SudokuTest(oeSDKTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/sudoku/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
+ "http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
+ self.project.download_archive()
+
+ def test_sudoku(self):
+ self.assertEqual(self.project.run_configure(), 0,
+ msg="Running configure failed")
+
+ self.assertEqual(self.project.run_make(), 0,
+ msg="Running make failed")
+
+ @classmethod
+ def tearDownClass(self):
+ self.project.clean()
diff --git a/meta/lib/oeqa/selftest/_toaster.py b/meta/lib/oeqa/selftest/_toaster.py
index 5a42e937bc..1cf28a0144 100644
--- a/meta/lib/oeqa/selftest/_toaster.py
+++ b/meta/lib/oeqa/selftest/_toaster.py
@@ -14,6 +14,7 @@ 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):
@@ -31,19 +32,22 @@ class ToasterSetup(oeSelfTest):
class Toaster_DB_Tests(ToasterSetup):
# Check if build name is unique - tc_id=795
- def test_Build_Unique_Name_TC795(self):
+ @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
- def test_Build_Unique_Cooker_Log_Path_TC819(self):
+ @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 the number of errors matches the number of orm_logmessage.level entries with value 2 - tc_id=820
- def test_Build_Errors_No_TC820(self):
+ @testcase(820)
+ def test_Build_Errors_No(self):
builds = Build.objects.values('id', 'errors_no')
cnt_err = []
for build in builds:
@@ -53,7 +57,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check if the number of warnings matches the number of orm_logmessage.level entries with value 1 - tc=821
- def test_Build_Warnings_No_TC821(self):
+ @testcase(821)
+ def test_Build_Warnings_No(self):
builds = Build.objects.values('id', 'warnings_no')
cnt_err = []
for build in builds:
@@ -63,7 +68,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check if the build succeeded then the errors_no is 0 - tc_id=822
- def test_Build_Suceeded_Errors_No_TC822(self):
+ @testcase(822)
+ def test_Build_Suceeded_Errors_No(self):
builds = Build.objects.filter(outcome = 0).values('id', 'errors_no')
cnt_err = []
for build in builds:
@@ -71,8 +77,9 @@ class Toaster_DB_Tests(ToasterSetup):
cnt_err.append(build['id'])
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
- # Check if task order is unique for one build - tc=824
- def test_Task_Unique_Order_TC824(self):
+ # 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:
@@ -83,7 +90,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for build id: %s' % cnt_err)
# Check task order sequence for one build - tc=825
- def test_Task_Order_Sequence_TC825(self):
+ @testcase(825)
+ def test_Task_Order_Sequence(self):
builds = builds = Build.objects.values('id')
cnt_err = []
for build in builds:
@@ -100,7 +108,8 @@ class Toaster_DB_Tests(ToasterSetup):
#def test_Task_Disk_IO_TC828(self):
# Check if outcome = 2 (SSTATE) then sstate_result must be 3 (RESTORED) - tc=832
- def test_Task_If_Outcome_2_Sstate_Result_Must_Be_3_TC832(self):
+ @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:
@@ -109,7 +118,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0_TC833(self):
+ @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:
@@ -118,7 +128,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Outcome_0_4_Sstate_Result_Must_Be_0_1_2_TC834(self):
+ @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:
@@ -127,7 +138,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Task_Executed_True_Script_Type_0_2_3_TC891(self):
+ @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:
@@ -136,7 +148,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Task_Executed_True_Outcome_0_4_TC836(self):
+ @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:
@@ -145,7 +158,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Task_Executed_False_Script_Type_0_TC890(self):
+ @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:
@@ -154,7 +168,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Task_If_Task_Executed_False_Outcome_1_2_3_5_TC837(self):
+ @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:
@@ -165,7 +180,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for task id: %s' % cnt_err)
# Key verification - tc=888
- def test_Target_Installed_Package_TC888(self):
+ @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:
@@ -176,7 +192,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for target installed package id: %s' % cnt_err)
# Key verification - tc=889
- def test_Task_Dependency_TC889(self):
+ @testcase(889)
+ def test_Task_Dependency(self):
rows = Task_Dependency.objects.values('id', 'task_id', 'depends_on_id')
cnt_err = []
for row in rows:
@@ -188,6 +205,7 @@ class Toaster_DB_Tests(ToasterSetup):
# 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:
@@ -210,7 +228,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for target image file id: %s' % cnt_err)
# Key verification - tc=884
- def test_Package_Dependency_TC884(self):
+ @testcase(884)
+ def test_Package_Dependency(self):
cnt_err = []
deps = Package_Dependency.objects.values('id', 'package_id', 'depends_on_id')
for dep in deps:
@@ -219,7 +238,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package dependency id: %s' % cnt_err)
# Check if recipe name does not start with a number (0-9) - tc=838
- def test_Recipe_Name_TC838(self):
+ @testcase(838)
+ def test_Recipe_Name(self):
recipes = Recipe.objects.values('id', 'name')
cnt_err = []
for recipe in recipes:
@@ -228,7 +248,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe section matches the content of the SECTION variable (if set) in file_path - tc=839
- def test_Recipe_DB_Section_Match_Recipe_File_Section_TC839(self):
+ @testcase(839)
+ def test_Recipe_DB_Section_Match_Recipe_File_Section(self):
recipes = Recipe.objects.values('id', 'section', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -245,7 +266,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe license matches the content of the LICENSE variable (if set) in file_path - tc=840
- def test_Recipe_DB_License_Match_Recipe_File_License_TC840(self):
+ @testcase(840)
+ def test_Recipe_DB_License_Match_Recipe_File_License(self):
recipes = Recipe.objects.values('id', 'license', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -262,7 +284,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe homepage matches the content of the HOMEPAGE variable (if set) in file_path - tc=841
- def test_Recipe_DB_Homepage_Match_Recipe_File_Homepage_TC841(self):
+ @testcase(841)
+ def test_Recipe_DB_Homepage_Match_Recipe_File_Homepage(self):
recipes = Recipe.objects.values('id', 'homepage', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -279,7 +302,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Check if recipe bugtracker matches the content of the BUGTRACKER variable (if set) in file_path - tc=842
- def test_Recipe_DB_Bugtracker_Match_Recipe_File_Bugtracker_TC842(self):
+ @testcase(842)
+ def test_Recipe_DB_Bugtracker_Match_Recipe_File_Bugtracker(self):
recipes = Recipe.objects.values('id', 'bugtracker', 'file_path')
cnt_err = []
for recipe in recipes:
@@ -296,7 +320,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for recipe id: %s' % cnt_err)
# Recipe key verification, recipe name does not depends on a recipe having the same name - tc=883
- def test_Recipe_Dependency_TC883(self):
+ @testcase(883)
+ def test_Recipe_Dependency(self):
deps = Recipe_Dependency.objects.values('id', 'recipe_id', 'depends_on_id')
cnt_err = []
for dep in deps:
@@ -310,7 +335,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Package_Name_For_Number_TC846(self):
+ @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:
@@ -319,7 +345,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Package_Version_Starts_With_Number_TC847(self):
+ @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:
@@ -328,7 +355,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for package id: %s' % cnt_err)
# Check if package revision starts with 'r' - tc=848
- def test_Package_Revision_Starts_With_r_TC848(self):
+ @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:
@@ -338,6 +366,7 @@ class Toaster_DB_Tests(ToasterSetup):
# 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 = []
@@ -349,6 +378,7 @@ class Toaster_DB_Tests(ToasterSetup):
# 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 = []
@@ -360,6 +390,7 @@ class Toaster_DB_Tests(ToasterSetup):
# 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 = []
@@ -368,7 +399,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Layers_Requests_Exit_Code_TC843(self):
+ @testcase(843)
+ def test_Layers_Requests_Exit_Code(self):
layers = Layer.objects.values('id', 'layer_index_url')
cnt_err = []
for layer in layers:
@@ -378,7 +410,8 @@ class Toaster_DB_Tests(ToasterSetup):
self.assertEqual(len(cnt_err), 0, msg = 'Errors for layer id: %s' % cnt_err)
# Check if the output of bitbake-layers show_layers matches the info from database - tc=895
- def test_Layers_Show_Layers_TC895(self):
+ @testcase(895)
+ def test_Layers_Show_Layers(self):
layers = Layer.objects.values('id', 'name', 'local_path')
cmd = commands.getoutput('bitbake-layers show_layers')
cnt_err = []
@@ -388,7 +421,8 @@ class Toaster_DB_Tests(ToasterSetup):
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
- def test_Start_Django_Timezone_TC905(self):
+ @testcase(905)
+ def test_Start_Django_Timezone(self):
current_path = os.getcwd()
zonefilelist = []
ZONEINFOPATH = '/usr/share/zoneinfo/'
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index d730bfd755..5708d3dc9b 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -7,28 +7,33 @@ import shutil
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):
+ @testcase(789)
def test_run_bitbake_from_dir_1(self):
os.chdir(os.path.join(self.builddir, 'conf'))
bitbake('-e')
+ @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']))
bitbake('-e', env=my_env)
+ @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: Preparing runqueue", result.output)
+ find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Preparing RunQueue", 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)
+ @testcase(103)
def test_local_sstate(self):
bitbake('m4-native -ccleansstate')
bitbake('m4-native')
@@ -37,14 +42,17 @@ class BitbakeTests(oeSelfTest):
find_setscene = re.search("m4-native.*do_.*_setscene", result.output)
self.assertTrue(find_setscene)
+ @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)
+ @testcase(107)
def test_bitbake_invalid_target(self):
result = bitbake('asdf', ignore_status=True)
self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in 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)
@@ -52,6 +60,7 @@ class BitbakeTests(oeSelfTest):
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):
self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
result = bitbake('man -c patch', ignore_status=True)
@@ -59,14 +68,17 @@ class BitbakeTests(oeSelfTest):
bitbake('-cclean man')
self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output)
+ @testcase(163)
def test_force_task(self):
bitbake('m4-native')
+ self.add_command_to_tearDown('bitbake -c clean m4-native')
result = bitbake('-C compile m4-native')
look_for_tasks = ['do_compile', 'do_install', 'do_populate_sysroot']
for task in look_for_tasks:
find_task = re.search("m4-native.*%s" % task, result.output)
self.assertTrue(find_task)
+ @testcase(167)
def test_bitbake_g(self):
result = bitbake('-g core-image-full-cmdline')
self.assertTrue('NOTE: PN build list saved to \'pn-buildlist\'' in result.output)
@@ -74,6 +86,7 @@ class BitbakeTests(oeSelfTest):
for f in ['pn-buildlist', 'pn-depends.dot', 'package-depends.dot', 'task-depends.dot']:
os.remove(f)
+ @testcase(899)
def test_image_manifest(self):
bitbake('core-image-minimal')
deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
@@ -81,6 +94,7 @@ class BitbakeTests(oeSelfTest):
manifest = os.path.join(deploydir, imagename + ".manifest")
self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image")
+ @testcase(168)
def test_invalid_recipe_src_uri(self):
data = 'SRC_URI = "file://invalid"'
self.write_recipeinc('man', data)
@@ -89,9 +103,10 @@ class BitbakeTests(oeSelfTest):
bitbake('-ccleanall man')
self.delete_recipeinc('man')
self.assertEqual(result.status, 1, msg='Command succeded when it should have failed')
- self.assertTrue('ERROR: Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
+ self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output)
self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output)
+ @testcase(171)
def test_rename_downloaded_file(self):
data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
self.write_recipeinc('aspell', data)
@@ -103,25 +118,30 @@ class BitbakeTests(oeSelfTest):
self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')))
bitbake('-ccleanall aspell')
+ @testcase(1028)
def test_environment(self):
self.append_config("TEST_ENV=\"localconf\"")
result = runCmd('bitbake -e | grep TEST_ENV=')
self.assertTrue('localconf' in result.output)
self.remove_config("TEST_ENV=\"localconf\"")
+ @testcase(1029)
def test_dry_run(self):
result = runCmd('bitbake -n m4-native')
self.assertEqual(0, result.status)
+ @testcase(1030)
def test_just_parse(self):
result = runCmd('bitbake -p')
self.assertEqual(0, result.status)
+ @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)
+ @testcase(1032)
def test_prefile(self):
preconf = os.path.join(self.builddir, 'conf/prefile.conf')
self.track_for_cleanup(preconf)
@@ -133,6 +153,7 @@ class BitbakeTests(oeSelfTest):
self.assertTrue('localconf' in result.output)
self.remove_config("TEST_PREFILE=\"localconf\"")
+ @testcase(1033)
def test_postfile(self):
postconf = os.path.join(self.builddir, 'conf/postfile.conf')
self.track_for_cleanup(postconf)
@@ -142,10 +163,12 @@ class BitbakeTests(oeSelfTest):
self.assertTrue('postfile' in result.output)
self.remove_config("TEST_POSTFILE=\"localconf\"")
+ @testcase(1034)
def test_checkuri(self):
result = runCmd('bitbake -c checkuri m4')
self.assertEqual(0, result.status)
+ @testcase(1035)
def test_continue(self):
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')
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 27fc452e72..926ffe9993 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -7,21 +7,30 @@ 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")
- res = runCmd("grep 'Installing openssh-sshd' %s" % (os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")), ignore_status=True)
+ 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.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs")
+ self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
bitbake("core-image-minimal")
- res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True)
- self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image")
+ 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")
@@ -37,6 +46,7 @@ class ImageOptionsTests(oeSelfTest):
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 ware 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")))
@@ -50,6 +60,7 @@ class ImageOptionsTests(oeSelfTest):
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)
@@ -65,6 +76,7 @@ class DiskMonTest(oeSelfTest):
class SanityOptionsTest(oeSelfTest):
+ @testcase(927)
def test_options_warnqa_errorqa_switch(self):
bitbake("xcursor-transparent-theme -ccleansstate")
@@ -74,16 +86,17 @@ class SanityOptionsTest(oeSelfTest):
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
res = bitbake("xcursor-transparent-theme", ignore_status=True)
self.delete_recipeinc('xcursor-transparent-theme')
- self.assertTrue("ERROR: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output)
+ self.assertTrue("ERROR: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
self.assertEqual(res.status, 1)
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")
bitbake("xcursor-transparent-theme -ccleansstate")
+ res = bitbake("xcursor-transparent-theme")
self.delete_recipeinc('xcursor-transparent-theme')
- self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output)
+ self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
+ @testcase(278)
def test_sanity_userspace_dependency(self):
self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"')
bitbake("-ccleansstate gzip nfs-utils")
@@ -93,10 +106,12 @@ class SanityOptionsTest(oeSelfTest):
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')))
+ @testcase(294)
def test_buildhistory_buildtime_pr_backwards(self):
self.add_command_to_tearDown('cleanup-workdir')
target = 'xcursor-transparent-theme'
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
new file mode 100644
index 0000000000..74fb325803
--- /dev/null
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -0,0 +1,241 @@
+import unittest
+import os
+import logging
+import re
+import shutil
+import tempfile
+import glob
+
+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 DevtoolTests(oeSelfTest):
+
+ def test_create_workspace(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ 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')))
+ result = runCmd('bitbake-layers show-layers')
+ self.assertIn(tempdir, result.output)
+ # Try creating a workspace layer with the default path
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool create-workspace')
+ self.assertTrue(os.path.isfile(os.path.join(workspacedir, 'conf', 'layer.conf')))
+ result = runCmd('bitbake-layers show-layers')
+ self.assertNotIn(tempdir, result.output)
+ self.assertIn(workspacedir, result.output)
+
+ def test_recipetool_create(self):
+ # Try adding a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ tempsrc = os.path.join(tempdir, 'srctree')
+ os.makedirs(tempsrc)
+ recipefile = os.path.join(tempdir, 'logrotate_3.8.7.bb')
+ srcuri = 'https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.7.tar.gz'
+ 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'
+ with open(recipefile, 'r') as f:
+ for line in f:
+ if '=' in line:
+ splitline = line.split('=', 1)
+ var = splitline[0].rstrip()
+ value = splitline[1].strip().strip('"')
+ if var in checkvars:
+ needvalue = checkvars.pop(var)
+ self.assertEqual(value, needvalue)
+ if line.startswith('inherit '):
+ inherits = line.split()[1:]
+
+ self.assertEqual(checkvars, {}, 'Some variables not found')
+
+ def test_recipetool_create_git(self):
+ # Ensure we have the right data in shlibs/pkgdata
+ bitbake('libpng pango libx11 libxext')
+ # Try adding a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ tempsrc = os.path.join(tempdir, 'srctree')
+ os.makedirs(tempsrc)
+ recipefile = os.path.join(tempdir, 'libmatchbox.bb')
+ srcuri = 'git://git.yoctoproject.org/libmatchbox'
+ result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc))
+ self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
+ checkvars = {}
+ checkvars['LICENSE'] = 'LGPLv2.1'
+ checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34'
+ checkvars['S'] = '${WORKDIR}/git'
+ checkvars['PV'] = '1.0+git${SRCPV}'
+ checkvars['SRC_URI'] = srcuri
+ checkvars['DEPENDS'] = 'libpng pango libx11 libxext'
+ inherits = []
+ with open(recipefile, 'r') as f:
+ for line in f:
+ if '=' in line:
+ splitline = line.split('=', 1)
+ var = splitline[0].rstrip()
+ value = splitline[1].strip().strip('"')
+ if var in checkvars:
+ needvalue = checkvars.pop(var)
+ self.assertEqual(value, needvalue)
+ if line.startswith('inherit '):
+ inherits = line.split()[1:]
+
+ self.assertEqual(checkvars, {}, 'Some variables not found')
+
+ self.assertIn('autotools', inherits, 'Missing inherit of autotools')
+ self.assertIn('pkgconfig', inherits, 'Missing inherit of pkgconfig')
+
+ def test_devtool_add(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # 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(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(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')
+
+ def test_devtool_modify(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # 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(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.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
+ self.assertTrue(os.path.exists(os.path.join(workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
+ matches = glob.glob(os.path.join(workspacedir, 'appends', 'mdadm_*.bbappend'))
+ self.assertTrue(matches, 'bbappend not created')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn('mdadm', result.output)
+ self.assertIn(tempdir, result.output)
+ # Check git repo
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "", 'Created git repo is not clean')
+ result = runCmd('git symbolic-ref HEAD', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "refs/heads/devtool", 'Wrong branch in git repo')
+ # 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')
+ # Test devtool reset
+ result = runCmd('devtool reset mdadm')
+ result = runCmd('devtool status')
+ self.assertNotIn('mdadm', result.output)
+
+ def test_devtool_update_recipe(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ testrecipe = 'minicom'
+ recipefile = get_bb_var('FILE', testrecipe)
+ result = runCmd('git status . --porcelain', cwd=os.path.dirname(recipefile))
+ self.assertEqual(result.output.strip(), "", '%s recipe is not clean' % testrecipe)
+ # First, modify a recipe
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(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.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "", 'Created git repo is not clean')
+ result = runCmd('git symbolic-ref HEAD', cwd=tempdir)
+ self.assertEqual(result.output.strip(), "refs/heads/devtool", 'Wrong branch in git repo')
+ # 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)
+ result = runCmd('git status . --porcelain', cwd=os.path.dirname(recipefile))
+ self.assertNotEqual(result.output.strip(), "", '%s recipe should be modified' % testrecipe)
+ status = result.output.splitlines()
+ self.assertEqual(len(status), 3, 'Less/more files modified than expected. Entire status:\n%s' % result.output)
+ for line in status:
+ if line.endswith('0001-Change-the-README.patch'):
+ self.assertEqual(line[:3], '?? ', 'Unexpected status in line: %s' % line)
+ elif line.endswith('0002-Add-a-new-file.patch'):
+ self.assertEqual(line[:3], '?? ', 'Unexpected status in line: %s' % line)
+ elif re.search('minicom_[^_]*.bb$', line):
+ self.assertEqual(line[:3], ' M ', 'Unexpected status in line: %s' % line)
+ else:
+ raise AssertionError('Unexpected modified file in status: %s' % line)
+
+ def test_devtool_extract(self):
+ # Check preconditions
+ workspacedir = os.path.join(self.builddir, 'workspace')
+ self.assertTrue(not os.path.exists(workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ # Try devtool extract
+ self.track_for_cleanup(tempdir)
+ self.track_for_cleanup(workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool extract remake %s' % tempdir)
+ self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+ self.assertTrue(os.path.isdir(os.path.join(tempdir, '.git')), 'git repository for external source tree not found')
diff --git a/meta/lib/oeqa/selftest/oescripts.py b/meta/lib/oeqa/selftest/oescripts.py
index 4aab2ed095..31cd50809c 100644
--- a/meta/lib/oeqa/selftest/oescripts.py
+++ b/meta/lib/oeqa/selftest/oescripts.py
@@ -8,9 +8,11 @@ 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')
@@ -41,6 +43,7 @@ class TestScripts(oeSelfTest):
class BuildhistoryDiffTests(BuildhistoryBase):
+ @testcase(295)
def test_buildhistory_diff(self):
self.add_command_to_tearDown('cleanup-workdir')
target = 'xcursor-transparent-theme'
@@ -49,12 +52,3 @@ class BuildhistoryDiffTests(BuildhistoryBase):
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/prservice.py b/meta/lib/oeqa/selftest/prservice.py
index 789c05f1e5..fb6d68d3bf 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -8,6 +8,7 @@ import datetime
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 BitbakePrTests(oeSelfTest):
@@ -87,27 +88,34 @@ class BitbakePrTests(oeSelfTest):
bitbake("-ccleansstate %s" % package_name)
self.assertTrue(pr_2 - pr_1 == 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')
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 44dcea847f..d578ddd489 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -8,7 +8,7 @@ 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):
@@ -28,19 +28,23 @@ class SStateTests(SStateBase):
else:
self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
+ @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(975)
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(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(976)
def test_sstate_creation_distro_nonspecific_fail(self):
- self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
+ 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
@@ -60,16 +64,19 @@ class SStateTests(SStateBase):
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" % ', '.join(map(str, targets)))
+ @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', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_nonspecific(self):
- self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ @testcase(977)
def test_cleansstate_task_distro_specific(self):
targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+ 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
@@ -98,14 +105,17 @@ class SStateTests(SStateBase):
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(175)
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(175)
def test_rebuild_distro_specific_sstate_native_target(self):
self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
@@ -153,7 +163,7 @@ class SStateTests(SStateBase):
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 = []
@@ -161,6 +171,7 @@ class SStateTests(SStateBase):
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 = []
@@ -170,6 +181,7 @@ class SStateTests(SStateBase):
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 = []
@@ -181,6 +193,7 @@ class SStateTests(SStateBase):
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 = []
@@ -189,11 +202,3 @@ class SStateTests(SStateBase):
global_config.append('MACHINE = "qemux86"')
target_config.append('')
self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
-
-
-
-
-
-
-
-
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 802bc2f208..5b601d9806 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -110,11 +110,11 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, **opti
def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **options):
if postconfig:
- postconfig_file = os.path.join(os.environ.get('BUILDDIR'), 'oeqa-post.conf')
- ftools.write_file(postconfig_file, postconfig)
- extra_args = "-R %s" % postconfig_file
+ postconfig_file = os.path.join(os.environ.get('BUILDDIR'), 'oeqa-post.conf')
+ ftools.write_file(postconfig_file, postconfig)
+ extra_args = "-R %s" % postconfig_file
else:
- extra_args = ""
+ extra_args = ""
if isinstance(command, basestring):
cmd = "bitbake " + extra_args + " " + command
@@ -122,7 +122,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, **options)
finally:
if postconfig:
os.remove(postconfig_file)
@@ -138,9 +138,9 @@ def get_bb_var(var, target=None, postconfig=None):
val = None
bbenv = get_bb_env(target, postconfig=postconfig)
for line in bbenv.splitlines():
- if line.startswith(var + "="):
+ if line.startswith(var + "=") or line.startswith("export " + var + "="):
val = line.split('=')[1]
- val = val.replace('\"','')
+ val = val.strip('\"')
break
return val
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index a0d94e6d24..ff5f278bc1 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -6,9 +6,42 @@
# Most useful is skipUnlessPassed which can be used for
# creating dependecies between two test methods.
-from oeqa.oetest import *
+import os
import logging
import sys
+import unittest
+
+#get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame
+class getResults(object):
+ def __init__(self):
+ #dynamically determine the unittest.case frame and use it to get the name of the test method
+ upperf = sys._current_frames().values()[0]
+ while (upperf.f_globals['__name__'] != 'unittest.case'):
+ upperf = upperf.f_back
+
+ def handleList(items):
+ ret = []
+ # items is a list of tuples, (test, failure) or (_ErrorHandler(), Exception())
+ for i in items:
+ s = i[0].id()
+ #Handle the _ErrorHolder objects from skipModule failures
+ if "setUpModule (" in s:
+ ret.append(s.replace("setUpModule (", "").replace(")",""))
+ else:
+ ret.append(s)
+ return ret
+ self.faillist = handleList(upperf.f_locals['result'].failures)
+ self.errorlist = handleList(upperf.f_locals['result'].errors)
+ self.skiplist = handleList(upperf.f_locals['result'].skipped)
+
+ def getFailList(self):
+ return self.faillist
+
+ def getErrorList(self):
+ return self.errorlist
+
+ def getSkipList(self):
+ return self.skiplist
class skipIfFailure(object):
@@ -17,7 +50,8 @@ class skipIfFailure(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in (oeTest.testFailures or oeTest.testErrors):
+ res = getResults()
+ if self.testcase in (res.getFailList() or res.getErrorList()):
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -30,7 +64,8 @@ class skipIfSkipped(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in oeTest.testSkipped:
+ res = getResults()
+ if self.testcase in res.getSkipList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -43,9 +78,10 @@ class skipUnlessPassed(object):
def __call__(self,f):
def wrapped_f(*args):
- if self.testcase in oeTest.testSkipped or \
- self.testcase in oeTest.testFailures or \
- self.testcase in oeTest.testErrors:
+ res = getResults()
+ if self.testcase in res.getSkipList() or \
+ self.testcase in res.getFailList() or \
+ self.testcase in res.getErrorList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
return f(*args)
wrapped_f.__name__ = f.__name__
@@ -57,10 +93,15 @@ class testcase(object):
self.test_case = test_case
def __call__(self, func):
- def wrapped_f(*args):
- return func(*args)
- wrapped_f.test_case = self.test_case
- return wrapped_f
+ def wrapped_f(*args):
+ return func(*args)
+ wrapped_f.test_case = self.test_case
+ wrapped_f.__name__ = func.__name__
+ return wrapped_f
+
+class NoParsingFilter(logging.Filter):
+ def filter(self, record):
+ return record.levelno == 100
def LogResults(original_class):
orig_method = original_class.run
@@ -68,49 +109,51 @@ def LogResults(original_class):
#rewrite the run method of unittest.TestCase to add testcase logging
def run(self, result, *args, **kws):
orig_method(self, result, *args, **kws)
- passed = True
- testMethod = getattr(self, self._testMethodName)
-
- #if test case is decorated then use it's number, else use it's name
- try:
- test_case = testMethod.test_case
- except AttributeError:
- test_case = self._testMethodName
-
- #create custom logging level for filtering.
- custom_log_level = 100
- logging.addLevelName(custom_log_level, 'RESULTS')
- caller = os.path.basename(sys.argv[0])
-
- def results(self, message, *args, **kws):
- if self.isEnabledFor(custom_log_level):
- self.log(custom_log_level, message, *args, **kws)
- logging.Logger.results = results
-
- logging.basicConfig(filename=os.path.join(os.getcwd(),'results-'+caller+'.log'),
+ passed = True
+ testMethod = getattr(self, self._testMethodName)
+
+ #if test case is decorated then use it's number, else use it's name
+ try:
+ test_case = testMethod.test_case
+ except AttributeError:
+ test_case = self._testMethodName
+
+ #create custom logging level for filtering.
+ custom_log_level = 100
+ logging.addLevelName(custom_log_level, 'RESULTS')
+ caller = os.path.basename(sys.argv[0])
+
+ def results(self, message, *args, **kws):
+ if self.isEnabledFor(custom_log_level):
+ self.log(custom_log_level, message, *args, **kws)
+ logging.Logger.results = results
+
+ logging.basicConfig(filename=os.path.join(os.getcwd(),'results-'+caller+'.log'),
filemode='w',
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%H:%M:%S',
level=custom_log_level)
- local_log = logging.getLogger(caller)
+ for handler in logging.root.handlers:
+ handler.addFilter(NoParsingFilter())
+ local_log = logging.getLogger(caller)
- #check status of tests and record it
+ #check status of tests and record it
for (name, msg) in result.errors:
- if self._testMethodName == str(name).split(' ')[0]:
- local_log.results("Testcase "+str(test_case)+": ERROR")
- local_log.results("Testcase "+str(test_case)+":\n"+msg)
- passed = False
+ if self._testMethodName == str(name).split(' ')[0]:
+ 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]:
- local_log.results("Testcase "+str(test_case)+": FAILED")
- local_log.results("Testcase "+str(test_case)+":\n"+msg)
- passed = False
+ if self._testMethodName == str(name).split(' ')[0]:
+ 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]:
- local_log.results("Testcase "+str(test_case)+": SKIPPED")
- passed = False
- if passed:
- local_log.results("Testcase "+str(test_case)+": PASSED")
+ if self._testMethodName == str(name).split(' ')[0]:
+ local_log.results("Testcase "+str(test_case)+": SKIPPED")
+ passed = False
+ if passed:
+ local_log.results("Testcase "+str(test_case)+": PASSED")
original_class.run = run
return original_class
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index f161a1bddd..76518d8ef9 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -5,6 +5,8 @@ import os
class HTTPServer(SimpleHTTPServer.BaseHTTPServer.HTTPServer):
def server_start(self, root_dir):
+ import signal
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
os.chdir(root_dir)
self.serve_forever()
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
new file mode 100644
index 0000000000..87b50354cd
--- /dev/null
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import re
+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):
+
+ 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
+
+ # 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.")
+ 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
+ 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
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 32296762c0..eeb08ba716 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -6,23 +6,25 @@
import os
import re
+import bb.utils
import subprocess
+from abc import ABCMeta, abstractmethod
+class BuildProject():
-class TargetBuildProject():
+ __metaclass__ = ABCMeta
- def __init__(self, target, d, uri, foldername=None):
- self.target = target
+ def __init__(self, d, uri, foldername=None, tmpdir="/tmp/"):
self.d = d
self.uri = uri
- self.targetdir = "~/"
self.archive = os.path.basename(uri)
- self.localarchive = "/tmp/" + self.archive
+ self.localarchive = os.path.join(tmpdir,self.archive)
self.fname = re.sub(r'.tar.bz2|tar.gz$', '', self.archive)
if foldername:
self.fname = foldername
- def download_archive(self):
+ # Download self.archive to self.localarchive
+ def _download_archive(self):
exportvars = ['HTTP_PROXY', 'http_proxy',
'HTTPS_PROXY', 'https_proxy',
@@ -41,6 +43,38 @@ class TargetBuildProject():
cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
subprocess.check_call(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=''):
+ return self._run('cd %s; ./configure %s' % (self.targetdir, 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):
+ self._run('rm -rf %s' % self.targetdir)
+ subprocess.call('rm -f %s' % self.localarchive, shell=True)
+ pass
+
+class TargetBuildProject(BuildProject):
+
+ def __init__(self, target, d, uri, foldername=None):
+ self.target = target
+ self.targetdir = "~/"
+ BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp")
+
+ def download_archive(self):
+
+ self._download_archive()
+
(status, output) = self.target.copy_to(self.localarchive, self.targetdir)
if status != 0:
raise Exception("Failed to copy archive to target, output: %s" % output)
@@ -54,15 +88,45 @@ class TargetBuildProject():
# The timeout parameter of target.run is set to 0 to make the ssh command
# run with no timeout.
- def run_configure(self):
- return self.target.run('cd %s; ./configure' % self.targetdir, 0)[0]
+ def _run(self, cmd):
+ return self.target.run(cmd, 0)[0]
- def run_make(self):
- return self.target.run('cd %s; make' % self.targetdir, 0)[0]
- def run_install(self):
- return self.target.run('cd %s; make install' % self.targetdir, 0)[0]
+class SDKBuildProject(BuildProject):
+
+ def __init__(self, testpath, sdkenv, d, uri, foldername=None):
+ self.sdkenv = sdkenv
+ self.testdir = testpath
+ self.targetdir = testpath
+ bb.utils.mkdirhier(testpath)
+ self.datetime = d.getVar('DATETIME', True)
+ self.testlogdir = d.getVar("TEST_LOG_DIR", True)
+ 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)
+
+ def download_archive(self):
+
+ self._download_archive()
+
+ cmd = 'tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)
+ subprocess.check_call(cmd, shell=True)
+
+ #Change targetdir to project folder
+ self.targetdir = self.targetdir + self.fname
+
+ def run_configure(self, configure_args=''):
+ return super(SDKBuildProject, self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'))
+
+ 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 source %s; " % self.sdkenv + cmd)
+ return subprocess.call("source %s; " % self.sdkenv + cmd, shell=True)
- def clean(self):
- self.target.run('rm -rf %s' % self.targetdir)
- subprocess.call('rm -f %s' % self.localarchive, shell=True)
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index fad7afdf26..e0156192a0 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -4,30 +4,27 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
SECTION = "base"
LICENSE = "GPLv2+"
-SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
file://init \
- file://set_socket_noblock.patch "
+ file://acpid.service \
+ "
-inherit update-rc.d
+inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "acpid"
INITSCRIPT_PARAMS = "defaults"
-# Makefile ignores our CFLAGS, so override it.
-#
-EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
+SYSTEMD_SERVICE_${PN} = "acpid.service"
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
-}
-
-do_install () {
- install -d ${D}${bindir}
- oe_runmake 'INSTPREFIX=${D}' install
+do_install_append () {
install -d ${D}${sysconfdir}/init.d
sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
install -d ${D}${sysconfdir}/acpi
install -d ${D}${sysconfdir}/acpi/events
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service
}
diff --git a/meta/recipes-bsp/acpid/acpid/acpid.service b/meta/recipes-bsp/acpid/acpid/acpid.service
new file mode 100644
index 0000000000..f70e740965
--- /dev/null
+++ b/meta/recipes-bsp/acpid/acpid/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI Event Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/acpid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch b/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
deleted file mode 100644
index 54d64351d7..0000000000
--- a/meta/recipes-bsp/acpid/acpid/set_socket_noblock.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/acpid.c
-+++ b/acpid.c
-@@ -307,6 +307,7 @@ main(int argc, char **argv)
- non_root_clients++;
- }
- fcntl(cli_fd, F_SETFD, FD_CLOEXEC);
-+ fcntl(cli_fd, F_SETFL, O_NONBLOCK);
- snprintf(buf, sizeof(buf)-1, "%d[%d:%d]",
- creds.pid, creds.uid, creds.gid);
- acpid_add_client(cli_fd, buf);
diff --git a/meta/recipes-bsp/acpid/acpid_1.0.10.bb b/meta/recipes-bsp/acpid/acpid_2.0.23.bb
index df55badbd4..a5317a4daa 100644
--- a/meta/recipes-bsp/acpid/acpid_1.0.10.bb
+++ b/meta/recipes-bsp/acpid/acpid_2.0.23.bb
@@ -3,6 +3,5 @@ require acpid.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "61156ef32015c56dc0f2e3317f4ae09e"
-SRC_URI[sha256sum] = "22703ce0dd7305aca01bc9ac741659c32b1593f1d6fde492df7f01067a534760"
+SRC_URI[md5sum] = "d7bcdcdefcd53b03730e50ba842554ea"
+SRC_URI[sha256sum] = "4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee"
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index 874d6bbe83..d0f7bb3305 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -18,17 +18,30 @@ SRC_URI = "\
file://alsa-state-init \
"
+S = "${WORKDIR}"
+
+# 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
INITSCRIPT_NAME = "alsa-state"
INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
do_install() {
- sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ fi
install -d ${D}/${localstatedir}/lib/alsa
+ install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa
}
@@ -50,9 +63,5 @@ pkg_postinst_${PN}() {
then
${sbindir}/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
fi
- # INITSCRIPT_PARAMS changed, so remove the old and
- # install the new setting.
- update-rc.d -f ${INITSCRIPT_NAME} remove
- update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
fi
}
diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
index d1ae2a255c..5c30bd510d 100644
--- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb
+++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb
@@ -12,7 +12,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
INHIBIT_DEFAULT_DEPS = "1"
do_install() {
- # Only install file if it has a contents
+ # Install file only if it has contents
install -d ${D}${sysconfdir}/formfactor/
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
if [ -s "${S}/machconfig" ]; then
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
deleted file mode 100644
index 27c94e8a74..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix parallel make failure
-
-Upstream-Status: Submitted [Maintainer directly]
-
-Add a missing dependency which resulted in a race leading to failure
-on larger values of -j.
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-
-Index: gnu-efi-3.0/Makefile
-===================================================================
---- gnu-efi-3.0.orig/Makefile
-+++ gnu-efi-3.0/Makefile
-@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults
-
- SUBDIRS = lib gnuefi inc apps
-
-+gnuefi: lib
-+
- all: check_gcc $(SUBDIRS)
-
- $(SUBDIRS):
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb
new file mode 100644
index 0000000000..ad7f2e368a
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.1.bb
@@ -0,0 +1,40 @@
+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=9;md5=2240d7bbdf0928294c2f4a68b14d6591 \
+ 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/div64.S;beginline=6;endline=12;md5=a96c84f5ad12b4f011f98b5d039242f2 \
+ file://lib/arm/math.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/initplat.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
+ file://lib/arm/lib1funcs.S;beginline=9;endline=33;md5=f56d5ebbc87136bc66cfe24db82bcf01 \
+ file://lib/aarch64/math.c;beginline=9;endline=33;md5=cfade4c560e033a7bb02dab282872c7d \
+ file://lib/aarch64/initplat.c;beginline=9;endline=33;md5=900cb1ffbe3e1ded344102be921830f1 \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://parallel-make-archives.patch \
+ "
+SRC_URI[md5sum] = "c4099c443b6b0c2b04dedc33e7814ec0"
+SRC_URI[sha256sum] = "e2e8d5940347eebfb00eaaeef107a8ba59e7838e40bc716c74d9a36fff648f1f"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+
+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}' \
+ "
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+}
+
+FILES_${PN} += "${libdir}/*.lds"
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
deleted file mode 100644
index dbf2a07a8a..0000000000
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Libraries for producing EFI binaries"
-HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=5fb358a180f484b285b0d99acdc29666"
-
-SRC_URI = "http://downloads.sourceforge.net/gnu-efi/gnu-efi_3.0u.orig.tar.gz \
- file://parallel-make.patch \
- file://parallel-make-archives.patch \
- "
-SRC_URI[md5sum] = "d15d3c700e79a1e2938544d73edc572d"
-SRC_URI[sha256sum] = "3c0d450d5829204ca05dcb3b2aae772e52c379b7c7e09146759c6315606f934e"
-
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-
-S = "${WORKDIR}/gnu-efi-3.0"
-
-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}' \
- "
-
-do_install() {
- oe_runmake install INSTALLROOT="${D}"
-}
-
-FILES_${PN} += "${libdir}/*.lds"
diff --git a/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
new file mode 100644
index 0000000000..46aaa97cf2
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
@@ -0,0 +1,32 @@
+From 275fe0269ecc00af4788afaf9dc151a50b25645b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 28 Aug 2014 19:26:14 -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"
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Submitted
+
+---
+ 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 7e725f6..8dd8e65 100644
+--- a/grub-core/kern/emu/hostfs.c
++++ b/grub-core/kern/emu/hostfs.c
+@@ -19,7 +19,7 @@
+
+ #include <config-util.h>
+
+-#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
+ #include <grub/fs.h>
+ #include <grub/file.h>
+ #include <grub/disk.h>
+--
+2.1.0
+
diff --git a/meta/recipes-bsp/grub/files/cfg b/meta/recipes-bsp/grub/files/cfg
index ffffe47638..8ca53d24d7 100644
--- a/meta/recipes-bsp/grub/files/cfg
+++ b/meta/recipes-bsp/grub/files/cfg
@@ -1,2 +1,2 @@
-search.file /EFI/BOOT/grub.cfg root
+search.file ($cmdpath)/EFI/BOOT/grub.cfg root
set prefix=($root)/EFI/BOOT
diff --git a/meta/recipes-bsp/grub/files/fix-endianness-problem.patch b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
new file mode 100644
index 0000000000..079992afba
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/fix-endianness-problem.patch
@@ -0,0 +1,44 @@
+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/grub-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
deleted file mode 100644
index 70f60015c2..0000000000
--- a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones@redhat.com>
-Date: Fri, 25 May 2012 15:28:19 -0400
-Subject: [PATCH] gnulib accused in build breaking shocker.
-
-Upstream-Status: pending [Fedora will push this]
-
----
- grub-core/gnulib/stdio.in.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
-index 80b9dbf..69932d9 100644
---- a/grub-core/gnulib/stdio.in.h
-+++ b/grub-core/gnulib/stdio.in.h
-@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
- #undef gets
-+#if 0
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
---
-1.7.10.1
-
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
new file mode 100644
index 0000000000..4f12628a4b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-efi-fix-with-glibc-2.20.patch
@@ -0,0 +1,32 @@
+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/grub-2.00/grub-install.in.patch b/meta/recipes-bsp/grub/files/grub-install.in.patch
index 326951df44..326951df44 100644
--- a/meta/recipes-bsp/grub/grub-2.00/grub-install.in.patch
+++ b/meta/recipes-bsp/grub/files/grub-install.in.patch
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
new file mode 100644
index 0000000000..6259a1abe3
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
@@ -0,0 +1,104 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+remove the grub-sparc64-setup files from the x86 builds.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+--- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700
++++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700
+@@ -4692,9 +4692,9 @@
+ endif
+
+ if COND_emu
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4715,9 +4715,9 @@
+ endif
+
+ if COND_i386_pc
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4738,9 +4738,9 @@
+ endif
+
+ if COND_i386_efi
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4761,9 +4761,9 @@
+ endif
+
+ if COND_i386_qemu
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4784,9 +4784,9 @@
+ endif
+
+ if COND_i386_coreboot
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4807,9 +4807,9 @@
+ endif
+
+ if COND_i386_multiboot
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4830,9 +4830,9 @@
+ endif
+
+ if COND_i386_ieee1275
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
+@@ -4853,9 +4853,9 @@
+ endif
+
+ if COND_x86_64_efi
+-sbin_PROGRAMS += grub-sparc64-setup
++sbin_PROGRAMS +=
+ if COND_MAN_PAGES
+-man_MANS += grub-sparc64-setup.8
++man_MANS +=
+
+ grub-sparc64-setup.8: grub-sparc64-setup
+ chmod a+x grub-sparc64-setup
diff --git a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch b/meta/recipes-bsp/grub/files/remove-gets.patch
index 463f7847ad..463f7847ad 100644
--- a/meta/recipes-bsp/grub/grub-2.00/remove-gets.patch
+++ b/meta/recipes-bsp/grub/files/remove-gets.patch
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 7b49493e3e..7b44eab8d1 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -1,38 +1,12 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of 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. \
-This recipe builds an EFI binary for the target. It does not install \
-or package anything, it only deploys a target-arch GRUB EFI image."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-# FIXME: We should be able to optionally drop freetype as a dependency
-DEPENDS = "autogen-native flex-native bison-native"
DEPENDS_class-target = "grub-efi-native"
-PR = "r2"
+RDEPENDS_${PN}_class-target = "diffutils freetype"
+PR = "r3"
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+SRC_URI += " \
file://cfg \
- file://grub-2.00-fpmath-sse-387-fix.patch \
- file://grub-2.00-fix-enable_execute_stack-check.patch \
- file://check-if-liblzma-is-disabled.patch \
- file://grub-no-unused-result.patch \
- file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
- file://fix-issue-with-flex-2.5.37.patch \
- file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \
- file://grub-2.00-add-oe-kernel.patch \
"
-SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
S = "${WORKDIR}/grub-${PV}"
@@ -52,17 +26,13 @@ python __anonymous () {
d.setVar("GRUB_IMAGE", grubimage)
}
-inherit autotools-brokensep gettext texinfo deploy
+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"
-do_install_class-target() {
- :
-}
-
do_install_class-native() {
install -d ${D}${bindir}
install -m 755 grub-mkimage ${D}${bindir}
@@ -85,7 +55,12 @@ do_deploy_class-native() {
addtask deploy after do_install before do_build
-FILES_${PN}-dbg += "${libdir}/${BPN}/${GRUB_TARGET}-efi/.debug"
+FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \
+ /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \
+ "
+FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
+ ${datadir}/grub \
+ "
BBCLASSEXTEND = "native"
-ALLOW_EMPTY_${PN} = "1"
+
diff --git a/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch b/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
deleted file mode 100644
index 48ace56506..0000000000
--- a/meta/recipes-bsp/grub/grub/asciih-fix-build-warning-error.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-util/grub-gen-asciih.c: fix build warning->error
-
-A potential problem is flagged by the compiler and generates a warning. This
-warning is promoted to an error via -Werror. This patch fixes the original
-issue, avoids the warning, and therefore avoids the build error.
-
-Upstream-Status: Pending
-
-Index: git/util/grub-gen-asciih.c
-===================================================================
---- git.orig/util/grub-gen-asciih.c
-+++ git/util/grub-gen-asciih.c
-@@ -131,6 +131,8 @@ write_font_ascii_bitmap (FILE *file, FT_
- struct grub_glyph_info glyph;
- int char_code;
-
-+ memset (&glyph, 0, sizeof(glyph));
-+
- fprintf (file, "/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n");
- fprintf (file, "unsigned char ascii_bitmaps[] =\n");
- fprintf (file, "{\n");
-@@ -144,6 +146,12 @@ write_font_ascii_bitmap (FILE *file, FT_
- return;
- add_glyph (glyph_idx, face, char_code, &glyph);
-
-+ if (glyph.bitmap == 0)
-+ {
-+ fprintf (stderr, "grub-gen-asciih: add_glyph not successful");
-+ exit (1);
-+ }
-+
- if (glyph.width == 8 && glyph.height == 16
- && glyph.x_ofs == 0 && glyph.y_ofs == 0)
- {
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
new file mode 100644
index 0000000000..39469576cc
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -0,0 +1,44 @@
+SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+
+DESCRIPTION = "GRUB2 is the next generaion of 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 = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+ 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 \
+ "
+
+DEPENDS = "flex-native bison-native xz"
+
+SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
+SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
+
+inherit autotools gettext texinfo
+
+# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
+# conflicted, remove it since no one uses it.
+SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
+remove_sysroot_mkconfig_lib() {
+ rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
+}
+
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb
index ce2d680eec..a11e960fe5 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -1,39 +1,11 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of 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 = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "autogen-native flex-native bison-native xz"
RDEPENDS_${PN} = "diffutils freetype"
PR = "r1"
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://grub-install.in.patch \
- file://grub-2.00-fpmath-sse-387-fix.patch \
- file://remove-gets.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 \
- "
-
-SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
-SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
-
FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
-inherit autotools gettext texinfo
-
PACKAGECONFIG ??= ""
PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
index 7f89739179..3ab675b298 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -1,27 +1,17 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
+require grub2.inc
-DESCRIPTION = "GRUB2 is the next generaion of 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 = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "autogen-native flex-native bison-native xz freetype"
+DEPENDS += "autogen-native"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm = "1"
PV = "2.00+${SRCPV}"
-SRCREV = "4b8b9135f1676924a8458da528d264bbc7bbb301"
+SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"
SRC_URI = "git://git.savannah.gnu.org/grub.git \
+ file://grub-2.00-fpmath-sse-387-fix.patch \
file://autogen.sh-exclude-pc.patch \
file://grub-2.00-add-oe-kernel.patch \
- file://asciih-fix-build-warning-error.patch \
+ file://0001-Fix-build-with-glibc-2.20.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
index e2c7cc0344..e1d4c5477c 100644
--- a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
@@ -10,6 +10,8 @@ SRC_URI = "file://hostap_cs.modalias \
inherit allarch
+S = "${WORKDIR}"
+
do_compile() {
}
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
new file mode 100644
index 0000000000..c4655cf092
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/ldflags.patch
@@ -0,0 +1,27 @@
+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_0.4.7.bb b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
index 7b224a8a4d..be5481f6f7 100644
--- a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
+++ b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
@@ -1,4 +1,5 @@
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 123db3e0f2..5793a76529 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -2,10 +2,7 @@ SUMMARY = "Keyboard maps"
DESCRIPTION = "Keymaps and initscript to set the keymap on bootup."
SECTION = "base"
-# Distro can override initscripts provider
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} kbd"
+RDEPENDS_${PN} = "kbd"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
@@ -14,6 +11,13 @@ PR = "r31"
INHIBIT_DEFAULT_DEPS = "1"
+# 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
SRC_URI = "file://keymap.sh \
@@ -22,7 +26,25 @@ SRC_URI = "file://keymap.sh \
INITSCRIPT_NAME = "keymap.sh"
INITSCRIPT_PARAMS = "start 01 S ."
+S = "${WORKDIR}"
+
do_install () {
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+ # Only install the script if 'sysvinit' is in DISTRO_FEATURES
+ # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
+ fi
}
+
+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 keymap.service
+ fi
+}
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch b/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch
deleted file mode 100644
index 413ef0e1e5..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils/lib-build-fix.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Link directly to lib/libpci.so.3.1.5 will hard code this versioned
-string into lspci and other utilities, which is not desirable and
-won't work. In the other hand, linking to a symbolic link lib/libpci.so
-doesn't have this issue.
-
-Upstream-Status: Pending
-
-7/30/2010 - created by Qing He <qing.he@intel.com>
-
-diff --git a/Makefile b/Makefile
-index 74c570a..31337e0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -56,9 +56,9 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h
-
- export
-
--all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
-+all: lib/$(PCILIB_DEV) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
-
--lib/$(PCILIB): $(PCIINC) force
-+lib/$(PCILIB) lib/$(PCILIB_DEV): $(PCIINC) force
- $(MAKE) -C lib all
-
- force:
-@@ -66,8 +66,8 @@ force:
- lib/config.h lib/config.mk:
- cd lib && ./configure
-
--lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB)
--setpci: setpci.o common.o lib/$(PCILIB)
-+lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB_DEV)
-+setpci: setpci.o common.o lib/$(PCILIB_DEV)
-
- LSPCIINC=lspci.h pciutils.h $(PCIINC)
- lspci.o: lspci.c $(LSPCIINC)
-@@ -89,7 +89,7 @@ update-pciids: update-pciids.sh
- chmod +x $@
-
- # The example of use of libpci
--example: example.o lib/$(PCILIB)
-+example: example.o lib/$(PCILIB_DEV)
- example.o: example.c $(PCIINC)
-
- %: %.o
-diff --git a/lib/Makefile b/lib/Makefile
-index 1eb06a5..a8dab56 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -42,7 +42,7 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI
- OBJS += nbsd-libpci
- endif
-
--all: $(PCILIB) $(PCILIBPC)
-+all: $(PCILIB_DEV) $(PCILIBPC)
-
- ifeq ($(SHARED),no)
- $(PCILIB): $(addsuffix .o,$(OBJS))
-@@ -53,6 +53,9 @@ else
- CFLAGS += -fPIC -fvisibility=hidden
- $(PCILIB): $(addsuffix .o,$(OBJS))
- $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
-+
-+$(PCILIB_DEV): $(PCILIB)
-+ ln -s $< $@
- endif
-
- $(PCILIBPC): libpci.pc.in
-diff --git a/lib/configure b/lib/configure
-index 27388bc..6c508cf 100755
---- a/lib/configure
-+++ b/lib/configure
-@@ -216,16 +216,18 @@ fi
- echo "Checking whether to build a shared library... $SHARED (set manually)"
- if [ "$SHARED" = no ] ; then
- echo >>$m 'PCILIB=$(LIBNAME).a'
-+ echo >>$m 'PCILIB_DEV=$(LIBNAME).a'
- echo >>$m 'LDLIBS=$(WITH_LIBS)'
- echo >>$m 'LIB_LDLIBS='
- else
- echo >>$m 'PCILIB=$(LIBNAME).so.$(VERSION)'
-+ echo >>$m 'PCILIB_DEV=$(LIBNAME).so'
- # We link the dependencies _to_ the library, so we do not need explicit deps in .pc
- echo >>$m 'LDLIBS='
- echo >>$m 'LIB_LDLIBS=$(WITH_LIBS)'
- echo >>$c '#define PCI_SHARED_LIB'
- if [ "$SHARED" = yes ] ; then
-- echo >>$m 'SONAME=-Wl,-soname,$(LIBNAME).so$(ABI_VERSION)'
-+ echo >>$m 'SONAME=-Wl,-soname -Wl,$(LIBNAME).so$(ABI_VERSION)'
- fi
- fi
- echo >>$m 'PCILIBPC=$(LIBNAME).pc'
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.2.1.bb b/meta/recipes-bsp/pciutils/pciutils_3.3.0.bb
index 852a93e1b1..b713512dc6 100644
--- a/meta/recipes-bsp/pciutils/pciutils_3.2.1.bb
+++ b/meta/recipes-bsp/pciutils/pciutils_3.3.0.bb
@@ -8,16 +8,18 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "zlib kmod"
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
file://configure.patch \
- file://lib-build-fix.patch \
file://guess-fix.patch \
file://makefile.patch"
-SRC_URI[md5sum] = "425b1acad6854cc2bbb06ac8e48e76fc"
-SRC_URI[sha256sum] = "12d52b19042e2fd058af12e7d877bbbce72213cb3a0b5ec7ff0703ac09e3dcde"
+SRC_URI[md5sum] = "3c19adf32a8457983b71ff376ef7dafe"
+SRC_URI[sha256sum] = "413395d4bdc66fdedd6c993ed9083d1dd73812bf2a679d320f73de35c7801301"
-PARALLEL_MAKE = ""
+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"
@@ -25,15 +27,12 @@ PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
do_configure () {
(
cd lib && \
- ${PCI_CONF_FLAG} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+ # EXTRA_OECONF for this recipe could only possibly contain 'HWDB=yes/no', so we put it
+ # before ./configure
+ ${PCI_CONF_FLAG} ${EXTRA_OECONF} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
)
}
-do_compile_prepend () {
- # Avoid this error: ln: failed to create symbolic link `libpci.so': File exists
- rm -f ${S}/lib/libpci.so
-}
-
export PREFIX = "${prefix}"
export SBINDIR = "${sbindir}"
export SHAREDIR = "${datadir}"
@@ -49,6 +48,8 @@ do_install () {
install -d ${D}${bindir}
ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+ oe_multilib_header pci/config.h
}
PACKAGES =+ "${PN}-ids libpci libpci-dev libpci-dbg"
diff --git a/meta/recipes-bsp/pcmciautils/pcmciautils.inc b/meta/recipes-bsp/pcmciautils/pcmciautils.inc
index eafe82045c..04056e39c6 100644
--- a/meta/recipes-bsp/pcmciautils/pcmciautils.inc
+++ b/meta/recipes-bsp/pcmciautils/pcmciautils.inc
@@ -1,5 +1,5 @@
SUMMARY = "Linux kernel userland utilities for the PCMCIA subsystem"
-HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html"
+HOMEPAGE = "https://www.kernel.org/pub/linux/utils/kernel/pcmcia/"
SECTION = "kernel/userland"
LICENSE = "GPLv2"
@@ -8,7 +8,7 @@ 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/pcmciautils-${PV}.tar.bz2"
+SRC_URI = "http://mirror.linux.org.au/linux/utils/kernel/pcmcia/${BP}.tar.bz2"
S = "${WORKDIR}/pcmciautils-${PV}"
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 21d270442c..8d35187d63 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
@@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "8ed899032866d88b2933a1d34cc75e8ae42dcde20e1cc21836baaae3d4
inherit pkgconfig autotools
-RDEPENDS_${PN} = "grep"
+RDEPENDS_${PN} = "grep bash"
do_configure_prepend () {
( cd ${S}; autoreconf -f -i -s )
diff --git a/meta/recipes-bsp/setserial/setserial/ldflags.patch b/meta/recipes-bsp/setserial/setserial/ldflags.patch
new file mode 100644
index 0000000000..4313d2c797
--- /dev/null
+++ b/meta/recipes-bsp/setserial/setserial/ldflags.patch
@@ -0,0 +1,24 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- setserial-2.17.orig/Makefile.in
++++ setserial-2.17/Makefile.in
+@@ -13,6 +13,7 @@ STRIP = @STRIP@
+ CC = @CC@
+ RM = rm -f
+ CFLAGS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ DEFS = @DEFS@
+ INCS = -I.
+ TAR = tar
+@@ -20,7 +21,7 @@ TAR = tar
+ all: setserial setserial.cat
+
+ setserial: setserial.c
+- $(CC) $(CFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
++ $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) $(INCS) setserial.c -o setserial
+
+ setserial.cat: setserial.8
+ nroff -man setserial.8 > setserial.cat
diff --git a/meta/recipes-bsp/setserial/setserial_2.17.bb b/meta/recipes-bsp/setserial/setserial_2.17.bb
index 65d6068d15..8dbddd7dc5 100644
--- a/meta/recipes-bsp/setserial/setserial_2.17.bb
+++ b/meta/recipes-bsp/setserial/setserial_2.17.bb
@@ -8,10 +8,13 @@ LICENSE = "GPLv2.0"
LIC_FILES_CHKSUM = "file://version.h;beginline=1;endline=6;md5=2e7c59cb9e57e356ae81f50f4e4dfd99"
PR = "r3"
+DEPENDS += "groff-native"
+
inherit autotools-brokensep
SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${BPN}-${PV}.tar.gz \
file://add_stdlib.patch \
+ file://ldflags.patch \
"
SRC_URI[md5sum] = "c4867d72c41564318e0107745eb7a0f2"
diff --git a/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch b/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch
deleted file mode 100644
index 77e35bbc7c..0000000000
--- a/meta/recipes-bsp/u-boot/files/0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 5701384cea4a829b772bf7a96a74825b58c22385 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys@ti.com>
-Date: Thu, 17 Apr 2014 12:25:40 -0400
-Subject: [PATCH] am335x_evm.h: Add, use DEFAULT_LINUX_BOOT_ENV environment
- string
-
-Modified version of the patch currently being reviewed for mainline:
-http://patchwork.ozlabs.org/patch/334861/
-
-To deal with a reoccurring problem properly we need to specify addresses
-for the Linux kernel, Flatted Device Tree and ramdisk that obey the
-constraints within the kernel's Documentation/arm/Booting file but also
-make sure that we relocate things within a valid address range.
-
-Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-Signed-off-by: Tom Rini <trini@ti.com>
-
-Upstream-Status: Pending
----
- include/configs/am335x_evm.h | 31 ++++++++++++++++++++++++++-----
- 1 file changed, 26 insertions(+), 5 deletions(-)
-
-diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
-index c5a6d4b..01e32b3 100644
---- a/include/configs/am335x_evm.h
-+++ b/include/configs/am335x_evm.h
-@@ -54,10 +54,7 @@
- #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
- #ifndef CONFIG_SPL_BUILD
- #define CONFIG_EXTRA_ENV_SETTINGS \
-- "loadaddr=0x80200000\0" \
-- "fdtaddr=0x80F80000\0" \
-- "fdt_high=0xffffffff\0" \
-- "rdaddr=0x81000000\0" \
-+ DEFAULT_LINUX_BOOT_ENV \
- "bootdir=/boot\0" \
- "bootfile=uImage\0" \
- "fdtfile=undefined\0" \
-@@ -197,7 +194,31 @@
- #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
- + (8 * 1024 * 1024))
-
--#define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */
-+/*
-+ * Our DDR memory always starts at 0x80000000 and U-Boot shall have
-+ * relocated itself to higher in memory by the time this value is used.
-+ * However, set this to a 32MB offset to allow for easier Linux kernel
-+ * booting as the default is often used as the kernel load address.
-+ */
-+#define CONFIG_SYS_LOAD_ADDR 0x82000000 /* Default load address */
-+
-+/*
-+ * We setup defaults based on constraints from the Linux kernel, which should
-+ * also be safe elsewhere. We have the default load at 32MB into DDR (for
-+ * the kernel), FDT above 128MB (the maximum location for the end of the
-+ * kernel), and the ramdisk 512KB above that (allowing for hopefully never
-+ * seen large trees). We say all of this must be within the first 256MB
-+ * as that will normally be within the kernel lowmem and thus visible via
-+ * bootm_size and we only run on platforms with 256MB or more of memory.
-+ */
-+#define DEFAULT_LINUX_BOOT_ENV \
-+ "loadaddr=0x82000000\0" \
-+ "kernel_addr_r=0x82000000\0" \
-+ "fdtaddr=0x88000000\0" \
-+ "fdt_addr_r=0x88000000\0" \
-+ "rdaddr=0x88080000\0" \
-+ "ramdisk_addr_r=0x88080000\0" \
-+ "bootm_size=0x10000000\0"
-
- #define CONFIG_MMC
- #define CONFIG_GENERIC_MMC
---
-1.9.2
-
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb
deleted file mode 100644
index e6163972dc..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils-cross_2013.07.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-inherit uboot-config cross
-
-EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
-
-do_compile () {
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake env
-}
-
-do_install () {
- 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_PREPROCESS_FUNCS = "uboot_fw_utils_cross"
-uboot_fw_utils_cross() {
- sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
deleted file mode 100644
index 89fed8bee4..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"'
-
-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
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb
new file mode 100644
index 0000000000..9a304c8c5d
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2014.07.bb
@@ -0,0 +1,47 @@
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+SECTION = "bootloader"
+DEPENDS = "mtd-utils"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+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_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
+uboot_fw_utils_cross() {
+ sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb
deleted file mode 100644
index 2ca6050bf9..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2013.07.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-SECTION = "bootloader"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
-
-do_compile () {
- oe_runmake tools
-}
-
-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-mkimage_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb
new file mode 100644
index 0000000000..eabf680ec6
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2014.07.bb
@@ -0,0 +1,34 @@
+SUMMARY = "U-Boot bootloader image creation tool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+SECTION = "bootloader"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master;protocol=git"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTLD="${LD}" HOSTLDFLAGS="${LDFLAGS}" HOSTSTRIP=true'
+
+do_compile () {
+ # Make sure the recompile is OK
+ rm -f ${B}/tools/.depend
+
+ make HOSTCC="${BUILD_CC}" HOSTLD="${BUILD_LD}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTSTRIP=true dot-config=0 scripts_basic
+ sed 's/^tools-only: scripts_basic /tools-only: /' -i Makefile
+ oe_runmake tools-only
+}
+
+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.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 53c87c28f0..c695b73b48 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -3,6 +3,15 @@ HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
SECTION = "bootloaders"
PROVIDES = "virtual/bootloader"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit uboot-config deploy
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
@@ -14,7 +23,7 @@ UBOOT_LOCALVERSION ?= ""
# Some versions of u-boot use .bin and others use .img. By default use .bin
# but enable individual recipes to change this value.
-UBOOT_SUFFIX ?= "bin"
+UBOOT_SUFFIX ??= "bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot_2013.07.bb
deleted file mode 100644
index f8a88568d2..0000000000
--- a/meta/recipes-bsp/u-boot/u-boot_2013.07.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require u-boot.inc
-
-# To build u-boot for your machine, provide the following lines in your machine
-# config, replacing the assignments as appropriate for your machine.
-# UBOOT_MACHINE = "omap3_beagle_config"
-# UBOOT_ENTRYPOINT = "0x80008000"
-# UBOOT_LOADADDRESS = "0x80008000"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
- file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the repo during parse
-SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-
-PV = "v2013.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
- file://0001-am335x_evm.h-Add-use-DEFAULT_LINUX_BOOT_ENV-environm.patch \
-"
-
-S = "${WORKDIR}/git"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-bsp/u-boot/u-boot_2014.07.bb b/meta/recipes-bsp/u-boot/u-boot_2014.07.bb
new file mode 100644
index 0000000000..44cc52eb6c
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot_2014.07.bb
@@ -0,0 +1,9 @@
+require u-boot.inc
+
+DEPENDS += "dtc-native"
+
+# This revision corresponds to the tag "v2014.07"
+# We use the revision in order to avoid having to fetch it from the repo during parse
+SRCREV = "524123a70761110c5cf3ccc5f52f6d4da071b959"
+
+PV = "v2014.07+git${SRCPV}"
diff --git a/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch b/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
new file mode 100644
index 0000000000..6455567174
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
@@ -0,0 +1,41 @@
+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_008.bb b/meta/recipes-bsp/usbutils/usbutils_008.bb
new file mode 100644
index 0000000000..0f2d8d47c4
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils_008.bb
@@ -0,0 +1,28 @@
+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 systemd"
+
+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
+# This version of usbutils relies on the udev from systemd, so unless
+# we can decouple udev from system, we require systemd for now.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+
+RDEPENDS_${PN} = "libudev"
+RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
diff --git a/meta/recipes-bsp/v86d/v86d/uvesafb.conf b/meta/recipes-bsp/v86d/v86d/uvesafb.conf
new file mode 100644
index 0000000000..43789755d3
--- /dev/null
+++ b/meta/recipes-bsp/v86d/v86d/uvesafb.conf
@@ -0,0 +1,2 @@
+# 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 b980331ac3..f50207212f 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -12,6 +12,7 @@ PR = "r2"
SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
file://Update-x86emu-from-X.org.patch \
file://fbsetup \
+ file://uvesafb.conf \
file://ar-from-env.patch"
SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
@@ -35,8 +36,34 @@ do_install () {
install -d ${D}${base_sbindir}
install v86d ${D}${base_sbindir}/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/fbsetup ${D}${sysconfdir}/init.d/fbsetup
+ # 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.31.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
index 557c1c1651..eea4d70fab 100644
--- a/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
+++ b/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
@@ -45,7 +45,11 @@ RDEPENDS_python-avahi = "python-core python-dbus"
do_install_append () {
rm ${D}${sysconfdir} -rf
rm ${D}${base_libdir} -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*
@@ -64,6 +68,5 @@ do_install_append () {
rm ${D}${mandir}/man1/a*
rm ${D}${mandir}/man5 -rf
rm ${D}${mandir}/man8 -rf
- rmdir ${D}${localstatedir}
}
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 3318f40384..b060437c12 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -73,6 +73,9 @@ do_configure_prepend() {
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_avahi = ""
FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
${sysconfdir}/avahi/avahi-autoipd.action \
${sysconfdir}/dhcp/*/avahi-autoipd \
@@ -99,6 +102,8 @@ FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
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"
@@ -122,7 +127,8 @@ 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}/var/run
+ rm -rf ${D}${localstatedir}/run
+ rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
rm -rf ${D}${datadir}/dbus-1/interfaces
rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
rm -rf ${D}${libdir}/avahi
diff --git a/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch b/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch
new file mode 100644
index 0000000000..4f1a3f8e89
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch
@@ -0,0 +1,35 @@
+From 8fa549fe5390875d56f75e20d364394cd5ccf388 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald <joe_macdonald@mentor.com>
+Date: Mon, 3 Nov 2014 21:52:02 -0500
+Subject: [PATCH] bind: add crosscripts search path for xml2-config
+
+The configure script was testing xml2-config from bin but in openembedded
+bin folder is not copied to sysroot so the test was failing. Added another
+condition to test libxml-2.0.pc which is present in lib folder. Used pkg-config
+to get libs and cflags information.
+
+Upstream-Status: Inappropriate [ openembedded specific ]
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
+---
+ configure.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 3d04f4c..6032f67 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1433,6 +1433,9 @@ case "$use_libxml2" in
+ 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`
++ elif test -f "$use_libxml2/lib/pkgconfig/libxml-2.0.pc" ; then
++ libxml2_libs=`pkg-config libxml-2.0 --libs`
++ libxml2_cflags=`pkg-config libxml-2.0 --cflags`
+ fi
+ ;;
+ esac
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/bind/bind/bind9 b/meta/recipes-connectivity/bind/bind/bind9
new file mode 100644
index 0000000000..968679ff7f
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind9
@@ -0,0 +1,2 @@
+# startup options for the server
+OPTIONS="-u bind"
diff --git a/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch b/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
new file mode 100644
index 0000000000..62142d2313
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
@@ -0,0 +1,990 @@
+From 603a0e2637b35a2da820bc807f69bcf09c682dce Mon Sep 17 00:00:00 2001
+From: Evan Hunt <each@isc.org>
+Date: Mon, 17 Nov 2014 23:49:07 -0800
+Subject: [PATCH] [v9_9] limit recursion depth and iterative queries
+
+4006. [security] A flaw in delegation handling could be exploited
+ to put named into an infinite loop. This has
+ been addressed by placing limits on the number
+ of levels of recursion named will allow (default 7),
+ and the number of iterative queries that it will
+ send (default 50) before terminating a recursive
+ query (CVE-2014-8500).
+
+ The recursion depth limit is configured via the
+ "max-recursion-depth" option. [RT #35780]
+
+Upstream-Status: Backport
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+ bin/named/config.c | 3 +-
+ bin/named/include/named/query.h | 2 -
+ bin/named/query.c | 7 ++-
+ bin/named/server.c | 5 ++
+ bin/tests/system/many/clean.sh | 7 +++
+ bin/tests/system/many/ns1/named.conf | 33 +++++++++++++
+ bin/tests/system/many/ns2/named.conf | 30 ++++++++++++
+ bin/tests/system/many/ns3/named.conf | 32 +++++++++++++
+ bin/tests/system/many/ns4/named.conf | 30 ++++++++++++
+ bin/tests/system/many/ns5/hints.db | 2 +
+ bin/tests/system/many/ns5/named.conf | 29 ++++++++++++
+ bin/tests/system/many/setup.sh | 75 ++++++++++++++++++++++++++++++
+ bin/tests/system/many/tests.sh | 48 +++++++++++++++++++
+ doc/arm/Bv9ARM-book.xml | 12 +++++
+ lib/dns/adb.c | 58 ++++++++++++++++-------
+ lib/dns/include/dns/adb.h | 8 ++++
+ lib/dns/include/dns/resolver.h | 25 ++++++++++
+ lib/dns/resolver.c | 90 ++++++++++++++++++++++++++++++------
+ lib/isccfg/namedconf.c | 1 +
+ 20 files changed, 471 insertions(+), 37 deletions(-)
+ create mode 100644 bin/tests/system/many/clean.sh
+ create mode 100644 bin/tests/system/many/ns1/named.conf
+ create mode 100644 bin/tests/system/many/ns2/named.conf
+ create mode 100644 bin/tests/system/many/ns3/named.conf
+ create mode 100644 bin/tests/system/many/ns4/named.conf
+ create mode 100644 bin/tests/system/many/ns5/hints.db
+ create mode 100644 bin/tests/system/many/ns5/named.conf
+ create mode 100644 bin/tests/system/many/setup.sh
+ create mode 100644 bin/tests/system/many/tests.sh
+
+diff --git a/bin/named/config.c b/bin/named/config.c
+index 2782720..5ee8c4e 100644
+--- a/bin/named/config.c
++++ b/bin/named/config.c
+@@ -15,8 +15,6 @@
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: config.c,v 1.123 2012/01/06 23:46:41 tbox Exp $ */
+-
+ /*! \file */
+
+ #include <config.h>
+@@ -160,6 +158,7 @@ options {\n\
+ dnssec-accept-expired no;\n\
+ clients-per-query 10;\n\
+ max-clients-per-query 100;\n\
++ max-recursion-depth 7;\n\
+ zero-no-soa-ttl-cache no;\n\
+ nsec3-test-zone no;\n\
+ allow-new-zones no;\n\
+diff --git a/bin/named/include/named/query.h b/bin/named/include/named/query.h
+index 3beabb8..b5e3900 100644
+--- a/bin/named/include/named/query.h
++++ b/bin/named/include/named/query.h
+@@ -15,8 +15,6 @@
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: query.h,v 1.45 2011/01/13 04:59:24 tbox Exp $ */
+-
+ #ifndef NAMED_QUERY_H
+ #define NAMED_QUERY_H 1
+
+diff --git a/bin/named/query.c b/bin/named/query.c
+index 982f76d..47bfc6a 100644
+--- a/bin/named/query.c
++++ b/bin/named/query.c
+@@ -3877,12 +3877,11 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
+ peeraddr = &client->peeraddr;
+ else
+ peeraddr = NULL;
+- result = dns_resolver_createfetch2(client->view->resolver,
++ result = dns_resolver_createfetch3(client->view->resolver,
+ qname, qtype, qdomain, nameservers,
+ NULL, peeraddr, client->message->id,
+- client->query.fetchoptions,
+- client->task,
+- query_resume, client,
++ client->query.fetchoptions, 0,
++ client->task, query_resume, client,
+ rdataset, sigrdataset,
+ &client->query.fetch);
+
+diff --git a/bin/named/server.c b/bin/named/server.c
+index ac015a4..0559977 100644
+--- a/bin/named/server.c
++++ b/bin/named/server.c
+@@ -3161,6 +3161,11 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
+ cfg_obj_asuint32(obj),
+ max_clients_per_query);
+
++ obj = NULL;
++ result = ns_config_get(maps, "max-recursion-depth", &obj);
++ INSIST(result == ISC_R_SUCCESS);
++ dns_resolver_setmaxdepth(view->resolver, cfg_obj_asuint32(obj));
++
+ #ifdef ALLOW_FILTER_AAAA_ON_V4
+ obj = NULL;
+ result = ns_config_get(maps, "filter-aaaa-on-v4", &obj);
+diff --git a/bin/tests/system/many/clean.sh b/bin/tests/system/many/clean.sh
+new file mode 100644
+index 0000000..119b1f5
+--- /dev/null
++++ b/bin/tests/system/many/clean.sh
+@@ -0,0 +1,7 @@
++rm -f ns1/[1-9]*example.tld?.db
++rm -f ns2/[1-9]*example.tld?.db
++rm -f ns1/zones.conf
++rm -f ns2/zones.conf
++rm -f */root.db
++rm -f ns3/tld1.db
++rm -f ns4/tld2.db
+diff --git a/bin/tests/system/many/ns1/named.conf b/bin/tests/system/many/ns1/named.conf
+new file mode 100644
+index 0000000..abc9dca
+--- /dev/null
++++ b/bin/tests/system/many/ns1/named.conf
+@@ -0,0 +1,33 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC 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.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.1;
++ notify-source 10.53.0.1;
++ transfer-source 10.53.0.1;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.1; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++include "zones.conf";
++
++// zone "tld1" { type master; file "tld1.db"; };
++// zone "tld2" { type master; file "tld2.db"; };
+diff --git a/bin/tests/system/many/ns2/named.conf b/bin/tests/system/many/ns2/named.conf
+new file mode 100644
+index 0000000..16266e2
+--- /dev/null
++++ b/bin/tests/system/many/ns2/named.conf
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC 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.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.2;
++ notify-source 10.53.0.2;
++ transfer-source 10.53.0.2;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.2; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++include "zones.conf";
+diff --git a/bin/tests/system/many/ns3/named.conf b/bin/tests/system/many/ns3/named.conf
+new file mode 100644
+index 0000000..b950afe
+--- /dev/null
++++ b/bin/tests/system/many/ns3/named.conf
+@@ -0,0 +1,32 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC 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.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.3;
++ notify-source 10.53.0.3;
++ transfer-source 10.53.0.3;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.3; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++zone "." { type master; file "root.db"; };
++
++zone "tld1" { type master; file "tld1.db"; };
+diff --git a/bin/tests/system/many/ns4/named.conf b/bin/tests/system/many/ns4/named.conf
+new file mode 100644
+index 0000000..ca9aa6a
+--- /dev/null
++++ b/bin/tests/system/many/ns4/named.conf
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC 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.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.4;
++ notify-source 10.53.0.4;
++ transfer-source 10.53.0.4;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.4; };
++ listen-on-v6 { none; };
++ recursion no;
++};
++
++zone "tld2" { type master; file "tld2.db"; };
+diff --git a/bin/tests/system/many/ns5/hints.db b/bin/tests/system/many/ns5/hints.db
+new file mode 100644
+index 0000000..c05809b
+--- /dev/null
++++ b/bin/tests/system/many/ns5/hints.db
+@@ -0,0 +1,2 @@
++. 60 in ns ns.nil.
++ns.nil. 60 in A 10.53.0.3
+diff --git a/bin/tests/system/many/ns5/named.conf b/bin/tests/system/many/ns5/named.conf
+new file mode 100644
+index 0000000..fce7d59
+--- /dev/null
++++ b/bin/tests/system/many/ns5/named.conf
+@@ -0,0 +1,29 @@
++/*
++ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++ *
++ * 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.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS. IN NO EVENT SHALL ISC 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.
++ */
++
++controls { /* empty */ };
++
++options {
++ query-source address 10.53.0.5;
++ notify-source 10.53.0.5;
++ transfer-source 10.53.0.5;
++ port 5300;
++ pid-file "named.pid";
++ listen-on { 10.53.0.5; };
++ listen-on-v6 { none; };
++};
++
++zone "." { type hint; file "hints.db"; };
+diff --git a/bin/tests/system/many/setup.sh b/bin/tests/system/many/setup.sh
+new file mode 100644
+index 0000000..80695b5
+--- /dev/null
++++ b/bin/tests/system/many/setup.sh
+@@ -0,0 +1,75 @@
++i=1
++
++cat > ns3/root.db << EOF
++. 60 in soa ns.nil. hostmaster.ns.nil. 1 0 0 0 0
++. 60 in ns ns.nil.
++ns.nil. 60 in a 10.53.0.3
++tld1. 60 in ns ns.tld1.
++ns.tld1. 60 in a 10.53.0.3
++tld2. 60 in ns ns.tld2.
++ns.tld2. 60 in a 10.53.0.4
++EOF
++
++cat > ns3/tld1.db << EOF
++tld1. 60 in soa ns.tld1. hostmaster.ns.tld1. 1 0 0 0 0
++tld1. 60 in ns ns.tld1.
++ns.tld1. 60 in a 10.53.0.1
++EOF
++
++cat > ns4/tld2.db << EOF
++tld2. 60 in soa ns.tld2. hostmaster.ns.tld4. 1 0 0 0 0
++tld2. 60 in ns ns.tld2.
++ns.tld2. 60 in a 10.53.0.1
++EOF
++
++: > ns1/zones.conf
++: > ns2/zones.conf
++
++while [ $i -lt 1000 ]
++do
++j=`expr $i + 1`
++s=`expr $j % 2 + 1`
++n=`expr $i % 2 + 1`
++t=`expr $s + 2`
++
++# i=1 j=2 s=1 n=2
++# i=2 j=3 s=1 n=2
++# i=3 j=4 s=1 n=2
++
++cat > ns1/${i}example.tld${s}.db << EOF
++${i}example.tld${s}. 60 in soa ns.${j}example.tld${n}. hostmaster 1 0 0 0 0
++${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
++
++cat >> ns1/zones.conf << EOF
++zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
++EOF
++
++cat >> ns${t}/tld${s}.db << EOF
++${i}example.tld${s}. 60 in ns ns.${j}example.tld${n}.
++EOF
++
++i=$j
++
++done
++
++j=`expr $i + 1`
++s=`expr $j % 2 + 1`
++n=`expr $s % 2 + 1`
++t=`expr $s + 2`
++
++cat > ns1/${i}example.tld${s}.db << EOF
++${i}example.tld${s}. 60 in soa ns.${i}example.tld${s}. hostmaster 1 0 0 0 0
++${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
++
++cat >> ns1/zones.conf << EOF
++zone "${i}example.tld${s}" { type master; file "${i}example.tld${s}.db"; };
++EOF
++
++cat >> ns${t}/tld${s}.db << EOF
++${i}example.tld${s}. 60 in ns ns.${i}example.tld${s}.
++ns.${i}example.tld${s}. 60 in a 10.53.0.1
++EOF
+diff --git a/bin/tests/system/many/tests.sh b/bin/tests/system/many/tests.sh
+new file mode 100644
+index 0000000..37964e2
+--- /dev/null
++++ b/bin/tests/system/many/tests.sh
+@@ -0,0 +1,48 @@
++#!/bin/sh
++#
++# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
++#
++# 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.
++#
++# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
++# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++# AND FITNESS. IN NO EVENT SHALL ISC 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.
++
++SYSTEMTESTTOP=..
++. $SYSTEMTESTTOP/conf.sh
++
++status=0
++n=0
++
++n=`expr $n + 1`
++echo "I: attempt lookup 1example.tld2 soa ($n)"
++ret=0
++$DIG +tcp 1example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++n=`expr $n + 1`
++echo "I: attempt lookup 992example.tld2 soa ($n)"
++ret=0
++$DIG +tcp 992example.tld2 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++n=`expr $n + 1`
++echo "I: attempt lookup 993example.tld1 soa ($n)"
++ret=0
++$DIG +tcp 993example.tld1 soa @10.53.0.5 -p 5300 > dig.out.test$n
++grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
++if [ $ret != 0 ]; then echo "I:failed"; fi
++status=`expr $status + $ret`
++
++echo "I:exit status: $status"
++exit $status
+diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
+index 9f7bd38..fff4249 100644
+--- a/doc/arm/Bv9ARM-book.xml
++++ b/doc/arm/Bv9ARM-book.xml
+@@ -4861,6 +4861,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]
+ <optional> max-acache-size <replaceable>size_spec</replaceable> ; </optional>
+ <optional> clients-per-query <replaceable>number</replaceable> ; </optional>
+ <optional> max-clients-per-query <replaceable>number</replaceable> ; </optional>
++ <optional> max-recursion-depth <replaceable>number</replaceable> ; </optional>
+ <optional> masterfile-format (<constant>text</constant>|<constant>raw</constant>) ; </optional>
+ <optional> empty-server <replaceable>name</replaceable> ; </optional>
+ <optional> empty-contact <replaceable>name</replaceable> ; </optional>
+@@ -8680,6 +8681,17 @@ avoid-v6-udp-ports { 40000; range 50000 60000; };
+ </listitem>
+ </varlistentry>
+
++ <varlistentry id="max-recursion-depth">
++ <term><command>max-recursion-depth</command></term>
++ <listitem>
++ <para>
++ Sets the maximum number of levels of recursion
++ permitted at any one time while resolving a name.
++ The default is 7.
++ </para>
++ </listitem>
++ </varlistentry>
++
+ <varlistentry>
+ <term><command>notify-delay</command></term>
+ <listitem>
+diff --git a/lib/dns/adb.c b/lib/dns/adb.c
+index 2ccb51e..fe9b3f7 100644
+--- a/lib/dns/adb.c
++++ b/lib/dns/adb.c
+@@ -199,6 +199,7 @@ struct dns_adbfetch {
+ unsigned int magic;
+ dns_fetch_t *fetch;
+ dns_rdataset_t rdataset;
++ unsigned int depth;
+ };
+
+ /*%
+@@ -300,7 +301,7 @@ static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
+ static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
+ static void clean_target(dns_adb_t *, dns_name_t *);
+ static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t,
+- unsigned int);
++ isc_uint32_t, unsigned int);
+ static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
+ static isc_boolean_t check_expire_entry(dns_adb_t *, dns_adbentry_t **,
+ isc_stdtime_t);
+@@ -308,7 +309,7 @@ static void cancel_fetches_at_name(dns_adbname_t *);
+ static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
+ dns_rdatatype_t);
+ static isc_result_t fetch_name(dns_adbname_t *, isc_boolean_t,
+- dns_rdatatype_t);
++ unsigned int, dns_rdatatype_t);
+ static inline void check_exit(dns_adb_t *);
+ static void destroy(dns_adb_t *);
+ static isc_boolean_t shutdown_names(dns_adb_t *);
+@@ -984,7 +985,7 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
+ * Clean up the name's various lists. These two are destructive
+ * in that they will always empty the list.
+ */
+- clean_finds_at_name(name, ev, DNS_ADBFIND_ADDRESSMASK);
++ clean_finds_at_name(name, ev, 0, DNS_ADBFIND_ADDRESSMASK);
+ result4 = clean_namehooks(adb, &name->v4);
+ result6 = clean_namehooks(adb, &name->v6);
+ clean_target(adb, &name->target);
+@@ -1409,7 +1410,7 @@ event_free(isc_event_t *event) {
+ */
+ static void
+ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
+- unsigned int addrs)
++ isc_uint32_t qtotal, unsigned int addrs)
+ {
+ isc_event_t *ev;
+ isc_task_t *task;
+@@ -1469,6 +1470,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
+ ev->ev_sender = find;
+ find->result_v4 = find_err_map[name->fetch_err];
+ find->result_v6 = find_err_map[name->fetch6_err];
++ find->qtotal += qtotal;
+ ev->ev_type = evtype;
+ ev->ev_destroy = event_free;
+ ev->ev_destroy_arg = find;
+@@ -1827,6 +1829,7 @@ new_adbfind(dns_adb_t *adb) {
+ h->flags = 0;
+ h->result_v4 = ISC_R_UNEXPECTED;
+ h->result_v6 = ISC_R_UNEXPECTED;
++ h->qtotal = 0;
+ ISC_LINK_INIT(h, publink);
+ ISC_LINK_INIT(h, plink);
+ ISC_LIST_INIT(h->list);
+@@ -2799,6 +2802,19 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ isc_stdtime_t now, dns_name_t *target,
+ in_port_t port, dns_adbfind_t **findp)
+ {
++ return (dns_adb_createfind2(adb, task, action, arg, name,
++ qname, qtype, options, now,
++ target, port, 0, findp));
++}
++
++isc_result_t
++dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
++ void *arg, dns_name_t *name, dns_name_t *qname,
++ dns_rdatatype_t qtype, unsigned int options,
++ isc_stdtime_t now, dns_name_t *target,
++ in_port_t port, unsigned int depth,
++ dns_adbfind_t **findp)
++{
+ dns_adbfind_t *find;
+ dns_adbname_t *adbname;
+ int bucket;
+@@ -3029,7 +3045,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ * Start V4.
+ */
+ if (WANT_INET(wanted_fetches) &&
+- fetch_name(adbname, start_at_zone,
++ fetch_name(adbname, start_at_zone, depth,
+ dns_rdatatype_a) == ISC_R_SUCCESS) {
+ DP(DEF_LEVEL,
+ "dns_adb_createfind: started A fetch for name %p",
+@@ -3040,7 +3056,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ * Start V6.
+ */
+ if (WANT_INET6(wanted_fetches) &&
+- fetch_name(adbname, start_at_zone,
++ fetch_name(adbname, start_at_zone, depth,
+ dns_rdatatype_aaaa) == ISC_R_SUCCESS) {
+ DP(DEF_LEVEL,
+ "dns_adb_createfind: "
+@@ -3656,6 +3672,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ isc_result_t result;
+ unsigned int address_type;
+ isc_boolean_t want_check_exit = ISC_FALSE;
++ isc_uint32_t qtotal = 0;
+
+ UNUSED(task);
+
+@@ -3666,6 +3683,8 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ adb = name->adb;
+ INSIST(DNS_ADB_VALID(adb));
+
++ qtotal = dev->qtotal;
++
+ bucket = name->lock_bucket;
+ LOCK(&adb->namelocks[bucket]);
+
+@@ -3783,6 +3802,12 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ DP(DEF_LEVEL, "adb: fetch of '%s' %s failed: %s",
+ buf, address_type == DNS_ADBFIND_INET ? "A" : "AAAA",
+ dns_result_totext(dev->result));
++ /*
++ * Don't record a failure unless this is the initial
++ * fetch of a chain.
++ */
++ if (fetch->depth > 1)
++ goto out;
+ /* XXXMLG Don't pound on bad servers. */
+ if (address_type == DNS_ADBFIND_INET) {
+ name->expire_v4 = ISC_MIN(name->expire_v4, now + 300);
+@@ -3814,15 +3839,14 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
+ free_adbfetch(adb, &fetch);
+ isc_event_free(&ev);
+
+- clean_finds_at_name(name, ev_status, address_type);
++ clean_finds_at_name(name, ev_status, qtotal, address_type);
+
+ UNLOCK(&adb->namelocks[bucket]);
+ }
+
+ static isc_result_t
+-fetch_name(dns_adbname_t *adbname,
+- isc_boolean_t start_at_zone,
+- dns_rdatatype_t type)
++fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
++ unsigned int depth, dns_rdatatype_t type)
+ {
+ isc_result_t result;
+ dns_adbfetch_t *fetch = NULL;
+@@ -3867,12 +3891,14 @@ fetch_name(dns_adbname_t *adbname,
+ result = ISC_R_NOMEMORY;
+ goto cleanup;
+ }
+-
+- result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
+- type, name, nameservers, NULL,
+- options, adb->task, fetch_callback,
+- adbname, &fetch->rdataset, NULL,
+- &fetch->fetch);
++ fetch->depth = depth;
++
++ result = dns_resolver_createfetch3(adb->view->resolver, &adbname->name,
++ type, name, nameservers, NULL,
++ NULL, 0, options, depth, adb->task,
++ fetch_callback, adbname,
++ &fetch->rdataset, NULL,
++ &fetch->fetch);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+
+diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h
+index 35350ff..7501f01 100644
+--- a/lib/dns/include/dns/adb.h
++++ b/lib/dns/include/dns/adb.h
+@@ -118,6 +118,8 @@ struct dns_adbfind {
+ isc_result_t result_v6; /*%< RO: v6 result */
+ ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
+
++ isc_uint32_t qtotal;
++
+ /* Private */
+ isc_mutex_t lock; /* locks all below */
+ in_port_t port;
+@@ -334,6 +336,12 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
+ dns_rdatatype_t qtype, unsigned int options,
+ isc_stdtime_t now, dns_name_t *target,
+ in_port_t port, dns_adbfind_t **find);
++isc_result_t
++dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
++ void *arg, dns_name_t *name, dns_name_t *qname,
++ dns_rdatatype_t qtype, unsigned int options,
++ isc_stdtime_t now, dns_name_t *target, in_port_t port,
++ unsigned int depth, dns_adbfind_t **find);
+ /*%<
+ * Main interface for clients. The adb will look up the name given in
+ * "name" and will build up a list of found addresses, and perhaps start
+diff --git a/lib/dns/include/dns/resolver.h b/lib/dns/include/dns/resolver.h
+index 4e20eb6..c256049 100644
+--- a/lib/dns/include/dns/resolver.h
++++ b/lib/dns/include/dns/resolver.h
+@@ -82,6 +82,7 @@ typedef struct dns_fetchevent {
+ isc_sockaddr_t * client;
+ dns_messageid_t id;
+ isc_result_t vresult;
++ isc_uint32_t qtotal;
+ } dns_fetchevent_t;
+
+ /*
+@@ -275,6 +276,18 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *rdataset,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp);
++isc_result_t
++dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
++ dns_rdatatype_t type,
++ dns_name_t *domain, dns_rdataset_t *nameservers,
++ dns_forwarders_t *forwarders,
++ isc_sockaddr_t *client, isc_uint16_t id,
++ unsigned int options, unsigned int depth,
++ isc_task_t *task,
++ isc_taskaction_t action, void *arg,
++ dns_rdataset_t *rdataset,
++ dns_rdataset_t *sigrdataset,
++ dns_fetch_t **fetchp);
+ /*%<
+ * Recurse to answer a question.
+ *
+@@ -576,6 +589,18 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
+ * \li resolver to be valid.
+ */
+
++void
++dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
++unsigned int
++dns_resolver_getmaxdepth(dns_resolver_t *resolver);
++/*%
++ * Get and set how many NS indirections will be followed when looking for
++ * nameserver addresses.
++ *
++ * Requires:
++ * \li resolver to be valid.
++ */
++
+ ISC_LANG_ENDDECLS
+
+ #endif /* DNS_RESOLVER_H */
+diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
+index e517dad..6a635b2 100644
+--- a/lib/dns/resolver.c
++++ b/lib/dns/resolver.c
+@@ -131,6 +131,16 @@
+ #define MAXIMUM_QUERY_TIMEOUT 30 /* The maximum time in seconds for the whole query to live. */
+ #endif
+
++/* The default maximum number of recursions to follow before giving up. */
++#ifndef DEFAULT_RECURSION_DEPTH
++#define DEFAULT_RECURSION_DEPTH 7
++#endif
++
++/* The default maximum number of iterative queries to allow before giving up. */
++#ifndef DEFAULT_MAX_QUERIES
++#define DEFAULT_MAX_QUERIES 50
++#endif
++
+ /*%
+ * Maximum EDNS0 input packet size.
+ */
+@@ -297,6 +307,7 @@ struct fetchctx {
+ isc_uint64_t duration;
+ isc_boolean_t logged;
+ unsigned int querysent;
++ unsigned int totalqueries;
+ unsigned int referrals;
+ unsigned int lamecount;
+ unsigned int neterr;
+@@ -307,6 +318,7 @@ struct fetchctx {
+ isc_boolean_t timeout;
+ dns_adbaddrinfo_t *addrinfo;
+ isc_sockaddr_t *client;
++ unsigned int depth;
+ };
+
+ #define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
+@@ -419,6 +431,7 @@ struct dns_resolver {
+ isc_timer_t * spillattimer;
+ isc_boolean_t zero_no_soa_ttl;
+ unsigned int query_timeout;
++ unsigned int maxdepth;
+
+ /* Locked by lock. */
+ unsigned int references;
+@@ -1097,6 +1110,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) {
+ event->result == DNS_R_NCACHENXRRSET);
+ }
+
++ event->qtotal = fctx->totalqueries;
+ isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event));
+ count++;
+ }
+@@ -1537,7 +1551,9 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
+ if (result != ISC_R_SUCCESS)
+ goto cleanup_dispatch;
+ }
++
+ fctx->querysent++;
++ fctx->totalqueries++;
+
+ ISC_LIST_APPEND(fctx->queries, query, link);
+ query->fctx->nqueries++;
+@@ -2194,9 +2210,10 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
+ */
+ INSIST(!SHUTTINGDOWN(fctx));
+ fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
+- if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES)
++ if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES) {
+ want_try = ISC_TRUE;
+- else {
++ fctx->totalqueries += find->qtotal;
++ } else {
+ fctx->findfail++;
+ if (fctx->pending == 0) {
+ /*
+@@ -2479,12 +2496,13 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
+ * See what we know about this address.
+ */
+ find = NULL;
+- result = dns_adb_createfind(fctx->adb,
+- res->buckets[fctx->bucketnum].task,
+- fctx_finddone, fctx, name,
+- &fctx->name, fctx->type,
+- options, now, NULL,
+- res->view->dstport, &find);
++ result = dns_adb_createfind2(fctx->adb,
++ res->buckets[fctx->bucketnum].task,
++ fctx_finddone, fctx, name,
++ &fctx->name, fctx->type,
++ options, now, NULL,
++ res->view->dstport,
++ fctx->depth + 1, &find);
+ if (result != ISC_R_SUCCESS) {
+ if (result == DNS_R_ALIAS) {
+ /*
+@@ -2592,6 +2610,11 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
+
+ res = fctx->res;
+
++ if (fctx->depth > res->maxdepth) {
++ FCTXTRACE("too much NS indirection");
++ return (DNS_R_SERVFAIL);
++ }
++
+ /*
+ * Forwarders.
+ */
+@@ -3030,6 +3053,9 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
+
+ REQUIRE(!ADDRWAIT(fctx));
+
++ if (fctx->totalqueries > DEFAULT_MAX_QUERIES)
++ fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
++
+ addrinfo = fctx_nextaddress(fctx);
+ if (addrinfo == NULL) {
+ /*
+@@ -3388,6 +3414,7 @@ fctx_start(isc_task_t *task, isc_event_t *event) {
+ * Normal fctx startup.
+ */
+ fctx->state = fetchstate_active;
++ fctx->totalqueries = 0;
+ /*
+ * Reset the control event for later use in shutting down
+ * the fctx.
+@@ -3457,6 +3484,7 @@ fctx_join(fetchctx_t *fctx, isc_task_t *task, isc_sockaddr_t *client,
+ event->fetch = fetch;
+ event->client = client;
+ event->id = id;
++ event->qtotal = 0;
+ dns_fixedname_init(&event->foundname);
+
+ /*
+@@ -3493,7 +3521,8 @@ log_ns_ttl(fetchctx_t *fctx, const char *where) {
+ static isc_result_t
+ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ dns_name_t *domain, dns_rdataset_t *nameservers,
+- unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp)
++ unsigned int options, unsigned int bucketnum, unsigned int depth,
++ fetchctx_t **fctxp)
+ {
+ fetchctx_t *fctx;
+ isc_result_t result;
+@@ -3545,6 +3574,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ fctx->state = fetchstate_init;
+ fctx->want_shutdown = ISC_FALSE;
+ fctx->cloned = ISC_FALSE;
++ fctx->depth = depth;
+ ISC_LIST_INIT(fctx->queries);
+ ISC_LIST_INIT(fctx->finds);
+ ISC_LIST_INIT(fctx->altfinds);
+@@ -3563,6 +3593,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
+ fctx->pending = 0;
+ fctx->restarts = 0;
+ fctx->querysent = 0;
++ fctx->totalqueries = 0;
+ fctx->referrals = 0;
+ TIME_NOW(&fctx->start);
+ fctx->timeouts = 0;
+@@ -7781,6 +7812,7 @@ dns_resolver_create(dns_view_t *view,
+ res->spillattimer = NULL;
+ res->zero_no_soa_ttl = ISC_FALSE;
+ res->query_timeout = DEFAULT_QUERY_TIMEOUT;
++ res->maxdepth = DEFAULT_RECURSION_DEPTH;
+ res->nbuckets = ntasks;
+ res->activebuckets = ntasks;
+ res->buckets = isc_mem_get(view->mctx,
+@@ -8219,9 +8251,9 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp)
+ {
+- return (dns_resolver_createfetch2(res, name, type, domain,
++ return (dns_resolver_createfetch3(res, name, type, domain,
+ nameservers, forwarders, NULL, 0,
+- options, task, action, arg,
++ options, 0, task, action, arg,
+ rdataset, sigrdataset, fetchp));
+ }
+
+@@ -8237,6 +8269,25 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+ dns_rdataset_t *sigrdataset,
+ dns_fetch_t **fetchp)
+ {
++ return (dns_resolver_createfetch3(res, name, type, domain,
++ nameservers, forwarders, client, id,
++ options, 0, task, action, arg,
++ rdataset, sigrdataset, fetchp));
++}
++
++isc_result_t
++dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
++ dns_rdatatype_t type,
++ dns_name_t *domain, dns_rdataset_t *nameservers,
++ dns_forwarders_t *forwarders,
++ isc_sockaddr_t *client, dns_messageid_t id,
++ unsigned int options, unsigned int depth,
++ isc_task_t *task,
++ isc_taskaction_t action, void *arg,
++ dns_rdataset_t *rdataset,
++ dns_rdataset_t *sigrdataset,
++ dns_fetch_t **fetchp)
++{
+ dns_fetch_t *fetch;
+ fetchctx_t *fctx = NULL;
+ isc_result_t result = ISC_R_SUCCESS;
+@@ -8325,11 +8376,12 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
+
+ if (fctx == NULL) {
+ result = fctx_create(res, name, type, domain, nameservers,
+- options, bucketnum, &fctx);
++ options, bucketnum, depth, &fctx);
+ if (result != ISC_R_SUCCESS)
+ goto unlock;
+ new_fctx = ISC_TRUE;
+- }
++ } else if (fctx->depth > depth)
++ fctx->depth = depth;
+
+ result = fctx_join(fctx, task, client, id, action, arg,
+ rdataset, sigrdataset, fetch);
+@@ -9101,3 +9153,15 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds) {
+
+ resolver->query_timeout = seconds;
+ }
++
++void
++dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth) {
++ REQUIRE(VALID_RESOLVER(resolver));
++ resolver->maxdepth = maxdepth;
++}
++
++unsigned int
++dns_resolver_getmaxdepth(dns_resolver_t *resolver) {
++ REQUIRE(VALID_RESOLVER(resolver));
++ return (resolver->maxdepth);
++}
+diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
+index bfd4bab..5f8b037 100644
+--- a/lib/isccfg/namedconf.c
++++ b/lib/isccfg/namedconf.c
+@@ -1393,6 +1393,7 @@ view_clauses[] = {
+ { "max-cache-ttl", &cfg_type_uint32, 0 },
+ { "max-clients-per-query", &cfg_type_uint32, 0 },
+ { "max-ncache-ttl", &cfg_type_uint32, 0 },
++ { "max-recursion-depth", &cfg_type_uint32, 0 },
+ { "max-udp-size", &cfg_type_uint32, 0 },
+ { "min-roots", &cfg_type_uint32, CFG_CLAUSEFLAG_NOTIMP },
+ { "minimal-responses", &cfg_type_boolean, 0 },
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/bind/bind/conf.patch b/meta/recipes-connectivity/bind/bind/conf.patch
index 2785c6a22f..aad345f9fc 100644
--- a/meta/recipes-connectivity/bind/bind/conf.patch
+++ b/meta/recipes-connectivity/bind/bind/conf.patch
@@ -55,6 +55,22 @@ diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
+ 86400 ) ; Negative Cache TTL
+;
+@ IN NS localhost.
+diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255
+--- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,12 @@
++;
++; BIND reserve data file for broadcast zone
++;
++$TTL 604800
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 604800 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
+++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
@@ -261,7 +277,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+ 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 0640 /etc/bind/rndc.key
++ chmod 0640 /etc/bind/rndc.key
+ fi
+ if [ -f /var/run/named/named.pid ]; then
+ ps `cat /var/run/named/named.pid` > /dev/null && exit 1
diff --git a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
index c2e88bf127..db201270fa 100644
--- a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
+++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -3,5 +3,5 @@
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 0640 /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
fi
diff --git a/meta/recipes-connectivity/bind/bind/named.service b/meta/recipes-connectivity/bind/bind/named.service
index 1792e414ab..cda56ef015 100644
--- a/meta/recipes-connectivity/bind/bind/named.service
+++ b/meta/recipes-connectivity/bind/bind/named.service
@@ -6,7 +6,7 @@ After=network.target
[Service]
Type=forking
-EnvironmentFile=-/etc/sysconfig/named
+EnvironmentFile=-/etc/default/bind9
PIDFile=/run/named/named.pid
ExecStartPre=@SBINDIR@/generate-rndc-key.sh
diff --git a/meta/recipes-connectivity/bind/bind_9.9.5.bb b/meta/recipes-connectivity/bind/bind_9.9.5.bb
index de10eb8029..eacb23ffb8 100644
--- a/meta/recipes-connectivity/bind/bind_9.9.5.bb
+++ b/meta/recipes-connectivity/bind/bind_9.9.5.bb
@@ -15,7 +15,10 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
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://bind9_9_5-CVE-2014-8500.patch \
+ file://bind-add-crosscripts-search-path-for-xml2-config.patch \
"
SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
@@ -27,10 +30,18 @@ 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}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
+ --with-openssl=${STAGING_LIBDIR}/.. \
--enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
"
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd useradd pkgconfig
+
+PACKAGECONFIG ?= "libxml2"
+
+PACKAGECONFIG[libxml2] = "--with-libxml2=${STAGING_LIBDIR}/..,--with-libxml2=no,libxml2"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
+ --user-group bind"
INITSCRIPT_NAME = "bind"
INITSCRIPT_PARAMS = "defaults"
@@ -41,11 +52,18 @@ PARALLEL_MAKE = ""
RDEPENDS_${PN} = "python-core"
-PACKAGES_prepend = " ${PN}-utils "
+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}," ${S}/isc-config.sh
+}
+
do_install_append() {
rm "${D}${bindir}/nslookup"
rm "${D}${mandir}/man1/nslookup.1"
@@ -67,6 +85,9 @@ do_install_append() {
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} = " \
diff --git a/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb b/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
index 5c1f4760a8..3950630a86 100644
--- a/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
+++ b/meta/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
@@ -3,7 +3,9 @@ DESCRIPTION = "The hcidump tool reads raw HCI data coming from and going to a Bl
and displays the commands, events and data in a human-readable form."
SECTION = "console"
+# hcidump was integrated into bluez5
DEPENDS = "bluez4"
+RCONFLICTS_${PN} = "bluez5"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
file://src/hcidump.c;beginline=1;endline=23;md5=3bee3a162dff43a5be7470710b99fbcf"
diff --git a/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb b/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
index f2dc0da06c..c71d61253a 100644
--- a/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
+++ b/meta/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
@@ -25,6 +25,7 @@ do_install_append() {
rm -rf ${D}${libdir}/alsa-lib
rm -rf ${D}${datadir}
rm -rf ${D}${includedir}
+ rm -rf ${D}${nonarch_base_libdir}
}
FILES_${PN} = "${libdir}/gstreamer-0.10/lib*.so"
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index c3dd946517..67aafbbd6f 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -7,11 +7,14 @@ 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"
+PROVIDES += "bluez-hcidump"
+RPROVIDES_${PN} += "bluez-hcidump"
RCONFLICTS_${PN} = "bluez4"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} 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 \
@@ -26,10 +29,19 @@ EXTRA_OECONF = "\
--disable-cups \
--enable-test \
--enable-datafiles \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--disable-systemd', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \
--enable-library \
"
+# 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 = " \
+ ${NOINST_TOOLS_READLINE} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
+"
+
do_install_append() {
install -d ${D}${sysconfdir}/bluetooth/
if [ -f ${S}/profiles/audio/audio.conf ]; then
@@ -43,10 +55,15 @@ do_install_append() {
fi
# at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
+
+ # Install desired tools that upstream leaves in build area
+ for f in ${NOINST_TOOLS} ; do
+ install -m 755 ${B}/$f ${D}/${bindir}
+ done
}
ALLOW_EMPTY_libasound-module-bluez = "1"
-PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex"
+PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
@@ -63,6 +80,16 @@ SYSTEMD_SERVICE_${PN}-obex = "obex.service"
FILES_${PN}-testtools = "${libdir}/bluez/test/*"
+def get_noinst_tools_paths (d, bb, tools):
+ s = list()
+ bindir = d.getVar("bindir", True)
+ 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}-dbg += "\
${libdir}/${BPN}/bluetooth/.debug \
${libdir}/bluetooth/plugins/.debug \
diff --git a/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf b/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
index e21e72e3ec..26845bb73c 100644
--- a/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
+++ b/meta/recipes-connectivity/bluez5/bluez5/bluetooth.conf
@@ -11,6 +11,7 @@
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
+ <allow send_type="method_call"/>
</policy>
</busconfig>
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.21.bb b/meta/recipes-connectivity/bluez5/bluez5_5.21.bb
deleted file mode 100644
index 5b0102e3f1..0000000000
--- a/meta/recipes-connectivity/bluez5/bluez5_5.21.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require bluez5.inc
-SRC_URI[md5sum] = "d5a0d05520e013f2394bf1d0bac12889"
-SRC_URI[sha256sum] = "81eb073516f39ff1fa02fa40120e834f40fdb0b772f8f4153a9ab566cc0a1f4f"
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.27.bb b/meta/recipes-connectivity/bluez5/bluez5_5.27.bb
new file mode 100644
index 0000000000..9497ee51a3
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5_5.27.bb
@@ -0,0 +1,51 @@
+require bluez5.inc
+SRC_URI[md5sum] = "a8fc508690e497e88c2c0b373cd653a8"
+SRC_URI[sha256sum] = "fbf33cebc76f8c81f28f0d67c71a8a1ec4b04b087460ec7353f7e0c207a1f981"
+
+# 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 \
+"
+
+# 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/btmgmt \
+ tools/btinfo \
+ tools/btattach \
+ tools/btsnoop \
+ tools/btproxy \
+ tools/btiotest \
+ tools/cltest \
+ tools/seq2bseq \
+ tools/hex2hcd \
+ tools/ibeacon \
+ tools/btgatt-client \
+ tools/btgatt-server \
+ tools/gatt-service \
+ profiles/iap/iapd \
+"
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index af726401e2..2358d9df09 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -9,6 +9,8 @@ SRC_URI_append_qemuall = "file://wired.config \
"
PR = "r2"
+S = "${WORKDIR}"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "${localstatedir}/* ${libdir}/*"
diff --git a/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch b/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch
new file mode 100644
index 0000000000..f4049fa3e2
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/connman-gnome-fix-dbus-interface-name.patch
@@ -0,0 +1,187 @@
+connman-gnome: fix dbus interface name
+
+This patch resolves following error:
+
+"connman-dbus.xml": "connman" is not a valid D-Bus interface name
+
+https://502552.bugs.gentoo.org/attachment.cgi?id=380652
+
+Upstream-Status: Backport
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ common/connman-client.c | 24 ++++++++++++------------
+ common/connman-client.h | 4 ++--
+ common/connman-dbus.c | 6 +++---
+ common/connman-dbus.xml | 2 +-
+ 4 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/common/connman-client.c b/common/connman-client.c
+index c55e25c..9d818b2 100644
+--- a/common/connman-client.c
++++ b/common/connman-client.c
+@@ -289,7 +289,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
+
+ g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
+ g_value_set_boxed(&value, ipv4);
+- ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
++ ret = net_connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
+
+ g_object_unref(proxy);
+
+@@ -317,7 +317,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ g_value_set_boolean(&value, powered);
+
+ error = NULL;
+- connman_set_property(proxy, "Powered", &value, &error);
++ net_connman_set_property(proxy, "Powered", &value, &error);
+ if( error )
+ fprintf (stderr, "error: %s\n", error->message);
+
+@@ -325,7 +325,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ }
+
+ void connman_client_scan(ConnmanClient *client, const gchar *device,
+- connman_scan_reply callback, gpointer user_data)
++ net_connman_scan_reply callback, gpointer user_data)
+ {
+ ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
+ DBusGProxy *proxy;
+@@ -339,7 +339,7 @@ void connman_client_scan(ConnmanClient *client, const gchar *device,
+ if (proxy == NULL)
+ return;
+
+- connman_scan_async(proxy, callback, user_data);
++ net_connman_scan_async(proxy, callback, user_data);
+
+ g_object_unref(proxy);
+ }
+@@ -353,7 +353,7 @@ gboolean connman_client_get_offline_status(ConnmanClient *client)
+
+ DBG("client %p", client);
+
+- ret = connman_get_properties(priv->manager, &hash, NULL);
++ ret = net_connman_get_properties(priv->manager, &hash, NULL);
+
+ if (ret == FALSE)
+ goto done;
+@@ -375,7 +375,7 @@ void connman_client_set_offlinemode(ConnmanClient *client, gboolean status)
+ g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_set_boolean(&value, status);
+
+- connman_set_property(priv->manager, "OfflineMode", &value, NULL);
++ net_connman_set_property(priv->manager, "OfflineMode", &value, NULL);
+ }
+
+ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
+@@ -398,7 +398,7 @@ static gboolean network_disconnect(GtkTreeModel *model, GtkTreePath *path,
+ return TRUE;
+
+ if (type == CONNMAN_TYPE_WIFI)
+- connman_disconnect(proxy, NULL);
++ net_connman_disconnect(proxy, NULL);
+
+ g_object_unref(proxy);
+
+@@ -422,13 +422,13 @@ void connman_client_connect(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_connect(proxy, NULL);
++ net_connman_connect(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+
+ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+- connman_connect_reply callback, gpointer userdata)
++ net_connman_connect_reply callback, gpointer userdata)
+ {
+ ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
+ DBusGProxy *proxy;
+@@ -446,7 +446,7 @@ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+ if (proxy == NULL)
+ goto done;
+
+- connman_connect_async(proxy, callback, userdata);
++ net_connman_connect_async(proxy, callback, userdata);
+
+ done:
+ return;
+@@ -476,7 +476,7 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_disconnect(proxy, NULL);
++ net_connman_disconnect(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+@@ -532,7 +532,7 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
+ if (proxy == NULL)
+ return;
+
+- connman_remove(proxy, NULL);
++ net_connman_remove(proxy, NULL);
+
+ g_object_unref(proxy);
+ }
+diff --git a/common/connman-client.h b/common/connman-client.h
+index 9e2e6d5..98241de 100644
+--- a/common/connman-client.h
++++ b/common/connman-client.h
+@@ -70,13 +70,13 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
+ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
+ struct ipv4_config *ipv4_config);
+ void connman_client_scan(ConnmanClient *client, const gchar *device,
+- connman_scan_reply callback, gpointer user_data);
++ net_connman_scan_reply callback, gpointer user_data);
+
+ void connman_client_connect(ConnmanClient *client, const gchar *network);
+ void connman_client_disconnect(ConnmanClient *client, const gchar *network);
+ gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
+ void connman_client_connect_async(ConnmanClient *client, const gchar *network,
+- connman_connect_reply callback, gpointer userdata);
++ net_connman_connect_reply callback, gpointer userdata);
+ void connman_client_set_remember(ConnmanClient *client, const gchar *network,
+ gboolean remember);
+
+diff --git a/common/connman-dbus.c b/common/connman-dbus.c
+index b82b3e1..543eb43 100644
+--- a/common/connman-dbus.c
++++ b/common/connman-dbus.c
+@@ -655,15 +655,15 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
+
+ DBG("getting manager properties");
+
+- connman_get_properties_async(proxy, manager_properties, store);
++ net_connman_get_properties_async(proxy, manager_properties, store);
+
+ DBG("getting technologies");
+
+- connman_get_technologies_async(proxy, manager_technologies, store);
++ net_connman_get_technologies_async(proxy, manager_technologies, store);
+
+ DBG("getting services");
+
+- connman_get_services_async(proxy, manager_services, store);
++ net_connman_get_services_async(proxy, manager_services, store);
+
+ return proxy;
+ }
+diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
+index 56b9582..0199d52 100644
+--- a/common/connman-dbus.xml
++++ b/common/connman-dbus.xml
+@@ -1,7 +1,7 @@
+ <?xml version="1.0" encoding="UTF-8" ?>
+
+ <node name="/">
+- <interface name="connman">
++ <interface name="net.connman">
+ <method name="GetProperties">
+ <arg type="a{sv}" direction="out"/>
+ </method>
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
index 6688739766..f5575d2938 100644
--- a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
+++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
@@ -11,9 +11,10 @@ DEPENDS = "gtk+ dbus-glib intltool-native"
# 0.7 tag
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
SRC_URI = "git://github.com/connectivity/connman-gnome.git \
- file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
- file://null_check_for_ipv4_config.patch \
- file://images/* \
+ file://0001-Removed-icon-from-connman-gnome-about-applet.patch \
+ file://null_check_for_ipv4_config.patch \
+ file://images/* \
+ file://connman-gnome-fix-dbus-interface-name.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index f121a81f1e..736b324704 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -27,10 +27,10 @@ EXTRA_OECONF += "\
--enable-test \
--disable-polkit \
--enable-client \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
"
PACKAGECONFIG ??= "wispr \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g','3g', '', d)} \
@@ -40,6 +40,7 @@ PACKAGECONFIG ??= "wispr \
# local.conf or distro config
# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp"
+PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant"
PACKAGECONFIG[bluetooth] = "--enable-bluetooth, --disable-bluetooth, bluez4"
PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono"
@@ -66,18 +67,18 @@ SYSTEMD_SERVICE_${PN} = "connman.service"
SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
-inherit autotools-brokensep pkgconfig systemd update-rc.d
+inherit autotools pkgconfig systemd update-rc.d
do_configure_append () {
- sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service
+ sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${B}/src/connman.service
}
# This allows *everyone* to access ConnMan over DBus, without any access
# control. Really the at_console flag should work, which would mean that
# both this and the xuser patch can be dropped.
do_compile_append() {
- sed -i -e s:deny:allow:g src/connman-dbus.conf
- sed -i -e s:deny:allow:g vpn/vpn-dbus.conf
+ sed -i -e s:deny:allow:g ${S}/src/connman-dbus.conf
+ sed -i -e s:deny:allow:g ${S}/vpn/vpn-dbus.conf
}
do_install_append() {
@@ -88,9 +89,9 @@ do_install_append() {
fi
install -d ${D}${bindir}
- install -m 0755 ${S}/tools/*-test ${D}${bindir}
- if [ -e ${S}/tools/wispr ]; then
- install -m 0755 ${S}/tools/wispr ${D}${bindir}
+ install -m 0755 ${B}/tools/*-test ${D}${bindir}
+ if [ -e ${B}/tools/wispr ]; then
+ install -m 0755 ${B}/tools/wispr ${D}${bindir}
fi
install -m 0755 ${B}/client/connmanctl ${D}${bindir}
diff --git a/meta/recipes-connectivity/connman/connman_1.24.bb b/meta/recipes-connectivity/connman/connman_1.26.bb
index 66a8c58681..7c0c4f7863 100644
--- a/meta/recipes-connectivity/connman/connman_1.24.bb
+++ b/meta/recipes-connectivity/connman/connman_1.26.bb
@@ -5,7 +5,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://add_xuser_dbus_permission.patch \
file://connman \
"
-SRC_URI[md5sum] = "dd6e1b4d9b9a28d127edb9f9b58bdec1"
-SRC_URI[sha256sum] = "551df7a5f0c6e4d69523dd2b3aa2c54525b323457d5135f64816215bad3dc24c"
+SRC_URI[md5sum] = "ba05b110b7c81e5fa14e8b402ef37a9e"
+SRC_URI[sha256sum] = "7184e4b6d954449ee00a30e188924b3e37a20ad2fd9a0b76a2bdd82c863dcf8a"
RRECOMMENDS_${PN} = "connman-conf"
+
+PR = "r1"
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index 512127cd4c..6ced77500a 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -13,12 +13,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1
DEPENDS = "openssl bind"
SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
- file://site.h \
- file://init-relay file://default-relay \
- file://init-server file://default-server \
- file://dhclient.conf file://dhcpd.conf"
+ file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
+ file://init-relay file://default-relay \
+ file://init-server file://default-server \
+ file://dhclient.conf file://dhcpd.conf \
+ file://dhcpd.service file://dhcrelay.service"
-inherit autotools
+inherit autotools systemd
+
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
+SYSTEMD_SERVICE_${PN}-server = "dhcpd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
+
+SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
+SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
TARGET_CFLAGS += "-D_GNU_SOURCE"
EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
@@ -28,10 +36,6 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
--with-libbind=${STAGING_LIBDIR}/ \
"
-do_compile_prepend () {
- cp -f ${WORKDIR}/site.h ${S}/includes
-}
-
do_install_append () {
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default
@@ -51,6 +55,13 @@ do_install_append () {
mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
fi
install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd.service ${D}${systemd_unitdir}/system/dhcrelay.service
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd.service
}
PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
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
new file mode 100644
index 0000000000..12d3c9bdbd
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -0,0 +1,26 @@
+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/fixsepbuild.patch b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
index e686afd2d2..14e75a37ea 100644
--- a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
+++ b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -4,47 +4,32 @@ Upstream-Status: Pending
RP 2013/03/21
-Index: dhcp-4.2.5/common/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/common/Makefile.am 2013-03-21 12:54:11.345063519 +0000
-+++ dhcp-4.2.5/common/Makefile.am 2013-03-21 12:54:11.805063510 +0000
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
-+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
- AM_CFLAGS = $(LDAP_CFLAGS)
-
- noinst_LIBRARIES = libdhcp.a
-Index: dhcp-4.2.5/dst/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/dst/Makefile.am 2013-03-21 12:54:11.345063519 +0000
-+++ dhcp-4.2.5/dst/Makefile.am 2013-03-21 12:54:11.805063510 +0000
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
-+AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
-
- lib_LIBRARIES = libdst.a
-
-Index: dhcp-4.2.5/omapip/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/omapip/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/omapip/Makefile.am 2013-03-21 12:54:11.809063510 +0000
-@@ -1,3 +1,5 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/includes
-+
- lib_LIBRARIES = libomapi.a
- noinst_PROGRAMS = svtest
+Rebase to 4.3.1
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/Makefile.am | 6 ++++--
+ common/Makefile.am | 2 +-
+ dhcpctl/Makefile.am | 2 ++
+ dst/Makefile.am | 2 +-
+ omapip/Makefile.am | 2 ++
+ relay/Makefile.am | 2 +-
+ server/Makefile.am | 2 +-
+ 7 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 8411960..1740f72 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -4,6 +4,8 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
-Index: dhcp-4.2.5/client/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/client/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/client/Makefile.am 2013-03-21 12:54:11.809063510 +0000
-@@ -1,3 +1,5 @@
+AM_CPPFLAGS = -I$(top_srcdir)/includes
+
dist_sysconf_DATA = dhclient.conf.example
sbin_PROGRAMS = dhclient
dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
-@@ -11,8 +13,8 @@
+@@ -17,8 +19,8 @@ EXTRA_DIST = $(man_MANS)
dhclient.o: dhclient.c
$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
@@ -55,30 +40,60 @@ Index: dhcp-4.2.5/client/Makefile.am
$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhc6.c
-Index: dhcp-4.2.5/dhcpctl/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/dhcpctl/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/dhcpctl/Makefile.am 2013-03-21 12:54:11.809063510 +0000
+diff --git a/common/Makefile.am b/common/Makefile.am
+index eddef05..5ce045f 100644
+--- a/common/Makefile.am
++++ b/common/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -I.. -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 2987a53..cd72d75 100644
+--- a/dhcpctl/Makefile.am
++++ b/dhcpctl/Makefile.am
@@ -1,3 +1,5 @@
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
+
bin_PROGRAMS = omshell
lib_LIBRARIES = libdhcpctl.a
noinst_PROGRAMS = cltest
-Index: dhcp-4.2.5/relay/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/relay/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/relay/Makefile.am 2013-03-21 12:54:11.809063510 +0000
+diff --git a/dst/Makefile.am b/dst/Makefile.am
+index 8937fe8..a14798b 100644
+--- a/dst/Makefile.am
++++ b/dst/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
++AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
+
+ lib_LIBRARIES = libdst.a
+
+diff --git a/omapip/Makefile.am b/omapip/Makefile.am
+index 5074479..9c0fab3 100644
+--- a/omapip/Makefile.am
++++ b/omapip/Makefile.am
+@@ -1,3 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/includes
++
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+
+diff --git a/relay/Makefile.am b/relay/Makefile.am
+index ec72a31..f842071 100644
+--- a/relay/Makefile.am
++++ b/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
-Index: dhcp-4.2.5/server/Makefile.am
-===================================================================
---- dhcp-4.2.5.orig/server/Makefile.am 2013-03-21 12:54:11.677063511 +0000
-+++ dhcp-4.2.5/server/Makefile.am 2013-03-21 12:55:01.509062081 +0000
+diff --git a/server/Makefile.am b/server/Makefile.am
+index a446f0b..d0b873a 100644
+--- a/server/Makefile.am
++++ b/server/Makefile.am
@@ -4,7 +4,7 @@
# production code. Sadly, we are not there yet.
SUBDIRS = . tests
@@ -88,3 +103,6 @@ Index: dhcp-4.2.5/server/Makefile.am
dist_sysconf_DATA = dhcpd.conf.example
sbin_PROGRAMS = dhcpd
+--
+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
new file mode 100644
index 0000000000..61dd6a7186
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
@@ -0,0 +1,176 @@
+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>
+
+--- dhcp-4.2.5-P1/client/scripts/linux.orig 2013-09-04 12:22:55.000000000 +0500
++++ dhcp-4.2.5-P1/client/scripts/linux 2013-09-04 12:52:19.068761518 +0500
+@@ -103,17 +103,11 @@
+ 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"
+-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"
++if [ -n "$new_subnet_mask" ]; then
++ new_mask="/$new_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"
+@@ -127,9 +121,9 @@
+ 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
+@@ -156,25 +150,30 @@
+ 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
+@@ -182,21 +181,23 @@
+ 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
+@@ -206,42 +207,49 @@
+ || [ 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
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/site.h b/meta/recipes-connectivity/dhcp/dhcp/site.h
deleted file mode 100644
index 2289554ef3..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/site.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * define config file location in ${S}/includes/site.h
- * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
- *
- * 7/22/2010 - qhe
- */
-
-/* Define this if you want DNS update functionality to be available. */
-
-#define NSUPDATE
-
-/* Define this if you aren't debugging and you want to save memory
- (potentially a _lot_ of memory) by allocating leases in chunks rather
- than one at a time. */
-
-#define COMPACT_LEASES
-
-
-/* local */
-#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
-#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb
index 6da28faf50..3f82a25fd2 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.0.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.1.bb
@@ -5,7 +5,8 @@ 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 \
"
-SRC_URI[md5sum] = "1020d77e1a4c1f01b76279caff9beb80"
-SRC_URI[sha256sum] = "a7b6517d5cf32c5e49d2323a63de00efe5391df7cb0045dfa0ec8f6ee46ebe8a"
+SRC_URI[md5sum] = "b3a42ece3c7f2cd2e74a3e12ca881d20"
+SRC_URI[sha256sum] = "266cbca8a7a6bb8f9ccc5765da0d2b04099329314a54a4fc1022d510ad3e9af0"
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.service b/meta/recipes-connectivity/dhcp/files/dhcpd.service
new file mode 100644
index 0000000000..8648f1a253
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DHCP Server Daemon
+After=network.target
+After=time-sync.target
+
+[Service]
+EnvironmentFile=@SYSCONFDIR@/default/dhcp-server
+ExecStart=-@SBINDIR@/dhcpd -q $INTERFACES
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/dhcrelay.service b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
new file mode 100644
index 0000000000..a2d818917d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/dhcrelay -d --no-pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb
index 7cf9115b9c..d12b33fbd1 100644
--- a/meta/recipes-connectivity/iproute2/iproute2_3.15.0.bb
+++ b/meta/recipes-connectivity/iproute2/iproute2_3.17.0.bb
@@ -4,8 +4,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
file://configure-cross.patch \
file://0001-iproute2-de-bash-scripts.patch \
"
-SRC_URI[md5sum] = "5b1711c9d16071959052e369a2682d77"
-SRC_URI[sha256sum] = "5359ed1f31839d8542a057c0c4233131ab9c28d8c41fc9c8484579d9c0b99af4"
+SRC_URI[md5sum] = "b741a02c6dda5818d18011d572874493"
+SRC_URI[sha256sum] = "09e406636e7598e46d5d4f7b928bf5db57049d65dbeb9a496005957ee16f6000"
# CFLAGS are computed in Makefile and reference CCOPTS
#
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
new file mode 100644
index 0000000000..2cdd1ac08b
--- /dev/null
+++ b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/ldflags.patch
@@ -0,0 +1,75 @@
+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.bb b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
index 7403dc95da..bd60b9f1e6 100644
--- a/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
+++ b/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
@@ -12,21 +12,29 @@ LIC_FILES_CHKSUM = "file://irdadump/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f
file://irdadump/irdadump.c;beginline=1;endline=24;md5=d78b9dce3cd78c2220250c9c7a2be178"
SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
- file://init"
+ file://ldflags.patch \
+ file://init"
SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb"
SRC_URI[sha256sum] = "61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6"
-export SYS_INCLUDES="-I${STAGING_INCDIR}"
+inherit update-rc.d
-inherit autotools-brokensep update-rc.d
+EXTRA_OEMAKE = "\
+ 'CC=${CC}' \
+ 'LD=${LD}' \
+ 'CFLAGS=${CFLAGS}' \
+ 'LDFLAGS=${LDFLAGS}' \
+ 'SYS_INCLUDES=' \
+ 'V=1' \
+"
INITSCRIPT_NAME = "irattach"
INITSCRIPT_PARAMS = "defaults 20"
do_compile () {
- oe_runmake -e -C irattach
- oe_runmake -e -C irdaping
+ oe_runmake -C irattach
+ oe_runmake -C irdaping
}
do_install () {
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 5b8c700411..0b936ef092 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -26,13 +26,13 @@ DEBIANNAME_${PN} = "libnss-mdns"
RDEPENDS_${PN} = "avahi-daemon"
pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns4\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns4\5/' \
- -i $D/etc/nsswitch.conf
+ 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
}
pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<mdns4\>//' \
+ sed -e '/^hosts:/s/\s*\<mdns\>//' \
-e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
index 8a9fa9eca1..a12eb16615 100644
--- a/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -7,17 +7,17 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
SECTION = "libs/network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
- file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
-DEPENDS = "flex-native bison-native libnl"
+ file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
+DEPENDS = "flex-native bison-native"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluetooth', '', d)}"
PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4"
PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb"
-PACKAGECONFIG[libnl1] = "--with-libnl,--without-libnl,libnl1,libnl1"
+PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
INC_PR = "r5"
-SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
+SRC_URI = "http://www.tcpdump.org/release/${BP}.tar.gz"
BINCONFIG = "${bindir}/pcap-config"
@@ -25,6 +25,10 @@ inherit autotools binconfig-disabled
EXTRA_OECONF = "--with-pcap=linux"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libnl1] = "--with-libnl,--without-libnl,libnl1,libnl1"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+
CPPFLAGS_prepend = "-I${S} "
CFLAGS_prepend = "-I${S} "
CXXFLAGS_prepend = "-I${S} "
diff --git a/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch b/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch
deleted file mode 100644
index 2f5cd213bc..0000000000
--- a/meta/recipes-connectivity/libpcap/libpcap/ieee80215-arphrd.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-Index: libpcap-1.0.0/pcap-linux.c
-===================================================================
---- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
-+++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
-@@ -1616,6 +1616,17 @@
- * so let's use "Linux-cooked" mode. Jean II */
- //handle->md.cooked = 1;
- break;
-+#ifndef ARPHRD_IEEE80215
-+#define ARPHRD_IEEE80215 805
-+#endif
-+#ifndef ARPHRD_IEEE80215_PHY
-+#define ARPHRD_IEEE80215_PHY 806
-+#endif
-+
-+ case ARPHRD_IEEE80215:
-+ case ARPHRD_IEEE80215_PHY:
-+ handle->linktype = DLT_IEEE802_15_4;
-+ break;
-
- /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
- * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
index 3ba3caa3bc..a2d5ef46d7 100644
--- a/meta/recipes-connectivity/libpcap/libpcap_1.5.3.bb
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
@@ -1,10 +1,8 @@
require libpcap.inc
-SRC_URI += "file://aclocal.patch \
- file://ieee80215-arphrd.patch \
- "
-SRC_URI[md5sum] = "7e7321fb3aff2f2bb05c8229f3795d4a"
-SRC_URI[sha256sum] = "9ae92159c1060f15e6a90f2c4ad227268b6aaa382c316fa49a31c496b9979e93"
+SRC_URI += "file://aclocal.patch"
+SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa"
+SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
#
# make install doesn't cover the shared lib
diff --git a/meta/recipes-connectivity/neard/neard.inc b/meta/recipes-connectivity/neard/neard.inc
index e714cadc2b..76640d8a1a 100644
--- a/meta/recipes-connectivity/neard/neard.inc
+++ b/meta/recipes-connectivity/neard/neard.inc
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
"
-inherit autotools-brokensep pkgconfig systemd update-rc.d
+inherit autotools pkgconfig systemd update-rc.d
EXTRA_OECONF += "--enable-tools"
@@ -35,7 +35,7 @@ do_install_append() {
# Install the tests for neard-tests
install -d ${D}${libdir}/neard
install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/
- install -m 0755 ${S}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
+ install -m 0755 ${B}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
}
PACKAGES =+ "${PN}-tests"
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
new file mode 100644
index 0000000000..466067693d
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard/Makefile.am-fix-parallel-issue.patch
@@ -0,0 +1,33 @@
+From 43acc56d5506c7e318f717fb3634bc16e3438913 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 15 Jan 2015 18:12:07 -0800
+Subject: [PATCH] Makefile.am: fix parallel issue
+
+There might be no src dir if src/builtin.h runs earlier, create it to
+fix the race issue:
+
+src/genbuiltin nfctype1 nfctype2 nfctype3 nfctype4 p2p > src/builtin.h
+/bin/sh: src/builtin.h: No such file or directory
+
+Upstream-Status: Pending
+
+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 \
+ 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
+
diff --git a/meta/recipes-connectivity/neard/neard/neard.service.in b/meta/recipes-connectivity/neard/neard/neard.service.in
index 90e5302662..a6f8a84180 100644
--- a/meta/recipes-connectivity/neard/neard/neard.service.in
+++ b/meta/recipes-connectivity/neard/neard/neard.service.in
@@ -1,13 +1,13 @@
[Unit]
-Description=NFC service
+Description=neard service
+Documentation=man:neard(8)
After=syslog.target
[Service]
Type=dbus
BusName=org.neard
-Restart=on-failure
ExecStart=@installpath@/neard -n
-StandardOutput=null
[Install]
+Alias=dbus-org.neard.service
WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/neard/neard/parallel-build.patch b/meta/recipes-connectivity/neard/neard/parallel-build.patch
index 1837ad010c..56247495e5 100644
--- a/meta/recipes-connectivity/neard/neard/parallel-build.patch
+++ b/meta/recipes-connectivity/neard/neard/parallel-build.patch
@@ -30,7 +30,7 @@ index c51351f..8e58ac1 100644
+$(se_seeld_OBJECTS) \
+$(unit_test_ndef_parse_OBJECTS) \
+$(unit_test_ndef_build_OBJECTS) \
-+$(unit_test_snep-read_OBJECTS) \
++$(unit_test_snep_read_OBJECTS) \
+$(tools_snep_send_OBJECTS): $(local_headers)
include/near/version.h: include/version.h
diff --git a/meta/recipes-connectivity/neard/neard_0.14.bb b/meta/recipes-connectivity/neard/neard_0.14.bb
index daf3a4b7d1..7a1096bf4e 100644
--- a/meta/recipes-connectivity/neard/neard_0.14.bb
+++ b/meta/recipes-connectivity/neard/neard_0.14.bb
@@ -4,7 +4,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
file://parallel-build.patch \
file://neard.in \
file://neard.service.in \
+ file://Makefile.am-fix-parallel-issue.patch \
"
SRC_URI[md5sum] = "692ba2653d60155255244c87396c486b"
SRC_URI[sha256sum] = "6ea724b443d39d679168fc7776a965d1f64727c3735391df2c01469ee7cd8cca"
+PR = "r1"
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch
deleted file mode 100644
index 2ce824cf9e..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-statd-fixed-the-with-statdpath-flag.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 3b1457d219ceb1058d44bacc657581f13437ae40 Mon Sep 17 00:00:00 2001
-From: Steve Dickson <steved@redhat.com>
-Date: Tue, 17 Jun 2014 13:28:53 -0400
-Subject: [PATCH] statd: fixed the --with-statdpath= flag
-
-Create the given path set with --with-statdpath
-
-Signed-off-by: chendt.fnst@cn.fujitsu.com
-Reported-by: yaoxp@cn.fujitsu.com
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Upstream-Status: Backport
----
- Makefile.am | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index ae7cd16..5824adc 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -54,13 +54,13 @@ install-data-hook:
- touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab
- touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab
- touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab
-- mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak
-- touch $(DESTDIR)$(statedir)/state
-- chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state
-- -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state
-+ mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak
-+ touch $(DESTDIR)$(statdpath)/state
-+ chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state
-+ -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state
-
- uninstall-hook:
- rm $(DESTDIR)$(statedir)/xtab
- rm $(DESTDIR)$(statedir)/etab
- rm $(DESTDIR)$(statedir)/rmtab
-- rm $(DESTDIR)$(statedir)/state
-+ rm $(DESTDIR)$(statdpath)/state
---
-1.8.4.2
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
deleted file mode 100644
index c3442380e1..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: nfs-utils-1.2.6/support/nfs/svc_socket.c
-===================================================================
---- nfs-utils-1.2.6.orig/support/nfs/svc_socket.c 2012-05-14 07:40:52.000000000 -0700
-+++ nfs-utils-1.2.6/support/nfs/svc_socket.c 2012-10-28 02:42:50.179222457 -0700
-@@ -40,8 +40,9 @@
- char rpcdata[1024], servdata[1024];
- struct rpcent rpcbuf, *rpcp;
- struct servent servbuf, *servp = NULL;
-- int ret;
-+ int ret = 0;
-
-+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
- ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
- &rpcp);
- if (ret == 0 && rpcp != NULL) {
-@@ -60,6 +61,7 @@
- }
- }
- }
-+#endif /* __UCLIBC__ */
-
- if (ret == 0 && servp != NULL)
- return ntohs(servp->s_port);
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
index 65fdd1dd4f..992267d5a1 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
@@ -28,33 +28,7 @@ test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
#----------------------------------------------------------------------
# Startup and shutdown functions.
# Actual startup/shutdown is at the end of this file.
-#directories
-create_directories(){
- echo -n 'creating NFS state directory: '
- mkdir -p "$NFS_STATEDIR"
- ( cd "$NFS_STATEDIR"
- umask 077
- mkdir -p rpc_pipefs
- mkdir -p sm sm.bak statd
- chown rpcuser:rpcuser sm sm.bak statd
- test -w statd/state || {
- rm -f statd/state
- :>statd/state
- }
- umask 022
- for file in xtab etab smtab rmtab
- do
- test -w "$file" || {
- rm -f "$file"
- :>"$file"
- }
- done
- )
- chown rpcuser:rpcuser "$NFS_STATEDIR"
- echo done
-}
-#statd
start_statd(){
echo -n "starting statd: "
start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
@@ -74,7 +48,6 @@ stop_statd(){
#FIXME: need to create the /var/lib/nfs/... directories
case "$1" in
start)
- create_directories
start_statd;;
stop)
stop_statd;;
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
index c813d7f61e..d312349fe4 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
@@ -21,7 +21,6 @@ USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
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.0.6-uclibc.patch \
file://nfs-utils-1.2.3-sm-notify-res_init.patch \
file://nfsserver \
file://nfscommon \
@@ -30,11 +29,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
file://nfs-mountd.service \
file://nfs-statd.service \
file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
- file://0001-statd-fixed-the-with-statdpath-flag.patch \
"
-SRC_URI[md5sum] = "6e93a7997ca3a1eac56bf219adab72a8"
-SRC_URI[sha256sum] = "ab8384d0e487ed6a18c5380d5df28015f7dd98680bf08f3247c97d9f7d99e56f"
+SRC_URI[md5sum] = "8de676b9ff34b8f9addc1d0800fabdf8"
+SRC_URI[sha256sum] = "ff79d70b7b58b2c8f9b798c58721127e82bb96022adc04a5c4cb251630e696b8"
PARALLEL_MAKE = ""
@@ -54,7 +52,7 @@ SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
SYSTEMD_AUTO_ENABLE = "disable"
# --enable-uuid is need for cross-compiling
-EXTRA_OECONF = "--with-statduser=nobody \
+EXTRA_OECONF = "--with-statduser=rpcuser \
--enable-mountconfig \
--enable-libmount-mount \
--disable-nfsv41 \
@@ -90,7 +88,6 @@ do_compile_prepend() {
do_install_append () {
install -d ${D}${sysconfdir}/init.d
- install -d ${D}${localstatedir}/lib/nfs/statd
install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
@@ -106,6 +103,10 @@ do_install_append () {
# 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
diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index 9f65f4f144..bf44fcae08 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -7,16 +7,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
inherit autotools pkgconfig update-rc.d systemd
-DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluez4', '', d)}"
+DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info"
INITSCRIPT_NAME = "ofono"
INITSCRIPT_PARAMS = "defaults 22"
-EXTRA_OECONF += "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
- --enable-test \
-"
+PACKAGECONFIG ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
+ "
+PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
+PACKAGECONFIG[bluetooth] = "--enable-bluetooth,--disable-bluetooth,bluez4"
+
+EXTRA_OECONF += "--enable-test"
+
SYSTEMD_SERVICE_${PN} = "ofono.service"
do_install_append() {
diff --git a/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch b/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
new file mode 100644
index 0000000000..5f8ca77101
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
@@ -0,0 +1,1270 @@
+Upstream-Status: Inappropriate [configuration]
+
+From 572fc23f6efd65a2ef9e6c957b2506108738672b Mon Sep 17 00:00:00 2001
+From: Cristian Iorga <cristian.iorga@intel.com>
+Date: Mon, 25 Aug 2014 16:59:39 +0300
+Subject: [PATCH] Revert "test: Convert to Python 3"
+
+This reverts commit c027ab9fbc1a8e8c9e76bcd123df1ad7696307c2.
+---
+ test/activate-context | 2 +-
+ test/answer-calls | 2 +-
+ test/backtrace | 2 +-
+ test/cancel-ussd | 2 +-
+ test/cdma-connman-disable | 2 +-
+ test/cdma-connman-enable | 2 +-
+ test/cdma-dial-number | 2 +-
+ test/cdma-hangup | 2 +-
+ test/cdma-list-call | 2 +-
+ test/cdma-set-credentials | 2 +-
+ test/change-pin | 2 +-
+ test/create-internet-context | 2 +-
+ test/create-mms-context | 2 +-
+ test/create-multiparty | 2 +-
+ test/deactivate-all | 2 +-
+ test/deactivate-context | 2 +-
+ test/dial-number | 2 +-
+ test/disable-call-forwarding | 2 +-
+ test/disable-gprs | 2 +-
+ test/disable-modem | 2 +-
+ test/display-icon | 2 +-
+ test/enable-cbs | 2 +-
+ test/enable-gprs | 2 +-
+ test/enable-modem | 2 +-
+ test/enter-pin | 2 +-
+ test/get-icon | 2 +-
+ test/get-operators | 2 +-
+ test/get-tech-preference | 2 +-
+ test/hangup-active | 2 +-
+ test/hangup-all | 2 +-
+ test/hangup-call | 2 +-
+ test/hangup-multiparty | 2 +-
+ test/hold-and-answer | 2 +-
+ test/initiate-ussd | 4 ++--
+ test/list-calls | 2 +-
+ test/list-contexts | 2 +-
+ test/list-messages | 2 +-
+ test/list-modems | 2 +-
+ test/list-operators | 2 +-
+ test/lock-pin | 2 +-
+ test/lockdown-modem | 2 +-
+ test/monitor-ofono | 4 ++--
+ test/offline-modem | 2 +-
+ test/online-modem | 2 +-
+ test/private-chat | 2 +-
+ test/process-context-settings | 2 +-
+ test/receive-sms | 2 +-
+ test/reject-calls | 2 +-
+ test/release-and-answer | 2 +-
+ test/release-and-swap | 2 +-
+ test/remove-contexts | 2 +-
+ test/reset-pin | 2 +-
+ test/scan-for-operators | 2 +-
+ test/send-sms | 2 +-
+ test/send-ussd | 4 ++--
+ test/send-vcal | 2 +-
+ test/send-vcard | 2 +-
+ test/set-call-forwarding | 2 +-
+ test/set-cbs-topics | 2 +-
+ test/set-context-property | 2 +-
+ test/set-fast-dormancy | 2 +-
+ test/set-gsm-band | 2 +-
+ test/set-mic-volume | 2 +-
+ test/set-mms-details | 2 +-
+ test/set-msisdn | 2 +-
+ test/set-roaming-allowed | 2 +-
+ test/set-speaker-volume | 2 +-
+ test/set-tech-preference | 2 +-
+ test/set-tty | 2 +-
+ test/set-umts-band | 2 +-
+ test/set-use-sms-reports | 2 +-
+ test/swap-calls | 2 +-
+ test/test-advice-of-charge | 2 +-
+ test/test-call-barring | 2 +-
+ test/test-call-forwarding | 2 +-
+ test/test-call-settings | 2 +-
+ test/test-cbs | 4 ++--
+ test/test-gnss | 4 ++--
+ test/test-message-waiting | 2 +-
+ test/test-modem | 2 +-
+ test/test-network-registration | 2 +-
+ test/test-phonebook | 2 +-
+ test/test-push-notification | 2 +-
+ test/test-smart-messaging | 2 +-
+ test/test-sms | 18 +++++++++---------
+ test/test-ss | 2 +-
+ test/test-ss-control-cb | 2 +-
+ test/test-ss-control-cf | 2 +-
+ test/test-ss-control-cs | 2 +-
+ test/test-stk-menu | 34 +++++++++++++++++-----------------
+ test/unlock-pin | 2 +-
+ 94 files changed, 124 insertions(+), 124 deletions(-)
+
+diff --git a/test/activate-context b/test/activate-context
+index e4fc702..4241396 100755
+--- a/test/activate-context
++++ b/test/activate-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/answer-calls b/test/answer-calls
+index daa794b..45ff08f 100755
+--- a/test/answer-calls
++++ b/test/answer-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/backtrace b/test/backtrace
+index 03c7632..c624709 100755
+--- a/test/backtrace
++++ b/test/backtrace
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import os
+ import re
+diff --git a/test/cancel-ussd b/test/cancel-ussd
+index e7559ba..1797f26 100755
+--- a/test/cancel-ussd
++++ b/test/cancel-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-connman-disable b/test/cdma-connman-disable
+index 3adc14d..0ddc0cd 100755
+--- a/test/cdma-connman-disable
++++ b/test/cdma-connman-disable
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/cdma-connman-enable b/test/cdma-connman-enable
+index ac16a2d..a3cca01 100755
+--- a/test/cdma-connman-enable
++++ b/test/cdma-connman-enable
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/cdma-dial-number b/test/cdma-dial-number
+index 683431e..9cdfb24 100755
+--- a/test/cdma-dial-number
++++ b/test/cdma-dial-number
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-hangup b/test/cdma-hangup
+index 41ffa60..493ece4 100755
+--- a/test/cdma-hangup
++++ b/test/cdma-hangup
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/cdma-list-call b/test/cdma-list-call
+index b132353..5d36a69 100755
+--- a/test/cdma-list-call
++++ b/test/cdma-list-call
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/cdma-set-credentials b/test/cdma-set-credentials
+index a60c86e..a286b0e 100755
+--- a/test/cdma-set-credentials
++++ b/test/cdma-set-credentials
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/change-pin b/test/change-pin
+index 301c6ce..000ce53 100755
+--- a/test/change-pin
++++ b/test/change-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/create-internet-context b/test/create-internet-context
+index 1089053..efd0998 100755
+--- a/test/create-internet-context
++++ b/test/create-internet-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/create-mms-context b/test/create-mms-context
+index 598336f..e5be08d 100755
+--- a/test/create-mms-context
++++ b/test/create-mms-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/create-multiparty b/test/create-multiparty
+index 1b76010..97047c3 100755
+--- a/test/create-multiparty
++++ b/test/create-multiparty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/deactivate-all b/test/deactivate-all
+index 5aa8587..427009e 100755
+--- a/test/deactivate-all
++++ b/test/deactivate-all
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/deactivate-context b/test/deactivate-context
+index 5c86a71..df47d2e 100755
+--- a/test/deactivate-context
++++ b/test/deactivate-context
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/dial-number b/test/dial-number
+index fe5adad..ee674d9 100755
+--- a/test/dial-number
++++ b/test/dial-number
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
+index 811e4fa..3609816 100755
+--- a/test/disable-call-forwarding
++++ b/test/disable-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ from gi.repository import GLib
+diff --git a/test/disable-gprs b/test/disable-gprs
+index 61ce216..c6c40a5 100755
+--- a/test/disable-gprs
++++ b/test/disable-gprs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/disable-modem b/test/disable-modem
+index 6fba857..ca8c8d8 100755
+--- a/test/disable-modem
++++ b/test/disable-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/display-icon b/test/display-icon
+index ac40818..753d14d 100755
+--- a/test/display-icon
++++ b/test/display-icon
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/enable-cbs b/test/enable-cbs
+index 4a8bf66..c08bf2b 100755
+--- a/test/enable-cbs
++++ b/test/enable-cbs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enable-gprs b/test/enable-gprs
+index 68d5ef0..8664891 100755
+--- a/test/enable-gprs
++++ b/test/enable-gprs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enable-modem b/test/enable-modem
+index fc5958a..dfaaaa8 100755
+--- a/test/enable-modem
++++ b/test/enable-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/enter-pin b/test/enter-pin
+index 9556363..c6ee669 100755
+--- a/test/enter-pin
++++ b/test/enter-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-icon b/test/get-icon
+index 5569a33..fdaaee7 100755
+--- a/test/get-icon
++++ b/test/get-icon
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-operators b/test/get-operators
+index 0f35c80..62354c5 100755
+--- a/test/get-operators
++++ b/test/get-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/get-tech-preference b/test/get-tech-preference
+index 7ba6365..77d20d0 100755
+--- a/test/get-tech-preference
++++ b/test/get-tech-preference
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/hangup-active b/test/hangup-active
+index 82e0eb0..5af62ab 100755
+--- a/test/hangup-active
++++ b/test/hangup-active
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-all b/test/hangup-all
+index 3a0138d..32933db 100755
+--- a/test/hangup-all
++++ b/test/hangup-all
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-call b/test/hangup-call
+index 5a2de20..447020c 100755
+--- a/test/hangup-call
++++ b/test/hangup-call
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hangup-multiparty b/test/hangup-multiparty
+index 24751c3..48fe342 100755
+--- a/test/hangup-multiparty
++++ b/test/hangup-multiparty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/hold-and-answer b/test/hold-and-answer
+index da3be57..2c47e27 100755
+--- a/test/hold-and-answer
++++ b/test/hold-and-answer
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/initiate-ussd b/test/initiate-ussd
+index faf50d0..d7022f1 100755
+--- a/test/initiate-ussd
++++ b/test/initiate-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+@@ -45,7 +45,7 @@ if state == "idle":
+ print("State: %s" % (state))
+
+ while state == "user-response":
+- response = input("Enter response: ")
++ response = raw_input("Enter response: ")
+
+ result = ussd.Respond(response, timeout=100)
+
+diff --git a/test/list-calls b/test/list-calls
+index f3ee991..08668c6 100755
+--- a/test/list-calls
++++ b/test/list-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-contexts b/test/list-contexts
+index 78278ca..f0d4094 100755
+--- a/test/list-contexts
++++ b/test/list-contexts
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-messages b/test/list-messages
+index 9f5bce3..cfccbea 100755
+--- a/test/list-messages
++++ b/test/list-messages
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-modems b/test/list-modems
+index b9f510a..ed66124 100755
+--- a/test/list-modems
++++ b/test/list-modems
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/list-operators b/test/list-operators
+index 064c4e3..349bf41 100755
+--- a/test/list-operators
++++ b/test/list-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/lock-pin b/test/lock-pin
+index 96ea9c2..5579735 100755
+--- a/test/lock-pin
++++ b/test/lock-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/lockdown-modem b/test/lockdown-modem
+index 4e04205..781abb6 100755
+--- a/test/lockdown-modem
++++ b/test/lockdown-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/monitor-ofono b/test/monitor-ofono
+index 8830757..bd31617 100755
+--- a/test/monitor-ofono
++++ b/test/monitor-ofono
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+@@ -6,7 +6,7 @@ import dbus
+ import dbus.mainloop.glib
+
+ _dbus2py = {
+- dbus.String : str,
++ dbus.String : unicode,
+ dbus.UInt32 : int,
+ dbus.Int32 : int,
+ dbus.Int16 : int,
+diff --git a/test/offline-modem b/test/offline-modem
+index e8c043a..ea1f522 100755
+--- a/test/offline-modem
++++ b/test/offline-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/online-modem b/test/online-modem
+index 029c4a5..310ed7d 100755
+--- a/test/online-modem
++++ b/test/online-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/private-chat b/test/private-chat
+index e7e5406..ef2ef6c 100755
+--- a/test/private-chat
++++ b/test/private-chat
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/process-context-settings b/test/process-context-settings
+index 8a3ecfa..0f058b2 100755
+--- a/test/process-context-settings
++++ b/test/process-context-settings
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import os
+ import dbus
+diff --git a/test/receive-sms b/test/receive-sms
+index a0c6915..c23eb14 100755
+--- a/test/receive-sms
++++ b/test/receive-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/reject-calls b/test/reject-calls
+index 71b243e..9edf1ff 100755
+--- a/test/reject-calls
++++ b/test/reject-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/release-and-answer b/test/release-and-answer
+index dec8e17..25fd818 100755
+--- a/test/release-and-answer
++++ b/test/release-and-answer
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/release-and-swap b/test/release-and-swap
+index cb8c84e..7b3569f 100755
+--- a/test/release-and-swap
++++ b/test/release-and-swap
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/remove-contexts b/test/remove-contexts
+index b54184e..c5082cb 100755
+--- a/test/remove-contexts
++++ b/test/remove-contexts
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+
+diff --git a/test/reset-pin b/test/reset-pin
+index 3fbd126..b429254 100755
+--- a/test/reset-pin
++++ b/test/reset-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/scan-for-operators b/test/scan-for-operators
+index b4fc05e..749c710 100755
+--- a/test/scan-for-operators
++++ b/test/scan-for-operators
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/send-sms b/test/send-sms
+index 98808aa..e06444d 100755
+--- a/test/send-sms
++++ b/test/send-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/send-ussd b/test/send-ussd
+index a20e098..e585883 100755
+--- a/test/send-ussd
++++ b/test/send-ussd
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+@@ -46,7 +46,7 @@ if state == "idle":
+ print("State: %s" % (state))
+
+ while state == "user-response":
+- response = input("Enter response: ")
++ response = raw_input("Enter response: ")
+
+ print(ussd.Respond(response, timeout=100))
+
+diff --git a/test/send-vcal b/test/send-vcal
+index 566daef..7f8272b 100755
+--- a/test/send-vcal
++++ b/test/send-vcal
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/send-vcard b/test/send-vcard
+index 4dedf51..250b36f 100755
+--- a/test/send-vcard
++++ b/test/send-vcard
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-call-forwarding b/test/set-call-forwarding
+index 49d1ce0..9fd358b 100755
+--- a/test/set-call-forwarding
++++ b/test/set-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ from gi.repository import GLib
+diff --git a/test/set-cbs-topics b/test/set-cbs-topics
+index db95e16..78d6d44 100755
+--- a/test/set-cbs-topics
++++ b/test/set-cbs-topics
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-context-property b/test/set-context-property
+index 5ff7a67..64a6fb8 100755
+--- a/test/set-context-property
++++ b/test/set-context-property
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-fast-dormancy b/test/set-fast-dormancy
+index ef77bcd..7bf7715 100755
+--- a/test/set-fast-dormancy
++++ b/test/set-fast-dormancy
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-gsm-band b/test/set-gsm-band
+index b37bcb5..3c17c10 100755
+--- a/test/set-gsm-band
++++ b/test/set-gsm-band
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-mic-volume b/test/set-mic-volume
+index cd6c73f..e0bff49 100755
+--- a/test/set-mic-volume
++++ b/test/set-mic-volume
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-mms-details b/test/set-mms-details
+index 6ee59fa..d2d0838 100755
+--- a/test/set-mms-details
++++ b/test/set-mms-details
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-msisdn b/test/set-msisdn
+index b5fe819..01f284d 100755
+--- a/test/set-msisdn
++++ b/test/set-msisdn
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-roaming-allowed b/test/set-roaming-allowed
+index 698c8b6..9e3e058 100755
+--- a/test/set-roaming-allowed
++++ b/test/set-roaming-allowed
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-speaker-volume b/test/set-speaker-volume
+index 6d4e301..7962f39 100755
+--- a/test/set-speaker-volume
++++ b/test/set-speaker-volume
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/set-tech-preference b/test/set-tech-preference
+index b549abc..2666cbd 100755
+--- a/test/set-tech-preference
++++ b/test/set-tech-preference
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-tty b/test/set-tty
+index eed1fba..53d6b99 100755
+--- a/test/set-tty
++++ b/test/set-tty
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-umts-band b/test/set-umts-band
+index 0bae5c4..c1e6448 100755
+--- a/test/set-umts-band
++++ b/test/set-umts-band
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/set-use-sms-reports b/test/set-use-sms-reports
+index 288d4e1..a4efe4f 100755
+--- a/test/set-use-sms-reports
++++ b/test/set-use-sms-reports
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+diff --git a/test/swap-calls b/test/swap-calls
+index 018a8d3..eeb257b 100755
+--- a/test/swap-calls
++++ b/test/swap-calls
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge
+index 6e87e61..0f1f57f 100755
+--- a/test/test-advice-of-charge
++++ b/test/test-advice-of-charge
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-call-barring b/test/test-call-barring
+index eedb69f..be4ab57 100755
+--- a/test/test-call-barring
++++ b/test/test-call-barring
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-call-forwarding b/test/test-call-forwarding
+index 5db84d7..01a7294 100755
+--- a/test/test-call-forwarding
++++ b/test/test-call-forwarding
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-call-settings b/test/test-call-settings
+index 435594c..5d7ee49 100755
+--- a/test/test-call-settings
++++ b/test/test-call-settings
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-cbs b/test/test-cbs
+index a5cec06..13cdd80 100755
+--- a/test/test-cbs
++++ b/test/test-cbs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import dbus.mainloop.glib
+@@ -78,7 +78,7 @@ def set_topics(cbs):
+ invalidData = False;
+ index = 0
+
+- topics = input('Enter the topic ID(s) you want to register to: ')
++ topics = raw_input('Enter the topic ID(s) you want to register to: ')
+
+ while index < len(topics):
+ if topics[index] == ',' or topics[index] == '-':
+diff --git a/test/test-gnss b/test/test-gnss
+index 6ae64db..aa0b160 100755
+--- a/test/test-gnss
++++ b/test/test-gnss
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+@@ -40,7 +40,7 @@ def print_menu():
+ def stdin_handler(channel, condition, gnss, path):
+ in_key = os.read(channel.unix_get_fd(), 160).rstrip().decode('UTF-8')
+ if in_key == '0':
+- xml = input('type the element and press enter: ')
++ xml = raw_input('type the element and press enter: ')
+ try:
+ gnss.SendPositioningElement(dbus.String(xml))
+ print("ok")
+diff --git a/test/test-message-waiting b/test/test-message-waiting
+index 432862e..b93fbf3 100755
+--- a/test/test-message-waiting
++++ b/test/test-message-waiting
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-modem b/test/test-modem
+index aa38b1f..29dbf14 100755
+--- a/test/test-modem
++++ b/test/test-modem
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-network-registration b/test/test-network-registration
+index 68b4347..c5ad586 100755
+--- a/test/test-network-registration
++++ b/test/test-network-registration
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+ import sys
+diff --git a/test/test-phonebook b/test/test-phonebook
+index 42646d3..116fd4f 100755
+--- a/test/test-phonebook
++++ b/test/test-phonebook
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus, sys
+
+diff --git a/test/test-push-notification b/test/test-push-notification
+index d972ad3..ecc6afb 100755
+--- a/test/test-push-notification
++++ b/test/test-push-notification
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-smart-messaging b/test/test-smart-messaging
+index f22efd2..188ac1e 100755
+--- a/test/test-smart-messaging
++++ b/test/test-smart-messaging
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-sms b/test/test-sms
+index 30ac651..49935e1 100755
+--- a/test/test-sms
++++ b/test/test-sms
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+ # -*- coding: utf-8 -*-
+
+ from gi.repository import GLib
+@@ -132,7 +132,7 @@ def stdin_handler(channel, condition, sms, value, number):
+ lock = "on"
+ if in_key == '0':
+ print_send_sms_menu()
+- sms_type = input('Select SMS type: ')
++ sms_type = raw_input('Select SMS type: ')
+
+ if sms_type == '1':
+ message_send(sms, number, value)
+@@ -150,49 +150,49 @@ def stdin_handler(channel, condition, sms, value, number):
+
+ elif in_key == '1':
+ message_delivery_report(sms, 1)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(1)" + value +
+ ": UseDeliveryReports[TRUE]"))
+
+ elif in_key == '2':
+ message_delivery_report(sms, 0)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(2) " + value +
+ ": UseDeliveryReports[FALSE]"))
+
+ elif in_key == '3':
+ message_service_center_address(sms, SCA)
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(3) " + value +
+ ": ServiceCenterAddress"))
+
+ elif in_key == '4':
+ message_bearer(sms, "ps-only")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(4) " + value +
+ ": Bearer[ps-only]"))
+
+ elif in_key == '5':
+ message_bearer(sms, "cs-only")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(5) " + value +
+ ": Bearer[cs-only]"))
+
+ elif in_key == '6':
+ message_bearer(sms, "ps-preferred")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms, number, ("(6) " + value +
+ ": Bearer[ps-preferred]"))
+
+ elif in_key == '7':
+ message_bearer(sms, "cs-preferred")
+- send_msg = input('Send test message[y/n]?: ')
++ send_msg = raw_input('Send test message[y/n]?: ')
+ if send_msg == 'y':
+ message_send(sms,number, ("(7) " + value +
+ ": Bearer[cs-preferred]"))
+diff --git a/test/test-ss b/test/test-ss
+index 4cd8732..2c80806 100755
+--- a/test/test-ss
++++ b/test/test-ss
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import sys
+ import dbus
+diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb
+index ddae6d3..86bac9b 100755
+--- a/test/test-ss-control-cb
++++ b/test/test-ss-control-cb
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf
+index 095eb5d..d30bf4f 100755
+--- a/test/test-ss-control-cf
++++ b/test/test-ss-control-cf
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-ss-control-cs b/test/test-ss-control-cs
+index 8180474..e0ed1d1 100755
+--- a/test/test-ss-control-cs
++++ b/test/test-ss-control-cs
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+diff --git a/test/test-stk-menu b/test/test-stk-menu
+index 0cf8fa2..ac0a5bd 100755
+--- a/test/test-stk-menu
++++ b/test/test-stk-menu
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ from gi.repository import GLib
+
+@@ -58,7 +58,7 @@ class StkAgent(dbus.service.Object):
+ index += 1
+
+ print("\nDefault: %d" % (default))
+- select = input("Enter Selection (t, b):")
++ select = raw_input("Enter Selection (t, b):")
+
+ if select == 'b':
+ raise GoBack("User wishes to go back")
+@@ -75,7 +75,7 @@ class StkAgent(dbus.service.Object):
+ print("DisplayText (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+ print("Urgent: (%d)" % (urgent))
+- key = input("Press return to clear ('t' terminates, "
++ key = raw_input("Press return to clear ('t' terminates, "
+ "'b' goes back, 'n' busy, "
+ "'w' return and wait):")
+
+@@ -108,7 +108,7 @@ class StkAgent(dbus.service.Object):
+ print("Hide typing: (%s)" % (hide_typing))
+ print("Enter characters, min: %d, max: %d:" % (min_chars,
+ max_chars))
+- userin = input("")
++ userin = raw_input("")
+
+ return userin
+
+@@ -122,7 +122,7 @@ class StkAgent(dbus.service.Object):
+ print("Hide typing: (%s)" % (hide_typing))
+ print("Enter digits, min: %d, max: %d:" % (min_chars,
+ max_chars))
+- userin = input("'t' terminates, 'b' goes back:")
++ userin = raw_input("'t' terminates, 'b' goes back:")
+
+ if userin == 'b':
+ raise GoBack("User wishes to go back")
+@@ -136,7 +136,7 @@ class StkAgent(dbus.service.Object):
+ def RequestKey(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Key (t, b):")
++ key = raw_input("Enter Key (t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -150,7 +150,7 @@ class StkAgent(dbus.service.Object):
+ def RequestDigit(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Digit (t, b):")
++ key = raw_input("Enter Digit (t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -164,7 +164,7 @@ class StkAgent(dbus.service.Object):
+ def RequestQuickDigit(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Quick digit (0-9, *, #, t, b):")
++ key = raw_input("Quick digit (0-9, *, #, t, b):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -178,7 +178,7 @@ class StkAgent(dbus.service.Object):
+ def RequestConfirmation(self, title, icon):
+ print("Title: (%s)" % (title))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, b, y, n):")
++ key = raw_input("Enter Confirmation (t, b, y, n):")
+
+ if key == 'b':
+ raise GoBack("User wishes to go back")
+@@ -194,7 +194,7 @@ class StkAgent(dbus.service.Object):
+ def ConfirmCallSetup(self, info, icon):
+ print("Information: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, y, n):")
++ key = raw_input("Enter Confirmation (t, y, n):")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -209,7 +209,7 @@ class StkAgent(dbus.service.Object):
+ print("Information: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+ print("URL (%s)" % (url))
+- key = input("Enter Confirmation (y, n):")
++ key = raw_input("Enter Confirmation (y, n):")
+
+ if key == 'y':
+ return True
+@@ -232,7 +232,7 @@ class StkAgent(dbus.service.Object):
+ signal.alarm(5)
+
+ try:
+- key = input("Press return to end before end of"
++ key = raw_input("Press return to end before end of"
+ " single tone (t):")
+ signal.alarm(0)
+
+@@ -250,7 +250,7 @@ class StkAgent(dbus.service.Object):
+ print("LoopTone: %s" % (tone))
+ print("Text: %s" % (text))
+ print("Icon: %d" % (int(icon)))
+- key = input("Press return to end before timeout "
++ key = raw_input("Press return to end before timeout "
+ "('t' terminates, 'w' return and wait):")
+
+ if key == 'w':
+@@ -279,7 +279,7 @@ class StkAgent(dbus.service.Object):
+ def DisplayAction(self, text, icon):
+ print("Text: (%s)" % (text))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Press 't' to terminate the session ")
++ key = raw_input("Press 't' to terminate the session ")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -289,7 +289,7 @@ class StkAgent(dbus.service.Object):
+ def ConfirmOpenChannel(self, info, icon):
+ print("Open channel confirmation: (%s)" % (info))
+ print("Icon: (%d)" % (int(icon)))
+- key = input("Enter Confirmation (t, y, n):")
++ key = raw_input("Enter Confirmation (t, y, n):")
+
+ if key == 't':
+ raise EndSession("User wishes to terminate session")
+@@ -299,7 +299,7 @@ class StkAgent(dbus.service.Object):
+ return False
+
+ _dbus2py = {
+- dbus.String : str,
++ dbus.String : unicode,
+ dbus.UInt32 : int,
+ dbus.Int32 : int,
+ dbus.Int16 : int,
+@@ -396,7 +396,7 @@ if __name__ == '__main__':
+ except:
+ pass
+
+- select = int(input("Enter Selection: "))
++ select = int(raw_input("Enter Selection: "))
+ stk.SelectItem(select, path)
+ elif mode == 'agent':
+ path = "/test/agent"
+diff --git a/test/unlock-pin b/test/unlock-pin
+index 61f4765..10b6626 100755
+--- a/test/unlock-pin
++++ b/test/unlock-pin
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python3
++#!/usr/bin/python
+
+ import dbus
+ import sys
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/ofono/ofono_1.14.bb b/meta/recipes-connectivity/ofono/ofono_1.14.bb
deleted file mode 100644
index dea5d8808f..0000000000
--- a/meta/recipes-connectivity/ofono/ofono_1.14.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require ofono.inc
-
-PR = "r1"
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://ofono \
-"
-
-SRC_URI[md5sum] = "8bc398d86642408cc71d039f59c61538"
-SRC_URI[sha256sum] = "84d28d37cbc47129628a78bf3e17323af1636dceb2494511dd44caa829fb277f"
-
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-connectivity/ofono/ofono_1.15.bb b/meta/recipes-connectivity/ofono/ofono_1.15.bb
new file mode 100644
index 0000000000..bee2b4745c
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono_1.15.bb
@@ -0,0 +1,12 @@
+require ofono.inc
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://ofono \
+ file://Revert-test-Convert-to-Python-3.patch \
+"
+
+SRC_URI[md5sum] = "4d03de85239d8100dc7721bf0dad2bd2"
+SRC_URI[sha256sum] = "978807a05e8904eb4e57d6533ed71e75676a55fa3819a39fe2c878f45dbf7af6"
+
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-connectivity/openssh/openssh/init b/meta/recipes-connectivity/openssh/openssh/init
index 37c8e7b907..70d4a34659 100644
--- a/meta/recipes-connectivity/openssh/openssh/init
+++ b/meta/recipes-connectivity/openssh/openssh/init
@@ -1,6 +1,8 @@
#! /bin/sh
set -e
+PIDFILE=/var/run/sshd.pid
+
# source function library
. /etc/init.d/functions
@@ -70,12 +72,12 @@ case "$1" in
echo "Starting OpenBSD Secure Shell server: sshd"
check_keys
check_privsep_dir
- start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
echo "done."
;;
stop)
echo -n "Stopping OpenBSD Secure Shell server: sshd"
- start-stop-daemon -K -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd
echo "."
;;
@@ -84,7 +86,7 @@ case "$1" in
check_keys
check_config
echo -n "Reloading OpenBSD Secure Shell server's configuration"
- start-stop-daemon -K -s 1 -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd
echo "."
;;
@@ -92,11 +94,11 @@ case "$1" in
check_keys
check_config
echo -n "Restarting OpenBSD Secure Shell server: sshd"
- start-stop-daemon -K --oknodo -x /usr/sbin/sshd
+ start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd
check_for_no_start
check_privsep_dir
sleep 2
- start-stop-daemon -S -x /usr/sbin/sshd -- $SSHD_OPTS
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
echo "."
;;
diff --git a/meta/recipes-connectivity/openssh/openssh/nostrip.patch b/meta/recipes-connectivity/openssh/openssh/nostrip.patch
deleted file mode 100644
index 33111f5494..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/nostrip.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Disable stripping binaries during make install.
-
-Upstream-Status: Inappropriate [configuration]
-
-Build system specific.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -ur openssh-5.6p1.orig/Makefile.in openssh-5.6p1/Makefile.in
---- openssh-5.6p1.orig/Makefile.in 2010-05-11 23:51:39.000000000 -0700
-+++ openssh-5.6p1/Makefile.in 2010-08-30 16:49:54.000000000 -0700
-@@ -29,7 +29,7 @@
- RAND_HELPER=$(libexecdir)/ssh-rand-helper
- PRIVSEP_PATH=@PRIVSEP_PATH@
- SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
--STRIP_OPT=@STRIP_OPT@
-+STRIP_OPT=
-
- PATHS= -DSSHDIR=\"$(sysconfdir)\" \
- -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch
deleted file mode 100644
index 30c11cf432..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2011-4327.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-openssh-CVE-2011-4327
-
-A security flaw was found in the way ssh-keysign,
-a ssh helper program for host based authentication,
-attempted to retrieve enough entropy information on configurations that
-lacked a built-in entropy pool in OpenSSL (a ssh-rand-helper program would
-be executed to retrieve the entropy from the system environment).
-A local attacker could use this flaw to obtain unauthorized access to host keys
-via ptrace(2) process trace attached to the 'ssh-rand-helper' program.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2011-4327
-http://www.openssh.com/txt/portable-keysign-rand-helper.adv
-
-Upstream-Status: Pending
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
---- a/ssh-keysign.c
-+++ b/ssh-keysign.c
-@@ -170,6 +170,10 @@
- key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
- key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
- key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
-+ if (fcntl(key_fd[0], F_SETFD, FD_CLOEXEC) != 0 ||
-+ fcntl(key_fd[1], F_SETFD, FD_CLOEXEC) != 0 ||
-+ fcntl(key_fd[2], F_SETFD, FD_CLOEXEC) != 0)
-+ fatal("fcntl failed");
-
- original_real_uid = getuid(); /* XXX readconf.c needs this */
- if ((pw = getpwuid(original_real_uid)) == NULL)
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch
deleted file mode 100644
index 3deaf3f0e9..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2532.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Backport
-
-Fix for CVE-2014-2532
-
-Backported from openssh-6.6p1.tar.gz
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
---- a/session.c
-+++ b/session.c
-@@ -955,6 +955,11 @@
- u_int envsize;
- u_int i, namelen;
-
-+ if (strchr(name, '=') != NULL) {
-+ error("Invalid environment variable \"%.100s\"", name);
-+ return;
-+ }
-+
- /*
- * If we're passed an uninitialized list, allocate a single null
- * entry before continuing.
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch b/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch
deleted file mode 100644
index 674d186044..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/openssh-CVE-2014-2653.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-Upstream-Status: Backport
-
-This CVE could be removed if openssh is upgrade to 6.6 or higher.
-Below are some details.
-
-Attempt SSHFP lookup even if server presents a certificate
-
-Reference:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742513
-
-If an ssh server presents a certificate to the client, then the client
-does not check the DNS for SSHFP records. This means that a malicious
-server can essentially disable DNS-host-key-checking, which means the
-client will fall back to asking the user (who will just say "yes" to
-the fingerprint, sadly).
-
-This patch means that the ssh client will, if necessary, extract the
-server key from the proffered certificate, and attempt to verify it
-against the DNS. The patch was written by Mark Wooding
-<mdw@distorted.org.uk>. I modified it to add one debug2 call, reviewed
-it, and tested it.
-
-Signed-off-by: Matthew Vernon <matthew@debian.org>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
---- a/sshconnect.c
-+++ b/sshconnect.c
-@@ -1210,36 +1210,63 @@ fail:
- return -1;
- }
-
-+static int
-+check_host_key_sshfp(char *host, struct sockaddr *hostaddr, Key *host_key)
-+{
-+ int rc = -1;
-+ int flags = 0;
-+ Key *raw_key = NULL;
-+
-+ if (!options.verify_host_key_dns)
-+ goto done;
-+
-+ /* XXX certs are not yet supported for DNS; try looking the raw key
-+ * up in the DNS anyway.
-+ */
-+ if (key_is_cert(host_key)) {
-+ debug2("Extracting key from cert for SSHFP lookup");
-+ raw_key = key_from_private(host_key);
-+ if (key_drop_cert(raw_key))
-+ fatal("Couldn't drop certificate");
-+ host_key = raw_key;
-+ }
-+
-+ if (verify_host_key_dns(host, hostaddr, host_key, &flags))
-+ goto done;
-+
-+ if (flags & DNS_VERIFY_FOUND) {
-+
-+ if (options.verify_host_key_dns == 1 &&
-+ flags & DNS_VERIFY_MATCH &&
-+ flags & DNS_VERIFY_SECURE) {
-+ rc = 0;
-+ } else if (flags & DNS_VERIFY_MATCH) {
-+ matching_host_key_dns = 1;
-+ } else {
-+ warn_changed_key(host_key);
-+ error("Update the SSHFP RR in DNS with the new "
-+ "host key to get rid of this message.");
-+ }
-+ }
-+
-+done:
-+ if (raw_key)
-+ key_free(raw_key);
-+ return rc;
-+}
-+
- /* returns 0 if key verifies or -1 if key does NOT verify */
- int
- verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
- {
-- int flags = 0;
- char *fp;
-
- fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
- debug("Server host key: %s %s", key_type(host_key), fp);
- free(fp);
-
-- /* XXX certs are not yet supported for DNS */
-- if (!key_is_cert(host_key) && options.verify_host_key_dns &&
-- verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) {
-- if (flags & DNS_VERIFY_FOUND) {
--
-- if (options.verify_host_key_dns == 1 &&
-- flags & DNS_VERIFY_MATCH &&
-- flags & DNS_VERIFY_SECURE)
-- return 0;
--
-- if (flags & DNS_VERIFY_MATCH) {
-- matching_host_key_dns = 1;
-- } else {
-- warn_changed_key(host_key);
-- error("Update the SSHFP RR in DNS with the new "
-- "host key to get rid of this message.");
-- }
-- }
-- }
-+ if (check_host_key_sshfp(host, hostaddr, host_key) == 0)
-+ return 0;
-
- return check_host_key(host, hostaddr, options.port, host_key, RDRW,
- options.user_hostfiles, options.num_user_hostfiles,
---
-1.7.9.5
-
diff --git a/meta/recipes-connectivity/openssh/openssh/ssh_config b/meta/recipes-connectivity/openssh/openssh/ssh_config
index 4a4a649ba8..9e919156d3 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.25 2009/02/17 01:28:32 djm Exp $
+# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
@@ -44,3 +44,5 @@ Host *
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
+# ProxyCommand ssh -q -W %h:%p gateway.example.com
+# RekeyLimit 1G 1h
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd@.service b/meta/recipes-connectivity/openssh/openssh/sshd@.service
index 4eda6592f5..bb2d68e96a 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd@.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshd@.service
@@ -8,3 +8,4 @@ ExecStart=-@SBINDIR@/sshd -i
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
StandardInput=socket
StandardError=syslog
+KillMode=process
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config b/meta/recipes-connectivity/openssh/openssh/sshd_config
index 4f9b626fbd..3553669aa0 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd_config
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_config
@@ -15,9 +15,7 @@
#ListenAddress 0.0.0.0
#ListenAddress ::
-# Disable legacy (protocol version 1) support in the server for new
-# installations. In future the default will change to require explicit
-# activation of protocol 1
+# The default requires explicit activation of protocol 1
Protocol 2
# HostKey for protocol version 1
@@ -25,11 +23,16 @@ Protocol 2
# 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
@@ -45,7 +48,15 @@ Protocol 2
#RSAAuthentication yes
#PubkeyAuthentication yes
-#AuthorizedKeysFile .ssh/authorized_keys
+
+# 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
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
@@ -74,8 +85,8 @@ Protocol 2
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
@@ -91,20 +102,22 @@ Protocol 2
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
+#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
-UsePrivilegeSeparation yes
+UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
Compression no
ClientAliveInterval 15
ClientAliveCountMax 4
#UseDNS yes
#PidFile /var/run/sshd.pid
-#MaxStartups 10
+#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
+#VersionAddendum none
# no default banner path
#Banner none
@@ -116,4 +129,5 @@ Subsystem sftp /usr/libexec/sftp-server
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
+# PermitTTY no
# ForceCommand cvs server
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index c21d70baf0..d65086fc8a 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -3,6 +3,7 @@ Description=OpenSSH Key Generation
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]
ExecStart=@BINDIR@/ssh-keygen -A
diff --git a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb b/meta/recipes-connectivity/openssh/openssh_6.7p1.bb
index 047a895aae..dcbc181aa9 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.7p1.bb
@@ -11,11 +11,9 @@ DEPENDS = "zlib openssl"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
- file://nostrip.patch \
file://sshd_config \
file://ssh_config \
file://init \
- file://openssh-CVE-2011-4327.patch \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://sshd.socket \
file://sshd@.service \
@@ -23,14 +21,12 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://volatiles.99_sshd \
file://add-test-support-for-busybox.patch \
file://run-ptest \
- file://openssh-CVE-2014-2532.patch \
- file://openssh-CVE-2014-2653.patch \
file://auth2-none.c-avoid-authenticate-empty-passwords-to-m.patch"
PAM_SRC_URI = "file://sshd"
-SRC_URI[md5sum] = "3e9800e6bca1fbac0eea4d41baa7f239"
-SRC_URI[sha256sum] = "48c1f0664b4534875038004cc4f3555b8329c2a81c1df48db5c517800de203bb"
+SRC_URI[md5sum] = "3246aa79317b1d23cae783a3bf8275d6"
+SRC_URI[sha256sum] = "b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507"
inherit useradd update-rc.d update-alternatives systemd
@@ -43,14 +39,10 @@ INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
SYSTEMD_PACKAGES = "${PN}-sshd"
SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
-
inherit autotools-brokensep ptest
# LFS support:
CFLAGS += "-D__FILE_OFFSET_BITS=64"
-export LD = "${CC}"
# login path is hardcoded in sshd
EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
@@ -58,7 +50,9 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
--without-zlib-version-check \
--with-privsep-path=/var/run/sshd \
--sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth"
+ --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
@@ -75,16 +69,14 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
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_append () {
- install -m 0644 ${WORKDIR}/sshd_config ${S}/
- install -m 0644 ${WORKDIR}/ssh_config ${S}/
-}
-
do_install_append () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
@@ -97,6 +89,7 @@ do_install_append () {
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
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index b839c00dde..31dfd8fea7 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -9,6 +9,7 @@ LICENSE = "openssl"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
DEPENDS = "perl-native-runtime"
+DEPENDS_append_class-target = " openssl-native"
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
"
@@ -60,17 +61,18 @@ do_configure () {
ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
os=${HOST_OS}
- if [ "x$os" = "xlinux-uclibc" ]; then
+ case $os in
+ linux-uclibc |\
+ linux-uclibceabi |\
+ linux-gnueabi |\
+ linux-uclibcspe |\
+ linux-gnuspe |\
+ linux-musl*)
os=linux
- elif [ "x$os" = "xlinux-uclibceabi" ]; then
- os=linux
- elif [ "x$os" = "xlinux-uclibcspe" ]; then
- os=linux
- elif [ "x$os" = "xlinux-gnuspe" ]; then
- os=linux
- elif [ "x$os" = "xlinux-gnueabi" ]; then
- os=linux
- fi
+ ;;
+ *)
+ ;;
+ esac
target="$os-${HOST_ARCH}"
case $target in
linux-arm)
@@ -137,6 +139,10 @@ do_configure () {
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
}
@@ -187,5 +193,12 @@ do_install_ptest () {
install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
}
-BBCLASSEXTEND = "native nativesdk"
+do_install_append_virtclass-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/heartbeat-test-private-api.patch b/meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch
deleted file mode 100644
index 3c77dfcdf0..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/heartbeat-test-private-api.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2e251ba8feaa696f9408a19336d1fbab148df55e Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt@roeckx.be>
-Date: Sat, 7 Jun 2014 13:32:23 +0200
-Subject: [PATCH] Link heartbeat_test with the static version of the libraries
-
-It's using an internal API that that might not be available in the shared
-library.
-
-Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/125]
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- test/Makefile | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/test/Makefile b/test/Makefile
-index f1816ac..1dd7bb9 100644
---- a/test/Makefile
-+++ b/test/Makefile
-@@ -420,6 +420,13 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
- LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
- link_app.$${shlib_target}
-
-+BUILD_CMD_STATIC=shlib_target=; \
-+ LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO) $(LIBKRB5)"; \
-+ $(MAKE) -f $(TOP)/Makefile.shared -e \
-+ APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
-+ LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-+ link_app.$${shlib_target}
-+
- $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
- @target=$(RSATEST); $(BUILD_CMD)
-
-@@ -618,7 +625,7 @@ $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
- @target=$(V3NAMETEST); $(BUILD_CMD)
-
- $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
-- @target=$(HEARTBEATTEST); $(BUILD_CMD)
-+ @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
-
- #$(AESTEST).o: $(AESTEST).c
- # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
---
-1.9.3
-
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.1h.bb b/meta/recipes-connectivity/openssl/openssl_1.0.1j.bb
index ddaaba8836..2da18aead7 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.1h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.1j.bb
@@ -34,13 +34,12 @@ SRC_URI += "file://configure-targets.patch \
file://find.pl \
file://openssl-fix-des.pod-error.patch \
file://Makefiles-ptest.patch \
- file://heartbeat-test-private-api.patch \
file://ptest-deps.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "8d6d684a9430d5cc98a62a5d8fbda8cf"
-SRC_URI[sha256sum] = "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093"
+SRC_URI[md5sum] = "f7175c9cd3c39bb1907ac8bba9df8ed3"
+SRC_URI[sha256sum] = "1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3"
PACKAGES =+ " \
${PN}-engines \
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
index 7588341c8e..338af33a38 100644
--- a/meta/recipes-connectivity/portmap/portmap.inc
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -4,28 +4,14 @@ 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"
-DEPENDS = "virtual/fakeroot-native"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
- ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \
- file://portmap.init \
- file://make.patch;apply=yes"
-S = "${WORKDIR}/portmap_5beta"
INITSCRIPT_NAME = "portmap"
-INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
-
-inherit update-rc.d
+INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ."
-sbindir = "/sbin"
+inherit update-rc.d systemd
-fakeroot do_install() {
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${base_sbindir}
- install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
- oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
-}
+SYSTEMD_SERVICE_${PN} = "portmap.service"
PACKAGES =+ "portmap-utils"
-FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
+FILES_portmap-utils = "${base_sbindir}/pmap_set ${base_sbindir}/pmap_dump"
FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
index 2fbf784b73..2fbf784b73 100644
--- a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
+++ b/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.service b/meta/recipes-connectivity/portmap/portmap/portmap.service
new file mode 100644
index 0000000000..7ef9d7b02e
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.service
@@ -0,0 +1,10 @@
+[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-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
index 2f25058095..2f25058095 100644
--- a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
+++ b/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
index b0a9454c48..e727fe3cb9 100644
--- a/meta/recipes-connectivity/portmap/portmap_6.0.bb
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -5,7 +5,8 @@ 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.init \
+ file://portmap.service"
SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff"
SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de"
@@ -19,8 +20,12 @@ 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)}'"
-fakeroot do_install() {
+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 68b83d00f1..51a76b4299 100644
--- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -12,6 +12,8 @@ SRC_URI = "file://host-peer \
inherit allarch useradd
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/ppp/peers
install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 8bc3672600..92ca0c92c6 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -31,8 +31,8 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://ppp@.service \
"
-SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b"
-SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d"
+SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a"
+SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30"
inherit autotools-brokensep systemd
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf b/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf
new file mode 100644
index 0000000000..3790d774a7
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf/99_resolvconf
@@ -0,0 +1,4 @@
+d root root 0755 /var/run/resolvconf/interface none
+f root root 0644 /etc/resolvconf/run/resolv.conf none
+f root root 0644 /etc/resolvconf/run/enable-updates none
+l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.conf
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
new file mode 100644
index 0000000000..1aead07869
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
@@ -0,0 +1,20 @@
+
+busybox installs readlink into /usr/bin, so ensure /usr/bin
+is in the path.
+
+Upstream-Status: Submitted
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: resolvconf-1.76/etc/resolvconf/update.d/libc
+===================================================================
+--- resolvconf-1.76.orig/etc/resolvconf/update.d/libc
++++ resolvconf-1.76/etc/resolvconf/update.d/libc
+@@ -16,7 +16,7 @@
+ #
+
+ set -e
+-PATH=/sbin:/bin
++PATH=/sbin:/bin:/usr/bin
+
+ [ -x /lib/resolvconf/list-records ] || exit 1
+
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb
index 7310c837e9..20a2c19328 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.76.bb
@@ -11,10 +11,14 @@ AUTHOR = "Thomas Hood"
HOMEPAGE = "http://packages.debian.org/resolvconf"
RDEPENDS_${PN} = "bash"
-SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz"
+SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \
+ file://fix-path-for-busybox.patch \
+ file://99_resolvconf \
+ "
-SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56"
-SRC_URI[sha256sum] = "16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e"
+
+SRC_URI[md5sum] = "d78ce30ea068999cd3e0523300b27255"
+SRC_URI[sha256sum] = "c9f40f7405b37399ddbf29ca4205b4911ee35cb9ffd9be7671faa2385b1fa573"
inherit allarch
@@ -24,13 +28,13 @@ do_compile () {
do_install () {
install -d ${D}${sysconfdir}/default/volatiles
- echo "d root root 0755 ${localstatedir}/run/${BPN}/interface none" \
- > ${D}${sysconfdir}/default/volatiles/99_resolvconf
+ install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /run/${BPN}/interface - - - -" \
> ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
fi
+ install -d ${D}${base_libdir}/${BPN}
install -d ${D}${sysconfdir}/${BPN}
ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
install -d ${D}${sysconfdir} ${D}${base_sbindir}
@@ -38,6 +42,11 @@ do_install () {
cp -pPR etc/* ${D}${sysconfdir}/
chown -R root:root ${D}${sysconfdir}/
install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+ install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
+ install -d ${D}/${sysconfdir}/network/if-down.d
+ install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
install -m 0644 README ${D}${docdir}/${P}/
install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
}
@@ -51,3 +60,5 @@ pkg_postinst_${PN} () {
fi
fi
}
+
+FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch b/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch
new file mode 100644
index 0000000000..9152df533f
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/socat-1.7.2.4-linux-3.17.patch
@@ -0,0 +1,29 @@
+socat: fix compile erorr against 3.17+ kernel headers
+
+With the linux 3.17 kernel socat's configure detects the wrong include for errqueue.h
+which results in a compilation error.
+
+By backporting the gentoo patch from:
+
+ http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch
+
+Fixes the build issue
+
+Upstream-status: backport
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+--- a/configure.in
++++ b/configure.in
+@@ -80,7 +80,10 @@
+ AC_CHECK_HEADERS(termios.h linux/if_tun.h)
+ AC_CHECK_HEADERS(net/if_dl.h)
+ AC_CHECK_HEADERS(linux/types.h)
+-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
++AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [AC_INCLUDES_DEFAULT
++ #if HAVE_LINUX_TYPES_H
++ #include <linux/types.h>
++ #endif])
+ AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
+ AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
+ AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
index efa3b91c16..9e43e160e3 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
file://fix-cross-compiling-failed.patch \
+ file://socat-1.7.2.4-linux-3.17.patch \
"
SRC_URI[md5sum] = "69b8155dd442a6f24e28ef5407d868eb"
@@ -26,6 +27,7 @@ EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \
ac_cv_ispeed_offset=13 \
+ ac_cv_header_bsd_libutil_h=no \
"
PACKAGECONFIG ??= "tcp-wrappers"
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch b/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
deleted file mode 100644
index a7737fbf03..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy/doublefix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix double reference to this file to work with recent autoconf+automake
-
-RP 1/2/10
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.3/src/Makefile.am
-===================================================================
---- libtelepathy-0.3.3.orig/src/Makefile.am 2010-02-01 13:13:50.869038984 +0000
-+++ libtelepathy-0.3.3/src/Makefile.am 2010-02-01 13:14:23.267789456 +0000
-@@ -27,7 +27,6 @@
- tp-chan-type-text-gen.h \
- tp-chan-type-tubes-gen.h \
- tp-conn-iface-aliasing-gen.h \
-- tp-conn-iface-avatars-gen.h \
- tp-conn-iface-capabilities-gen.h \
- tp-conn-iface-contact-info-gen.h \
- tp-conn-iface-forwarding-gen.h \
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch b/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
deleted file mode 100644
index 37679ab761..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy/prefer_python_2.5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: libtelepathy-0.3.1/configure.ac
-===================================================================
---- libtelepathy-0.3.1.orig/configure.ac 2007-11-22 19:05:56.000000000 +0000
-+++ libtelepathy-0.3.1/configure.ac 2008-01-04 12:07:28.000000000 +0000
-@@ -51,7 +51,7 @@
- AC_MSG_ERROR([xsltproc (from the libxslt source package) is required])
- fi
-
--AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python])
-+AC_CHECK_PROGS([PYTHON], [python2.5 python2.4 python2.3 python])
- if test -z "$PYTHON"; then
- AC_MSG_ERROR([Python is required to compile this package])
- fi
diff --git a/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb b/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
deleted file mode 100644
index f13e7093c8..0000000000
--- a/meta/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Telepathy framework"
-DESCRIPTION = "Telepathy is a D-Bus framework for unifying real time \
-communication, including instant messaging, voice calls and video calls. It \
-abstracts differences between protocols to provide a unified interface for \
-applications."
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus dbus-glib telepathy-glib libxslt-native"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://src/tp-conn.c;beginline=1;endline=19;md5=4c58069f77d601cc59200bce5396c7cb"
-PR = "r5"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/libtelepathy/libtelepathy-${PV}.tar.gz \
- file://prefer_python_2.5.patch \
- file://doublefix.patch"
-
-SRC_URI[md5sum] = "490ca1a0c614d4466394b72d43bf7370"
-SRC_URI[sha256sum] = "e0d230be855125163579743418203c6f6be2f10f98c4f065735c1dc9ed115878"
-
-inherit autotools pkgconfig pythonnative
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb b/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb
deleted file mode 100644
index 6b8c20c381..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-glib_0.24.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Telepathy Framework glib-base helper library"
-DESCRIPTION = "Telepathy Framework: GLib-based helper library for connection managers"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus python-native-runtime dbus-native dbus-glib libxslt-native"
-LICENSE = "LGPLv2.1+"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-glib/${BP}.tar.gz"
-SRC_URI[md5sum] = "93c429e37750b25dcf8de86bb514664f"
-SRC_URI[sha256sum] = "ae0002134991217f42e503c43dea7817853afc18863b913744d51ffa029818cf"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e413d83db6ee8f2c8e6055719096a48e"
-
-inherit autotools pkgconfig gettext
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch b/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch
deleted file mode 100644
index 2cd2c78c31..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-idle/fix-svc-gtk-doc.h-target.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---- a/extensions/Makefile.am
-+++ b/extensions/Makefile.am
-@@ -37,8 +37,8 @@ _gen/all.xml: all.xml $(wildcard $(srcdi
- --xinclude $(tools_dir)/identity.xsl \
- $< > $@
-
--extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
-+extensions.html _gen/svc-gtk-doc.h: _gen/all.xml $(tools_dir)/doc-generator.xsl
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \
- $(tools_dir)/doc-generator.xsl \
- $< > $@
-
diff --git a/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb b/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
deleted file mode 100644
index ca09f6daf3..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Telepathy IRC connection manager"
-DESCRIPTION = "Telepathy implementation of the Internet Relay Chat protocols."
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-DEPENDS = "glib-2.0 dbus telepathy-glib openssl libxslt-native"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/idle.c;beginline=1;endline=19;md5=b06b1e2594423111a1a7910b0eefc7f9"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://fix-svc-gtk-doc.h-target.patch"
-SRC_URI[md5sum] = "92a2de5198284cbd3c430b0d1a971a86"
-SRC_URI[sha256sum] = "3013ad4b38d14ee630b8cc8ada5e95ccaa849b9a6fe15d2eaf6d0717d76f2fab"
-
-inherit autotools pkgconfig pythonnative
-
-FILES_${PN} += "${datadir}/telepathy \
- ${datadir}/dbus-1"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch b/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
deleted file mode 100644
index ece1da6bc3..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-mission-control/tmc-Makefile-fix-race.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 22 Sep 2013 23:21:01 -0400
-Subject: [PATCH] src/Makefile.am: fix race issue for _gen/gtypes.h and _gen/gtypes-body.h
-
-There might be an error when parallel build:
-
-[snip]
-Traceback (most recent call last):
- File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
- GTypesGenerator(dom, argv[1], argv[2])()
- File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
- file_set_contents(self.output + '.h', ''.join(self.header))
- File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
- os.rename(filename + '.tmp', filename)
-OSError: [Errno 2] No such file or directory
-[snip]
-
-This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
-write(remove/rename) _gen/gtypes.tmp at the same time, then there would
-be the error.
-
-There was a similar bug in telepathy-glib which was already fixed, we use the
-similar patch to fix it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/Makefile.am | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -288,7 +288,11 @@ _gen/interfaces-body.h: _gen/mcd.xml \
- $(tools_dir)/glib-interfaces-body-generator.xsl \
- $< > $@
-
--_gen/gtypes.h _gen/gtypes-body.h: _gen/mcd.xml \
-+# do nothing, output as a side-effect
-+_gen/gtypes.h: _gen/gtypes-body.h
-+ @:
-+
-+_gen/gtypes-body.h: _gen/mcd.xml \
- $(top_srcdir)/tools/glib-gtypes-generator.py
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
- $< _gen/gtypes mc
-@@ -309,7 +313,11 @@ _gen/%.xml: %.xml $(wildcard $(top_srcdir)/xml/*.xml) Makefile.am
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
- $< > $@
-
--_gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/cli-%.h: _gen/cli-%-body.h
-+ @:
-+
-+_gen/cli-%-body.h: _gen/%.xml \
- $(tools_dir)/glib-client-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-gen.py \
- --group=`echo $* | tr x- x_` \
-@@ -317,7 +325,11 @@ _gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \
- --tp-proxy-api=0.7.6 \
- $< Mc_Cli _gen/cli-$*
-
--_gen/svc-%.c _gen/svc-%.h: _gen/%.xml \
-+# do nothing, output as a side-effect
-+_gen/svc-%.h: _gen/svc-%.c
-+ @:
-+
-+_gen/svc-%.c: _gen/%.xml \
- $(tools_dir)/glib-ginterface-gen.py Makefile.am
- $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
- --filename=_gen/svc-$* \
---
-1.7.10.4
-
diff --git a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb b/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
deleted file mode 100644
index 9ae68ddea9..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-mission-control_5.16.1.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "Central control for Telepathy IM connection managers"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/Mission_Control/"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
- file://src/request.h;beginline=1;endline=21;md5=f80534d9af1c33291b3b79609f196eb2"
-SECTION = "libs"
-DEPENDS = "libtelepathy dbus-glib gconf libxslt-native"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/telepathy-mission-control/${BP}.tar.gz \
- file://tmc-Makefile-fix-race.patch \
- "
-SRC_URI[md5sum] = "421115a35b9e427807326877f86e7f43"
-SRC_URI[sha256sum] = "14ceb7d53535b43d44b8271ad11319d1d0fe6d193d154636b9e62b42799b9723"
-
-inherit autotools-brokensep pkgconfig pythonnative
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[upower] = "--enable-upower,--disable-upower,upower"
-
-# to select connman or nm you need to use "connectivity" and "connman" or "nm", default is to disable both
-PACKAGECONFIG[connectivity] = ",--with-connectivity=no"
-PACKAGECONFIG[connman] = "--with-connectivity=connman,,connman"
-PACKAGECONFIG[nm] = "--with-connectivity=nm,,networkmanager"
-
-PACKAGES =+ " \
- libmissioncontrol \
- libmissioncontrol-config \
- libmissioncontrol-server \
- libmissioncontrol-dev \
- libmissioncontrol-config-dev \
- libmissioncontrol-server-dev \
- libmissioncontrol-dbg \
- libmissioncontrol-config-dbg \
- libmissioncontrol-server-dbg \
-"
-
-FILES_${PN} += "${datadir}/dbus* ${datadir}/glib-2.0/schemas"
-
-FILES_libmissioncontrol = "${libdir}/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config = "${libdir}/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server = "${libdir}/libmissioncontrol-server.so.*"
-
-FILES_libmissioncontrol-dev = "${libdir}/libmissioncontrol.* \
- ${includedir}/libmissioncontrol/ \
- ${libdir}/pkgconfig/libmissioncontrol.pc"
-FILES_libmissioncontrol-config-dev = "${libdir}/libmissioncontrol-config.*"
-FILES_libmissioncontrol-server-dev = "${libdir}/libmissioncontrol-server.*"
-
-FILES_libmissioncontrol-dbg = "${libdir}/.debug/libmissioncontrol.so.*"
-FILES_libmissioncontrol-config-dbg = "${libdir}/.debug/libmissioncontrol-config.so.*"
-FILES_libmissioncontrol-server-dbg = "${libdir}/.debug/libmissioncontrol-server.so.*"
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch
deleted file mode 100644
index 248824606e..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/parallel_make.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add dependency of __init__.py
-
-Tasks must be done after exec of __init__, which creates the
-src/_generated directory that tasks are based on.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-Upstream-Status: Submitted
-(However it seems that this project is out of maintanence.)
-
-diff -ruN telepathy-python-0.15.19-orig/src/Makefile.am telepathy-python-0.15.19/src/Makefile.am
---- telepathy-python-0.15.19-orig/src/Makefile.am 2011-03-10 08:51:49.000000000 +0800
-+++ telepathy-python-0.15.19/src/Makefile.am 2011-03-10 08:54:45.000000000 +0800
-@@ -39,17 +39,17 @@
- XSLTPROC_OPTS = --nonet --novalid --xinclude
- tools_dir = $(top_srcdir)/tools
-
--_generated/interfaces.py: $(tools_dir)/python-interfaces-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/interfaces.py: _generated/__init__.py $(tools_dir)/python-interfaces-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-interfaces-generator.xsl \
- $(spec_dir)/all.xml
-
--_generated/constants.py: $(tools_dir)/python-constants-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/constants.py: _generated/__init__.py $(tools_dir)/python-constants-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-constants-generator.xsl \
- $(spec_dir)/all.xml
-
--_generated/errors.py: $(tools_dir)/python-errors-generator.xsl $(wildcard $(spec_dir)/*.xml)
-+_generated/errors.py: _generated/__init__.py $(tools_dir)/python-errors-generator.xsl $(wildcard $(spec_dir)/*.xml)
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/python-errors-generator.xsl \
- $(spec_dir)/all.xml
-@@ -58,7 +58,7 @@
- $(AM_V_GEN)$(mkdir_p) $(dir $@)
- @echo "# Placeholder for package" > $@
-
--_generated/%.py: $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
-+_generated/%.py: _generated/__init__.py $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_OPTS) -o $@ \
- $(tools_dir)/spec-to-python.xsl \
- $(spec_dir)/$*.xml
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch
deleted file mode 100644
index df95a4c138..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/remove_duplicate_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit f6c67662145de889055a86a6b3b12c70a45fc8d5
-Author: Dongxiao Xu <dongxiao.xu@intel.com>
-Date: Wed Sep 7 16:02:20 2011 +0800
-
- Avoid duplicated installation of errors.py
-
- newer version of autotools don't seem to like listing files to install
- twice. Remove one errors.py from the installation list.
-
- Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
- Upstream-Status: Inappropirate [upstream inactive]
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5c27dfe..7536e43 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -11,7 +11,7 @@ telepathy_PYTHON = \
-
- # telepathy._generated.* auto-generated modules
- spec_dir = $(top_srcdir)/spec
--spec_files := $(patsubst $(spec_dir)%.xml,_generated%.py,$(wildcard $(spec_dir)/*.xml))
-+spec_files := $(filter-out _generated/errors.py, $(patsubst $(spec_dir)%.xml,_generated%.py,$(wildcard $(spec_dir)/*.xml)))
-
- BUILT_SOURCES = \
- _generated/interfaces.py \
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch b/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch
deleted file mode 100644
index f613fdce4d..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python-0.15.19/telepathy-python_fix_for_automake_1.12.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has deprecated use of mkdir_p, and it recommends
-use of MKDIR_P instead. Changed the code to avoid these kind
-of warning-errors.
-
-| make[1]: _generated/: Command not found
-| make[1]: *** [_generated/__init__.py] Error 127
-| make[1]: Leaving directory `/srv/home/nitin/builds2/build0/tmp/work/i586-poky-linux/telepathy-python-0.15.19-r4/telepathy-python-0.15.19/src'
-| make: *** [all-recursive] Error 1
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/10
-Index: telepathy-python-0.15.19/src/Makefile.am
-===================================================================
---- telepathy-python-0.15.19.orig/src/Makefile.am
-+++ telepathy-python-0.15.19/src/Makefile.am
-@@ -55,7 +55,7 @@ _generated/errors.py: _generated/__init_
- $(spec_dir)/all.xml
-
- _generated/__init__.py:
-- $(AM_V_GEN)$(mkdir_p) $(dir $@)
-+ $(AM_V_GEN)$(MKDIR_P) $(dir $@)
- @echo "# Placeholder for package" > $@
-
- _generated/%.py: _generated/__init__.py $(tools_dir)/spec-to-python.xsl $(spec_dir)/%.xml
diff --git a/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb b/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb
deleted file mode 100644
index 17167022b9..0000000000
--- a/meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Telepathy IM framework - Python package"
-HOMEPAGE = "http://telepathy.freedesktop.org/wiki/"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/utils.py;beginline=1;endline=17;md5=9a07d1a9791a7429a14e7b25c6c86822"
-
-DEPENDS = "libxslt-native"
-RDEPENDS_${PN} += "python-dbus"
-
-SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://parallel_make.patch \
- file://remove_duplicate_install.patch \
- file://telepathy-python_fix_for_automake_1.12.patch"
-
-PR = "r6"
-
-inherit autotools pythonnative
-
-SRC_URI[md5sum] = "f7ca25ab3c88874015b7e9728f7f3017"
-SRC_URI[sha256sum] = "244c0e1bf4bbd78ae298ea659fe10bf3a73738db550156767cc2477aedf72376"
-
-FILES_${PN} += "\
- ${libdir}/python*/site-packages/telepathy/*.py \
- ${libdir}/python*/site-packages/telepathy/*/*.py \
- "
-
-do_install_append () {
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyc
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*.pyo
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyc
- rm -f ${D}${libdir}/python*/site-packages/telepathy/*/*.pyo
-}
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
index d9c6532b5a..6f0de3cab8 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc
@@ -6,24 +6,28 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=ab87f20cd7e8c0d0a6539b34d3791d0e \
file://README;beginline=1;endline=56;md5=a07250b28e857455336bb59fc31cb845 \
file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=e8e021e30f3a6ab7c341b66b86626a5a"
-DEPENDS = "gnutls dbus libnl openssl libgcrypt"
+DEPENDS = "dbus libnl libgcrypt"
RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = ",,gnutls"
+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://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
- file://defconfig-gnutls \
+ file://defconfig \
file://wpa-supplicant.sh \
file://wpa_supplicant.conf \
file://wpa_supplicant.conf-sane \
file://99_wpa_supplicant \
file://fix-libnl3-host-contamination.patch \
"
-SRC_URI[md5sum] = "238e8e888bbd558e1a57e3eb28d1dd07"
-SRC_URI[sha256sum] = "e0d8b8fd68a659636eaba246bb2caacbf53d22d53b2b6b90eb4b4fef0993c8ed"
+SRC_URI[md5sum] = "f2ed8fef72cf63d8d446a2d0a6da630a"
+SRC_URI[sha256sum] = "eaaa5bf3055270e521b2dff64f2d203ec8040f71958b8588269a82c00c9d7b6a"
S = "${WORKDIR}/wpa_supplicant-${PV}"
@@ -34,8 +38,22 @@ FILES_${PN} += "${datadir}/dbus-1/system-services/*"
CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
do_configure () {
- install -m 0755 ${WORKDIR}/defconfig-gnutls wpa_supplicant/.config
+ ${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}"
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig
index 92ef8231d5..f04e398fdb 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig-gnutls
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig
@@ -453,7 +453,7 @@ CONFIG_CTRL_IFACE_DBUS_NEW=y
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz
-CONFIG_TLS = gnutls
+CONFIG_TLS = %ssl%
CONFIG_CTRL_IFACE_DBUS=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
index eb8036f50c..e899c1655d 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/fix-libnl3-host-contamination.patch
@@ -15,15 +15,15 @@ diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index 68ff910..1f38f57 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
-@@ -30,7 +30,7 @@ NEED_RFKILL=y
+@@ -35,7 +35,7 @@ NEED_RFKILL=y
ifdef CONFIG_LIBNL32
DRV_LIBS += -lnl-3
DRV_LIBS += -lnl-genl-3
- DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ DRV_CFLAGS += -DCONFIG_LIBNL20
- else
- ifdef CONFIG_LIBNL_TINY
- DRV_LIBS += -lnl-tiny
+ ifdef CONFIG_LIBNL3_ROUTE
+ DRV_LIBS += -lnl-route-3
+ DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk
index db8561a..c93e88d 100644
--- a/src/drivers/drivers.mk
@@ -34,9 +34,9 @@ index db8561a..c93e88d 100644
DRV_LIBS += -lnl-genl-3
- DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+ DRV_CFLAGS += -DCONFIG_LIBNL20
- else
- ifdef CONFIG_LIBNL_TINY
- DRV_LIBS += -lnl-tiny
+ ifdef CONFIG_LIBNL3_ROUTE
+ DRV_LIBS += -lnl-route-3
+ DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE
--
1.7.10.4
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb
index afd0654016..afd0654016 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.2.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.3.bb
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 8eeaac3693..88ab8d877b 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -5,7 +5,7 @@ PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi" # needed for packages like cron
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
-if [ ! -e /etc/localtime ]; then
+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
@@ -26,6 +26,10 @@ if [ -d /etc/profile.d ]; then
unset i
fi
+if [ -x /usr/bin/resize ];then
+ /usr/bin/resize >/dev/null
+fi
+
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
umask 022
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 6d76a2b0db..6157ff381a 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
@@ -32,7 +32,7 @@ INHIBIT_DEFAULT_DEPS = "1"
docdir_append = "/${P}"
dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
-dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
+dirs2775 = ""
dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
@@ -43,13 +43,15 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
${localstatedir}/volatile/log \
+ /home ${prefix}/src ${localstatedir}/local \
/media"
-dirs3755 = "/srv \
- ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
- ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \
- ${prefix}/local/share ${prefix}/local/src \
- ${prefix}/lib/locale"
-dirs4775 = "/var/mail"
+
+dirs755-lsb = "/srv \
+ ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
+ ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \
+ ${prefix}/local/share ${prefix}/local/src \
+ ${prefix}/lib/locale"
+dirs2775-lsb = "/var/mail"
volatiles = "log tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
@@ -72,7 +74,7 @@ do_install () {
install -m 1777 -d ${D}$d
done
for d in ${dirs2775}; do
- install -m 2755 -d ${D}$d
+ install -m 2775 -d ${D}$d
done
for d in ${volatiles}; do
ln -sf volatile/$d ${D}${localstatedir}/$d
@@ -100,6 +102,10 @@ do_install () {
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
}
@@ -129,12 +135,12 @@ do_install_basefilesissue () {
}
do_install_append_linuxstdbase() {
- for d in ${dirs3755}; do
+ for d in ${dirs755-lsb}; do
install -m 0755 -d ${D}$d
done
- for d in ${dirs4775}; do
- install -m 2755 -d ${D}$d
+ for d in ${dirs2775-lsb}; do
+ install -m 2775 -d ${D}$d
done
}
@@ -145,4 +151,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}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
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 ec8f2afb22..a8bd7c4e3f 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
@@ -4,7 +4,7 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
+SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \
file://add_shutdown.patch \
file://nobash.patch \
file://noshadow.patch \
@@ -75,11 +75,11 @@ python populate_packages_prepend() {
preinst = """#!/bin/sh
mkdir -p $D${sysconfdir}
if [ ! -e $D${sysconfdir}/passwd ]; then
-\tcat << EOF > $D${sysconfdir}/passwd
+\tcat << 'EOF' > $D${sysconfdir}/passwd
""" + passwd + """EOF
fi
if [ ! -e $D${sysconfdir}/group ]; then
-\tcat << EOF > $D${sysconfdir}/group
+\tcat << 'EOF' > $D${sysconfdir}/group
""" + group + """EOF
fi
"""
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index bd66e4f148..0769d92c50 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -23,7 +23,7 @@ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
-FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
+FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
@@ -268,6 +268,9 @@ do_install () {
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
diff --git a/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch b/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch
new file mode 100644
index 0000000000..4e76067b3c
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch
@@ -0,0 +1,41 @@
+Upstream-status: Backport
+http://git.busybox.net/busybox/commit/?id=4e314faa0aecb66717418e9a47a4451aec59262b
+
+CVE-2014-9645 fix.
+
+[YOCTO #7257]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+From 4e314faa0aecb66717418e9a47a4451aec59262b Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Thu, 20 Nov 2014 17:24:33 +0000
+Subject: modprobe,rmmod: reject module names with slashes
+
+function old new delta
+add_probe 86 113 +27
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+Index: busybox-1.22.1/modutils/modprobe.c
+===================================================================
+--- busybox-1.22.1.orig/modutils/modprobe.c
++++ busybox-1.22.1/modutils/modprobe.c
+@@ -238,6 +238,17 @@ static void add_probe(const char *name)
+ {
+ struct module_entry *m;
+
++ /*
++ * get_or_add_modentry() strips path from name and works
++ * on remaining basename.
++ * This would make "rmmod dir/name" and "modprobe dir/name"
++ * to work like "rmmod name" and "modprobe name",
++ * which is wrong, and can be abused via implicit modprobing:
++ * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
++ */
++ if (strchr(name, '/'))
++ bb_error_msg_and_die("malformed module name '%s'", name);
++
+ m = get_or_add_modentry(name);
+ if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
+ && (m->flags & MODULE_FLAG_LOADED)
diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
new file mode 100644
index 0000000000..781f5af14a
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch
@@ -0,0 +1,71 @@
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Sun, 3 Mar 2013 12:31:40 -0600
+Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location
+
+Upstream-status: Submitted
+
+[ based on: https://lkml.org/lkml/2013/3/3/103 ]
+
+This patch syncs up with the way the menuconfig ncurses / curses
+is detected and the HOST_EXTRACFLAGS works in the Linux kernel
+and it allows the menuconfig to work with a sysroot version
+of the curses libraries.
+
+---
+
+In some cross build environments such as the Yocto Project build
+environment it provides an ncurses library that is compiled
+differently than the host's version. This causes display corruption
+problems when the host's curses includes are used instead of the
+includes from the provided compiler are overridden. There is a second
+case where there is no curses libraries at all on the host system and
+menuconfig will just fail entirely.
+
+The solution is simply to allow an override variable in
+check-lxdialog.sh for environments such as the Yocto Project. Adding
+a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
+compiling and linking against the right headers and libraries.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+cc: Michal Marek <mmarek@suse.cz>
+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 @@
+ # What library to link
+ ldflags()
+ {
++ if [ x"$CROSS_CURSES_LIB" != x ]; then
++ 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()
+ # Where is ncurses.h?
+ ccflags()
+ {
++ if [ x"$CROSS_CURSES_INC" != x ]; then
++ 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
+--- a/scripts/kconfig/lxdialog/Makefile
++++ b/scripts/kconfig/lxdialog/Makefile
+@@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che
+
+ # 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)
+-HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
++HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
+ HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
+
+ HOST_EXTRACFLAGS += -DLOCALE
diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig
index 47eca212db..8394067bed 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -159,7 +159,7 @@ 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 is not set
+CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_UNCOMPRESS is not set
# CONFIG_UNLZMA is not set
@@ -377,7 +377,7 @@ CONFIG_FEATURE_VI_WIN_RESIZE=y
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
CONFIG_AWK=y
-# CONFIG_FEATURE_AWK_LIBM is not set
+CONFIG_FEATURE_AWK_LIBM=y
CONFIG_CMP=y
CONFIG_DIFF=y
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
@@ -781,7 +781,7 @@ CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
-# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
# CONFIG_INETD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
diff --git a/meta/recipes-core/busybox/busybox/recognize_connmand.patch b/meta/recipes-core/busybox/busybox/recognize_connmand.patch
new file mode 100644
index 0000000000..f42c74caad
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/recognize_connmand.patch
@@ -0,0 +1,21 @@
+This adds connmand to the list of know dhcp clients
+
+Upstream-Status: Inappropriate [OE-Core]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: busybox-1.22.1/networking/ifupdown.c
+===================================================================
+--- busybox-1.22.1.orig/networking/ifupdown.c
++++ busybox-1.22.1/networking/ifupdown.c
+@@ -521,6 +521,10 @@ struct dhcp_client_t {
+ };
+
+ static const struct dhcp_client_t ext_dhcp_clients[] = {
++ { "connmand",
++ "true",
++ "true",
++ },
+ { "dhcpcd",
+ "dhcpcd[[ -h %hostname%]][[ -i %vendor%]][[ -I %client%]][[ -l %leasetime%]] %iface%",
+ "dhcpcd -k %iface%",
diff --git a/meta/recipes-core/busybox/busybox_1.22.1.bb b/meta/recipes-core/busybox/busybox_1.22.1.bb
index 46641e19fa..a41879c23f 100644
--- a/meta/recipes-core/busybox/busybox_1.22.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.22.1.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://busybox-syslog.default \
file://mdev \
file://mdev.conf \
+ file://mdev-mount.sh \
file://umount.busybox \
file://defconfig \
file://busybox-syslog.service.in \
@@ -30,6 +31,9 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://inetd \
file://login-utilities.cfg \
file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \
+ file://recognize_connmand.patch \
+ file://busybox-cross-menuconfig.patch \
+ file://CVE-2014-9645_busybox_reject_module_names_with_slashes.patch \
"
SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e"
diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb
index f2cc119400..f91b552f78 100644
--- a/meta/recipes-core/busybox/busybox_git.bb
+++ b/meta/recipes-core/busybox/busybox_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "git://busybox.net/busybox.git \
file://busybox-syslog.default \
file://mdev \
file://mdev.conf \
+ file://mdev-mount.sh \
file://umount.busybox \
file://defconfig \
file://busybox-syslog.service.in \
diff --git a/meta/recipes-core/busybox/files/find-touchscreen.sh b/meta/recipes-core/busybox/files/find-touchscreen.sh
index 1582ea891c..52c5e7a096 100644
--- a/meta/recipes-core/busybox/files/find-touchscreen.sh
+++ b/meta/recipes-core/busybox/files/find-touchscreen.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
- ln -sf /dev/input/$MDEV /dev/input/touchscreen0
+if grep -q "input:.*-e0.*,3,.*a0,1,\|ads7846" /sys/class/$MDEV/device/modalias ; then
+ ln -sf /dev/$MDEV /dev/input/touchscreen0
fi
-if [ `egrep "ads7846" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
- ln -sf /dev/input/$MDEV /dev/input/touchscreen0
-fi
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev
index 4eba6190c7..96252477e0 100755
--- a/meta/recipes-core/busybox/files/mdev
+++ b/meta/recipes-core/busybox/files/mdev
@@ -2,6 +2,18 @@
mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
mkdir /dev/pts /dev/shm
+chmod 777 /dev/shm
mount -t devpts devpts /dev/pts
+touch /dev/mdev.seq
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
mdev -s
+
+#
+# We might have mounted something over /dev, see if /dev/initctl is there.
+#
+if test ! -p /dev/initctl
+then
+ rm -f /dev/initctl
+ mknod -m 600 /dev/initctl p
+fi
+
diff --git a/meta/recipes-core/busybox/files/mdev-mount.sh b/meta/recipes-core/busybox/files/mdev-mount.sh
new file mode 100644
index 0000000000..d5d66d66fb
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev-mount.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+MDEV_AUTOMOUNT=y
+MDEV_AUTOMOUNT_ROOT=/run/media
+[ -f /etc/default/mdev ] && . /etc/default/mdev
+if [ "${MDEV_AUTOMOUNT}" = "n" ] ; then
+ exit 0
+fi
+
+case "$ACTION" in
+ add|"")
+ ACTION="add"
+ # check if already mounted
+ if grep -q "^/dev/${MDEV} " /proc/mounts ; then
+ # Already mounted
+ exit 0
+ fi
+ DEVBASE=`expr substr $MDEV 1 3`
+ if [ "${DEVBASE}" == "mmc" ] ; then
+ DEVBASE=`expr substr $MDEV 1 7`
+ fi
+ # check for "please don't mount it" file
+ if [ -f "/dev/nomount.${DEVBASE}" ] ; then
+ # blocked
+ exit 0
+ fi
+ # check for full-disk partition
+ if [ "${DEVBASE}" == "${MDEV}" ] ; then
+ if [ -d /sys/block/${DEVBASE}/${DEVBASE}*1 ] ; then
+ # Partition detected, just quit
+ exit 0
+ fi
+ if [ ! -f /sys/block/${DEVBASE}/size ] ; then
+ # No size at all
+ exit 0
+ fi
+ if [ `cat /sys/block/${DEVBASE}/size` == 0 ] ; then
+ # empty device, bail out
+ exit 0
+ fi
+ fi
+ # first allow fstab to determine the mountpoint
+ if ! mount /dev/$MDEV > /dev/null 2>&1
+ then
+ MOUNTPOINT="${MDEV_AUTOMOUNT_ROOT}/$MDEV"
+ mkdir "$MOUNTPOINT"
+ mount -t auto /dev/$MDEV "$MOUNTPOINT"
+ fi
+ ;;
+ remove)
+ MOUNTPOINT=`grep "^/dev/$MDEV\s" /proc/mounts | cut -d' ' -f 2`
+ if [ ! -z "$MOUNTPOINT" ]
+ then
+ umount "$MOUNTPOINT"
+ rmdir "$MOUNTPOINT"
+ else
+ umount /dev/$MDEV
+ fi
+ ;;
+ *)
+ # Unexpected keyword
+ exit 1
+ ;;
+esac
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf
index e688911ff1..17e93da7c3 100644
--- a/meta/recipes-core/busybox/files/mdev.conf
+++ b/meta/recipes-core/busybox/files/mdev.conf
@@ -1,3 +1,5 @@
+$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"
+
console 0:0 0600
cpu_dma_latency 0:0 0660
fb0:0 44 0660
@@ -35,3 +37,6 @@ input/mice 0:0 0660
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].* 0:0 660 */etc/mdev/mdev-mount.sh
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 78ac4242a8..757e487b97 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -5,7 +5,6 @@
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
-[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
# return 0 if root is mounted on a network filesystem
@@ -17,8 +16,11 @@ root_is_nfs() {
have_bin_ip=0
if [ -x /sbin/ip ]; then
have_bin_ip=1
+ BROADCAST="broadcast +"
fi
+[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+
case "$1" in
deconfig)
if [ -x /sbin/resolvconf ]; then
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
index 2944d3d06c..89c4d12e9c 100644
--- a/meta/recipes-core/busybox/files/syslog
+++ b/meta/recipes-core/busybox/files/syslog
@@ -28,7 +28,7 @@ if [ -f /etc/syslog-startup.conf ]; then
if [ -n "$ROTATEGENS" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS"
fi
- LOCAL=0
+ LOG_LOCAL=1
elif [ "$D" = "remote" ]; then
SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE"
LOG_REMOTE=1
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch b/meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch
index 4757f52aa0..4757f52aa0 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/dummy_help2man.patch
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch b/meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch
index b7e82609bd..58b6a76130 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/fix-for-dummy-man-usage.patch
@@ -9,23 +9,23 @@ would appear when compiling.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- man/local.mk | 2 +-
+ man/local.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/local.mk b/man/local.mk
-index 7cef5e3..dc0865f 100644
+index ba8fbf7..3833458 100644
--- a/man/local.mk
+++ b/man/local.mk
-@@ -189,8 +189,8 @@ man/yes.1: src/yes
+@@ -101,8 +101,8 @@ man/dynamic-deps.mk: Makefile
&& $(run_help2man) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
-- --output=$$t/$$name.1 $$t/$$name \
+- --output=$$t/$$name.1 $$t/$$argv \
--info-page='coreutils \(aq'$$name' invocation\(aq' \
-+ --output=$$t/$$name.1 $$t/$$name \
++ --output=$$t/$$name.1 $$t/$$argv \
&& sed \
-e 's|$*\.td/||g' \
-e '/For complete documentation/d' \
--
-1.7.9.5
+1.9.1
diff --git a/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch
new file mode 100644
index 0000000000..9d1ae55d47
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch
@@ -0,0 +1,39 @@
+From a1d360509fa3a4aff57eedcd528cc0347a87531d Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 16 Sep 2014 01:59:08 -0700
+Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to
+ with_selinux
+
+Fixed when build with meta-selinux even when --without-selinux:
+runcon.c:49:28: fatal error: selinux/flask.h: No such file or directory
+ # include <selinux/flask.h>
+ ^
+compilation terminated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ m4/gnulib-comp.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
+index 472d3a0..5f09734 100644
+--- a/m4/gnulib-comp.m4
++++ b/m4/gnulib-comp.m4
+@@ -1730,11 +1730,11 @@ AC_DEFUN([gl_INIT],
+ AC_LIBOBJ([select])
+ fi
+ gl_SYS_SELECT_MODULE_INDICATOR([select])
+- AC_CHECK_HEADERS([selinux/flask.h])
+ AC_LIBOBJ([selinux-at])
+ gl_HEADERS_SELINUX_SELINUX_H
+ gl_HEADERS_SELINUX_CONTEXT_H
+ if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
++ AC_CHECK_HEADERS([selinux/flask.h])
+ AC_LIBOBJ([getfilecon])
+ fi
+ gl_SERVENT
+--
+1.7.9.5
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch
index 2ef8a548ac..2ef8a548ac 100644
--- a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch
+++ b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch
diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb b/meta/recipes-core/coreutils/coreutils_8.23.bb
index d5373ae9d6..e9d6494708 100644
--- a/meta/recipes-core/coreutils/coreutils_8.22.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.23.bb
@@ -16,10 +16,11 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
file://remove-usr-local-lib-from-m4.patch \
file://dummy_help2man.patch \
file://fix-for-dummy-man-usage.patch \
+ file://fix-selinux-flask.patch \
"
-SRC_URI[md5sum] = "8fb0ae2267aa6e728958adc38f8163a2"
-SRC_URI[sha256sum] = "5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212"
+SRC_URI[md5sum] = "abed135279f87ad6762ce57ff6d89c41"
+SRC_URI[sha256sum] = "ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d"
EXTRA_OECONF_class-native = "--without-gmp"
EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
@@ -73,6 +74,11 @@ do_install_append() {
mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
}
+do_install_append_class-native(){
+ # remove groups to fix conflict with shadow-native
+ rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+}
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
@@ -98,4 +104,4 @@ python __anonymous() {
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
}
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
deleted file mode 100644
index 40e3b12b5d..0000000000
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
---- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300
-+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200
-@@ -8,7 +8,7 @@
-
- AM_INIT_AUTOMAKE([1.9])
-
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- # Honor aclocal flags
- ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
index 6c60d9e408..abd013247c 100644
--- a/meta/recipes-core/dbus/dbus-glib.inc
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -13,7 +13,6 @@ 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 \
- file://obsolete_automake_macros.patch \
"
inherit autotools pkgconfig gettext
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
index fbb4967828..fbb4967828 100644
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
+++ b/meta/recipes-core/dbus/dbus-glib/no-examples.patch
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
index 2e8e178bb7..027c82b27e 100644
--- a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
+++ b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
@@ -3,26 +3,46 @@ Change Makefile.am to install regression tests for test package purpose.
Upstream-Status: Inappropriate [test not install is for purpose from upstream]
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/Makefile.am | 3 ++-
+ test/core/Makefile.am | 3 ++-
+ test/interfaces/Makefile.am | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/test/Makefile.am b/test/Makefile.am
-index 7ba11a8..249f0e7 100644
+index 379c8c3..6580927 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
-@@ -13,7 +13,8 @@ else
- TEST_BINARIES=
- endif
+@@ -48,7 +48,8 @@ TESTS = \
+ $(test_scripts) \
+ $(NULL)
--noinst_PROGRAMS= $(TEST_BINARIES)
+-noinst_PROGRAMS = \
+testdir = $(datadir)/@PACKAGE@/tests
-+test_PROGRAMS= $(TEST_BINARIES)
++test_PROGRAMS = \
+ $(test_programs) \
+ $(test_related_programs) \
+ $(NULL)
+diff --git a/test/core/Makefile.am b/test/core/Makefile.am
+index e4bceb4..54b077d 100644
+--- a/test/core/Makefile.am
++++ b/test/core/Makefile.am
+@@ -64,7 +64,8 @@ endif
- test_service_SOURCES= \
- test-service.c
+ ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
+ ## build even when not doing "make check"
+-noinst_PROGRAMS = \
++testdir = $(datadir)/@PACKAGE@/tests/core
++test_PROGRAMS = \
+ test-dbus-glib \
+ test-error-mapping \
+ test-service-glib \
diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
-index 3cb2c39..e6de67d 100644
+index a94d08d..707dcac 100644
--- a/test/interfaces/Makefile.am
+++ b/test/interfaces/Makefile.am
-@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
+@@ -57,7 +57,8 @@ if DBUS_BUILD_TESTS
## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
## build even when not doing "make check"
@@ -32,17 +52,6 @@ index 3cb2c39..e6de67d 100644
test_service_SOURCES = \
test-interfaces.c \
-diff --git a/test/core/Makefile.am b/test/core/Makefile.am
-index ef6cb26..9786c3a 100644
---- a/test/core/Makefile.am
-+++ b/test/core/Makefile.am
-@@ -46,7 +46,8 @@ endif
-
- ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
- ## build even when not doing "make check"
--noinst_PROGRAMS = \
-+testdir = $(datadir)/@PACKAGE@/tests/core
-+test_PROGRAMS = \
- test-dbus-glib \
- test-service-glib \
- $(THREAD_APPS) \
+--
+1.9.1
+
diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
deleted file mode 100644
index c1bb06a1b4..0000000000
--- a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require dbus-glib.inc
-
-
-SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
-SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.102.bb b/meta/recipes-core/dbus/dbus-glib_0.102.bb
new file mode 100644
index 0000000000..d798ebfac0
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.102.bb
@@ -0,0 +1,5 @@
+require dbus-glib.inc
+
+
+SRC_URI[md5sum] = "f76b8558fd575d0106c3a556eaa49184"
+SRC_URI[sha256sum] = "6964ed585bb8149a14ab744b5ded5e77cf71ec5446e6dcc5fcf5eebcc52df29c"
diff --git a/meta/recipes-core/dbus/dbus-test_1.8.2.bb b/meta/recipes-core/dbus/dbus-test_1.8.10.bb
index e19d2e9d1e..fb796fb692 100644
--- a/meta/recipes-core/dbus/dbus-test_1.8.2.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.8.10.bb
@@ -18,8 +18,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
"
-SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068"
-SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08"
+SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038"
+SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e"
S="${WORKDIR}/dbus-${PV}"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index d38ba7e1d2..fb5d017856 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
DEPENDS = "expat virtual/libintl"
RDEPENDS_dbus_class-native = ""
RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
ALLOW_EMPTY_dbus-ptest = "1"
RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
diff --git a/meta/recipes-core/dbus/dbus_1.8.10.bb b/meta/recipes-core/dbus/dbus_1.8.10.bb
new file mode 100644
index 0000000000..250ea21ddc
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.8.10.bb
@@ -0,0 +1,4 @@
+include dbus.inc
+
+SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038"
+SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e"
diff --git a/meta/recipes-core/dbus/dbus_1.8.2.bb b/meta/recipes-core/dbus/dbus_1.8.2.bb
deleted file mode 100644
index 37ebed2bd6..0000000000
--- a/meta/recipes-core/dbus/dbus_1.8.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include dbus.inc
-
-SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068"
-SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08"
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 9fec09e919..e187d04339 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -5,7 +5,7 @@ SECTION = "console/network"
# some files are from other projects and have others license terms:
# public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY
LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4d290ce0ac102c828dfc9ce836784688"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3a1b9604afd1648b28b0c6f1709e9f4"
DEPENDS = "zlib"
RPROVIDES_${PN} = "ssh sshd"
@@ -27,6 +27,13 @@ PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
file://0006-dropbear-configuration-file.patch \
file://dropbear"
+PAM_PLUGINS = "libpam-runtime \
+ pam-plugin-deny \
+ pam-plugin-permit \
+ pam-plugin-unix \
+ "
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
+
inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "dropbear"
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 71a4666b5c..dc9d5782e8 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
@@ -13,7 +13,7 @@ index 7d06322..71a21c2 100644
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
#ifndef XAUTH_COMMAND
--#define XAUTH_COMMAND "/usr/bin/X11/xauth -q"
+-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "xauth -q"
#endif
diff --git a/meta/recipes-core/dropbear/dropbear_2014.63.bb b/meta/recipes-core/dropbear/dropbear_2014.63.bb
deleted file mode 100644
index bb7e6178bc..0000000000
--- a/meta/recipes-core/dropbear/dropbear_2014.63.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require dropbear.inc
-
-SRC_URI[md5sum] = "7066bb9a2da708f3ed06314fdc9c47fd"
-SRC_URI[sha256sum] = "595992de432ba586a0e7e191bbb1ad587727678bb3e345b018c395b8c55b57ae"
diff --git a/meta/recipes-core/dropbear/dropbear_2014.66.bb b/meta/recipes-core/dropbear/dropbear_2014.66.bb
new file mode 100644
index 0000000000..8931eb75b2
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear_2014.66.bb
@@ -0,0 +1,4 @@
+require dropbear.inc
+
+SRC_URI[md5sum] = "c21a01111aa5015db038c6efdb85717d"
+SRC_URI[sha256sum] = "ab3fe2670a517cc0bbe398ff5d15e9ca12cd14f2fc18930a8111ae2baa64ab76"
diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb
deleted file mode 100644
index 1c13eb824a..0000000000
--- a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Cross locale generation tool for eglibc"
-HOMEPAGE = "http://www.eglibc.org/home"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc"
-LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://${LIC_DIR}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://${LIC_DIR}/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${P}:"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25243.tar.bz2 \
- file://fix_for_centos_5.8.patch;patchdir=.. \
- "
-SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd"
-SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c"
-
-S = "${WORKDIR}/eglibc-${PV}/localedef"
-
-do_unpack_append() {
- bb.build.exec_func('do_move_ports', d)
-}
-
-do_move_ports() {
- if test -d ${WORKDIR}/eglibc-${PV}/ports ; then
- rm -rf ${WORKDIR}/libc/ports
- mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/
- fi
-}
-
-EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc"
-CFLAGS += "-DNOT_IN_libc=1"
-
-do_configure () {
- ${S}/configure ${EXTRA_OECONF}
-}
-
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch
deleted file mode 100644
index 4559a110fb..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch
+++ /dev/null
@@ -1,912 +0,0 @@
-Pulled from
-http://www.eglibc.org/archives/patches/msg01042.html
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-Hi,
-
-This patch adds 'make menuconfig' support to EGLIBC.
-
-
-EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files.
-
-There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile:
-
-- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config.
-
-- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
-
-- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
-
-
-Pre-Processing:
-
-
-The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'.
-
-Post-Processing (libc/options-config/config-postproc.pl):
-
-
-- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header.
-
-- "CONFIG_" prefix is changed back to "OPTION_".
-
-
-- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'.
-
-
-A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds.
-
-libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'.
-
-libc/EGLIBC.option-groups is updated to include new information on the menuconfig support.
-
-Thanks,
-
-attached is the updated patch to address above issues.
-
-Steve
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
-Index: libc/EGLIBC.cross-building
-===================================================================
---- libc.orig/EGLIBC.cross-building
-+++ libc/EGLIBC.cross-building
-@@ -243,9 +243,29 @@ full EGLIBC build:
- > $src/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
-+ > --with-kconfig=$obj/linux/scripts/kconfig \
- > --build=$build \
- > --host=$target \
- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+
-+Note the additional '--with-kconfig' option. This tells EGLIBC where to
-+find the host config tools used by the kernel 'make config' and 'make
-+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
-+*config' support, which will create 'option-groups.config' for you.
-+But first make sure those tools have been built by running some
-+dummy 'make *config' calls in the kernel directory:
-+
-+ $ cd $obj/linux
-+ $ PATH=$tools/bin:$PATH make config \
-+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
-+ $ PATH=$tools/bin:$PATH make menuconfig \
-+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
-+
-+Now we can configure and build the full EGLIBC:
-+
-+ $ cd $obj/eglibc
-+ $ PATH=$tools/bin:$PATH make defconfig
-+ $ PATH=$tools/bin:$PATH make menuconfig
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install install_root=$sysroot
-
-Index: libc/configure.ac
-===================================================================
---- libc.orig/configure.ac
-+++ libc/configure.ac
-@@ -127,6 +127,16 @@ AC_ARG_WITH([headers],
- [sysheaders=''])
- AC_SUBST(sysheaders)
-
-+AC_ARG_WITH([kconfig],
-+ AC_HELP_STRING([--with-kconfig=PATH],
-+ [location of kconfig tools to use (from Linux
-+ kernel builds) to re-use for configuring EGLIBC
-+ option groups]),
-+ [KCONFIG_TOOLS=$withval],
-+ [KCONFIG_TOOLS=''])
-+AC_SUBST(KCONFIG_TOOLS)
-+
-+
- AC_SUBST(use_default_link)
- AC_ARG_WITH([default-link],
- AC_HELP_STRING([--with-default-link],
-Index: libc/config.make.in
-===================================================================
---- libc.orig/config.make.in
-+++ libc/config.make.in
-@@ -45,6 +45,8 @@ sysincludes = @SYSINCLUDES@
- c++-sysincludes = @CXX_SYSINCLUDES@
- all-warnings = @all_warnings@
-
-+kconfig_tools = @KCONFIG_TOOLS@
-+
- have-z-combreloc = @libc_cv_z_combreloc@
- have-z-execstack = @libc_cv_z_execstack@
- have-Bgroup = @libc_cv_Bgroup@
-Index: libc/options-config/config-postproc.pl
-===================================================================
---- /dev/null
-+++ libc/options-config/config-postproc.pl
-@@ -0,0 +1,54 @@
-+#!/usr/bin/perl
-+
-+$usage = "usage: $0 <default config file> <config file>\n";
-+
-+die "$usage" unless @ARGV;
-+$defaults = shift @ARGV;
-+die "$usage" unless @ARGV;
-+die "Could not open $ARGV[0]" unless -T $ARGV[0];
-+
-+sub yank {
-+ @option = grep($_ ne $_[0], @option);
-+}
-+
-+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
-+
-+# get the full list of available options using the default config file
-+$i = 0;
-+while (<DEFAULTS>) {
-+ if (/^\s*OPTION_(\w+)\s*=/) {
-+ $option[$i++] = $1;
-+ }
-+}
-+
-+# now go through the config file, making the necessary changes
-+while (<>) {
-+ if (/Linux Kernel Configuration/) {
-+ # change title
-+ s/Linux Kernel/Option Groups/;
-+ print;
-+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
-+ # this is an explicit option set line, change CONFIG_ to OPTION_
-+ # before printing and remove this option from option list
-+ $opt = $1;
-+ yank($opt);
-+ s/CONFIG_/OPTION_/g;
-+ print;
-+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
-+ # this is a comment line, change CONFIG_ to OPTION_, remove this
-+ # option from option list, and convert to explicit OPTION_FOO=n
-+ $opt = $1;
-+ yank($opt);
-+ s/CONFIG_/OPTION_/g;
-+ print "OPTION_$opt=n\n";
-+ } else {
-+ print;
-+ }
-+}
-+
-+# any options left in @options, are options that were not mentioned in
-+# the config file, and implicitly that means the option must be set =n,
-+# so do that here.
-+foreach $opt (@option) {
-+ print "OPTION_$opt=n\n";
-+}
-Index: libc/options-config/config-preproc.pl
-===================================================================
---- /dev/null
-+++ libc/options-config/config-preproc.pl
-@@ -0,0 +1,8 @@
-+#!/usr/bin/perl
-+
-+if (@ARGV) {
-+ while (<>) {
-+ s/OPTION_/CONFIG_/g;
-+ print;
-+ }
-+}
-Index: libc/options-config/Makefile
-===================================================================
---- /dev/null
-+++ libc/options-config/Makefile
-@@ -0,0 +1,55 @@
-+# ===========================================================================
-+# EGLIBC option-groups configuration targets
-+# These targets are included from top-level makefile
-+
-+ifneq ($(kconfig_tools),)
-+ifneq (no,$(PERL))
-+
-+ocdir := options-config
-+
-+OconfigDefaults := option-groups.defaults
-+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
-+OconfigDef := option-groups.def
-+Oconfig := $(common-objpfx)option-groups.config
-+Oconfig_tmp := $(common-objpfx).tmp.config
-+
-+conf := $(kconfig_tools)/conf
-+mconf := $(kconfig_tools)/mconf
-+
-+preproc := $(PERL) $(ocdir)/config-preproc.pl
-+postproc := $(PERL) $(ocdir)/config-postproc.pl
-+
-+PHONY += defconfig config menuconfig
-+
-+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(OconfigDefaults_tmp)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
-+ $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+ rm $(OconfigDefaults_tmp)
-+
-+config: $(conf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+
-+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
-+ rm -f $(Oconfig_tmp)
-+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
-+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+ rm $(Oconfig_tmp)
-+
-+# Help text used by make help
-+help:
-+ @echo ' defconfig - New config with default from default config'
-+ @echo ' config - Update current config utilising a line-oriented program'
-+ @echo ' menuconfig - Update current config utilising a menu based program'
-+
-+endif
-+endif
-Index: libc/option-groups.def
-===================================================================
---- libc.orig/option-groups.def
-+++ libc/option-groups.def
-@@ -4,19 +4,19 @@
- #
- # An entry of the form:
- #
--# config OPTION_GROUP_NAME
-+# config GROUP_NAME
- # bool "one-line explanation of what this option group controls"
- # help
- # Multi-line help explaining the option group's meaning in
- # some detail, terminated by indentation level.
- #
--# defines an option group whose variable is OPTION_GROUP_NAME, with
-+# defines an option group whose variable is GROUP_NAME, with
- # meaningful values 'y' (enabled) and 'n' (disabled). The
- # documentation is formatted to be consumed by some sort of
- # interactive configuration interface, but EGLIBC doesn't have such an
- # interface yet.
- #
--# An option may have a 'depends' line, indicating which other options
-+# An option may have a 'depends on' line, indicating which other options
- # must also be enabled if this option is. At present, EGLIBC doesn't
- # check that these dependencies are satisfied.
- #
-@@ -41,9 +41,9 @@
- # although this simply reestablishes the value already set by
- # 'option-groups.defaults'.
-
--config OPTION_EGLIBC_ADVANCED_INET6
-+config EGLIBC_ADVANCED_INET6
- bool "IPv6 Advanced Sockets API support (RFC3542)"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes the functions specified by RFC 3542,
- "Advanced Sockets Application Program Interface (API) for
-@@ -71,7 +71,7 @@ config OPTION_EGLIBC_ADVANCED_INET6
- inet6_rth_segments
- inet6_rth_space
-
--config OPTION_EGLIBC_BACKTRACE
-+config EGLIBC_BACKTRACE
- bool "Functions for producing backtraces"
- help
- This option group includes functions for producing a list of
-@@ -85,7 +85,7 @@ config OPTION_EGLIBC_BACKTRACE
- backtrace_symbols
- backtrace_symbols_fd
-
--config OPTION_EGLIBC_BIG_MACROS
-+config EGLIBC_BIG_MACROS
- bool "Use extensive inline code"
- help
- This option group specifies whether certain pieces of code
-@@ -93,7 +93,7 @@ config OPTION_EGLIBC_BIG_MACROS
- group is not selected, function calls will be used instead,
- hence reducing the library footprint.
-
--config OPTION_EGLIBC_BSD
-+config EGLIBC_BSD
- bool "BSD-specific functions, and their compatibility stubs"
- help
- This option group includes functions specific to BSD kernels.
-@@ -109,10 +109,9 @@ config OPTION_EGLIBC_BSD
- revoke
- setlogin
-
--config OPTION_EGLIBC_CXX_TESTS
-+config EGLIBC_CXX_TESTS
- bool "Tests that link against the standard C++ library."
-- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-- depends OPTION_EGLIBC_LIBM
-+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
- help
- This option group does not include any C library functions;
- instead, it controls which EGLIBC tests an ordinary 'make
-@@ -121,23 +120,22 @@ config OPTION_EGLIBC_CXX_TESTS
- run.
-
- The standard C++ library depends on the math library 'libm' and
-- the wide character I/O functions included in EGLIBC. If those
-- option groups are disabled, this test must also be disabled.
-+ the wide character I/O functions included in EGLIBC. So those
-+ option groups must be enabled if this test is enabled.
-
--config OPTION_EGLIBC_CATGETS
-+config EGLIBC_CATGETS
- bool "Functions for accessing message catalogs"
-- depends OPTION_EGLIBC_LOCALE_CODE
-+ depends on EGLIBC_LOCALE_CODE
- help
- This option group includes functions for accessing message
- catalogs: catopen, catclose, and catgets.
-
-- This option group depends on the OPTION_EGLIBC_LOCALE_CODE
-- option group; if you disable that, you must also disable this.
-+ This option group depends on the EGLIBC_LOCALE_CODE
-+ option group.
-
--config OPTION_EGLIBC_CHARSETS
-+config EGLIBC_CHARSETS
- bool "iconv/gconv character set conversion libraries"
- help
--
- This option group includes support for character sets other
- than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
- various encodings. This affects both the character sets
-@@ -198,16 +196,16 @@ config OPTION_EGLIBC_CHARSETS
- WCHAR_T - EGLIBC's internal form (target-endian,
- 32-bit ISO 10646)
-
--config OPTION_EGLIBC_CRYPT
-+config EGLIBC_CRYPT
- bool "Encryption library"
- help
- This option group includes the `libcrypt' library which
- provides functions for one-way encryption. Supported
- encryption algorithms include MD5, SHA-256, SHA-512 and DES.
-
--config OPTION_EGLIBC_CRYPT_UFC
-+config EGLIBC_CRYPT_UFC
- bool "Ultra fast `crypt' implementation"
-- depends OPTION_EGLIBC_CRYPT
-+ depends on EGLIBC_CRYPT
- help
- This option group provides ultra fast DES-based implementation of
- the `crypt' function. When this option group is disabled,
-@@ -216,7 +214,7 @@ config OPTION_EGLIBC_CRYPT_UFC
- errno to ENOSYS if /salt/ passed does not correspond to either MD5,
- SHA-256 or SHA-512 algorithm.
-
--config OPTION_EGLIBC_DB_ALIASES
-+config EGLIBC_DB_ALIASES
- bool "Functions for accessing the mail aliases database"
- help
- This option group includues functions for looking up mail
-@@ -233,7 +231,7 @@ config OPTION_EGLIBC_DB_ALIASES
- When this option group is disabled, the NSS service libraries
- also lack support for querying their mail alias tables.
-
--config OPTION_EGLIBC_ENVZ
-+config EGLIBC_ENVZ
- bool "Functions for handling envz-style environment vectors."
- help
- This option group contains functions for creating and operating
-@@ -248,7 +246,7 @@ config OPTION_EGLIBC_ENVZ
- envz_entry envz_remove
- envz_get envz_strip
-
--config OPTION_EGLIBC_FCVT
-+config EGLIBC_FCVT
- bool "Functions for converting floating-point numbers to strings"
- help
- This option group includes functions for converting
-@@ -262,14 +260,14 @@ config OPTION_EGLIBC_FCVT
- fcvt_r qfcvt_r
- gcvt qgcvt
-
--config OPTION_EGLIBC_FMTMSG
-+config EGLIBC_FMTMSG
- bool "Functions for formatting messages"
- help
- This option group includes the following functions:
-
- addseverity fmtmsg
-
--config OPTION_EGLIBC_FSTAB
-+config EGLIBC_FSTAB
- bool "Access functions for 'fstab'"
- help
- This option group includes functions for reading the mount
-@@ -283,7 +281,7 @@ config OPTION_EGLIBC_FSTAB
- getfsent setfsent
- getfsfile
-
--config OPTION_EGLIBC_FTRAVERSE
-+config EGLIBC_FTRAVERSE
- bool "Functions for traversing file hierarchies"
- help
- This option group includes functions for traversing file
-@@ -297,9 +295,9 @@ config OPTION_EGLIBC_FTRAVERSE
- fts_set nftw64
- fts_close
-
--config OPTION_EGLIBC_GETLOGIN
-+config EGLIBC_GETLOGIN
- bool "The getlogin function"
-- depends OPTION_EGLIBC_UTMP
-+ depends on EGLIBC_UTMP
- help
- This function group includes the 'getlogin' and 'getlogin_r'
- functions, which return the user name associated by the login
-@@ -309,17 +307,17 @@ config OPTION_EGLIBC_GETLOGIN
- fall back on 'getlogin' to find the user's login name for tilde
- expansion when the 'HOME' environment variable is not set.
-
--config OPTION_EGLIBC_IDN
-+config EGLIBC_IDN
- bool "International domain names support"
- help
- This option group includes the `libcidn' library which
- provides support for international domain names.
-
--config OPTION_EGLIBC_INET
-+config EGLIBC_INET
- bool "Networking support"
- help
- This option group includes networking-specific functions and
-- data. With OPTION_EGLIBC_INET disabled, the EGLIBC
-+ data. With EGLIBC_INET disabled, the EGLIBC
- installation and API changes as follows:
-
- - The following libraries are not installed:
-@@ -439,14 +437,14 @@ config OPTION_EGLIBC_INET
- use Unix-domain sockets to communicate with the syslog daemon;
- syslog is valuable in non-networked contexts.
-
--config OPTION_EGLIBC_INET_ANL
-+config EGLIBC_INET_ANL
- bool "Asynchronous name lookup"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes the `libanl' library which
- provides support for asynchronous name lookup.
-
--config OPTION_EGLIBC_LIBM
-+config EGLIBC_LIBM
- bool "libm (math library)"
- help
- This option group includes the 'libm' library, containing
-@@ -464,7 +462,7 @@ config OPTION_EGLIBC_LIBM
- group, you will not be able to build 'libstdc++' against the
- resulting EGLIBC installation.
-
--config OPTION_EGLIBC_LOCALES
-+config EGLIBC_LOCALES
- bool "Locale definitions"
- help
- This option group includes all locale definitions other than
-@@ -472,17 +470,17 @@ config OPTION_EGLIBC_LOCALES
- only the "C" locale is supported.
-
-
--config OPTION_EGLIBC_LOCALE_CODE
-+config EGLIBC_LOCALE_CODE
- bool "Locale functions"
-- depends OPTION_POSIX_C_LANG_WIDE_CHAR
-+ depends on POSIX_C_LANG_WIDE_CHAR
- help
- This option group includes locale support functions, programs,
-- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled,
-+ and libraries. With EGLIBC_LOCALE_CODE disabled,
- EGLIBC supports only the 'C' locale (also known as 'POSIX'),
- and ignores the settings of the 'LANG' and 'LC_*' environment
- variables.
-
-- With OPTION_EGLIBC_LOCALE_CODE disabled, the following
-+ With EGLIBC_LOCALE_CODE disabled, the following
- functions are omitted from libc:
-
- duplocale localeconv nl_langinfo rpmatch strfmon_l
-@@ -491,46 +489,43 @@ config OPTION_EGLIBC_LOCALE_CODE
- Furthermore, only the LC_CTYPE and LC_TIME categories of the
- standard "C" locale are available.
-
-- The OPTION_EGLIBC_CATGETS option group depends on this option
-- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
-- disable OPTION_EGLIBC_CATGETS.
-+ The EGLIBC_CATGETS option group depends on this option group.
-+
-
--config OPTION_EGLIBC_MEMUSAGE
-+config EGLIBC_MEMUSAGE
- bool "Memory profiling library"
- help
- This option group includes the `libmemusage' library and
- the `memusage' and `memusagestat' utilities.
- These components provide memory profiling functions.
-
-- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-
- Libmemusage library buffers the profiling data in memory
- before writing it out to disk. By default, the library
- allocates 1.5M buffer, which can be substantial for some
-- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
-+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
- allows to change the default buffer size. It specifies
- the number of entries the buffer should have.
- On most architectures one buffer entry amounts to 48 bytes,
- so setting this option to the value of 512 will reduce the size of
- the memory buffer to 24K.
-
--config OPTION_EGLIBC_NIS
-+config EGLIBC_NIS
- bool "Support for NIS, NIS+, and the special 'compat' services."
-- depends OPTION_EGLIBC_INET
-- depends OPTION_EGLIBC_SUNRPC
-+ depends on EGLIBC_INET && EGLIBC_SUNRPC
- help
- This option group includes the NIS, NIS+, and 'compat' Name
- Service Switch service libraries. When it is disabled, those
- services libraries are not installed; you should remove any
- references to them from your 'nsswitch.conf' file.
-
-- This option group depends on the OPTION_EGLIBC_INET option
-+ This option group depends on the EGLIBC_INET option
- group; you must enable that to enable this option group.
-
--config OPTION_EGLIBC_NSSWITCH
-+config EGLIBC_NSSWITCH
- bool "Name service switch (nsswitch) support"
- help
--
- This option group includes support for the 'nsswitch' facility.
- With this option group enabled, all EGLIBC functions for
- accessing various system databases (passwords and groups;
-@@ -544,12 +539,12 @@ config OPTION_EGLIBC_NSSWITCH
- 'option-groups.config' file must set the following two
- variables:
-
-- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
-+ EGLIBC_NSSWITCH_FIXED_CONFIG
-
- Set this to the name of a file whose contents observe the
- same syntax as an ordinary '/etc/nsswitch.conf' file. The
- EGLIBC build process parses this file just as EGLIBC would
-- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and
-+ at run time if EGLIBC_NSSWITCH were enabled, and
- produces a C library that uses the nsswitch service
- libraries to search for database entries as this file
- specifies, instead of consulting '/etc/nsswitch.conf' at run
-@@ -567,7 +562,7 @@ config OPTION_EGLIBC_NSSWITCH
- you will probably want to delete references to databases not
- needed on your system.
-
-- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-
- The EGLIBC build process uses this file to decide which
- functions to make available from which service libraries.
-@@ -585,28 +580,28 @@ config OPTION_EGLIBC_NSSWITCH
- Be sure to mention each function in each service you wish to
- use. If you do not mention a service's function here, the
- EGLIBC database access functions will not find it, even if
-- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
-+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
- file.
-
-- In this arrangement, EGLIBC will not use the 'dlopen' and
-- 'dlsym' functions to find database access functions. Instead,
-- libc hard-codes references to the service libraries' database
-- access functions. You must explicitly link your program
-- against the name service libraries (those whose names start
-- with 'libnss_', in the sysroot's '/lib' directory) whose
-- functions you intend to use. This arrangement helps
-- system-wide static analysis tools decide which functions a
-- system actually uses.
--
-- Note that some nsswitch service libraries require other option
-- groups to be enabled; for example, the OPTION_EGLIBC_INET
-- option group must be enabled to use the 'libnss_dns.so.2'
-- service library, which uses the Domain Name System network
-- protocol to answer queries.
-+ In this arrangement, EGLIBC will not use the 'dlopen' and
-+ 'dlsym' functions to find database access functions. Instead,
-+ libc hard-codes references to the service libraries' database
-+ access functions. You must explicitly link your program
-+ against the name service libraries (those whose names start
-+ with 'libnss_', in the sysroot's '/lib' directory) whose
-+ functions you intend to use. This arrangement helps
-+ system-wide static analysis tools decide which functions a
-+ system actually uses.
-+
-+ Note that some nsswitch service libraries require other option
-+ groups to be enabled; for example, the EGLIBC_INET
-+ option group must be enabled to use the 'libnss_dns.so.2'
-+ service library, which uses the Domain Name System network
-+ protocol to answer queries.
-
--config OPTION_EGLIBC_RCMD
-+config EGLIBC_RCMD
- bool "Support for 'rcmd' and related library functions"
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes functions for running commands on
- remote machines via the 'rsh' protocol, and doing authentication
-@@ -622,7 +617,7 @@ config OPTION_EGLIBC_RCMD
- rresvport ruserpass
- rresvport_af
-
--config OPTION_EGLIBC_RTLD_DEBUG
-+config EGLIBC_RTLD_DEBUG
- bool "Runtime linker debug print outs"
- help
- This option group enables debug output of the runtime linker
-@@ -633,7 +628,7 @@ config OPTION_EGLIBC_RTLD_DEBUG
- the `ldd' utility which may also be used by the prelinker.
- In particular, the `--unused' ldd option will not work correctly.
-
--config OPTION_EGLIBC_SPAWN
-+config EGLIBC_SPAWN
- bool "Support for POSIX posix_spawn functions"
- help
- This option group includes the POSIX functions for executing
-@@ -669,7 +664,7 @@ config OPTION_EGLIBC_SPAWN
- disabled, those programs will only operate on uncompressed
- charmap files.
-
--config OPTION_EGLIBC_STREAMS
-+config EGLIBC_STREAMS
- bool "Support for accessing STREAMS."
- help
- This option group includes functions for reading and writing
-@@ -685,14 +680,14 @@ config OPTION_EGLIBC_STREAMS
- isastream fdetach
- putmsg
-
--config OPTION_EGLIBC_SUNRPC
-+config EGLIBC_SUNRPC
- bool "Support for the Sun 'RPC' protocol."
-- depends OPTION_EGLIBC_INET
-+ depends on EGLIBC_INET
- help
- This option group includes support for the Sun RPC protocols,
- including the 'rpcgen' and 'rpcinfo' programs.
-
--config OPTION_EGLIBC_UTMP
-+config EGLIBC_UTMP
- bool "Older access functions for 'utmp' login records"
- help
- This option group includes the older 'utent' family of
-@@ -719,9 +714,9 @@ config OPTION_EGLIBC_UTMP
-
- libutil.so (and libutil.a)
-
--config OPTION_EGLIBC_UTMPX
-+config EGLIBC_UTMPX
- bool "POSIX access functions for 'utmp' login records"
-- depends OPTION_EGLIBC_UTMP
-+ depends on EGLIBC_UTMP
- help
- This option group includes the POSIX functions for reading and
- writing user login records in the 'utmp' file (usually
-@@ -742,21 +737,21 @@ config OPTION_EGLIBC_UTMPX
- updwtmpx
- utmpxname
-
--config OPTION_EGLIBC_WORDEXP
-+config EGLIBC_WORDEXP
- bool "Shell-style word expansion"
- help
- This option group includes the 'wordexp' function for
- performing word expansion in the manner of the shell, and the
- accompanying 'wordfree' function.
-
--config OPTION_POSIX_C_LANG_WIDE_CHAR
-+config POSIX_C_LANG_WIDE_CHAR
- bool "ISO C library wide character functions, excluding I/O"
- help
- This option group includes the functions defined by the ISO C
- standard for working with wide and multibyte characters in
- memory. Functions for reading and writing wide and multibyte
- characters from and to files call in the
-- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group.
-+ POSIX_WIDE_CHAR_DEVICE_IO option group.
-
- This option group includes the following functions:
-
-@@ -778,14 +773,14 @@ config OPTION_POSIX_C_LANG_WIDE_CHAR
- mbrlen wcscoll wcstol
- mbrtowc wcscpy wcstold
-
--config OPTION_POSIX_REGEXP
-+config POSIX_REGEXP
- bool "Regular expressions"
- help
- This option group includes the POSIX regular expression
- functions, and the associated non-POSIX extensions and
- compatibility functions.
-
-- With OPTION_POSIX_REGEXP disabled, the following functions are
-+ With POSIX_REGEXP disabled, the following functions are
- omitted from libc:
-
- re_comp re_max_failures regcomp
-@@ -799,9 +794,9 @@ config OPTION_POSIX_REGEXP
- <regexp.h> header file, 'compile', 'step', and 'advance', is
- omitted.
-
--config OPTION_POSIX_REGEXP_GLIBC
-+config POSIX_REGEXP_GLIBC
- bool "Regular expressions from GLIBC"
-- depends OPTION_POSIX_REGEXP
-+ depends on POSIX_REGEXP
- help
- This option group specifies which regular expression
- library to use. The choice is between regex
-@@ -810,9 +805,9 @@ config OPTION_POSIX_REGEXP_GLIBC
- optimized for speed; regex from libiberty is more than twice
- as small while still is enough for most practical purposes.
-
--config OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+config POSIX_WIDE_CHAR_DEVICE_IO
- bool "Input and output functions for wide characters"
-- depends OPTION_POSIX_C_LANG_WIDE_CHAR
-+ depends on POSIX_C_LANG_WIDE_CHAR
- help
- This option group includes functions for reading and writing
- wide characters to and from <stdio.h> streams.
-Index: libc/Makefile
-===================================================================
---- libc.orig/Makefile
-+++ libc/Makefile
-@@ -24,6 +24,7 @@ endif
-
- include Makeconfig
-
-+include options-config/Makefile
-
- # This is the default target; it makes everything except the tests.
- .PHONY: all
-Index: libc/configure
-===================================================================
---- libc.orig/configure
-+++ libc/configure
-@@ -621,6 +621,7 @@ KSH
- libc_cv_have_bash2
- BASH_SHELL
- libc_cv_gcc_static_libgcc
-+KCONFIG_TOOLS
- CXX_SYSINCLUDES
- SYSINCLUDES
- AUTOCONF
-@@ -734,6 +735,7 @@ with_fp
- with_binutils
- with_selinux
- with_headers
-+with_kconfig
- with_default_link
- enable_sanity_checks
- enable_shared
-@@ -1438,6 +1440,9 @@ Optional Packages:
- --with-selinux if building with SELinux support
- --with-headers=PATH location of system headers to use (for example
- /usr/src/linux/include) [default=compiler default]
-+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
-+ builds) to re-use for configuring EGLIBC option
-+ groups
- --with-default-link do not use explicit linker scripts
- --with-cpu=CPU select code for CPU variant
-
-@@ -3401,6 +3406,14 @@ fi
-
-
-
-+# Check whether --with-kconfig was given.
-+if test "${with_kconfig+set}" = set; then
-+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
-+else
-+ KCONFIG_TOOLS=''
-+fi
-+
-+
-
- # Check whether --with-default-link was given.
- if test "${with_default_link+set}" = set; then :
-Index: libc/EGLIBC.option-groups
-===================================================================
---- libc.orig/EGLIBC.option-groups
-+++ libc/EGLIBC.option-groups
-@@ -56,33 +56,9 @@ disable option groups one by one, until
-
- The Option Groups
-
--EGLIBC currently implements the following option groups, also
--documented in the file 'option-groups.def':
--
--OPTION_EGLIBC_CATGETS
-- This option group includes functions for accessing message
-- catalogs: catopen, catclose, and catgets.
--
--OPTION_EGLIBC_LOCALES
-- This option group includes all locale definitions other than
-- those for the "C" locale. If this option group is omitted, then
-- only the "C" locale is supported.
--
--OPTION_EGLIBC_LIBM
-- This option group includes the 'libm' library, containing
-- mathematical functions. If this option group is omitted, then
-- an EGLIBC installation does not include shared or unshared versions
-- of the math library.
--
-- Note that this does not remove all floating-point related
-- functionality from EGLIBC; for example, 'printf' and 'scanf'
-- can still print and read floating-point values with this option
-- group disabled.
--
-- Note that the ISO Standard C++ library 'libstdc++' depends on
-- EGLIBC's math library 'libm'. If you disable this option
-- group, you will not be able to build 'libstdc++' against the
-- resulting EGLIBC installation.
-+To see the current full list of implemented option groups, refer to the
-+file 'option-groups.def' at the top of the source tree, or run
-+'make menuconfig' from the top-level build directory.
-
- The POSIX.1-2001 specification includes a suggested partition of all
- the functions in the POSIX C API into option groups: math functions
-@@ -110,6 +86,18 @@ data, but include mathematical functions
- OPTION_EGLIBC_LOCALES = n
- OPTION_EGLIBC_LIBM = y
-
-+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
-+targets to make it easier to create 'option-groups.config', with all
-+dependencies between option groups automatically satisfied. Run
-+'make help' to see the list of supported make config targets. For
-+example, 'make menuconfig' will update the current config utilising a
-+menu based program.
-+
-+The option group names and their type (boolean, int, hex, string), help
-+description, and dependencies with other option groups, are described by
-+'option-groups.def' at the top of the source tree, analogous to the
-+'Kconfig' files in the Linux kernel.
-+
- In general, each option group variable controls whether a given set of
- object files in EGLIBC is compiled and included in the final
- libraries, or omitted from the build.
-@@ -132,22 +120,3 @@ under development.
-
- We have used the system to subset some portions of EGLIBC's
- functionality. It needs to be extended to cover more of the library.
--
--At the moment, EGLIBC performs no sanity checks on the contents of
--'option-groups.config'; if an option group's name is mistyped, the
--option group is silently included in the build. EGLIBC should check
--that all variables set in 'option-groups.config' are proper option
--group names, and that their values are appropriate.
--
--Some portions of EGLIBC depend on others; for example, the Sun Remote
--Procedure Call functions in 'sunrpc' depend on the networking
--functions in 'inet'. The sanity checking described above should check
--that the selection configuration satisfies dependencies within EGLIBC,
--and produce a legible error message if it does not. At the moment,
--inconsistent configurations produce link errors late in the build
--process.
--
--The Linux kernel's configuration system provides interactive
--interfaces for creating and modifying configuration files (which also
--perform the sanity checking and dependency tracking described above).
--EGLIBC should provide similar interfaces.
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch
deleted file mode 100644
index 7caba48112..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0002-eglibc-menuconfig-hex-string-options.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-pulled from
-
-http://www.eglibc.org/archives/patches/msg01043.html
-
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-
-This patch builds on the menuconfig patch for EGLIBC.
-
-
-There are a few options that have non-boolean types, that would benefit from the new 'make *config' support:
-
-EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int)
-EGLIBC_NSSWITCH_FIXED_CONFIG (string)
-EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string)
-
-
-The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file.
-
-In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n.
-
-Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header.
-
-attached is the updated patch to address above issues.
-
-Steve
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
-Index: libc/malloc/Makefile
-===================================================================
---- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800
-+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700
-@@ -48,10 +48,6 @@
- ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
- extra-libs = libmemusage
- extra-libs-others = $(extra-libs)
--
--ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
--CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
--endif
- endif
-
- libmemusage-routines = memusage
-Index: libc/option-groups.def
-===================================================================
---- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700
-+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700
-@@ -513,8 +513,11 @@
- the `memusage' and `memusagestat' utilities.
- These components provide memory profiling functions.
-
-- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
--
-+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+ int "Memory profiling library buffer size"
-+ depends on EGLIBC_MEMUSAGE
-+ default "32768"
-+ help
- Libmemusage library buffers the profiling data in memory
- before writing it out to disk. By default, the library
- allocates 1.5M buffer, which can be substantial for some
-@@ -553,8 +556,11 @@
- 'option-groups.config' file must set the following two
- variables:
-
-- EGLIBC_NSSWITCH_FIXED_CONFIG
--
-+config EGLIBC_NSSWITCH_FIXED_CONFIG
-+ string "Nsswitch fixed config filename"
-+ depends on !EGLIBC_NSSWITCH
-+ default ""
-+ help
- Set this to the name of a file whose contents observe the
- same syntax as an ordinary '/etc/nsswitch.conf' file. The
- EGLIBC build process parses this file just as EGLIBC would
-@@ -576,8 +582,11 @@
- you will probably want to delete references to databases not
- needed on your system.
-
-- EGLIBC_NSSWITCH_FIXED_FUNCTIONS
--
-+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+ string "Nsswitch fixed functions filename"
-+ depends on !EGLIBC_NSSWITCH
-+ default ""
-+ help
- The EGLIBC build process uses this file to decide which
- functions to make available from which service libraries.
- The file 'nss/fixed-nsswitch.functions' serves as a sample
-Index: libc/options-config/config-postproc.pl
-===================================================================
---- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700
-+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700
-@@ -8,7 +8,7 @@
- die "Could not open $ARGV[0]" unless -T $ARGV[0];
-
- sub yank {
-- @option = grep($_ ne $_[0], @option);
-+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
- }
-
- open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
-@@ -16,7 +16,7 @@
- # get the full list of available options using the default config file
- $i = 0;
- while (<DEFAULTS>) {
-- if (/^\s*OPTION_(\w+)\s*=/) {
-+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
- $option[$i++] = $1;
- }
- }
-@@ -35,8 +35,9 @@
- s/CONFIG_/OPTION_/g;
- print;
- } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
-- # this is a comment line, change CONFIG_ to OPTION_, remove this
-- # option from option list, and convert to explicit OPTION_FOO=n
-+ # this is a comment line for an unset boolean option, change CONFIG_
-+ # to OPTION_, remove this option from option list, and convert to
-+ # explicit OPTION_FOO=n
- $opt = $1;
- yank($opt);
- s/CONFIG_/OPTION_/g;
-@@ -46,9 +47,12 @@
- }
- }
-
--# any options left in @options, are options that were not mentioned in
-+# any boolean options left in @options, are options that were not mentioned in
- # the config file, and implicitly that means the option must be set =n,
- # so do that here.
- foreach $opt (@option) {
-- print "OPTION_$opt=n\n";
-+ if ($opt =~ /=\s*[yn]/) {
-+ $opt =~ s/=\s*[yn]/=n/;
-+ print "OPTION_$opt\n";
-+ }
- }
-Index: libc/scripts/option-groups.awk
-===================================================================
---- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800
-+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700
-@@ -46,9 +46,15 @@
- print "#define __" var " 1"
- else if (vars[var] == "n")
- print "/* #undef __" var " */"
-- # Ignore variables that don't have boolean values.
-- # Ideally, this would be driven by the types given in
-- # option-groups.def.
-+ else if (vars[var] ~ /^[0-9]+/ ||
-+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
-+ vars[var] ~ /^\"/)
-+ print "#define __" var " " vars[var]
-+ else
-+ print "/* #undef __" var " */"
-+ # Ignore variables that don't have boolean, int, hex, or
-+ # string values. Ideally, this would be driven by the types
-+ # given in option-groups.def.
- }
- }
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch
deleted file mode 100644
index d137f5b318..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/0003-eglibc-menuconfig-build-instructions.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-Pulled from
-
-http://www.eglibc.org/archives/patches/msg01035.html
-
-Upstream-Status: Pending
-Signed-off-by: Khem
-
-As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after.
-
-My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok.
-
-
-Thanks,
-
---
-Steve Longerbeam | Senior Embedded Engineer, ESD Services
-Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
-P 510.354.5838 | M 408.410.2735
-Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
-
-
- EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++---------------------
- 1 file changed, 35 insertions(+), 24 deletions(-)
-
-Index: libc/EGLIBC.cross-building
-===================================================================
---- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700
-+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700
-@@ -47,31 +47,34 @@
- EGLIBC requires recent versions of the GNU binutils, GCC, and the
- Linux kernel. The web page <http://www.eglibc.org/prerequisites>
- documents the current requirements, and lists patches needed for
--certain target architectures. As of this writing, EGLIBC required
--binutils 2.17, GCC 4.1, and Linux 2.6.19.1.
-+certain target architectures. As of this writing, these build
-+instructions have been tested with binutils 2.22.51, GCC 4.6.2,
-+and Linux 3.1.
-
- First, let's set some variables, to simplify later commands. We'll
--build EGLIBC and GCC for a PowerPC target, known to the Linux kernel
--as 'powerpc', and we'll do the build on an Intel Linux box:
-+build EGLIBC and GCC for an ARM target, known to the Linux kernel
-+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
-
-- $ build=i686-pc-linux-gnu
-+ $ build=x86_64-pc-linux-gnu
- $ host=$build
-- $ target=powerpc-none-linux-gnu
-- $ linux_arch=powerpc
-+ $ target=arm-none-linux-gnueabi
-+ $ linux_arch=arm
-
- We're using the aforementioned versions of Binutils, GCC, and Linux:
-
-- $ binutilsv=binutils-2.17
-- $ gccv=gcc-4.1.1
-- $ linuxv=linux-2.6.20
-+ $ binutilsv=binutils-2.22.51
-+ $ gccv=gcc-4.6.2
-+ $ linuxv=linux-3.1
-
- We're carrying out the entire process under '~/cross-build', which
--contains unpacked source trees:
-+contains unpacked source trees for binutils, gcc, and linux kernel,
-+along with EGLIBC svn trunk (which can be checked-out with
-+'svn co http://www.eglibc.org/svn/trunk eglibc'):
-
-- $ top=$HOME/cross-build/ppc
-+ $ top=$HOME/cross-build/$target
- $ src=$HOME/cross-build/src
- $ ls $src
-- binutils-2.17 gcc-4.1.1 libc linux-2.6.20
-+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
-
- We're going to place our build directories in a subdirectory 'obj',
- we'll install the cross-development toolchain in 'tools', and we'll
-@@ -99,7 +102,7 @@
-
- The First GCC
-
--For our work, we need a cross-compiler targeting a PowerPC Linux
-+For our work, we need a cross-compiler targeting an ARM Linux
- system. However, that configuration includes the shared library
- 'libgcc_s.so', which is compiled against the EGLIBC headers (which we
- haven't installed yet) and linked against 'libc.so' (which we haven't
-@@ -125,7 +128,8 @@
- > --prefix=$tools \
- > --without-headers --with-newlib \
- > --disable-shared --disable-threads --disable-libssp \
-- > --disable-libgomp --disable-libmudflap \
-+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
-+ > --disable-decimal-float --disable-libffi \
- > --enable-languages=c
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install
-@@ -162,12 +166,13 @@
- > CXX=$tools/bin/$target-g++ \
- > AR=$tools/bin/$target-ar \
- > RANLIB=$tools/bin/$target-ranlib \
-- > $src/libc/configure \
-+ > $src/eglibc/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
- > --build=$build \
- > --host=$target \
-- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+ > --disable-profile --without-gd --without-cvs \
-+ > --enable-add-ons=nptl,libidn,../ports
-
- The option '--prefix=/usr' may look strange, but you should never
- configure EGLIBC with a prefix other than '/usr': in various places,
-@@ -181,6 +186,11 @@
- The '--with-headers' option tells EGLIBC where the Linux headers have
- been installed.
-
-+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
-+for the listed glibc add-ons. Most notably the ports add-on (located
-+just above the libc sources in the EGLIBC svn tree) is required to
-+support ARM targets.
-+
- We can now use the 'install-headers' makefile target to install the
- headers:
-
-@@ -223,6 +233,7 @@
- > --prefix=$tools \
- > --with-sysroot=$sysroot \
- > --disable-libssp --disable-libgomp --disable-libmudflap \
-+ > --disable-libffi --disable-libquadmath \
- > --enable-languages=c
- $ PATH=$tools/bin:$PATH make
- $ PATH=$tools/bin:$PATH make install
-@@ -240,13 +251,14 @@
- > CXX=$tools/bin/$target-g++ \
- > AR=$tools/bin/$target-ar \
- > RANLIB=$tools/bin/$target-ranlib \
-- > $src/libc/configure \
-+ > $src/eglibc/libc/configure \
- > --prefix=/usr \
- > --with-headers=$sysroot/usr/include \
- > --with-kconfig=$obj/linux/scripts/kconfig \
- > --build=$build \
- > --host=$target \
-- > --disable-profile --without-gd --without-cvs --enable-add-ons
-+ > --disable-profile --without-gd --without-cvs \
-+ > --enable-add-ons=nptl,libidn,../ports
-
- Note the additional '--with-kconfig' option. This tells EGLIBC where to
- find the host config tools used by the kernel 'make config' and 'make
-@@ -337,15 +349,15 @@
- ELF Header:
- ...
- Type: EXEC (Executable file)
-- Machine: PowerPC
-+ Machine: ARM
-
- ...
- Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
-- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1
-- [Requesting program interpreter: /lib/ld.so.1]
-- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000
-+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
-+ [Requesting program interpreter: /lib/ld-linux.so.3]
-+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
- ...
-
- Looking at the dynamic section of the installed 'libgcc_s.so', we see
-@@ -357,7 +369,6 @@
- Dynamic section at offset 0x1083c contains 24 entries:
- Tag Type Name/Value
- 0x00000001 (NEEDED) Shared library: [libc.so.6]
-- 0x00000001 (NEEDED) Shared library: [ld.so.1]
- 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
- ...
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch
deleted file mode 100644
index 7258c82418..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/GLRO_dl_debug_mask.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
-so we should use GLRO_dl_debug_mask
-
-Singed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: libc/elf/dl-open.c
-===================================================================
---- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700
-+++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800
-@@ -155,7 +155,7 @@
- ns->_ns_main_searchlist->r_list[new_nlist++] = map;
-
- /* We modify the global scope. Report this. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
- map->l_name, map->l_ns);
- }
-@@ -298,7 +298,7 @@
- LIBC_PROBE (map_complete, 3, args->nsid, r, new);
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_show_scope (new, 0);
-
- /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
-@@ -515,7 +515,7 @@
- }
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- _dl_show_scope (imap, from_scope);
- }
-
-Index: libc/ports/sysdeps/mips/dl-lookup.c
-===================================================================
---- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
-+++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
-@@ -111,7 +111,7 @@
- continue;
-
- /* Print some debugging info if wanted. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
- _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
- undef_name,
- map->l_name[0] ? map->l_name : rtld_progname,
-@@ -432,7 +432,7 @@
- hash table. */
- if (__builtin_expect (tab->size, 0))
- {
-- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
-+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
- __rtld_lock_unlock_recursive (tab->lock);
- goto success;
- }
-@@ -681,7 +681,7 @@
- }
-
- /* Display information if we are debugging. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("\
- \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
- map->l_name[0] ? map->l_name : rtld_progname,
-@@ -788,7 +788,7 @@
- {
- if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL
-- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
-+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
- {
- /* We could find no value for a strong reference. */
- const char *reference_name = undef_map ? undef_map->l_name : "";
-@@ -861,7 +861,7 @@
- if (__builtin_expect (current_value.m->l_used == 0, 0))
- current_value.m->l_used = 1;
-
-- if (__builtin_expect (GLRO(dl_debug_mask)
-+ if (__builtin_expect (GLRO_dl_debug_mask
- & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
- _dl_debug_bindings (undef_name, undef_map, ref,
- &current_value, version, type_class, protected);
-@@ -926,7 +926,7 @@
- {
- const char *reference_name = undef_map->l_name;
-
-- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
-+ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
- {
- _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
- (reference_name[0]
-@@ -942,7 +942,7 @@
- _dl_debug_printf_c ("\n");
- }
- #ifdef SHARED
-- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
- {
- int conflict = 0;
- struct sym_val val = { NULL, NULL };
-Index: libc/elf/rtld.c
-===================================================================
---- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700
-+++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800
-@@ -2118,7 +2118,7 @@
- GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
-
- /* Print scope information. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
- {
- _dl_debug_printf ("\nInitial object scopes\n");
-
-Index: libc/elf/dl-lookup.c
-===================================================================
---- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
-+++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
-@@ -771,7 +771,7 @@
- {
- if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- && skip_map == NULL
-- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
-+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
- {
- /* We could find no value for a strong reference. */
- const char *reference_name = undef_map ? undef_map->l_name : "";
-Index: libc/elf/get-dynamic-info.h
-===================================================================
---- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800
-+++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800
-@@ -157,7 +157,7 @@
- them. Therefore to avoid breaking existing applications the
- best we can do is add a warning during debugging with the
- intent of notifying the user of the problem. */
-- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
-+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
- && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
- _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
- l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch
deleted file mode 100644
index 4313aa5197..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/eglibc-svn-arm-lowlevellock-include-tls.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM'
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function)
-make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1
-
-Upstream-Status: Pending
-
---- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig
-+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
-@@ -25,6 +25,7 @@
- #include <atomic.h>
- #include <sysdep.h>
- #include <kernel-features.h>
-+#include <tls.h>
-
- #define FUTEX_WAIT 0
- #define FUTEX_WAKE 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch
deleted file mode 100644
index bbf4605505..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/eglibc_fix_findidx_parameters.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: backport
-
-Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/09
-
-Index: libc/posix/xregex.c
-===================================================================
---- libc.orig/posix/xregex.c
-+++ libc/posix/xregex.c
-@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P
- _NL_CURRENT (LC_COLLATE,
- _NL_COLLATE_INDIRECTWC);
-
-- idx = findidx ((const wint_t**)&cp);
-+ idx = findidx ((const wint_t**)&cp, -1);
- if (idx == 0 || cp < (wint_t*) str + c1)
- /* This is no valid character. */
- FREE_STACK_RETURN (REG_ECOLLATE);
-@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P
- indirect = (const int32_t *)
- _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-
-- idx = findidx (&cp);
-+ idx = findidx (&cp, -1);
- if (idx == 0 || cp < str + c1)
- /* This is no valid character. */
- FREE_STACK_RETURN (REG_ECOLLATE);
-@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt
- }
- str_buf[i] = TRANSLATE(*(d+i));
- str_buf[i+1] = '\0'; /* sentinel */
-- idx2 = findidx ((const wint_t**)&cp);
-+ idx2 = findidx ((const wint_t**)&cp, -1);
- }
-
- /* Update d, however d will be incremented at
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch
deleted file mode 100644
index 2ca0bca248..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/fileops-without-wchar-io.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix error like
-
-/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen':
-/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal'
-collect2: error: ld returned 1 exit status
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: libc/libio/fileops.c
-===================================================================
---- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700
-+++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700
-@@ -428,7 +428,7 @@
- result->_mode = 1;
- #else
- /* Treat this as if we couldn't find the given character set. */
-- (void) INTUSE(_IO_file_close_it) (fp);
-+ (void) _IO_file_close_it (fp);
- __set_errno (EINVAL);
- return NULL;
- #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch b/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch
deleted file mode 100644
index ac1e2e82f9..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.19/fix_am_rootsbindir.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir
-
-Upstream-Status:Pending
-Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
-
-diff --git a/libc/sysdeps/gnu/configure b/libc/sysdeps/gnu/configure
-index e7f0e43..687beab 100644
---- a/libc/sysdeps/gnu/configure
-+++ b/libc/sysdeps/gnu/configure
-@@ -42,6 +42,6 @@ case "$prefix" in
- else
- libc_cv_localstatedir=$localstatedir
- fi
-- libc_cv_rootsbindir=/sbin
-+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
- ;;
- esac
-diff --git a/libc/sysdeps/gnu/configure.ac b/libc/sysdeps/gnu/configure.ac
-index ce251df..57c1e77 100644
---- a/libc/sysdeps/gnu/configure.ac
-+++ b/libc/sysdeps/gnu/configure.ac
-@@ -42,6 +42,6 @@ case "$prefix" in
- else
- libc_cv_localstatedir=$localstatedir
- fi
-- libc_cv_rootsbindir=/sbin
-+ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
- ;;
- esac
---
-2.0.0
-
diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
deleted file mode 100644
index d18786ab93..0000000000
--- a/meta/recipes-core/eglibc/eglibc-common.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-SUMMARY = "Embedded GLIBC (GNU C Library)"
-DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is designed to work well on embedded systems. EGLIBC strives to be source and binary compatible with GLIBC. EGLIBC's goals include reduced footprint, configurable components, better support for cross-compilation and cross-testing."
-HOMEPAGE = "http://www.eglibc.org/home"
-SECTION = "libs"
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
- file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.19.bb b/meta/recipes-core/eglibc/eglibc-initial_2.19.bb
deleted file mode 100644
index de45079603..0000000000
--- a/meta/recipes-core/eglibc/eglibc-initial_2.19.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require eglibc_${PV}.bb
-require eglibc-initial.inc
-
-DEPENDS += "kconfig-frontends-native"
-
-# main eglibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building eglibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.19.bb b/meta/recipes-core/eglibc/eglibc-locale_2.19.bb
deleted file mode 100644
index ce6c1d2320..0000000000
--- a/meta/recipes-core/eglibc/eglibc-locale_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-locale.inc
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace.inc b/meta/recipes-core/eglibc/eglibc-mtrace.inc
deleted file mode 100644
index d68783e439..0000000000
--- a/meta/recipes-core/eglibc/eglibc-mtrace.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-include eglibc-collateral.inc
-
-SUMMARY = "mtrace utility provided by eglibc"
-DESCRIPTION = "mtrace utility provided by eglibc"
-RDEPENDS_${PN} = "perl"
-RPROVIDES_${PN} = "libc-mtrace"
-
-SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
-
-do_install() {
- install -d -m 0755 ${D}${bindir}
- install -m 0755 ${SRC}/mtrace ${D}${bindir}/
-}
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb
deleted file mode 100644
index 6fa2be9cc9..0000000000
--- a/meta/recipes-core/eglibc/eglibc-mtrace_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-scripts.inc b/meta/recipes-core/eglibc/eglibc-scripts.inc
deleted file mode 100644
index 9ca6673404..0000000000
--- a/meta/recipes-core/eglibc/eglibc-scripts.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-include eglibc-collateral.inc
-
-SUMMARY = "utility scripts provided by eglibc"
-DESCRIPTION = "utility scripts provided by eglibc"
-RDEPENDS_${PN} = "bash eglibc-mtrace"
-
-SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
-
-bashscripts = "sotruss xtrace"
-
-do_install() {
- install -d -m 0755 ${D}${bindir}
- for i in ${bashscripts}; do
- install -m 0755 ${SRC}/$i ${D}${bindir}/
- done
-}
diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb
deleted file mode 100644
index 31133621d1..0000000000
--- a/meta/recipes-core/eglibc/eglibc-scripts_2.19.bb
+++ /dev/null
@@ -1 +0,0 @@
-require eglibc-scripts.inc
diff --git a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch
index f2c567d188..c8e2c94af0 100644
--- a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch
+++ b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch
@@ -21,16 +21,3 @@ Signed-off-by: Joe Slater <jslater@windriver.com>
# Which classes to export from the shared library.
MOOPPFLAGS += --dllexport=styled_ostream
---- a/gettext-tools/src/Makefile.am
-+++ b/gettext-tools/src/Makefile.am
-@@ -229,8 +229,8 @@ libgettextsrc_la_LDFLAGS += -Wl,--export
- endif
-
- # No need to install libgettextsrc.a, except on AIX.
--install-exec-local: install-libLTLIBRARIES install-exec-clean
--install-exec-clean:
-+install-exec-local: install-exec-clean
-+install-exec-clean: install-libLTLIBRARIES
- case "@host_os@" in \
- aix*) ;; \
- *) $(RM) $(DESTDIR)$(libdir)/libgettextsrc.a ;; \
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template
deleted file mode 100644
index 4a9ff7d231..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template
+++ /dev/null
@@ -1,53 +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 =
-
-# 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 =
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz
deleted file mode 100644
index e0335a3d1c..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch
deleted file mode 100644
index d453a74b51..0000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0bfade685783ccd193b2e1b94d0e4ef5ce449432 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 20 Nov 2013 17:52:50 +0800
-Subject: [PATCH] remove 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 it causes
-guile-native compile failure if the euc-jp is not
-installed on the host
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- iconv.m4 | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/iconv.m4 b/iconv.m4
-index a503646..dbe7ca1 100644
---- a/iconv.m4
-+++ b/iconv.m4
-@@ -159,17 +159,6 @@ int main ()
- }
- }
- #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;
- return result;
- }]])],
- [am_cv_func_iconv_works=yes],
---
-1.8.3
-
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
index 3485c5a2cb..8d11d1d8e9 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
@@ -1,4 +1,4 @@
-dnl Copyright (C) 1997-2010 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2014 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.
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
index fabdc76c9c..65184f65c7 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
@@ -8,8 +8,8 @@
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
-# Origin: gettext-0.18.3
-GETTEXT_MACRO_VERSION = 0.18
+# Origin: gettext-0.19
+GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
@@ -77,6 +77,16 @@ POTFILES = \
CATALOGS = @CATALOGS@
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
@@ -143,15 +153,25 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
- if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
- LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
- else \
- LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
- fi; \
- } | grep -v 'libtool:' >/dev/null; then \
- package_gnu='GNU '; \
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
else \
- package_gnu=''; \
+ package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
@@ -171,7 +191,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
- --package-name="$${package_gnu}@PACKAGE@" \
+ --package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
@@ -199,9 +219,10 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
@@ -362,7 +383,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
- $(MAKE) update-po
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
new file mode 100644
index 0000000000..b04ba55032
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
Binary files differ
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
index c38b914d6b..b625621fac 100755
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
@@ -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-2013 Free Software Foundation, Inc.
+# Copyright 1996-2014 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -367,11 +367,7 @@ else
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
- freebsd2.2*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- freebsd2*)
+ freebsd2.[01]*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
@@ -548,13 +544,11 @@ case "$host_os" in
dgux*)
library_names_spec='$libname$shrext'
;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
freebsd* | dragonfly*)
- case "$host_os" in
- freebsd[123]*)
- library_names_spec='$libname$shrext$versuffix' ;;
- *)
- library_names_spec='$libname$shrext' ;;
- esac
+ library_names_spec='$libname$shrext'
;;
gnu*)
library_names_spec='$libname$shrext'
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin
index 2436c49e78..2436c49e78 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin
+++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
index 2b43b97022..ca97315a85 100644
--- a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
@@ -8,14 +8,13 @@ SRC_URI = "file://aclocal.tgz \
file://Makefile.in.in \
file://remove-potcdate.sin \
file://COPYING \
- file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
LICENSE = "FSF-Unlimited"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0854da868a929923087141d9d7aba7d5"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b20675cd5158442f6007d022f46b35b"
inherit native
diff --git a/meta/recipes-core/gettext/gettext_0.18.3.2.bb b/meta/recipes-core/gettext/gettext_0.19.4.bb
index 65d4103a97..cebf6c78c6 100644
--- a/meta/recipes-core/gettext/gettext_0.18.3.2.bb
+++ b/meta/recipes-core/gettext/gettext_0.19.4.bb
@@ -18,8 +18,8 @@ PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--
LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-SRC_URI[md5sum] = "241aba309d07aa428252c74b40a818ef"
-SRC_URI[sha256sum] = "d1a4e452d60eb407ab0305976529a45c18124bd518d976971ac6dc7aa8b4c5d7"
+SRC_URI[md5sum] = "d3511af1e604a3478900d2c2b4a4a48e"
+SRC_URI[sha256sum] = "8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f"
inherit autotools texinfo
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
new file mode 100644
index 0000000000..3d0c008bbe
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch
@@ -0,0 +1,39 @@
+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_2.40.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb
index ff1fb87a38..69b3ef8e37 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb
@@ -13,9 +13,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://ptest-paths.patch \
file://uclibc.patch \
file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
+ file://allow-run-media-sdX-drive-mount-if-username-root.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
-SRC_URI[md5sum] = "05fb7cb17eacbc718e90366a1eae60d9"
-SRC_URI[sha256sum] = "0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5"
+SRC_URI[md5sum] = "89c4119e50e767d3532158605ee9121a"
+SRC_URI[sha256sum] = "8f3f0865280e45b8ce840e176ef83bcfd511148918cc8d39df2ee89b67dcf89a"
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 2eda8a1ddc..072f790111 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -1,5 +1,7 @@
SUMMARY = "A general-purpose utility library"
DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on."
+HOMEPAGE = "https://developer.gnome.org/glib/"
+
# pcre is under BSD;
# docs/reference/COPYING is with a 'public domai'-like license!
LICENSE = "LGPLv2+ & BSD & PD"
@@ -18,21 +20,23 @@ BBCLASSEXTEND = "native nativesdk"
DEPENDS = "glib-2.0-native virtual/libiconv libffi zlib"
DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', ' dbus', '', d)}"
DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-libffi nativesdk-zlib ${BPN}-native"
+DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib ${BPN}-native"
PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
LEAD_SONAME = "libglib-2.0.*"
FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
-inherit autotools gettext gtk-doc pkgconfig ptest
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome
S = "${WORKDIR}/glib-${PV}"
CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
-PTEST_CONF = "${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
-EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
+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"
@@ -51,14 +55,14 @@ FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
${datadir}/bash-completion"
-FILES_${PN}-ptest += "${libexecdir}/installed-tests \
- ${datadir}/installed-tests/glib"
ARM_INSTRUCTION_SET = "arm"
USE_NLS = "yes"
do_install_append () {
- sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ if [ -f ${D}${bindir}/gtester-report ]; then
+ sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ fi
# Remove some unpackaged files
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
@@ -84,17 +88,17 @@ RDEPENDS_${PN}-ptest += "\
"
RDEPENDS_${PN}-ptest_append_libc-glibc = "\
- eglibc-gconv-utf-16 \
- eglibc-charmap-utf-8 \
- eglibc-gconv-cp1255 \
- eglibc-charmap-cp1255 \
- eglibc-gconv-utf-32 \
- eglibc-gconv-utf-7 \
- eglibc-gconv-euc-jp \
- eglibc-gconv-iso8859-1 \
- eglibc-gconv-iso8859-15 \
- eglibc-charmap-invariant \
- eglibc-localedata-translit-cjk-variants \
+ glibc-gconv-utf-16 \
+ glibc-charmap-utf-8 \
+ glibc-gconv-cp1255 \
+ glibc-charmap-cp1255 \
+ glibc-gconv-utf-32 \
+ glibc-gconv-utf-7 \
+ glibc-gconv-euc-jp \
+ glibc-gconv-iso8859-1 \
+ glibc-gconv-iso8859-15 \
+ glibc-charmap-invariant \
+ glibc-localedata-translit-cjk-variants \
"
INSANE_SKIP_${PN}-ptest += "libdir"
diff --git a/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb b/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
index a9c1a4129a..b9ba2d6217 100644
--- a/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
+++ b/meta/recipes-core/glib-networking/glib-networking_2.38.0.bb
@@ -24,7 +24,7 @@ PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
EXTRA_OECONF = "--without-gnome-proxy"
-inherit gnomebase
+inherit gnomebase gettext
FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/"
diff --git a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch b/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
index 7618c99534..186a480458 100644
--- a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch
+++ b/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
@@ -3,10 +3,10 @@ Upstream-Status: Inappropriate [other]
This is a hack to fix building the locale bits on an older
CentOs 5.X machine
-Index: eglibc-2_16/libc/locale/programs/config.h
+Index: git/locale/programs/config.h
===================================================================
---- eglibc-2_16.orig/libc/locale/programs/config.h
-+++ eglibc-2_16/libc/locale/programs/config.h
+--- git/locale/programs/config.h
++++ git.orig/locale/programs/config.h
@@ -19,6 +19,8 @@
#ifndef _LD_CONFIG_H
#define _LD_CONFIG_H 1
diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
new file mode 100644
index 0000000000..8aaa225706
--- /dev/null
+++ b/meta/recipes-core/glibc/cross-localedef-native_2.20.bb
@@ -0,0 +1,56 @@
+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"
+
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+PV = "2.20"
+
+SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master;name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://fix_for_centos_5.8.patch \
+ ${EGLIBCPATCHES} \
+ "
+EGLIBCPATCHES = "\
+ file://timezone-re-written-tzselect-as-posix-sh.patch \
+ file://eglibc.patch \
+ file://option-groups.patch \
+ file://GLRO_dl_debug_mask.patch \
+ file://eglibc-header-bootstrap.patch \
+ file://eglibc-resolv-dynamic.patch \
+ file://eglibc-ppc8xx-cache-line-workaround.patch \
+ file://eglibc-sh4-fpscr_values.patch \
+ file://eglibc-use-option-groups.patch \
+ "
+
+SRCREV_glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
+SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
+
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc__localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-DNOT_IN_libc=1"
+
+do_configure () {
+ ${S}/localedef/configure ${EXTRA_OECONF}
+}
+
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/meta/recipes-core/eglibc/eglibc-collateral.inc b/meta/recipes-core/glibc/glibc-collateral.inc
index 8feca09f2e..85e06da816 100644
--- a/meta/recipes-core/eglibc/eglibc-collateral.inc
+++ b/meta/recipes-core/glibc/glibc-collateral.inc
@@ -1,6 +1,6 @@
INHIBIT_DEFAULT_DEPS = "1"
LICENSE = "GPLv2 & LGPLv2.1"
-HOMEPAGE = "http://www.eglibc.org/"
+HOMEPAGE = "http://www.gnu.org/software/libc/index.html"
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc
new file mode 100644
index 0000000000..bba1568baf
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-common.inc
@@ -0,0 +1,9 @@
+SUMMARY = "GLIBC (GNU C Library)"
+DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel."
+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 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
index 92402f8ff5..7db3deac1b 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -11,8 +11,8 @@ TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
do_configure () {
sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
chmod +x ${S}/configure
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ find ${S} -name "configure" | xargs touch
${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
--prefix=/usr \
--without-cvs --disable-sanity-checks \
@@ -26,28 +26,28 @@ do_compile () {
}
do_install () {
- oe_runmake cross-compiling=yes install_root=${D} \
- includedir='${includedir}' prefix='${prefix}' \
- install-bootstrap-headers=yes install-headers
+ 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}
+ 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
+ # 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 eglibc build need this.
- for t in linux asm asm-generic; do
- ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
- done
+ 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() {
@@ -58,8 +58,8 @@ do_siteconfig () {
:
}
-SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst"
-eglibcinitial_sstate_postinst() {
+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
diff --git a/meta/recipes-core/glibc/glibc-initial_2.20.bb b/meta/recipes-core/glibc/glibc-initial_2.20.bb
new file mode 100644
index 0000000000..8ab01dc79d
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-initial_2.20.bb
@@ -0,0 +1,11 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+
+DEPENDS += "kconfig-frontends-native"
+
+# 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/eglibc/eglibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
index 6261ae3419..962d666885 100644
--- a/meta/recipes-core/eglibc/eglibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -5,7 +5,7 @@ def ld_append_if_tune_exists(d, infos, dict):
infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
-def eglibc_dl_info(d):
+def glibc_dl_info(d):
ld_info_all = {
"mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
@@ -52,5 +52,5 @@ def eglibc_dl_info(d):
infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
return infos
-EGLIBC_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}"
-RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"
+EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
+RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}"
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc
index 4da5abd778..df6d073436 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -1,12 +1,12 @@
-include eglibc-collateral.inc
+include glibc-collateral.inc
-SUMMARY = "Locale data from eglibc"
+SUMMARY = "Locale data from glibc"
-BPN = "eglibc"
-LOCALEBASEPN = "${MLPREFIX}eglibc"
+BPN = "glibc"
+LOCALEBASEPN = "${MLPREFIX}glibc"
-# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
-# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
+# glibc-collateral.inc inhibits all default deps, but do_package needs objcopy
+# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'glibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'glibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
# ERROR: Function failed: split_and_strip_files
BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
@@ -19,11 +19,11 @@ do_package[depends] += "${BINUTILSDEP}"
# default to disabled
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
-ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-eglibc-locale = "0"
+ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0"
#enable locale generation on these arches
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64"
+BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64"
# set "1" to use cross-localedef for locale generation
# set "0" for qemu emulation of native localedef for locale generation
@@ -34,40 +34,40 @@ PROVIDES = "virtual/libc-locale"
PACKAGES = "localedef ${PN}-dbg"
PACKAGES_DYNAMIC = "^locale-base-.* \
- ^eglibc-gconv-.* ^eglibc-charmap-.* ^eglibc-localedata-.* ^eglibc-binary-localedata-.* \
+ ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
- ^${MLPREFIX}eglibc-gconv$"
+ ^${MLPREFIX}glibc-gconv$"
-# Create a eglibc-binaries package
+# 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("eglibc-binary") != -1])}"
+RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-binary") != -1])}"
-# Create a eglibc-charmaps package
+# 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("eglibc-charmap") != -1])}"
+RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-charmap") != -1])}"
-# Create a eglibc-gconvs package
+# 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("eglibc-gconv") != -1])}"
+RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-gconv") != -1])}"
-# Create a eglibc-localedatas package
+# 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("eglibc-localedata") != -1])}"
+RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("glibc-localedata") != -1])}"
-DESCRIPTION_localedef = "eglibc: compile locale definition files"
+DESCRIPTION_localedef = "glibc: compile locale definition files"
-# eglibc-gconv is dynamically added into PACKAGES, thus
-# FILES_eglibc-gconv will not be automatically extended in multilib.
-# Explicitly add ${MLPREFIX} for FILES_eglibc-gconv.
-FILES_${MLPREFIX}eglibc-gconv = "${libdir}/gconv/*"
+# glibc-gconv is dynamically added into PACKAGES, thus
+# FILES_glibc-gconv will not be automatically extended in multilib.
+# Explicitly add ${MLPREFIX} for FILES_glibc-gconv.
+FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
FILES_localedef = "${bindir}/localedef"
-LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
+LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}"
do_install () {
mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
diff --git a/meta/recipes-core/glibc/glibc-locale_2.20.bb b/meta/recipes-core/glibc/glibc-locale_2.20.bb
new file mode 100644
index 0000000000..f7702e0358
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-locale_2.20.bb
@@ -0,0 +1 @@
+require glibc-locale.inc
diff --git a/meta/recipes-core/glibc/glibc-mtrace.inc b/meta/recipes-core/glibc/glibc-mtrace.inc
new file mode 100644
index 0000000000..e12b079e06
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-mtrace.inc
@@ -0,0 +1,13 @@
+include 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}"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ install -m 0755 ${SRC}/mtrace ${D}${bindir}/
+}
diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb b/meta/recipes-core/glibc/glibc-mtrace_2.20.bb
new file mode 100644
index 0000000000..0b69bad46a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-mtrace_2.20.bb
@@ -0,0 +1 @@
+require glibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/glibc/glibc-options.inc
index 259e752858..9fd27f32f9 100644
--- a/meta/recipes-core/eglibc/eglibc-options.inc
+++ b/meta/recipes-core/glibc/glibc-options.inc
@@ -1,4 +1,4 @@
-def eglibc_cfg(feature, tokens, cnf):
+def glibc_cfg(feature, tokens, cnf):
if type(tokens) == type(""):
tokens = [tokens]
if feature:
@@ -10,8 +10,8 @@ def eglibc_cfg(feature, tokens, cnf):
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG=\"${S}/nss/nsswitch.conf\""])
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS=\"${S}/nss/fixed-nsswitch.functions\""])
-# Map distro features to eglibc options settings
-def features_to_eglibc_settings(d):
+# Map distro features to glibc options settings
+def features_to_glibc_settings(d):
cnf = ([])
ipv4 = bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d)
@@ -52,7 +52,7 @@ def features_to_eglibc_settings(d):
libc_posix_regexp_glibc = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-regexp-glibc', True, False, d)
libc_posix_wchar_io = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-wchar-io', True, False, d)
- # arrange the dependencies among eglibc configuable options according to file option-groups.def from eglibc source code
+ # arrange the dependencies among glibc configuable options according to file option-groups.def from glibc source code
new_dep = True
while new_dep:
new_dep = False
@@ -121,42 +121,42 @@ def features_to_eglibc_settings(d):
new_dep = True
libc_posix_clang_wchar = True
- eglibc_cfg(ipv6, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
- eglibc_cfg(libc_backtrace, 'OPTION_EGLIBC_BACKTRACE', cnf)
- eglibc_cfg(libc_big_macros, 'OPTION_EGLIBC_BIG_MACROS', cnf)
- eglibc_cfg(libc_bsd, 'OPTION_EGLIBC_BSD', cnf)
- eglibc_cfg(libc_cxx_tests, 'OPTION_EGLIBC_CXX_TESTS', cnf)
- eglibc_cfg(libc_catgets, 'OPTION_EGLIBC_CATGETS', cnf)
- eglibc_cfg(libc_charsets, 'OPTION_EGLIBC_CHARSETS', cnf)
- eglibc_cfg(libc_crypt, 'OPTION_EGLIBC_CRYPT', cnf)
- eglibc_cfg(libc_crypt_ufc, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
- eglibc_cfg(libc_db_aliases, 'OPTION_EGLIBC_DB_ALIASES', cnf)
- eglibc_cfg(libc_envz, 'OPTION_EGLIBC_ENVZ', cnf)
- eglibc_cfg(libc_fcvt, 'OPTION_EGLIBC_FCVT', cnf)
- eglibc_cfg(libc_fmtmsg, 'OPTION_EGLIBC_FMTMSG', cnf)
- eglibc_cfg(libc_fstab, 'OPTION_EGLIBC_FSTAB', cnf)
- eglibc_cfg(libc_ftraverse, 'OPTION_EGLIBC_FTRAVERSE', cnf)
- eglibc_cfg(libc_getlogin, 'OPTION_EGLIBC_GETLOGIN', cnf)
- eglibc_cfg(libc_idn, 'OPTION_EGLIBC_IDN', cnf)
- eglibc_cfg(ipv4, 'OPTION_EGLIBC_INET', cnf)
- eglibc_cfg(libc_inet_anl, 'OPTION_EGLIBC_INET_ANL', cnf)
- eglibc_cfg(libc_libm, 'OPTION_EGLIBC_LIBM', cnf)
- eglibc_cfg(libc_locales, 'OPTION_EGLIBC_LOCALES', cnf)
- eglibc_cfg(libc_locale_code, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
- eglibc_cfg(libc_memusage, 'OPTION_EGLIBC_MEMUSAGE', cnf)
- eglibc_cfg(libc_nis, 'OPTION_EGLIBC_NIS', cnf)
- eglibc_cfg(libc_nsswitch, 'OPTION_EGLIBC_NSSWITCH', cnf)
- eglibc_cfg(libc_rcmd, 'OPTION_EGLIBC_RCMD', cnf)
- eglibc_cfg(libc_rtld_debug, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
- eglibc_cfg(libc_spawn, 'OPTION_EGLIBC_SPAWN', cnf)
- eglibc_cfg(libc_streams, 'OPTION_EGLIBC_STREAMS', cnf)
- eglibc_cfg(libc_sunrpc, 'OPTION_EGLIBC_SUNRPC', cnf)
- eglibc_cfg(libc_utmp, 'OPTION_EGLIBC_UTMP', cnf)
- eglibc_cfg(libc_utmpx, 'OPTION_EGLIBC_UTMPX', cnf)
- eglibc_cfg(libc_wordexp, 'OPTION_EGLIBC_WORDEXP', cnf)
- eglibc_cfg(libc_posix_clang_wchar, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
- eglibc_cfg(libc_posix_regexp, 'OPTION_POSIX_REGEXP', cnf)
- eglibc_cfg(libc_posix_regexp_glibc, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
- eglibc_cfg(libc_posix_wchar_io, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
+ glibc_cfg(ipv6, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
+ glibc_cfg(libc_backtrace, 'OPTION_EGLIBC_BACKTRACE', cnf)
+ glibc_cfg(libc_big_macros, 'OPTION_EGLIBC_BIG_MACROS', cnf)
+ glibc_cfg(libc_bsd, 'OPTION_EGLIBC_BSD', cnf)
+ glibc_cfg(libc_cxx_tests, 'OPTION_EGLIBC_CXX_TESTS', cnf)
+ glibc_cfg(libc_catgets, 'OPTION_EGLIBC_CATGETS', cnf)
+ glibc_cfg(libc_charsets, 'OPTION_EGLIBC_CHARSETS', cnf)
+ glibc_cfg(libc_crypt, 'OPTION_EGLIBC_CRYPT', cnf)
+ glibc_cfg(libc_crypt_ufc, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
+ glibc_cfg(libc_db_aliases, 'OPTION_EGLIBC_DB_ALIASES', cnf)
+ glibc_cfg(libc_envz, 'OPTION_EGLIBC_ENVZ', cnf)
+ glibc_cfg(libc_fcvt, 'OPTION_EGLIBC_FCVT', cnf)
+ glibc_cfg(libc_fmtmsg, 'OPTION_EGLIBC_FMTMSG', cnf)
+ glibc_cfg(libc_fstab, 'OPTION_EGLIBC_FSTAB', cnf)
+ glibc_cfg(libc_ftraverse, 'OPTION_EGLIBC_FTRAVERSE', cnf)
+ glibc_cfg(libc_getlogin, 'OPTION_EGLIBC_GETLOGIN', cnf)
+ glibc_cfg(libc_idn, 'OPTION_EGLIBC_IDN', cnf)
+ glibc_cfg(ipv4, 'OPTION_EGLIBC_INET', cnf)
+ glibc_cfg(libc_inet_anl, 'OPTION_EGLIBC_INET_ANL', cnf)
+ glibc_cfg(libc_libm, 'OPTION_EGLIBC_LIBM', cnf)
+ glibc_cfg(libc_locales, 'OPTION_EGLIBC_LOCALES', cnf)
+ glibc_cfg(libc_locale_code, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
+ glibc_cfg(libc_memusage, 'OPTION_EGLIBC_MEMUSAGE', cnf)
+ glibc_cfg(libc_nis, 'OPTION_EGLIBC_NIS', cnf)
+ glibc_cfg(libc_nsswitch, 'OPTION_EGLIBC_NSSWITCH', cnf)
+ glibc_cfg(libc_rcmd, 'OPTION_EGLIBC_RCMD', cnf)
+ glibc_cfg(libc_rtld_debug, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
+ glibc_cfg(libc_spawn, 'OPTION_EGLIBC_SPAWN', cnf)
+ glibc_cfg(libc_streams, 'OPTION_EGLIBC_STREAMS', cnf)
+ glibc_cfg(libc_sunrpc, 'OPTION_EGLIBC_SUNRPC', cnf)
+ glibc_cfg(libc_utmp, 'OPTION_EGLIBC_UTMP', cnf)
+ glibc_cfg(libc_utmpx, 'OPTION_EGLIBC_UTMPX', cnf)
+ glibc_cfg(libc_wordexp, 'OPTION_EGLIBC_WORDEXP', cnf)
+ glibc_cfg(libc_posix_clang_wchar, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
+ glibc_cfg(libc_posix_regexp, 'OPTION_POSIX_REGEXP', cnf)
+ glibc_cfg(libc_posix_regexp_glibc, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
+ glibc_cfg(libc_posix_wchar_io, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index d5d407f5e7..984362e3ce 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -1,6 +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 eglibc one if our build
+# 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
@@ -17,28 +17,30 @@ python __anonymous () {
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ?= "1"
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
-
-# The ld.so in this eglibc supports the GNU_HASH
-RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
-RPROVIDES_${PN}-utils = "glibc-utils"
-RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace"
-RPROVIDES_${PN}-pic = "glibc-pic"
-RPROVIDES_${PN}-dev = "glibc-dev libc6-dev virtual-libc-dev"
-RPROVIDES_${PN}-staticdev = "glibc-staticdev"
-RPROVIDES_${PN}-doc = "glibc-doc"
-RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
-RPROVIDES_eglibc-thread-db = "glibc-thread-db"
-RPROVIDES_${PN}-pcprofile = "glibc-pcprofile"
-RPROVIDES_${PN}-dbg = "glibc-dbg"
+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"
+
+# The ld.so in this glibc supports the GNU_HASH
+RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)"
+RPROVIDES_${PN}-utils = "eglibc-utils"
+RPROVIDES_${PN}-mtrace = "eglibc-mtrace libc-mtrace"
+RPROVIDES_${PN}-pic = "eglibc-pic"
+RPROVIDES_${PN}-dev = "eglibc-dev libc6-dev virtual-libc-dev"
+RPROVIDES_${PN}-staticdev = "eglibc-staticdev"
+RPROVIDES_${PN}-doc = "eglibc-doc"
+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}/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"
+INSANE_SKIP_glibc_append_aarch64 = " libdir"
FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
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_eglibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
+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"
@@ -47,12 +49,13 @@ FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_no
FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
FILES_nscd = "${sbindir}/nscd*"
FILES_${PN}-mtrace = "${bindir}/mtrace"
+FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
-FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
+FILES_glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
RPROVIDES_${PN}-dev += "libc-dev"
RPROVIDES_${PN}-staticdev += "libc-staticdev"
@@ -60,13 +63,14 @@ SUMMARY_sln = "The static ln"
DESCRIPTION_sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional."
SUMMARY_nscd = "Name service cache daemon"
DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services."
-SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
-DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
+SUMMARY_glibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
+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 eglibc"
-DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
+SUMMARY_${PN}-utils = "Miscellaneous utilities provided by glibc"
+DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, locale, gencat, rpcgen, ..."
DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
+DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
inherit libc-common multilib_header
@@ -74,9 +78,9 @@ do_install_append () {
rm -f ${D}${sysconfdir}/localtime
rm -rf ${D}${localstatedir}
- # remove empty eglibc dir
- if [ -d ${D}${libdir}/eglibc -a ! -e ${D}${libdir}/eglibc/pt_chown ]; then
- rmdir ${D}${libdir}/eglibc
+ # remove empty glibc dir
+ if [ -d ${D}${libdir}/glibc -a ! -e ${D}${libdir}/glibc/pt_chown ]; then
+ rmdir ${D}${libdir}/glibc
fi
oe_multilib_header bits/syscall.h
@@ -90,18 +94,33 @@ do_install_append () {
fi
if [ "${USE_LDCONFIG}" != "1" ]; then
- # We won't ship this file (see FILES above) so let's not install it
+ # 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 eglibc-initial.
+ # But check whether it exists first, since it won't for glibc-initial.
if [ -d ${D}${sysconfdir} ]; then
rmdir ${D}${sysconfdir}
fi
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_locale () {
- dest=${D}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
+ 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}
@@ -128,7 +147,7 @@ addtask do_install_locale after do_install before do_populate_sysroot do_package
bashscripts = "mtrace sotruss xtrace"
do_evacuate_scripts () {
- target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
mkdir -p $target
for i in ${bashscripts}; do
if [ -f ${D}${bindir}/$i ]; then
@@ -139,11 +158,11 @@ do_evacuate_scripts () {
addtask evacuate_scripts after do_install before do_populate_sysroot do_package
-PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
+PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
-eglibc_package_preprocess () {
- rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
- rm -rf ${PKGD}/${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+glibc_package_preprocess () {
+ rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
+ rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
for i in ${bashscripts}; do
rm -f ${PKGD}${bindir}/$i
done
diff --git a/meta/recipes-core/glibc/glibc-scripts.inc b/meta/recipes-core/glibc/glibc-scripts.inc
new file mode 100644
index 0000000000..3a06773d66
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-scripts.inc
@@ -0,0 +1,16 @@
+include 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}"
+
+bashscripts = "sotruss xtrace"
+
+do_install() {
+ install -d -m 0755 ${D}${bindir}
+ for i in ${bashscripts}; do
+ install -m 0755 ${SRC}/$i ${D}${bindir}/
+ done
+}
diff --git a/meta/recipes-core/glibc/glibc-scripts_2.20.bb b/meta/recipes-core/glibc/glibc-scripts_2.20.bb
new file mode 100644
index 0000000000..5a89bd8022
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-scripts_2.20.bb
@@ -0,0 +1 @@
+require glibc-scripts.inc
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc
index ab3ec1555f..ec16fe1fde 100644
--- a/meta/recipes-core/eglibc/eglibc-testing.inc
+++ b/meta/recipes-core/glibc/glibc-testing.inc
@@ -1,46 +1,46 @@
do_compile_append () {
# now generate script to drive testing
- echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testeglibc
- set >> ${B}/${HOST_PREFIX}testeglibc
+ 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}testeglibc
- sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
- sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
+ 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 "/^PATCH_GET/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}testeglibc
+ 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}testeglibc
+ sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testglibc
# append execution part script
-cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
+cat >> ${B}/${HOST_PREFIX}testglibc << STOP
target="\$1"
if [ "x\$target" = "x" ]
then
@@ -59,7 +59,7 @@ then
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 eglibc build tree"
+ 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
@@ -75,5 +75,5 @@ make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
rm -rf ${B}/configparms
STOP
- chmod +x ${B}/${HOST_PREFIX}testeglibc
+ chmod +x ${B}/${HOST_PREFIX}testglibc
}
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/glibc/glibc.inc
index 68128e9755..8aa78dfb34 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -1,6 +1,6 @@
-require eglibc-common.inc
-require eglibc-ld.inc
-require eglibc-testing.inc
+require glibc-common.inc
+require glibc-ld.inc
+require glibc-testing.inc
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
@@ -8,12 +8,12 @@ PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
-# eglibc can't be built without optimization, if someone tries to compile an
+# glibc can't be built without optimization, if someone tries to compile an
# entire image as -O0, we override it with -O2 here and give a note about it.
def get_optimization(d):
selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
- bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
+ bb.note("glibc can't be built with -O0, -O2 will be used instead.")
return selected_optimization.replace("-O0", "-O2")
return selected_optimization
@@ -38,8 +38,13 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES += "virtual/libintl virtual/libiconv"
-inherit autotools texinfo
-require eglibc-options.inc
+inherit autotools texinfo distro_features_check
+require glibc-options.inc
+
+# The main purpose of setting this variable is to prevent users from accidently
+# overriding DISTRO_FEATRUES, causing obscure build failures because of lack
+# of libc functions.
+REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}"
LEAD_SONAME = "libc.so"
@@ -58,19 +63,19 @@ INHIBIT_DEFAULT_DEPS = "1"
ARM_INSTRUCTION_SET = "arm"
-# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
+# glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
PARALLEL_MAKE = ""
-# eglibc make-syscalls.sh has a number of issues with /bin/dash and
+# glibc make-syscalls.sh has a number of issues with /bin/dash and
# it's output which make calls via the SHELL also has issues, so
# ensure make uses /bin/bash
EXTRA_OEMAKE += "SHELL=/bin/bash"
-OE_FEATURES = "${@features_to_eglibc_settings(d)}"
+OE_FEATURES = "${@features_to_glibc_settings(d)}"
do_configure_prepend() {
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
echo '${OE_FEATURES}' > ${B}/option-groups.config
@@ -84,4 +89,4 @@ do_configure_append() {
sed -i 's/^OPTION_EGLIBC_NSSWITCH_FIXED_\(.*\)="\(.*\)"$/OPTION_EGLIBC_NSSWITCH_FIXED_\1=\2/' option-groups.config
}
-GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_ADDONS ?= "nptl,libidn"
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch
index b4489e9ae9..3922cb818f 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch
+++ b/meta/recipes-core/glibc/glibc/0001-R_ARM_TLS_DTPOFF32.patch
@@ -41,9 +41,11 @@ Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ndex 8d905e8..dcfa71e 100644
---- libc.orig/ports/sysdeps/arm/dl-machine.h
-+++ libc/ports/sysdeps/arm/dl-machine.h
-@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+Index: git/sysdeps/arm/dl-machine.h
+===================================================================
+--- git.orig/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.748070587 +0000
++++ git/sysdeps/arm/dl-machine.h 2014-08-27 05:30:47.740070587 +0000
+@@ -495,7 +495,7 @@
case R_ARM_TLS_DTPOFF32:
if (sym != NULL)
@@ -52,5 +54,3 @@ ndex 8d905e8..dcfa71e 100644
break;
case R_ARM_TLS_TPOFF32:
---
-
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index a8463ea915..f341282ffb 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/meta/recipes-core/glibc/glibc/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -17,11 +17,11 @@ 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 6fddff0..7af242e 100644
---- a/manual/Makefile
-+++ b/manual/Makefile
-@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+Index: git/manual/Makefile
+===================================================================
+--- git.orig/manual/Makefile 2014-08-29 10:35:18.728070587 -0700
++++ git/manual/Makefile 2014-08-29 10:35:18.720070587 -0700
+@@ -105,7 +105,8 @@
$(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(dir)/libm-test-ulps))
pwd=`pwd`; \
@@ -31,6 +31,3 @@ index 6fddff0..7af242e 100644
$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
touch $@
---
-1.7.9.7
-
diff --git a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch
new file mode 100644
index 0000000000..8cfdbeaa60
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch
@@ -0,0 +1,339 @@
+From a5357b7ce2a2982c5778435704bcdb55ce3667a0 Mon Sep 17 00:00:00 2001
+From: Jeff Law <law@redhat.com>
+Date: Mon, 15 Dec 2014 10:09:32 +0100
+Subject: [PATCH] CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]
+
+A larger number of format specifiers coudld cause a stack overflow,
+potentially allowing to bypass _FORTIFY_SOURCE format string
+protection.
+---
+ ChangeLog | 9 +++++++
+ NEWS | 13 +++++----
+ stdio-common/Makefile | 2 +-
+ stdio-common/bug23-2.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
+ stdio-common/bug23-3.c | 50 +++++++++++++++++++++++++++++++++++
+ stdio-common/bug23-4.c | 31 ++++++++++++++++++++++
+ stdio-common/vfprintf.c | 40 ++++++++++++++++++++++++++--
+ 7 files changed, 207 insertions(+), 8 deletions(-)
+ create mode 100644 stdio-common/bug23-2.c
+ create mode 100644 stdio-common/bug23-3.c
+ create mode 100644 stdio-common/bug23-4.c
+
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,12 @@
++2014-12-15 Jeff Law <law@redhat.com>
++
++ [BZ #16617]
++ * stdio-common/vfprintf.c (vfprintf): Allocate large specs array
++ on the heap. (CVE-2012-3406)
++ * stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file.
++ * stdio-common/bug23-4.c: New file. Test case by Joseph Myers.
++ * stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4.
++
+ 2014-11-19 Carlos O'Donell <carlos@redhat.com>
+ Florian Weimer <fweimer@redhat.com>
+ Joseph Myers <joseph@codesourcery.com>
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -13,24 +13,28 @@ Version 2.20
+ 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16194, 16198, 16275,
+ 16284, 16287, 16315, 16348, 16349, 16354, 16357, 16362, 16447, 16516,
+ 16532, 16539, 16545, 16561, 16562, 16564, 16574, 16599, 16600, 16609,
+- 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, 16642,
+- 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, 16695,
+- 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, 16740,
+- 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16796,
+- 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, 16854,
+- 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, 16915,
+- 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, 16965,
+- 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
+- 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
+- 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
+- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
+-
++ 16610, 16611, 16613, 16617, 16619, 16623, 16629, 16632, 16634, 16639,
++ 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689,
++ 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739,
++ 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791,
++ 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849,
++ 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912,
++ 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958,
++ 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022,
++ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
++ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
++ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
++ 17625.
++
+ * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
+ under certain input conditions resulting in the execution of a shell for
+ command substitution when the applicaiton did not request it. The
+ implementation now checks WRDE_NOCMD immediately before executing the
+ shell and returns the error WRDE_CMDSUB as expected.
+
++* CVE-2012-3406 printf-style functions could run into a stack overflow when
++ processing format strings with a large number of format specifiers.
++
+ * Reverted change of ABI data structures for s390 and s390x:
+ On s390 and s390x the size of struct ucontext and jmp_buf was increased in
+ 2.19. This change is reverted in 2.20. The introduced 2.19 symbol versions
+Index: git/stdio-common/bug23-2.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-2.c
+@@ -0,0 +1,70 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++static const char expected[] = "\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
++
++static int
++do_test (void)
++{
++ char *buf = malloc (strlen (expected) + 1);
++ snprintf (buf, strlen (expected) + 1,
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
++ "a", "b", "c", "d", 5);
++ return strcmp (buf, expected) != 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+Index: git/stdio-common/bug23-3.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-3.c
+@@ -0,0 +1,50 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++int
++do_test (void)
++{
++ size_t instances = 16384;
++#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++ const char *item = "\na\nabbcd55";
++#define X3 X0 X0 X0 X0 X0 X0 X0 X0
++#define X6 X3 X3 X3 X3 X3 X3 X3 X3
++#define X9 X6 X6 X6 X6 X6 X6 X6 X6
++#define X12 X9 X9 X9 X9 X9 X9 X9 X9
++#define X14 X12 X12 X12 X12
++#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%"
++#define TRAILER2 TRAILER TRAILER
++ size_t length = instances * strlen (item) + strlen (TRAILER) + 1;
++
++ char *buf = malloc (length + 1);
++ snprintf (buf, length + 1,
++ X14 TRAILER2 "\n",
++ "a", "b", "c", "d", 5);
++
++ const char *p = buf;
++ size_t i;
++ for (i = 0; i < instances; ++i)
++ {
++ const char *expected;
++ for (expected = item; *expected; ++expected)
++ {
++ if (*p != *expected)
++ {
++ printf ("mismatch at offset %zu (%zu): expected %d, got %d\n",
++ (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF);
++ return 1;
++ }
++ ++p;
++ }
++ }
++ if (strcmp (p, TRAILER "\n") != 0)
++ {
++ printf ("mismatch at trailer: [%s]\n", p);
++ return 1;
++ }
++ free (buf);
++ return 0;
++}
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+Index: git/stdio-common/bug23-4.c
+===================================================================
+--- /dev/null
++++ git/stdio-common/bug23-4.c
+@@ -0,0 +1,31 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/resource.h>
++
++#define LIMIT 1000000
++
++int
++main (void)
++{
++ struct rlimit lim;
++ getrlimit (RLIMIT_STACK, &lim);
++ lim.rlim_cur = 1048576;
++ setrlimit (RLIMIT_STACK, &lim);
++ char *fmtstr = malloc (4 * LIMIT + 1);
++ if (fmtstr == NULL)
++ abort ();
++ char *output = malloc (LIMIT + 1);
++ if (output == NULL)
++ abort ();
++ for (size_t i = 0; i < LIMIT; i++)
++ memcpy (fmtstr + 4 * i, "%1$d", 4);
++ fmtstr[4 * LIMIT] = '\0';
++ int ret = snprintf (output, LIMIT + 1, fmtstr, 0);
++ if (ret != LIMIT)
++ abort ();
++ for (size_t i = 0; i < LIMIT; i++)
++ if (output[i] != '0')
++ abort ();
++ return 0;
++}
+Index: git/stdio-common/vfprintf.c
+===================================================================
+--- git.orig/stdio-common/vfprintf.c
++++ git/stdio-common/vfprintf.c
+@@ -276,6 +276,12 @@ vfprintf (FILE *s, const CHAR_T *format,
+ /* For the argument descriptions, which may be allocated on the heap. */
+ void *args_malloced = NULL;
+
++ /* For positional argument handling. */
++ struct printf_spec *specs;
++
++ /* Track if we malloced the SPECS array and thus must free it. */
++ bool specs_malloced = false;
++
+ /* This table maps a character into a number representing a
+ class. In each step there is a destination label for each
+ class. */
+@@ -1699,8 +1705,8 @@ do_positional:
+ size_t nspecs = 0;
+ /* A more or less arbitrary start value. */
+ size_t nspecs_size = 32 * sizeof (struct printf_spec);
+- struct printf_spec *specs = alloca (nspecs_size);
+
++ specs = alloca (nspecs_size);
+ /* The number of arguments the format string requests. This will
+ determine the size of the array needed to store the argument
+ attributes. */
+@@ -1743,11 +1749,39 @@ do_positional:
+ if (nspecs * sizeof (*specs) >= nspecs_size)
+ {
+ /* Extend the array of format specifiers. */
++ if (nspecs_size * 2 < nspecs_size)
++ {
++ __set_errno (ENOMEM);
++ done = -1;
++ goto all_done;
++ }
+ struct printf_spec *old = specs;
+- specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++ if (__libc_use_alloca (2 * nspecs_size))
++ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++ else
++ {
++ nspecs_size *= 2;
++ specs = malloc (nspecs_size);
++ if (specs == NULL)
++ {
++ __set_errno (ENOMEM);
++ specs = old;
++ done = -1;
++ goto all_done;
++ }
++ }
+
+ /* Copy the old array's elements to the new space. */
+ memmove (specs, old, nspecs * sizeof (*specs));
++
++ /* If we had previously malloc'd space for SPECS, then
++ release it after the copy is complete. */
++ if (specs_malloced)
++ free (old);
++
++ /* Now set SPECS_MALLOCED if needed. */
++ if (!__libc_use_alloca (nspecs_size))
++ specs_malloced = true;
+ }
+
+ /* Parse the format specifier. */
+@@ -2068,6 +2102,8 @@ do_positional:
+ }
+
+ all_done:
++ if (specs_malloced)
++ free (specs);
+ if (__glibc_unlikely (args_malloced != NULL))
+ free (args_malloced);
+ if (__glibc_unlikely (workstart != NULL))
+Index: git/stdio-common/Makefile
+===================================================================
+--- git.orig/stdio-common/Makefile
++++ git/stdio-common/Makefile
+@@ -66,7 +66,7 @@ tests := tstscanf test_rdwr test-popen t
+ tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
+ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
+ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \
+- tst-printf-round bug26
++ tst-printf-round bug23-2 bug23-3 bug23-4
+
+ tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch
new file mode 100644
index 0000000000..d95d182dc4
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch
@@ -0,0 +1,215 @@
+From a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c Mon Sep 17 00:00:00 2001
+From: Carlos O'Donell <carlos@redhat.com>
+Date: Wed, 19 Nov 2014 11:44:12 -0500
+Subject: [PATCH] CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.
+
+The function wordexp() fails to properly handle the WRDE_NOCMD
+flag when processing arithmetic inputs in the form of "$((... ``))"
+where "..." can be anything valid. The backticks in the arithmetic
+epxression are evaluated by in a shell even if WRDE_NOCMD forbade
+command substitution. This allows an attacker to attempt to pass
+dangerous commands via constructs of the above form, and bypass
+the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
+in exec_comm(), the only place that can execute a shell. All other
+checks for WRDE_NOCMD are superfluous and removed.
+
+We expand the testsuite and add 3 new regression tests of roughly
+the same form but with a couple of nested levels.
+
+On top of the 3 new tests we add fork validation to the WRDE_NOCMD
+testing. If any forks are detected during the execution of a wordexp()
+call with WRDE_NOCMD, the test is marked as failed. This is slightly
+heuristic since vfork might be used in the future, but it provides a
+higher level of assurance that no shells were executed as part of
+command substitution with WRDE_NOCMD in effect. In addition it doesn't
+require libpthread or libdl, instead we use the public implementation
+namespace function __register_atfork (already part of the public ABI
+for libpthread).
+
+Tested on x86_64 with no regressions.
+---
+ ChangeLog | 22 ++++++++++++++++++++++
+ NEWS | 8 +++++++-
+ posix/wordexp-test.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ posix/wordexp.c | 16 ++++------------
+ 4 files changed, 77 insertions(+), 13 deletions(-)
+
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,24 @@
++2014-11-19 Carlos O'Donell <carlos@redhat.com>
++ Florian Weimer <fweimer@redhat.com>
++ Joseph Myers <joseph@codesourcery.com>
++ Adam Conrad <adconrad@0c3.net>
++ Andreas Schwab <schwab@suse.de>
++ Brooks <bmoses@google.com>
++
++ [BZ #17625]
++ * wordexp-test.c (__dso_handle): Add prototype.
++ (__register_atfork): Likewise.
++ (__app_register_atfork): New function.
++ (registered_forks): New global.
++ (register_fork): New function.
++ (test_case): Add 3 new tests for WRDE_CMDSUB.
++ (main): Call __app_register_atfork.
++ (testit): If WRDE_NOCMD set registered_forks to zero, run test, and if
++ fork count is non-zero fail the test.
++ * posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag
++ is set.
++ (parse_dollars): Remove check for WRDE_NOCMD.
++
+ 2014-09-07 Allan McRae <allan@archlinux.org
+
+ * version.h (RELEASE): Set to "stable".
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -23,7 +23,13 @@ Version 2.20
+ 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031,
+ 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079,
+ 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153,
+- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354.
++ 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625.
++
++* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
++ under certain input conditions resulting in the execution of a shell for
++ command substitution when the applicaiton did not request it. The
++ implementation now checks WRDE_NOCMD immediately before executing the
++ shell and returns the error WRDE_CMDSUB as expected.
+
+ * Reverted change of ABI data structures for s390 and s390x:
+ On s390 and s390x the size of struct ucontext and jmp_buf was increased in
+Index: git/posix/wordexp-test.c
+===================================================================
+--- git.orig/posix/wordexp-test.c
++++ git/posix/wordexp-test.c
+@@ -27,6 +27,25 @@
+
+ #define IFS " \n\t"
+
++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
++
++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
++{
++ return __register_atfork (prepare, parent, child,
++ &__dso_handle == NULL ? NULL : __dso_handle);
++}
++
++/* Number of forks seen. */
++static int registered_forks;
++
++/* For each fork increment the fork count. */
++static void
++register_fork (void)
++{
++ registered_forks++;
++}
++
+ struct test_case_struct
+ {
+ int retval;
+@@ -206,6 +225,12 @@ struct test_case_struct
+ { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
+ { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
+ { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
++ /* Test for CVE-2014-7817. We test 3 combinations of command
++ substitution inside an arithmetic expression to make sure that
++ no commands are executed and error is returned. */
++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
+
+ { -1, NULL, NULL, 0, 0, { NULL, }, IFS },
+ };
+@@ -258,6 +283,15 @@ main (int argc, char *argv[])
+ return -1;
+ }
+
++ /* If we are not allowed to do command substitution, we install
++ fork handlers to verify that no forks happened. No forks should
++ happen at all if command substitution is disabled. */
++ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
++ {
++ printf ("Failed to register fork handler.\n");
++ return -1;
++ }
++
+ for (test = 0; test_case[test].retval != -1; test++)
+ if (testit (&test_case[test]))
+ ++fail;
+@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
+
+ printf ("Test %d (%s): ", ++tests, tc->words);
+
++ if (tc->flags & WRDE_NOCMD)
++ registered_forks = 0;
++
+ if (tc->flags & WRDE_APPEND)
+ {
+ /* initial wordexp() call, to be appended to */
+@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
+ }
+ retval = wordexp (tc->words, &we, tc->flags);
+
++ if ((tc->flags & WRDE_NOCMD)
++ && (registered_forks > 0))
++ {
++ printf ("FAILED fork called for WRDE_NOCMD\n");
++ return 1;
++ }
++
+ if (tc->flags & WRDE_DOOFFS)
+ start_offs = sav_we.we_offs;
+
+Index: git/posix/wordexp.c
+===================================================================
+--- git.orig/posix/wordexp.c
++++ git/posix/wordexp.c
+@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size
+ pid_t pid;
+ int noexec = 0;
+
++ /* Do nothing if command substitution should not succeed. */
++ if (flags & WRDE_NOCMD)
++ return WRDE_CMDSUB;
++
+ /* Don't fork() unless necessary */
+ if (!comm || !*comm)
+ return 0;
+@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word
+ }
+ }
+
+- if (flags & WRDE_NOCMD)
+- return WRDE_CMDSUB;
+-
+ (*offset) += 2;
+ return parse_comm (word, word_length, max_length, words, offset, flags,
+ quoted? NULL : pwordexp, ifs, ifs_white);
+@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_
+ break;
+
+ case '`':
+- if (flags & WRDE_NOCMD)
+- return WRDE_CMDSUB;
+-
+ ++(*offset);
+ error = parse_backtick (word, word_length, max_length, words,
+ offset, flags, NULL, NULL, NULL);
+@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *p
+ break;
+
+ case '`':
+- if (flags & WRDE_NOCMD)
+- {
+- error = WRDE_CMDSUB;
+- goto do_error;
+- }
+-
+ ++words_offset;
+ error = parse_backtick (&word, &word_length, &max_length, words,
+ &words_offset, flags, pwordexp, ifs,
diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch
new file mode 100644
index 0000000000..ba1da67b76
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch
@@ -0,0 +1,65 @@
+CVE-2014-9402 endless loop in getaddr_r
+
+
+https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=11e3417af6e354f1942c68a271ae51e892b2814d
+
+Upstream-Status: Backport
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+From 11e3417af6e354f1942c68a271ae51e892b2814d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 15 Dec 2014 17:41:13 +0100
+Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630]
+
+---
+ ChangeLog | 6 ++++++
+ NEWS | 7 +++++--
+ resolv/nss_dns/dns-network.c | 4 ++--
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+Index: git/NEWS
+===================================================================
+--- git.orig/NEWS
++++ git/NEWS
+@@ -24,7 +24,10 @@ Version 2.20
+ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078,
+ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150,
+ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354,
+- 17625.
++ 17625, 17630.
++
++* The nss_dns implementation of getnetbyname could run into an infinite loop
++ if the DNS response contained a PTR record of an unexpected format.
+
+ * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
+ under certain input conditions resulting in the execution of a shell for
+Index: git/resolv/nss_dns/dns-network.c
+===================================================================
+--- git.orig/resolv/nss_dns/dns-network.c
++++ git/resolv/nss_dns/dns-network.c
+@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int
+
+ case BYNAME:
+ {
+- char **ap = result->n_aliases++;
+- while (*ap != NULL)
++ char **ap;
++ for (ap = result->n_aliases; *ap != NULL; ++ap)
+ {
+ /* Check each alias name for being of the forms:
+ 4.3.2.1.in-addr.arpa = net 1.2.3.4
+Index: git/ChangeLog
+===================================================================
+--- git.orig/ChangeLog
++++ git/ChangeLog
+@@ -1,3 +1,9 @@
++2014-12-16 Florian Weimer <fweimer@redhat.com>
++
++ [BZ #17630]
++ * resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias
++ names.
++
+ 2014-12-15 Jeff Law <law@redhat.com>
+
+ [BZ #16617]
diff --git a/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch b/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch
new file mode 100644
index 0000000000..e858bfaeda
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch
@@ -0,0 +1,529 @@
+Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
+so we should use GLRO_dl_debug_mask
+
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/elf/dl-open.c
+===================================================================
+--- git.orig/elf/dl-open.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/dl-open.c 2014-08-27 05:05:25.656070587 +0000
+@@ -147,7 +147,7 @@
+ ns->_ns_main_searchlist->r_list[new_nlist++] = map;
+
+ /* We modify the global scope. Report this. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
+ map->l_name, map->l_ns);
+ }
+@@ -243,7 +243,7 @@
+ if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
+ {
+ /* Let the user know about the opencount. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
+ new->l_name, new->l_ns, new->l_direct_opencount);
+
+@@ -294,7 +294,7 @@
+ LIBC_PROBE (map_complete, 3, args->nsid, r, new);
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_show_scope (new, 0);
+
+ /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
+@@ -511,7 +511,7 @@
+ }
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ _dl_show_scope (imap, from_scope);
+ }
+
+@@ -584,7 +584,7 @@
+ #endif
+
+ /* Let the user know about the opencount. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
+ new->l_name, new->l_ns, new->l_direct_opencount);
+ }
+Index: git/elf/rtld.c
+===================================================================
+--- git.orig/elf/rtld.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/rtld.c 2014-08-27 05:12:33.812070587 +0000
+@@ -321,7 +321,7 @@
+ }
+ #endif
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
+ {
+ #ifndef HP_TIMING_NONAVAIL
+ print_statistics (&rtld_total_time);
+@@ -1699,7 +1699,7 @@
+ after relocation. */
+ struct link_map *l;
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ {
+ struct r_scope_elem *scope = &main_map->l_searchlist;
+
+@@ -1729,7 +1729,7 @@
+ _dl_printf ("\n");
+ }
+ }
+- else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
++ else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
+ {
+ /* Look through the dependencies of the main executable
+ and determine which of them is not actually
+@@ -1837,7 +1837,7 @@
+ }
+ }
+
+- if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ && rtld_multiple_ref)
+ {
+ /* Mark the link map as not yet relocated again. */
+@@ -1970,7 +1970,7 @@
+ if (r_list == r_listend && liblist == liblistend)
+ prelinked = true;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("\nprelink checking: %s\n",
+ prelinked ? "ok" : "failed");
+ }
+@@ -1988,7 +1988,7 @@
+ GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
+ /* Print scope information. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
+ {
+ _dl_debug_printf ("\nInitial object scopes\n");
+
+@@ -2262,7 +2262,7 @@
+ if (debopts[cnt].len == len
+ && memcmp (dl_debug, debopts[cnt].name, len) == 0)
+ {
+- GLRO(dl_debug_mask) |= debopts[cnt].mask;
++ GLRO_dl_debug_mask |= debopts[cnt].mask;
+ any_debug = 1;
+ break;
+ }
+@@ -2283,7 +2283,7 @@
+ ++dl_debug;
+ }
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
++ if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
+ {
+ /* In order to get an accurate picture of whether a particular
+ DT_NEEDED entry is actually used we have to process both
+@@ -2291,7 +2291,7 @@
+ GLRO(dl_lazy) = 0;
+ }
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
++ if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
+ {
+ size_t cnt;
+
+@@ -2490,7 +2490,7 @@
+ {
+ mode = trace;
+ GLRO(dl_verbose) = 1;
+- GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
++ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
+ GLRO(dl_trace_prelink) = &envline[17];
+ }
+ break;
+@@ -2537,7 +2537,7 @@
+ if (__access ("/etc/suid-debug", F_OK) != 0)
+ {
+ unsetenv ("MALLOC_CHECK_");
+- GLRO(dl_debug_mask) = 0;
++ GLRO_dl_debug_mask = 0;
+ }
+
+ if (mode != normal)
+Index: git/elf/dl-lookup.c
+===================================================================
+--- git.orig/elf/dl-lookup.c 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/dl-lookup.c 2014-08-27 05:13:07.644070587 +0000
+@@ -300,7 +300,7 @@
+ hash table. */
+ if (__glibc_unlikely (tab->size))
+ {
+- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
++ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
+ goto success;
+ }
+ #endif
+@@ -375,7 +375,7 @@
+ continue;
+
+ /* Print some debugging info if wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
+ _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
+ undef_name, DSO_FILENAME (map->l_name),
+ map->l_ns);
+@@ -698,7 +698,7 @@
+ }
+
+ /* Display information if we are debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\
+ \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
+ DSO_FILENAME (map->l_name),
+@@ -802,7 +802,7 @@
+ {
+ if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
+ && skip_map == NULL
+- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
++ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
+ {
+ /* We could find no value for a strong reference. */
+ const char *reference_name = undef_map ? undef_map->l_name : "";
+@@ -873,7 +873,7 @@
+ if (__glibc_unlikely (current_value.m->l_used == 0))
+ current_value.m->l_used = 1;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask)
++ if (__glibc_unlikely (GLRO_dl_debug_mask
+ & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
+ _dl_debug_bindings (undef_name, undef_map, ref,
+ &current_value, version, type_class, protected);
+@@ -938,7 +938,7 @@
+ {
+ const char *reference_name = undef_map->l_name;
+
+- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
++ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
+ {
+ _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
+ DSO_FILENAME (reference_name),
+@@ -952,7 +952,7 @@
+ _dl_debug_printf_c ("\n");
+ }
+ #ifdef SHARED
+- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
++ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
+ {
+ int conflict = 0;
+ struct sym_val val = { NULL, NULL };
+Index: git/elf/get-dynamic-info.h
+===================================================================
+--- git.orig/elf/get-dynamic-info.h 2014-08-27 05:03:59.732070587 +0000
++++ git/elf/get-dynamic-info.h 2014-08-27 05:03:59.728070587 +0000
+@@ -157,7 +157,7 @@
+ them. Therefore to avoid breaking existing applications the
+ best we can do is add a warning during debugging with the
+ intent of notifying the user of the problem. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
+ && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
+ _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
+ l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
+Index: git/csu/libc-start.c
+===================================================================
+--- git.orig/csu/libc-start.c 2014-08-27 04:59:01.412070587 +0000
++++ git/csu/libc-start.c 2014-08-27 05:09:28.936070587 +0000
+@@ -238,7 +238,7 @@
+
+ /* Call the initializer of the program, if any. */
+ #ifdef SHARED
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
+ #endif
+ if (init)
+@@ -261,7 +261,7 @@
+ #endif
+
+ #ifdef SHARED
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
+ #endif
+
+Index: git/elf/dl-cache.c
+===================================================================
+--- git.orig/elf/dl-cache.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-cache.c 2014-08-27 05:10:14.384070587 +0000
+@@ -187,7 +187,7 @@
+ const char *best;
+
+ /* Print a message if the loading of libs is traced. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
+
+ if (cache == NULL)
+@@ -285,7 +285,7 @@
+ }
+
+ /* Print our result if wanted. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)
+ && best != NULL)
+ _dl_debug_printf (" trying file=%s\n", best);
+
+Index: git/elf/dl-close.c
+===================================================================
+--- git.orig/elf/dl-close.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-close.c 2014-08-27 05:10:26.456070587 +0000
+@@ -125,7 +125,7 @@
+ dl_close_state = rerun;
+
+ /* There are still references to this object. Do nothing more. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n",
+ map->l_name, map->l_direct_opencount);
+
+@@ -257,7 +257,7 @@
+ if (imap->l_init_called)
+ {
+ /* When debugging print a message first. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS,
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS,
+ 0))
+ _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
+ imap->l_name, nsid);
+@@ -664,7 +664,7 @@
+ free (imap->l_reldeps);
+
+ /* Print debugging message. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\nfile=%s [%lu]; destroying link map\n",
+ imap->l_name, imap->l_ns);
+
+Index: git/elf/dl-conflict.c
+===================================================================
+--- git.orig/elf/dl-conflict.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-conflict.c 2014-08-27 05:10:37.652070587 +0000
+@@ -32,7 +32,7 @@
+ ElfW(Rela) *conflictend)
+ {
+ #if ! ELF_MACHINE_NO_RELA
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
+ _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
+
+ {
+Index: git/elf/dl-deps.c
+===================================================================
+--- git.orig/elf/dl-deps.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-deps.c 2014-08-27 05:10:48.260070587 +0000
+@@ -127,7 +127,7 @@
+ else \
+ { \
+ /* This is for DT_AUXILIARY. */ \
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) \
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)) \
+ _dl_debug_printf (N_("\
+ cannot load auxiliary `%s' because of empty dynamic string token " \
+ "substitution\n"), __str); \
+@@ -303,7 +303,7 @@
+ args.name = name;
+
+ /* Say that we are about to load an auxiliary library. */
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS,
+ 0))
+ _dl_debug_printf ("load auxiliary object=%s"
+ " requested by file=%s\n",
+@@ -520,7 +520,7 @@
+ runp->map->l_reserved = 0;
+ }
+
+- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
++ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_PRELINK, 0) != 0
+ && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
+ {
+ /* If we are to compute conflicts, we have to build local scope
+Index: git/elf/dl-error.c
+===================================================================
+--- git.orig/elf/dl-error.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-error.c 2014-08-27 05:11:06.752070587 +0000
+@@ -139,7 +139,7 @@
+ _dl_signal_cerror (int errcode, const char *objname, const char *occation,
+ const char *errstring)
+ {
+- if (__builtin_expect (GLRO(dl_debug_mask)
++ if (__builtin_expect (GLRO_dl_debug_mask
+ & ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
+ _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation,
+ errstring, receiver ? "continued" : "fatal");
+Index: git/elf/dl-fini.c
+===================================================================
+--- git.orig/elf/dl-fini.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-fini.c 2014-08-27 05:11:17.544070587 +0000
+@@ -234,7 +234,7 @@
+ || l->l_info[DT_FINI] != NULL)
+ {
+ /* When debugging print a message first. */
+- if (__builtin_expect (GLRO(dl_debug_mask)
++ if (__builtin_expect (GLRO_dl_debug_mask
+ & DL_DEBUG_IMPCALLS, 0))
+ _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
+ DSO_FILENAME (l->l_name),
+@@ -286,7 +286,7 @@
+ goto again;
+ }
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
+ _dl_debug_printf ("\nruntime linker statistics:\n"
+ " final number of relocations: %lu\n"
+ "final number of relocations from cache: %lu\n",
+Index: git/elf/dl-init.c
+===================================================================
+--- git.orig/elf/dl-init.c 2014-08-27 04:59:01.568070587 +0000
++++ git/elf/dl-init.c 2014-08-27 05:11:28.372070587 +0000
+@@ -52,7 +52,7 @@
+ return;
+
+ /* Print a debug message if wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ _dl_debug_printf ("\ncalling init: %s\n\n",
+ DSO_FILENAME (l->l_name));
+
+@@ -102,7 +102,7 @@
+ ElfW(Addr) *addrs;
+ unsigned int cnt;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
+ _dl_debug_printf ("\ncalling preinit: %s\n\n",
+ DSO_FILENAME (main_map->l_name));
+
+Index: git/elf/dl-load.c
+===================================================================
+--- git.orig/elf/dl-load.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-load.c 2014-08-27 05:11:41.156070587 +0000
+@@ -957,7 +957,7 @@
+ }
+
+ /* Print debugging message. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("file=%s [%lu]; generating link map\n", name, nsid);
+
+ /* This is the ELF header. We read it in `open_verify'. */
+@@ -1361,7 +1361,7 @@
+
+ l->l_entry += l->l_addr;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
+ _dl_debug_printf ("\
+ dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\
+ entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n",
+@@ -1787,7 +1787,7 @@
+
+ /* If we are debugging the search for libraries print the path
+ now if it hasn't happened now. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)
+ && current_what != this_dir->what)
+ {
+ current_what = this_dir->what;
+@@ -1808,7 +1808,7 @@
+ - buf);
+
+ /* Print name we try if this is wanted. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf (" trying file=%s\n", buf);
+
+ fd = open_verify (buf, fbp, loader, whatcode, mode,
+@@ -1953,7 +1953,7 @@
+ }
+
+ /* Display information if we are debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)
+ && loader != NULL)
+ _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
+ ? "\nfile=%s [%lu]; needed by %s [%lu]\n"
+@@ -1995,7 +1995,7 @@
+
+ size_t namelen = strlen (name) + 1;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid);
+
+ fd = -1;
+@@ -2122,7 +2122,7 @@
+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
+
+ /* Add another newline when we are tracing the library loading. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
+ _dl_debug_printf ("\n");
+ }
+ else
+@@ -2155,7 +2155,7 @@
+ if (__glibc_unlikely (fd == -1))
+ {
+ if (trace_mode
+- && __glibc_likely ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) == 0))
++ && __glibc_likely ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) == 0))
+ {
+ /* We haven't found an appropriate library. But since we
+ are only interested in the list of libraries this isn't
+Index: git/elf/dl-object.c
+===================================================================
+--- git.orig/elf/dl-object.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-object.c 2014-08-27 05:11:51.756070587 +0000
+@@ -98,7 +98,7 @@
+ new->l_type = type;
+ /* If we set the bit now since we know it is never used we avoid
+ dirtying the cache line later. */
+- if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
++ if ((GLRO_dl_debug_mask & DL_DEBUG_UNUSED) == 0)
+ new->l_used = 1;
+ new->l_loader = loader;
+ #if NO_TLS_OFFSET != 0
+Index: git/elf/dl-reloc.c
+===================================================================
+--- git.orig/elf/dl-reloc.c 2014-08-27 04:59:01.572070587 +0000
++++ git/elf/dl-reloc.c 2014-08-27 05:12:07.056070587 +0000
+@@ -183,7 +183,7 @@
+ && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
+ lazy = 0;
+
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
+ _dl_debug_printf ("\nrelocation processing: %s%s\n",
+ DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
+
+Index: git/elf/dl-version.c
+===================================================================
+--- git.orig/elf/dl-version.c 2014-08-27 04:59:01.608070587 +0000
++++ git/elf/dl-version.c 2014-08-27 05:12:19.568070587 +0000
+@@ -82,7 +82,7 @@
+ int result = 0;
+
+ /* Display information about what we are doing while debugging. */
+- if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS))
++ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_VERSIONS))
+ _dl_debug_printf ("\
+ checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
+ string, DSO_FILENAME (map->l_name),
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch b/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch
index cf5803585c..ffbaba14a2 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/IO-acquire-lock-fix.patch
+++ b/meta/recipes-core/glibc/glibc/IO-acquire-lock-fix.patch
@@ -2,11 +2,11 @@ import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
Upstream-Status: Pending
-Index: libc/bits/stdio-lock.h
+Index: git/bits/stdio-lock.h
===================================================================
---- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700
-+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700
-@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _
+--- git.orig/bits/stdio-lock.h 2014-08-29 10:33:57.960070587 -0700
++++ git/bits/stdio-lock.h 2014-08-29 10:33:57.952070587 -0700
+@@ -49,6 +49,8 @@
_IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
_IO_flockfile (_fp)
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch b/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch
index f5023c08d4..4559de7bc1 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/add_resource_h_to_wait_h.patch
+++ b/meta/recipes-core/glibc/glibc/add_resource_h_to_wait_h.patch
@@ -6,11 +6,11 @@ Upstream-Status: Inapproriate [older kernel/perf specific]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: libc/posix/sys/wait.h
+Index: git/posix/sys/wait.h
===================================================================
---- libc.orig/posix/sys/wait.h
-+++ libc/posix/sys/wait.h
-@@ -28,6 +28,7 @@
+--- git.orig/posix/sys/wait.h 2014-08-29 10:35:10.432070587 -0700
++++ git/posix/sys/wait.h 2014-08-29 10:35:10.424070587 -0700
+@@ -27,6 +27,7 @@
__BEGIN_DECLS
#include <signal.h>
diff --git a/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
new file mode 100644
index 0000000000..e1aa13926a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-header-bootstrap.patch
@@ -0,0 +1,85 @@
+Taken from EGLIBC, r1484 + r1525
+
+ 2007-02-20 Jim Blandy <jimb@codesourcery.com>
+
+ * Makefile (install-headers): Preserve old behavior: depend on
+ $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
+ is set; otherwise, place gnu/stubs.h on the 'install-others' list.
+
+ 2007-02-16 Jim Blandy <jimb@codesourcery.com>
+
+ * Makefile: Amend make install-headers to install everything
+ necessary for building a cross-compiler. Install gnu/stubs.h as
+ part of 'install-headers', not 'install-others'.
+ If install-bootstrap-headers is 'yes', install a dummy copy of
+ gnu/stubs.h, instead of computing the real thing.
+ * include/stubs-bootstrap.h: New file.
+
+Upstream-Status: Pending
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-08-27 18:35:18.908070587 +0000
++++ git/Makefile 2014-08-27 18:35:19.340070587 +0000
+@@ -69,9 +69,18 @@
+ vpath %.h $(subdir-dirs)
+
+ # What to install.
+-install-others = $(inst_includedir)/gnu/stubs.h
+ install-bin-script =
+
++# If we're bootstrapping, install a dummy gnu/stubs.h along with the
++# other headers, so 'make install-headers' produces a useable include
++# tree. Otherwise, install gnu/stubs.h later, after the rest of the
++# build is done.
++ifeq ($(install-bootstrap-headers),yes)
++install-headers: $(inst_includedir)/gnu/stubs.h
++else
++install-others = $(inst_includedir)/gnu/stubs.h
++endif
++
+ ifeq (yes,$(build-shared))
+ headers += gnu/lib-names.h
+ endif
+@@ -151,6 +160,16 @@
+
+ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
+
++# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o
++# files in EGLIBC. For bootstrapping a GCC/EGLIBC pair, an empty
++# gnu/stubs.h is good enough.
++ifeq ($(install-bootstrap-headers),yes)
++$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force)
++ $(make-target-directory)
++ $(INSTALL_DATA) $< $@
++
++installed-stubs =
++else
+ ifndef abi-variants
+ installed-stubs = $(inst_includedir)/gnu/stubs.h
+ else
+@@ -177,6 +196,7 @@
+
+ install-others-nosubdir: $(installed-stubs)
+ endif
++endif
+
+
+ # Since stubs.h is never needed when building the library, we simplify the
+Index: git/include/stubs-bootstrap.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/include/stubs-bootstrap.h 2014-08-27 18:35:19.340070587 +0000
+@@ -0,0 +1,12 @@
++/* Placeholder stubs.h file for bootstrapping.
++
++ When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC
++ headers be installed, but we can't fully build EGLIBC without that
++ GCC. So we run the command:
++
++ make install-headers install-bootstrap-headers=yes
++
++ to install the headers GCC needs, but avoid building certain
++ difficult headers. The <gnu/stubs.h> header depends, via the
++ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
++ an empty stubs.h like this will do fine for GCC. */
diff --git a/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch b/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch
new file mode 100644
index 0000000000..9a31255b09
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-install-pic-archives.patch
@@ -0,0 +1,109 @@
+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
+
+Index: git/Makerules
+===================================================================
+--- git.orig/Makerules 2014-08-27 18:49:22.552070587 +0000
++++ git/Makerules 2014-08-27 18:49:27.308070587 +0000
+@@ -612,6 +631,9 @@
+ $(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)
+@@ -834,6 +856,7 @@
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+@@ -862,6 +885,22 @@
+ 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
+@@ -1103,9 +1142,22 @@
+ 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: $(elfobjdir)/%.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: \
+@@ -1118,6 +1170,10 @@
+ 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.
+@@ -1127,7 +1183,8 @@
+
+ .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 \
diff --git a/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch b/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch
new file mode 100644
index 0000000000..bb83d6d36e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-ppc8xx-cache-line-workaround.patch
@@ -0,0 +1,68 @@
+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
+
+Index: git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:23.996070587 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c 2014-08-27 18:49:27.332070587 +0000
+@@ -24,9 +24,21 @@
+ /* 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;
+
+Index: git/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:23.996070587 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/libc-start.c 2014-08-27 18:49:27.332070587 +0000
+@@ -68,11 +68,24 @@
+ rtld_fini = NULL;
+ }
+
+- /* Initialize the __cache_line_size variable from the aux vector. */
++ /* Initialize the __cache_line_size variable from the aux vector.
++ 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;
+ }
diff --git a/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch b/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch
new file mode 100644
index 0000000000..a73bcebe34
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-resolv-dynamic.patch
@@ -0,0 +1,54 @@
+cherry-picked from http://www.eglibc.org/archives/patches/msg00772.html
+
+It hasnt yet been merged into glibc
+
+Signed-off-by: Khem Raj
+
+Upstream-Status: Pending
+
+Index: git/resolv/res_libc.c
+===================================================================
+--- git.orig/resolv/res_libc.c 2014-08-27 18:35:15.492070587 +0000
++++ git/resolv/res_libc.c 2014-08-27 18:35:19.204070587 +0000
+@@ -22,12 +22,13 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <bits/libc-lock.h>
+-
++#include <sys/stat.h>
+
+ /* The following bit is copied from res_data.c (where it is #ifdef'ed
+ out) since res_init() should go into libc.so but the rest of that
+ file should not. */
+
++__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
+@@ -35,7 +36,6 @@
+ # 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
+@@ -94,7 +94,18 @@
+ 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);
diff --git a/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch b/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch
new file mode 100644
index 0000000000..bfb813eb7c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-sh4-fpscr_values.patch
@@ -0,0 +1,42 @@
+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
+
+Index: git/sysdeps/unix/sysv/linux/sh/sysdep.S
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:24.036070587 +0000
++++ git/sysdeps/unix/sysv/linux/sh/sysdep.S 2014-08-27 18:49:27.332070587 +0000
+@@ -30,3 +30,14 @@
+
+ #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)
++
+Index: git/sysdeps/unix/sysv/linux/sh/Versions
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:24.028070587 +0000
++++ git/sysdeps/unix/sysv/linux/sh/Versions 2014-08-27 18:49:27.332070587 +0000
+@@ -2,6 +2,7 @@
+ GLIBC_2.2 {
+ # functions used in other libraries
+ __xstat64; __fxstat64; __lxstat64;
++ __fpscr_values;
+
+ # a*
+ alphasort64;
diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch
new file mode 100644
index 0000000000..f61d459e5c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch
@@ -0,0 +1,16543 @@
+Forward port eglibc options groups support
+
+Upstream-Status: Pending
+
+Index: git/argp/argp-fmtstream.c
+===================================================================
+--- git.orig/argp/argp-fmtstream.c 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-fmtstream.c 2014-08-29 20:01:15.188070587 -0700
+@@ -42,6 +42,7 @@
+ #ifdef _LIBC
+ # include <wchar.h>
+ # include <libio/libioP.h>
++# include <gnu/option-groups.h>
+ # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
+ #endif
+
+@@ -100,7 +101,11 @@
+ __argp_fmtstream_update (fs);
+ if (fs->p > fs->buf)
+ {
++#ifdef _LIBC
+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
++#else
++ fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
++#endif
+ }
+ free (fs->buf);
+ free (fs);
+@@ -145,9 +150,17 @@
+ size_t i;
+ for (i = 0; i < pad; i++)
+ {
++#ifdef _LIBC
+ if (_IO_fwide (fs->stream, 0) > 0)
+- putwc_unlocked (L' ', fs->stream);
++ {
++#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L' ', fs->stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked (' ', fs->stream);
+ }
+ }
+@@ -308,9 +321,17 @@
+ *nl++ = ' ';
+ else
+ for (i = 0; i < fs->wmargin; ++i)
++#ifdef _LIBC
+ if (_IO_fwide (fs->stream, 0) > 0)
+- putwc_unlocked (L' ', fs->stream);
++ {
++#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L' ', fs->stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked (' ', fs->stream);
+
+ /* Copy the tail of the original buffer into the current buffer
+Index: git/argp/argp-help.c
+===================================================================
+--- git.orig/argp/argp-help.c 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-help.c 2014-08-29 20:01:15.188070587 -0700
+@@ -51,6 +51,7 @@
+ #ifdef _LIBC
+ # include <../libio/libioP.h>
+ # include <wchar.h>
++# include <gnu/option-groups.h>
+ #endif
+
+ #ifndef _
+@@ -1702,7 +1703,7 @@
+ }
+
+ char *
+-__argp_short_program_name (void)
++(__argp_short_program_name) (void)
+ {
+ # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ return program_invocation_short_name;
+@@ -1873,9 +1874,17 @@
+ #endif
+ }
+
++#ifdef _LIBC
+ if (_IO_fwide (stream, 0) > 0)
+- putwc_unlocked (L'\n', stream);
++ {
++#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++ putwc_unlocked (L'\n', stream);
++#else
++ abort ();
++#endif
++ }
+ else
++#endif
+ putc_unlocked ('\n', stream);
+
+ #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+Index: git/argp/argp-namefrob.h
+===================================================================
+--- git.orig/argp/argp-namefrob.h 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/argp-namefrob.h 2014-08-29 20:01:15.192070587 -0700
+@@ -76,10 +76,12 @@
+ #undef __argp_fmtstream_wmargin
+ #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
++#if 0
+ #include "mempcpy.h"
+ #include "strcase.h"
+ #include "strchrnul.h"
+ #include "strndup.h"
++#endif
+
+ /* normal libc functions we call */
+ #undef __flockfile
+Index: git/argp/Makefile
+===================================================================
+--- git.orig/argp/Makefile 2014-08-29 20:00:42.976070587 -0700
++++ git/argp/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for argp.
+ #
++include ../option-groups.mak
++
+ subdir := argp
+
+ include ../Makeconfig
+Index: git/catgets/Makefile
+===================================================================
+--- git.orig/catgets/Makefile 2014-08-29 20:00:43.008070587 -0700
++++ git/catgets/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -22,20 +22,23 @@
+
+ include ../Makeconfig
+
++include ../option-groups.mak
++
+ headers = nl_types.h
+-routines = catgets open_catalog
+-others = gencat
+-install-bin = gencat
+-extra-objs = $(gencat-modules:=.o)
++routines-$(OPTION_EGLIBC_CATGETS) := catgets open_catalog
++others-$(OPTION_EGLIBC_CATGETS) := gencat
++install-bin-$(OPTION_EGLIBC_CATGETS) := gencat
++extra-objs-$(OPTION_EGLIBC_CATGETS) := $(gencat-modules:=.o)
+
+-tests = tst-catgets
+-test-srcs = test-gencat
++tests-$(OPTION_EGLIBC_CATGETS) := tst-catgets
++test-srcs-$(OPTION_EGLIBC_CATGETS) := test-gencat
+
++ifeq (y,$(OPTION_EGLIBC_CATGETS))
+ ifeq ($(run-built-tests),yes)
+ tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
+ $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
+ endif
+-
++endif
+ gencat-modules = xmalloc
+
+ # To find xmalloc.c
+Index: git/crypt/crypt-entry.c
+===================================================================
+--- git.orig/crypt/crypt-entry.c 2014-08-29 20:00:43.028070587 -0700
++++ git/crypt/crypt-entry.c 2014-08-29 20:01:15.192070587 -0700
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #endif
+ #include <string.h>
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <fips-private.h>
+
+@@ -76,9 +77,11 @@
+ const char *salt;
+ struct crypt_data * __restrict data;
+ {
++#if __OPTION_EGLIBC_CRYPT_UFC
+ ufc_long res[4];
+ char ktab[9];
+ ufc_long xx = 25; /* to cope with GCC long long compiler bugs */
++#endif /*__OPTION_EGLIBC_CRYPT_UFC*/
+
+ #ifdef _LIBC
+ /* Try to find out whether we have to use MD5 encryption replacement. */
+@@ -105,6 +108,7 @@
+ sizeof (struct crypt_data));
+ #endif
+
++#if __OPTION_EGLIBC_CRYPT_UFC
+ /*
+ * Hack DES tables according to salt
+ */
+@@ -144,6 +148,10 @@
+ */
+ _ufc_output_conversion_r (res[0], res[1], salt, data);
+ return data->crypt_3_buf;
++#else /* __OPTION_EGLIBC_CRYPT_UFC */
++ __set_errno (ENOSYS);
++ return NULL;
++#endif /* __OPTION_EGLIBC_CRYPT_UFC */
+ }
+ weak_alias (__crypt_r, crypt_r)
+
+@@ -168,7 +176,12 @@
+ return __sha512_crypt (key, salt);
+ #endif
+
++#if __OPTION_EGLIBC_CRYPT_UFC
+ return __crypt_r (key, salt, &_ufc_foobar);
++#else /* __OPTION_EGLIBC_CRYPT_UFC */
++ __set_errno (ENOSYS);
++ return NULL;
++#endif /* __OPTION_EGLIBC_CRYPT_UFC */
+ }
+
+
+Index: git/crypt/Makefile
+===================================================================
+--- git.orig/crypt/Makefile 2014-08-29 20:00:43.024070587 -0700
++++ git/crypt/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,21 +18,25 @@
+ #
+ # Sub-makefile for crypt() portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := crypt
+
+ include ../Makeconfig
+
+ headers := crypt.h
+
+-extra-libs := libcrypt
+-extra-libs-others := $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_CRYPT) := libcrypt
++extra-libs-others-y := $(extra-libs-y)
+
+-libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
+- crypt_util
++libcrypt-routines :=crypt-entry md5-crypt sha256-crypt sha512-crypt crypt_common
++libcrypt-routines-$(OPTION_EGLIBC_CRYPT_UFC) := crypt crypt_util
++libcrypt-routines += $(libcrypt-routines-y)
+
+-tests := cert md5c-test sha256c-test sha512c-test badsalttest
++tests-$(OPTION_EGLIBC_CRYPT) := md5c-test sha256c-test sha512c-test badsalttest
++tests-$(OPTION_EGLIBC_CRYPT_UFC) += cert
+
+-ifeq ($(crypt-in-libc),yes)
++ifeq ($(crypt-in-libc)$(OPTION_EGLIBC_CRYPT),yesy)
+ routines += $(libcrypt-routines)
+ endif
+
+@@ -44,7 +48,7 @@
+ else
+ libcrypt-routines += md5 sha256 sha512
+
+-tests += md5test sha256test sha512test
++tests-$(OPTION_EGLIBC_CRYPT) += md5test sha256test sha512test
+
+ # The test md5test-giant uses up to 400 MB of RSS and runs on a fast
+ # machine over a minute.
+@@ -64,8 +68,10 @@
+ $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
+ endif
+
++ifeq ($(OPTION_EGLIBC_CRYPT),y)
+ ifeq (yes,$(build-shared))
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
+ else
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
+ endif
++endif # eglibc: OPTION_EGLIBC_CRYPT
+Index: git/csu/Makefile
+===================================================================
+--- git.orig/csu/Makefile 2014-08-29 20:00:43.032070587 -0700
++++ git/csu/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -22,6 +22,8 @@
+ # crtn.o, special "initializer" and "finalizer" files used in the link
+ # to make the .init and .fini sections work right.
+
++include ../option-groups.mak
++
+ subdir := csu
+
+ include ../Makeconfig
+Index: git/debug/Makefile
+===================================================================
+--- git.orig/debug/Makefile 2014-08-29 20:00:43.036070587 -0700
++++ git/debug/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for debug portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := debug
+
+ include ../Makeconfig
+@@ -27,7 +29,7 @@
+ # Note that ptsname_r_chk and getlogin_r are not here, but in
+ # login/Makefile instead. If that subdir is omitted from the
+ # build, its _FORTIFY_SOURCE support will be too.
+-routines = backtrace backtracesyms backtracesymsfd noophooks \
++routines = noophooks \
+ memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
+ strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
+ sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
+@@ -36,20 +38,27 @@
+ read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
+ readlink_chk readlinkat_chk getwd_chk getcwd_chk \
+ realpath_chk fread_chk fread_u_chk \
+- wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
+- wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
+- wcpncpy_chk \
+- swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
+- vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
+ confstr_chk getgroups_chk ttyname_r_chk \
+- gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
+- wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
+- wcstombs_chk asprintf_chk vasprintf_chk dprintf_chk \
++ gethostname_chk getdomainname_chk \
++ asprintf_chk vasprintf_chk dprintf_chk \
+ vdprintf_chk obprintf_chk \
+ longjmp_chk ____longjmp_chk \
+ fdelt_chk poll_chk ppoll_chk \
+ stack_chk_fail fortify_fail \
+ $(static-only-routines)
++routines-$(OPTION_EGLIBC_BACKTRACE) += backtrace backtracesyms backtracesymsfd
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += wprintf_chk fwprintf_chk \
++ vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
++ wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
++ wcpncpy_chk \
++ swprintf_chk vswprintf_chk \
++ wcrtomb_chk mbsnrtowcs_chk \
++ wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
++ wcstombs_chk
++
+ static-only-routines := warning-nop stack_chk_fail_local
+
+ CFLAGS-backtrace.c = -fno-omit-frame-pointer
+@@ -129,11 +138,15 @@
+ LDFLAGS-tst-backtrace5 = -rdynamic
+ LDFLAGS-tst-backtrace6 = -rdynamic
+
+-tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
+- tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
+- tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
+- tst-longjmp_chk2 tst-backtrace2 tst-backtrace3 tst-backtrace4 \
+- tst-backtrace5 tst-backtrace6
++tests = tst-longjmp_chk test-strcpy_chk test-stpcpy_chk tst-longjmp_chk2
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-chk1 tst-chk2 tst-chk3 tst-lfschk1 tst-lfschk2 tst-lfschk3
++tests-$(OPTION_EGLIBC_BACKTRACE) \
++ += backtrace-tst tst-backtrace2 tst-backtrace3 tst-backtrace4 \
++ tst-backtrace5 tst-backtrace6
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_EGLIBC_CXX_TESTS))
++tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6
++endif
+
+ tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc)
+ tests += $(tests-ifunc)
+Index: git/debug/segfault.c
+===================================================================
+--- git.orig/debug/segfault.c 2014-08-29 20:00:46.280070587 -0700
++++ git/debug/segfault.c 2014-08-29 20:01:15.192070587 -0700
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <_itoa.h>
+ #include <ldsodefs.h>
++#include <gnu/option-groups.h>
+
+ /* This file defines macros to access the content of the sigcontext element
+ passed up by the signal handler. */
+@@ -91,6 +92,7 @@
+ REGISTER_DUMP;
+ #endif
+
++#if __OPTION_EGLIBC_BACKTRACE
+ WRITE_STRING ("\nBacktrace:\n");
+
+ /* Get the backtrace. */
+@@ -113,6 +115,7 @@
+
+ /* Now generate nicely formatted output. */
+ __backtrace_symbols_fd (arr + i, cnt - i, fd);
++#endif
+
+ #ifdef HAVE_PROC_SELF
+ /* Now the link map. */
+Index: git/debug/tst-chk1.c
+===================================================================
+--- git.orig/debug/tst-chk1.c 2014-08-29 20:00:46.288070587 -0700
++++ git/debug/tst-chk1.c 2014-08-29 20:01:15.192070587 -0700
+@@ -31,6 +31,7 @@
+ #include <sys/select.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <gnu/option-groups.h>
+
+
+ #define obstack_chunk_alloc malloc
+@@ -307,6 +308,7 @@
+ snprintf (buf + 8, l0 + 3, "%d", num2);
+ CHK_FAIL_END
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ CHK_FAIL_START
+ swprintf (wbuf + 8, 3, L"%d", num1);
+ CHK_FAIL_END
+@@ -314,6 +316,7 @@
+ CHK_FAIL_START
+ swprintf (wbuf + 8, l0 + 3, L"%d", num1);
+ CHK_FAIL_END
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+ # endif
+
+ memcpy (buf, str1 + 2, l0 + 9);
+@@ -381,6 +384,7 @@
+ CHK_FAIL_END
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+
+ /* These ops can be done without runtime checking of object size. */
+ wmemcpy (wbuf, L"abcdefghij", 10);
+@@ -605,6 +609,7 @@
+ CHK_FAIL_END
+ #endif
+
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ /* Now checks for %n protection. */
+
+@@ -1192,6 +1197,7 @@
+ # endif
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (setlocale (LC_ALL, "de_DE.UTF-8") != NULL)
+ {
+ assert (MB_CUR_MAX <= 10);
+@@ -1348,6 +1354,7 @@
+ puts ("cannot set locale");
+ ret = 1;
+ }
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ int fd = posix_openpt (O_RDWR);
+ if (fd != -1)
+Index: git/dlfcn/Makefile
+===================================================================
+--- git.orig/dlfcn/Makefile 2014-08-29 20:00:46.312070587 -0700
++++ git/dlfcn/Makefile 2014-08-29 20:01:15.192070587 -0700
+@@ -15,6 +15,8 @@
+ # License along with the GNU C Library; if not, see
+ # <http://www.gnu.org/licenses/>.
+
++include ../option-groups.mak
++
+ subdir := dlfcn
+
+ include ../Makeconfig
+@@ -36,7 +38,9 @@
+ ifeq (yes,$(build-shared))
+ tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
+ bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
+- bug-atexit3 tstatexit bug-dl-leaf
++ tstatexit bug-dl-leaf
++
++tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3
+ endif
+ modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
+ defaultmod2 errmsg1mod modatexit modcxaatexit \
+Index: git/elf/dl-support.c
+===================================================================
+--- git.orig/elf/dl-support.c 2014-08-29 20:00:46.384070587 -0700
++++ git/elf/dl-support.c 2014-08-29 20:01:15.192070587 -0700
+@@ -19,6 +19,7 @@
+ /* This file defines some things that for the dynamic linker are defined in
+ rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */
+
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+@@ -42,7 +43,9 @@
+ const char *_dl_platform;
+ size_t _dl_platformlen;
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ int _dl_debug_mask;
++#endif
+ int _dl_lazy;
+ ElfW(Addr) _dl_use_load_bias = -2;
+ int _dl_dynamic_weak;
+Index: git/elf/rtld.c
+===================================================================
+--- git.orig/elf/rtld.c 2014-08-29 20:01:14.708070587 -0700
++++ git/elf/rtld.c 2014-08-29 20:01:15.196070587 -0700
+@@ -16,6 +16,7 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <dlfcn.h>
+ #include <fcntl.h>
+@@ -2200,6 +2201,7 @@
+ objname, errstring);
+ }
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* Nonzero if any of the debugging options is enabled. */
+ static int any_debug attribute_relro;
+
+@@ -2309,6 +2311,7 @@
+ _exit (0);
+ }
+ }
++#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
+
+ static void
+ process_dl_audit (char *str)
+@@ -2376,12 +2379,14 @@
+ break;
+
+ case 5:
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* Debugging of the dynamic linker? */
+ if (memcmp (envline, "DEBUG", 5) == 0)
+ {
+ process_dl_debug (&envline[6]);
+ break;
+ }
++#endif
+ if (memcmp (envline, "AUDIT", 5) == 0)
+ process_dl_audit (&envline[6]);
+ break;
+@@ -2490,7 +2495,9 @@
+ {
+ mode = trace;
+ GLRO(dl_verbose) = 1;
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
++#endif
+ GLRO(dl_trace_prelink) = &envline[17];
+ }
+ break;
+@@ -2537,12 +2544,15 @@
+ if (__access ("/etc/suid-debug", F_OK) != 0)
+ {
+ unsetenv ("MALLOC_CHECK_");
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ GLRO_dl_debug_mask = 0;
++#endif
+ }
+
+ if (mode != normal)
+ _exit (5);
+ }
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* If we have to run the dynamic linker in debugging mode and the
+ LD_DEBUG_OUTPUT environment variable is given, we write the debug
+ messages to this file. */
+@@ -2567,6 +2577,7 @@
+ /* We use standard output if opening the file failed. */
+ GLRO(dl_debug_fd) = STDOUT_FILENO;
+ }
++#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
+ }
+
+
+Index: git/extra-lib.mk
+===================================================================
+--- git.orig/extra-lib.mk 2014-08-29 20:00:46.544070587 -0700
++++ git/extra-lib.mk 2014-08-29 20:01:15.196070587 -0700
+@@ -25,7 +25,9 @@
+ extra-objs := $(extra-objs)
+
+ # The modules that go in $(lib).
+-all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
++all-$(lib)-routines := $($(lib)-routines) \
++ $($(lib)-routines-y) \
++ $($(lib)-sysdep_routines)
+
+ # Add each flavor of library to the lists of things to build and install.
+ install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
+@@ -101,7 +103,7 @@
+ endif
+
+ # This will define `libof-ROUTINE := LIB' for each of the routines.
+-cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
++cpp-srcs-left := $(all-$(lib)-routines)
+ ifneq (,$(cpp-srcs-left))
+ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+ endif
+Index: git/grp/Makefile
+===================================================================
+--- git.orig/grp/Makefile 2014-08-29 20:00:46.556070587 -0700
++++ git/grp/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for grp portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := grp
+
+ include ../Makeconfig
+@@ -29,6 +31,9 @@
+ getgrent_r getgrgid_r getgrnam_r fgetgrent_r
+
+ tests := testgrp
++ifneq (y,$(OPTION_EGLIBC_NSSWITCH))
++LDLIBS-testgrp += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
++endif
+
+ ifeq (yes,$(build-shared))
+ test-srcs := tst_fgetgrent
+Index: git/hesiod/Makefile
+===================================================================
+--- git.orig/hesiod/Makefile 2014-08-29 20:00:46.580070587 -0700
++++ git/hesiod/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,12 +18,14 @@
+ #
+ # Sub-makefile for hesiod portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := hesiod
+
+ include ../Makeconfig
+
+-extra-libs := libnss_hesiod
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_INET) += libnss_hesiod
++extra-libs-others-y += $(extra-libs-y)
+
+ subdir-dirs = nss_hesiod
+ vpath %.c nss_hesiod
+Index: git/iconv/gconv_db.c
+===================================================================
+--- git.orig/iconv/gconv_db.c 2014-08-29 20:00:46.604070587 -0700
++++ git/iconv/gconv_db.c 2014-08-29 20:01:15.196070587 -0700
+@@ -25,6 +25,7 @@
+ #include <sys/param.h>
+ #include <bits/libc-lock.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+
+ #include <dlfcn.h>
+ #include <gconv_int.h>
+@@ -828,9 +829,11 @@
+ /* Free all resources if necessary. */
+ libc_freeres_fn (free_mem)
+ {
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* First free locale memory. This needs to be done before freeing derivations,
+ as ctype cleanup functions dereference steps arrays which we free below. */
+ _nl_locale_subfreeres ();
++#endif
+
+ /* finddomain.c has similar problem. */
+ extern void _nl_finddomain_subfreeres (void) attribute_hidden;
+Index: git/iconv/gconv_trans.c
+===================================================================
+--- git.orig/iconv/gconv_trans.c 2014-08-29 20:00:46.612070587 -0700
++++ git/iconv/gconv_trans.c 2014-08-29 20:01:15.196070587 -0700
+@@ -23,6 +23,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <gnu/option-groups.h>
+
+ #include <bits/libc-lock.h>
+ #include "gconv_int.h"
+@@ -59,6 +60,7 @@
+ PTR_DEMANGLE (fct);
+ #endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* If there is no transliteration information in the locale don't do
+ anything and return the error. */
+ size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE);
+@@ -194,6 +196,7 @@
+ sorted. */
+ break;
+ }
++#endif
+
+ /* One last chance: use the default replacement. */
+ if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0)
+Index: git/iconv/iconv_prog.c
+===================================================================
+--- git.orig/iconv/iconv_prog.c 2014-08-29 20:00:46.612070587 -0700
++++ git/iconv/iconv_prog.c 2014-08-29 20:01:15.196070587 -0700
+@@ -35,6 +35,7 @@
+ #ifdef _POSIX_MAPPED_FILES
+ # include <sys/mman.h>
+ #endif
++#include <gnu/option-groups.h>
+ #include <charmap.h>
+ #include <gconv_int.h>
+ #include "iconv_prog.h"
+@@ -221,10 +222,17 @@
+ bool to_wrong =
+ (iconv_open (to_code, "UTF-8") == (iconv_t) -1
+ && errno == EINVAL);
++#if __OPTION_EGLIBC_LOCALE_CODE
+ const char *from_pretty =
+ (from_code[0] ? from_code : nl_langinfo (CODESET));
+ const char *to_pretty =
+ (orig_to_code[0] ? orig_to_code : nl_langinfo (CODESET));
++#else
++ const char *from_pretty =
++ (from_code[0] ? from_code : "ANSI_X3.4-1968");
++ const char *to_pretty =
++ (orig_to_code[0] ? orig_to_code : "ANSI_X3.4-1968");
++#endif
+
+ if (from_wrong)
+ {
+Index: git/iconv/Makefile
+===================================================================
+--- git.orig/iconv/Makefile 2014-08-29 20:00:46.600070587 -0700
++++ git/iconv/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for iconv.
+ #
++include ../option-groups.mak
++
+ subdir := iconv
+
+ include ../Makeconfig
+@@ -57,6 +59,9 @@
+ CPPFLAGS-strtab = -DNOT_IN_libc
+ CPPFLAGS-charmap = -DNOT_IN_libc
+ CPPFLAGS-charmap-dir = -DNOT_IN_libc
++ifneq (y,$(OPTION_EGLIBC_SPAWN))
++CPPFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
++endif
+
+ ifeq ($(run-built-tests),yes)
+ xtests-special += $(objpfx)test-iconvconfig.out
+Index: git/iconvdata/Makefile
+===================================================================
+--- git.orig/iconvdata/Makefile 2014-08-29 20:00:46.628070587 -0700
++++ git/iconvdata/Makefile 2014-08-29 20:01:15.196070587 -0700
+@@ -18,12 +18,15 @@
+ #
+ # Makefile for iconv data and code.
+ #
++include ../option-groups.mak
++
+ subdir := iconvdata
+
+ include ../Makeconfig
+
+ # Names of all the shared objects which implement the transformations.
+-modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
++modules-$(OPTION_EGLIBC_CHARSETS) \
++ := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
+ ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \
+ ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \
+ T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \
+@@ -63,11 +66,13 @@
+ MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \
+ CP770 CP771 CP772 CP773 CP774
+
+-modules.so := $(addsuffix .so, $(modules))
++modules.so := $(addsuffix .so, $(modules-y))
+
+ ifeq (yes,$(build-shared))
+ tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
+- tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9
++ tst-iconv6 bug-iconv5 bug-iconv8 bug-iconv9
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += bug-iconv6 tst-iconv7
++
+ ifeq ($(have-thread-library),yes)
+ tests += bug-iconv3
+ endif
+@@ -130,13 +135,13 @@
+ # Rule to generate the shared objects.
+ charmaps = ../localedata/charmaps
+ -include $(objpfx)iconv-rules
+-extra-modules-left := $(modules)
++extra-modules-left := $(modules-y)
+ include extra-module.mk
+
+
+ extra-objs += $(modules.so)
+-install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
+- $(inst_gconvdir)/gconv-modules
++install-others-y += $(addprefix $(inst_gconvdir)/, $(modules.so))
++install-others-$(OPTION_EGLIBC_CHARSETS) += $(inst_gconvdir)/gconv-modules
+
+ # We can build the conversion tables for numerous charsets automatically.
+
+@@ -204,7 +209,7 @@
+ ifndef avoid-generated
+ $(objpfx)iconv-rules: Makefile
+ $(make-target-directory)
+- { echo $(filter-out lib%, $(modules)); \
++ { echo $(filter-out lib%, $(modules-y)); \
+ echo 8bit $(gen-8bit-modules); \
+ echo 8bit-gap $(gen-8bit-gap-modules); } | \
+ LC_ALL=C \
+@@ -247,7 +252,7 @@
+ $(do-install-program)
+ $(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
+ $(do-install)
+-ifeq (no,$(cross-compiling))
++# eglibc: ifeq (no,$(cross-compiling))
+ # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
+ # if this libc has more gconv modules than the previously installed one.
+ if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
+@@ -256,9 +261,9 @@
+ $(common-objpfx)iconv/iconvconfig \
+ $(addprefix --prefix=,$(install_root)); \
+ fi
+-else
+- @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
+-endif
++# eglibc: else
++# eglibc: @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
++# eglibc: endif
+
+ endif # build-shared = yes
+
+Index: git/include/netdb.h
+===================================================================
+--- git.orig/include/netdb.h 2014-08-29 20:00:47.152070587 -0700
++++ git/include/netdb.h 2014-08-29 20:01:15.196070587 -0700
+@@ -232,6 +232,10 @@
+ (const char *name, int af, struct hostent *host, \
+ char *buffer, size_t buflen, int *errnop, \
+ int *h_errnop); \
++extern enum nss_status _nss_ ## service ## _gethostbyname3_r \
++ (const char *name, int af, struct hostent *result, \
++ char *buffer, size_t buflen, int *errnop, \
++ int *h_errnop, int32_t *ttlp, char **canonp); \
+ extern enum nss_status _nss_ ## service ## _gethostbyname_r \
+ (const char *name, struct hostent *host, char *buffer, \
+ size_t buflen, int *errnop, int *h_errnop); \
+Index: git/inet/Makefile
+===================================================================
+--- git.orig/inet/Makefile 2014-08-29 20:00:47.176070587 -0700
++++ git/inet/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for inet portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := inet
+
+ include ../Makeconfig
+@@ -27,7 +29,8 @@
+ netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
+ aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h
+
+-routines := htonl htons \
++routines-$(OPTION_EGLIBC_INET) \
++ += htonl htons \
+ inet_lnaof inet_mkadr \
+ inet_netof inet_ntoa inet_net herrno herrno-loc \
+ gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
+@@ -41,18 +44,23 @@
+ getrpcent_r getrpcbyname_r getrpcbynumber_r \
+ ether_aton ether_aton_r ether_hton ether_line \
+ ether_ntoa ether_ntoa_r ether_ntoh \
+- rcmd rexec ruserpass \
+ getnetgrent_r getnetgrent \
+- getaliasent_r getaliasent getaliasname getaliasname_r \
+- in6_addr getnameinfo if_index ifaddrs inet6_option \
++ in6_addr getnameinfo if_index ifaddrs \
+ getipv4sourcefilter setipv4sourcefilter \
+- getsourcefilter setsourcefilter inet6_opt inet6_rth
++ getsourcefilter setsourcefilter
++routines-$(OPTION_EGLIBC_RCMD) \
++ += rcmd rexec ruserpass
++routines-$(OPTION_EGLIBC_DB_ALIASES) \
++ += getaliasent_r getaliasent getaliasname getaliasname_r
++routines-$(OPTION_EGLIBC_ADVANCED_INET6) \
++ += inet6_option inet6_opt inet6_rth
+
+-aux := check_pf check_native ifreq
++aux-$(OPTION_EGLIBC_INET) += check_pf check_native ifreq
+
+ tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
+- tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
++ tst-gethnm test-ifaddrs bug-if1 tst-ether_line \
+ tst-getni1 tst-getni2 tst-inet6_rth tst-checks
++tests-$(OPTION_EGLIBC_ADVANCED_INET6) += test-inet6_opt
+
+ include ../Rules
+
+Index: git/intl/dcigettext.c
+===================================================================
+--- git.orig/intl/dcigettext.c 2014-08-29 20:00:47.224070587 -0700
++++ git/intl/dcigettext.c 2014-08-29 20:01:15.200070587 -0700
+@@ -77,6 +77,10 @@
+ #endif
+ #include "hash-string.h"
+
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ /* Thread safetyness. */
+ #ifdef _LIBC
+ # include <bits/libc-lock.h>
+@@ -449,9 +453,11 @@
+ #endif
+
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
+ __libc_rwlock_rdlock (__libc_setlocale_lock);
+ #endif
++#endif
+
+ __libc_rwlock_rdlock (_nl_state_lock);
+
+@@ -470,7 +476,11 @@
+ search.category = category;
+ # ifdef HAVE_PER_THREAD_LOCALE
+ # ifdef _LIBC
++# if __OPTION_EGLIBC_LOCALE_CODE
+ localename = strdupa (__current_locale_name (category));
++# else
++ localename = "C";
++# endif
+ # endif
+ search.localename = localename;
+ # endif
+@@ -494,7 +504,9 @@
+ retval = (char *) (*foundp)->translation;
+
+ # ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ # endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+@@ -611,7 +623,9 @@
+ {
+ no_translation:
+ FREE_BLOCKS (block_list);
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ __set_errno (saved_errno);
+ return (plural == 0
+@@ -730,7 +744,9 @@
+ if (plural)
+ retval = plural_lookup (domain, n, retval, retlen);
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ __libc_rwlock_unlock (__libc_setlocale_lock);
++#endif
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+@@ -1361,7 +1377,11 @@
+ `LC_xxx', and `LANG'. On some systems this can be done by the
+ `setlocale' function itself. */
+ #ifdef _LIBC
++# if __OPTION_EGLIBC_LOCALE_CODE
+ retval = __current_locale_name (category);
++# else
++ retval = "C";
++# endif
+ #else
+ retval = _nl_locale_name (category, categoryname);
+ #endif
+Index: git/intl/Makefile
+===================================================================
+--- git.orig/intl/Makefile 2014-08-29 20:00:47.220070587 -0700
++++ git/intl/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -16,6 +16,7 @@
+ # <http://www.gnu.org/licenses/>.
+
+ # Makefile for intl subdirectory: message handling code from GNU gettext.
++include ../option-groups.mak
+
+ subdir = intl
+
+@@ -48,7 +49,7 @@
+ $(objpfx)plural.o: plural.c
+
+ ifeq ($(run-built-tests),yes)
+-ifeq (yes,$(build-shared))
++ifeq (yyyes,$(OPTION_EGLIBC_LOCALES)$(OPTION_EGLIBC_LOCALE_CODE)$(build-shared))
+ ifneq ($(strip $(MSGFMT)),:)
+ tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.out \
+ $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \
+Index: git/io/Makefile
+===================================================================
+--- git.orig/io/Makefile 2014-08-29 20:00:47.244070587 -0700
++++ git/io/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for I/O portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := io
+
+ include ../Makeconfig
+@@ -36,7 +38,7 @@
+ fxstatat fxstatat64 \
+ statfs fstatfs statfs64 fstatfs64 \
+ statvfs fstatvfs statvfs64 fstatvfs64 \
+- umask chmod fchmod lchmod fchmodat \
++ umask chmod fchmod fchmodat \
+ mkdir mkdirat \
+ open open_2 open64 open64_2 openat openat_2 openat64 openat64_2 \
+ read write lseek lseek64 access euidaccess faccessat \
+@@ -49,11 +51,13 @@
+ ttyname ttyname_r isatty \
+ link linkat symlink symlinkat readlink readlinkat \
+ unlink unlinkat rmdir \
+- ftw ftw64 fts poll ppoll \
++ poll ppoll \
+ posix_fadvise posix_fadvise64 \
+ posix_fallocate posix_fallocate64 \
+ sendfile sendfile64 \
+ utimensat futimens
++routines-$(OPTION_EGLIBC_BSD) += lchmod
++routines-$(OPTION_EGLIBC_FTRAVERSE) += ftw ftw64 fts
+
+ aux := have_o_cloexec
+
+@@ -64,18 +68,22 @@
+ fstatat fstatat64 mknod mknodat
+
+ others := pwd
+-test-srcs := ftwtest
++test-srcs-$(OPTION_EGLIBC_FTRAVERSE) := ftwtest
+ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
+- tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
++ tst-fcntl tst-statvfs \
+ tst-openat tst-unlinkat tst-fstatat tst-futimesat \
+ tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
+ tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
+- tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
++ tst-mknodat tst-mkfifoat tst-ttyname_r \
+ tst-posix_fallocate
++tests-$(OPTION_EGLIBC_FTRAVERSE) += bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 \
++ bug-ftw5
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_EGLIBC_FTRAVERSE))
+ tests-special += $(objpfx)ftwtest.out
+ endif
++endif
+
+ include ../Rules
+
+Index: git/libidn/Makefile
+===================================================================
+--- git.orig/libidn/Makefile 2014-08-29 20:00:47.316070587 -0700
++++ git/libidn/Makefile 2014-08-29 20:01:15.200070587 -0700
+@@ -16,6 +16,7 @@
+ # <http://www.gnu.org/licenses/>.
+
+ # Makefile for libidn subdirectory of GNU C Library.
++include ../option-groups.mak
+
+ subdir := libidn
+
+@@ -23,8 +24,8 @@
+
+ routines = idn-stub
+
+-extra-libs = libcidn
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_IDN) = libcidn
++extra-libs-others-y = $(extra-libs-y)
+
+ libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \
+ iconvme
+Index: git/libidn/toutf8.c
+===================================================================
+--- git.orig/libidn/toutf8.c 2014-08-29 20:00:47.332070587 -0700
++++ git/libidn/toutf8.c 2014-08-29 20:01:15.200070587 -0700
+@@ -33,6 +33,11 @@
+ /* Get strlen. */
+ #include <string.h>
+
++/* Get __OPTION_EGLIBC_LOCALE_CODE. */
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ /* Get iconv_string. */
+ #include "iconvme.h"
+
+@@ -47,7 +52,11 @@
+ #endif
+
+ #ifdef _LIBC
+-# define stringprep_locale_charset() nl_langinfo (CODESET)
++# if __OPTION_EGLIBC_LOCALE_CODE
++# define stringprep_locale_charset() nl_langinfo (CODESET)
++# else
++# define stringprep_locale_charset() "ANSI_X3.4-1968"
++# endif
+ #else
+ /**
+ * stringprep_locale_charset - return charset used in current locale
+Index: git/libio/fileops.c
+===================================================================
+--- git.orig/libio/fileops.c 2014-08-29 20:00:47.352070587 -0700
++++ git/libio/fileops.c 2014-08-29 20:01:15.200070587 -0700
+@@ -38,6 +38,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <gnu/option-groups.h>
+ #include <stdlib.h>
+ #if _LIBC
+ # include "../wcsmbs/wcsmbsload.h"
+@@ -174,7 +175,7 @@
+
+ /* Free buffer. */
+ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+- if (fp->_mode > 0)
++ if (_IO_is_wide (fp))
+ {
+ if (_IO_have_wbackup (fp))
+ _IO_free_wbackup_area (fp);
+@@ -359,6 +360,7 @@
+ cs = strstr (last_recognized + 1, ",ccs=");
+ if (cs != NULL)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ /* Yep. Load the appropriate conversions and set the orientation
+ to wide. */
+ struct gconv_fcts fcts;
+@@ -423,6 +425,12 @@
+
+ /* Set the mode now. */
+ result->_mode = 1;
++#else
++ /* Treat this as if we couldn't find the given character set. */
++ (void) _IO_file_close_it (fp);
++ __set_errno (EINVAL);
++ return NULL;
++#endif
+ }
+ }
+
+Index: git/libio/__fpurge.c
+===================================================================
+--- git.orig/libio/__fpurge.c 2014-08-29 20:00:47.336070587 -0700
++++ git/libio/__fpurge.c 2014-08-29 20:01:15.200070587 -0700
+@@ -21,7 +21,7 @@
+ void
+ __fpurge (FILE *fp)
+ {
+- if (fp->_mode > 0)
++ if (_IO_is_wide (fp))
+ {
+ /* Wide-char stream. */
+ if (_IO_in_backup (fp))
+Index: git/libio/iofwide.c
+===================================================================
+--- git.orig/libio/iofwide.c 2014-08-29 20:00:47.360070587 -0700
++++ git/libio/iofwide.c 2014-08-29 20:01:15.200070587 -0700
+@@ -26,6 +26,7 @@
+
+ #include <libioP.h>
+ #ifdef _LIBC
++# include <gnu/option-groups.h>
+ # include <dlfcn.h>
+ # include <wchar.h>
+ #endif
+@@ -43,6 +44,8 @@
+ #endif
+
+
++#if ! defined _LIBC || __OPTION_POSIX_C_LANG_WIDE_CHAR
++
+ /* Prototypes of libio's codecvt functions. */
+ static enum __codecvt_result do_out (struct _IO_codecvt *codecvt,
+ __mbstate_t *statep,
+@@ -513,3 +516,26 @@
+ return MB_CUR_MAX;
+ #endif
+ }
++
++#else
++/* OPTION_POSIX_C_LANG_WIDE_CHAR is disabled. */
++
++#undef _IO_fwide
++int
++_IO_fwide (fp, mode)
++ _IO_FILE *fp;
++ int mode;
++{
++ /* Die helpfully if the user tries to create a wide stream; I
++ disbelieve that most users check the return value from
++ 'fwide (fp, 1)'. */
++ assert (mode <= 0);
++
++ /* We can only make streams byte-oriented, which is trivial. */
++ if (mode < 0)
++ fp->_mode = -1;
++
++ return fp->_mode;
++}
++
++#endif
+Index: git/libio/ioseekoff.c
+===================================================================
+--- git.orig/libio/ioseekoff.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/ioseekoff.c 2014-08-29 20:01:15.200070587 -0700
+@@ -60,7 +60,7 @@
+ else
+ abort ();
+ }
+- if (_IO_fwide (fp, 0) < 0)
++ if (! _IO_is_wide (fp))
+ _IO_free_backup_area (fp);
+ else
+ _IO_free_wbackup_area (fp);
+Index: git/libio/ioseekpos.c
+===================================================================
+--- git.orig/libio/ioseekpos.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/ioseekpos.c 2014-08-29 20:01:15.200070587 -0700
+@@ -35,7 +35,7 @@
+ /* If we have a backup buffer, get rid of it, since the __seekoff
+ callback may not know to do the right thing about it.
+ This may be over-kill, but it'll do for now. TODO */
+- if (_IO_fwide (fp, 0) <= 0)
++ if (! _IO_is_wide (fp))
+ {
+ if (_IO_have_backup (fp))
+ _IO_free_backup_area (fp);
+Index: git/libio/iosetbuffer.c
+===================================================================
+--- git.orig/libio/iosetbuffer.c 2014-08-29 20:00:47.364070587 -0700
++++ git/libio/iosetbuffer.c 2014-08-29 20:01:15.204070587 -0700
+@@ -24,6 +24,8 @@
+ This exception applies to code released by its copyright holders
+ in files containing the exception. */
+
++#include <gnu/option-groups.h>
++
+ #include "libioP.h"
+
+ void
+@@ -38,9 +40,11 @@
+ if (!buf)
+ size = 0;
+ (void) _IO_SETBUF (fp, buf, size);
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (_IO_vtable_offset (fp) == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
+ /* We also have to set the buffer using the wide char function. */
+ (void) _IO_WSETBUF (fp, buf, size);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+ _IO_release_lock (fp);
+ }
+ libc_hidden_def (_IO_setbuffer)
+Index: git/libio/libioP.h
+===================================================================
+--- git.orig/libio/libioP.h 2014-08-29 20:00:47.372070587 -0700
++++ git/libio/libioP.h 2014-08-29 20:01:15.204070587 -0700
+@@ -42,6 +42,10 @@
+ /*# include <comthread.h>*/
+ #endif
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #include <math_ldbl_opt.h>
+
+ #include "iolibio.h"
+@@ -508,8 +512,20 @@
+
+
+ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
++
++/* _IO_is_wide (fp) is roughly equivalent to '_IO_fwide (fp, 0) > 0',
++ except that when OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, it
++ expands to a constant, allowing the compiler to realize that it can
++ eliminate code that references wide stream handling functions.
++ This, in turn, allows us to omit them. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define _IO_is_wide(_f) ((_f)->_mode > 0)
++#else
++# define _IO_is_wide(_f) (0)
++#endif
++
+ # define _IO_do_flush(_f) \
+- ((_f)->_mode <= 0 \
++ (! _IO_is_wide (_f) \
+ ? _IO_do_write(_f, (_f)->_IO_write_base, \
+ (_f)->_IO_write_ptr-(_f)->_IO_write_base) \
+ : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \
+Index: git/libio/Makefile
+===================================================================
+--- git.orig/libio/Makefile 2014-08-29 20:00:47.332070587 -0700
++++ git/libio/Makefile 2014-08-29 20:01:15.204070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Specific makefile for libio.
+ #
++include ../option-groups.mak
++
+ subdir := libio
+
+ include ../Makeconfig
+@@ -27,16 +29,13 @@
+
+ routines := \
+ filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
+- iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
++ iofopncook iofputs iofread iofsetpos ioftell \
+ iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
+ ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
+ iovsprintf iovsscanf \
+ iofgetpos64 iofopen64 iofsetpos64 \
+- fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
+- iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \
+- putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \
+- wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \
+- wstrops wfileops iofwide fwide wmemstream \
++ putchar putchar_u \
++ iofwide \
+ \
+ clearerr feof ferror fileno fputc freopen fseek getc getchar \
+ memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
+@@ -47,25 +46,48 @@
+ __fpurge __fpending __fsetlocking \
+ \
+ libc_fatal fmemopen
+-
+-tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
+- tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
+- tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
+- tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
+- tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
+- tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
+- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
+- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
+- tst-memstream1 tst-memstream2 \
+- tst-wmemstream1 tst-wmemstream2 \
+- bug-memstream1 bug-wmemstream1 \
+- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
+- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \
+- tst-ftell-append
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ wfiledoalloc \
++ iowpadn \
++ swprintf \
++ vswprintf iovswscanf swscanf wgenops \
++ wstrops wfileops wmemstream
++routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ wdummyfileops
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \
++ fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
++ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \
++ putwchar putwchar_u fwprintf vwprintf \
++ wprintf wscanf fwscanf vwscanf \
++ fwide
++
++tests = test-fmemopen tst-ext tst-ext2 \
++ tst-mmap-setvbuf tst-atime tst-eof \
++ tst-freopen bug-ungetc bug-fseek \
++ tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
++ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \
++ bug-ungetc2 bug-ungetc3 bug-ungetc4 \
++ tst-memstream1 tst-memstream2 \
++ bug-memstream1 tst-popen1 tst-fwrite-error \
++ tst-ftell-active-handler tst-ftell-append
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-swscanf tst-fgetws tst-setvbuf1 \
++ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \
++ tst-widetext
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += bug-rewind bug-rewind2 bug-ungetwc1 \
++ bug-wfflush bug-wmemstream1 tst-fopenloc2 \
++ tst_getwc \
++ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \
++ tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += tst_swprintf tst_swscanf \
++ tst-sscanf \
++ tst-wmemstream1 tst-wmemstream2
+ ifeq (yes,$(build-shared))
+ # Add test-fopenloc only if shared library is enabled since it depends on
+ # shared localedata objects.
+-tests += tst-fopenloc
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-fopenloc
+ endif
+ test-srcs = test-freopen
+
+@@ -164,13 +186,17 @@
+ oldiofsetpos64
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests-special += $(objpfx)test-freopen.out
++endif
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ ifeq (yes,$(build-shared))
+ # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
+ # library is enabled since they depend on tst-fopenloc.out.
+ tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out
+ endif
+ endif
++endif
+
+ include ../Rules
+
+Index: git/libio/wdummyfileops.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/libio/wdummyfileops.c 2014-08-29 20:01:15.204070587 -0700
+@@ -0,0 +1,161 @@
++/* Copyright (C) 2007 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.
++
++ As a special exception, if you link the code in this file with
++ files compiled with a GNU compiler to produce an executable,
++ that does not cause the resulting executable to be covered by
++ the GNU Lesser General Public License. This exception does not
++ however invalidate any other reasons why the executable file
++ might be covered by the GNU Lesser General Public License.
++ This exception applies to code released by its copyright holders
++ in files containing the exception. */
++
++#include <assert.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <libioP.h>
++
++static void __THROW __attribute__ ((__noreturn__))
++_IO_wfile_wide_char_support_disabled (void)
++{
++ static const char errstr[]
++ = ("The application tried to use wide character I/O, but libc.so"
++ " was compiled\n"
++ "with the OPTION_POSIX_C_LANG_WIDE_CHAR option group disabled.\n");
++ __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
++ abort ();
++}
++
++static void
++_IO_wfile_disabled_void_int (_IO_FILE *fp, int x)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_int_int (_IO_FILE *fp, int x)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_int_none (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_size_t
++_IO_wfile_disabled_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_size_t
++_IO_wfile_disabled_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seekoff (_IO_FILE *fp, _IO_off64_t off, int dir, int mode)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seekpos (_IO_FILE *fp, _IO_off64_t pos, int flags)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_FILE *
++_IO_wfile_disabled_setbuf (_IO_FILE *fp, char *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_ssize_t
++_IO_wfile_disabled_read (_IO_FILE *fp, void *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_ssize_t
++_IO_wfile_disabled_write (_IO_FILE *fp, const void *buffer, _IO_ssize_t length)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static _IO_off64_t
++_IO_wfile_disabled_seek (_IO_FILE *fp, _IO_off64_t offset, int mode)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_close (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_stat (_IO_FILE *fp, void *buf)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static int
++_IO_wfile_disabled_showmanyc (_IO_FILE *fp)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static void
++_IO_wfile_disabled_imbue (_IO_FILE *fp, void *locale)
++{
++ _IO_wfile_wide_char_support_disabled ();
++}
++
++static const struct _IO_jump_t _IO_wfile_jumps_disabled =
++{
++ JUMP_INIT_DUMMY,
++ JUMP_INIT(finish, _IO_wfile_disabled_void_int),
++ JUMP_INIT(overflow, _IO_wfile_disabled_int_int),
++ JUMP_INIT(underflow, _IO_wfile_disabled_int_none),
++ JUMP_INIT(uflow, _IO_wfile_disabled_int_none),
++ JUMP_INIT(pbackfail, _IO_wfile_disabled_int_int),
++ JUMP_INIT(xsputn, _IO_wfile_disabled_xsputn),
++ JUMP_INIT(xsgetn, _IO_wfile_disabled_xsgetn),
++ JUMP_INIT(seekoff, _IO_wfile_disabled_seekoff),
++ JUMP_INIT(seekpos, _IO_wfile_disabled_seekpos),
++ JUMP_INIT(setbuf, _IO_wfile_disabled_setbuf),
++ JUMP_INIT(sync, _IO_wfile_disabled_int_none),
++ JUMP_INIT(doallocate, _IO_wfile_disabled_int_none),
++ JUMP_INIT(read, _IO_wfile_disabled_read),
++ JUMP_INIT(write, _IO_wfile_disabled_write),
++ JUMP_INIT(seek, _IO_wfile_disabled_seek),
++ JUMP_INIT(close, _IO_wfile_disabled_close),
++ JUMP_INIT(stat, _IO_wfile_disabled_stat),
++ JUMP_INIT(showmanyc, _IO_wfile_disabled_showmanyc),
++ JUMP_INIT(imbue, _IO_wfile_disabled_imbue)
++};
++
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps)
++libc_hidden_data_def (_IO_wfile_jumps)
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_mmap)
++strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap)
+Index: git/locale/catnames.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/locale/catnames.c 2014-08-29 20:01:15.204070587 -0700
+@@ -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
++ };
+Index: git/locale/C-ctype.c
+===================================================================
+--- git.orig/locale/C-ctype.c 2014-08-29 20:00:47.396070587 -0700
++++ git/locale/C-ctype.c 2014-08-29 20:01:15.204070587 -0700
+@@ -19,8 +19,11 @@
+ #include "localeinfo.h"
+ #include <endian.h>
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ #include "C-translit.h"
++#endif
+
+ /* This table's entries are taken from POSIX.2 Table 2-6
+ ``LC_CTYPE Category Definition in the POSIX Locale''.
+@@ -647,6 +650,7 @@
+ { .word = L'7' },
+ { .word = L'8' },
+ { .word = L'9' },
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
+ { .word = NTRANSLIT },
+ /* _NL_CTYPE_TRANSLIT_FROM_IDX */
+@@ -657,6 +661,22 @@
+ { .wstr = translit_to_idx },
+ /* _NL_CTYPE_TRANSLIT_TO_TBL */
+ { .wstr = (uint32_t *) translit_to_tbl },
++#else
++ /* If the locale code isn't enabled, we don't have the
++ transliteration code in iconv/gconv_trans.c anyway, so there's
++ no need for the transliteration tables here. We'll fall back
++ on the default missing replacement, '?'. */
++ /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
++ { .word = 0 },
++ /* _NL_CTYPE_TRANSLIT_FROM_IDX */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_FROM_TBL */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_TO_IDX */
++ { .wstr = NULL },
++ /* _NL_CTYPE_TRANSLIT_TO_TBL */
++ { .wstr = NULL },
++#endif
+ /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */
+ { .word = 1 },
+ /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */
+Index: git/locale/dummy-setlocale.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/locale/dummy-setlocale.c 2014-08-29 20:01:15.204070587 -0700
+@@ -0,0 +1,33 @@
++/* 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 <string.h>
++#include <locale.h>
++
++char *
++setlocale (int category, const char *locale)
++{
++ if (! locale
++ || locale[0] == '\0'
++ || strcmp (locale, "C") == 0
++ || strcmp (locale, "POSIX") == 0)
++ return (char *) "C";
++ else
++ return NULL;
++}
++libc_hidden_def (setlocale)
+Index: git/locale/localeinfo.h
+===================================================================
+--- git.orig/locale/localeinfo.h 2014-08-29 20:00:47.404070587 -0700
++++ git/locale/localeinfo.h 2014-08-29 20:01:15.204070587 -0700
+@@ -224,7 +224,7 @@
+ 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
+Index: git/locale/Makefile
+===================================================================
+--- git.orig/locale/Makefile 2014-08-29 20:00:47.400070587 -0700
++++ git/locale/Makefile 2014-08-29 20:01:15.204070587 -0700
+@@ -18,27 +18,43 @@
+ #
+ # Makefile for locales.
+ #
++include ../option-groups.mak
++
+ subdir := locale
+
+ 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
+-tests = tst-C-locale tst-locname tst-duplocale
++# catnames is needed by OPTION_EGLIBC_LOCALE_CODE and by the 'intl' code.
++# If we put the latter in an option group, too, we can omit catnames
++# when both option groups are disabled. libstdc++-v3 needs mb_cur_max.
++routines-y := catnames mb_cur_max
++routines-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += setlocale findlocale loadlocale loadarchive \
++ localeconv nl_langinfo nl_langinfo_l \
++ newlocale duplocale freelocale uselocale
++ifneq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++routines-y += dummy-setlocale
++endif
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-C-locale tst-locname tst-duplocale
+ categories = ctype messages monetary numeric time paper name \
+ address telephone measurement identification collate
+-aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
+- xlocale localename global-locale coll-lookup
+-others = localedef locale
++# C-messages belongs in an intl option group.
++aux-y := C-ctype C-time \
++ SYS_libc C_name xlocale global-locale coll-lookup
++aux-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += $(filter-out $(aux-y), \
++ $(categories:%=lc-%) $(categories:%=C-%)) \
++ localename
++others-$(OPTION_EGLIBC_LOCALE_CODE) = localedef locale
+ #others-static = localedef locale
+-install-bin = localedef locale
+-extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
++install-bin = $(others-y)
++extra-objs-$(OPTION_EGLIBC_LOCALE_CODE) \
++ = $(localedef-modules:=.o) $(localedef-aux:=.o) \
+ $(locale-modules:=.o) $(lib-modules:=.o)
+
+-extra-libs = libBrokenLocale
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_LOCALE_CODE) = libBrokenLocale
++extra-libs-others = $(extra-libs-y)
+
+ libBrokenLocale-routines = broken_cur_max
+
+@@ -94,6 +110,9 @@
+ CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
+ CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
+ CFLAGS-charmap-dir.c = -Wno-write-strings
++ifneq (y,$(OPTION_EGLIBC_SPAWN))
++CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
++endif
+
+ # This makes sure -DNOT_IN_libc et al are passed for all these modules.
+ cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
+Index: git/locale/programs/charmap-dir.c
+===================================================================
+--- git.orig/locale/programs/charmap-dir.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/charmap-dir.c 2014-08-29 20:01:15.204070587 -0700
+@@ -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 @@
+ 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 @@
+ }
+ return NULL;
+ }
++#endif
+
+ /* Opens a charmap for reading, given its name (not an alias name). */
+ FILE *
+@@ -226,6 +230,7 @@
+ if (stream != NULL)
+ return stream;
+
++#ifndef NO_UNCOMPRESS
+ memcpy (p, ".gz", 4);
+ stream = fopen_uncompressed (pathname, "gzip");
+ if (stream != NULL)
+@@ -235,6 +240,7 @@
+ stream = fopen_uncompressed (pathname, "bzip2");
+ if (stream != NULL)
+ return stream;
++#endif
+
+ return NULL;
+ }
+@@ -263,8 +269,8 @@
+ char *alias = NULL;
+ char junk[BUFSIZ];
+
+- if (fscanf (stream, " <code_set_name> %ms", &alias) == 1
+- || fscanf (stream, "%% alias %ms", &alias) == 1)
++ if (fscanf (stream, " <code_set_name> %as", &alias) == 1
++ || fscanf (stream, "%% alias %as", &alias) == 1)
+ {
+ aliases = (char **) xrealloc (aliases,
+ (naliases + 2) * sizeof (char *));
+Index: git/locale/programs/ld-collate.c
+===================================================================
+--- git.orig/locale/programs/ld-collate.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/ld-collate.c 2014-08-29 20:01:15.208070587 -0700
+@@ -350,7 +350,7 @@
+ }
+ 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 @@
+
+ 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 @@
+ 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 @@
+ 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));
+
+Index: git/locale/programs/ld-ctype.c
+===================================================================
+--- git.orig/locale/programs/ld-ctype.c 2014-08-29 20:00:47.408070587 -0700
++++ git/locale/programs/ld-ctype.c 2014-08-29 20:01:15.208070587 -0700
+@@ -957,7 +957,7 @@
+ 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);
+@@ -1968,7 +1968,7 @@
+ 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;
+ }
+@@ -2516,8 +2516,8 @@
+ }
+
+ 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;
+
+@@ -4001,8 +4001,7 @@
+
+ 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;
+@@ -4039,11 +4038,11 @@
+ for (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
+@@ -4067,18 +4066,18 @@
+ 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;
+ }
+Index: git/locale/programs/ld-messages.c
+===================================================================
+--- git.orig/locale/programs/ld-messages.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/ld-messages.c 2014-08-29 20:01:15.208070587 -0700
+@@ -25,6 +25,7 @@
+ #include <string.h>
+ #include <stdint.h>
+ #include <sys/uio.h>
++#include <gnu/option-groups.h>
+
+ #include <assert.h>
+
+@@ -124,6 +125,7 @@
+ }
+ else
+ {
++#if __OPTION_POSIX_REGEXP
+ int result;
+ regex_t re;
+
+@@ -140,6 +142,7 @@
+ }
+ else if (result != 0)
+ regfree (&re);
++#endif
+ }
+
+ if (messages->noexpr == NULL)
+@@ -158,6 +161,7 @@
+ }
+ else
+ {
++#if __OPTION_POSIX_REGEXP
+ int result;
+ regex_t re;
+
+@@ -174,6 +178,7 @@
+ }
+ else if (result != 0)
+ regfree (&re);
++#endif
+ }
+ }
+
+Index: git/locale/programs/ld-time.c
+===================================================================
+--- git.orig/locale/programs/ld-time.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/ld-time.c 2014-08-29 20:01:15.208070587 -0700
+@@ -215,8 +215,10 @@
+ }
+ 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 @@
+ 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 @@
+ }
+
+ /* 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 =
+@@ -530,7 +532,16 @@
+ 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;
++ }
+ }
+
+
+Index: git/locale/programs/linereader.c
+===================================================================
+--- git.orig/locale/programs/linereader.c 2014-08-29 20:00:47.412070587 -0700
++++ git/locale/programs/linereader.c 2014-08-29 20:01:15.208070587 -0700
+@@ -595,7 +595,7 @@
+ {
+ int return_widestr = lr->return_widestr;
+ char *buf;
+- wchar_t *buf2 = NULL;
++ uint32_t *buf2 = NULL;
+ size_t bufact;
+ size_t bufmax = 56;
+
+Index: git/locale/programs/localedef.c
+===================================================================
+--- git.orig/locale/programs/localedef.c 2014-08-29 20:00:47.416070587 -0700
++++ git/locale/programs/localedef.c 2014-08-29 20:01:15.208070587 -0700
+@@ -114,6 +114,7 @@
+ #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 @@
+ 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 @@
+ 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 @@
+ 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;
+Index: git/locale/programs/locfile.c
+===================================================================
+--- git.orig/locale/programs/locfile.c 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/programs/locfile.c 2014-08-29 20:01:15.208070587 -0700
+@@ -544,6 +544,9 @@
+ 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 @@
+ 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. */
+Index: git/locale/programs/locfile.h
+===================================================================
+--- git.orig/locale/programs/locfile.h 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/programs/locfile.h 2014-08-29 20:01:15.208070587 -0700
+@@ -71,6 +71,8 @@
+
+ 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
+@@ -275,4 +277,49 @@
+ const struct charmap_t *charmap,
+ const char *output_path);
+
++static inline size_t
++wcslen_uint32 (const uint32_t *str)
++{
++ size_t len = 0;
++ while (str[len] != 0)
++ len++;
++ return len;
++}
++
++static inline 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 inline int
++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
++{
++ while (*s1 != 0 && *s1 == *s2)
++ s1++, s2++;
++ return *s1 - *s2;
++}
++
++static inline uint32_t *
++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ return memcpy (s1, s2, n * sizeof (uint32_t));
++}
++
++static inline 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 */
+Index: git/locale/setlocale.c
+===================================================================
+--- git.orig/locale/setlocale.c 2014-08-29 20:00:47.432070587 -0700
++++ git/locale/setlocale.c 2014-08-29 20:01:15.208070587 -0700
+@@ -64,36 +64,6 @@
+ #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
+Index: git/locale/xlocale.c
+===================================================================
+--- git.orig/locale/xlocale.c 2014-08-29 20:00:47.436070587 -0700
++++ git/locale/xlocale.c 2014-08-29 20:01:15.208070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <locale.h>
++#include <gnu/option-groups.h>
+ #include "localeinfo.h"
+
+ #define DEFINE_CATEGORY(category, category_name, items, a) \
+@@ -25,6 +26,19 @@
+ #include "categories.def"
+ #undef DEFINE_CATEGORY
+
++/* If the locale support code isn't enabled, don't generate strong
++ reference to the C locale_data structures here; let the Makefile
++ decide which ones to include. (In the static linking case, the
++ strong reference to the 'class', 'toupper', and 'tolower' tables
++ will cause C-ctype.o to be brought in, as it should be, even when
++ the reference to _nl_C_LC_CTYPE will be weak.) */
++#if ! __OPTION_EGLIBC_LOCALE_CODE
++# define DEFINE_CATEGORY(category, category_name, items, a) \
++ weak_extern (_nl_C_##category)
++# include "categories.def"
++# undef DEFINE_CATEGORY
++#endif
++
+ /* Defined in locale/C-ctype.c. */
+ extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
+ extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
+@@ -52,3 +66,26 @@
+ .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128,
+ .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128
+ };
++
++
++#if ! __OPTION_EGLIBC_LOCALE_CODE
++/* When locale code is enabled, these are each defined in the
++ appropriate lc-CATEGORY.c file, so that static links (when __thread
++ is supported) bring in only those lc-CATEGORY.o files for
++ categories the program actually uses; look for NL_CURRENT_INDIRECT
++ in localeinfo.h.
++
++ When locale code is disabled, the _nl_C_CATEGORY objects are the
++ only possible referents. At the moment, there isn't a way to get
++ __OPTION_EGLIBC_LOCALE_CODE defined in every compilation unit that
++ #includes localeinfo.h, so we can't just turn off
++ NL_CURRENT_INDIRECT. So we'll define the _nl_current_CATEGORY
++ pointers here. */
++#if defined (NL_CURRENT_INDIRECT)
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ __thread struct __locale_data * const *_nl_current_##category \
++ attribute_hidden = &_nl_C_locobj.__locales[category];
++#include "categories.def"
++#undef DEFINE_CATEGORY
++#endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+Index: git/localedata/Makefile
+===================================================================
+--- git.orig/localedata/Makefile 2014-08-29 20:00:47.444070587 -0700
++++ git/localedata/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -21,12 +21,22 @@
+
+ include ../Makeconfig
+
+-# List with all available character set descriptions.
+-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
++include ../option-groups.mak
+
+ # List with all available character set descriptions.
+-locales := $(wildcard locales/*)
++all-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
++
++all-locales := $(wildcard locales/*)
+
++# If the EGLIBC_LOCALES option group is not enabled, trim the
++# list of charmap and locale source files.
++ifeq ($(OPTION_EGLIBC_LOCALES),y)
++charmaps := $(all-charmaps)
++locales := $(all-locales)
++else
++charmaps :=
++locales := locales/POSIX
++endif
+
+ subdir-dirs = tests-mbwc
+ vpath %.c tests-mbwc
+@@ -71,14 +81,20 @@
+ tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \
+ tst_wctype tst_wcwidth
+
+-tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
++# Since these tests build their own locale files, they're not
++# dependent on the OPTION_EGLIBC_LOCALES option group. But they do
++# need the locale functions to be present.
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
+ tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
+ tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
+ tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-setlocale3 \
+ tst-wctype
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ tests-static = bug-setlocale1-static
+ tests += $(tests-static)
+-ifeq (yes,$(build-shared))
++endif
++ifeq (yesy,$(build-shared)$(OPTION_EGLIBC_LOCALE_CODE))
+ ifneq (no,$(PERL))
+ tests-special += $(objpfx)mtrace-tst-leaks.out
+ endif
+@@ -92,12 +108,14 @@
+
+ tests: $(objdir)/iconvdata/gconv-modules
+
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \
+ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \
+ $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \
+ $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \
+ $(objpfx)tst-numeric.out
+ tests-static += tst-langinfo-static
++endif
+
+ ifeq ($(run-built-tests),yes)
+ # We have to generate locales
+@@ -213,6 +231,11 @@
+
+ include SUPPORTED
+
++# Only install locale data if OPTION_EGLIBC_LOCALES is selected.
++ifneq ($(OPTION_EGLIBC_LOCALES),y)
++SUPPORTED-LOCALES :=
++endif
++
+ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
+
+ # Sometimes the whole collection of locale files should be installed.
+Index: git/login/Makefile
+===================================================================
+--- git.orig/login/Makefile 2014-08-29 20:00:47.736070587 -0700
++++ git/login/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -18,6 +18,7 @@
+ #
+ # Sub-makefile for login portion of the library.
+ #
++include ../option-groups.mak
+
+ subdir := login
+
+@@ -25,14 +26,16 @@
+
+ headers := utmp.h bits/utmp.h lastlog.h pty.h
+
+-routines := getlogin getlogin_r setlogin getlogin_r_chk \
+- getutent getutent_r getutid getutline getutid_r getutline_r \
+- utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
+- ptsname_r_chk
++routines := getpt grantpt unlockpt ptsname ptsname_r_chk
++routines-$(OPTION_EGLIBC_UTMP) \
++ += getutent getutent_r getutid getutline getutid_r getutline_r \
++ utmp_file utmpname updwtmp
++routines-$(OPTION_EGLIBC_GETLOGIN) += getlogin getlogin_r getlogin_r_chk
++routines-$(OPTION_EGLIBC_BSD) += setlogin
+
+ CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
+
+-others = utmpdump
++others-$(OPTION_EGLIBC_UTMP) += utmpdump
+
+ ifeq (yes,$(build-pt-chown))
+ others += pt_chown
+@@ -46,8 +49,8 @@
+ tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname
+
+ # Build the -lutil library with these extra functions.
+-extra-libs := libutil
+-extra-libs-others := $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_UTMP) := libutil
++extra-libs-others := $(extra-libs-y)
+
+ libutil-routines:= login login_tty logout logwtmp openpty forkpty
+
+Index: git/Makeconfig
+===================================================================
+--- git.orig/Makeconfig 2014-08-29 20:00:42.956070587 -0700
++++ git/Makeconfig 2014-08-29 20:01:15.212070587 -0700
+@@ -582,7 +582,7 @@
+ # and run on the build system, causes that program with those
+ # arguments to be run on the host for which the library is built.
+ ifndef test-wrapper
+-test-wrapper =
++test-wrapper = $(cross-test-wrapper)
+ endif
+ # Likewise, but the name of the program is preceded by
+ # <variable>=<value> assignments for environment variables.
+@@ -1057,6 +1057,24 @@
+ libm = $(common-objpfx)math/libm.a
+ endif
+
++# Generate a header file that #defines preprocessor symbols indicating
++# which option groups are enabled. Note that the option-groups.config file
++# may not exist at all.
++before-compile += $(common-objpfx)gnu/option-groups.h
++common-generated += gnu/option-groups.h gnu/option-groups.stmp
++headers += gnu/option-groups.h
++$(common-objpfx)gnu/option-groups.h: $(common-objpfx)gnu/option-groups.stmp; @:
++$(common-objpfx)gnu/option-groups.stmp: \
++ $(..)scripts/option-groups.awk \
++ $(..)option-groups.defaults \
++ $(wildcard $(common-objpfx)option-groups.config)
++ $(make-target-directory)
++ @rm -f ${@:stmp=T} $@
++ LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
++ $(move-if-change) ${@:stmp=T} ${@:stmp=h}
++ touch $@
++
++
+ # These are the subdirectories containing the library source. The order
+ # is more or less arbitrary. The sorting step will take care of the
+ # dependencies.
+Index: git/Makerules
+===================================================================
+--- git.orig/Makerules 2014-08-29 20:00:42.960070587 -0700
++++ git/Makerules 2014-08-29 20:01:15.212070587 -0700
+@@ -379,6 +379,25 @@
+ endef
+ endif
+
++# Include targets in the selected option groups.
++aux += $(aux-y)
++extra-libs += $(extra-libs-y)
++extra-libs-others += $(extra-libs-others-y)
++extra-objs += $(extra-objs-y)
++install-bin += $(install-bin-y)
++install-others += $(install-others-y)
++install-sbin += $(install-sbin-y)
++modules += $(modules-y)
++others += $(others-y)
++others-pie += $(others-pie-y)
++routines += $(routines-y)
++static-only-routines += $(static-only-routines-y)
++sysdep_routines += $(sysdep_routines-y)
++test-srcs += $(test-srcs-y)
++tests += $(tests-y)
++xtests += $(xtests-y)
++
++
+ # Modify the list of routines we build for different targets
+
+ ifeq (yes,$(build-shared))
+Index: git/malloc/Makefile
+===================================================================
+--- git.orig/malloc/Makefile 2014-08-29 20:00:47.760070587 -0700
++++ git/malloc/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for malloc routines
+ #
++include ../option-groups.mak
++
+ subdir := malloc
+
+ include ../Makeconfig
+@@ -36,9 +38,15 @@
+ non-lib.a := libmcheck.a
+
+ # Additional library.
++ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
+ extra-libs = libmemusage
+ extra-libs-others = $(extra-libs)
+
++ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
++endif
++endif
++
+ libmemusage-routines = memusage
+ libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+@@ -67,7 +75,7 @@
+ # Unless we get a test for the availability of libgd which also works
+ # for cross-compiling we disable the memusagestat generation in this
+ # situation.
+-ifneq ($(cross-compiling),yes)
++ifeq ($(cross-compiling)$(OPTION_EGLIBC_MEMUSAGE),noy)
+ # If the gd library is available we build the `memusagestat' program.
+ ifneq ($(LIBGD),no)
+ others: $(objpfx)memusage
+Index: git/malloc/memusage.c
+===================================================================
+--- git.orig/malloc/memusage.c 2014-08-29 20:00:47.768070587 -0700
++++ git/malloc/memusage.c 2014-08-29 20:01:15.212070587 -0700
+@@ -33,6 +33,7 @@
+ #include <stdint.h>
+ #include <sys/mman.h>
+ #include <sys/time.h>
++#include <gnu/option-groups.h>
+
+ #include <memusage.h>
+
+@@ -93,7 +94,11 @@
+ #define peak_stack peak_use[1]
+ #define peak_total peak_use[2]
+
+-#define DEFAULT_BUFFER_SIZE 32768
++#ifndef __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++# define DEFAULT_BUFFER_SIZE 32768
++#else
++# define DEFAULT_BUFFER_SIZE __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++#endif
+ static size_t buffer_size;
+
+ static int fd = -1;
+Index: git/malloc/memusage.sh
+===================================================================
+--- git.orig/malloc/memusage.sh 2014-08-29 20:00:47.768070587 -0700
++++ git/malloc/memusage.sh 2014-08-29 20:01:15.212070587 -0700
+@@ -35,7 +35,7 @@
+
+ # Print help message
+ do_help() {
+- echo $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
++ printf $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
+ Profile memory usage of PROGRAM.
+
+ -n,--progname=NAME Name of the program file to profile
+Index: git/math/Makefile
+===================================================================
+--- git.orig/math/Makefile 2014-08-29 20:00:47.836070587 -0700
++++ git/math/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -21,6 +21,8 @@
+
+ include ../Makeconfig
+
++include ../option-groups.mak
++
+ # Installed header files.
+ headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
+ bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
+@@ -33,8 +35,8 @@
+
+ # Build the -lm library.
+
+-extra-libs := libm
+-extra-libs-others = $(extra-libs)
++extra-libs-$(OPTION_EGLIBC_LIBM) := libm
++extra-libs-others-$(OPTION_EGLIBC_LIBM) = $(extra-libs-$(OPTION_EGLIBC_LIBM))
+
+ libm-support = k_standard s_lib_version s_matherr s_signgam \
+ fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \
+Index: git/misc/err.c
+===================================================================
+--- git.orig/misc/err.c 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/err.c 2014-08-29 20:01:15.212070587 -0700
+@@ -22,6 +22,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <gnu/option-groups.h>
+
+ #include <wchar.h>
+ #define flockfile(s) _IO_flockfile (s)
+@@ -37,6 +38,7 @@
+ va_end (ap); \
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ static void
+ convert_and_print (const char *format, __gnuc_va_list ap)
+ {
+@@ -81,6 +83,7 @@
+
+ __vfwprintf (stderr, wformat, ap);
+ }
++#endif
+
+ void
+ vwarnx (const char *format, __gnuc_va_list ap)
+@@ -88,9 +91,13 @@
+ flockfile (stderr);
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ __fwprintf (stderr, L"%s: ", __progname);
+ convert_and_print (format, ap);
+ putwc_unlocked (L'\n', stderr);
++#else
++ abort ();
++#endif
+ }
+ else
+ {
+@@ -111,6 +118,7 @@
+ flockfile (stderr);
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ __fwprintf (stderr, L"%s: ", __progname);
+ if (format)
+ {
+@@ -119,6 +127,9 @@
+ }
+ __set_errno (error);
+ __fwprintf (stderr, L"%m\n");
++#else
++ abort ();
++#endif
+ }
+ else
+ {
+Index: git/misc/error.c
+===================================================================
+--- git.orig/misc/error.c 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/error.c 2014-08-29 20:01:15.212070587 -0700
+@@ -35,6 +35,7 @@
+ #endif
+
+ #ifdef _LIBC
++# include <gnu/option-groups.h>
+ # include <libintl.h>
+ # include <stdbool.h>
+ # include <stdint.h>
+@@ -205,6 +206,7 @@
+ #if _LIBC
+ if (_IO_fwide (stderr, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ size_t len = strlen (message) + 1;
+ wchar_t *wmessage = NULL;
+ mbstate_t st;
+@@ -265,6 +267,9 @@
+
+ if (use_malloc)
+ free (wmessage);
++#else
++ abort ();
++#endif
+ }
+ else
+ #endif
+Index: git/misc/Makefile
+===================================================================
+--- git.orig/misc/Makefile 2014-08-29 20:00:48.232070587 -0700
++++ git/misc/Makefile 2014-08-29 20:01:15.212070587 -0700
+@@ -19,6 +19,10 @@
+ # Sub-makefile for misc portion of the library.
+ #
+
++# Some system-dependent implementations of these functions use option
++# groups (see sysdeps/unix/sysv/linux/Makefile, for example).
++include ../option-groups.mak
++
+ subdir := misc
+
+ include ../Makeconfig
+@@ -46,40 +50,47 @@
+ select pselect \
+ acct chroot fsync sync fdatasync syncfs reboot \
+ gethostid sethostid \
+- revoke vhangup \
++ vhangup \
+ swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
+ mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
+ ualarm usleep \
+ gtty stty \
+ ptrace \
+- fstab mntent mntent_r \
++ mntent mntent_r \
+ utimes lutimes futimes futimesat \
+ truncate ftruncate truncate64 ftruncate64 \
+- chflags fchflags \
+ insremque getttyent getusershell getpass ttyslot \
+ syslog syscall daemon \
+ mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
+ mlock munlock mlockall munlockall \
+- efgcvt efgcvt_r qefgcvt qefgcvt_r \
+ hsearch hsearch_r tsearch lsearch \
+ err error ustat \
+- getsysstats dirname regexp \
++ getsysstats dirname \
+ getloadavg getclktck \
+ fgetxattr flistxattr fremovexattr fsetxattr getxattr \
+ listxattr lgetxattr llistxattr lremovexattr lsetxattr \
+ removexattr setxattr getauxval ifunc-impl-list
+
++routines-$(OPTION_POSIX_REGEXP) += regexp
++routines-$(OPTION_EGLIBC_FSTAB) += fstab
++routines-$(OPTION_EGLIBC_BSD) += chflags fchflags revoke
++routines-$(OPTION_EGLIBC_FCVT) += efgcvt efgcvt_r qefgcvt qefgcvt_r
++
+ generated += tst-error1.mtrace tst-error1-mem.out
+
+ aux := init-misc
+ install-lib := libg.a
+ gpl2lgpl := error.c error.h
+
+-tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
+- tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
++tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \
++ tst-pselect tst-insremque tst-mntent2 bug-hsearch1
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1
++tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests-special += $(objpfx)tst-error1-mem.out
+ endif
++endif
+
+ CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
+ CFLAGS-tsearch.c = $(uses-callbacks)
+Index: git/misc/sys/xattr.h
+===================================================================
+--- git.orig/misc/sys/xattr.h 2014-08-29 20:00:52.644070587 -0700
++++ git/misc/sys/xattr.h 2014-08-29 20:01:15.216070587 -0700
+@@ -26,7 +26,6 @@
+
+ /* The following constants should be used for the fifth parameter of
+ `*setxattr'. */
+-#ifndef __USE_KERNEL_XATTR_DEFS
+ enum
+ {
+ XATTR_CREATE = 1, /* set value, fail if attr already exists. */
+@@ -34,7 +33,6 @@
+ XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */
+ #define XATTR_REPLACE XATTR_REPLACE
+ };
+-#endif
+
+ /* Set the attribute NAME of the file pointed to by PATH to VALUE (which
+ is SIZE bytes long). Return 0 on success, -1 for errors. */
+Index: git/misc/tst-efgcvt.c
+===================================================================
+--- git.orig/misc/tst-efgcvt.c 2014-08-29 20:00:52.652070587 -0700
++++ git/misc/tst-efgcvt.c 2014-08-29 20:01:15.216070587 -0700
+@@ -59,7 +59,7 @@
+ { 123.01, -4, 3, "" },
+ { 126.71, -4, 3, "" },
+ { 0.0, 4, 1, "0000" },
+-#if DBL_MANT_DIG == 53
++#if DBL_MANT_DIG == 53 && !(defined __powerpc__ && defined __NO_FPRS__ && !defined _SOFT_FLOAT && !defined _SOFT_DOUBLE)
+ { 0x1p-1074, 3, -323, "494" },
+ { -0x1p-1074, 3, -323, "494" },
+ #endif
+Index: git/nis/Makefile
+===================================================================
+--- git.orig/nis/Makefile 2014-08-29 20:00:52.660070587 -0700
++++ git/nis/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for NIS/NIS+ part.
+ #
++include ../option-groups.mak
++
+ subdir := nis
+
+ include ../Makeconfig
+@@ -30,19 +32,26 @@
+
+ # These are the databases available for the nis (and perhaps later nisplus)
+ # service. This must be a superset of the services in nss.
+-databases = proto service hosts network grp pwd rpc ethers \
+- spwd netgrp alias publickey
++databases-y := proto service hosts network grp pwd rpc ethers \
++ spwd netgrp publickey
++databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
+
+ # Specify rules for the nss_* modules.
+-services := nis nisplus compat
++# The 'compat' module includes nis support, and the 'nss' directory
++# includes a bare-bones "files" library, so we'll include 'compat' in
++# OPTION_EGLIBC_NIS.
++services-y :=
++services-$(OPTION_EGLIBC_NIS) += nis nisplus compat
++
++extra-libs-$(OPTION_EGLIBC_NIS) += libnsl
++extra-libs-y += $(services-y:%=libnss_%)
+
+-extra-libs = libnsl $(services:%=libnss_%)
+ # These libraries will be built in the `others' pass rather than
+ # the `lib' pass, because they depend on libc.so being built already.
+-extra-libs-others = $(extra-libs)
++extra-libs-others-y += $(extra-libs-y)
+
+ # The sources are found in the appropriate subdir.
+-subdir-dirs = $(services:%=nss_%)
++subdir-dirs = $(services-y:%=nss_%)
+ vpath %.c $(subdir-dirs)
+
+ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
+@@ -60,11 +69,11 @@
+ libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
+ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+-libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
++libnss_nis-routines := $(addprefix nis-,$(databases-y)) nis-initgroups \
+ nss-nis
+ libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+-libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
++libnss_nisplus-routines := $(addprefix nisplus-,$(databases-y)) nisplus-parser \
+ nss-nisplus nisplus-initgroups
+ libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
+
+@@ -80,12 +89,12 @@
+ # Target-specific variable setting to link objects using deprecated
+ # RPC interfaces with the version of libc.so that makes them available
+ # for new links:
+-$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
++$(services-y:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
+ libc-for-link = $(libnsl-libc)
+
+
+ ifeq ($(build-shared),yes)
+-$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
++$(others-y:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
+ else
+-$(others:%=$(objpfx)%): $(objpfx)libnsl.a
++$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a
+ endif
+Index: git/nptl/Makefile
+===================================================================
+--- git.orig/nptl/Makefile 2014-08-29 20:00:52.704070587 -0700
++++ git/nptl/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for NPTL portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := nptl
+
+ include ../Makeconfig
+@@ -116,7 +118,7 @@
+ pt-raise pt-system \
+ flockfile ftrylockfile funlockfile \
+ sigaction \
+- herrno res pt-allocrtsig \
++ pt-allocrtsig \
+ pthread_kill_other_threads \
+ pthread_getaffinity pthread_setaffinity \
+ pthread_attr_getaffinity pthread_attr_setaffinity \
+@@ -136,6 +138,8 @@
+ # pthread_setgid pthread_setegid pthread_setregid \
+ # pthread_setresgid
+
++libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res
++
+ libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
+ libpthread-static-only-routines = pthread_atfork
+
+@@ -210,7 +214,7 @@
+ tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
+ tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
+ tst-mutexpi9 \
+- tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
++ tst-spin1 tst-spin2 tst-spin3 \
+ tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
+ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
+ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
+@@ -244,14 +248,14 @@
+ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
+ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
+ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
+- tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
++ tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel25 \
+ tst-cancel-self tst-cancel-self-cancelstate \
+ tst-cancel-self-canceltype tst-cancel-self-testcancel \
+ tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
+ tst-flock1 tst-flock2 \
+ tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
+ tst-signal6 tst-signal7 \
+- tst-exec1 tst-exec2 tst-exec3 tst-exec4 \
++ tst-exec2 tst-exec3 tst-exec4 \
+ tst-exit1 tst-exit2 tst-exit3 \
+ tst-stdio1 tst-stdio2 \
+ tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \
+@@ -259,13 +263,12 @@
+ tst-unload \
+ tst-dlsym1 \
+ tst-sysconf \
+- tst-locale1 tst-locale2 \
++ tst-locale2 \
+ tst-umask1 \
+ tst-popen1 \
+ tst-clock1 \
+ tst-context1 \
+ tst-sched1 \
+- tst-backtrace1 \
+ tst-abstime \
+ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
+ tst-getpid1 tst-getpid2 tst-getpid3 \
+@@ -275,6 +278,17 @@
+ tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
+ test-srcs = tst-oddstacklimit
+
++# This test uses the posix_spawn functions.
++tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1
++
++# This test uses the 'backtrace' functions.
++tests-$(OPTION_EGLIBC_BACKTRACE) += tst-backtrace1
++
++# This test is written in C++.
++tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24
++
++tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1
++
+ # Files which must not be linked with libpthread.
+ tests-nolibpthread = tst-unload
+
+Index: git/nptl/pthread_create.c
+===================================================================
+--- git.orig/nptl/pthread_create.c 2014-08-29 20:00:52.764070587 -0700
++++ git/nptl/pthread_create.c 2014-08-29 20:01:15.216070587 -0700
+@@ -31,6 +31,7 @@
+ #include <kernel-features.h>
+ #include <exit-thread.h>
+
++#include <gnu/option-groups.h>
+ #include <shlib-compat.h>
+
+ #include <stap-probe.h>
+@@ -240,8 +241,10 @@
+ THREAD_SETMEM (pd, cpuclock_offset, now);
+ #endif
+
++#if __OPTION_EGLIBC_INET
+ /* Initialize resolver state pointer. */
+ __resp = &pd->res;
++#endif
+
+ /* Initialize pointers to locale data. */
+ __ctype_init ();
+@@ -322,8 +325,10 @@
+ /* Run the destructor for the thread-local data. */
+ __nptl_deallocate_tsd ();
+
++#if __OPTION_EGLIBC_INET
+ /* Clean up any state libc stored in thread-local variables. */
+ __libc_thread_freeres ();
++#endif
+
+ /* If this is the last thread we terminate the process now. We
+ do not notify the debugger, it might just irritate it if there
+Index: git/nscd/Makefile
+===================================================================
+--- git.orig/nscd/Makefile 2014-08-29 20:00:52.948070587 -0700
++++ git/nscd/Makefile 2014-08-29 20:01:15.216070587 -0700
+@@ -18,14 +18,17 @@
+ #
+ # Sub-makefile for nscd portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := nscd
+
+ include ../Makeconfig
+
+ ifneq ($(use-nscd),no)
+-routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
++routines-$(OPTION_EGLIBC_INET) += \
++ nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
+ nscd_initgroups nscd_getserv_r nscd_netgroup
+-aux := nscd_helper
++aux-$(OPTION_EGLIBC_INET) += nscd_helper
+ endif
+
+ # To find xmalloc.c
+@@ -37,14 +40,18 @@
+ dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
+ xmalloc xstrdup aicache initgrcache gai res_hconf \
+ netgroupcache
+-
++ifneq (y,$(OPTION_EGLIBC_NIS))
++# If we haven't build libnsl.so, then we'll need to include our
++# own copy of nis_hash.
++nscd-modules += nis_hash
++endif
+ ifeq ($(build-nscd)$(have-thread-library),yesyes)
+
+-others += nscd
+-others-pie += nscd
+-install-sbin := nscd
++others-$(OPTION_EGLIBC_INET) += nscd
++others-pie-$(OPTION_EGLIBC_INET) += nscd
++install-sbin-$(OPTION_EGLIBC_INET) += nscd
+
+-extra-objs = $(nscd-modules:=.o)
++extra-objs-$(OPTION_EGLIBC_INET) += $(nscd-modules:=.o)
+
+ endif
+
+@@ -101,7 +108,15 @@
+ $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
+
+ ifeq ($(build-shared),yes)
+-$(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
++$(objpfx)nscd: $(shared-thread-library)
++else
++$(objpfx)nscd: $(static-thread-library)
++endif
++
++ifeq (y,$(OPTION_EGLIBC_NIS))
++ifeq ($(build-shared),yes)
++$(objpfx)nscd: $(common-objpfx)nis/libnsl.so
+ else
+-$(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
++$(objpfx)nscd: $(common-objpfx)nis/libnsl.a
++endif
+ endif
+Index: git/nscd/nis_hash.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nscd/nis_hash.c 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,3 @@
++/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so;
++ we need our own copy. */
++#include "../nis/nis_hash.c"
+Index: git/nss/fixed-nsswitch.conf
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/fixed-nsswitch.conf 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,22 @@
++# /etc/nsswitch.conf
++#
++# Example configuration for fixed name service.
++# See the description of OPTION_EGLIBC_NSSWITCH in option-groups.def
++# for details.
++#
++
++aliases: files
++
++passwd: files
++group: files
++shadow: files
++
++hosts: files dns
++networks: files dns
++
++protocols: files
++services: files
++ethers: files
++rpc: files
++
++netgroup: files
+Index: git/nss/fixed-nsswitch.functions
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/fixed-nsswitch.functions 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,121 @@
++/* List of functions defined for fixed NSS in GNU C Library.
++ Copyright (C) 1996, 1997, 1998, 2005 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. */
++
++/* When OPTION_EGLIBC_NSSWITCH is disabled (see option-groups.def),
++ EGLIBC does not use the 'dlopen' and 'dlsym' functions to look for
++ database query functions in the individual name service libraries.
++ Instead, it uses a set of functions chosen at compile time, as
++ directed by the OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS file. This
++ file is a sample of what you might use there.
++
++ This file is C source code; it should only contain invocations of
++ the following macros:
++
++ - DEFINE_ENT (DATABASE, SERVICE, X)
++
++ Declare the 'setXent', 'getXent_r', and 'endXent' functions that
++ query DATABASE using the service library 'libnss_SERVICE.so.2'.
++ DATABASE should be the full name of the database as it appears in
++ 'nsswitch.conf', like 'passwd' or 'aliases'.
++
++ (The non-reentrant 'getXent' functions are implemented in terms
++ of the reentrant 'getXent_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ - DEFINE_GETBY (DATABASE, SERVICE, X, KEY)
++
++ Declare the 'getXbyKEY_r' functions that query DATABASE using
++ SERVICE. DATABASE and SERVICE are as described above.
++
++ (The non-reentrant 'getXbyKEY' functions are implemented in terms
++ of the reentrant 'getXbyKEY_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ Use the special key 'name3' for the service library function that
++ implements the 'getaddrinfo' function.
++
++ - DEFINE_GET (DATABASE, SERVICE, QUERY)
++
++ Declare the 'getQUERY_r' functions that query DATABASE using
++ SERVICE. This is used for functions like 'getpwnam'.
++
++ (The non-reentrant 'getQUERY' functions are implemented in terms
++ of the reentrant 'getQUERY_r' functions, so there is no need to
++ refer to them explicitly here.)
++
++ This sample file only includes functions that consult the files in
++ '/etc', and the Domain Name System (DNS). */
++
++/* aliases */
++DEFINE_ENT (aliases, files, alias)
++DEFINE_GETBY (aliases, files, alias, name)
++
++/* ethers */
++DEFINE_ENT (ethers, files, ether)
++
++/* group */
++DEFINE_ENT (group, files, gr)
++DEFINE_GET (group, files, grgid)
++DEFINE_GET (group, files, grnam)
++
++/* hosts */
++DEFINE_ENT (hosts, files, host)
++DEFINE_GETBY (hosts, files, host, addr)
++DEFINE_GETBY (hosts, files, host, name)
++DEFINE_GETBY (hosts, files, host, name2)
++DEFINE_GET (hosts, files, hostton)
++DEFINE_GET (hosts, files, ntohost)
++DEFINE_GETBY (hosts, dns, host, addr)
++DEFINE_GETBY (hosts, dns, host, name)
++DEFINE_GETBY (hosts, dns, host, name2)
++DEFINE_GETBY (hosts, dns, host, name3)
++
++/* netgroup */
++DEFINE_ENT (netgroup, files, netgr)
++
++/* networks */
++DEFINE_ENT (networks, files, net)
++DEFINE_GETBY (networks, files, net, name)
++DEFINE_GETBY (networks, files, net, addr)
++DEFINE_GETBY (networks, dns, net, name)
++DEFINE_GETBY (networks, dns, net, addr)
++
++/* protocols */
++DEFINE_ENT (protocols, files, proto)
++DEFINE_GETBY (protocols, files, proto, name)
++DEFINE_GETBY (protocols, files, proto, number)
++
++/* passwd */
++DEFINE_ENT (passwd, files, pw)
++DEFINE_GET (passwd, files, pwnam)
++DEFINE_GET (passwd, files, pwuid)
++
++/* rpc */
++DEFINE_ENT (rpc, files, rpc)
++DEFINE_GETBY (rpc, files, rpc, name)
++DEFINE_GETBY (rpc, files, rpc, number)
++
++/* services */
++DEFINE_ENT (services, files, serv)
++DEFINE_GETBY (services, files, serv, name)
++DEFINE_GETBY (services, files, serv, port)
++
++/* shadow */
++DEFINE_ENT (shadow, files, sp)
++DEFINE_GET (shadow, files, spnam)
+Index: git/nss/gen-fixed-nsswitch.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/nss/gen-fixed-nsswitch.c 2014-08-29 20:01:15.216070587 -0700
+@@ -0,0 +1,803 @@
++/* gen-fixed-nsswitch.c --- generate fixed name service data structures
++ Copyright (C) 1996-1999, 2001-2006, 2007 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. */
++
++#define _GNU_SOURCE
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <string.h>
++#include <stdarg.h>
++#include <assert.h>
++#include <ctype.h>
++
++#include "gnu/lib-names.h"
++#include "nss.h"
++
++/* Provide a fallback definition to allow this file to be compiled outside
++ libc. */
++#ifndef internal_function
++# define internal_function
++#endif
++
++
++/* Simple utilities. */
++
++void __attribute__ ((noreturn))
++error (const char *message)
++{
++ fprintf (stderr, "%s\n", message);
++ exit (1);
++}
++
++
++void *
++check_alloc (void *p)
++{
++ if (p)
++ return p;
++ else
++ error ("out of memory");
++}
++
++void *
++xmalloc (size_t size)
++{
++ return check_alloc (malloc (size));
++}
++
++
++/* Format ARGS according to FORMAT, and return the result as a
++ malloc'ed string. */
++char *
++saprintf (const char *format, ...)
++{
++ va_list args;
++ size_t len;
++ char *buf;
++
++ va_start (args, format);
++ len = vsnprintf (NULL, 0, format, args);
++ va_end (args);
++
++ buf = xmalloc (len + 1);
++ va_start (args, format);
++ assert (len == vsnprintf (buf, len + 1, format, args));
++ va_end (args);
++
++ return buf;
++}
++
++
++
++/* Data structures representing the configuration file in memory. */
++
++/* These are copied from nsswitch.h.
++
++ We could simply #include that file, but this program runs on the
++ build machine and links against the build machine's libraries,
++ whereas that header is meant for use by target code; it uses
++ 'libc_hidden_proto', 'internal_function', and related hair. Since
++ we've copied the parsing code, we might as well copy the data
++ structure definitions as well. */
++
++/* Actions performed after lookup finished. */
++typedef enum
++{
++ NSS_ACTION_CONTINUE,
++ NSS_ACTION_RETURN
++} lookup_actions;
++
++
++typedef struct service_library
++{
++ /* Name of service (`files', `dns', `nis', ...). */
++ const char *name;
++ /* Pointer to the loaded shared library. */
++ void *lib_handle;
++ /* And the link to the next entry. */
++ struct service_library *next;
++} service_library;
++
++
++/* For mapping a function name to a function pointer. It is known in
++ nsswitch.c:nss_lookup_function that a string pointer for the lookup key
++ is the first member. */
++typedef struct
++{
++ const char *fct_name;
++ void *fct_ptr;
++} known_function;
++
++
++typedef struct service_user
++{
++ /* And the link to the next entry. */
++ struct service_user *next;
++ /* Action according to result. */
++ lookup_actions actions[5];
++ /* Link to the underlying library object. */
++ service_library *library;
++ /* Collection of known functions.
++
++ With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
++ 'tsearch'-style tree.
++
++ With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
++ pointers to known_function structures, NULL-terminated. */
++ union
++ {
++ void *tree;
++ const known_function **array;
++ } known;
++ /* Name of the service (`files', `dns', `nis', ...). */
++ const char *name;
++} service_user;
++
++/* To access the action based on the status value use this macro. */
++#define nss_next_action(ni, status) ((ni)->actions[2 + status])
++
++
++typedef struct name_database_entry
++{
++ /* And the link to the next entry. */
++ struct name_database_entry *next;
++ /* List of service to be used. */
++ service_user *service;
++ /* Name of the database. */
++ const char *name;
++} name_database_entry;
++
++
++typedef struct name_database
++{
++ /* List of all known databases. */
++ name_database_entry *entry;
++ /* List of libraries with service implementation. */
++ service_library *library;
++} name_database;
++
++
++
++/* Gathering the contents of the FIXED_FUNCTIONS file. */
++
++/* It should be possible to generate this list automatically by
++ looking at the services and databases used in the nsswitch.conf
++ file, and having a hard-coded set of queries supported on each
++ database. */
++
++/* We #include the FIXED_FUNCTIONS file several times to build an
++ array of function structures holding its data. */
++enum function_kind {
++ fk_end = 0, /* Last entry. */
++ fk_setent, /* Like setpwent. */
++ fk_getent, /* Like getpwent. */
++ fk_endent, /* Like endpwent. */
++ fk_getby, /* Like gethostbyname. */
++ fk_get /* Like getpwnam. */
++};
++
++
++struct function {
++ /* What kind of function this is. */
++ enum function_kind kind;
++
++ /* The database and service of the function being hardwired in. */
++ char *database, *service;
++
++ /* The kind of entry being queried, for 'fk_setent', 'fk_getent',
++ 'fk_endent', and 'fk_getby' functions. */
++ char *entry;
++
++ /* The key, for 'fk_getby' entries. */
++ char *key;
++
++ /* The value and key, for 'fk_get' entries. */
++ char *value_and_key;
++};
++
++
++const struct function functions[] =
++ {
++
++#define DEFINE_ENT(database, service, entry) \
++ { fk_setent, #database, #service, #entry }, \
++ { fk_getent, #database, #service, #entry }, \
++ { fk_endent, #database, #service, #entry },
++#define DEFINE_GETBY(database, service, entry, key) \
++ { fk_getby, #database, #service, #entry, #key },
++#define DEFINE_GET(database, service, value_and_key) \
++ { fk_get, #database, #service, NULL, NULL, #value_and_key },
++
++#include FIXED_FUNCTIONS
++
++#undef DEFINE_ENT
++#undef DEFINE_GETBY
++#undef DEFINE_GET
++
++ { fk_end }
++ };
++
++
++/* Parsing the config file. Functions copied from nsswitch.c. */
++
++#define __strchrnul strchrnul
++#define __getline getline
++#define __strncasecmp strncasecmp
++
++/* Prototypes for the local functions. */
++static name_database *nss_parse_file (const char *fname) internal_function;
++static name_database_entry *nss_getline (char *line) internal_function;
++static service_user *nss_parse_service_list (const char *line)
++ internal_function;
++
++static name_database *
++internal_function
++nss_parse_file (const char *fname)
++{
++ FILE *fp;
++ name_database *result;
++ name_database_entry *last;
++ char *line;
++ size_t len;
++
++ /* Open the configuration file. */
++ fp = fopen (fname, "rc");
++ if (fp == NULL)
++ return NULL;
++
++ // /* No threads use this stream. */
++ // __fsetlocking (fp, FSETLOCKING_BYCALLER);
++
++ result = (name_database *) xmalloc (sizeof (name_database));
++
++ result->entry = NULL;
++ result->library = NULL;
++ last = NULL;
++ line = NULL;
++ len = 0;
++ do
++ {
++ name_database_entry *this;
++ ssize_t n;
++
++ n = __getline (&line, &len, fp);
++ if (n < 0)
++ break;
++ if (line[n - 1] == '\n')
++ line[n - 1] = '\0';
++
++ /* Because the file format does not know any form of quoting we
++ can search forward for the next '#' character and if found
++ make it terminating the line. */
++ *__strchrnul (line, '#') = '\0';
++
++ /* If the line is blank it is ignored. */
++ if (line[0] == '\0')
++ continue;
++
++ /* Each line completely specifies the actions for a database. */
++ this = nss_getline (line);
++ if (this != NULL)
++ {
++ if (last != NULL)
++ last->next = this;
++ else
++ result->entry = this;
++
++ last = this;
++ }
++ }
++ while (!feof_unlocked (fp));
++
++ /* Free the buffer. */
++ free (line);
++ /* Close configuration file. */
++ fclose (fp);
++
++ return result;
++}
++
++
++/* Read the source names:
++ `( <source> ( "[" "!"? (<status> "=" <action> )+ "]" )? )*'
++ */
++static service_user *
++internal_function
++nss_parse_service_list (const char *line)
++{
++ service_user *result = NULL, **nextp = &result;
++
++ while (1)
++ {
++ service_user *new_service;
++ const char *name;
++
++ while (isspace (line[0]))
++ ++line;
++ if (line[0] == '\0')
++ /* No source specified. */
++ return result;
++
++ /* Read <source> identifier. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '[')
++ ++line;
++ if (name == line)
++ return result;
++
++
++ new_service = (service_user *) xmalloc (sizeof (*new_service));
++ new_service->name = (char *) xmalloc (line - name + 1);
++
++ *((char *) __mempcpy ((char *) new_service->name, name, line - name))
++ = '\0';
++
++ /* Set default actions. */
++ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_UNAVAIL] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_NOTFOUND] = NSS_ACTION_CONTINUE;
++ new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
++ new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
++ new_service->library = NULL;
++ new_service->known.tree = NULL;
++ new_service->next = NULL;
++
++ while (isspace (line[0]))
++ ++line;
++
++ if (line[0] == '[')
++ {
++ /* Read criterions. */
++ do
++ ++line;
++ while (line[0] != '\0' && isspace (line[0]));
++
++ do
++ {
++ int not;
++ enum nss_status status;
++ lookup_actions action;
++
++ /* Grok ! before name to mean all statii but that one. */
++ not = line[0] == '!';
++ if (not)
++ ++line;
++
++ /* Read status name. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
++ && line[0] != ']')
++ ++line;
++
++ /* Compare with known statii. */
++ if (line - name == 7)
++ {
++ if (__strncasecmp (name, "SUCCESS", 7) == 0)
++ status = NSS_STATUS_SUCCESS;
++ else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
++ status = NSS_STATUS_UNAVAIL;
++ else
++ return result;
++ }
++ else if (line - name == 8)
++ {
++ if (__strncasecmp (name, "NOTFOUND", 8) == 0)
++ status = NSS_STATUS_NOTFOUND;
++ else if (__strncasecmp (name, "TRYAGAIN", 8) == 0)
++ status = NSS_STATUS_TRYAGAIN;
++ else
++ return result;
++ }
++ else
++ return result;
++
++ while (isspace (line[0]))
++ ++line;
++ if (line[0] != '=')
++ return result;
++ do
++ ++line;
++ while (isspace (line[0]));
++
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
++ && line[0] != ']')
++ ++line;
++
++ if (line - name == 6 && __strncasecmp (name, "RETURN", 6) == 0)
++ action = NSS_ACTION_RETURN;
++ else if (line - name == 8
++ && __strncasecmp (name, "CONTINUE", 8) == 0)
++ action = NSS_ACTION_CONTINUE;
++ else
++ return result;
++
++ if (not)
++ {
++ /* Save the current action setting for this status,
++ set them all to the given action, and reset this one. */
++ const lookup_actions save = new_service->actions[2 + status];
++ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = action;
++ new_service->actions[2 + NSS_STATUS_UNAVAIL] = action;
++ new_service->actions[2 + NSS_STATUS_NOTFOUND] = action;
++ new_service->actions[2 + NSS_STATUS_SUCCESS] = action;
++ new_service->actions[2 + status] = save;
++ }
++ else
++ new_service->actions[2 + status] = action;
++
++ /* Skip white spaces. */
++ while (isspace (line[0]))
++ ++line;
++ }
++ while (line[0] != ']');
++
++ /* Skip the ']'. */
++ ++line;
++ }
++
++ *nextp = new_service;
++ nextp = &new_service->next;
++ }
++}
++
++static name_database_entry *
++internal_function
++nss_getline (char *line)
++{
++ const char *name;
++ name_database_entry *result;
++ size_t len;
++
++ /* Ignore leading white spaces. ATTENTION: this is different from
++ what is implemented in Solaris. The Solaris man page says a line
++ beginning with a white space character is ignored. We regard
++ this as just another misfeature in Solaris. */
++ while (isspace (line[0]))
++ ++line;
++
++ /* Recognize `<database> ":"'. */
++ name = line;
++ while (line[0] != '\0' && !isspace (line[0]) && line[0] != ':')
++ ++line;
++ if (line[0] == '\0' || name == line)
++ /* Syntax error. */
++ return NULL;
++ *line++ = '\0';
++
++ len = strlen (name) + 1;
++
++ result = (name_database_entry *) xmalloc (sizeof (*result));
++ result->name = (char *) xmalloc (len);
++
++ /* Save the database name. */
++ memcpy ((char *) result->name, name, len);
++
++ /* Parse the list of services. */
++ result->service = nss_parse_service_list (line);
++
++ result->next = NULL;
++ return result;
++}
++
++
++
++/* Generating code for statically initialized nsswitch structures. */
++
++
++/* Return the service-neutral suffix of the name of the service
++ library function referred to by the function F. The result is
++ allocated with malloc. */
++char *
++known_function_suffix (const struct function *f)
++{
++ switch (f->kind)
++ {
++ case fk_setent:
++ return saprintf ("set%sent", f->entry);
++
++ case fk_getent:
++ return saprintf ("get%sent_r", f->entry);
++
++ case fk_endent:
++ return saprintf ("end%sent", f->entry);
++
++ case fk_getby:
++ return saprintf ("get%sby%s_r", f->entry, f->key);
++
++ case fk_get:
++ return saprintf ("get%s_r", f->value_and_key);
++
++ default:
++ abort ();
++ }
++}
++
++
++/* Return the name of the service library function referred to by the
++ function F. The result is allocated with malloc. */
++char *
++known_function_name (const struct function *f)
++{
++ return saprintf ("_nss_%s_%s", f->service, known_function_suffix (f));
++}
++
++
++/* Write initialized known_function structures to OUT for
++ all the functions we'll use. */
++void
++generate_known_functions (FILE *out)
++{
++ int i;
++
++ /* First, generate weak references to the functions. The service
++ libraries depend on libc, and if these references weren't weak,
++ we'd be making libc depend circularly on the service
++ libraries. */
++ for (i = 0; functions[i].kind; i++)
++ {
++ char *name = known_function_name (&functions[i]);
++ fprintf (out, "typeof (%s) %s __attribute__ ((weak));\n",
++ name, name);
++ }
++ fputs ("\n", out);
++
++ /* Then, a table mapping names to functions. */
++ fputs ("static const known_function fixed_known_functions[] = {\n",
++ out);
++ for (i = 0; functions[i].kind; i++)
++ {
++ const struct function *f = &functions[i];
++ char *suffix = known_function_suffix (f);
++
++ fprintf (out, " /* %2d */ { \"%s\", _nss_%s_%s },\n",
++ i, suffix, f->service, suffix);
++ }
++ fputs ("};\n", out);
++ fputs ("\n", out);
++}
++
++
++/* Print code to OUT for an initialized array of pointers to the
++ 'known_function' structures needed for USER, which is for
++ DATABASE. Return its name, allocated with malloc. */
++char *
++generate_known_function_list (FILE *out,
++ const name_database_entry *database,
++ const service_user *user)
++{
++ char *list_name = saprintf ("fixed_%s_%s_known_funcs",
++ database->name, user->name);
++ fprintf (out, "static const known_function *%s[] = {\n",
++ list_name);
++ int i;
++ for (i = 0; functions[i].kind; i++)
++ if (strcmp (functions[i].database, database->name) == 0
++ && strcmp (functions[i].service, user->name) == 0)
++ fprintf (out, " &fixed_known_functions[%d], /* %s */\n",
++ i, known_function_name (&functions[i]));
++ fputs (" NULL\n", out);
++ fputs ("};\n", out);
++ fputs ("\n", out);
++
++ return list_name;
++}
++
++
++/* Return the name of the status value STATUS, as a statically
++ allocated string. */
++const char *
++lookup_status_name (enum nss_status status)
++{
++ switch (status)
++ {
++ case NSS_STATUS_TRYAGAIN: return "NSS_STATUS_TRYAGAIN";
++ case NSS_STATUS_UNAVAIL: return "NSS_STATUS_UNAVAIL";
++ case NSS_STATUS_NOTFOUND: return "NSS_STATUS_NOTFOUND";
++ case NSS_STATUS_SUCCESS: return "NSS_STATUS_SUCCESS";
++ case NSS_STATUS_RETURN: return "NSS_STATUS_RETURN";
++ default: abort ();
++ };
++}
++
++
++/* Return the name of ACTION as a statically allocated string. */
++const char *
++lookup_action_name (lookup_actions action)
++{
++ switch (action)
++ {
++ case NSS_ACTION_CONTINUE: return "NSS_ACTION_CONTINUE";
++ case NSS_ACTION_RETURN: return "NSS_ACTION_RETURN";
++ default: abort ();
++ }
++}
++
++
++/* Print code to OUT for the list of service_user structures starting
++ with USER, which are all for DATABASE. Return the name of the
++ first structure in that list, or zero if USER is NULL. */
++char *
++generate_service_user_list (FILE *out,
++ name_database_entry *database,
++ service_user *user)
++{
++ if (user)
++ {
++ /* Generate the tail of the list. */
++ char *next_name = generate_service_user_list (out, database, user->next);
++ /* Generate our known function list. */
++ char *known_function_list_name =
++ generate_known_function_list (out, database, user);
++
++ char *name = saprintf ("fixed_%s_%s_user", database->name, user->name);
++
++ fprintf (out, "static const service_user %s = {\n", name);
++ if (next_name)
++ fprintf (out, " (service_user *) &%s,\n", next_name);
++ else
++ fprintf (out, " NULL, /* no next entry */\n");
++ fputs (" {\n", out);
++ int i;
++ for (i = 0; i < sizeof (user->actions) / sizeof (user->actions[0]); i++)
++ fprintf (out, " %s, /* %s */\n",
++ lookup_action_name (user->actions[i]),
++ lookup_status_name (i - 2));
++ fputs (" },\n", out);
++ fprintf (out, " NULL, /* we never need the service library */\n");
++ fprintf (out, " { .array = %s },\n", known_function_list_name);
++ fprintf (out, " \"%s\"\n", user->name);
++ fputs ("};\n", out);
++ fputs ("\n", out);
++
++ return name;
++ }
++ else
++ return NULL;
++}
++
++
++/* Print code to OUT for the list of name_database_entry structures
++ starting with DATABASE. Return the name of the first structure
++ in that list, or zero if DATABASE is NULL. */
++char *
++generate_name_database_entries (FILE *out, name_database_entry *database)
++{
++ if (database)
++ {
++ char *next_name = generate_name_database_entries (out, database->next);
++ char *service_user_name
++ = generate_service_user_list (out, database, database->service);
++ char *name = saprintf ("fixed_%s_name_database", database->name);
++
++ fprintf (out, "static const name_database_entry %s = {\n", name);
++
++ if (next_name)
++ fprintf (out, " (name_database_entry *) &%s,\n", next_name);
++ else
++ fprintf (out, " NULL,\n");
++
++ if (service_user_name)
++ fprintf (out, " (service_user *) &%s,\n", service_user_name);
++ else
++ fprintf (out, " NULL,\n");
++
++ fprintf (out, " \"%s\"\n", database->name);
++ fprintf (out, "};\n");
++ fputs ("\n", out);
++
++ return name;
++ }
++ else
++ return NULL;
++}
++
++
++void
++generate_name_database (FILE *out, name_database *service_table)
++{
++ /* Produce a linked list of the known name_database_entry
++ structures. */
++ char *entries = generate_name_database_entries (out, service_table->entry);
++
++ /* Now produce the main structure that points to them all. */
++ fprintf (out, "static const name_database fixed_name_database = {\n");
++ if (entries)
++ fprintf (out, " (name_database_entry *) &%s,\n", entries);
++ else
++ fprintf (out, " NULL,\n");
++ fputs (" NULL /* we don't need the libraries */\n"
++ "};\n",
++ out);
++}
++
++
++
++/* Generating the list of service libraries we generate references to. */
++
++/* String with revision number of the shared object files. */
++static const char *const nss_shlib_revision = LIBNSS_FILES_SO + 15;
++
++void
++generate_service_lib_list (FILE *out, name_database *service_table)
++{
++ int i, j;
++ int printed_any = 0;
++
++ for (i = 0; functions[i].kind; i++)
++ {
++ /* Mention each service library only once. */
++ for (j = 0; j < i; j++)
++ if (strcmp (functions[i].service, functions[j].service) == 0)
++ break;
++
++ if (j >= i)
++ {
++ if (printed_any)
++ putc (' ', out);
++ fprintf (out, "-lnss_%s",
++ functions[i].service,
++ nss_shlib_revision);
++ printed_any = 1;
++ }
++ }
++}
++
++
++/* Main. */
++
++int
++main (int argc, char **argv)
++{
++ if (argc != 4)
++ {
++ fprintf (stderr, "usage: gen-fixed-nsswitch HEADER SERVLIBS CONFIG\n");
++ exit (1);
++ }
++
++ name_database *service_table = nss_parse_file (argv[3]);
++
++ FILE *header = fopen (argv[1], "w");
++ if (! header)
++ {
++ fprintf (stderr,
++ "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
++ argv[1], strerror (errno));
++ exit (1);
++ }
++ fputs ("/* Generated by nss/gen-fixed-nsswitch.c. */\n", header);
++ fputs ("\n", header);
++ generate_known_functions (header);
++ generate_name_database (header, service_table);
++ fclose (header);
++
++ FILE *service_lib_list = fopen (argv[2], "w");
++ if (! service_lib_list)
++ {
++ fprintf (stderr,
++ "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
++ argv[2], strerror (errno));
++ exit (1);
++ }
++ generate_service_lib_list (service_lib_list, service_table);
++ fclose (service_lib_list);
++
++ return 0;
++}
+Index: git/nss/getent.c
+===================================================================
+--- git.orig/nss/getent.c 2014-08-29 20:00:52.976070587 -0700
++++ git/nss/getent.c 2014-08-29 20:01:15.216070587 -0700
+@@ -39,6 +39,7 @@
+ #include <netinet/ether.h>
+ #include <netinet/in.h>
+ #include <sys/socket.h>
++#include <gnu/option-groups.h>
+
+ /* Get libc version number. */
+ #include <version.h>
+@@ -91,6 +92,7 @@
+ fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk");
+ }
+
++#if __OPTION_EGLIBC_DB_ALIASES
+ /* This is for aliases */
+ static void
+ print_aliases (struct aliasent *alias)
+@@ -135,7 +137,9 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_DB_ALIASES */
+
++#if __OPTION_EGLIBC_INET
+ /* This is for ethers */
+ static int
+ ethers_keys (int number, char *key[])
+@@ -179,6 +183,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* This is for group */
+ static void
+@@ -301,6 +306,7 @@
+ return result;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* This is for hosts */
+ static void
+ print_hosts (struct hostent *host)
+@@ -598,6 +604,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Now is all for passwd */
+ static void
+@@ -650,6 +657,7 @@
+ return result;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* This is for protocols */
+ static void
+ print_protocols (struct protoent *proto)
+@@ -805,6 +813,7 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* This is for shadow */
+ static void
+@@ -871,21 +880,34 @@
+ } databases[] =
+ {
+ #define D(name) { #name, name ## _keys },
+-D(ahosts)
+-D(ahostsv4)
+-D(ahostsv6)
+-D(aliases)
+-D(ethers)
++
++#if __OPTION_EGLIBC_INET
++#define DN(name) D(name)
++#else
++#define DN(name)
++#endif
++
++#if __OPTION_EGLIBC_DB_ALIASES
++#define DA(name) D(name)
++#else
++#define DA(name)
++#endif
++
++DN(ahosts)
++DN(ahostsv4)
++DN(ahostsv6)
++DA(aliases)
++DN(ethers)
+ D(group)
+ D(gshadow)
+-D(hosts)
++DN(hosts)
+-D(initgroups)
++DN(initgroups)
+-D(netgroup)
+-D(networks)
++DN(netgroup)
++DN(networks)
+ D(passwd)
+-D(protocols)
+-D(rpc)
+-D(services)
++DN(protocols)
++DN(rpc)
++DN(services)
+ D(shadow)
+ #undef D
+ { NULL, NULL }
+Index: git/nss/getnssent_r.c
+===================================================================
+--- git.orig/nss/getnssent_r.c 2014-08-29 20:00:52.976070587 -0700
++++ git/nss/getnssent_r.c 2014-08-29 20:01:15.220070587 -0700
+@@ -16,6 +16,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <errno.h>
++#include <gnu/option-groups.h>
+ #include <netdb.h>
+ #include "nsswitch.h"
+
+@@ -59,11 +60,13 @@
+ } fct;
+ int no_more;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ __set_h_errno (NETDB_INTERNAL);
+ return;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Cycle through the services and run their `setXXent' functions until
+ we find an available service. */
+@@ -101,11 +104,13 @@
+ } fct;
+ int no_more;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ __set_h_errno (NETDB_INTERNAL);
+ return;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Cycle through all the services and run their endXXent functions. */
+ no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1);
+@@ -141,12 +146,14 @@
+ int no_more;
+ enum nss_status status;
+
++#if __OPTION_EGLIBC_INET
+ if (res && __res_maybe_init (&_res, 0) == -1)
+ {
+ *h_errnop = NETDB_INTERNAL;
+ *result = NULL;
+ return errno;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+
+ /* Initialize status to return if no more functions are found. */
+ status = NSS_STATUS_NOTFOUND;
+@@ -161,7 +168,7 @@
+ int is_last_nip = *nip == *last_nip;
+
+ status = DL_CALL_FCT (fct.f,
+- (resbuf, buffer, buflen, &errno, &h_errno));
++ (resbuf, buffer, buflen, &errno, h_errnop));
+
+ /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
+ provided buffer is too small. In this case we should give
+Index: git/nss/Makefile
+===================================================================
+--- git.orig/nss/Makefile 2014-08-29 20:00:52.972070587 -0700
++++ git/nss/Makefile 2014-08-29 20:01:15.220070587 -0700
+@@ -18,29 +18,36 @@
+ #
+ # Makefile for name service switch.
+ #
++include ../option-groups.mak
++
+ subdir := nss
+
+ include ../Makeconfig
+
+ headers := nss.h
+
+-# This is the trivial part which goes into libc itself.
+-routines = nsswitch getnssent getnssent_r digits_dots \
+- $(addsuffix -lookup,$(databases))
+-
+ # These are the databases that go through nss dispatch.
+ # Caution: if you add a database here, you must add its real name
+ # in databases.def, too.
+-databases = proto service hosts network grp pwd rpc ethers \
+- spwd netgrp key alias sgrp
++databases-y = grp pwd spwd sgrp
++databases-$(OPTION_EGLIBC_INET) \
++ += proto service hosts network rpc ethers \
++ netgrp key
++databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
++
++# This is the trivial part which goes into libc itself.
++routines-y += nsswitch getnssent getnssent_r \
++ $(addsuffix -lookup,$(databases-y))
++routines-$(OPTION_EGLIBC_INET) += digits_dots
+
+ others := getent makedb
+ install-bin := getent makedb
+ makedb-modules = xmalloc hash-string
+ extra-objs += $(makedb-modules:=.o)
+
+-tests = test-netdb tst-nss-test1 test-digits-dots
+-xtests = bug-erange
++tests = tst-nss-test1
++tests-$(OPTION_EGLIBC_INET) += test-netdb test-digits-dots
++xtests-$(OPTION_EGLIBC_INET) += bug-erange
+
+ # Specify rules for the nss_* modules. We have some services.
+ services := files db
+@@ -55,7 +62,7 @@
+ vpath %.c $(subdir-dirs) ../locale/programs ../intl
+
+
+-libnss_files-routines := $(addprefix files-,$(databases)) \
++libnss_files-routines := $(addprefix files-,$(databases-y)) \
+ files-initgroups files-have_o_cloexec files-init
+
+ libnss_db-dbs := $(addprefix db-,\
+@@ -78,6 +85,45 @@
+ tests += $(tests-static)
+ endif
+
++ifneq ($(OPTION_EGLIBC_NSSWITCH),y)
++
++ifndef OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
++$(error OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset)
++endif
++
++ifndef OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
++$(error OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS variable left unset)
++endif
++
++ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)))
++$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed config file)
++$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG))
++endif
++
++ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)))
++$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed functions file)
++$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS))
++endif
++
++before-compile := $(objpfx)fixed-nsswitch.h
++generated := fixed-nsswitch.h
++$(objpfx)fixed-nsswitch.h $(objfpx)fixed-nsswitch-libs: \
++ $(objpfx)gen-fixed-nsswitch \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
++ $< $(objpfx)fixed-nsswitch.h \
++ $(objpfx)fixed-nsswitch-libs \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
++
++$(objpfx)gen-fixed-nsswitch: gen-fixed-nsswitch.c \
++ $(common-objpfx)option-groups.config \
++ $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)
++ $(native-compile)
++gen-fixed-nsswitch-CFLAGS = \
++ -g3 -O -Wall \
++ -I $(objpfx) \
++ -DFIXED_FUNCTIONS='"$(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)"'
++endif
++
+ include ../Rules
+
+ ifeq (yes,$(have-selinux))
+Index: git/nss/nsswitch.c
+===================================================================
+--- git.orig/nss/nsswitch.c 2014-08-29 20:00:53.004070587 -0700
++++ git/nss/nsswitch.c 2014-08-29 20:01:15.220070587 -0700
+@@ -26,6 +26,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ #include <aliases.h>
+ #include <grp.h>
+@@ -41,6 +42,15 @@
+ #include "../nscd/nscd_proto.h"
+ #include <sysdep.h>
+
++/* When OPTION_EGLIBC_NSSWITCH is disabled, we use fixed tables of
++ databases and services, generated at library build time. Thus:
++ - We can't reconfigure individual databases, so we don't need a
++ name-to-database map.
++ - We never add databases or service libraries, or look up functions
++ at runtime, so there's no need for a lock to protect our tables.
++ See ../option-groups.def for the details. */
++#if __OPTION_EGLIBC_NSSWITCH
++
+ /* Prototypes for the local functions. */
+ static name_database *nss_parse_file (const char *fname) internal_function;
+ static name_database_entry *nss_getline (char *line) internal_function;
+@@ -79,6 +89,9 @@
+
+ __libc_lock_define_initialized (static, lock)
+
++#define lock_nsswitch __libc_lock_lock (lock)
++#define unlock_nsswitch __libc_lock_unlock (lock)
++
+ #if !defined DO_STATIC_NSS || defined SHARED
+ /* String with revision number of the shared object files. */
+ static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15;
+@@ -93,6 +106,20 @@
+ __libc_freeres. */
+ static name_database_entry *defconfig_entries;
+
++#else /* __OPTION_EGLIBC_NSSWITCH */
++
++/* Bring in the statically initialized service table we generated at
++ build time. */
++#include "fixed-nsswitch.h"
++
++const static name_database *service_table = &fixed_name_database;
++
++/* Nothing ever changes, so there's no need to lock anything. */
++#define lock_nsswitch (0)
++#define unlock_nsswitch (0)
++
++#endif /* __OPTION_EGLIBC_NSSWITCH */
++
+
+ #ifdef USE_NSCD
+ /* Nonzero if this is the nscd process. */
+@@ -109,20 +136,22 @@
+ const char *defconfig, service_user **ni)
+ {
+ /* Prevent multiple threads to change the service table. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Reconsider database variable in case some other thread called
+ `__nss_configure_lookup' while we waited for the lock. */
+ if (*ni != NULL)
+ {
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+ return 0;
+ }
+
++#if __OPTION_EGLIBC_NSSWITCH
+ /* Are we initialized yet? */
+ if (service_table == NULL)
+ /* Read config file. */
+ service_table = nss_parse_file (_PATH_NSSWITCH_CONF);
++#endif
+
+ /* Test whether configuration data is available. */
+ if (service_table != NULL)
+@@ -144,6 +173,7 @@
+ *ni = entry->service;
+ }
+
++#if __OPTION_EGLIBC_NSSWITCH
+ /* No configuration data is available, either because nsswitch.conf
+ doesn't exist or because it doesn't have a line for this database.
+
+@@ -166,13 +196,23 @@
+ {
+ entry->next = defconfig_entries;
+ entry->service = *ni;
+- entry->name[0] = '\0';
++ entry->name = "";
+ defconfig_entries = entry;
+ }
+ }
+ }
++#else
++ /* Without the dynamic behavior, we can't process defconfig. The
++ databases the user specified at library build time are all you
++ get. */
++ if (*ni == NULL)
++ {
++ unlock_nsswitch;
++ return -1;
++ }
++#endif
+
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return *ni != NULL ? 0 : -1;
+ }
+@@ -252,6 +292,7 @@
+ libc_hidden_def (__nss_next2)
+
+
++#if __OPTION_EGLIBC_NSSWITCH
+ int
+ attribute_compat_text_section
+ __nss_next (service_user **ni, const char *fct_name, void **fctp, int status,
+@@ -300,13 +341,13 @@
+ }
+
+ /* Prevent multiple threads to change the service table. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Install new rules. */
+ *databases[cnt].dbp = new_db;
+ __nss_database_custom[cnt] = true;
+
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return 0;
+ }
+@@ -402,7 +443,7 @@
+ void **found, *result;
+
+ /* We now modify global data. Protect it. */
+- __libc_lock_lock (lock);
++ lock_nsswitch;
+
+ /* Search the tree of functions previously requested. Data in the
+ tree are `known_function' structures, whose first member is a
+@@ -413,7 +454,7 @@
+ enough to a pointer to our structure to use as a lookup key that
+ will be passed to `known_compare' (above). */
+
+- found = __tsearch (&fct_name, &ni->known, &known_compare);
++ found = __tsearch (&fct_name, &ni->known.tree, &known_compare);
+ if (found == NULL)
+ /* This means out-of-memory. */
+ result = NULL;
+@@ -440,7 +481,7 @@
+ #endif
+ /* Oops. We can't instantiate this node properly.
+ Remove it from the tree. */
+- __tdelete (&fct_name, &ni->known, &known_compare);
++ __tdelete (&fct_name, &ni->known.tree, &known_compare);
+ free (known);
+ result = NULL;
+ }
+@@ -520,13 +561,43 @@
+ }
+
+ /* Remove the lock. */
+- __libc_lock_unlock (lock);
++ unlock_nsswitch;
+
+ return result;
+ }
+ libc_hidden_def (__nss_lookup_function)
+
+
++#else /* below if ! __OPTION_EGLIBC_NSSWITCH */
++
++
++int
++__nss_configure_lookup (const char *dbname, const char *service_line)
++{
++ /* We can't dynamically configure lookup without
++ OPTION_EGLIBC_NSSWITCH. */
++ __set_errno (EINVAL);
++ return -1;
++}
++
++
++void *
++__nss_lookup_function (service_user *ni, const char *fct_name)
++{
++ int i;
++ const known_function **known = ni->known.array;
++
++ for (i = 0; known[i]; i++)
++ if (strcmp (fct_name, known[i]->fct_name) == 0)
++ return known[i]->fct_ptr;
++
++ return NULL;
++}
++libc_hidden_def (__nss_lookup_function)
++#endif
++
++
++#if __OPTION_EGLIBC_NSSWITCH
+ static name_database *
+ internal_function
+ nss_parse_file (const char *fname)
+@@ -632,8 +703,10 @@
+ + (line - name + 1));
+ if (new_service == NULL)
+ return result;
++ new_service->name = (char *) (new_service + 1);
+
+- *((char *) __mempcpy (new_service->name, name, line - name)) = '\0';
++ *((char *) __mempcpy ((char *) new_service->name, name, line - name))
++ = '\0';
+
+ /* Set default actions. */
+ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
+@@ -642,7 +715,7 @@
+ new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
+ new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
+ new_service->library = NULL;
+- new_service->known = NULL;
++ new_service->known.tree = NULL;
+ new_service->next = NULL;
+
+ while (isspace (line[0]))
+@@ -778,9 +851,10 @@
+ result = (name_database_entry *) malloc (sizeof (name_database_entry) + len);
+ if (result == NULL)
+ return NULL;
++ result->name = (char *) (result + 1);
+
+ /* Save the database name. */
+- memcpy (result->name, name, len);
++ memcpy ((char *) result->name, name, len);
+
+ /* Parse the list of services. */
+ result->service = nss_parse_service_list (line);
+@@ -816,6 +890,7 @@
+ return *currentp;
+ }
+ #endif
++#endif /* __OPTION_EGLIBC_NSSWITCH */
+
+
+ #if defined SHARED && defined USE_NSCD
+@@ -834,6 +909,7 @@
+ }
+
+
++#if __OPTION_EGLIBC_INET
+ /* Called by nscd and nscd alone. */
+ void
+ __nss_disable_nscd (void (*cb) (size_t, struct traced_file *))
+@@ -857,8 +933,10 @@
+ __nss_not_use_nscd_services = -1;
+ __nss_not_use_nscd_netgroup = -1;
+ }
++#endif /* __OPTION_EGLIBC_INET */
+ #endif
+
++#if __OPTION_EGLIBC_NSSWITCH
+ static void
+ free_database_entries (name_database_entry *entry)
+ {
+@@ -871,8 +949,8 @@
+ {
+ service_user *olds = service;
+
+- if (service->known != NULL)
+- __tdestroy (service->known, free);
++ if (service->known.tree != NULL)
++ __tdestroy (service->known.tree, free);
+
+ service = service->next;
+ free (olds);
+@@ -926,3 +1004,4 @@
+
+ free (top);
+ }
++#endif /* __OPTION_EGLIBC_NSSWITCH */
+Index: git/nss/nsswitch.h
+===================================================================
+--- git.orig/nss/nsswitch.h 2014-08-29 20:00:53.012070587 -0700
++++ git/nss/nsswitch.h 2014-08-29 20:01:15.220070587 -0700
+@@ -65,10 +65,20 @@
+ lookup_actions actions[5];
+ /* Link to the underlying library object. */
+ service_library *library;
+- /* Collection of known functions. */
+- void *known;
++ /* Collection of known functions.
++
++ With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
++ 'tsearch'-style tree.
++
++ With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
++ pointers to known_function structures, NULL-terminated. */
++ union
++ {
++ void *tree;
++ const known_function **array;
++ } known;
+ /* Name of the service (`files', `dns', `nis', ...). */
+- char name[0];
++ const char *name;
+ } service_user;
+
+ /* To access the action based on the status value use this macro. */
+@@ -82,7 +92,7 @@
+ /* List of service to be used. */
+ service_user *service;
+ /* Name of the database. */
+- char name[0];
++ const char *name;
+ } name_database_entry;
+
+
+Index: git/posix/bug-regex1.c
+===================================================================
+--- git.orig/posix/bug-regex1.c 2014-08-29 20:00:53.184070587 -0700
++++ git/posix/bug-regex1.c 2014-08-29 20:01:15.220070587 -0700
+@@ -4,6 +4,7 @@
+ #include <string.h>
+ #include <regex.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ int
+ main (void)
+@@ -17,7 +18,9 @@
+ memset (&regex, '\0', sizeof (regex));
+
+ setlocale (LC_ALL, "de_DE.ISO-8859-1");
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ fwide (stdout, -1);
++#endif
+
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG);
+
+Index: git/posix/bug-regex6.c
+===================================================================
+--- git.orig/posix/bug-regex6.c 2014-08-29 20:00:53.204070587 -0700
++++ git/posix/bug-regex6.c 2014-08-29 20:01:15.220070587 -0700
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <regex.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -30,7 +31,12 @@
+ regex_t re;
+ regmatch_t mat[10];
+ int i, j, ret = 0;
+- const char *locales[] = { "C", "de_DE.UTF-8" };
++ const char *locales[] = {
++ "C",
++#if __OPTION_EGLIBC_LOCALE_CODE
++ "de_DE.UTF-8"
++#endif
++ };
+ const char *string = "http://www.regex.com/pattern/matching.html#intro";
+ regmatch_t expect[10] = {
+ { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 },
+Index: git/posix/fnmatch.c
+===================================================================
+--- git.orig/posix/fnmatch.c 2014-08-29 20:00:53.208070587 -0700
++++ git/posix/fnmatch.c 2014-08-29 20:01:15.220070587 -0700
+@@ -30,6 +30,10 @@
+ #include <ctype.h>
+ #include <string.h>
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined STDC_HEADERS || defined _LIBC
+ # include <stdlib.h>
+ #endif
+@@ -131,7 +135,7 @@
+ # define ISWCTYPE(WC, WT) iswctype (WC, WT)
+ # endif
+
+-# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
++# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS && _LIBC && __OPTION_EGLIBC_LOCALE_CODE)
+ /* In this case we are implementing the multibyte character handling. */
+ # define HANDLE_MULTIBYTE 1
+ # endif
+Index: git/posix/fnmatch_loop.c
+===================================================================
+--- git.orig/posix/fnmatch_loop.c 2014-08-29 20:00:53.220070587 -0700
++++ git/posix/fnmatch_loop.c 2014-08-29 20:01:15.220070587 -0700
+@@ -15,6 +15,8 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
++
+ #include <stdint.h>
+
+ struct STRUCT
+@@ -54,10 +56,15 @@
+ const char *collseq = (const char *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ # else
++# if __OPTION_EGLIBC_LOCALE_CODE
+ const UCHAR *collseq = (const UCHAR *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+-# endif
+-#endif
++# define COLLSEQ_BYTE_LOOKUP(ix) (collseq[(ix)])
++# else
++# define COLLSEQ_BYTE_LOOKUP(ix) (ix)
++# endif /* __OPTION_EGLIBC_LOCALE_CODE */
++# endif /* WIDE_CHAR_VERSION */
++#endif /* _LIBC */
+
+ while ((c = *p++) != L('\0'))
+ {
+@@ -277,7 +284,7 @@
+ /* Leave room for the null. */
+ CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
+ size_t c1 = 0;
+-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
++#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
+ wctype_t wt;
+ #endif
+ const CHAR *startp = p;
+@@ -307,7 +314,7 @@
+ }
+ str[c1] = L('\0');
+
+-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
++#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
+ wt = IS_CHAR_CLASS (str);
+ if (wt == 0)
+ /* Invalid character class name. */
+@@ -681,8 +688,10 @@
+ else
+ lcollseq = __collseq_table_lookup (collseq, cold);
+ # else
+- fcollseq = collseq[fn];
+- lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
++ fcollseq = COLLSEQ_BYTE_LOOKUP (fn);
++ lcollseq = (is_seqval
++ ? cold
++ : COLLSEQ_BYTE_LOOKUP ((UCHAR) cold));
+ # endif
+
+ is_seqval = 0;
+@@ -858,7 +867,7 @@
+ goto matched;
+ }
+ # else
+- hcollseq = collseq[cend];
++ hcollseq = COLLSEQ_BYTE_LOOKUP (cend);
+ # endif
+ }
+
+Index: git/posix/glob.c
+===================================================================
+--- git.orig/posix/glob.c 2014-08-29 20:00:53.232070587 -0700
++++ git/posix/glob.c 2014-08-29 20:01:15.220070587 -0700
+@@ -25,6 +25,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stddef.h>
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
+
+ /* Outcomment the following line for production quality code. */
+ /* #define NDEBUG 1 */
+@@ -607,6 +610,7 @@
+ if (home_dir == NULL || home_dir[0] == '\0')
+ home_dir = "c:/users/default"; /* poor default */
+ # else
++# if ! _LIBC || __OPTION_EGLIBC_GETLOGIN
+ if (home_dir == NULL || home_dir[0] == '\0')
+ {
+ int success;
+@@ -623,19 +627,19 @@
+ if (success)
+ {
+ struct passwd *p;
+-# if defined HAVE_GETPWNAM_R || defined _LIBC
++# if defined HAVE_GETPWNAM_R || defined _LIBC
+ long int pwbuflen = GETPW_R_SIZE_MAX ();
+ char *pwtmpbuf;
+ struct passwd pwbuf;
+ int malloc_pwtmpbuf = 0;
+ int save = errno;
+
+-# ifndef _LIBC
++# ifndef _LIBC
+ if (pwbuflen == -1)
+ /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
+ Try a moderate value. */
+ pwbuflen = 1024;
+-# endif
++# endif
+ if (__libc_use_alloca (alloca_used + pwbuflen))
+ pwtmpbuf = alloca_account (pwbuflen, alloca_used);
+ else
+@@ -682,9 +686,9 @@
+ }
+ __set_errno (save);
+ }
+-# else
++# else
+ p = getpwnam (name);
+-# endif
++# endif
+ if (p != NULL)
+ {
+ if (!malloc_pwtmpbuf)
+@@ -713,6 +717,7 @@
+ }
+ }
+ }
++# endif /* ! _LIBC || __OPTION_EGLIBC_GETLOGIN */
+ if (home_dir == NULL || home_dir[0] == '\0')
+ {
+ if (flags & GLOB_TILDE_CHECK)
+Index: git/posix/Makefile
+===================================================================
+--- git.orig/posix/Makefile 2014-08-29 20:00:53.160070587 -0700
++++ git/posix/Makefile 2014-08-29 20:01:15.220070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for POSIX portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := posix
+
+ include ../Makeconfig
+@@ -43,13 +45,24 @@
+ getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
+ getresuid getresgid setresuid setresgid \
+ pathconf sysconf fpathconf \
+- glob glob64 fnmatch regex \
++ glob glob64 fnmatch \
+ confstr \
+ getopt getopt1 getopt_init \
+ sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
+ sched_primin sched_rr_gi sched_getaffinity sched_setaffinity \
+- getaddrinfo gai_strerror wordexp \
+ pread pwrite pread64 pwrite64 \
++ posix_madvise \
++ get_child_max sched_cpucount sched_cpualloc sched_cpufree
++
++routines-$(OPTION_EGLIBC_INET) += getaddrinfo gai_strerror
++
++ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
++routines-$(OPTION_POSIX_REGEXP) += regex
++else
++routines-$(OPTION_POSIX_REGEXP) += xregex
++endif
++
++routines-$(OPTION_EGLIBC_SPAWN) += \
+ spawn_faction_init spawn_faction_destroy spawn_faction_addclose \
+ spawn_faction_addopen spawn_faction_adddup2 \
+ spawnattr_init spawnattr_destroy \
+@@ -57,41 +70,53 @@
+ spawnattr_getflags spawnattr_setflags \
+ spawnattr_getpgroup spawnattr_setpgroup spawn spawnp spawni \
+ spawnattr_getsigmask spawnattr_getschedpolicy spawnattr_getschedparam \
+- spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam \
+- posix_madvise \
+- get_child_max sched_cpucount sched_cpualloc sched_cpufree
++ spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam
++routines-$(OPTION_EGLIBC_WORDEXP) += wordexp
+
+ aux := init-posix environ
+-tests := tstgetopt testfnm runtests runptests \
++tests := tstgetopt testfnm runtests \
+ tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
+- tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \
+- tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
+- tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \
+- tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \
+- bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
+- bug-regex13 bug-regex14 bug-regex15 bug-regex16 \
+- bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
+- bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
+- bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
+- bug-regex29 bug-regex30 bug-regex31 bug-regex32 \
+- bug-regex33 tst-nice tst-nanosleep tst-regex2 \
+- transbug tst-rxspencer tst-pcre tst-boost \
+- bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
+- tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
++ tst-getlogin tst-mmap tst-truncate \
++ tst-truncate64 tst-fork tst-dir \
++ tst-chmod bug-regex2 bug-regex3 bug-regex4 \
++ tst-gnuglob bug-regex6 bug-regex7 \
++ bug-regex8 bug-regex9 bug-regex10 bug-regex12 \
++ bug-regex14 bug-regex15 \
++ bug-regex21 bug-regex24 \
++ bug-regex27 bug-regex28 bug-regex29 bug-regex30 \
++ bug-regex31 \
++ tst-nice tst-nanosleep \
++ transbug \
++ tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
++ bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
+ tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \
+ tst-execv1 tst-execv2 tst-execl1 tst-execl2 \
+ tst-execve1 tst-execve2 tst-execle1 tst-execle2 \
+- tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \
+- tst-rfc3484-3 \
+- tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \
++ tst-execvp3 tst-execvp4 \
++ tst-fnmatch2 tst-cpucount tst-cpuset \
+ bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
+ bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \
+ tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \
+ tst-fnmatch3 bug-regex36
+-xtests := bug-ga2
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \
++ bug-regex23 bug-regex25 bug-regex32 bug-regex33
++tests-$(OPTION_EGLIBC_INET) \
++ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \
++ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3
++tests-$(OPTION_POSIX_REGEXP_GLIBC) \
++ += runptests bug-regex11 bug-regex13 bug-regex16 \
++ tst-regex2 tst-rxspencer tst-pcre tst-boost
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC))
++tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
++ bug-regex22 bug-regex26
++endif
++xtests-$(OPTION_EGLIBC_INET) += bug-ga2
+ ifeq (yes,$(build-shared))
+ test-srcs := globtest
+-tests += wordexp-test tst-exec tst-spawn
++tests += tst-exec
++tests-$(OPTION_EGLIBC_SPAWN) += tst-spawn
++tests-$(OPTION_EGLIBC_WORDEXP) += wordexp-test
+ endif
+ tests-static = tst-exec-static tst-spawn-static
+ tests += $(tests-static)
+@@ -117,7 +142,10 @@
+
+ ifeq ($(run-built-tests),yes)
+ ifeq (yes,$(build-shared))
+-tests-special += $(objpfx)globtest.out $(objpfx)wordexp-tst.out
++tests-special += $(objpfx)globtest.out
++ifeq (y,$(OPTION_EGLIBC_WORDEXP))
++tests-special += $(objpfx)wordexp-tst.out
++endif
+ endif
+ endif
+
+@@ -125,12 +153,16 @@
+ # XXX Please note that for now we ignore the result of this test.
+ tests-special += $(objpfx)annexc.out
+ ifeq ($(run-built-tests),yes)
+-tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \
++tests-special += $(objpfx)bug-regex2-mem.out \
+ $(objpfx)bug-regex21-mem.out $(objpfx)bug-regex31-mem.out \
+- $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \
+- $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \
++ $(objpfx)tst-getconf.out \
+ $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \
+ $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out
++ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
++tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \
++ $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out
++endif
++
+ xtests-special += $(objpfx)bug-ga2-mem.out
+ endif
+
+@@ -143,6 +175,8 @@
+ $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
+ '$(test-program-prefix)' '$(test-wrapper-env)'; \
+ $(evaluate-test)
++LDLIBS-globtest += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
++
+ $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
+ $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
+ '$(run-program-env)' '$(test-program-prefix-after-env)'; \
+@@ -205,7 +239,10 @@
+ tst-chmod-ARGS = $(objdir)
+ tst-vfork3-ARGS = --test-dir=$(objpfx)
+
+-tst-rxspencer-ARGS = --utf8 rxspencer/tests
++tst-rxspencer-ARGS = rxspencer/tests
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++tst-rxspencer-ARGS += --utf8
++endif
+ tst-rxspencer-no-utf8-ARGS = rxspencer/tests
+ tst-pcre-ARGS = PCRE.tests
+ tst-boost-ARGS = BOOST.tests
+Index: git/posix/regcomp.c
+===================================================================
+--- git.orig/posix/regcomp.c 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regcomp.c 2014-08-29 20:01:15.224070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
+ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
+ size_t length, reg_syntax_t syntax);
+@@ -305,7 +306,7 @@
+ {
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ int node_cnt;
+- int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
++ int icase = (dfa_mb_cur_max (dfa) == 1 && (bufp->syntax & RE_ICASE));
+ for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
+ {
+ int node = init_state->nodes.elems[node_cnt];
+@@ -315,9 +316,9 @@
+ {
+ re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
+ #ifdef RE_ENABLE_I18N
+- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
++ if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ {
+- unsigned char *buf = alloca (dfa->mb_cur_max), *p;
++ unsigned char *buf = alloca (dfa_mb_cur_max (dfa)), *p;
+ wchar_t wc;
+ mbstate_t state;
+
+@@ -348,7 +349,11 @@
+ re_set_fastmap (fastmap, icase, ch);
+ }
+ }
+-#ifdef RE_ENABLE_I18N
++
++ /* When OPTION_EGLIBC_LOCALE_CODE is disabled, the current
++ locale is always C, which has no rules and no multi-byte
++ characters. */
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ else if (type == COMPLEX_BRACKET)
+ {
+ re_charset_t *cset = dfa->nodes[node].opr.mbcset;
+@@ -376,7 +381,7 @@
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+- if (dfa->mb_cur_max > 1
++ if (dfa_mb_cur_max (dfa) > 1
+ && (cset->nchar_classes || cset->non_match || cset->nranges
+ # ifdef _LIBC
+ || cset->nequiv_classes
+@@ -404,7 +409,7 @@
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
++ if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+@@ -413,7 +418,7 @@
+ }
+ }
+ }
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ else if (type == OP_PERIOD
+ #ifdef RE_ENABLE_I18N
+ || type == OP_UTF8_PERIOD
+@@ -856,11 +861,15 @@
+
+ dfa->mb_cur_max = MB_CUR_MAX;
+ #ifdef _LIBC
+- if (dfa->mb_cur_max == 6
++ if (dfa_mb_cur_max (dfa) == 6
+ && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
+ dfa->is_utf8 = 1;
++# if __OPTION_EGLIBC_LOCALE_CODE
+ dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
+ != 0);
++# else
++ dfa->map_notascii = 0;
++# endif
+ #else
+ # ifdef HAVE_LANGINFO_CODESET
+ codeset_name = nl_langinfo (CODESET);
+@@ -886,7 +895,7 @@
+ #endif
+
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ if (dfa->is_utf8)
+ dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
+@@ -1784,7 +1793,7 @@
+ token->word_char = 0;
+ #ifdef RE_ENABLE_I18N
+ token->mb_partial = 0;
+- if (input->mb_cur_max > 1 &&
++ if (string_mb_cur_max (input) > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+@@ -1805,7 +1814,7 @@
+ token->opr.c = c2;
+ token->type = CHARACTER;
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc = re_string_wchar_at (input,
+ re_string_cur_idx (input) + 1);
+@@ -1919,7 +1928,7 @@
+
+ token->type = CHARACTER;
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+@@ -2019,7 +2028,7 @@
+ token->opr.c = c;
+
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1 &&
++ if (string_mb_cur_max (input) > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+@@ -2242,7 +2251,7 @@
+ return NULL;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ while (!re_string_eoi (regexp)
+ && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
+@@ -2380,7 +2389,7 @@
+ *err = REG_ESPACE;
+ return NULL;
+ }
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ dfa->has_mb_node = 1;
+ break;
+ case OP_WORD:
+@@ -2686,7 +2695,7 @@
+ However, for !_LIBC we have no collation elements: if the
+ character set is single byte, the single byte character set
+ that we build below suffices. parse_bracket_exp passes
+- no MBCSET if dfa->mb_cur_max == 1. */
++ no MBCSET if dfa_mb_cur_max (dfa) == 1. */
+ if (mbcset)
+ {
+ /* Check the space of the arrays. */
+@@ -2782,7 +2791,13 @@
+ reg_syntax_t syntax, reg_errcode_t *err)
+ {
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ const unsigned char *collseqmb;
++# define COLLSEQMB_LOOKUP(ix) (collseqmb[(ix)])
++#else
++# define COLLSEQMB_LOOKUP(ix) (ix)
++#endif
++
+ const char *collseqwc;
+ uint32_t nrules;
+ int32_t table_size;
+@@ -2830,18 +2845,20 @@
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+- return collseqmb[br_elem->opr.ch];
++ return COLLSEQMB_LOOKUP (br_elem->opr.ch);
+ else
+ {
+ wint_t wc = __btowc (br_elem->opr.ch);
+ return __collseq_table_lookup (collseqwc, wc);
+ }
+ }
++#if __OPTION_EGLIBC_LOCALE_CODE
+ else if (br_elem->type == MB_CHAR)
+ {
+ if (nrules != 0)
+ return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
+ }
++#endif
+ else if (br_elem->type == COLL_SYM)
+ {
+ size_t sym_name_len = strlen ((char *) br_elem->opr.name);
+@@ -2872,11 +2889,11 @@
+ {
+ /* No valid character. Match it as a single byte
+ character. */
+- return collseqmb[br_elem->opr.name[0]];
++ return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
+ }
+ }
+ else if (sym_name_len == 1)
+- return collseqmb[br_elem->opr.name[0]];
++ return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
+ }
+ return UINT_MAX;
+ }
+@@ -2916,7 +2933,7 @@
+ However, if we have no collation elements, and the character set
+ is single byte, the single byte character set that we
+ build below suffices. */
+- if (nrules > 0 || dfa->mb_cur_max > 1)
++ if (nrules > 0 || dfa_mb_cur_max (dfa) > 1)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+@@ -2953,7 +2970,7 @@
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+- ch_collseq = collseqmb[ch];
++ ch_collseq = COLLSEQMB_LOOKUP (ch);
+ else
+ ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
+ if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
+@@ -3031,7 +3048,10 @@
+ re_bitset_ptr_t sbcset;
+ #ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+- int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
++ int coll_sym_alloc = 0, range_alloc = 0;
++#if __OPTION_EGLIBC_LOCALE_CODE
++ int mbchar_alloc = 0;
++#endif
+ int equiv_class_alloc = 0, char_class_alloc = 0;
+ #endif /* not RE_ENABLE_I18N */
+ int non_match = 0;
+@@ -3039,9 +3059,15 @@
+ int token_len;
+ int first_round = 1;
+ #ifdef _LIBC
++#if __OPTION_EGLIBC_LOCALE_CODE
+ collseqmb = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++#else
++ /* This is true when OPTION_EGLIBC_LOCALE_CODE is disabled, but the
++ compiler can't figure that out. */
++ nrules = 0;
++#endif
+ if (nrules)
+ {
+ /*
+@@ -3169,7 +3195,7 @@
+ #else
+ # ifdef RE_ENABLE_I18N
+ *err = build_range_exp (sbcset,
+- dfa->mb_cur_max > 1 ? mbcset : NULL,
++ dfa_mb_cur_max (dfa) > 1 ? mbcset : NULL,
+ &range_alloc, &start_elem, &end_elem);
+ # else
+ *err = build_range_exp (sbcset, &start_elem, &end_elem);
+@@ -3185,7 +3211,7 @@
+ case SB_CHAR:
+ bitset_set (sbcset, start_elem.opr.ch);
+ break;
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ case MB_CHAR:
+ /* Check whether the array has enough space. */
+ if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+@@ -3203,7 +3229,7 @@
+ }
+ mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
+ break;
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ case EQUIV_CLASS:
+ *err = build_equiv_class (sbcset,
+ #ifdef RE_ENABLE_I18N
+@@ -3253,11 +3279,11 @@
+
+ #ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+
+ if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
+- || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
++ || mbcset->nranges || (dfa_mb_cur_max (dfa) > 1 && (mbcset->nchar_classes
+ || mbcset->non_match)))
+ {
+ bin_tree_t *mbc_tree;
+@@ -3326,7 +3352,7 @@
+ re_token_t *token, int token_len, re_dfa_t *dfa,
+ reg_syntax_t syntax, int accept_hyphen)
+ {
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ int cur_char_size;
+ cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
+ if (cur_char_size > 1)
+@@ -3336,7 +3362,7 @@
+ re_string_skip_bytes (regexp, cur_char_size);
+ return REG_NOERROR;
+ }
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
+ || token->type == OP_OPEN_EQUIV_CLASS)
+@@ -3416,7 +3442,9 @@
+ build_equiv_class (bitset_t sbcset, const unsigned char *name)
+ #endif /* not RE_ENABLE_I18N */
+ {
+-#ifdef _LIBC
++ /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C locale
++ is supported; it has no collation rules. */
++#if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+@@ -3488,7 +3516,7 @@
+ mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
+ }
+ else
+-#endif /* _LIBC */
++#endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ {
+ if (BE (strlen ((const char *) name) != 1, 0))
+ return REG_ECOLLATE;
+@@ -3522,7 +3550,7 @@
+ && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
+ name = "alpha";
+
+-#ifdef RE_ENABLE_I18N
++#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
+ /* Check the space of the arrays. */
+ if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ {
+@@ -3538,7 +3566,7 @@
+ *char_class_alloc = new_char_class_alloc;
+ }
+ mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
+-#endif /* RE_ENABLE_I18N */
++#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
+
+ #define BUILD_CHARCLASS_LOOP(ctype_func) \
+ do { \
+@@ -3649,7 +3677,7 @@
+
+ #ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+ #endif
+
+@@ -3661,7 +3689,7 @@
+ goto build_word_op_espace;
+
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ bin_tree_t *mbc_tree;
+ /* Build a tree for complex bracket. */
+Index: git/posix/regexec.c
+===================================================================
+--- git.orig/posix/regexec.c 2014-08-29 20:00:53.268070587 -0700
++++ git/posix/regexec.c 2014-08-29 20:01:15.224070587 -0700
+@@ -18,6 +18,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #include <stdint.h>
++#include <gnu/option-groups.h>
+
+ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
+ int n) internal_function;
+@@ -186,11 +187,11 @@
+ static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
+ const re_string_t *input, int idx)
+ internal_function;
+-# ifdef _LIBC
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ static unsigned int find_collation_sequence_value (const unsigned char *mbs,
+ size_t name_len)
+ internal_function;
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ #endif /* RE_ENABLE_I18N */
+ static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
+ const re_dfastate_t *state,
+@@ -255,25 +256,9 @@
+ return err != REG_NOERROR;
+ }
+
+-#ifdef _LIBC
+-# include <shlib-compat.h>
+-versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+-
+-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+-__typeof__ (__regexec) __compat_regexec;
+-
+-int
+-attribute_compat_text_section
+-__compat_regexec (const regex_t *__restrict preg,
+- const char *__restrict string, size_t nmatch,
+- regmatch_t pmatch[], int eflags)
+-{
+- return regexec (preg, string, nmatch, pmatch,
+- eflags & (REG_NOTBOL | REG_NOTEOL));
+-}
+-compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+-# endif
+-#endif
++/* EGLIBC: The code that used to be here was move to a separate file
++ so that it can be shared with xregex.c. */
++#include "regexec-compat.c"
+
+ /* Entry points for GNU code. */
+
+@@ -728,7 +713,7 @@
+ incr = (range < 0) ? -1 : 1;
+ left_lim = (range < 0) ? start + range : start;
+ right_lim = (range < 0) ? start : start + range;
+- sb = dfa->mb_cur_max == 1;
++ sb = dfa_mb_cur_max (dfa) == 1;
+ match_kind =
+ (fastmap
+ ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
+@@ -3448,7 +3433,7 @@
+ if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+
+- if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
++ if (dest_states[i] != dest_states_word[i] && dfa_mb_cur_max (dfa) > 1)
+ need_word_trtable = 1;
+
+ dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
+@@ -3590,7 +3575,7 @@
+ else if (type == OP_PERIOD)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ bitset_merge (accepts, dfa->sb_char);
+ else
+ #endif
+@@ -3641,7 +3626,7 @@
+ continue;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+ else
+@@ -3660,7 +3645,7 @@
+ continue;
+ }
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
+ else
+@@ -3832,12 +3817,6 @@
+ if (node->type == COMPLEX_BRACKET)
+ {
+ const re_charset_t *cset = node->opr.mbcset;
+-# ifdef _LIBC
+- const unsigned char *pin
+- = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
+- int j;
+- uint32_t nrules;
+-# endif /* _LIBC */
+ int match_len = 0;
+ wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
+ ? re_string_wchar_at (input, str_idx) : 0);
+@@ -3849,6 +3828,7 @@
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* match with character_class? */
+ for (i = 0; i < cset->nchar_classes; ++i)
+ {
+@@ -3859,8 +3839,16 @@
+ goto check_node_accept_bytes_match;
+ }
+ }
++#endif
++
++ /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C
++ locale is supported; it has no collation rules. */
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
++ const unsigned char *pin
++ = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
++ int j;
++ uint32_t nrules;
+
+-# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+@@ -3953,8 +3941,12 @@
+ }
+ }
+ else
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ {
++ /* In the _LIBC version, if OPTION_EGLIBC_LOCALE_CODE is
++ disabled, there can be no multibyte range endpoints, and
++ cset->nranges is always zero. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* match with range expression? */
+ #if __GNUC__ >= 2
+ wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
+@@ -3973,6 +3965,7 @@
+ goto check_node_accept_bytes_match;
+ }
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+ }
+ check_node_accept_bytes_match:
+ if (!cset->non_match)
+@@ -3988,7 +3981,7 @@
+ return 0;
+ }
+
+-# ifdef _LIBC
++# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
+ static unsigned int
+ internal_function
+ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
+@@ -4046,7 +4039,7 @@
+ return UINT_MAX;
+ }
+ }
+-# endif /* _LIBC */
++# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
+ #endif /* RE_ENABLE_I18N */
+
+ /* Check whether the node accepts the byte which is IDX-th
+@@ -4137,7 +4130,7 @@
+ if (pstr->icase)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+@@ -4150,7 +4143,7 @@
+ else
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ build_wcs_buffer (pstr);
+ else
+ #endif /* RE_ENABLE_I18N */
+Index: git/posix/regexec-compat.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/posix/regexec-compat.c 2014-08-29 20:01:15.224070587 -0700
+@@ -0,0 +1,39 @@
++/* Extended regular expression matching and search library.
++ Copyright (C) 2008 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
++
++ 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. */
++
++#ifdef _LIBC
++# include <shlib-compat.h>
++versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
++
++# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
++__typeof__ (__regexec) __compat_regexec;
++
++int
++attribute_compat_text_section
++__compat_regexec (const regex_t *__restrict preg,
++ const char *__restrict string, size_t nmatch,
++ regmatch_t pmatch[], int eflags)
++{
++ return regexec (preg, string, nmatch, pmatch,
++ eflags & (REG_NOTBOL | REG_NOTEOL));
++}
++compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
++# endif
++#endif
+Index: git/posix/regex.h
+===================================================================
+--- git.orig/posix/regex.h 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex.h 2014-08-29 20:01:15.224070587 -0700
+@@ -21,6 +21,7 @@
+ #define _REGEX_H 1
+
+ #include <sys/types.h>
++#include <gnu/option-groups.h>
+
+ /* Allow the use in C++ code. */
+ #ifdef __cplusplus
+@@ -156,6 +157,8 @@
+ treated as 'a\{1'. */
+ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
++/* EGLIBC: Old regex implementation does not support these. */
++# if __OPTION_POSIX_REGEXP_GLIBC
+ /* 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)
+@@ -172,6 +175,7 @@
+ /* If this bit is set, then no_sub will be set to 1 during
+ re_compile_pattern. */
+ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
++# endif /* __OPTION_POSIX_REGEXP_GLIBC */
+ #endif
+
+ /* This global variable defines the particular regexp syntax to use (for
+@@ -231,8 +235,13 @@
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
++#if __OPTION_POSIX_REGEXP_GLIBC
+ #define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
++#else
++#define RE_SYNTAX_POSIX_BASIC \
++ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
++#endif
+
+ /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+@@ -298,9 +307,11 @@
+ /* Like REG_NOTBOL, except for the end-of-line. */
+ #define REG_NOTEOL (1 << 1)
+
++#if __OPTION_POSIX_REGEXP_GLIBC
+ /* Use PMATCH[0] to delimit the start and end of the search in the
+ buffer. */
+ #define REG_STARTEND (1 << 2)
++#endif
+
+
+ /* If any error codes are removed, changed, or added, update the
+Index: git/posix/regex_internal.c
+===================================================================
+--- git.orig/posix/regex_internal.c 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex_internal.c 2014-08-29 20:01:15.224070587 -0700
+@@ -43,8 +43,8 @@
+ int init_buf_len;
+
+ /* Ensure at least one character fits into the buffers. */
+- if (init_len < dfa->mb_cur_max)
+- init_len = dfa->mb_cur_max;
++ if (init_len < dfa_mb_cur_max (dfa))
++ init_len = dfa_mb_cur_max (dfa);
+ init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+@@ -55,7 +55,7 @@
+ pstr->word_char = dfa->word_char;
+ pstr->word_ops_used = dfa->word_ops_used;
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+- pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
++ pstr->valid_len = (pstr->mbs_allocated || dfa_mb_cur_max (dfa) > 1) ? 0 : len;
+ pstr->valid_raw_len = pstr->valid_len;
+ return REG_NOERROR;
+ }
+@@ -82,7 +82,7 @@
+ if (icase)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ {
+ while (1)
+ {
+@@ -91,7 +91,7 @@
+ return ret;
+ if (pstr->valid_raw_len >= len)
+ break;
+- if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
++ if (pstr->bufs_len > pstr->valid_len + dfa_mb_cur_max (dfa))
+ break;
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+@@ -105,7 +105,7 @@
+ else
+ {
+ #ifdef RE_ENABLE_I18N
+- if (dfa->mb_cur_max > 1)
++ if (dfa_mb_cur_max (dfa) > 1)
+ build_wcs_buffer (pstr);
+ else
+ #endif /* RE_ENABLE_I18N */
+@@ -130,7 +130,7 @@
+ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
+ {
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ wint_t *new_wcs;
+
+@@ -177,7 +177,7 @@
+ pstr->trans = trans;
+ pstr->icase = icase ? 1 : 0;
+ pstr->mbs_allocated = (trans != NULL || icase);
+- pstr->mb_cur_max = dfa->mb_cur_max;
++ pstr->mb_cur_max = dfa_mb_cur_max (dfa);
+ pstr->is_utf8 = dfa->is_utf8;
+ pstr->map_notascii = dfa->map_notascii;
+ pstr->stop = pstr->len;
+@@ -203,7 +203,7 @@
+ {
+ #ifdef _LIBC
+ unsigned char buf[MB_LEN_MAX];
+- assert (MB_LEN_MAX >= pstr->mb_cur_max);
++ assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
+ #else
+ unsigned char buf[64];
+ #endif
+@@ -226,7 +226,7 @@
+ {
+ int i, ch;
+
+- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
++ for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
+ buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
+@@ -275,7 +275,7 @@
+ size_t mbclen;
+ #ifdef _LIBC
+ char buf[MB_LEN_MAX];
+- assert (MB_LEN_MAX >= pstr->mb_cur_max);
++ assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
+ #else
+ char buf[64];
+ #endif
+@@ -369,7 +369,7 @@
+ {
+ int i, ch;
+
+- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
++ for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
+ buf[i] = pstr->trans[ch];
+@@ -567,8 +567,9 @@
+ }
+
+ /* This function re-construct the buffers.
+- Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
+- convert to upper case in case of REG_ICASE, apply translation. */
++ Concretely, convert to wide character in case of
++ string_mb_cur_max (pstr) > 1, convert to upper case in case of
++ REG_ICASE, apply translation. */
+
+ static reg_errcode_t
+ internal_function __attribute_warn_unused_result__
+@@ -579,7 +580,7 @@
+ {
+ /* Reset buffer. */
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+ #endif /* RE_ENABLE_I18N */
+ pstr->len = pstr->raw_len;
+@@ -670,7 +671,7 @@
+ pstr->tip_context = re_string_context_at (pstr, offset - 1,
+ eflags);
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+ #endif /* RE_ENABLE_I18N */
+@@ -699,7 +700,7 @@
+ #endif
+ pstr->valid_len = 0;
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ int wcs_idx;
+ wint_t wc = WEOF;
+@@ -711,7 +712,7 @@
+ /* Special case UTF-8. Multi-byte chars start with any
+ byte other than 0x80 - 0xbf. */
+ raw = pstr->raw_mbs + pstr->raw_mbs_idx;
+- end = raw + (offset - pstr->mb_cur_max);
++ end = raw + (offset - string_mb_cur_max (pstr));
+ if (end < pstr->raw_mbs)
+ end = pstr->raw_mbs;
+ p = raw + offset - 1;
+@@ -803,7 +804,7 @@
+
+ /* Then build the buffers. */
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1)
++ if (string_mb_cur_max (pstr) > 1)
+ {
+ if (pstr->icase)
+ {
+@@ -841,7 +842,7 @@
+ return re_string_peek_byte (pstr, idx);
+
+ #ifdef RE_ENABLE_I18N
+- if (pstr->mb_cur_max > 1
++ if (string_mb_cur_max (pstr) > 1
+ && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
+ return re_string_peek_byte (pstr, idx);
+ #endif
+@@ -930,7 +931,7 @@
+ return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
+ : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
+ #ifdef RE_ENABLE_I18N
+- if (input->mb_cur_max > 1)
++ if (string_mb_cur_max (input) > 1)
+ {
+ wint_t wc;
+ int wc_idx = idx;
+@@ -1444,7 +1445,7 @@
+ dfa->nodes[dfa->nodes_len].constraint = 0;
+ #ifdef RE_ENABLE_I18N
+ dfa->nodes[dfa->nodes_len].accept_mb =
+- (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
++ (type == OP_PERIOD && dfa_mb_cur_max (dfa) > 1) || type == COMPLEX_BRACKET;
+ #endif
+ dfa->nexts[dfa->nodes_len] = -1;
+ re_node_set_init_empty (dfa->edests + dfa->nodes_len);
+Index: git/posix/regex_internal.h
+===================================================================
+--- git.orig/posix/regex_internal.h 2014-08-29 20:00:53.264070587 -0700
++++ git/posix/regex_internal.h 2014-08-29 20:01:15.224070587 -0700
+@@ -26,6 +26,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++#if defined _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
+ # include <langinfo.h>
+ #endif
+@@ -370,6 +374,13 @@
+ };
+ typedef struct re_string_t re_string_t;
+
++/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
++ help the compiler make use of that fact. */
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define string_mb_cur_max(str) ((str)->mb_cur_max + 0)
++#else
++# define string_mb_cur_max(str) (1)
++#endif
+
+ struct re_dfa_t;
+ typedef struct re_dfa_t re_dfa_t;
+@@ -655,6 +666,14 @@
+ __libc_lock_define (, lock)
+ };
+
++/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
++ help the compiler make use of that fact. */
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define dfa_mb_cur_max(dfa) ((dfa)->mb_cur_max + 0)
++#else
++# define dfa_mb_cur_max(dfa) (1)
++#endif
++
+ #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
+ #define re_node_set_remove(set,id) \
+ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
+@@ -715,7 +734,7 @@
+ re_string_char_size_at (const re_string_t *pstr, int idx)
+ {
+ int byte_idx;
+- if (pstr->mb_cur_max == 1)
++ if (string_mb_cur_max (pstr) == 1)
+ return 1;
+ for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
+ if (pstr->wcs[idx + byte_idx] != WEOF)
+@@ -727,7 +746,7 @@
+ internal_function __attribute__ ((pure, unused))
+ re_string_wchar_at (const re_string_t *pstr, int idx)
+ {
+- if (pstr->mb_cur_max == 1)
++ if (string_mb_cur_max (pstr) == 1)
+ return (wint_t) pstr->mbs[idx];
+ return (wint_t) pstr->wcs[idx];
+ }
+Index: git/posix/xregex.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/posix/xregex.c 2014-08-29 20:01:15.228070587 -0700
+@@ -0,0 +1,8212 @@
++/* Extended regular expression matching and search library,
++ version 0.12.
++ (Implements POSIX draft P1003.2/D11.2, except for some of the
++ internationalization features.)
++
++ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++ 2002, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA
++ 02110-1301 USA. */
++
++/* AIX requires this to be the first thing in the file. */
++#if defined _AIX && !defined __GNUC__ && !defined REGEX_MALLOC
++ #pragma alloca
++#endif
++
++#undef _GNU_SOURCE
++#define _GNU_SOURCE
++
++#ifndef INSIDE_RECURSION
++# ifdef HAVE_CONFIG_H
++# include <config.h>
++# endif
++#endif
++
++/*#include <ansidecl.h>*/
++
++#ifndef INSIDE_RECURSION
++
++# if defined STDC_HEADERS && !defined emacs
++# include <stddef.h>
++# else
++/* We need this for `regex.h', and perhaps for the Emacs include files. */
++# include <sys/types.h>
++# endif
++
++# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
++
++/* For platform which support the ISO C amendement 1 functionality we
++ support user defined character classes. */
++# if WIDE_CHAR_SUPPORT
++/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
++# include <wchar.h>
++# include <wctype.h>
++# endif
++
++# ifdef _LIBC
++/* We have to keep the namespace clean. */
++# define regfree(preg) __regfree (preg)
++# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
++# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
++# define regerror(errcode, preg, errbuf, errbuf_size) \
++ __regerror(errcode, preg, errbuf, errbuf_size)
++# define re_set_registers(bu, re, nu, st, en) \
++ __re_set_registers (bu, re, nu, st, en)
++# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
++ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
++# define re_match(bufp, string, size, pos, regs) \
++ __re_match (bufp, string, size, pos, regs)
++# define re_search(bufp, string, size, startpos, range, regs) \
++ __re_search (bufp, string, size, startpos, range, regs)
++# define re_compile_pattern(pattern, length, bufp) \
++ __re_compile_pattern (pattern, length, bufp)
++# define re_set_syntax(syntax) __re_set_syntax (syntax)
++# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
++ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
++# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
++
++# define btowc __btowc
++
++/* We are also using some library internals. */
++# include <locale/localeinfo.h>
++# include <locale/elem-hash.h>
++# include <langinfo.h>
++# include <locale/coll-lookup.h>
++# endif
++
++/* This is for other GNU distributions with internationalized messages. */
++# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
++# include <libintl.h>
++# ifdef _LIBC
++# undef gettext
++# define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
++# endif
++# else
++# define gettext(msgid) (msgid)
++# endif
++
++# ifndef gettext_noop
++/* This define is so xgettext can find the internationalizable
++ strings. */
++# define gettext_noop(String) String
++# endif
++
++/* The `emacs' switch turns on certain matching commands
++ that make sense only in Emacs. */
++# ifdef emacs
++
++# include "lisp.h"
++# include "buffer.h"
++# include "syntax.h"
++
++# else /* not emacs */
++
++/* If we are not linking with Emacs proper,
++ we can't use the relocating allocator
++ even if config.h says that we can. */
++# undef REL_ALLOC
++
++# if defined STDC_HEADERS || defined _LIBC
++# include <stdlib.h>
++# else
++char *malloc ();
++char *realloc ();
++# endif
++
++/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
++ If nothing else has been done, use the method below. */
++# ifdef INHIBIT_STRING_HEADER
++# if !(defined HAVE_BZERO && defined HAVE_BCOPY)
++# if !defined bzero && !defined bcopy
++# undef INHIBIT_STRING_HEADER
++# endif
++# endif
++# endif
++
++/* This is the normal way of making sure we have a bcopy and a bzero.
++ This is used in most programs--a few other programs avoid this
++ by defining INHIBIT_STRING_HEADER. */
++# ifndef INHIBIT_STRING_HEADER
++# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
++# include <string.h>
++# ifndef bzero
++# ifndef _LIBC
++# define bzero(s, n) (memset (s, '\0', n), (s))
++# else
++# define bzero(s, n) __bzero (s, n)
++# endif
++# endif
++# else
++# include <strings.h>
++# ifndef memcmp
++# define memcmp(s1, s2, n) bcmp (s1, s2, n)
++# endif
++# ifndef memcpy
++# define memcpy(d, s, n) (bcopy (s, d, n), (d))
++# endif
++# endif
++# endif
++
++/* Define the syntax stuff for \<, \>, etc. */
++
++/* This must be nonzero for the wordchar and notwordchar pattern
++ commands in re_match_2. */
++# ifndef Sword
++# define Sword 1
++# endif
++
++# ifdef SWITCH_ENUM_BUG
++# define SWITCH_ENUM_CAST(x) ((int)(x))
++# else
++# define SWITCH_ENUM_CAST(x) (x)
++# endif
++
++# endif /* not emacs */
++
++# if defined _LIBC || HAVE_LIMITS_H
++# include <limits.h>
++# endif
++
++# ifndef MB_LEN_MAX
++# define MB_LEN_MAX 1
++# endif
++
++/* Get the interface, including the syntax bits. */
++# include "regex.h"
++
++/* isalpha etc. are used for the character classes. */
++# include <ctype.h>
++
++/* Jim Meyering writes:
++
++ "... Some ctype macros are valid only for character codes that
++ isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
++ using /bin/cc or gcc but without giving an ansi option). So, all
++ ctype uses should be through macros like ISPRINT... If
++ STDC_HEADERS is defined, then autoconf has verified that the ctype
++ macros don't need to be guarded with references to isascii. ...
++ Defining isascii to 1 should let any compiler worth its salt
++ eliminate the && through constant folding."
++ Solaris defines some of these symbols so we must undefine them first. */
++
++# undef ISASCII
++# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
++# define ISASCII(c) 1
++# else
++# define ISASCII(c) isascii(c)
++# endif
++
++# ifdef isblank
++# define ISBLANK(c) (ISASCII (c) && isblank (c))
++# else
++# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
++# endif
++# ifdef isgraph
++# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
++# else
++# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
++# endif
++
++# undef ISPRINT
++# define ISPRINT(c) (ISASCII (c) && isprint (c))
++# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
++# define ISALNUM(c) (ISASCII (c) && isalnum (c))
++# define ISALPHA(c) (ISASCII (c) && isalpha (c))
++# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
++# define ISLOWER(c) (ISASCII (c) && islower (c))
++# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
++# define ISSPACE(c) (ISASCII (c) && isspace (c))
++# define ISUPPER(c) (ISASCII (c) && isupper (c))
++# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
++
++# ifdef _tolower
++# define TOLOWER(c) _tolower(c)
++# else
++# define TOLOWER(c) tolower(c)
++# endif
++
++# ifndef NULL
++# define NULL (void *)0
++# endif
++
++/* We remove any previous definition of `SIGN_EXTEND_CHAR',
++ since ours (we hope) works properly with all combinations of
++ machines, compilers, `char' and `unsigned char' argument types.
++ (Per Bothner suggested the basic approach.) */
++# undef SIGN_EXTEND_CHAR
++# if __STDC__
++# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
++# else /* not __STDC__ */
++/* As in Harbison and Steele. */
++# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
++# endif
++
++# ifndef emacs
++/* How many characters in the character set. */
++# define CHAR_SET_SIZE 256
++
++# ifdef SYNTAX_TABLE
++
++extern char *re_syntax_table;
++
++# else /* not SYNTAX_TABLE */
++
++static char re_syntax_table[CHAR_SET_SIZE];
++
++static void init_syntax_once (void);
++
++static void
++init_syntax_once (void)
++{
++ register int c;
++ static int done = 0;
++
++ if (done)
++ return;
++ bzero (re_syntax_table, sizeof re_syntax_table);
++
++ for (c = 0; c < CHAR_SET_SIZE; ++c)
++ if (ISALNUM (c))
++ re_syntax_table[c] = Sword;
++
++ re_syntax_table['_'] = Sword;
++
++ done = 1;
++}
++
++# endif /* not SYNTAX_TABLE */
++
++# define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
++
++# endif /* emacs */
++
++/* Integer type for pointers. */
++# if !defined _LIBC && !defined HAVE_UINTPTR_T
++typedef unsigned long int uintptr_t;
++# endif
++
++/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
++ use `alloca' instead of `malloc'. This is because using malloc in
++ re_search* or re_match* could cause memory leaks when C-g is used in
++ Emacs; also, malloc is slower and causes storage fragmentation. On
++ the other hand, malloc is more portable, and easier to debug.
++
++ Because we sometimes use alloca, some routines have to be macros,
++ not functions -- `alloca'-allocated space disappears at the end of the
++ function it is called in. */
++
++# ifdef REGEX_MALLOC
++
++# define REGEX_ALLOCATE malloc
++# define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
++# define REGEX_FREE free
++
++# else /* not REGEX_MALLOC */
++
++/* Emacs already defines alloca, sometimes. */
++# ifndef alloca
++
++/* Make alloca work the best possible way. */
++# ifdef __GNUC__
++# define alloca __builtin_alloca
++# else /* not __GNUC__ */
++# if HAVE_ALLOCA_H
++# include <alloca.h>
++# endif /* HAVE_ALLOCA_H */
++# endif /* not __GNUC__ */
++
++# endif /* not alloca */
++
++# define REGEX_ALLOCATE alloca
++
++/* Assumes a `char *destination' variable. */
++# define REGEX_REALLOCATE(source, osize, nsize) \
++ (destination = (char *) alloca (nsize), \
++ memcpy (destination, source, osize))
++
++/* No need to do anything to free, after alloca. */
++# define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
++
++# endif /* not REGEX_MALLOC */
++
++/* Define how to allocate the failure stack. */
++
++# if defined REL_ALLOC && defined REGEX_MALLOC
++
++# define REGEX_ALLOCATE_STACK(size) \
++ r_alloc (&failure_stack_ptr, (size))
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
++ r_re_alloc (&failure_stack_ptr, (nsize))
++# define REGEX_FREE_STACK(ptr) \
++ r_alloc_free (&failure_stack_ptr)
++
++# else /* not using relocating allocator */
++
++# ifdef REGEX_MALLOC
++
++# define REGEX_ALLOCATE_STACK malloc
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
++# define REGEX_FREE_STACK free
++
++# else /* not REGEX_MALLOC */
++
++# define REGEX_ALLOCATE_STACK alloca
++
++# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
++ REGEX_REALLOCATE (source, osize, nsize)
++/* No need to explicitly free anything. */
++# define REGEX_FREE_STACK(arg)
++
++# endif /* not REGEX_MALLOC */
++# endif /* not using relocating allocator */
++
++
++/* True if `size1' is non-NULL and PTR is pointing anywhere inside
++ `string1' or just past its end. This works if PTR is NULL, which is
++ a good thing. */
++# define FIRST_STRING_P(ptr) \
++ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
++
++/* (Re)Allocate N items of type T using malloc, or fail. */
++# define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
++# define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
++# define RETALLOC_IF(addr, n, t) \
++ if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
++# define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
++
++# define BYTEWIDTH 8 /* In bits. */
++
++# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
++
++# undef MAX
++# undef MIN
++# define MAX(a, b) ((a) > (b) ? (a) : (b))
++# define MIN(a, b) ((a) < (b) ? (a) : (b))
++
++typedef char boolean;
++# define false 0
++# define true 1
++
++static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
++ reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp);
++
++static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int pos,
++ struct re_registers *regs,
++ int stop);
++static int byte_re_search_2 (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop);
++static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
++
++#ifdef MBS_SUPPORT
++static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
++ reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp);
++
++
++static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *cstring1, int csize1,
++ const char *cstring2, int csize2,
++ int pos,
++ struct re_registers *regs,
++ int stop,
++ wchar_t *string1, int size1,
++ wchar_t *string2, int size2,
++ int *mbs_offset1, int *mbs_offset2);
++static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop);
++static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
++#endif
++
++/* These are the command codes that appear in compiled regular
++ expressions. Some opcodes are followed by argument bytes. A
++ command code can specify any interpretation whatsoever for its
++ arguments. Zero bytes may appear in the compiled regular expression. */
++
++typedef enum
++{
++ no_op = 0,
++
++ /* Succeed right away--no more backtracking. */
++ succeed,
++
++ /* Followed by one byte giving n, then by n literal bytes. */
++ exactn,
++
++# ifdef MBS_SUPPORT
++ /* Same as exactn, but contains binary data. */
++ exactn_bin,
++# endif
++
++ /* Matches any (more or less) character. */
++ anychar,
++
++ /* Matches any one char belonging to specified set. First
++ following byte is number of bitmap bytes. Then come bytes
++ for a bitmap saying which chars are in. Bits in each byte
++ are ordered low-bit-first. A character is in the set if its
++ bit is 1. A character too large to have a bit in the map is
++ automatically not in the set. */
++ /* ifdef MBS_SUPPORT, following element is length of character
++ classes, length of collating symbols, length of equivalence
++ classes, length of character ranges, and length of characters.
++ Next, character class element, collating symbols elements,
++ equivalence class elements, range elements, and character
++ elements follow.
++ See regex_compile function. */
++ charset,
++
++ /* Same parameters as charset, but match any character that is
++ not one of those specified. */
++ charset_not,
++
++ /* Start remembering the text that is matched, for storing in a
++ register. Followed by one byte with the register number, in
++ the range 0 to one less than the pattern buffer's re_nsub
++ field. Then followed by one byte with the number of groups
++ inner to this one. (This last has to be part of the
++ start_memory only because we need it in the on_failure_jump
++ of re_match_2.) */
++ start_memory,
++
++ /* Stop remembering the text that is matched and store it in a
++ memory register. Followed by one byte with the register
++ number, in the range 0 to one less than `re_nsub' in the
++ pattern buffer, and one byte with the number of inner groups,
++ just like `start_memory'. (We need the number of inner
++ groups here because we don't have any easy way of finding the
++ corresponding start_memory when we're at a stop_memory.) */
++ stop_memory,
++
++ /* Match a duplicate of something remembered. Followed by one
++ byte containing the register number. */
++ duplicate,
++
++ /* Fail unless at beginning of line. */
++ begline,
++
++ /* Fail unless at end of line. */
++ endline,
++
++ /* Succeeds if at beginning of buffer (if emacs) or at beginning
++ of string to be matched (if not). */
++ begbuf,
++
++ /* Analogously, for end of buffer/string. */
++ endbuf,
++
++ /* Followed by two byte relative address to which to jump. */
++ jump,
++
++ /* Same as jump, but marks the end of an alternative. */
++ jump_past_alt,
++
++ /* Followed by two-byte relative address of place to resume at
++ in case of failure. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ on_failure_jump,
++
++ /* Like on_failure_jump, but pushes a placeholder instead of the
++ current string position when executed. */
++ on_failure_keep_string_jump,
++
++ /* Throw away latest failure point and then jump to following
++ two-byte relative address. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ pop_failure_jump,
++
++ /* Change to pop_failure_jump if know won't have to backtrack to
++ match; otherwise change to jump. This is used to jump
++ back to the beginning of a repeat. If what follows this jump
++ clearly won't match what the repeat does, such that we can be
++ sure that there is no use backtracking out of repetitions
++ already matched, then we change it to a pop_failure_jump.
++ Followed by two-byte address. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ maybe_pop_jump,
++
++ /* Jump to following two-byte address, and push a dummy failure
++ point. This failure point will be thrown away if an attempt
++ is made to use it for a failure. A `+' construct makes this
++ before the first repeat. Also used as an intermediary kind
++ of jump when compiling an alternative. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ dummy_failure_jump,
++
++ /* Push a dummy failure point and continue. Used at the end of
++ alternatives. */
++ push_dummy_failure,
++
++ /* Followed by two-byte relative address and two-byte number n.
++ After matching N times, jump to the address upon failure. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ succeed_n,
++
++ /* Followed by two-byte relative address, and two-byte number n.
++ Jump to the address N times, then fail. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ jump_n,
++
++ /* Set the following two-byte relative address to the
++ subsequent two-byte number. The address *includes* the two
++ bytes of number. */
++ /* ifdef MBS_SUPPORT, the size of address is 1. */
++ set_number_at,
++
++ wordchar, /* Matches any word-constituent character. */
++ notwordchar, /* Matches any char that is not a word-constituent. */
++
++ wordbeg, /* Succeeds if at word beginning. */
++ wordend, /* Succeeds if at word end. */
++
++ wordbound, /* Succeeds if at a word boundary. */
++ notwordbound /* Succeeds if not at a word boundary. */
++
++# ifdef emacs
++ ,before_dot, /* Succeeds if before point. */
++ at_dot, /* Succeeds if at point. */
++ after_dot, /* Succeeds if after point. */
++
++ /* Matches any character whose syntax is specified. Followed by
++ a byte which contains a syntax code, e.g., Sword. */
++ syntaxspec,
++
++ /* Matches any character whose syntax is not that specified. */
++ notsyntaxspec
++# endif /* emacs */
++} re_opcode_t;
++#endif /* not INSIDE_RECURSION */
++
++
++#ifdef BYTE
++# define CHAR_T char
++# define UCHAR_T unsigned char
++# define COMPILED_BUFFER_VAR bufp->buffer
++# define OFFSET_ADDRESS_SIZE 2
++# define PREFIX(name) byte_##name
++# define ARG_PREFIX(name) name
++# define PUT_CHAR(c) putchar (c)
++#else
++# ifdef WCHAR
++# define CHAR_T wchar_t
++# define UCHAR_T wchar_t
++# define COMPILED_BUFFER_VAR wc_buffer
++# define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
++# define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
++# define PREFIX(name) wcs_##name
++# define ARG_PREFIX(name) c##name
++/* Should we use wide stream?? */
++# define PUT_CHAR(c) printf ("%C", c);
++# define TRUE 1
++# define FALSE 0
++# else
++# ifdef MBS_SUPPORT
++# define WCHAR
++# define INSIDE_RECURSION
++# include "xregex.c"
++# undef INSIDE_RECURSION
++# endif
++# define BYTE
++# define INSIDE_RECURSION
++# include "xregex.c"
++# undef INSIDE_RECURSION
++# endif
++#endif
++
++#ifdef INSIDE_RECURSION
++/* Common operations on the compiled pattern. */
++
++/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# ifdef WCHAR
++# define STORE_NUMBER(destination, number) \
++ do { \
++ *(destination) = (UCHAR_T)(number); \
++ } while (0)
++# else /* BYTE */
++# define STORE_NUMBER(destination, number) \
++ do { \
++ (destination)[0] = (number) & 0377; \
++ (destination)[1] = (number) >> 8; \
++ } while (0)
++# endif /* WCHAR */
++
++/* Same as STORE_NUMBER, except increment DESTINATION to
++ the byte after where the number is stored. Therefore, DESTINATION
++ must be an lvalue. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# define STORE_NUMBER_AND_INCR(destination, number) \
++ do { \
++ STORE_NUMBER (destination, number); \
++ (destination) += OFFSET_ADDRESS_SIZE; \
++ } while (0)
++
++/* Put into DESTINATION a number stored in two contiguous bytes starting
++ at SOURCE. */
++/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
++
++# ifdef WCHAR
++# define EXTRACT_NUMBER(destination, source) \
++ do { \
++ (destination) = *(source); \
++ } while (0)
++# else /* BYTE */
++# define EXTRACT_NUMBER(destination, source) \
++ do { \
++ (destination) = *(source) & 0377; \
++ (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
++ } while (0)
++# endif
++
++# ifdef DEBUG
++static void PREFIX(extract_number) (int *dest, UCHAR_T *source);
++static void
++PREFIX(extract_number) (int *dest, UCHAR_T *source)
++{
++# ifdef WCHAR
++ *dest = *source;
++# else /* BYTE */
++ int temp = SIGN_EXTEND_CHAR (*(source + 1));
++ *dest = *source & 0377;
++ *dest += temp << 8;
++# endif
++}
++
++# ifndef EXTRACT_MACROS /* To debug the macros. */
++# undef EXTRACT_NUMBER
++# define EXTRACT_NUMBER(dest, src) PREFIX(extract_number) (&dest, src)
++# endif /* not EXTRACT_MACROS */
++
++# endif /* DEBUG */
++
++/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
++ SOURCE must be an lvalue. */
++
++# define EXTRACT_NUMBER_AND_INCR(destination, source) \
++ do { \
++ EXTRACT_NUMBER (destination, source); \
++ (source) += OFFSET_ADDRESS_SIZE; \
++ } while (0)
++
++# ifdef DEBUG
++static void PREFIX(extract_number_and_incr) (int *destination,
++ UCHAR_T **source);
++static void
++PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
++{
++ PREFIX(extract_number) (destination, *source);
++ *source += OFFSET_ADDRESS_SIZE;
++}
++
++# ifndef EXTRACT_MACROS
++# undef EXTRACT_NUMBER_AND_INCR
++# define EXTRACT_NUMBER_AND_INCR(dest, src) \
++ PREFIX(extract_number_and_incr) (&dest, &src)
++# endif /* not EXTRACT_MACROS */
++
++# endif /* DEBUG */
++
++
++
++/* If DEBUG is defined, Regex prints many voluminous messages about what
++ it is doing (if the variable `debug' is nonzero). If linked with the
++ main program in `iregex.c', you can enter patterns and strings
++ interactively. And if linked with the main program in `main.c' and
++ the other test files, you can run the already-written tests. */
++
++# ifdef DEBUG
++
++# ifndef DEFINED_ONCE
++
++/* We use standard I/O for debugging. */
++# include <stdio.h>
++
++/* It is useful to test things that ``must'' be true when debugging. */
++# include <assert.h>
++
++static int debug;
++
++# define DEBUG_STATEMENT(e) e
++# define DEBUG_PRINT1(x) if (debug) printf (x)
++# define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
++# define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
++# define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
++# endif /* not DEFINED_ONCE */
++
++# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
++ if (debug) PREFIX(print_partial_compiled_pattern) (s, e)
++# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
++ if (debug) PREFIX(print_double_string) (w, s1, sz1, s2, sz2)
++
++
++/* Print the fastmap in human-readable form. */
++
++# ifndef DEFINED_ONCE
++void
++print_fastmap (char *fastmap)
++{
++ unsigned was_a_range = 0;
++ unsigned i = 0;
++
++ while (i < (1 << BYTEWIDTH))
++ {
++ if (fastmap[i++])
++ {
++ was_a_range = 0;
++ putchar (i - 1);
++ while (i < (1 << BYTEWIDTH) && fastmap[i])
++ {
++ was_a_range = 1;
++ i++;
++ }
++ if (was_a_range)
++ {
++ printf ("-");
++ putchar (i - 1);
++ }
++ }
++ }
++ putchar ('\n');
++}
++# endif /* not DEFINED_ONCE */
++
++
++/* Print a compiled pattern string in human-readable form, starting at
++ the START pointer into it and ending just before the pointer END. */
++
++void
++PREFIX(print_partial_compiled_pattern) (UCHAR_T *start, UCHAR_T *end)
++{
++ int mcnt, mcnt2;
++ UCHAR_T *p1;
++ UCHAR_T *p = start;
++ UCHAR_T *pend = end;
++
++ if (start == NULL)
++ {
++ printf ("(null)\n");
++ return;
++ }
++
++ /* Loop over pattern commands. */
++ while (p < pend)
++ {
++# ifdef _LIBC
++ printf ("%td:\t", p - start);
++# else
++ printf ("%ld:\t", (long int) (p - start));
++# endif
++
++ switch ((re_opcode_t) *p++)
++ {
++ case no_op:
++ printf ("/no_op");
++ break;
++
++ case exactn:
++ mcnt = *p++;
++ printf ("/exactn/%d", mcnt);
++ do
++ {
++ putchar ('/');
++ PUT_CHAR (*p++);
++ }
++ while (--mcnt);
++ break;
++
++# ifdef MBS_SUPPORT
++ case exactn_bin:
++ mcnt = *p++;
++ printf ("/exactn_bin/%d", mcnt);
++ do
++ {
++ printf("/%lx", (long int) *p++);
++ }
++ while (--mcnt);
++ break;
++# endif /* MBS_SUPPORT */
++
++ case start_memory:
++ mcnt = *p++;
++ printf ("/start_memory/%d/%ld", mcnt, (long int) *p++);
++ break;
++
++ case stop_memory:
++ mcnt = *p++;
++ printf ("/stop_memory/%d/%ld", mcnt, (long int) *p++);
++ break;
++
++ case duplicate:
++ printf ("/duplicate/%ld", (long int) *p++);
++ break;
++
++ case anychar:
++ printf ("/anychar");
++ break;
++
++ case charset:
++ case charset_not:
++ {
++# ifdef WCHAR
++ int i, length;
++ wchar_t *workp = p;
++ printf ("/charset [%s",
++ (re_opcode_t) *(workp - 1) == charset_not ? "^" : "");
++ p += 5;
++ length = *workp++; /* the length of char_classes */
++ for (i=0 ; i<length ; i++)
++ printf("[:%lx:]", (long int) *p++);
++ length = *workp++; /* the length of collating_symbol */
++ for (i=0 ; i<length ;)
++ {
++ printf("[.");
++ while(*p != 0)
++ PUT_CHAR((i++,*p++));
++ i++,p++;
++ printf(".]");
++ }
++ length = *workp++; /* the length of equivalence_class */
++ for (i=0 ; i<length ;)
++ {
++ printf("[=");
++ while(*p != 0)
++ PUT_CHAR((i++,*p++));
++ i++,p++;
++ printf("=]");
++ }
++ length = *workp++; /* the length of char_range */
++ for (i=0 ; i<length ; i++)
++ {
++ wchar_t range_start = *p++;
++ wchar_t range_end = *p++;
++ printf("%C-%C", range_start, range_end);
++ }
++ length = *workp++; /* the length of char */
++ for (i=0 ; i<length ; i++)
++ printf("%C", *p++);
++ putchar (']');
++# else
++ register int c, last = -100;
++ register int in_range = 0;
++
++ printf ("/charset [%s",
++ (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
++
++ assert (p + *p < pend);
++
++ for (c = 0; c < 256; c++)
++ if (c / 8 < *p
++ && (p[1 + (c/8)] & (1 << (c % 8))))
++ {
++ /* Are we starting a range? */
++ if (last + 1 == c && ! in_range)
++ {
++ putchar ('-');
++ in_range = 1;
++ }
++ /* Have we broken a range? */
++ else if (last + 1 != c && in_range)
++ {
++ putchar (last);
++ in_range = 0;
++ }
++
++ if (! in_range)
++ putchar (c);
++
++ last = c;
++ }
++
++ if (in_range)
++ putchar (last);
++
++ putchar (']');
++
++ p += 1 + *p;
++# endif /* WCHAR */
++ }
++ break;
++
++ case begline:
++ printf ("/begline");
++ break;
++
++ case endline:
++ printf ("/endline");
++ break;
++
++ case on_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/on_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case on_failure_keep_string_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/on_failure_keep_string_jump to %td", p + mcnt - start);
++# else
++ printf ("/on_failure_keep_string_jump to %ld",
++ (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case dummy_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/dummy_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case push_dummy_failure:
++ printf ("/push_dummy_failure");
++ break;
++
++ case maybe_pop_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/maybe_pop_jump to %td", p + mcnt - start);
++# else
++ printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case pop_failure_jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/pop_failure_jump to %td", p + mcnt - start);
++# else
++ printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case jump_past_alt:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/jump_past_alt to %td", p + mcnt - start);
++# else
++ printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case jump:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++# ifdef _LIBC
++ printf ("/jump to %td", p + mcnt - start);
++# else
++ printf ("/jump to %ld", (long int) (p + mcnt - start));
++# endif
++ break;
++
++ case succeed_n:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++# ifdef _LIBC
++ printf ("/succeed_n to %td, %d times", p1 - start, mcnt2);
++# else
++ printf ("/succeed_n to %ld, %d times",
++ (long int) (p1 - start), mcnt2);
++# endif
++ break;
++
++ case jump_n:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++ printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
++ break;
++
++ case set_number_at:
++ PREFIX(extract_number_and_incr) (&mcnt, &p);
++ p1 = p + mcnt;
++ PREFIX(extract_number_and_incr) (&mcnt2, &p);
++# ifdef _LIBC
++ printf ("/set_number_at location %td to %d", p1 - start, mcnt2);
++# else
++ printf ("/set_number_at location %ld to %d",
++ (long int) (p1 - start), mcnt2);
++# endif
++ break;
++
++ case wordbound:
++ printf ("/wordbound");
++ break;
++
++ case notwordbound:
++ printf ("/notwordbound");
++ break;
++
++ case wordbeg:
++ printf ("/wordbeg");
++ break;
++
++ case wordend:
++ printf ("/wordend");
++ break;
++
++# ifdef emacs
++ case before_dot:
++ printf ("/before_dot");
++ break;
++
++ case at_dot:
++ printf ("/at_dot");
++ break;
++
++ case after_dot:
++ printf ("/after_dot");
++ break;
++
++ case syntaxspec:
++ printf ("/syntaxspec");
++ mcnt = *p++;
++ printf ("/%d", mcnt);
++ break;
++
++ case notsyntaxspec:
++ printf ("/notsyntaxspec");
++ mcnt = *p++;
++ printf ("/%d", mcnt);
++ break;
++# endif /* emacs */
++
++ case wordchar:
++ printf ("/wordchar");
++ break;
++
++ case notwordchar:
++ printf ("/notwordchar");
++ break;
++
++ case begbuf:
++ printf ("/begbuf");
++ break;
++
++ case endbuf:
++ printf ("/endbuf");
++ break;
++
++ default:
++ printf ("?%ld", (long int) *(p-1));
++ }
++
++ putchar ('\n');
++ }
++
++# ifdef _LIBC
++ printf ("%td:\tend of pattern.\n", p - start);
++# else
++ printf ("%ld:\tend of pattern.\n", (long int) (p - start));
++# endif
++}
++
++
++void
++PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp)
++{
++ UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
++
++ PREFIX(print_partial_compiled_pattern) (buffer, buffer
++ + bufp->used / sizeof(UCHAR_T));
++ printf ("%ld bytes used/%ld bytes allocated.\n",
++ bufp->used, bufp->allocated);
++
++ if (bufp->fastmap_accurate && bufp->fastmap)
++ {
++ printf ("fastmap: ");
++ print_fastmap (bufp->fastmap);
++ }
++
++# ifdef _LIBC
++ printf ("re_nsub: %Zd\t", bufp->re_nsub);
++# else
++ printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
++# endif
++ printf ("regs_alloc: %d\t", bufp->regs_allocated);
++ printf ("can_be_null: %d\t", bufp->can_be_null);
++ printf ("newline_anchor: %d\n", bufp->newline_anchor);
++ printf ("no_sub: %d\t", bufp->no_sub);
++ printf ("not_bol: %d\t", bufp->not_bol);
++ printf ("not_eol: %d\t", bufp->not_eol);
++ printf ("syntax: %lx\n", bufp->syntax);
++ /* Perhaps we should print the translate table? */
++}
++
++
++void
++PREFIX(print_double_string) (const CHAR_T *where, const CHAR_T *string1,
++ int size1, const CHAR_T *string2, int size2)
++{
++ int this_char;
++
++ if (where == NULL)
++ printf ("(null)");
++ else
++ {
++ int cnt;
++
++ if (FIRST_STRING_P (where))
++ {
++ for (this_char = where - string1; this_char < size1; this_char++)
++ PUT_CHAR (string1[this_char]);
++
++ where = string2;
++ }
++
++ cnt = 0;
++ for (this_char = where - string2; this_char < size2; this_char++)
++ {
++ PUT_CHAR (string2[this_char]);
++ if (++cnt > 100)
++ {
++ fputs ("...", stdout);
++ break;
++ }
++ }
++ }
++}
++
++# ifndef DEFINED_ONCE
++void
++printchar (int c)
++{
++ putc (c, stderr);
++}
++# endif
++
++# else /* not DEBUG */
++
++# ifndef DEFINED_ONCE
++# undef assert
++# define assert(e)
++
++# define DEBUG_STATEMENT(e)
++# define DEBUG_PRINT1(x)
++# define DEBUG_PRINT2(x1, x2)
++# define DEBUG_PRINT3(x1, x2, x3)
++# define DEBUG_PRINT4(x1, x2, x3, x4)
++# endif /* not DEFINED_ONCE */
++# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
++# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
++
++# endif /* not DEBUG */
++
++
++
++# ifdef WCHAR
++/* This convert a multibyte string to a wide character string.
++ And write their correspondances to offset_buffer(see below)
++ and write whether each wchar_t is binary data to is_binary.
++ This assume invalid multibyte sequences as binary data.
++ We assume offset_buffer and is_binary is already allocated
++ enough space. */
++
++static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
++ size_t len, int *offset_buffer,
++ char *is_binary);
++static size_t
++convert_mbs_to_wcs (CHAR_T *dest, const unsigned char*src, size_t len,
++ int *offset_buffer, char *is_binary)
++ /* It hold correspondances between src(char string) and
++ dest(wchar_t string) for optimization.
++ e.g. src = "xxxyzz"
++ dest = {'X', 'Y', 'Z'}
++ (each "xxx", "y" and "zz" represent one multibyte character
++ corresponding to 'X', 'Y' and 'Z'.)
++ offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
++ = {0, 3, 4, 6}
++ */
++{
++ wchar_t *pdest = dest;
++ const unsigned char *psrc = src;
++ size_t wc_count = 0;
++
++ mbstate_t mbs;
++ int i, consumed;
++ size_t mb_remain = len;
++ size_t mb_count = 0;
++
++ /* Initialize the conversion state. */
++ memset (&mbs, 0, sizeof (mbstate_t));
++
++ offset_buffer[0] = 0;
++ for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
++ psrc += consumed)
++ {
++#ifdef _LIBC
++ consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
++#else
++ consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
++#endif
++
++ if (consumed <= 0)
++ /* failed to convert. maybe src contains binary data.
++ So we consume 1 byte manualy. */
++ {
++ *pdest = *psrc;
++ consumed = 1;
++ is_binary[wc_count] = TRUE;
++ }
++ else
++ is_binary[wc_count] = FALSE;
++ /* In sjis encoding, we use yen sign as escape character in
++ place of reverse solidus. So we convert 0x5c(yen sign in
++ sjis) to not 0xa5(yen sign in UCS2) but 0x5c(reverse
++ solidus in UCS2). */
++ if (consumed == 1 && (int) *psrc == 0x5c && (int) *pdest == 0xa5)
++ *pdest = (wchar_t) *psrc;
++
++ offset_buffer[wc_count + 1] = mb_count += consumed;
++ }
++
++ /* Fill remain of the buffer with sentinel. */
++ for (i = wc_count + 1 ; i <= len ; i++)
++ offset_buffer[i] = mb_count + 1;
++
++ return wc_count;
++}
++
++# endif /* WCHAR */
++
++#else /* not INSIDE_RECURSION */
++
++/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
++ also be assigned to arbitrarily: each pattern buffer stores its own
++ syntax, so it can be changed between regex compilations. */
++/* This has no initializer because initialized variables in Emacs
++ become read-only after dumping. */
++reg_syntax_t re_syntax_options;
++
++
++/* Specify the precise syntax of regexps for compilation. This provides
++ for compatibility for various utilities which historically have
++ different, incompatible syntaxes.
++
++ The argument SYNTAX is a bit mask comprised of the various bits
++ defined in regex.h. We return the old syntax. */
++
++reg_syntax_t
++re_set_syntax (reg_syntax_t syntax)
++{
++ reg_syntax_t ret = re_syntax_options;
++
++ re_syntax_options = syntax;
++# ifdef DEBUG
++ if (syntax & RE_DEBUG)
++ debug = 1;
++ else if (debug) /* was on but now is not */
++ debug = 0;
++# endif /* DEBUG */
++ return ret;
++}
++# ifdef _LIBC
++weak_alias (__re_set_syntax, re_set_syntax)
++# endif
++
++/* This table gives an error message for each of the error codes listed
++ in regex.h. Obviously the order here has to be same as there.
++ POSIX doesn't require that we do anything for REG_NOERROR,
++ but why not be nice? */
++
++static const char *re_error_msgid[] =
++ {
++ gettext_noop ("Success"), /* REG_NOERROR */
++ gettext_noop ("No match"), /* REG_NOMATCH */
++ gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
++ gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
++ gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
++ gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
++ gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
++ gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
++ gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
++ gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
++ gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
++ gettext_noop ("Invalid range end"), /* REG_ERANGE */
++ gettext_noop ("Memory exhausted"), /* REG_ESPACE */
++ gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
++ gettext_noop ("Premature end of regular expression"), /* REG_EEND */
++ gettext_noop ("Regular expression too big"), /* REG_ESIZE */
++ gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
++ };
++
++#endif /* INSIDE_RECURSION */
++
++#ifndef DEFINED_ONCE
++/* Avoiding alloca during matching, to placate r_alloc. */
++
++/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
++ searching and matching functions should not call alloca. On some
++ systems, alloca is implemented in terms of malloc, and if we're
++ using the relocating allocator routines, then malloc could cause a
++ relocation, which might (if the strings being searched are in the
++ ralloc heap) shift the data out from underneath the regexp
++ routines.
++
++ Here's another reason to avoid allocation: Emacs
++ processes input from X in a signal handler; processing X input may
++ call malloc; if input arrives while a matching routine is calling
++ malloc, then we're scrod. But Emacs can't just block input while
++ calling matching routines; then we don't notice interrupts when
++ they come in. So, Emacs blocks input around all regexp calls
++ except the matching calls, which it leaves unprotected, in the
++ faith that they will not malloc. */
++
++/* Normally, this is fine. */
++# define MATCH_MAY_ALLOCATE
++
++/* When using GNU C, we are not REALLY using the C alloca, no matter
++ what config.h may say. So don't take precautions for it. */
++# ifdef __GNUC__
++# undef C_ALLOCA
++# endif
++
++/* The match routines may not allocate if (1) they would do it with malloc
++ and (2) it's not safe for them to use malloc.
++ Note that if REL_ALLOC is defined, matching would not use malloc for the
++ failure stack, but we would still use it for the register vectors;
++ so REL_ALLOC should not affect this. */
++# if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
++# undef MATCH_MAY_ALLOCATE
++# endif
++#endif /* not DEFINED_ONCE */
++
++#ifdef INSIDE_RECURSION
++/* Failure stack declarations and macros; both re_compile_fastmap and
++ re_match_2 use a failure stack. These have to be macros because of
++ REGEX_ALLOCATE_STACK. */
++
++
++/* Number of failure points for which to initially allocate space
++ when matching. If this number is exceeded, we allocate more
++ space, so it is not a hard limit. */
++# ifndef INIT_FAILURE_ALLOC
++# define INIT_FAILURE_ALLOC 5
++# endif
++
++/* Roughly the maximum number of failure points on the stack. Would be
++ exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
++ This is a variable only so users of regex can assign to it; we never
++ change it ourselves. */
++
++
++# ifndef DEFINED_ONCE
++
++# ifdef INT_IS_16BIT
++# define RE_M_F_TYPE long int
++# else
++# define RE_M_F_TYPE int
++# endif /* INT_IS_16BIT */
++
++# ifdef MATCH_MAY_ALLOCATE
++/* 4400 was enough to cause a crash on Alpha OSF/1,
++ whose default stack limit is 2mb. */
++# define RE_M_F_DEFAULT 4000
++# else
++# define RE_M_F_DEFAULT 2000
++# endif /* MATCH_MAY_ALLOCATE */
++
++# include <shlib-compat.h>
++
++# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
++link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
++RE_M_F_TYPE re_max_failures = RE_M_F_DEFAULT;
++# else
++RE_M_F_TYPE re_max_failures attribute_hidden = RE_M_F_DEFAULT;
++# endif /* SHLIB_COMPAT */
++
++# undef RE_M_F_TYPE
++# undef RE_M_F_DEFAULT
++
++# endif /* DEFINED_ONCE */
++
++# ifdef INT_IS_16BIT
++
++union PREFIX(fail_stack_elt)
++{
++ UCHAR_T *pointer;
++ long int integer;
++};
++
++typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
++
++typedef struct
++{
++ PREFIX(fail_stack_elt_t) *stack;
++ unsigned long int size;
++ unsigned long int avail; /* Offset of next open position. */
++} PREFIX(fail_stack_type);
++
++# else /* not INT_IS_16BIT */
++
++union PREFIX(fail_stack_elt)
++{
++ UCHAR_T *pointer;
++ int integer;
++};
++
++typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
++
++typedef struct
++{
++ PREFIX(fail_stack_elt_t) *stack;
++ unsigned size;
++ unsigned avail; /* Offset of next open position. */
++} PREFIX(fail_stack_type);
++
++# endif /* INT_IS_16BIT */
++
++# ifndef DEFINED_ONCE
++# define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
++# define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
++# define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
++# endif
++
++
++/* Define macros to initialize and free the failure stack.
++ Do `return -2' if the alloc fails. */
++
++# ifdef MATCH_MAY_ALLOCATE
++# define INIT_FAIL_STACK() \
++ do { \
++ fail_stack.stack = (PREFIX(fail_stack_elt_t) *) \
++ REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (PREFIX(fail_stack_elt_t))); \
++ \
++ if (fail_stack.stack == NULL) \
++ return -2; \
++ \
++ fail_stack.size = INIT_FAILURE_ALLOC; \
++ fail_stack.avail = 0; \
++ } while (0)
++
++# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
++# else
++# define INIT_FAIL_STACK() \
++ do { \
++ fail_stack.avail = 0; \
++ } while (0)
++
++# define RESET_FAIL_STACK()
++# endif
++
++
++/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
++
++ Return 1 if succeeds, and 0 if either ran out of memory
++ allocating space for it or it was already too large.
++
++ REGEX_REALLOCATE_STACK requires `destination' be declared. */
++
++# define DOUBLE_FAIL_STACK(fail_stack) \
++ ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
++ ? 0 \
++ : ((fail_stack).stack = (PREFIX(fail_stack_elt_t) *) \
++ REGEX_REALLOCATE_STACK ((fail_stack).stack, \
++ (fail_stack).size * sizeof (PREFIX(fail_stack_elt_t)), \
++ ((fail_stack).size << 1) * sizeof (PREFIX(fail_stack_elt_t))),\
++ \
++ (fail_stack).stack == NULL \
++ ? 0 \
++ : ((fail_stack).size <<= 1, \
++ 1)))
++
++
++/* Push pointer POINTER on FAIL_STACK.
++ Return 1 if was able to do so and 0 if ran out of memory allocating
++ space to do so. */
++# define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
++ ((FAIL_STACK_FULL () \
++ && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
++ ? 0 \
++ : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
++ 1))
++
++/* Push a pointer value onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_POINTER(item) \
++ fail_stack.stack[fail_stack.avail++].pointer = (UCHAR_T *) (item)
++
++/* This pushes an integer-valued item onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_INT(item) \
++ fail_stack.stack[fail_stack.avail++].integer = (item)
++
++/* Push a fail_stack_elt_t value onto the failure stack.
++ Assumes the variable `fail_stack'. Probably should only
++ be called from within `PUSH_FAILURE_POINT'. */
++# define PUSH_FAILURE_ELT(item) \
++ fail_stack.stack[fail_stack.avail++] = (item)
++
++/* These three POP... operations complement the three PUSH... operations.
++ All assume that `fail_stack' is nonempty. */
++# define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
++# define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
++# define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
++
++/* Used to omit pushing failure point id's when we're not debugging. */
++# ifdef DEBUG
++# define DEBUG_PUSH PUSH_FAILURE_INT
++# define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
++# else
++# define DEBUG_PUSH(item)
++# define DEBUG_POP(item_addr)
++# endif
++
++
++/* Push the information about the state we will need
++ if we ever fail back to it.
++
++ Requires variables fail_stack, regstart, regend, reg_info, and
++ num_regs_pushed be declared. DOUBLE_FAIL_STACK requires `destination'
++ be declared.
++
++ Does `return FAILURE_CODE' if runs out of memory. */
++
++# define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
++ do { \
++ char *destination; \
++ /* Must be int, so when we don't save any registers, the arithmetic \
++ of 0 + -1 isn't done as unsigned. */ \
++ /* Can't be int, since there is not a shred of a guarantee that int \
++ is wide enough to hold a value of something to which pointer can \
++ be assigned */ \
++ active_reg_t this_reg; \
++ \
++ DEBUG_STATEMENT (failure_id++); \
++ DEBUG_STATEMENT (nfailure_points_pushed++); \
++ DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
++ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
++ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
++ \
++ DEBUG_PRINT2 (" slots needed: %ld\n", NUM_FAILURE_ITEMS); \
++ DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
++ \
++ /* Ensure we have enough space allocated for what we will push. */ \
++ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
++ { \
++ if (!DOUBLE_FAIL_STACK (fail_stack)) \
++ return failure_code; \
++ \
++ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
++ (fail_stack).size); \
++ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
++ } \
++ \
++ /* Push the info, starting with the registers. */ \
++ DEBUG_PRINT1 ("\n"); \
++ \
++ if (1) \
++ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
++ this_reg++) \
++ { \
++ DEBUG_PRINT2 (" Pushing reg: %lu\n", this_reg); \
++ DEBUG_STATEMENT (num_regs_pushed++); \
++ \
++ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
++ PUSH_FAILURE_POINTER (regstart[this_reg]); \
++ \
++ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
++ PUSH_FAILURE_POINTER (regend[this_reg]); \
++ \
++ DEBUG_PRINT2 (" info: %p\n ", \
++ reg_info[this_reg].word.pointer); \
++ DEBUG_PRINT2 (" match_null=%d", \
++ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" matched_something=%d", \
++ MATCHED_SOMETHING (reg_info[this_reg])); \
++ DEBUG_PRINT2 (" ever_matched=%d", \
++ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
++ DEBUG_PRINT1 ("\n"); \
++ PUSH_FAILURE_ELT (reg_info[this_reg].word); \
++ } \
++ \
++ DEBUG_PRINT2 (" Pushing low active reg: %ld\n", lowest_active_reg);\
++ PUSH_FAILURE_INT (lowest_active_reg); \
++ \
++ DEBUG_PRINT2 (" Pushing high active reg: %ld\n", highest_active_reg);\
++ PUSH_FAILURE_INT (highest_active_reg); \
++ \
++ DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
++ PUSH_FAILURE_POINTER (pattern_place); \
++ \
++ DEBUG_PRINT2 (" Pushing string %p: `", string_place); \
++ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
++ size2); \
++ DEBUG_PRINT1 ("'\n"); \
++ PUSH_FAILURE_POINTER (string_place); \
++ \
++ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
++ DEBUG_PUSH (failure_id); \
++ } while (0)
++
++# ifndef DEFINED_ONCE
++/* This is the number of items that are pushed and popped on the stack
++ for each register. */
++# define NUM_REG_ITEMS 3
++
++/* Individual items aside from the registers. */
++# ifdef DEBUG
++# define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
++# else
++# define NUM_NONREG_ITEMS 4
++# endif
++
++/* We push at most this many items on the stack. */
++/* We used to use (num_regs - 1), which is the number of registers
++ this regexp will save; but that was changed to 5
++ to avoid stack overflow for a regexp with lots of parens. */
++# define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
++
++/* We actually push this many items. */
++# define NUM_FAILURE_ITEMS \
++ (((0 \
++ ? 0 : highest_active_reg - lowest_active_reg + 1) \
++ * NUM_REG_ITEMS) \
++ + NUM_NONREG_ITEMS)
++
++/* How many items can still be added to the stack without overflowing it. */
++# define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
++# endif /* not DEFINED_ONCE */
++
++
++/* Pops what PUSH_FAIL_STACK pushes.
++
++ We restore into the parameters, all of which should be lvalues:
++ STR -- the saved data position.
++ PAT -- the saved pattern position.
++ LOW_REG, HIGH_REG -- the highest and lowest active registers.
++ REGSTART, REGEND -- arrays of string positions.
++ REG_INFO -- array of information about each subexpression.
++
++ Also assumes the variables `fail_stack' and (if debugging), `bufp',
++ `pend', `string1', `size1', `string2', and `size2'. */
++# define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
++{ \
++ DEBUG_STATEMENT (unsigned failure_id;) \
++ active_reg_t this_reg; \
++ const UCHAR_T *string_temp; \
++ \
++ assert (!FAIL_STACK_EMPTY ()); \
++ \
++ /* Remove failure points and point to how many regs pushed. */ \
++ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
++ DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
++ DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
++ \
++ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
++ \
++ DEBUG_POP (&failure_id); \
++ DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
++ \
++ /* If the saved string location is NULL, it came from an \
++ on_failure_keep_string_jump opcode, and we want to throw away the \
++ saved NULL, thus retaining our current position in the string. */ \
++ string_temp = POP_FAILURE_POINTER (); \
++ if (string_temp != NULL) \
++ str = (const CHAR_T *) string_temp; \
++ \
++ DEBUG_PRINT2 (" Popping string %p: `", str); \
++ DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
++ DEBUG_PRINT1 ("'\n"); \
++ \
++ pat = (UCHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
++ \
++ /* Restore register info. */ \
++ high_reg = (active_reg_t) POP_FAILURE_INT (); \
++ DEBUG_PRINT2 (" Popping high active reg: %ld\n", high_reg); \
++ \
++ low_reg = (active_reg_t) POP_FAILURE_INT (); \
++ DEBUG_PRINT2 (" Popping low active reg: %ld\n", low_reg); \
++ \
++ if (1) \
++ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
++ { \
++ DEBUG_PRINT2 (" Popping reg: %ld\n", this_reg); \
++ \
++ reg_info[this_reg].word = POP_FAILURE_ELT (); \
++ DEBUG_PRINT2 (" info: %p\n", \
++ reg_info[this_reg].word.pointer); \
++ \
++ regend[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
++ \
++ regstart[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
++ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
++ } \
++ else \
++ { \
++ for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
++ { \
++ reg_info[this_reg].word.integer = 0; \
++ regend[this_reg] = 0; \
++ regstart[this_reg] = 0; \
++ } \
++ highest_active_reg = high_reg; \
++ } \
++ \
++ set_regs_matched_done = 0; \
++ DEBUG_STATEMENT (nfailure_points_popped++); \
++} /* POP_FAILURE_POINT */
++
++/* Structure for per-register (a.k.a. per-group) information.
++ Other register information, such as the
++ starting and ending positions (which are addresses), and the list of
++ inner groups (which is a bits list) are maintained in separate
++ variables.
++
++ We are making a (strictly speaking) nonportable assumption here: that
++ the compiler will pack our bit fields into something that fits into
++ the type of `word', i.e., is something that fits into one item on the
++ failure stack. */
++
++
++/* Declarations and macros for re_match_2. */
++
++typedef union
++{
++ PREFIX(fail_stack_elt_t) word;
++ struct
++ {
++ /* This field is one if this group can match the empty string,
++ zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
++# define MATCH_NULL_UNSET_VALUE 3
++ unsigned match_null_string_p : 2;
++ unsigned is_active : 1;
++ unsigned matched_something : 1;
++ unsigned ever_matched_something : 1;
++ } bits;
++} PREFIX(register_info_type);
++
++# ifndef DEFINED_ONCE
++# define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
++# define IS_ACTIVE(R) ((R).bits.is_active)
++# define MATCHED_SOMETHING(R) ((R).bits.matched_something)
++# define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
++
++
++/* Call this when have matched a real character; it sets `matched' flags
++ for the subexpressions which we are currently inside. Also records
++ that those subexprs have matched. */
++# define SET_REGS_MATCHED() \
++ do \
++ { \
++ if (!set_regs_matched_done) \
++ { \
++ active_reg_t r; \
++ set_regs_matched_done = 1; \
++ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
++ { \
++ MATCHED_SOMETHING (reg_info[r]) \
++ = EVER_MATCHED_SOMETHING (reg_info[r]) \
++ = 1; \
++ } \
++ } \
++ } \
++ while (0)
++# endif /* not DEFINED_ONCE */
++
++/* Registers are set to a sentinel when they haven't yet matched. */
++static CHAR_T PREFIX(reg_unset_dummy);
++# define REG_UNSET_VALUE (&PREFIX(reg_unset_dummy))
++# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
++
++/* Subroutine declarations and macros for regex_compile. */
++static void PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg);
++static void PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc,
++ int arg1, int arg2);
++static void PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc,
++ int arg, UCHAR_T *end);
++static void PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc,
++ int arg1, int arg2, UCHAR_T *end);
++static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
++ const CHAR_T *p,
++ reg_syntax_t syntax);
++static boolean PREFIX(at_endline_loc_p) (const CHAR_T *p,
++ const CHAR_T *pend,
++ reg_syntax_t syntax);
++# ifdef WCHAR
++static reg_errcode_t wcs_compile_range (CHAR_T range_start,
++ const CHAR_T **p_ptr,
++ const CHAR_T *pend,
++ char *translate,
++ reg_syntax_t syntax,
++ UCHAR_T *b,
++ CHAR_T *char_set);
++static void insert_space (int num, CHAR_T *loc, CHAR_T *end);
++# else /* BYTE */
++static reg_errcode_t byte_compile_range (unsigned int range_start,
++ const char **p_ptr,
++ const char *pend,
++ RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax,
++ unsigned char *b);
++# endif /* WCHAR */
++
++/* Fetch the next character in the uncompiled pattern---translating it
++ if necessary. Also cast from a signed character in the constant
++ string passed to us by the user to an unsigned char that we can use
++ as an array index (in, e.g., `translate'). */
++/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
++ because it is impossible to allocate 4GB array for some encodings
++ which have 4 byte character_set like UCS4. */
++# ifndef PATFETCH
++# ifdef WCHAR
++# define PATFETCH(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (UCHAR_T) *p++; \
++ if (translate && (c <= 0xff)) c = (UCHAR_T) translate[c]; \
++ } while (0)
++# else /* BYTE */
++# define PATFETCH(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (unsigned char) *p++; \
++ if (translate) c = (unsigned char) translate[c]; \
++ } while (0)
++# endif /* WCHAR */
++# endif
++
++/* Fetch the next character in the uncompiled pattern, with no
++ translation. */
++# define PATFETCH_RAW(c) \
++ do {if (p == pend) return REG_EEND; \
++ c = (UCHAR_T) *p++; \
++ } while (0)
++
++/* Go backwards one character in the pattern. */
++# define PATUNFETCH p--
++
++
++/* If `translate' is non-null, return translate[D], else just D. We
++ cast the subscript to translate because some data is declared as
++ `char *', to avoid warnings when a string constant is passed. But
++ when we use a character as a subscript we must make it unsigned. */
++/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
++ because it is impossible to allocate 4GB array for some encodings
++ which have 4 byte character_set like UCS4. */
++
++# ifndef TRANSLATE
++# ifdef WCHAR
++# define TRANSLATE(d) \
++ ((translate && ((UCHAR_T) (d)) <= 0xff) \
++ ? (char) translate[(unsigned char) (d)] : (d))
++# else /* BYTE */
++# define TRANSLATE(d) \
++ (translate ? (char) translate[(unsigned char) (d)] : (char) (d))
++# endif /* WCHAR */
++# endif
++
++
++/* Macros for outputting the compiled pattern into `buffer'. */
++
++/* If the buffer isn't allocated when it comes in, use this. */
++# define INIT_BUF_SIZE (32 * sizeof(UCHAR_T))
++
++/* Make sure we have at least N more bytes of space in buffer. */
++# ifdef WCHAR
++# define GET_BUFFER_SPACE(n) \
++ while (((unsigned long)b - (unsigned long)COMPILED_BUFFER_VAR \
++ + (n)*sizeof(CHAR_T)) > bufp->allocated) \
++ EXTEND_BUFFER ()
++# else /* BYTE */
++# define GET_BUFFER_SPACE(n) \
++ while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
++ EXTEND_BUFFER ()
++# endif /* WCHAR */
++
++/* Make sure we have one more byte of buffer space and then add C to it. */
++# define BUF_PUSH(c) \
++ do { \
++ GET_BUFFER_SPACE (1); \
++ *b++ = (UCHAR_T) (c); \
++ } while (0)
++
++
++/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
++# define BUF_PUSH_2(c1, c2) \
++ do { \
++ GET_BUFFER_SPACE (2); \
++ *b++ = (UCHAR_T) (c1); \
++ *b++ = (UCHAR_T) (c2); \
++ } while (0)
++
++
++/* As with BUF_PUSH_2, except for three bytes. */
++# define BUF_PUSH_3(c1, c2, c3) \
++ do { \
++ GET_BUFFER_SPACE (3); \
++ *b++ = (UCHAR_T) (c1); \
++ *b++ = (UCHAR_T) (c2); \
++ *b++ = (UCHAR_T) (c3); \
++ } while (0)
++
++/* Store a jump with opcode OP at LOC to location TO. We store a
++ relative address offset by the three bytes the jump itself occupies. */
++# define STORE_JUMP(op, loc, to) \
++ PREFIX(store_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)))
++
++/* Likewise, for a two-argument jump. */
++# define STORE_JUMP2(op, loc, to, arg) \
++ PREFIX(store_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), arg)
++
++/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
++# define INSERT_JUMP(op, loc, to) \
++ PREFIX(insert_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), b)
++
++/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
++# define INSERT_JUMP2(op, loc, to, arg) \
++ PREFIX(insert_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)),\
++ arg, b)
++
++/* This is not an arbitrary limit: the arguments which represent offsets
++ into the pattern are two bytes long. So if 2^16 bytes turns out to
++ be too small, many things would have to change. */
++/* Any other compiler which, like MSC, has allocation limit below 2^16
++ bytes will have to use approach similar to what was done below for
++ MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
++ reallocating to 0 bytes. Such thing is not going to work too well.
++ You have been warned!! */
++# ifndef DEFINED_ONCE
++# if defined _MSC_VER && !defined WIN32
++/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
++ The REALLOC define eliminates a flurry of conversion warnings,
++ but is not required. */
++# define MAX_BUF_SIZE 65500L
++# define REALLOC(p,s) realloc ((p), (size_t) (s))
++# else
++# define MAX_BUF_SIZE (1L << 16)
++# define REALLOC(p,s) realloc ((p), (s))
++# endif
++
++/* Extend the buffer by twice its current size via realloc and
++ reset the pointers that pointed into the old block to point to the
++ correct places in the new one. If extending the buffer results in it
++ being larger than MAX_BUF_SIZE, then flag memory exhausted. */
++# if __BOUNDED_POINTERS__
++# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
++# define MOVE_BUFFER_POINTER(P) \
++ (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
++# define ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ else \
++ { \
++ SET_HIGH_BOUND (b); \
++ SET_HIGH_BOUND (begalt); \
++ if (fixup_alt_jump) \
++ SET_HIGH_BOUND (fixup_alt_jump); \
++ if (laststart) \
++ SET_HIGH_BOUND (laststart); \
++ if (pending_exact) \
++ SET_HIGH_BOUND (pending_exact); \
++ }
++# else
++# define MOVE_BUFFER_POINTER(P) (P) += incr
++# define ELSE_EXTEND_BUFFER_HIGH_BOUND
++# endif
++# endif /* not DEFINED_ONCE */
++
++# ifdef WCHAR
++# define EXTEND_BUFFER() \
++ do { \
++ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
++ int wchar_count; \
++ if (bufp->allocated + sizeof(UCHAR_T) > MAX_BUF_SIZE) \
++ return REG_ESIZE; \
++ bufp->allocated <<= 1; \
++ if (bufp->allocated > MAX_BUF_SIZE) \
++ bufp->allocated = MAX_BUF_SIZE; \
++ /* How many characters the new buffer can have? */ \
++ wchar_count = bufp->allocated / sizeof(UCHAR_T); \
++ if (wchar_count == 0) wchar_count = 1; \
++ /* Truncate the buffer to CHAR_T align. */ \
++ bufp->allocated = wchar_count * sizeof(UCHAR_T); \
++ RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T); \
++ bufp->buffer = (char*)COMPILED_BUFFER_VAR; \
++ if (COMPILED_BUFFER_VAR == NULL) \
++ return REG_ESPACE; \
++ /* If the buffer moved, move all the pointers into it. */ \
++ if (old_buffer != COMPILED_BUFFER_VAR) \
++ { \
++ int incr = COMPILED_BUFFER_VAR - old_buffer; \
++ MOVE_BUFFER_POINTER (b); \
++ MOVE_BUFFER_POINTER (begalt); \
++ if (fixup_alt_jump) \
++ MOVE_BUFFER_POINTER (fixup_alt_jump); \
++ if (laststart) \
++ MOVE_BUFFER_POINTER (laststart); \
++ if (pending_exact) \
++ MOVE_BUFFER_POINTER (pending_exact); \
++ } \
++ ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ } while (0)
++# else /* BYTE */
++# define EXTEND_BUFFER() \
++ do { \
++ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
++ if (bufp->allocated == MAX_BUF_SIZE) \
++ return REG_ESIZE; \
++ bufp->allocated <<= 1; \
++ if (bufp->allocated > MAX_BUF_SIZE) \
++ bufp->allocated = MAX_BUF_SIZE; \
++ bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, \
++ bufp->allocated); \
++ if (COMPILED_BUFFER_VAR == NULL) \
++ return REG_ESPACE; \
++ /* If the buffer moved, move all the pointers into it. */ \
++ if (old_buffer != COMPILED_BUFFER_VAR) \
++ { \
++ int incr = COMPILED_BUFFER_VAR - old_buffer; \
++ MOVE_BUFFER_POINTER (b); \
++ MOVE_BUFFER_POINTER (begalt); \
++ if (fixup_alt_jump) \
++ MOVE_BUFFER_POINTER (fixup_alt_jump); \
++ if (laststart) \
++ MOVE_BUFFER_POINTER (laststart); \
++ if (pending_exact) \
++ MOVE_BUFFER_POINTER (pending_exact); \
++ } \
++ ELSE_EXTEND_BUFFER_HIGH_BOUND \
++ } while (0)
++# endif /* WCHAR */
++
++# ifndef DEFINED_ONCE
++/* Since we have one byte reserved for the register number argument to
++ {start,stop}_memory, the maximum number of groups we can report
++ things about is what fits in that byte. */
++# define MAX_REGNUM 255
++
++/* But patterns can have more than `MAX_REGNUM' registers. We just
++ ignore the excess. */
++typedef unsigned regnum_t;
++
++
++/* Macros for the compile stack. */
++
++/* Since offsets can go either forwards or backwards, this type needs to
++ be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
++/* int may be not enough when sizeof(int) == 2. */
++typedef long pattern_offset_t;
++
++typedef struct
++{
++ pattern_offset_t begalt_offset;
++ pattern_offset_t fixup_alt_jump;
++ pattern_offset_t inner_group_offset;
++ pattern_offset_t laststart_offset;
++ regnum_t regnum;
++} compile_stack_elt_t;
++
++
++typedef struct
++{
++ compile_stack_elt_t *stack;
++ unsigned size;
++ unsigned avail; /* Offset of next open position. */
++} compile_stack_type;
++
++
++# define INIT_COMPILE_STACK_SIZE 32
++
++# define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
++# define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
++
++/* The next available element. */
++# define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
++
++# endif /* not DEFINED_ONCE */
++
++/* Set the bit for character C in a list. */
++# ifndef DEFINED_ONCE
++# define SET_LIST_BIT(c) \
++ (b[((unsigned char) (c)) / BYTEWIDTH] \
++ |= 1 << (((unsigned char) c) % BYTEWIDTH))
++# endif /* DEFINED_ONCE */
++
++/* Get the next unsigned number in the uncompiled pattern. */
++# define GET_UNSIGNED_NUMBER(num) \
++ { \
++ while (p != pend) \
++ { \
++ PATFETCH (c); \
++ if (c < '0' || c > '9') \
++ break; \
++ if (num <= RE_DUP_MAX) \
++ { \
++ if (num < 0) \
++ num = 0; \
++ num = num * 10 + c - '0'; \
++ } \
++ } \
++ }
++
++# ifndef DEFINED_ONCE
++# if WIDE_CHAR_SUPPORT
++/* The GNU C library provides support for user-defined character classes
++ and the functions from ISO C amendement 1. */
++# ifdef CHARCLASS_NAME_MAX
++# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
++# else
++/* This shouldn't happen but some implementation might still have this
++ problem. Use a reasonable default value. */
++# define CHAR_CLASS_MAX_LENGTH 256
++# endif
++
++# ifdef _LIBC
++# define IS_CHAR_CLASS(string) __wctype (string)
++# else
++# define IS_CHAR_CLASS(string) wctype (string)
++# endif
++# else
++# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
++
++# define IS_CHAR_CLASS(string) \
++ (STREQ (string, "alpha") || STREQ (string, "upper") \
++ || STREQ (string, "lower") || STREQ (string, "digit") \
++ || STREQ (string, "alnum") || STREQ (string, "xdigit") \
++ || STREQ (string, "space") || STREQ (string, "print") \
++ || STREQ (string, "punct") || STREQ (string, "graph") \
++ || STREQ (string, "cntrl") || STREQ (string, "blank"))
++# endif
++# endif /* DEFINED_ONCE */
++
++# ifndef MATCH_MAY_ALLOCATE
++
++/* If we cannot allocate large objects within re_match_2_internal,
++ we make the fail stack and register vectors global.
++ The fail stack, we grow to the maximum size when a regexp
++ is compiled.
++ The register vectors, we adjust in size each time we
++ compile a regexp, according to the number of registers it needs. */
++
++static PREFIX(fail_stack_type) fail_stack;
++
++/* Size with which the following vectors are currently allocated.
++ That is so we can make them bigger as needed,
++ but never make them smaller. */
++# ifdef DEFINED_ONCE
++static int regs_allocated_size;
++
++static const char ** regstart, ** regend;
++static const char ** old_regstart, ** old_regend;
++static const char **best_regstart, **best_regend;
++static const char **reg_dummy;
++# endif /* DEFINED_ONCE */
++
++static PREFIX(register_info_type) *PREFIX(reg_info);
++static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
++
++/* Make the register vectors big enough for NUM_REGS registers,
++ but don't make them smaller. */
++
++static void
++PREFIX(regex_grow_registers) (int num_regs)
++{
++ if (num_regs > regs_allocated_size)
++ {
++ RETALLOC_IF (regstart, num_regs, const char *);
++ RETALLOC_IF (regend, num_regs, const char *);
++ RETALLOC_IF (old_regstart, num_regs, const char *);
++ RETALLOC_IF (old_regend, num_regs, const char *);
++ RETALLOC_IF (best_regstart, num_regs, const char *);
++ RETALLOC_IF (best_regend, num_regs, const char *);
++ RETALLOC_IF (PREFIX(reg_info), num_regs, PREFIX(register_info_type));
++ RETALLOC_IF (reg_dummy, num_regs, const char *);
++ RETALLOC_IF (PREFIX(reg_info_dummy), num_regs, PREFIX(register_info_type));
++
++ regs_allocated_size = num_regs;
++ }
++}
++
++# endif /* not MATCH_MAY_ALLOCATE */
++
++# ifndef DEFINED_ONCE
++static boolean group_in_compile_stack (compile_stack_type compile_stack,
++ regnum_t regnum);
++# endif /* not DEFINED_ONCE */
++
++/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
++ Returns one of error codes defined in `regex.h', or zero for success.
++
++ Assumes the `allocated' (and perhaps `buffer') and `translate'
++ fields are set in BUFP on entry.
++
++ If it succeeds, results are put in BUFP (if it returns an error, the
++ contents of BUFP are undefined):
++ `buffer' is the compiled pattern;
++ `syntax' is set to SYNTAX;
++ `used' is set to the length of the compiled pattern;
++ `fastmap_accurate' is zero;
++ `re_nsub' is the number of subexpressions in PATTERN;
++ `not_bol' and `not_eol' are zero;
++
++ The `fastmap' and `newline_anchor' fields are neither
++ examined nor set. */
++
++/* Return, freeing storage we allocated. */
++# ifdef WCHAR
++# define FREE_STACK_RETURN(value) \
++ return (free(pattern), free(mbs_offset), free(is_binary), free (compile_stack.stack), value)
++# else
++# define FREE_STACK_RETURN(value) \
++ return (free (compile_stack.stack), value)
++# endif /* WCHAR */
++
++static reg_errcode_t
++PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
++ size_t ARG_PREFIX(size), reg_syntax_t syntax,
++ struct re_pattern_buffer *bufp)
++{
++ /* We fetch characters from PATTERN here. Even though PATTERN is
++ `char *' (i.e., signed), we declare these variables as unsigned, so
++ they can be reliably used as array indices. */
++ register UCHAR_T c, c1;
++
++#ifdef WCHAR
++ /* A temporary space to keep wchar_t pattern and compiled pattern. */
++ CHAR_T *pattern, *COMPILED_BUFFER_VAR;
++ size_t size;
++ /* offset buffer for optimization. See convert_mbs_to_wc. */
++ int *mbs_offset = NULL;
++ /* It hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++ /* A flag whether exactn is handling binary data or not. */
++ char is_exactn_bin = FALSE;
++#endif /* WCHAR */
++
++ /* A random temporary spot in PATTERN. */
++ const CHAR_T *p1;
++
++ /* Points to the end of the buffer, where we should append. */
++ register UCHAR_T *b;
++
++ /* Keeps track of unclosed groups. */
++ compile_stack_type compile_stack;
++
++ /* Points to the current (ending) position in the pattern. */
++#ifdef WCHAR
++ const CHAR_T *p;
++ const CHAR_T *pend;
++#else /* BYTE */
++ const CHAR_T *p = pattern;
++ const CHAR_T *pend = pattern + size;
++#endif /* WCHAR */
++
++ /* How to translate the characters in the pattern. */
++ RE_TRANSLATE_TYPE translate = bufp->translate;
++
++ /* Address of the count-byte of the most recently inserted `exactn'
++ command. This makes it possible to tell if a new exact-match
++ character can be added to that command or if the character requires
++ a new `exactn' command. */
++ UCHAR_T *pending_exact = 0;
++
++ /* Address of start of the most recently finished expression.
++ This tells, e.g., postfix * where to find the start of its
++ operand. Reset at the beginning of groups and alternatives. */
++ UCHAR_T *laststart = 0;
++
++ /* Address of beginning of regexp, or inside of last group. */
++ UCHAR_T *begalt;
++
++ /* Address of the place where a forward jump should go to the end of
++ the containing expression. Each alternative of an `or' -- except the
++ last -- ends with a forward jump of this sort. */
++ UCHAR_T *fixup_alt_jump = 0;
++
++ /* Counts open-groups as they are encountered. Remembered for the
++ matching close-group on the compile stack, so the same register
++ number is put in the stop_memory as the start_memory. */
++ regnum_t regnum = 0;
++
++#ifdef WCHAR
++ /* Initialize the wchar_t PATTERN and offset_buffer. */
++ p = pend = pattern = TALLOC(csize + 1, CHAR_T);
++ mbs_offset = TALLOC(csize + 1, int);
++ is_binary = TALLOC(csize + 1, char);
++ if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
++ {
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++ return REG_ESPACE;
++ }
++ pattern[csize] = L'\0'; /* sentinel */
++ size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
++ pend = p + size;
++ if (size < 0)
++ {
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++ return REG_BADPAT;
++ }
++#endif
++
++#ifdef DEBUG
++ DEBUG_PRINT1 ("\nCompiling pattern: ");
++ if (debug)
++ {
++ unsigned debug_count;
++
++ for (debug_count = 0; debug_count < size; debug_count++)
++ PUT_CHAR (pattern[debug_count]);
++ putchar ('\n');
++ }
++#endif /* DEBUG */
++
++ /* Initialize the compile stack. */
++ compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
++ if (compile_stack.stack == NULL)
++ {
++#ifdef WCHAR
++ free(pattern);
++ free(mbs_offset);
++ free(is_binary);
++#endif
++ return REG_ESPACE;
++ }
++
++ compile_stack.size = INIT_COMPILE_STACK_SIZE;
++ compile_stack.avail = 0;
++
++ /* Initialize the pattern buffer. */
++ bufp->syntax = syntax;
++ bufp->fastmap_accurate = 0;
++ bufp->not_bol = bufp->not_eol = 0;
++
++ /* Set `used' to zero, so that if we return an error, the pattern
++ printer (for debugging) will think there's no pattern. We reset it
++ at the end. */
++ bufp->used = 0;
++
++ /* Always count groups, whether or not bufp->no_sub is set. */
++ bufp->re_nsub = 0;
++
++#if !defined emacs && !defined SYNTAX_TABLE
++ /* Initialize the syntax table. */
++ init_syntax_once ();
++#endif
++
++ if (bufp->allocated == 0)
++ {
++ if (bufp->buffer)
++ { /* If zero allocated, but buffer is non-null, try to realloc
++ enough space. This loses if buffer's address is bogus, but
++ that is the user's responsibility. */
++#ifdef WCHAR
++ /* Free bufp->buffer and allocate an array for wchar_t pattern
++ buffer. */
++ free(bufp->buffer);
++ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE/sizeof(UCHAR_T),
++ UCHAR_T);
++#else
++ RETALLOC (COMPILED_BUFFER_VAR, INIT_BUF_SIZE, UCHAR_T);
++#endif /* WCHAR */
++ }
++ else
++ { /* Caller did not allocate a buffer. Do it for them. */
++ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE / sizeof(UCHAR_T),
++ UCHAR_T);
++ }
++
++ if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE);
++#ifdef WCHAR
++ bufp->buffer = (char*)COMPILED_BUFFER_VAR;
++#endif /* WCHAR */
++ bufp->allocated = INIT_BUF_SIZE;
++ }
++#ifdef WCHAR
++ else
++ COMPILED_BUFFER_VAR = (UCHAR_T*) bufp->buffer;
++#endif
++
++ begalt = b = COMPILED_BUFFER_VAR;
++
++ /* Loop through the uncompiled pattern until we're at the end. */
++ while (p != pend)
++ {
++ PATFETCH (c);
++
++ switch (c)
++ {
++ case '^':
++ {
++ if ( /* If at start of pattern, it's an operator. */
++ p == pattern + 1
++ /* If context independent, it's an operator. */
++ || syntax & RE_CONTEXT_INDEP_ANCHORS
++ /* Otherwise, depends on what's come before. */
++ || PREFIX(at_begline_loc_p) (pattern, p, syntax))
++ BUF_PUSH (begline);
++ else
++ goto normal_char;
++ }
++ break;
++
++
++ case '$':
++ {
++ if ( /* If at end of pattern, it's an operator. */
++ p == pend
++ /* If context independent, it's an operator. */
++ || syntax & RE_CONTEXT_INDEP_ANCHORS
++ /* Otherwise, depends on what's next. */
++ || PREFIX(at_endline_loc_p) (p, pend, syntax))
++ BUF_PUSH (endline);
++ else
++ goto normal_char;
++ }
++ break;
++
++
++ case '+':
++ case '?':
++ if ((syntax & RE_BK_PLUS_QM)
++ || (syntax & RE_LIMITED_OPS))
++ goto normal_char;
++ handle_plus:
++ case '*':
++ /* If there is no previous pattern... */
++ if (!laststart)
++ {
++ if (syntax & RE_CONTEXT_INVALID_OPS)
++ FREE_STACK_RETURN (REG_BADRPT);
++ else if (!(syntax & RE_CONTEXT_INDEP_OPS))
++ goto normal_char;
++ }
++
++ {
++ /* Are we optimizing this jump? */
++ boolean keep_string_p = false;
++
++ /* 1 means zero (many) matches is allowed. */
++ char zero_times_ok = 0, many_times_ok = 0;
++
++ /* If there is a sequence of repetition chars, collapse it
++ down to just one (the right one). We can't combine
++ interval operators with these because of, e.g., `a{2}*',
++ which should only match an even number of `a's. */
++
++ for (;;)
++ {
++ zero_times_ok |= c != '+';
++ many_times_ok |= c != '?';
++
++ if (p == pend)
++ break;
++
++ PATFETCH (c);
++
++ if (c == '*'
++ || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
++ ;
++
++ else if (syntax & RE_BK_PLUS_QM && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ if (!(c1 == '+' || c1 == '?'))
++ {
++ PATUNFETCH;
++ PATUNFETCH;
++ break;
++ }
++
++ c = c1;
++ }
++ else
++ {
++ PATUNFETCH;
++ break;
++ }
++
++ /* If we get here, we found another repeat character. */
++ }
++
++ /* Star, etc. applied to an empty pattern is equivalent
++ to an empty pattern. */
++ if (!laststart)
++ break;
++
++ /* Now we know whether or not zero matches is allowed
++ and also whether or not two or more matches is allowed. */
++ if (many_times_ok)
++ { /* More than one repetition is allowed, so put in at the
++ end a backward relative jump from `b' to before the next
++ jump we're going to put in below (which jumps from
++ laststart to after this jump).
++
++ But if we are at the `*' in the exact sequence `.*\n',
++ insert an unconditional jump backwards to the .,
++ instead of the beginning of the loop. This way we only
++ push a failure point once, instead of every time
++ through the loop. */
++ assert (p - 1 > pattern);
++
++ /* Allocate the space for the jump. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++
++ /* We know we are not at the first character of the pattern,
++ because laststart was nonzero. And we've already
++ incremented `p', by the way, to be the character after
++ the `*'. Do we have to do something analogous here
++ for null bytes, because of RE_DOT_NOT_NULL? */
++ if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
++ && zero_times_ok
++ && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
++ && !(syntax & RE_DOT_NEWLINE))
++ { /* We have .*\n. */
++ STORE_JUMP (jump, b, laststart);
++ keep_string_p = true;
++ }
++ else
++ /* Anything else. */
++ STORE_JUMP (maybe_pop_jump, b, laststart -
++ (1 + OFFSET_ADDRESS_SIZE));
++
++ /* We've added more stuff to the buffer. */
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++
++ /* On failure, jump from laststart to b + 3, which will be the
++ end of the buffer after this jump is inserted. */
++ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE' instead of
++ 'b + 3'. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
++ : on_failure_jump,
++ laststart, b + 1 + OFFSET_ADDRESS_SIZE);
++ pending_exact = 0;
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ if (!zero_times_ok)
++ {
++ /* At least one repetition is required, so insert a
++ `dummy_failure_jump' before the initial
++ `on_failure_jump' instruction of the loop. This
++ effects a skip over that instruction the first time
++ we hit that loop. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (dummy_failure_jump, laststart, laststart +
++ 2 + 2 * OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++ }
++ break;
++
++
++ case '.':
++ laststart = b;
++ BUF_PUSH (anychar);
++ break;
++
++
++ case '[':
++ {
++ boolean had_char_class = false;
++#ifdef WCHAR
++ CHAR_T range_start = 0xffffffff;
++#else
++ unsigned int range_start = 0xffffffff;
++#endif
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++#ifdef WCHAR
++ /* We assume a charset(_not) structure as a wchar_t array.
++ charset[0] = (re_opcode_t) charset(_not)
++ charset[1] = l (= length of char_classes)
++ charset[2] = m (= length of collating_symbols)
++ charset[3] = n (= length of equivalence_classes)
++ charset[4] = o (= length of char_ranges)
++ charset[5] = p (= length of chars)
++
++ charset[6] = char_class (wctype_t)
++ charset[6+CHAR_CLASS_SIZE] = char_class (wctype_t)
++ ...
++ charset[l+5] = char_class (wctype_t)
++
++ charset[l+6] = collating_symbol (wchar_t)
++ ...
++ charset[l+m+5] = collating_symbol (wchar_t)
++ ifdef _LIBC we use the index if
++ _NL_COLLATE_SYMB_EXTRAMB instead of
++ wchar_t string.
++
++ charset[l+m+6] = equivalence_classes (wchar_t)
++ ...
++ charset[l+m+n+5] = equivalence_classes (wchar_t)
++ ifdef _LIBC we use the index in
++ _NL_COLLATE_WEIGHT instead of
++ wchar_t string.
++
++ charset[l+m+n+6] = range_start
++ charset[l+m+n+7] = range_end
++ ...
++ charset[l+m+n+2o+4] = range_start
++ charset[l+m+n+2o+5] = range_end
++ ifdef _LIBC we use the value looked up
++ in _NL_COLLATE_COLLSEQ instead of
++ wchar_t character.
++
++ charset[l+m+n+2o+6] = char
++ ...
++ charset[l+m+n+2o+p+5] = char
++
++ */
++
++ /* We need at least 6 spaces: the opcode, the length of
++ char_classes, the length of collating_symbols, the length of
++ equivalence_classes, the length of char_ranges, the length of
++ chars. */
++ GET_BUFFER_SPACE (6);
++
++ /* Save b as laststart. And We use laststart as the pointer
++ to the first element of the charset here.
++ In other words, laststart[i] indicates charset[i]. */
++ laststart = b;
++
++ /* We test `*p == '^' twice, instead of using an if
++ statement, so we only need one BUF_PUSH. */
++ BUF_PUSH (*p == '^' ? charset_not : charset);
++ if (*p == '^')
++ p++;
++
++ /* Push the length of char_classes, the length of
++ collating_symbols, the length of equivalence_classes, the
++ length of char_ranges and the length of chars. */
++ BUF_PUSH_3 (0, 0, 0);
++ BUF_PUSH_2 (0, 0);
++
++ /* Remember the first position in the bracket expression. */
++ p1 = p;
++
++ /* charset_not matches newline according to a syntax bit. */
++ if ((re_opcode_t) b[-6] == charset_not
++ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
++ {
++ BUF_PUSH('\n');
++ laststart[5]++; /* Update the length of characters */
++ }
++
++ /* Read in characters and ranges, setting map bits. */
++ for (;;)
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ PATFETCH (c);
++
++ /* \ might escape characters inside [...] and [^...]. */
++ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ BUF_PUSH(c1);
++ laststart[5]++; /* Update the length of chars */
++ range_start = c1;
++ continue;
++ }
++
++ /* Could be the end of the bracket expression. If it's
++ not (i.e., when the bracket expression is `[]' so
++ far), the ']' character bit gets set way below. */
++ if (c == ']' && p != p1 + 1)
++ break;
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character class. */
++ if (had_char_class && c == '-' && *p != ']')
++ FREE_STACK_RETURN (REG_ERANGE);
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character: if this is a hyphen not at the
++ beginning or the end of a list, then it's the range
++ operator. */
++ if (c == '-'
++ && !(p - 2 >= pattern && p[-2] == '[')
++ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
++ && *p != ']')
++ {
++ reg_errcode_t ret;
++ /* Allocate the space for range_start and range_end. */
++ GET_BUFFER_SPACE (2);
++ /* Update the pointer to indicate end of buffer. */
++ b += 2;
++ ret = wcs_compile_range (range_start, &p, pend, translate,
++ syntax, b, laststart);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++ else if (p[0] == '-' && p[1] != ']')
++ { /* This handles ranges made up of characters only. */
++ reg_errcode_t ret;
++
++ /* Move past the `-'. */
++ PATFETCH (c1);
++ /* Allocate the space for range_start and range_end. */
++ GET_BUFFER_SPACE (2);
++ /* Update the pointer to indicate end of buffer. */
++ b += 2;
++ ret = wcs_compile_range (c, &p, pend, translate, syntax, b,
++ laststart);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ /* See if we're at the beginning of a possible character
++ class. */
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
++ { /* Leave room for the null. */
++ char str[CHAR_CLASS_MAX_LENGTH + 1];
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[:'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == ':' && *p == ']') || p == pend)
++ break;
++ if (c1 < CHAR_CLASS_MAX_LENGTH)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ /* If isn't a word bracketed by `[:' and `:]':
++ undo the ending character, the letters, and leave
++ the leading `:' and `[' (but store them as character). */
++ if (c == ':' && *p == ']')
++ {
++ wctype_t wt;
++ uintptr_t alignedp;
++
++ /* Query the character class as wctype_t. */
++ wt = IS_CHAR_CLASS (str);
++ if (wt == 0)
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ /* Allocate the space for character class. */
++ GET_BUFFER_SPACE(CHAR_CLASS_SIZE);
++ /* Update the pointer to indicate end of buffer. */
++ b += CHAR_CLASS_SIZE;
++ /* Move data which follow character classes
++ not to violate the data. */
++ insert_space(CHAR_CLASS_SIZE,
++ laststart + 6 + laststart[1],
++ b - 1);
++ alignedp = ((uintptr_t)(laststart + 6 + laststart[1])
++ + __alignof__(wctype_t) - 1)
++ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
++ /* Store the character class. */
++ *((wctype_t*)alignedp) = wt;
++ /* Update length of char_classes */
++ laststart[1] += CHAR_CLASS_SIZE;
++
++ had_char_class = true;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ BUF_PUSH ('[');
++ BUF_PUSH (':');
++ laststart[5] += 2; /* Update the length of characters */
++ range_start = ':';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && (*p == '='
++ || *p == '.'))
++ {
++ CHAR_T str[128]; /* Should be large enough. */
++ CHAR_T delim = *p; /* '=' or '.' */
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[=' or '[[.'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == delim && *p == ']') || p == pend)
++ break;
++ if (c1 < sizeof (str) - 1)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == delim && *p == ']' && str[0] != '\0')
++ {
++ unsigned int i, offset;
++ /* If we have no collation data we use the default
++ collation in which each character is in a class
++ by itself. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++
++ /* If not defined _LIBC, we push the name and
++ `\0' for the sake of matching performance. */
++ int datasize = c1 + 1;
++
++# ifdef _LIBC
++ int32_t idx = 0;
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++ }
++# ifdef _LIBC
++ else
++ {
++ const int32_t *table;
++ const int32_t *weights;
++ const int32_t *extra;
++ const int32_t *indirect;
++ wint_t *cp;
++
++ /* This #include defines a local function! */
++# include <locale/weightwc.h>
++
++ if(delim == '=')
++ {
++ /* We push the index for equivalence class. */
++ cp = (wint_t*)str;
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_TABLEWC);
++ weights = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_WEIGHTWC);
++ extra = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_EXTRAWC);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_INDIRECTWC);
++
++ idx = findidx ((const wint_t**)&cp, c1);
++ if (idx == 0 || cp < (wint_t*) str + c1)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ str[0] = (wchar_t)idx;
++ }
++ else /* delim == '.' */
++ {
++ /* We push collation sequence value
++ for collating symbol. */
++ int32_t table_size;
++ const int32_t *symb_table;
++ const unsigned char *extra;
++ int32_t idx;
++ int32_t elem;
++ int32_t second;
++ int32_t hash;
++ char char_str[c1];
++
++ /* We have to convert the name to a single-byte
++ string. This is possible since the names
++ consist of ASCII characters and the internal
++ representation is UCS4. */
++ for (i = 0; i < c1; ++i)
++ char_str[i] = str[i];
++
++ table_size =
++ _NL_CURRENT_WORD (LC_COLLATE,
++ _NL_COLLATE_SYMB_HASH_SIZEMB);
++ symb_table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_TABLEMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_EXTRAMB);
++
++ /* Locate the character in the hashing table. */
++ hash = elem_hash (char_str, c1);
++
++ idx = 0;
++ elem = hash % table_size;
++ second = hash % (table_size - 2);
++ while (symb_table[2 * elem] != 0)
++ {
++ /* First compare the hashing value. */
++ if (symb_table[2 * elem] == hash
++ && c1 == extra[symb_table[2 * elem + 1]]
++ && memcmp (char_str,
++ &extra[symb_table[2 * elem + 1]
++ + 1], c1) == 0)
++ {
++ /* Yep, this is the entry. */
++ idx = symb_table[2 * elem + 1];
++ idx += 1 + extra[idx];
++ break;
++ }
++
++ /* Next entry. */
++ elem += second;
++ }
++
++ if (symb_table[2 * elem] != 0)
++ {
++ /* Compute the index of the byte sequence
++ in the table. */
++ idx += 1 + extra[idx];
++ /* Adjust for the alignment. */
++ idx = (idx + 3) & ~3;
++
++ str[0] = (wchar_t) idx + 4;
++ }
++ else if (symb_table[2 * elem] == 0 && c1 == 1)
++ {
++ /* No valid character. Match it as a
++ single byte character. */
++ had_char_class = false;
++ BUF_PUSH(str[0]);
++ /* Update the length of characters */
++ laststart[5]++;
++ range_start = str[0];
++
++ /* Throw away the ] at the end of the
++ collating symbol. */
++ PATFETCH (c);
++ /* exit from the switch block. */
++ continue;
++ }
++ else
++ FREE_STACK_RETURN (REG_ECOLLATE);
++ }
++ datasize = 1;
++ }
++# endif
++ /* Throw away the ] at the end of the equivalence
++ class (or collating symbol). */
++ PATFETCH (c);
++
++ /* Allocate the space for the equivalence class
++ (or collating symbol) (and '\0' if needed). */
++ GET_BUFFER_SPACE(datasize);
++ /* Update the pointer to indicate end of buffer. */
++ b += datasize;
++
++ if (delim == '=')
++ { /* equivalence class */
++ /* Calculate the offset of char_ranges,
++ which is next to equivalence_classes. */
++ offset = laststart[1] + laststart[2]
++ + laststart[3] +6;
++ /* Insert space. */
++ insert_space(datasize, laststart + offset, b - 1);
++
++ /* Write the equivalence_class and \0. */
++ for (i = 0 ; i < datasize ; i++)
++ laststart[offset + i] = str[i];
++
++ /* Update the length of equivalence_classes. */
++ laststart[3] += datasize;
++ had_char_class = true;
++ }
++ else /* delim == '.' */
++ { /* collating symbol */
++ /* Calculate the offset of the equivalence_classes,
++ which is next to collating_symbols. */
++ offset = laststart[1] + laststart[2] + 6;
++ /* Insert space and write the collationg_symbol
++ and \0. */
++ insert_space(datasize, laststart + offset, b-1);
++ for (i = 0 ; i < datasize ; i++)
++ laststart[offset + i] = str[i];
++
++ /* In re_match_2_internal if range_start < -1, we
++ assume -range_start is the offset of the
++ collating symbol which is specified as
++ the character of the range start. So we assign
++ -(laststart[1] + laststart[2] + 6) to
++ range_start. */
++ range_start = -(laststart[1] + laststart[2] + 6);
++ /* Update the length of collating_symbol. */
++ laststart[2] += datasize;
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ BUF_PUSH ('[');
++ BUF_PUSH (delim);
++ laststart[5] += 2; /* Update the length of characters */
++ range_start = delim;
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ had_char_class = false;
++ BUF_PUSH(c);
++ laststart[5]++; /* Update the length of characters */
++ range_start = c;
++ }
++ }
++
++#else /* BYTE */
++ /* Ensure that we have enough space to push a charset: the
++ opcode, the length count, and the bitset; 34 bytes in all. */
++ GET_BUFFER_SPACE (34);
++
++ laststart = b;
++
++ /* We test `*p == '^' twice, instead of using an if
++ statement, so we only need one BUF_PUSH. */
++ BUF_PUSH (*p == '^' ? charset_not : charset);
++ if (*p == '^')
++ p++;
++
++ /* Remember the first position in the bracket expression. */
++ p1 = p;
++
++ /* Push the number of bytes in the bitmap. */
++ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
++
++ /* Clear the whole map. */
++ bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
++
++ /* charset_not matches newline according to a syntax bit. */
++ if ((re_opcode_t) b[-2] == charset_not
++ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
++ SET_LIST_BIT ('\n');
++
++ /* Read in characters and ranges, setting map bits. */
++ for (;;)
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ PATFETCH (c);
++
++ /* \ might escape characters inside [...] and [^...]. */
++ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
++ {
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ PATFETCH (c1);
++ SET_LIST_BIT (c1);
++ range_start = c1;
++ continue;
++ }
++
++ /* Could be the end of the bracket expression. If it's
++ not (i.e., when the bracket expression is `[]' so
++ far), the ']' character bit gets set way below. */
++ if (c == ']' && p != p1 + 1)
++ break;
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character class. */
++ if (had_char_class && c == '-' && *p != ']')
++ FREE_STACK_RETURN (REG_ERANGE);
++
++ /* Look ahead to see if it's a range when the last thing
++ was a character: if this is a hyphen not at the
++ beginning or the end of a list, then it's the range
++ operator. */
++ if (c == '-'
++ && !(p - 2 >= pattern && p[-2] == '[')
++ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
++ && *p != ']')
++ {
++ reg_errcode_t ret
++ = byte_compile_range (range_start, &p, pend, translate,
++ syntax, b);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ else if (p[0] == '-' && p[1] != ']')
++ { /* This handles ranges made up of characters only. */
++ reg_errcode_t ret;
++
++ /* Move past the `-'. */
++ PATFETCH (c1);
++
++ ret = byte_compile_range (c, &p, pend, translate, syntax, b);
++ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
++ range_start = 0xffffffff;
++ }
++
++ /* See if we're at the beginning of a possible character
++ class. */
++
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
++ { /* Leave room for the null. */
++ char str[CHAR_CLASS_MAX_LENGTH + 1];
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[:'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == ':' && *p == ']') || p == pend)
++ break;
++ if (((int) c1) < CHAR_CLASS_MAX_LENGTH)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ /* If isn't a word bracketed by `[:' and `:]':
++ undo the ending character, the letters, and leave
++ the leading `:' and `[' (but set bits for them). */
++ if (c == ':' && *p == ']')
++ {
++# if WIDE_CHAR_SUPPORT
++ boolean is_lower = STREQ (str, "lower");
++ boolean is_upper = STREQ (str, "upper");
++ wctype_t wt;
++ int ch;
++
++ wt = IS_CHAR_CLASS (str);
++ if (wt == 0)
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
++ {
++# ifdef _LIBC
++ if (__iswctype (__btowc (ch), wt))
++ SET_LIST_BIT (ch);
++# else
++ if (iswctype (btowc (ch), wt))
++ SET_LIST_BIT (ch);
++# endif
++
++ if (translate && (is_upper || is_lower)
++ && (ISUPPER (ch) || ISLOWER (ch)))
++ SET_LIST_BIT (ch);
++ }
++
++ had_char_class = true;
++# else
++ int ch;
++ boolean is_alnum = STREQ (str, "alnum");
++ boolean is_alpha = STREQ (str, "alpha");
++ boolean is_blank = STREQ (str, "blank");
++ boolean is_cntrl = STREQ (str, "cntrl");
++ boolean is_digit = STREQ (str, "digit");
++ boolean is_graph = STREQ (str, "graph");
++ boolean is_lower = STREQ (str, "lower");
++ boolean is_print = STREQ (str, "print");
++ boolean is_punct = STREQ (str, "punct");
++ boolean is_space = STREQ (str, "space");
++ boolean is_upper = STREQ (str, "upper");
++ boolean is_xdigit = STREQ (str, "xdigit");
++
++ if (!IS_CHAR_CLASS (str))
++ FREE_STACK_RETURN (REG_ECTYPE);
++
++ /* Throw away the ] at the end of the character
++ class. */
++ PATFETCH (c);
++
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
++ {
++ /* This was split into 3 if's to
++ avoid an arbitrary limit in some compiler. */
++ if ( (is_alnum && ISALNUM (ch))
++ || (is_alpha && ISALPHA (ch))
++ || (is_blank && ISBLANK (ch))
++ || (is_cntrl && ISCNTRL (ch)))
++ SET_LIST_BIT (ch);
++ if ( (is_digit && ISDIGIT (ch))
++ || (is_graph && ISGRAPH (ch))
++ || (is_lower && ISLOWER (ch))
++ || (is_print && ISPRINT (ch)))
++ SET_LIST_BIT (ch);
++ if ( (is_punct && ISPUNCT (ch))
++ || (is_space && ISSPACE (ch))
++ || (is_upper && ISUPPER (ch))
++ || (is_xdigit && ISXDIGIT (ch)))
++ SET_LIST_BIT (ch);
++ if ( translate && (is_upper || is_lower)
++ && (ISUPPER (ch) || ISLOWER (ch)))
++ SET_LIST_BIT (ch);
++ }
++ had_char_class = true;
++# endif /* libc || wctype.h */
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT (':');
++ range_start = ':';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '=')
++ {
++ unsigned char str[MB_LEN_MAX + 1];
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[='. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == '=' && *p == ']') || p == pend)
++ break;
++ if (c1 < MB_LEN_MAX)
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == '=' && *p == ']' && str[0] != '\0')
++ {
++ /* If we have no collation data we use the default
++ collation in which each character is in a class
++ by itself. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++# ifdef _LIBC
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Set the bit for the character. */
++ SET_LIST_BIT (str[0]);
++ }
++# ifdef _LIBC
++ else
++ {
++ /* Try to match the byte sequence in `str' against
++ those known to the collate implementation.
++ First find out whether the bytes in `str' are
++ actually from exactly one character. */
++ const int32_t *table;
++ const unsigned char *weights;
++ const unsigned char *extra;
++ const int32_t *indirect;
++ int32_t idx;
++ const unsigned char *cp = str;
++ int ch;
++
++ /* This #include defines a local function! */
++# include <locale/weight.h>
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
++ weights = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
++
++ idx = findidx (&cp, c1);
++ if (idx == 0 || cp < str + c1)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Now we have to go throught the whole table
++ and find all characters which have the same
++ first level weight.
++
++ XXX Note that this is not entirely correct.
++ we would have to match multibyte sequences
++ but this is not possible with the current
++ implementation. */
++ for (ch = 1; ch < 256; ++ch)
++ /* XXX This test would have to be changed if we
++ would allow matching multibyte sequences. */
++ if (table[ch] > 0)
++ {
++ int32_t idx2 = table[ch];
++ size_t len = weights[idx2];
++
++ /* Test whether the lenghts match. */
++ if (weights[idx] == len)
++ {
++ /* They do. New compare the bytes of
++ the weight. */
++ size_t cnt = 0;
++
++ while (cnt < len
++ && (weights[idx + 1 + cnt]
++ == weights[idx2 + 1 + cnt]))
++ ++cnt;
++
++ if (cnt == len)
++ /* They match. Mark the character as
++ acceptable. */
++ SET_LIST_BIT (ch);
++ }
++ }
++ }
++# endif
++ had_char_class = true;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT ('=');
++ range_start = '=';
++ had_char_class = false;
++ }
++ }
++ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '.')
++ {
++ unsigned char str[128]; /* Should be large enough. */
++# ifdef _LIBC
++ uint32_t nrules =
++ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif
++
++ PATFETCH (c);
++ c1 = 0;
++
++ /* If pattern is `[[.'. */
++ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
++
++ for (;;)
++ {
++ PATFETCH (c);
++ if ((c == '.' && *p == ']') || p == pend)
++ break;
++ if (c1 < sizeof (str))
++ str[c1++] = c;
++ else
++ /* This is in any case an invalid class name. */
++ str[0] = '\0';
++ }
++ str[c1] = '\0';
++
++ if (c == '.' && *p == ']' && str[0] != '\0')
++ {
++ /* If we have no collation data we use the default
++ collation in which each character is the name
++ for its own class which contains only the one
++ character. It also means that ASCII is the
++ character set and therefore we cannot have character
++ with more than one byte in the multibyte
++ representation. */
++# ifdef _LIBC
++ if (nrules == 0)
++# endif
++ {
++ if (c1 != 1)
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Set the bit for the character. */
++ SET_LIST_BIT (str[0]);
++ range_start = ((const unsigned char *) str)[0];
++ }
++# ifdef _LIBC
++ else
++ {
++ /* Try to match the byte sequence in `str' against
++ those known to the collate implementation.
++ First find out whether the bytes in `str' are
++ actually from exactly one character. */
++ int32_t table_size;
++ const int32_t *symb_table;
++ const unsigned char *extra;
++ int32_t idx;
++ int32_t elem;
++ int32_t second;
++ int32_t hash;
++
++ table_size =
++ _NL_CURRENT_WORD (LC_COLLATE,
++ _NL_COLLATE_SYMB_HASH_SIZEMB);
++ symb_table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_TABLEMB);
++ extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_SYMB_EXTRAMB);
++
++ /* Locate the character in the hashing table. */
++ hash = elem_hash ((const char *) str, c1);
++
++ idx = 0;
++ elem = hash % table_size;
++ second = hash % (table_size - 2);
++ while (symb_table[2 * elem] != 0)
++ {
++ /* First compare the hashing value. */
++ if (symb_table[2 * elem] == hash
++ && c1 == extra[symb_table[2 * elem + 1]]
++ && memcmp (str,
++ &extra[symb_table[2 * elem + 1]
++ + 1],
++ c1) == 0)
++ {
++ /* Yep, this is the entry. */
++ idx = symb_table[2 * elem + 1];
++ idx += 1 + extra[idx];
++ break;
++ }
++
++ /* Next entry. */
++ elem += second;
++ }
++
++ if (symb_table[2 * elem] == 0)
++ /* This is no valid character. */
++ FREE_STACK_RETURN (REG_ECOLLATE);
++
++ /* Throw away the ] at the end of the equivalence
++ class. */
++ PATFETCH (c);
++
++ /* Now add the multibyte character(s) we found
++ to the accept list.
++
++ XXX Note that this is not entirely correct.
++ we would have to match multibyte sequences
++ but this is not possible with the current
++ implementation. Also, we have to match
++ collating symbols, which expand to more than
++ one file, as a whole and not allow the
++ individual bytes. */
++ c1 = extra[idx++];
++ if (c1 == 1)
++ range_start = extra[idx];
++ while (c1-- > 0)
++ {
++ SET_LIST_BIT (extra[idx]);
++ ++idx;
++ }
++ }
++# endif
++ had_char_class = false;
++ }
++ else
++ {
++ c1++;
++ while (c1--)
++ PATUNFETCH;
++ SET_LIST_BIT ('[');
++ SET_LIST_BIT ('.');
++ range_start = '.';
++ had_char_class = false;
++ }
++ }
++ else
++ {
++ had_char_class = false;
++ SET_LIST_BIT (c);
++ range_start = c;
++ }
++ }
++
++ /* Discard any (non)matching list bytes that are all 0 at the
++ end of the map. Decrease the map-length byte too. */
++ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
++ b[-1]--;
++ b += b[-1];
++#endif /* WCHAR */
++ }
++ break;
++
++
++ case '(':
++ if (syntax & RE_NO_BK_PARENS)
++ goto handle_open;
++ else
++ goto normal_char;
++
++
++ case ')':
++ if (syntax & RE_NO_BK_PARENS)
++ goto handle_close;
++ else
++ goto normal_char;
++
++
++ case '\n':
++ if (syntax & RE_NEWLINE_ALT)
++ goto handle_alt;
++ else
++ goto normal_char;
++
++
++ case '|':
++ if (syntax & RE_NO_BK_VBAR)
++ goto handle_alt;
++ else
++ goto normal_char;
++
++
++ case '{':
++ if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
++ goto handle_interval;
++ else
++ goto normal_char;
++
++
++ case '\\':
++ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
++
++ /* Do not translate the character after the \, so that we can
++ distinguish, e.g., \B from \b, even if we normally would
++ translate, e.g., B to b. */
++ PATFETCH_RAW (c);
++
++ switch (c)
++ {
++ case '(':
++ if (syntax & RE_NO_BK_PARENS)
++ goto normal_backslash;
++
++ handle_open:
++ bufp->re_nsub++;
++ regnum++;
++
++ if (COMPILE_STACK_FULL)
++ {
++ RETALLOC (compile_stack.stack, compile_stack.size << 1,
++ compile_stack_elt_t);
++ if (compile_stack.stack == NULL) return REG_ESPACE;
++
++ compile_stack.size <<= 1;
++ }
++
++ /* These are the values to restore when we hit end of this
++ group. They are all relative offsets, so that if the
++ whole pattern moves because of realloc, they will still
++ be valid. */
++ COMPILE_STACK_TOP.begalt_offset = begalt - COMPILED_BUFFER_VAR;
++ COMPILE_STACK_TOP.fixup_alt_jump
++ = fixup_alt_jump ? fixup_alt_jump - COMPILED_BUFFER_VAR + 1 : 0;
++ COMPILE_STACK_TOP.laststart_offset = b - COMPILED_BUFFER_VAR;
++ COMPILE_STACK_TOP.regnum = regnum;
++
++ /* We will eventually replace the 0 with the number of
++ groups inner to this one. But do not push a
++ start_memory for groups beyond the last one we can
++ represent in the compiled pattern. */
++ if (regnum <= MAX_REGNUM)
++ {
++ COMPILE_STACK_TOP.inner_group_offset = b
++ - COMPILED_BUFFER_VAR + 2;
++ BUF_PUSH_3 (start_memory, regnum, 0);
++ }
++
++ compile_stack.avail++;
++
++ fixup_alt_jump = 0;
++ laststart = 0;
++ begalt = b;
++ /* If we've reached MAX_REGNUM groups, then this open
++ won't actually generate any code, so we'll have to
++ clear pending_exact explicitly. */
++ pending_exact = 0;
++ break;
++
++
++ case ')':
++ if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
++
++ if (COMPILE_STACK_EMPTY)
++ {
++ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
++ goto normal_backslash;
++ else
++ FREE_STACK_RETURN (REG_ERPAREN);
++ }
++
++ handle_close:
++ if (fixup_alt_jump)
++ { /* Push a dummy failure point at the end of the
++ alternative for a possible future
++ `pop_failure_jump' to pop. See comments at
++ `push_dummy_failure' in `re_match_2'. */
++ BUF_PUSH (push_dummy_failure);
++
++ /* We allocated space for this jump when we assigned
++ to `fixup_alt_jump', in the `handle_alt' case below. */
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
++ }
++
++ /* See similar code for backslashed left paren above. */
++ if (COMPILE_STACK_EMPTY)
++ {
++ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
++ goto normal_char;
++ else
++ FREE_STACK_RETURN (REG_ERPAREN);
++ }
++
++ /* Since we just checked for an empty stack above, this
++ ``can't happen''. */
++ assert (compile_stack.avail != 0);
++ {
++ /* We don't just want to restore into `regnum', because
++ later groups should continue to be numbered higher,
++ as in `(ab)c(de)' -- the second group is #2. */
++ regnum_t this_group_regnum;
++
++ compile_stack.avail--;
++ begalt = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.begalt_offset;
++ fixup_alt_jump
++ = COMPILE_STACK_TOP.fixup_alt_jump
++ ? COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.fixup_alt_jump - 1
++ : 0;
++ laststart = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.laststart_offset;
++ this_group_regnum = COMPILE_STACK_TOP.regnum;
++ /* If we've reached MAX_REGNUM groups, then this open
++ won't actually generate any code, so we'll have to
++ clear pending_exact explicitly. */
++ pending_exact = 0;
++
++ /* We're at the end of the group, so now we know how many
++ groups were inside this one. */
++ if (this_group_regnum <= MAX_REGNUM)
++ {
++ UCHAR_T *inner_group_loc
++ = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.inner_group_offset;
++
++ *inner_group_loc = regnum - this_group_regnum;
++ BUF_PUSH_3 (stop_memory, this_group_regnum,
++ regnum - this_group_regnum);
++ }
++ }
++ break;
++
++
++ case '|': /* `\|'. */
++ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
++ goto normal_backslash;
++ handle_alt:
++ if (syntax & RE_LIMITED_OPS)
++ goto normal_char;
++
++ /* Insert before the previous alternative a jump which
++ jumps to this alternative if the former fails. */
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (on_failure_jump, begalt,
++ b + 2 + 2 * OFFSET_ADDRESS_SIZE);
++ pending_exact = 0;
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ /* The alternative before this one has a jump after it
++ which gets executed if it gets matched. Adjust that
++ jump so it will jump to this alternative's analogous
++ jump (put in below, which in turn will jump to the next
++ (if any) alternative's such jump, etc.). The last such
++ jump jumps to the correct final destination. A picture:
++ _____ _____
++ | | | |
++ | v | v
++ a | b | c
++
++ If we are at `b', then fixup_alt_jump right now points to a
++ three-byte space after `a'. We'll put in the jump, set
++ fixup_alt_jump to right after `b', and leave behind three
++ bytes which we'll fill in when we get to after `c'. */
++
++ if (fixup_alt_jump)
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
++
++ /* Mark and leave space for a jump after this alternative,
++ to be filled in later either by next alternative or
++ when know we're at the end of a series of alternatives. */
++ fixup_alt_jump = b;
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++
++ laststart = 0;
++ begalt = b;
++ break;
++
++
++ case '{':
++ /* If \{ is a literal. */
++ if (!(syntax & RE_INTERVALS)
++ /* If we're at `\{' and it's not the open-interval
++ operator. */
++ || (syntax & RE_NO_BK_BRACES))
++ goto normal_backslash;
++
++ handle_interval:
++ {
++ /* If got here, then the syntax allows intervals. */
++
++ /* At least (most) this many matches must be made. */
++ int lower_bound = -1, upper_bound = -1;
++
++ /* Place in the uncompiled pattern (i.e., just after
++ the '{') to go back to if the interval is invalid. */
++ const CHAR_T *beg_interval = p;
++
++ if (p == pend)
++ goto invalid_interval;
++
++ GET_UNSIGNED_NUMBER (lower_bound);
++
++ if (c == ',')
++ {
++ GET_UNSIGNED_NUMBER (upper_bound);
++ if (upper_bound < 0)
++ upper_bound = RE_DUP_MAX;
++ }
++ else
++ /* Interval such as `{1}' => match exactly once. */
++ upper_bound = lower_bound;
++
++ if (! (0 <= lower_bound && lower_bound <= upper_bound))
++ goto invalid_interval;
++
++ if (!(syntax & RE_NO_BK_BRACES))
++ {
++ if (c != '\\' || p == pend)
++ goto invalid_interval;
++ PATFETCH (c);
++ }
++
++ if (c != '}')
++ goto invalid_interval;
++
++ /* If it's invalid to have no preceding re. */
++ if (!laststart)
++ {
++ if (syntax & RE_CONTEXT_INVALID_OPS
++ && !(syntax & RE_INVALID_INTERVAL_ORD))
++ FREE_STACK_RETURN (REG_BADRPT);
++ else if (syntax & RE_CONTEXT_INDEP_OPS)
++ laststart = b;
++ else
++ goto unfetch_interval;
++ }
++
++ /* We just parsed a valid interval. */
++
++ if (RE_DUP_MAX < upper_bound)
++ FREE_STACK_RETURN (REG_BADBR);
++
++ /* If the upper bound is zero, don't want to succeed at
++ all; jump from `laststart' to `b + 3', which will be
++ the end of the buffer after we insert the jump. */
++ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE'
++ instead of 'b + 3'. */
++ if (upper_bound == 0)
++ {
++ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
++ INSERT_JUMP (jump, laststart, b + 1
++ + OFFSET_ADDRESS_SIZE);
++ b += 1 + OFFSET_ADDRESS_SIZE;
++ }
++
++ /* Otherwise, we have a nontrivial interval. When
++ we're all done, the pattern will look like:
++ set_number_at <jump count> <upper bound>
++ set_number_at <succeed_n count> <lower bound>
++ succeed_n <after jump addr> <succeed_n count>
++ <body of loop>
++ jump_n <succeed_n addr> <jump count>
++ (The upper bound and `jump_n' are omitted if
++ `upper_bound' is 1, though.) */
++ else
++ { /* If the upper bound is > 1, we need to insert
++ more at the end of the loop. */
++ unsigned nbytes = 2 + 4 * OFFSET_ADDRESS_SIZE +
++ (upper_bound > 1) * (2 + 4 * OFFSET_ADDRESS_SIZE);
++
++ GET_BUFFER_SPACE (nbytes);
++
++ /* Initialize lower bound of the `succeed_n', even
++ though it will be set during matching by its
++ attendant `set_number_at' (inserted next),
++ because `re_compile_fastmap' needs to know.
++ Jump to the `jump_n' we might insert below. */
++ INSERT_JUMP2 (succeed_n, laststart,
++ b + 1 + 2 * OFFSET_ADDRESS_SIZE
++ + (upper_bound > 1) * (1 + 2 * OFFSET_ADDRESS_SIZE)
++ , lower_bound);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ /* Code to initialize the lower bound. Insert
++ before the `succeed_n'. The `5' is the last two
++ bytes of this `set_number_at', plus 3 bytes of
++ the following `succeed_n'. */
++ /* ifdef WCHAR, The '1+2*OFFSET_ADDRESS_SIZE'
++ is the 'set_number_at', plus '1+OFFSET_ADDRESS_SIZE'
++ of the following `succeed_n'. */
++ PREFIX(insert_op2) (set_number_at, laststart, 1
++ + 2 * OFFSET_ADDRESS_SIZE, lower_bound, b);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ if (upper_bound > 1)
++ { /* More than one repetition is allowed, so
++ append a backward jump to the `succeed_n'
++ that starts this interval.
++
++ When we've reached this during matching,
++ we'll have matched the interval once, so
++ jump back only `upper_bound - 1' times. */
++ STORE_JUMP2 (jump_n, b, laststart
++ + 2 * OFFSET_ADDRESS_SIZE + 1,
++ upper_bound - 1);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ /* The location we want to set is the second
++ parameter of the `jump_n'; that is `b-2' as
++ an absolute address. `laststart' will be
++ the `set_number_at' we're about to insert;
++ `laststart+3' the number to set, the source
++ for the relative address. But we are
++ inserting into the middle of the pattern --
++ so everything is getting moved up by 5.
++ Conclusion: (b - 2) - (laststart + 3) + 5,
++ i.e., b - laststart.
++
++ We insert this at the beginning of the loop
++ so that if we fail during matching, we'll
++ reinitialize the bounds. */
++ PREFIX(insert_op2) (set_number_at, laststart,
++ b - laststart,
++ upper_bound - 1, b);
++ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
++ }
++ }
++ pending_exact = 0;
++ break;
++
++ invalid_interval:
++ if (!(syntax & RE_INVALID_INTERVAL_ORD))
++ FREE_STACK_RETURN (p == pend ? REG_EBRACE : REG_BADBR);
++ unfetch_interval:
++ /* Match the characters as literals. */
++ p = beg_interval;
++ c = '{';
++ if (syntax & RE_NO_BK_BRACES)
++ goto normal_char;
++ else
++ goto normal_backslash;
++ }
++
++#ifdef emacs
++ /* There is no way to specify the before_dot and after_dot
++ operators. rms says this is ok. --karl */
++ case '=':
++ BUF_PUSH (at_dot);
++ break;
++
++ case 's':
++ laststart = b;
++ PATFETCH (c);
++ BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
++ break;
++
++ case 'S':
++ laststart = b;
++ PATFETCH (c);
++ BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
++ break;
++#endif /* emacs */
++
++
++ case 'w':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ laststart = b;
++ BUF_PUSH (wordchar);
++ break;
++
++
++ case 'W':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ laststart = b;
++ BUF_PUSH (notwordchar);
++ break;
++
++
++ case '<':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordbeg);
++ break;
++
++ case '>':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordend);
++ break;
++
++ case 'b':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (wordbound);
++ break;
++
++ case 'B':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (notwordbound);
++ break;
++
++ case '`':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (begbuf);
++ break;
++
++ case '\'':
++ if (syntax & RE_NO_GNU_OPS)
++ goto normal_char;
++ BUF_PUSH (endbuf);
++ break;
++
++ case '1': case '2': case '3': case '4': case '5':
++ case '6': case '7': case '8': case '9':
++ if (syntax & RE_NO_BK_REFS)
++ goto normal_char;
++
++ c1 = c - '0';
++
++ if (c1 > regnum)
++ FREE_STACK_RETURN (REG_ESUBREG);
++
++ /* Can't back reference to a subexpression if inside of it. */
++ if (group_in_compile_stack (compile_stack, (regnum_t) c1))
++ goto normal_char;
++
++ laststart = b;
++ BUF_PUSH_2 (duplicate, c1);
++ break;
++
++
++ case '+':
++ case '?':
++ if (syntax & RE_BK_PLUS_QM)
++ goto handle_plus;
++ else
++ goto normal_backslash;
++
++ default:
++ normal_backslash:
++ /* You might think it would be useful for \ to mean
++ not to translate; but if we don't translate it
++ it will never match anything. */
++ c = TRANSLATE (c);
++ goto normal_char;
++ }
++ break;
++
++
++ default:
++ /* Expects the character in `c'. */
++ normal_char:
++ /* If no exactn currently being built. */
++ if (!pending_exact
++#ifdef WCHAR
++ /* If last exactn handle binary(or character) and
++ new exactn handle character(or binary). */
++ || is_exactn_bin != is_binary[p - 1 - pattern]
++#endif /* WCHAR */
++
++ /* If last exactn not at current position. */
++ || pending_exact + *pending_exact + 1 != b
++
++ /* We have only one byte following the exactn for the count. */
++ || *pending_exact == (1 << BYTEWIDTH) - 1
++
++ /* If followed by a repetition operator. */
++ || *p == '*' || *p == '^'
++ || ((syntax & RE_BK_PLUS_QM)
++ ? *p == '\\' && (p[1] == '+' || p[1] == '?')
++ : (*p == '+' || *p == '?'))
++ || ((syntax & RE_INTERVALS)
++ && ((syntax & RE_NO_BK_BRACES)
++ ? *p == '{'
++ : (p[0] == '\\' && p[1] == '{'))))
++ {
++ /* Start building a new exactn. */
++
++ laststart = b;
++
++#ifdef WCHAR
++ /* Is this exactn binary data or character? */
++ is_exactn_bin = is_binary[p - 1 - pattern];
++ if (is_exactn_bin)
++ BUF_PUSH_2 (exactn_bin, 0);
++ else
++ BUF_PUSH_2 (exactn, 0);
++#else
++ BUF_PUSH_2 (exactn, 0);
++#endif /* WCHAR */
++ pending_exact = b - 1;
++ }
++
++ BUF_PUSH (c);
++ (*pending_exact)++;
++ break;
++ } /* switch (c) */
++ } /* while p != pend */
++
++
++ /* Through the pattern now. */
++
++ if (fixup_alt_jump)
++ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
++
++ if (!COMPILE_STACK_EMPTY)
++ FREE_STACK_RETURN (REG_EPAREN);
++
++ /* If we don't want backtracking, force success
++ the first time we reach the end of the compiled pattern. */
++ if (syntax & RE_NO_POSIX_BACKTRACKING)
++ BUF_PUSH (succeed);
++
++#ifdef WCHAR
++ free (pattern);
++ free (mbs_offset);
++ free (is_binary);
++#endif
++ free (compile_stack.stack);
++
++ /* We have succeeded; set the length of the buffer. */
++#ifdef WCHAR
++ bufp->used = (uintptr_t) b - (uintptr_t) COMPILED_BUFFER_VAR;
++#else
++ bufp->used = b - bufp->buffer;
++#endif
++
++#ifdef DEBUG
++ if (debug)
++ {
++ DEBUG_PRINT1 ("\nCompiled pattern: \n");
++ PREFIX(print_compiled_pattern) (bufp);
++ }
++#endif /* DEBUG */
++
++#ifndef MATCH_MAY_ALLOCATE
++ /* Initialize the failure stack to the largest possible stack. This
++ isn't necessary unless we're trying to avoid calling alloca in
++ the search and match routines. */
++ {
++ int num_regs = bufp->re_nsub + 1;
++
++ /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
++ is strictly greater than re_max_failures, the largest possible stack
++ is 2 * re_max_failures failure points. */
++ if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
++ {
++ fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
++
++# ifdef emacs
++ if (! fail_stack.stack)
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) xmalloc (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t)));
++ else
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) xrealloc (fail_stack.stack,
++ (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t))));
++# else /* not emacs */
++ if (! fail_stack.stack)
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) malloc (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t)));
++ else
++ fail_stack.stack
++ = (PREFIX(fail_stack_elt_t) *) realloc (fail_stack.stack,
++ (fail_stack.size
++ * sizeof (PREFIX(fail_stack_elt_t))));
++# endif /* not emacs */
++ }
++
++ PREFIX(regex_grow_registers) (num_regs);
++ }
++#endif /* not MATCH_MAY_ALLOCATE */
++
++ return REG_NOERROR;
++} /* regex_compile */
++
++/* Subroutines for `regex_compile'. */
++
++/* Store OP at LOC followed by two-byte integer parameter ARG. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg)
++{
++ *loc = (UCHAR_T) op;
++ STORE_NUMBER (loc + 1, arg);
++}
++
++
++/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc, int arg1, int arg2)
++{
++ *loc = (UCHAR_T) op;
++ STORE_NUMBER (loc + 1, arg1);
++ STORE_NUMBER (loc + 1 + OFFSET_ADDRESS_SIZE, arg2);
++}
++
++
++/* Copy the bytes from LOC to END to open up three bytes of space at LOC
++ for OP followed by two-byte integer parameter ARG. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc, int arg, UCHAR_T *end)
++{
++ register UCHAR_T *pfrom = end;
++ register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
++
++ while (pfrom != loc)
++ *--pto = *--pfrom;
++
++ PREFIX(store_op1) (op, loc, arg);
++}
++
++
++/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
++/* ifdef WCHAR, integer parameter is 1 wchar_t. */
++
++static void
++PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc, int arg1,
++ int arg2, UCHAR_T *end)
++{
++ register UCHAR_T *pfrom = end;
++ register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
++
++ while (pfrom != loc)
++ *--pto = *--pfrom;
++
++ PREFIX(store_op2) (op, loc, arg1, arg2);
++}
++
++
++/* P points to just after a ^ in PATTERN. Return true if that ^ comes
++ after an alternative or a begin-subexpression. We assume there is at
++ least one character before the ^. */
++
++static boolean
++PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
++ reg_syntax_t syntax)
++{
++ const CHAR_T *prev = p - 2;
++ boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
++
++ return
++ /* After a subexpression? */
++ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
++ /* After an alternative? */
++ || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
++}
++
++
++/* The dual of at_begline_loc_p. This one is for $. We assume there is
++ at least one character after the $, i.e., `P < PEND'. */
++
++static boolean
++PREFIX(at_endline_loc_p) (const CHAR_T *p, const CHAR_T *pend,
++ reg_syntax_t syntax)
++{
++ const CHAR_T *next = p;
++ boolean next_backslash = *next == '\\';
++ const CHAR_T *next_next = p + 1 < pend ? p + 1 : 0;
++
++ return
++ /* Before a subexpression? */
++ (syntax & RE_NO_BK_PARENS ? *next == ')'
++ : next_backslash && next_next && *next_next == ')')
++ /* Before an alternative? */
++ || (syntax & RE_NO_BK_VBAR ? *next == '|'
++ : next_backslash && next_next && *next_next == '|');
++}
++
++#else /* not INSIDE_RECURSION */
++
++/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
++ false if it's not. */
++
++static boolean
++group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
++{
++ int this_element;
++
++ for (this_element = compile_stack.avail - 1;
++ this_element >= 0;
++ this_element--)
++ if (compile_stack.stack[this_element].regnum == regnum)
++ return true;
++
++ return false;
++}
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef WCHAR
++/* This insert space, which size is "num", into the pattern at "loc".
++ "end" must point the end of the allocated buffer. */
++static void
++insert_space (int num, CHAR_T *loc, CHAR_T *end)
++{
++ register CHAR_T *pto = end;
++ register CHAR_T *pfrom = end - num;
++
++ while (pfrom >= loc)
++ *pto-- = *pfrom--;
++}
++#endif /* WCHAR */
++
++#ifdef WCHAR
++static reg_errcode_t
++wcs_compile_range (CHAR_T range_start_char, const CHAR_T **p_ptr,
++ const CHAR_T *pend, RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax, CHAR_T *b, CHAR_T *char_set)
++{
++ const CHAR_T *p = *p_ptr;
++ CHAR_T range_start, range_end;
++ reg_errcode_t ret;
++# ifdef _LIBC
++ uint32_t nrules;
++ uint32_t start_val, end_val;
++# endif
++ if (p == pend)
++ return REG_ERANGE;
++
++# ifdef _LIBC
++ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++ if (nrules != 0)
++ {
++ const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE,
++ _NL_COLLATE_COLLSEQWC);
++ const unsigned char *extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
++
++ if (range_start_char < -1)
++ {
++ /* range_start is a collating symbol. */
++ int32_t *wextra;
++ /* Retreive the index and get collation sequence value. */
++ wextra = (int32_t*)(extra + char_set[-range_start_char]);
++ start_val = wextra[1 + *wextra];
++ }
++ else
++ start_val = collseq_table_lookup(collseq, TRANSLATE(range_start_char));
++
++ end_val = collseq_table_lookup (collseq, TRANSLATE (p[0]));
++
++ /* Report an error if the range is empty and the syntax prohibits
++ this. */
++ ret = ((syntax & RE_NO_EMPTY_RANGES)
++ && (start_val > end_val))? REG_ERANGE : REG_NOERROR;
++
++ /* Insert space to the end of the char_ranges. */
++ insert_space(2, b - char_set[5] - 2, b - 1);
++ *(b - char_set[5] - 2) = (wchar_t)start_val;
++ *(b - char_set[5] - 1) = (wchar_t)end_val;
++ char_set[4]++; /* ranges_index */
++ }
++ else
++# endif
++ {
++ range_start = (range_start_char >= 0)? TRANSLATE (range_start_char):
++ range_start_char;
++ range_end = TRANSLATE (p[0]);
++ /* Report an error if the range is empty and the syntax prohibits
++ this. */
++ ret = ((syntax & RE_NO_EMPTY_RANGES)
++ && (range_start > range_end))? REG_ERANGE : REG_NOERROR;
++
++ /* Insert space to the end of the char_ranges. */
++ insert_space(2, b - char_set[5] - 2, b - 1);
++ *(b - char_set[5] - 2) = range_start;
++ *(b - char_set[5] - 1) = range_end;
++ char_set[4]++; /* ranges_index */
++ }
++ /* Have to increment the pointer into the pattern string, so the
++ caller isn't still at the ending character. */
++ (*p_ptr)++;
++
++ return ret;
++}
++#else /* BYTE */
++/* Read the ending character of a range (in a bracket expression) from the
++ uncompiled pattern *P_PTR (which ends at PEND). We assume the
++ starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
++ Then we set the translation of all bits between the starting and
++ ending characters (inclusive) in the compiled pattern B.
++
++ Return an error code.
++
++ We use these short variable names so we can use the same macros as
++ `regex_compile' itself. */
++
++static reg_errcode_t
++byte_compile_range (unsigned int range_start_char, const char **p_ptr,
++ const char *pend, RE_TRANSLATE_TYPE translate,
++ reg_syntax_t syntax, unsigned char *b)
++{
++ unsigned this_char;
++ const char *p = *p_ptr;
++ reg_errcode_t ret;
++# if _LIBC
++ const unsigned char *collseq;
++ unsigned int start_colseq;
++ unsigned int end_colseq;
++# else
++ unsigned end_char;
++# endif
++
++ if (p == pend)
++ return REG_ERANGE;
++
++ /* Have to increment the pointer into the pattern string, so the
++ caller isn't still at the ending character. */
++ (*p_ptr)++;
++
++ /* Report an error if the range is empty and the syntax prohibits this. */
++ ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
++
++# if _LIBC
++ collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
++ _NL_COLLATE_COLLSEQMB);
++
++ start_colseq = collseq[(unsigned char) TRANSLATE (range_start_char)];
++ end_colseq = collseq[(unsigned char) TRANSLATE (p[0])];
++ for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
++ {
++ unsigned int this_colseq = collseq[(unsigned char) TRANSLATE (this_char)];
++
++ if (start_colseq <= this_colseq && this_colseq <= end_colseq)
++ {
++ SET_LIST_BIT (TRANSLATE (this_char));
++ ret = REG_NOERROR;
++ }
++ }
++# else
++ /* Here we see why `this_char' has to be larger than an `unsigned
++ char' -- we would otherwise go into an infinite loop, since all
++ characters <= 0xff. */
++ range_start_char = TRANSLATE (range_start_char);
++ /* TRANSLATE(p[0]) is casted to char (not unsigned char) in TRANSLATE,
++ and some compilers cast it to int implicitly, so following for_loop
++ may fall to (almost) infinite loop.
++ e.g. If translate[p[0]] = 0xff, end_char may equals to 0xffffffff.
++ To avoid this, we cast p[0] to unsigned int and truncate it. */
++ end_char = ((unsigned)TRANSLATE(p[0]) & ((1 << BYTEWIDTH) - 1));
++
++ for (this_char = range_start_char; this_char <= end_char; ++this_char)
++ {
++ SET_LIST_BIT (TRANSLATE (this_char));
++ ret = REG_NOERROR;
++ }
++# endif
++
++ return ret;
++}
++#endif /* WCHAR */
++
++/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
++ BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
++ characters can start a string that matches the pattern. This fastmap
++ is used by re_search to skip quickly over impossible starting points.
++
++ The caller must supply the address of a (1 << BYTEWIDTH)-byte data
++ area as BUFP->fastmap.
++
++ We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
++ the pattern buffer.
++
++ Returns 0 if we succeed, -2 if an internal error. */
++
++#ifdef WCHAR
++/* local function for re_compile_fastmap.
++ truncate wchar_t character to char. */
++static unsigned char truncate_wchar (CHAR_T c);
++
++static unsigned char
++truncate_wchar (CHAR_T c)
++{
++ unsigned char buf[MB_CUR_MAX];
++ mbstate_t state;
++ int retval;
++ memset (&state, '\0', sizeof (state));
++# ifdef _LIBC
++ retval = __wcrtomb (buf, c, &state);
++# else
++ retval = wcrtomb (buf, c, &state);
++# endif
++ return retval > 0 ? buf[0] : (unsigned char) c;
++}
++#endif /* WCHAR */
++
++static int
++PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp)
++{
++ int j, k;
++#ifdef MATCH_MAY_ALLOCATE
++ PREFIX(fail_stack_type) fail_stack;
++#endif
++#ifndef REGEX_MALLOC
++ char *destination;
++#endif
++
++ register char *fastmap = bufp->fastmap;
++
++#ifdef WCHAR
++ /* We need to cast pattern to (wchar_t*), because we casted this compiled
++ pattern to (char*) in regex_compile. */
++ UCHAR_T *pattern = (UCHAR_T*)bufp->buffer;
++ register UCHAR_T *pend = (UCHAR_T*) (bufp->buffer + bufp->used);
++#else /* BYTE */
++ UCHAR_T *pattern = bufp->buffer;
++ register UCHAR_T *pend = pattern + bufp->used;
++#endif /* WCHAR */
++ UCHAR_T *p = pattern;
++
++#ifdef REL_ALLOC
++ /* This holds the pointer to the failure stack, when
++ it is allocated relocatably. */
++ fail_stack_elt_t *failure_stack_ptr;
++#endif
++
++ /* Assume that each path through the pattern can be null until
++ proven otherwise. We set this false at the bottom of switch
++ statement, to which we get only if a particular path doesn't
++ match the empty string. */
++ boolean path_can_be_null = true;
++
++ /* We aren't doing a `succeed_n' to begin with. */
++ boolean succeed_n_p = false;
++
++ assert (fastmap != NULL && p != NULL);
++
++ INIT_FAIL_STACK ();
++ bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
++ bufp->fastmap_accurate = 1; /* It will be when we're done. */
++ bufp->can_be_null = 0;
++
++ while (1)
++ {
++ if (p == pend || *p == (UCHAR_T) succeed)
++ {
++ /* We have reached the (effective) end of pattern. */
++ if (!FAIL_STACK_EMPTY ())
++ {
++ bufp->can_be_null |= path_can_be_null;
++
++ /* Reset for next path. */
++ path_can_be_null = true;
++
++ p = fail_stack.stack[--fail_stack.avail].pointer;
++
++ continue;
++ }
++ else
++ break;
++ }
++
++ /* We should never be about to go beyond the end of the pattern. */
++ assert (p < pend);
++
++ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
++ {
++
++ /* I guess the idea here is to simply not bother with a fastmap
++ if a backreference is used, since it's too hard to figure out
++ the fastmap for the corresponding group. Setting
++ `can_be_null' stops `re_search_2' from using the fastmap, so
++ that is all we do. */
++ case duplicate:
++ bufp->can_be_null = 1;
++ goto done;
++
++
++ /* Following are the cases which match a character. These end
++ with `break'. */
++
++#ifdef WCHAR
++ case exactn:
++ fastmap[truncate_wchar(p[1])] = 1;
++ break;
++#else /* BYTE */
++ case exactn:
++ fastmap[p[1]] = 1;
++ break;
++#endif /* WCHAR */
++#ifdef MBS_SUPPORT
++ case exactn_bin:
++ fastmap[p[1]] = 1;
++ break;
++#endif
++
++#ifdef WCHAR
++ /* It is hard to distinguish fastmap from (multi byte) characters
++ which depends on current locale. */
++ case charset:
++ case charset_not:
++ case wordchar:
++ case notwordchar:
++ bufp->can_be_null = 1;
++ goto done;
++#else /* BYTE */
++ case charset:
++ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
++ if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
++ fastmap[j] = 1;
++ break;
++
++
++ case charset_not:
++ /* Chars beyond end of map must be allowed. */
++ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
++ fastmap[j] = 1;
++
++ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
++ if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
++ fastmap[j] = 1;
++ break;
++
++
++ case wordchar:
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) == Sword)
++ fastmap[j] = 1;
++ break;
++
++
++ case notwordchar:
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) != Sword)
++ fastmap[j] = 1;
++ break;
++#endif /* WCHAR */
++
++ case anychar:
++ {
++ int fastmap_newline = fastmap['\n'];
++
++ /* `.' matches anything ... */
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ fastmap[j] = 1;
++
++ /* ... except perhaps newline. */
++ if (!(bufp->syntax & RE_DOT_NEWLINE))
++ fastmap['\n'] = fastmap_newline;
++
++ /* Return if we have already set `can_be_null'; if we have,
++ then the fastmap is irrelevant. Something's wrong here. */
++ else if (bufp->can_be_null)
++ goto done;
++
++ /* Otherwise, have to check alternative paths. */
++ break;
++ }
++
++#ifdef emacs
++ case syntaxspec:
++ k = *p++;
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) == (enum syntaxcode) k)
++ fastmap[j] = 1;
++ break;
++
++
++ case notsyntaxspec:
++ k = *p++;
++ for (j = 0; j < (1 << BYTEWIDTH); j++)
++ if (SYNTAX (j) != (enum syntaxcode) k)
++ fastmap[j] = 1;
++ break;
++
++
++ /* All cases after this match the empty string. These end with
++ `continue'. */
++
++
++ case before_dot:
++ case at_dot:
++ case after_dot:
++ continue;
++#endif /* emacs */
++
++
++ case no_op:
++ case begline:
++ case endline:
++ case begbuf:
++ case endbuf:
++ case wordbound:
++ case notwordbound:
++ case wordbeg:
++ case wordend:
++ case push_dummy_failure:
++ continue;
++
++
++ case jump_n:
++ case pop_failure_jump:
++ case maybe_pop_jump:
++ case jump:
++ case jump_past_alt:
++ case dummy_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (j, p);
++ p += j;
++ if (j > 0)
++ continue;
++
++ /* Jump backward implies we just went through the body of a
++ loop and matched nothing. Opcode jumped to should be
++ `on_failure_jump' or `succeed_n'. Just treat it like an
++ ordinary jump. For a * loop, it has pushed its failure
++ point already; if so, discard that as redundant. */
++ if ((re_opcode_t) *p != on_failure_jump
++ && (re_opcode_t) *p != succeed_n)
++ continue;
++
++ p++;
++ EXTRACT_NUMBER_AND_INCR (j, p);
++ p += j;
++
++ /* If what's on the stack is where we are now, pop it. */
++ if (!FAIL_STACK_EMPTY ()
++ && fail_stack.stack[fail_stack.avail - 1].pointer == p)
++ fail_stack.avail--;
++
++ continue;
++
++
++ case on_failure_jump:
++ case on_failure_keep_string_jump:
++ handle_on_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (j, p);
++
++ /* For some patterns, e.g., `(a?)?', `p+j' here points to the
++ end of the pattern. We don't want to push such a point,
++ since when we restore it above, entering the switch will
++ increment `p' past the end of the pattern. We don't need
++ to push such a point since we obviously won't find any more
++ fastmap entries beyond `pend'. Such a pattern can match
++ the null string, though. */
++ if (p + j < pend)
++ {
++ if (!PUSH_PATTERN_OP (p + j, fail_stack))
++ {
++ RESET_FAIL_STACK ();
++ return -2;
++ }
++ }
++ else
++ bufp->can_be_null = 1;
++
++ if (succeed_n_p)
++ {
++ EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
++ succeed_n_p = false;
++ }
++
++ continue;
++
++
++ case succeed_n:
++ /* Get to the number of times to succeed. */
++ p += OFFSET_ADDRESS_SIZE;
++
++ /* Increment p past the n for when k != 0. */
++ EXTRACT_NUMBER_AND_INCR (k, p);
++ if (k == 0)
++ {
++ p -= 2 * OFFSET_ADDRESS_SIZE;
++ succeed_n_p = true; /* Spaghetti code alert. */
++ goto handle_on_failure_jump;
++ }
++ continue;
++
++
++ case set_number_at:
++ p += 2 * OFFSET_ADDRESS_SIZE;
++ continue;
++
++
++ case start_memory:
++ case stop_memory:
++ p += 2;
++ continue;
++
++
++ default:
++ abort (); /* We have listed all the cases. */
++ } /* switch *p++ */
++
++ /* Getting here means we have found the possible starting
++ characters for one path of the pattern -- and that the empty
++ string does not match. We need not follow this path further.
++ Instead, look at the next alternative (remembered on the
++ stack), or quit if no more. The test at the top of the loop
++ does these things. */
++ path_can_be_null = false;
++ p = pend;
++ } /* while p */
++
++ /* Set `can_be_null' for the last path (also the first path, if the
++ pattern is empty). */
++ bufp->can_be_null |= path_can_be_null;
++
++ done:
++ RESET_FAIL_STACK ();
++ return 0;
++}
++
++#else /* not INSIDE_RECURSION */
++
++int
++re_compile_fastmap (struct re_pattern_buffer *bufp)
++{
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ return wcs_re_compile_fastmap(bufp);
++ else
++# endif
++ return byte_re_compile_fastmap(bufp);
++} /* re_compile_fastmap */
++#ifdef _LIBC
++weak_alias (__re_compile_fastmap, re_compile_fastmap)
++#endif
++
++
++/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
++ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
++ this memory for recording register information. STARTS and ENDS
++ must be allocated using the malloc library routine, and must each
++ be at least NUM_REGS * sizeof (regoff_t) bytes long.
++
++ If NUM_REGS == 0, then subsequent matches should allocate their own
++ register data.
++
++ Unless this function is called, the first search or match using
++ PATTERN_BUFFER will allocate its own register data, without
++ freeing the old data. */
++
++void
++re_set_registers (struct re_pattern_buffer *bufp,
++ struct re_registers *regs, unsigned num_regs,
++ regoff_t *starts, regoff_t *ends)
++{
++ if (num_regs)
++ {
++ bufp->regs_allocated = REGS_REALLOCATE;
++ regs->num_regs = num_regs;
++ regs->start = starts;
++ regs->end = ends;
++ }
++ else
++ {
++ bufp->regs_allocated = REGS_UNALLOCATED;
++ regs->num_regs = 0;
++ regs->start = regs->end = (regoff_t *) 0;
++ }
++}
++#ifdef _LIBC
++weak_alias (__re_set_registers, re_set_registers)
++#endif
++
++/* Searching routines. */
++
++/* Like re_search_2, below, but only one string is specified, and
++ doesn't let you say where to stop matching. */
++
++int
++re_search (struct re_pattern_buffer *bufp, const char *string, int size,
++ int startpos, int range, struct re_registers *regs)
++{
++ return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
++ regs, size);
++}
++#ifdef _LIBC
++weak_alias (__re_search, re_search)
++#endif
++
++
++/* Using the compiled pattern in BUFP->buffer, first tries to match the
++ virtual concatenation of STRING1 and STRING2, starting first at index
++ STARTPOS, then at STARTPOS + 1, and so on.
++
++ STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
++
++ RANGE is how far to scan while trying to match. RANGE = 0 means try
++ only at STARTPOS; in general, the last start tried is STARTPOS +
++ RANGE.
++
++ In REGS, return the indices of the virtual concatenation of STRING1
++ and STRING2 that matched the entire BUFP->buffer and its contained
++ subexpressions.
++
++ Do not consider matching one past the index STOP in the virtual
++ concatenation of STRING1 and STRING2.
++
++ We return either the position in the strings at which the match was
++ found, -1 if no match, or -2 if error (such as failure
++ stack overflow). */
++
++int
++re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
++ const char *string2, int size2, int startpos, int range,
++ struct re_registers *regs, int stop)
++{
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ return wcs_re_search_2 (bufp, string1, size1, string2, size2, startpos,
++ range, regs, stop);
++ else
++# endif
++ return byte_re_search_2 (bufp, string1, size1, string2, size2, startpos,
++ range, regs, stop);
++} /* re_search_2 */
++#ifdef _LIBC
++weak_alias (__re_search_2, re_search_2)
++#endif
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef MATCH_MAY_ALLOCATE
++# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
++#else
++# define FREE_VAR(var) if (var) free (var); var = NULL
++#endif
++
++#ifdef WCHAR
++# define MAX_ALLOCA_SIZE 2000
++
++# define FREE_WCS_BUFFERS() \
++ do { \
++ if (size1 > MAX_ALLOCA_SIZE) \
++ { \
++ free (wcs_string1); \
++ free (mbs_offset1); \
++ } \
++ else \
++ { \
++ FREE_VAR (wcs_string1); \
++ FREE_VAR (mbs_offset1); \
++ } \
++ if (size2 > MAX_ALLOCA_SIZE) \
++ { \
++ free (wcs_string2); \
++ free (mbs_offset2); \
++ } \
++ else \
++ { \
++ FREE_VAR (wcs_string2); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++
++#endif
++
++
++static int
++PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
++ int size1, const char *string2, int size2,
++ int startpos, int range,
++ struct re_registers *regs, int stop)
++{
++ int val;
++ register char *fastmap = bufp->fastmap;
++ register RE_TRANSLATE_TYPE translate = bufp->translate;
++ int total_size = size1 + size2;
++ int endpos = startpos + range;
++#ifdef WCHAR
++ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
++ wchar_t *wcs_string1 = NULL, *wcs_string2 = NULL;
++ /* We need the size of wchar_t buffers correspond to csize1, csize2. */
++ int wcs_size1 = 0, wcs_size2 = 0;
++ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
++ int *mbs_offset1 = NULL, *mbs_offset2 = NULL;
++ /* They hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++#endif /* WCHAR */
++
++ /* Check for out-of-range STARTPOS. */
++ if (startpos < 0 || startpos > total_size)
++ return -1;
++
++ /* Fix up RANGE if it might eventually take us outside
++ the virtual concatenation of STRING1 and STRING2.
++ Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
++ if (endpos < 0)
++ range = 0 - startpos;
++ else if (endpos > total_size)
++ range = total_size - startpos;
++
++ /* If the search isn't to be a backwards one, don't waste time in a
++ search for a pattern that must be anchored. */
++ if (bufp->used > 0 && range > 0
++ && ((re_opcode_t) bufp->buffer[0] == begbuf
++ /* `begline' is like `begbuf' if it cannot match at newlines. */
++ || ((re_opcode_t) bufp->buffer[0] == begline
++ && !bufp->newline_anchor)))
++ {
++ if (startpos > 0)
++ return -1;
++ else
++ range = 1;
++ }
++
++#ifdef emacs
++ /* In a forward search for something that starts with \=.
++ don't keep searching past point. */
++ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
++ {
++ range = PT - startpos;
++ if (range <= 0)
++ return -1;
++ }
++#endif /* emacs */
++
++ /* Update the fastmap now if not correct already. */
++ if (fastmap && !bufp->fastmap_accurate)
++ if (re_compile_fastmap (bufp) == -2)
++ return -2;
++
++#ifdef WCHAR
++ /* Allocate wchar_t array for wcs_string1 and wcs_string2 and
++ fill them with converted string. */
++ if (size1 != 0)
++ {
++ if (size1 > MAX_ALLOCA_SIZE)
++ {
++ wcs_string1 = TALLOC (size1 + 1, CHAR_T);
++ mbs_offset1 = TALLOC (size1 + 1, int);
++ is_binary = TALLOC (size1 + 1, char);
++ }
++ else
++ {
++ wcs_string1 = REGEX_TALLOC (size1 + 1, CHAR_T);
++ mbs_offset1 = REGEX_TALLOC (size1 + 1, int);
++ is_binary = REGEX_TALLOC (size1 + 1, char);
++ }
++ if (!wcs_string1 || !mbs_offset1 || !is_binary)
++ {
++ if (size1 > MAX_ALLOCA_SIZE)
++ {
++ free (wcs_string1);
++ free (mbs_offset1);
++ free (is_binary);
++ }
++ else
++ {
++ FREE_VAR (wcs_string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (is_binary);
++ }
++ return -2;
++ }
++ wcs_size1 = convert_mbs_to_wcs(wcs_string1, string1, size1,
++ mbs_offset1, is_binary);
++ wcs_string1[wcs_size1] = L'\0'; /* for a sentinel */
++ if (size1 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ }
++ if (size2 != 0)
++ {
++ if (size2 > MAX_ALLOCA_SIZE)
++ {
++ wcs_string2 = TALLOC (size2 + 1, CHAR_T);
++ mbs_offset2 = TALLOC (size2 + 1, int);
++ is_binary = TALLOC (size2 + 1, char);
++ }
++ else
++ {
++ wcs_string2 = REGEX_TALLOC (size2 + 1, CHAR_T);
++ mbs_offset2 = REGEX_TALLOC (size2 + 1, int);
++ is_binary = REGEX_TALLOC (size2 + 1, char);
++ }
++ if (!wcs_string2 || !mbs_offset2 || !is_binary)
++ {
++ FREE_WCS_BUFFERS ();
++ if (size2 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ wcs_size2 = convert_mbs_to_wcs(wcs_string2, string2, size2,
++ mbs_offset2, is_binary);
++ wcs_string2[wcs_size2] = L'\0'; /* for a sentinel */
++ if (size2 > MAX_ALLOCA_SIZE)
++ free (is_binary);
++ else
++ FREE_VAR (is_binary);
++ }
++#endif /* WCHAR */
++
++
++ /* Loop through the string, looking for a place to start matching. */
++ for (;;)
++ {
++ /* If a fastmap is supplied, skip quickly over characters that
++ cannot be the start of a match. If the pattern can match the
++ null string, however, we don't need to skip characters; we want
++ the first null string. */
++ if (fastmap && startpos < total_size && !bufp->can_be_null)
++ {
++ if (range > 0) /* Searching forwards. */
++ {
++ register const char *d;
++ register int lim = 0;
++ int irange = range;
++
++ if (startpos < size1 && startpos + range >= size1)
++ lim = range - (size1 - startpos);
++
++ d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
++
++ /* Written out as an if-else to avoid testing `translate'
++ inside the loop. */
++ if (translate)
++ while (range > lim
++ && !fastmap[(unsigned char)
++ translate[(unsigned char) *d++]])
++ range--;
++ else
++ while (range > lim && !fastmap[(unsigned char) *d++])
++ range--;
++
++ startpos += irange - range;
++ }
++ else /* Searching backwards. */
++ {
++ register CHAR_T c = (size1 == 0 || startpos >= size1
++ ? string2[startpos - size1]
++ : string1[startpos]);
++
++ if (!fastmap[(unsigned char) TRANSLATE (c)])
++ goto advance;
++ }
++ }
++
++ /* If can't match the null string, and that's all we have left, fail. */
++ if (range >= 0 && startpos == total_size && fastmap
++ && !bufp->can_be_null)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -1;
++ }
++
++#ifdef WCHAR
++ val = wcs_re_match_2_internal (bufp, string1, size1, string2,
++ size2, startpos, regs, stop,
++ wcs_string1, wcs_size1,
++ wcs_string2, wcs_size2,
++ mbs_offset1, mbs_offset2);
++#else /* BYTE */
++ val = byte_re_match_2_internal (bufp, string1, size1, string2,
++ size2, startpos, regs, stop);
++#endif /* BYTE */
++
++#ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++#endif
++
++ if (val >= 0)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return startpos;
++ }
++
++ if (val == -2)
++ {
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -2;
++ }
++
++ advance:
++ if (!range)
++ break;
++ else if (range > 0)
++ {
++ range--;
++ startpos++;
++ }
++ else
++ {
++ range++;
++ startpos--;
++ }
++ }
++#ifdef WCHAR
++ FREE_WCS_BUFFERS ();
++#endif
++ return -1;
++}
++
++#ifdef WCHAR
++/* This converts PTR, a pointer into one of the search wchar_t strings
++ `string1' and `string2' into an multibyte string offset from the
++ beginning of that string. We use mbs_offset to optimize.
++ See convert_mbs_to_wcs. */
++# define POINTER_TO_OFFSET(ptr) \
++ (FIRST_STRING_P (ptr) \
++ ? ((regoff_t)(mbs_offset1 != NULL? mbs_offset1[(ptr)-string1] : 0)) \
++ : ((regoff_t)((mbs_offset2 != NULL? mbs_offset2[(ptr)-string2] : 0) \
++ + csize1)))
++#else /* BYTE */
++/* This converts PTR, a pointer into one of the search strings `string1'
++ and `string2' into an offset from the beginning of that string. */
++# define POINTER_TO_OFFSET(ptr) \
++ (FIRST_STRING_P (ptr) \
++ ? ((regoff_t) ((ptr) - string1)) \
++ : ((regoff_t) ((ptr) - string2 + size1)))
++#endif /* WCHAR */
++
++/* Macros for dealing with the split strings in re_match_2. */
++
++#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
++
++/* Call before fetching a character with *d. This switches over to
++ string2 if necessary. */
++#define PREFETCH() \
++ while (d == dend) \
++ { \
++ /* End of string2 => fail. */ \
++ if (dend == end_match_2) \
++ goto fail; \
++ /* End of string1 => advance to string2. */ \
++ d = string2; \
++ dend = end_match_2; \
++ }
++
++/* Test if at very beginning or at very end of the virtual concatenation
++ of `string1' and `string2'. If only one string, it's `string2'. */
++#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
++#define AT_STRINGS_END(d) ((d) == end2)
++
++
++/* Test if D points to a character which is word-constituent. We have
++ two special cases to check for: if past the end of string1, look at
++ the first character in string2; and if before the beginning of
++ string2, look at the last character in string1. */
++#ifdef WCHAR
++/* Use internationalized API instead of SYNTAX. */
++# define WORDCHAR_P(d) \
++ (iswalnum ((wint_t)((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0 \
++ || ((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) == L'_')
++#else /* BYTE */
++# define WORDCHAR_P(d) \
++ (SYNTAX ((d) == end1 ? *string2 \
++ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
++ == Sword)
++#endif /* WCHAR */
++
++/* Disabled due to a compiler bug -- see comment at case wordbound */
++#if 0
++/* Test if the character before D and the one at D differ with respect
++ to being word-constituent. */
++#define AT_WORD_BOUNDARY(d) \
++ (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
++ || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
++#endif
++
++/* Free everything we malloc. */
++#ifdef MATCH_MAY_ALLOCATE
++# ifdef WCHAR
++# define FREE_VARIABLES() \
++ do { \
++ REGEX_FREE_STACK (fail_stack.stack); \
++ FREE_VAR (regstart); \
++ FREE_VAR (regend); \
++ FREE_VAR (old_regstart); \
++ FREE_VAR (old_regend); \
++ FREE_VAR (best_regstart); \
++ FREE_VAR (best_regend); \
++ FREE_VAR (reg_info); \
++ FREE_VAR (reg_dummy); \
++ FREE_VAR (reg_info_dummy); \
++ if (!cant_free_wcs_buf) \
++ { \
++ FREE_VAR (string1); \
++ FREE_VAR (string2); \
++ FREE_VAR (mbs_offset1); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++# else /* BYTE */
++# define FREE_VARIABLES() \
++ do { \
++ REGEX_FREE_STACK (fail_stack.stack); \
++ FREE_VAR (regstart); \
++ FREE_VAR (regend); \
++ FREE_VAR (old_regstart); \
++ FREE_VAR (old_regend); \
++ FREE_VAR (best_regstart); \
++ FREE_VAR (best_regend); \
++ FREE_VAR (reg_info); \
++ FREE_VAR (reg_dummy); \
++ FREE_VAR (reg_info_dummy); \
++ } while (0)
++# endif /* WCHAR */
++#else
++# ifdef WCHAR
++# define FREE_VARIABLES() \
++ do { \
++ if (!cant_free_wcs_buf) \
++ { \
++ FREE_VAR (string1); \
++ FREE_VAR (string2); \
++ FREE_VAR (mbs_offset1); \
++ FREE_VAR (mbs_offset2); \
++ } \
++ } while (0)
++# else /* BYTE */
++# define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
++# endif /* WCHAR */
++#endif /* not MATCH_MAY_ALLOCATE */
++
++/* These values must meet several constraints. They must not be valid
++ register values; since we have a limit of 255 registers (because
++ we use only one byte in the pattern for the register number), we can
++ use numbers larger than 255. They must differ by 1, because of
++ NUM_FAILURE_ITEMS above. And the value for the lowest register must
++ be larger than the value for the highest register, so we do not try
++ to actually save any registers when none are active. */
++#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
++#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
++
++#else /* not INSIDE_RECURSION */
++/* Matching routines. */
++
++#ifndef emacs /* Emacs never uses this. */
++/* re_match is like re_match_2 except it takes only a single string. */
++
++int
++re_match (struct re_pattern_buffer *bufp, const char *string,
++ int size, int pos, struct re_registers *regs)
++{
++ int result;
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ result = wcs_re_match_2_internal (bufp, NULL, 0, string, size,
++ pos, regs, size,
++ NULL, 0, NULL, 0, NULL, NULL);
++ else
++# endif
++ result = byte_re_match_2_internal (bufp, NULL, 0, string, size,
++ pos, regs, size);
++# ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++# endif
++ return result;
++}
++# ifdef _LIBC
++weak_alias (__re_match, re_match)
++# endif
++#endif /* not emacs */
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++static boolean PREFIX(group_match_null_string_p) (UCHAR_T **p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static boolean PREFIX(alt_match_null_string_p) (UCHAR_T *p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static boolean PREFIX(common_op_match_null_string_p) (UCHAR_T **p,
++ UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info);
++static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
++ register int len,
++ RE_TRANSLATE_TYPE translate);
++#else /* not INSIDE_RECURSION */
++
++/* re_match_2 matches the compiled pattern in BUFP against the
++ the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
++ and SIZE2, respectively). We start matching at POS, and stop
++ matching at STOP.
++
++ If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
++ store offsets for the substring each group matched in REGS. See the
++ documentation for exactly how many groups we fill.
++
++ We return -1 if no match, -2 if an internal error (such as the
++ failure stack overflowing). Otherwise, we return the length of the
++ matched substring. */
++
++int
++re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
++ const char *string2, int size2, int pos,
++ struct re_registers *regs, int stop)
++{
++ int result;
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ result = wcs_re_match_2_internal (bufp, string1, size1, string2, size2,
++ pos, regs, stop,
++ NULL, 0, NULL, 0, NULL, NULL);
++ else
++# endif
++ result = byte_re_match_2_internal (bufp, string1, size1, string2, size2,
++ pos, regs, stop);
++
++#ifndef REGEX_MALLOC
++# ifdef C_ALLOCA
++ alloca (0);
++# endif
++#endif
++ return result;
++}
++#ifdef _LIBC
++weak_alias (__re_match_2, re_match_2)
++#endif
++
++#endif /* not INSIDE_RECURSION */
++
++#ifdef INSIDE_RECURSION
++
++#ifdef WCHAR
++static int count_mbs_length (int *, int);
++
++/* This check the substring (from 0, to length) of the multibyte string,
++ to which offset_buffer correspond. And count how many wchar_t_characters
++ the substring occupy. We use offset_buffer to optimization.
++ See convert_mbs_to_wcs. */
++
++static int
++count_mbs_length(int *offset_buffer, int length)
++{
++ int upper, lower;
++
++ /* Check whether the size is valid. */
++ if (length < 0)
++ return -1;
++
++ if (offset_buffer == NULL)
++ return 0;
++
++ /* If there are no multibyte character, offset_buffer[i] == i.
++ Optmize for this case. */
++ if (offset_buffer[length] == length)
++ return length;
++
++ /* Set up upper with length. (because for all i, offset_buffer[i] >= i) */
++ upper = length;
++ lower = 0;
++
++ while (true)
++ {
++ int middle = (lower + upper) / 2;
++ if (middle == lower || middle == upper)
++ break;
++ if (offset_buffer[middle] > length)
++ upper = middle;
++ else if (offset_buffer[middle] < length)
++ lower = middle;
++ else
++ return middle;
++ }
++
++ return -1;
++}
++#endif /* WCHAR */
++
++/* This is a separate function so that we can force an alloca cleanup
++ afterwards. */
++#ifdef WCHAR
++static int
++wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *cstring1, int csize1,
++ const char *cstring2, int csize2,
++ int pos,
++ struct re_registers *regs,
++ int stop,
++ /* string1 == string2 == NULL means string1/2, size1/2 and
++ mbs_offset1/2 need seting up in this function. */
++ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
++ wchar_t *string1, int size1,
++ wchar_t *string2, int size2,
++ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
++ int *mbs_offset1, int *mbs_offset2)
++#else /* BYTE */
++static int
++byte_re_match_2_internal (struct re_pattern_buffer *bufp,
++ const char *string1, int size1,
++ const char *string2, int size2,
++ int pos,
++ struct re_registers *regs, int stop)
++#endif /* BYTE */
++{
++ /* General temporaries. */
++ int mcnt;
++ UCHAR_T *p1;
++#ifdef WCHAR
++ /* They hold whether each wchar_t is binary data or not. */
++ char *is_binary = NULL;
++ /* If true, we can't free string1/2, mbs_offset1/2. */
++ int cant_free_wcs_buf = 1;
++#endif /* WCHAR */
++
++ /* Just past the end of the corresponding string. */
++ const CHAR_T *end1, *end2;
++
++ /* Pointers into string1 and string2, just past the last characters in
++ each to consider matching. */
++ const CHAR_T *end_match_1, *end_match_2;
++
++ /* Where we are in the data, and the end of the current string. */
++ const CHAR_T *d, *dend;
++
++ /* Where we are in the pattern, and the end of the pattern. */
++#ifdef WCHAR
++ UCHAR_T *pattern, *p;
++ register UCHAR_T *pend;
++#else /* BYTE */
++ UCHAR_T *p = bufp->buffer;
++ register UCHAR_T *pend = p + bufp->used;
++#endif /* WCHAR */
++
++ /* Mark the opcode just after a start_memory, so we can test for an
++ empty subpattern when we get to the stop_memory. */
++ UCHAR_T *just_past_start_mem = 0;
++
++ /* We use this to map every character in the string. */
++ RE_TRANSLATE_TYPE translate = bufp->translate;
++
++ /* Failure point stack. Each place that can handle a failure further
++ down the line pushes a failure point on this stack. It consists of
++ restart, regend, and reg_info for all registers corresponding to
++ the subexpressions we're currently inside, plus the number of such
++ registers, and, finally, two char *'s. The first char * is where
++ to resume scanning the pattern; the second one is where to resume
++ scanning the strings. If the latter is zero, the failure point is
++ a ``dummy''; if a failure happens and the failure point is a dummy,
++ it gets discarded and the next next one is tried. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
++ PREFIX(fail_stack_type) fail_stack;
++#endif
++#ifdef DEBUG
++ static unsigned failure_id;
++ unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
++#endif
++
++#ifdef REL_ALLOC
++ /* This holds the pointer to the failure stack, when
++ it is allocated relocatably. */
++ fail_stack_elt_t *failure_stack_ptr;
++#endif
++
++ /* We fill all the registers internally, independent of what we
++ return, for use in backreferences. The number here includes
++ an element for register zero. */
++ size_t num_regs = bufp->re_nsub + 1;
++
++ /* The currently active registers. */
++ active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++
++ /* Information on the contents of registers. These are pointers into
++ the input strings; they record just what was matched (on this
++ attempt) by a subexpression part of the pattern, that is, the
++ regnum-th regstart pointer points to where in the pattern we began
++ matching and the regnum-th regend points to right after where we
++ stopped matching the regnum-th subexpression. (The zeroth register
++ keeps track of what the whole pattern matches.) */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **regstart, **regend;
++#endif
++
++ /* If a group that's operated upon by a repetition operator fails to
++ match anything, then the register for its start will need to be
++ restored because it will have been set to wherever in the string we
++ are when we last see its open-group operator. Similarly for a
++ register's end. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **old_regstart, **old_regend;
++#endif
++
++ /* The is_active field of reg_info helps us keep track of which (possibly
++ nested) subexpressions we are currently in. The matched_something
++ field of reg_info[reg_num] helps us tell whether or not we have
++ matched any of the pattern so far this time through the reg_num-th
++ subexpression. These two fields get reset each time through any
++ loop their register is in. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
++ PREFIX(register_info_type) *reg_info;
++#endif
++
++ /* The following record the register info as found in the above
++ variables when we find a match better than any we've seen before.
++ This happens as we backtrack through the failure points, which in
++ turn happens only if we have not yet matched the entire string. */
++ unsigned best_regs_set = false;
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **best_regstart, **best_regend;
++#endif
++
++ /* Logically, this is `best_regend[0]'. But we don't want to have to
++ allocate space for that if we're not allocating space for anything
++ else (see below). Also, we never need info about register 0 for
++ any of the other register vectors, and it seems rather a kludge to
++ treat `best_regend' differently than the rest. So we keep track of
++ the end of the best match so far in a separate variable. We
++ initialize this to NULL so that when we backtrack the first time
++ and need to test it, it's not garbage. */
++ const CHAR_T *match_end = NULL;
++
++ /* This helps SET_REGS_MATCHED avoid doing redundant work. */
++ int set_regs_matched_done = 0;
++
++ /* Used when we pop values we don't care about. */
++#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
++ const CHAR_T **reg_dummy;
++ PREFIX(register_info_type) *reg_info_dummy;
++#endif
++
++#ifdef DEBUG
++ /* Counts the total number of registers pushed. */
++ unsigned num_regs_pushed = 0;
++#endif
++
++ DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
++
++ INIT_FAIL_STACK ();
++
++#ifdef MATCH_MAY_ALLOCATE
++ /* Do not bother to initialize all the register variables if there are
++ no groups in the pattern, as it takes a fair amount of time. If
++ there are groups, we include space for register 0 (the whole
++ pattern), even though we never use it, since it simplifies the
++ array indexing. We should fix this. */
++ if (bufp->re_nsub)
++ {
++ regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ old_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ old_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ best_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
++ best_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
++ reg_info = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
++ reg_dummy = REGEX_TALLOC (num_regs, const CHAR_T *);
++ reg_info_dummy = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
++
++ if (!(regstart && regend && old_regstart && old_regend && reg_info
++ && best_regstart && best_regend && reg_dummy && reg_info_dummy))
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ }
++ else
++ {
++ /* We must initialize all our variables to NULL, so that
++ `FREE_VARIABLES' doesn't try to free them. */
++ regstart = regend = old_regstart = old_regend = best_regstart
++ = best_regend = reg_dummy = NULL;
++ reg_info = reg_info_dummy = (PREFIX(register_info_type) *) NULL;
++ }
++#endif /* MATCH_MAY_ALLOCATE */
++
++ /* The starting position is bogus. */
++#ifdef WCHAR
++ if (pos < 0 || pos > csize1 + csize2)
++#else /* BYTE */
++ if (pos < 0 || pos > size1 + size2)
++#endif
++ {
++ FREE_VARIABLES ();
++ return -1;
++ }
++
++#ifdef WCHAR
++ /* Allocate wchar_t array for string1 and string2 and
++ fill them with converted string. */
++ if (string1 == NULL && string2 == NULL)
++ {
++ /* We need seting up buffers here. */
++
++ /* We must free wcs buffers in this function. */
++ cant_free_wcs_buf = 0;
++
++ if (csize1 != 0)
++ {
++ string1 = REGEX_TALLOC (csize1 + 1, CHAR_T);
++ mbs_offset1 = REGEX_TALLOC (csize1 + 1, int);
++ is_binary = REGEX_TALLOC (csize1 + 1, char);
++ if (!string1 || !mbs_offset1 || !is_binary)
++ {
++ FREE_VAR (string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ }
++ if (csize2 != 0)
++ {
++ string2 = REGEX_TALLOC (csize2 + 1, CHAR_T);
++ mbs_offset2 = REGEX_TALLOC (csize2 + 1, int);
++ is_binary = REGEX_TALLOC (csize2 + 1, char);
++ if (!string2 || !mbs_offset2 || !is_binary)
++ {
++ FREE_VAR (string1);
++ FREE_VAR (mbs_offset1);
++ FREE_VAR (string2);
++ FREE_VAR (mbs_offset2);
++ FREE_VAR (is_binary);
++ return -2;
++ }
++ size2 = convert_mbs_to_wcs(string2, cstring2, csize2,
++ mbs_offset2, is_binary);
++ string2[size2] = L'\0'; /* for a sentinel */
++ FREE_VAR (is_binary);
++ }
++ }
++
++ /* We need to cast pattern to (wchar_t*), because we casted this compiled
++ pattern to (char*) in regex_compile. */
++ p = pattern = (CHAR_T*)bufp->buffer;
++ pend = (CHAR_T*)(bufp->buffer + bufp->used);
++
++#endif /* WCHAR */
++
++ /* Initialize subexpression text positions to -1 to mark ones that no
++ start_memory/stop_memory has been seen for. Also initialize the
++ register information struct. */
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ regstart[mcnt] = regend[mcnt]
++ = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
++
++ REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
++ IS_ACTIVE (reg_info[mcnt]) = 0;
++ MATCHED_SOMETHING (reg_info[mcnt]) = 0;
++ EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
++ }
++
++ /* We move `string1' into `string2' if the latter's empty -- but not if
++ `string1' is null. */
++ if (size2 == 0 && string1 != NULL)
++ {
++ string2 = string1;
++ size2 = size1;
++ string1 = 0;
++ size1 = 0;
++#ifdef WCHAR
++ mbs_offset2 = mbs_offset1;
++ csize2 = csize1;
++ mbs_offset1 = NULL;
++ csize1 = 0;
++#endif
++ }
++ end1 = string1 + size1;
++ end2 = string2 + size2;
++
++ /* Compute where to stop matching, within the two strings. */
++#ifdef WCHAR
++ if (stop <= csize1)
++ {
++ mcnt = count_mbs_length(mbs_offset1, stop);
++ end_match_1 = string1 + mcnt;
++ end_match_2 = string2;
++ }
++ else
++ {
++ if (stop > csize1 + csize2)
++ stop = csize1 + csize2;
++ end_match_1 = end1;
++ mcnt = count_mbs_length(mbs_offset2, stop-csize1);
++ end_match_2 = string2 + mcnt;
++ }
++ if (mcnt < 0)
++ { /* count_mbs_length return error. */
++ FREE_VARIABLES ();
++ return -1;
++ }
++#else
++ if (stop <= size1)
++ {
++ end_match_1 = string1 + stop;
++ end_match_2 = string2;
++ }
++ else
++ {
++ end_match_1 = end1;
++ end_match_2 = string2 + stop - size1;
++ }
++#endif /* WCHAR */
++
++ /* `p' scans through the pattern as `d' scans through the data.
++ `dend' is the end of the input string that `d' points within. `d'
++ is advanced into the following input string whenever necessary, but
++ this happens before fetching; therefore, at the beginning of the
++ loop, `d' can be pointing at the end of a string, but it cannot
++ equal `string2'. */
++#ifdef WCHAR
++ if (size1 > 0 && pos <= csize1)
++ {
++ mcnt = count_mbs_length(mbs_offset1, pos);
++ d = string1 + mcnt;
++ dend = end_match_1;
++ }
++ else
++ {
++ mcnt = count_mbs_length(mbs_offset2, pos-csize1);
++ d = string2 + mcnt;
++ dend = end_match_2;
++ }
++
++ if (mcnt < 0)
++ { /* count_mbs_length return error. */
++ FREE_VARIABLES ();
++ return -1;
++ }
++#else
++ if (size1 > 0 && pos <= size1)
++ {
++ d = string1 + pos;
++ dend = end_match_1;
++ }
++ else
++ {
++ d = string2 + pos - size1;
++ dend = end_match_2;
++ }
++#endif /* WCHAR */
++
++ DEBUG_PRINT1 ("The compiled pattern is:\n");
++ DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
++ DEBUG_PRINT1 ("The string to match is: `");
++ DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
++ DEBUG_PRINT1 ("'\n");
++
++ /* This loops over pattern commands. It exits by returning from the
++ function if the match is complete, or it drops through if the match
++ fails at this starting point in the input data. */
++ for (;;)
++ {
++#ifdef _LIBC
++ DEBUG_PRINT2 ("\n%p: ", p);
++#else
++ DEBUG_PRINT2 ("\n0x%x: ", p);
++#endif
++
++ if (p == pend)
++ { /* End of pattern means we might have succeeded. */
++ DEBUG_PRINT1 ("end of pattern ... ");
++
++ /* If we haven't matched the entire string, and we want the
++ longest match, try backtracking. */
++ if (d != end_match_2)
++ {
++ /* 1 if this match ends in the same string (string1 or string2)
++ as the best previous match. */
++ boolean same_str_p = (FIRST_STRING_P (match_end)
++ == MATCHING_IN_FIRST_STRING);
++ /* 1 if this match is the best seen so far. */
++ boolean best_match_p;
++
++ /* AIX compiler got confused when this was combined
++ with the previous declaration. */
++ if (same_str_p)
++ best_match_p = d > match_end;
++ else
++ best_match_p = !MATCHING_IN_FIRST_STRING;
++
++ DEBUG_PRINT1 ("backtracking.\n");
++
++ if (!FAIL_STACK_EMPTY ())
++ { /* More failure points to try. */
++
++ /* If exceeds best match so far, save it. */
++ if (!best_regs_set || best_match_p)
++ {
++ best_regs_set = true;
++ match_end = d;
++
++ DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
++
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ best_regstart[mcnt] = regstart[mcnt];
++ best_regend[mcnt] = regend[mcnt];
++ }
++ }
++ goto fail;
++ }
++
++ /* If no failure points, don't restore garbage. And if
++ last match is real best match, don't restore second
++ best one. */
++ else if (best_regs_set && !best_match_p)
++ {
++ restore_best_regs:
++ /* Restore best match. It may happen that `dend ==
++ end_match_1' while the restored d is in string2.
++ For example, the pattern `x.*y.*z' against the
++ strings `x-' and `y-z-', if the two strings are
++ not consecutive in memory. */
++ DEBUG_PRINT1 ("Restoring best registers.\n");
++
++ d = match_end;
++ dend = ((d >= string1 && d <= end1)
++ ? end_match_1 : end_match_2);
++
++ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
++ {
++ regstart[mcnt] = best_regstart[mcnt];
++ regend[mcnt] = best_regend[mcnt];
++ }
++ }
++ } /* d != end_match_2 */
++
++ succeed_label:
++ DEBUG_PRINT1 ("Accepting match.\n");
++ /* If caller wants register contents data back, do it. */
++ if (regs && !bufp->no_sub)
++ {
++ /* Have the register data arrays been allocated? */
++ if (bufp->regs_allocated == REGS_UNALLOCATED)
++ { /* No. So allocate them with malloc. We need one
++ extra element beyond `num_regs' for the `-1' marker
++ GNU code uses. */
++ regs->num_regs = MAX (RE_NREGS, num_regs + 1);
++ regs->start = TALLOC (regs->num_regs, regoff_t);
++ regs->end = TALLOC (regs->num_regs, regoff_t);
++ if (regs->start == NULL || regs->end == NULL)
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ bufp->regs_allocated = REGS_REALLOCATE;
++ }
++ else if (bufp->regs_allocated == REGS_REALLOCATE)
++ { /* Yes. If we need more elements than were already
++ allocated, reallocate them. If we need fewer, just
++ leave it alone. */
++ if (regs->num_regs < num_regs + 1)
++ {
++ regs->num_regs = num_regs + 1;
++ RETALLOC (regs->start, regs->num_regs, regoff_t);
++ RETALLOC (regs->end, regs->num_regs, regoff_t);
++ if (regs->start == NULL || regs->end == NULL)
++ {
++ FREE_VARIABLES ();
++ return -2;
++ }
++ }
++ }
++ else
++ {
++ /* These braces fend off a "empty body in an else-statement"
++ warning under GCC when assert expands to nothing. */
++ assert (bufp->regs_allocated == REGS_FIXED);
++ }
++
++ /* Convert the pointer data in `regstart' and `regend' to
++ indices. Register zero has to be set differently,
++ since we haven't kept track of any info for it. */
++ if (regs->num_regs > 0)
++ {
++ regs->start[0] = pos;
++#ifdef WCHAR
++ if (MATCHING_IN_FIRST_STRING)
++ regs->end[0] = mbs_offset1 != NULL ?
++ mbs_offset1[d-string1] : 0;
++ else
++ regs->end[0] = csize1 + (mbs_offset2 != NULL ?
++ mbs_offset2[d-string2] : 0);
++#else
++ regs->end[0] = (MATCHING_IN_FIRST_STRING
++ ? ((regoff_t) (d - string1))
++ : ((regoff_t) (d - string2 + size1)));
++#endif /* WCHAR */
++ }
++
++ /* Go through the first `min (num_regs, regs->num_regs)'
++ registers, since that is all we initialized. */
++ for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
++ mcnt++)
++ {
++ if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
++ regs->start[mcnt] = regs->end[mcnt] = -1;
++ else
++ {
++ regs->start[mcnt]
++ = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
++ regs->end[mcnt]
++ = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
++ }
++ }
++
++ /* If the regs structure we return has more elements than
++ were in the pattern, set the extra elements to -1. If
++ we (re)allocated the registers, this is the case,
++ because we always allocate enough to have at least one
++ -1 at the end. */
++ for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
++ regs->start[mcnt] = regs->end[mcnt] = -1;
++ } /* regs && !bufp->no_sub */
++
++ DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
++ nfailure_points_pushed, nfailure_points_popped,
++ nfailure_points_pushed - nfailure_points_popped);
++ DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
++
++#ifdef WCHAR
++ if (MATCHING_IN_FIRST_STRING)
++ mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
++ else
++ mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
++ csize1;
++ mcnt -= pos;
++#else
++ mcnt = d - pos - (MATCHING_IN_FIRST_STRING
++ ? string1
++ : string2 - size1);
++#endif /* WCHAR */
++
++ DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
++
++ FREE_VARIABLES ();
++ return mcnt;
++ }
++
++ /* Otherwise match next pattern command. */
++ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
++ {
++ /* Ignore these. Used to ignore the n of succeed_n's which
++ currently have n == 0. */
++ case no_op:
++ DEBUG_PRINT1 ("EXECUTING no_op.\n");
++ break;
++
++ case succeed:
++ DEBUG_PRINT1 ("EXECUTING succeed.\n");
++ goto succeed_label;
++
++ /* Match the next n pattern characters exactly. The following
++ byte in the pattern defines n, and the n bytes after that
++ are the characters to match. */
++ case exactn:
++#ifdef MBS_SUPPORT
++ case exactn_bin:
++#endif
++ mcnt = *p++;
++ DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
++
++ /* This is written out as an if-else so we don't waste time
++ testing `translate' inside the loop. */
++ if (translate)
++ {
++ do
++ {
++ PREFETCH ();
++#ifdef WCHAR
++ if (*d <= 0xff)
++ {
++ if ((UCHAR_T) translate[(unsigned char) *d++]
++ != (UCHAR_T) *p++)
++ goto fail;
++ }
++ else
++ {
++ if (*d++ != (CHAR_T) *p++)
++ goto fail;
++ }
++#else
++ if ((UCHAR_T) translate[(unsigned char) *d++]
++ != (UCHAR_T) *p++)
++ goto fail;
++#endif /* WCHAR */
++ }
++ while (--mcnt);
++ }
++ else
++ {
++ do
++ {
++ PREFETCH ();
++ if (*d++ != (CHAR_T) *p++) goto fail;
++ }
++ while (--mcnt);
++ }
++ SET_REGS_MATCHED ();
++ break;
++
++
++ /* Match any character except possibly a newline or a null. */
++ case anychar:
++ DEBUG_PRINT1 ("EXECUTING anychar.\n");
++
++ PREFETCH ();
++
++ if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
++ || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
++ goto fail;
++
++ SET_REGS_MATCHED ();
++ DEBUG_PRINT2 (" Matched `%ld'.\n", (long int) *d);
++ d++;
++ break;
++
++
++ case charset:
++ case charset_not:
++ {
++ register UCHAR_T c;
++#ifdef WCHAR
++ unsigned int i, char_class_length, coll_symbol_length,
++ equiv_class_length, ranges_length, chars_length, length;
++ CHAR_T *workp, *workp2, *charset_top;
++#define WORK_BUFFER_SIZE 128
++ CHAR_T str_buf[WORK_BUFFER_SIZE];
++# ifdef _LIBC
++ uint32_t nrules;
++# endif /* _LIBC */
++#endif /* WCHAR */
++ boolean negate = (re_opcode_t) *(p - 1) == charset_not;
++
++ DEBUG_PRINT2 ("EXECUTING charset%s.\n", negate ? "_not" : "");
++ PREFETCH ();
++ c = TRANSLATE (*d); /* The character to match. */
++#ifdef WCHAR
++# ifdef _LIBC
++ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
++# endif /* _LIBC */
++ charset_top = p - 1;
++ char_class_length = *p++;
++ coll_symbol_length = *p++;
++ equiv_class_length = *p++;
++ ranges_length = *p++;
++ chars_length = *p++;
++ /* p points charset[6], so the address of the next instruction
++ (charset[l+m+n+2o+k+p']) equals p[l+m+n+2*o+p'],
++ where l=length of char_classes, m=length of collating_symbol,
++ n=equivalence_class, o=length of char_range,
++ p'=length of character. */
++ workp = p;
++ /* Update p to indicate the next instruction. */
++ p += char_class_length + coll_symbol_length+ equiv_class_length +
++ 2*ranges_length + chars_length;
++
++ /* match with char_class? */
++ for (i = 0; i < char_class_length ; i += CHAR_CLASS_SIZE)
++ {
++ wctype_t wctype;
++ uintptr_t alignedp = ((uintptr_t)workp
++ + __alignof__(wctype_t) - 1)
++ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
++ wctype = *((wctype_t*)alignedp);
++ workp += CHAR_CLASS_SIZE;
++# ifdef _LIBC
++ if (__iswctype((wint_t)c, wctype))
++ goto char_set_matched;
++# else
++ if (iswctype((wint_t)c, wctype))
++ goto char_set_matched;
++# endif
++ }
++
++ /* match with collating_symbol? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ const unsigned char *extra = (const unsigned char *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
++
++ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;
++ workp++)
++ {
++ int32_t *wextra;
++ wextra = (int32_t*)(extra + *workp++);
++ for (i = 0; i < *wextra; ++i)
++ if (TRANSLATE(d[i]) != wextra[1 + i])
++ break;
++
++ if (i == *wextra)
++ {
++ /* Update d, however d will be incremented at
++ char_set_matched:, we decrement d here. */
++ d += i - 1;
++ goto char_set_matched;
++ }
++ }
++ }
++ else /* (nrules == 0) */
++# endif
++ /* If we can't look up collation data, we use wcscoll
++ instead. */
++ {
++ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++# ifdef _LIBC
++ length = __wcslen (workp);
++# else
++ length = wcslen (workp);
++# endif
++
++ /* If wcscoll(the collating symbol, whole string) > 0,
++ any substring of the string never match with the
++ collating symbol. */
++# ifdef _LIBC
++ if (__wcscoll (workp, d) > 0)
++# else
++ if (wcscoll (workp, d) > 0)
++# endif
++ {
++ workp += length + 1;
++ continue;
++ }
++
++ /* First, we compare the collating symbol with
++ the first character of the string.
++ If it don't match, we add the next character to
++ the compare buffer in turn. */
++ for (i = 0 ; i < WORK_BUFFER_SIZE-1 ; i++, d++)
++ {
++ int match;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++
++ /* add next character to the compare buffer. */
++ str_buf[i] = TRANSLATE(*d);
++ str_buf[i+1] = '\0';
++
++# ifdef _LIBC
++ match = __wcscoll (workp, str_buf);
++# else
++ match = wcscoll (workp, str_buf);
++# endif
++ if (match == 0)
++ goto char_set_matched;
++
++ if (match < 0)
++ /* (str_buf > workp) indicate (str_buf + X > workp),
++ because for all X (str_buf + X > str_buf).
++ So we don't need continue this loop. */
++ break;
++
++ /* Otherwise(str_buf < workp),
++ (str_buf+next_character) may equals (workp).
++ So we continue this loop. */
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ workp += length + 1;
++ }
++ }
++ /* match with equivalence_class? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++ /* Try to match the equivalence class against
++ those known to the collate implementation. */
++ const int32_t *table;
++ const int32_t *weights;
++ const int32_t *extra;
++ const int32_t *indirect;
++ int32_t idx, idx2;
++ wint_t *cp;
++ size_t len;
++
++ /* This #include defines a local function! */
++# include <locale/weightwc.h>
++
++ table = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
++ weights = (const wint_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
++ extra = (const wint_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
++ indirect = (const int32_t *)
++ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
++
++ /* Write 1 collating element to str_buf, and
++ get its index. */
++ idx2 = 0;
++
++ for (i = 0 ; idx2 == 0 && i < WORK_BUFFER_SIZE - 1; i++)
++ {
++ cp = (wint_t*)str_buf;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++ str_buf[i] = TRANSLATE(*(d+i));
++ str_buf[i+1] = '\0'; /* sentinel */
++ idx2 = findidx ((const wint_t**)&cp, i);
++ }
++
++ /* Update d, however d will be incremented at
++ char_set_matched:, we decrement d here. */
++ d = backup_d + ((wchar_t*)cp - (wchar_t*)str_buf - 1);
++ if (d >= dend)
++ {
++ if (dend == end_match_2)
++ d = dend;
++ else
++ {
++ d = string2;
++ dend = end_match_2;
++ }
++ }
++
++ len = weights[idx2];
++
++ for (workp2 = workp + equiv_class_length ; workp < workp2 ;
++ workp++)
++ {
++ idx = (int32_t)*workp;
++ /* We already checked idx != 0 in regex_compile. */
++
++ if (idx2 != 0 && len == weights[idx])
++ {
++ int cnt = 0;
++ while (cnt < len && (weights[idx + 1 + cnt]
++ == weights[idx2 + 1 + cnt]))
++ ++cnt;
++
++ if (cnt == len)
++ goto char_set_matched;
++ }
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ }
++ else /* (nrules == 0) */
++# endif
++ /* If we can't look up collation data, we use wcscoll
++ instead. */
++ {
++ for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
++ {
++ const CHAR_T *backup_d = d, *backup_dend = dend;
++# ifdef _LIBC
++ length = __wcslen (workp);
++# else
++ length = wcslen (workp);
++# endif
++
++ /* If wcscoll(the collating symbol, whole string) > 0,
++ any substring of the string never match with the
++ collating symbol. */
++# ifdef _LIBC
++ if (__wcscoll (workp, d) > 0)
++# else
++ if (wcscoll (workp, d) > 0)
++# endif
++ {
++ workp += length + 1;
++ break;
++ }
++
++ /* First, we compare the equivalence class with
++ the first character of the string.
++ If it don't match, we add the next character to
++ the compare buffer in turn. */
++ for (i = 0 ; i < WORK_BUFFER_SIZE - 1 ; i++, d++)
++ {
++ int match;
++ if (d == dend)
++ {
++ if (dend == end_match_2)
++ break;
++ d = string2;
++ dend = end_match_2;
++ }
++
++ /* add next character to the compare buffer. */
++ str_buf[i] = TRANSLATE(*d);
++ str_buf[i+1] = '\0';
++
++# ifdef _LIBC
++ match = __wcscoll (workp, str_buf);
++# else
++ match = wcscoll (workp, str_buf);
++# endif
++
++ if (match == 0)
++ goto char_set_matched;
++
++ if (match < 0)
++ /* (str_buf > workp) indicate (str_buf + X > workp),
++ because for all X (str_buf + X > str_buf).
++ So we don't need continue this loop. */
++ break;
++
++ /* Otherwise(str_buf < workp),
++ (str_buf+next_character) may equals (workp).
++ So we continue this loop. */
++ }
++ /* not matched */
++ d = backup_d;
++ dend = backup_dend;
++ workp += length + 1;
++ }
++ }
++
++ /* match with char_range? */
++# ifdef _LIBC
++ if (nrules != 0)
++ {
++ uint32_t collseqval;
++ const char *collseq = (const char *)
++ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
++
++ collseqval = collseq_table_lookup (collseq, c);
++
++ for (; workp < p - chars_length ;)
++ {
++ uint32_t start_val, end_val;
++
++ /* We already compute the collation sequence value
++ of the characters (or collating symbols). */
++ start_val = (uint32_t) *workp++; /* range_start */
++ end_val = (uint32_t) *workp++; /* range_end */
++
++ if (start_val <= collseqval && collseqval <= end_val)
++ goto char_set_matched;
++ }
++ }
++ else
++# endif
++ {
++ /* We set range_start_char at str_buf[0], range_end_char
++ at str_buf[4], and compared char at str_buf[2]. */
++ str_buf[1] = 0;
++ str_buf[2] = c;
++ str_buf[3] = 0;
++ str_buf[5] = 0;
++ for (; workp < p - chars_length ;)
++ {
++ wchar_t *range_start_char, *range_end_char;
++
++ /* match if (range_start_char <= c <= range_end_char). */
++
++ /* If range_start(or end) < 0, we assume -range_start(end)
++ is the offset of the collating symbol which is specified
++ as the character of the range start(end). */
++
++ /* range_start */
++ if (*workp < 0)
++ range_start_char = charset_top - (*workp++);
++ else
++ {
++ str_buf[0] = *workp++;
++ range_start_char = str_buf;
++ }
++
++ /* range_end */
++ if (*workp < 0)
++ range_end_char = charset_top - (*workp++);
++ else
++ {
++ str_buf[4] = *workp++;
++ range_end_char = str_buf + 4;
++ }
++
++# ifdef _LIBC
++ if (__wcscoll (range_start_char, str_buf+2) <= 0
++ && __wcscoll (str_buf+2, range_end_char) <= 0)
++# else
++ if (wcscoll (range_start_char, str_buf+2) <= 0
++ && wcscoll (str_buf+2, range_end_char) <= 0)
++# endif
++ goto char_set_matched;
++ }
++ }
++
++ /* match with char? */
++ for (; workp < p ; workp++)
++ if (c == *workp)
++ goto char_set_matched;
++
++ negate = !negate;
++
++ char_set_matched:
++ if (negate) goto fail;
++#else
++ /* Cast to `unsigned' instead of `unsigned char' in case the
++ bit list is a full 32 bytes long. */
++ if (c < (unsigned) (*p * BYTEWIDTH)
++ && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
++ negate = !negate;
++
++ p += 1 + *p;
++
++ if (!negate) goto fail;
++#undef WORK_BUFFER_SIZE
++#endif /* WCHAR */
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++ }
++
++
++ /* The beginning of a group is represented by start_memory.
++ The arguments are the register number in the next byte, and the
++ number of groups inner to this one in the next. The text
++ matched within the group is recorded (in the internal
++ registers data structure) under the register number. */
++ case start_memory:
++ DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
++ (long int) *p, (long int) p[1]);
++
++ /* Find out if this group can match the empty string. */
++ p1 = p; /* To send to group_match_null_string_p. */
++
++ if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
++ REG_MATCH_NULL_STRING_P (reg_info[*p])
++ = PREFIX(group_match_null_string_p) (&p1, pend, reg_info);
++
++ /* Save the position in the string where we were the last time
++ we were at this open-group operator in case the group is
++ operated upon by a repetition operator, e.g., with `(a*)*b'
++ against `ab'; then we want to ignore where we are now in
++ the string in case this attempt to match fails. */
++ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
++ ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
++ : regstart[*p];
++ DEBUG_PRINT2 (" old_regstart: %d\n",
++ POINTER_TO_OFFSET (old_regstart[*p]));
++
++ regstart[*p] = d;
++ DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
++
++ IS_ACTIVE (reg_info[*p]) = 1;
++ MATCHED_SOMETHING (reg_info[*p]) = 0;
++
++ /* Clear this whenever we change the register activity status. */
++ set_regs_matched_done = 0;
++
++ /* This is the new highest active register. */
++ highest_active_reg = *p;
++
++ /* If nothing was active before, this is the new lowest active
++ register. */
++ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
++ lowest_active_reg = *p;
++
++ /* Move past the register number and inner group count. */
++ p += 2;
++ just_past_start_mem = p;
++
++ break;
++
++
++ /* The stop_memory opcode represents the end of a group. Its
++ arguments are the same as start_memory's: the register
++ number, and the number of inner groups. */
++ case stop_memory:
++ DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
++ (long int) *p, (long int) p[1]);
++
++ /* We need to save the string position the last time we were at
++ this close-group operator in case the group is operated
++ upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
++ against `aba'; then we want to ignore where we are now in
++ the string in case this attempt to match fails. */
++ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
++ ? REG_UNSET (regend[*p]) ? d : regend[*p]
++ : regend[*p];
++ DEBUG_PRINT2 (" old_regend: %d\n",
++ POINTER_TO_OFFSET (old_regend[*p]));
++
++ regend[*p] = d;
++ DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
++
++ /* This register isn't active anymore. */
++ IS_ACTIVE (reg_info[*p]) = 0;
++
++ /* Clear this whenever we change the register activity status. */
++ set_regs_matched_done = 0;
++
++ /* If this was the only register active, nothing is active
++ anymore. */
++ if (lowest_active_reg == highest_active_reg)
++ {
++ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++ }
++ else
++ { /* We must scan for the new highest active register, since
++ it isn't necessarily one less than now: consider
++ (a(b)c(d(e)f)g). When group 3 ends, after the f), the
++ new highest active register is 1. */
++ UCHAR_T r = *p - 1;
++ while (r > 0 && !IS_ACTIVE (reg_info[r]))
++ r--;
++
++ /* If we end up at register zero, that means that we saved
++ the registers as the result of an `on_failure_jump', not
++ a `start_memory', and we jumped to past the innermost
++ `stop_memory'. For example, in ((.)*) we save
++ registers 1 and 2 as a result of the *, but when we pop
++ back to the second ), we are at the stop_memory 1.
++ Thus, nothing is active. */
++ if (r == 0)
++ {
++ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
++ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
++ }
++ else
++ highest_active_reg = r;
++ }
++
++ /* If just failed to match something this time around with a
++ group that's operated on by a repetition operator, try to
++ force exit from the ``loop'', and restore the register
++ information for this group that we had before trying this
++ last match. */
++ if ((!MATCHED_SOMETHING (reg_info[*p])
++ || just_past_start_mem == p - 1)
++ && (p + 2) < pend)
++ {
++ boolean is_a_jump_n = false;
++
++ p1 = p + 2;
++ mcnt = 0;
++ switch ((re_opcode_t) *p1++)
++ {
++ case jump_n:
++ is_a_jump_n = true;
++ case pop_failure_jump:
++ case maybe_pop_jump:
++ case jump:
++ case dummy_failure_jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if (is_a_jump_n)
++ p1 += OFFSET_ADDRESS_SIZE;
++ break;
++
++ default:
++ /* do nothing */ ;
++ }
++ p1 += mcnt;
++
++ /* If the next operation is a jump backwards in the pattern
++ to an on_failure_jump right before the start_memory
++ corresponding to this stop_memory, exit from the loop
++ by forcing a failure after pushing on the stack the
++ on_failure_jump's jump in the pattern, and d. */
++ if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
++ && (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == start_memory
++ && p1[2+OFFSET_ADDRESS_SIZE] == *p)
++ {
++ /* If this group ever matched anything, then restore
++ what its registers were before trying this last
++ failed match, e.g., with `(a*)*b' against `ab' for
++ regstart[1], and, e.g., with `((a*)*(b*)*)*'
++ against `aba' for regend[3].
++
++ Also restore the registers for inner groups for,
++ e.g., `((a*)(b*))*' against `aba' (register 3 would
++ otherwise get trashed). */
++
++ if (EVER_MATCHED_SOMETHING (reg_info[*p]))
++ {
++ unsigned r;
++
++ EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
++
++ /* Restore this and inner groups' (if any) registers. */
++ for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
++ r++)
++ {
++ regstart[r] = old_regstart[r];
++
++ /* xx why this test? */
++ if (old_regend[r] >= regstart[r])
++ regend[r] = old_regend[r];
++ }
++ }
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
++
++ goto fail;
++ }
++ }
++
++ /* Move past the register number and the inner group count. */
++ p += 2;
++ break;
++
++
++ /* \<digit> has been turned into a `duplicate' command which is
++ followed by the numeric value of <digit> as the register number. */
++ case duplicate:
++ {
++ register const CHAR_T *d2, *dend2;
++ int regno = *p++; /* Get which register to match against. */
++ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
++
++ /* Can't back reference a group which we've never matched. */
++ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
++ goto fail;
++
++ /* Where in input to try to start matching. */
++ d2 = regstart[regno];
++
++ /* Where to stop matching; if both the place to start and
++ the place to stop matching are in the same string, then
++ set to the place to stop, otherwise, for now have to use
++ the end of the first string. */
++
++ dend2 = ((FIRST_STRING_P (regstart[regno])
++ == FIRST_STRING_P (regend[regno]))
++ ? regend[regno] : end_match_1);
++ for (;;)
++ {
++ /* If necessary, advance to next segment in register
++ contents. */
++ while (d2 == dend2)
++ {
++ if (dend2 == end_match_2) break;
++ if (dend2 == regend[regno]) break;
++
++ /* End of string1 => advance to string2. */
++ d2 = string2;
++ dend2 = regend[regno];
++ }
++ /* At end of register contents => success */
++ if (d2 == dend2) break;
++
++ /* If necessary, advance to next segment in data. */
++ PREFETCH ();
++
++ /* How many characters left in this segment to match. */
++ mcnt = dend - d;
++
++ /* Want how many consecutive characters we can match in
++ one shot, so, if necessary, adjust the count. */
++ if (mcnt > dend2 - d2)
++ mcnt = dend2 - d2;
++
++ /* Compare that many; failure if mismatch, else move
++ past them. */
++ if (translate
++ ? PREFIX(bcmp_translate) (d, d2, mcnt, translate)
++ : memcmp (d, d2, mcnt*sizeof(UCHAR_T)))
++ goto fail;
++ d += mcnt, d2 += mcnt;
++
++ /* Do this because we've match some characters. */
++ SET_REGS_MATCHED ();
++ }
++ }
++ break;
++
++
++ /* begline matches the empty string at the beginning of the string
++ (unless `not_bol' is set in `bufp'), and, if
++ `newline_anchor' is set, after newlines. */
++ case begline:
++ DEBUG_PRINT1 ("EXECUTING begline.\n");
++
++ if (AT_STRINGS_BEG (d))
++ {
++ if (!bufp->not_bol) break;
++ }
++ else if (d[-1] == '\n' && bufp->newline_anchor)
++ {
++ break;
++ }
++ /* In all other cases, we fail. */
++ goto fail;
++
++
++ /* endline is the dual of begline. */
++ case endline:
++ DEBUG_PRINT1 ("EXECUTING endline.\n");
++
++ if (AT_STRINGS_END (d))
++ {
++ if (!bufp->not_eol) break;
++ }
++
++ /* We have to ``prefetch'' the next character. */
++ else if ((d == end1 ? *string2 : *d) == '\n'
++ && bufp->newline_anchor)
++ {
++ break;
++ }
++ goto fail;
++
++
++ /* Match at the very beginning of the data. */
++ case begbuf:
++ DEBUG_PRINT1 ("EXECUTING begbuf.\n");
++ if (AT_STRINGS_BEG (d))
++ break;
++ goto fail;
++
++
++ /* Match at the very end of the data. */
++ case endbuf:
++ DEBUG_PRINT1 ("EXECUTING endbuf.\n");
++ if (AT_STRINGS_END (d))
++ break;
++ goto fail;
++
++
++ /* on_failure_keep_string_jump is used to optimize `.*\n'. It
++ pushes NULL as the value for the string on the stack. Then
++ `pop_failure_point' will keep the current value for the
++ string, instead of restoring it. To see why, consider
++ matching `foo\nbar' against `.*\n'. The .* matches the foo;
++ then the . fails against the \n. But the next thing we want
++ to do is match the \n against the \n; if we restored the
++ string value, we would be back at the foo.
++
++ Because this is used only in specific cases, we don't need to
++ check all the things that `on_failure_jump' does, to make
++ sure the right things get saved on the stack. Hence we don't
++ share its code. The only reason to push anything on the
++ stack at all is that otherwise we would have to change
++ `anychar's code to do something besides goto fail in this
++ case; that seems worse than this. */
++ case on_failure_keep_string_jump:
++ DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
++#else
++ DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
++#endif
++
++ PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
++ break;
++
++
++ /* Uses of on_failure_jump:
++
++ Each alternative starts with an on_failure_jump that points
++ to the beginning of the next alternative. Each alternative
++ except the last ends with a jump that in effect jumps past
++ the rest of the alternatives. (They really jump to the
++ ending jump of the following alternative, because tensioning
++ these jumps is a hassle.)
++
++ Repeats start with an on_failure_jump that points past both
++ the repetition text and either the following jump or
++ pop_failure_jump back to this on_failure_jump. */
++ case on_failure_jump:
++ on_failure:
++ DEBUG_PRINT1 ("EXECUTING on_failure_jump");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
++#else
++ DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
++#endif
++
++ /* If this on_failure_jump comes right before a group (i.e.,
++ the original * applied to a group), save the information
++ for that group and all inner ones, so that if we fail back
++ to this point, the group's information will be correct.
++ For example, in \(a*\)*\1, we need the preceding group,
++ and in \(zz\(a*\)b*\)\2, we need the inner group. */
++
++ /* We can't use `p' to check ahead because we push
++ a failure point to `p + mcnt' after we do this. */
++ p1 = p;
++
++ /* We need to skip no_op's before we look for the
++ start_memory in case this on_failure_jump is happening as
++ the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
++ against aba. */
++ while (p1 < pend && (re_opcode_t) *p1 == no_op)
++ p1++;
++
++ if (p1 < pend && (re_opcode_t) *p1 == start_memory)
++ {
++ /* We have a new highest active register now. This will
++ get reset at the start_memory we are about to get to,
++ but we will have saved all the registers relevant to
++ this repetition op, as described above. */
++ highest_active_reg = *(p1 + 1) + *(p1 + 2);
++ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
++ lowest_active_reg = *(p1 + 1);
++ }
++
++ DEBUG_PRINT1 (":\n");
++ PUSH_FAILURE_POINT (p + mcnt, d, -2);
++ break;
++
++
++ /* A smart repeat ends with `maybe_pop_jump'.
++ We change it to either `pop_failure_jump' or `jump'. */
++ case maybe_pop_jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++ DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
++ {
++ register UCHAR_T *p2 = p;
++
++ /* Compare the beginning of the repeat with what in the
++ pattern follows its end. If we can establish that there
++ is nothing that they would both match, i.e., that we
++ would have to backtrack because of (as in, e.g., `a*a')
++ then we can change to pop_failure_jump, because we'll
++ never have to backtrack.
++
++ This is not true in the case of alternatives: in
++ `(a|ab)*' we do need to backtrack to the `ab' alternative
++ (e.g., if the string was `ab'). But instead of trying to
++ detect that here, the alternative has put on a dummy
++ failure point which is what we will end up popping. */
++
++ /* Skip over open/close-group commands.
++ If what follows this loop is a ...+ construct,
++ look at what begins its body, since we will have to
++ match at least one of that. */
++ while (1)
++ {
++ if (p2 + 2 < pend
++ && ((re_opcode_t) *p2 == stop_memory
++ || (re_opcode_t) *p2 == start_memory))
++ p2 += 3;
++ else if (p2 + 2 + 2 * OFFSET_ADDRESS_SIZE < pend
++ && (re_opcode_t) *p2 == dummy_failure_jump)
++ p2 += 2 + 2 * OFFSET_ADDRESS_SIZE;
++ else
++ break;
++ }
++
++ p1 = p + mcnt;
++ /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
++ to the `maybe_finalize_jump' of this case. Examine what
++ follows. */
++
++ /* If we're at the end of the pattern, we can change. */
++ if (p2 == pend)
++ {
++ /* Consider what happens when matching ":\(.*\)"
++ against ":/". I don't really understand this code
++ yet. */
++ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
++ pop_failure_jump;
++ DEBUG_PRINT1
++ (" End of pattern: change to `pop_failure_jump'.\n");
++ }
++
++ else if ((re_opcode_t) *p2 == exactn
++#ifdef MBS_SUPPORT
++ || (re_opcode_t) *p2 == exactn_bin
++#endif
++ || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
++ {
++ register UCHAR_T c
++ = *p2 == (UCHAR_T) endline ? '\n' : p2[2];
++
++ if (((re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn
++#ifdef MBS_SUPPORT
++ || (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn_bin
++#endif
++ ) && p1[3+OFFSET_ADDRESS_SIZE] != c)
++ {
++ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
++ pop_failure_jump;
++#ifdef WCHAR
++ DEBUG_PRINT3 (" %C != %C => pop_failure_jump.\n",
++ (wint_t) c,
++ (wint_t) p1[3+OFFSET_ADDRESS_SIZE]);
++#else
++ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
++ (char) c,
++ (char) p1[3+OFFSET_ADDRESS_SIZE]);
++#endif
++ }
++
++#ifndef WCHAR
++ else if ((re_opcode_t) p1[3] == charset
++ || (re_opcode_t) p1[3] == charset_not)
++ {
++ int negate = (re_opcode_t) p1[3] == charset_not;
++
++ if (c < (unsigned) (p1[4] * BYTEWIDTH)
++ && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
++ negate = !negate;
++
++ /* `negate' is equal to 1 if c would match, which means
++ that we can't change to pop_failure_jump. */
++ if (!negate)
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++#endif /* not WCHAR */
++ }
++#ifndef WCHAR
++ else if ((re_opcode_t) *p2 == charset)
++ {
++ /* We win if the first character of the loop is not part
++ of the charset. */
++ if ((re_opcode_t) p1[3] == exactn
++ && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
++ && (p2[2 + p1[5] / BYTEWIDTH]
++ & (1 << (p1[5] % BYTEWIDTH)))))
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++
++ else if ((re_opcode_t) p1[3] == charset_not)
++ {
++ int idx;
++ /* We win if the charset_not inside the loop
++ lists every character listed in the charset after. */
++ for (idx = 0; idx < (int) p2[1]; idx++)
++ if (! (p2[2 + idx] == 0
++ || (idx < (int) p1[4]
++ && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
++ break;
++
++ if (idx == p2[1])
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++ else if ((re_opcode_t) p1[3] == charset)
++ {
++ int idx;
++ /* We win if the charset inside the loop
++ has no overlap with the one after the loop. */
++ for (idx = 0;
++ idx < (int) p2[1] && idx < (int) p1[4];
++ idx++)
++ if ((p2[2 + idx] & p1[5 + idx]) != 0)
++ break;
++
++ if (idx == p2[1] || idx == p1[4])
++ {
++ p[-3] = (unsigned char) pop_failure_jump;
++ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
++ }
++ }
++ }
++#endif /* not WCHAR */
++ }
++ p -= OFFSET_ADDRESS_SIZE; /* Point at relative address again. */
++ if ((re_opcode_t) p[-1] != pop_failure_jump)
++ {
++ p[-1] = (UCHAR_T) jump;
++ DEBUG_PRINT1 (" Match => jump.\n");
++ goto unconditional_jump;
++ }
++ /* Note fall through. */
++
++
++ /* The end of a simple repeat has a pop_failure_jump back to
++ its matching on_failure_jump, where the latter will push a
++ failure point. The pop_failure_jump takes off failure
++ points put on by this pop_failure_jump's matching
++ on_failure_jump; we got through the pattern to here from the
++ matching on_failure_jump, so didn't fail. */
++ case pop_failure_jump:
++ {
++ /* We need to pass separate storage for the lowest and
++ highest registers, even though we don't care about the
++ actual values. Otherwise, we will restore only one
++ register from the stack, since lowest will == highest in
++ `pop_failure_point'. */
++ active_reg_t dummy_low_reg, dummy_high_reg;
++ UCHAR_T *pdummy = NULL;
++ const CHAR_T *sdummy = NULL;
++
++ DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
++ POP_FAILURE_POINT (sdummy, pdummy,
++ dummy_low_reg, dummy_high_reg,
++ reg_dummy, reg_dummy, reg_info_dummy);
++ }
++ /* Note fall through. */
++
++ unconditional_jump:
++#ifdef _LIBC
++ DEBUG_PRINT2 ("\n%p: ", p);
++#else
++ DEBUG_PRINT2 ("\n0x%x: ", p);
++#endif
++ /* Note fall through. */
++
++ /* Unconditionally jump (without popping any failure points). */
++ case jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
++ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
++ p += mcnt; /* Do the jump. */
++#ifdef _LIBC
++ DEBUG_PRINT2 ("(to %p).\n", p);
++#else
++ DEBUG_PRINT2 ("(to 0x%x).\n", p);
++#endif
++ break;
++
++
++ /* We need this opcode so we can detect where alternatives end
++ in `group_match_null_string_p' et al. */
++ case jump_past_alt:
++ DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
++ goto unconditional_jump;
++
++
++ /* Normally, the on_failure_jump pushes a failure point, which
++ then gets popped at pop_failure_jump. We will end up at
++ pop_failure_jump, also, and with a pattern of, say, `a+', we
++ are skipping over the on_failure_jump, so we have to push
++ something meaningless for pop_failure_jump to pop. */
++ case dummy_failure_jump:
++ DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
++ /* It doesn't matter what we push for the string here. What
++ the code at `fail' tests is the value for the pattern. */
++ PUSH_FAILURE_POINT (NULL, NULL, -2);
++ goto unconditional_jump;
++
++
++ /* At the end of an alternative, we need to push a dummy failure
++ point in case we are followed by a `pop_failure_jump', because
++ we don't want the failure point for the alternative to be
++ popped. For example, matching `(a|ab)*' against `aab'
++ requires that we match the `ab' alternative. */
++ case push_dummy_failure:
++ DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
++ /* See comments just above at `dummy_failure_jump' about the
++ two zeroes. */
++ PUSH_FAILURE_POINT (NULL, NULL, -2);
++ break;
++
++ /* Have to succeed matching what follows at least n times.
++ After that, handle like `on_failure_jump'. */
++ case succeed_n:
++ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
++ DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
++
++ assert (mcnt >= 0);
++ /* Originally, this is how many times we HAVE to succeed. */
++ if (mcnt > 0)
++ {
++ mcnt--;
++ p += OFFSET_ADDRESS_SIZE;
++ STORE_NUMBER_AND_INCR (p, mcnt);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p - OFFSET_ADDRESS_SIZE
++ , mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - OFFSET_ADDRESS_SIZE
++ , mcnt);
++#endif
++ }
++ else if (mcnt == 0)
++ {
++#ifdef _LIBC
++ DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n",
++ p + OFFSET_ADDRESS_SIZE);
++#else
++ DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n",
++ p + OFFSET_ADDRESS_SIZE);
++#endif /* _LIBC */
++
++#ifdef WCHAR
++ p[1] = (UCHAR_T) no_op;
++#else
++ p[2] = (UCHAR_T) no_op;
++ p[3] = (UCHAR_T) no_op;
++#endif /* WCHAR */
++ goto on_failure;
++ }
++ break;
++
++ case jump_n:
++ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
++ DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
++
++ /* Originally, this is how many times we CAN jump. */
++ if (mcnt)
++ {
++ mcnt--;
++ STORE_NUMBER (p + OFFSET_ADDRESS_SIZE, mcnt);
++
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p + OFFSET_ADDRESS_SIZE,
++ mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + OFFSET_ADDRESS_SIZE,
++ mcnt);
++#endif /* _LIBC */
++ goto unconditional_jump;
++ }
++ /* If don't have to jump any more, skip over the rest of command. */
++ else
++ p += 2 * OFFSET_ADDRESS_SIZE;
++ break;
++
++ case set_number_at:
++ {
++ DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
++
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++ p1 = p + mcnt;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p);
++#ifdef _LIBC
++ DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
++#else
++ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
++#endif
++ STORE_NUMBER (p1, mcnt);
++ break;
++ }
++
++#if 0
++ /* The DEC Alpha C compiler 3.x generates incorrect code for the
++ test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
++ AT_WORD_BOUNDARY, so this code is disabled. Expanding the
++ macro and introducing temporary variables works around the bug. */
++
++ case wordbound:
++ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
++ if (AT_WORD_BOUNDARY (d))
++ break;
++ goto fail;
++
++ case notwordbound:
++ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
++ if (AT_WORD_BOUNDARY (d))
++ goto fail;
++ break;
++#else
++ case wordbound:
++ {
++ boolean prevchar, thischar;
++
++ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
++ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
++ break;
++
++ prevchar = WORDCHAR_P (d - 1);
++ thischar = WORDCHAR_P (d);
++ if (prevchar != thischar)
++ break;
++ goto fail;
++ }
++
++ case notwordbound:
++ {
++ boolean prevchar, thischar;
++
++ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
++ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
++ goto fail;
++
++ prevchar = WORDCHAR_P (d - 1);
++ thischar = WORDCHAR_P (d);
++ if (prevchar != thischar)
++ goto fail;
++ break;
++ }
++#endif
++
++ case wordbeg:
++ DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
++ if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
++ && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
++ break;
++ goto fail;
++
++ case wordend:
++ DEBUG_PRINT1 ("EXECUTING wordend.\n");
++ if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
++ && (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
++ break;
++ goto fail;
++
++#ifdef emacs
++ case before_dot:
++ DEBUG_PRINT1 ("EXECUTING before_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) >= point)
++ goto fail;
++ break;
++
++ case at_dot:
++ DEBUG_PRINT1 ("EXECUTING at_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) != point)
++ goto fail;
++ break;
++
++ case after_dot:
++ DEBUG_PRINT1 ("EXECUTING after_dot.\n");
++ if (PTR_CHAR_POS ((unsigned char *) d) <= point)
++ goto fail;
++ break;
++
++ case syntaxspec:
++ DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
++ mcnt = *p++;
++ goto matchsyntax;
++
++ case wordchar:
++ DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
++ mcnt = (int) Sword;
++ matchsyntax:
++ PREFETCH ();
++ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
++ d++;
++ if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
++ goto fail;
++ SET_REGS_MATCHED ();
++ break;
++
++ case notsyntaxspec:
++ DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
++ mcnt = *p++;
++ goto matchnotsyntax;
++
++ case notwordchar:
++ DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
++ mcnt = (int) Sword;
++ matchnotsyntax:
++ PREFETCH ();
++ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
++ d++;
++ if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
++ goto fail;
++ SET_REGS_MATCHED ();
++ break;
++
++#else /* not emacs */
++ case wordchar:
++ DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
++ PREFETCH ();
++ if (!WORDCHAR_P (d))
++ goto fail;
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++
++ case notwordchar:
++ DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
++ PREFETCH ();
++ if (WORDCHAR_P (d))
++ goto fail;
++ SET_REGS_MATCHED ();
++ d++;
++ break;
++#endif /* not emacs */
++
++ default:
++ abort ();
++ }
++ continue; /* Successfully executed one pattern command; keep going. */
++
++
++ /* We goto here if a matching operation fails. */
++ fail:
++ if (!FAIL_STACK_EMPTY ())
++ { /* A restart point is known. Restore to that state. */
++ DEBUG_PRINT1 ("\nFAIL:\n");
++ POP_FAILURE_POINT (d, p,
++ lowest_active_reg, highest_active_reg,
++ regstart, regend, reg_info);
++
++ /* If this failure point is a dummy, try the next one. */
++ if (!p)
++ goto fail;
++
++ /* If we failed to the end of the pattern, don't examine *p. */
++ assert (p <= pend);
++ if (p < pend)
++ {
++ boolean is_a_jump_n = false;
++
++ /* If failed to a backwards jump that's part of a repetition
++ loop, need to pop this failure point and use the next one. */
++ switch ((re_opcode_t) *p)
++ {
++ case jump_n:
++ is_a_jump_n = true;
++ case maybe_pop_jump:
++ case pop_failure_jump:
++ case jump:
++ p1 = p + 1;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++
++ if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
++ || (!is_a_jump_n
++ && (re_opcode_t) *p1 == on_failure_jump))
++ goto fail;
++ break;
++ default:
++ /* do nothing */ ;
++ }
++ }
++
++ if (d >= string1 && d <= end1)
++ dend = end_match_1;
++ }
++ else
++ break; /* Matching at this starting point really fails. */
++ } /* for (;;) */
++
++ if (best_regs_set)
++ goto restore_best_regs;
++
++ FREE_VARIABLES ();
++
++ return -1; /* Failure to match. */
++} /* re_match_2 */
++
++/* Subroutine definitions for re_match_2. */
++
++
++/* We are passed P pointing to a register number after a start_memory.
++
++ Return true if the pattern up to the corresponding stop_memory can
++ match the empty string, and false otherwise.
++
++ If we find the matching stop_memory, sets P to point to one past its number.
++ Otherwise, sets P to an undefined byte less than or equal to END.
++
++ We don't handle duplicates properly (yet). */
++
++static boolean
++PREFIX(group_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ /* Point to after the args to the start_memory. */
++ UCHAR_T *p1 = *p + 2;
++
++ while (p1 < end)
++ {
++ /* Skip over opcodes that can match nothing, and return true or
++ false, as appropriate, when we get to one that can't, or to the
++ matching stop_memory. */
++
++ switch ((re_opcode_t) *p1)
++ {
++ /* Could be either a loop or a series of alternatives. */
++ case on_failure_jump:
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++
++ /* If the next operation is not a jump backwards in the
++ pattern. */
++
++ if (mcnt >= 0)
++ {
++ /* Go through the on_failure_jumps of the alternatives,
++ seeing if any of the alternatives cannot match nothing.
++ The last alternative starts with only a jump,
++ whereas the rest start with on_failure_jump and end
++ with a jump, e.g., here is the pattern for `a|b|c':
++
++ /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
++ /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
++ /exactn/1/c
++
++ So, we have to first go through the first (n-1)
++ alternatives and then deal with the last one separately. */
++
++
++ /* Deal with the first (n-1) alternatives, which start
++ with an on_failure_jump (see above) that jumps to right
++ past a jump_past_alt. */
++
++ while ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] ==
++ jump_past_alt)
++ {
++ /* `mcnt' holds how many bytes long the alternative
++ is, including the ending `jump_past_alt' and
++ its number. */
++
++ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt -
++ (1 + OFFSET_ADDRESS_SIZE),
++ reg_info))
++ return false;
++
++ /* Move to right after this alternative, including the
++ jump_past_alt. */
++ p1 += mcnt;
++
++ /* Break if it's the beginning of an n-th alternative
++ that doesn't begin with an on_failure_jump. */
++ if ((re_opcode_t) *p1 != on_failure_jump)
++ break;
++
++ /* Still have to check that it's not an n-th
++ alternative that starts with an on_failure_jump. */
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] !=
++ jump_past_alt)
++ {
++ /* Get to the beginning of the n-th alternative. */
++ p1 -= 1 + OFFSET_ADDRESS_SIZE;
++ break;
++ }
++ }
++
++ /* Deal with the last alternative: go back and get number
++ of the `jump_past_alt' just before it. `mcnt' contains
++ the length of the alternative. */
++ EXTRACT_NUMBER (mcnt, p1 - OFFSET_ADDRESS_SIZE);
++
++ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt, reg_info))
++ return false;
++
++ p1 += mcnt; /* Get past the n-th alternative. */
++ } /* if mcnt > 0 */
++ break;
++
++
++ case stop_memory:
++ assert (p1[1] == **p);
++ *p = p1 + 2;
++ return true;
++
++
++ default:
++ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
++ return false;
++ }
++ } /* while p1 < end */
++
++ return false;
++} /* group_match_null_string_p */
++
++
++/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
++ It expects P to be the first byte of a single alternative and END one
++ byte past the last. The alternative can contain groups. */
++
++static boolean
++PREFIX(alt_match_null_string_p) (UCHAR_T *p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ UCHAR_T *p1 = p;
++
++ while (p1 < end)
++ {
++ /* Skip over opcodes that can match nothing, and break when we get
++ to one that can't. */
++
++ switch ((re_opcode_t) *p1)
++ {
++ /* It's a loop. */
++ case on_failure_jump:
++ p1++;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++ break;
++
++ default:
++ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
++ return false;
++ }
++ } /* while p1 < end */
++
++ return true;
++} /* alt_match_null_string_p */
++
++
++/* Deals with the ops common to group_match_null_string_p and
++ alt_match_null_string_p.
++
++ Sets P to one after the op and its arguments, if any. */
++
++static boolean
++PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
++ PREFIX(register_info_type) *reg_info)
++{
++ int mcnt;
++ boolean ret;
++ int reg_no;
++ UCHAR_T *p1 = *p;
++
++ switch ((re_opcode_t) *p1++)
++ {
++ case no_op:
++ case begline:
++ case endline:
++ case begbuf:
++ case endbuf:
++ case wordbeg:
++ case wordend:
++ case wordbound:
++ case notwordbound:
++#ifdef emacs
++ case before_dot:
++ case at_dot:
++ case after_dot:
++#endif
++ break;
++
++ case start_memory:
++ reg_no = *p1;
++ assert (reg_no > 0 && reg_no <= MAX_REGNUM);
++ ret = PREFIX(group_match_null_string_p) (&p1, end, reg_info);
++
++ /* Have to set this here in case we're checking a group which
++ contains a group and a back reference to it. */
++
++ if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
++ REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
++
++ if (!ret)
++ return false;
++ break;
++
++ /* If this is an optimized succeed_n for zero times, make the jump. */
++ case jump:
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ if (mcnt >= 0)
++ p1 += mcnt;
++ else
++ return false;
++ break;
++
++ case succeed_n:
++ /* Get to the number of times to succeed. */
++ p1 += OFFSET_ADDRESS_SIZE;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++
++ if (mcnt == 0)
++ {
++ p1 -= 2 * OFFSET_ADDRESS_SIZE;
++ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
++ p1 += mcnt;
++ }
++ else
++ return false;
++ break;
++
++ case duplicate:
++ if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
++ return false;
++ break;
++
++ case set_number_at:
++ p1 += 2 * OFFSET_ADDRESS_SIZE;
++
++ default:
++ /* All other opcodes mean we cannot match the empty string. */
++ return false;
++ }
++
++ *p = p1;
++ return true;
++} /* common_op_match_null_string_p */
++
++
++/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
++ bytes; nonzero otherwise. */
++
++static int
++PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
++ RE_TRANSLATE_TYPE translate)
++{
++ register const UCHAR_T *p1 = (const UCHAR_T *) s1;
++ register const UCHAR_T *p2 = (const UCHAR_T *) s2;
++ while (len)
++ {
++#ifdef WCHAR
++ if (((*p1<=0xff)?translate[*p1++]:*p1++)
++ != ((*p2<=0xff)?translate[*p2++]:*p2++))
++ return 1;
++#else /* BYTE */
++ if (translate[*p1++] != translate[*p2++]) return 1;
++#endif /* WCHAR */
++ len--;
++ }
++ return 0;
++}
++
++
++#else /* not INSIDE_RECURSION */
++
++/* Entry points for GNU code. */
++
++/* re_compile_pattern is the GNU regular expression compiler: it
++ compiles PATTERN (of length SIZE) and puts the result in BUFP.
++ Returns 0 if the pattern was valid, otherwise an error string.
++
++ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
++ are set in BUFP on entry.
++
++ We call regex_compile to do the actual compilation. */
++
++const char *
++re_compile_pattern (const char *pattern, size_t length,
++ struct re_pattern_buffer *bufp)
++{
++ reg_errcode_t ret;
++
++ /* GNU code is written to assume at least RE_NREGS registers will be set
++ (and at least one extra will be -1). */
++ bufp->regs_allocated = REGS_UNALLOCATED;
++
++ /* And GNU code determines whether or not to get register information
++ by passing null for the REGS argument to re_match, etc., not by
++ setting no_sub. */
++ bufp->no_sub = 0;
++
++ /* Match anchors at newline. */
++ bufp->newline_anchor = 1;
++
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
++ else
++# endif
++ ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);
++
++ if (!ret)
++ return NULL;
++ return gettext (re_error_msgid[(int) ret]);
++}
++#ifdef _LIBC
++weak_alias (__re_compile_pattern, re_compile_pattern)
++#endif
++
++/* Entry points compatible with 4.2 BSD regex library. We don't define
++ them unless specifically requested. */
++
++#if defined _REGEX_RE_COMP || defined _LIBC
++
++/* BSD has one and only one pattern buffer. */
++static struct re_pattern_buffer re_comp_buf;
++
++char *
++#ifdef _LIBC
++/* Make these definitions weak in libc, so POSIX programs can redefine
++ these names if they don't use our functions, and still use
++ regcomp/regexec below without link errors. */
++weak_function
++#endif
++re_comp (const char *s)
++{
++ reg_errcode_t ret;
++
++ if (!s)
++ {
++ if (!re_comp_buf.buffer)
++ return (char *) gettext ("No previous regular expression");
++ return 0;
++ }
++
++ if (!re_comp_buf.buffer)
++ {
++ re_comp_buf.buffer = (unsigned char *) malloc (200);
++ if (re_comp_buf.buffer == NULL)
++ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
++ re_comp_buf.allocated = 200;
++
++ re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
++ if (re_comp_buf.fastmap == NULL)
++ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
++ }
++
++ /* Since `re_exec' always passes NULL for the `regs' argument, we
++ don't need to initialize the pattern buffer fields which affect it. */
++
++ /* Match anchors at newlines. */
++ re_comp_buf.newline_anchor = 1;
++
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
++ else
++# endif
++ ret = byte_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
++
++ if (!ret)
++ return NULL;
++
++ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
++ return (char *) gettext (re_error_msgid[(int) ret]);
++}
++
++
++int
++#ifdef _LIBC
++weak_function
++#endif
++re_exec (const char *s)
++{
++ const int len = strlen (s);
++ return
++ 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
++}
++
++#endif /* _REGEX_RE_COMP */
++
++/* POSIX.2 functions. Don't define these for Emacs. */
++
++#ifndef emacs
++
++/* regcomp takes a regular expression as a string and compiles it.
++
++ PREG is a regex_t *. We do not expect any fields to be initialized,
++ since POSIX says we shouldn't. Thus, we set
++
++ `buffer' to the compiled pattern;
++ `used' to the length of the compiled pattern;
++ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
++ REG_EXTENDED bit in CFLAGS is set; otherwise, to
++ RE_SYNTAX_POSIX_BASIC;
++ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
++ `fastmap' to an allocated space for the fastmap;
++ `fastmap_accurate' to zero;
++ `re_nsub' to the number of subexpressions in PATTERN.
++
++ PATTERN is the address of the pattern string.
++
++ CFLAGS is a series of bits which affect compilation.
++
++ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
++ use POSIX basic syntax.
++
++ If REG_NEWLINE is set, then . and [^...] don't match newline.
++ Also, regexec will try a match beginning after every newline.
++
++ If REG_ICASE is set, then we considers upper- and lowercase
++ versions of letters to be equivalent when matching.
++
++ If REG_NOSUB is set, then when PREG is passed to regexec, that
++ routine will report only success or failure, and nothing about the
++ registers.
++
++ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
++ the return codes and their meanings.) */
++
++int
++regcomp (regex_t *preg, const char *pattern, int cflags)
++{
++ reg_errcode_t ret;
++ reg_syntax_t syntax
++ = (cflags & REG_EXTENDED) ?
++ RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
++
++ /* regex_compile will allocate the space for the compiled pattern. */
++ preg->buffer = 0;
++ preg->allocated = 0;
++ preg->used = 0;
++
++ /* Try to allocate space for the fastmap. */
++ preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
++
++ if (cflags & REG_ICASE)
++ {
++ int i;
++
++ preg->translate
++ = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
++ * sizeof (*(RE_TRANSLATE_TYPE)0));
++ if (preg->translate == NULL)
++ return (int) REG_ESPACE;
++
++ /* Map uppercase characters to corresponding lowercase ones. */
++ for (i = 0; i < CHAR_SET_SIZE; i++)
++ preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
++ }
++ else
++ preg->translate = NULL;
++
++ /* If REG_NEWLINE is set, newlines are treated differently. */
++ if (cflags & REG_NEWLINE)
++ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
++ syntax &= ~RE_DOT_NEWLINE;
++ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
++ /* It also changes the matching behavior. */
++ preg->newline_anchor = 1;
++ }
++ else
++ preg->newline_anchor = 0;
++
++ preg->no_sub = !!(cflags & REG_NOSUB);
++
++ /* POSIX says a null character in the pattern terminates it, so we
++ can use strlen here in compiling the pattern. */
++# ifdef MBS_SUPPORT
++ if (MB_CUR_MAX != 1)
++ ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
++ else
++# endif
++ ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
++
++ /* POSIX doesn't distinguish between an unmatched open-group and an
++ unmatched close-group: both are REG_EPAREN. */
++ if (ret == REG_ERPAREN) ret = REG_EPAREN;
++
++ if (ret == REG_NOERROR && preg->fastmap)
++ {
++ /* Compute the fastmap now, since regexec cannot modify the pattern
++ buffer. */
++ if (re_compile_fastmap (preg) == -2)
++ {
++ /* Some error occurred while computing the fastmap, just forget
++ about it. */
++ free (preg->fastmap);
++ preg->fastmap = NULL;
++ }
++ }
++
++ return (int) ret;
++}
++#ifdef _LIBC
++weak_alias (__regcomp, regcomp)
++#endif
++
++
++/* regexec searches for a given pattern, specified by PREG, in the
++ string STRING.
++
++ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
++ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
++ least NMATCH elements, and we set them to the offsets of the
++ corresponding matched substrings.
++
++ EFLAGS specifies `execution flags' which affect matching: if
++ REG_NOTBOL is set, then ^ does not match at the beginning of the
++ string; if REG_NOTEOL is set, then $ does not match at the end.
++
++ We return 0 if we find a match and REG_NOMATCH if not. */
++
++int
++regexec (const regex_t *preg, const char *string, size_t nmatch,
++ regmatch_t pmatch[], int eflags)
++{
++ int ret;
++ struct re_registers regs;
++ regex_t private_preg;
++ int len = strlen (string);
++ boolean want_reg_info = !preg->no_sub && nmatch > 0;
++
++ private_preg = *preg;
++
++ private_preg.not_bol = !!(eflags & REG_NOTBOL);
++ private_preg.not_eol = !!(eflags & REG_NOTEOL);
++
++ /* The user has told us exactly how many registers to return
++ information about, via `nmatch'. We have to pass that on to the
++ matching routines. */
++ private_preg.regs_allocated = REGS_FIXED;
++
++ if (want_reg_info)
++ {
++ regs.num_regs = nmatch;
++ regs.start = TALLOC (nmatch * 2, regoff_t);
++ if (regs.start == NULL)
++ return (int) REG_NOMATCH;
++ regs.end = regs.start + nmatch;
++ }
++
++ /* Perform the searching operation. */
++ ret = re_search (&private_preg, string, len,
++ /* start: */ 0, /* range: */ len,
++ want_reg_info ? &regs : (struct re_registers *) 0);
++
++ /* Copy the register information to the POSIX structure. */
++ if (want_reg_info)
++ {
++ if (ret >= 0)
++ {
++ unsigned r;
++
++ for (r = 0; r < nmatch; r++)
++ {
++ pmatch[r].rm_so = regs.start[r];
++ pmatch[r].rm_eo = regs.end[r];
++ }
++ }
++
++ /* If we needed the temporary register info, free the space now. */
++ free (regs.start);
++ }
++
++ /* We want zero return to mean success, unlike `re_search'. */
++ return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
++}
++#ifdef _LIBC
++/* EGLIBC: This is handled in regexec-compat.c. */
++/*weak_alias (__regexec, regexec)*/
++#include "regexec-compat.c"
++#endif
++
++
++/* Returns a message corresponding to an error code, ERRCODE, returned
++ from either regcomp or regexec. We don't use PREG here. */
++
++size_t
++regerror (int errcode, const regex_t *preg __attribute__ ((unused)),
++ char *errbuf, size_t errbuf_size)
++{
++ const char *msg;
++ size_t msg_size;
++
++ if (errcode < 0
++ || errcode >= (int) (sizeof (re_error_msgid)
++ / sizeof (re_error_msgid[0])))
++ /* Only error codes returned by the rest of the code should be passed
++ to this routine. If we are given anything else, or if other regex
++ code generates an invalid error code, then the program has a bug.
++ Dump core so we can fix it. */
++ abort ();
++
++ msg = gettext (re_error_msgid[errcode]);
++
++ msg_size = strlen (msg) + 1; /* Includes the null. */
++
++ if (errbuf_size != 0)
++ {
++ if (msg_size > errbuf_size)
++ {
++#if defined HAVE_MEMPCPY || defined _LIBC
++ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
++#else
++ memcpy (errbuf, msg, errbuf_size - 1);
++ errbuf[errbuf_size - 1] = 0;
++#endif
++ }
++ else
++ memcpy (errbuf, msg, msg_size);
++ }
++
++ return msg_size;
++}
++#ifdef _LIBC
++weak_alias (__regerror, regerror)
++#endif
++
++
++/* Free dynamically allocated space used by PREG. */
++
++void
++regfree (regex_t *preg)
++{
++ if (preg->buffer != NULL)
++ free (preg->buffer);
++ preg->buffer = NULL;
++
++ preg->allocated = 0;
++ preg->used = 0;
++
++ if (preg->fastmap != NULL)
++ free (preg->fastmap);
++ preg->fastmap = NULL;
++ preg->fastmap_accurate = 0;
++
++ if (preg->translate != NULL)
++ free (preg->translate);
++ preg->translate = NULL;
++}
++#ifdef _LIBC
++weak_alias (__regfree, regfree)
++#endif
++
++#endif /* not emacs */
++
++#endif /* not INSIDE_RECURSION */
++
++
++#undef STORE_NUMBER
++#undef STORE_NUMBER_AND_INCR
++#undef EXTRACT_NUMBER
++#undef EXTRACT_NUMBER_AND_INCR
++
++#undef DEBUG_PRINT_COMPILED_PATTERN
++#undef DEBUG_PRINT_DOUBLE_STRING
++
++#undef INIT_FAIL_STACK
++#undef RESET_FAIL_STACK
++#undef DOUBLE_FAIL_STACK
++#undef PUSH_PATTERN_OP
++#undef PUSH_FAILURE_POINTER
++#undef PUSH_FAILURE_INT
++#undef PUSH_FAILURE_ELT
++#undef POP_FAILURE_POINTER
++#undef POP_FAILURE_INT
++#undef POP_FAILURE_ELT
++#undef DEBUG_PUSH
++#undef DEBUG_POP
++#undef PUSH_FAILURE_POINT
++#undef POP_FAILURE_POINT
++
++#undef REG_UNSET_VALUE
++#undef REG_UNSET
++
++#undef PATFETCH
++#undef PATFETCH_RAW
++#undef PATUNFETCH
++#undef TRANSLATE
++
++#undef INIT_BUF_SIZE
++#undef GET_BUFFER_SPACE
++#undef BUF_PUSH
++#undef BUF_PUSH_2
++#undef BUF_PUSH_3
++#undef STORE_JUMP
++#undef STORE_JUMP2
++#undef INSERT_JUMP
++#undef INSERT_JUMP2
++#undef EXTEND_BUFFER
++#undef GET_UNSIGNED_NUMBER
++#undef FREE_STACK_RETURN
++
++# undef POINTER_TO_OFFSET
++# undef MATCHING_IN_FRST_STRING
++# undef PREFETCH
++# undef AT_STRINGS_BEG
++# undef AT_STRINGS_END
++# undef WORDCHAR_P
++# undef FREE_VAR
++# undef FREE_VARIABLES
++# undef NO_HIGHEST_ACTIVE_REG
++# undef NO_LOWEST_ACTIVE_REG
++
++# undef CHAR_T
++# undef UCHAR_T
++# undef COMPILED_BUFFER_VAR
++# undef OFFSET_ADDRESS_SIZE
++# undef CHAR_CLASS_SIZE
++# undef PREFIX
++# undef ARG_PREFIX
++# undef PUT_CHAR
++# undef BYTE
++# undef WCHAR
++
++# define DEFINED_ONCE
+Index: git/pwd/Makefile
+===================================================================
+--- git.orig/pwd/Makefile 2014-08-29 20:00:53.316070587 -0700
++++ git/pwd/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for pwd portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := pwd
+
+ include ../Makeconfig
+Index: git/resolv/Makefile
+===================================================================
+--- git.orig/resolv/Makefile 2014-08-29 20:00:53.320070587 -0700
++++ git/resolv/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for resolv portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := resolv
+
+ include ../Makeconfig
+@@ -27,20 +29,21 @@
+ arpa/nameser.h arpa/nameser_compat.h \
+ sys/bitypes.h
+
+-routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
+- res_hconf res_libc res-state
++routines-$(OPTION_EGLIBC_INET) \
++ += herror inet_addr inet_ntop inet_pton nsap_addr res_init \
++ res_hconf res_libc res-state
+
+-tests = tst-aton tst-leaks tst-inet_ntop
+-xtests = tst-leaks2
++tests-$(OPTION_EGLIBC_INET) += tst-aton tst-leaks tst-inet_ntop
++xtests-$(OPTION_EGLIBC_INET) += tst-leaks2
+
+ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
+
+-extra-libs := libresolv libnss_dns
++extra-libs-$(OPTION_EGLIBC_INET) += libresolv libnss_dns
+ ifeq ($(have-thread-library),yes)
+-extra-libs += libanl
+-routines += gai_sigqueue
++extra-libs-$(OPTION_EGLIBC_INET_ANL) += libanl
++routines-$(OPTION_EGLIBC_INET) += gai_sigqueue
+ endif
+-extra-libs-others = $(extra-libs)
++extra-libs-others-y += $(extra-libs-y)
+ libresolv-routines := gethnamaddr res_comp res_debug \
+ res_data res_mkquery res_query res_send \
+ inet_net_ntop inet_net_pton inet_neta base64 \
+@@ -60,7 +63,7 @@
+ static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
+ endif
+
+-ifeq (yesyes,$(build-shared)$(have-thread-library))
++ifeq (yesyesy,$(build-shared)$(have-thread-library)$(OPTION_EGLIBC_INET_ANL))
+ tests: $(objpfx)ga_test
+ endif
+
+Index: git/stdio-common/fxprintf.c
+===================================================================
+--- git.orig/stdio-common/fxprintf.c 2014-08-29 20:00:53.544070587 -0700
++++ git/stdio-common/fxprintf.c 2014-08-29 20:01:15.232070587 -0700
+@@ -23,6 +23,7 @@
+ #include <wchar.h>
+ #include <string.h>
+ #include <libioP.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -37,6 +38,7 @@
+ int res;
+ if (_IO_fwide (fp, 0) > 0)
+ {
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ size_t len = strlen (fmt) + 1;
+ wchar_t wfmt[len];
+ for (size_t i = 0; i < len; ++i)
+@@ -45,6 +47,9 @@
+ wfmt[i] = fmt[i];
+ }
+ res = __vfwprintf (fp, wfmt, ap);
++#else
++ abort();
++#endif
+ }
+ else
+ res = _IO_vfprintf (fp, fmt, ap);
+Index: git/stdio-common/_i18n_number.h
+===================================================================
+--- git.orig/stdio-common/_i18n_number.h 2014-08-29 20:00:53.500070587 -0700
++++ git/stdio-common/_i18n_number.h 2014-08-29 20:01:15.232070587 -0700
+@@ -19,10 +19,13 @@
+ #include <stdbool.h>
+ #include <wchar.h>
+ #include <wctype.h>
++#include <gnu/option-groups.h>
+
+ #include "../locale/outdigits.h"
+ #include "../locale/outdigitswc.h"
+
++#if __OPTION_EGLIBC_LOCALE_CODE
++
+ static CHAR_T *
+ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
+ {
+@@ -115,3 +118,13 @@
+
+ return w;
+ }
++
++#else
++
++static CHAR_T *
++_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
++{
++ return w;
++}
++
++#endif
+Index: git/stdio-common/Makefile
+===================================================================
+--- git.orig/stdio-common/Makefile 2014-08-29 20:00:53.500070587 -0700
++++ git/stdio-common/Makefile 2014-08-29 20:01:15.232070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Specific makefile for stdio-common.
+ #
++include ../option-groups.mak
++
+ subdir := stdio-common
+
+ include ../Makeconfig
+@@ -30,7 +32,7 @@
+ vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \
+ reg-modifier reg-type \
+ printf_size fprintf printf snprintf sprintf asprintf dprintf \
+- vfwprintf vfscanf vfwscanf \
++ vfscanf \
+ fscanf scanf sscanf \
+ perror psignal \
+ tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname \
+@@ -41,23 +43,37 @@
+ isoc99_vsscanf \
+ psiginfo
+
+-aux := errlist siglist printf-parsemb printf-parsewc fxprintf
++# Ideally, _itowa and itowa-digits would be in this option group as
++# well, but it is used unconditionally by printf_fp and printf_fphex,
++# and it didn't seem straightforward to disentangle it.
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ vfwprintf vfwscanf
++
++aux := errlist siglist printf-parsemb fxprintf
++aux-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += printf-parsewc
+
+ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
+ temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
+ xbug errnobug \
+ bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 bug13 \
+- tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \
++ tfformat tiformat tllformat tstdiomisc tst-printfsz \
+ scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
+- scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
+- tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
+- tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \
++ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \
++ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \
++ tst-fseek tst-fmemopen tst-gets \
++ tst-sprintf tst-rndseek tst-fdopen tst-fphex \
+ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
+- tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
+- bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
+- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
+- bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \
+- bug25 tst-printf-round bug26
++ tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
++ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
++ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \
++ tst-printf-round bug26
++
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += bug18a tst-swscanf tst-wc-printf
+
+ test-srcs = tst-unbputc tst-printf
+
+Index: git/stdio-common/printf_fp.c
+===================================================================
+--- git.orig/stdio-common/printf_fp.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_fp.c 2014-08-29 20:01:15.232070587 -0700
+@@ -39,6 +39,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+ #include <stdbool.h>
+ #include <rounding-mode.h>
+
+@@ -148,6 +149,10 @@
+ wchar_t thousands_sep, int ngroups)
+ internal_function;
+
++/* Ideally, when OPTION_EGLIBC_LOCALE_CODE is disabled, this should do
++ all its work in ordinary characters, rather than doing it in wide
++ characters and then converting at the end. But that is a challenge
++ for another day. */
+
+ int
+ ___printf_fp (FILE *fp,
+@@ -206,7 +211,14 @@
+ mp_limb_t cy;
+
+ /* Nonzero if this is output on a wide character stream. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+
+ /* Buffer in which we produce the output. */
+ wchar_t *wbuffer = NULL;
+@@ -258,6 +270,7 @@
+
+
+ /* Figure out the decimal point character. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->extra == 0)
+ {
+ decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
+@@ -277,7 +290,13 @@
+ /* The decimal point character must not be zero. */
+ assert (*decimal != '\0');
+ assert (decimalwc != L'\0');
++#else
++ /* Hard-code values from 'C' locale. */
++ decimal = ".";
++ decimalwc = L'.';
++#endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->group)
+ {
+ if (info->extra == 0)
+@@ -321,6 +340,9 @@
+ }
+ else
+ grouping = NULL;
++#else
++ grouping = NULL;
++#endif
+
+ /* Fetch the argument value. */
+ #ifndef __NO_LONG_DOUBLE_MATH
+Index: git/stdio-common/printf_fphex.c
+===================================================================
+--- git.orig/stdio-common/printf_fphex.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_fphex.c 2014-08-29 20:01:15.232070587 -0700
+@@ -28,6 +28,7 @@
+ #include <_itoa.h>
+ #include <_itowa.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+ #include <stdbool.h>
+ #include <rounding-mode.h>
+
+@@ -139,10 +140,18 @@
+ int done = 0;
+
+ /* Nonzero if this is output on a wide character stream. */
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+
+
+ /* Figure out the decimal point character. */
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (info->extra == 0)
+ {
+ decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
+@@ -156,6 +165,10 @@
+ }
+ /* The decimal point character must never be zero. */
+ assert (*decimal != '\0' && decimalwc != L'\0');
++#else
++ decimal = ".";
++ decimalwc = L'.';
++#endif
+
+
+ /* Fetch the argument value. */
+Index: git/stdio-common/printf_size.c
+===================================================================
+--- git.orig/stdio-common/printf_size.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/printf_size.c 2014-08-29 20:01:15.232070587 -0700
+@@ -23,6 +23,7 @@
+ #include <math.h>
+ #include <printf.h>
+ #include <libioP.h>
++#include <gnu/option-groups.h>
+
+
+ /* This defines make it possible to use the same code for GNU C library and
+@@ -116,7 +117,14 @@
+
+ struct printf_info fp_info;
+ int done = 0;
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ int wide = info->wide;
++#else
++ /* This should never be called on a wide-oriented stream when
++ OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
++ be trusted to figure that out. */
++ const int wide = 0;
++#endif
+ int res;
+
+ /* Fetch the argument value. */
+Index: git/stdio-common/scanf14.c
+===================================================================
+--- git.orig/stdio-common/scanf14.c 2014-08-29 20:00:53.548070587 -0700
++++ git/stdio-common/scanf14.c 2014-08-29 20:01:15.232070587 -0700
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ #define FAIL() \
+ do { \
+@@ -36,6 +37,7 @@
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (sscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2)
+ FAIL ();
+ else
+@@ -45,6 +47,7 @@
+ memset (lsp, 'x', sizeof L"3.25");
+ free (lsp);
+ }
++#endif
+ if (sscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2)
+ FAIL ();
+ else
+Index: git/stdio-common/tstdiomisc.c
+===================================================================
+--- git.orig/stdio-common/tstdiomisc.c 2014-08-29 20:00:53.584070587 -0700
++++ git/stdio-common/tstdiomisc.c 2014-08-29 20:01:15.232070587 -0700
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ static int
+ t1 (void)
+@@ -125,6 +126,7 @@
+ printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
+ buf);
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G",
+ qnanval, qnanval, qnanval, qnanval,
+ qnanval, qnanval, qnanval, qnanval);
+@@ -162,6 +164,7 @@
+ result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
+ printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
+ wbuf);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ lqnanval = NAN;
+
+@@ -206,6 +209,7 @@
+ printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
+ buf);
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]),
+ L"%La %LA %Le %LE %Lf %LF %Lg %LG",
+ lqnanval, lqnanval, lqnanval, lqnanval,
+@@ -250,6 +254,7 @@
+ result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
+ printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
+ wbuf);
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ return result;
+ }
+Index: git/stdio-common/tst-popen.c
+===================================================================
+--- git.orig/stdio-common/tst-popen.c 2014-08-29 20:00:53.576070587 -0700
++++ git/stdio-common/tst-popen.c 2014-08-29 20:01:15.232070587 -0700
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <wchar.h>
++#include <gnu/option-groups.h>
+
+ static int
+ do_test (void)
+@@ -34,12 +35,14 @@
+ return 1;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ /* POSIX says that pipe streams are byte-oriented. */
+ if (fwide (f, 0) >= 0)
+ {
+ puts ("popen did not return byte-oriented stream");
+ result = 1;
+ }
++#endif
+
+ if (getline (&line, &len, f) != 5)
+ {
+Index: git/stdio-common/tst-sprintf.c
+===================================================================
+--- git.orig/stdio-common/tst-sprintf.c 2014-08-29 20:00:53.580070587 -0700
++++ git/stdio-common/tst-sprintf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <locale.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+
+ int
+@@ -10,12 +11,14 @@
+ char buf[100];
+ int result = 0;
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
+ if (sprintf (buf, "%.0ls", L"foo") != 0
+ || strlen (buf) != 0)
+ {
+ puts ("sprintf (buf, \"%.0ls\", L\"foo\") produced some output");
+ result = 1;
+ }
++#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
+
+ #define SIZE (1024*70000)
+ #define STR(x) #x
+Index: git/stdio-common/vfprintf.c
+===================================================================
+--- git.orig/stdio-common/vfprintf.c 2014-08-29 20:00:53.588070587 -0700
++++ git/stdio-common/vfprintf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -29,6 +29,7 @@
+ #include <_itoa.h>
+ #include <locale/localeinfo.h>
+ #include <stdio.h>
++#include <gnu/option-groups.h>
+
+ /* This code is shared between the standard stdio implementation found
+ in GNU C library and the libio implementation originally found in
+@@ -138,6 +139,18 @@
+ # define EOF WEOF
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define MULTIBYTE_SUPPORT (1)
++#else
++# define MULTIBYTE_SUPPORT (0)
++#endif
++
++#if __OPTION_EGLIBC_LOCALE_CODE
++# define LOCALE_SUPPORT (1)
++#else
++# define LOCALE_SUPPORT (0)
++#endif
++
+ #include "_i18n_number.h"
+
+ /* Include the shared code for parsing the format string. */
+@@ -1123,8 +1136,11 @@
+ # define process_string_arg(fspec) \
+ LABEL (form_character): \
+ /* Character. */ \
+- if (is_long) \
+- goto LABEL (form_wcharacter); \
++ if (is_long) \
++ { \
++ assert (MULTIBYTE_SUPPORT); \
++ goto LABEL (form_wcharacter); \
++ } \
+ --width; /* Account for the character itself. */ \
+ if (!left) \
+ PAD (' '); \
+@@ -1137,6 +1153,7 @@
+ break; \
+ \
+ LABEL (form_wcharacter): \
++ assert (MULTIBYTE_SUPPORT); \
+ { \
+ /* Wide character. */ \
+ char buf[MB_CUR_MAX]; \
+@@ -1203,6 +1220,7 @@
+ } \
+ else \
+ { \
++ assert (MULTIBYTE_SUPPORT); \
+ const wchar_t *s2 = (const wchar_t *) string; \
+ mbstate_t mbstate; \
+ \
+@@ -1403,7 +1421,9 @@
+ LABEL (flag_quote):
+ group = 1;
+
+- if (grouping == (const char *) -1)
++ if (! LOCALE_SUPPORT)
++ grouping = NULL;
++ else if (grouping == (const char *) -1)
+ {
+ #ifdef COMPILE_WPRINTF
+ thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
+@@ -1702,7 +1722,9 @@
+ free (workstart);
+ workstart = NULL;
+
+- if (grouping == (const char *) -1)
++ if (! LOCALE_SUPPORT)
++ grouping = NULL;
++ else if (grouping == (const char *) -1)
+ {
+ #ifdef COMPILE_WPRINTF
+ thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
+Index: git/stdio-common/vfscanf.c
+===================================================================
+--- git.orig/stdio-common/vfscanf.c 2014-08-29 20:00:53.588070587 -0700
++++ git/stdio-common/vfscanf.c 2014-08-29 20:01:15.236070587 -0700
+@@ -29,6 +29,7 @@
+ #include <wctype.h>
+ #include <bits/libc-lock.h>
+ #include <locale/localeinfo.h>
++#include <gnu/option-groups.h>
+
+ #ifdef __GNUC__
+ # define HAVE_LONGLONG
+@@ -133,6 +134,12 @@
+ # define WINT_T int
+ #endif
+
++#if __OPTION_POSIX_C_LANG_WIDE_CHAR
++# define MULTIBYTE_SUPPORT (1)
++#else
++# define MULTIBYTE_SUPPORT (0)
++#endif
++
+ #define encode_error() do { \
+ errval = 4; \
+ __set_errno (EILSEQ); \
+@@ -316,24 +323,35 @@
+ ARGCHECK (s, format);
+
+ {
+-#ifndef COMPILE_WSCANF
++#if __OPTION_EGLIBC_LOCALE_CODE && !defined (COMPILE_WSCANF)
+ struct __locale_data *const curnumeric = loc->__locales[LC_NUMERIC];
+ #endif
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Figure out the decimal point character. */
+-#ifdef COMPILE_WSCANF
++# ifdef COMPILE_WSCANF
+ decimal = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_DECIMAL_POINT_WC);
+-#else
++# else
+ decimal = curnumeric->values[_NL_ITEM_INDEX (DECIMAL_POINT)].string;
+-#endif
++# endif
+ /* Figure out the thousands separator character. */
+-#ifdef COMPILE_WSCANF
++# ifdef COMPILE_WSCANF
+ thousands = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_THOUSANDS_SEP_WC);
+-#else
++# else
+ thousands = curnumeric->values[_NL_ITEM_INDEX (THOUSANDS_SEP)].string;
+ if (*thousands == '\0')
+ thousands = NULL;
+-#endif
++# endif
++#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
++ /* Hard-code values from the C locale. */
++# ifdef COMPILE_WSCANF
++ decimal = L'.';
++ thousands = L'\0';
++# else
++ decimal = ".";
++ thousands = NULL;
++# endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+ }
+
+ /* Lock the stream. */
+@@ -385,6 +403,8 @@
+ #ifndef COMPILE_WSCANF
+ if (!isascii ((unsigned char) *f))
+ {
++ assert (MULTIBYTE_SUPPORT);
++
+ /* Non-ASCII, may be a multibyte. */
+ int len = __mbrlen (f, strlen (f), &state);
+ if (len > 0)
+@@ -830,6 +850,8 @@
+ }
+ /* FALLTHROUGH */
+ case L_('C'):
++ assert (MULTIBYTE_SUPPORT);
++
+ if (width == -1)
+ width = 1;
+
+@@ -1172,6 +1194,8 @@
+ /* FALLTHROUGH */
+
+ case L_('S'):
++ assert (MULTIBYTE_SUPPORT);
++
+ {
+ #ifndef COMPILE_WSCANF
+ mbstate_t cstate;
+@@ -1419,10 +1443,17 @@
+ const char *mbdigits[10];
+ const char *mbdigits_extended[10];
+ #endif
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* "to_inpunct" is a map from ASCII digits to their
+ equivalent in locale. This is defined for locales
+ which use an extra digits set. */
+ wctrans_t map = __wctrans ("to_inpunct");
++#else
++ /* This will always be the case when
++ OPTION_EGLIBC_LOCALE_CODE is disabled, but the
++ compiler can't figure that out. */
++ wctrans_t map = NULL;
++#endif
+ int n;
+
+ from_level = 0;
+@@ -2088,6 +2119,7 @@
+ --width;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ wctrans_t map;
+ if (__builtin_expect ((flags & I18N) != 0, 0)
+ /* Hexadecimal floats make no sense, fixing localized
+@@ -2304,6 +2336,7 @@
+ ;
+ #endif
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+
+ /* Have we read any character? If we try to read a number
+ in hexadecimal notation and we have read only the `0x'
+@@ -2343,7 +2376,10 @@
+
+ case L_('['): /* Character class. */
+ if (flags & LONG)
+- STRING_ARG (wstr, wchar_t, 100);
++ {
++ assert (MULTIBYTE_SUPPORT);
++ STRING_ARG (wstr, wchar_t, 100);
++ }
+ else
+ STRING_ARG (str, char, 100);
+
+@@ -2417,6 +2453,7 @@
+ if (flags & LONG)
+ {
+ size_t now = read_in;
++ assert (MULTIBYTE_SUPPORT);
+ #ifdef COMPILE_WSCANF
+ if (__glibc_unlikely (inchar () == WEOF))
+ input_error ();
+Index: git/stdlib/Makefile
+===================================================================
+--- git.orig/stdlib/Makefile 2014-08-29 20:00:53.588070587 -0700
++++ git/stdlib/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for stdlib routines
+ #
++include ../option-groups.mak
++
+ subdir := stdlib
+
+ include ../Makeconfig
+@@ -30,7 +32,7 @@
+ alloca.h fmtmsg.h \
+ bits/stdlib-bsearch.h
+
+-routines := \
++routines-y := \
+ atof atoi atol atoll \
+ abort \
+ bsearch qsort msort \
+@@ -39,7 +41,6 @@
+ quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \
+ abs labs llabs \
+ div ldiv lldiv \
+- mblen mbstowcs mbtowc wcstombs wctomb \
+ random random_r rand rand_r \
+ drand48 erand48 lrand48 nrand48 mrand48 jrand48 \
+ srand48 seed48 lcong48 \
+@@ -52,9 +53,18 @@
+ strtof_l strtod_l strtold_l \
+ system canonicalize \
+ a64l l64a \
+- rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
+- strtoimax strtoumax wcstoimax wcstoumax \
++ getsubopt xpg_basename \
++ strtoimax strtoumax \
+ getcontext setcontext makecontext swapcontext
++routines-$(OPTION_EGLIBC_LOCALE_CODE) += \
++ strfmon strfmon_l
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \
++ mblen mbstowcs mbtowc wcstombs wctomb \
++ wcstoimax wcstoumax
++ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP))
++routines-y += rpmatch
++endif
++routines-$(OPTION_EGLIBC_FMTMSG) += fmtmsg
+ aux = grouping groupingwc tens_in_limb
+
+ # These routines will be omitted from the libc shared object.
+@@ -62,20 +72,22 @@
+ # linked against when the shared library will be used.
+ static-only-routines = atexit at_quick_exit
+
+-test-srcs := tst-fmtmsg
+-tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
++test-srcs-$(OPTION_EGLIBC_FMTMSG) := tst-fmtmsg
++tests := tst-strtol tst-strtod testrand testsort testdiv \
+ test-canon test-canon2 tst-strtoll tst-environ \
+ tst-xpg-basename tst-random tst-random2 tst-bsearch \
+ tst-limits tst-rand48 bug-strtod tst-setcontext \
+- test-a64l tst-qsort tst-system testmb2 bug-strtod2 \
+- tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
+- tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \
+- tst-makecontext2 tst-strtod6 tst-unsetenv1 \
+- tst-makecontext3 bug-getcontext bug-fmtmsg1 \
++ test-a64l tst-qsort tst-system bug-strtod2 \
++ tst-atof1 tst-atof2 tst-strtod2 tst-rand48-2 \
++ tst-makecontext tst-qsort2 tst-makecontext2 tst-strtod6 \
++ tst-unsetenv1 tst-makecontext3 bug-getcontext bug-fmtmsg1 \
+ tst-secure-getenv tst-strtod-overflow tst-strtod-round \
+ tst-tininess tst-strtod-underflow tst-tls-atexit
+ tests-static := tst-secure-getenv
+-
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strtod3 tst-strtod4 tst-strtod5 testmb2
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += testmb
+ modules-names = tst-tls-atexit-lib
+
+ ifeq ($(build-shared),yes)
+@@ -115,8 +127,10 @@
+ tests-special += $(objpfx)isomac.out
+
+ ifeq ($(run-built-tests),yes)
++ifeq (y,$(OPTION_EGLIBC_FMTMSG))
+ tests-special += $(objpfx)tst-fmtmsg.out
+ endif
++endif
+
+ include ../Rules
+
+Index: git/stdlib/strtod_l.c
+===================================================================
+--- git.orig/stdlib/strtod_l.c 2014-08-29 20:00:53.648070587 -0700
++++ git/stdlib/strtod_l.c 2014-08-29 20:01:15.236070587 -0700
+@@ -17,6 +17,7 @@
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
++#include <gnu/option-groups.h>
+ #include <xlocale.h>
+
+ extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
+@@ -548,6 +549,7 @@
+ /* Used in several places. */
+ int cnt;
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ struct __locale_data *current = loc->__locales[LC_NUMERIC];
+
+ if (__glibc_unlikely (group))
+@@ -586,6 +588,17 @@
+ decimal_len = strlen (decimal);
+ assert (decimal_len > 0);
+ #endif
++#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
++ /* Hard-code values from the 'C' locale. */
++ grouping = NULL;
++#ifdef USE_WIDE_CHAR
++ decimal = L'.';
++# define decimal_len 1
++#else
++ decimal = ".";
++ decimal_len = 1;
++#endif
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+
+ /* Prepare number representation. */
+ exponent = 0;
+Index: git/stdlib/tst-strtod.c
+===================================================================
+--- git.orig/stdlib/tst-strtod.c 2014-08-29 20:00:53.700070587 -0700
++++ git/stdlib/tst-strtod.c 2014-08-29 20:01:15.236070587 -0700
+@@ -23,6 +23,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <math.h>
++#include <gnu/option-groups.h>
+
+ struct ltest
+ {
+@@ -176,7 +177,9 @@
+
+ status |= long_dbl ();
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ status |= locale_test ();
++#endif
+
+ return status ? EXIT_FAILURE : EXIT_SUCCESS;
+ }
+@@ -219,6 +222,7 @@
+ return 0;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Perform a few tests in a locale with thousands separators. */
+ static int
+ locale_test (void)
+@@ -276,3 +280,4 @@
+
+ return result;
+ }
++#endif /* __OPTION_EGLIBC_LOCALE_CODE */
+Index: git/streams/Makefile
+===================================================================
+--- git.orig/streams/Makefile 2014-08-29 20:00:53.712070587 -0700
++++ git/streams/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,11 +18,14 @@
+ #
+ # Makefile for streams.
+ #
++include ../option-groups.mak
++
+ subdir := streams
+
+ include ../Makeconfig
+
+ headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
+-routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
++routines-$(OPTION_EGLIBC_STREAMS) \
++ += isastream getmsg getpmsg putmsg putpmsg fattach fdetach
+
+ include ../Rules
+Index: git/string/Makefile
+===================================================================
+--- git.orig/string/Makefile 2014-08-29 20:00:53.716070587 -0700
++++ git/string/Makefile 2014-08-29 20:01:15.236070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for string portion of library.
+ #
++include ../option-groups.mak
++
+ subdir := string
+
+ include ../Makeconfig
+@@ -39,10 +41,12 @@
+ $(addprefix argz-,append count create ctsep next \
+ delete extract insert stringify \
+ addsep replace) \
+- envz basename \
++ basename \
+ strcoll_l strxfrm_l string-inlines memrchr \
+ xpg-strerror strerror_l
+
++routines-$(OPTION_EGLIBC_ENVZ) += envz
++
+ strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
+ stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
+ strlen strncmp strncpy strpbrk strrchr strspn memmem \
+@@ -51,10 +55,12 @@
+ tests := tester inl-tester noinl-tester testcopy test-ffs \
+ tst-strlen stratcliff tst-svc tst-inlcall \
+ bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
+- tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
++ tst-strtok tst-strfry \
+ bug-strtok1 $(addprefix test-,$(strop-tests)) \
+- bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
+- tst-strtok_r
++ tst-strxfrm2 tst-endian tst-svc2 tst-strtok_r
++tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strxfrm bug-strcoll1
+
+ xtests = tst-strcoll-overflow
+
+Index: git/string/strcoll_l.c
+===================================================================
+--- git.orig/string/strcoll_l.c 2014-08-29 20:00:53.744070587 -0700
++++ git/string/strcoll_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -25,6 +25,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+ #ifndef STRING_TYPE
+ # define STRING_TYPE char
+@@ -472,7 +473,11 @@
+ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ {
+ struct __locale_data *current = l->__locales[LC_COLLATE];
++#if __OPTION_EGLIBC_LOCALE_CODE
+ uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
++#else
++ const uint_fast32_t nrules = 0;
++#endif
+ /* We don't assign the following values right away since it might be
+ unnecessary in case there are no rules. */
+ const unsigned char *rulesets;
+Index: git/string/strerror_l.c
+===================================================================
+--- git.orig/string/strerror_l.c 2014-08-29 20:00:53.744070587 -0700
++++ git/string/strerror_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -21,6 +21,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+
+ static __thread char *last_value;
+@@ -29,10 +30,14 @@
+ static const char *
+ translate (const char *str, locale_t loc)
+ {
++#if __OPTION_EGLIBC_LOCALE_CODE
+ locale_t oldloc = __uselocale (loc);
+ const char *res = _(str);
+ __uselocale (oldloc);
+ return res;
++#else
++ return str;
++#endif
+ }
+
+
+Index: git/string/strxfrm_l.c
+===================================================================
+--- git.orig/string/strxfrm_l.c 2014-08-29 20:00:53.748070587 -0700
++++ git/string/strxfrm_l.c 2014-08-29 20:01:15.240070587 -0700
+@@ -24,6 +24,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/param.h>
++#include <gnu/option-groups.h>
+
+ #ifndef STRING_TYPE
+ # define STRING_TYPE char
+@@ -85,7 +86,11 @@
+ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
+ {
+ struct __locale_data *current = l->__locales[LC_COLLATE];
++#if __OPTION_EGLIBC_LOCALE_CODE
+ uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
++#else
++ const uint_fast32_t nrules = 0;
++#endif
+ /* We don't assign the following values right away since it might be
+ unnecessary in case there are no rules. */
+ const unsigned char *rulesets;
+Index: git/string/test-strcmp.c
+===================================================================
+--- git.orig/string/test-strcmp.c 2014-08-29 20:00:53.752070587 -0700
++++ git/string/test-strcmp.c 2014-08-29 20:01:15.240070587 -0700
+@@ -329,34 +329,6 @@
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1 + i1, s2 + i2, exp_result);
+ }
+-
+- /* Test cases where there are multiple zero bytes after the first. */
+-
+- for (size_t i = 0; i < 16 + 1; i++)
+- {
+- s1[i] = 0x00;
+- s2[i] = 0x00;
+- }
+-
+- for (size_t i = 0; i < 16; i++)
+- {
+- int exp_result;
+-
+- for (int val = 0x01; val < 0x100; val++)
+- {
+- for (size_t j = 0; j < i; j++)
+- {
+- s1[j] = val;
+- s2[j] = val;
+- }
+-
+- s2[i] = val;
+-
+- exp_result = SIMPLE_STRCMP (s1, s2);
+- FOR_EACH_IMPL (impl, 0)
+- check_result (impl, s1, s2, exp_result);
+- }
+- }
+ }
+
+
+Index: git/string/tst-strxfrm2.c
+===================================================================
+--- git.orig/string/tst-strxfrm2.c 2014-08-29 20:00:53.756070587 -0700
++++ git/string/tst-strxfrm2.c 2014-08-29 20:01:15.240070587 -0700
+@@ -1,6 +1,7 @@
+ #include <locale.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ static int
+ do_test (void)
+@@ -38,6 +39,7 @@
+ res = 1;
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("setlocale failed");
+@@ -75,6 +77,7 @@
+ res = 1;
+ }
+ }
++#endif
+
+ return res;
+ }
+Index: git/string/tst-strxfrm.c
+===================================================================
+--- git.orig/string/tst-strxfrm.c 2014-08-29 20:00:53.756070587 -0700
++++ git/string/tst-strxfrm.c 2014-08-29 20:01:15.240070587 -0700
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+
+ char const string[] = "";
+@@ -64,8 +65,10 @@
+ int result = 0;
+
+ result |= test ("C");
++#if __OPTION_EGLIBC_LOCALE_CODE
+ result |= test ("en_US.ISO-8859-1");
+ result |= test ("de_DE.UTF-8");
++#endif
+
+ return result;
+ }
+Index: git/sunrpc/Makefile
+===================================================================
+--- git.orig/sunrpc/Makefile 2014-08-29 20:00:53.760070587 -0700
++++ git/sunrpc/Makefile 2014-08-29 20:01:15.240070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Sub-makefile for sunrpc portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := sunrpc
+
+ include ../Makeconfig
+@@ -55,7 +57,6 @@
+ headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+ headers = rpc/netdb.h
+-install-others = $(inst_sysconfdir)/rpc
+ generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
+ generated-dirs += rpcsvc
+@@ -65,18 +66,28 @@
+ endif
+
+ ifeq ($(build-shared),yes)
+-need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
++need-export-routines-$(OPTION_EGLIBC_SUNRPC) += \
++ auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
+ clnt_udp get_myaddr key_call netname pm_getport \
+- rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \
++ rpc_thread svc svc_tcp svc_udp xdr_array xdr \
+ xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \
+ svc_run
+
+-routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
++need-export-routines-y += xcrypt
++
++need-export-routines := $(need-export-routines-y)
++
++routines-$(OPTION_EGLIBC_SUNRPC) \
++ += auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
+ rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \
+ pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \
+ svc_simple xdr_float xdr_rec publickey authdes_prot \
+- des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
+- clnt_unix svc_unix create_xid $(need-export-routines)
++ key_prot openchild rtime svcauth_des \
++ clnt_unix svc_unix create_xid
++
++# xdecrypt is also used by nss/nss_files/files-key.c.
++routines-y += des_crypt des_impl des_soft $(need-export-routines)
++
+ ifneq ($(link-obsolete-rpc),yes)
+ # We only add the RPC for compatibility to libc.so.
+ shared-only-routines = $(routines)
+@@ -85,25 +96,28 @@
+
+ # We do not build rpcinfo anymore. It is not needed for a bootstrap
+ # and not wanted on complete systems.
+-# others := rpcinfo
+-# install-sbin := rpcinfo
+-install-bin := rpcgen
++# others-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
++# install-sbin-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
++install-bin-$(OPTION_EGLIBC_SUNRPC) += rpcgen
+ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
+ rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \
+ rpc_tblout.o rpc_sample.o
+-extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
+-others += rpcgen
++extra-objs-$(OPTION_EGLIBC_SUNRPC) = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
++others-$(OPTION_EGLIBC_SUNRPC) += rpcgen
++
++install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc
+
+-tests = tst-xdrmem tst-xdrmem2
+-xtests := tst-getmyaddr
++tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2
++xtests-$(OPTION_EGLIBC_SUNRPC) := tst-getmyaddr
+
+ ifeq ($(have-thread-library),yes)
+-xtests += thrsvc
++xtests-$(OPTION_EGLIBC_SUNRPC) += thrsvc
+ endif
+
+ headers += $(rpcsvc:%.x=rpcsvc/%.h)
+-extra-libs := librpcsvc
+-extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
++extra-libs-$(OPTION_EGLIBC_SUNRPC) += librpcsvc
++# Make it in `others' pass, not `lib' pass.
++extra-libs-others-y += $(extra-libs-y)
+ librpcsvc-routines = $(rpcsvc:%.x=x%)
+ librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
+ omit-deps = $(librpcsvc-routines)
+Index: git/sysdeps/generic/ldsodefs.h
+===================================================================
+--- git.orig/sysdeps/generic/ldsodefs.h 2014-08-29 20:00:53.904070587 -0700
++++ git/sysdeps/generic/ldsodefs.h 2014-08-29 20:01:15.240070587 -0700
+@@ -425,6 +425,12 @@
+ # undef __rtld_global_attribute__
+ #endif
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
++# define GLRO_dl_debug_mask GLRO(dl_debug_mask)
++#else
++# define GLRO_dl_debug_mask 0
++#endif
++
+ #ifndef SHARED
+ # define GLRO(name) _##name
+ #else
+@@ -437,8 +443,10 @@
+ {
+ #endif
+
++#if __OPTION_EGLIBC_RTLD_DEBUG
+ /* If nonzero the appropriate debug information is printed. */
+ EXTERN int _dl_debug_mask;
++#endif
+ #define DL_DEBUG_LIBS (1 << 0)
+ #define DL_DEBUG_IMPCALLS (1 << 1)
+ #define DL_DEBUG_BINDINGS (1 << 2)
+Index: git/sysdeps/gnu/Makefile
+===================================================================
+--- git.orig/sysdeps/gnu/Makefile 2014-08-29 20:00:53.924070587 -0700
++++ git/sysdeps/gnu/Makefile 2014-08-29 20:01:15.240070587 -0700
+@@ -57,7 +57,8 @@
+ endif
+
+ ifeq ($(subdir),login)
+-sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
++sysdep_routines-$(OPTION_EGLIBC_UTMPX) \
++ += setutxent getutxent endutxent getutxid getutxline \
+ pututxline utmpxname updwtmpx getutmpx getutmp
+
+ sysdep_headers += utmpx.h bits/utmpx.h
+Index: git/sysdeps/ieee754/ldbl-opt/Makefile
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:00:54.452070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -11,19 +11,18 @@
+ routines += math_ldbl_opt nldbl-compat
+
+ extra-libs += libnldbl
+-libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
++libnldbl-calls = asprintf dprintf fprintf fscanf iovfscanf \
+ obstack_printf obstack_vprintf printf scanf snprintf \
+- sprintf sscanf swprintf swscanf vasprintf vdprintf vfprintf \
+- vfscanf vfwprintf vfwscanf vprintf vscanf vsnprintf \
+- vsprintf vsscanf vswprintf vswscanf vwprintf vwscanf \
+- wprintf wscanf printf_fp printf_size \
+- fprintf_chk fwprintf_chk printf_chk snprintf_chk sprintf_chk \
+- swprintf_chk vfprintf_chk vfwprintf_chk vprintf_chk \
+- vsnprintf_chk vsprintf_chk vswprintf_chk vwprintf_chk \
+- wprintf_chk asprintf_chk vasprintf_chk dprintf_chk \
++ sprintf sscanf vasprintf vdprintf vfprintf \
++ vfscanf vprintf vscanf vsnprintf \
++ vsprintf vsscanf \
++ printf_fp printf_size \
++ fprintf_chk printf_chk snprintf_chk sprintf_chk \
++ vfprintf_chk vprintf_chk \
++ vsnprintf_chk vsprintf_chk \
++ asprintf_chk vasprintf_chk dprintf_chk \
+ vdprintf_chk obstack_printf_chk obstack_vprintf_chk \
+ syslog syslog_chk vsyslog vsyslog_chk \
+- strfmon strfmon_l \
+ strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
+ qecvt qfcvt qgcvt qecvt_r qfcvt_r \
+ isinf isnan finite signbit scalb log2 lgamma_r ceil \
+@@ -38,9 +37,15 @@
+ casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
+ cabs carg cimag creal clog10 \
+ isoc99_scanf isoc99_fscanf isoc99_sscanf \
+- isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
++ isoc99_vscanf isoc99_vfscanf isoc99_vsscanf
++libnldbl-calls-$(OPTION_EGLIBC_LOCALE_CODE) += strfmon strfmon_l
++libnldbl-calls-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += fwprintf fwscanf \
++ swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
++ vwprintf vwscanf wprintf wscanf fwprintf_chk swprintf_chk \
++ vfwprintf_chk vswprintf_chk vwprintf_chk wprintf_chk \
+ isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
+ isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf
++libnldbl-calls += $(libnldbl-calls-y)
+ libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
+ libnldbl-inhibit-o = $(object-suffixes)
+ libnldbl-static-only-routines = $(libnldbl-routines)
+Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:00:54.468070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:01:15.244070587 -0700
+@@ -26,6 +26,7 @@
+ #include <locale/localeinfo.h>
+ #include <sys/syslog.h>
+ #include <bits/libc-lock.h>
++#include <gnu/option-groups.h>
+
+ #include "nldbl-compat.h"
+
+@@ -33,20 +34,14 @@
+ libc_hidden_proto (__nldbl_vsscanf)
+ libc_hidden_proto (__nldbl_vsprintf)
+ libc_hidden_proto (__nldbl_vfscanf)
+-libc_hidden_proto (__nldbl_vfwscanf)
+ libc_hidden_proto (__nldbl_vdprintf)
+-libc_hidden_proto (__nldbl_vswscanf)
+-libc_hidden_proto (__nldbl_vfwprintf)
+-libc_hidden_proto (__nldbl_vswprintf)
+ libc_hidden_proto (__nldbl_vsnprintf)
+ libc_hidden_proto (__nldbl_vasprintf)
+ libc_hidden_proto (__nldbl_obstack_vprintf)
+-libc_hidden_proto (__nldbl___vfwprintf_chk)
+ libc_hidden_proto (__nldbl___vsnprintf_chk)
+ libc_hidden_proto (__nldbl___vfprintf_chk)
+ libc_hidden_proto (__nldbl___vsyslog_chk)
+ libc_hidden_proto (__nldbl___vsprintf_chk)
+-libc_hidden_proto (__nldbl___vswprintf_chk)
+ libc_hidden_proto (__nldbl___vasprintf_chk)
+ libc_hidden_proto (__nldbl___vdprintf_chk)
+ libc_hidden_proto (__nldbl___obstack_vprintf_chk)
+@@ -54,8 +49,17 @@
+ libc_hidden_proto (__nldbl___vstrfmon_l)
+ libc_hidden_proto (__nldbl___isoc99_vsscanf)
+ libc_hidden_proto (__nldbl___isoc99_vfscanf)
++
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++libc_hidden_proto (__nldbl_vfwscanf)
++libc_hidden_proto (__nldbl_vswscanf)
++libc_hidden_proto (__nldbl_vfwprintf)
++libc_hidden_proto (__nldbl_vswprintf)
++libc_hidden_proto (__nldbl___vfwprintf_chk)
++libc_hidden_proto (__nldbl___vswprintf_chk)
+ libc_hidden_proto (__nldbl___isoc99_vswscanf)
+ libc_hidden_proto (__nldbl___isoc99_vfwscanf)
++#endif
+
+ static void
+ __nldbl_cleanup (void *arg)
+@@ -117,6 +121,7 @@
+ }
+ weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
+@@ -130,6 +135,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -226,6 +232,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
+@@ -239,6 +246,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section weak_function
+@@ -264,6 +272,7 @@
+ }
+ libc_hidden_def (__nldbl_vdprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -275,6 +284,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl_vfwprintf)
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -297,6 +307,7 @@
+ libc_hidden_def (__nldbl_vsnprintf)
+ weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section weak_function
+ __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
+@@ -330,6 +341,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -419,6 +431,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -491,6 +504,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -506,6 +520,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
+@@ -519,6 +534,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -563,6 +579,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
+@@ -577,6 +594,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -590,6 +608,7 @@
+ }
+ libc_hidden_def (__nldbl___vfprintf_chk)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
+@@ -601,6 +620,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl___vfwprintf_chk)
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -635,6 +655,7 @@
+ }
+ libc_hidden_def (__nldbl___vsprintf_chk)
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
+@@ -668,6 +689,7 @@
+
+ return done;
+ }
++#endif
+
+ int
+ attribute_compat_text_section
+@@ -775,6 +797,7 @@
+ return ___printf_fp (fp, &info_no_ldbl, args);
+ }
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ ssize_t
+ attribute_compat_text_section
+ __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
+@@ -829,6 +852,7 @@
+ return res;
+ }
+ libc_hidden_def (__nldbl___vstrfmon_l)
++#endif
+
+ void
+ attribute_compat_text_section
+@@ -941,6 +965,7 @@
+ return done;
+ }
+
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ int
+ attribute_compat_text_section
+ __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+@@ -1014,6 +1039,7 @@
+
+ return done;
+ }
++#endif
+
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+ compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
+@@ -1057,6 +1083,7 @@
+ compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
+ #endif
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
++# if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
+ compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
+@@ -1069,6 +1096,7 @@
+ compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2);
+ compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2);
++# endif
+ #endif
+ #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
+ compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3);
+Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+===================================================================
+--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:00:54.468070587 -0700
++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:01:15.244070587 -0700
+@@ -30,6 +30,7 @@
+ #include <math.h>
+ #include <monetary.h>
+ #include <sys/syslog.h>
++#include <gnu/option-groups.h>
+
+
+ /* Declare the __nldbl_NAME function the wrappers call that's in libc.so. */
+@@ -37,19 +38,15 @@
+
+ NLDBL_DECL (_IO_vfscanf);
+ NLDBL_DECL (vfscanf);
+-NLDBL_DECL (vfwscanf);
+ NLDBL_DECL (obstack_vprintf);
+ NLDBL_DECL (vasprintf);
+ NLDBL_DECL (dprintf);
+ NLDBL_DECL (vdprintf);
+ NLDBL_DECL (fprintf);
+ NLDBL_DECL (vfprintf);
+-NLDBL_DECL (vfwprintf);
+ NLDBL_DECL (vsnprintf);
+ NLDBL_DECL (vsprintf);
+ NLDBL_DECL (vsscanf);
+-NLDBL_DECL (vswprintf);
+-NLDBL_DECL (vswscanf);
+ NLDBL_DECL (__asprintf);
+ NLDBL_DECL (asprintf);
+ NLDBL_DECL (__printf_fp);
+@@ -66,12 +63,18 @@
+ NLDBL_DECL (__isoc99_vscanf);
+ NLDBL_DECL (__isoc99_vfscanf);
+ NLDBL_DECL (__isoc99_vsscanf);
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++NLDBL_DECL (vfwscanf);
++NLDBL_DECL (vfwprintf);
++NLDBL_DECL (vswprintf);
++NLDBL_DECL (vswscanf);
+ NLDBL_DECL (__isoc99_wscanf);
+ NLDBL_DECL (__isoc99_fwscanf);
+ NLDBL_DECL (__isoc99_swscanf);
+ NLDBL_DECL (__isoc99_vwscanf);
+ NLDBL_DECL (__isoc99_vfwscanf);
+ NLDBL_DECL (__isoc99_vswscanf);
++#endif
+
+ /* This one does not exist in the normal interface, only
+ __nldbl___vstrfmon really exists. */
+@@ -82,22 +85,23 @@
+ since we don't compile with _FORTIFY_SOURCE. */
+ extern int __nldbl___vfprintf_chk (FILE *__restrict, int,
+ const char *__restrict, _G_va_list);
+-extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
+- const wchar_t *__restrict, __gnuc_va_list);
+ extern int __nldbl___vsprintf_chk (char *__restrict, int, size_t,
+ const char *__restrict, _G_va_list) __THROW;
+ extern int __nldbl___vsnprintf_chk (char *__restrict, size_t, int, size_t,
+ const char *__restrict, _G_va_list)
+ __THROW;
+-extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
+- const wchar_t *__restrict, __gnuc_va_list)
+- __THROW;
+ extern int __nldbl___vasprintf_chk (char **, int, const char *, _G_va_list)
+ __THROW;
+ extern int __nldbl___vdprintf_chk (int, int, const char *, _G_va_list);
+ extern int __nldbl___obstack_vprintf_chk (struct obstack *, int, const char *,
+ _G_va_list) __THROW;
+ extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
+-
++#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
++extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
++ const wchar_t *__restrict, __gnuc_va_list);
++extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
++ const wchar_t *__restrict, __gnuc_va_list)
++ __THROW;
++#endif
+
+ #endif /* __NLDBL_COMPAT_H */
+Index: git/sysdeps/unix/sysv/linux/gethostid.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:00:58.840070587 -0700
++++ git/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:01:15.244070587 -0700
+@@ -21,6 +21,7 @@
+ #include <unistd.h>
+ #include <netdb.h>
+ #include <not-cancel.h>
++#include <gnu/option-groups.h>
+
+ #define HOSTIDFILE "/etc/hostid"
+
+@@ -89,6 +90,7 @@
+ return id;
+ }
+
++#if __OPTION_EGLIBC_INET
+ /* Getting from the file was not successful. An intelligent guess for
+ a unique number of a host is its IP address. Return this. */
+ if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
+@@ -115,5 +117,9 @@
+ /* For the return value to be not exactly the IP address we do some
+ bit fiddling. */
+ return (int32_t) (in.s_addr << 16 | in.s_addr >> 16);
++#else
++ /* Return an arbitrary value. */
++ return 0;
++#endif
+ }
+ #endif
+Index: git/sysdeps/unix/sysv/linux/libc_fatal.c
+===================================================================
+--- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:00:58.980070587 -0700
++++ git/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:01:15.244070587 -0700
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #include <sys/mman.h>
+ #include <sys/uio.h>
++#include <gnu/option-groups.h>
+
+ static bool
+ writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
+@@ -40,6 +41,7 @@
+ static void
+ backtrace_and_maps (int do_abort, bool written, int fd)
+ {
++#if __OPTION_EGLIBC_BACKTRACE
+ if (do_abort > 1 && written)
+ {
+ void *addrs[64];
+@@ -62,6 +64,7 @@
+ close_not_cancel_no_status (fd2);
+ }
+ }
++#endif /* __OPTION_EGLIBC_BACKTRACE */
+ }
+ #define BEFORE_ABORT backtrace_and_maps
+
+Index: git/time/Makefile
+===================================================================
+--- git.orig/time/Makefile 2014-08-29 20:00:59.504070587 -0700
++++ git/time/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -18,6 +18,8 @@
+ #
+ # Makefile for time routines
+ #
++include ../option-groups.mak
++
+ subdir := time
+
+ include ../Makeconfig
+@@ -30,14 +32,20 @@
+ tzfile getitimer setitimer \
+ stime dysize timegm ftime \
+ getdate strptime strptime_l \
+- strftime wcsftime strftime_l wcsftime_l \
++ strftime strftime_l \
+ timespec_get
+-aux := era alt_digit lc-time-cleanup
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcsftime wcsftime_l
++aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup
+
+-tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
+- tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
++tests := test_time clocktest tst-posixtz \
++ tst-getdate tst-mktime tst-mktime2 tst-strftime \
+ tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
+ tst-strptime3 bug-getdate1 tst-strptime-whitespace
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-strptime tst-ftime_l
++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += tst_wcsftime
+
+ include ../Rules
+
+Index: git/time/strftime_l.c
+===================================================================
+--- git.orig/time/strftime_l.c 2014-08-29 20:00:59.528070587 -0700
++++ git/time/strftime_l.c 2014-08-29 20:01:15.244070587 -0700
+@@ -35,6 +35,10 @@
+ # include "../locale/localeinfo.h"
+ #endif
+
++#ifdef _LIBC
++# include <gnu/option-groups.h>
++#endif
++
+ #if defined emacs && !defined HAVE_BCOPY
+ # define HAVE_MEMCPY 1
+ #endif
+@@ -882,7 +886,7 @@
+ case L_('C'):
+ if (modifier == L_('E'))
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+@@ -955,7 +959,7 @@
+
+ if (modifier == L_('O') && 0 <= number_value)
+ {
+-#ifdef _NL_CURRENT
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
+ /* Get the locale specific alternate representation of
+ the number NUMBER_VALUE. If none exist NULL is returned. */
+ const CHAR_T *cp = nl_get_alt_digit (number_value
+@@ -1260,7 +1264,7 @@
+ case L_('Y'):
+ if (modifier == 'E')
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+@@ -1285,7 +1289,7 @@
+ case L_('y'):
+ if (modifier == L_('E'))
+ {
+-#if HAVE_STRUCT_ERA_ENTRY
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
+ struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
+ if (era)
+ {
+Index: git/time/strptime_l.c
+===================================================================
+--- git.orig/time/strptime_l.c 2014-08-29 20:00:59.528070587 -0700
++++ git/time/strptime_l.c 2014-08-29 20:01:15.244070587 -0700
+@@ -29,6 +29,7 @@
+
+ #ifdef _LIBC
+ # define HAVE_LOCALTIME_R 0
++# include <gnu/option-groups.h>
+ # include "../locale/localeinfo.h"
+ #endif
+
+@@ -84,7 +85,7 @@
+ if (val < from || val > to) \
+ return NULL; \
+ } while (0)
+-#ifdef _NL_CURRENT
++#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
+ # define get_alt_number(from, to, n) \
+ ({ \
+ __label__ do_normal; \
+@@ -820,6 +821,7 @@
+ s.want_xday = 1;
+ break;
+ case 'C':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ if (s.era_cnt >= 0)
+@@ -856,10 +858,12 @@
+
+ s.decided = raw;
+ }
++#endif
+ /* The C locale has no era information, so use the
+ normal representation. */
+ goto match_century;
+ case 'y':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ get_number(0, 9999, 4);
+@@ -918,9 +922,10 @@
+
+ s.decided = raw;
+ }
+-
++#endif
+ goto match_year_in_century;
+ case 'Y':
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.decided != raw)
+ {
+ num_eras = _NL_CURRENT_WORD (LC_TIME,
+@@ -948,6 +953,7 @@
+
+ s.decided = raw;
+ }
++#endif
+ get_number (0, 9999, 4);
+ tm->tm_year = val - 1900;
+ s.want_century = 0;
+@@ -1118,6 +1124,7 @@
+ tm->tm_year = (s.century - 19) * 100;
+ }
+
++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
+ if (s.era_cnt != -1)
+ {
+ era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG);
+@@ -1132,6 +1139,7 @@
+ tm->tm_year = era->start_date[0];
+ }
+ else
++#endif
+ if (s.want_era)
+ {
+ /* No era found but we have seen an E modifier. Rectify some
+Index: git/timezone/Makefile
+===================================================================
+--- git.orig/timezone/Makefile 2014-08-29 20:01:14.044070587 -0700
++++ git/timezone/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -115,7 +115,7 @@
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+ sed -e 's|/bin/bash|/bin/sh|' \
+- -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
++ -e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
+ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+ -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
+Index: git/wcsmbs/Makefile
+===================================================================
+--- git.orig/wcsmbs/Makefile 2014-08-29 20:00:59.548070587 -0700
++++ git/wcsmbs/Makefile 2014-08-29 20:01:15.244070587 -0700
+@@ -18,15 +18,21 @@
+ #
+ # Sub-makefile for wcsmbs portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := wcsmbs
+
+ include ../Makeconfig
+
+ headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
+
+-routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
++# These functions are used by printf_fp.c, even in the plain case; see
++# comments there for OPTION_EGLIBC_LOCALE_CODE.
++routines := wmemcpy wmemset
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
+ wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
+- wmemcmp wmemcpy wmemmove wmemset wcpcpy wcpncpy wmempcpy \
++ wmemcmp wmemmove wcpcpy wcpncpy wmempcpy \
+ btowc wctob mbsinit \
+ mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \
+ mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \
+@@ -38,14 +44,19 @@
+ wcscoll_l wcsxfrm_l \
+ wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
+ wcsmbsload mbsrtowcs_l \
+- isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
+ isoc99_swscanf isoc99_vswscanf \
+ mbrtoc16 c16rtomb
++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
++ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf
+
+ strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
+-tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
+- tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
+- tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
++tests := tst-wchar-h
++tests-$(OPTION_EGLIBC_LOCALE_CODE) \
++ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \
++ tst-wcpncpy tst-mbsrtowcs \
++ wcsatcliff $(addprefix test-,$(strop-tests))
+ tests-ifunc := $(strop-tests:%=test-%-ifunc)
+ tests += $(tests-ifunc)
+
+Index: git/wcsmbs/wcsmbsload.c
+===================================================================
+--- git.orig/wcsmbs/wcsmbsload.c 2014-08-29 20:00:59.580070587 -0700
++++ git/wcsmbs/wcsmbsload.c 2014-08-29 20:01:15.248070587 -0700
+@@ -21,6 +21,7 @@
+ #include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <gnu/option-groups.h>
+
+ #include <locale/localeinfo.h>
+ #include <wcsmbsload.h>
+@@ -143,6 +144,7 @@
+ })
+
+
++#if __OPTION_EGLIBC_LOCALE_CODE
+ /* Some of the functions here must not be used while setlocale is called. */
+ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
+
+@@ -211,6 +213,17 @@
+
+ __libc_rwlock_unlock (__libc_setlocale_lock);
+ }
++#else
++void
++internal_function
++__wcsmbs_load_conv (struct __locale_data *new_category)
++{
++ /* When OPTION_EGLIBC_LOCALE_CODE is disabled, we should never reach
++ this point: there is no way to change locales, so every locale
++ passed to get_gconv_fcts should be _nl_C_LC_CTYPE. */
++ abort ();
++}
++#endif
+
+
+ /* Clone the current conversion function set. */
+Index: git/wctype/Makefile
+===================================================================
+--- git.orig/wctype/Makefile 2014-08-29 20:00:59.584070587 -0700
++++ git/wctype/Makefile 2014-08-29 20:01:15.248070587 -0700
+@@ -18,14 +18,20 @@
+ #
+ # Sub-makefile for wctype portion of the library.
+ #
++include ../option-groups.mak
++
+ subdir := wctype
+
+ include ../Makeconfig
+
+ headers := wctype.h
+-routines := wcfuncs wctype iswctype wctrans towctrans \
+- wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l
++routines := wctrans towctrans towctrans_l
++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ := wcfuncs wctype iswctype \
++ wcfuncs_l wctype_l iswctype_l wctrans_l
+
+-tests := test_wctype test_wcfuncs bug-wctypeh
++tests :=
++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
++ += test_wctype test_wcfuncs bug-wctypeh
+
+ include ../Rules
+Index: git/sysdeps/nptl/Makefile
+===================================================================
+--- git.orig/sysdeps/nptl/Makefile 2014-08-29 20:00:58.036070587 -0700
++++ git/sysdeps/nptl/Makefile 2014-08-29 20:01:15.248070587 -0700
+@@ -18,6 +18,9 @@
+
+ ifeq ($(subdir),nptl)
+ libpthread-sysdep_routines += errno-loc
++ifeq ($(OPTION_EGLIBC_BIG_MACROS),n)
++sysdep_routines += small-macros-fns
++endif
+ endif
+
+ ifeq ($(subdir),rt)
+Index: git/sysdeps/nptl/bits/libc-lock.h
+===================================================================
+--- git.orig/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:00:58.036070587 -0700
++++ git/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:01:15.248070587 -0700
+@@ -24,6 +24,14 @@
+ #include <stddef.h>
+
+
++#ifdef _LIBC
++# include <lowlevellock.h>
++# include <tls.h>
++# include <pthread-functions.h>
++# include <errno.h> /* For EBUSY. */
++# include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */
++#endif
++
+ /* Mutex type. */
+ #if defined _LIBC || defined _IO_MTSAFE_IO
+ # if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC
+@@ -87,6 +95,14 @@
+
+ /* Lock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_lock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_lock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_lock_recursive(NAME) \
+ do { \
+ void *self = THREAD_SELF; \
+@@ -97,6 +113,10 @@
+ } \
+ ++(NAME).cnt; \
+ } while (0)
++# else
++# define __libc_lock_lock_recursive(NAME) \
++ __libc_lock_lock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_lock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0)
+@@ -104,6 +124,14 @@
+
+ /* Try to lock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern int __libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_trylock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_trylock_recursive(NAME) \
+ ({ \
+ int result = 0; \
+@@ -122,6 +150,10 @@
+ ++(NAME).cnt; \
+ result; \
+ })
++# else
++# define __libc_lock_trylock_recursive(NAME) \
++ __libc_lock_trylock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_trylock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
+@@ -129,6 +161,14 @@
+
+ /* Unlock the recursive named lock variable. */
+ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *);
++libc_hidden_proto (__libc_lock_unlock_recursive_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ /* We do no error checking here. */
+ # define __libc_lock_unlock_recursive(NAME) \
+ do { \
+@@ -138,6 +178,10 @@
+ lll_unlock ((NAME).lock, LLL_PRIVATE); \
+ } \
+ } while (0)
++# else
++# define __libc_lock_unlock_recursive(NAME) \
++ __libc_lock_unlock_recursive_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_unlock_recursive(NAME) \
+ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0)
+Index: git/sysdeps/nptl/bits/libc-lockP.h
+===================================================================
+--- git.orig/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:00:58.044070587 -0700
++++ git/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:01:15.248070587 -0700
+@@ -33,6 +33,8 @@
+ #include <lowlevellock.h>
+ #include <tls.h>
+ #include <pthread-functions.h>
++#include <errno.h> /* For EBUSY. */
++#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */
+
+ /* Mutex type. */
+ #if defined NOT_IN_libc && !defined IS_IN_libpthread
+@@ -159,10 +161,22 @@
+
+ /* Lock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
+-# ifndef __libc_lock_lock
+-# define __libc_lock_lock(NAME) \
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_lock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_lock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
++# ifndef __libc_lock_lock
++# define __libc_lock_lock(NAME) \
+ ({ lll_lock (NAME, LLL_PRIVATE); 0; })
+-# endif
++# endif
++# else
++# define __libc_lock_lock(NAME) \
++ __libc_lock_lock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # undef __libc_lock_lock
+ # define __libc_lock_lock(NAME) \
+@@ -175,10 +189,22 @@
+
+ /* Try to lock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
+-# ifndef __libc_lock_trylock
+-# define __libc_lock_trylock(NAME) \
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern int __libc_lock_trylock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_trylock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
++# ifndef __libc_lock_trylock
++# define __libc_lock_trylock(NAME) \
+ lll_trylock (NAME)
+-# endif
++# endif
++# else
++# define __libc_lock_trylock(NAME) \
++ __libc_lock_trylock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # undef __libc_lock_trylock
+ # define __libc_lock_trylock(NAME) \
+@@ -194,8 +220,20 @@
+
+ /* Unlock the named lock variable. */
+ #if !defined NOT_IN_libc || defined IS_IN_libpthread
++# if __OPTION_EGLIBC_BIG_MACROS != 1
++/* EGLIBC: Declare wrapper function for a big macro if either
++ !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
++ small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2). */
++extern void __libc_lock_unlock_fn (__libc_lock_t *);
++libc_hidden_proto (__libc_lock_unlock_fn);
++# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
++# if __OPTION_EGLIBC_BIG_MACROS
+ # define __libc_lock_unlock(NAME) \
+ lll_unlock (NAME, LLL_PRIVATE)
++# else
++# define __libc_lock_unlock(NAME) \
++ __libc_lock_unlock_fn (&(NAME))
++# endif /* __OPTION_EGLIBC_BIG_MACROS */
+ #else
+ # define __libc_lock_unlock(NAME) \
+ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0)
+Index: git/sysdeps/nptl/small-macros-fns.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/nptl/small-macros-fns.c 2014-08-29 20:01:15.248070587 -0700
+@@ -0,0 +1,72 @@
++/* EGLIBC: function wrappers for big macros.
++ Copyright (C) 2009 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; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#include <gnu/option-groups.h>
++
++/* Handle macros from ./bits/libc-lock.h. */
++#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
++
++/* Get the macros for function bodies through a back door. */
++# undef __OPTION_EGLIBC_BIG_MACROS
++# define __OPTION_EGLIBC_BIG_MACROS 2
++# include <bits/libc-lock.h>
++
++void
++__libc_lock_lock_fn (__libc_lock_t *name)
++{
++ __libc_lock_lock (*name);
++}
++libc_hidden_def (__libc_lock_lock_fn);
++
++void
++__libc_lock_lock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ __libc_lock_lock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_lock_recursive_fn);
++
++int
++__libc_lock_trylock_fn (__libc_lock_t *name)
++{
++ return __libc_lock_trylock (*name);
++}
++libc_hidden_def (__libc_lock_trylock_fn);
++
++int
++__libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ return __libc_lock_trylock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_trylock_recursive_fn);
++
++void
++__libc_lock_unlock_fn (__libc_lock_t *name)
++{
++ __libc_lock_unlock (*name);
++}
++libc_hidden_def (__libc_lock_unlock_fn);
++
++void
++__libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *name)
++{
++ __libc_lock_unlock_recursive (*name);
++}
++libc_hidden_def (__libc_lock_unlock_recursive_fn);
++
++#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/
+Index: git/crypt/crypt_common.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/crypt/crypt_common.c 2014-08-29 20:01:15.248070587 -0700
+@@ -0,0 +1,42 @@
++/*
++ * crypt: crypt(3) implementation
++ *
++ * Copyright (C) 1991-2014 Free Software Foundation, Inc.
++ *
++ * 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; see the file COPYING.LIB. If not,
++ * see <http://www.gnu.org/licenses/>.
++ *
++ * General Support routines
++ *
++ */
++
++#include "crypt-private.h"
++
++/* Table with characters for base64 transformation. */
++static const char b64t[64] =
++"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
++
++void
++__b64_from_24bit (char **cp, int *buflen,
++ unsigned int b2, unsigned int b1, unsigned int b0,
++ int n)
++{
++ unsigned int w = (b2 << 16) | (b1 << 8) | b0;
++ while (n-- > 0 && (*buflen) > 0)
++ {
++ *(*cp)++ = b64t[w & 0x3f];
++ --(*buflen);
++ w >>= 6;
++ }
++}
+Index: git/crypt/crypt_util.c
+===================================================================
+--- git.orig/crypt/crypt_util.c 2014-08-29 20:00:43.028070587 -0700
++++ git/crypt/crypt_util.c 2014-08-29 20:01:15.248070587 -0700
+@@ -242,10 +242,6 @@
+ */
+ static ufc_long efp[16][64][2];
+
+-/* Table with characters for base64 transformation. */
+-static const char b64t[64] =
+-"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+-
+ /*
+ * For use by the old, non-reentrant routines
+ * (crypt/encrypt/setkey)
+@@ -949,17 +945,3 @@
+ {
+ __setkey_r(__key, &_ufc_foobar);
+ }
+-
+-void
+-__b64_from_24bit (char **cp, int *buflen,
+- unsigned int b2, unsigned int b1, unsigned int b0,
+- int n)
+-{
+- unsigned int w = (b2 << 16) | (b1 << 8) | b0;
+- while (n-- > 0 && (*buflen) > 0)
+- {
+- *(*cp)++ = b64t[w & 0x3f];
+- --(*buflen);
+- w >>= 6;
+- }
+-}
+Index: git/sysdeps/arm/Makefile
+===================================================================
+--- git.orig/sysdeps/arm/Makefile 2014-08-29 20:29:37.000000000 -0700
++++ git/sysdeps/arm/Makefile 2014-08-29 20:31:09.904070587 -0700
+@@ -37,10 +37,13 @@
+ # get offset to rtld_global._dl_hwcap
+ gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
+ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
+-aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
++aeabi_routines = aeabi_assert aeabi_errno_addr \
+ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+ aeabi_memmove aeabi_memset \
+ aeabi_read_tp libc-aeabi_read_tp
++ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
++aeabi_routines += aeabi_localeconv
++endif
+
+ sysdep_routines += $(aeabi_constants) $(aeabi_routines)
+ static-only-routines += $(aeabi_constants) aeabi_read_tp
diff --git a/meta/recipes-core/glibc/glibc/eglibc.patch b/meta/recipes-core/glibc/glibc/eglibc.patch
new file mode 100644
index 0000000000..fdfabc3a06
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/eglibc.patch
@@ -0,0 +1,602 @@
+Instruction documents from eglibc
+
+Upstream-Status: Pending
+
+Index: git/EGLIBC.cross-building
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.cross-building 2014-08-27 07:27:25.580070587 +0000
+@@ -0,0 +1,383 @@
++ -*- mode: text -*-
++
++ Cross-Compiling EGLIBC
++ Jim Blandy <jimb@codesourcery.com>
++
++
++Introduction
++
++Most GNU tools have a simple build procedure: you run their
++'configure' script, and then you run 'make'. Unfortunately, the
++process of cross-compiling the GNU C library is quite a bit more
++involved:
++
++1) Build a cross-compiler, with certain facilities disabled.
++
++2) Configure the C library using the compiler you built in step 1).
++ Build a few of the C run-time object files, but not the rest of the
++ library. Install the library's header files and the run-time
++ object files, and create a dummy libc.so.
++
++3) Build a second cross-compiler, using the header files and object
++ files you installed in step 2.
++
++4) Configure, build, and install a fresh C library, using the compiler
++ built in step 3.
++
++5) Build a third cross-compiler, based on the C library built in step 4.
++
++The reason for this complexity is that, although GCC and the GNU C
++library are distributed separately, they are not actually independent
++of each other: GCC requires the C library's headers and some object
++files to compile its own libraries, while the C library depends on
++GCC's libraries. EGLIBC includes features and bug fixes to the stock
++GNU C library that simplify this process, but the fundamental
++interdependency stands.
++
++In this document, we explain how to cross-compile an EGLIBC/GCC pair
++from source. Our intended audience is developers who are already
++familiar with the GNU toolchain and comfortable working with
++cross-development tools. While we do present a worked example to
++accompany the explanation, for clarity's sake we do not cover many of
++the options available to cross-toolchain users.
++
++
++Preparation
++
++EGLIBC requires recent versions of the GNU binutils, GCC, and the
++Linux kernel. The web page <http://www.eglibc.org/prerequisites>
++documents the current requirements, and lists patches needed for
++certain target architectures. As of this writing, these build
++instructions have been tested with binutils 2.22.51, GCC 4.6.2,
++and Linux 3.1.
++
++First, let's set some variables, to simplify later commands. We'll
++build EGLIBC and GCC for an ARM target, known to the Linux kernel
++as 'arm', and we'll do the build on an Intel x86_64 Linux box:
++
++ $ build=x86_64-pc-linux-gnu
++ $ host=$build
++ $ target=arm-none-linux-gnueabi
++ $ linux_arch=arm
++
++We're using the aforementioned versions of Binutils, GCC, and Linux:
++
++ $ binutilsv=binutils-2.22.51
++ $ gccv=gcc-4.6.2
++ $ linuxv=linux-3.1
++
++We're carrying out the entire process under '~/cross-build', which
++contains unpacked source trees for binutils, gcc, and linux kernel,
++along with EGLIBC svn trunk (which can be checked-out with
++'svn co http://www.eglibc.org/svn/trunk eglibc'):
++
++ $ top=$HOME/cross-build/$target
++ $ src=$HOME/cross-build/src
++ $ ls $src
++ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
++
++We're going to place our build directories in a subdirectory 'obj',
++we'll install the cross-development toolchain in 'tools', and we'll
++place our sysroot (containing files to be installed on the target
++system) in 'sysroot':
++
++ $ obj=$top/obj
++ $ tools=$top/tools
++ $ sysroot=$top/sysroot
++
++
++Binutils
++
++Configuring and building binutils for the target is straightforward:
++
++ $ mkdir -p $obj/binutils
++ $ cd $obj/binutils
++ $ $src/$binutilsv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot
++ $ make
++ $ make install
++
++
++The First GCC
++
++For our work, we need a cross-compiler targeting an ARM Linux
++system. However, that configuration includes the shared library
++'libgcc_s.so', which is compiled against the EGLIBC headers (which we
++haven't installed yet) and linked against 'libc.so' (which we haven't
++built yet).
++
++Fortunately, there are configuration options for GCC which tell it not
++to build 'libgcc_s.so'. The '--without-headers' option is supposed to
++take care of this, but its implementation is incomplete, so you must
++also configure with the '--with-newlib' option. While '--with-newlib'
++appears to mean "Use the Newlib C library", its effect is to tell the
++GCC build machinery, "Don't assume there is a C library available."
++
++We also need to disable some of the libraries that would normally be
++built along with GCC, and specify that only the compiler for the C
++language is needed.
++
++So, we create a build directory, configure, make, and install.
++
++ $ mkdir -p $obj/gcc1
++ $ cd $obj/gcc1
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --without-headers --with-newlib \
++ > --disable-shared --disable-threads --disable-libssp \
++ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
++ > --disable-decimal-float --disable-libffi \
++ > --enable-languages=c
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++
++Linux Kernel Headers
++
++To configure EGLIBC, we also need Linux kernel headers in place.
++Fortunately, the Linux makefiles have a target that installs them for
++us. Since the process does modify the source tree a bit, we make a
++copy first:
++
++ $ cp -r $src/$linuxv $obj/linux
++ $ cd $obj/linux
++
++Now we're ready to install the headers into the sysroot:
++
++ $ PATH=$tools/bin:$PATH \
++ > make headers_install \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++ > INSTALL_HDR_PATH=$sysroot/usr
++
++
++EGLIBC Headers and Preliminary Objects
++
++Using the cross-compiler we've just built, we can now configure EGLIBC
++well enough to install the headers and build the object files that the
++full cross-compiler will need:
++
++ $ mkdir -p $obj/eglibc-headers
++ $ cd $obj/eglibc-headers
++ $ BUILD_CC=gcc \
++ > CC=$tools/bin/$target-gcc \
++ > CXX=$tools/bin/$target-g++ \
++ > AR=$tools/bin/$target-ar \
++ > RANLIB=$tools/bin/$target-ranlib \
++ > $src/eglibc/libc/configure \
++ > --prefix=/usr \
++ > --with-headers=$sysroot/usr/include \
++ > --build=$build \
++ > --host=$target \
++ > --disable-profile --without-gd --without-cvs \
++ > --enable-add-ons=nptl,libidn,../ports
++
++The option '--prefix=/usr' may look strange, but you should never
++configure EGLIBC with a prefix other than '/usr': in various places,
++EGLIBC's build system checks whether the prefix is '/usr', and does
++special handling only if that is the case. Unless you use this
++prefix, you will get a sysroot that does not use the standard Linux
++directory layouts and cannot be used as a basis for the root
++filesystem on your target system compatibly with normal GLIBC
++installations.
++
++The '--with-headers' option tells EGLIBC where the Linux headers have
++been installed.
++
++The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
++for the listed glibc add-ons. Most notably the ports add-on (located
++just above the libc sources in the EGLIBC svn tree) is required to
++support ARM targets.
++
++We can now use the 'install-headers' makefile target to install the
++headers:
++
++ $ make install-headers install_root=$sysroot \
++ > install-bootstrap-headers=yes
++
++The 'install_root' variable indicates where the files should actually
++be installed; its value is treated as the parent of the '--prefix'
++directory we passed to the configure script, so the headers will go in
++'$sysroot/usr/include'. The 'install-bootstrap-headers' variable
++requests special handling for certain tricky header files.
++
++Next, there are a few object files needed to link shared libraries,
++which we build and install by hand:
++
++ $ mkdir -p $sysroot/usr/lib
++ $ make csu/subdir_lib
++ $ cp csu/crt1.o csu/crti.o csu/crtn.o $sysroot/usr/lib
++
++Finally, 'libgcc_s.so' requires a 'libc.so' to link against. However,
++since we will never actually execute its code, it doesn't matter what
++it contains. So, treating '/dev/null' as a C source file, we produce
++a dummy 'libc.so' in one step:
++
++ $ $tools/bin/$target-gcc -nostdlib -nostartfiles -shared -x c /dev/null \
++ > -o $sysroot/usr/lib/libc.so
++
++
++The Second GCC
++
++With the EGLIBC headers and selected object files installed, we can
++now build a GCC that is capable of compiling EGLIBC. We configure,
++build, and install the second GCC, again building only the C compiler,
++and avoiding libraries we won't use:
++
++ $ mkdir -p $obj/gcc2
++ $ cd $obj/gcc2
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot \
++ > --disable-libssp --disable-libgomp --disable-libmudflap \
++ > --disable-libffi --disable-libquadmath \
++ > --enable-languages=c
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++
++EGLIBC, Complete
++
++With the second compiler built and installed, we're now ready for the
++full EGLIBC build:
++
++ $ mkdir -p $obj/eglibc
++ $ cd $obj/eglibc
++ $ BUILD_CC=gcc \
++ > CC=$tools/bin/$target-gcc \
++ > CXX=$tools/bin/$target-g++ \
++ > AR=$tools/bin/$target-ar \
++ > RANLIB=$tools/bin/$target-ranlib \
++ > $src/eglibc/libc/configure \
++ > --prefix=/usr \
++ > --with-headers=$sysroot/usr/include \
++ > --with-kconfig=$obj/linux/scripts/kconfig \
++ > --build=$build \
++ > --host=$target \
++ > --disable-profile --without-gd --without-cvs \
++ > --enable-add-ons=nptl,libidn,../ports
++
++Note the additional '--with-kconfig' option. This tells EGLIBC where to
++find the host config tools used by the kernel 'make config' and 'make
++menuconfig'. These tools can be re-used by EGLIBC for its own 'make
++*config' support, which will create 'option-groups.config' for you.
++But first make sure those tools have been built by running some
++dummy 'make *config' calls in the kernel directory:
++
++ $ cd $obj/linux
++ $ PATH=$tools/bin:$PATH make config \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++ $ PATH=$tools/bin:$PATH make menuconfig \
++ > ARCH=$linux_arch CROSS_COMPILE=$target- \
++
++Now we can configure and build the full EGLIBC:
++
++ $ cd $obj/eglibc
++ $ PATH=$tools/bin:$PATH make defconfig
++ $ PATH=$tools/bin:$PATH make menuconfig
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install install_root=$sysroot
++
++At this point, we have a complete EGLIBC installation in '$sysroot',
++with header files, library files, and most of the C runtime startup
++files in place.
++
++
++The Third GCC
++
++Finally, we recompile GCC against this full installation, enabling
++whatever languages and libraries we would like to use:
++
++ $ mkdir -p $obj/gcc3
++ $ cd $obj/gcc3
++ $ $src/$gccv/configure \
++ > --target=$target \
++ > --prefix=$tools \
++ > --with-sysroot=$sysroot \
++ > --enable-__cxa_atexit \
++ > --disable-libssp --disable-libgomp --disable-libmudflap \
++ > --enable-languages=c,c++
++ $ PATH=$tools/bin:$PATH make
++ $ PATH=$tools/bin:$PATH make install
++
++The '--enable-__cxa_atexit' option tells GCC what sort of C++
++destructor support to expect from the C library; it's required with
++EGLIBC.
++
++And since GCC's installation process isn't designed to help construct
++sysroot trees, we must manually copy certain libraries into place in
++the sysroot.
++
++ $ cp -d $tools/$target/lib/libgcc_s.so* $sysroot/lib
++ $ cp -d $tools/$target/lib/libstdc++.so* $sysroot/usr/lib
++
++
++Trying Things Out
++
++At this point, '$tools' contains a cross toolchain ready to use
++the EGLIBC installation in '$sysroot':
++
++ $ cat > hello.c <<EOF
++ > #include <stdio.h>
++ > int
++ > main (int argc, char **argv)
++ > {
++ > puts ("Hello, world!");
++ > return 0;
++ > }
++ > EOF
++ $ $tools/bin/$target-gcc -Wall hello.c -o hello
++ $ cat > c++-hello.cc <<EOF
++ > #include <iostream>
++ > int
++ > main (int argc, char **argv)
++ > {
++ > std::cout << "Hello, C++ world!" << std::endl;
++ > return 0;
++ > }
++ > EOF
++ $ $tools/bin/$target-g++ -Wall c++-hello.cc -o c++-hello
++
++
++We can use 'readelf' to verify that these are indeed executables for
++our target, using our dynamic linker:
++
++ $ $tools/bin/$target-readelf -hl hello
++ ELF Header:
++ ...
++ Type: EXEC (Executable file)
++ Machine: ARM
++
++ ...
++ Program Headers:
++ Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
++ PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
++ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
++ [Requesting program interpreter: /lib/ld-linux.so.3]
++ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
++ ...
++
++Looking at the dynamic section of the installed 'libgcc_s.so', we see
++that the 'NEEDED' entry for the C library does include the '.6'
++suffix, indicating that was linked against our fully build EGLIBC, and
++not our dummy 'libc.so':
++
++ $ $tools/bin/$target-readelf -d $sysroot/lib/libgcc_s.so.1
++ Dynamic section at offset 0x1083c contains 24 entries:
++ Tag Type Name/Value
++ 0x00000001 (NEEDED) Shared library: [libc.so.6]
++ 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
++ ...
++
++
++And on the target machine, we can run our programs:
++
++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \
++ > ./hello
++ Hello, world!
++ $ $sysroot/lib/ld.so.1 --library-path $sysroot/lib:$sysroot/usr/lib \
++ > ./c++-hello
++ Hello, C++ world!
+Index: git/EGLIBC.cross-testing
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.cross-testing 2014-08-27 07:24:41.532070587 +0000
+@@ -0,0 +1,205 @@
++ -*- mode: text -*-
++
++ Cross-Testing With EGLIBC
++ Jim Blandy <jimb@codesourcery.com>
++
++
++Introduction
++
++Developers writing software for embedded systems often use a desktop
++or other similarly capable computer for development, but need to run
++tests on the embedded system, or perhaps on a simulator. When
++configured for cross-compilation, the stock GNU C library simply
++disables running tests altogether: the command 'make tests' builds
++test programs, but does not run them. EGLIBC, however, provides
++facilities for compiling tests and generating data files on the build
++system, but running the test programs themselves on a remote system or
++simulator.
++
++
++Test environment requirements
++
++The test environment must meet certain conditions for EGLIBC's
++cross-testing facilities to work:
++
++- Shared filesystems. The 'build' system, on which you configure and
++ compile EGLIBC, and the 'host' system, on which you intend to run
++ EGLIBC, must share a filesystem containing the EGLIBC build and
++ source trees. Files must appear at the same paths on both systems.
++
++- Remote-shell like invocation. There must be a way to run a program
++ on the host system from the build system, passing it properly quoted
++ command-line arguments, setting environment variables, and
++ inheriting the caller's standard input and output.
++
++
++Usage
++
++To use EGLIBC's cross-testing support, provide values for the
++following Make variables when you invoke 'make':
++
++- cross-test-wrapper
++
++ This should be the name of the cross-testing wrapper command, along
++ with any arguments.
++
++- cross-localedef
++
++ This should be the name of a cross-capable localedef program, like
++ that included in the EGLIBC 'localedef' module, along with any
++ arguments needed.
++
++These are each explained in detail below.
++
++
++The Cross-Testing Wrapper
++
++To run test programs reliably, the stock GNU C library takes care to
++ensure that test programs use the newly compiled dynamic linker and
++shared libraries, and never the host system's installed libraries. To
++accomplish this, it runs the tests by explicitly invoking the dynamic
++linker from the build tree, passing it a list of build tree
++directories to search for shared libraries, followed by the name of
++the executable to run and its arguments.
++
++For example, where one might normally run a test program like this:
++
++ $ ./tst-foo arg1 arg2
++
++the GNU C library might run that program like this:
++
++ $ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++(where $objdir is the path to the top of the build tree, and the
++trailing backslash indicates a continuation of the command). In other
++words, each test program invocation is 'wrapped up' inside an explicit
++invocation of the dynamic linker, which must itself execute the test
++program, having loaded shared libraries from the appropriate
++directories.
++
++To support cross-testing, EGLIBC allows the developer to optionally
++set the 'cross-test-wrapper' Make variable to another wrapper command,
++to which it passes the entire dynamic linker invocation shown above as
++arguments. For example, if the developer supplies a wrapper of
++'my-wrapper hostname', then EGLIBC would run the test above as
++follows:
++
++ $ my-wrapper hostname \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++The 'my-wrapper' command is responsible for executing the command
++given on the host system.
++
++Since tests are run in varying directories, the wrapper should either
++be in your command search path, or 'cross-test-wrapper' should give an
++absolute path for the wrapper.
++
++The wrapper must meet several requirements:
++
++- It must preserve the current directory. As explained above, the
++ build directory tree must be visible on both the build and host
++ systems, at the same path. The test wrapper must ensure that the
++ current directory it inherits is also inherited by the dynamic
++ linker (and thus the test program itself).
++
++- It must preserve environment variables' values. Many EGLIBC tests
++ set environment variables for test runs; in native testing, it
++ invokes programs like this:
++
++ $ GCONV_PATH=$objdir/iconvdata \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++ With the cross-testing wrapper, that invocation becomes:
++
++ $ GCONV_PATH=$objdir/iconvdata \
++ my-wrapper hostname \
++ $objdir/elf/ld-linux.so.3 --library-path $objdir \
++ ./tst-foo arg1 arg2
++
++ Here, 'my-wrapper' must ensure that the value it sees for
++ 'GCONV_PATH' will be seen by the dynamic linker, and thus 'tst-foo'
++ itself. (The wrapper supplied with GLIBC simply preserves the
++ values of *all* enviroment variables, with a fixed set of
++ exceptions.)
++
++ If your wrapper is a shell script, take care to correctly propagate
++ environment variables whose values contain spaces and shell
++ metacharacters.
++
++- It must pass the command's arguments, unmodified. The arguments
++ seen by the test program should be exactly those seen by the wrapper
++ (after whatever arguments are given to the wrapper itself). The
++ EGLIBC test framework performs all needed shell word splitting and
++ expansion (wildcard expansion, parameter substitution, and so on)
++ before invoking the wrapper; further expansion may break the tests.
++
++
++The 'cross-test-ssh.sh' script
++
++If you want to use 'ssh' (or something sufficiently similar) to run
++test programs on your host system, EGLIBC includes a shell script,
++'scripts/cross-test-ssh.sh', which you can use as your wrapper
++command. This script takes care of setting the test command's current
++directory, propagating environment variable values, and carrying
++command-line arguments, all across an 'ssh' connection. You may even
++supply an alternative to 'ssh' on the command line, if needed.
++
++For more details, pass 'cross-test-ssh.sh' the '--help' option.
++
++
++The Cross-Compiling Locale Definition Command
++
++Some EGLIBC tests rely on locales generated especially for the test
++process. In a native configuration, these tests simply run the
++'localedef' command built by the normal EGLIBC build process,
++'locale/localedef', to process and install their locales. However, in
++a cross-compiling configuration, this 'localedef' is built for the
++host system, not the build system, and since it requires quite a bit
++of memory to run (we have seen it fail on systems with 64MiB of
++memory), it may not be practical to run it on the host system.
++
++If set, EGLIBC uses the 'cross-localedef' Make variable as the command
++to run on the build system to process and install locales. The
++localedef program built from the EGLIBC 'localedef' module is
++suitable.
++
++The value of 'cross-localedef' may also include command-line arguments
++to be passed to the program; if you are using EGLIBC's 'localedef',
++you may include endianness and 'uint32_t' alignment arguments here.
++
++
++Example
++
++In developing EGLIBC's cross-testing facility, we invoked 'make' with
++the following script:
++
++ #!/bin/sh
++
++ srcdir=...
++ test_hostname=...
++ localedefdir=...
++ cross_gxx=...-g++
++
++ wrapper="$srcdir/scripts/cross-test-ssh.sh $test_hostname"
++ localedef="$localedefdir/localedef --little-endian --uint32-align=4"
++
++ make cross-test-wrapper="$wrapper" \
++ cross-localedef="$localedef" \
++ CXX="$cross_gxx" \
++ "$@"
++
++
++Other Cross-Testing Concerns
++
++Here are notes on some other issues which you may encounter in running
++the EGLIBC tests in a cross-compiling environment:
++
++- Some tests require a C++ cross-compiler; you should set the 'CXX'
++ Make variable to the name of an appropriate cross-compiler.
++
++- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we
++ simply place copies of these libraries in the top EGLIBC build
++ directory.
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
index e69de29bb2..e69de29bb2 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf
+++ b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch b/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch
index 25c43a9fe6..9ab9fdcf12 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/fix-tibetian-locales.patch
+++ b/meta/recipes-core/glibc/glibc/fix-tibetian-locales.patch
@@ -10,11 +10,11 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: libc/localedata/locales/bo_CN
+Index: git/localedata/locales/bo_CN
===================================================================
---- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800
-+++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800
-@@ -145,7 +145,7 @@
+--- git.orig/localedata/locales/bo_CN 2014-08-29 10:35:22.464070587 -0700
++++ git/localedata/locales/bo_CN 2014-08-29 10:35:22.456070587 -0700
+@@ -146,7 +146,7 @@
LC_NAME
% FIXME
@@ -23,11 +23,11 @@ Index: libc/localedata/locales/bo_CN
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"
-Index: libc/localedata/locales/bo_IN
+Index: git/localedata/locales/bo_IN
===================================================================
---- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800
-+++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800
-@@ -70,7 +70,7 @@
+--- git.orig/localedata/locales/bo_IN 2014-08-29 10:35:22.464070587 -0700
++++ git/localedata/locales/bo_IN 2014-08-29 10:35:22.456070587 -0700
+@@ -71,7 +71,7 @@
LC_NAME
% FIXME
diff --git a/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch b/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch
new file mode 100644
index 0000000000..668e8bf678
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/fix_am_rootsbindir.patch
@@ -0,0 +1,29 @@
+sysdeps/gnu/configure.ac: handle correctly $libc_cv_rootsbindir
+
+Upstream-Status:Pending
+Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
+
+Index: git/sysdeps/gnu/configure
+===================================================================
+--- git.orig/sysdeps/gnu/configure 2014-08-27 07:24:38.572070587 +0000
++++ git/sysdeps/gnu/configure 2014-08-27 07:24:41.308070587 +0000
+@@ -32,6 +32,6 @@
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
+- libc_cv_rootsbindir=/sbin
++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
+ ;;
+ esac
+Index: git/sysdeps/gnu/configure.ac
+===================================================================
+--- git.orig/sysdeps/gnu/configure.ac 2014-08-27 07:24:38.572070587 +0000
++++ git/sysdeps/gnu/configure.ac 2014-08-27 07:24:41.308070587 +0000
+@@ -21,6 +21,6 @@
+ else
+ libc_cv_localstatedir=$localstatedir
+ fi
+- libc_cv_rootsbindir=/sbin
++ test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
+ ;;
+ esac
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch
index 511ee9d19e..f88eaf444e 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/fsl-ppc-no-fsqrt.patch
+++ b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch
@@ -7,12 +7,12 @@ emit fsqrt intructions
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/fpu/math_private.h
+Index: git/sysdeps/powerpc/fpu/math_private.h
===================================================================
---- libc.orig/sysdeps/powerpc/fpu/math_private.h
-+++ libc/sysdeps/powerpc/fpu/math_private.h
+--- git.orig/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.224070587 -0700
++++ git/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -25,10 +25,12 @@
- #include <dl-procinfo.h>
+ #include <fenv_private.h>
#include_next <math_private.h>
-# if __WORDSIZE == 64 || defined _ARCH_PWR4
@@ -28,10 +28,10 @@ Index: libc/sysdeps/powerpc/fpu/math_private.h
# endif
extern double __slow_ieee754_sqrt (double);
-Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E5500_MATH_PRIVATE_H_
+#define _E5500_MATH_PRIVATE_H_ 1
@@ -42,10 +42,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E5500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E6500_MATH_PRIVATE_H_
+#define _E6500_MATH_PRIVATE_H_ 1
@@ -56,10 +56,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E6500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E500MC_MATH_PRIVATE_H_
+#define _E500MC_MATH_PRIVATE_H_ 1
@@ -70,10 +70,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E500MC_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E5500_MATH_PRIVATE_H_
+#define _E5500_MATH_PRIVATE_H_ 1
@@ -84,10 +84,10 @@ Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
+#include_next <math_private.h>
+
+#endif /* _E5500_MATH_PRIVATE_H_ */
-Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
===================================================================
---- /dev/null
-+++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700
@@ -0,0 +1,9 @@
+#ifndef _E6500_MATH_PRIVATE_H_
+#define _E6500_MATH_PRIVATE_H_ 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk b/meta/recipes-core/glibc/glibc/generate-supported.mk
index d2a28c2dc6..d2a28c2dc6 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/generate-supported.mk
+++ b/meta/recipes-core/glibc/glibc/generate-supported.mk
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch b/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch
index 689b79c61c..f5ed1bfeef 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch
+++ b/meta/recipes-core/glibc/glibc/glibc.fix_sqrt2.patch
@@ -1,10 +1,10 @@
Signed-of-by: Edmar Wienskoski <edmar@freescale.com>
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -140,10 +140,10 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -246,10 +246,10 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:34:07.768070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -385,10 +385,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -491,10 +491,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -630,10 +630,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -736,10 +736,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -875,10 +875,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -981,10 +981,10 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1120,10 +1120,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1226,10 +1226,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:34:07.772070587 -0700
@@ -0,0 +1,134 @@
+/* Double-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1365,10 +1365,10 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+ }
+ return f_wash (b);
+}
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
---- /dev/null
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1,101 @@
+/* Single-precision floating point square root.
+ Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1471,46 +1471,46 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+ }
+ return f_washf (b);
+}
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/603e/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e300c3/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1,2 @@
+# e300c3 is a variant of 603e so use the same optimizations for sqrt
+powerpc/powerpc32/603e/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e500mc/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e5500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2014-08-29 10:34:07.776070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc32/e6500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc64/e5500/fpu
-Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+Index: git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
===================================================================
---- /dev/null
-+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2014-08-29 10:34:07.780070587 -0700
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch b/meta/recipes-core/glibc/glibc/grok_gold.patch
index d46737af98..26875c79d4 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/grok_gold.patch
+++ b/meta/recipes-core/glibc/glibc/grok_gold.patch
@@ -6,11 +6,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Backport
-Index: libc/configure
+Index: git/configure
===================================================================
---- libc.orig/configure
-+++ libc/configure
-@@ -4654,7 +4654,7 @@ else
+--- git.orig/configure 2014-08-29 10:32:34.464070587 -0700
++++ git/configure 2014-08-29 10:32:34.456070587 -0700
+@@ -4592,7 +4592,7 @@
# 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; }
@@ -19,11 +19,11 @@ Index: libc/configure
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
-Index: libc/configure.ac
+Index: git/configure.ac
===================================================================
---- libc.orig/configure.ac
-+++ libc/configure.ac
-@@ -990,7 +990,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
+--- git.orig/configure.ac 2014-08-29 10:32:34.464070587 -0700
++++ git/configure.ac 2014-08-29 10:32:34.460070587 -0700
+@@ -930,7 +930,7 @@
[GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
AC_CHECK_PROG_VER(LD, $LD, --version,
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch b/meta/recipes-core/glibc/glibc/initgroups_keys.patch
index be29856b03..32aa15a533 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/initgroups_keys.patch
+++ b/meta/recipes-core/glibc/glibc/initgroups_keys.patch
@@ -5,16 +5,16 @@ as undefined symbol
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: libc/nss/getent.c
+Index: git/nss/getent.c
===================================================================
---- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800
-+++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800
-@@ -898,7 +898,7 @@
+--- git.orig/nss/getent.c 2014-08-27 05:15:25.996070587 +0000
++++ git/nss/getent.c 2014-08-27 05:16:00.048070587 +0000
+@@ -879,7 +879,7 @@
D(group)
D(gshadow)
- DN(hosts)
+ D(hosts)
-D(initgroups)
+DN(initgroups)
- DN(netgroup)
- DN(networks)
+ D(netgroup)
+ D(networks)
D(passwd)
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch b/meta/recipes-core/glibc/glibc/ld-search-order.patch
index e83a0ad6d2..f518bc7642 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ld-search-order.patch
+++ b/meta/recipes-core/glibc/glibc/ld-search-order.patch
@@ -19,12 +19,12 @@ means we need to switch the order of 3 and 4 above to make this work effectively
RP 14/10/2010
-Index: libc/elf/dl-load.c
+Index: git/elf/dl-load.c
===================================================================
---- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800
-+++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800
-@@ -2215,7 +2215,14 @@
- fd = open_path (name, namelen, mode & __RTLD_SECURE,
+--- git.orig/elf/dl-load.c 2014-08-28 17:32:46.292070587 -0700
++++ git/elf/dl-load.c 2014-08-28 17:33:56.048070587 -0700
+@@ -2050,7 +2050,14 @@
+ fd = open_path (name, namelen, mode,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
-
@@ -38,19 +38,19 @@ Index: libc/elf/dl-load.c
+ /* Finally try ld.so.cache */
#ifdef USE_LDCONFIG
if (fd == -1
- && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
-@@ -2283,14 +2290,6 @@
+ && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
+@@ -2113,14 +2120,6 @@
}
#endif
- /* Finally, try the default path. */
- if (fd == -1
- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
-- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
+- || __glibc_likely (!(l->l_flags_1 & DF_1_NODEFLIB)))
- && rtld_search_dirs.dirs != (void *) -1)
-- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
+- fd = open_path (name, namelen, mode, &rtld_search_dirs,
- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
-
/* Add another newline when we are tracing the library loading. */
- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
+ if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch b/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch
index 9b646fea95..9f593d6359 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/mips-rld-map-check.patch
+++ b/meta/recipes-core/glibc/glibc/mips-rld-map-check.patch
@@ -11,9 +11,10 @@ Upstream-Status: Pending
---
-diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
---- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
-+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
+Index: git/sysdeps/mips/dl-machine.h
+===================================================================
+--- git.orig/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.840070587 +0000
++++ git/sysdeps/mips/dl-machine.h 2014-08-27 04:58:11.832070587 +0000
@@ -70,7 +70,8 @@
/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
with the run-time address of the r_debug structure */
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch b/meta/recipes-core/glibc/glibc/multilib_readlib.patch
index 1542b1b519..13ffc46f91 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/multilib_readlib.patch
+++ b/meta/recipes-core/glibc/glibc/multilib_readlib.patch
@@ -5,9 +5,11 @@ variable EGLIBC_KNOWN_INTERPRETER_NAMES.
Lianhao Lu, 08/01/2011
---- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800
-+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800
-@@ -52,6 +52,7 @@
+Index: git/elf/readlib.c
+===================================================================
+--- git.orig/elf/readlib.c 2014-08-29 10:34:16.824070587 -0700
++++ git/elf/readlib.c 2014-08-29 10:34:16.816070587 -0700
+@@ -51,6 +51,7 @@
#ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
SYSDEP_KNOWN_INTERPRETER_NAMES
#endif
diff --git a/meta/recipes-core/glibc/glibc/option-groups.patch b/meta/recipes-core/glibc/glibc/option-groups.patch
new file mode 100644
index 0000000000..198be73524
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/option-groups.patch
@@ -0,0 +1,1397 @@
+Eglibc option group infrastructure
+
+Upstream-Status: Pending
+
+Index: git/option-groups.def
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.def 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,868 @@
++# This file documents the option groups EGLIBC currently supports, in
++# a format akin to the Linux Kconfig system's. The syntax may change
++# over time.
++#
++# An entry of the form:
++#
++# config GROUP_NAME
++# bool "one-line explanation of what this option group controls"
++# help
++# Multi-line help explaining the option group's meaning in
++# some detail, terminated by indentation level.
++#
++# defines an option group whose variable is GROUP_NAME, with
++# meaningful values 'y' (enabled) and 'n' (disabled). The
++# documentation is formatted to be consumed by some sort of
++# interactive configuration interface, but EGLIBC doesn't have such an
++# interface yet.
++#
++# An option may have a 'depends on' line, indicating which other options
++# must also be enabled if this option is. At present, EGLIBC doesn't
++# check that these dependencies are satisfied.
++#
++# Option group variables get their default values from the file
++# 'option-groups.defaults', in the top directory of the EGLIBC source
++# tree. By default, all EGLIBC option groups are enabled --- their
++# variables are set to 'y'.
++#
++# After including 'option-groups.defaults', the EGLIBC make machinery
++# includes the file 'option-groups.config' from the top of the build
++# tree, if it is present. Developers can place assignments to option
++# group variables in that file to override the defaults. For example,
++# to disable an option group, place a line of the form:
++#
++# OPTION_GROUP_NAME = n
++#
++# in 'option-groups.config' at the top of your build tree. To
++# explicitly enable an option group, you may also write:
++#
++# OPTION_GROUP_NAME = y
++#
++# although this simply reestablishes the value already set by
++# 'option-groups.defaults'.
++
++config EGLIBC_ADVANCED_INET6
++ bool "IPv6 Advanced Sockets API support (RFC3542)"
++ depends on EGLIBC_INET
++ help
++ This option group includes the functions specified by RFC 3542,
++ "Advanced Sockets Application Program Interface (API) for
++ IPv6".
++
++ This option group includes the following functions:
++
++ inet6_opt_append
++ inet6_opt_find
++ inet6_opt_finish
++ inet6_opt_get_val
++ inet6_opt_init
++ inet6_option_alloc
++ inet6_option_append
++ inet6_option_find
++ inet6_option_init
++ inet6_option_next
++ inet6_option_space
++ inet6_opt_next
++ inet6_opt_set_val
++ inet6_rth_add
++ inet6_rth_getaddr
++ inet6_rth_init
++ inet6_rth_reverse
++ inet6_rth_segments
++ inet6_rth_space
++
++config EGLIBC_BACKTRACE
++ bool "Functions for producing backtraces"
++ help
++ This option group includes functions for producing a list of
++ the function calls that are currently active in a thread, from
++ within the thread itself. These functions are often used
++ within signal handlers, to produce diagnostic output.
++
++ This option group includes the following functions:
++
++ backtrace
++ backtrace_symbols
++ backtrace_symbols_fd
++
++config EGLIBC_BIG_MACROS
++ bool "Use extensive inline code"
++ help
++ This option group specifies whether certain pieces of code
++ should be inlined to achieve maximum speed. If this option
++ group is not selected, function calls will be used instead,
++ hence reducing the library footprint.
++
++config EGLIBC_BSD
++ bool "BSD-specific functions, and their compatibility stubs"
++ help
++ This option group includes functions specific to BSD kernels.
++ A number of these functions have stub versions that are also
++ included in libraries built for non-BSD systems for
++ compatibility.
++
++ This option group includes the following functions:
++
++ chflags
++ fchflags
++ lchmod
++ revoke
++ setlogin
++
++config EGLIBC_CXX_TESTS
++ bool "Tests that link against the standard C++ library."
++ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
++ help
++ This option group does not include any C library functions;
++ instead, it controls which EGLIBC tests an ordinary 'make
++ tests' runs. With this group disabled, tests that would
++ normally link against the standard C++ library are not
++ run.
++
++ The standard C++ library depends on the math library 'libm' and
++ the wide character I/O functions included in EGLIBC. So those
++ option groups must be enabled if this test is enabled.
++
++config EGLIBC_CATGETS
++ bool "Functions for accessing message catalogs"
++ depends on EGLIBC_LOCALE_CODE
++ help
++ This option group includes functions for accessing message
++ catalogs: catopen, catclose, and catgets.
++
++ This option group depends on the EGLIBC_LOCALE_CODE
++ option group.
++
++config EGLIBC_CHARSETS
++ bool "iconv/gconv character set conversion libraries"
++ help
++ This option group includes support for character sets other
++ than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
++ various encodings. This affects both the character sets
++ supported by the wide and multibyte character functions, and
++ those supported by the 'iconv' functions.
++
++ With this option group disabled, EGLIBC supports only the
++ following character sets:
++
++ ANSI_X3.4 - ASCII
++ ANSI_X3.4-1968
++ ANSI_X3.4-1986
++ ASCII
++ CP367
++ CSASCII
++ IBM367
++ ISO-IR-6
++ ISO646-US
++ ISO_646.IRV:1991
++ OSF00010020
++ US
++ US-ASCII
++
++ 10646-1:1993 - ISO 10646, in big-endian UCS4 form
++ 10646-1:1993/UCS4
++ CSUCS4
++ ISO-10646
++ ISO-10646/UCS4
++ OSF00010104
++ OSF00010105
++ OSF00010106
++ UCS-4
++ UCS-4BE
++ UCS4
++
++ UCS-4LE - ISO 10646, in little-endian UCS4 form
++
++ ISO-10646/UTF-8 - ISO 10646, in UTF-8 form
++ ISO-10646/UTF8
++ ISO-IR-193
++ OSF05010001
++ UTF-8
++ UTF8
++
++ ISO-10646/UCS2 - ISO 10646, in target-endian UCS2 form
++ OSF00010100
++ OSF00010101
++ OSF00010102
++ UCS-2
++ UCS2
++
++ UCS-2BE - ISO 10646, in big-endian UCS2 form
++ UNICODEBIG
++
++ UCS-2LE - ISO 10646, in little-endian UCS2 form
++ UNICODELITTLE
++
++ WCHAR_T - EGLIBC's internal form (target-endian,
++ 32-bit ISO 10646)
++
++config EGLIBC_CRYPT
++ bool "Encryption library"
++ help
++ This option group includes the `libcrypt' library which
++ provides functions for one-way encryption. Supported
++ encryption algorithms include MD5, SHA-256, SHA-512 and DES.
++
++config EGLIBC_CRYPT_UFC
++ bool "Ultra fast `crypt' implementation"
++ depends on EGLIBC_CRYPT
++ help
++ This option group provides ultra fast DES-based implementation of
++ the `crypt' function. When this option group is disabled,
++ (a) the library will not provide the setkey[_r] and encrypt[_r]
++ functions and (b) the crypt[_r] function will return NULL and set the
++ errno to ENOSYS if /salt/ passed does not correspond to either MD5,
++ SHA-256 or SHA-512 algorithm.
++
++config EGLIBC_DB_ALIASES
++ bool "Functions for accessing the mail aliases database"
++ help
++ This option group includues functions for looking up mail
++ aliases in '/etc/aliases' or using nsswitch. It includes the
++ following functions:
++
++ endaliasent
++ getaliasbyname
++ getaliasbyname_r
++ getaliasent
++ getaliasent_r
++ setaliasent
++
++ When this option group is disabled, the NSS service libraries
++ also lack support for querying their mail alias tables.
++
++config EGLIBC_ENVZ
++ bool "Functions for handling envz-style environment vectors."
++ help
++ This option group contains functions for creating and operating
++ on envz vectors. An "envz vector" is a vector of strings in a
++ contiguous block of memory, where each element is a name-value
++ pair, and elements are separated from their neighbors by null
++ characters.
++
++ This option group includes the following functions:
++
++ envz_add envz_merge
++ envz_entry envz_remove
++ envz_get envz_strip
++
++config EGLIBC_FCVT
++ bool "Functions for converting floating-point numbers to strings"
++ help
++ This option group includes functions for converting
++ floating-point numbers to strings.
++
++ This option group includes the following functions:
++
++ ecvt qecvt
++ ecvt_r qecvt_r
++ fcvt qfcvt
++ fcvt_r qfcvt_r
++ gcvt qgcvt
++
++config EGLIBC_FMTMSG
++ bool "Functions for formatting messages"
++ help
++ This option group includes the following functions:
++
++ addseverity fmtmsg
++
++config EGLIBC_FSTAB
++ bool "Access functions for 'fstab'"
++ help
++ This option group includes functions for reading the mount
++ point specification table, '/etc/fstab'. These functions are
++ not included in the POSIX standard, which provides the
++ 'getmntent' family of functions instead.
++
++ This option group includes the following functions:
++
++ endfsent getfsspec
++ getfsent setfsent
++ getfsfile
++
++config EGLIBC_FTRAVERSE
++ bool "Functions for traversing file hierarchies"
++ help
++ This option group includes functions for traversing file
++ UNIX file hierachies.
++
++ This option group includes the following functions:
++
++ fts_open ftw
++ fts_read nftw
++ fts_children ftw64
++ fts_set nftw64
++ fts_close
++
++config EGLIBC_GETLOGIN
++ bool "The getlogin function"
++ depends on EGLIBC_UTMP
++ help
++ This function group includes the 'getlogin' and 'getlogin_r'
++ functions, which return the user name associated by the login
++ activity with the current process's controlling terminal.
++
++ With this option group disabled, the 'glob' function will not
++ fall back on 'getlogin' to find the user's login name for tilde
++ expansion when the 'HOME' environment variable is not set.
++
++config EGLIBC_IDN
++ bool "International domain names support"
++ help
++ This option group includes the `libcidn' library which
++ provides support for international domain names.
++
++config EGLIBC_INET
++ bool "Networking support"
++ help
++ This option group includes networking-specific functions and
++ data. With EGLIBC_INET disabled, the EGLIBC
++ installation and API changes as follows:
++
++ - The following libraries are not installed:
++
++ libnsl
++ libnss_compat
++ libnss_dns
++ libnss_hesiod
++ libnss_nis
++ libnss_nisplus
++ libresolv
++
++ - The following functions and variables are omitted from libc:
++
++ authdes_create hstrerror svc_fdset
++ authdes_getucred htonl svc_getreq
++ authdes_pk_create htons svc_getreq_common
++ authnone_create if_freenameindex svc_getreq_poll
++ authunix_create if_indextoname svc_getreqset
++ authunix_create_default if_nameindex svc_max_pollfd
++ bindresvport if_nametoindex svc_pollfd
++ callrpc in6addr_any svcraw_create
++ cbc_crypt in6addr_loopback svc_register
++ clnt_broadcast inet6_opt_append svc_run
++ clnt_create inet6_opt_find svc_sendreply
++ clnt_pcreateerror inet6_opt_finish svctcp_create
++ clnt_perrno inet6_opt_get_val svcudp_bufcreate
++ clnt_perror inet6_opt_init svcudp_create
++ clntraw_create inet6_option_alloc svcudp_enablecache
++ clnt_spcreateerror inet6_option_append svcunix_create
++ clnt_sperrno inet6_option_find svcunixfd_create
++ clnt_sperror inet6_option_init svc_unregister
++ clnttcp_create inet6_option_next user2netname
++ clntudp_bufcreate inet6_option_space xdecrypt
++ clntudp_create inet6_opt_next xdr_accepted_reply
++ clntunix_create inet6_opt_set_val xdr_array
++ des_setparity inet6_rth_add xdr_authdes_cred
++ ecb_crypt inet6_rth_getaddr xdr_authdes_verf
++ endaliasent inet6_rth_init xdr_authunix_parms
++ endhostent inet6_rth_reverse xdr_bool
++ endnetent inet6_rth_segments xdr_bytes
++ endnetgrent inet6_rth_space xdr_callhdr
++ endprotoent inet_addr xdr_callmsg
++ endrpcent inet_aton xdr_char
++ endservent inet_lnaof xdr_cryptkeyarg
++ ether_aton inet_makeaddr xdr_cryptkeyarg2
++ ether_aton_r inet_netof xdr_cryptkeyres
++ ether_hostton inet_network xdr_des_block
++ ether_line inet_nsap_addr xdr_double
++ ether_ntoa inet_nsap_ntoa xdr_enum
++ ether_ntoa_r inet_ntoa xdr_float
++ ether_ntohost inet_ntop xdr_free
++ freeaddrinfo inet_pton xdr_getcredres
++ freeifaddrs innetgr xdr_hyper
++ gai_strerror iruserok xdr_int
++ getaddrinfo iruserok_af xdr_int16_t
++ getaliasbyname key_decryptsession xdr_int32_t
++ getaliasbyname_r key_decryptsession_pk xdr_int64_t
++ getaliasent key_encryptsession xdr_int8_t
++ getaliasent_r key_encryptsession_pk xdr_keybuf
++ gethostbyaddr key_gendes xdr_key_netstarg
++ gethostbyaddr_r key_get_conv xdr_key_netstres
++ gethostbyname key_secretkey_is_set xdr_keystatus
++ gethostbyname2 key_setnet xdr_long
++ gethostbyname2_r key_setsecret xdr_longlong_t
++ gethostbyname_r netname2host xdrmem_create
++ gethostent netname2user xdr_netnamestr
++ gethostent_r ntohl xdr_netobj
++ getifaddrs ntohs xdr_opaque
++ getipv4sourcefilter passwd2des xdr_opaque_auth
++ get_myaddress pmap_getmaps xdr_pmap
++ getnameinfo pmap_getport xdr_pmaplist
++ getnetbyaddr pmap_rmtcall xdr_pointer
++ getnetbyaddr_r pmap_set xdr_quad_t
++ getnetbyname pmap_unset xdrrec_create
++ getnetbyname_r rcmd xdrrec_endofrecord
++ getnetent rcmd_af xdrrec_eof
++ getnetent_r registerrpc xdrrec_skiprecord
++ getnetgrent res_init xdr_reference
++ getnetgrent_r rexec xdr_rejected_reply
++ getnetname rexec_af xdr_replymsg
++ getprotobyname rexecoptions xdr_rmtcall_args
++ getprotobyname_r rpc_createerr xdr_rmtcallres
++ getprotobynumber rresvport xdr_short
++ getprotobynumber_r rresvport_af xdr_sizeof
++ getprotoent rtime xdrstdio_create
++ getprotoent_r ruserok xdr_string
++ getpublickey ruserok_af xdr_u_char
++ getrpcbyname ruserpass xdr_u_hyper
++ getrpcbyname_r setaliasent xdr_u_int
++ getrpcbynumber sethostent xdr_uint16_t
++ getrpcbynumber_r setipv4sourcefilter xdr_uint32_t
++ getrpcent setnetent xdr_uint64_t
++ getrpcent_r setnetgrent xdr_uint8_t
++ getrpcport setprotoent xdr_u_long
++ getsecretkey setrpcent xdr_u_longlong_t
++ getservbyname setservent xdr_union
++ getservbyname_r setsourcefilter xdr_unixcred
++ getservbyport svcauthdes_stats xdr_u_quad_t
++ getservbyport_r svcerr_auth xdr_u_short
++ getservent svcerr_decode xdr_vector
++ getservent_r svcerr_noproc xdr_void
++ getsourcefilter svcerr_noprog xdr_wrapstring
++ h_errlist svcerr_progvers xencrypt
++ h_errno svcerr_systemerr xprt_register
++ herror svcerr_weakauth xprt_unregister
++ h_nerr svc_exit
++ host2netname svcfd_create
++
++ - The rpcgen, nscd, and rpcinfo commands are not installed.
++
++ - The 'rpc' file (a text file listing RPC services) is not installed.
++
++ Socket-related system calls do not fall in this option group,
++ because many are also used for other inter-process
++ communication mechanisms. For example, the 'syslog' routines
++ use Unix-domain sockets to communicate with the syslog daemon;
++ syslog is valuable in non-networked contexts.
++
++config EGLIBC_INET_ANL
++ bool "Asynchronous name lookup"
++ depends on EGLIBC_INET
++ help
++ This option group includes the `libanl' library which
++ provides support for asynchronous name lookup.
++
++config EGLIBC_LIBM
++ bool "libm (math library)"
++ help
++ This option group includes the 'libm' library, containing
++ mathematical functions. If this option group is omitted, then
++ an EGLIBC installation does not include shared or unshared versions
++ of the math library.
++
++ Note that this does not remove all floating-point related
++ functionality from EGLIBC; for example, 'printf' and 'scanf'
++ can still print and read floating-point values with this option
++ group disabled.
++
++ Note that the ISO Standard C++ library 'libstdc++' depends on
++ EGLIBC's math library 'libm'. If you disable this option
++ group, you will not be able to build 'libstdc++' against the
++ resulting EGLIBC installation.
++
++config EGLIBC_LOCALES
++ bool "Locale definitions"
++ help
++ This option group includes all locale definitions other than
++ that for the "C" locale. If this option group is omitted, then
++ only the "C" locale is supported.
++
++
++config EGLIBC_LOCALE_CODE
++ bool "Locale functions"
++ depends on POSIX_C_LANG_WIDE_CHAR
++ help
++ This option group includes locale support functions, programs,
++ and libraries. With EGLIBC_LOCALE_CODE disabled,
++ EGLIBC supports only the 'C' locale (also known as 'POSIX'),
++ and ignores the settings of the 'LANG' and 'LC_*' environment
++ variables.
++
++ With EGLIBC_LOCALE_CODE disabled, the following
++ functions are omitted from libc:
++
++ duplocale localeconv nl_langinfo rpmatch strfmon_l
++ freelocale newlocale nl_langinfo_l strfmon uselocale
++
++ Furthermore, only the LC_CTYPE and LC_TIME categories of the
++ standard "C" locale are available.
++
++ The EGLIBC_CATGETS option group depends on this option group.
++
++
++config EGLIBC_MEMUSAGE
++ bool "Memory profiling library"
++ help
++ This option group includes the `libmemusage' library and
++ the `memusage' and `memusagestat' utilities.
++ These components provide memory profiling functions.
++
++config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
++ int "Memory profiling library buffer size"
++ depends on EGLIBC_MEMUSAGE
++ default "32768"
++ help
++ Libmemusage library buffers the profiling data in memory
++ before writing it out to disk. By default, the library
++ allocates 1.5M buffer, which can be substantial for some
++ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
++ allows to change the default buffer size. It specifies
++ the number of entries the buffer should have.
++ On most architectures one buffer entry amounts to 48 bytes,
++ so setting this option to the value of 512 will reduce the size of
++ the memory buffer to 24K.
++
++config EGLIBC_NIS
++ bool "Support for NIS, NIS+, and the special 'compat' services."
++ depends on EGLIBC_INET && EGLIBC_SUNRPC
++ help
++ This option group includes the NIS, NIS+, and 'compat' Name
++ Service Switch service libraries. When it is disabled, those
++ services libraries are not installed; you should remove any
++ references to them from your 'nsswitch.conf' file.
++
++ This option group depends on the EGLIBC_INET option
++ group; you must enable that to enable this option group.
++
++config EGLIBC_NSSWITCH
++ bool "Name service switch (nsswitch) support"
++ help
++ This option group includes support for the 'nsswitch' facility.
++ With this option group enabled, all EGLIBC functions for
++ accessing various system databases (passwords and groups;
++ networking; aliases; public keys; and so on) consult the
++ '/etc/nsswitch.conf' configuration file to decide how to handle
++ queries.
++
++ With this option group disabled, EGLIBC uses a fixed list of
++ services to satisfy queries on each database, as requested by
++ configuration files specified when EGLIBC is built. Your
++ 'option-groups.config' file must set the following two
++ variables:
++
++config EGLIBC_NSSWITCH_FIXED_CONFIG
++ string "Nsswitch fixed config filename"
++ depends on !EGLIBC_NSSWITCH
++ default ""
++ help
++ Set this to the name of a file whose contents observe the
++ same syntax as an ordinary '/etc/nsswitch.conf' file. The
++ EGLIBC build process parses this file just as EGLIBC would
++ at run time if EGLIBC_NSSWITCH were enabled, and
++ produces a C library that uses the nsswitch service
++ libraries to search for database entries as this file
++ specifies, instead of consulting '/etc/nsswitch.conf' at run
++ time.
++
++ This should be an absolute filename. The EGLIBC build
++ process may use it from several different working
++ directories. It may include references to Makefile
++ variables like 'common-objpfx' (the top of the build tree,
++ with a trailing slash), or '..' (the top of the source tree,
++ with a trailing slash).
++
++ The EGLIBC source tree includes a sample configuration file
++ named 'nss/fixed-nsswitch.conf'; for simple configurations,
++ you will probably want to delete references to databases not
++ needed on your system.
++
++config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
++ string "Nsswitch fixed functions filename"
++ depends on !EGLIBC_NSSWITCH
++ default ""
++ help
++ The EGLIBC build process uses this file to decide which
++ functions to make available from which service libraries.
++ The file 'nss/fixed-nsswitch.functions' serves as a sample
++ configuration file for this setting, and explains its syntax
++ and meaning in more detail.
++
++ This should be an absolute file name. The EGLIBC build
++ process may use it from several different working
++ directories. It may include references to Makefile
++ variables like 'common-objpfx' (the top of the build tree,
++ with a trailing slash), or '..' (the top of the source tree,
++ with a trailing slash).
++
++ Be sure to mention each function in each service you wish to
++ use. If you do not mention a service's function here, the
++ EGLIBC database access functions will not find it, even if
++ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
++ file.
++
++ In this arrangement, EGLIBC will not use the 'dlopen' and
++ 'dlsym' functions to find database access functions. Instead,
++ libc hard-codes references to the service libraries' database
++ access functions. You must explicitly link your program
++ against the name service libraries (those whose names start
++ with 'libnss_', in the sysroot's '/lib' directory) whose
++ functions you intend to use. This arrangement helps
++ system-wide static analysis tools decide which functions a
++ system actually uses.
++
++ Note that some nsswitch service libraries require other option
++ groups to be enabled; for example, the EGLIBC_INET
++ option group must be enabled to use the 'libnss_dns.so.2'
++ service library, which uses the Domain Name System network
++ protocol to answer queries.
++
++config EGLIBC_RCMD
++ bool "Support for 'rcmd' and related library functions"
++ depends on EGLIBC_INET
++ help
++ This option group includes functions for running commands on
++ remote machines via the 'rsh' protocol, and doing authentication
++ related to those functions. This also includes functions that
++ use the 'rexec' protocol.
++
++ This option group includes the following functions:
++
++ rcmd ruserok
++ rcmd_af ruserok_af
++ rexec iruserok
++ rexec_af iruserok_af
++ rresvport ruserpass
++ rresvport_af
++
++config EGLIBC_RTLD_DEBUG
++ bool "Runtime linker debug print outs"
++ help
++ This option group enables debug output of the runtime linker
++ which is activated via LD_DEBUG and LD_TRACE_PRELINKING
++ environment variables. Disabling this option group yields
++ a smaller runtime linker binary.
++ BEWARE: Disabling this option group is likely to break
++ the `ldd' utility which may also be used by the prelinker.
++ In particular, the `--unused' ldd option will not work correctly.
++
++config EGLIBC_SPAWN
++ bool "Support for POSIX posix_spawn functions"
++ help
++ This option group includes the POSIX functions for executing
++ programs in child processes without using 'fork' or 'vfork'.
++
++ This option group includes the following functions:
++
++ posix_spawn
++ posix_spawnattr_destroy
++ posix_spawnattr_getflags
++ posix_spawnattr_getpgroup
++ posix_spawnattr_getschedparam
++ posix_spawnattr_getschedpolicy
++ posix_spawnattr_getsigdefault
++ posix_spawnattr_getsigmask
++ posix_spawnattr_init
++ posix_spawnattr_setflags
++ posix_spawnattr_setpgroup
++ posix_spawnattr_setschedparam
++ posix_spawnattr_setschedpolicy
++ posix_spawnattr_setsigdefault
++ posix_spawnattr_setsigmask
++ posix_spawn_file_actions_addclose
++ posix_spawn_file_actions_adddup2
++ posix_spawn_file_actions_addopen
++ posix_spawn_file_actions_destroy
++ posix_spawn_file_actions_init
++ posix_spawnp
++
++ This option group also provides the ability for the iconv,
++ localedef, and locale programs to operate transparently on
++ compressed charset definitions. When this option group is
++ disabled, those programs will only operate on uncompressed
++ charmap files.
++
++config EGLIBC_STREAMS
++ bool "Support for accessing STREAMS."
++ help
++ This option group includes functions for reading and writing
++ messages to and from STREAMS. The STREAMS interface provides a
++ uniform mechanism for implementing networking services and other
++ character-based I/O. (STREAMS are not to be confused with
++ <stdio.h> FILE objects, also called 'streams'.)
++
++ This option group includes the following functions:
++
++ getmsg putpmsg
++ getpmsg fattach
++ isastream fdetach
++ putmsg
++
++config EGLIBC_SUNRPC
++ bool "Support for the Sun 'RPC' protocol."
++ depends on EGLIBC_INET
++ help
++ This option group includes support for the Sun RPC protocols,
++ including the 'rpcgen' and 'rpcinfo' programs.
++
++config EGLIBC_UTMP
++ bool "Older access functions for 'utmp' login records"
++ help
++ This option group includes the older 'utent' family of
++ functions for accessing user login records in the 'utmp' file.
++ POSIX omits these functions in favor of the 'utxent' family,
++ and they are obsolete on systems other than Linux.
++
++ This option group includes the following functions:
++
++ endutent
++ getutent
++ getutent_r
++ getutid
++ getutid_r
++ getutline
++ getutline_r
++ logwtmp
++ pututline
++ setutent
++ updwtmp
++ utmpname
++
++ This option group includes the following libraries:
++
++ libutil.so (and libutil.a)
++
++config EGLIBC_UTMPX
++ bool "POSIX access functions for 'utmp' login records"
++ depends on EGLIBC_UTMP
++ help
++ This option group includes the POSIX functions for reading and
++ writing user login records in the 'utmp' file (usually
++ '/var/run/utmp'). The POSIX functions operate on 'struct
++ utmpx' structures, as opposed to the family of older 'utent'
++ functions, which operate on 'struct utmp' structures.
++
++ This option group includes the following functions:
++
++ endutxent
++ getutmp
++ getutmpx
++ getutxent
++ getutxid
++ getutxline
++ pututxline
++ setutxent
++ updwtmpx
++ utmpxname
++
++config EGLIBC_WORDEXP
++ bool "Shell-style word expansion"
++ help
++ This option group includes the 'wordexp' function for
++ performing word expansion in the manner of the shell, and the
++ accompanying 'wordfree' function.
++
++config POSIX_C_LANG_WIDE_CHAR
++ bool "ISO C library wide character functions, excluding I/O"
++ help
++ This option group includes the functions defined by the ISO C
++ standard for working with wide and multibyte characters in
++ memory. Functions for reading and writing wide and multibyte
++ characters from and to files call in the
++ POSIX_WIDE_CHAR_DEVICE_IO option group.
++
++ This option group includes the following functions:
++
++ btowc mbsinit wcscspn wcstoll
++ iswalnum mbsrtowcs wcsftime wcstombs
++ iswalpha mbstowcs wcslen wcstoul
++ iswblank mbtowc wcsncat wcstoull
++ iswcntrl swprintf wcsncmp wcstoumax
++ iswctype swscanf wcsncpy wcsxfrm
++ iswdigit towctrans wcspbrk wctob
++ iswgraph towlower wcsrchr wctomb
++ iswlower towupper wcsrtombs wctrans
++ iswprint vswprintf wcsspn wctype
++ iswpunct vswscanf wcsstr wmemchr
++ iswspace wcrtomb wcstod wmemcmp
++ iswupper wcscat wcstof wmemcpy
++ iswxdigit wcschr wcstoimax wmemmove
++ mblen wcscmp wcstok wmemset
++ mbrlen wcscoll wcstol
++ mbrtowc wcscpy wcstold
++
++config POSIX_REGEXP
++ bool "Regular expressions"
++ help
++ This option group includes the POSIX regular expression
++ functions, and the associated non-POSIX extensions and
++ compatibility functions.
++
++ With POSIX_REGEXP disabled, the following functions are
++ omitted from libc:
++
++ re_comp re_max_failures regcomp
++ re_compile_fastmap re_search regerror
++ re_compile_pattern re_search_2 regexec
++ re_exec re_set_registers regfree
++ re_match re_set_syntax rpmatch
++ re_match_2 re_syntax_options
++
++ Furthermore, the compatibility regexp interface defined in the
++ <regexp.h> header file, 'compile', 'step', and 'advance', is
++ omitted.
++
++config POSIX_REGEXP_GLIBC
++ bool "Regular expressions from GLIBC"
++ depends on POSIX_REGEXP
++ help
++ This option group specifies which regular expression
++ library to use. The choice is between regex
++ implementation from GLIBC and regex implementation from
++ libiberty. The GLIBC variant is fully POSIX conformant and
++ optimized for speed; regex from libiberty is more than twice
++ as small while still is enough for most practical purposes.
++
++config POSIX_WIDE_CHAR_DEVICE_IO
++ bool "Input and output functions for wide characters"
++ depends on POSIX_C_LANG_WIDE_CHAR
++ help
++ This option group includes functions for reading and writing
++ wide characters to and from <stdio.h> streams.
++
++ This option group includes the following functions:
++
++ fgetwc fwprintf putwchar vwscanf
++ fgetws fwscanf ungetwc wprintf
++ fputwc getwc vfwprintf wscanf
++ fputws getwchar vfwscanf
++ fwide putwc vwprintf
++
++ This option group further includes the following unlocked
++ variants of the above functions:
++
++ fgetwc_unlocked getwc_unlocked
++ fgetws_unlocked getwchar_unlocked
++ fputwc_unlocked putwc_unlocked
++ fputws_unlocked putwchar_unlocked
++
++ Note that the GNU standard C++ library, 'libstdc++.so', uses
++ some of these functions; you will not be able to link or run
++ C++ programs if you disable this option group.
++
++ This option group also affects the behavior of the following
++ functions:
++
++ fdopen
++ fopen
++ fopen64
++ freopen
++ freopen64
++
++ These functions all take an OPENTYPE parameter which may
++ contain a string of the form ",ccs=CHARSET", indicating that
++ the underlying file uses the character set named CHARSET.
++ This produces a wide-oriented stream, which is only useful
++ when the functions included in this option group are present.
++ If the user attempts to open a file specifying a character set
++ in the OPENTYPE parameter, and EGLIBC was built with this
++ option group disabled, the function returns NULL, and sets
++ errno to EINVAL.
++
++
++# This helps Emacs users browse this file using the page motion commands
++# and commands like 'pages-directory'.
++# Local Variables:
++# page-delimiter: "^config\\s-"
++# End:
+Index: git/option-groups.mak
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.mak 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,41 @@
++# Setup file for subdirectory Makefiles that define EGLIBC option groups.
++
++# EGLIBC shouldn't need to override this. However, the
++# cross-build-friendly localedef includes this makefile to get option
++# group variable definitions; it uses a single build tree for all the
++# multilibs, and needs to be able to specify a different option group
++# configuration file for each multilib.
++option_group_config_file ?= $(objdir)/option-groups.config
++
++# Read the default settings for all options.
++# We're included before ../Rules, so we can't assume $(..) is set.
++include $(firstword $(..) ../)option-groups.defaults
++
++# Read the developer's option group selections, overriding the
++# defaults from option-groups.defaults.
++-include $(option_group_config_file)
++
++# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
++# VAR should be a variable name, not a variable reference; this is
++# less general, but more terse for the intended use.
++# You can use it to add a file to a list if an option group is
++# disabled, like this:
++# routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
++define option-disabled
++$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
++endef
++
++# Establish 'routines-y', etc. as simply-expanded variables.
++aux-y :=
++extra-libs-others-y :=
++extra-libs-y :=
++extra-objs-y :=
++install-bin-y :=
++install-others-y :=
++install-sbin-y :=
++others-y :=
++others-pie-y :=
++routines-y :=
++test-srcs-y :=
++tests-y :=
++xtests-y :=
+Index: git/option-groups.defaults
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/option-groups.defaults 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,47 @@
++# This file sets default values for all option group variables
++# mentioned in option-groups.def; see that file for a description of
++# each option group.
++#
++# Subdirectory makefiles include this file before including the user's
++# settings from option-groups.config at the top of the build tree;
++# that file need only refer to those options whose default settings
++# are to be changed.
++#
++# By default, all option groups are enabled.
++OPTION_EGLIBC_ADVANCED_INET6 = y
++OPTION_EGLIBC_BACKTRACE = y
++OPTION_EGLIBC_BIG_MACROS = y
++OPTION_EGLIBC_BSD = y
++OPTION_EGLIBC_CXX_TESTS = y
++OPTION_EGLIBC_CATGETS = y
++OPTION_EGLIBC_CHARSETS = y
++OPTION_EGLIBC_CRYPT = y
++OPTION_EGLIBC_CRYPT_UFC = y
++OPTION_EGLIBC_DB_ALIASES = y
++OPTION_EGLIBC_ENVZ = y
++OPTION_EGLIBC_FCVT = y
++OPTION_EGLIBC_FMTMSG = y
++OPTION_EGLIBC_FSTAB = y
++OPTION_EGLIBC_FTRAVERSE = y
++OPTION_EGLIBC_GETLOGIN = y
++OPTION_EGLIBC_IDN = y
++OPTION_EGLIBC_INET = y
++OPTION_EGLIBC_INET_ANL = y
++OPTION_EGLIBC_LIBM = y
++OPTION_EGLIBC_LOCALES = y
++OPTION_EGLIBC_LOCALE_CODE = y
++OPTION_EGLIBC_MEMUSAGE = y
++OPTION_EGLIBC_NIS = y
++OPTION_EGLIBC_NSSWITCH = y
++OPTION_EGLIBC_RCMD = y
++OPTION_EGLIBC_RTLD_DEBUG = y
++OPTION_EGLIBC_SPAWN = y
++OPTION_EGLIBC_STREAMS = y
++OPTION_EGLIBC_SUNRPC = y
++OPTION_EGLIBC_UTMP = y
++OPTION_EGLIBC_UTMPX = y
++OPTION_EGLIBC_WORDEXP = y
++OPTION_POSIX_C_LANG_WIDE_CHAR = y
++OPTION_POSIX_REGEXP = y
++OPTION_POSIX_REGEXP_GLIBC = y
++OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-08-27 07:24:37.540070587 +0000
++++ git/Makefile 2014-08-27 07:24:41.656070587 +0000
+@@ -24,6 +24,7 @@
+
+ include Makeconfig
+
++include options-config/Makefile
+
+ # This is the default target; it makes everything except the tests.
+ .PHONY: all
+Index: git/EGLIBC.option-groups
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/EGLIBC.option-groups 2014-08-27 07:24:41.656070587 +0000
+@@ -0,0 +1,122 @@
++ -*- mode: text -*-
++
++ The EGLIBC Component Configuration System
++ Jim Blandy <jimb@codesourcery.com>
++
++Introduction
++
++The GNU C library (GLIBC) provides a broad range of functionality,
++ranging from internationalization support to transcendental
++mathematical functions. Its website boasts that "nearly all known and
++useful functions from any other C library are available." This
++exhaustive approach has been one of GLIBC's strengths on desktop and
++server systems, but it has also given GLIBC a large footprint, both in
++memory and on disk, making it a challenge to use in embedded systems
++with limited resources.
++
++The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
++designed to work well on embedded systems. In particular, EGLIBC's
++component configuration system allows embedded developers to build
++customized versions of the library that include only the features
++their application uses, reducing its space requirements.
++
++EGLIBC's component configuration system categorizes the library's
++functions into "option groups", and allows you to include or exclude
++option groups individually. Some option groups depend on others;
++EGLIBC tracks these relationships, and ensures that the selected
++configuration yields a functioning library.
++
++
++Consistent and Predictable Behavior
++
++A flexible configuration system is a mixed blessing: if the options
++offered are poorly designed, it can be hard to see which choices will
++have the desired effects, and choices with obscure consequences can
++make debugging difficult. EGLIBC's configuration follows some general
++principles to reduce these risks:
++
++- EGLIBC has a single default configuration for each target
++ architecture.
++
++- In the default configuration, all option groups are enabled, and
++ EGLIBC is upwardly API- and ABI-compatible with GLIBC.
++
++- As much as possible, configurations only affect what functions are
++ present, not how they behave. If the system works with an option
++ group disabled, it will still work with it enabled.
++
++- As much as possible, configurations only select option groups ---
++ they do not describe characteristics of the target architecture.
++
++These rules mean that you have a simple debugging strategy available
++if you suspect that your EGLIBC configuration might be the source of a
++problem: fall back to the default configuration, re-test, and then
++disable option groups one by one, until the problem reappears.
++
++
++The Option Groups
++
++To see the current full list of implemented option groups, refer to the
++file 'option-groups.def' at the top of the source tree, or run
++'make menuconfig' from the top-level build directory.
++
++The POSIX.1-2001 specification includes a suggested partition of all
++the functions in the POSIX C API into option groups: math functions
++like 'sin' and 'cos'; networking functions like 'socket' and
++'connect'; and so on. EGLIBC could use this partitioning as the basis
++for future option groups.
++
++
++Implementation
++
++The EGLIBC component configuration system resembles the approach used
++by the Linux kernel to select device drivers, network protocols, and
++other features. A file named 'option-groups.config' in the top-level
++build directory contains assignments to Make variables, each of which
++enables or disables a particular option group. If the variable's
++value is set to 'y', then the option group is enabled; if it set to
++anything else, the option group is omitted. The file
++'option-groups.defaults', at the top of the source tree, establishes
++default values for all variables; all option groups are enabled by
++default.
++
++For example, the following 'option-groups.config' would omit locale
++data, but include mathematical functions, and everything else:
++
++ OPTION_EGLIBC_LOCALES = n
++ OPTION_EGLIBC_LIBM = y
++
++Like the Linux kernel, EGLIBC supports a similar set of '*config' make
++targets to make it easier to create 'option-groups.config', with all
++dependencies between option groups automatically satisfied. Run
++'make help' to see the list of supported make config targets. For
++example, 'make menuconfig' will update the current config utilising a
++menu based program.
++
++The option group names and their type (boolean, int, hex, string), help
++description, and dependencies with other option groups, are described by
++'option-groups.def' at the top of the source tree, analogous to the
++'Kconfig' files in the Linux kernel.
++
++In general, each option group variable controls whether a given set of
++object files in EGLIBC is compiled and included in the final
++libraries, or omitted from the build.
++
++Each subdirectory's Makefile categorizes its routines, libraries, and
++executables by option group. For example, EGLIBC's 'math/Makefile'
++places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
++
++ extra-libs-$(OPTION_EGLIBC_LIBM) := libm
++
++Finally, common code in 'Makerules' cites the value of the variable
++'extra-libs-y', selecting only those libraries that belong to enabled
++option groups to be built.
++
++
++Current Status and Future Directions
++
++The EGLIBC component configuration system described here is still
++under development.
++
++We have used the system to subset some portions of EGLIBC's
++Index: libc/configure.ac
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2014-08-27 07:24:41.196070587 +0000
++++ git/configure.ac 2014-08-27 07:24:41.656070587 +0000
+@@ -127,6 +127,16 @@
+ [sysheaders=''])
+ AC_SUBST(sysheaders)
+
++AC_ARG_WITH([kconfig],
++ AC_HELP_STRING([--with-kconfig=PATH],
++ [location of kconfig tools to use (from Linux
++ kernel builds) to re-use for configuring EGLIBC
++ option groups]),
++ [KCONFIG_TOOLS=$withval],
++ [KCONFIG_TOOLS=''])
++AC_SUBST(KCONFIG_TOOLS)
++
++
+ AC_SUBST(use_default_link)
+ AC_ARG_WITH([default-link],
+ AC_HELP_STRING([--with-default-link],
+Index: git/config.make.in
+===================================================================
+--- git.orig/config.make.in 2014-08-27 07:24:37.560070587 +0000
++++ git/config.make.in 2014-08-27 07:24:41.656070587 +0000
+@@ -46,6 +46,8 @@
+ c++-sysincludes = @CXX_SYSINCLUDES@
+ all-warnings = @all_warnings@
+
++kconfig_tools = @KCONFIG_TOOLS@
++
+ have-z-combreloc = @libc_cv_z_combreloc@
+ have-z-execstack = @libc_cv_z_execstack@
+ have-Bgroup = @libc_cv_Bgroup@
+Index: git/configure
+===================================================================
+--- git.orig/configure 2014-08-27 07:24:41.192070587 +0000
++++ git/configure 2014-08-27 07:24:41.660070587 +0000
+@@ -619,6 +619,7 @@
+ PERL
+ BASH_SHELL
+ libc_cv_gcc_static_libgcc
++KCONFIG_TOOLS
+ CXX_SYSINCLUDES
+ SYSINCLUDES
+ AUTOCONF
+@@ -733,6 +734,7 @@
+ with_binutils
+ with_selinux
+ with_headers
++with_kconfig
+ with_default_link
+ enable_sanity_checks
+ enable_shared
+@@ -1437,6 +1439,9 @@
+ --with-selinux if building with SELinux support
+ --with-headers=PATH location of system headers to use (for example
+ /usr/src/linux/include) [default=compiler default]
++ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
++ builds) to re-use for configuring EGLIBC option
++ groups
+ --with-default-link do not use explicit linker scripts
+ --with-cpu=CPU select code for CPU variant
+
+@@ -3400,6 +3405,14 @@
+
+
+
++# Check whether --with-kconfig was given.
++if test "${with_kconfig+set}" = set; then
++ withval=$with_kconfig; KCONFIG_TOOLS=$withval
++else
++ KCONFIG_TOOLS=''
++fi
++
++
+
+ # Check whether --with-default-link was given.
+ if test "${with_default_link+set}" = set; then :
+Index: git/options-config/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/Makefile 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,55 @@
++# ===========================================================================
++# EGLIBC option-groups configuration targets
++# These targets are included from top-level makefile
++
++ifneq ($(kconfig_tools),)
++ifneq (no,$(PERL))
++
++ocdir := options-config
++
++OconfigDefaults := option-groups.defaults
++OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
++OconfigDef := option-groups.def
++Oconfig := $(common-objpfx)option-groups.config
++Oconfig_tmp := $(common-objpfx).tmp.config
++
++conf := $(kconfig_tools)/conf
++mconf := $(kconfig_tools)/mconf
++
++preproc := $(PERL) $(ocdir)/config-preproc.pl
++postproc := $(PERL) $(ocdir)/config-postproc.pl
++
++PHONY += defconfig config menuconfig
++
++defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(OconfigDefaults_tmp)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
++ $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++ rm $(OconfigDefaults_tmp)
++
++config: $(conf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++
++menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
++ rm -f $(Oconfig_tmp)
++ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
++ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
++ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
++ rm $(Oconfig_tmp)
++
++# Help text used by make help
++help:
++ @echo ' defconfig - New config with default from default config'
++ @echo ' config - Update current config utilising a line-oriented program'
++ @echo ' menuconfig - Update current config utilising a menu based program'
++
++endif
++endif
+Index: git/options-config/config-postproc.pl
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/config-postproc.pl 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,58 @@
++#!/usr/bin/perl
++
++$usage = "usage: $0 <default config file> <config file>\n";
++
++die "$usage" unless @ARGV;
++$defaults = shift @ARGV;
++die "$usage" unless @ARGV;
++die "Could not open $ARGV[0]" unless -T $ARGV[0];
++
++sub yank {
++ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
++}
++
++open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
++
++# get the full list of available options using the default config file
++$i = 0;
++while (<DEFAULTS>) {
++ if (/^\s*OPTION_(\w+\s*=.*$)/) {
++ $option[$i++] = $1;
++ }
++}
++
++# now go through the config file, making the necessary changes
++while (<>) {
++ if (/Linux Kernel Configuration/) {
++ # change title
++ s/Linux Kernel/Option Groups/;
++ print;
++ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
++ # this is an explicit option set line, change CONFIG_ to OPTION_
++ # before printing and remove this option from option list
++ $opt = $1;
++ yank($opt);
++ s/CONFIG_/OPTION_/g;
++ print;
++ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
++ # this is a comment line for an unset boolean option, change CONFIG_
++ # to OPTION_, remove this option from option list, and convert to
++ # explicit OPTION_FOO=n
++ $opt = $1;
++ yank($opt);
++ s/CONFIG_/OPTION_/g;
++ print "OPTION_$opt=n\n";
++ } else {
++ print;
++ }
++}
++
++# any boolean options left in @options, are options that were not mentioned in
++# the config file, and implicitly that means the option must be set =n,
++# so do that here.
++foreach $opt (@option) {
++ if ($opt =~ /=\s*[yn]/) {
++ $opt =~ s/=\s*[yn]/=n/;
++ print "OPTION_$opt\n";
++ }
++}
+Index: git/options-config/config-preproc.pl
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/options-config/config-preproc.pl 2014-08-27 07:24:41.652070587 +0000
+@@ -0,0 +1,8 @@
++#!/usr/bin/perl
++
++if (@ARGV) {
++ while (<>) {
++ s/OPTION_/CONFIG_/g;
++ print;
++ }
++}
+Index: git/scripts/option-groups.awk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/scripts/option-groups.awk 2014-08-27 07:26:51.652070587 +0000
+@@ -0,0 +1,63 @@
++# option-groups.awk --- generate option group header file
++# Given input files containing makefile-style assignments to variables,
++# print out a header file that #defines an appropriate preprocessor
++# symbol for each variable left set to 'y'.
++
++BEGIN { FS="=" }
++
++# Trim spaces.
++{ gsub (/[[:blank:]]/, "") }
++
++# Skip comments.
++/^#/ { next }
++
++# Process assignments.
++NF == 2 {
++ vars[$1] = $2
++}
++
++# Print final values.
++END {
++ print "/* This file is automatically generated by scripts/option-groups.awk"
++ print " in the EGLIBC source tree."
++ print ""
++ print " It defines macros that indicate which EGLIBC option groups were"
++ print " configured in 'option-groups.config' when this C library was"
++ print " built. For each option group named OPTION_foo, it #defines"
++ print " __OPTION_foo to be 1 if the group is enabled, or #defines that"
++ print " symbol to be 0 if the group is disabled. */"
++ print ""
++ print "#ifndef __GNU_OPTION_GROUPS_H"
++ print "#define __GNU_OPTION_GROUPS_H"
++ print ""
++
++ # Produce a sorted list of variable names.
++ i=0
++ for (var in vars)
++ names[i++] = var
++ n = asort (names)
++
++ for (i = 1; i <= n; i++)
++ {
++ var = names[i]
++ if (var ~ /^OPTION_/)
++ {
++ if (vars[var] == "y")
++ print "#define __" var " 1"
++ else if (vars[var] == "n")
++ print "#define __" var " 0"
++ else if (vars[var] ~ /^[0-9]+/ ||
++ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
++ vars[var] ~ /^\"/)
++ print "#define __" var " " vars[var]
++ else
++ print "/* #undef __" var " */"
++ # Ignore variables that don't have boolean, int, hex, or
++ # string values. Ideally, this would be driven by the types
++ # given in option-groups.def.
++ }
++ }
++
++ print ""
++ print "#endif /* __GNU_OPTION_GROUPS_H */"
++}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch b/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch
index 6ea666b1d6..6ea666b1d6 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppc-sqrt_finite.patch
+++ b/meta/recipes-core/glibc/glibc/ppc-sqrt_finite.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch
index 60532cbd03..5b819bc458 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppc_slow_ieee754_sqrt.patch
+++ b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch
@@ -3,11 +3,11 @@
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -40,7 +40,7 @@
simultaneously. */
double
@@ -16,8 +16,8 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
+@@ -77,7 +77,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -25,7 +25,7 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+@@ -126,4 +126,12 @@
}
return f_wash (b);
}
@@ -38,11 +38,11 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -38,7 +38,7 @@
square root. */
float
@@ -51,7 +51,7 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
+@@ -93,4 +93,10 @@
}
return f_washf (b);
}
@@ -62,11 +62,11 @@ Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
+ return __slow_ieee754_sqrtf (x);
+}
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
-@@ -40,7 +40,7 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -40,7 +40,7 @@
simultaneously. */
double
@@ -75,8 +75,8 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
-
+@@ -77,7 +77,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -84,7 +84,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
+@@ -126,4 +126,12 @@
}
return f_wash (b);
}
@@ -97,11 +97,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
-@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -38,7 +38,7 @@
square root. */
float
@@ -110,7 +110,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
{
if (__builtin_expect (b > 0, 1))
{
-@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
+@@ -93,4 +93,11 @@
}
return f_washf (b);
}
@@ -122,11 +122,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -139,8 +139,8 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -148,7 +148,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -161,11 +161,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -178,7 +178,7 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -191,11 +191,11 @@ Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -208,8 +208,8 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -217,7 +217,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -230,11 +230,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -247,7 +247,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -260,11 +260,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
-@@ -41,10 +41,10 @@ static const float half = 0.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -41,10 +41,10 @@
#ifdef __STDC__
double
@@ -277,8 +277,8 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
double b;
#endif
{
-@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
-
+@@ -83,7 +83,7 @@
+
/* Handle small numbers by scaling. */
if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
- return __ieee754_sqrt (b * two108) * twom54;
@@ -286,7 +286,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
#define FMADD(a_, c_, b_) \
({ double __r; \
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -299,11 +299,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
-@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
+--- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -39,10 +39,10 @@
#ifdef __STDC__
float
@@ -316,7 +316,7 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
float b;
#endif
{
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
@@ -329,11 +329,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
+}
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
-@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
+--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700
+@@ -132,4 +132,12 @@
}
return f_wash (b);
}
@@ -346,11 +346,11 @@ Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
+}
+
strong_alias (__ieee754_sqrt, __sqrt_finite)
-Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
+Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
===================================================================
---- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
-@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
+--- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700
++++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700
+@@ -99,4 +99,12 @@
}
return f_washf (b);
}
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch
index 4c6c1070c3..4c6c1070c3 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/ppce6500-32b_slow_ieee754_sqrt.patch
+++ b/meta/recipes-core/glibc/glibc/ppce6500-32b_slow_ieee754_sqrt.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch b/meta/recipes-core/glibc/glibc/relocatable_sdk.patch
index ca5f17ba58..ca5f17ba58 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk.patch
+++ b/meta/recipes-core/glibc/glibc/relocatable_sdk.patch
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch
index f164f8f9ae..f164f8f9ae 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/relocatable_sdk_fix_openpath.patch
+++ b/meta/recipes-core/glibc/glibc/relocatable_sdk_fix_openpath.patch
diff --git a/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch b/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch
new file mode 100644
index 0000000000..55547deae7
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/timezone-re-written-tzselect-as-posix-sh.patch
@@ -0,0 +1,38 @@
+timezone: re-written tzselect as posix sh
+
+To avoid the bash dependency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ timezone/Makefile | 2 +-
+ timezone/tzselect.ksh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/timezone/Makefile
+===================================================================
+--- git.orig/timezone/Makefile 2014-08-27 05:35:58.008070587 +0000
++++ git/timezone/Makefile 2014-08-27 05:36:37.908070587 +0000
+@@ -114,7 +114,7 @@
+
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+- sed -e 's|/bin/bash|$(BASH)|' \
++ sed -e 's|/bin/bash|/bin/sh|' \
+ -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
+ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+Index: git/timezone/tzselect.ksh
+===================================================================
+--- git.orig/timezone/tzselect.ksh 2014-08-27 05:35:58.008070587 +0000
++++ git/timezone/tzselect.ksh 2014-08-27 05:35:58.000070587 +0000
+@@ -35,7 +35,7 @@
+
+ # Specify default values for environment variables if they are unset.
+ : ${AWK=awk}
+-: ${TZDIR=`pwd`}
++: ${TZDIR=$(pwd)}
+
+ # Check for awk Posix compliance.
+ ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
diff --git a/meta/recipes-core/eglibc/eglibc_2.19.bb b/meta/recipes-core/glibc/glibc_2.20.bb
index 2d354cbec5..8a8b296def 100644
--- a/meta/recipes-core/eglibc/eglibc_2.19.bb
+++ b/meta/recipes-core/glibc/glibc_2.20.bb
@@ -1,9 +1,12 @@
-require eglibc.inc
+require glibc.inc
DEPENDS += "gperf-native kconfig-frontends-native"
-SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25243.tar.bz2 \
- file://eglibc-svn-arm-lowlevellock-include-tls.patch \
+PV = "2.20"
+
+SRCREV = "b8079dd0d360648e4e8de48656c5c38972621072"
+
+SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \
file://IO-acquire-lock-fix.patch \
file://mips-rld-map-check.patch \
file://etc/ld.so.conf \
@@ -11,26 +14,38 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25
file://glibc.fix_sqrt2.patch \
file://multilib_readlib.patch \
file://ppc-sqrt_finite.patch \
- file://GLRO_dl_debug_mask.patch \
- file://initgroups_keys.patch \
- file://eglibc_fix_findidx_parameters.patch \
file://ppc_slow_ieee754_sqrt.patch \
- file://fileops-without-wchar-io.patch \
file://add_resource_h_to_wait_h.patch \
- file://0001-eglibc-menuconfig-support.patch \
- file://0002-eglibc-menuconfig-hex-string-options.patch \
- file://0003-eglibc-menuconfig-build-instructions.patch \
file://fsl-ppc-no-fsqrt.patch \
file://0001-R_ARM_TLS_DTPOFF32.patch \
file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://fix-tibetian-locales.patch \
file://ppce6500-32b_slow_ieee754_sqrt.patch \
file://grok_gold.patch \
- file://fix_am_rootsbindir.patch;striplevel=2 \
+ file://fix_am_rootsbindir.patch \
+ ${EGLIBCPATCHES} \
+ ${CVEPATCHES} \
"
-SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd"
-SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c"
+EGLIBCPATCHES = "\
+ file://timezone-re-written-tzselect-as-posix-sh.patch \
+ file://eglibc.patch \
+ file://option-groups.patch \
+ file://GLRO_dl_debug_mask.patch \
+ file://eglibc-header-bootstrap.patch \
+ file://eglibc-resolv-dynamic.patch \
+ file://eglibc-ppc8xx-cache-line-workaround.patch \
+ file://eglibc-sh4-fpscr_values.patch \
+ file://eglibc-use-option-groups.patch \
+ "
+# file://eglibc-install-pic-archives.patch \
+# file://initgroups_keys.patch \
+#
+CVEPATCHES = "\
+ file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
+ file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
+ file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \
+ "
LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
@@ -40,7 +55,7 @@ SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
file://relocatable_sdk.patch \
file://relocatable_sdk_fix_openpath.patch \
"
-S = "${WORKDIR}/eglibc-${PV}/libc"
+S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"
PACKAGES_DYNAMIC = ""
@@ -76,15 +91,18 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-selinux \
--enable-obsolete-rpc \
--with-kconfig=${STAGING_BINDIR_NATIVE} \
+ --disable-nscd \
${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)
}
-# for mips eglibc now builds syscall tables for all abi's
+# for mips glibc now builds syscall tables for all abi's
# so we make sure that we choose right march option which is
# compatible with o32,n32 and n64 abi's
# e.g. -march=mips32 is not compatible with n32 and n64 therefore
@@ -139,6 +157,6 @@ do_compile () {
}
-require eglibc-package.inc
+require glibc-package.inc
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch
index cdfeaeadd8..cdfeaeadd8 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/32and64bit.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README b/meta/recipes-core/glibc/ldconfig-native-2.12.1/README
index 43fb983729..43fb983729 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/README
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch
index 7f8e4db78a..7f8e4db78a 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling.patch
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch
new file mode 100644
index 0000000000..6aecfe5268
--- /dev/null
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Fix problem during parsing of ELF headers for 64bit on big-endian.
+Some header fields were read with wrong size.
+
+2014/10/24
+Par Olsson <Par.Olsson@windriver.com>
+Shan Hai <shan.hai@windriver.com>
+
+diff --git a/readelflib.c b/readelflib.c
+index 3f5b25b..0bf0de3 100644
+--- a/readelflib.c
++++ b/readelflib.c
+@@ -261,8 +261,8 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ int i;
+ unsigned int j;
+ Elf64_Addr loadaddr;
+- unsigned int dynamic_addr;
+- size_t dynamic_size;
++ Elf64_Addr dynamic_addr;
++ Elf64_Xword dynamic_size;
+ char *program_interpreter;
+
+ Elf64_Ehdr *elf_header;
+@@ -311,7 +311,7 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ error (0, 0, _("more than one dynamic segment\n"));
+
+ dynamic_addr = read64(segment->p_offset, be);
+- dynamic_size = read32(segment->p_filesz, be);
++ dynamic_size = read64(segment->p_filesz, be);
+ break;
+
+ case PT_INTERP:
+@@ -329,11 +329,11 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ break;
+
+ case PT_NOTE:
+- if (!*osversion && read32(segment->p_filesz, be) >= 32 && read32(segment->p_align, be) >= 4)
++ if (!*osversion && read64(segment->p_filesz, be) >= 32 && read64(segment->p_align, be) >= 4)
+ {
+ Elf64_Word *abi_note = (Elf64_Word *) (file_contents
+ + read64(segment->p_offset, be));
+- Elf64_Addr size = read32(segment->p_filesz, be);
++ Elf64_Xword size = read64(segment->p_filesz, be);
+
+ while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16
+ || read32(abi_note [2], be) != 1
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch
index a18b2c20de..a18b2c20de 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endianess-header.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch
index 4e9aab9416..4e9aab9416 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/flag_fix.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
index 5ed4f6ff69..5ed4f6ff69 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-default-to-all-multilib-dirs.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2 b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
index dc1e79888e..dc1e79888e 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
Binary files differ
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch
index 52986e61c7..52986e61c7 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
index 27bc411078..27bc411078 100644
--- a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
diff --git a/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
index 7c3463589b..1debf8ee2f 100644
--- a/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb
+++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
file://flag_fix.patch \
file://endianess-header.patch \
file://ldconfig-default-to-all-multilib-dirs.patch \
+ file://endian-ness_handling_fix.patch \
"
PR = "r2"
diff --git a/meta/recipes-core/eglibc/site_config/funcs b/meta/recipes-core/glibc/site_config/funcs
index ccc85392d7..ccc85392d7 100644
--- a/meta/recipes-core/eglibc/site_config/funcs
+++ b/meta/recipes-core/glibc/site_config/funcs
diff --git a/meta/recipes-core/eglibc/site_config/headers b/meta/recipes-core/glibc/site_config/headers
index 609ab53797..609ab53797 100644
--- a/meta/recipes-core/eglibc/site_config/headers
+++ b/meta/recipes-core/glibc/site_config/headers
diff --git a/meta/recipes-core/eglibc/site_config/types b/meta/recipes-core/glibc/site_config/types
index 178bd85a00..178bd85a00 100644
--- a/meta/recipes-core/eglibc/site_config/types
+++ b/meta/recipes-core/glibc/site_config/types
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
index b04a1b6a73..6472e87509 100644
--- a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
@@ -1,17 +1,23 @@
.encoding = "UTF-8"
-displayname = "Yocto Build Appliance"
-guestos = "other"
-tools.syncTime = "FALSE"
-virtualhw.version = "8"
config.version = "8"
+virtualHW.version = "10"
numvcpus = "2"
-cpuid.coresPerSocket = "1"
vcpu.hotadd = "TRUE"
-mem.hotadd = "TRUE"
memsize = "4096"
-svga.autodetect = "TRUE"
+mem.hotadd = "TRUE"
+sata0.present = "TRUE"
+sata0:0.present = "TRUE"
+sata0:0.fileName = "Yocto_Build_Appliance.vmdk"
+ethernet0.present = "TRUE"
+ethernet0.virtualDev = "e1000"
+ethernet0.wakeOnPcktRcv = "FALSE"
+ethernet0.addressType = "generated"
+usb.present = "TRUE"
+ehci.pciSlotNumber = "0"
+sound.present = "TRUE"
+sound.fileName = "-1"
+sound.autodetect = "TRUE"
pciBridge0.present = "TRUE"
-mks.enable3d = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
@@ -25,28 +31,16 @@ pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
-floppy0.present = "TRUE"
-floppy0.fileType = "device"
-floppy0.autodetect = "FALSE"
-floppy0.startConnected = "FALSE"
-ide1:0.present = "TRUE"
-ide1:0.deviceType = "atapi-cdrom"
-ide1:0.autodetect = "TRUE"
-ide1:0.startConnected = "FALSE"
-ide0:0.present = "TRUE"
-ide0:0.deviceType = "disk"
-ide0:0.fileName = "Yocto_Build_Appliance.vmdk"
-usb.present = "TRUE"
-scsi0.virtualDev = "lsilogic"
-scsi0.present = "TRUE"
-ethernet0.present = "TRUE"
-ethernet0.virtualDev = "e1000"
-ethernet0.connectionType = "bridged"
-ethernet0.startConnected = "TRUE"
-ethernet0.addressType = "generated"
-sound.present = "TRUE"
-sound.virtualDev = "es1371"
-sound.autodetect = "TRUE"
-extendedConfigFile = "Yocto_Build_Appliance.vmxf"
-sound.fileName = "-1"
+hpet0.present = "TRUE"
+usb.vbluetooth.startConnected = "TRUE"
+displayName = "Yocto Build Appliance"
+guestOS = "other3xlinux-64"
virtualHW.productCompatibility = "hosted"
+gui.exitOnCLIHLT = "FALSE"
+powerType.powerOff = "soft"
+powerType.powerOn = "soft"
+powerType.suspend = "soft"
+powerType.reset = "soft"
+extendedConfigFile = "Yocto_Build_Appliance.vmxf"
+scsi0:0.present = "FALSE"
+floppy0.present = "FALSE"
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
index ca3f0264d6..9e941ff2f3 100644
--- a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Foundry>
<VM>
-<VMId type="string">52 e4 0b df 7b 70 21 f8-88 56 a7 26 47 43 95 93</VMId>
+<VMId type="string">52 a5 d8 cb ed 6c 85 48-cd 99 68 af cc 30 a0 98</VMId>
<ClientMetaData>
<clientMetaDataAttributes/>
<HistoryEventList/></ClientMetaData>
diff --git a/meta/recipes-core/images/build-appliance-image_8.0.bb b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
index 1c07156cdd..e2b8bbc6ff 100644
--- a/meta/recipes-core/images/build-appliance-image_8.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk"
inherit core-image
-SRCREV ?= "cc7d457392133ad2ecf7335447a4a01a0d8a8e4e"
+SRCREV ?= "e24043500078733533a615f043c1af328354e3bd"
SRC_URI = "git://git.yoctoproject.org/poky \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces
@@ -0,0 +1,5 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
index 3d88506c05..733ae41f20 100644
--- a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
@@ -16,6 +16,8 @@ SRC_URI = "file://copyright \
file://interfaces \
file://nfsroot"
+S = "${WORKDIR}"
+
do_install () {
install -d ${D}${sysconfdir}/init.d \
${D}${sysconfdir}/network/if-pre-up.d \
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 8bd70251cd..89d0750b09 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -14,46 +14,76 @@ boot_size=20
# 5% for swap
swap_ratio=5
-found="no"
-
-echo "Searching for a hard drive..."
-for device in 'hda' 'hdb' 'sda' 'sdb' 'mmcblk0' 'mmcblk1'
-do
- if [ -e /sys/block/${device}/removable ]; then
- if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then
- found="yes"
-
- while true; 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]"
- read answer
- if [ "$answer" = "y" ] ; then
- break
- fi
-
- if [ "$answer" = "n" ] ; then
- found=no
- break
- fi
-
- echo "Please answer y or n"
- done
- fi
- fi
+# Get a list of hard drives
+hdnamelist=""
+live_dev_name=${1%%/*}
+live_dev_name=${live_dev_name%%[0-9]*}
+
+echo "Searching for hard drives ..."
+
+for device in `ls /sys/block/`; do
+ case $device in
+ loop*)
+ # skip loop device
+ ;;
+ sr*)
+ # skip CDROM device
+ ;;
+ ram*)
+ # skip ram device
+ ;;
+ *)
+ # skip the device LiveOS is on
+ # Add valid hard drive name to the list
+ if [ $device != $live_dev_name -a -e /dev/$device ]; then
+ hdnamelist="$hdnamelist $device"
+ fi
+ ;;
+ esac
+done
- if [ "$found" = "yes" ]; then
- break;
+TARGET_DEVICE_NAME=""
+for hdname in $hdnamelist; do
+ # Display found hard drives and their basic info
+ echo "-------------------------------"
+ echo /dev/$hdname
+ if [ -r /sys/block/$hdname/device/vendor ]; then
+ echo -n "VENDOR="
+ cat /sys/block/$hdname/device/vendor
+ fi
+ if [ -r /sys/block/$hdname/device/model ]; then
+ echo -n "MODEL="
+ cat /sys/block/$hdname/device/model
+ fi
+ if [ -r /sys/block/$hdname/device/uevent ]; then
+ echo -n "UEVENT="
+ cat /sys/block/$hdname/device/uevent
+ fi
+ echo
+ # Get user choice
+ while true; do
+ echo -n "Do you want to install this image there? [y/n] "
+ read answer
+ if [ "$answer" = "y" -o "$answer" = "n" ]; then
+ break
+ fi
+ echo "Please answer y or n"
+ done
+ if [ "$answer" = "y" ]; then
+ TARGET_DEVICE_NAME=$hdname
+ break
fi
done
-if [ "$found" = "no" ]; then
+if [ -n "$TARGET_DEVICE_NAME" ]; then
+ echo "Installing image on /dev/$TARGET_DEVICE_NAME ..."
+else
+ echo "No hard drive selected. Installation aborted."
exit 1
fi
-echo "Installing image on /dev/${device}"
+device=$TARGET_DEVICE_NAME
#
# The udev automounter can cause pain here, kill it
@@ -123,34 +153,32 @@ mkfs.ext3 $rootfs
echo "Formatting swap partition...($swap)"
mkswap $swap
-mkdir /ssd
-mkdir /rootmnt
-mkdir /bootmnt
-
-mount $rootfs /ssd
-mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt
+mkdir /tgt_root
+mkdir /src_root
+mkdir -p /boot
+# Handling of the target root partition
+mount $rootfs /tgt_root
+mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
echo "Copying rootfs files..."
-cp -a /rootmnt/* /ssd
-
-if [ -d /ssd/etc/ ] ; then
- echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab
-
+cp -a /src_root/* /tgt_root
+if [ -d /tgt_root/etc/ ] ; then
+ echo "$swap swap swap defaults 0 0" >> /tgt_root/etc/fstab
+ echo "$bootfs /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
- if [ -d /ssd/etc/udev/ ] ; then
- echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
+ if [ -d /tgt_root/etc/udev/ ] ; then
+ echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
fi
fi
-umount /ssd
-umount /rootmnt
+umount /src_root
+# Handling of the target boot partition
+mount $bootfs /boot
echo "Preparing boot partition..."
-mount $bootfs /ssd
-EFIDIR="/ssd/EFI/BOOT"
+EFIDIR="/boot/EFI/BOOT"
mkdir -p $EFIDIR
-cp /run/media/$1/vmlinuz /ssd
# Copy the efi loader
cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
@@ -171,11 +199,11 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
fi
if [ -d /run/media/$1/loader ]; then
- GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf"
+ GUMMIBOOT_CFGS="/tgt_root/loader/entries/*.conf"
# copy config files for gummiboot
- cp -dr /run/media/$1/loader /ssd
+ cp -dr /run/media/$1/loader /tgt_root
# delete the install entry
- rm -f /ssd/loader/entries/install.conf
+ rm -f /tgt_root/loader/entries/install.conf
# delete the initrd lines
sed -i "/initrd /d" $GUMMIBOOT_CFGS
# delete any LABEL= strings
@@ -186,7 +214,12 @@ if [ -d /run/media/$1/loader ]; then
sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS
fi
-umount /ssd
+umount /tgt_root
+
+cp /run/media/$1/vmlinuz /boot
+
+umount /boot
+
sync
echo "Remove your installation media, and press ENTER"
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 486c9f2635..fb537ee310 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -16,6 +16,7 @@ swap_ratio=5
# Get a list of hard drives
hdnamelist=""
live_dev_name=${1%%/*}
+live_dev_name=${live_dev_name%%[0-9]*}
echo "Searching for hard drives ..."
@@ -24,6 +25,9 @@ for device in `ls /sys/block/`; do
loop*)
# skip loop device
;;
+ sr*)
+ # skip CDROM device
+ ;;
ram*)
# skip ram device
;;
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 28219641a4..d852c5737f 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -8,6 +8,8 @@ MOUNT="/bin/mount"
UMOUNT="/bin/umount"
ISOLINUX=""
+ROOT_DISK=""
+
# Copied from initramfs-framework. The core of this script probably should be
# turned into initramfs-framework modules to reduce duplication.
udev_daemon() {
@@ -80,6 +82,10 @@ boot_live_root() {
udevadm settle --timeout=3 --quiet
killall "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # 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
+
# 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
@@ -116,10 +122,12 @@ 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
@@ -150,7 +158,7 @@ mount_and_boot() {
mkdir $ROOT_MOUNT
mknod /dev/loop0 b 7 0 2>/dev/null
- if ! mount -o rw,loop,noatime,nodiratime /run/media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
+ if ! mount -o rw,loop,noatime,nodiratime /run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
fatal "Could not mount rootfs image"
fi
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
index 0ede20b15d..7ae7969f5e 100644
--- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-boot.sh"
PR = "r2"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 403127be09..89b900dba9 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -14,6 +14,8 @@ SRC_URI = "file://init \
file://e2fs \
file://debug"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}/init.d
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
index 2d378e2101..b54cb619f1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -5,7 +5,9 @@ DEPENDS = "virtual/kernel"
RDEPENDS_${PN} = "udev udev-extraconf"
SRC_URI = "file://init-live.sh"
-PR = "r11"
+PR = "r12"
+
+S = "${WORKDIR}"
do_install() {
install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
@@ -13,5 +15,5 @@ do_install() {
FILES_${PN} += " /init "
-# Due to kernel depdendency
+# Due to kernel dependency
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
index a54960c596..c03bd2d765 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install-efi-testfs.sh"
RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-efi-testfs.sh ${D}/install-efi.sh
}
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 7195dc2718..b0994d78c3 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
@@ -7,6 +7,8 @@ PR = "r1"
RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/install-efi.sh
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
index db4cf544e8..937bfd4d38 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install-testfs.sh"
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
+S = "${WORKDIR}"
+
do_install() {
install -m 0755 ${WORKDIR}/init-install-testfs.sh ${D}/install.sh
}
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 7bf31c9cf8..6241a90e20 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -5,6 +5,8 @@ SRC_URI = "file://init-install.sh"
PR = "r9"
+S = "${WORKDIR}"
+
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
do_install() {
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index 3b5a47fcdd..df553bc079 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -36,7 +36,12 @@ if [ -f "${SYSCTL_CONF}" ]
then
if [ -x "/sbin/sysctl" ]
then
- /sbin/sysctl -p "${SYSCTL_CONF}"
+ # busybox sysctl does not support -q
+ VERBOSE_REDIR="1>/dev/null"
+ if [ "${VERBOSE}" != "no" ]; then
+ VERBOSE_REDIR="1>&1"
+ fi
+ eval /sbin/sysctl -p "${SYSCTL_CONF}" $VERBOSE_REDIR
else
echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
fi
@@ -61,10 +66,15 @@ fi
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
if test -e /etc/timestamp
then
- SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
+ SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S`
read TIMESTAMP < /etc/timestamp
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
- date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
+ # format the timestamp as date expects it (2m2d2H2M4Y.2S)
+ TS_YR=${TIMESTAMP%??????????}
+ TS_SEC=${TIMESTAMP#????????????}
+ TS_FIRST12=${TIMESTAMP%??}
+ TS_MIDDLE8=${TS_FIRST12#????}
+ date -u ${TS_MIDDLE8}${TS_YR}.${TS_SEC}
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
fi
fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
index 78fb91c409..95287cc139 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
@@ -16,7 +16,7 @@ fi
# Busybox hostname doesn't support -b so we need implement it on our own
if [ -f /etc/hostname ];then
- hostname -F /etc/hostname
+ hostname `cat /etc/hostname`
elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
hostname localhost
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 1f804e2374..b038fc59d4 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -10,4 +10,4 @@
### END INIT INFO
# Update the timestamp
-date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
+date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/urandom b/meta/recipes-core/initscripts/initscripts-1.0/urandom
index eb3a7c3359..af1625b5fd 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/urandom
+++ b/meta/recipes-core/initscripts/initscripts-1.0/urandom
@@ -12,20 +12,23 @@
### END INIT INFO
test -c /dev/urandom || exit 0
+
+RANDOM_SEED_FILE=/var/lib/urandom/random-seed
+
. /etc/default/rcS
+[ -f /etc/default/urandom ] && . /etc/default/urandom
case "$1" in
start|"")
test "$VERBOSE" != no && echo "Initializing random number generator..."
- # Load and then save 512 bytes,
- # which is the size of the entropy pool
- if test -f /var/lib/urandom/random-seed
- then
- cat /var/lib/urandom/random-seed >/dev/urandom
- fi
- rm -f /var/lib/urandom/random-seed
+ # Load and then save 512 bytes, which is the size of the entropy
+ # pool. Also load the current date, in case the seed file is
+ # empty.
+ ( date +%s.%N; [ -f "$RANDOM_SEED_FILE" ] && cat "$RANDOM_SEED_FILE" ) \
+ >/dev/urandom
+ rm -f "$RANDOM_SEED_FILE"
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
;;
@@ -34,7 +37,7 @@ case "$1" in
# see documentation in linux/drivers/char/random.c
test "$VERBOSE" != no && echo "Saving random seed..."
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
;;
*)
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 7273a82367..dfb75b261b 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -35,6 +35,8 @@ SRC_URI = "file://functions \
file://logrotate-dmesg.conf \
"
+S = "${WORKDIR}"
+
SRC_URI_append_arm = " file://alignment.sh"
KERNEL_VERSION = ""
@@ -139,11 +141,15 @@ do_install () {
MASKED_SCRIPTS = " \
banner \
bootmisc \
+ checkfs \
checkroot \
devpts \
+ dmesg \
hostname \
mountall \
mountnfs \
+ populate-volatile \
+ read-only-rootfs-hook \
rmnologin \
sysfs \
urandom"
@@ -158,3 +164,5 @@ pkg_postinst_${PN} () {
done
fi
}
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh"
diff --git a/meta/recipes-core/kbd/kbd_2.0.1.bb b/meta/recipes-core/kbd/kbd_2.0.2.bb
index 9c6eabbfb6..0aa976a46b 100644
--- a/meta/recipes-core/kbd/kbd_2.0.1.bb
+++ b/meta/recipes-core/kbd/kbd_2.0.2.bb
@@ -10,12 +10,12 @@ RREPLACES_${PN} = "console-tools"
RPROVIDES_${PN} = "console-tools"
RCONFLICTS_${PN} = "console-tools"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
file://uclibc-stdarg.patch \
"
-SRC_URI[md5sum] = "f80b93a6abddb6cc2a3652daaf7562ba"
-SRC_URI[sha256sum] = "223d60bb6882323cca161aeb5965590768b2f590fd7cddbf27511ad0ba7a429e"
+SRC_URI[md5sum] = "87475eb78b1d6e6ab06686dd323ad4ba"
+SRC_URI[sha256sum] = "9dfddabf96012e329c4bebb96a21aeef7c3872f624e96e8156ba542b82aeb912"
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc
index e0b50cf207..1314bbfb8d 100644
--- a/meta/recipes-core/libxml/libxml2.inc
+++ b/meta/recipes-core/libxml/libxml2.inc
@@ -20,17 +20,21 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
file://run-ptest \
file://libxml2-CVE-2014-0191-fix.patch \
file://python-sitepackages-dir.patch \
+ file://libxml-m4-use-pkgconfig.patch \
+ file://configure.ac-fix-cross-compiling-warning.patch \
"
BINCONFIG = "${bindir}/xml2-config"
inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-RDEPENDS_${PN}-ptest_append_libc-glibc += "eglibc-gconv-ebcdic-us eglibc-gconv-ibm1141"
+RDEPENDS_${PN}-ptest += "python-core"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
do_configure_prepend () {
- sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
+ sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.ac
}
do_configure_prepend_class-nativesdk () {
@@ -38,10 +42,11 @@ do_configure_prepend_class-nativesdk () {
export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
}
-EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
-EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
-EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-catalog --with-docbook --with-c14n --without-lzma"
+# WARNING: zlib is require for RPM use
+EXTRA_OECONF = "--without-python --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
# required for pythong binding
export HOST_SYS
@@ -61,7 +66,7 @@ PACKAGES += "${PN}-utils ${PN}-python"
FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
FILES_${PN}-utils += "${bindir}/*"
FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch b/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
new file mode 100644
index 0000000000..10a8112b58
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
@@ -0,0 +1,30 @@
+From 72a46a519ce7326d9a00f0b6a7f2a8e958cd1675 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 23 Oct 2014 11:35:36 +0800
+Subject: Fix missing entities after CVE-2014-3660 fix
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=738805
+
+The fix for CVE-2014-3660 introduced a regression in some case
+where entity substitution is required and the entity is used
+first in anotther entity referenced from an attribute value
+
+Upstream-Status: Backport
+
+diff --git a/parser.c b/parser.c
+index 67c9dfd..a8d1b67 100644
+--- a/parser.c
++++ b/parser.c
+@@ -7235,7 +7235,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ * far more secure as the parser will only process data coming from
+ * the document entity by default.
+ */
+- if ((ent->checked == 0) &&
++ if (((ent->checked == 0) ||
++ ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
+ ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
+ (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
+ unsigned long oldnbent = ctxt->nbentities;
+--
+cgit v0.10.1
+
diff --git a/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
new file mode 100644
index 0000000000..2f8079b052
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
@@ -0,0 +1,45 @@
+configure.ac: fix cross compiling warning
+
+There is a warning while cross compiling which triggered a
+failure by do_qa_configure
+...
+|configure:12652: checking for gzread in -lz
+|configure:12677: mips-poky-linux-gcc -meb -mabi=32 -mhard-float
+ -L/lib conftest.c -lz >&5
+|ld: warning: library search path "/lib" is unsafe for cross-compilation
+...
+
+While do the lib checking, do not add '-L${Z_DIR}/lib' to LDFLAGS could fix it.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9a90600..0bac8a4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -391,8 +391,6 @@ if test "$with_zlib" = "no"; then
+ echo "Disabling compression support"
+ else
+ AC_CHECK_HEADERS(zlib.h,
+- [SAVE_LDFLAGS="${LDFLAGS}"
+- LDFLAGS="-L${Z_DIR}/lib"
+ AC_CHECK_LIB(z, gzread,[
+ AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
+ WITH_ZLIB=1
+@@ -406,8 +404,7 @@ else
+ esac]
+ else
+ Z_LIBS="-lz"
+- fi])
+- LDFLAGS="${SAVE_LDFLAGS}"])
++ fi]))
+ fi
+
+ AC_SUBST(Z_CFLAGS)
+--
+1.9.1
+
diff --git a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
new file mode 100644
index 0000000000..0fc84070ed
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -0,0 +1,204 @@
+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>
+
+diff --git a/libxml.m4 b/libxml.m4
+index 68cd824..5fa0a9b 100644
+--- a/libxml.m4
++++ b/libxml.m4
+@@ -1,188 +1,12 @@
+-# Configure paths for LIBXML2
+-# Mike Hommey 2004-06-19
+-# use CPPFLAGS instead of CFLAGS
+-# Toshio Kuratomi 2001-04-21
+-# Adapted from:
+-# Configure paths for GLIB
+-# Owen Taylor 97-11-3
+-
+ dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
+ dnl
+-AC_DEFUN([AM_PATH_XML2],[
+-AC_ARG_WITH(xml-prefix,
+- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
+- xml_config_prefix="$withval", xml_config_prefix="")
+-AC_ARG_WITH(xml-exec-prefix,
+- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
+- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
+-AC_ARG_ENABLE(xmltest,
+- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
+- enable_xmltest=yes)
+-
+- if test x$xml_config_exec_prefix != x ; then
+- xml_config_args="$xml_config_args"
+- if test x${XML2_CONFIG+set} != xset ; then
+- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
+- fi
+- fi
+- if test x$xml_config_prefix != x ; then
+- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
+- if test x${XML2_CONFIG+set} != xset ; then
+- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
+- fi
+- fi
+-
+- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
+- min_xml_version=ifelse([$1], ,2.0.0,[$1])
+- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
+- no_xml=""
+- if test "$XML2_CONFIG" = "no" ; then
+- no_xml=yes
+- else
+- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
+- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
+- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
+- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+- if test "x$enable_xmltest" = "xyes" ; then
+- ac_save_CPPFLAGS="$CPPFLAGS"
+- ac_save_LIBS="$LIBS"
+- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+- LIBS="$XML_LIBS $LIBS"
+-dnl
+-dnl Now check if the installed libxml is sufficiently new.
+-dnl (Also sanity checks the results of xml2-config to some extent)
+-dnl
+- rm -f conf.xmltest
+- AC_TRY_RUN([
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <string.h>
+-#include <libxml/xmlversion.h>
+-
+-int
+-main()
+-{
+- int xml_major_version, xml_minor_version, xml_micro_version;
+- int major, minor, micro;
+- char *tmp_version;
+-
+- system("touch conf.xmltest");
+-
+- /* Capture xml2-config output via autoconf/configure variables */
+- /* HP/UX 9 (%@#!) writes to sscanf strings */
+- tmp_version = (char *)strdup("$min_xml_version");
+- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
+- exit(1);
+- }
+- free(tmp_version);
+-
+- /* Capture the version information from the header files */
+- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
+- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
+- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
+- exit(1);
+- }
+- free(tmp_version);
+-
+- /* Compare xml2-config output to the libxml headers */
+- if ((xml_major_version != $xml_config_major_version) ||
+- (xml_minor_version != $xml_config_minor_version) ||
+- (xml_micro_version != $xml_config_micro_version))
+- {
+- printf("*** libxml header files (version %d.%d.%d) do not match\n",
+- xml_major_version, xml_minor_version, xml_micro_version);
+- printf("*** xml2-config (version %d.%d.%d)\n",
+- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
+- return 1;
+- }
+-/* Compare the headers to the library to make sure we match */
+- /* Less than ideal -- doesn't provide us with return value feedback,
+- * only exits if there's a serious mismatch between header and library.
+- */
+- LIBXML_TEST_VERSION;
+-
+- /* Test that the library is greater than our minimum version */
+- if ((xml_major_version > major) ||
+- ((xml_major_version == major) && (xml_minor_version > minor)) ||
+- ((xml_major_version == major) && (xml_minor_version == minor) &&
+- (xml_micro_version >= micro)))
+- {
+- return 0;
+- }
+- else
+- {
+- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
+- xml_major_version, xml_minor_version, xml_micro_version);
+- printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
+- major, minor, micro);
+- printf("*** libxml is always available from ftp://ftp.xmlsoft.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 xml2-config shell script is\n");
+- printf("*** being found. The easiest way to fix this is to remove the old version\n");
+- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
+- printf("*** correct copy of xml2-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_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+- CPPFLAGS="$ac_save_CPPFLAGS"
+- LIBS="$ac_save_LIBS"
+- fi
+- fi
++AC_DEFUN([AM_PATH_XML2],[
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+- if test "x$no_xml" = x ; then
+- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
+- ifelse([$2], , :, [$2])
+- else
+- AC_MSG_RESULT(no)
+- if test "$XML2_CONFIG" = "no" ; then
+- echo "*** The xml2-config script installed by LIBXML could not be found"
+- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
+- echo "*** your path, or set the XML2_CONFIG environment variable to the"
+- echo "*** full path to xml2-config."
+- else
+- if test -f conf.xmltest ; then
+- :
+- else
+- echo "*** Could not run libxml test program, checking why..."
+- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+- LIBS="$LIBS $XML_LIBS"
+- AC_TRY_LINK([
+-#include <libxml/xmlversion.h>
+-#include <stdio.h>
+-], [ LIBXML_TEST_VERSION; return 0;],
+- [ echo "*** The test program compiled, but did not run. This usually means"
+- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
+- echo "*** version of LIBXML. If it is not finding LIBXML, 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 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"
+- LIBS="$ac_save_LIBS"
+- fi
+- fi
++ verdep=ifelse([$1], [], [], [>= $1])
++ PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3])
+
+- XML_CPPFLAGS=""
+- XML_LIBS=""
+- ifelse([$3], , :, [$3])
+- fi
++ XML_CPPFLAGS=$XML_CFLAGS
+ AC_SUBST(XML_CPPFLAGS)
+- AC_SUBST(XML_LIBS)
+- rm -f conf.xmltest
+ ])
diff --git a/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch
new file mode 100644
index 0000000000..b9621c93eb
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-3660.patch
@@ -0,0 +1,147 @@
+From be2a7edaf289c5da74a4f9ed3a0b6c733e775230 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 16 Oct 2014 13:59:47 +0800
+Subject: Fix for CVE-2014-3660
+
+Issues related to the billion laugh entity expansion which happened to
+escape the initial set of fixes
+
+Upstream-status: Backport
+Reference: https://git.gnome.org/browse/libxml2/commit/?id=be2a7edaf289c5da74a4f9ed3a0b6c733e775230&context=3&ignorews=0&ss=0
+
+Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
+
+diff --git a/parser.c b/parser.c
+index f51e8d2..1d93967 100644
+--- a/parser.c
++++ b/parser.c
+@@ -130,6 +130,29 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+ return (0);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ return (1);
++
++ /*
++ * This may look absurd but is needed to detect
++ * entities problems
++ */
++ if ((ent != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
++ (ent->content != NULL) && (ent->checked == 0)) {
++ unsigned long oldnbent = ctxt->nbentities;
++ xmlChar *rep;
++
++ ent->checked = 1;
++
++ rep = xmlStringDecodeEntities(ctxt, ent->content,
++ XML_SUBSTITUTE_REF, 0, 0, 0);
++
++ ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
++ if (rep != NULL) {
++ if (xmlStrchr(rep, '<'))
++ ent->checked |= 1;
++ xmlFree(rep);
++ rep = NULL;
++ }
++ }
+ if (replacement != 0) {
+ if (replacement < XML_MAX_TEXT_LENGTH)
+ return(0);
+@@ -189,9 +212,12 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+ return (0);
+ } else {
+ /*
+- * strange we got no data for checking just return
++ * strange we got no data for checking
+ */
+- return (0);
++ if (((ctxt->lastError.code != XML_ERR_UNDECLARED_ENTITY) &&
++ (ctxt->lastError.code != XML_WAR_UNDECLARED_ENTITY)) ||
++ (ctxt->nbentities <= 10000))
++ return (0);
+ }
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ return (1);
+@@ -2589,6 +2615,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else if (ctxt->input->free != deallocblankswrapper) {
+ input = xmlNewBlanksWrapperInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+@@ -2759,6 +2786,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
+ (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
+ goto int_error;
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if ((ent != NULL) &&
+@@ -2810,6 +2838,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ ent = xmlParseStringPEReference(ctxt, &str);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ goto int_error;
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if (ent != NULL) {
+@@ -7312,6 +7341,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ (ret != XML_WAR_UNDECLARED_ENTITY)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "Entity '%s' failed to parse\n", ent->name);
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ } else if (list != NULL) {
+ xmlFreeNodeList(list);
+ list = NULL;
+@@ -7418,7 +7448,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+- ctxt->sizeentcopy += ent->length;
++ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+@@ -7466,7 +7496,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+- ctxt->sizeentcopy += ent->length;
++ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+@@ -7652,6 +7682,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
+ ctxt->sax->reference(ctxt->userData, name);
+ }
+ }
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ ctxt->valid = 0;
+ }
+
+@@ -7845,6 +7876,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
+ "Entity '%s' not defined\n",
+ name);
+ }
++ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ /* TODO ? check regressions ctxt->valid = 0; */
+ }
+
+@@ -8004,6 +8036,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+@@ -8243,6 +8276,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
+ name, NULL);
+ ctxt->valid = 0;
+ }
++ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+--
+cgit v0.10.1
+
diff --git a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
index a697ddf873..e83c8325e5 100644
--- a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
+++ b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
@@ -4,12 +4,18 @@ 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.
Upstream-Status: Inappropriate [config]
-
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---- a/configure.in
-+++ b/configure.in
-@@ -743,7 +743,8 @@ dnl
+Rebase to 2.9.2
+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
+--- a/configure.ac
++++ b/configure.ac
+@@ -813,7 +813,8 @@ dnl
PYTHON_VERSION=
PYTHON_INCLUDES=
@@ -19,3 +25,6 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
PYTHON_TESTS=
pythondir=
if test "$with_python" != "no" ; then
+--
+1.9.1
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.1.bb b/meta/recipes-core/libxml/libxml2_2.9.2.bb
index 0b6ac5d5c6..1affff12ae 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.1.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.2.bb
@@ -1,8 +1,9 @@
require libxml2.inc
-SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar"
+SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+ file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch"
-SRC_URI[libtar.md5sum] = "9c0cfef285d5c4a5c80d00904ddab380"
-SRC_URI[libtar.sha256sum] = "fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb"
+SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788"
+SRC_URI[libtar.sha256sum] = "5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc"
SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 62e1e0bbef..302510c798 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -9,40 +9,23 @@ TOOLCHAIN_TARGET_TASK ?= ""
TOOLCHAIN_HOST_TASK ?= "\
nativesdk-python-core \
- nativesdk-python-textutils \
- nativesdk-python-sqlite3 \
- nativesdk-python-pickle \
- nativesdk-python-logging \
- nativesdk-python-elementtree \
- nativesdk-python-curses \
- nativesdk-python-compile \
- nativesdk-python-compiler \
- nativesdk-python-fcntl \
- nativesdk-python-shell \
+ nativesdk-python-modules \
nativesdk-python-misc \
- nativesdk-python-multiprocessing \
- nativesdk-python-subprocess \
- nativesdk-python-xmlrpc \
- nativesdk-python-netclient \
- nativesdk-python-netserver \
- nativesdk-python-distutils \
- nativesdk-python-unixadmin \
- nativesdk-python-compression \
- nativesdk-python-json \
- nativesdk-python-unittest \
- nativesdk-python-mmap \
- nativesdk-python-difflib \
- nativesdk-python-pprint \
nativesdk-python-git \
- nativesdk-python-pkgutil \
nativesdk-ncurses-terminfo-base \
nativesdk-chrpath \
nativesdk-tar \
+ nativesdk-buildtools-perl-dummy \
nativesdk-git \
+ nativesdk-git-perltools \
nativesdk-pigz \
nativesdk-make \
+ nativesdk-wget \
+ nativesdk-ca-certificates \
"
+SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}"
+
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
@@ -67,4 +50,6 @@ create_sdk_files_append () {
# so instead of exporting the variable, we use a comment here.
echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+ echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
}
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index cf142ef5ca..5d72e38e91 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -6,32 +6,56 @@ PR = "r8"
EXCLUDE_FROM_WORLD = "1"
+MODIFYTOS = "0"
+
+REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+
inherit toolchain-scripts
TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"
-REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
-SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
inherit cross-canadian
-do_generate_content[nostamp] = "1"
-do_generate_content() {
+do_generate_content[cleandirs] = "${SDK_OUTPUT}"
+do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
+python do_generate_content() {
+ # Handle multilibs in the SDK environment, siteconfig, etc files...
+ localdata = bb.data.createCopy(d)
- rm -rf ${SDK_OUTPUT}
- mkdir -p ${SDK_OUTPUT}/${SDKPATH}
+ # make sure we only use the WORKDIR value from 'd', or it can change
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
- toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
+ # make sure we only use the SDKTARGETSYSROOT value from 'd'
+ localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
+ localdata.setVar('libdir', d.getVar('target_libdir', False))
- toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} ${REAL_MULTIMACH_TARGET_SYS} '##SDKTARGETSYSROOT##' ${target_libdir}
+ # Process DEFAULTTUNE
+ bb.build.exec_func("create_sdk_files", localdata)
- # Add version information
- toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+ variants = d.getVar("MULTILIB_VARIANTS", True) 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
-do_install[nostamp] = "1"
+create_sdk_files() {
+ # Setup site file for external use
+ toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
+
+ # Add version information
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+}
+
do_install() {
install -d ${D}/${SDKPATH}
install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb
index 03cad6ed69..2f92912816 100644
--- a/meta/recipes-core/meta/meta-ide-support.bb
+++ b/meta/recipes-core/meta/meta-ide-support.bb
@@ -14,5 +14,4 @@ do_populate_ide_support () {
}
do_populate_ide_support[nostamp] = "1"
-do_populate_ide_support[recrdeptask] = "do_package_write"
addtask populate_ide_support before do_build after do_install
diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
new file mode 100644
index 0000000000..d971c3ca3d
--- /dev/null
+++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit nativesdk
+
+# Put it somewhere separate to ensure it's never used except when we want it
+PACKAGE_ARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
+
+PERLPACKAGES = "nativesdk-perl \
+ nativesdk-perl-module-file-path"
+
+ALLOW_EMPTY_${PN} = "1"
+
+python populate_packages_prepend() {
+ d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}')
+ d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}')
+}
+
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
index 27b6d8ea9f..3c46b49977 100644
--- a/meta/recipes-core/meta/package-index.bb
+++ b/meta/recipes-core/meta/package-index.bb
@@ -12,7 +12,6 @@ do_compile[noexec] = "1"
do_install[noexec] = "1"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
-do_package_write[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
new file mode 100644
index 0000000000..e17685a117
--- /dev/null
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -0,0 +1,48 @@
+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 = ""
+
+TOOLCHAIN_HOST_TASK = "\
+ nativesdk-glibc \
+ nativesdk-patchelf \
+ "
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "patchelf-native"
+
+TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+
+deltask install
+deltask package
+
+SDK_PACKAGING_FUNC = ""
+
+fakeroot create_sdk_files() {
+ cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
+
+ # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
+ # Escape special characters like '+' and '.' in the SDKPATH
+ escaped_sdkpath=$(echo ${SDKPATH}/sysroots/${SDK_SYS} |sed -e "s:[\+\.]:\\\\\\\\\0:g")
+ sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
+}
+
+
+fakeroot tar_sdk() {
+ mkdir -p ${SDK_DEPLOY}
+ cd ${SDK_OUTPUT}/${SDKPATH}
+ mv sysroots/${SDK_SYS} ./${BUILD_SYS}
+ rm sysroots -rf
+ patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf
+ mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative
+ tar ${SDKTAROPTS} -c --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+}
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 521d0e435c..10f7dd175d 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -98,6 +98,8 @@ do_configure() {
# not the case for /dev/null redirections)
export cf_cv_working_poll=yes
+ # The --enable-pc-files requires PKG_CONFIG_LIBDIR existed
+ mkdir -p ${PKG_CONFIG_LIBDIR}
( cd ${S}; gnu-configize --force )
ncurses_configure "narrowc" || \
return 1
diff --git a/meta/recipes-core/netbase/netbase_5.2.bb b/meta/recipes-core/netbase/netbase_5.3.bb
index ab7ae6527c..4ac0221c9e 100644
--- a/meta/recipes-core/netbase/netbase_5.2.bb
+++ b/meta/recipes-core/netbase/netbase_5.3.bb
@@ -6,11 +6,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
PE = "1"
-SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
+SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.xz \
file://hosts"
-SRC_URI[md5sum] = "3a01bfce6a28e1743412198abd241262"
-SRC_URI[sha256sum] = "d62ba56d62b9b121664828175c2a237a7014ef32df8a4116ea33cff332de3307"
+SRC_URI[md5sum] = "2637a27fd3de02a278d2b5be7e6558c1"
+SRC_URI[sha256sum] = "81f6c69795044d62b8ad959cf9daf049d0545fd466c52860ad3f933b1e97b88b"
do_install () {
install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb
new file mode 100644
index 0000000000..33e958137f
--- /dev/null
+++ b/meta/recipes-core/os-release/os-release.bb
@@ -0,0 +1,36 @@
+inherit allarch
+
+SUMMARY = "Operating system identification"
+DESCRIPTION = "The /etc/os-release file contains operating system identification data."
+LICENSE = "MIT"
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+
+# Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
+# HOME_URL SUPPORT_URL BUG_REPORT_URL
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
+
+ID = "${DISTRO}"
+NAME = "${DISTRO_NAME}"
+VERSION = "${DISTRO_VERSION}${@' (%s)' % DISTRO_CODENAME if 'DISTRO_CODENAME' in d else ''}"
+VERSION_ID = "${DISTRO_VERSION}"
+PRETTY_NAME = "${DISTRO_NAME} ${VERSION}"
+BUILD_ID ?= "${DATETIME}"
+
+python do_compile () {
+ 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)
+ if value:
+ f.write('{0}={1}\n'.format(field, value))
+}
+do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
+
+do_install () {
+ install -d ${D}${sysconfdir}
+ install -m 0644 os-release ${D}${sysconfdir}/
+}
diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb
index 16f3a510d8..f4b2cd574d 100644
--- a/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -2,6 +2,11 @@ SUMMARY = "Merge machine and distro options to create a basic machine task/packa
LICENSE = "MIT"
PR = "r83"
+#
+# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
+#
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
PROVIDES = "${PACKAGES}"
@@ -39,11 +44,6 @@ PACKAGES = ' \
\
'
-#
-# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
-#
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
# Override by distro if needed
VIRTUAL-RUNTIME_keymaps ?= "keymaps"
@@ -124,13 +124,6 @@ python __anonymous () {
if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features):
d.setVar("ADD_NFC", "packagegroup-base-nfc")
-
- # For backwards compatibility after rename
- packages = d.getVar("PACKAGES", True).split()
- for pkg in packages:
- d.appendVar("RPROVIDES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
- d.appendVar("RREPLACES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
- d.appendVar("RCONFLICTS_%s" % pkg, pkg.replace("packagegroup-", "task-"))
}
#
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index c8bc362242..09f537372e 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -7,21 +7,16 @@ DESCRIPTION = "The minimal set of packages required to boot the system"
LICENSE = "MIT"
PR = "r17"
-inherit packagegroup
-
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 ?= ""
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-boot"
-RREPLACES_${PN} = "task-core-boot"
-RCONFLICTS_${PN} = "task-core-boot"
-
# Distro can override the following VIRTUAL-RUNTIME providers:
VIRTUAL-RUNTIME_dev_manager ?= "udev"
VIRTUAL-RUNTIME_login_manager ?= "busybox"
@@ -32,6 +27,7 @@ VIRTUAL-RUNTIME_keymaps ?= "keymaps"
SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
modutils-initscripts \
init-ifupdown \
+ ${VIRTUAL-RUNTIME_initscripts} \
"
RDEPENDS_${PN} = "\
@@ -43,7 +39,6 @@ RDEPENDS_${PN} = "\
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
- ${VIRTUAL-RUNTIME_initscripts} \
${VIRTUAL-RUNTIME_dev_manager} \
${VIRTUAL-RUNTIME_update-alternatives} \
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
index 24c98c4938..247a30e063 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
@@ -10,11 +10,6 @@ inherit packagegroup
PACKAGES = "${PN}-server"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-server = "task-core-nfs-server"
-RREPLACES_${PN}-server = "task-core-nfs-server"
-RCONFLICTS_${PN}-server = "task-core-nfs-server"
-
SUMMARY_${PN}-server = "NFS server"
RDEPENDS_${PN}-server = "\
nfs-utils \
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 172398929c..a41eada5af 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -6,15 +6,12 @@ SUMMARY = "Software development tools"
LICENSE = "MIT"
PR = "r9"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
#PACKAGEFUNCS =+ 'generate_sdk_pkgs'
-# For backwards compatibility after rename
-RPROVIDES_packagegroup-core-sdk = "task-core-sdk"
-RREPLACES_packagegroup-core-sdk = "task-core-sdk"
-RCONFLICTS_packagegroup-core-sdk = "task-core-sdk"
-
RDEPENDS_packagegroup-core-sdk = "\
packagegroup-core-buildessential \
coreutils \
@@ -31,9 +28,18 @@ RDEPENDS_packagegroup-core-sdk = "\
file \
tcl"
+SANITIZERS = "libasan-dev libubsan-dev"
+SANITIZERS_aarch64 = ""
+SANITIZERS_mips = ""
+SANITIZERS_mips64 = ""
+SANITIZERS_mips64n32 = ""
+SANITIZERS_powerpc64 = ""
+SANITIZERS_sparc = ""
+
RRECOMMENDS_packagegroup-core-sdk = "\
libgomp \
- libgomp-dev"
+ libgomp-dev \
+ ${SANITIZERS}"
#python generate_sdk_pkgs () {
# poky_pkgs = read_pkgdata('packagegroup-core', d)['PACKAGES']
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
index 458d8fa036..e99946f0a7 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
@@ -4,9 +4,4 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-ssh-dropbear"
-RREPLACES_${PN} = "task-core-ssh-dropbear"
-RCONFLICTS_${PN} = "task-core-ssh-dropbear"
-
RDEPENDS_${PN} = "dropbear"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
index df70962912..32d20e6214 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
@@ -4,9 +4,4 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-ssh-openssh"
-RREPLACES_${PN} = "task-core-ssh-openssh"
-RCONFLICTS_${PN} = "task-core-ssh-openssh"
-
RDEPENDS_${PN} = "openssh"
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 3325ef672e..154a55cea2 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -4,17 +4,10 @@ LICENSE = "MIT"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-standalone-sdk-target"
-RREPLACES_${PN} = "task-core-standalone-sdk-target"
-RCONFLICTS_${PN} = "task-core-standalone-sdk-target"
-RPROVIDES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-RREPLACES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-RCONFLICTS_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
-
RDEPENDS_${PN} = "\
libgcc \
libgcc-dev \
+ libgcov-dev \
libstdc++ \
libstdc++-dev \
${LIBC_DEPENDENCIES} \
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
index f72aae4c9d..82347b975d 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
@@ -7,14 +7,7 @@ LICENSE = "MIT"
inherit packagegroup
-PR = "r2"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-debug"
-RREPLACES_${PN} = "task-core-tools-debug"
-RCONFLICTS_${PN} = "task-core-tools-debug"
+PR = "r3"
MTRACE = ""
MTRACE_libc-glibc = "libc-mtrace"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index 7832c89d23..6f4842f182 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -7,16 +7,13 @@ LICENSE = "MIT"
PR = "r3"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-profile"
-RREPLACES_${PN} = "task-core-tools-profile"
-RCONFLICTS_${PN} = "task-core-tools-profile"
+inherit packagegroup
PROFILE_TOOLS_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
+# sysprof doesn't support aarch64
+PROFILE_TOOLS_X_aarch64 = ""
PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}"
RRECOMMENDS_${PN} = "\
@@ -41,6 +38,7 @@ SYSTEMTAP = "systemtap"
SYSTEMTAP_libc-uclibc = ""
SYSTEMTAP_mips = ""
SYSTEMTAP_mips64 = ""
+SYSTEMTAP_mips64n32 = ""
SYSTEMTAP_aarch64 = ""
# lttng-ust uses sched_getcpu() which is not there on uclibc
@@ -58,7 +56,6 @@ LTTNGTOOLS_aarch64 = ""
LTTNGMODULES = "lttng-modules"
LTTNGMODULES_aarch64 = ""
-LTTNGMODULES_arm = ""
BABELTRACE = "babeltrace"
BABELTRACE_aarch64 = ""
@@ -69,6 +66,7 @@ VALGRIND = "valgrind"
VALGRIND_libc-uclibc = ""
VALGRIND_mips = ""
VALGRIND_mips64 = ""
+VALGRIND_mips64n32 = ""
VALGRIND_arm = ""
VALGRIND_aarch64 = ""
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index c7667540c9..33a3eee258 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -7,14 +7,9 @@ LICENSE = "MIT"
PR = "r2"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-tools-testapps"
-RREPLACES_${PN} = "task-core-tools-testapps"
-RCONFLICTS_${PN} = "task-core-tools-testapps"
+inherit packagegroup
# kexec-tools doesn't work on Mips
KEXECTOOLS ?= "kexec"
diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 8e3b917c75..c4710205ba 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -29,6 +29,7 @@ RDEPENDS_packagegroup-self-hosted = "\
# midori depends on webkit-gtk which could not build for mips64
MIDORI = "midori"
MIDORI_mips64 = ""
+MIDORI_mips64n32 = ""
RDEPENDS_packagegroup-self-hosted-host-tools = "\
connman \
@@ -41,19 +42,14 @@ RDEPENDS_packagegroup-self-hosted-host-tools = "\
hdparm \
iptables \
lsb \
- xdg-utils \
mc \
mc-fish \
mc-helpers \
mc-helpers-perl \
mc-helpers-python \
- leafpad \
- ${MIDORI} \
- pcmanfm \
parted \
pseudo \
screen \
- vte \
"
RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
@@ -64,7 +60,7 @@ RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
kernel-module-iptable-filter \
"
-# eglibc-utils: for rpcgen
+# glibc-utils: for rpcgen
RDEPENDS_packagegroup-self-hosted-sdk = "\
autoconf \
automake \
@@ -75,8 +71,8 @@ RDEPENDS_packagegroup-self-hosted-sdk = "\
cpp \
cpp-symlinks \
distcc \
- eglibc-utils \
- eglibc-gconv-ibm850 \
+ glibc-utils \
+ glibc-gconv-ibm850 \
file \
findutils \
g++ \
@@ -125,6 +121,7 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
gettext \
gettext-runtime \
git \
+ git-perltools \
grep \
groff \
gzip \
@@ -158,37 +155,11 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
perl-pod \
${PTH} \
python \
- python-compile \
python-compiler \
- python-compression \
- python-core \
- python-curses \
- python-datetime \
- python-difflib \
- python-distutils \
- python-elementtree \
- python-email \
- python-fcntl \
python-git \
- python-json \
- python-logging \
python-misc \
- python-mmap \
- python-multiprocessing \
- python-netclient \
- python-netserver \
- python-pickle \
- python-pkgutil \
- python-pprint \
- python-re \
+ python-modules \
python-rpm \
- python-shell \
- python-sqlite3 \
- python-subprocess \
- python-textutils \
- python-unittest \
- python-unixadmin \
- python-xmlrpc \
quota \
readline \
rpm \
@@ -224,6 +195,11 @@ RDEPENDS_packagegroup-self-hosted-graphics = "\
libx11-dev \
python-pygtk \
gtk-theme-clearlooks \
+ xdg-utils \
+ ${MIDORI} \
+ leafpad \
+ pcmanfm \
+ vte \
"
PTH = "pth"
PTH_libc-uclibc = ""
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4d49..7f0dc7859f 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -5,7 +5,7 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
-SRCREV = "afd4e228c606a9998feae44a3fed4474803240b7"
+SRCREV = "14c8f7b705de944beb4de3f296506d80871e410f"
PV = "0.1+git${SRCPV}"
PR = "r15"
@@ -109,3 +109,13 @@ 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)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask psplash.service
+ fi
+}
diff --git a/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch b/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
new file mode 100644
index 0000000000..54d1ac6eb9
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
@@ -0,0 +1,32 @@
+From 8ef852a5be72c75e17f2510bea52455f809b56ce Mon Sep 17 00:00:00 2001
+From: Chet Ramey <chet.ramey@case.edu>
+Date: Fri, 28 Mar 2014 14:07:42 -0400
+Subject: [PATCH 04/10] Readline-6.3 patch 2
+
+Fixes multi-key issue identified in this thread:
+http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ readline.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/readline.c b/readline.c
+index eb4eae3..abb29a0 100644
+--- a/readline.c
++++ b/readline.c
+@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+- if (r == 0) /* success! */
++ /* We only treat values < 0 specially to simulate recursion. */
++ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+--
+1.8.3.1
+
diff --git a/meta/recipes-core/readline/readline-6.3/readline63-003 b/meta/recipes-core/readline/readline-6.3/readline63-003
new file mode 100644
index 0000000000..98a9d810b6
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.3/readline63-003
@@ -0,0 +1,43 @@
+readline: Security Advisory - readline - CVE-2014-2524
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 6.3
+Patch-ID: readline63-003
+
+Bug-Reported-by:
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+There are debugging functions in the readline release that are theoretically
+exploitable as security problems. They are not public functions, but have
+global linkage.
+
+Patch (apply with `patch -p0'):
+
+*** ../readline-6.3/util.c 2013-09-02 13:36:12.000000000 -0400
+--- util.c 2014-03-20 10:25:53.000000000 -0400
+***************
+*** 477,480 ****
+--- 479,483 ----
+ }
+
++ #if defined (DEBUG)
+ #if defined (USE_VARARGS)
+ static FILE *_rl_tracefp;
+***************
+*** 539,542 ****
+--- 542,546 ----
+ }
+ #endif
++ #endif /* DEBUG */
+
+
+
diff --git a/meta/recipes-core/readline/readline_6.3.bb b/meta/recipes-core/readline/readline_6.3.bb
index aa30f668b4..55964a6cf8 100644
--- a/meta/recipes-core/readline/readline_6.3.bb
+++ b/meta/recipes-core/readline/readline_6.3.bb
@@ -1,5 +1,8 @@
require readline.inc
+SRC_URI += "file://readline63-003 \
+ file://readline-dispatch-multikey.patch"
+
SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 6dd335c0bc..182167befe 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -21,7 +21,7 @@ IgnoreOnIsolate=yes
[Service]
Environment="TERM=xterm"
-ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM
+ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM
Type=idle
Restart=always
RestartSec=0
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb
index 72bc77df4f..fbdc9c0a18 100644
--- a/meta/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb
@@ -9,6 +9,8 @@ inherit native
SRC_URI = "file://systemctl"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/systemctl ${D}${bindir}
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index b37f27abfb..2e632b00bc 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -77,18 +77,31 @@ for service in $services; do
exit 0
fi
- echo "Try to find location of $service..."
+ 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 ]; then
- service_file=$p/$service
+ 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' couldn't be found; exiting with error"
+ echo "'$service_base_file' couldn't be found; exiting with error"
exit 1
fi
echo "Found $service in $service_file"
@@ -115,13 +128,29 @@ for service in $services; do
for r in $wanted_by; do
echo "WantedBy=$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/@/@$default_instance/")
+ fi
+ fi
mkdir -p $ROOT/etc/systemd/system/$r.wants
- ln -s $service_file $ROOT/etc/systemd/system/$r.wants
- echo "Enabled $service for $wanted_by."
+ ln -s $service_file $ROOT/etc/systemd/system/$r.wants/$enable_service
+ echo "Enabled $enable_service for $wanted_by."
else
- rm -f $ROOT/etc/systemd/system/$r.wants/$service
+ if [ "$service_template" = true -a "$instance_specified" = false ]; then
+ disable_service="$ROOT/etc/systemd/system/$r.wants/`echo $service | sed 's/@/@*/'`"
+ else
+ disable_service="$ROOT/etc/systemd/system/$r.wants/$service"
+ fi
+ rm -f $disable_service
rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
- echo "Disabled $service for $wanted_by."
+ echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by."
fi
done
diff --git a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 0000000000..c5ad29174c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,180 @@
+From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001
+From: Dan McGregor <dan.mcgregor@usask.ca>
+Date: Fri, 5 Sep 2014 06:28:58 -0600
+Subject: [PATCH] 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: Pending
+
+Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
+---
+ Makefile.am | 2 ++
+ configure.ac | 7 +++++++
+ src/core/unit-printf.c | 2 +-
+ src/nspawn/nspawn.c | 4 ++--
+ src/shared/util.c | 4 ++--
+ units/console-shell.service.m4.in | 4 ++--
+ units/emergency.service.in | 4 ++--
+ units/rescue.service.m4.in | 4 ++--
+ 8 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4028112..5d18f5c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -191,6 +191,7 @@ AM_CPPFLAGS = \
+ -DKEXEC=\"$(KEXEC)\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DROOTLIBDIR=\"$(rootlibdir)\" \
++ -DROOTHOMEDIR=\"$(roothomedir)\" \
+ -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+ -I $(top_srcdir)/src \
+ -I $(top_builddir)/src/shared \
+@@ -5584,6 +5585,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 18b7198..365bc73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1272,6 +1272,11 @@ AC_ARG_WITH([rootlibdir],
+ [],
+ [with_rootlibdir=${libdir}])
+
++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]),
+ [],
+@@ -1317,6 +1322,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 po/Makefile.in
+@@ -1400,6 +1406,7 @@ AC_MSG_RESULT([
+ include_prefix: ${INCLUDE_PREFIX}
+ 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/core/unit-printf.c b/src/core/unit-printf.c
+index 62599d0..852d34c 100644
+--- a/src/core/unit-printf.c
++++ b/src/core/unit-printf.c
+@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
+ * best of it if we can, but fail if we can't */
+
+ if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
+- n = strdup("/root");
++ n = strdup(ROOTHOMEDIR);
+ else
+ return -ENOTSUP;
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index d01da45..3e876d5 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -3312,7 +3312,7 @@ int main(int argc, char *argv[]) {
+ if (r < 0)
+ _exit(EXIT_FAILURE);
+
+- 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)) {
+ log_oom();
+@@ -3402,7 +3402,7 @@ int main(int argc, char *argv[]) {
+ } else if (argc > optind)
+ execvpe(argv[optind], argv + optind, env_use);
+ else {
+- chdir(home ? home : "/root");
++ chdir(home ? home : ROOTHOMEDIR);
+ execle("/bin/bash", "-bash", NULL, env_use);
+ execle("/bin/sh", "-sh", NULL, env_use);
+ }
+diff --git a/src/shared/util.c b/src/shared/util.c
+index 85a570a..aef6033 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -4377,7 +4377,7 @@ int get_user_creds(
+ *gid = 0;
+
+ if (home)
+- *home = "/root";
++ *home = ROOTHOMEDIR;
+
+ if (shell)
+ *shell = "/bin/sh";
+@@ -5363,7 +5363,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/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
+index 3f4904a..e2af652 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=-/sbin/sulogin
+ ExecStopPost=-@SYSTEMCTL@ poweroff
+ Type=idle
+diff --git a/units/emergency.service.in b/units/emergency.service.in
+index 91fc1bb..659547e 100644
+--- a/units/emergency.service.in
++++ b/units/emergency.service.in
+@@ -13,8 +13,8 @@ Conflicts=shutdown.target
+ Before=shutdown.target
+
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=@roothomedir@
+ ExecStartPre=-/bin/plymouth 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" to try again\\nto boot into default mode.'
+ ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
+index ef54369..7aad86f 100644
+--- a/units/rescue.service.m4.in
++++ b/units/rescue.service.m4.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! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
+ ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+--
+1.9.3
+
diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
new file mode 100644
index 0000000000..9aa07c1b10
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
@@ -0,0 +1,138 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: 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.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++---------
+ 1 file changed, 38 insertions(+), 12 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 9a869ba..10c55c0 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -43,7 +43,8 @@
+
+ typedef enum RunlevelType {
+ RUNLEVEL_UP,
+- RUNLEVEL_DOWN
++ RUNLEVEL_DOWN,
++ RUNLEVEL_SYSINIT
+ } RunlevelType;
+
+ static const struct {
+@@ -58,6 +59,9 @@ static const struct {
+ { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
+ { "rc5.d", SPECIAL_RUNLEVEL5_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 }
+@@ -66,7 +70,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 */
+ };
+
+ typedef struct SysvStub {
+@@ -82,6 +86,8 @@ typedef struct SysvStub {
+ char **conflicts;
+ bool has_lsb;
+ bool reload;
++ bool default_dependencies;
++ bool from_rcsd;
+ } SysvStub;
+
+ const char *arg_dest = "/tmp";
+@@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) {
+ "Description=%s\n",
+ s->path, s->description);
+
++ if (!s->default_dependencies)
++ fprintf(f, "DefaultDependencies=no\n");
++
+ if (!isempty(before))
+ fprintf(f, "Before=%s\n", before);
+ if (!isempty(after))
+@@ -661,18 +670,30 @@ 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? */
+ }
+@@ -725,6 +746,8 @@ static int enumerate_sysv(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;
+
+@@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+
+ 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],
+@@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
+ goto finish;
+
+ } 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,
+ trivial_hash_func, trivial_compare_func);
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch
new file mode 100644
index 0000000000..e0043597a2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch
@@ -0,0 +1,176 @@
+From 5a16bc264c32237e38a844d55e7a1820a31b8440 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>
+Date: Fri, 28 Nov 2014 15:59:59 +0100
+Subject: [PATCH] build-sys: configure the list of system users, files and
+ directories
+
+Choose which system users defined in sysusers.d/systemd.conf and files
+or directories in tmpfiles.d/systemd.conf, should be provided depending
+on comile-time configuration.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 4 ++++
+ configure.ac | 2 ++
+ sysusers.d/.gitignore | 1 +
+ sysusers.d/{systemd.conf => systemd.conf.m4} | 8 ++++++++
+ tmpfiles.d/.gitignore | 3 ++-
+ tmpfiles.d/{systemd.conf => systemd.conf.m4} | 2 ++
+ 6 files changed, 19 insertions(+), 1 deletion(-)
+ rename sysusers.d/{systemd.conf => systemd.conf.m4} (77%)
+ rename tmpfiles.d/{systemd.conf => systemd.conf.m4} (96%)
+
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am 2015-01-23 21:23:04.000000000 +0000
++++ git/Makefile.am 2015-01-23 21:23:04.000000000 +0000
+@@ -5698,6 +5698,10 @@
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
++sysusers.d/%: sysusers.d/%.m4
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
++ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
++
+ tmpfiles.d/%: tmpfiles.d/%.m4
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2015-01-23 21:23:04.000000000 +0000
++++ git/configure.ac 2015-01-23 21:23:04.000000000 +0000
+@@ -971,6 +971,7 @@
+ AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
+ if test "x$enable_timesyncd" != "xno"; then
+ have_timesyncd=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
+ fi
+ AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
+
+@@ -1060,6 +1061,7 @@
+ AS_IF([test "x$enable_networkd" != "xno"], [
+ AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
+ have_networkd=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
+ ])
+ AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
+
+Index: git/sysusers.d/systemd.conf
+===================================================================
+--- git.orig/sysusers.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,12 +0,0 @@
+-# This file is part of systemd.
+-#
+-# 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.
+-
+-g systemd-journal - -
+-u systemd-bus-proxy - "systemd Bus Proxy"
+-u systemd-network - "systemd Network Management"
+-u systemd-resolve - "systemd Resolver"
+-u systemd-timesync - "systemd Time Synchronization"
+Index: git/sysusers.d/systemd.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/sysusers.d/systemd.conf.m4 2015-01-23 21:26:30.000000000 +0000
+@@ -0,0 +1,20 @@
++# This file is part of systemd.
++#
++# 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.
++
++g systemd-journal - -
++m4_ifdef(`ENABLE_KDBUS',
++u systemd-bus-proxy - "systemd Bus Proxy"
++)m4_dnl
++m4_ifdef(`ENABLE_NETWORKD',
++u systemd-network - "systemd Network Management"
++)m4_dnl
++m4_ifdef(`ENABLE_RESOLVED',
++u systemd-resolve - "systemd Resolver"
++)m4_dnl
++m4_ifdef(`ENABLE_TIMESYNCD',
++u systemd-timesync - "systemd Time Synchronization"
++)m4_dnl
+Index: git/tmpfiles.d/systemd.conf
+===================================================================
+--- git.orig/tmpfiles.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,32 +0,0 @@
+-# This file is part of systemd.
+-#
+-# 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.
+-
+-# See tmpfiles.d(5) for details
+-
+-d /run/user 0755 root root -
+-F! /run/utmp 0664 root utmp -
+-
+-d /run/systemd/ask-password 0755 root root -
+-d /run/systemd/seats 0755 root root -
+-d /run/systemd/sessions 0755 root root -
+-d /run/systemd/users 0755 root root -
+-d /run/systemd/machines 0755 root root -
+-d /run/systemd/shutdown 0755 root root -
+-d /run/systemd/netif 0755 systemd-network systemd-network -
+-d /run/systemd/netif/links 0755 systemd-network systemd-network -
+-d /run/systemd/netif/leases 0755 systemd-network systemd-network -
+-
+-d /run/log 0755 root root -
+-
+-z /run/log/journal 2755 root systemd-journal - -
+-Z /run/log/journal/%m ~2750 root systemd-journal - -
+-
+-z /var/log/journal 2755 root systemd-journal - -
+-z /var/log/journal/%m 2755 root systemd-journal - -
+-
+-d /var/lib/systemd 0755 root root -
+-d /var/lib/systemd/coredump 0755 root root 3d
+Index: git/tmpfiles.d/systemd.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/systemd.conf.m4 2015-01-23 21:26:46.000000000 +0000
+@@ -0,0 +1,34 @@
++# This file is part of systemd.
++#
++# 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.
++
++# See tmpfiles.d(5) for details
++
++d /run/user 0755 root root -
++F! /run/utmp 0664 root utmp -
++
++d /run/systemd/ask-password 0755 root root -
++d /run/systemd/seats 0755 root root -
++d /run/systemd/sessions 0755 root root -
++d /run/systemd/users 0755 root root -
++d /run/systemd/machines 0755 root root -
++d /run/systemd/shutdown 0755 root root -
++m4_ifdef(`ENABLE_NETWORKD',
++d /run/systemd/netif 0755 systemd-network systemd-network -
++d /run/systemd/netif/links 0755 systemd-network systemd-network -
++d /run/systemd/netif/leases 0755 systemd-network systemd-network -
++)m4_dnl
++
++d /run/log 0755 root root -
++
++z /run/log/journal 2755 root systemd-journal - -
++Z /run/log/journal/%m ~2750 root systemd-journal - -
++
++z /var/log/journal 2755 root systemd-journal - -
++z /var/log/journal/%m 2755 root systemd-journal - -
++
++d /var/lib/systemd 0755 root root -
++d /var/lib/systemd/coredump 0755 root root 3d
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch
new file mode 100644
index 0000000000..4795f8670f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch
@@ -0,0 +1,56 @@
+From bedd083aaedb3bbb14ef579a047bf4b4fed56d9b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>
+Date: Wed, 26 Nov 2014 09:17:50 +0100
+Subject: [PATCH] build-sys: do not install tmpfiles and sysusers files by
+ default
+
+Upstream-Status: Backport
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ Makefile.am | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ddd0df1..65bb176 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2039,7 +2039,6 @@ nodist_tmpfiles_DATA = \
+ dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ tmpfiles.d/systemd-nologin.conf \
+- tmpfiles.d/systemd-remote.conf \
+ tmpfiles.d/tmp.conf \
+ tmpfiles.d/x11.conf \
+ tmpfiles.d/var.conf
+@@ -2094,8 +2093,7 @@ SYSINIT_TARGET_WANTS += \
+ systemd-sysusers.service
+
+ dist_sysusers_DATA = \
+- sysusers.d/systemd.conf \
+- sysusers.d/systemd-remote.conf
++ sysusers.d/systemd.conf
+
+ nodist_sysusers_DATA = \
+ sysusers.d/basic.conf
+@@ -3839,6 +3837,16 @@ systemd_journal_remote_CFLAGS = \
+ systemd_journal_remote_LDADD += \
+ $(MICROHTTPD_LIBS)
+
++if ENABLE_SYSUSERS
++dist_sysusers_DATA += \
++ sysusers.d/systemd-remote.conf
++endif
++
++if ENABLE_TMPFILES
++dist_tmpfiles_DATA += \
++ tmpfiles.d/systemd-remote.conf
++endif
++
+ if HAVE_GNUTLS
+ systemd_journal_remote_LDADD += \
+ $(GNUTLS_LIBS)
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch
new file mode 100644
index 0000000000..621a0da87c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch
@@ -0,0 +1,34 @@
+From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001
+From: Olivier Brunel <jjk@jjacky.com>
+Date: Fri, 5 Dec 2014 16:06:45 +0100
+Subject: [PATCH] journal: Fix navigating backwards missing entries
+
+With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
+needle was found as the last item in the array, it wasn't actually processed as
+match, resulting in entries being missed.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=86855
+
+Upstream-Status: Backport
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/journal/journal-file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 7858435..c5d2d19 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
+ }
+ }
+
+- if (k > n) {
++ if (k >= n) {
+ if (direction == DIRECTION_UP) {
+ i = n;
+ subtract_one = true;
+--
+2.1.3
+
diff --git a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
new file mode 100644
index 0000000000..448ef1a917
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Backport
+
+Subject: missing.h: add fake __NR_memfd_create for MIPS
+
+We don't have the correct __NR_memfd_create syscall number yet, so set it to
+0xffffffff for now to prevent compile time errors.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/shared/missing.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/shared/missing.h b/src/shared/missing.h
+index 3ff1a21..3051cb5 100644
+--- a/src/shared/missing.h
++++ b/src/shared/missing.h
+@@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
+ # define __NR_fanotify_mark 5296
+ # endif
+ # endif
++# ifndef __NR_memfd_create
++# define __NR_memfd_create 0xffffffff /* FIXME */
++# endif
+ #else
+ # ifndef __NR_fanotify_init
+ # define __NR_fanotify_init 338
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch
new file mode 100644
index 0000000000..97701f707c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Inappropriate [oe specific]
+
+Subject: 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.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/login/systemd-user | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/login/systemd-user b/src/login/systemd-user
+index 8112d74..99635af 100644
+--- a/src/login/systemd-user
++++ b/src/login/systemd-user
+@@ -2,5 +2,5 @@
+ #
+ # Used by systemd --user instances.
+
+-account include system-auth
+-session include system-auth
++account include common-account
++session include common-session
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch
new file mode 100644
index 0000000000..b5b0168149
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch
@@ -0,0 +1,142 @@
+From aeb50ff0bd4bbbca74c4695072232348351d512d Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Wed, 27 Aug 2014 17:45:41 +0200
+Subject: [PATCH] tmpfiles: make resolv.conf entry conditional on resolved
+ support
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ Makefile.am | 15 +++++++++++++--
+ TODO | 2 --
+ configure.ac | 1 +
+ tmpfiles.d/.gitignore | 1 +
+ tmpfiles.d/{etc.conf => etc.conf.m4} | 2 ++
+ 5 files changed, 17 insertions(+), 4 deletions(-)
+ create mode 100644 tmpfiles.d/.gitignore
+ rename tmpfiles.d/{etc.conf => etc.conf.m4} (95%)
+
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am 2015-01-24 00:41:20.134716451 -0800
++++ git/Makefile.am 2015-01-24 00:41:20.126716451 -0800
+@@ -1935,14 +1935,16 @@
+ units/systemd-tmpfiles-setup.service \
+ units/systemd-tmpfiles-clean.service
+
++nodist_tmpfiles_DATA = \
++ tmpfiles.d/etc.conf
++
+ dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ tmpfiles.d/systemd-nologin.conf \
+ tmpfiles.d/systemd-remote.conf \
+ tmpfiles.d/tmp.conf \
+ tmpfiles.d/x11.conf \
+- tmpfiles.d/var.conf \
+- tmpfiles.d/etc.conf
++ tmpfiles.d/var.conf
+
+ if HAVE_SYSV_COMPAT
+ dist_tmpfiles_DATA += \
+@@ -1965,10 +1967,14 @@
+ endif
+
+ EXTRA_DIST += \
++ tmpfiles.d/etc.conf.m4 \
+ units/systemd-tmpfiles-setup-dev.service.in \
+ units/systemd-tmpfiles-setup.service.in \
+ units/systemd-tmpfiles-clean.service.in
+
++CLEANFILES += \
++ tmpfiles.d/etc.conf
++
+ # ------------------------------------------------------------------------------
+ if ENABLE_SYSUSERS
+ systemd_sysusers_SOURCES = \
+@@ -5684,6 +5690,11 @@
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
++tmpfiles.d/%: tmpfiles.d/%.m4
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
++ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
++
++
+ units/%: units/%.m4
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
+Index: git/TODO
+===================================================================
+--- git.orig/TODO 2015-01-24 00:41:20.134716451 -0800
++++ git/TODO 2015-01-24 00:41:20.126716451 -0800
+@@ -111,8 +111,6 @@
+
+ * Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely
+
+-* the resolv.conf tmpfiles line should be covered by ENABLE_NETWORKD...
+-
+ * Add a new verb "systemctl top"
+
+ * logind: allow users to kill or lock their own sessions
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2015-01-24 00:41:20.134716451 -0800
++++ git/configure.ac 2015-01-24 00:41:20.126716451 -0800
+@@ -1041,6 +1041,7 @@
+ AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
+ if test "x$enable_resolved" != "xno"; then
+ have_resolved=yes
++ M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
+ fi
+ AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
+
+Index: git/tmpfiles.d/.gitignore
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/.gitignore 2015-01-24 00:41:20.126716451 -0800
+@@ -0,0 +1 @@
++etc.conf
+Index: git/tmpfiles.d/etc.conf
+===================================================================
+--- git.orig/tmpfiles.d/etc.conf 2015-01-24 00:41:20.134716451 -0800
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,15 +0,0 @@
+-# This file is part of systemd.
+-#
+-# 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.
+-
+-# See tmpfiles.d(5) for details
+-
+-L /etc/os-release - - - - ../usr/lib/os-release
+-L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+-L+ /etc/mtab - - - - ../proc/self/mounts
+-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
+-C /etc/nsswitch.conf - - - -
+-C /etc/pam.d - - - -
+Index: git/tmpfiles.d/etc.conf.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/tmpfiles.d/etc.conf.m4 2015-01-24 00:41:20.126716451 -0800
+@@ -0,0 +1,17 @@
++# This file is part of systemd.
++#
++# 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.
++
++# See tmpfiles.d(5) for details
++
++L /etc/os-release - - - - ../usr/lib/os-release
++L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
++L+ /etc/mtab - - - - ../proc/self/mounts
++m4_ifdef(`ENABLE_RESOLVED',
++L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
++)
++C /etc/nsswitch.conf - - - -
++C /etc/pam.d - - - -
diff --git a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
deleted file mode 100644
index 9fdb3c9ab3..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Inappropriate [uclibc specific]
-
-From 7be9273548bcb1f57d011fc252965e45dd2a058c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 21 Aug 2013 19:09:27 -0700
-Subject: [PATCH] uClibc doesn't implement pwritev/preadv
-
-Lets stub out the testcase for building.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/libsystemd-bus/test-bus-memfd.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c
-===================================================================
---- systemd-209.orig/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 15:03:09.983254602 -0800
-+++ systemd-209/src/libsystemd/sd-bus/test-bus-memfd.c 2014-02-19 23:42:10.636652864 -0800
-@@ -151,6 +151,7 @@
- /* check content */
- assert_se(memcmp(buf, "ll", 2) == 0);
-
-+#ifndef __UCLIBC__
- /* writev it out*/
- iov[0].iov_base = (char *)"ABC";
- iov[0].iov_len = 3;
-@@ -173,6 +174,7 @@
- assert_se(memcmp(bufv[0], "ABC", 3) == 0);
- assert_se(memcmp(bufv[1], "DEF", 3) == 0);
- assert_se(memcmp(bufv[2], "GHI", 3) == 0);
-+#endif /* __UCLIBC__ */
-
- sd_memfd_free(m);
-
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
index 2f6bd93a5b..a2d61c2894 100644
--- a/meta/recipes-core/systemd/systemd/run-ptest
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -1,3 +1,5 @@
+#!/bin/sh
+
tar -C test -xJf test/sys.tar.xz
make test/rules-test.sh.log
make test/udev-test.pl.log
diff --git a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch b/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
deleted file mode 100644
index 18b50e797a..0000000000
--- a/meta/recipes-core/systemd/systemd/systemd-older-kernel.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6109f02dcc4f2d7a461c5772bab494f5753a2203 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 29 May 2014 08:09:07 +0000
-Subject: [PATCH] rtnl-types.c: check IFLA_VLAN_PROTOCOL
-
-The older kernel's linux/if_link.h doesn't have IFLA_VLAN_PROTOCOL, we need
-check whether it has been defined or not.
-
-The maintainer said that he would fix it:
-
-http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/18200
-
-Also we need redefine IFLA_MAX from 34 to 35 when define IFLA_CARRIER,
-otherwise there would be error:
-
-| src/libsystemd/sd-rtnl/rtnl-types.c:233:9: error: array index in initializer exceeds array bounds
-| [IFLA_CARRIER] = { .type = NLA_U8 },
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/libsystemd/sd-rtnl/rtnl-types.c | 2 ++
- src/shared/missing.h | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
-index 44ac5ec..ab6161f 100644
---- a/src/libsystemd/sd-rtnl/rtnl-types.c
-+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
-@@ -67,7 +67,9 @@ static const NLType rtnl_link_info_data_vlan_types[IFLA_VLAN_MAX + 1] = {
- [IFLA_VLAN_EGRESS_QOS] = { .type = NLA_NESTED },
- [IFLA_VLAN_INGRESS_QOS] = { .type = NLA_NESTED },
- */
-+#ifdef IFLA_VLAN_PROTOCOL
- [IFLA_VLAN_PROTOCOL] = { .type = NLA_U16 },
-+#endif
- };
-
- static const NLType rtnl_link_info_data_bond_types[IFLA_BOND_MAX + 1] = {
-diff --git a/src/shared/missing.h b/src/shared/missing.h
-index d5ec2f8..732853f 100644
---- a/src/shared/missing.h
-+++ b/src/shared/missing.h
-@@ -94,6 +94,8 @@
-
- #ifndef IFLA_CARRIER
- #define IFLA_CARRIER 33
-+ #undef IFLA_MAX
-+ #define IFLA_MAX 35
- #ifndef IFLA_NUM_RX_QUEUES
- #define IFLA_NUM_RX_QUEUES 32
- #ifndef IFLA_NUM_TX_QUEUES
---
-1.8.3.4
-
diff --git a/meta/recipes-core/systemd/systemd_213.bb b/meta/recipes-core/systemd/systemd_216.bb
index 28cc4cb0d9..569e88c240 100644
--- a/meta/recipes-core/systemd/systemd_213.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -10,16 +10,16 @@ PROVIDES = "udev"
PE = "1"
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native"
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SECTION = "base/shell"
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
-SRCREV = "c9679c652b3c31f2510e8805d81630680ebc7e95"
+SRCREV = "5d0ae62c665262c4c55536457e84e278c252cc0b"
-PV = "213+git${SRCPV}"
+PV = "216+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
file://binfmt-install.patch \
@@ -28,14 +28,20 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://systemd-pam-fix-fallocate.patch \
file://systemd-pam-fix-mkostemp.patch \
file://optional_secure_getenv.patch \
- file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
file://uclibc-sysinfo_h.patch \
file://uclibc-get-physmem.patch \
+ file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
+ file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
+ file://0001-Make-root-s-home-directory-configurable.patch \
+ file://0001-systemd-user-avoid-using-system-auth.patch \
+ file://0001-journal-Fix-navigating-backwards-missing-entries.patch \
+ file://0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch \
+ file://0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch \
+ file://0001-build-sys-configure-the-list-of-system-users-files-a.patch \
file://touchscreen.rules \
file://00-create-volatile.conf \
file://init \
file://run-ptest \
- file://systemd-older-kernel.patch \
"
S = "${WORKDIR}/git"
@@ -48,6 +54,7 @@ LDFLAGS_append_libc-uclibc = " -lrt"
GTKDOC_DOCDIR = "${S}/docs/"
PACKAGECONFIG ??= "xz"
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
# regardless of PACKAGECONFIG, libgcrypt is always required to expand
@@ -57,6 +64,12 @@ DEPENDS += "libgcrypt"
PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
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[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"
CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
@@ -69,8 +82,8 @@ rootlibexecdir = "${rootprefix}/lib"
# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
--with-rootlibdir=${rootlibdir} \
+ --with-roothomedir=${ROOT_HOME} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
- --disable-manpages \
--disable-coredump \
--disable-introspection \
--disable-kdbus \
@@ -94,7 +107,6 @@ do_configure_prepend() {
else
cp -r ${S}/units ${S}/units.pre_sed
fi
- sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
sed -i '/ln --relative --help/d' ${S}/configure.ac
sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
@@ -126,6 +138,27 @@ do_install() {
# Delete journal README, as log can be symlinked inside volatile.
rm -f ${D}/${localstatedir}/log/README
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ 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
+ 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
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+ # its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
+ # don't order journal flushing afte remote-fs.target
+ sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+ # 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
+ ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
}
do_install_ptest () {
@@ -148,16 +181,16 @@ 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|gudev|systemd).*"
+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"
+ ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev"
SYSTEMD_PACKAGES = "${PN}-binfmt"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
FILES_${PN}-analyze = "${bindir}/systemd-analyze"
@@ -165,8 +198,9 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
-# The test cases need perl and bash to run correctly.
-RDEPENDS_${PN}-ptest += "perl bash"
+FILES_libgudev = "${libdir}/libgudev*${SOLIBS}"
+
+RDEPENDS_${PN}-ptest += "perl python bash"
FILES_${PN}-ptest += "${libdir}/udev/rules.d"
FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
@@ -177,6 +211,7 @@ 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 \
@@ -193,7 +228,7 @@ FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
${systemd_unitdir}/system/systemd-binfmt.service"
RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
${sysconfdir}/systemd/logind.conf \
@@ -206,6 +241,7 @@ FILES_${PN} = " ${base_bindir}/* \
${datadir}/dbus-1/system-services \
${datadir}/polkit-1 \
${datadir}/${BPN} \
+ ${datadir}/factory \
${sysconfdir}/bash_completion.d/ \
${sysconfdir}/dbus-1/ \
${sysconfdir}/machine-id \
@@ -218,7 +254,7 @@ FILES_${PN} = " ${base_bindir}/* \
${rootlibexecdir}/systemd/* \
${systemd_unitdir}/* \
${base_libdir}/security/*.so \
- ${libdir}/libnss_myhostname.so.2 \
+ ${libdir}/libnss_* \
/cgroup \
${bindir}/systemd* \
${bindir}/busctl \
@@ -231,6 +267,7 @@ FILES_${PN} = " ${base_bindir}/* \
${exec_prefix}/lib/systemd \
${exec_prefix}/lib/modules-load.d \
${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
${localstatedir} \
/lib/udev/rules.d/70-uaccess.rules \
/lib/udev/rules.d/71-seat.rules \
@@ -243,11 +280,12 @@ FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_uni
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"
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \
+RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
util-linux-agetty \
util-linux-fsck e2fsprogs-e2fsck \
- kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
"
PACKAGES =+ "udev-dbg udev udev-hwdb"
@@ -255,7 +293,8 @@ PACKAGES =+ "udev-dbg udev udev-hwdb"
FILES_udev-dbg += "/lib/udev/.debug"
RPROVIDES_udev = "hotplug"
-RRECOMMENDS_udev += "udev-hwdb"
+
+RDEPENDS_udev-hwdb += "udev"
FILES_udev += "${base_sbindir}/udevd \
${rootlibexecdir}/systemd/systemd-udevd \
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index c3244b4602..eed2104f65 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -6,7 +6,7 @@ PR = "r10"
SRC_URI = "file://inittab"
-S = "${WORKDIR}/sysvinit-${PV}"
+S = "${WORKDIR}"
INHIBIT_DEFAULT_DEPS = "1"
@@ -23,7 +23,7 @@ do_install() {
do
j=`echo ${i} | sed s/\;/\ /g`
label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
- echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+ echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then
diff --git a/meta/recipes-core/sysvinit/sysvinit/01_bootlogd b/meta/recipes-core/sysvinit/sysvinit/01_bootlogd
new file mode 100644
index 0000000000..a689d92d63
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/01_bootlogd
@@ -0,0 +1 @@
+f root root 0644 /var/log/boot none
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index 7d6518d981..df5aa430cf 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -46,7 +46,7 @@ esac
case "$ACTION" in
start)
- echo -n "Starting $DESC: "
+ [ "${VERBOSE}" != "no" ] && echo -n "Starting $DESC: "
if [ -d /proc/1/. ]
then
umask 027
@@ -55,14 +55,16 @@ case "$ACTION" in
else
$DAEMON -r -c
fi
- echo "$NAME."
+ [ "${VERBOSE}" != "no" ] && echo "$NAME."
;;
stop)
- echo -n "Stopping $DESC: "
+ # stop may get called during bootup, so let it honor
+ # rcS VERBOSE setting
+ [ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
- if [ "$STOPPER" ] && [ -f /var/log/boot ] && \
- [ -f /var/log/boot~ ]
+ if [ "$STOPPER" ] && [ "$(which savelog 2>/dev/null)" ] && \
+ [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
then
cd /var/log
chgrp adm boot
@@ -71,7 +73,7 @@ case "$ACTION" in
mv boot~ boot.0
fi
- echo "$NAME."
+ [ "${VERBOSE}" != "no" ] && echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index 1f400d9e55..7ca41ae1ae 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -65,6 +65,9 @@ startup() {
# Set onlcr to avoid staircase effect.
stty onlcr 0>&1
+ # Limit stack size for startup scripts
+ [ "$STACK_SIZE" == "" ] || ulimit -S -s $STACK_SIZE
+
# Now find out what the current and what the previous runlevel are.
runlevel=$RUNLEVEL
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 448d0216be..00d333323e 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -16,7 +16,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \
file://rcS-default \
file://rc \
file://rcS \
- file://bootlogd.init"
+ file://bootlogd.init \
+ file://01_bootlogd \
+"
SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f"
SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
@@ -92,6 +94,9 @@ do_install () {
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
}
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index 69e834d6d1..a2b2353c5a 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -1,4 +1,4 @@
-SRCREV="5eddde8f094ef52dca06695cc598e3b2556dcccb"
+SRCREV = "48a0006012679ff0eda6f256da958d73a924fb57"
PV = "0.9.33+git${SRCPV}"
@@ -23,7 +23,7 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
file://0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch \
file://0001-Add-eventfd_read-and-eventfd_write.patch \
file://0002-wire-setns-syscall.patch \
- file://0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch \
- file://0004-Add-clock_adjtime-syscall.patch \
+ file://0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch \
+ file://0001-timex-Sync-with-glibc.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch
new file mode 100644
index 0000000000..d613823695
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch
@@ -0,0 +1,75 @@
+From be8ed13a90c528adfbe3c8543946bb2c5a2ad713 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Aug 2014 15:50:36 -0700
+Subject: [PATCH] Define IPTOS_CLASS_* macros according to RFC 2474
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-status: Pending
+---
+ include/netinet/ip.h | 42 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 30 insertions(+), 12 deletions(-)
+
+diff --git a/include/netinet/ip.h b/include/netinet/ip.h
+index 19e1249..3fe58b9 100644
+--- a/include/netinet/ip.h
++++ b/include/netinet/ip.h
+@@ -188,7 +188,25 @@ struct ip_timestamp
+ #define IPTOS_DSCP_EF 0xb8
+
+ /*
+- * Definitions for IP type of service (ip_tos)
++ * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume
++ * the old ToS Precedence values.
++ */
++#define IPTOS_CLASS_MASK 0xe0
++#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK)
++#define IPTOS_CLASS_CS0 0x00
++#define IPTOS_CLASS_CS1 0x20
++#define IPTOS_CLASS_CS2 0x40
++#define IPTOS_CLASS_CS3 0x60
++#define IPTOS_CLASS_CS4 0x80
++#define IPTOS_CLASS_CS5 0xa0
++#define IPTOS_CLASS_CS6 0xc0
++#define IPTOS_CLASS_CS7 0xe0
++
++#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
++
++/*
++ * Definitions for IP type of service (ip_tos) [deprecated; use DSCP
++ * and CS definitions above instead.]
+ */
+ #define IPTOS_TOS_MASK 0x1E
+ #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
+@@ -199,18 +217,18 @@ struct ip_timestamp
+ #define IPTOS_MINCOST IPTOS_LOWCOST
+
+ /*
+- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
++ * Definitions for IP precedence (also in ip_tos) [also deprecated.]
+ */
+-#define IPTOS_PREC_MASK 0xe0
+-#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
+-#define IPTOS_PREC_NETCONTROL 0xe0
+-#define IPTOS_PREC_INTERNETCONTROL 0xc0
+-#define IPTOS_PREC_CRITIC_ECP 0xa0
+-#define IPTOS_PREC_FLASHOVERRIDE 0x80
+-#define IPTOS_PREC_FLASH 0x60
+-#define IPTOS_PREC_IMMEDIATE 0x40
+-#define IPTOS_PREC_PRIORITY 0x20
+-#define IPTOS_PREC_ROUTINE 0x00
++#define IPTOS_PREC_MASK IPTOS_CLASS_MASK
++#define IPTOS_PREC(tos) IPTOS_CLASS(tos)
++#define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7
++#define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6
++#define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5
++#define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4
++#define IPTOS_PREC_FLASH IPTOS_CLASS_CS3
++#define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2
++#define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1
++#define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0
+
+ /*
+ * Definitions for options.
+--
+2.1.0
+
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch b/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch
new file mode 100644
index 0000000000..5d6a0a5366
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-timex-Sync-with-glibc.patch
@@ -0,0 +1,33 @@
+From f489cc44a209f6c4370e94c9c788fc9cc4820be1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Aug 2014 16:22:57 -0700
+Subject: [PATCH] timex: Sync with glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-status: Pending
+---
+ include/sys/timex.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/include/sys/timex.h b/include/sys/timex.h
+index 9082a28..57059bd 100644
+--- a/include/sys/timex.h
++++ b/include/sys/timex.h
+@@ -67,8 +67,12 @@ struct timex
+ #define ADJ_ESTERROR 0x0008 /* estimated time error */
+ #define ADJ_STATUS 0x0010 /* clock status */
+ #define ADJ_TIMECONST 0x0020 /* pll time constant */
+-#define ADJ_TICK 0x4000 /* tick value */
+-#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
++#define ADJ_TAI 0x0080 /* set TAI offset */
++#define ADJ_MICRO 0x1000 /* select microsecond resolution */
++#define ADJ_NANO 0x2000 /* select nanosecond resolution */
++#define ADJ_TICK 0x4000 /* tick value */
++#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
++#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
+
+ /* xntp 3.4 compatibility names */
+ #define MOD_OFFSET ADJ_OFFSET
+--
+2.1.0
+
diff --git a/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch b/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch
deleted file mode 100644
index f4387db9c7..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0003-fcntl.h-Define-F_SETPIPE_SZ-and-F_GETPIPE_SZ.patch
+++ /dev/null
@@ -1,377 +0,0 @@
-From 7791d129d777e481a1e429815edcd05978438840 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 20 Feb 2014 01:12:14 -0800
-Subject: [PATCH 3/3] fcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZ
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- libc/sysdeps/linux/alpha/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/arc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/arm/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/bfin/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/cris/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/e1/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/frv/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/h8300/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/hppa/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/i386/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/i960/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/ia64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/m68k/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/metag/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/microblaze/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/mips/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/nios/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/nios2/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/powerpc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sh/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sh64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/sparc/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/v850/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/vax/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/x86_64/bits/fcntl.h | 2 ++
- libc/sysdeps/linux/xtensa/bits/fcntl.h | 2 ++
- 26 files changed, 52 insertions(+)
-
-diff --git a/libc/sysdeps/linux/alpha/bits/fcntl.h b/libc/sysdeps/linux/alpha/bits/fcntl.h
-index dd32529..a44be9e 100644
---- a/libc/sysdeps/linux/alpha/bits/fcntl.h
-+++ b/libc/sysdeps/linux/alpha/bits/fcntl.h
-@@ -94,6 +94,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* for F_[GET|SET]FD */
-diff --git a/libc/sysdeps/linux/arc/bits/fcntl.h b/libc/sysdeps/linux/arc/bits/fcntl.h
-index 71136da..1cb9600 100755
---- a/libc/sysdeps/linux/arc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/arc/bits/fcntl.h
-@@ -87,6 +87,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
-index f1a54f0..aedc154 100644
---- a/libc/sysdeps/linux/arm/bits/fcntl.h
-+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/bfin/bits/fcntl.h b/libc/sysdeps/linux/bfin/bits/fcntl.h
-index c6cba56..e987824 100644
---- a/libc/sysdeps/linux/bfin/bits/fcntl.h
-+++ b/libc/sysdeps/linux/bfin/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/cris/bits/fcntl.h b/libc/sysdeps/linux/cris/bits/fcntl.h
-index acc5e25..029bb80 100644
---- a/libc/sysdeps/linux/cris/bits/fcntl.h
-+++ b/libc/sysdeps/linux/cris/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/e1/bits/fcntl.h b/libc/sysdeps/linux/e1/bits/fcntl.h
-index da699c8..2e0e6ba 100644
---- a/libc/sysdeps/linux/e1/bits/fcntl.h
-+++ b/libc/sysdeps/linux/e1/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/frv/bits/fcntl.h b/libc/sysdeps/linux/frv/bits/fcntl.h
-index 3aacc9d..5a7d9ef 100644
---- a/libc/sysdeps/linux/frv/bits/fcntl.h
-+++ b/libc/sysdeps/linux/frv/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/h8300/bits/fcntl.h b/libc/sysdeps/linux/h8300/bits/fcntl.h
-index d0b8310..45deec4 100644
---- a/libc/sysdeps/linux/h8300/bits/fcntl.h
-+++ b/libc/sysdeps/linux/h8300/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/hppa/bits/fcntl.h b/libc/sysdeps/linux/hppa/bits/fcntl.h
-index 1bb41ce..abb3372 100644
---- a/libc/sysdeps/linux/hppa/bits/fcntl.h
-+++ b/libc/sysdeps/linux/hppa/bits/fcntl.h
-@@ -96,6 +96,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* for F_[GET|SET]FL */
-diff --git a/libc/sysdeps/linux/i386/bits/fcntl.h b/libc/sysdeps/linux/i386/bits/fcntl.h
-index d48e62a..79b69d4 100644
---- a/libc/sysdeps/linux/i386/bits/fcntl.h
-+++ b/libc/sysdeps/linux/i386/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/i960/bits/fcntl.h b/libc/sysdeps/linux/i960/bits/fcntl.h
-index e2fcbe6..f6e145d 100644
---- a/libc/sysdeps/linux/i960/bits/fcntl.h
-+++ b/libc/sysdeps/linux/i960/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/ia64/bits/fcntl.h b/libc/sysdeps/linux/ia64/bits/fcntl.h
-index 1ff0ed5..fedefb6 100644
---- a/libc/sysdeps/linux/ia64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/ia64/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/m68k/bits/fcntl.h b/libc/sysdeps/linux/m68k/bits/fcntl.h
-index d7beb6c..66df337 100644
---- a/libc/sysdeps/linux/m68k/bits/fcntl.h
-+++ b/libc/sysdeps/linux/m68k/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/metag/bits/fcntl.h b/libc/sysdeps/linux/metag/bits/fcntl.h
-index c4f641b..e10abd7 100644
---- a/libc/sysdeps/linux/metag/bits/fcntl.h
-+++ b/libc/sysdeps/linux/metag/bits/fcntl.h
-@@ -100,6 +100,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/microblaze/bits/fcntl.h b/libc/sysdeps/linux/microblaze/bits/fcntl.h
-index a2e3573..20b7597 100644
---- a/libc/sysdeps/linux/microblaze/bits/fcntl.h
-+++ b/libc/sysdeps/linux/microblaze/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- # define F_SETPIPE_SZ 1031 /* Set of pipe page size array */
- # define F_GETPIPE_SZ 1032 /* Get of pipe page size array */
- #endif
-diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
-index 4291f6e..8c4c115 100644
---- a/libc/sysdeps/linux/mips/bits/fcntl.h
-+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
-@@ -111,6 +111,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/nios/bits/fcntl.h b/libc/sysdeps/linux/nios/bits/fcntl.h
-index 5854c18..36ca766 100644
---- a/libc/sysdeps/linux/nios/bits/fcntl.h
-+++ b/libc/sysdeps/linux/nios/bits/fcntl.h
-@@ -96,6 +96,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/nios2/bits/fcntl.h b/libc/sysdeps/linux/nios2/bits/fcntl.h
-index d7beb6c..66df337 100644
---- a/libc/sysdeps/linux/nios2/bits/fcntl.h
-+++ b/libc/sysdeps/linux/nios2/bits/fcntl.h
-@@ -98,6 +98,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
-index 217f54a..d150a31 100644
---- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h
-index 5c9f047..aceaec6 100644
---- a/libc/sysdeps/linux/sh/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sh/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/sh64/bits/fcntl.h b/libc/sysdeps/linux/sh64/bits/fcntl.h
-index ff741cb..b319e8b 100644
---- a/libc/sysdeps/linux/sh64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sh64/bits/fcntl.h
-@@ -95,6 +95,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/sparc/bits/fcntl.h b/libc/sysdeps/linux/sparc/bits/fcntl.h
-index 235d2ad..7e80d9e 100644
---- a/libc/sysdeps/linux/sparc/bits/fcntl.h
-+++ b/libc/sysdeps/linux/sparc/bits/fcntl.h
-@@ -106,6 +106,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- #if __WORDSIZE == 64
-diff --git a/libc/sysdeps/linux/v850/bits/fcntl.h b/libc/sysdeps/linux/v850/bits/fcntl.h
-index d0b8310..45deec4 100644
---- a/libc/sysdeps/linux/v850/bits/fcntl.h
-+++ b/libc/sysdeps/linux/v850/bits/fcntl.h
-@@ -93,6 +93,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/vax/bits/fcntl.h b/libc/sysdeps/linux/vax/bits/fcntl.h
-index ff5bff3..a30d5e1 100644
---- a/libc/sysdeps/linux/vax/bits/fcntl.h
-+++ b/libc/sysdeps/linux/vax/bits/fcntl.h
-@@ -92,6 +92,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FL. */
-diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h
-index a899dcf..02e011d 100644
---- a/libc/sysdeps/linux/x86_64/bits/fcntl.h
-+++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h
-@@ -113,6 +113,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
-diff --git a/libc/sysdeps/linux/xtensa/bits/fcntl.h b/libc/sysdeps/linux/xtensa/bits/fcntl.h
-index 5d28547..4e9aa7e 100644
---- a/libc/sysdeps/linux/xtensa/bits/fcntl.h
-+++ b/libc/sysdeps/linux/xtensa/bits/fcntl.h
-@@ -99,6 +99,8 @@
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set on new fd. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
- #endif
-
- /* For F_[GET|SET]FD. */
---
-1.9.0
-
diff --git a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch b/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
deleted file mode 100644
index c596db67b1..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0004-Add-clock_adjtime-syscall.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Pending
-
-From 8e19e651145554fbcb90179f3dfbc7ea8a07c900 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 15 Mar 2014 09:32:20 -0700
-Subject: [PATCH 4/4] Add clock_adjtime syscall
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- include/sys/timex.h | 5 ++++-
- libc/sysdeps/linux/common/Makefile.in | 2 +-
- libc/sysdeps/linux/common/clock_adjtime.c | 15 +++++++++++++++
- 3 files changed, 20 insertions(+), 2 deletions(-)
- create mode 100644 libc/sysdeps/linux/common/clock_adjtime.c
-
-diff --git a/include/sys/timex.h b/include/sys/timex.h
-index 621afce..9082a28 100644
---- a/include/sys/timex.h
-+++ b/include/sys/timex.h
-@@ -20,6 +20,7 @@
-
- #include <features.h>
- #include <sys/time.h>
-+#include <time.h>
-
- /* These definitions from linux/timex.h as of 2.2.0. */
-
-@@ -125,7 +126,9 @@ libc_hidden_proto(adjtimex)
- extern int ntp_gettime (struct ntptimeval *__ntv) __THROW;
- extern int ntp_adjtime (struct timex *__tntx) __THROW;
- #endif
--
-+#if defined __UCLIBC_HAS_REALTIME__
-+extern int clock_adjtime (clockid_t __clock_id, struct timex *__ntx) __THROW;
-+#endif
- __END_DECLS
-
- #endif /* sys/timex.h */
-diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
-index 10d9884..bb985b6 100644
---- a/libc/sysdeps/linux/common/Makefile.in
-+++ b/libc/sysdeps/linux/common/Makefile.in
-@@ -84,7 +84,7 @@ CSRC-$(ARCH_USE_MMU) += msync.c
- CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
- CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
- # aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
--CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
-+CSRC-$(UCLIBC_HAS_REALTIME) += clock_adjtime.c clock_getres.c clock_gettime.c clock_settime.c \
- fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
- nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
- sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
-diff --git a/libc/sysdeps/linux/common/clock_adjtime.c b/libc/sysdeps/linux/common/clock_adjtime.c
-new file mode 100644
-index 0000000..968ec27
---- /dev/null
-+++ b/libc/sysdeps/linux/common/clock_adjtime.c
-@@ -0,0 +1,15 @@
-+/*
-+ * clock_adjtime() for uClibc
-+ *
-+ * Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
-+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+#include <sys/timex.h>
-+
-+#ifdef __NR_clock_adjtime
-+_syscall2(int, clock_adjtime, clockid_t, clock_id, struct timex*, ntx)
-+#endif
---
-1.9.0
-
diff --git a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
index d2a8a81b94..fb52faa7a0 100644
--- a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
@@ -5,8 +5,8 @@ Upstream-Status: Pending
Index: git/libpthread/nptl/pthread_mutex_timedlock.c
===================================================================
---- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:22:20.000000000 -0800
-+++ git/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:24:12.275557670 -0800
+--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 2014-08-25 10:58:06.000000000 -0700
++++ git/libpthread/nptl/pthread_mutex_timedlock.c 2014-08-25 11:00:42.078242266 -0700
@@ -28,7 +28,9 @@
* error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
*/
@@ -17,124 +17,3 @@ Index: git/libpthread/nptl/pthread_mutex_timedlock.c
pthread_mutex_timedlock (
pthread_mutex_t *mutex,
const struct timespec *abstime)
-Index: git/libc/sysdeps/linux/powerpc/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -26,7 +26,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif /* __cplusplus */
-
- #if defined __GNUC__ && !defined _SOFT_FLOAT
-Index: git/libc/sysdeps/linux/alpha/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -24,7 +24,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
- #if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
-Index: git/libc/sysdeps/linux/i386/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -25,7 +25,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
-
-Index: git/libc/sysdeps/linux/ia64/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -23,7 +23,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
- #if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
-Index: git/libc/sysdeps/linux/m68k/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
-@@ -91,7 +91,7 @@
- # ifdef __cplusplus
- # define __m81_inline __inline
- # else
--# define __m81_inline extern __inline
-+# define __m81_inline __extern_inline
- # endif
- # define __M81_MATH_INLINES 1
- #endif
-@@ -350,14 +350,14 @@
- /* Note that there must be no whitespace before the argument passed for
- NAME, to make token pasting work correctly with -traditional. */
- # define __inline_forward_c(rettype, name, args1, args2) \
--extern __inline rettype __attribute__((__const__)) \
-+__extern_inline rettype __attribute__((__const__)) \
- name args1 \
- { \
- return __CONCAT(__,name) args2; \
- }
-
- # define __inline_forward(rettype, name, args1, args2) \
--extern __inline rettype name args1 \
-+__extern_inline rettype name args1 \
- { \
- return __CONCAT(__,name) args2; \
- }
-Index: git/libc/sysdeps/linux/mips/sys/tas.h
-===================================================================
---- git.orig/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:24:12.275557670 -0800
-@@ -29,7 +29,7 @@
- #ifdef __USE_EXTERN_INLINES
-
- # ifndef _EXTERN_INLINE
--# define _EXTERN_INLINE extern __inline
-+# define _EXTERN_INLINE __extern_inline
- # endif
-
- _EXTERN_INLINE int
-Index: git/libc/sysdeps/linux/sparc/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
-@@ -130,7 +130,7 @@
- # ifdef __cplusplus
- # define __MATH_INLINE __inline
- # else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- # endif /* __cplusplus */
-
- /* The gcc, version 2.7 or below, has problems with all this inlining
-Index: git/libc/sysdeps/linux/x86_64/bits/mathinline.h
-===================================================================
---- git.orig/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
-+++ git/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
-@@ -24,7 +24,7 @@
- #ifdef __cplusplus
- # define __MATH_INLINE __inline
- #else
--# define __MATH_INLINE extern __inline
-+# define __MATH_INLINE __extern_inline
- #endif
-
-
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index a86ac3ddf7..18587ca273 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -93,10 +93,10 @@ python () {
# if we use TARGET_CC_ARCH="-march=mips32" we end up
# with conflicting march options to gcc. Here we
# ask for MIPS32 ISA to match the chosen arch
-
- if "mips32" in d.getVar("TUNE_FEATURES",True):
+ tune = d.getVar("DEFAULTTUNE", True)
+ if tune in ['mips32', 'mips32r2']:
d.setVar('configmangle_append',
- "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_MIPS32=y\n\n")
+ "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_%s=y\n\n" % (tune.upper()))
if "${OE_FEATURES}":
d.setVar('configmangle_append',
"/^### DISTRO FEATURES$/a\\\n%s\n\n" %
diff --git a/meta/recipes-core/udev/udev-extraconf/automount.rules b/meta/recipes-core/udev/udev-extraconf/automount.rules
index 7e844c31bd..62578ea631 100644
--- a/meta/recipes-core/udev/udev-extraconf/automount.rules
+++ b/meta/recipes-core/udev/udev-extraconf/automount.rules
@@ -16,4 +16,4 @@
# Media automounting
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
-
+SUBSYSTEM=="block", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1" RUN+="/etc/udev/scripts/mount.sh"
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 7df1b6e3e7..3eea910854 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -78,8 +78,7 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_t
fi
-
-if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
+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
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index d69056dd76..6fbd92548a 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -13,6 +13,8 @@ SRC_URI = " \
file://localextra.rules \
"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index 11204aaa41..19e0e86506 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
LDFLAGS += "-lrt"
-DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux"
+DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux"
RPROVIDES_${PN} = "hotplug"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
@@ -27,11 +27,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://udev-cache \
file://udev-cache.default \
file://add-install-ptest.patch \
+ file://fix_rule-syntax-regex-ptest.patch \
file://run-ptest \
file://init"
inherit autotools pkgconfig update-rc.d ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make perl python"
libexecdir = "${base_libdir}"
EXTRA_OECONF = "--disable-introspection \
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
index 0f8e9b6588..bfc2e9409d 100644
--- a/meta/recipes-core/udev/udev/add-install-ptest.patch
+++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
@@ -8,20 +8,33 @@ Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Alexandra Safta <alst@enea.com>
Upstream-Status: Pending
+Add missing files for rule-syntax-check
+- Add rule-syntax-check.py
+- Add the deployed udev rules to the testdata
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+Upstream-Status: Pending
--- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100
+++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100
-@@ -708,3 +708,11 @@
+@@ -708,3 +708,18 @@
for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
+
++RULES = rules/* src/accelerometer/61-accelerometer.rules \
++ src/cdrom_id/60-cdrom_id.rules \
++ src/keymap/95-keyboard-force-release.rules src/keymap/95-keymap.rules \
++ src/mtd_probe/75-probe_mtd.rules src/v4l_id/60-persistent-v4l.rules
++
+install-ptest:
+ install test-udev $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
-+ $(MKDIR_P) $(DESTDIR)/test
++ install -d $(DESTDIR)/test $(DESTDIR)/rules
+ (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
-+ tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
++ (cd $(top_srcdir) && install test/rule-syntax-check.py $(DESTDIR)/test)
++ (cd $(top_srcdir) && install $(RULES) $(DESTDIR)/rules)
++ cp $(top_srcdir)/test/sys.tar.xz $(DESTDIR)/test/
--- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100
+++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100
@@ -1459,11 +1459,13 @@
diff --git a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
new file mode 100644
index 0000000000..548a241d8a
--- /dev/null
+++ b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
@@ -0,0 +1,59 @@
+The rule-syntax-check script fails with errors like this:
+
+Invalid line /lib/udev/rules.d/95-keymap.rules:49: ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
+(' clause:', 'ATTR{[dmi/id]product_name}=="W3J"')
+()
+
+
+Move line comment from end of rules file to its own line, the regex used to
+test correct syntax choke on it.
+
+The rule-syntax-check.py uses regex which errournessly complains on ATTR rules
+of the form ATTR{[dmi/id]board_name}=="30B7"
+Use the regex from systemd's script which allow [] characters and additional
+compare operators
+
+The Makefile passes rules-test.sh script a build host path to the testdata.
+Ignore the argument and use a relative path instead.
+
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+Upstream status pending
+Upstream status Inappropriate (cross environment path)
+
+diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules
+--- udev-182.orig/src/keymap/95-keymap.rules 2012-02-07 00:01:55.154640792 +0100
++++ udev-182/src/keymap/95-keymap.rules 2015-01-24 20:58:40.156930520 +0100
+@@ -94,7 +94,8 @@
+ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
+ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill"
+ # HP Pavillion dv6315ea has empty DMI_VENDOR
+-ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
++# "quick play"
++ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media"
+
+ # Gateway clone of Acer Aspire One AOA110/AOA150
+ ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer"
+diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py
+--- udev-182.orig/test/rule-syntax-check.py 2012-02-15 20:10:12.872333342 +0100
++++ udev-182/test/rule-syntax-check.py 2015-01-24 21:08:00.496049600 +0100
+@@ -28,7 +28,7 @@
+ no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
+ args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
+ no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
+-args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
++args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$')
+
+ result = 0
+ buffer = ''
+--- udev-182.orig/test/rules-test.sh 2012-01-29 01:15:46.000000000 +0100
++++ udev-182/test/rules-test.sh 2015-01-24 17:53:51.201858658 +0100
+@@ -4,7 +4,7 @@
+ # (C) 2010 Canonical Ltd.
+ # Author: Martin Pitt <martin.pitt@ubuntu.com>
+
+-[ -n "$srcdir" ] || srcdir=`dirname $0`/..
++srcdir=`dirname $0`/..
+
+ # skip if we don't have python
+ type python >/dev/null 2>&1 || {
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index f2c84d5d3e..0ab028b391 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -14,21 +14,28 @@ 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
-readfiles () {
- READDATA=""
- for filename in $@; do
- if [ -r $filename ]; then
- while read line; do
- READDATA="$READDATA$line"
- done < $filename
- fi
- done
-}
-
kill_udevd () {
pid=`pidof -x udevd`
[ -n "$pid" ] && kill $pid
@@ -57,38 +64,35 @@ case "$1" in
# the automount rule for udev needs /tmp directory available, as /tmp is a symlink
# to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure
# /var/volatile/tmp directory to be available.
- mkdir -p /var/volatile/tmp
+ mkdir -m 1777 -p /var/volatile/tmp
# Cache handling.
- # 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 /proc/atags"
if [ "$DEVCACHE" != "" ]; then
if [ -e $DEVCACHE ]; then
- readfiles $CMP_FILE_LIST
- NEWDATA="$READDATA"
- readfiles /etc/udev/cache.data
- OLDDATA="$READDATA"
- if [ "$OLDDATA" = "$NEWDATA" ]; then
- (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
+ 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 /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
+ [ -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
- if [ "$VERBOSE" != "no" ]; then
- echo "udev: udev cache not used"
- echo "udev: we use $CMP_FILE_LIST as criteria to judge whether the cache /dev could be resued"
- echo "udev: olddata: $OLDDATA"
- echo "udev: newdata: $NEWDATA"
- fi
- echo "$NEWDATA" > /dev/shm/udev.cache
+ 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.
- readfiles $CMP_FILE_LIST
- echo "$READDATA" > /dev/shm/udev.cache
+ touch "$DEVCACHE_REGEN"
fi
fi
fi
@@ -97,7 +101,7 @@ case "$1" in
kill_udevd > "/dev/null" 2>&1
# trigger the sorted events
- echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+ [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
@UDEVD@ -d
udevadm control --env=STARTUP=1
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
index c6961ce58a..0e39806b01 100644
--- a/meta/recipes-core/udev/udev/run-ptest
+++ b/meta/recipes-core/udev/udev/run-ptest
@@ -1,3 +1,5 @@
#!/bin/sh
+tar -C test/ -xJf test/sys.tar.xz
make -k check-TESTS
+make test-sys-distclean
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index db5a513e14..df97000dde 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -16,6 +16,25 @@ export TZ=/etc/localtime
[ -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
@@ -23,10 +42,28 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
exit 0
fi
-if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
- echo "Populating dev cache"
- (cd /; tar cf "$DEVCACHE" dev)
- mv /dev/shm/udev.cache /etc/udev/cache.data
+[ "$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"
+
+(
+ set -e
+ trap 'echo "udev-cache: update failed!"' 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}" -T-
+ 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/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
index 20933361a9..a3b732698d 100644
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -1,5 +1,5 @@
# Default for /etc/init.d/udev
# Comment this out to disable device cache
-DEVCACHE="/etc/dev.tar"
+DEVCACHE="/etc/udev-cache.tar.gz"
PROBE_PLATFORM_BUS="yes"
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 83bb4a66b9..b4f51e9e4f 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,16 +17,12 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
-inherit autotools gettext pkgconfig systemd
+inherit autotools gettext pkgconfig systemd update-alternatives python-dir
DEPENDS = "zlib ncurses"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \
- file://MCONFIG \
- file://defines.h \
- file://make_include \
- file://swapargs.h \
"
PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
@@ -36,7 +32,9 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
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 ${PN}-bash-completion"
+ util-linux-partx ${PN}-bash-completion util-linux-hwclock \
+ util-linux-findfs util-linux-getopt"
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
@@ -55,14 +53,20 @@ PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'p
PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
# Respect the systemd feature for uuidd
-PACKAGECONFIG[systemd] = "--enable-socket-activation --with-systemdsystemunitdir=${systemd_unitdir}/system/, --disable-socket-activation --without-systemdsystemunitdir"
+PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemd --without-systemdsystemunitdir,systemd"
# Build setpriv requires libcap-ng
PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
+# Build python bindings for libmount
+PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python"
+
FILES_${PN}-bash-completion += "${datadir}/bash-completion"
FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
+FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/.debug/"
+
FILES_util-linux-agetty = "${base_sbindir}/agetty"
FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
FILES_util-linux-fstrim = "${base_sbindir}/fstrim"
@@ -73,14 +77,19 @@ 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 = "${base_sbindir}/readprofile.${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 = "${bindir}/getopt.${BPN}"
FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
FILES_util-linux-libmount = "${base_libdir}/libmount.so.*"
+FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \
+ ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*"
FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*"
FILES_util-linux-lscpu = "${bindir}/lscpu"
@@ -90,7 +99,6 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
-
# Util-linux' blkid replaces the e2fsprogs one
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -109,15 +117,14 @@ RDEPENDS_${PN}_class-nativesdk = ""
RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev"
-SYSTEMD_PACKAGES = "${PN}-uuidd"
-SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service"
+SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim"
+SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
+SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
+SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
do_compile () {
set -e
- install ${WORKDIR}/MCONFIG ${S}/MCONFIG
- install ${WORKDIR}/make_include ${S}/make_include
- install ${WORKDIR}/swapargs.h ${S}/mount-deprecated/swapargs.h
- install ${WORKDIR}/defines.h ${S}/defines.h
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
}
@@ -132,8 +139,8 @@ do_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 readprofile fsck blkid blockdev fstrim sulogin"
- usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt"
+ sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root"
+ usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt readprofile"
binprogs_a="dmesg kill more umount mount login reset su"
if [ "${base_sbindir}" != "${sbindir}" ]; then
@@ -160,13 +167,11 @@ do_install () {
rm -f ${D}${bindir}/chkdupexe
}
-inherit update-alternatives
-
ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root"
+ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock hwclock utmpdump eject getopt sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -174,11 +179,10 @@ ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
+ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
-ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
-ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt"
ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
@@ -190,6 +194,7 @@ 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_util-linux-hwclock = "hwclock"
# There seems to be problem, atleast on nslu2, with these, untill they are
# fixed the busybox ones have higher priority
ALTERNATIVE_PRIORITY[hwclock] = "10"
@@ -209,7 +214,7 @@ ALTERNATIVE_util-linux-umount = "umount"
ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
ALTERNATIVE_util-linux-readprofile = "readprofile"
-ALTERNATIVE_LINK_NAME[readprofile] = "${base_sbindir}/readprofile"
+ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile"
ALTERNATIVE_util-linux-losetup = "losetup"
ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
@@ -229,6 +234,8 @@ ALTERNATIVE_util-linux-reset = "reset"
ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+ALTERNATIVE_util-linux-getopt = "getopt"
+
BBCLASSEXTEND = "native nativesdk"
python do_package_prepend () {
diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG
deleted file mode 100644
index 3fea2c02d7..0000000000
--- a/meta/recipes-core/util-linux/util-linux/MCONFIG
+++ /dev/null
@@ -1,223 +0,0 @@
-# MCONFIG -- Configuration stuff for util-linux
-# Created: Sat Feb 4 15:50:30 1995
-# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
-
-# For a user-mode install, make (at least) three changes:
-# - remove the `-o root' part in INSTALLSUID
-# - set USE_TTY_GROUP=no
-# - define DESTDIR
-
-# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
-# Select for CPU i386 if the binaries must be able to run on an intel 386
-# (by default i486 code is generated, see below)
-CPU=$(shell uname -m)
-ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
-
-# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
-# will use PAM for authentication. Additionally, passwd will not be
-# installed as it is not PAM aware.
-HAVE_PAM=no
-
-# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
-# and vipw will not be built or installed from the login-utils
-# subdirectory.
-HAVE_SHADOW=yes
-
-# If HAVE_PASSWD is set to "yes", then passwd will not be built or
-# installed from the login-utils subdirectory (but login, chfn, chsh,
-# newgrp, and vipw *will* be installed).
-HAVE_PASSWD=no
-
-# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
-# non-root users to enter the account password before updating /etc/passwd.
-REQUIRE_PASSWORD=yes
-#REQUIRE_PASSWORD=no
-
-# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
-# the selected shell be listed in /etc/shells -- otherwise only a warning is
-# printed. This prevents someone from setting their shell to /bin/false.
-ONLY_LISTED_SHELLS=yes
-#ONLY_LISTED_SHELLS=no
-
-
-# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
-# be built or installed from the login-utils subdirectory. (The shutdown
-# and halt that come with the SysVinit package should be used with the init
-# found in that package.)
-HAVE_SYSVINIT=no
-
-# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
-# not be built or installed from the login-utils subdirectory. (The
-# shutdown and init from the SysVinit package do not depend on the last,
-# mesg, and wall from that package.)
-HAVE_SYSVINIT_UTILS=no
-
-# If HAVE_WRITE is set to "yes", then write will not be built or
-# installed from the misc-utils subdirectory.
-# (There is a network aware write in netwrite from NetKit 0.16 or later.)
-HAVE_WRITE=no
-
-# If HAVE_GETTY is set to "yes", then agetty will not be built or
-# installed from the login-utils subdirectory. Note that agetty can
-# co-exist with other gettys, so this option should never be used.
-HAVE_GETTY=no
-
-# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
-# setgid to the "tty" group, and mesg will only set the group write bit.
-# Note that this is only useful if login/xterm/etc. change the group of the
-# user's tty to "tty" [The login in util-linux does this correctly, and
-# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
-# properly.]
-USE_TTY_GROUP=no
-
-# If HAVE_KILL is set to "yes", then kill will not be built or
-# installed from the misc-utils subdirectory.
-# (There is also a kill in the procps package.)
-HAVE_KILL=no
-
-# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
-# to the current user, allowing her to make a screendump and do other
-# nifty things on the console, but also allowing him to keep an open
-# file descriptor after logging out to trick the next user.
-ALLOW_VCS_USE=yes
-
-# If HAVE_RESET is set to "yes", then reset won't be installed. The version
-# of reset that comes with the ncurses package is less aggressive.
-HAVE_RESET=yes
-
-# If HAVE_SLN is set to "yes", then sln won't be installed
-# (but the man page sln.8 will be installed anyway).
-# sln also comes with libc and glibc.
-HAVE_SLN=no
-
-# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
-HAVE_FDUTILS=no
-
-# If SILENT_PG is set to "yes", then pg will not ring the bell
-# when an invalid key is pressed
-SILENT_PG=no
-
-# If configure decides that Native Language Support (NLS) is available,
-# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
-# DISABLE_NLS to "yes".
-DISABLE_NLS=no
-
-# Different optimizations for different cpus.
-# gcc 3.0 likes options -mcpu=i486 instead of -m486
-ifeq "$(ARCH)" "intel"
- ifeq "$(HAVE_OLD_GCC)" "yes"
- CPUHEAD=-m
- else
- CPUHEAD=-mcpu=i
- endif
- ifeq "$(CPU)" "i386"
- CPUTAIL=386
- else
- CPUTAIL=486
- endif
- CPUOPT= $(CPUHEAD)$(CPUTAIL)
- OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
-else
- ifeq "$(ARCH)" "arm"
- OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
- else
- OPT= -O2 -fomit-frame-pointer
- endif
-endif
-
-WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
-
-LIB=../lib
-
-ERR_O=$(LIB)/err.o
-
-# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
-# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
-# HAVE_SLANG=yes
-# There is a subdirectory /usr/include/slang containing slcurses.h
-# SLANGFLAGS=-I/usr/include/slang
-# No such subdirectory - slcurses.h lives in /usr/include
-# (no extra definition required).
-LIBSLANG=-lslang
-
-#
-# Paths used for compilation (not all are actually used, see CFLAGS below)
-#
-DEV_DIR= /dev
-ETC_DIR= /etc
-SBIN_DIR= /sbin
-USRSBIN_DIR= /usr/sbin
-USRLIB_DIR= /usr/lib
-USRBIN_DIR= /usr/bin
-USRGAMES_DIR= /usr/games
-USRSHAREMISC_DIR=/usr/share/misc
-LOCALE_DIR= /usr/share/locale
-BIN_DIR= /bin
-VAR_PATH= /var
-LOG_DIR= /var/log
-MAN_DIR= /usr/share/man
-INFO_DIR= /usr/share/info
-
-#
-# Paths used for install
-#
-DEVDIR= $(DESTDIR)$(DEV_DIR)
-ETCDIR= $(DESTDIR)$(ETC_DIR)
-SBINDIR= $(DESTDIR)$(SBIN_DIR)
-USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
-USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
-USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
-USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
-USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
-LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
-BINDIR= $(DESTDIR)$(BIN_DIR)
-VARPATH= $(DESTDIR)$(VAR_PATH)
-LOGDIR= $(DESTDIR)$(LOG_DIR)
-MANDIR= $(DESTDIR)$(MAN_DIR)
-MAN1DIR= $(MANDIR)/man1
-MAN3DIR= $(MANDIR)/man3
-MAN5DIR= $(MANDIR)/man5
-MAN6DIR= $(MANDIR)/man6
-MAN8DIR= $(MANDIR)/man8
-INFODIR= $(DESTDIR)$(INFO_DIR)
-
-# Directory for shutdown, halt, reboot, etc.
-SHUTDOWNDIR= $(SBINDIR)
-
-# Modes
-DIRMODE= 755
-BINMODE= 755
-MANMODE= 644
-DATMODE= 644
-INFOMODE= 644
-SUIDMODE= 4755
-
-CHMOD= chmod
-INSTALL= install
-INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
-INSTALLBIN= $(INSTALL) -m $(BINMODE)
-INSTALLMAN= $(INSTALL) -m $(MANMODE)
-INSTALLDAT= $(INSTALL) -m $(DATMODE)
-INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
-
-ifeq "$(DISABLE_NLS)" "yes"
-NLSFLAGS = -DDISABLE_NLS
-endif
-
-CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
- $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
- -D_FILE_OFFSET_BITS=64 \
- -DSBINDIR=\"$(SBIN_DIR)\" \
- -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
- -DLOGDIR=\"$(LOG_DIR)\" \
- -DVARPATH=\"$(VAR_PATH)\" \
- -DLOCALEDIR=\"$(LOCALE_DIR)\" \
- $(CFLAGS)
-
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $< -o $@
-
-%: %.cc
- $(CXX) $(CFLAGS) $< -o $@
-
diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h
deleted file mode 100644
index 6ce6b86df5..0000000000
--- a/meta/recipes-core/util-linux/util-linux/defines.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#define UTIL_LINUX_VERSION "2.12"
-#define util_linux_version "util-linux-2.12"
-
-#define HAVE_blkpg_h
-#define HAVE_kd_h
-#define HAVE_locale_h
-#define HAVE_langinfo_h
-#define HAVE_sys_user_h
-#define HAVE_asm_types_h
-//#define NEED_tqueue_h
diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch
deleted file mode 100644
index cefae97e9c..0000000000
--- a/meta/recipes-core/util-linux/util-linux/fix-configure.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-The userlib_execdir was not getting set correctly, the quoting
-was wrong as these quoted items were not getting expanded correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: util-linux-2.24.1/configure.ac
-===================================================================
---- util-linux-2.24.1.orig/configure.ac
-+++ util-linux-2.24.1/configure.ac
-@@ -76,7 +76,7 @@ fi
- AC_SUBST([usrsbin_execdir])
-
- AS_CASE([$libdir],
-- ['${exec_prefix}/'* | '${prefix}/'* | /usr/*],
-+ [${exec_prefix}/* | ${prefix}/* | /usr/*],
- [usrlib_execdir=$libdir],
- [usrlib_execdir='${exec_prefix}'$libdir]
- )
diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include
deleted file mode 100644
index e6abcd91f7..0000000000
--- a/meta/recipes-core/util-linux/util-linux/make_include
+++ /dev/null
@@ -1,17 +0,0 @@
-VERSION=2.12
-CC=gcc
-CFLAGS=
-LDFLAGS=
-HAVE_OLD_GCC=yes
-HAVE_RAW_H=yes
-HAVE_NCURSES=yes
-CURSESFLAGS=-DNCH=1
-LIBCURSES=-lncurses
-HAVE_TERMCAP=no
-NEED_LIBCRYPT=yes
-FOREIGN = --foreign-user
-HAVE_XGETTEXT=yes
-HAVE_OPENPTY=yes
-HAVE_PIVOT_ROOT=yes
-HAVE_GOOD_RPC=yes
-HAVE_ZLIB=yes
diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h
deleted file mode 100644
index e960eef05f..0000000000
--- a/meta/recipes-core/util-linux/util-linux/swapargs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SWAPON_HAS_TWO_ARGS
-#include <asm/page.h>
-#include <sys/swap.h>
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch
deleted file mode 100644
index 8f26451aa8..0000000000
--- a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Pending
-
-util-linux: ensure the existence of directory for PATHFILES
-
-When compiling util-linux, it's possible to encounter the following error.
- /bin/sh: line 2:: misc-utils/uuidd.8.tmp: No such file or directory
-
-This is because that the misc-utils directory doesn't exist when trying to write to
-misc-utils/uuidd.8.tmp.
-
-When generating misc-utils/uuidd.8 (or anything in PATHFILES), its directory
-may not have been created yet. So we need to ensure the existence of the directory
-to avoid the compilation error.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index 17f4c33..ca3dc0f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -123,6 +123,7 @@ EXTRA_DIST += $(PATHFILES:=.in)
-
- $(PATHFILES): Makefile
- @ rm -f $@ $@.tmp
-+ @ mkdir -p `dirname $@`
- $(AM_V_GEN) srcdir=''; \
- test -f ./$@.in || srcdir=$(srcdir)/; \
- $(edit_cmd) $${srcdir}$@.in >$@.tmp
---
-1.7.9.5
-
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
index afe543c6e8..1f496dee21 100644
--- a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
@@ -16,24 +16,29 @@ Patches revert upstream changes in order to support older
machines.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 1 +
+ include/c.h | 7 +++++++
+ 2 files changed, 8 insertions(+)
-Index: util-linux-2.24.1/configure.ac
-===================================================================
---- util-linux-2.24.1.orig/configure.ac
-+++ util-linux-2.24.1/configure.ac
-@@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \
+diff --git a/configure.ac b/configure.ac
+index eb3680b..93e015f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \
llseek \
lseek64 \
mempcpy \
+ mkostemp \
nanosleep \
+ open_memstream \
personality \
- posix_fadvise \
-Index: util-linux-2.24.1/include/c.h
-===================================================================
---- util-linux-2.24.1.orig/include/c.h
-+++ util-linux-2.24.1/include/c.h
-@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d)
+diff --git a/include/c.h b/include/c.h
+index e423e8b..cf33b94 100644
+--- a/include/c.h
++++ b/include/c.h
+@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
#endif
/*
@@ -47,27 +52,6 @@ Index: util-linux-2.24.1/include/c.h
* MAXHOSTNAMELEN replacement
*/
static inline size_t get_hostname_max(void)
-Index: util-linux-2.24.1/lib/randutils.c
-===================================================================
---- util-linux-2.24.1.orig/lib/randutils.c
-+++ util-linux-2.24.1/lib/randutils.c
-@@ -16,6 +16,7 @@
- #include <sys/syscall.h>
-
- #include "randutils.h"
-+#include "c.h"
-
- #ifdef HAVE_TLS
- #define THREAD_LOCAL static __thread
-Index: util-linux-2.24.1/lib/wholedisk.c
-===================================================================
---- util-linux-2.24.1.orig/lib/wholedisk.c
-+++ util-linux-2.24.1/lib/wholedisk.c
-@@ -10,6 +10,7 @@
-
- #include "blkdev.h"
- #include "wholedisk.h"
-+#include "c.h"
-
- int is_whole_disk_fd(int fd, const char *name)
- {
+--
+1.9.1
+
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
index f131b763ca..6717a75a90 100644
--- a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
@@ -1,27 +1,33 @@
Upstream-Status: Pending
-Index: util-linux-2.22.1/login-utils/login.c
-===================================================================
---- util-linux-2.22.1.orig/login-utils/login.c
-+++ util-linux-2.22.1/login-utils/login.c
-@@ -1239,6 +1239,8 @@ int main(int argc, char **argv)
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ login-utils/login.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/login-utils/login.c b/login-utils/login.c
+index ebb76f5..38c881b 100644
+--- a/login-utils/login.c
++++ b/login-utils/login.c
+@@ -1110,6 +1110,7 @@ int main(int argc, char **argv)
char *buff;
int childArgc = 0;
int retcode;
+ struct sigaction act;
-+
char *pwdbuf = NULL;
struct passwd *pwd = NULL, _pwd;
-@@ -1252,7 +1254,10 @@ int main(int argc, char **argv)
+@@ -1123,7 +1124,9 @@ int main(int argc, char **argv)
timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
signal(SIGALRM, timedout);
-- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */
+- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioctl() */
+ (void) sigaction(SIGALRM, NULL, &act);
+ act.sa_flags &= ~SA_RESTART;
+ sigaction(SIGALRM, &act, NULL);
-+
alarm(timeout);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
+--
+1.9.1
+
diff --git a/meta/recipes-core/util-linux/util-linux_2.24.2.bb b/meta/recipes-core/util-linux/util-linux_2.25.2.bb
index ed753e48b3..697b9000c0 100644
--- a/meta/recipes-core/util-linux/util-linux_2.24.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.25.2.bb
@@ -1,4 +1,4 @@
-MAJOR_VERSION = "2.24"
+MAJOR_VERSION = "2.25"
require util-linux.inc
PR = "r1"
@@ -13,14 +13,12 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
file://util-linux-ng-2.16-mount_lock_path.patch \
file://uclibc-__progname-conflict.patch \
file://configure-sbindir.patch \
- file://fix-configure.patch \
file://fix-parallel-build.patch \
- file://util-linux-ensure-the-existence-of-directory-for-PAT.patch \
${OLDHOST} \
"
-SRC_URI[md5sum] = "3f191727a0d28f7204b755cf1b6ea0aa"
-SRC_URI[sha256sum] = "1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0"
+SRC_URI[md5sum] = "cab3d7be354000f629bc601238b629b3"
+SRC_URI[sha256sum] = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6"
CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
diff --git a/meta/recipes-core/volatile-binds/files/COPYING.MIT b/meta/recipes-core/volatile-binds/files/COPYING.MIT
new file mode 100644
index 0000000000..7e7d57413d
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/meta/recipes-core/volatile-binds/files/mount-copybind b/meta/recipes-core/volatile-binds/files/mount-copybind
new file mode 100755
index 0000000000..2aeaf84ddb
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/mount-copybind
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Perform a bind mount, copying existing files as we do so to ensure the
+# overlaid path has the necessary content.
+
+if [ $# -lt 2 ]; then
+ echo >&2 "Usage: $0 spec mountpoint [OPTIONS]"
+ exit 1
+fi
+
+spec=$1
+mountpoint=$2
+
+if [ $# -gt 2 ]; then
+ options=$3
+else
+ options=
+fi
+
+[ -n "$options" ] && options=",$options"
+
+mkdir -p "${spec%/*}"
+if [ -d "$mountpoint" ]; then
+ if [ ! -d "$spec" ]; then
+ mkdir "$spec"
+ cp -pPR "$mountpoint"/. "$spec/"
+ fi
+elif [ -f "$mountpoint" ]; then
+ if [ ! -f "$spec" ]; then
+ cp -pP "$mountpoint" "$spec"
+ fi
+fi
+
+mount -o "bind$options" "$spec" "$mountpoint"
diff --git a/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
new file mode 100644
index 0000000000..32be5b4425
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
@@ -0,0 +1,19 @@
+[Unit]
+Description=Bind mount volatile @where@
+DefaultDependencies=false
+Before=local-fs.target
+RequiresMountsFor=@whatparent@ @whereparent@
+ConditionPathIsReadWrite=@whatparent@
+ConditionPathExists=@where@
+ConditionPathIsReadWrite=!@where@
+
+[Service]
+Type=oneshot
+RemainAfterExit=Yes
+StandardOutput=syslog
+TimeoutSec=0
+ExecStart=/sbin/mount-copybind @what@ @where@
+ExecStop=/sbin/umount @where@
+
+[Install]
+WantedBy=local-fs.target
diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb
new file mode 100644
index 0000000000..694ba1e487
--- /dev/null
+++ b/meta/recipes-core/volatile-binds/volatile-binds.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Volatile bind mount setup and configuration for read-only-rootfs"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://../COPYING.MIT;md5=5750f3aa4ea2b00c2bf21b2b2a7b714d"
+
+SRC_URI = "\
+ file://mount-copybind \
+ file://COPYING.MIT \
+ file://volatile-binds.service.in \
+"
+
+inherit allarch systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+VOLATILE_BINDS ?= "\
+ /var/volatile/lib /var/lib\n\
+"
+VOLATILE_BINDS[type] = "list"
+VOLATILE_BINDS[separator] = "\n"
+
+def volatile_systemd_services(d):
+ services = []
+ for line in oe.data.typed_value("VOLATILE_BINDS", d):
+ if not line:
+ continue
+ what, where = line.split(None, 1)
+ services.append("%s.service" % what[1:].replace("/", "-"))
+ return " ".join(services)
+
+SYSTEMD_SERVICE_${PN} = "${@volatile_systemd_services(d)}"
+
+FILES_${PN} += "${systemd_unitdir}/system/*.service"
+
+do_compile () {
+ while read spec mountpoint; do
+ if [ -z "$spec" ]; then
+ continue
+ fi
+
+ servicefile="${spec#/}"
+ servicefile="$(echo "$servicefile" | tr / -).service"
+ sed -e "s#@what@#$spec#g; s#@where@#$mountpoint#g" \
+ -e "s#@whatparent@#${spec%/*}#g; s#@whereparent@#${mountpoint%/*}#g" \
+ volatile-binds.service.in >$servicefile
+ done <<END
+${@d.getVar('VOLATILE_BINDS', True).replace("\\n", "\n")}
+END
+
+ if [ -e var-volatile-lib.service ]; then
+ # As the seed is stored under /var/lib, ensure that this service runs
+ # after the volatile /var/lib is mounted.
+ sed -i -e "/^Before=/s/\$/ systemd-random-seed.service/" \
+ -e "/^WantedBy=/s/\$/ systemd-random-seed.service/" \
+ var-volatile-lib.service
+ fi
+}
+do_compile[dirs] = "${WORKDIR}"
+
+do_install () {
+ install -d ${D}${base_sbindir}
+ install -m 0755 mount-copybind ${D}${base_sbindir}/
+
+ install -d ${D}${systemd_unitdir}/system
+ for service in ${SYSTEMD_SERVICE_volatile-binds}; do
+ install -m 0644 $service ${D}${systemd_unitdir}/system/
+ done
+}
+do_install[dirs] = "${WORKDIR}"
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch b/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch
new file mode 100644
index 0000000000..650794f504
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.8/ldflags-tests.patch
@@ -0,0 +1,45 @@
+Obey LDFLAGS for tests
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- zlib-1.2.8.orig/Makefile.in
++++ zlib-1.2.8/Makefile.in
+@@ -26,7 +26,7 @@ CFLAGS=-O
+
+ SFLAGS=-O
+ LDFLAGS=
+-TEST_LDFLAGS=-L. libz.a
++TEST_LDFLAGS=-L. $(LDFLAGS)
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+@@ -176,22 +176,22 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.
+ -@rmdir objs
+
+ example$(EXE): example.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ minigzip$(EXE): minigzip.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ examplesh$(EXE): example.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) $(SHAREDLIBV)
+
+ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) $(SHAREDLIBV)
+
+ example64$(EXE): example64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ minigzip64$(EXE): minigzip64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) $(STATICLIB)
+
+ install-libs: $(LIBS)
+ -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
index bdfa045b7b..ca0ba3ff6e 100644
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b
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 \
"
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch b/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch
new file mode 100644
index 0000000000..79a6897572
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch
@@ -0,0 +1,193 @@
+This patch comes from:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=73;filename=apt_0.9.7.9%2Bdeb7u2.debdiff;att=1;bug=749795
+
+Upstream-Status: Backport
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+
+diff -uarN apt-0.9.9.4-org/cmdline/apt-get.cc apt-0.9.9.4/cmdline/apt-get.cc
+--- apt-0.9.9.4-org/cmdline/apt-get.cc 2014-08-29 15:37:42.587156134 +0800
++++ apt-0.9.9.4/cmdline/apt-get.cc 2014-08-29 15:51:16.672334086 +0800
+@@ -1046,25 +1046,8 @@
+ return true;
+ }
+ /*}}}*/
+-// CheckAuth - check if each download comes form a trusted source /*{{{*/
+-// ---------------------------------------------------------------------
+-/* */
+-static bool CheckAuth(pkgAcquire& Fetcher)
++static bool AuthPrompt(std::string UntrustedList, bool const PromptUser)
+ {
+- string UntrustedList;
+- for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
+- {
+- if (!(*I)->IsTrusted())
+- {
+- UntrustedList += string((*I)->ShortDesc()) + " ";
+- }
+- }
+-
+- if (UntrustedList == "")
+- {
+- return true;
+- }
+-
+ ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"),UntrustedList,"");
+
+ if (_config->FindB("APT::Get::AllowUnauthenticated",false) == true)
+@@ -1073,6 +1056,9 @@
+ return true;
+ }
+
++ if (PromptUser == false)
++ return _error->Error(_("Some packages could not be authenticated"));
++
+ if (_config->FindI("quiet",0) < 2
+ && _config->FindB("APT::Get::Assume-Yes",false) == false)
+ {
+@@ -1090,6 +1076,28 @@
+ return _error->Error(_("There are problems and -y was used without --force-yes"));
+ }
+ /*}}}*/
++// CheckAuth - check if each download comes form a trusted source /*{{{*/
++// ---------------------------------------------------------------------
++/* */
++static bool CheckAuth(pkgAcquire& Fetcher, bool PromptUser=true)
++{
++ string UntrustedList;
++ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
++ {
++ if (!(*I)->IsTrusted())
++ {
++ UntrustedList += string((*I)->ShortDesc()) + " ";
++ }
++ }
++
++ if (UntrustedList == "")
++ {
++ return true;
++ }
++
++ return AuthPrompt(UntrustedList, PromptUser);
++}
++
+ // InstallPackages - Actually download and install the packages /*{{{*/
+ // ---------------------------------------------------------------------
+ /* This displays the informative messages describing what is going to
+@@ -2482,6 +2490,7 @@
+
+ // Load the requestd sources into the fetcher
+ unsigned J = 0;
++ std::string UntrustedList;
+ for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
+ {
+ string Src;
+@@ -2491,7 +2500,10 @@
+ delete[] Dsc;
+ return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
+ }
+-
++
++ if (Last->Index().IsTrusted() == false)
++ UntrustedList += Src + " ";
++
+ string srec = Last->AsStr();
+ string::size_type pos = srec.find("\nVcs-");
+ while (pos != string::npos)
+@@ -2575,7 +2587,11 @@
+ Last->Index().SourceInfo(*Last,*I),Src);
+ }
+ }
+-
++
++ // check authentication status of the source as well
++ if (UntrustedList != "" && !AuthPrompt(UntrustedList, false))
++ return false;
++
+ // Display statistics
+ unsigned long long FetchBytes = Fetcher.FetchNeeded();
+ unsigned long long FetchPBytes = Fetcher.PartialPresent();
+diff -uarN apt-0.9.9.4-org/test/integration/framework apt-0.9.9.4/test/integration/framework
+--- apt-0.9.9.4-org/test/integration/framework 2014-08-29 15:37:42.623156154 +0800
++++ apt-0.9.9.4/test/integration/framework 2014-08-29 15:55:23.592197940 +0800
+@@ -151,7 +151,7 @@
+ mkdir rootdir aptarchive keys
+ cd rootdir
+ mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d
+- mkdir -p var/cache var/lib var/log
++ mkdir -p var/cache var/lib var/log tmp
+ mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers
+ touch var/lib/dpkg/available
+ mkdir -p usr/lib/apt
+@@ -910,3 +910,35 @@
+ local IGNORE
+ read IGNORE
+ }
++
++testsuccess() {
++ if [ "$1" = '--nomsg' ]; then
++ shift
++ else
++ msgtest 'Test for successful execution of' "$*"
++ fi
++ local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output"
++ if $@ >${OUTPUT} 2>&1; then
++ msgpass
++ else
++ echo >&2
++ cat >&2 $OUTPUT
++ msgfail
++ fi
++}
++
++testfailure() {
++ if [ "$1" = '--nomsg' ]; then
++ shift
++ else
++ msgtest 'Test for failure in execution of' "$*"
++ fi
++ local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output"
++ if $@ >${OUTPUT} 2>&1; then
++ echo >&2
++ cat >&2 $OUTPUT
++ msgfail
++ else
++ msgpass
++ fi
++}
+diff -uarN apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated apt-0.9.9.4/test/integration/test-apt-get-source-authenticated
+--- apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated 1970-01-01 08:00:00.000000000 +0800
++++ apt-0.9.9.4/test/integration/test-apt-get-source-authenticated 2014-08-29 15:58:06.137156796 +0800
+@@ -0,0 +1,31 @@
++#!/bin/sh
++#
++# Regression test for debian bug #749795. Ensure that we fail with
++# a error if apt-get source foo will download a source that comes
++# from a unauthenticated repository
++#
++set -e
++
++TESTDIR=$(readlink -f $(dirname $0))
++. $TESTDIR/framework
++
++setupenvironment
++configarchitecture "i386"
++
++# a "normal" package with source and binary
++buildsimplenativepackage 'foo' 'all' '2.0'
++
++setupaptarchive --no-update
++
++APTARCHIVE=$(readlink -f ./aptarchive)
++rm -f $APTARCHIVE/dists/unstable/*Release*
++
++# update without authenticated InRelease file
++testsuccess aptget update
++
++# this all should fail
++testfailure aptget install -y foo
++testfailure aptget source foo
++
++# allow overriding the warning
++testsuccess aptget source --allow-unauthenticated foo
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 36035b0d51..fede8694c4 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -1,7 +1,7 @@
require apt.inc
inherit native
-DEPENDS += "dpkg-native gettext-native"
+DEPENDS += "dpkg-native gettext-native db-native curl-native"
PACKAGES = ""
USE_NLS = "yes"
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
index 0897d3a9fc..a553aa21fe 100644
--- a/meta/recipes-devtools/apt/apt-package.inc
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -42,6 +42,7 @@ FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}"
do_install () {
set -x
install -d ${D}${bindir}
+ install -m 0755 bin/apt-key ${D}${bindir}/
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
install -m 0755 bin/apt-config ${D}${bindir}/
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index b528c00fd8..378021a327 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -11,6 +11,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
file://truncate-filename.patch \
file://nodoc.patch \
file://disable-configure-in-makefile.patch \
+ file://apt-0.9.9.4-CVE-2014-0478.patch \
"
inherit autotools gettext
diff --git a/meta/recipes-devtools/apt/apt_0.9.9.4.bb b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
index ae9ed6cb66..77cbff1c0c 100644
--- a/meta/recipes-devtools/apt/apt_0.9.9.4.bb
+++ b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
@@ -1,5 +1,5 @@
DEPENDS = "curl db"
-RDEPENDS_${PN} = "dpkg"
+RDEPENDS_${PN} = "dpkg bash debianutils"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
require apt.inc
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc
index 8ed4b134ea..8b00fbddf5 100644
--- a/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -23,6 +23,7 @@ RDEPENDS_${PN} = "m4 gnu-config \
perl-module-getopt-long \
perl-module-io-file \
perl-module-posix \
+ perl-module-data-dumper \
"
RDEPENDS_${PN}_class-native = "m4-native gnu-config-native"
diff --git a/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch b/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch
deleted file mode 100644
index 88f750195d..0000000000
--- a/meta/recipes-devtools/autoconf/autoconf/autoreconf-foreign.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Pending
-
---- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400
-+++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400
-@@ -184,6 +184,8 @@
-
- $aclocal_supports_force = `$aclocal --help` =~ /--force/;
-
-+ $automake .= ' --foreign';
-+
- # Dispatch autoreconf's option to the tools.
- # --include;
- $autoconf .= join (' --include=', '', @include);
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index 5c652d43fa..41a17d2913 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
SRC_URI += "file://autoreconf-include.patch \
file://check-automake-cross-warning.patch \
file://autoreconf-exclude.patch \
- file://autoreconf-foreign.patch \
file://autoreconf-gnuconfigize.patch \
file://config_site.patch \
file://remove-usr-local-lib-from-m4.patch \
@@ -23,6 +22,6 @@ SRC_URI[sha256sum] = "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd
SRC_URI_append_class-native = " file://fix_path_xtra.patch"
-EXTRA_OECONF += "ac_cv_path_M4=m4"
+EXTRA_OECONF += "ac_cv_path_M4=m4 ac_cv_prog_TEST_EMACS=no"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
index 61bd21fc38..302ba79f77 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
@@ -13,12 +13,12 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
file://increase-timeout-limit.patch \
file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch"
-SRC_URI[md5sum] = "0fb6b003423e004d94e0119c2390078f"
-SRC_URI[sha256sum] = "73d05a689105eb9b8be54f32498c99ddbd360776fc61cf45be6a2a4eb4a40039"
+SRC_URI[md5sum] = "6f48029cc839303d28496e1609868938"
+SRC_URI[sha256sum] = "3cd9f81a8ae7c6865bb9bbbe16c4307a243a1373d0b315a83571cbba1fff725d"
DEPENDS = "guile-native libtool-native libxml2-native"
-inherit autotools texinfo 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
diff --git a/meta/recipes-devtools/automake/automake_1.14.1.bb b/meta/recipes-devtools/automake/automake_1.15.bb
index be73d19cf6..d5b6e9eba4 100644
--- a/meta/recipes-devtools/automake/automake_1.14.1.bb
+++ b/meta/recipes-devtools/automake/automake_1.15.bb
@@ -22,8 +22,8 @@ SRC_URI += " file://python-libdir.patch \
file://py-compile-compile-only-optimized-byte-code.patch \
file://buildtest.patch"
-SRC_URI[md5sum] = "d052a3e884631b9c7892f2efce542d75"
-SRC_URI[sha256sum] = "814c2333f350ce00034a1fe718e0e4239998ceea7b0aff67e9fd273ed6dfc23b"
+SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
+SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
do_install_append () {
install -d ${D}${datadir}
diff --git a/meta/recipes-devtools/binutils/binutils-2.24.inc b/meta/recipes-devtools/binutils/binutils-2.24.inc
index 8f3216f2bf..63c928712e 100644
--- a/meta/recipes-devtools/binutils/binutils-2.24.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.24.inc
@@ -32,6 +32,14 @@ SRC_URI = "\
file://replace_macros_with_static_inline.patch \
file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
file://binutils-uninitialised-warning.patch \
+ file://binutils_CVE-2014-8484.patch \
+ file://binutils_CVE-2014-8485.patch \
+ file://binutils_CVE-2014-8501.patch \
+ file://binutils_CVE-2014-8502_1.patch \
+ file://binutils_CVE-2014-8502.patch \
+ file://binutils_CVE-2014-8503.patch \
+ file://binutils_CVE-2014-8504.patch \
+ file://binutils_CVE-2014-8737.patch \
"
SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index 52c573e190..ae14642272 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -4,7 +4,7 @@ SUMMARY = "GNU binary utilities (cross-canadian for ${TARGET_ARCH} target)"
PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "binutils"
-DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext"
+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} \
"
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch
new file mode 100644
index 0000000000..e789499477
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8484.patch
@@ -0,0 +1,67 @@
+Upstream-Status: Backport
+
+CVE-2014-8484 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From bd25671c6f202c4a5108883caa2adb24ff6f361f Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Fri, 29 Aug 2014 10:36:29 +0930
+Subject: [PATCH] Report an error for S-records with less than the miniumum
+ size
+
+ * srec.c (srec_scan): Revert last change. Report an error for
+ S-records with less than the miniumum byte count.
+---
+ bfd/ChangeLog | 5 +++++
+ bfd/srec.c | 18 +++++++++++++++---
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+Index: binutils-2.24/bfd/srec.c
+===================================================================
+--- binutils-2.24.orig/bfd/srec.c
++++ binutils-2.24/bfd/srec.c
+@@ -455,7 +455,7 @@ srec_scan (bfd *abfd)
+ {
+ file_ptr pos;
+ char hdr[3];
+- unsigned int bytes;
++ unsigned int bytes, min_bytes;
+ bfd_vma address;
+ bfd_byte *data;
+ unsigned char check_sum;
+@@ -478,6 +478,19 @@ srec_scan (bfd *abfd)
+ }
+
+ check_sum = bytes = HEX (hdr + 1);
++ min_bytes = 3;
++ if (hdr[0] == '2' || hdr[0] == '8')
++ min_bytes = 4;
++ else if (hdr[0] == '3' || hdr[0] == '7')
++ min_bytes = 5;
++ if (bytes < min_bytes)
++ {
++ (*_bfd_error_handler) (_("%B:%d: byte count %d too small\n"),
++ abfd, lineno, bytes);
++ bfd_set_error (bfd_error_bad_value);
++ goto error_return;
++ }
++
+ if (bytes * 2 > bufsize)
+ {
+ if (buf != NULL)
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,8 @@
++2014-08-29 Alan Modra <amodra@gmail.com>
++
++ * srec.c (srec_scan): Revert last change. Report an error for
++ S-records with less than the miniumum byte count.
++
+ 2013-12-02 Tristan Gingold <gingold@adacore.com>
+
+ * configure.in: Bump version to 2.24
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch
new file mode 100644
index 0000000000..ec3308b4f4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8485.patch
@@ -0,0 +1,102 @@
+Upstream-Status: Backport
+
+CVE-2014-8485 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 493a33860c71cac998f1a56d6d87d6faa801fbaa Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 12:43:16 +0000
+Subject: [PATCH] This patch closes a potential security hole in applications
+ that use the bfd library to parse binaries containing maliciously corrupt
+ section group headers.
+
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
+ sections.
+---
+ bfd/ChangeLog | 6 ++++++
+ bfd/elf.c | 34 ++++++++++++++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 4 deletions(-)
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -608,9 +608,10 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ if (shdr->contents == NULL)
+ {
+ _bfd_error_handler
+- (_("%B: Corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
++ (_("%B: corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
+ bfd_set_error (bfd_error_bad_value);
+- return FALSE;
++ -- num_group;
++ continue;
+ }
+
+ memset (shdr->contents, 0, amt);
+@@ -618,7 +619,16 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
+ || (bfd_bread (shdr->contents, shdr->sh_size, abfd)
+ != shdr->sh_size))
+- return FALSE;
++ {
++ _bfd_error_handler
++ (_("%B: invalid size field in group section header: 0x%lx"), abfd, shdr->sh_size);
++ bfd_set_error (bfd_error_bad_value);
++ -- num_group;
++ /* PR 17510: If the group contents are even partially
++ corrupt, do not allow any of the contents to be used. */
++ memset (shdr->contents, 0, amt);
++ continue;
++ }
+
+ /* Translate raw contents, a flag word followed by an
+ array of elf section indices all in target byte order,
+@@ -651,6 +661,21 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ }
+ }
+ }
++
++ /* PR 17510: Corrupt binaries might contain invalid groups. */
++ if (num_group != (unsigned) elf_tdata (abfd)->num_group)
++ {
++ elf_tdata (abfd)->num_group = num_group;
++
++ /* If all groups are invalid then fail. */
++ if (num_group == 0)
++ {
++ elf_tdata (abfd)->group_sect_ptr = NULL;
++ elf_tdata (abfd)->num_group = num_group = -1;
++ (*_bfd_error_handler) (_("%B: no valid group sections found"), abfd);
++ bfd_set_error (bfd_error_bad_value);
++ }
++ }
+ }
+ }
+
+@@ -716,6 +741,7 @@ setup_group (bfd *abfd, Elf_Internal_Shd
+ {
+ (*_bfd_error_handler) (_("%B: no group info for section %A"),
+ abfd, newsect);
++ return FALSE;
+ }
+ return TRUE;
+ }
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,9 @@
++2014-10-27 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17510
++ * elf.c (setup_group): Improve handling of corrupt group
++ sections.
++
+ 2014-08-29 Alan Modra <amodra@gmail.com>
+
+ * srec.c (srec_scan): Revert last change. Report an error for
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch
new file mode 100644
index 0000000000..a48fe9b23b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8501.patch
@@ -0,0 +1,60 @@
+Upstream-Status: Backport
+
+CVE-2014-8501 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 7e1e19887abd24aeb15066b141cdff5541e0ec8e Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 14:45:06 +0000
+Subject: [PATCH] Fix a seg-fault in strings and other binutuils when parsing a
+ corrupt PE executable with an invalid value in the NumberOfRvaAndSizes field
+ of the AOUT header.
+
+ PR binutils/17512
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
+ with an invalid value for NumberOfRvaAndSizes.
+---
+ bfd/ChangeLog | 4 ++++
+ bfd/peXXigen.c | 12 ++++++++++++
+ 2 files changed, 16 insertions(+)
+
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -460,6 +460,18 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
+ {
+ int idx;
+
++ /* PR 17512: Corrupt PE binaries can cause seg-faults. */
++ if (a->NumberOfRvaAndSizes > 16)
++ {
++ (*_bfd_error_handler)
++ (_("%B: aout header specifies an invalid number of data-directory entries: %d"),
++ abfd, a->NumberOfRvaAndSizes);
++ /* Paranoia: If the number is corrupt, then assume that the
++ actual entries themselves might be corrupt as well. */
++ a->NumberOfRvaAndSizes = 0;
++ }
++
++
+ for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++)
+ {
+ /* If data directory is empty, rva also should be 0. */
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,5 +1,9 @@
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
++ PR binutils/17512
++ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
++ with an invalid value for NumberOfRvaAndSizes.
++
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
+ sections.
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch
new file mode 100644
index 0000000000..05af65bad1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502.patch
@@ -0,0 +1,89 @@
+Upstream-Status: Backport
+
+CVE-2014-8502 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 5a4b0ccc20ba30caef53b01bee2c0aaa5b855339 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 28 Oct 2014 15:42:56 +0000
+Subject: [PATCH] More fixes for corrupt binaries crashing the binutils.
+
+ PR binutils/17512
+ * elf.c (bfd_section_from_shdr): Allocate and free the recursion
+ detection table on a per-bfd basis.
+ * peXXigen.c (pe_print_edata): Handle binaries with a truncated
+ export table.
+---
+ bfd/ChangeLog | 8 ++++++++
+ bfd/elf.c | 16 +++++++++++++---
+ bfd/peXXigen.c | 9 +++++++++
+ 3 files changed, 30 insertions(+), 3 deletions(-)
+
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -1438,6 +1438,15 @@ pe_print_edata (bfd * abfd, void * vfile
+ }
+ }
+
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (datasize < 36)
++ {
++ fprintf (file,
++ _("\nThere is an export table in %s, but it is too small (%d)\n"),
++ section->name, (int) datasize);
++ return TRUE;
++ }
++
+ fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"),
+ section->name, (unsigned long) addr);
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -1576,6 +1576,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ const char *name;
+ bfd_boolean ret = TRUE;
+ static bfd_boolean * sections_being_created = NULL;
++ static bfd * sections_being_created_abfd = NULL;
+ static unsigned int nesting = 0;
+
+ if (shindex >= elf_numsections (abfd))
+@@ -1588,13 +1589,20 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ loop. Detect this here, by refusing to load a section that we are
+ already in the process of loading. We only trigger this test if
+ we have nested at least three sections deep as normal ELF binaries
+- can expect to recurse at least once. */
++ can expect to recurse at least once.
++
++ FIXME: It would be better if this array was attached to the bfd,
++ rather than being held in a static pointer. */
++
++ if (sections_being_created_abfd != abfd)
++ sections_being_created = NULL;
+
+ if (sections_being_created == NULL)
+ {
+ /* FIXME: It would be more efficient to attach this array to the bfd somehow. */
+ sections_being_created = (bfd_boolean *)
+ bfd_zalloc (abfd, elf_numsections (abfd) * sizeof (bfd_boolean));
++ sections_being_created_abfd = abfd;
+ }
+ if (sections_being_created [shindex])
+ {
+@@ -2098,7 +2106,10 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if (sections_being_created)
+ sections_being_created [shindex] = FALSE;
+ if (-- nesting == 0)
++ {
+ sections_being_created = NULL;
++ sections_being_created_abfd = abfd;
++ }
+ return ret;
+ }
+
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch
new file mode 100644
index 0000000000..9e0c9c8b3c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8502_1.patch
@@ -0,0 +1,523 @@
+Upstream-Status: Backport
+
+CVE-2014-8502 supporting patch.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From bf67003b4567600ed3022a439207ac8f26454f91 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Mon, 27 Oct 2014 18:05:37 +0000
+Subject: [PATCH] This fixes more seg-faults in tools like "strings" and
+ "objdump" when presented with corrupt binaries.
+
+ PR binutils/17512
+ * elf.c (bfd_section_from_shdr): Detect and warn about ELF
+ binaries with a group of sections linked by the string table
+ indicies.
+ * peXXigen.c (pe_print_edata): Detect out of range rvas and
+ entry counts for the Export Address table, Name Pointer table
+ and Ordinal table.
+---
+ bfd/ChangeLog | 5 ++
+ bfd/elf.c | 194 ++++++++++++++++++++++++++++++++++++++-------------------
+ bfd/peXXigen.c | 18 +++++-
+ 3 files changed, 150 insertions(+), 67 deletions(-)
+
+Index: binutils-2.24/bfd/elf.c
+===================================================================
+--- binutils-2.24.orig/bfd/elf.c
++++ binutils-2.24/bfd/elf.c
+@@ -1574,38 +1574,67 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ Elf_Internal_Ehdr *ehdr;
+ const struct elf_backend_data *bed;
+ const char *name;
++ bfd_boolean ret = TRUE;
++ static bfd_boolean * sections_being_created = NULL;
++ static unsigned int nesting = 0;
+
+ if (shindex >= elf_numsections (abfd))
+ return FALSE;
+
++ if (++ nesting > 3)
++ {
++ /* PR17512: A corrupt ELF binary might contain a recursive group of
++ sections, each the string indicies pointing to the next in the
++ loop. Detect this here, by refusing to load a section that we are
++ already in the process of loading. We only trigger this test if
++ we have nested at least three sections deep as normal ELF binaries
++ can expect to recurse at least once. */
++
++ if (sections_being_created == NULL)
++ {
++ /* FIXME: It would be more efficient to attach this array to the bfd somehow. */
++ sections_being_created = (bfd_boolean *)
++ bfd_zalloc (abfd, elf_numsections (abfd) * sizeof (bfd_boolean));
++ }
++ if (sections_being_created [shindex])
++ {
++ (*_bfd_error_handler)
++ (_("%B: warning: loop in section dependencies detected"), abfd);
++ return FALSE;
++ }
++ sections_being_created [shindex] = TRUE;
++ }
++
+ hdr = elf_elfsections (abfd)[shindex];
+ ehdr = elf_elfheader (abfd);
+ name = bfd_elf_string_from_elf_section (abfd, ehdr->e_shstrndx,
+ hdr->sh_name);
+ if (name == NULL)
+- return FALSE;
++ goto fail;
+
+ bed = get_elf_backend_data (abfd);
+ switch (hdr->sh_type)
+ {
+ case SHT_NULL:
+ /* Inactive section. Throw it away. */
+- return TRUE;
++ goto success;
+
+- case SHT_PROGBITS: /* Normal section with contents. */
+- case SHT_NOBITS: /* .bss section. */
+- case SHT_HASH: /* .hash section. */
+- case SHT_NOTE: /* .note section. */
++ case SHT_PROGBITS: /* Normal section with contents. */
++ case SHT_NOBITS: /* .bss section. */
++ case SHT_HASH: /* .hash section. */
++ case SHT_NOTE: /* .note section. */
+ case SHT_INIT_ARRAY: /* .init_array section. */
+ case SHT_FINI_ARRAY: /* .fini_array section. */
+ case SHT_PREINIT_ARRAY: /* .preinit_array section. */
+ case SHT_GNU_LIBLIST: /* .gnu.liblist section. */
+ case SHT_GNU_HASH: /* .gnu.hash section. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_DYNAMIC: /* Dynamic linking information. */
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_link > elf_numsections (abfd))
+ {
+ /* PR 10478: Accept Solaris binaries with a sh_link
+@@ -1619,11 +1648,11 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ break;
+ /* Otherwise fall through. */
+ default:
+- return FALSE;
++ goto fail;
+ }
+ }
+ else if (elf_elfsections (abfd)[hdr->sh_link] == NULL)
+- return FALSE;
++ goto fail;
+ else if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
+ {
+ Elf_Internal_Shdr *dynsymhdr;
+@@ -1652,24 +1681,26 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- break;
++ goto success;
+
+- case SHT_SYMTAB: /* A symbol table */
++ case SHT_SYMTAB: /* A symbol table. */
+ if (elf_onesymtab (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
+ {
+ if (hdr->sh_size != 0)
+- return FALSE;
++ goto fail;
+ /* Some assemblers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+- return TRUE;
++ goto success;
+ }
++
+ BFD_ASSERT (elf_onesymtab (abfd) == 0);
+ elf_onesymtab (abfd) = shindex;
+ elf_tdata (abfd)->symtab_hdr = *hdr;
+@@ -1686,7 +1717,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ && (abfd->flags & DYNAMIC) != 0
+ && ! _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex))
+- return FALSE;
++ goto fail;
+
+ /* Go looking for SHT_SYMTAB_SHNDX too, since if there is one we
+ can't read symbols without that section loaded as well. It
+@@ -1712,26 +1743,29 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ break;
+ }
+ if (i != shindex)
+- return bfd_section_from_shdr (abfd, i);
++ ret = bfd_section_from_shdr (abfd, i);
+ }
+- return TRUE;
++ goto success;
+
+- case SHT_DYNSYM: /* A dynamic symbol table */
++ case SHT_DYNSYM: /* A dynamic symbol table. */
+ if (elf_dynsymtab (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_entsize != bed->s->sizeof_sym)
+- return FALSE;
++ goto fail;
++
+ if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
+ {
+ if (hdr->sh_size != 0)
+- return FALSE;
++ goto fail;
++
+ /* Some linkers erroneously set sh_info to one with a
+ zero sh_size. ld sees this as a global symbol count
+ of (unsigned) -1. Fix it here. */
+ hdr->sh_info = 0;
+- return TRUE;
++ goto success;
+ }
++
+ BFD_ASSERT (elf_dynsymtab (abfd) == 0);
+ elf_dynsymtab (abfd) = shindex;
+ elf_tdata (abfd)->dynsymtab_hdr = *hdr;
+@@ -1740,34 +1774,38 @@ bfd_section_from_shdr (bfd *abfd, unsign
+
+ /* Besides being a symbol table, we also treat this as a regular
+ section, so that objcopy can handle it. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+- case SHT_SYMTAB_SHNDX: /* Symbol section indices when >64k sections */
++ case SHT_SYMTAB_SHNDX: /* Symbol section indices when >64k sections. */
+ if (elf_symtab_shndx (abfd) == shindex)
+- return TRUE;
++ goto success;
+
+ BFD_ASSERT (elf_symtab_shndx (abfd) == 0);
+ elf_symtab_shndx (abfd) = shindex;
+ elf_tdata (abfd)->symtab_shndx_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->symtab_shndx_hdr;
+- return TRUE;
++ goto success;
+
+- case SHT_STRTAB: /* A string table */
++ case SHT_STRTAB: /* A string table. */
+ if (hdr->bfd_section != NULL)
+- return TRUE;
++ goto success;
++
+ if (ehdr->e_shstrndx == shindex)
+ {
+ elf_tdata (abfd)->shstrtab_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->shstrtab_hdr;
+- return TRUE;
++ goto success;
+ }
++
+ if (elf_elfsections (abfd)[elf_onesymtab (abfd)]->sh_link == shindex)
+ {
+ symtab_strtab:
+ elf_tdata (abfd)->strtab_hdr = *hdr;
+ elf_elfsections (abfd)[shindex] = &elf_tdata (abfd)->strtab_hdr;
+- return TRUE;
++ goto success;
+ }
++
+ if (elf_elfsections (abfd)[elf_dynsymtab (abfd)]->sh_link == shindex)
+ {
+ dynsymtab_strtab:
+@@ -1776,8 +1814,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ elf_elfsections (abfd)[shindex] = hdr;
+ /* We also treat this as a regular section, so that objcopy
+ can handle it. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
+ }
+
+ /* If the string table isn't one of the above, then treat it as a
+@@ -1795,9 +1834,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ {
+ /* Prevent endless recursion on broken objects. */
+ if (i == shindex)
+- return FALSE;
++ goto fail;
+ if (! bfd_section_from_shdr (abfd, i))
+- return FALSE;
++ goto fail;
+ if (elf_onesymtab (abfd) == i)
+ goto symtab_strtab;
+ if (elf_dynsymtab (abfd) == i)
+@@ -1805,7 +1844,8 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_REL:
+ case SHT_RELA:
+@@ -1820,7 +1860,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if (hdr->sh_entsize
+ != (bfd_size_type) (hdr->sh_type == SHT_REL
+ ? bed->s->sizeof_rel : bed->s->sizeof_rela))
+- return FALSE;
++ goto fail;
+
+ /* Check for a bogus link to avoid crashing. */
+ if (hdr->sh_link >= num_sec)
+@@ -1828,8 +1868,9 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ ((*_bfd_error_handler)
+ (_("%B: invalid link %lu for reloc section %s (index %u)"),
+ abfd, hdr->sh_link, name, shindex));
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
+ }
+
+ /* For some incomprehensible reason Oracle distributes
+@@ -1870,7 +1911,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ if ((elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_SYMTAB
+ || elf_elfsections (abfd)[hdr->sh_link]->sh_type == SHT_DYNSYM)
+ && ! bfd_section_from_shdr (abfd, hdr->sh_link))
+- return FALSE;
++ goto fail;
+
+ /* If this reloc section does not use the main symbol table we
+ don't treat it as a reloc section. BFD can't adequately
+@@ -1885,14 +1926,18 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ || hdr->sh_info >= num_sec
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_REL
+ || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_RELA)
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ {
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
++ }
+
+ if (! bfd_section_from_shdr (abfd, hdr->sh_info))
+- return FALSE;
++ goto fail;
++
+ target_sect = bfd_section_from_elf_index (abfd, hdr->sh_info);
+ if (target_sect == NULL)
+- return FALSE;
++ goto fail;
+
+ esdt = elf_section_data (target_sect);
+ if (hdr->sh_type == SHT_RELA)
+@@ -1904,7 +1949,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ amt = sizeof (*hdr2);
+ hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+ if (hdr2 == NULL)
+- return FALSE;
++ goto fail;
+ *hdr2 = *hdr;
+ *p_hdr = hdr2;
+ elf_elfsections (abfd)[shindex] = hdr2;
+@@ -1920,34 +1965,40 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ target_sect->use_rela_p = 1;
+ }
+ abfd->flags |= HAS_RELOC;
+- return TRUE;
++ goto success;
+ }
+
+ case SHT_GNU_verdef:
+ elf_dynverdef (abfd) = shindex;
+ elf_tdata (abfd)->dynverdef_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_GNU_versym:
+ if (hdr->sh_entsize != sizeof (Elf_External_Versym))
+- return FALSE;
++ goto fail;
++
+ elf_dynversym (abfd) = shindex;
+ elf_tdata (abfd)->dynversym_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_GNU_verneed:
+ elf_dynverref (abfd) = shindex;
+ elf_tdata (abfd)->dynverref_hdr = *hdr;
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
+
+ case SHT_SHLIB:
+- return TRUE;
++ goto success;
+
+ case SHT_GROUP:
+ if (! IS_VALID_GROUP_SECTION_HEADER (hdr, GRP_ENTRY_SIZE))
+- return FALSE;
++ goto fail;
++
+ if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
++
+ if (hdr->contents != NULL)
+ {
+ Elf_Internal_Group *idx = (Elf_Internal_Group *) hdr->contents;
+@@ -1973,7 +2024,7 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ }
+ }
+ }
+- break;
++ goto success;
+
+ default:
+ /* Possibly an attributes section. */
+@@ -1981,14 +2032,14 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ || hdr->sh_type == bed->obj_attrs_section_type)
+ {
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+- return FALSE;
++ goto fail;
+ _bfd_elf_parse_attributes (abfd, hdr);
+- return TRUE;
++ goto success;
+ }
+
+ /* Check for any processor-specific section types. */
+ if (bed->elf_backend_section_from_shdr (abfd, hdr, name, shindex))
+- return TRUE;
++ goto success;
+
+ if (hdr->sh_type >= SHT_LOUSER && hdr->sh_type <= SHT_HIUSER)
+ {
+@@ -2000,9 +2051,12 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ "specific section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+- /* Allow sections reserved for applications. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+- shindex);
++ {
++ /* Allow sections reserved for applications. */
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name,
++ shindex);
++ goto success;
++ }
+ }
+ else if (hdr->sh_type >= SHT_LOPROC
+ && hdr->sh_type <= SHT_HIPROC)
+@@ -2023,8 +2077,11 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ "`%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+- /* Otherwise it should be processed. */
+- return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ {
++ /* Otherwise it should be processed. */
++ ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
++ goto success;
++ }
+ }
+ else
+ /* FIXME: We should handle this section. */
+@@ -2032,10 +2089,17 @@ bfd_section_from_shdr (bfd *abfd, unsign
+ (_("%B: don't know how to handle section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+
+- return FALSE;
++ goto fail;
+ }
+
+- return TRUE;
++ fail:
++ ret = FALSE;
++ success:
++ if (sections_being_created)
++ sections_being_created [shindex] = FALSE;
++ if (-- nesting == 0)
++ sections_being_created = NULL;
++ return ret;
+ }
+
+ /* Return the local symbol specified by ABFD, R_SYMNDX. */
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -1528,7 +1528,12 @@ pe_print_edata (bfd * abfd, void * vfile
+ _("\nExport Address Table -- Ordinal Base %ld\n"),
+ edt.base);
+
+- for (i = 0; i < edt.num_functions; ++i)
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (edt.eat_addr + (edt.num_functions * 4) - adj >= datasize)
++ fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.eat_addr,
++ (long) edt.num_functions);
++ else for (i = 0; i < edt.num_functions; ++i)
+ {
+ bfd_vma eat_member = bfd_get_32 (abfd,
+ data + edt.eat_addr + (i * 4) - adj);
+@@ -1564,7 +1569,16 @@ pe_print_edata (bfd * abfd, void * vfile
+ fprintf (file,
+ _("\n[Ordinal/Name Pointer] Table\n"));
+
+- for (i = 0; i < edt.num_names; ++i)
++ /* PR 17512: Handle corrupt PE binaries. */
++ if (edt.npt_addr + (edt.num_names * 4) - adj >= datasize)
++ fprintf (file, _("\tInvalid Name Pointer Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.npt_addr,
++ (long) edt.num_names);
++ else if (edt.ot_addr + (edt.num_names * 2) - adj >= datasize)
++ fprintf (file, _("\tInvalid Ordinal Table rva (0x%lx) or entry count (0x%lx)\n"),
++ (long) edt.ot_addr,
++ (long) edt.num_names);
++ else for (i = 0; i < edt.num_names; ++i)
+ {
+ bfd_vma name_ptr = bfd_get_32 (abfd,
+ data +
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,8 +1,13 @@
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
++ * elf.c (bfd_section_from_shdr): Detect and warn about ELF
++ binaries with a group of sections linked by the string table
++ indicies.
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
+ with an invalid value for NumberOfRvaAndSizes.
++ (pe_print_edata): Detect out of range rvas and entry counts for
++ the Export Address table, Name Pointer table and Ordinal table.
+
+ PR binutils/17510
+ * elf.c (setup_group): Improve handling of corrupt group
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch
new file mode 100644
index 0000000000..2dd3354fc1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8503.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Backport
+
+CVE-2014-8503 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 0102ea8cec5fc509bba6c91df61b7ce23a799d32 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Thu, 30 Oct 2014 17:16:17 +0000
+Subject: [PATCH] Fixes a seg-fault in the ihex parser when it encounters a
+ malformed ihex file.
+
+ PR binutils/17512
+ * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
+---
+ bfd/ChangeLog | 1 +
+ bfd/ihex.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+Index: binutils-2.24/bfd/ihex.c
+===================================================================
+--- binutils-2.24.orig/bfd/ihex.c
++++ binutils-2.24/bfd/ihex.c
+@@ -322,7 +322,7 @@ ihex_scan (bfd *abfd)
+ {
+ if (! ISHEX (buf[i]))
+ {
+- ihex_bad_byte (abfd, lineno, hdr[i], error);
++ ihex_bad_byte (abfd, lineno, buf[i], error);
+ goto error_return;
+ }
+ }
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,8 @@
++2014-10-30 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17512
++ * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
++
+ 2014-10-27 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch
new file mode 100644
index 0000000000..b4d1d1ff61
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8504.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Backport
+
+CVE-2014-8504 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From 708d7d0d11f0f2d776171979aa3479e8e12a38a0 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 28 Oct 2014 10:48:14 +0000
+Subject: [PATCH] This patch fixes a flaw in the SREC parser which could cause
+ a stack overflow and potential secuiryt breach.
+
+ PR binutils/17510
+ * srec.c (srec_bad_byte): Increase size of buf to allow for
+ negative values.
+ (srec_scan): Use an unsigned char buffer to hold header bytes.
+---
+ bfd/ChangeLog | 8 ++++++++
+ bfd/elf.c | 2 +-
+ bfd/peXXigen.c | 1 -
+ bfd/srec.c | 4 ++--
+ 4 files changed, 11 insertions(+), 4 deletions(-)
+
+Index: binutils-2.24/bfd/ChangeLog
+===================================================================
+--- binutils-2.24.orig/bfd/ChangeLog
++++ binutils-2.24/bfd/ChangeLog
+@@ -1,3 +1,11 @@
++2014-10-28 Andreas Schwab <schwab@suse.de>
++ Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17510
++ * srec.c (srec_bad_byte): Increase size of buf to allow for
++ negative values.
++ (srec_scan): Use an unsigned char buffer to hold header bytes.
++
+ 2014-10-30 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
+Index: binutils-2.24/bfd/peXXigen.c
+===================================================================
+--- binutils-2.24.orig/bfd/peXXigen.c
++++ binutils-2.24/bfd/peXXigen.c
+@@ -471,7 +471,6 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
+ a->NumberOfRvaAndSizes = 0;
+ }
+
+-
+ for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++)
+ {
+ /* If data directory is empty, rva also should be 0. */
+Index: binutils-2.24/bfd/srec.c
+===================================================================
+--- binutils-2.24.orig/bfd/srec.c
++++ binutils-2.24/bfd/srec.c
+@@ -248,7 +248,7 @@ srec_bad_byte (bfd *abfd,
+ }
+ else
+ {
+- char buf[10];
++ char buf[40];
+
+ if (! ISPRINT (c))
+ sprintf (buf, "\\%03o", (unsigned int) c);
+@@ -454,7 +454,7 @@ srec_scan (bfd *abfd)
+ case 'S':
+ {
+ file_ptr pos;
+- char hdr[3];
++ unsigned char hdr[3];
+ unsigned int bytes, min_bytes;
+ bfd_vma address;
+ bfd_byte *data;
diff --git a/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch
new file mode 100644
index 0000000000..4a84562201
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/binutils_CVE-2014-8737.patch
@@ -0,0 +1,177 @@
+Upstream-Status: Backport
+
+CVE-2014-8737 fix.
+
+[YOCTO #7084]
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+From dd9b91de2149ee81d47f708e7b0bbf57da10ad42 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Thu, 6 Nov 2014 14:49:10 +0000
+Subject: [PATCH] Prevent archive memebers with illegal pathnames from being
+ extracted from an archive.
+
+ PR binutils/17552, binutils/17533
+ * bucomm.c (is_valid_archive_path): New function. Returns false
+ for absolute pathnames and pathnames that include /../.
+ * bucomm.h (is_valid_archive_path): Add prototype.
+ * ar.c (extract_file): Use new function to check for valid
+ pathnames when extracting files from an archive.
+ * objcopy.c (copy_archive): Likewise.
+ * doc/binutils.texi: Update documentation to mention the
+ limitation on pathname of archive members.
+---
+ binutils/ChangeLog | 16 ++++++++++++++--
+ binutils/ar.c | 9 +++++++++
+ binutils/bucomm.c | 26 ++++++++++++++++++++++++++
+ binutils/bucomm.h | 12 ++++++++----
+ binutils/doc/binutils.texi | 3 ++-
+ binutils/objcopy.c | 6 ++++++
+ 6 files changed, 65 insertions(+), 7 deletions(-)
+
+Index: binutils-2.24/binutils/ar.c
+===================================================================
+--- binutils-2.24.orig/binutils/ar.c
++++ binutils-2.24/binutils/ar.c
+@@ -1031,6 +1031,15 @@ extract_file (bfd *abfd)
+ bfd_size_type size;
+ struct stat buf;
+
++ /* PR binutils/17533: Do not allow directory traversal
++ outside of the current directory tree. */
++ if (! is_valid_archive_path (bfd_get_filename (abfd)))
++ {
++ non_fatal (_("illegal pathname found in archive member: %s"),
++ bfd_get_filename (abfd));
++ return;
++ }
++
+ if (bfd_stat_arch_elt (abfd, &buf) != 0)
+ /* xgettext:c-format */
+ fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
+Index: binutils-2.24/binutils/bucomm.c
+===================================================================
+--- binutils-2.24.orig/binutils/bucomm.c
++++ binutils-2.24/binutils/bucomm.c
+@@ -624,3 +624,29 @@ bfd_get_archive_filename (const bfd *abf
+ bfd_get_filename (abfd));
+ return buf;
+ }
++
++/* Returns TRUE iff PATHNAME, a filename of an archive member,
++ is valid for writing. For security reasons absolute paths
++ and paths containing /../ are not allowed. See PR 17533. */
++
++bfd_boolean
++is_valid_archive_path (char const * pathname)
++{
++ const char * n = pathname;
++
++ if (IS_ABSOLUTE_PATH (n))
++ return FALSE;
++
++ while (*n)
++ {
++ if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
++ return FALSE;
++
++ while (*n && ! IS_DIR_SEPARATOR (*n))
++ n++;
++ while (IS_DIR_SEPARATOR (*n))
++ n++;
++ }
++
++ return TRUE;
++}
+Index: binutils-2.24/binutils/bucomm.h
+===================================================================
+--- binutils-2.24.orig/binutils/bucomm.h
++++ binutils-2.24/binutils/bucomm.h
+@@ -23,6 +23,8 @@
+ #ifndef _BUCOMM_H
+ #define _BUCOMM_H
+
++/* In bucomm.c. */
++
+ /* Return the filename in a static buffer. */
+ const char *bfd_get_archive_filename (const bfd *);
+
+@@ -58,20 +60,22 @@ bfd_vma parse_vma (const char *, const c
+
+ off_t get_file_size (const char *);
+
++bfd_boolean is_valid_archive_path (char const *);
++
+ extern char *program_name;
+
+-/* filemode.c */
++/* In filemode.c. */
+ void mode_string (unsigned long, char *);
+
+-/* version.c */
++/* In version.c. */
+ extern void print_version (const char *);
+
+-/* rename.c */
++/* In rename.c. */
+ extern void set_times (const char *, const struct stat *);
+
+ extern int smart_rename (const char *, const char *, int);
+
+-/* libiberty. */
++/* In libiberty. */
+ void *xmalloc (size_t);
+
+ void *xrealloc (void *, size_t);
+Index: binutils-2.24/binutils/doc/binutils.texi
+===================================================================
+--- binutils-2.24.orig/binutils/doc/binutils.texi
++++ binutils-2.24/binutils/doc/binutils.texi
+@@ -234,7 +234,8 @@ a normal archive. Instead the elements
+ individually to the second archive.
+
+ The paths to the elements of the archive are stored relative to the
+-archive itself.
++archive itself. For security reasons absolute paths and paths with a
++@code{/../} component are not allowed.
+
+ @cindex compatibility, @command{ar}
+ @cindex @command{ar} compatibility
+Index: binutils-2.24/binutils/objcopy.c
+===================================================================
+--- binutils-2.24.orig/binutils/objcopy.c
++++ binutils-2.24/binutils/objcopy.c
+@@ -2206,6 +2206,12 @@ copy_archive (bfd *ibfd, bfd *obfd, cons
+ bfd_boolean del = TRUE;
+ bfd_boolean ok_object;
+
++ /* PR binutils/17533: Do not allow directory traversal
++ outside of the current directory tree by archive members. */
++ if (! is_valid_archive_path (bfd_get_filename (this_element)))
++ fatal (_("illegal pathname found in archive member: %s"),
++ bfd_get_filename (this_element));
++
+ /* Create an output file for this member. */
+ output_name = concat (dir, "/",
+ bfd_get_filename (this_element), (char *) 0);
+Index: binutils-2.24/binutils/ChangeLog
+===================================================================
+--- binutils-2.24.orig/binutils/ChangeLog
++++ binutils-2.24/binutils/ChangeLog
+@@ -1,3 +1,15 @@
++2014-11-06 Nick Clifton <nickc@redhat.com>
++
++ PR binutils/17552, binutils/17533
++ * bucomm.c (is_valid_archive_path): New function. Returns false
++ for absolute pathnames and pathnames that include /../.
++ * bucomm.h (is_valid_archive_path): Add prototype.
++ * ar.c (extract_file): Use new function to check for valid
++ pathnames when extracting files from an archive.
++ * objcopy.c (copy_archive): Likewise.
++ * doc/binutils.texi: Update documentation to mention the
++ limitation on pathname of archive members.
++
+ 2013-11-22 Cory Fields <cory@coryfields.com>
+
+ * windres.c (define_resource): Use zero for timestamp, making
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch
new file mode 100644
index 0000000000..b013995a0d
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd-no-bashism.patch
@@ -0,0 +1,27 @@
+From ffb5bae5d588aaea6325623462a8070a04767196 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Aug 2014 08:33:28 -0700
+Subject: [PATCH] bootchartd.in: no bashism
+
+No bashism in bootchartd.in, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ bootchartd.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bootchartd.in b/bootchartd.in
+index a408bab..064f6a4 100755
+--- a/bootchartd.in
++++ b/bootchartd.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Bootchart logger script
+ # Ziga Mahkovec <ziga.mahkovec@klika.si>
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh
new file mode 100644
index 0000000000..21a78877a2
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2/bootchartd_stop.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: bootchartd_stop
+# Required-Start: $remote_fs $all
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop:
+# Short-Description: Stop bootchartd collection
+# Description: This script accompanies bootchartd from bootchart2.
+# bootchartd should stop detect the end of the boot process
+# automatically if a window manager is launched, but for
+# command-line only operating systems, this script should be
+# used instead.
+### END INIT INFO
+
+/sbin/bootchartd stop
+
+: exit 0
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
new file mode 100644
index 0000000000..5fc7211f79
--- /dev/null
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -0,0 +1,157 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+# Copyright (C) 2014 Intel Corp.
+
+# This recipe creates packages for the bootchart2 system-wide profiler daemon
+# and related utilities. Depending on the images you're building, additional
+# configuration may be needed in order to use it.
+#
+# Packages:
+# * bootchart2 - The daemon itself.
+# * pybootchartgui - Python program to visualize and display the data
+# collected by bootchart2 or compatible daemons such as the original
+# bootchart.
+# * bootchartd-stop-initscript - A SysV init script to stop data collection
+# when booting completes (see below for details.)
+#
+# While bootchart2 is designed to stop collecting data roughly when the boot
+# process completes, it is not exactly a stopwatch. It has a list of programs
+# which are supposed signify that the boot process has completed (for example,
+# openbox or gnome-shell,) but it waits a full 20 seconds after such a program
+# is launched before stopping itself, to collect additional data.
+#
+# If you are using a window manager or GUI which isn't included in bootchart2's
+# default configuration file, you should write bbappend file to amend
+# bootchartd.conf and add it to EXIT_PROC. An example of this is shown in this
+# recipe, where the Matchbox window manager (used by Sato) is added.
+#
+# If you want data collection to end at a certain point exactly, you should
+# arrange for the following command to be run:
+# bootchartd stop
+# You might set this command to be launched by the desktop environment shipped
+# on the image you're building after the other startup programs are complete.
+# This will not incur the 20 second wait period and will cause bootchart2 to
+# behave a bit more like a stopwatch. An example of this is shown in this
+# recipe, specifically the bootchartd-stop-initscript package, which stops data
+# collection as the last action when switching to runlevels 2 through 5. You can
+# add bootchartd-stop-initscript to IMAGE_INSTALL if you need to use it.
+#
+# Unless you're doing something special, if your image does not launch an X
+# window manager, you will need to add bootchartd-stop-initscript to your image.
+#
+# Bootchart2 can be started in two ways. Data collection can be initiated by
+# running the following command:
+# bootchartd start
+# However, for the most complete data, the bootchart2 developers recommend
+# running it as PID 1. This can be done by adding the following to the kernel
+# command line parameters in the bootloader setup:
+# init=/sbin/bootchartd
+# When invoked this way, bootchart2 will set itself up and then automatically
+# run /sbin/init. For example, when booting the default qemux86 image, one might
+# use a command like this:
+# runqemu qemux86 bootparams="initcall_debug printk.time=y quiet \
+# init=/sbin/bootchartd"
+#
+# Neither method is actually implemented here, choose what works for you.
+#
+# If you are building your image with systemd instead of SysV init, bootchart2
+# includes systemd service files to begin collection automatically at boot and
+# end collection automatically 20 seconds after the boot process has completed.
+# However, be aware that systemd tends to start bootchart2 relatively late into
+# the boot process, so it's highly recommended to use bootchart2 as PID 1. If
+# you're using systemd and you wish to use another method to stop data
+# collection at a time of your choosing, you may do so as long as you get to it
+# before the 20 second timeout of the systemd service files. Also, you may write
+# a bbappend to patch bootchart2-done.timer.in to increase or decrease the
+# timeout. Decreasing it to 0 will make it behave like
+# bootchartd-stop-initscript.
+#
+# By default, when data collection is stopped, a file named bootchart.tgz will
+# be created in /var/log. If pybootchartgui is included in your image,
+# bootchart.png will also be created at the same time. However, this results in
+# a noticeable hitch or pause at boot time, which may not be what you want on an
+# embedded device. So you may prefer to omit pybootchartgui from your image. In
+# that case, copy bootchart.tgz over to your development system and generate
+# bootchart.png there. To get pybootchartgui on your development system, you can
+# either install it directly from some other source, or build bootchart2-native
+# and find pybootchartgui in the native sysroot:
+# bitbake bootchart2-native
+# ./tmp/sysroots/x86_64-linux/usr/bin/pybootchartgui /path/to/bootchart.tgz
+# Note that, whether installed on your build system or on your image, the
+# pybootchartgui provided by this recipe does not support the -i option. You
+# will need to install pybootchartgui by other means in order to run it in
+# interactive mode.
+
+SUMMARY = "Booting sequence and CPU,I/O usage monitor"
+DESCRIPTION = "Monitors where the system spends its time at start, creating a graph of all processes, disk utilization, and wait time."
+AUTHOR = "Wonhong Kwon <wonhong.kwon@lge.com>"
+HOMEPAGE = "https://github.com/mmeeks/bootchart"
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44ac4678311254db62edf8fd39cb8124"
+
+# one commit beyond 1.14.6 for a systemd-related bugfix
+PV = "0.14.6+git${SRCPV}"
+
+SRC_URI = "git://github.com/mmeeks/bootchart.git \
+ file://bootchartd_stop.sh \
+ file://bootchartd-no-bashism.patch \
+ "
+
+SRCREV = "b65ed43b0ae832080fb728245de9ef1a4b48d8b5"
+
+S = "${WORKDIR}/git"
+
+inherit systemd
+inherit update-rc.d
+inherit pythonnative
+
+# The only reason to build bootchart2-native is for a native pybootchartgui.
+BBCLASSEXTEND = "native"
+
+SYSTEMD_SERVICE_${PN} = "bootchart2.service bootchart2-done.service bootchart2-done.timer"
+
+UPDATERCPN = "bootchartd-stop-initscript"
+INITSCRIPT_NAME = "bootchartd_stop.sh"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
+# We want native pybootchartgui to execute with the correct Python interpeter.
+do_compile_append_class-native () {
+ echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
+ mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
+ chmod +x ${S}/pybootchartgui
+}
+
+do_compile_prepend () {
+ export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+ export BINDIR="${bindir}"
+ export LIBDIR="${base_libdir}"
+}
+
+do_install () {
+ install -d ${D}${sysconfdir} # needed for -native
+ export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+ export BINDIR="${bindir}"
+ export DESTDIR="${D}"
+ export LIBDIR="${base_libdir}"
+
+ oe_runmake install
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
+
+ echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
+}
+
+PACKAGES =+ "pybootchartgui"
+FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
+RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
+DEPENDS_append_class-native = " python-pycairo-native"
+
+PACKAGES =+ "bootchartd-stop-initscript"
+FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
+
+FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
+FILES_${PN} += "${base_libdir}/bootchart/tmpfs"
+FILES_${PN} += "${libdir}"
+FILES_${PN}-dbg += "${base_libdir}/bootchart/.debug"
+FILES_${PN}-doc += "${datadir}/docs"
+
+RCONFLICTS_${PN} = "bootchart"
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch
deleted file mode 100644
index 695973eded..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
-
-The bug accurs when exec:
- # mkfs.btrfs -r <a relative path> <device>
- (note: the path should be 'valid' correspond to your `pwd`)
-error msg:
- $ scandir for <a relative path> failed: No such file...
-
-Replace strdup() with realpath() to get the correct scan path.
-
-Upstream-Status: Backport (pending)
-
-Reported-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
----
- mkfs.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/mkfs.c b/mkfs.c
-index 2dc90c2..1bd3069 100644
---- a/mkfs.c
-+++ b/mkfs.c
-@@ -756,6 +756,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- ino_t parent_inum, cur_inum;
- ino_t highest_inum = 0;
- char *parent_dir_name;
-+ char real_path[PATH_MAX];
- struct btrfs_path path;
- struct extent_buffer *leaf;
- struct btrfs_key root_dir_key;
-@@ -764,7 +765,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- /* Add list for source directory */
- dir_entry = malloc(sizeof(struct directory_name_entry));
- dir_entry->dir_name = dir_name;
-- dir_entry->path = strdup(dir_name);
-+ dir_entry->path = realpath(dir_name, real_path);
-
- parent_inum = highest_inum + BTRFS_FIRST_FREE_OBJECTID;
- dir_entry->inum = parent_inum;
-@@ -876,7 +877,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- }
-
- free_namelist(files, count);
-- free(parent_dir_entry->path);
- free(parent_dir_entry);
-
- index_cnt = 2;
-@@ -887,7 +887,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
- fail:
- free_namelist(files, count);
- fail_no_files:
-- free(parent_dir_entry->path);
- free(parent_dir_entry);
- return -1;
- }
---
-1.8.1.4
-
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
new file mode 100644
index 0000000000..6df4e10a19
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
@@ -0,0 +1,22 @@
+Doc generation requires xmlto and ascidoc which we don't have right now.
+Disable doc generation until such times as we have the right dependencies.
+
+RP 2014/7/16
+
+Upstream-Status: Inappropriate
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2014-07-16 13:21:43.289386655 +0000
++++ git/Makefile 2014-07-16 13:42:46.453421079 +0000
+@@ -57,8 +57,8 @@
+ btrfs_fragment_libs = -lgd -lpng -ljpeg -lfreetype
+
+ SUBDIRS =
+-BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS)) build-Documentation
+-INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS)) install-Documentation
++BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
++INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
+ CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
+
+ .PHONY: $(SUBDIRS)
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch
deleted file mode 100644
index 9ca9fca3ee..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Allow mandir to be set from the environment, fixing the following packaging warnings:
-
-WARNING: For recipe btrfs-tools, the following files were installed but not shipped in any package:
-WARNING: /usr/man/man8/btrfs-show.8.gz
-WARNING: /usr/man/man8/btrfs-image.8.gz
-WARNING: /usr/man/man8/btrfsctl.8.gz
-WARNING: /usr/man/man8/btrfs.8.gz
-WARNING: /usr/man/man8/btrfsck.8.gz
-WARNING: /usr/man/man8/mkfs.btrfs.8.gz
-
-RP - 5/7/2011
-
-Index: git/man/Makefile
-===================================================================
---- git.orig/man/Makefile 2011-07-05 22:03:58.949919067 +0100
-+++ git/man/Makefile 2011-07-05 22:04:07.789919856 +0100
-@@ -2,9 +2,9 @@
- INSTALL= install
-
- prefix ?= /usr/local
--bindir = $(prefix)/bin
--mandir = $(prefix)/man
--man8dir = $(mandir)/man8
-+bindir ?= $(prefix)/bin
-+mandir ?= $(prefix)/man
-+man8dir ?= $(mandir)/man8
-
- MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \
- btrfs-show.8.gz btrfs.8.gz
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
index 8129cd5e99..ef850570fb 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
@@ -12,16 +12,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
SECTION = "base"
DEPENDS = "util-linux attr e2fsprogs lzo acl"
-SRCREV = "8cae1840afb3ea44dcc298f32983e577480dfee4"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git \
- file://weak-defaults.patch \
- file://allow-relative-path.patch \
- "
-
+SRCREV = "44cdb62d3478c834f41c87ea79d261b9c8982dce"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
S = "${WORKDIR}/git"
-PV = "3.12+git${SRCPV}"
+PV = "3.14.2+git${SRCPV}"
+EXTRA_OEMAKE += "DISABLE_DOCUMENTATION=1"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
index 01f9e6efb6..282710908e 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
@@ -2,12 +2,12 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "A set of tools for CD recording, including cdrecord"
-HOMEPAGE = "http://cdrecord.berlios.de/private/cdrecord.html"
+HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
SECTION = "console/utils"
LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
-SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/alpha/cdrtools-${PV}.tar.bz2"
SRC_URI[md5sum] = "f8c6f0fdcba7df0606095498d10315a7"
SRC_URI[sha256sum] = "e399ea964b8048793721b71461271e46d81f242bd2feefb8dbd259c30e75a5a9"
diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
index cd6b1d8845..e40dfdd2d8 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
@@ -15,4 +15,5 @@ SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a
CMAKE_EXTRACONF = "\
-DBUILD_CursesDialog=0 \
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 8592a23046..28b7f2d887 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -13,13 +13,13 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
- file://aarch64-cmake.patch \
- file://aarch64-kwsys.patch \
file://qt4-fail-silent.patch \
file://cmake-2.8.11.2-FindFreetype.patch \
"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
# and possibly missing qmake binary (qtbase-native can be removed from sysroot
@@ -47,5 +47,5 @@ do_configure_prepend() {
CMAKE_EXTRACONF = ""
do_configure () {
- ./configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+ ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
}
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
new file mode 100644
index 0000000000..60014bbf2b
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -0,0 +1,18 @@
+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_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_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 )
+
+string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
+string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+
+# Include the toolchain configuration subscripts
+file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
+foreach(config ${toolchain_config_files})
+ include(${config})
+endforeach()
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch b/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
deleted file mode 100644
index 3e26d58267..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Riku Voipio <riku.voipio@linaro.org>
-Date: Fri, 21 Dec 2012 11:20:02 +0000 (+0200)
-Subject: KWIML: Teach ABI.h about Aarch64
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=34916522
-
-KWIML: Teach ABI.h about Aarch64
-
-The __aarch64__ defines Aarch64, while __AARCH64EB__ defines bigendian
-and __AARCH64EL__ little endian. Only little endian tested, no big
-endian toolchain exists yet.
-
-Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/ABI.h.in b/ABI.h.in
-index f93ddba..7f4772a 100644
---- a/Utilities/KWIML/ABI.h.in
-+++ b/Utilities/KWIML/ABI.h.in
-@@ -418,6 +418,14 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
- #elif defined(__vax__)
- # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
-+# else
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN)
- # error "Byte order of target CPU unknown."
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch b/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
deleted file mode 100644
index 2b68eae6c2..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: KWSys Robot <kwrobot@kitware.com>
-Date: Fri, 21 Dec 2012 13:29:37 +0000 (-0500)
-Subject: KWSys 2012-12-21 (8ce09af5)
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=567e7d94
-
-KWSys 2012-12-21 (8ce09af5)
-
-Extract upstream KWSys using the following shell commands.
-
-$ git archive --prefix=upstream-kwsys/ 8ce09af5 | tar x
-$ git shortlog --no-merges --abbrev=8 --format='%h %s' 933eb822..8ce09af5
-Riku Voipio (1):
- 8ce09af5 CPU: Add Aarch64 support
-
-Change-Id: I4bd0a97abaa0f958e2679afe2d4ad4bcc37434a0
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/CPU.h.in b/CPU.h.in
-index ecd29d1..2e1a584 100644
---- a/Source/kwsys/CPU.h.in
-+++ b/Source/kwsys/CPU.h.in
-@@ -98,6 +98,14 @@
- #elif defined(__SYSC_ZARCH__)
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
-+# else
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #else
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID 0
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
new file mode 100644
index 0000000000..0eb56b66fa
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -0,0 +1 @@
+alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
index de2ac6b219..66a6af629c 100644
--- a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
@@ -6,6 +6,10 @@ DEPENDS += "curl expat zlib libarchive"
SRC_URI += "file://dont-run-cross-binaries.patch"
+SRC_URI_append_class-nativesdk = " \
+ file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh"
+
SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
@@ -32,6 +36,16 @@ EXTRA_OECMAKE=" \
${@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}"
diff --git a/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch b/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch
deleted file mode 100644
index d95561bc48..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/aclocal-popen.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Add a description to the HAVE_POPEN_PROTOTYPE AC_DEFINE so that this define is
-included in config.h.
-
-Upstream-Status: Submitted (via email)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 3f20573..ec5ca51 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -931,7 +931,7 @@ ac_cv_td_popen=no,
- ac_cv_td_popen=yes))
- AC_MSG_RESULT($ac_cv_td_popen)
- if test $ac_cv_td_popen = yes; then
-- AC_DEFINE(HAVE_POPEN_PROTOTYPE)
-+ AC_DEFINE(HAVE_POPEN_PROTOTYPE,[1],[Conflicting popen prototype])
- fi
- ])dnl
- dnl ---------------------------------------------------------------------------
diff --git a/meta/recipes-devtools/diffstat/diffstat/aclocal.patch b/meta/recipes-devtools/diffstat/diffstat/aclocal.patch
deleted file mode 100644
index cde4a4050b..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/aclocal.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Use the correct macro name (AC_AUTOCONF_VERSION) in the CF_ACVERSION_CHECK macro.
-The original macro name (AC_ACVERSION) leads to this error:
-
-| autoreconf: running: aclocal --system-acdir=/poky/buildnew/tmp/work/i586-poky-linux/diffstat/1.57-r0/build/aclocal-copy/ --automake-acdir=/poky/buildnew/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12 --force
-| aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
-| configure.in:9: error: m4_defn: undefined macro: AC_ACVERSION
-| acinclude.m4:989: CF_PROG_CC is expanded from...
-| configure.in:9: the top level
-| autom4te: m4 failed with exit status: 1
-
-Upstream-Status: Submitted (via email)
-Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
-
-Index: diffstat-1.58/aclocal.m4
-===================================================================
---- diffstat-1.58.orig/aclocal.m4 2013-10-29 01:43:23.000000000 +0200
-+++ diffstat-1.58/aclocal.m4 2013-11-04 11:22:53.461562567 +0200
-@@ -13,16 +13,16 @@
- dnl Conditionally generate script according to whether we're using a given autoconf.
- dnl
- dnl $1 = version to compare against
--dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
--dnl $3 = code to use if AC_ACVERSION is older than $1.
-+dnl $2 = code to use if AC_AUTOCONF_VERSION is at least as high as $1.
-+dnl $3 = code to use if AC_AUTOCONF_VERSION is older than $1.
- define([CF_ACVERSION_CHECK],
- [
- ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
- ifdef([m4_version_compare],
--[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
-+[m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [$1]), -1, [$3], [$2])],
- [CF_ACVERSION_COMPARE(
- AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
--AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
-+AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_AUTOCONF_VERSION)), AC_AUTOCONF_VERSION, [$2], [$3])])])dnl
- dnl ---------------------------------------------------------------------------
- dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
- dnl --------------------
diff --git a/meta/recipes-devtools/diffstat/diffstat/dirfix.patch b/meta/recipes-devtools/diffstat/diffstat/dirfix.patch
deleted file mode 100644
index 15dbf2b778..0000000000
--- a/meta/recipes-devtools/diffstat/diffstat/dirfix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-$libdir isn't used by the Makefile at all apart from in this mkdir.
-This will be used without any DESTDIR so if your libdir is a different
-layout to the bulid system it will cause a failure. E.g:
-
-Build system has /usr/lib only
-libdir = /usr/lib64 for the target
-Results in "mkdir: cannot create directory `/usr/lib64': Permission denied"
-
-Since the directory is never used, we can just remove the mkdir.
-
-Upstream-Status: Submitted (via email)
-
-RP 23/9/2011
-
-Index: diffstat-1.54/makefile.in
-===================================================================
---- diffstat-1.54.orig/makefile.in 2011-09-22 19:13:11.330158571 +0100
-+++ diffstat-1.54/makefile.in 2011-09-22 19:13:35.610158363 +0100
-@@ -79,7 +79,7 @@
- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(man1dir)/$(THIS).$(manext)
-
- installdirs :
-- mkdir -p $(BINDIR) $(libdir) $(man1dir)
-+ mkdir -p $(BINDIR) $(man1dir)
-
- uninstall :
- rm -f $(BINDIR)/$(PROG) $(man1dir)/$(THIS).$(manext)
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.58.bb b/meta/recipes-devtools/diffstat/diffstat_1.59.bb
index 15fb4231c8..f599622b3e 100644
--- a/meta/recipes-devtools/diffstat/diffstat_1.58.bb
+++ b/meta/recipes-devtools/diffstat/diffstat_1.59.bb
@@ -8,14 +8,11 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
- file://dirfix.patch \
- file://aclocal.patch \
- file://aclocal-popen.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "6d6e13f7dcfe4db5da65c5175260ea47"
-SRC_URI[sha256sum] = "fad5135199c3b9aea132c5d45874248f4ce0ff35f61abb8d03c3b90258713793"
+SRC_URI[md5sum] = "1dc7bc48ce846a0686a1af0d091ff8fb"
+SRC_URI[sha256sum] = "267d1441b8889cbefbb7ca7dfd4a17f6c8bc73bc114904c74ecad945a3dbf270"
S = "${WORKDIR}/diffstat-${PV}"
diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
index c7c414d829..e36f0fa695 100755
--- a/meta/recipes-devtools/distcc/files/distcc
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -51,6 +51,9 @@ should_start() {
echo "$DAEMON not starting"
exit 0
fi
+ # we need permission to write to the pid file
+ touch /var/run/$NAME.pid
+ chown distcc /var/run/$NAME.pid
}
case "$1" in
@@ -75,6 +78,7 @@ case "$1" in
echo "$0: stop failed with error code $code" >&2
exit $code
}
+ rm -f /var/run/$NAME.pid >/dev/null 2>&1
echo "."
;;
restart|force-reload)
@@ -92,6 +96,7 @@ case "$1" in
--exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
{
code=$?
+ rm -f /var/run/$NAME.pid >/dev/null 2>&1
echo "$0: restart failed with error code $code" >&2
exit $code
}
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
index 3e3a350fd8..b5151b8acd 100644
--- a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
+++ b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.bz2"
-COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc).*-linux"
+COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
do_install() {
oe_runmake DESTDIR="${D}" install
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS
new file mode 100644
index 0000000000..6da7f5b8c7
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/LICENSE-OASIS
@@ -0,0 +1,16 @@
+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-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
new file mode 100644
index 0000000000..59703609ca
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
@@ -0,0 +1,515 @@
+docbook-xml: update catalog.xml
+
+Refer Ubuntu 13.04 to update catalog.xml
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ docbook-4.0/catalog.xml | 72 +++++++++++++++++++++++++++++++++++++++++++++++
+ docbook-4.1.2/catalog.xml | 66 +++++++++++++++++++++++++++++++++++++++++++
+ docbook-4.2/catalog.xml | 69 ++++++---------------------------------------
+ docbook-4.3/catalog.xml | 72 ++++++++---------------------------------------
+ docbook-4.4/catalog.xml | 63 ++---------------------------------------
+ docbook-4.5/catalog.xml | 63 ++---------------------------------------
+ 6 files changed, 165 insertions(+), 240 deletions(-)
+ create mode 100644 docbook-4.0/catalog.xml
+ create mode 100644 docbook-4.1.2/catalog.xml
+
+diff --git a/docbook-4.0/catalog.xml b/docbook-4.0/catalog.xml
+new file mode 100644
+--- /dev/null
++++ b/docbook-4.0/catalog.xml
+@@ -0,0 +1,72 @@
++<?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">
++
++<!-- ...................................................................... -->
++<!-- XML Catalog data for DocBook XML V4.0............................... -->
++<!-- File catalog.xml ..................................................... -->
++
++<!-- 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/.
++ -->
++
++<!-- This is the catalog data file for DocBook V4.0. It is provided as
++ a convenience in building your own catalog files. You need not use
++ the filenames listed here, and need not use the filename method of
++ identifying storage objects at all. See the documentation for
++ detailed information on the files associated with the DocBook DTD.
++ See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
++ detailed information on supplying and using catalog data.
++ -->
++
++<!-- ...................................................................... -->
++<!-- DocBook driver file .................................................. -->
++
++<public publicId="-//Norman Walsh//DTD DocBk XML V4.0//EN"
++ uri="docbookx.dtd"/>
++
++<!-- Other ways to refer to DocBook XML v4.0............................... -->
++<public publicId="-//Norman Walsh//DTD DocBook XML V4.0//EN"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<!-- ...................................................................... -->
++<!-- DocBook modules ...................................................... -->
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Notations V4.0//EN"
++ uri="dbnotnx.mod"/>
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Character Entities V4.0//EN"
++ uri="dbcentx.mod"/>
++
++<public publicId="-//Norman Walsh//ELEMENTS DocBook XML Information Pool V4.0//EN"
++ uri="dbpoolx.mod"/>
++
++<public publicId="-//Norman Walsh//ELEMENTS DocBook XML Document Hierarchy V4.0//EN"
++ uri="dbhierx.mod"/>
++
++<public publicId="-//Norman Walsh//ENTITIES DocBook XML Additional General Entities V4.0//EN"
++ uri="dbgenent.mod"/>
++
++<public publicId="-//Norman Walsh//DTD CALS Table Model XML V4.0//EN"
++ uri="calstblx.dtd"/>
++
++<!-- UNOFFICIAL conversion of the exchange table model to XML, based on the OASIS Exchange -->
++<!-- Table Model PUBLIC "-//SGML Open//DTD Exchange Table Model 19960430//EN" -->
++<public publicId="-//Normal Walsh//Exchange Table Model 19960430 XML V4.0//EN"
++ uri="soextblx.dtd"/>
++
++<!-- the following FPI is declared for the DTD inside the DTD, but we'll -->
++<!-- use the version from the latest DocBook
++<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
++ uri="soextblx.dtd"/> -->
++
++<!-- End of catalog data for DocBook XML V4.0 ............................. -->
++<!-- ...................................................................... -->
++
++</catalog>
+diff --git a/docbook-4.1.2/catalog.xml b/docbook-4.1.2/catalog.xml
+new file mode 100644
+--- /dev/null
++++ b/docbook-4.1.2/catalog.xml
+@@ -0,0 +1,66 @@
++<?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">
++
++<!-- ...................................................................... -->
++<!-- XML Catalog data for DocBook XML V4.1.2............................... -->
++<!-- File catalog.xml ..................................................... -->
++
++<!-- 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/.
++ -->
++
++<!-- This is the catalog data file for DocBook V4.1.2. It is provided as
++ a convenience in building your own catalog files. You need not use
++ the filenames listed here, and need not use the filename method of
++ identifying storage objects at all. See the documentation for
++ detailed information on the files associated with the DocBook DTD.
++ See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
++ detailed information on supplying and using catalog data.
++ -->
++
++<!-- ...................................................................... -->
++<!-- DocBook driver file .................................................. -->
++
++<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.1.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<!-- ...................................................................... -->
++<!-- DocBook modules ...................................................... -->
++
++<public publicId="-//OASIS//DTD DocBook CALS Table Model V4.1.2//EN"
++ uri="calstblx.dtd"/>
++
++ <!-- already included in docbook 4.2
++<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
++ uri="soextblx.dtd"/> -->
++
++<public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN"
++ uri="dbpoolx.mod"/>
++
++<public publicId="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.1.2//EN"
++ uri="dbhierx.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Additional General Entities V4.1.2//EN"
++ uri="dbgenent.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Notations V4.1.2//EN"
++ uri="dbnotnx.mod"/>
++
++<public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.1.2//EN"
++ uri="dbcentx.mod"/>
++
++
++<!-- End of catalog data for DocBook XML V4.1.2 ............................. -->
++<!-- ...................................................................... -->
++
++</catalog>
+diff --git a/docbook-4.2/catalog.xml b/docbook-4.2/catalog.xml
+--- a/docbook-4.2/catalog.xml
++++ b/docbook-4.2/catalog.xml
+@@ -1,4 +1,7 @@
+ <?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">
+
+ <!-- ...................................................................... -->
+@@ -25,6 +28,12 @@
+ <public publicId="-//OASIS//DTD DocBook XML V4.2//EN"
+ uri="docbookx.dtd"/>
+
++<system systemId="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.2/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
+ <!-- ...................................................................... -->
+ <!-- DocBook modules ...................................................... -->
+
+@@ -49,66 +58,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.2//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/iso-dia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/iso-num.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/iso-pub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/iso-tech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/iso-lat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/iso-lat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/iso-grk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/iso-grk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/iso-grk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/iso-grk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/iso-amsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/iso-amsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/iso-amsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/iso-amsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/iso-amso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/iso-amsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/iso-box.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.2 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.3/catalog.xml b/docbook-4.3/catalog.xml
+--- a/docbook-4.3/catalog.xml
++++ b/docbook-4.3/catalog.xml
+@@ -1,4 +1,7 @@
+ <?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">
+
+ <!-- ...................................................................... -->
+@@ -25,12 +28,21 @@
+ <public publicId="-//OASIS//DTD DocBook XML V4.3//EN"
+ uri="docbookx.dtd"/>
+
++<system systemId="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
++<system systemId="http://docbook.org/xml/4.3/docbookx.dtd"
++ uri="docbookx.dtd"/>
++
+ <!-- ...................................................................... -->
+ <!-- DocBook modules ...................................................... -->
+
+ <public publicId="-//OASIS//DTD DocBook CALS Table Model V4.3//EN"
+ uri="calstblx.dtd"/>
+
++<public publicId="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.3//EN"
++ uri="htmltblx.mod"/>
++
+ <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+ uri="soextblx.dtd"/>
+
+@@ -49,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.3//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/iso-dia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/iso-num.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/iso-pub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/iso-tech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/iso-lat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/iso-lat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/iso-grk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/iso-grk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/iso-grk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/iso-grk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/iso-amsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/iso-amsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/iso-amsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/iso-amsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/iso-amso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/iso-amsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/iso-box.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/iso-cyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.3 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.4/catalog.xml b/docbook-4.4/catalog.xml
+--- a/docbook-4.4/catalog.xml
++++ b/docbook-4.4/catalog.xml
+@@ -1,4 +1,7 @@
+ <?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" prefer="public">
+
+ <!-- ...................................................................... -->
+@@ -58,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.4//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/isodia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/isonum.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/isopub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/isotech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/isolat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/isolat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/isogrk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/isogrk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/isogrk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/isogrk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/isoamsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/isoamsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/isoamsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/isoamsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/isoamso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/isoamsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/isobox.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/isocyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/isocyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.4 ............................. -->
+ <!-- ...................................................................... -->
+
+diff --git a/docbook-4.5/catalog.xml b/docbook-4.5/catalog.xml
+--- a/docbook-4.5/catalog.xml
++++ b/docbook-4.5/catalog.xml
+@@ -1,4 +1,7 @@
+ <?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" prefer="public">
+
+ <!-- ...................................................................... -->
+@@ -58,66 +61,6 @@
+ <public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN"
+ uri="dbcentx.mod"/>
+
+-<!-- ...................................................................... -->
+-<!-- ISO entity sets ...................................................... -->
+-
+-<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+- uri="ent/isodia.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+- uri="ent/isonum.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+- uri="ent/isopub.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+- uri="ent/isotech.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+- uri="ent/isolat1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+- uri="ent/isolat2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+- uri="ent/isogrk1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+- uri="ent/isogrk2.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+- uri="ent/isogrk3.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+- uri="ent/isogrk4.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+- uri="ent/isoamsa.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+- uri="ent/isoamsb.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+- uri="ent/isoamsc.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+- uri="ent/isoamsn.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+- uri="ent/isoamso.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+- uri="ent/isoamsr.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+- uri="ent/isobox.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+- uri="ent/isocyr1.ent"/>
+-
+-<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+- uri="ent/isocyr2.ent"/>
+-
+ <!-- End of catalog data for DocBook XML V4.5 ............................. -->
+ <!-- ...................................................................... -->
+
+--
+1.8.1.2
+
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
new file mode 100644
index 0000000000..b71f559ef5
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml.xml
@@ -0,0 +1,68 @@
+<?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
new file mode 100644
index 0000000000..de1bc39704
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Document type definitions for verification of XML data files"
+DESCRIPTION = "Document type definitions for verification of XML data \
+files against the DocBook rule set, it ships with the latest DocBook 4.5 \
+XML DTD, as well as a selected set of legacy DTDs for use with older \
+documents, including 4.0, 4.1.2, 4.2, 4.3 and 4.4"
+HOMEPAGE = "http://www.docbook.org/xml/"
+
+LICENSE = "OASIS"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
+
+# 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 = "${DEBIAN_MIRROR}/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"
+SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f"
+
+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_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
+}
+
+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
+}
+
+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
+}
+
+FILES_${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
new file mode 100644
index 0000000000..0559a5c0d2
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
@@ -0,0 +1,24 @@
+docbook-xsl-stylesheets: no bashism in docbook-xsl-update
+
+The checkbashisms shows there is no bashism, so use /bin/sh.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ tools/bin/docbook-xsl-update | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/bin/docbook-xsl-update b/tools/bin/docbook-xsl-update
+index aba0016..cc73aa2 100755
+--- a/tools/bin/docbook-xsl-update
++++ b/tools/bin/docbook-xsl-update
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # vim: number
+
+ # docbook-xsl-update - Update environment to latest docbook-xsl snapshot
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
new file mode 100644
index 0000000000..a1a576a2ec
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
@@ -0,0 +1,6 @@
+<?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-1.78.1/catalog.xml"/>
+<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets-1.78.1/catalog.xml"/>
+</catalog>
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
new file mode 100644
index 0000000000..2a1bdc47f7
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
@@ -0,0 +1,69 @@
+SUMMARY = "XSL stylesheets for processing DocBook XML to various output formats"
+HOMEPAGE = "http://docbook.sourceforge.net"
+LICENSE = "XSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6eeeed43d498c22a835382533356462"
+
+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 \
+"
+
+SRC_URI[md5sum] = "6dd0f89131cc35bf4f2ed105a1c17771"
+SRC_URI[sha256sum] = "c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467"
+
+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"
+
+do_configure (){
+ :
+}
+
+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-1.78.1
+
+ cp -v -R VERSION common eclipse epub extensions fo highlighting html \
+ htmlhelp images javahelp lib manpages params profiling \
+ roundtrip slides template tests tools webhelp website \
+ xhtml xhtml-1_1 catalog.xml \
+ ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1
+
+ ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl
+
+ install -v -m644 -D README \
+ ${D}${datadir}/doc/docbook-xsl-1.78.1/README.txt
+ install -v -m644 RELEASE-NOTES* NEWS* \
+ ${D}${datadir}/doc/docbook-xsl-1.78.1
+
+ 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
+}
+
+RDEPENDS_${PN} += "perl"
+FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
+FILES_${PN}-doc = "${datadir}/doc/*"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index a6a7ddcbd9..d1c24b8748 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -2,13 +2,14 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "DOS FAT Filesystem Utilities"
+HOMEPAGE = "http://daniel-baumann.ch/software/dosfstools/"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
PR = "r5"
-SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d405ade410f7597d364ab5dc8c9f6/${BP}.src.tar.gz \
file://mkdosfs-bootcode.patch \
file://mkdosfs-dir.patch \
file://alignment_hack.patch \
@@ -27,7 +28,7 @@ SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c
CFLAGS_append = " -D_FILE_OFFSET_BITS=64"
do_install () {
- oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
+ oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
"MANDIR=${D}${mandir}/man8" install
}
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 929906dfd8..5515666d3c 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,12 +2,11 @@ SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
- file://ignore_extra_fields.patch"
+SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz"
DEPENDS = "zlib bzip2 perl ncurses"
DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
RDEPENDS_${PN}_class-native = "xz-native"
S = "${WORKDIR}/${BPN}-${PV}"
@@ -37,6 +36,8 @@ EXTRA_OECONF = "\
--without-selinux \
"
+EXTRA_OECONF_append_class-target = " TAR=tar"
+
do_configure () {
echo >> ${S}/m4/compiler.m4
sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
deleted file mode 100644
index e59c6661ea..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-dpkg: Security Advisory - CVE-2014-3127
-
-commit a12eb58959d0a10584a428f4a3103a49204c410f upstream
-
-dpkg 1.15.9 on Debian squeeze introduces support for the "C-style
-encoded filenames" feature without recognizing that the squeeze patch
-program lacks this feature, which triggers an interaction error that
-allows remote attackers to conduct directory traversal attacks and
-modify files outside of the intended directories via a crafted source
-package.
-
-NOTE: this can be considered a release engineering problem in the
-effort to fix CVE-2014-0471.
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-=====================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:32:41.765446564 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:37:21.461446359 +0800
-@@ -324,31 +324,6 @@
- return $line;
- }
-
--my %ESCAPE = ((
-- 'a' => "\a",
-- 'b' => "\b",
-- 'f' => "\f",
-- 'n' => "\n",
-- 'r' => "\r",
-- 't' => "\t",
-- 'v' => "\cK",
-- '\\' => '\\',
-- '"' => '"',
--), (
-- map { sprintf('%03o', $_) => chr($_) } (0..255)
--));
--
--sub _unescape {
-- my ($diff, $str) = @_;
--
-- if (exists $ESCAPE{$str}) {
-- return $ESCAPE{$str};
-- } else {
-- error(_g('diff %s patches file with unknown escape sequence \\%s'),
-- $diff, $str);
-- }
--}
--
- # Fetch the header filename ignoring the optional timestamp
- sub _fetch_filename {
- my ($diff, $header) = @_;
-@@ -358,12 +333,7 @@
-
- # Is it a C-style string?
- if ($header =~ m/^"/) {
-- $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-- error(_g('diff %s patches file with unbalanced quote'), $diff)
-- unless defined $1;
--
-- $header = $1;
-- $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ error(_g('diff %s patches file with C-style encoded filename'), $diff);
- } else {
- # Tab is the official separator, it's always used when
- # filename contain spaces. Try it first, otherwise strip on space
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
deleted file mode 100644
index 195d309506..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-dpkg: Security Advisory - CVE-2014-0471
-
-commit a82651188476841d190c58693f95827d61959b51 upstream
-
-Directory traversal vulnerability in the unpacking functionality in
-dpkg before 1.15.9, 1.16.x before 1.16.13, and 1.17.x before 1.17.8
-allows remote attackers to write arbitrary files via a crafted source
-package, related to "C-style filename quoting."
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-===================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:24:07.422446284 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:41:37.746446314 +0800
-@@ -324,14 +324,53 @@
- return $line;
- }
-
--# Strip timestamp
--sub _strip_ts {
-- my $header = shift;
--
-- # Tab is the official separator, it's always used when
-- # filename contain spaces. Try it first, otherwise strip on space
-- # if there's no tab
-- $header =~ s/\s.*// unless ($header =~ s/\t.*//);
-+my %ESCAPE = ((
-+ 'a' => "\a",
-+ 'b' => "\b",
-+ 'f' => "\f",
-+ 'n' => "\n",
-+ 'r' => "\r",
-+ 't' => "\t",
-+ 'v' => "\cK",
-+ '\\' => '\\',
-+ '"' => '"',
-+), (
-+ map { sprintf('%03o', $_) => chr($_) } (0..255)
-+));
-+
-+sub _unescape {
-+ my ($diff, $str) = @_;
-+
-+ if (exists $ESCAPE{$str}) {
-+ return $ESCAPE{$str};
-+ } else {
-+ error(_g('diff %s patches file with unknown escape sequence \\%s'),
-+ $diff, $str);
-+ }
-+}
-+
-+# Fetch the header filename ignoring the optional timestamp
-+sub _fetch_filename {
-+ my ($diff, $header) = @_;
-+
-+ # Strip any leading spaces.
-+ $header =~ s/^\s+//;
-+
-+ # Is it a C-style string?
-+ if ($header =~ m/^"/) {
-+ $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-+ error(_g('diff %s patches file with unbalanced quote'), $diff)
-+ unless defined $1;
-+
-+ $header = $1;
-+ $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ } else {
-+ # Tab is the official separator, it's always used when
-+ # filename contain spaces. Try it first, otherwise strip on space
-+ # if there's no tab
-+ $header =~ s/\s.*// unless $header =~ s/\t.*//;
-+ }
-+
- return $header;
- }
-
-@@ -400,7 +439,7 @@
- unless(s/^--- //) {
- error(_g("expected ^--- in line %d of diff `%s'"), $., $diff);
- }
-- $path{old} = $_ = _strip_ts($_);
-+ $path{old} = $_ = _fetch_filename($diff, $_);
- $fn{old} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
- if (/\.dpkg-orig$/) {
- error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff);
-@@ -412,7 +451,7 @@
- unless (s/^\+\+\+ //) {
- error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.);
- }
-- $path{new} = $_ = _strip_ts($_);
-+ $path{new} = $_ = _fetch_filename($diff, $_);
- $fn{new} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
-
- unless (defined $fn{old} or defined $fn{new}) {
diff --git a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
deleted file mode 100644
index 4e3eb97ed8..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [workaround]
-
-Index: dpkg-1.16.8/dpkg-deb/build.c
-===================================================================
---- dpkg-1.16.8.orig/dpkg-deb/build.c
-+++ dpkg-1.16.8/dpkg-deb/build.c
-@@ -340,13 +340,13 @@ check_new_pkg(const char *dir)
- if (pkg->priority == pri_other)
- warning(_("'%s' contains user-defined Priority value '%s'"),
- controlfile, pkg->otherpriority);
-- for (field = pkg->available.arbs; field; field = field->next) {
-+ /*for (field = pkg->available.arbs; field; field = field->next) {
- if (known_arbitrary_field(field))
- continue;
-
- warning(_("'%s' contains user-defined field '%s'"), controlfile,
- field->name);
-- }
-+ }*/
-
- free(controlfile);
diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
index 0e57dbc7fc..f660b18646 100644
--- a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
@@ -11,22 +11,22 @@ Upstream-Status: Pending
Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
m4/dpkg-compiler.m4 | 1 -
1 file changed, 1 deletion(-)
diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
-index f1c760b..500b5ad 100644
+index 53f67c6..6e66a43 100644
--- a/m4/dpkg-compiler.m4
+++ b/m4/dpkg-compiler.m4
-@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then
- DPKG_WARNING_ALL([-Wformat-security])
- DPKG_WARNING_ALL([-Wpointer-arith])
- DPKG_WARNING_ALL([-Wlogical-op])
-- DPKG_WARNING_ALL([-Wvla])
- DPKG_WARNING_ALL([-Winit-self])
- DPKG_WARNING_ALL([-Wwrite-strings])
- DPKG_WARNING_ALL([-Wcast-align])
---
-1.7.10.4
-
+@@ -49,7 +49,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
+ DPKG_CHECK_COMPILER_FLAG([-Wformat-security])
+ DPKG_CHECK_COMPILER_FLAG([-Wpointer-arith])
+ DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
+- DPKG_CHECK_COMPILER_FLAG([-Wvla])
+ DPKG_CHECK_COMPILER_FLAG([-Winit-self])
+ DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
+ DPKG_CHECK_COMPILER_FLAG([-Wcast-align])
+---
+1.17.21
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
index 83526f3c96..15c0277015 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
@@ -12,10 +12,8 @@ SRC_URI += "file://noman.patch \
file://dpkg-configure.service \
file://glibc2.5-sync_file_range.patch \
file://no-vla-warning.patch \
- file://dpkg-1.17.4-CVE-2014-0471.patch \
- file://dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch \
"
-SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
-SRC_URI[sha256sum] = "01cdc81c33e77c3d7c40df17e19171794542be7cf12e411381ffcaa8f87b1854"
+SRC_URI[md5sum] = "765a96fd0180196613bbfa3c4aef0775"
+SRC_URI[sha256sum] = "3ed776627181cb9c1c9ba33f94a6319084be2e9ec9c23dd61ce784c4f602cf05"
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
new file mode 100644
index 0000000000..2624f90e72
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
@@ -0,0 +1,54 @@
+From c6ff7feb9038d6e8aaffe2e69b205ad5fa33df2f Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Mon, 18 Aug 2014 21:02:56 +0200
+Subject: [PATCH] Fix musl build failures
+
+In lib/ext2fs/unix_io.c, __u64 should be used instead of __uint64_t. This type
+is guaranteed by the e2fsprogs build system.
+(795c02def3681a99cc792a5ebc162d06f8a1eeb7)
+
+In misc/create_inode.c, <limits.h> is needed for the definition of PATH_MAX.
+(bbccc6f3c6a106721fb6f1ef4df6bc32c7986235)
+
+Both of these fixes have been made upstream with the git commit IDs given but
+those are larger commits containing other changes not needed here.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Backport
+---
+ lib/ext2fs/unix_io.c | 6 +++---
+ misc/create_inode.c | 1 +
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 19be630..0cc0f52 100644
+--- a/lib/ext2fs/unix_io.c
++++ b/lib/ext2fs/unix_io.c
+@@ -931,10 +931,10 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block,
+
+ if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+ #ifdef BLKDISCARD
+- __uint64_t range[2];
++ __u64 range[2];
+
+- range[0] = (__uint64_t)(block) * channel->block_size;
+- range[1] = (__uint64_t)(count) * channel->block_size;
++ range[0] = (__u64)(block) * channel->block_size;
++ range[1] = (__u64)(count) * channel->block_size;
+
+ ret = ioctl(data->dev, BLKDISCARD, &range);
+ #else
+diff --git a/misc/create_inode.c b/misc/create_inode.c
+index 6d8de04..fcec5aa 100644
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -1,4 +1,5 @@
+ #include "create_inode.h"
++#include <limits.h>
+
+ #if __STDC_VERSION__ < 199901L
+ # if __GNUC__ >= 2
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
index 4b00668476..c0bd7dbdee 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
@@ -1,7 +1,56 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
+# Extracted from the package's shipped aclocal.m4. Custom macros should be in
# acinclude.m4 so running aclocal doesn't blow them away.
#
-# RP 1/6/2010
+# 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
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 530255474d..1fb4a6cd85 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -16,6 +16,7 @@ SRC_URI += "file://acinclude.m4 \
file://0009-misc-create_inode.c-handle-hardlinks.patch \
file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \
file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \
+ file://0012-Fix-musl-build-failures.patch \
file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
file://misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch \
"
@@ -23,18 +24,13 @@ SRC_URI += "file://acinclude.m4 \
SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
SRC_URI[sha256sum] = "2f92ac06e92fa00f2ada3ee67dad012d74d685537527ad1241d82f2d041f2802"
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid --disable-uuidd"
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid --disable-uuidd --enable-verbose-makecmds"
EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
do_configure_prepend () {
cp ${WORKDIR}/acinclude.m4 ${S}/
}
-do_compile_prepend () {
- find ./ -print | grep -v ./patches | xargs chmod u=rwX
- ( cd ${S}/util; ${BUILD_CC} subst.c -o ${B}/util/subst )
-}
-
do_install () {
oe_runmake 'DESTDIR=${D}' install
oe_runmake 'DESTDIR=${D}' install-libs
@@ -58,6 +54,12 @@ do_install () {
mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
}
+do_install_append_class-target() {
+ # Clean host path in compile_et, mk_cmds
+ sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et
+ sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds
+}
+
RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
diff --git a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
index d4e4675ad5..d4e4675ad5 100644
--- a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
index 5baa709000..5baa709000 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils-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
new file mode 100644
index 0000000000..84e8ddcca7
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
@@ -0,0 +1,36 @@
+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
+
+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/elfutils-ar-c-fix-num-passed-to-memset.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
index b619619ec0..b619619ec0 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
index 0ff353d0de..0ff353d0de 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
index 0e28690207..0e28690207 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
index bd634b4418..bd634b4418 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
index a86b97c683..a86b97c683 100644
--- a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
index 5b621f92ff..5b621f92ff 100644
--- a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
index 3f81a75b1a..3f81a75b1a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
index 2b5dad368a..2b5dad368a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
index b8a912c412..b8a912c412 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
index cd398549df..cd398549df 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
index 6a19791480..6a19791480 100644
--- a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
index d792d5fd73..d792d5fd73 100644
--- a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
deleted file mode 100644
index 6c44314589..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 7f1eec317db79627b473c5b149a22a1b20d1f68f Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mjw@redhat.com>
-Date: Wed, 9 Apr 2014 11:33:23 +0200
-Subject: [PATCH] CVE-2014-0172 Check for overflow before calling malloc to
- uncompress data.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1085663
-
-Reported-by: Florian Weimer <fweimer@redhat.com>
-Signed-off-by: Mark Wielaard <mjw@redhat.com>
-
-Index: elfutils-0.158/libdw/dwarf_begin_elf.c
-===================================================================
---- elfutils-0.158.orig/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.928213292 +0000
-+++ elfutils-0.158/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.924213375 +0000
-@@ -1,5 +1,5 @@
- /* Create descriptor from ELF descriptor for processing file.
-- Copyright (C) 2002-2011 Red Hat, Inc.
-+ Copyright (C) 2002-2011, 2014 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-@@ -289,6 +289,12 @@
- memcpy (&size, data->d_buf + 4, sizeof size);
- size = be64toh (size);
-
-+ /* Check for unsigned overflow so malloc always allocated
-+ enough memory for both the Elf_Data header and the
-+ uncompressed section data. */
-+ if (unlikely (sizeof (Elf_Data) + size < size))
-+ break;
-+
- Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
- if (unlikely (zdata == NULL))
- break;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
deleted file mode 100644
index e2f0576d7b..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Matthias Klose <doko@ubuntu.com>
-Date: Tue, 7 Jan 2014 10:25:29 +0100
-Subject: [PATCH] tests: backtrace-subr.sh (check_native_core) should check
- core file name.
-
-Needed when /proc/sys/kernel/core_uses_pid is set to 0. Try to rename
-the core file, and if it does still fail, skip the test.
-
-diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
-index e7ece91..62b873c 100644
---- a/tests/backtrace-subr.sh
-+++ b/tests/backtrace-subr.sh
-@@ -111,6 +111,11 @@ check_native_core()
-
- # Skip the test if we cannot adjust core ulimit.
- core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
-+ # see if /proc/sys/kernel/core_uses_pid is set to 0
-+ if [ -f core ]; then
-+ mv core "$core"
-+ fi
-+ if [ ! -f "$core" ]; then exit 77; fi
-
- if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
- VALGRIND_CMD="$SAVED_VALGRIND_CMD"
---
-1.9.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
deleted file mode 100644
index 671c8ee1ae..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libelf/elf.h | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/libelf/elf.h b/libelf/elf.h
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -142,6 +142,7 @@ typedef struct
- #define ELFOSABI_NETBSD 2 /* NetBSD. */
- #define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
- #define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
-+#define ELFOSABI_HURD 4 /* GNU/Hurd */
- #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
- #define ELFOSABI_AIX 7 /* IBM AIX. */
- #define ELFOSABI_IRIX 8 /* SGI Irix. */
-@@ -149,8 +150,13 @@ typedef struct
- #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
- #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
- #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
-+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
-+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-+#define ELFOSABI_AROS 15 /* Amiga Research OS */
-+/* 64-255 Architecture-specific value range */
- #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
- #define ELFOSABI_ARM 97 /* ARM */
-+/* This is deprecated? It's not in the latest version anymore. */
- #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
- #define EI_ABIVERSION 8 /* ABI version */
-@@ -205,7 +211,7 @@ typedef struct
- #define EM_H8_300H 47 /* Hitachi H8/300H */
- #define EM_H8S 48 /* Hitachi H8S */
- #define EM_H8_500 49 /* Hitachi H8/500 */
--#define EM_IA_64 50 /* Intel Merced */
-+#define EM_IA_64 50 /* Intel IA64 */
- #define EM_MIPS_X 51 /* Stanford MIPS-X */
- #define EM_COLDFIRE 52 /* Motorola Coldfire */
- #define EM_68HC12 53 /* Motorola M68HC12 */
-@@ -219,7 +225,8 @@ typedef struct
- #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
- #define EM_X86_64 62 /* AMD x86-64 architecture */
- #define EM_PDSP 63 /* Sony DSP Processor */
--
-+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
- #define EM_FX66 66 /* Siemens FX66 microcontroller */
- #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
- #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
-@@ -249,6 +256,22 @@ typedef struct
- #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
- #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
- #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-+#define EM_NS32K 97 /* National Semiconductor 32000 series */
-+#define EM_TPC 98 /* Tenor Network TPC processor */
-+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
-+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
-+#define EM_MAX 102 /* MAX Processor */
-+#define EM_CR 103 /* National Semiconductor CompactRISC */
-+#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-+#define EM_MSP430 105 /* TI msp430 micro controller */
-+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
-+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-+#define EM_SEP 108 /* Sharp embedded microprocessor */
-+#define EM_ARCA 109 /* Arca RISC Microprocessor */
-+
- #define EM_AARCH64 183 /* ARM AARCH64 */
- #define EM_TILEPRO 188 /* Tilera TILEPro */
- #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
deleted file mode 100644
index 1dbd52d557..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-m4/biarch.m4: tweak AC_RUN_IFELSE for cross-compiling
-
-Macro: AC_RUN_IFELSE (input,
- [action-if-true],
- [action-if-false],
- [action-if-cross-compiling])
-
-Add the missing [action-if-cross-compiling] part to support
-cross-compiling.
-
-Upstream-Status: inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- m4/biarch.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/biarch.m4 b/m4/biarch.m4
---- a/m4/biarch.m4
-+++ b/m4/biarch.m4
-@@ -40,7 +40,9 @@ AC_CACHE_CHECK([whether $biarch_CC makes executables we can run],
- save_CC="$CC"
- CC="$biarch_CC"
- AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
-- utrace_cv_cc_biarch=yes, utrace_cv_cc_biarch=no)
-+ utrace_cv_cc_biarch=yes,
-+ utrace_cv_cc_biarch=no,
-+ utrace_cv_cc_biarch=yes)
- CC="$save_CC"])], [utrace_cv_cc_biarch=no])
- AS_IF([test $utrace_cv_cc_biarch != yes], [dnl
- AC_MSG_WARN([not running biarch tests, $biarch_CC does not work])])])
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
deleted file mode 100644
index f358a85466..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
+++ /dev/null
@@ -1,1756 +0,0 @@
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -680,6 +680,11 @@
- * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
- Reported by Kurt Roeckx <kurt@roeckx.be>.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * relocate.c (relocate_section): Use gelf_fsize instead of relying
-+ on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
---- elfutils/libdwfl/relocate.c
-+++ elfutils/libdwfl/relocate.c
-@@ -1,5 +1,5 @@
- /* Relocate debug information.
-- Copyright (C) 2005-2010 Red Hat, Inc.
-+ Copyright (C) 2005-2011 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
-@@ -456,7 +456,10 @@ relocate_section (Dwfl_Module *mod, Elf
- }
- }
-
-- size_t nrels = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize
-+ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA,
-+ 1, EV_CURRENT);
-+ size_t nrels = shdr->sh_size / sh_entsize;
- size_t complete = 0;
- if (shdr->sh_type == SHT_REL)
- for (size_t relidx = 0; !result && relidx < nrels; ++relidx)
-@@ -558,7 +561,7 @@ relocate_section (Dwfl_Module *mod, Elf
- nrels = next;
- }
-
-- shdr->sh_size = reldata->d_size = nrels * shdr->sh_entsize;
-+ shdr->sh_size = reldata->d_size = nrels * sh_entsize;
- gelf_update_shdr (scn, shdr);
- }
-
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -754,10 +754,53 @@
- If section content hasn't been read yet, do it before looking for the
- block size. If no section data present, infer size of section header.
-
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * libelfP.h (INVALID_NDX): Define.
-+ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
-+ * gelf_getlib.c (gelf_getlib): Likewise.
-+ * gelf_getmove.c (gelf_getmove): Likewise.
-+ * gelf_getrel.c (gelf_getrel): Likewise.
-+ * gelf_getrela.c (gelf_getrela): Likewise.
-+ * gelf_getsym.c (gelf_getsym): Likewise.
-+ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
-+ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
-+ * gelf_getversym.c (gelf_getversym): Likewise.
-+ * gelf_update_dyn.c (gelf_update_dyn): Likewise.
-+ * gelf_update_lib.c (gelf_update_lib): Likewise.
-+ * gelf_update_move.c (gelf_update_move): Likewise.
-+ * gelf_update_rel.c (gelf_update_rel): Likewise.
-+ * gelf_update_rela.c (gelf_update_rela): Likewise.
-+ * gelf_update_sym.c (gelf_update_sym): Likewise.
-+ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
-+ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
-+ * gelf_update_versym.c (gelf_update_versym): Likewise.
-+ * elf_newscn.c (elf_newscn): Check for overflow.
-+ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
-+ (__elfw2(LIBELFBITS,updatefile)): Likewise.
-+ * elf_begin.c (file_read_elf): Likewise.
-+ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
-+ * elf_getarsym.c (elf_getarsym): Likewise.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise.
- 2005-05-11 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update again.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
-+ table fits into object's bounds.
-+ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to
-+ elf->map_address. Check if first section header fits into object's
-+ bounds.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
-+ Check if section header table fits into object's bounds.
-+ * elf_begin.c (get_shnum): Ensure section headers fits into
-+ object's bounds.
-+ (file_read_elf): Make sure scncnt is small enough to allocate both
-+ ElfXX_Shdr and Elf_Scn array. Make sure section and program header
-+ tables fit into object's bounds. Avoid memory leak on failure.
-+
- 2005-05-09 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update from glibc.
---- elfutils/libelf/elf32_getphdr.c
-+++ elfutils/libelf/elf32_getphdr.c
-@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_phoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_phoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_PHDR);
-+ goto out;
-+ }
-+
- /* All the data is already mapped. Use it. */
- void *file_phdr = ((char *) elf->map_address
- + elf->start_offset + ehdr->e_phoff);
---- elfutils/libelf/elf32_getshdr.c
-+++ elfutils/libelf/elf32_getshdr.c
-@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn)
- goto out;
-
- size_t shnum;
-- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0)
-+ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0
-+ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
- goto out;
- size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
-
-@@ -77,6 +78,16 @@ load_shdr_wrlock (Elf_Scn *scn)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_shoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_shoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ goto free_and_out;
-+ }
-+
- ElfW2(LIBELFBITS,Shdr) *notcvt;
-
- /* All the data is already mapped. If we could use it
---- elfutils/libelf/elf32_newphdr.c
-+++ elfutils/libelf/elf32_newphdr.c
-@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count)
- || count == PN_XNUM
- || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
- {
-+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
-+ {
-+ result = NULL;
-+ goto out;
-+ }
-+
- /* Allocate a new program header with the appropriate number of
- elements. */
- result = (ElfW2(LIBELFBITS,Phdr) *)
---- elfutils/libelf/elf32_updatefile.c
-+++ elfutils/libelf/elf32_updatefile.c
-@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
-+ return 1;
-+
- Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
- Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
- char *const shdr_start = ((char *) elf->map_address + elf->start_offset
-@@ -624,6 +627,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
-+ + sizeof (ElfW2(LIBELFBITS,Shdr)))))
-+ return 1;
-+
- off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
- #if EV_NUM != 2
- xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
---- elfutils/libelf/elf_begin.c
-+++ elfutils/libelf/elf_begin.c
-@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
- {
-- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
-+ if (unlikely (ehdr.e32->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr)))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -192,7 +193,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
- {
-- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
-+ if (unlikely (ehdr.e64->e_shoff >= maxsize)
-+ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -264,6 +266,15 @@ file_read_elf (int fildes, void *map_add
- /* Could not determine the number of sections. */
- return NULL;
-
-+ /* Check for too many sections. */
-+ if (e_ident[EI_CLASS] == ELFCLASS32)
-+ {
-+ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
-+ return NULL;
-+ }
-+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
-+ return NULL;
-+
- /* We can now allocate the memory. Even if there are no section headers,
- we allocate space for a zeroth section in case we need it later. */
- const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
-@@ -303,6 +314,16 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf32.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr->e_shoff
-+ < scncnt * sizeof (Elf32_Shdr)))
-+ {
-+ free_and_out:
-+ free (elf);
-+ __libelf_seterrno (ELF_E_INVALID_FILE);
-+ return NULL;
-+ }
- elf->state.elf32.shdr
- = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
-@@ -389,6 +410,11 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf64.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (ehdr->e_shoff
-+ + scncnt * sizeof (Elf32_Shdr) > maxsize))
-+ goto free_and_out;
- elf->state.elf64.shdr
- = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
---- elfutils/libelf/elf_getarsym.c
-+++ elfutils/libelf/elf_getarsym.c
-@@ -183,6 +183,9 @@ elf_getarsym (elf, ptr)
- size_t index_size = atol (tmpbuf);
-
- if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
-+#if SIZE_MAX <= 4294967295U
-+ || n >= SIZE_MAX / sizeof (Elf_Arsym)
-+#endif
- || n * w > index_size)
- {
- /* This index table cannot be right since it does not fit into
---- elfutils/libelf/elf_getshdrstrndx.c
-+++ elfutils/libelf/elf_getshdrstrndx.c
-@@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf32_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf32_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
-@@ -142,10 +157,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf64_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf64_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
---- elfutils/libelf/elf_newscn.c
-+++ elfutils/libelf/elf_newscn.c
-@@ -83,10 +83,18 @@ elf_newscn (elf)
- else
- {
- /* We must allocate a new element. */
-- Elf_ScnList *newp;
-+ Elf_ScnList *newp = NULL;
-
- assert (elf->state.elf.scnincr > 0);
-
-+ if (
-+#if SIZE_MAX <= 4294967295U
-+ likely (elf->state.elf.scnincr
-+ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
-+#else
-+ 1
-+#endif
-+ )
- newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
- + ((elf->state.elf.scnincr *= 2)
- * sizeof (Elf_Scn)), 1);
---- elfutils/libelf/gelf_getdyn.c
-+++ elfutils/libelf/gelf_getdyn.c
-@@ -1,5 +1,5 @@
- /* Get information from dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -72,7 +72,7 @@ gelf_getdyn (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +93,7 @@ gelf_getdyn (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getlib.c
-+++ elfutils/libelf/gelf_getlib.c
-@@ -1,5 +1,5 @@
- /* Get library from table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -65,7 +65,7 @@ gelf_getlib (data, ndx, dst)
- /* The data is already in the correct form. Just make sure the
- index is OK. */
- GElf_Lib *result = NULL;
-- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Lib, data))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_getmove.c
-+++ elfutils/libelf/gelf_getmove.c
-@@ -1,5 +1,5 @@
- /* Get move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -62,7 +62,7 @@ gelf_getmove (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getrela.c
-+++ elfutils/libelf/gelf_getrela.c
-@@ -1,5 +1,5 @@
- /* Get RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getrel.c
-+++ elfutils/libelf/gelf_getrel.c
-@@ -1,5 +1,5 @@
- /* Get REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrel (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrel (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -92,7 +86,7 @@ gelf_getrel (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getsym.c
-+++ elfutils/libelf/gelf_getsym.c
-@@ -1,5 +1,5 @@
- /* Get symbol information from symbol table at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -69,7 +69,7 @@ gelf_getsym (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -98,7 +98,7 @@ gelf_getsym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsyminfo.c
-+++ elfutils/libelf/gelf_getsyminfo.c
-@@ -1,5 +1,5 @@
- /* Get additional symbol information from symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -63,7 +63,7 @@ gelf_getsyminfo (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsymshndx.c
-+++ elfutils/libelf/gelf_getsymshndx.c
-@@ -1,6 +1,6 @@
- /* Get symbol information and separate section index from symbol table
- at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -69,7 +69,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- section index table. */
- if (likely (shndxdata_scn != NULL))
- {
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -89,7 +89,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -118,7 +118,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getversym.c
-+++ elfutils/libelf/gelf_getversym.c
-@@ -1,5 +1,5 @@
- /* Get symbol version information at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -71,7 +71,7 @@ gelf_getversym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_update_dyn.c
-+++ elfutils/libelf/gelf_update_dyn.c
-@@ -1,5 +1,5 @@
- /* Update information in dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_update_dyn (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_DYN))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_dyn (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -95,7 +89,7 @@ gelf_update_dyn (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_lib.c
-+++ elfutils/libelf/gelf_update_lib.c
-@@ -1,5 +1,5 @@
- /* Update library in table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -47,12 +47,6 @@ gelf_update_lib (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
- if (unlikely (data_scn->d.d_type != ELF_T_LIB))
- {
-@@ -66,7 +60,7 @@ gelf_update_lib (data, ndx, src)
-
- /* Check whether we have to resize the data buffer. */
- int result = 0;
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_update_move.c
-+++ elfutils/libelf/gelf_update_move.c
-@@ -1,5 +1,5 @@
- /* Update move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -54,8 +54,7 @@ gelf_update_move (data, ndx, src)
- assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/gelf_update_rela.c
-+++ elfutils/libelf/gelf_update_rela.c
-@@ -1,5 +1,5 @@
- /* Update RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- /* The type of the data better should match. */
-@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_rel.c
-+++ elfutils/libelf/gelf_update_rel.c
-@@ -1,5 +1,5 @@
- /* Update REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- /* The type of the data better should match. */
-@@ -78,7 +72,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +87,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_sym.c
-+++ elfutils/libelf/gelf_update_sym.c
-@@ -1,5 +1,5 @@
- /* Update symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_sym (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_sym (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -104,7 +98,7 @@ gelf_update_sym (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_syminfo.c
-+++ elfutils/libelf/gelf_update_syminfo.c
-@@ -1,5 +1,5 @@
- /* Update additional symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_syminfo (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
- {
- /* The type of the data better should match. */
-@@ -72,7 +66,7 @@ gelf_update_syminfo (data, ndx, src)
- rwlock_wrlock (scn->elf->lock);
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_symshndx.c
-+++ elfutils/libelf/gelf_update_symshndx.c
-@@ -1,6 +1,6 @@
- /* Update symbol information and section index in symbol table at the
- given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -56,12 +56,6 @@ gelf_update_symshndx (symdata, shndxdata
- if (symdata == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -107,7 +101,7 @@ gelf_update_symshndx (symdata, shndxdata
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -130,7 +124,7 @@ gelf_update_symshndx (symdata, shndxdata
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_versym.c
-+++ elfutils/libelf/gelf_update_versym.c
-@@ -1,5 +1,5 @@
- /* Update symbol version information.
-- Copyright (C) 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2001-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2001.
-
-@@ -54,8 +54,7 @@ gelf_update_versym (data, ndx, src)
- assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/libelfP.h
-+++ elfutils/libelf/libelfP.h
-@@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t
- /* Align offset to 4 bytes as needed for note name and descriptor data. */
- #define NOTE_ALIGN(n) (((n) + 3) & -4U)
-
-+/* Convenience macro. */
-+#define INVALID_NDX(ndx, type, data) \
-+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
-+
- #endif /* libelfP.h */
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -702,6 +702,12 @@
-
- * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_relocs_rel)
-+ (handle_relocs_rela, handle_versym, print_liblist):
-+ Use gelf_fsize instead of relying on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * elfcmp.c (verbose): New variable.
-@@ -2414,6 +2420,16 @@
- object symbols or symbols with unknown type.
- (check_rel): Likewise.
-
-+2005-06-09 Roland McGrath <roland@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
-+ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
-+ (handle_scngrp): Check for bogus sh_info.
-+
-+ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
-+ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
-+ Don't use assert on input values, instead bail with "illformed" error.
-+
- 2005-06-08 Roland McGrath <roland@redhat.com>
-
- * readelf.c (print_ops): Add consts.
-@@ -2459,6 +2475,19 @@
-
- * readelf.c (dwarf_tag_string): Add new tags.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (check_hash): Don't check entries beyond end of section.
-+ (check_note): Don't crash if gelf_rawchunk fails.
-+ (section_name): Return <invalid> if gelf_getshdr returns NULL.
-+
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (section_name): Return "<invalid>" instead of
-+ crashing on invalid section name.
-+ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
-+ check_symtab_shndx, check_hash, check_versym): Robustify.
-+
- 2005-05-08 Roland McGrath <roland@redhat.com>
-
- * strip.c (handle_elf): Don't translate hash and versym data formats,
---- elfutils/src/elflint.c
-+++ elfutils/src/elflint.c
-@@ -123,6 +123,10 @@ static uint32_t shstrndx;
- /* Array to count references in section groups. */
- static int *scnref;
-
-+/* Numbers of sections and program headers. */
-+static unsigned int shnum;
-+static unsigned int phnum;
-+
-
- int
- main (int argc, char *argv[])
-@@ -311,10 +315,19 @@ section_name (Ebl *ebl, int idx)
- {
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr;
-+ const char *ret;
-+
-+ if ((unsigned int) idx > shnum)
-+ return "<invalid>";
-
- shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
-+ if (shdr == NULL)
-+ return "<invalid>";
-
-- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ if (ret == NULL)
-+ return "<invalid>";
-+ return ret;
- }
-
-
-@@ -337,11 +350,6 @@ static const int valid_e_machine[] =
- (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
-
-
--/* Numbers of sections and program headers. */
--static unsigned int shnum;
--static unsigned int phnum;
--
--
- static void
- check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
- {
-@@ -625,7 +633,8 @@ section [%2d] '%s': symbol table cannot
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
- idx, section_name (ebl, idx));
-@@ -663,7 +672,7 @@ section [%2d] '%s': XINDEX for zeroth en
- xndxscnidx, section_name (ebl, xndxscnidx));
- }
-
-- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
- if (sym == NULL)
-@@ -683,7 +692,8 @@ section [%2d] '%s': symbol %zu: invalid
- else
- {
- name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
-- assert (name != NULL);
-+ assert (name != NULL
-+ || strshdr->sh_type != SHT_STRTAB);
- }
-
- if (sym->st_shndx == SHN_XINDEX)
-@@ -1040,9 +1050,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Shdr rcshdr_mem;
- const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
-- assert (rcshdr != NULL);
-
-- if (rcshdr->sh_type == SHT_DYNAMIC)
-+ if (rcshdr == NULL)
-+ break;
-+
-+ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
- {
- /* Found the dynamic section. Look through it. */
- Elf_Data *d = elf_getdata (scn, NULL);
-@@ -1052,7 +1064,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
-- assert (dyn != NULL);
-+
-+ if (dyn == NULL)
-+ break;
-
- if (dyn->d_tag == DT_RELCOUNT)
- {
-@@ -1066,7 +1080,9 @@ section [%2d] '%s': DT_RELCOUNT used for
- /* Does the number specified number of relative
- relocations exceed the total number of
- relocations? */
-- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
-+ if (shdr->sh_entsize != 0
-+ && dyn->d_un.d_val > (shdr->sh_size
-+ / shdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
- idx, section_name (ebl, idx),
-@@ -1226,7 +1242,8 @@ section [%2d] '%s': no relocations for m
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext (reltype == ELF_T_RELA ? "\
- section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
- section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
-@@ -1449,7 +1466,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rela rela_mem;
- GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
-@@ -1499,7 +1517,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rel rel_mem;
- GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
-@@ -1598,7 +1617,8 @@ section [%2d] '%s': referenced as string
- shdr->sh_link, section_name (ebl, shdr->sh_link),
- idx, section_name (ebl, idx));
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
- idx, section_name (ebl, idx));
-@@ -1608,7 +1628,7 @@ section [%2d] '%s': section entry size d
- idx, section_name (ebl, idx));
-
- bool non_null_warned = false;
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
-@@ -1880,6 +1900,8 @@ section [%2d] '%s': entry size does not
- idx, section_name (ebl, idx));
-
- if (symshdr != NULL
-+ && shdr->sh_entsize
-+ && symshdr->sh_entsize
- && (shdr->sh_size / shdr->sh_entsize
- < symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
-@@ -1906,6 +1928,12 @@ section [%2d] '%s': extended section ind
- }
-
- Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
-+ if (data == NULL)
-+ {
-+ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
-+ idx, section_name (ebl, idx));
-+ return;
-+ }
-
- if (*((Elf32_Word *) data->d_buf) != 0)
- ERROR (gettext ("symbol 0 should have zero extended section index\n"));
-@@ -1948,7 +1976,7 @@ section [%2d] '%s': hash table section i
-
- size_t maxidx = nchain;
-
-- if (symshdr != NULL)
-+ if (symshdr != NULL && symshdr->sh_entsize != 0)
- {
- size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
-
-@@ -1959,18 +1987,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf32_Word *buf = (Elf32_Word *) data->d_buf;
-+ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2000,18 +2038,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
-+ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
-- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
-+ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2036,7 +2084,7 @@ section [%2d] '%s': bitmask size not pow
- if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
- {
- ERROR (gettext ("\
--section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
-+section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
- idx, section_name (ebl, idx), (long int) shdr->sh_size,
- (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
- return;
-@@ -2708,8 +2756,9 @@ section [%2d] '%s' refers in sh_link to
-
- /* The number of elements in the version symbol table must be the
- same as the number of symbols. */
-- if (shdr->sh_size / shdr->sh_entsize
-- != symshdr->sh_size / symshdr->sh_entsize)
-+ if (shdr->sh_entsize && symshdr->sh_entsize
-+ && (shdr->sh_size / shdr->sh_entsize
-+ != symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
- idx, section_name (ebl, idx),
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -1364,6 +1364,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
-
- GElf_Sym sym_mem;
-+ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
-+
- printf ((grpref[0] & GRP_COMDAT)
- ? ngettext ("\
- \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
-@@ -1376,8 +1378,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- data->d_size / sizeof (Elf32_Word) - 1),
- elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- elf_strptr (ebl->elf, symshdr->sh_link,
-- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
-+ (sym == NULL ? NULL
-+ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
- ?: gettext ("<INVALID SYMBOL>"),
- data->d_size / sizeof (Elf32_Word) - 1);
-
-@@ -1528,10 +1530,12 @@ static void
- handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
- Elf_Data *data;
- size_t cnt;
- size_t shstrndx;
-+ size_t sh_entsize;
-
- /* Get the data of the section. */
- data = elf_getdata (scn, NULL);
-@@ -1543,21 +1547,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
- \nDynamic segment contains %lu entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
-- shdr->sh_size / shdr->sh_entsize),
-- (unsigned long int) (shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
-+ (unsigned long int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
- fputs_unlocked (gettext (" Type Value\n"), stdout);
-
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dynmem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
-@@ -1706,7 +1715,8 @@ static void
- handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -1892,7 +1902,8 @@ static void
- handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -2139,6 +2150,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Now we can compute the number of entries in the section. */
- unsigned int nsyms = data->d_size / (class == ELFCLASS32
- ? sizeof (Elf32_Sym)
-@@ -2149,15 +2167,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- nsyms),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
-- GElf_Shdr glink;
- printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n",
- " %lu local symbols String table: [%2u] '%s'\n",
- shdr->sh_info),
- (unsigned long int) shdr->sh_info,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- fputs_unlocked (class == ELFCLASS32
- ? gettext ("\
-@@ -2393,7 +2408,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2404,9 +2425,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2459,8 +2478,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2472,9 +2497,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2736,25 +2759,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
- filename = NULL;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Print the header. */
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
- "\
- \nVersion symbols section [%2u] '%s' contains %d entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
-- shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- (int) (shdr->sh_size / shdr->sh_entsize),
-+ (int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- /* Now we can finally look at the actual contents of this section. */
-- for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (unsigned int cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- if (cnt % 2 == 0)
- printf ("\n %4d:", cnt);
-@@ -2803,7 +2831,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
- ++counts[lengths[cnt]];
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
-+ shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2816,9 +2854,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- if (extrastr != NULL)
- fputs (extrastr, stdout);
-@@ -3078,7 +3114,8 @@ print_liblist (Ebl *ebl)
-
- if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST)
- {
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_LIB, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
- printf (ngettext ("\
- \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n",
- "\
-@@ -4398,6 +4435,16 @@ print_decoded_aranges_section (Ebl *ebl,
- return;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
- "\
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
-@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char
- goto fail_close;
- }
-
-+ if (shstrndx >= shnum)
-+ goto illformed;
-+
-+#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
-+
- /* Storage for section information. We leave room for two more
- entries since we unconditionally create a section header string
- table. Maybe some weird tool created an ELF file without one.
-@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* This should always be true (i.e., there should not be any
- holes in the numbering). */
-- assert (elf_ndxscn (scn) == cnt);
-+ elf_assert (elf_ndxscn (scn) == cnt);
-
- shdr_info[cnt].scn = scn;
-
-@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char
- shdr_info[cnt].shdr.sh_name);
- if (shdr_info[cnt].name == NULL)
- {
-+ illformed:
- error (0, 0, gettext ("illformed file '%s'"), fname);
- goto fail_close;
- }
-@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char
-
- /* Remember the shdr.sh_link value. */
- shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
-+ if (shdr_info[cnt].old_sh_link >= shnum)
-+ goto illformed;
-
- /* Sections in files other than relocatable object files which
- are not loaded can be freely moved by us. In relocatable
-@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char
- appropriate reference. */
- if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
-@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char
- for (inner = 1;
- inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
- ++inner)
-+ {
-+ if (grpref[inner] < shnum)
- shdr_info[grpref[inner]].group_idx = cnt;
-+ else
-+ goto illformed;
-+ }
-
- if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
- /* If the section group contains only one element and this
-@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
- }
-
-@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char
- discarded right away. */
- if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
- {
-- assert (shdr_info[cnt].group_idx != 0);
-+ elf_assert (shdr_info[cnt].group_idx != 0);
-
- if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
- {
-@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* If a relocation section is marked as being removed make
- sure the section it is relocating is removed, too. */
-- if ((shdr_info[cnt].shdr.sh_type == SHT_REL
-+ if (shdr_info[cnt].shdr.sh_type == SHT_REL
- || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-- shdr_info[cnt].idx = 1;
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-+ shdr_info[cnt].idx = 1;
-+ }
-
- /* If a group section is marked as being removed make
- sure all the sections it contains are being removed, too. */
-@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char
- if (shdr_info[cnt].symtab_idx != 0
- && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-
- shdr_info[shdr_info[cnt].symtab_idx].data
- = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
-@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char
- else if (scnidx == SHN_XINDEX)
- scnidx = xndx;
-
-+ if (scnidx >= shnum)
-+ goto illformed;
-+
- if (shdr_info[scnidx].idx == 0)
- /* This symbol table has a real symbol in
- a discarded section. So preserve the
-@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char
- }
-
- /* Handle references through sh_info. */
-- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
-+ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
- {
- shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
- changes |= shdr_info[cnt].shdr.sh_info < cnt;
- }
-+ }
-
- /* Mark the section as investigated. */
- shdr_info[cnt].idx = 2;
-@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
- elf_errmsg (-1));
-
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- /* Add this name to the section header string table. */
- shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
-@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
- if (shdr_info[cnt].data == NULL)
-@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-
- /* Finalize the string table and fill in the correct indices in the
- section headers. */
-@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char
- shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (Elf32_Word))
-+ elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
- if (shdr_info[cnt].version_idx != 0)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
- /* This section has associated version
- information. We have to modify that
- information, too. */
- versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (GElf_Versym))
-+ elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
-@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char
- sec = shdr_info[sym->st_shndx].idx;
- else
- {
-- assert (shndxdata != NULL);
-+ elf_assert (shndxdata != NULL);
-
- sec = shdr_info[xshndx].idx;
- }
-@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char
- nxshndx = sec;
- }
-
-- assert (sec < SHN_LORESERVE || shndxdata != NULL);
-+ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
-
- if ((inner != destidx || nshndx != sym->st_shndx
- || (shndxdata != NULL && nxshndx != xshndx))
-@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- size_t sidx = (sym->st_shndx != SHN_XINDEX
- ? sym->st_shndx : xshndx);
-- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-- || (shdr_info[sidx].shdr.sh_type == SHT_GROUP
-- && shdr_info[sidx].shdr.sh_info == inner));
-+ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-+ || ((shdr_info[sidx].shdr.sh_type
-+ == SHT_GROUP)
-+ && (shdr_info[sidx].shdr.sh_info
-+ == inner)));
- }
- }
-
-@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
-@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char
- else
- {
- /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
-- assert (shdr_info[cnt].shdr.sh_entsize
-- == sizeof (Elf64_Xword));
-+ elf_assert (shdr_info[cnt].shdr.sh_entsize
-+ == sizeof (Elf64_Xword));
-
- Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
-
-@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
deleted file mode 100644
index 870ec23703..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
+++ /dev/null
@@ -1,256 +0,0 @@
-From 02cefdaa6429e620d6457fdb3ad9934f194c5a93 Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt@roeckx.be>
-Date: Tue, 22 Apr 2014 21:46:22 +0200
-Subject: [PATCH] Unwinding is only supported on Linux
-
-Index: elfutils-0.158/backends/i386_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/i386_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/i386_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#if !defined __i386__ && !defined __x86_64__
-+#if (!defined __i386__ && !defined __x86_64__) || !defined(__linux__)
- return false;
- #else /* __i386__ || __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/backends/x86_64_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/x86_64_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/x86_64_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
- return false;
- #else /* __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/libdwfl/linux-pid-attach.c
-===================================================================
---- elfutils-0.158.orig/libdwfl/linux-pid-attach.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/libdwfl/linux-pid-attach.c 2014-05-01 17:12:47.980766442 +0000
-@@ -37,6 +37,8 @@
- # define MAX(a, b) ((a) > (b) ? (a) : (b))
- #endif
-
-+#ifdef __linux__
-+
- struct pid_arg
- {
- DIR *dir;
-@@ -358,3 +360,87 @@
- return 0;
- }
- INTDEF (dwfl_linux_proc_attach)
-+
-+#else /* __linux__ */
-+
-+static pid_t
-+pid_next_thread (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return -1;
-+}
-+
-+static bool
-+pid_getthread (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t tid __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
-+ Dwarf_Addr addr __attribute__ ((unused)),
-+ Dwarf_Word *result __attribute__ ((unused)),
-+ void *arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_set_initial_registers (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static void
-+pid_detach (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static void
-+pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static const Dwfl_Thread_Callbacks pid_thread_callbacks =
-+{
-+ pid_next_thread,
-+ pid_getthread,
-+ pid_memory_read,
-+ pid_set_initial_registers,
-+ pid_detach,
-+ pid_thread_detach,
-+};
-+
-+int
-+dwfl_linux_proc_attach (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t pid __attribute__ ((unused)),
-+ bool assume_ptrace_stopped __attribute__ ((unused)))
-+{
-+ return ENOSYS;
-+}
-+INTDEF (dwfl_linux_proc_attach)
-+
-+struct __libdwfl_pid_arg *
-+internal_function
-+__libdwfl_get_pid_arg (Dwfl *dwfl __attribute__ ((unused)))
-+{
-+ return NULL;
-+}
-+
-+#endif /* ! __linux __ */
-+
-Index: elfutils-0.158/tests/backtrace-child.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-child.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-child.c 2014-05-01 17:11:18.866616384 +0000
-@@ -79,6 +79,18 @@
- #include <stdio.h>
- #include <unistd.h>
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
- #define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
- #else
-@@ -221,3 +233,6 @@
- /* Not reached. */
- abort ();
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-data.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-data.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-data.c 2014-05-01 17:11:18.866616384 +0000
-@@ -40,7 +40,7 @@
- #include <string.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
-
- int
- main (int argc __attribute__ ((unused)), char **argv)
-@@ -50,7 +50,7 @@
- return 77;
- }
-
--#else /* __x86_64__ */
-+#else /* __x86_64__ && __linux__ */
-
- /* The only arch specific code is set_initial_registers. */
-
-Index: elfutils-0.158/tests/backtrace-dwarf.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-dwarf.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-dwarf.c 2014-05-01 17:11:18.866616384 +0000
-@@ -25,6 +25,18 @@
- #include <sys/ptrace.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static void cleanup_13_abort (void);
- #define main cleanup_13_main
- #include "cleanup-13.c"
-@@ -148,3 +160,6 @@
- /* There is an exit (0) call if we find the "main" frame, */
- error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-subr.sh
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-subr.sh 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-subr.sh 2014-05-01 17:11:18.866616384 +0000
-@@ -84,6 +84,7 @@
- echo ./backtrace ./backtrace.$arch.{exec,core}
- testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true
- cat backtrace.$arch.{bt,err}
-+ check_unsupported backtrace.$arch.err backtrace.$arch.core
- check_all backtrace.$arch.{bt,err} backtrace.$arch.core
- }
-
-Index: elfutils-0.158/tests/backtrace.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace.c 2014-05-01 17:11:18.866616384 +0000
-@@ -39,6 +39,18 @@
- #include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static int
- dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
- const char *name, Dwarf_Addr start,
-@@ -452,3 +464,6 @@
- dwfl_end (dwfl);
- return 0;
- }
-+
-+#endif /* ! __linux__ */
-+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
index fc3d6dc3f4..c97c4e470d 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
@@ -1,7 +1,25 @@
-Index: elfutils-0.158/backends/arm_init.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_init.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_init.c 2014-04-21 11:13:24.374519343 +0000
+From 0db1687eee0b4d16ccbc40db5a06b574fca6614c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 14 Nov 2014 15:25:42 +0800
+Subject: [PATCH] Rebase arm_backend.diff from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 44 +++++++++++-
+ backends/libebl_arm.h | 9 +++
+ libelf/elf.h | 11 +++
+ tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
+ tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
+ tests/run-readelf-mixed-corenote.sh | 11 ++-
+ 8 files changed, 401 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 3283c97..8b57d3f 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
@@ -35,21 +35,32 @@
#define RELOC_PREFIX R_ARM_
#include "libebl_CPU.h"
@@ -36,7 +54,7 @@ Index: elfutils-0.158/backends/arm_init.c
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
-@@ -61,7 +72,10 @@
+@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen)
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
@@ -46,12 +64,12 @@ Index: elfutils-0.158/backends/arm_init.c
+ else
+ eh->return_value_location = arm_return_value_location_hard;
HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
- return MODVERSION;
-Index: elfutils-0.158/backends/arm_regs.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_regs.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_regs.c 2014-04-21 11:13:24.374519343 +0000
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 21c5ad3..4ee1039 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
@@ -31,6 +31,7 @@
#endif
@@ -60,7 +78,7 @@ Index: elfutils-0.158/backends/arm_regs.c
#include <dwarf.h>
#define BACKEND arm_
-@@ -76,6 +77,9 @@
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
break;
case 16 + 0 ... 16 + 7:
@@ -70,7 +88,7 @@ Index: elfutils-0.158/backends/arm_regs.c
regno += 96 - 16;
/* Fall through. */
case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
namelen = 2;
break;
@@ -210,11 +228,11 @@ Index: elfutils-0.158/backends/arm_regs.c
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
-Index: elfutils-0.158/backends/arm_retval.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_retval.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_retval.c 2014-04-21 11:13:24.374519343 +0000
-@@ -48,6 +48,13 @@
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 7aced74..052132e 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
#define nloc_intreg 1
#define nloc_intregs(n) (2 * (n))
@@ -228,7 +246,7 @@ Index: elfutils-0.158/backends/arm_retval.c
/* The return value is a structure and is actually stored in stack space
passed in a hidden argument by the caller. But, the compiler
helpfully returns the address of that space in r0. */
-@@ -58,8 +65,9 @@
+@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] =
#define nloc_aggregate 1
@@ -240,11 +258,11 @@ Index: elfutils-0.158/backends/arm_retval.c
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
-@@ -112,14 +120,31 @@
- else
- return -1;
- }
-+ if (tag == DW_TAG_base_type)
+@@ -98,14 +106,31 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ else
+ return -1;
+ }
++ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
@@ -259,20 +277,20 @@ Index: elfutils-0.158/backends/arm_retval.c
+ goto aggregate;
+ }
+ }
- if (size <= 16)
- {
- intreg:
- *locp = loc_intreg;
- return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
- }
-+ /* fall through. */
+ if (size <= 16)
+ {
+ intreg:
+ *locp = loc_intreg;
+ return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
+ }
++ /* fall through. */
- aggregate:
-+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
- *locp = loc_aggregate;
- return nloc_aggregate;
-
-@@ -138,3 +163,18 @@
+ aggregate:
++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ }
+@@ -125,3 +150,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
DWARF and might be valid. */
return -2;
}
@@ -291,11 +309,26 @@ Index: elfutils-0.158/backends/arm_retval.c
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
-Index: elfutils-0.158/libelf/elf.h
-===================================================================
---- elfutils-0.158.orig/libelf/elf.h 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/libelf/elf.h 2014-04-21 11:13:24.374519343 +0000
-@@ -2318,6 +2318,9 @@
+diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
+new file mode 100644
+index 0000000..c00770c
+--- /dev/null
++++ b/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/libelf/elf.h b/libelf/elf.h
+index a3cce3e..0891674 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2346,6 +2346,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
@@ -305,7 +338,7 @@ Index: elfutils-0.158/libelf/elf.h
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2335,12 +2338,19 @@
+@@ -2363,12 +2366,19 @@ typedef Elf32_Addr Elf32_Conflict;
/* Processor specific values for the Phdr p_type field. */
#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -325,7 +358,7 @@ Index: elfutils-0.158/libelf/elf.h
/* AArch64 relocs. */
-@@ -2619,6 +2629,7 @@
+@@ -2647,6 +2657,7 @@ typedef Elf32_Addr Elf32_Conflict;
TLS block (LDR, STR). */
#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
to GOT origin (LDR). */
@@ -333,25 +366,122 @@ Index: elfutils-0.158/libelf/elf.h
#define R_ARM_ME_TOO 128 /* Obsolete. */
#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_THM_TLS_DESCSEQ16 129
-Index: elfutils-0.158/backends/libebl_arm.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/libebl_arm.h 2014-04-21 11:13:24.374519343 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.158/tests/run-allregs.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2671,7 +2671,28 @@
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index 5d33246..78464a8 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -2530,6 +2530,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
++ VFP reg64 (s0): undefined
++ VFP reg65 (s1): undefined
++ VFP reg66 (s2): undefined
++ VFP reg67 (s3): undefined
++ VFP reg68 (s4): undefined
++ VFP reg69 (s5): undefined
++ VFP reg70 (s6): undefined
++ VFP reg71 (s7): undefined
++ VFP reg72 (s8): undefined
++ VFP reg73 (s9): undefined
++ VFP reg74 (s10): undefined
++ VFP reg75 (s11): undefined
++ VFP reg76 (s12): undefined
++ VFP reg77 (s13): undefined
++ VFP reg78 (s14): undefined
++ VFP reg79 (s15): undefined
++ VFP reg80 (s16): undefined
++ VFP reg81 (s17): undefined
++ VFP reg82 (s18): undefined
++ VFP reg83 (s19): undefined
++ VFP reg84 (s20): undefined
++ VFP reg85 (s21): undefined
++ VFP reg86 (s22): undefined
++ VFP reg87 (s23): undefined
++ VFP reg88 (s24): undefined
++ VFP reg89 (s25): undefined
++ VFP reg90 (s26): undefined
++ VFP reg91 (s27): undefined
++ VFP reg92 (s28): undefined
++ VFP reg93 (s29): undefined
++ VFP reg94 (s30): undefined
++ VFP reg95 (s31): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+@@ -2538,7 +2570,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+- integer reg128 (spsr): undefined
++ MMX reg104 (wcgr0): undefined
++ MMX reg105 (wcgr1): undefined
++ MMX reg106 (wcgr2): undefined
++ MMX reg107 (wcgr3): undefined
++ MMX reg108 (wcgr4): undefined
++ MMX reg109 (wcgr5): undefined
++ MMX reg110 (wcgr6): undefined
++ MMX reg111 (wcgr7): undefined
++ MMX reg112 (wr0): undefined
++ MMX reg113 (wr1): undefined
++ MMX reg114 (wr2): undefined
++ MMX reg115 (wr3): undefined
++ MMX reg116 (wr4): undefined
++ MMX reg117 (wr5): undefined
++ MMX reg118 (wr6): undefined
++ MMX reg119 (wr7): undefined
++ MMX reg120 (wr8): undefined
++ MMX reg121 (wr9): undefined
++ MMX reg122 (wr10): undefined
++ MMX reg123 (wr11): undefined
++ MMX reg124 (wr12): undefined
++ MMX reg125 (wr13): undefined
++ MMX reg126 (wr14): undefined
++ MMX reg127 (wr15): undefined
++ state reg128 (spsr): undefined
++ state reg129 (spsr_fiq): undefined
++ state reg130 (spsr_irq): undefined
++ state reg131 (spsr_abt): undefined
++ state reg132 (spsr_und): undefined
++ state reg133 (spsr_svc): undefined
++ integer reg144 (r8_usr): undefined
++ integer reg145 (r9_usr): undefined
++ integer reg146 (r10_usr): undefined
++ integer reg147 (r11_usr): undefined
++ integer reg148 (r12_usr): undefined
++ integer reg149 (r13_usr): undefined
++ integer reg150 (r14_usr): undefined
++ integer reg151 (r8_fiq): undefined
++ integer reg152 (r9_fiq): undefined
++ integer reg153 (r10_fiq): undefined
++ integer reg154 (r11_fiq): undefined
++ integer reg155 (r12_fiq): undefined
++ integer reg156 (r13_fiq): undefined
++ integer reg157 (r14_fiq): undefined
++ integer reg158 (r13_irq): undefined
++ integer reg159 (r14_irq): undefined
++ integer reg160 (r13_abt): undefined
++ integer reg161 (r14_abt): undefined
++ integer reg162 (r13_und): undefined
++ integer reg163 (r14_und): undefined
++ integer reg164 (r13_svc): undefined
++ integer reg165 (r14_svc): undefined
++ MMX reg192 (wc0): undefined
++ MMX reg193 (wc1): undefined
++ MMX reg194 (wc2): undefined
++ MMX reg195 (wc3): undefined
++ MMX reg196 (wc4): undefined
++ MMX reg197 (wc5): undefined
++ MMX reg198 (wc6): undefined
++ MMX reg199 (wc7): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
+index 6f3862e..13557d5 100755
+--- a/tests/run-allregs.sh
++++ b/tests/run-allregs.sh
+@@ -2671,7 +2671,28 @@ integer registers:
13: sp (sp), address 32 bits
14: lr (lr), address 32 bits
15: pc (pc), address 32 bits
@@ -381,7 +511,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
FPA registers:
16: f0 (f0), float 96 bits
17: f1 (f1), float 96 bits
-@@ -2689,7 +2710,72 @@
+@@ -2689,7 +2710,72 @@ FPA registers:
101: f5 (f5), float 96 bits
102: f6 (f6), float 96 bits
103: f7 (f7), float 96 bits
@@ -454,7 +584,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
256: d0 (d0), float 64 bits
257: d1 (d1), float 64 bits
258: d2 (d2), float 64 bits
-@@ -2722,6 +2808,13 @@
+@@ -2722,6 +2808,13 @@ VFP registers:
285: d29 (d29), float 64 bits
286: d30 (d30), float 64 bits
287: d31 (d31), float 64 bits
@@ -468,11 +598,11 @@ Index: elfutils-0.158/tests/run-allregs.sh
EOF
# See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -30,12 +30,11 @@
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index 01e4594..9a8a380 100755
+--- a/tests/run-readelf-mixed-corenote.sh
++++ b/tests/run-readelf-mixed-corenote.sh
+@@ -30,12 +30,11 @@ Note segment of 892 bytes at offset 0x274:
pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
orig_r0: -1, fpvalid: 1
@@ -490,114 +620,6 @@ Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
CORE 124 PRPSINFO
state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-Index: elfutils-0.158/tests/run-addrcfi.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2530,6 +2530,38 @@
- FPA reg21 (f5): undefined
- FPA reg22 (f6): undefined
- FPA reg23 (f7): undefined
-+ VFP reg64 (s0): undefined
-+ VFP reg65 (s1): undefined
-+ VFP reg66 (s2): undefined
-+ VFP reg67 (s3): undefined
-+ VFP reg68 (s4): undefined
-+ VFP reg69 (s5): undefined
-+ VFP reg70 (s6): undefined
-+ VFP reg71 (s7): undefined
-+ VFP reg72 (s8): undefined
-+ VFP reg73 (s9): undefined
-+ VFP reg74 (s10): undefined
-+ VFP reg75 (s11): undefined
-+ VFP reg76 (s12): undefined
-+ VFP reg77 (s13): undefined
-+ VFP reg78 (s14): undefined
-+ VFP reg79 (s15): undefined
-+ VFP reg80 (s16): undefined
-+ VFP reg81 (s17): undefined
-+ VFP reg82 (s18): undefined
-+ VFP reg83 (s19): undefined
-+ VFP reg84 (s20): undefined
-+ VFP reg85 (s21): undefined
-+ VFP reg86 (s22): undefined
-+ VFP reg87 (s23): undefined
-+ VFP reg88 (s24): undefined
-+ VFP reg89 (s25): undefined
-+ VFP reg90 (s26): undefined
-+ VFP reg91 (s27): undefined
-+ VFP reg92 (s28): undefined
-+ VFP reg93 (s29): undefined
-+ VFP reg94 (s30): undefined
-+ VFP reg95 (s31): undefined
- FPA reg96 (f0): undefined
- FPA reg97 (f1): undefined
- FPA reg98 (f2): undefined
-@@ -2538,7 +2570,66 @@
- FPA reg101 (f5): undefined
- FPA reg102 (f6): undefined
- FPA reg103 (f7): undefined
-- integer reg128 (spsr): undefined
-+ MMX reg104 (wcgr0): undefined
-+ MMX reg105 (wcgr1): undefined
-+ MMX reg106 (wcgr2): undefined
-+ MMX reg107 (wcgr3): undefined
-+ MMX reg108 (wcgr4): undefined
-+ MMX reg109 (wcgr5): undefined
-+ MMX reg110 (wcgr6): undefined
-+ MMX reg111 (wcgr7): undefined
-+ MMX reg112 (wr0): undefined
-+ MMX reg113 (wr1): undefined
-+ MMX reg114 (wr2): undefined
-+ MMX reg115 (wr3): undefined
-+ MMX reg116 (wr4): undefined
-+ MMX reg117 (wr5): undefined
-+ MMX reg118 (wr6): undefined
-+ MMX reg119 (wr7): undefined
-+ MMX reg120 (wr8): undefined
-+ MMX reg121 (wr9): undefined
-+ MMX reg122 (wr10): undefined
-+ MMX reg123 (wr11): undefined
-+ MMX reg124 (wr12): undefined
-+ MMX reg125 (wr13): undefined
-+ MMX reg126 (wr14): undefined
-+ MMX reg127 (wr15): undefined
-+ state reg128 (spsr): undefined
-+ state reg129 (spsr_fiq): undefined
-+ state reg130 (spsr_irq): undefined
-+ state reg131 (spsr_abt): undefined
-+ state reg132 (spsr_und): undefined
-+ state reg133 (spsr_svc): undefined
-+ integer reg144 (r8_usr): undefined
-+ integer reg145 (r9_usr): undefined
-+ integer reg146 (r10_usr): undefined
-+ integer reg147 (r11_usr): undefined
-+ integer reg148 (r12_usr): undefined
-+ integer reg149 (r13_usr): undefined
-+ integer reg150 (r14_usr): undefined
-+ integer reg151 (r8_fiq): undefined
-+ integer reg152 (r9_fiq): undefined
-+ integer reg153 (r10_fiq): undefined
-+ integer reg154 (r11_fiq): undefined
-+ integer reg155 (r12_fiq): undefined
-+ integer reg156 (r13_fiq): undefined
-+ integer reg157 (r14_fiq): undefined
-+ integer reg158 (r13_irq): undefined
-+ integer reg159 (r14_irq): undefined
-+ integer reg160 (r13_abt): undefined
-+ integer reg161 (r14_abt): undefined
-+ integer reg162 (r13_und): undefined
-+ integer reg163 (r14_und): undefined
-+ integer reg164 (r13_svc): undefined
-+ integer reg165 (r14_svc): undefined
-+ MMX reg192 (wc0): undefined
-+ MMX reg193 (wc1): undefined
-+ MMX reg194 (wc2): undefined
-+ MMX reg195 (wc3): undefined
-+ MMX reg196 (wc4): undefined
-+ MMX reg197 (wc5): undefined
-+ MMX reg198 (wc6): undefined
-+ MMX reg199 (wc7): undefined
- VFP reg256 (d0): undefined
- VFP reg257 (d1): undefined
- VFP reg258 (d2): undefined
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
new file mode 100644
index 0000000000..eeb2063807
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
@@ -0,0 +1,166 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 11:30:35 +0200
+Subject: libebl: Add sym_func_value hook.
+
+The ARM EABI says that the zero bit of function symbol st_value indicates
+whether the symbol points to a THUMB or ARM function. Add a new ebl hook
+to adjust the st_value in such a case so that we get the actual value that
+the symbol points to. It isn't easily possible to reuse the existing
+resolve_sym_value for this purpose, so we end up with another hook that
+can be used from dwfl_module_getsym and elflint.
+
+Rebase arm_func_value.patch from 0.159 to 0.160
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 1 +
+ backends/arm_symbol.c | 8 ++++++++
+ libdwfl/dwfl_module_getsym.c | 2 +-
+ libebl/Makefile.am | 3 ++-
+ libebl/ebl-hooks.h | 3 +++
+ libebl/eblsymfuncval.c | 43 +++++++++++++++++++++++++++++++++++++++++++
+ libebl/libebl.h | 11 +++++++++++
+ 7 files changed, 69 insertions(+), 2 deletions(-)
+ create mode 100644 libebl/eblsymfuncval.c
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 8b57d3f..2266829 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -78,6 +78,7 @@ arm_init (elf, machine, eh, ehlen)
+ eh->return_value_location = arm_return_value_location_hard;
+ HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
++ HOOK (eh, sym_func_value);
+
+ /* We only unwind the core integer registers. */
+ eh->frame_nregs = 16;
+diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
+index cd467ff..49fca55 100644
+--- a/backends/arm_symbol.c
++++ b/backends/arm_symbol.c
+@@ -129,3 +129,11 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty
+ {
+ return sh_type == SHT_ARM_EXIDX;
+ }
++
++/* ARM EABI says that the low bit indicates whether the function
++ symbol value is a THUMB function or not. Mask it off. */
++GElf_Addr
++arm_sym_func_value (Ebl *ebl __attribute__ ((unused)), GElf_Addr val)
++{
++ return val & ~(GElf_Addr)1;
++}
+diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
+index 42d2b67..fb192d7 100644
+--- a/libdwfl/dwfl_module_getsym.c
++++ b/libdwfl/dwfl_module_getsym.c
+@@ -119,7 +119,7 @@ __libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, GElf_Addr *addr,
+ descriptors). */
+
+ char *ident;
+- GElf_Addr st_value = sym->st_value & ebl_func_addr_mask (mod->ebl);
++ GElf_Addr st_value = ebl_sym_func_value (mod->ebl, sym->st_value);
+ *resolved = false;
+ if (! adjust_st_value && mod->e_type != ET_REL && alloc
+ && (GELF_ST_TYPE (sym->st_info) == STT_FUNC
+diff --git a/libebl/Makefile.am b/libebl/Makefile.am
+index ec4477b..889c21b 100644
+--- a/libebl/Makefile.am
++++ b/libebl/Makefile.am
+@@ -55,7 +55,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
+ eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
+ ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
+ eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \
+- eblunwind.c eblresolvesym.c eblcheckreloctargettype.c
++ eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
++ eblsymfuncval.c
+
+ libebl_a_SOURCES = $(gen_SOURCES)
+
+diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
+index e1186f8..160a821 100644
+--- a/libebl/ebl-hooks.h
++++ b/libebl/ebl-hooks.h
+@@ -191,5 +191,8 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ (e.g. function descriptor resolving) */
+ bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr);
+
++/* Returns the real value of a symbol function address or offset. */
++GElf_Addr EBLHOOK(sym_func_value) (Ebl *ebl, GElf_Addr val);
++
+ /* Destructor for ELF backend handle. */
+ void EBLHOOK(destr) (struct ebl *);
+diff --git a/libebl/eblsymfuncval.c b/libebl/eblsymfuncval.c
+new file mode 100644
+index 0000000..c0b322f
+--- /dev/null
++++ b/libebl/eblsymfuncval.c
+@@ -0,0 +1,43 @@
++/* Turn a symbol function value into a real function address or offset.
++ Copyright (C) 2014 Red Hat, Inc.
++ This file is part of elfutils.
++
++ This file is free software; you can redistribute it and/or modify
++ it under the terms of either
++
++ * the GNU Lesser General Public License as published by the Free
++ Software Foundation; either version 3 of the License, or (at
++ your option) any later version
++
++ or
++
++ * the GNU General Public License as published by the Free
++ Software Foundation; either version 2 of the License, or (at
++ your option) any later version
++
++ or both in parallel, as here.
++
++ elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received copies of the GNU General Public License and
++ the GNU Lesser General Public License along with this program. If
++ not, see <http://www.gnu.org/licenses/>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <libeblP.h>
++#include <assert.h>
++
++GElf_Addr
++ebl_sym_func_value (Ebl *ebl, GElf_Addr val)
++{
++ if (ebl == NULL || ebl->sym_func_value == NULL)
++ return val;
++
++ return ebl->sym_func_value (ebl, val);
++}
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index bb993bf..40cf635 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -459,6 +459,17 @@ extern bool ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ extern bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
+ __nonnull_attribute__ (2);
+
++/* Returns the real value of a symbol function address or offset
++ (e.g. when the st_value contains some flag bits that need to be
++ masked off). This is different from ebl_resolve_sym_value which
++ only works for actual symbol addresses (in non-ET_REL files) that
++ might resolve to an address in a different section.
++ ebl_sym_func_value is called to turn the given value into the a
++ real address or offset (the original value might not be a real
++ address). This works for both ET_REL when the value is a section
++ offset or ET_EXEC or ET_DYN symbol values, which are addresses. */
++extern GElf_Addr ebl_sym_func_value (Ebl *ebl, GElf_Addr val);
++
+ #ifdef __cplusplus
+ }
+ #endif
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
new file mode 100644
index 0000000000..8abb36bb49
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
@@ -0,0 +1,83 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 12:30:02 +0200
+Subject: libebl: Add ebl_unwind_ret_mask.
+
+Another ARM oddity. A return value address in an unwind will contain an
+extra bit to indicate whether to return to a regular ARM or THUMB function.
+Add a new ebl function to return a mask to use to get the actual return
+address during an unwind ebl_unwind_ret_mask.
+
+Rebase arm_unwind_ret_mask.patch from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 3 +++
+ libebl/eblinitreg.c | 8 ++++++++
+ libebl/libebl.h | 4 ++++
+ libebl/libeblP.h | 6 ++++++
+ 4 files changed, 21 insertions(+)
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 2266829..f8df042 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -87,5 +87,8 @@ arm_init (elf, machine, eh, ehlen)
+ /* Bit zero encodes whether an function address is THUMB or ARM. */
+ eh->func_addr_mask = ~(GElf_Addr)1;
+
++ /* Bit zero encodes whether to return to a THUMB or ARM function. */
++ eh->unwind_ret_mask = ~(GElf_Addr)1;
++
+ return MODVERSION;
+ }
+diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c
+index 5729b3c..ca681c0 100644
+--- a/libebl/eblinitreg.c
++++ b/libebl/eblinitreg.c
+@@ -56,3 +56,11 @@ ebl_func_addr_mask (Ebl *ebl)
+ return ((ebl == NULL || ebl->func_addr_mask == 0)
+ ? ~(GElf_Addr)0 : ebl->func_addr_mask);
+ }
++
++GElf_Addr
++ebl_unwind_ret_mask (Ebl *ebl)
++{
++ return ((ebl == NULL || ebl->unwind_ret_mask == 0)
++ ? ~(GElf_Addr)0 : ebl->unwind_ret_mask);
++}
++
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index 40cf635..be70027 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -420,6 +420,10 @@ extern size_t ebl_frame_nregs (Ebl *ebl)
+ tables) is needed. */
+ extern GElf_Addr ebl_func_addr_mask (Ebl *ebl);
+
++/* Mask to use for unwind return address in case the architecture adds
++ some extra non-address bits to it. */
++extern GElf_Addr ebl_unwind_ret_mask (Ebl *ebl);
++
+ /* Convert *REGNO as is in DWARF to a lower range suitable for
+ Dwarf_Frame->REGS indexing. */
+ extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
+diff --git a/libebl/libeblP.h b/libebl/libeblP.h
+index dbd67f3..e18ace6 100644
+--- a/libebl/libeblP.h
++++ b/libebl/libeblP.h
+@@ -70,6 +70,12 @@ struct ebl
+ otherwise it should be the actual mask to use. */
+ GElf_Addr func_addr_mask;
+
++ /* Mask to use to get the return address from an unwind in case the
++ architecture adds some extra non-address bits to it. When not
++ initialized (0) then ebl_unwind_ret_mask will return ~0, otherwise
++ it should be the actual mask to use. */
++ GElf_Addr unwind_ret_mask;
++
+ /* Function descriptor load address and table as used by
+ ebl_resolve_sym_value if available for this arch. */
+ GElf_Addr fd_addr;
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
index 8796e9a394..8796e9a394 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
index 6c19d176e0..d51a720073 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
@@ -478,7 +478,7 @@ Index: elfutils-0.158/backends/parisc_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
index 48bffdad0c..f5b566f2d5 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
@@ -409,7 +409,7 @@ Index: elfutils-0.158/backends/m68k_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
index b188927a0b..d73a3f2869 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
@@ -496,7 +496,7 @@ Index: elfutils-0.158/backends/mips_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
index 8e669e7199..8e669e7199 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
new file mode 100644
index 0000000000..35b1b389fb
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
@@ -0,0 +1,35 @@
+Index: elfutils-0.159/libdwfl/linux-pid-attach.c
+===================================================================
+--- elfutils-0.159.orig/libdwfl/linux-pid-attach.c
++++ elfutils-0.159/libdwfl/linux-pid-attach.c
+@@ -393,6 +393,16 @@ pid_getthread (Dwfl *dwfl __attribute__
+ return false;
+ }
+
++bool
++internal_function
++__libdwfl_ptrace_attach (pid_t tid __attribute__ ((unused)),
++ bool *tid_was_stoppedp __attribute__ ((unused)))
++{
++ errno = ENOSYS;
++ __libdwfl_seterrno (DWFL_E_ERRNO);
++ return false;
++}
++
+ static bool
+ pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
+ Dwarf_Addr addr __attribute__ ((unused)),
+@@ -419,6 +429,13 @@ pid_detach (Dwfl *dwfl __attribute__ ((u
+ {
+ }
+
++void
++internal_function
++__libdwfl_ptrace_detach (pid_t tid __attribute__ ((unused)),
++ bool tid_was_stopped __attribute__ ((unused)))
++{
++}
++
+ static void
+ pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
+ void *thread_arg __attribute__ ((unused)))
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
index 5a75375690..08f25a53eb 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
@@ -1,52 +1,47 @@
---- elfutils/backends/ChangeLog
-+++ elfutils/backends/ChangeLog
-@@ -292,6 +292,10 @@
- * ppc_attrs.c (ppc_check_object_attribute): Handle tag
- GNU_Power_ABI_Struct_Return.
-
-+2009-01-23 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
-+
- 2008-10-04 Ulrich Drepper <drepper@redhat.com>
-
- * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
-@@ -619,6 +623,11 @@
- * sparc_init.c: Likewise.
- * x86_64_init.c: Likewise.
-
-+2005-11-22 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
-+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
-+
- 2005-11-19 Roland McGrath <roland@redhat.com>
-
- * ppc64_reloc.def: REL30 -> ADDR30.
-@@ -641,6 +650,9 @@
- * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
- (CLEANFILES): Add libebl_$(m).so.
-
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
- * ppc64_reloc.def: Likewise.
-
---- elfutils/backends/Makefile.am
-+++ elfutils/backends/Makefile.am
-@@ -124,7 +124,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
- $(LINK) -shared -o $(@:.map=.so) \
- -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
- -Wl,--version-script,$(@:.so=.map) \
-- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
-+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
- $(textrel_check)
-
- libebl_i386.so: $(cpu_i386)
---- elfutils/ChangeLog
-+++ elfutils/ChangeLog
-@@ -118,6 +118,8 @@
+Rebase to 1.161
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ ChangeLog | 30 +++++++++++++++++++++++
+ backends/ChangeLog | 12 +++++++++
+ backends/Makefile.am | 2 +-
+ config/ChangeLog | 4 +++
+ config/eu.am | 14 ++++++++---
+ configure.ac | 60 +++++++++++++++++++++++++++++++++++++++++++--
+ lib/ChangeLog | 8 ++++++
+ lib/eu-config.h | 11 +++++++++
+ libasm/ChangeLog | 5 ++++
+ libcpu/ChangeLog | 8 ++++++
+ libcpu/i386_disasm.c | 1 +
+ libdw/ChangeLog | 13 ++++++++++
+ libdw/dwarf_begin_elf.c | 8 ++++++
+ libdw/libdw.h | 2 +-
+ libdwfl/ChangeLog | 20 +++++++++++++++
+ libdwfl/linux-core-attach.c | 29 ++++++++++++++++++++++
+ libdwfl/linux-pid-attach.c | 14 +++++++++++
+ libebl/ChangeLog | 5 ++++
+ libelf/ChangeLog | 10 ++++++++
+ libelf/common.h | 4 +--
+ libelf/gnuhash_xlate.h | 6 +++--
+ src/ChangeLog | 30 +++++++++++++++++++++++
+ src/Makefile.am | 5 ++++
+ src/addr2line.c | 4 +--
+ src/findtextrel.c | 6 ++++-
+ src/ld.h | 2 ++
+ src/readelf.c | 15 ++++++++----
+ src/strings.c | 11 +++++++++
+ src/strip.c | 20 +++++++++++++--
+ tests/ChangeLog | 14 +++++++++++
+ tests/Makefile.am | 1 +
+ tests/backtrace.c | 1 +
+ tests/line2addr.c | 2 +-
+ 33 files changed, 355 insertions(+), 22 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index f81b302..3f9eaf1 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -187,6 +187,8 @@
2012-01-24 Mark Wielaard <mjw@redhat.com>
@@ -55,7 +50,7 @@
* COPYING: Fix address. Updated version from gnulib.
2012-01-23 Mark Wielaard <mjw@redhat.com>
-@@ -136,6 +138,9 @@
+@@ -205,6 +207,9 @@
2011-10-08 Mike Frysinger <vapier@gentoo.org>
@@ -65,7 +60,7 @@
* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
2011-10-02 Ulrich Drepper <drepper@gmail.com>
-@@ -157,6 +162,10 @@
+@@ -226,6 +231,10 @@
* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
@@ -76,7 +71,7 @@
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
-@@ -165,6 +174,10 @@
+@@ -234,6 +243,10 @@
* configure.ac (zip_LIBS): Check for liblzma too.
@@ -87,7 +82,7 @@
2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros.
-@@ -176,6 +189,8 @@
+@@ -245,6 +258,8 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -96,7 +91,7 @@
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
-@@ -256,6 +271,10 @@
+@@ -325,6 +340,10 @@
* configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am.
@@ -107,7 +102,7 @@
2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
-@@ -303,6 +322,17 @@
+@@ -372,6 +391,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile.
@@ -125,9 +120,61 @@
2005-05-19 Roland McGrath <roland@redhat.com>
* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
---- elfutils/config/ChangeLog
-+++ elfutils/config/ChangeLog
-@@ -44,6 +44,10 @@
+diff --git a/backends/ChangeLog b/backends/ChangeLog
+index e800d16..6a86248 100644
+--- a/backends/ChangeLog
++++ b/backends/ChangeLog
+@@ -433,6 +433,10 @@
+ * ppc_attrs.c (ppc_check_object_attribute): Handle tag
+ GNU_Power_ABI_Struct_Return.
+
++2009-01-23 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
++
+ 2008-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
+@@ -760,6 +764,11 @@
+ * sparc_init.c: Likewise.
+ * x86_64_init.c: Likewise.
+
++2005-11-22 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
++ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
++
+ 2005-11-19 Roland McGrath <roland@redhat.com>
+
+ * ppc64_reloc.def: REL30 -> ADDR30.
+@@ -782,6 +791,9 @@
+ * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
+ (CLEANFILES): Add libebl_$(m).so.
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
+ * ppc64_reloc.def: Likewise.
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 4d15a5d..507c9df 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -131,7 +131,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ $(LINK) -shared -o $(@:.map=.so) \
+ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
+ -Wl,--version-script,$(@:.so=.map) \
+- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
+ @$(textrel_check)
+
+ libebl_i386.so: $(cpu_i386)
+diff --git a/config/ChangeLog b/config/ChangeLog
+index 1b4e896..058dd88 100644
+--- a/config/ChangeLog
++++ b/config/ChangeLog
+@@ -71,6 +71,10 @@
* known-dwarf.awk: Use gawk.
@@ -138,17 +185,19 @@
2010-07-02 Ulrich Drepper <drepper@redhat.com>
* elfutils.spec.in: Add more BuildRequires.
---- elfutils/config/eu.am
-+++ elfutils/config/eu.am
+diff --git a/config/eu.am b/config/eu.am
+index faf8add..6ca36a5 100644
+--- a/config/eu.am
++++ b/config/eu.am
@@ -1,6 +1,6 @@
## Common automake fragments for elfutils subdirectory makefiles.
##
--## Copyright (C) 2010 Red Hat, Inc.
-+## Copyright (C) 2010-2011 Red Hat, Inc.
+-## Copyright (C) 2010, 2014 Red Hat, Inc.
++## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
##
## This file is part of elfutils.
##
-@@ -29,14 +29,20 @@
+@@ -29,13 +29,21 @@
## not, see <http://www.gnu.org/licenses/>.
##
@@ -157,43 +206,26 @@
+
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
- AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
-- $(if $($(*F)_no_Werror),,-Werror) \
+-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
++AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
+ $(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
- $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
++ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
$($(*F)_CFLAGS)
+if BUILD_WERROR
+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
+endif
+
- if MUDFLAP
- AM_CFLAGS += -fmudflap
- libmudflap = -lmudflap
---- elfutils/config.h.in
-+++ elfutils/config.h.in
-@@ -6,6 +6,9 @@
- /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */
- #undef ENABLE_DWZ
+ COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
-+/* Have __builtin_popcount. */
-+#undef HAVE_BUILTIN_POPCOUNT
-+
- /* Define to 1 if you have the <inttypes.h> header file. */
- #undef HAVE_INTTYPES_H
-
-@@ -102,4 +105,7 @@
- /* Define for large files, on AIX-style hosts. */
- #undef _LARGE_FILES
-
-+/* Stubbed out if missing compiler support. */
-+#undef __thread
-+
- #include <eu-config.h>
---- elfutils/configure.ac
-+++ elfutils/configure.ac
-@@ -99,6 +99,54 @@ CFLAGS="$old_CFLAGS"])
+ %.os: %.c %.o
+diff --git a/configure.ac b/configure.ac
+index 0e67a79..a1ad6db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
@@ -248,7 +280,7 @@
AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
# Use the same flags that we use for our DSOs, so the test is representative.
# Some old compiler/linker/libc combinations fail some ways and not others.
-@@ -114,7 +162,10 @@ static __thread int a; int foo (int b) {
+@@ -104,7 +152,10 @@ static __thread int a; int foo (int b) { return a + b; }]],
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"])
AS_IF([test "x$ac_cv_tls" != xyes],
@@ -260,9 +292,9 @@
dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
-@@ -213,6 +264,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
+@@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
AM_CONDITIONAL(BUILD_STATIC, [dnl
- test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
+ test "$use_gprof" = yes -o "$use_gcov" = yes])
+AC_ARG_ENABLE([werror],
+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
@@ -272,7 +304,7 @@
AC_ARG_ENABLE([tests-rpath],
AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
[tests_use_rpath=$enableval], [tests_use_rpath=no])
-@@ -324,7 +380,7 @@ case "$eu_version" in
+@@ -302,7 +358,7 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
@@ -281,9 +313,11 @@
AC_CHECK_SIZEOF(long)
---- elfutils/lib/ChangeLog
-+++ elfutils/lib/ChangeLog
-@@ -61,6 +61,9 @@
+diff --git a/lib/ChangeLog b/lib/ChangeLog
+index 4415213..4911cc1 100644
+--- a/lib/ChangeLog
++++ b/lib/ChangeLog
+@@ -65,6 +65,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -293,7 +327,7 @@
* eu-config.h: Add multiple inclusion protection.
2009-01-17 Ulrich Drepper <drepper@redhat.com>
-@@ -117,6 +120,11 @@
+@@ -121,6 +124,11 @@
* Makefile.am (libeu_a_SOURCES): Add it.
* system.h: Declare crc32_file.
@@ -305,9 +339,11 @@
2005-04-30 Ulrich Drepper <drepper@redhat.com>
* Makefile.am: Use -ffunction-sections for xmalloc.c.
---- elfutils/lib/eu-config.h
-+++ elfutils/lib/eu-config.h
-@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 3afff26..d89f3a8 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .previous\n"
/* This macro is used by the tests conditionalize for standalone building. */
#define ELFUTILS_HEADER(name) <lib##name.h>
@@ -325,9 +361,11 @@
#ifdef SHARED
# define OLD_VERSION(name, version) \
---- elfutils/libasm/ChangeLog
-+++ elfutils/libasm/ChangeLog
-@@ -75,6 +75,11 @@
+diff --git a/libasm/ChangeLog b/libasm/ChangeLog
+index 9b25af9..32b9fd0 100644
+--- a/libasm/ChangeLog
++++ b/libasm/ChangeLog
+@@ -87,6 +87,11 @@
* asm_error.c: Add new error ASM_E_IOERROR.
* libasmP.h: Add ASM_E_IOERROR definition.
@@ -339,9 +377,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/ChangeLog
-+++ elfutils/libcpu/ChangeLog
-@@ -47,6 +47,9 @@
+diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
+index a20f440..5ea23b7 100644
+--- a/libcpu/ChangeLog
++++ b/libcpu/ChangeLog
+@@ -51,6 +51,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -351,7 +391,7 @@
* Makefile.am (i386_parse_CFLAGS): Use quotes around command
substitution that can produce leading whitespace.
-@@ -376,6 +379,11 @@
+@@ -380,6 +383,11 @@
* defs/i386.doc: New file.
* defs/x86_64: New file.
@@ -363,9 +403,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/i386_disasm.c
-+++ elfutils/libcpu/i386_disasm.c
-@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 832241f..c7a0df0 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
default:
assert (! "INVALID not handled");
@@ -373,9 +415,11 @@
}
}
else
---- elfutils/libdw/ChangeLog
-+++ elfutils/libdw/ChangeLog
-@@ -346,6 +346,10 @@
+diff --git a/libdw/ChangeLog b/libdw/ChangeLog
+index abc2d71..a9ee0b0 100644
+--- a/libdw/ChangeLog
++++ b/libdw/ChangeLog
+@@ -717,6 +717,10 @@
* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
@@ -386,7 +430,7 @@
2011-07-14 Mark Wielaard <mjw@redhat.com>
* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
-@@ -705,6 +709,10 @@
+@@ -1076,6 +1080,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
@@ -397,7 +441,7 @@
2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename.
-@@ -1473,6 +1481,11 @@
+@@ -1844,6 +1852,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
@@ -409,9 +453,11 @@
* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
formref offset.
---- elfutils/libdw/dwarf_begin_elf.c
-+++ elfutils/libdw/dwarf_begin_elf.c
-@@ -48,6 +48,14 @@
+diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
+index 4c49ce2..7ea1430 100644
+--- a/libdw/dwarf_begin_elf.c
++++ b/libdw/dwarf_begin_elf.c
+@@ -47,6 +47,14 @@
#if USE_ZLIB
# include <endian.h>
# define crc32 loser_crc32
@@ -426,9 +472,11 @@
# include <zlib.h>
# undef crc32
#endif
---- elfutils/libdw/libdw.h
-+++ elfutils/libdw/libdw.h
-@@ -879,7 +879,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
+diff --git a/libdw/libdw.h b/libdw/libdw.h
+index b2b2282..722c589 100644
+--- a/libdw/libdw.h
++++ b/libdw/libdw.h
+@@ -1003,7 +1003,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler);
/* Inline optimizations. */
@@ -437,9 +485,11 @@
/* Return attribute code of given attribute. */
__libdw_extern_inline unsigned int
dwarf_whatattr (Dwarf_Attribute *attr)
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -283,6 +283,21 @@
+diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
+index 69e59a6..15c2987 100644
+--- a/libdwfl/ChangeLog
++++ b/libdwfl/ChangeLog
+@@ -571,6 +571,21 @@
(dwfl_module_addrsym) (i_to_symfile): New function.
(dwfl_module_addrsym) (search_table): Use it.
@@ -461,7 +511,7 @@
2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Mark Wielaard <mjw@redhat.com>
-@@ -2048,6 +2063,11 @@
+@@ -2336,6 +2351,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
@@ -473,8 +523,10 @@
* Makefile.am (noinst_HEADERS): Add loc2c.c.
* test2.c (main): Check sscanf result to quiet warning.
---- elfutils/libdwfl/linux-core-attach.c
-+++ elfutils/libdwfl/linux-core-attach.c
+diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
+index 5a7b3b3..d05ac7e 100644
+--- a/libdwfl/linux-core-attach.c
++++ b/libdwfl/linux-core-attach.c
@@ -29,6 +29,35 @@
#include "libdwflP.h"
#include <fcntl.h>
@@ -509,42 +561,45 @@
+# endif
+#endif
- #ifndef MIN
- # define MIN(a, b) ((a) < (b) ? (a) : (b))
---- elfutils/libdwfl/linux-pid-attach.c
-+++ elfutils/libdwfl/linux-pid-attach.c
-@@ -268,13 +268,24 @@ pid_thread_detach (Dwfl_Thread *thread,
- pid_arg->tid_attached = 0;
- if (! pid_arg->assume_ptrace_stopped)
- {
-+ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
-+ // handling of the detachment to keep the process State: T (stopped).
-+ if (pid_arg->tid_was_stopped)
-+ syscall (__NR_tkill, tid, SIGSTOP);
- /* This handling is needed only on older Linux kernels such as
-- 2.6.32-358.23.2.el6.ppc64. Later kernels such as
-- 3.11.7-200.fc19.x86_64 remember the T (stopped) state
-- themselves and no longer need to pass SIGSTOP during
-- PTRACE_DETACH. */
-+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64
-+ remember the T (stopped) state themselves and no longer need to pass
-+ SIGSTOP during PTRACE_DETACH. */
- ptrace (PTRACE_DETACH, tid, NULL,
- (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0));
-+ if (pid_arg->tid_was_stopped)
-+ {
-+ // Wait till the SIGSTOP settles down.
-+ int i;
-+ for (i = 0; i < 100000; i++)
-+ if (linux_proc_pid_is_stopped (tid))
-+ break;
-+ }
- }
+ #include "../libdw/memory-access.h"
+
+diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
+index efbcf03..ae5af38 100644
+--- a/libdwfl/linux-pid-attach.c
++++ b/libdwfl/linux-pid-attach.c
+@@ -255,6 +255,11 @@ void
+ internal_function
+ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ {
++ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
++ // handling of the detachment to keep the process State: T (stopped).
++ if (tid_was_stopped)
++ syscall (__NR_tkill, tid, SIGSTOP);
++
+ /* This handling is needed only on older Linux kernels such as
+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as
+ 3.11.7-200.fc19.x86_64 remember the T (stopped) state
+@@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ PTRACE_DETACH. */
+ ptrace (PTRACE_DETACH, tid, NULL,
+ (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
++
++ if (tid_was_stopped)
++ {
++ // Wait till the SIGSTOP settles down.
++ int i;
++ for (i = 0; i < 100000; i++)
++ if (linux_proc_pid_is_stopped (tid))
++ break;
++ }
}
---- elfutils/libebl/ChangeLog
-+++ elfutils/libebl/ChangeLog
-@@ -738,6 +738,11 @@
+ static void
+diff --git a/libebl/ChangeLog b/libebl/ChangeLog
+index 5e635f2..998544f 100644
+--- a/libebl/ChangeLog
++++ b/libebl/ChangeLog
+@@ -765,6 +765,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
@@ -556,9 +611,11 @@
2005-05-21 Ulrich Drepper <drepper@redhat.com>
* libebl_x86_64.map: Add x86_64_core_note.
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -85,6 +85,11 @@
+diff --git a/libelf/ChangeLog b/libelf/ChangeLog
+index 3b88d03..cb6cad5 100644
+--- a/libelf/ChangeLog
++++ b/libelf/ChangeLog
+@@ -244,6 +244,11 @@
* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
@@ -570,7 +627,7 @@
2011-02-26 Mark Wielaard <mjw@redhat.com>
* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
-@@ -762,6 +767,11 @@
+@@ -921,6 +926,11 @@
* elf.h: Update from glibc.
@@ -582,8 +639,10 @@
2005-05-08 Roland McGrath <roland@redhat.com>
* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
---- elfutils/libelf/common.h
-+++ elfutils/libelf/common.h
+diff --git a/libelf/common.h b/libelf/common.h
+index 744f1bb..185ea59 100644
+--- a/libelf/common.h
++++ b/libelf/common.h
@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
(Var) = (sizeof (Var) == 1 \
? (unsigned char) (Var) \
@@ -602,8 +661,10 @@
: (sizeof (Var) == 4 \
? bswap_32 (Var) \
: bswap_64 (Var))))
---- elfutils/libelf/gnuhash_xlate.h
-+++ elfutils/libelf/gnuhash_xlate.h
+diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
+index 04d9ca1..3e25936 100644
+--- a/libelf/gnuhash_xlate.h
++++ b/libelf/gnuhash_xlate.h
@@ -1,5 +1,5 @@
/* Conversion functions for versioning information.
- Copyright (C) 2006, 2007 Red Hat, Inc.
@@ -611,7 +672,7 @@
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2006.
-@@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
+@@ -69,7 +69,9 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
dest32 = (Elf32_Word *) &dest64[bitmask_words];
while (len >= 4)
{
@@ -622,24 +683,11 @@
len -= 4;
}
}
---- elfutils/src/addr2line.c
-+++ elfutils/src/addr2line.c
-@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl
- bool parsed = false;
- int i, j;
- char *name = NULL;
-- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- && string[i] == '\0')
- parsed = adjust_to_section (name, &addr, dwfl);
-- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- {
- default:
- break;
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -964,8 +964,16 @@
+diff --git a/src/ChangeLog b/src/ChangeLog
+index 0ae863e..1162f6e 100644
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1371,8 +1371,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use
print_ops.
@@ -656,7 +704,7 @@
* ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com>
-@@ -1129,6 +1137,8 @@
+@@ -1536,6 +1544,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET.
@@ -665,7 +713,7 @@
2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
-@@ -1312,6 +1322,11 @@
+@@ -1719,6 +1729,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO.
@@ -677,7 +725,7 @@
2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast.
-@@ -1563,6 +1578,8 @@
+@@ -1970,6 +1985,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
@@ -686,7 +734,7 @@
2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file.
-@@ -2002,6 +2019,10 @@
+@@ -2409,6 +2426,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
@@ -697,7 +745,7 @@
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -2078,6 +2099,10 @@
+@@ -2485,6 +2506,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
@@ -708,7 +756,7 @@
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -2426,6 +2451,11 @@
+@@ -2833,6 +2858,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
@@ -720,9 +768,44 @@
2005-05-30 Roland McGrath <roland@redhat.com>
* readelf.c (print_debug_line_section): Print section offset of each
---- elfutils/src/findtextrel.c
-+++ elfutils/src/findtextrel.c
-@@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 4f198da..a612cf6 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -89,6 +89,11 @@ endif
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
+
++# Buggy old compilers or libc headers.
++readelf_no_Werror = yes
++strings_no_Werror = yes
++addr2line_no_Wformat = yes
++
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
+ $(demanglelib)
+diff --git a/src/addr2line.c b/src/addr2line.c
+index de80294..e982982 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl *dwfl)
+ bool parsed = false;
+ int i, j;
+ char *name = NULL;
+- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ && string[i] == '\0')
+ parsed = adjust_to_section (name, &addr, dwfl);
+- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ {
+ default:
+ break;
+diff --git a/src/findtextrel.c b/src/findtextrel.c
+index 264a06b..d7de202 100644
+--- a/src/findtextrel.c
++++ b/src/findtextrel.c
+@@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void *p2)
static void
@@ -735,8 +818,10 @@
GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
const char *fname, bool more_than_one, void **knownsrcs)
{
---- elfutils/src/ld.h
-+++ elfutils/src/ld.h
+diff --git a/src/ld.h b/src/ld.h
+index 29f4031..8695c31 100644
+--- a/src/ld.h
++++ b/src/ld.h
@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
/* Checked whether the symbol is undefined and referenced from a DSO. */
@@ -745,28 +830,18 @@
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
-@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
+@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scninfo, size_t symidx)
return sym->defined && sym->in_dso;
}
+#endif /* Optimizing and not GCC 4.2. */
#endif /* ld.h */
---- elfutils/src/Makefile.am
-+++ elfutils/src/Makefile.am
-@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes
- # XXX While the file is not finished, don't warn about this
- ldgeneric_no_Wunused = yes
-
-+# Buggy old compilers.
-+readelf_no_Werror = yes
-+
- readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
- nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
- $(demanglelib)
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -4171,10 +4171,12 @@ listptr_base (struct listptr *p)
+diff --git a/src/readelf.c b/src/readelf.c
+index d49544f..15dbe62 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -4368,10 +4368,12 @@ listptr_base (struct listptr *p)
return base;
}
@@ -781,7 +856,7 @@
struct listptr *p1 = (void *) a;
struct listptr *p2 = (void *) b;
-@@ -4263,8 +4265,11 @@ static void
+@@ -4467,8 +4469,11 @@ static void
sort_listptr (struct listptr_table *table, const char *name)
{
if (table->n > 0)
@@ -795,7 +870,7 @@
}
static bool
-@@ -9151,7 +9156,7 @@ dump_archive_index (Elf *elf, const char
+@@ -9540,7 +9545,7 @@ dump_archive_index (Elf *elf, const char *fname)
if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL))
@@ -804,8 +879,10 @@
while (1)
#endif
error (EXIT_FAILURE, 0,
---- elfutils/src/strings.c
-+++ elfutils/src/strings.c
+diff --git a/src/strings.c b/src/strings.c
+index f60e4b4..dae6ab2 100644
+--- a/src/strings.c
++++ b/src/strings.c
@@ -43,6 +43,10 @@
#include <system.h>
@@ -817,7 +894,7 @@
/* Prototypes of local functions. */
static int read_fd (int fd, const char *fname, off64_t fdlen);
-@@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off
+@@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
fd, start_off);
if (mem != MAP_FAILED)
{
@@ -831,7 +908,7 @@
break;
}
if (errno != EINVAL && errno != ENOMEM)
-@@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o
+@@ -581,9 +590,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
elfmap_off = from & ~(ps - 1);
elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
@@ -843,8 +920,10 @@
}
if (unlikely (elfmap == MAP_FAILED))
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
+diff --git a/src/strip.c b/src/strip.c
+index 2b21799..1b34eee 100644
+--- a/src/strip.c
++++ b/src/strip.c
@@ -45,6 +45,12 @@
#include <libebl.h>
#include <system.h>
@@ -877,7 +956,7 @@
}
/* Open the file. */
-@@ -2060,7 +2076,7 @@ while computing checksum for debug infor
+@@ -2091,7 +2107,7 @@ while computing checksum for debug information"));
/* If requested, preserve the timestamp. */
if (tvp != NULL)
{
@@ -886,7 +965,7 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"),
-@@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char
+@@ -2148,7 +2164,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
if (tvp != NULL)
{
@@ -895,19 +974,11 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"), fname);
---- elfutils/tests/backtrace.c
-+++ elfutils/tests/backtrace.c
-@@ -36,6 +36,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <argp.h>
-+#include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
- static int
---- elfutils/tests/ChangeLog
-+++ elfutils/tests/ChangeLog
-@@ -123,6 +123,13 @@
+diff --git a/tests/ChangeLog b/tests/ChangeLog
+index 59048f6..02eccfc 100644
+--- a/tests/ChangeLog
++++ b/tests/ChangeLog
+@@ -421,6 +421,13 @@
2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
@@ -921,7 +992,7 @@
* Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
backtrace-data and backtrace-dwarf.
(BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
-@@ -987,6 +994,8 @@
+@@ -1285,6 +1292,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
@@ -930,7 +1001,7 @@
* testfile45.S.bz2: Add tests for cltq, cqto.
* testfile45.expect.bz2: Adjust.
-@@ -1695,6 +1704,11 @@
+@@ -1993,6 +2002,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
@@ -942,8 +1013,34 @@
2005-05-24 Ulrich Drepper <drepper@redhat.com>
* get-files.c (main): Use correct format specifier.
---- elfutils/tests/line2addr.c
-+++ elfutils/tests/line2addr.c
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index f32e4d0..2652fb8 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -365,6 +365,7 @@ get_lines_LDADD = $(libdw) $(libelf)
+ get_files_LDADD = $(libdw) $(libelf)
+ get_aranges_LDADD = $(libdw) $(libelf)
+ allfcts_LDADD = $(libdw) $(libelf)
++line2addr_no_Wformat = yes
+ line2addr_LDADD = $(libdw)
+ addrscopes_LDADD = $(libdw)
+ funcscopes_LDADD = $(libdw)
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 331ba0f..46af9b5 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <argp.h>
++#include <sys/syscall.h>
+ #include ELFUTILS_HEADER(dwfl)
+
+ #ifndef __linux__
+diff --git a/tests/line2addr.c b/tests/line2addr.c
+index e0d65d3..7c171b9 100644
+--- a/tests/line2addr.c
++++ b/tests/line2addr.c
@@ -124,7 +124,7 @@ main (int argc, char *argv[])
{
struct args a = { .arg = argv[cnt] };
@@ -953,3 +1050,6 @@
{
default:
case 0:
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
index c08519cf53..c08519cf53 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
index eae5796de3..eae5796de3 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
new file mode 100644
index 0000000000..374cba555e
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
@@ -0,0 +1,29 @@
+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_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index 110624297e..5e75f129a4 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -8,7 +8,7 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
PR = "r11"
-SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
+SRC_URI = "https://fedorahosted.org/releases/e/l/${PN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "a0bed1130135f17ad27533b0034dba8d"
SRC_URI[sha256sum] = "8aebfa4a745db21cf5429c9541fe482729b62efc7e53e9110151b4169fe887da"
@@ -25,13 +25,15 @@ SRC_URI += "\
file://m68k_backend.diff \
file://testsuite-ignore-elflint.diff \
file://elf_additions.diff \
- file://elfutils-fsize.patch \
- file://remove-unused.patch \
- file://mempcpy.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://elfutils-fsize.patch \
+ file://remove-unused.patch \
+ file://mempcpy.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 \
"
# Only apply when building uclibc based target recipe
SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
@@ -51,9 +53,9 @@ 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
+ sed -i '/^i386_dis.h:/,+4 {/.*/d}' ${S}/libcpu/Makefile.am
- cp ${WORKDIR}/*dis.h ${S}/libcpu
+ cp ${WORKDIR}/*dis.h ${S}/libcpu
}
# we can not build complete elfutils when using uclibc
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.158.bb b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
index ef3dd0bb40..a3c1f36f6a 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.158.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
@@ -7,14 +7,20 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
-SRC_URI[md5sum] = "050a4909e452d01ab4747fd69d4036e0"
-SRC_URI[sha256sum] = "be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d"
+SRC_URI[md5sum] = "e1b9847c9a6a1ad340de8d47a863ec52"
+SRC_URI[sha256sum] = "570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070"
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.158-2.debian.tar.xz
+SRC_URI += "\
+ file://mempcpy.patch \
+ file://dso-link-change.patch \
+ file://Fix_elf_cvt_gunhash.patch \
+ file://fixheadercheck.patch \
+"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz
SRC_URI += "\
file://redhat-portability.diff \
- file://redhat-robustify.diff \
file://hppa_backend.diff \
file://arm_backend.diff \
file://mips_backend.diff \
@@ -22,14 +28,9 @@ SRC_URI += "\
file://testsuite-ignore-elflint.diff \
file://scanf-format.patch \
file://mips_readelf_w.patch \
- file://core_filename.patch \
- file://CVE-2014-0172.patch \
- file://unwind_non_linux.patch \
- file://elf_additions.diff \
- file://mempcpy.patch \
- file://dso-link-change.patch \
- file://m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch \
- file://fixheadercheck.patch \
+ file://arm_func_value.patch \
+ file://arm_unwind_ret_mask.patch \
+ file://non_linux.patch \
"
# Only apply when building uclibc based target recipe
diff --git a/meta/recipes-devtools/expect/expect_5.45.bb b/meta/recipes-devtools/expect/expect_5.45.bb
index 970f4a5ccc..264f00718b 100644
--- a/meta/recipes-devtools/expect/expect_5.45.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.bb
@@ -16,7 +16,9 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
DEPENDS += "tcl"
RDEPENDS_${PN} = "tcl"
-inherit autotools-brokensep
+inherit autotools
+
+PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
file://0001-configure.in.patch \
@@ -35,6 +37,7 @@ do_install_append() {
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 += "--includedir=${STAGING_INCDIR} \
diff --git a/meta/recipes-devtools/fdisk/gptfdisk_git.bb b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
new file mode 100644
index 0000000000..477c1d986f
--- /dev/null
+++ b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "util-linux popt ncurses"
+
+PV = "0.8.10+git${SRCPV}"
+SRCREV = "a920398fa393f9d6301b32b191bc01e086ab8bc8"
+SRC_URI = "git://git.code.sf.net/p/gptfdisk/code"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 cgdisk ${D}${sbindir}
+ install -m 0755 gdisk ${D}${sbindir}
+ install -m 0755 sgdisk ${D}${sbindir}
+ install -m 0755 fixparts ${D}${sbindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/file/file/debian-742262.patch b/meta/recipes-devtools/file/file/debian-742262.patch
new file mode 100644
index 0000000000..1ef485e93c
--- /dev/null
+++ b/meta/recipes-devtools/file/file/debian-742262.patch
@@ -0,0 +1,19 @@
+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/dump b/meta/recipes-devtools/file/file/dump
deleted file mode 100644
index 628ead86c6..0000000000
--- a/meta/recipes-devtools/file/file/dump
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#------------------------------------------------------------------------------
-# dump: file(1) magic for dump file format--for new and old dump filesystems
-#
-# We specify both byte orders in order to recognize byte-swapped dumps.
-#
-24 belong 60012 new-fs dump file (big endian),
->4 bedate x Previous dump %s,
->8 bedate x This dump %s,
->12 belong >0 Volume %ld,
->692 belong 0 Level zero, type:
->692 belong >0 Level %d, type:
->0 belong 1 tape header,
->0 belong 2 beginning of file record,
->0 belong 3 map of inodes on tape,
->0 belong 4 continuation of file record,
->0 belong 5 end of volume,
->0 belong 6 map of inodes deleted,
->0 belong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 belong >0 Flags %x
-
-24 belong 60011 old-fs dump file (big endian),
-#>4 bedate x Previous dump %s,
-#>8 bedate x This dump %s,
->12 belong >0 Volume %ld,
->692 belong 0 Level zero, type:
->692 belong >0 Level %d, type:
->0 belong 1 tape header,
->0 belong 2 beginning of file record,
->0 belong 3 map of inodes on tape,
->0 belong 4 continuation of file record,
->0 belong 5 end of volume,
->0 belong 6 map of inodes deleted,
->0 belong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 belong >0 Flags %x
-
-24 lelong 60012 new-fs dump file (little endian),
->4 ledate x This dump %s,
->8 ledate x Previous dump %s,
->12 lelong >0 Volume %ld,
->692 lelong 0 Level zero, type:
->692 lelong >0 Level %d, type:
->0 lelong 1 tape header,
->0 lelong 2 beginning of file record,
->0 lelong 3 map of inodes on tape,
->0 lelong 4 continuation of file record,
->0 lelong 5 end of volume,
->0 lelong 6 map of inodes deleted,
->0 lelong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 lelong >0 Flags %x
-
-24 lelong 60011 old-fs dump file (little endian),
-#>4 ledate x Previous dump %s,
-#>8 ledate x This dump %s,
->12 lelong >0 Volume %ld,
->692 lelong 0 Level zero, type:
->692 lelong >0 Level %d, type:
->0 lelong 1 tape header,
->0 lelong 2 beginning of file record,
->0 lelong 3 map of inodes on tape,
->0 lelong 4 continuation of file record,
->0 lelong 5 end of volume,
->0 lelong 6 map of inodes deleted,
->0 lelong 7 end of medium (for floppy),
->676 string >\0 Label %s,
->696 string >\0 Filesystem %s,
->760 string >\0 Device %s,
->824 string >\0 Host %s,
->888 lelong >0 Flags %x
diff --git a/meta/recipes-devtools/file/file/filesystems b/meta/recipes-devtools/file/file/filesystems
deleted file mode 100644
index fd5073334c..0000000000
--- a/meta/recipes-devtools/file/file/filesystems
+++ /dev/null
@@ -1,812 +0,0 @@
-
-#------------------------------------------------------------------------------
-# filesystems: file(1) magic for different filesystems
-#
-0 string \366\366\366\366 PC formatted floppy with no filesystem
-# Sun disk labels
-# From /usr/include/sun/dklabel.h:
-0774 beshort 0xdabe Sun disk label
->0 string x '%s
->>31 string >\0 \b%s
->>>63 string >\0 \b%s
->>>>95 string >\0 \b%s
->0 string x \b'
->0734 short >0 %d rpm,
->0736 short >0 %d phys cys,
->0740 short >0 %d alts/cyl,
->0746 short >0 %d interleave,
->0750 short >0 %d data cyls,
->0752 short >0 %d alt cyls,
->0754 short >0 %d heads/partition,
->0756 short >0 %d sectors/track,
->0764 long >0 start cyl %ld,
->0770 long x %ld blocks
-# Is there a boot block written 1 sector in?
->512 belong&077777777 0600407 \b, boot block present
-# Smart Boot Manager backup file is 41 byte header + first sectors of disc
-# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
-0 string SBMBAKUP_ Smart Boot Manager backup file
->9 string x \b, version %-5.5s
->>14 string =_
->>>15 string x %-.1s
->>>>16 string =_ \b.
->>>>>17 string x \b%-.1s
->>>>>>18 string =_ \b.
->>>>>>>19 string x \b%-.1s
-# DOS Emulator image is 128 byte header + harddisc image
-0 string DOSEMU\0
->0x27E leshort 0xAA55 DOS Emulator image
-0x1FE leshort 0xAA55 x86 boot sector
->2 string OSBS \b, OS/BS MBR
-# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
->0x8C string Invalid\ partition\ table \b, MS-DOS MBR
-# dr-dos with some upper-, lowercase variants
->0x9D string Invalid\ partition\ table$
->>181 string No\ Operating\ System$
->>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
->0x9D string Invalid\ partition\ table$
->>181 string No\ operating\ system$
->>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
->342 string Invalid\ partition\ table$
->>366 string No\ operating\ system$
->>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
->295 string NEWLDR\0
->>302 string Bad\ PT\ $
->>>310 string No\ OS\ $
->>>>317 string OS\ load\ err$
->>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
->>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
->>>>>>>387 string Copyright\ (c)\ 1984,1998
->>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
->0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
->>0x1B8 ubelong >0 \b, Serial 0x%-.4x
->0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
->271 string Invalid\ partition\ table\0
->>295 string Error\ loading\ operating\ system\0
->>>326 string Missing\ operating\ system\0 \b, mbr
-#
->139 string Invalid\ partition\ table\0
->>163 string Error\ loading\ operating\ system\0
->>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
-# http://www.heise.de/ct/05/09/006/ page 184
-#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
->>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
->300 string Invalid\ partition\ table\0
->>324 string Error\ loading\ operating\ system\0
->>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
-#??>>>389 string Invalid\ system\ disk
->>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
->300 string Ung\201ltige\ Partitionstabelle
-#split string to avoid error: String too long
->>328 string Fehler\ beim\ Laden\
->>>346 string des\ Betriebssystems
->>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
->>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
->0x145 string Default:\ F \b, FREE-DOS MBR
->64 string no\ active\ partition\ found
->>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
->271 string Operating\ system\ loading
->>296 string error\r \b, SYSLINUX MBR (2.10)
-# bootloader, bootmanager
->43 string SMART\ BTMGRFAT12\ \ \
->>430 string SBMK\ Bad!\r
->>>3 string SBM \b, Smart Boot Manager
->>>>6 string >\0 \b, version %s
->382 string XOSLLOADXCF \b, eXtended Operating System Loader
->6 string LILO \b, LInux i386 boot LOader
->>120 string LILO \b, version 22.3.4 SuSe
->>172 string LILO \b, version 22.5.8 Debian
->402 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>394 string stage1 \b, GRand Unified Bootloader (0.5.95)
->343 string Geom\0Read\0\ Error\0
->>321 string Loading\ stage1.5 \b, Grand Unified Bootloader
->380 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>374 string GRUB\ \0 \b, GRand Unified Bootloader
->382 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>376 string GRUB\ \0 \b, GRand Unified Bootloader (0.93)
->383 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>377 string GRUB\ \0 \b, GRand Unified Bootloader (0.94)
->385 string Geom\0Hard\ Disk\0Read\0\ Error\0
->>379 string GRUB\ \0 \b, GRand Unified Bootloader (0.95)
->480 string Boot\ failed\r
->>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06)
->395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
->185 string FDBOOT\ Version\
->>204 string \rNo\ Systemdisk.\
->>>220 string Booting\ from\ harddisk.\n\r
->>>245 string Cannot\ load\ from\ harddisk.\n\r
->>>>273 string Insert\ Systemdisk\
->>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
->>>>>>200 string >\0 \b, version %-3s
->242 string Bootsector\ from\ C.H.\ Hochst\204
->>278 string No\ Systemdisk.\
->>>293 string Booting\ from\ harddisk.\n\r
->>>441 string Cannot\ load\ from\ harddisk.\n\r
->>>>469 string Insert\ Systemdisk\
->>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
->>>>>>209 string >\0 \b, version %-4.4s
->(1.b+2) ubyte 0xe
->>(1.b+3) ubyte 0x1f
->>>(1.b+4) ubyte 0xbe
->>>>(1.b+5) ubyte 0x77
->>>>(1.b+6) ubyte 0x7c
->>>>>(1.b+7) ubyte 0xac
->>>>>>(1.b+8) ubyte 0x22
->>>>>>>(1.b+9) ubyte 0xc0
->>>>>>>>(1.b+10) ubyte 0x74
->>>>>>>>>(1.b+11) ubyte 0xb
->>>>>>>>>>(1.b+12) ubyte 0x56
->>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
-#
->66 string Solaris\ Boot\ Sector
->>99 string Incomplete\ MDBoot\ load.
->>>89 string Version \b, Sun Solaris Bootloader
->>>>97 byte x version %c
-#
->408 string OS/2\ !!\ SYS01475\r\0
->>429 string OS/2\ !!\ SYS02025\r\0
->>>450 string OS/2\ !!\ SYS02027\r\0
->>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
-#
->409 string OS/2\ !!\ SYS01475\r\0
->>430 string OS/2\ !!\ SYS02025\r\0
->>>451 string OS/2\ !!\ SYS02027\r\0
->>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
->112 string This\ disk\ is\ not\ bootable\r
->>142 string If\ you\ wish\ to\ make\ it\ bootable
->>>176 string run\ the\ DOS\ program\ SYS\
->>>200 string after\ the\r
->>>>216 string system\ has\ been\ loaded\r\n
->>>>>242 string Please\ insert\ a\ DOS\ diskette\
->>>>>271 string into\r\n\ the\ drive\ and\
->>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
-# XP
->430 string NTLDR\ is\ missing\xFF\r\n
->>449 string Disk\ error\xFF\r\n
->>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
-# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ nicht\ gefunden\xFF\r\n
->>453 string Datentr\204gerfehler\xFF\r\n
->>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->>>>368 ubyte&0xDF >0
->>>>>368 string x %-.5s
->>>>>>373 ubyte&0xDF >0
->>>>>>>373 string x \b%-.3s
->>>>>376 ubyte&0xDF >0
->>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ fehlt\xFF\r\n
->>444 string Datentr\204gerfehler\xFF\r\n
->>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-# variant
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-#
->430 string NTLDR\ fehlt\xFF\r\n
->>444 string Medienfehler\xFF\r\n
->>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
->>>>371 ubyte >0x20
->>>>>368 ubyte&0xDF >0
->>>>>>368 string x %-.5s
->>>>>>>373 ubyte&0xDF >0
->>>>>>>>373 string x \b%-.3s
->>>>>>376 ubyte&0xDF >0
->>>>>>>376 string x \b.%-.3s
-# variant
->>>>417 ubyte&0xDF >0
->>>>>417 string x %-.5s
->>>>>>422 ubyte&0xDF >0
->>>>>>>422 string x \b%-.3s
->>>>>425 ubyte&0xDF >0
->>>>>>425 string >\ \b.%-.3s
-#
->430 string Datentr\204ger\ entfernen\xFF\r\n
->>454 string Medienfehler\xFF\r\n
->>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
->>>>368 ubyte&0xDF >0
->>>>>368 string x %-.5s
->>>>>>373 ubyte&0xDF >0
->>>>>>>373 string x \b%-.3s
->>>>>376 ubyte&0xDF >0
->>>>>>376 string x \b.%-.3s
-#>3 string NTFS\ \ \ \
->389 string Fehler\ beim\ Lesen\
->>407 string des\ Datentr\204gers
->>>426 string NTLDR\ fehlt
->>>>440 string NTLDR\ ist\ komprimiert
->>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
-#>3 string NTFS\ \ \ \
->313 string A\ disk\ read\ error\ occurred.\r
->>345 string A\ kernel\ file\ is\ missing\
->>>370 string from\ the\ disk.\r
->>>>484 string NTLDR\ is\ compressed
->>>>>429 string Insert\ a\ system\ diskette\
->>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
-# DOS loader variants different languages,offsets
->472 ubyte&0xDF >0
->>389 string Invalid\ system\ disk\xFF\r\n
->>>411 string Disk\ I/O\ error
->>>>428 string Replace\ the\ disk,\ and\
->>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
-#IO.SYS
->>>>>>472 ubyte&0xDF >0
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.5s
->>>>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>>>479 string x \b%-.1s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>390 string Invalid\ system\ disk\xFF\r\n
->>>412 string Disk\ I/O\ error\xFF\r\n
->>>>429 string Replace\ the\ disk,\ and\
->>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
->>388 string Ungueltiges\ System\ \xFF\r\n
->>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>427 string Datentraeger\ wechseln\ und\
->>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
-#WINBOOT.SYS only not spaces (0xDF)
->>>>>>497 ubyte&0xDF >0
->>>>>>>497 string x %-.5s
->>>>>>>>502 ubyte&0xDF >0
->>>>>>>>>502 string x \b%-.1s
->>>>>>>>>>503 ubyte&0xDF >0
->>>>>>>>>>>503 string x \b%-.1s
->>>>>>>>>>>>504 ubyte&0xDF >0
->>>>>>>>>>>>>504 string x \b%-.1s
->>>>>>505 ubyte&0xDF >0
->>>>>>>505 string x \b.%-.3s
-#IO.SYS
->>>>>>472 ubyte&0xDF >0 or
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.5s
->>>>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>>>479 string x \b%-.1s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>390 string Ungueltiges\ System\ \xFF\r\n
->>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>429 string Datentraeger\ wechseln\ und\
->>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
-#WINBOOT.SYS only not spaces (0xDF)
->>>>>>497 ubyte&0xDF >0
->>>>>>>497 string x %-.7s
->>>>>>>>504 ubyte&0xDF >0
->>>>>>>>>504 string x \b%-.1s
->>>>>>505 ubyte&0xDF >0
->>>>>>>505 string x \b.%-.3s
-#IO.SYS
->>>>>>472 ubyte&0xDF >0 or
->>>>>>>472 string x \b %-.2s
->>>>>>>>474 ubyte&0xDF >0
->>>>>>>>>474 string x \b%-.6s
->>>>>>>480 ubyte&0xDF >0
->>>>>>>>480 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>>483 string x \b%-.5s
->>>>>>>>>488 ubyte&0xDF >0
->>>>>>>>>>488 string x \b%-.3s
->>>>>>>>491 ubyte&0xDF >0
->>>>>>>>>491 string x \b.%-.3s
-#
->>389 string Ungueltiges\ System\ \xFF\r\n
->>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
->>>>428 string Datentraeger\ wechseln\ und\
->>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
-# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
->>>>>>472 string x %-.2s
->>>>>>>474 ubyte&0xDF >0
->>>>>>>>474 string x \b%-.5s
->>>>>>>>479 ubyte&0xDF >0
->>>>>>>>>479 string x \b%-.1s
->>>>>>480 ubyte&0xDF >0
->>>>>>>480 string x \b.%-.3s
->>>>>>483 ubyte&0xDF >0 \b+
->>>>>>>483 string x \b%-.5s
->>>>>>>488 ubyte&0xDF >0
->>>>>>>>488 string x \b%-.2s
->>>>>>>>490 ubyte&0xDF >0
->>>>>>>>>490 string x \b%-.1s
->>>>>>>491 ubyte&0xDF >0
->>>>>>>>491 string x \b.%-.3s
->479 ubyte&0xDF >0
->>416 string Kein\ System\ oder\
->>>433 string Laufwerksfehler
->>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
-#IO.SYS
->>>>>479 string x \b %-.2s
->>>>>>481 ubyte&0xDF >0
->>>>>>>481 string x \b%-.6s
->>>>>487 ubyte&0xDF >0
->>>>>>487 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>490 ubyte&0xDF >0 \b+
->>>>>>>490 string x \b%-.5s
->>>>>>>>495 ubyte&0xDF >0
->>>>>>>>>495 string x \b%-.3s
->>>>>>>498 ubyte&0xDF >0
->>>>>>>>498 string x \b.%-.3s
-#
->486 ubyte&0xDF >0
->>416 string Non-System\ disk\ or\
->>>435 string disk\ error\r
->>>>447 string Replace\ and\ press\ any\ key\
->>>>>473 string when\ ready\r \b, Microsoft DOS Bootloader
->480 ubyte&0xDF >0
->>393 string Non-System\ disk\ or\
->>>412 string disk\ error\r
->>>>424 string Replace\ and\ press\ any\ key\
->>>>>450 string when\ ready\r \b, Microsoft DOS bootloader
-#IO.SYS
->>>>>480 string x \b %-.2s
->>>>>>482 ubyte&0xDF >0
->>>>>>>48 string x \b%-.6s
->>>>>488 ubyte&0xDF >0
->>>>>>488 string x \b.%-.3s
-#MSDOS.SYS
->>>>>>491 ubyte&0xDF >0 \b+
->>>>>>>491 string x \b%-.5s
->>>>>>>>496 ubyte&0xDF >0
->>>>>>>>>496 string x \b%-.3s
->>>>>>>499 ubyte&0xDF >0
->>>>>>>>499 string x \b.%-.3s
-#>43 string \224R-LOADER\ \ SYS =label
->54 string SYS
->>324 string VASKK
->>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
-#
->70 string IBMBIO\ \ COM
->>472 string Cannot\ load\ DOS!\
->>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
->>471 string Cannot\ load\ DOS\
->>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
->444 string KERNEL\ \ SYS
->>314 string BOOT\ error! \b, FREE-DOS Bootloader
->499 string KERNEL\ \ SYS
->>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
->449 string KERNEL\ \ SYS
->>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
->125 string Loading\ FreeDOS...\r
->>311 string BOOT\ error!\r \b, FREE-DOS bootloader
->>>441 ubyte&0xDF >0
->>>>441 string x \b %-.6s
->>>>>447 ubyte&0xDF >0
->>>>>>447 string x \b%-.1s
->>>>>>>448 ubyte&0xDF >0
->>>>>>>>448 string x \b%-.1s
->>>>449 ubyte&0xDF >0
->>>>>449 string x \b.%-.3s
->124 string FreeDOS\0
->>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
-# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
->336 string Error!\
->>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
->>>497 ubyte&0xDF >0
->>>>497 string x \b %-.6s
->>>>>503 ubyte&0xDF >0
->>>>>>503 string x \b%-.1s
->>>>>>>504 ubyte&0xDF >0
->>>>>>>>504 string x \b%-.1s
->>>>505 ubyte&0xDF >0
->>>>>505 string x \b.%-.3s
-# loader end
->0 string \0\0\0\0 \b, extended partition table
-# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
-# older drives may use E9 xx xx
->0 lelong&0x009000EB 0x009000EB
->0 lelong&0x000000E9 0x000000E9
->>1 ubyte >37 \b, code offset 0x%x
-# mtools-3.9.8/msdos.h
-# usual values are marked with comments to get only informations of strange FAT systems
-# valid sectorsize are from 32 to 2048
->>>11 uleshort <2049
->>>>11 uleshort >31
->>>>>3 string >\0 \b, OEM-ID "%8.8s"
->>>>>11 uleshort >512 \b, Bytes/sector %u
-#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
->>>>>11 uleshort <512 \b, Bytes/sector %u
->>>>>13 ubyte >1 \b, sectors/cluster %u
-#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
->>>>>14 uleshort >32 \b, reserved sectors %u
-#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
-#>>>>>14 uleshort >1 \b, reserved sectors %u
-#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
->>>>>14 uleshort <1 \b, reserved sectors %u
->>>>>16 ubyte >2 \b, FATs %u
-#>>>>>16 ubyte =2 \b, FATs %u (usual)
->>>>>16 ubyte =1 \b, FAT %u
->>>>>16 ubyte >0
->>>>>17 uleshort >0 \b, root entries %u
-#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
->>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
-#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
->>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
-#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
->>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
->>>>>22 uleshort >0 \b, sectors/FAT %u
-#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
->>>>>26 ubyte >2 \b, heads %u
-#>>>>>26 ubyte =2 \b, heads %u (usual floppy)
->>>>>26 ubyte =1 \b, heads %u
->>>>>28 ulelong >0 \b, hidden sectors %u
-#>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
->>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
-#>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
-# FAT<32 specific
-# NOT le FAT3=NOT 3TAF=0xCCABBEB9
->>>>>82 ulelong&0xCCABBEB9 >0
->>>>>>36 ubyte >0x80 \b, physical drive 0x%x
-#>>>>>>36 ubyte =0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
->>>>>>36 ubyte&0x7F >0 \b, physical drive 0x%x
-#>>>>>>36 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
->>>>>>37 ubyte >0 \b, reserved 0x%x
-#>>>>>>37 ubyte =0 \b, reserved 0x%x
->>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>38 ubyte =0x29
->>>>>>>39 ulelong x \b, serial number 0x%x
->>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
->>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
->>>>>>>43 string =NO\ NAME \b, unlabeled
->>>>>>54 string FAT \b, FAT
->>>>>>>54 string FAT12 \b (12 bit)
->>>>>>>54 string FAT16 \b (16 bit)
-# FAT32 specific
->>>>>82 string FAT32 \b, FAT (32 bit)
->>>>>>36 ulelong x \b, sectors/FAT %u
->>>>>>40 uleshort >0 \b, extension flags %u
-#>>>>>>40 uleshort =0 \b, extension flags %u
->>>>>>42 uleshort >0 \b, fsVersion %u
-#>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
->>>>>>44 ulelong >2 \b, rootdir cluster %u
-#>>>>>>44 ulelong =2 \b, rootdir cluster %u
-#>>>>>>44 ulelong =1 \b, rootdir cluster %u
->>>>>>48 uleshort >1 \b, infoSector %u
-#>>>>>>48 uleshort =1 \b, infoSector %u (usual)
->>>>>>48 uleshort <1 \b, infoSector %u
->>>>>>50 uleshort >6 \b, Backup boot sector %u
-#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
->>>>>>50 uleshort <6 \b, Backup boot sector %u
->>>>>>54 ulelong >0 \b, reserved1 0x%x
->>>>>>58 ulelong >0 \b, reserved2 0x%x
->>>>>>62 ulelong >0 \b, reserved3 0x%x
-# same structure as FAT1X
->>>>>>64 ubyte >0x80 \b, physical drive 0x%x
-#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
->>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
-#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
->>>>>>65 ubyte >0 \b, reserved 0x%x
->>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
->>>>>>66 ubyte =0x29
->>>>>>>67 ulelong x \b, serial number 0x%x
->>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
->>>>>>71 string >NO\ NAME \b, label: "%11.11s"
->>>>>>71 string =NO\ NAME \b, unlabeled
-### FATs end
->0x200 lelong 0x82564557 \b, BSD disklabel
-# FATX
-0 string FATX FATX filesystem data
-
-
-# Minix filesystems - Juan Cespedes <cespedes@debian.org>
-0x410 leshort 0x137f Minix filesystem
-0x410 beshort 0x137f Minix filesystem (big endian),
->0x402 beshort !0 \b, %d zones
->0x1e string minix \b, bootable
-0x410 leshort 0x138f Minix filesystem, 30 char names
-0x410 leshort 0x2468 Minix filesystem, version 2
-0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
-
-# romfs filesystems - Juan Cespedes <cespedes@debian.org>
-0 string -rom1fs-\0 romfs filesystem, version 1
->8 belong x %d bytes,
->16 string x named %s.
-
-# netboot image - Juan Cespedes <cespedes@debian.org>
-0 lelong 0x1b031336L Netboot image,
->4 lelong&0xFFFFFF00 0
->>4 lelong&0x100 0x000 mode 2
->>4 lelong&0x100 0x100 mode 3
->4 lelong&0xFFFFFF00 !0 unknown mode
-
-0x18b string OS/2 OS/2 Boot Manager
-
-9564 lelong 0x00011954 Unix Fast File system (little-endian),
->8404 string x last mounted on %s,
-#>9504 ledate x last checked at %s,
->8224 ledate x last written at %s,
->8401 byte x clean flag %d,
->8228 lelong x number of blocks %d,
->8232 lelong x number of data blocks %d,
->8236 lelong x number of cylinder groups %d,
->8240 lelong x block size %d,
->8244 lelong x fragment size %d,
->8252 lelong x minimum percentage of free blocks %d,
->8256 lelong x rotational delay %dms,
->8260 lelong x disk rotational speed %drps,
->8320 lelong 0 TIME optimization
->8320 lelong 1 SPACE optimization
-
-9564 belong 0x00011954 Unix Fast File system (big-endian),
->7168 long 0x4c41424c Apple UFS Volume
->>7186 string x named %s,
->>7176 belong x volume label version %d,
->>7180 bedate x created on %s,
->8404 string x last mounted on %s,
-#>9504 bedate x last checked at %s,
->8224 bedate x last written at %s,
->8401 byte x clean flag %d,
->8228 belong x number of blocks %d,
->8232 belong x number of data blocks %d,
->8236 belong x number of cylinder groups %d,
->8240 belong x block size %d,
->8244 belong x fragment size %d,
->8252 belong x minimum percentage of free blocks %d,
->8256 belong x rotational delay %dms,
->8260 belong x disk rotational speed %drps,
->8320 belong 0 TIME optimization
->8320 belong 1 SPACE optimization
-
-# ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
-0x438 leshort 0xEF53 Linux
->0x44c lelong x rev %d
->0x43e leshort x \b.%d
->0x45c lelong ^0x0000004 ext2 filesystem data
->>0x43a leshort ^0x0000001 (mounted or unclean)
->0x45c lelong &0x0000004 ext3 filesystem data
->>0x460 lelong &0x0000004 (needs journal recovery)
->0x43a leshort &0x0000002 (errors)
->0x460 lelong &0x0000001 (compressed)
-#>0x460 lelong &0x0000002 (filetype)
-#>0x464 lelong &0x0000001 (sparse_super)
->0x464 lelong &0x0000002 (large files)
-
-# SGI disk labels - Nathan Scott <nathans@debian.org>
-0 belong 0x0BE5A941 SGI disk label (volume header)
-
-# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
-0 belong 0x58465342 SGI XFS filesystem data
->0x4 belong x (blksz %d,
->0x68 beshort x inosz %d,
->0x64 beshort ^0x2004 v1 dirs)
->0x64 beshort &0x2004 v2 dirs)
-
-############################################################################
-# Minix-ST kernel floppy
-0x800 belong 0x46fc2700 Atari-ST Minix kernel image
->19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy
->19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy
-
-############################################################################
-# Hmmm, is this a better way of detecting _standard_ floppy images ?
-19 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-
-19 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-19 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs
->0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
-
-19 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k
-19 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k
-
-# Valid media descriptor bytes for MS-DOS:
-#
-# Byte Capacity Media Size and Type
-# -------------------------------------------------
-#
-# F0 2.88 MB 3.5-inch, 2-sided, 36-sector
-# F0 1.44 MB 3.5-inch, 2-sided, 18-sector
-# F9 720K 3.5-inch, 2-sided, 9-sector
-# F9 1.2 MB 5.25-inch, 2-sided, 15-sector
-# FD 360K 5.25-inch, 2-sided, 9-sector
-# FF 320K 5.25-inch, 2-sided, 8-sector
-# FC 180K 5.25-inch, 1-sided, 9-sector
-# FE 160K 5.25-inch, 1-sided, 8-sector
-# FE 250K 8-inch, 1-sided, single-density
-# FD 500K 8-inch, 2-sided, single-density
-# FE 1.2 MB 8-inch, 2-sided, double-density
-# F8 ----- Fixed disk
-#
-# FC xxxK Apricot 70x1x9 boot disk.
-#
-# Originally a bitmap:
-# xxxxxxx0 Not two sided
-# xxxxxxx1 Double sided
-# xxxxxx0x Not 8 SPT
-# xxxxxx1x 8 SPT
-# xxxxx0xx Not Removable drive
-# xxxxx1xx Removable drive
-# 11111xxx Must be one.
-#
-# But now it's rather random:
-# 111111xx Low density disk
-# 00 SS, Not 8 SPT
-# 01 DS, Not 8 SPT
-# 10 SS, 8 SPT
-# 11 DS, 8 SPT
-#
-# 11111001 Double density 3½ floppy disk, high density 5¼
-# 11110000 High density 3½ floppy disk
-# 11111000 Hard disk any format
-#
-
-# CDROM Filesystems
-32769 string CD001 ISO 9660 CD-ROM filesystem data
-# "application id" which appears to be used as a volume label
->32808 string >\0 '%s'
->34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
-37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
-32776 string CDROM High Sierra CD-ROM filesystem data
-
-# cramfs filesystem - russell@coker.com.au
-0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
->4 lelong x size %d
->8 lelong &1 version #2
->8 lelong &2 sorted_dirs
->8 lelong &4 hole_support
->32 lelong x CRC 0x%x,
->36 lelong x edition %d,
->40 lelong x %d blocks,
->44 lelong x %d files
-
-0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
->4 belong x size %d
->8 belong &1 version #2
->8 belong &2 sorted_dirs
->8 belong &4 hole_support
->32 belong x CRC 0x%x,
->36 belong x edition %d,
->40 belong x %d blocks,
->44 belong x %d files
-
-# reiserfs - russell@coker.com.au
-0x10034 string ReIsErFs ReiserFS V3.5
-0x10034 string ReIsEr2Fs ReiserFS V3.6
->0x1002c leshort x block size %d
->0x10032 leshort &2 (mounted or unclean)
->0x10000 lelong x num blocks %d
->0x10040 lelong 1 tea hash
->0x10040 lelong 2 yura hash
->0x10040 lelong 3 r5 hash
-
-# JFFS - russell@coker.com.au
-0 lelong 0x34383931 Linux Journalled Flash File system, little endian
-0 belong 0x34383931 Linux Journalled Flash File system, big endian
-
-# EST flat binary format (which isn't, but anyway)
-# From: Mark Brown <broonie@sirena.org.uk>
-0 string ESTFBINR EST flat binary
-
-# Aculab VoIP firmware
-# From: Mark Brown <broonie@sirena.org.uk>
-0 string VoIP\ Startup\ and Aculab VoIP firmware
->35 string x format %s
-
-# PPCBoot image file
-# From: Mark Brown <broonie@sirena.org.uk>
-0 belong 0x27051956 PPCBoot image
->4 string PPCBoot
->>12 string x version %s
-
-# JFFS2 file system
-0 leshort 0x1984 Linux old jffs2 filesystem data little endian
-0 lelong 0xe0011985 Linux jffs2 filesystem data little endian
-
-# Squashfs
-0 string sqsh Squashfs filesystem, big endian,
->28 beshort x version %d.
->30 beshort x \b%d,
->8 belong x %d bytes,
->4 belong x %d inodes,
->28 beshort <2
->>32 beshort x blocksize: %d bytes,
->28 beshort >1
->>51 belong x blocksize: %d bytes,
->39 bedate x created: %s
-0 string hsqs Squashfs filesystem, little endian,
->28 leshort x version %d.
->30 leshort x \b%d,
->8 lelong x %d bytes,
->4 lelong x %d inodes,
->28 leshort <2
->>32 leshort x blocksize: %d bytes,
->28 leshort >1
->>51 lelong x blocksize: %d bytes,
->39 ledate x created: %s
-
-# AFS Dump Magic
-# From: Ty Sarna <tsarna@sarna.org>
-0 string \x01\xb3\xa1\x13\x22 AFS Dump
->&0 belong x (v%d)
->>&0 byte 0x76
->>>&0 belong x Vol %d,
->>>>&0 byte 0x6e
->>>>>&0 string x %s
->>>>>>&1 byte 0x74
->>>>>>>&0 beshort 2
->>>>>>>>&4 bedate x on: %s
->>>>>>>>&0 bedate =0 full dump
->>>>>>>>&0 bedate !0 incremental since: %s
diff --git a/meta/recipes-devtools/file/file_5.18.bb b/meta/recipes-devtools/file/file_5.22.bb
index a7db410e92..9c6bb38d71 100644
--- a/meta/recipes-devtools/file/file_5.18.bb
+++ b/meta/recipes-devtools/file/file_5.22.bb
@@ -12,19 +12,14 @@ DEPENDS = "zlib file-native"
DEPENDS_class-native = "zlib-native"
SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
- file://dump \
- file://filesystems"
+ file://debian-742262.patch \
+ "
-SRC_URI[md5sum] = "d420d8f2990cd344673acfbf8d76ff5a"
-SRC_URI[sha256sum] = "6519fb706d583231c2419592ebecdbb21d33c62eaf7a1a0b24ddfcb80c08bf07"
+SRC_URI[md5sum] = "8fb13e5259fe447e02c4a37bc7225add"
+SRC_URI[sha256sum] = "c4e3a8e44cb888c5e4b476e738503e37fb9de3b25a38c143e214bfc12109fc0b"
inherit autotools
-do_configure_prepend() {
- cp ${WORKDIR}/dump ${S}/magic/Magdir/
- cp ${WORKDIR}/filesystems ${S}/magic/Magdir/
-}
-
FILES_${PN} += "${datadir}/misc/*.mgc"
do_install_append_class-native() {
@@ -32,5 +27,9 @@ do_install_append_class-native() {
--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"
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 54e4ec3b25..a4a26e2787 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -5,6 +5,7 @@ HOMEPAGE = "http://sourceforge.net/projects/flex/"
SECTION = "devel"
LICENSE = "BSD"
+DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}"
SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
file://run-ptest \
@@ -28,7 +29,6 @@ do_install_append_class-nativesdk() {
}
RDEPENDS_${PN} += "m4"
-DEPENDS_${PN}-ptest += "bison-native flex-native"
do_compile_ptest() {
for i in `find ${S}/tests/ -type d |grep -Ev "concatenated-options|reject|table-opts" | awk -F/ '{print $NF}'`; \
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 9f2928b78a..06e6982d93 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -15,62 +15,66 @@ 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"
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- 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-c99-complex-ugly-hack.patch \
- file://0011-index_macro.patch \
- file://0012-libmudflap-susv3-legacy.patch \
- file://0013-libstdc-namespace.patch \
- file://0014-sh-pr24836.patch \
- file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
- file://0016-gcc-poison-system-directories.patch \
- file://0017-gcc-poison-dir-extend.patch \
- file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0019-64-bit-multilib-hack.patch \
- file://0020-optional-libstdc.patch \
- file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0022-COLLECT_GCC_OPTIONS.patch \
- file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0024-PR-target-32219.patch \
- file://0025-fortran-cross-compile-hack.patch \
- file://0026-libgcc-sjlj-check.patch \
- file://0027-cpp-honor-sysroot.patch \
- file://0028-MIPS64-Default-to-N64-ABI.patch \
- file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0030-gcc-Fix-argument-list-too-long-error.patch \
- file://0031-Disable-sdt.patch \
- file://0032-libtool.patch \
- file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0035-wcast-qual-PR-55383.patch \
- file://0037-gcc-4.8-PR56797.patch \
- file://0038-gcc-4.8-build-args.patch \
- file://0039-gcc-4.8-PR57717.patch \
- file://0040-fix-g++-sysroot.patch \
- file://0041-libtool-avoid-libdir.patch \
- file://0042-pr57748.patch \
- file://0043-cpp.patch \
- file://0044-gengtypes.patch \
- file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
- file://0046-libatomic-deptracking.patch \
- file://0047-repomembug.patch \
- file://0048-PR58854_fix_arm_apcs_epilogue.patch \
- file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0050-PR-target-58595.patch \
- "
+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 \
+"
+
+SRC_URI = "\
+ ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ 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-c99-complex-ugly-hack.patch \
+ file://0011-index_macro.patch \
+ file://0012-libmudflap-susv3-legacy.patch \
+ file://0013-libstdc-namespace.patch \
+ file://0014-sh-pr24836.patch \
+ file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
+ file://0016-gcc-poison-system-directories.patch \
+ file://0017-gcc-poison-dir-extend.patch \
+ file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0019-64-bit-multilib-hack.patch \
+ file://0020-optional-libstdc.patch \
+ file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0022-COLLECT_GCC_OPTIONS.patch \
+ file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0024-PR-target-32219.patch \
+ file://0025-fortran-cross-compile-hack.patch \
+ file://0026-libgcc-sjlj-check.patch \
+ file://0027-cpp-honor-sysroot.patch \
+ file://0028-MIPS64-Default-to-N64-ABI.patch \
+ file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0030-gcc-Fix-argument-list-too-long-error.patch \
+ file://0031-Disable-sdt.patch \
+ file://0032-libtool.patch \
+ file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0035-wcast-qual-PR-55383.patch \
+ file://0038-gcc-4.8-build-args.patch \
+ file://0039-gcc-4.8-PR57717.patch \
+ file://0040-fix-g++-sysroot.patch \
+ file://0041-libtool-avoid-libdir.patch \
+ file://0042-pr57748.patch \
+ file://0043-cpp.patch \
+ file://0044-gengtypes.patch \
+ file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
+ file://0046-libatomic-deptracking.patch \
+ file://0047-repomembug.patch \
+ file://0048-PR58854_fix_arm_apcs_epilogue.patch \
+ file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0050-PR-target-58595.patch \
+ file://0052-PR-rtl-optimization-61801.patch \
+ file://target-gcc-includedir.patch \
+"
SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
@@ -83,40 +87,47 @@ JAVA = ""
LTO = "--enable-lto"
-EXTRA_OECONF_BASE = " ${LTO} \
- --enable-libssp \
- --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 "
-
-EXTRA_OECONF_INITIAL = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libssp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no"
-
-EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --disable-libssp"
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --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 \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+"
+
+EXTRA_OECONF_INTERMEDIATE = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --disable-libssp \
+"
EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch b/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch
deleted file mode 100644
index b5d7b864fd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0037-gcc-4.8-PR56797.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From patchwork Fri Apr 19 09:34:49 2013
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [ARM] Fix PR56797
-Date: Thu, 18 Apr 2013 23:34:49 -0000
-From: Greta Yorsh <Greta.Yorsh@arm.com>
-X-Patchwork-Id: 237891
-Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com>
-To: "GCC Patches" <gcc-patches@gcc.gnu.org>
-Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>,
- "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com>
-
-Fix PR56797
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797
-
-The problem is that peephole optimizer thinks it can generate an ldm, but
-the pattern for ldm no longer matches, because after r188738 it requires
-that if one of the destination registers is SP then the base register must
-be SP, and it's not SP in the test case.
-
-The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because
-peephole doesn't trigger there (because there is a different epilogue
-sequence). It looks like a latent problem for other architecture or CPUs.
-
-This patch adds this condition to the peephole optimizer.
-
-No regression on qemu for arm-none-eabi and fixes the test reported in the
-PR. I couldn't minimize the test sufficiently to include it in the
-testsuite.
-
-Ok for trunk?
-
-Thanks,
-Greta
-
-gcc/
-
-2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com>
-
- PR target/56797
- * config/arm/arm.c (load_multiple_sequence): Require SP
- as base register for loads if SP is in the register list.
-
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index d00849c..60fef78 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order,
- || (i != nops - 1 && unsorted_regs[i] == base_reg))
- return 0;
-
-+ /* Don't allow SP to be loaded unless it is also the base
-+ register. It guarantees that SP is reset correctly when
-+ an LDM instruction is interruptted. Otherwise, we might
-+ end up with a corrupt stack. */
-+ if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM)
-+ return 0;
-+
- unsorted_offsets[i] = INTVAL (offset);
- if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]])
- order[0] = i;
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch b/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
deleted file mode 100644
index e4fff127b3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-These is a race over the installation of files into the include/ directory between:
-
-| (cd `${PWDCMD-pwd}`/include ; \| tar -cf - .; exit 0) | (cd /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include; tar xpf - )
-
-and
-
-| /bin/install -c -m 644 unwind.h /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include
-| /bin/install: cannot create regular file '/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include/unwind.h': File exists
-| make[1]: *** [install-unwind_h] Error 1
-
-which under the right circumstances leads to the above build failure. Since we don't
-need two copies of this file and we don't use install-no-fixincludes, we can disable
-the libgcc installation.
-
-RP 2014/04/10
-
-Upstream-Status: Pending [would need a rewrite into an acceptable patch form]
-
-Index: gcc-4.8.2/libgcc/Makefile.in
-===================================================================
---- gcc-4.8.2.orig/libgcc/Makefile.in 2013-02-04 19:06:20.000000000 +0000
-+++ gcc-4.8.2/libgcc/Makefile.in 2014-04-10 09:58:33.018748787 +0000
-@@ -1020,8 +1020,8 @@
- # This is however useful for "install-no-fixincludes" case, when only the gcc
- # internal headers are copied by gcc's install.
- install-unwind_h:
-- $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-- $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-+# $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-+# $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-
- all: install-unwind_h-forbuild
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch b/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch
new file mode 100644
index 0000000000..300b2042b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0052-PR-rtl-optimization-61801.patch
@@ -0,0 +1,36 @@
+From 8dfe30973ab03f0480f1e249f320e78f210dc230 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 17 Jul 2014 07:49:44 +0000
+Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
+ debug-insn.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@212740 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801]
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+
+---
+ gcc/sched-deps.c | 3 ++-
+
+diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
+index 07857f2..4ac2542 100644
+--- a/gcc/sched-deps.c
++++ b/gcc/sched-deps.c
+@@ -2744,7 +2744,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
+ Consider for instance a volatile asm that changes the fpu rounding
+ mode. An insn should not be moved across this even if it only uses
+ pseudo-regs because it might give an incorrectly rounded result. */
+- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ && !DEBUG_INSN_P (insn))
+ reg_pending_barrier = TRUE_BARRIER;
+
+ /* For all ASM_OPERANDS, we must traverse the vector of input operands.
+--
+1.8.5.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
new file mode 100644
index 0000000000..f48c66dcac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
@@ -0,0 +1,81 @@
+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.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
++++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
+@@ -587,6 +587,7 @@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+ # Directory in which all plugin resources are installed
+@@ -2534,6 +2535,7 @@
+
+ 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 2015-01-13 17:40:26.131012725 +0000
++++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
+@@ -59,6 +59,10 @@
+ /* 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 f94ae17..d98b40b 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1390,4 +1390,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 9f0b781..174fca8 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1189,13 +1189,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
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc
index cbf1355fcb..0f407b7d5d 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.9.inc
@@ -2,11 +2,11 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
-PV = "4.9.0"
+PV = "4.9.1"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "4.9.0"
+BINV = "4.9.1"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-4.9:"
@@ -15,61 +15,69 @@ 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"
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- 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-c99-complex-ugly-hack.patch \
- file://0011-index_macro.patch \
- file://0013-libstdc-namespace.patch \
- file://0014-sh-pr24836.patch \
- file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
- file://0016-gcc-poison-system-directories.patch \
- file://0017-gcc-poison-dir-extend.patch \
- file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0019-64-bit-multilib-hack.patch \
- file://0020-optional-libstdc.patch \
- file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0022-COLLECT_GCC_OPTIONS.patch \
- file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0024-PR-target-32219.patch \
- file://0025-fortran-cross-compile-hack.patch \
- file://0026-libgcc-sjlj-check.patch \
- file://0027-cpp-honor-sysroot.patch \
- file://0028-MIPS64-Default-to-N64-ABI.patch \
- file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0030-gcc-Fix-argument-list-too-long-error.patch \
- file://0031-Disable-sdt.patch \
- file://0032-libtool.patch \
- file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0037-gcc-4.8-PR56797.patch \
- file://0040-fix-g++-sysroot.patch \
- file://0041-libtool-avoid-libdir.patch \
- file://0043-cpp.patch \
- file://0044-gengtypes.patch \
- file://0046-libatomic-deptracking.patch \
- file://0047-repomembug.patch \
- file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
- file://0051-eabispe.patch \
- file://0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch \
- file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
- "
-SRC_URI[md5sum] = "9709b49ae0e904cbb0a6a1b62853b556"
-SRC_URI[sha256sum] = "b9b047a97bade9c1c89970bc8e211ff57b7b8998a1730a80a653d329f8ed1257"
+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 \
+"
+
+SRC_URI = "\
+ ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ 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-c99-complex-ugly-hack.patch \
+ file://0011-index_macro.patch \
+ file://0013-libstdc-namespace.patch \
+ file://0014-sh-pr24836.patch \
+ file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
+ file://0016-gcc-poison-system-directories.patch \
+ file://0017-gcc-poison-dir-extend.patch \
+ file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0019-64-bit-multilib-hack.patch \
+ file://0020-optional-libstdc.patch \
+ file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0022-COLLECT_GCC_OPTIONS.patch \
+ file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0024-PR-target-32219.patch \
+ file://0025-fortran-cross-compile-hack.patch \
+ file://0026-libgcc-sjlj-check.patch \
+ file://0027-cpp-honor-sysroot.patch \
+ file://0028-MIPS64-Default-to-N64-ABI.patch \
+ file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0030-gcc-Fix-argument-list-too-long-error.patch \
+ file://0031-Disable-sdt.patch \
+ file://0032-libtool.patch \
+ file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0040-fix-g++-sysroot.patch \
+ file://0041-libtool-avoid-libdir.patch \
+ file://0043-cpp.patch \
+ file://0044-gengtypes.patch \
+ file://0046-libatomic-deptracking.patch \
+ file://0047-repomembug.patch \
+ file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
+ file://0051-eabispe.patch \
+ file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
+ file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \
+ file://0055-PR-rtl-optimization-61801.patch \
+ file://0056-top-level-reorder_gcc-bug-61144.patch \
+ file://0057-aarch64-config.patch \
+ file://0058-gcc-r212171.patch \
+ file://0059-gcc-PR-rtl-optimization-63348.patch \
+ file://target-gcc-includedir.patch \
+"
+SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1"
+SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
@@ -80,40 +88,47 @@ JAVA = ""
LTO = "--enable-lto"
-EXTRA_OECONF_BASE = " ${LTO} \
- --enable-libssp \
- --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 "
-
-EXTRA_OECONF_INITIAL = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libssp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no"
-
-EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
- --disable-libgomp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --disable-libssp"
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --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 \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+"
+
+EXTRA_OECONF_INTERMEDIATE = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --disable-libssp \
+"
EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index 9e4435cf59..fddfe9e5e8 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,4 +1,4 @@
-From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001
+From f7d49ca445e60faa1b5256c6b4f96c1ee5c0e353 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 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
@@ -11,6 +11,14 @@ 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 ++--
@@ -19,10 +27,10 @@ Upstream-Status: Pending
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 90a2bba..2320497 100644
+index d1ab22f..15fe4b6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+@@ -483,7 +483,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
@@ -32,10 +40,10 @@ index 90a2bba..2320497 100644
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
-index bdab45a..d587993 100755
+index 5399b2b..60a04bd 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -11539,8 +11539,8 @@ for f in $tm_file; do
+@@ -11631,8 +11631,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -47,10 +55,10 @@ index bdab45a..d587993 100755
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 5f5c909..5e5e84f 100644
+index f87c3b6..460e0d9 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1720,8 +1720,8 @@ for f in $tm_file; do
+@@ -1740,8 +1740,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -62,7 +70,7 @@ index 5f5c909..5e5e84f 100644
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 29fdfc7..e048dce 100644
+index c7146ed..b153f45 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
@@ -70,11 +78,11 @@ index 29fdfc7..e048dce 100644
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"; 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
-@@ -103,7 +103,7 @@ esac
+@@ -106,7 +106,7 @@ esac
# If we postponed including defaults.h, add the #include now.
if test x"$postpone_defaults_h" = x"yes"; then
@@ -84,5 +92,5 @@ index 29fdfc7..e048dce 100644
# Add multiple inclusion protection guard, part two.
--
-1.7.10.4
+1.9.1
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch b/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch
deleted file mode 100644
index b5d7b864fd..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0037-gcc-4.8-PR56797.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-From patchwork Fri Apr 19 09:34:49 2013
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [ARM] Fix PR56797
-Date: Thu, 18 Apr 2013 23:34:49 -0000
-From: Greta Yorsh <Greta.Yorsh@arm.com>
-X-Patchwork-Id: 237891
-Message-Id: <000801ce3ce1$23fbdd60$6bf39820$@yorsh@arm.com>
-To: "GCC Patches" <gcc-patches@gcc.gnu.org>
-Cc: <raj.khem@gmail.com>, "Richard Earnshaw" <Richard.Earnshaw@arm.com>,
- "Ramana Radhakrishnan" <Ramana.Radhakrishnan@arm.com>
-
-Fix PR56797
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56797
-
-The problem is that peephole optimizer thinks it can generate an ldm, but
-the pattern for ldm no longer matches, because after r188738 it requires
-that if one of the destination registers is SP then the base register must
-be SP, and it's not SP in the test case.
-
-The test case fails on armv5t but doesn't fail on armv6t2 or armv7-a because
-peephole doesn't trigger there (because there is a different epilogue
-sequence). It looks like a latent problem for other architecture or CPUs.
-
-This patch adds this condition to the peephole optimizer.
-
-No regression on qemu for arm-none-eabi and fixes the test reported in the
-PR. I couldn't minimize the test sufficiently to include it in the
-testsuite.
-
-Ok for trunk?
-
-Thanks,
-Greta
-
-gcc/
-
-2013-04-18 Greta Yorsh <Greta.Yorsh@arm.com>
-
- PR target/56797
- * config/arm/arm.c (load_multiple_sequence): Require SP
- as base register for loads if SP is in the register list.
-
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index d00849c..60fef78 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -10347,6 +10347,13 @@ load_multiple_sequence (rtx *operands, int nops, int *regs, int *saved_order,
- || (i != nops - 1 && unsorted_regs[i] == base_reg))
- return 0;
-
-+ /* Don't allow SP to be loaded unless it is also the base
-+ register. It guarantees that SP is reset correctly when
-+ an LDM instruction is interruptted. Otherwise, we might
-+ end up with a corrupt stack. */
-+ if (unsorted_regs[i] == SP_REGNUM && base_reg != SP_REGNUM)
-+ return 0;
-+
- unsorted_offsets[i] = INTVAL (offset);
- if (i == 0 || unsorted_offsets[i] < unsorted_offsets[order[0]])
- order[0] = i;
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch b/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch
deleted file mode 100644
index b4be18e212..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0052-Fix-GCC-targeting-E500-SPE-errors-with-the-_Decimal64-type.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From e44a6d438db4848c2a555be773568a3cf7994206 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
-Date: Mon, 26 May 2014 12:11:13 +0300
-Subject: [PATCH] Fix E500 with SPE errors with the _Decimal64 type
-
-[gcc]
-2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-
- PR target/60735
- * config/rs6000/rs6000.md (mov<mode>_softfloat32, FMOVE64 case):
- If mode is DDmode and TARGET_E500_DOUBLE allow move.
-
- * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print some
- more debug information for E500 if -mdebug=reg.
-
-[gcc/testsuite]
-2014-04-21 Michael Meissner <meissner-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
-
- PR target/60735
- * gcc.target/powerpc/pr60735.c: New test. Insure _Decimal64 does
- not cause errors if -mspe.
-
-Upstream status: Accepted
-
-This solves upstream bug 60735
-(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735).
-
-Patch taken from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=209664
----
- gcc/config/rs6000/rs6000.c | 18 ++++++++++++++++++
- gcc/config/rs6000/rs6000.md | 3 ++-
- gcc/testsuite/gcc.target/powerpc/pr60735.c | 11 +++++++++++
- 3 files changed, 31 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/powerpc/pr60735.c
-
-diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
-index 494efc5..6dcf440 100644
---- a/gcc/config/rs6000/rs6000.c
-+++ b/gcc/config/rs6000/rs6000.c
-@@ -2283,6 +2283,24 @@ rs6000_debug_reg_global (void)
- if (rs6000_float_gprs)
- fprintf (stderr, DEBUG_FMT_S, "float_gprs", "true");
-
-+ fprintf (stderr, DEBUG_FMT_S, "fprs",
-+ (TARGET_FPRS ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "single_float",
-+ (TARGET_SINGLE_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "double_float",
-+ (TARGET_DOUBLE_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "soft_float",
-+ (TARGET_SOFT_FLOAT ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "e500_single",
-+ (TARGET_E500_SINGLE ? "true" : "false"));
-+
-+ fprintf (stderr, DEBUG_FMT_S, "e500_double",
-+ (TARGET_E500_DOUBLE ? "true" : "false"));
-+
- if (TARGET_LINK_STACK)
- fprintf (stderr, DEBUG_FMT_S, "link_stack", "true");
-
-diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
-index 64c9e7c..9cefe15 100644
---- a/gcc/config/rs6000/rs6000.md
-+++ b/gcc/config/rs6000/rs6000.md
-@@ -9395,7 +9395,8 @@
- (match_operand:FMOVE64 1 "input_operand" "r,Y,r,G,H,F"))]
- "! TARGET_POWERPC64
- && ((TARGET_FPRS && TARGET_SINGLE_FLOAT)
-- || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE)
-+ || TARGET_SOFT_FLOAT || TARGET_E500_SINGLE
-+ || (<MODE>mode == DDmode && TARGET_E500_DOUBLE))
- && (gpc_reg_operand (operands[0], <MODE>mode)
- || gpc_reg_operand (operands[1], <MODE>mode))"
- "#"
-diff --git a/gcc/testsuite/gcc.target/powerpc/pr60735.c b/gcc/testsuite/gcc.target/powerpc/pr60735.c
-new file mode 100644
-index 0000000..9bac30b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/powerpc/pr60735.c
-@@ -0,0 +1,11 @@
-+/* { dg-do compile } */
-+/* { dg-options "-mcpu=8548 -mspe -mabi=spe -O2" } */
-+/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
-+
-+/* In PR60735, the type _Decimal64 generated an insn not found message. */
-+
-+void
-+pr60735 (_Decimal64 *p, _Decimal64 *q)
-+{
-+ *p = *q;
-+}
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
new file mode 100644
index 0000000000..4c98ca273a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
@@ -0,0 +1,61 @@
+gcc/Makefile.in: fix parallel building failure
+
+The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
+config.h which was a generated file. But no explicity rule
+to clarify the dependency. There was potential building
+failure while parallel make.
+
+For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
+source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
+'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
+objects.
+
+For errors.o, it is part of gengtype, and the gengtype generator program
+is special: Two versions are built. One is for the build machine, and one
+is for the host. We refered what gengtype-parse.o did (which also is part
+of gengtype).
+
+[GCC #61899]
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
+
+Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 6475cba..56e50bb 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
+ opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
+ hash-table.o file-find.o
+
++# Objects compiled from one C source file gcc-ar.c
++OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
++
+ # This lists all host objects for the front ends.
+ ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
+
+ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
+ $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
+ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
+- lto-wrapper.o
++ lto-wrapper.o $(OBJS-gcc-ar)
+
+ # This lists all host object files, whether they are included in this
+ # compilation or not.
+@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
+ CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
+ build/gengtype-parse.o: $(BCONFIG_H)
+
++errors.o : $(CONFIG_H)
++
+ gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
+ gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
+ $(XREGEX_H)
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch b/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
new file mode 100644
index 0000000000..b27abdef38
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
@@ -0,0 +1,36 @@
+From 556537c4ad0df4cbebb74197bb2bdea75cf5dd35 Mon Sep 17 00:00:00 2001
+From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 17 Jul 2014 07:48:49 +0000
+Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
+ debug-insn.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212739 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801]
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+
+---
+ gcc/sched-deps.c | 3 ++-
+
+diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
+index efc4223..df29bd3 100644
+--- a/gcc/sched-deps.c
++++ b/gcc/sched-deps.c
+@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
+ Consider for instance a volatile asm that changes the fpu rounding
+ mode. An insn should not be moved across this even if it only uses
+ pseudo-regs because it might give an incorrectly rounded result. */
+- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
++ && !DEBUG_INSN_P (insn))
+ reg_pending_barrier = TRUE_BARRIER;
+
+ /* For all ASM_OPERANDS, we must traverse the vector of input operands.
+--
+1.8.5.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
new file mode 100644
index 0000000000..f44893251c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
@@ -0,0 +1,31 @@
+
+Upstream-Status: Backport
+
+Originally-submitted-by: Peter Urbanec <openembedded-devel@urbanec.net>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+--- /dev/null
++++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
+@@ -0,0 +1,21 @@
++--- a/gcc/varpool.c 2014/10/05 02:50:01 215895
+++++ b/gcc/varpool.c 2014/10/05 04:52:19 215896
++@@ -329,8 +329,16 @@
++
++ /* Variables declared 'const' without an initializer
++ have zero as the initializer if they may not be
++- overridden at link or run time. */
++- if (!DECL_INITIAL (real_decl)
+++ overridden at link or run time.
+++
+++ It is actually requirement for C++ compiler to optimize const variables
+++ consistently. As a GNU extension, do not enfore this rule for user defined
+++ weak variables, so we support interposition on:
+++ static const int dummy = 0;
+++ extern const int foo __attribute__((__weak__, __alias__("dummy")));
+++ */
+++ if ((!DECL_INITIAL (real_decl)
+++ || (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
++ && (DECL_EXTERNAL (decl) || decl_replaceable_p (decl)))
++ return error_mark_node;
++
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
new file mode 100644
index 0000000000..f29559698a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
@@ -0,0 +1,32 @@
+Disable the MULTILIB_OSDIRNAMES and other multilib options.
+
+Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
+systems where the libdir is NOT set to /lib64. This is allowed by the ABI, as
+long as the dynamic loader is present in /lib.
+
+We simply want to use the default rules in gcc to find and configure the
+normal libdir.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+===================================================================
+--- gcc-4.9.1.orig/gcc/config/aarch64/t-aarch64-linux
++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+@@ -21,11 +21,11 @@
+ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ # Disable the multilib for linux-gnu targets for the time being; focus
+ # on the baremetal targets.
+-MULTILIB_OPTIONS =
+-MULTILIB_DIRNAMES =
++#MULTILIB_OPTIONS =
++#MULTILIB_DIRNAMES =
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
new file mode 100644
index 0000000000..4b312d4fa9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
@@ -0,0 +1,113 @@
+From ca03cf1b133d66eb978c68f6dbc345e9aabcba88 Mon Sep 17 00:00:00 2001
+From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 30 Jun 2014 19:30:52 +0000
+Subject: [PATCH] r212171
+
+* except.c (emit_note_eh_region_end): New helper
+ function. (convert_to_eh_region_ranges): Use
+ emit_note_eh_region_end to emit EH_REGION_END note.
+ * jump.c (cleanup_barriers): Do not split a call and its
+ corresponding CALL_ARG_LOCATION note.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212171 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212171]
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+---
+ gcc/except.c | 23 ++++++++++++++++++-----
+ gcc/jump.c | 19 +++++++++++++++----
+ 2 files changed, 33 insertions(+), 9 deletions(-)
+
+diff --git a/gcc/except.c b/gcc/except.c
+index dc5c1d2..7ac114f 100644
+--- a/gcc/except.c
++++ b/gcc/except.c
+@@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section)
+ return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1;
+ }
+
++static rtx
++emit_note_eh_region_end (rtx insn)
++{
++ rtx next = NEXT_INSN (insn);
++
++ /* Make sure we do not split a call and its corresponding
++ CALL_ARG_LOCATION note. */
++ if (next && NOTE_P (next)
++ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
++ insn = next;
++
++ return emit_note_after (NOTE_INSN_EH_REGION_END, insn);
++}
++
+ /* Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes.
+ The new note numbers will not refer to region numbers, but
+ instead to call site entries. */
+@@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void)
+ note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
+ first_no_action_insn_before_switch);
+ NOTE_EH_HANDLER (note) = call_site;
+- note = emit_note_after (NOTE_INSN_EH_REGION_END,
+- last_no_action_insn_before_switch);
++ note
++ = emit_note_eh_region_end (last_no_action_insn_before_switch);
+ NOTE_EH_HANDLER (note) = call_site;
+ gcc_assert (last_action != -3
+ || (last_action_insn
+@@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void)
+ first_no_action_insn = NULL_RTX;
+ }
+
+- note = emit_note_after (NOTE_INSN_EH_REGION_END,
+- last_action_insn);
++ note = emit_note_eh_region_end (last_action_insn);
+ NOTE_EH_HANDLER (note) = call_site;
+ }
+
+@@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void)
+
+ if (last_action >= -1 && ! first_no_action_insn)
+ {
+- note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn);
++ note = emit_note_eh_region_end (last_action_insn);
+ NOTE_EH_HANDLER (note) = call_site;
+ }
+
+diff --git a/gcc/jump.c b/gcc/jump.c
+index 9418f65..a5e5f52 100644
+--- a/gcc/jump.c
++++ b/gcc/jump.c
+@@ -121,15 +121,26 @@ rebuild_jump_labels_chain (rtx chain)
+ static unsigned int
+ cleanup_barriers (void)
+ {
+- rtx insn, next, prev;
+- for (insn = get_insns (); insn; insn = next)
++ rtx insn;
++ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ {
+- next = NEXT_INSN (insn);
+ if (BARRIER_P (insn))
+ {
+- prev = prev_nonnote_insn (insn);
++ rtx prev = prev_nonnote_insn (insn);
+ if (!prev)
+ continue;
++
++ if (CALL_P (prev))
++ {
++ /* Make sure we do not split a call and its corresponding
++ CALL_ARG_LOCATION note. */
++ rtx next = NEXT_INSN (prev);
++
++ if (NOTE_P (next)
++ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
++ prev = next;
++ }
++
+ if (BARRIER_P (prev))
+ delete_insn (insn);
+ else if (prev != PREV_INSN (insn))
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
new file mode 100644
index 0000000000..6d24aa4572
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
@@ -0,0 +1,59 @@
+From 6eae3e637fcc22d21b51d44d61e3a9cb4825e776 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 30 Oct 2014 20:37:14 -0700
+Subject: [PATCH]PR rtl-optimization/63348
+
+PR rtl-optimization/63348
+* emit-rtl.c (try_split): Do not emit extra barrier.
+
+Note: this patch is to fix the side effect introduced by r212171 which was reported at:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63348
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215613 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215613]
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ gcc/emit-rtl.c | 11 -----------
+ 1 files changed, 0 insertions(+), 11 deletions(-)
+
+diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
+index 4736f8d..ae69dbd 100644
+--- a/gcc/emit-rtl.c
++++ b/gcc/emit-rtl.c
+@@ -3422,7 +3422,6 @@ try_split (rtx pat, rtx trial, int last)
+ {
+ rtx before = PREV_INSN (trial);
+ rtx after = NEXT_INSN (trial);
+- int has_barrier = 0;
+ rtx note, seq, tem;
+ int probability;
+ rtx insn_last, insn;
+@@ -3441,14 +3440,6 @@ try_split (rtx pat, rtx trial, int last)
+
+ split_branch_probability = -1;
+
+- /* If we are splitting a JUMP_INSN, it might be followed by a BARRIER.
+- We may need to handle this specially. */
+- if (after && BARRIER_P (after))
+- {
+- has_barrier = 1;
+- after = NEXT_INSN (after);
+- }
+-
+ if (!seq)
+ return trial;
+
+@@ -3594,8 +3585,6 @@ try_split (rtx pat, rtx trial, int last)
+ tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
+
+ delete_insn (trial);
+- if (has_barrier)
+- emit_barrier_after (tem);
+
+ /* Recursively call try_split for each new insn created; by the
+ time control returns here that insn will be fully split, so
+--
+1.7.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch
new file mode 100644
index 0000000000..f48c66dcac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch
@@ -0,0 +1,81 @@
+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.
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Pending
+
+--- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
++++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
+@@ -587,6 +587,7 @@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+ # Directory in which all plugin resources are installed
+@@ -2534,6 +2535,7 @@
+
+ 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 2015-01-13 17:40:26.131012725 +0000
++++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
+@@ -59,6 +59,10 @@
+ /* 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 f94ae17..d98b40b 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1390,4 +1390,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 9f0b781..174fca8 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1189,13 +1189,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
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 66a18d9749..04c701a974 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -9,7 +9,7 @@ inherit autotools gettext texinfo
BPN = "gcc"
-def get_gcc_fpu_setting(bb, d):
+def get_gcc_float_setting(bb, d):
if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm":
return "--with-float=hard"
if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
@@ -18,13 +18,18 @@ def get_gcc_fpu_setting(bb, d):
return "--enable-e500_double"
return ""
-get_gcc_fpu_setting[vardepvalue] = "${@get_gcc_fpu_setting(bb, d)}"
+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):
return "--with-mips-plt"
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"
+ return ""
+
def get_gcc_multiarch_setting(bb, d):
target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
multiarch_options = {
@@ -74,7 +79,6 @@ ${GNU_MIRROR}/gcc http://mirrors.rcn.net/pub/sourceware/gcc/releases/ \n \
${GNU_MIRROR}/gcc http://gcc.get-software.com/releases/ \n \
${GNU_MIRROR}/gcc http://gcc.get-software.com/releases/ \n \
"
-
#
# Set some default values
#
@@ -84,48 +88,12 @@ BINV = "${PV}"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-# SS means Shared Stamps directory
-SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}-${PR}"
-do_fetch[stamp-base] = "${SS}"
-do_unpack[stamp-base] = "${SS}"
-do_patch[stamp-base] = "${SS}"
-do_preconfigure[stamp-base] = "${SS}"
-SSCLEAN = "${TMPDIR}/stamps/work-shared/gcc-[0-9]*-*"
-do_fetch[stamp-base-clean] = "${SSCLEAN}"
-do_unpack[stamp-base-clean] = "${SSCLEAN}"
-do_unpack[umask] = "022"
-do_patch[stamp-base-clean] = "${SSCLEAN}"
-do_preconfigure[stamp-base-clean] = "${SSCLEAN}"
-
-# SW means Shared Work directory
-SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
-SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
-WORKDIR_task-unpack = "${SW}"
-WORKDIR_task-patch = "${SW}"
-WORKDIR_task-preconfigure = "${SW}"
-
target_includedir ?= "${includedir}"
target_libdir ?= "${libdir}"
target_base_libdir ?= "${base_libdir}"
target_prefix ?= "${prefix}"
-CLEANFUNCS += "workshared_clean"
-# The do_clean should be exclusive since share ${S}
-do_clean[lockfiles] = "${SW}.clean.lock"
-
-python workshared_clean () {
- """clear the source directory"""
- dir = d.expand("${SW}")
- bb.note("Removing " + dir)
- oe.path.remove(dir)
-
- """clear the the stamps in work-shared"""
- dir = "%s.*" % bb.data.expand(d.getVarFlag('do_fetch', 'stamp-base', True), d)
- bb.note("Removing " + dir)
- oe.path.remove(dir)
-}
-
-# We need to ensure that for the shared work directory, the do_patch singatures match
+# We need to ensure that for the shared work directory, the do_patch signatures match
# The real WORKDIR location isn't a dependency for the shared workdir.
src_patches[vardepsexclude] = "WORKDIR"
should_apply[vardepsexclude] += "PN"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 75fb379956..c30242d41a 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -1,4 +1,5 @@
require gcc-multilib-config.inc
+require gcc-shared-source.inc
#
# Build the list of lanaguages to build.
#
@@ -29,24 +30,27 @@ EXTRA_OECONF_INTERMEDIATE ?= ""
GCCMULTILIB ?= "--disable-multilib"
GCCTHREADS ?= "posix"
-EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
- --with-gnu-ld \
- --enable-shared \
- --enable-languages=${LANGUAGES} \
- --enable-threads=${GCCTHREADS} \
- ${GCCMULTILIB} \
- --enable-c99 \
- --enable-long-long \
- --enable-symvers=gnu \
- --enable-libstdcxx-pch \
- --program-prefix=${TARGET_PREFIX} \
- --without-local-prefix \
- ${OPTSPACE} \
- ${EXTRA_OECONF_BASE} \
- ${EXTRA_OECONF_FPU} \
- ${EXTRA_OECONF_PATHS} \
- ${@get_gcc_mips_plt_setting(bb, d)} \
- ${@get_gcc_multiarch_setting(bb, d)}"
+EXTRA_OECONF = "\
+ ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-languages=${LANGUAGES} \
+ --enable-threads=${GCCTHREADS} \
+ ${GCCMULTILIB} \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --enable-libstdcxx-pch \
+ --program-prefix=${TARGET_PREFIX} \
+ --without-local-prefix \
+ ${OPTSPACE} \
+ ${EXTRA_OECONF_BASE} \
+ ${EXTRA_OECONF_GCC_FLOAT} \
+ ${EXTRA_OECONF_PATHS} \
+ ${@get_gcc_mips_plt_setting(bb, d)} \
+ ${@get_long_double_setting(bb, d)} \
+ ${@get_gcc_multiarch_setting(bb, d)} \
+"
export ac_cv_path_SED = 'sed'
export gcc_cv_collect2_libs = 'none required'
@@ -55,19 +59,24 @@ export gcc_cv_collect2_libs = 'none required'
# 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_FPU ??= ""
+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_GCC_FLOAT ??= ""
CPPFLAGS = ""
-# powerpc needs this to comply with the ABI
-EXTRA_OECONF_append_powerpc = " --with-long-double-128"
-EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
-
SYSTEMHEADERS = "${target_includedir}"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
@@ -87,16 +96,6 @@ _EOF
mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
}
-python do_preconfigure () {
- import subprocess
- cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
- subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
- # See 0044-gengtypes.patch, we need to regenerate this file
- bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
-}
-addtask do_preconfigure after do_patch before do_configure
-do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
-
do_configure () {
# Setup these vars for cross building only
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 63adae8386..0f79533771 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -9,15 +9,17 @@ GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \
- --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
- --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+ --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
# We have to point gcc at a sysroot but we don't need to rebuild if this changes
# e.g. we switch between different machines with different tunes.
EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH"
TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
-get_gcc_fpu_setting[vardepvalue] = ""
+get_gcc_float_setting[vardepvalue] = ""
#
# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
@@ -53,7 +55,6 @@ do_configure () {
export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
@@ -82,14 +83,14 @@ FILES_${PN} = "\
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
${prefix}/${TARGET_SYS}/usr/include/* \
- "
+"
INSANE_SKIP_${PN} += "dev-so"
FILES_${PN}-doc = "\
${infodir} \
${mandir} \
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
- "
+"
EXEEXT = ""
@@ -156,11 +157,12 @@ SYSTEMHEADERS = "/usr/include"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
-EXTRA_OECONF += " --enable-poison-system-directories"
+EXTRA_OECONF += "--enable-poison-system-directories"
-EXTRA_OECONF += "--disable-libunwind-exceptions \
- --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
- --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
+EXTRA_OECONF += "\
+ --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
+ --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix} \
+"
# 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-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 5a6da8bbd2..7197447080 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -11,22 +11,24 @@ 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 \
- ${OPTSPACE} \
- --program-prefix=${TARGET_PREFIX} \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --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_FPU}"
+EXTRA_OECONF = "\
+ --with-newlib \
+ --without-headers \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ ${OPTSPACE} \
+ --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} \
+"
-EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} "
+EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}"
GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
@@ -57,7 +59,9 @@ do_install () {
# 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
+ 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
@@ -66,7 +70,7 @@ do_install () {
# 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-fixed/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
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 0bf29e34d3..97929501e8 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -13,24 +13,25 @@ PN = "gcc-cross-${TARGET_ARCH}"
require gcc-configure-common.inc
-EXTRA_OECONF += " --enable-poison-system-directories"
-EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
-
-EXTRA_OECONF += "--disable-libunwind-exceptions \
- --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
- --with-system-zlib "
-
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF += "--enable-poison-system-directories"
+EXTRA_OECONF_append_sh4 = " \
+ --with-multilib-list= \
+ --enable-incomplete-targets \
+"
+
+EXTRA_OECONF += "\
+ --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
+ --with-system-zlib \
+"
+
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
-do_configure_prepend () {
- sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure
-}
-
do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index 81d664a1b3..61340979ba 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -14,6 +14,8 @@
# gcc/config/mips/linux64.h
# gcc/config/rs6000/linux64.h
+MULTILIB_OPTION_WHITELIST ??= "-m32 -m64 -mx32 -mabi=n32 -mabi=32 -mabi=64"
+
python gcc_multilib_setup() {
import re
import shutil
@@ -88,8 +90,10 @@ python gcc_multilib_setup() {
substs = [
(r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdir32) + r'\3'),
- (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$',
+ (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\"\S+\")$',
r'\1' + wrap_libdir(libdir64) + r'\3'),
+ (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$',
+ r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'),
(r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdirx32) + r'\3'),
(r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
@@ -100,7 +104,7 @@ python gcc_multilib_setup() {
r'\1' + wrap_libdir(libdir64) + r'\3'),
(r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdirn32) + r'\3'),
- (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\s*)(\S+)(\s*\".*\")$',
+ (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
r'\1' + wrap_libdir(libdir32) + r'\3'),
]
@@ -148,7 +152,7 @@ python gcc_multilib_setup() {
if mlprefix:
mlindex = 0
for ml in multilibs:
- if mlprefix.startswith(ml):
+ if mlprefix == ml + '-':
break
mlindex += 1
@@ -185,30 +189,19 @@ python gcc_multilib_setup() {
bb.error('Unknown libdir (%s) of the tune : %s' % (tune_baselib, tune))
# take out '-' mcpu='s and march='s from parameters
- options.append(re.sub(r'mcpu=[^ ]+ *', '',
- re.sub(r'march=[^ ]+ *', '',
- re.sub(r' +\-+', ' ',
- re.sub(r'^ *\-+', '', tune_parameters['ccargs'])))))
+ opts = []
+ whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST", True) or "").split()
+ for i in tune_parameters['ccargs'].split():
+ if i in whitelist:
+ opts.append(i)
+ options.append(" ".join(opts))
+
if tune_baselib == 'lib':
dirnames.append('32') # /lib => 32bit lib
else:
dirnames.append(tune_baselib.replace('lib', ''))
osdirnames.append('../' + tune_baselib)
- if len(options) > 1:
- for optstr in options:
- optsets.append(optstr.split())
-
- #get common options present in all the tune parameters
- common_opt_set = set.intersection(*map(set, optsets))
-
- #common options will be added at the end of the options string only once
- if (len(common_opt_set) > 0):
- rex = re.compile(''.join(['\\b(', '|'.join(common_opt_set), ')\\W']), re.I)
- options = [rex.sub("", optstr) for optstr in options]
- options = [optstr.strip() for optstr in options]
- options[len(options)-1] = ' '.join((options[len(options)-1], ' '.join(common_opt_set)))
-
write_config(builddir, target_config_files, options, dirnames, osdirnames)
write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32)
}
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 70f9e0eb52..09757e6ccc 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -2,12 +2,12 @@ require gcc-configure-common.inc
CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${includedir}/c++/ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=${includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
-EXTRA_OECONF += "--disable-libunwind-exceptions"
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
@@ -53,6 +53,9 @@ do_install () {
if [ -d ${D}${infodir} ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
fi
+ if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ fi
chown -R root:root ${D}
}
@@ -63,111 +66,129 @@ PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"
PACKAGES = "\
- ${PN}-dbg \
- libstdc++ \
- libstdc++-precompile-dev \
- libstdc++-dev \
- libstdc++-staticdev \
- libg2c \
- libg2c-dev \
- libssp \
- libssp-dev \
- libssp-staticdev \
- libgfortran \
- libgfortran-dev \
- libgfortran-staticdev \
- libmudflap \
- libmudflap-dev \
- libmudflap-staticdev \
- libquadmath \
- libquadmath-dev \
- libquadmath-staticdev \
- libgomp \
- libgomp-dev \
- libgomp-staticdev \
- libatomic \
- libatomic-dev \
- libatomic-staticdev \
+ ${PN}-dbg \
+ libstdc++ \
+ libstdc++-precompile-dev \
+ libstdc++-dev \
+ libstdc++-staticdev \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libssp-staticdev \
+ libmudflap \
+ libmudflap-dev \
+ libmudflap-staticdev \
+ libquadmath \
+ libquadmath-dev \
+ libquadmath-staticdev \
+ libgomp \
+ libgomp-dev \
+ libgomp-staticdev \
+ libatomic \
+ libatomic-dev \
+ libatomic-staticdev \
"
+
+# Most libraries are licensed with the exception, but
+# one library is really GPLv3.
+#
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception & GPLv3"
+LICENSE_libstdc++ = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-precompile-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-staticdev = "GPL-3.0-with-GCC-exception"
+
+LICENSE_libgomp = "GPLv3"
+LICENSE_libgomp-dev = "GPLv3"
+LICENSE_libgomp-staticdev = "GPLv3"
+
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
# include python debugging scripts
FILES_${PN}-dbg += "\
- ${libdir}/libstdc++.so.*-gdb.py \
- ${datadir}/gcc-${BINV}/python/libstdcxx"
+ ${libdir}/libstdc++.so.*-gdb.py \
+ ${datadir}/gcc-${BINV}/python/libstdcxx \
+"
FILES_libg2c = "${target_libdir}/libg2c.so.*"
FILES_libg2c-dev = "\
- ${libdir}/libg2c.so \
- ${libdir}/libg2c.a \
- ${libdir}/libfrtbegin.a"
+ ${libdir}/libg2c.so \
+ ${libdir}/libg2c.a \
+ ${libdir}/libfrtbegin.a \
+"
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
FILES_libstdc++-dev = "\
- ${includedir}/c++/ \
- ${libdir}/libstdc++.so \
- ${libdir}/libstdc++.la \
- ${libdir}/libsupc++.la"
+ ${includedir}/c++/ \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libsupc++.la \
+"
FILES_libstdc++-staticdev = "\
- ${libdir}/libstdc++.a \
- ${libdir}/libsupc++.a"
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.a \
+"
FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
FILES_libssp = "${libdir}/libssp.so.*"
-FILES_libssp-dev = " \
- ${libdir}/libssp*.so \
- ${libdir}/libssp*_nonshared.a \
- ${libdir}/libssp*.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
-FILES_libssp-staticdev = " \
- ${libdir}/libssp*.a"
-
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = " \
- ${libdir}/libgfortran*.so \
- ${libdir}/libgfortran.spec \
- ${libdir}/libgfortran.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single*"
-FILES_libgfortran-staticdev = " \
- ${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
+FILES_libssp-dev = "\
+ ${libdir}/libssp*.so \
+ ${libdir}/libssp*_nonshared.a \
+ ${libdir}/libssp*.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
+"
+FILES_libssp-staticdev = "${libdir}/libssp*.a"
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
FILES_libquadmath-dev = "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
- ${libdir}/libquadmath*.so \
- ${libdir}/libquadmath.la"
-FILES_libquadmath-staticdev = "\
- ${libdir}/libquadmath.a"
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
+ ${libdir}/libquadmath*.so \
+ ${libdir}/libquadmath.la \
+"
+FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
FILES_libmudflap-dev = "\
- ${libdir}/libmudflap*.so \
- ${libdir}/libmudflap.la"
-FILES_libmudflap-staticdev = "\
- ${libdir}/libmudflap.a"
+ ${libdir}/libmudflap*.so \
+ ${libdir}/libmudflap.la \
+"
+FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
FILES_libgomp-dev = "\
- ${libdir}/libgomp*${SOLIBSDEV} \
- ${libdir}/libgomp*.la \
- ${libdir}/libgomp.spec \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
- "
-FILES_libgomp-staticdev = "\
- ${libdir}/libgomp*.a \
- "
+ ${libdir}/libgomp*${SOLIBSDEV} \
+ ${libdir}/libgomp*.la \
+ ${libdir}/libgomp.spec \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
+"
+FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
FILES_libatomic = "${libdir}/libatomic.so.*"
-FILES_libatomic-dev = " \
- ${libdir}/libatomic.so \
- ${libdir}/libatomic.la"
-FILES_libatomic-staticdev = " \
- ${libdir}/libatomic.a"
+FILES_libatomic-dev = "\
+ ${libdir}/libatomic.so \
+ ${libdir}/libatomic.la \
+"
+FILES_libatomic-staticdev = "${libdir}/libatomic.a"
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/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
new file mode 100644
index 0000000000..35c9247cc1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -0,0 +1,117 @@
+require gcc-configure-common.inc
+
+LICENSE = "NCSA | MIT"
+
+LIC_FILES_CHKSUM = "\
+ file://libsanitizer/LICENSE.TXT;md5=0249c37748936faf5b1efd5789587909 \
+"
+
+EXTRA_OECONF_PATHS = "\
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
+
+do_configure () {
+ mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
+
+ echo "Configuring libsanitizer"
+ rm -rf ${B}/$target/libsanitizer/
+ mkdir -p ${B}/$target/libsanitizer/
+ # This is kind of gross, but it's an easy way to make configure happy
+ # without hacking it up to use the system stdc++ instead of the one it
+ # expects to be newly built.
+ rm -rf ${B}/$target/libstdc++-v3/
+ mkdir -p ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.la ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.so ${B}/$target/libstdc++-v3/src/
+ cd ${B}/$target/libsanitizer/
+ chmod a+x ${S}/libsanitizer/configure
+ ${S}/libsanitizer/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool
+}
+
+do_compile () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/
+}
+
+do_install () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install
+ if [ -d ${D}${infodir} ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ fi
+ chown -R root:root ${D}
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+ALLOW_EMPTY_${PN} = "1"
+DEPENDS = "gcc-runtime"
+
+BBCLASSEXTEND = "nativesdk"
+
+PACKAGES = "${PN}"
+PACKAGES += "libasan libubsan liblsan libtsan"
+PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
+PACKAGES += "libasan-dbg libubsan-dbg liblsan-dbg libtsan-dbg"
+PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
+
+RDEPENDS_libasan += "libstdc++"
+RDEPENDS_libubsan += "libstdc++"
+RDEPENDS_liblsan += "libstdc++"
+RDEPENDS_libtsan += "libstdc++"
+RDEPENDS_libasan-dev += "${PN}"
+RDEPENDS_libubsan-dev += "${PN}"
+RDEPENDS_liblsan-dev += "${PN}"
+RDEPENDS_libtsan-dev += "${PN}"
+RRECOMMENDS_${PN} += "libasan libubsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_x86 = " liblsan"
+
+do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+
+# MIPS, aarch64, and SPARC are broken.
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+
+FILES_libasan += "${libdir}/libasan.so.*"
+FILES_libasan-dbg += "${libdir}/.debug/libasan.so.*"
+FILES_libasan-dev += "\
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/libasan.la \
+"
+FILES_libasan-staticdev += "${libdir}/libasan.a"
+
+FILES_libubsan += "${libdir}/libubsan.so.*"
+FILES_libubsan-dbg += "${libdir}/.debug/libubsan.so.*"
+FILES_libubsan-dev += "\
+ ${libdir}/libubsan.so \
+ ${libdir}/libubsan.la \
+"
+FILES_libubsan-staticdev += "${libdir}/libubsan.a"
+
+FILES_liblsan += "${libdir}/liblsan.so.*"
+FILES_liblsan-dbg += "${libdir}/.debug/liblsan.so.*"
+FILES_liblsan-dev += "\
+ ${libdir}/liblsan.so \
+ ${libdir}/liblsan.la \
+"
+FILES_liblsan-staticdev += "${libdir}/liblsan.a"
+
+FILES_libtsan += "${libdir}/libtsan.so.*"
+FILES_libtsan-dbg += "${libdir}/.debug/libtsan.so.*"
+FILES_libtsan-dev += "\
+ ${libdir}/libtsan.so \
+ ${libdir}/libtsan.la \
+"
+FILES_libtsan-staticdev += "${libdir}/libtsan.a"
+
+FILES_${PN} = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-shared-source.inc b/meta/recipes-devtools/gcc/gcc-shared-source.inc
new file mode 100644
index 0000000000..cb5d9071b6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-shared-source.inc
@@ -0,0 +1,9 @@
+do_fetch() {
+ :
+}
+do_fetch[noexec] = "1"
+deltask do_unpack
+deltask do_patch
+
+do_configure[depends] += "gcc-source:do_preconfigure"
+do_populate_lic[depends] += "gcc-source:do_unpack"
diff --git a/meta/recipes-devtools/gcc/gcc-source.inc b/meta/recipes-devtools/gcc/gcc-source.inc
new file mode 100644
index 0000000000..968830aa35
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source.inc
@@ -0,0 +1,34 @@
+deltask do_configure
+deltask do_compile
+deltask do_package
+deltask do_package_write_rpm
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_install
+deltask do_populate_sysroot
+deltask do_populate_lic
+deltask do_package_qa
+deltask do_packagedata
+deltask do_rm_work
+
+WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
+SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
+
+STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
+STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-[0-9]*-*"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = ""
+
+python do_preconfigure () {
+ import subprocess
+ cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
+ subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ # See 0044-gengtypes.patch, we need to regenerate this file
+ 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)
+}
+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_4.8.bb b/meta/recipes-devtools/gcc/gcc-source_4.8.bb
new file mode 100644
index 0000000000..234b82efc6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require recipes-devtools/gcc/gcc-source.inc
diff --git a/meta/recipes-devtools/gcc/gcc-source_4.9.bb b/meta/recipes-devtools/gcc/gcc-source_4.9.bb
new file mode 100644
index 0000000000..234b82efc6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-source_4.9.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require recipes-devtools/gcc/gcc-source.inc
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index de906d6241..a266f16edf 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -1,105 +1,107 @@
GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = " \
+EXTRA_OECONF_PATHS = "\
--with-sysroot=/ \
--with-build-sysroot=${STAGING_DIR_TARGET} \
--with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
- --with-gxx-include-dir=${includedir}/c++/"
+ --with-gxx-include-dir=${includedir}/c++/${BINV} \
+"
+
+EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
-EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
+EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
PACKAGES = "\
- ${PN} ${PN}-plugins ${PN}-symlinks \
- g++ g++-symlinks \
- cpp cpp-symlinks \
- g77 g77-symlinks \
- gfortran gfortran-symlinks \
- gcov gcov-symlinks \
- ${PN}-plugin-dev \
- ${PN}-doc \
- ${PN}-dev \
- ${PN}-dbg \
+ ${PN} ${PN}-plugins ${PN}-symlinks \
+ g++ g++-symlinks \
+ cpp cpp-symlinks \
+ g77 g77-symlinks \
+ gfortran gfortran-symlinks \
+ gcov gcov-symlinks \
+ ${PN}-plugin-dev \
+ ${PN}-doc \
+ ${PN}-dev \
+ ${PN}-dbg \
"
FILES_${PN} = "\
- ${bindir}/${TARGET_PREFIX}gcc* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
+ ${bindir}/${TARGET_PREFIX}gcc* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
"
INSANE_SKIP_${PN} += "dev-so"
FILES_${PN}-dbg += "\
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
"
FILES_${PN}-dev = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
"
FILES_${PN}-plugin-dev = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
"
FILES_${PN}-symlinks = "\
- ${bindir}/cc \
- ${bindir}/gcc \
- ${bindir}/gccbug \
+ ${bindir}/cc \
+ ${bindir}/gcc \
+ ${bindir}/gccbug \
"
FILES_${PN}-plugins = "\
- ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
"
ALLOW_EMPTY_${PN}-plugins = "1"
FILES_g77 = "\
- ${bindir}/${TARGET_PREFIX}g77 \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
+ ${bindir}/${TARGET_PREFIX}g77 \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
"
FILES_g77-symlinks = "\
- ${bindir}/g77 \
- ${bindir}/f77 \
+ ${bindir}/g77 \
+ ${bindir}/f77 \
"
FILES_gfortran = "\
- ${bindir}/${TARGET_PREFIX}gfortran \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
+ ${bindir}/${TARGET_PREFIX}gfortran \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
"
FILES_gfortran-symlinks = "\
- ${bindir}/gfortran \
- ${bindir}/f95"
+ ${bindir}/gfortran \
+ ${bindir}/f95"
FILES_cpp = "\
- ${bindir}/${TARGET_PREFIX}cpp \
- ${base_libdir}/cpp \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${base_libdir}/cpp \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
FILES_cpp-symlinks = "${bindir}/cpp"
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
FILES_gcov-symlinks = "${bindir}/gcov"
FILES_g++ = "\
- ${bindir}/${TARGET_PREFIX}g++ \
- ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
+ ${bindir}/${TARGET_PREFIX}g++ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
"
FILES_g++-symlinks = "\
- ${bindir}/c++ \
- ${bindir}/g++ \
+ ${bindir}/c++ \
+ ${bindir}/g++ \
"
-
FILES_${PN}-doc = "\
- ${infodir} \
- ${mandir} \
- ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
+ ${infodir} \
+ ${mandir} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
"
do_compile () {
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index c81a80c6de..3101762b02 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -1,5 +1,7 @@
BPN = "libgcc"
+require gcc-shared-source.inc
+
INHIBIT_DEFAULT_DEPS = "1"
do_configure () {
@@ -52,7 +54,7 @@ addtask multilib_install after do_install before do_package do_populate_sysroot
# by creating this symlink to it
# /usr/lib64/x86_64-poky-linux/4.7/32
-python do_multilib_install() {
+fakeroot python do_multilib_install() {
import re
multilibs = d.getVar('MULTILIB_VARIANTS', True)
@@ -115,7 +117,7 @@ python do_multilib_install() {
}
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
-python do_extra_symlinks() {
+fakeroot python do_extra_symlinks() {
targetsysnoext = d.getVar('TARGET_SYS_NO_EXTENSION', True)
if targetsysnoext != d.getVar('TARGET_SYS', True):
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 45dd151e5f..21cb8c1084 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -3,25 +3,33 @@ require libgcc-common.inc
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
PACKAGES = "\
- ${PN} \
- ${PN}-dev \
- ${PN}-dbg \
- libgcov-dev \
- "
+ ${PN} \
+ ${PN}-dev \
+ ${PN}-dbg \
+ libgcov-dev \
+"
+
+# All libgcc source is marked with the exception.
+#
+LICENSE_${PN} = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
+
FILES_${PN} = "${base_libdir}/libgcc*.so.*"
-FILES_${PN}-dev = " \
- ${base_libdir}/libgcc*.so \
- ${libdir}/${TARGET_SYS}/${BINV}/*crt* \
- ${libdir}/${TARGET_SYS}/${BINV}/64 \
- ${libdir}/${TARGET_SYS}/${BINV}/32 \
- ${libdir}/${TARGET_SYS}/${BINV}/x32 \
- ${libdir}/${TARGET_SYS}/${BINV}/n32 \
- ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \
- ${@base_conditional('TARGET_SYS_NO_EXTENSION', '${TARGET_SYS}', '', '${libdir}/${TARGET_SYS_NO_EXTENSION}', d)}"
-FILES_libgcov-dev = " \
- ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
- "
+FILES_${PN}-dev = "\
+ ${base_libdir}/libgcc*.so \
+ ${libdir}/${TARGET_SYS}/${BINV}/*crt* \
+ ${libdir}/${TARGET_SYS}/${BINV}/64 \
+ ${libdir}/${TARGET_SYS}/${BINV}/32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/x32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/n32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \
+ ${@base_conditional('TARGET_SYS_NO_EXTENSION', '${TARGET_SYS}', '', '${libdir}/${TARGET_SYS_NO_EXTENSION}', d)} \
+"
+FILES_libgcov-dev = "\
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
+"
FILES_${PN}-dbg += "${base_libdir}/.debug/"
LIBGCCBUILDTREENAME = "gcc-build-internal-"
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index 7bf412134b..e42843d2f1 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -1,8 +1,9 @@
require gcc-configure-common.inc
-EXTRA_OECONF_PATHS = " \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
+EXTRA_OECONF_PATHS = "\
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
do_configure () {
mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
@@ -45,20 +46,20 @@ DEPENDS = "gcc-runtime"
BBCLASSEXTEND = "nativesdk"
PACKAGES = "\
- ${PN}-dbg \
- libgfortran \
- libgfortran-dev \
- libgfortran-staticdev \
+ ${PN}-dbg \
+ libgfortran \
+ libgfortran-dev \
+ libgfortran-staticdev \
"
FILES_${PN} = "${libdir}/libgfortran.so.*"
-FILES_${PN}-dev = " \
- ${libdir}/libgfortran*.so \
- ${libdir}/libgfortran.spec \
- ${libdir}/libgfortran.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single*"
-FILES_${PN}-staticdev = " \
- ${libdir}/libgfortran.a"
+FILES_${PN}-dev = "\
+ ${libdir}/libgfortran*.so \
+ ${libdir}/libgfortran.spec \
+ ${libdir}/libgfortran.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
+"
+FILES_${PN}-staticdev = "${libdir}/libgfortran.a"
INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
diff --git a/meta/recipes-devtools/gdb/gdb-7.7.inc b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
index 62adcaa830..6fa13bc582 100644
--- a/meta/recipes-devtools/gdb/gdb-7.7.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
@@ -6,5 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
S = "${WORKDIR}/${BPN}-${PV}"
-SRC_URI[md5sum] = "40051ff95b39bd57b14b1809e2c16152"
-SRC_URI[sha256sum] = "8814d98c2733639cb602b6ecd8d69e02498017e02b5724c9451c285b0e9ee173"
+SRC_URI[md5sum] = "997492cc3475c96f35ecc8775248c9b1"
+SRC_URI[sha256sum] = "d7a923d876ecfa1cec4c1c79c014c9d8e58783a25855a95cf260275f61990647"
+
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index b4d48809d3..81af42f323 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -2,7 +2,7 @@ SUMMARY = "GNU debugger"
HOMEPAGE = "http://www.gnu.org/software/gdb/"
LICENSE = "GPLv3+"
SECTION = "devel"
-DEPENDS = "expat ncurses readline ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses readline ${LTTNGUST}"
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
@@ -11,6 +11,8 @@ LTTNGUST_mips = ""
LTTNGUST_mipsel = ""
LTTNGUST_mips64 = ""
LTTNGUST_mips64el = ""
+LTTNGUST_mips64n32 = ""
+LTTNGUST_mips64eln32 = ""
LTTNGUST_sh4 = ""
INC_PR = "r0"
@@ -38,7 +40,7 @@ EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
--with-curses --disable-multilib --with-system-readline --disable-sim \
- --without-lzma \
+ --without-lzma --without-guile \
${GDBPROPREFIX} ${EXPAT} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
--disable-rpath \
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e594bb12f5..844dce9451 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -13,6 +13,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
+SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
+
do_configure_prepend() {
cat > ${WORKDIR}/python << EOF
#! /bin/sh
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
index 301035940c..301035940c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
index cb99b06c5b..6e44778cd3 100644
--- a/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -1,8 +1,17 @@
require gdb-common.inc
-DEPENDS = "expat-native ncurses-native readline-native"
+DEPENDS = "expat-native ncurses-native readline-native python-native"
-EXTRA_OECONF += "--without-python"
+inherit pythonnative
+
+EXTRA_OECONF += "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python"
+
+do_compile_prepend() {
+ export BUILD_SYS="${BUILD_SYS}"
+ export HOST_SYS="${HOST_SYS}"
+ export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"
+ export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}"
+}
#EXTRA_OEMAKE += "LDFLAGS='${BUILD_LDFLAGS}'"
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.7.bb b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
index f9da486d7d..f9da486d7d 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 3321a244e8..2c95e03b1b 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -2,8 +2,7 @@ require gdb-common.inc
inherit gettext
-SRC_URI += "file://kill_arm_map_symbols.patch \
- file://gdbserver-cflags-last.diff;striplevel=0 \
+SRC_URI += "file://gdbserver-cflags-last.diff;striplevel=0 \
file://renesas-sh-native-support.patch \
"
#LDFLAGS_append = " -s"
diff --git a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
deleted file mode 100644
index 9fc45b9f2a..0000000000
--- a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: gdb-7.3/gdb/arm-tdep.c
-===================================================================
---- gdb-7.3.orig/gdb/arm-tdep.c 2011-05-17 14:27:01.000000000 -0700
-+++ gdb-7.3/gdb/arm-tdep.c 2011-08-05 22:29:58.784201850 -0700
-@@ -7806,6 +7806,19 @@
- static void
- arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
- {
-+
-+ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
-+ displaying disassembly so we use this horrible hack here to
-+ artifically set their address to the highest possible value.
-+ This is wrong of course, and it prevents the symbols from being
-+ used for their intended purpose - to distinguish between ARM
-+ and THUMB code. So we ought to find a better way to do this. */
-+ if (bfd_asymbol_name (sym)
-+ && bfd_asymbol_name (sym)[0] == '$'
-+ && bfd_asymbol_name (sym)[1] != 0
-+ && bfd_asymbol_name (sym)[2] == 0)
-+ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
-+
- if (ARM_SYM_BRANCH_TYPE (&((elf_symbol_type *)sym)->internal_elf_sym)
- == ST_BRANCH_TO_THUMB)
- MSYMBOL_SET_SPECIAL (msym);
diff --git a/meta/recipes-devtools/gdb/gdb_7.7.bb b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
index 1abc9d8e76..1abc9d8e76 100644
--- a/meta/recipes-devtools/gdb/gdb_7.7.bb
+++ b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index 4e0527cab6..5396628790 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -5,6 +5,7 @@ DEPENDS = "openssl curl zlib expat"
PROVIDES_append_class-native = " git-replacement-native"
+SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz"
S = "${WORKDIR}/git-${PV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
@@ -29,24 +30,24 @@ do_install () {
oe_runmake install DESTDIR="${D}" bindir=${bindir} \
template_dir=${datadir}/git-core/templates \
GIT_PYTHON_DIR=${D}${datadir}/git-core/python
-
- # ${libdir} is not applicable here, perl-native files are always
- # installed to /usr/lib on both 32/64 bits targets.
- rm -rf ${D}${exec_prefix}/lib/perl-native
- rmdir ${D}${exec_prefix}/lib || true
}
-PERLSEDFIXUP = " \
+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) + '/')} \
-"
+ ${@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.
+ mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
+ rmdir -p ${D}${exec_prefix}/lib/perl-native || true
+}
REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
do_install_append_class-target () {
- ${PERLSEDFIXUP}
+ perl_native_fixup
}
do_install_append_class-native() {
@@ -59,7 +60,7 @@ do_install_append_class-nativesdk() {
create_wrapper ${D}${bindir}/git \
GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
- ${PERLSEDFIXUP}
+ perl_native_fixup
}
FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
@@ -89,6 +90,7 @@ PERLTOOLS = " \
PACKAGES =+ "${PN}-perltools"
FILES_${PN}-perltools += " \
${PERLTOOLS} \
+ ${libdir}/perl \
${datadir}/perl \
"
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
diff --git a/meta/recipes-devtools/git/git_1.9.0.bb b/meta/recipes-devtools/git/git_2.2.1.bb
index 4eb6c99a30..2d47cda775 100644
--- a/meta/recipes-devtools/git/git_1.9.0.bb
+++ b/meta/recipes-devtools/git/git_2.2.1.bb
@@ -1,9 +1,7 @@
require git.inc
-SRC_URI = "http://git-core.googlecode.com/files/git-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "e16c14b27c644b8e0dd72bdb5ff77450"
-SRC_URI[sha256sum] = "de3097fdc36d624ea6cf4bb853402fde781acdb860f12152c5eb879777389882"
+SRC_URI[md5sum] = "ff41fdb094eed1ec430aed8ee9b9849c"
+SRC_URI[sha256sum] = "367a77d0b10a5070b02a0fb0e942f26f25af61793128e0ddfd5c5c474de93589"
EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes \
ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
index d67466ae79..f5fce6f020 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
@@ -17,6 +17,8 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV
SRC_URI[md5sum] = "bcfca5a2bb39edad4aae5a65efc84094"
SRC_URI[sha256sum] = "44f99a8e76f3e8e4fec0bb5ad4762f8e44366168554ce66cb85afbe2ed3efd8b"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 00fa759176..754a99a4b0 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -17,6 +17,8 @@ SRC_URI = "git://git.sv.gnu.org/config.git \
S = "${WORKDIR}/git"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/guile/files/arm_aarch64.patch b/meta/recipes-devtools/guile/files/arm_aarch64.patch
new file mode 100644
index 0000000000..f1788b62fb
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/arm_aarch64.patch
@@ -0,0 +1,19 @@
+guile: add aarch64 recognition
+
+Assume little-endian.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+--- a/module/system/base/target.scm
++++ b/module/system/base/target.scm
+@@ -70,6 +70,8 @@
+ ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
+ "mips" "mips64"))
+ (endianness big))
++ ((string-match "^aarch64" cpu)
++ (endianness little))
+ ((string-match "^arm.*eb" cpu)
+ (endianness big))
+ ((string-match "^arm.*" cpu)
diff --git a/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
new file mode 100644
index 0000000000..290b9d447d
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
@@ -0,0 +1,42 @@
+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/workaround-ice-ssa-corruption.patch b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
new file mode 100644
index 0000000000..6c348384a5
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
@@ -0,0 +1,60 @@
+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.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
index d19460a20d..d1578e08cf 100644
--- a/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -19,6 +19,9 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
file://opensuse/guile-64bit.patch \
file://guile_2.0.6_fix_sed_error.patch \
file://arm_endianness.patch \
+ file://arm_aarch64.patch \
+ file://workaround-ice-ssa-corruption.patch \
+ file://libguile-Makefile.am-hook.patch \
"
# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -31,7 +34,7 @@ SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c6
inherit autotools gettext pkgconfig texinfo
BBCLASSEXTEND = "native"
-DEPENDS = "libunistring bdwgc gmp libtool libffi"
+DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
# add guile-native only to the target recipe's DEPENDS
DEPENDS_append_class-target = " guile-native libatomics-ops"
diff --git a/meta/recipes-devtools/help2man/help2man-native_1.45.1.bb b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
index dec17b5149..5b90da9afa 100644
--- a/meta/recipes-devtools/help2man/help2man-native_1.45.1.bb
+++ b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
@@ -6,8 +6,8 @@ DEPENDS = "autoconf-native automake-native"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "8a8a5314284e46185e492756afdca29a"
-SRC_URI[sha256sum] = "c70fc791e6d13240327955de355244371b00bb1c9e247d5693ed601b716467c2"
+SRC_URI[md5sum] = "a1b7fe49eddae8a2537ed74ee9ef11cb"
+SRC_URI[sha256sum] = "1ae7f15f53b0cc55b070ae49df2ee5caa942c71529054e157599427bba3c5633"
inherit autotools native
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
index fcaf72f22a..fcaf72f22a 100644
--- a/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.0/Module.mk
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb
deleted file mode 100644
index b8be9eddda..0000000000
--- a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-RDEPENDS_${PN} += "perl"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/i2c-tools/i2c-tools-3.1.0.tar.bz2/f15019e559e378c6e9d5d6299a00df21/i2c-tools-${PV}.tar.bz2 \
- file://Module.mk \
-"
-SRC_URI[md5sum] = "f15019e559e378c6e9d5d6299a00df21"
-SRC_URI[sha256sum] = "960023f61de292c6dd757fcedec4bffa7dd036e8594e24b26a706094ca4c142a"
-
-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
-}
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
new file mode 100644
index 0000000000..71c98a4fd1
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Set of i2c tools for linux"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \
+ file://Module.mk \
+"
+SRC_URI[md5sum] = "0fdbff53ebd0b8d9249256d6c56480b1"
+SRC_URI[sha256sum] = "14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700"
+
+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} += "${PN}-misc"
+RDEPENDS_${PN}-misc += "perl"
diff --git a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
index 18e7fc0062..6b356b0d44 100644
--- a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
+++ b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
@@ -10,7 +10,7 @@ and names that can be used to make icon themes work in a desktop \
environment or application that implements the naming specification. "
LICENSE = "GPLv2"
DEPENDS = "libxml-simple-perl-native"
-PR = "r4"
+PR = "r5"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
@@ -18,7 +18,7 @@ SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-${PV}.tar.gz"
SRC_URI[md5sum] = "2c5c7a418e5eb3268f65e21993277fba"
SRC_URI[sha256sum] = "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c"
-inherit autotools-brokensep allarch perlnative
+inherit autotools allarch perlnative
do_configure_append() {
# Make sure we use our nativeperl wrapper.
diff --git a/meta/recipes-devtools/insserv/files/run-ptest b/meta/recipes-devtools/insserv/files/run-ptest
index 495d1551c2..4a6da3030a 100644
--- a/meta/recipes-devtools/insserv/files/run-ptest
+++ b/meta/recipes-devtools/insserv/files/run-ptest
@@ -11,7 +11,7 @@ output() {
}
for i in test_simple_sequence test_undetected_loop; \
- do $i &>/dev/null ; output; \
+ do $i >/dev/null 2>&1; output; \
done
rm -rf ${tmpdir}
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index cdf93da206..2a8a30ccdc 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -163,10 +163,11 @@ for target_type in $YOCTOADT_TARGETS; do
# opkg will not install packagegroup-cross-canadian package if it was already
# installed. So, the environment script is in one place or the other.
+ [ -e "$INSTALL_FOLDER/$env_script_original" ] && env_script=$INSTALL_FOLDER/$env_script_original
[ -e "$env_script_original" ] && env_script=$env_script_original
[ -e "$env_script_relocated" ] && env_script=$env_script_relocated
- $SUDO sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_script
+ $SUDO sed -i -e "s%SDKTARGETSYSROOT=.*%SDKTARGETSYSROOT=$target_sysroot%g" $env_script
done
if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" == "y" ]; then
diff --git a/meta/recipes-devtools/installer/adt-installer_1.0.bb b/meta/recipes-devtools/installer/adt-installer_1.0.bb
index 6a63e79e9f..07070b54cf 100644
--- a/meta/recipes-devtools/installer/adt-installer_1.0.bb
+++ b/meta/recipes-devtools/installer/adt-installer_1.0.bb
@@ -29,6 +29,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
LICENSE = "MIT"
PACKAGES = ""
+INHIBIT_DEFAULT_DEPS = "1"
PR = "r11"
@@ -86,7 +87,6 @@ do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
-do_package_write[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"
diff --git a/meta/recipes-devtools/json-c/json-c_0.11.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb
index 389e0f9ebf..79cf6dca70 100644
--- a/meta/recipes-devtools/json-c/json-c_0.11.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "aa02367d2f7a830bf1e3376f77881e98"
-SRC_URI[sha256sum] = "28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c"
+SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
+SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
RPROVIDES_${PN} = "libjson"
@@ -19,3 +19,5 @@ do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
rm -f ${S}/config.status
}
+
+CFLAGS += "-Wno-error=unused-but-set-variable"
diff --git a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
index 2f57527e43..ef0019fc7d 100644
--- a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
@@ -12,7 +12,7 @@ LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
SECTION = "devel"
DEPENDS += "ncurses flex bison gperf-native pkgconfig-native"
-RDEPENDS_${PN} += "python"
+RDEPENDS_${PN} += "python bash"
SRC_URI = "http://ymorin.is-a-geek.org/download/${BPN}/${BP}.tar.xz"
SRC_URI[md5sum] = "b939280dcc83f8feabd87a1d5f9b00c2"
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.5.inc
index 9c50d46fe2..5b222504af 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.5.inc
@@ -5,31 +5,28 @@ Libtool hides the complexity of generating special library types \
HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
SECTION = "devel"
LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-INC_PR = "r6"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://libltdl/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c "
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
file://trailingslash.patch \
file://rename-with-sysroot.patch \
file://use-sysroot-in-libpath.patch \
file://fix-final-rpath.patch \
- file://avoid_absolute_paths_for_general_utils.patch \
file://fix-rpath.patch \
- file://respect-fstack-protector.patch \
file://norm-rpath.patch \
file://dont-depend-on-help2man.patch \
file://fix-resolve-lt-sysroot.patch \
+ file://nohardcodepaths.patch \
"
-SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50"
-SRC_URI[sha256sum] = "b38de44862a987293cd3d8dfae1c409d514b6c4e794ebc93648febf9afc38918"
+SRC_URI[md5sum] = "7d30ed9fa6bb11270ebb31639a37bd54"
+SRC_URI[sha256sum] = "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987"
do_compile_prepend () {
# Sometimes this file doesn't get rebuilt, force the issue
- rm -f ${S}/libltdl/config/ltmain.sh
- make libltdl/config/ltmain.sh
+ rm -f ${S}/build-aux/ltmain.sh
+ make build-aux/ltmain.sh
./config.status
}
@@ -49,3 +46,5 @@ FILES_libltdl = "${libdir}/libltdl${SOLIBS}"
FILES_libltdl-dev = "${libdir}/libltdl${SOLIBSDEV} ${includedir}"
FILES_libltdl-staticdev = "${libdir}/libltdl.a"
FILES_libltdl-dbg = "${libdir}/.debug/"
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb
index 72fad37eaf..847880270d 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.5.bb
@@ -1,6 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.1"
PACKAGES = ""
SRC_URI += "file://prefix.patch"
SRC_URI += "file://fixinstall.patch"
@@ -18,17 +17,18 @@ do_install () {
install -d ${D}${bindir_crossscripts}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
install -d ${D}${bindir_crossscripts}/
- install -m 0755 libtoolize ${D}${bindir_crossscripts}/
- install -d ${D}${target_datadir}/libtool/config/
+ GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
+ chmod 0755 ${D}${bindir_crossscripts}/libtoolize
+ install -d ${D}${target_datadir}/libtool/build-aux/
install -d ${D}${target_datadir}/aclocal/
- install -c ${S}/libltdl/config/compile ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.guess ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.sub ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/depcomp ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/install-sh ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/missing ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/m4/*.m4 ${D}${target_datadir}/aclocal/
+ install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
}
SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
@@ -39,5 +39,3 @@ libtoolcross_sysroot_preprocess () {
}
SSTATE_SCAN_FILES += "libtoolize *-libtool"
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.5.bb
index f1051d84f3..4c5218ade0 100644
--- a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-native_2.4.5.bb
@@ -2,7 +2,6 @@ require libtool-${PV}.inc
DEPENDS = ""
-PR = "${INC_PR}.1"
SRC_URI += "file://prefix.patch"
inherit native
@@ -21,5 +20,3 @@ do_install () {
install -d ${D}${bindir}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
}
-
-export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch b/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
deleted file mode 100644
index 3c751ed0e2..0000000000
--- a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Pending
-
-On some distro the path of utils like sed, grep etc are different than the
-buildhost system.
- This was causing runtime issue while running libtoolize from the
-libtool-nativesdk package.
- This patch takes out the absolute paths of these utils, and put
-responsibility on the end-user to set correct paths for these utilities to be
-found out.
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/02/18
-
-
-Index: libtool-2.4.2/libltdl/config/general.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/general.m4sh
-+++ libtool-2.4.2/libltdl/config/general.m4sh
-@@ -45,15 +45,15 @@ progpath="$0"
- M4SH_VERBATIM([[
- : ${CP="cp -f"}
- test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
--: ${EGREP="@EGREP@"}
--: ${FGREP="@FGREP@"}
--: ${GREP="@GREP@"}
--: ${LN_S="@LN_S@"}
-+: ${EGREP="egrep"}
-+: ${FGREP="fgrep"}
-+: ${GREP="grep"}
-+: ${LN_S="ln -s"}
- : ${MAKE="make"}
- : ${MKDIR="mkdir"}
- : ${MV="mv -f"}
- : ${RM="rm -f"}
--: ${SED="@SED@"}
-+: ${SED="sed"}
- : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
- : ${Xsed="$SED -e 1s/^X//"}
-
diff --git a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
index 67552b0ff5..fd4084c859 100644
--- a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
+++ b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
@@ -1,24 +1,30 @@
Upstream-Status: Inappropriate
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libtool-2.4.2/Makefile.am libtool-2.4.2/Makefile.am
---- libtool-2.4.2/Makefile.am 2011-10-17 13:17:04.000000000 +0300
-+++ libtool-2.4.2/Makefile.am 2013-01-01 22:03:36.865586811 +0200
-@@ -327,17 +327,6 @@
- cd $(srcdir)/doc && \
- $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
+Updated by: Robert Yang <liezhi.yang@windriver.com>
--dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -404,21 +404,6 @@ $(notes_txt): $(notes_texi)
+ $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
+ $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
+
+-dist_man1_MANS = $(libtool_1) $(libtoolize_1)
-MAINTAINERCLEANFILES += $(dist_man1_MANS)
-update_mans = \
- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
-- $(HELP2MAN) --output=$@
--$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
-- $(update_mans) --help-option=--help-all libtool
--$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
-- $(update_mans) libtoolize
+- $(HELP2MAN) --output='$@'
-
+-# It's wrong to make distributed files (e.g. $(libtool_1)) rely on
+-# files created in the build tree, so instead we regenerate the
+-# manual pages if the sources for the build-tree files we want to
+-# run have changed.
+-$(libtool_1): $(ltmain_sh)
+- $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
+-$(libtoolize_1): $(libtoolize_in)
+- $(AM_V_GEN)$(update_mans) libtoolize
-
+
## ------------- ##
## Installation. ##
- ## ------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
index 5c275ffd32..5c9f8cc9c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
@@ -6,13 +6,14 @@ This works around the issue until it gets sorted out upstream.
Fix suggested by Richard Purdie <richard.purdie@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -7268,9 +7268,11 @@ EOF
- test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -7569,9 +7569,11 @@ EOF
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ func_replace_sysroot "$libdir"
@@ -23,9 +24,9 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
- func_replace_sysroot "$libdir"
- libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
-@@ -7999,6 +8001,10 @@ EOF
+@@ -8301,6 +8303,10 @@ EOF
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
@@ -35,4 +36,15 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+ libdir=$func_stripname_result
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
+@@ -8352,6 +8358,10 @@ EOF
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
++ func_replace_sysroot "$libdir"
++ libdir=$func_replace_sysroot_result
++ func_stripname '=' '' "$libdir"
++ libdir=$func_stripname_result
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
index 44e9fe17ae..1bd95980c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
@@ -10,17 +10,18 @@ I have also reported the problem to libtool here
http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html
Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
---
-diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2013-09-13 22:37:43.647282945 +0200
-+++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-09-14 10:27:37.168178605 +0200
-@@ -1234,16 +1234,21 @@
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
- case ${with_libtool_sysroot} in #(
+ case $with_libtool_sysroot in #(
- yes)
+ no)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Treat "/" the same a an unset sysroot. It seems to be more
+ # compatible across host platforms that way!?
@@ -37,5 +38,5 @@ diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libto
- no|'')
- ;; #(
*)
- AC_MSG_RESULT([${with_libtool_sysroot}])
+ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
index 1571178a6a..a2ec9473e7 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
@@ -6,10 +6,12 @@ RP 23/9/2011
Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+Index: libtool-2.4.2/build-aux/ltmain.in
===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
+--- libtool-2.4.2.orig/build-aux/ltmain.in
++++ libtool-2.4.2/build-aux/ltmain.in
@@ -7286,8 +7286,14 @@ EOF
esac
fi
diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
index 279c07be37..8f343bf436 100644
--- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch
+++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
@@ -16,12 +16,13 @@ Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this]
RP 2011/11/16
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2011-11-16 14:50:01.070383779 +0000
-+++ libtool-2.4/libltdl/config/ltmain.m4sh 2011-11-16 15:27:13.582310413 +0000
-@@ -2163,7 +2163,7 @@
- dir="$func_dirname_result"
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2355,7 +2355,7 @@ func_mode_install ()
+ dir=$func_dirname_result
func_append dir "$objdir"
- if test -n "$relink_command"; then
@@ -29,16 +30,16 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
# Strip any trailing slash from the destination.
func_stripname '' '/' "$libdir"
destlibdir=$func_stripname_result
-@@ -2202,7 +2202,7 @@
+@@ -2394,7 +2394,7 @@ func_mode_install ()
shift
- srcname="$realname"
-- test -n "$relink_command" && srcname="$realname"T
+ srcname=$realname
+- test -n "$relink_command" && srcname=${realname}T
+ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
-@@ -5856,15 +5856,15 @@
+@@ -6162,15 +6162,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -63,7 +64,7 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -5930,15 +5930,15 @@
+@@ -6236,15 +6236,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -88,14 +89,14 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -6284,8 +6284,8 @@
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+@@ -6590,8 +6590,8 @@ func_mode_link ()
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
-- func_warning "\`$deplib' seems to be moved"
+- func_warning "'$deplib' seems to be moved"
+ #test "$absdir" != "$libdir" && \
-+ # func_warning "\`$deplib' seems to be moved"
++ # func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
new file mode 100644
index 0000000000..b2239fbade
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
@@ -0,0 +1,27 @@
+If for example you build on a machine with /bin/grep, then restore that sstate
+onto a machine with /usr/bin/grep, things will fail. Simply don't bother
+hardcoding paths.
+
+RP 2015/2/3
+
+Index: libtool-2.4.5/libtoolize.in
+===================================================================
+--- libtool-2.4.5.orig/libtoolize.in
++++ libtool-2.4.5/libtoolize.in
+@@ -40,11 +40,11 @@
+
+ : ${AUTOCONF="autoconf"}
+ : ${AUTOMAKE="automake"}
+-: ${EGREP="@EGREP@"}
+-: ${FGREP="@FGREP@"}
+-: ${GREP="@GREP@"}
+-: ${LN_S="@LN_S@"}
+-: ${SED="@SED@"}
++: ${EGREP="egrep"}
++: ${FGREP="fgrep"}
++: ${GREP="grep"}
++: ${LN_S="ln -s"}
++: ${SED="sed"}
+
+
+ ## -------------------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
index dce1576c41..1e4c65e024 100644
--- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
@@ -7,9 +7,11 @@ RPATH in the generated binary. Normalize before comparision.
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Upstream-Status: Pending
-diff -ur a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
---- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700
-+++ b/libltdl/config/ltmain.m4sh 2012-08-22 11:01:34.191345989 -0700
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700
++++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700
@@ -7288,8 +7288,10 @@
else
# We only want to hardcode in an rpath if it isn't in the
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
index 5e46e68f03..a73df2e4a7 100644
--- a/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -18,35 +18,13 @@ the simplest fix is just to remove $SHELL.
Updated: Date: 2011/11/09
RP
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS="$ltmain"
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
-
- _LT_SETUP
-@@ -206,7 +207,7 @@ aix3*)
- esac
-
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
-
- # All known linkers require a `.a' archive for static linking (except MSVC,
-Index: libtool-2.4.2/Makefile.am
-===================================================================
---- libtool-2.4.2.orig/Makefile.am
-+++ libtool-2.4.2/Makefile.am
-@@ -31,7 +31,7 @@ AM_LDFLAGS =
- DIST_SUBDIRS = .
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -31,7 +31,7 @@ SUBDIRS = .
+ DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST =
-BUILT_SOURCES = libtool libtoolize
@@ -54,58 +32,67 @@ Index: libtool-2.4.2/Makefile.am
CLEANFILES =
MOSTLYCLEANFILES =
-@@ -72,7 +72,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
- ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
- ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
- ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
--CLEANFILES += libtool libtoolize libtoolize.tmp \
-+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
- $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
+
+ EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
+ GNUmakefile
+-CLEANFILES += libtool libtoolize
++CLEANFILES += $(host_alias)-libtool libtoolize
- ## These are the replacements that need to be made at bootstrap time,
-@@ -231,7 +231,7 @@ configure_edit = sed \
- -e 's,@SED\@,$(SED),g'
+ ## If a file is named several times below, and especially if it
+ ## is a distributed file created during Libtool bootstrap, we
+@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
+ -e 's|@srcdir\@|$(srcdir)|g'
# The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtoolize libtool
-+bin_SCRIPTS = libtoolize $(host_alias)-libtool
+-bin_SCRIPTS = libtool
++bin_SCRIPTS = $(host_alias)-libtool
- libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
- rm -f libtoolize.tmp libtoolize
-@@ -244,8 +244,8 @@ libtoolize: $(srcdir)/libtoolize.in $(to
+ libtoolize: $(libtoolize_in) $(config_status)
+ $(AM_V_at)rm -f '$@'
+@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
# We used to do this with a 'stamp-vcl' file, but non-gmake builds
# would rerun configure on every invocation, so now we manually
# check the version numbers from the build rule when necessary.
--libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-- @target=libtool; $(rebuild); \
-+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-+ @target=$(host_alias)-libtool; $(rebuild); \
- if test -f "$$target"; then \
- set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
- test "$$actualver" = "$$correctver" && rebuild=false; \
-@@ -254,8 +254,8 @@ libtool: $(top_builddir)/config.status $
- case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
- done; \
- if $$rebuild; then \
-- echo $(SHELL) ./config.status $$target; \
-- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
-+ echo $(SHELL) ./config.status libtool; \
-+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
- fi
-
- .PHONY: configure-subdirs
-@@ -535,12 +535,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
+-libtool: $(ltmain_sh) $(config_status) $(dotversion)
++$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
+ @$(rebuild); \
+ if test -f '$@'; then \
+ eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
+@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
- LIBTOOL="$(abs_top_builddir)/libtool" \
+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
- tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+ tst_aclocaldir="$(abs_top_srcdir)/m4"
INSTALLCHECK_ENVIRONMENT = \
- LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
-- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
-+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
+ LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
+- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
LTDLINCL="-I$(includedir)" \
LIBLTDL="$(libdir)/libltdl.la" \
tst_aclocaldir="$(aclocaldir)"
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
+ LIBTOOL_DEPS=$ltmain
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+ _LT_SETUP
+@@ -199,7 +200,7 @@ aix3*)
+ esac
+
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a '.a' archive for static linking (except MSVC,
diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
index c3e3e867aa..ad2b110530 100644
--- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
@@ -10,29 +10,31 @@ http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
-Khem Raj <raj.khem@gmail.com>
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -1224,27 +1224,27 @@ _LT_DECL([], [ECHO], [1], [An echo progr
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
--[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+AC_ARG_WITH([libtool-sysroot],
-+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
++[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
-[], [with_sysroot=no])
+[], [with_libtool_sysroot=no])
dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
--case ${with_sysroot} in #(
-+case ${with_libtool_sysroot} in #(
+-case $with_sysroot in #(
++case $with_libtool_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -43,15 +45,14 @@ Index: libtool-2.4.2/libltdl/m4/libtool.m4
no|'')
;; #(
*)
-- AC_MSG_RESULT([${with_sysroot}])
-+ AC_MSG_RESULT([${with_libtool_sysroot}])
+- AC_MSG_RESULT([$with_sysroot])
++ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
;;
esac
-Index: libtool-2.4.2/tests/sysroot.at
-===================================================================
---- libtool-2.4.2.orig/tests/sysroot.at
-+++ libtool-2.4.2/tests/sysroot.at
+diff --git a/tests/sysroot.at b/tests/sysroot.at
+--- a/tests/sysroot.at
++++ b/tests/sysroot.at
@@ -64,7 +64,7 @@ while read file; do
done])
@@ -60,7 +61,7 @@ Index: libtool-2.4.2/tests/sysroot.at
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
+ if test PATH = "$shlibpath_var"; then
@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
@@ -79,11 +80,10 @@ Index: libtool-2.4.2/tests/sysroot.at
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
]])
-Index: libtool-2.4.2/tests/testsuite
-===================================================================
---- libtool-2.4.2.orig/tests/testsuite
-+++ libtool-2.4.2/tests/testsuite
-@@ -26676,7 +26676,7 @@ $at_traceon; }
+diff --git a/tests/testsuite b/tests/testsuite
+--- a/tests/testsuite
++++ b/tests/testsuite
+@@ -48945,7 +48945,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -91,8 +91,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -26874,7 +26874,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -101,7 +101,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27051,7 +27051,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -110,7 +110,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27392,7 +27392,7 @@ $at_traceon; }
+@@ -49694,7 +49694,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -118,8 +118,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -27590,7 +27590,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -128,7 +128,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27767,7 +27767,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -137,7 +137,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28108,7 +28108,7 @@ $at_traceon; }
+@@ -50443,7 +50443,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -145,8 +145,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -28306,7 +28306,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -155,7 +155,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28483,7 +28483,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
diff --git a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
deleted file mode 100644
index a82b2ec5a1..0000000000
--- a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Source: http://permalink.gmane.org/gmane.comp.gnu.libtool.bugs/7341
-
-Bug confirmed. When code is compiled with -fstack-protector{,-all},
-GCC "emits extra code to check for buffer overflows, such as stack
-smashing attacks". This extra code uses symbols from libssp, and
-therefore (at least) Cygwin's GCC specs contain:
-
-*link_ssp:
-%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
-
-Therefore, when libtool fails to pass -fstack-protector{,-all} at link
-stage, the link fails.
-
-Patch attached. (Yes, I have a copyright assignment on file.)
-
-Yaakov
-Cygwin/X
-
-From b79f4e117b6f73cc461a2e232063e08481d33300 Mon Sep 17 00:00:00 2001
-From: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
-Date: Tue, 1 Jun 2010 22:18:51 -0500
-Subject: [PATCH] Fix linking with -fstack-protector
-
-* libltdl/config/ltmain.m4sh (func_mode_link): Pass -fstack-protector*
-to the linker as it is required at link time to resolve libssp symbols.
-
-Signed-off-by: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
----
- libltdl/config/ltmain.m4sh | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh 2012-06-01 12:35:44.089638130 -0700
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh 2012-06-01 12:37:25.789643055 -0700
-@@ -5067,13 +5067,14 @@
- # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
- # -F/path path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
-+ # -fstack-protector* stack protector flags for GCC
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
- # --sysroot=* for sysroot support
- # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
index bb7a761e25..e8824d7db9 100644
--- a/meta/recipes-devtools/libtool/libtool/trailingslash.patch
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -11,11 +11,12 @@ Merged a patch received from Gary Thomas <gary@mlbassoc.com>
Date: 2010/07/12
Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -2167,8 +2167,15 @@ func_mode_install ()
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2356,8 +2356,15 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
index 0cd66ad524..6af99f327c 100644
--- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
@@ -6,16 +6,16 @@ i.e. when lt_sysroot is not set, it will still behave the same and add
-L/usr/lib to the relink command.
-Khem Raj <raj.khem@gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -6138,7 +6138,7 @@ func_mode_link ()
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -6421,7 +6421,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
-- add_dir="-L$libdir"
+- add_dir=-L$libdir
+ add_dir="-L$lt_sysroot$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.2.bb b/meta/recipes-devtools/libtool/libtool_2.4.2.bb
deleted file mode 100644
index a2eb4ea437..0000000000
--- a/meta/recipes-devtools/libtool/libtool_2.4.2.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require libtool-${PV}.inc
-
-PR = "${INC_PR}.0"
-
-#
-# We want the results of libtool-cross preserved - don't stage anything ourselves.
-#
-SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
-
-libtool_sysroot_preprocess () {
- rm -rf ${SYSROOT_DESTDIR}${bindir}/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/config/*
-}
-
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.5.bb b/meta/recipes-devtools/libtool/libtool_2.4.5.bb
new file mode 100644
index 0000000000..45f1b2f3a9
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool_2.4.5.bb
@@ -0,0 +1,26 @@
+require libtool-${PV}.inc
+
+RDEPENDS_${PN} += "bash"
+
+#
+# We want the results of libtool-cross preserved - don't stage anything ourselves.
+#
+SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
+
+do_install_append () {
+ sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
+ -e 's@${STAGING_DIR_HOST}@@g' \
+ -e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
+ -e 's@^\(predep_objects="\).*@\1"@' \
+ -e 's@^\(postdep_objects="\).*@\1"@' \
+ -i ${D}${bindir}/libtool
+}
+
+libtool_sysroot_preprocess () {
+ rm -rf ${SYSROOT_DESTDIR}${bindir}/*
+ rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
+ rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
+}
+
diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb
index fff15e916d..508eade326 100644
--- a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.5.bb
@@ -1,7 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.0"
-
FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
SRC_URI += "file://prefix.patch"
@@ -31,5 +29,3 @@ libtoolnativesdk_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
}
-
-export CONFIG_SHELL="/bin/bash"
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
index ed6ab738a8..a8a90fc82e 100644
--- 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
@@ -19,3 +19,7 @@ inherit autotools-brokensep native
do_configure () {
oe_runconf
}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' 'TMPDIR=${T}' install
+}
diff --git a/meta/recipes-devtools/m4/m4.inc b/meta/recipes-devtools/m4/m4.inc
index 4a83929f0c..e473e23824 100644
--- a/meta/recipes-devtools/m4/m4.inc
+++ b/meta/recipes-devtools/m4/m4.inc
@@ -5,6 +5,7 @@ GNU M4 also has built-in functions for including files, running shell commands,
inherit autotools texinfo
+EXTRA_OECONF += "--without-libsigsegv-prefix"
EXTRA_OEMAKE += "'infodir=${infodir}'"
LDFLAGS_prepend_libc-uclibc = " -lrt "
SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/meta/recipes-devtools/make/make_4.0.bb b/meta/recipes-devtools/make/make_4.1.bb
index 38d328c8a5..a1b0d7c45f 100644
--- a/meta/recipes-devtools/make/make_4.0.bb
+++ b/meta/recipes-devtools/make/make_4.1.bb
@@ -6,7 +6,7 @@ require make.inc
EXTRA_OECONF += "--without-guile"
-SRC_URI[md5sum] = "571d470a7647b455e3af3f92d79f1c18"
-SRC_URI[sha256sum] = "e60686c7afede62cc8c86ad3012cf081ea4887daf9d223ce7115703b2bb2dbdb"
+SRC_URI[md5sum] = "57a7a224a822f94789a587ccbcedff69"
+SRC_URI[sha256sum] = "0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
index dd9bea2619..92d5870f42 100644
--- a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
+++ b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
@@ -5,11 +5,9 @@ SECTION = "base"
SRC_URI = "file://makedevs.c \
file://COPYING.patch"
-FILES_${PN}_append_class-nativesdk = " ${datadir}"
+S = "${WORKDIR}"
-do_configure() {
- install -m 0644 ${WORKDIR}/makedevs.c ${S}/
-}
+FILES_${PN}_append_class-nativesdk = " ${datadir}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} -o ${S}/makedevs ${S}/makedevs.c
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index bcf68a8e37..28aff9124e 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -14,6 +14,8 @@ SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
file://fix-makefile-to-find-libz.patch \
"
+CLEANBROKEN = "1"
+
S = "${WORKDIR}/git/util/mkelfImage"
CFLAGS += "-fno-stack-protector"
diff --git a/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch b/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
new file mode 100644
index 0000000000..75500a029a
--- /dev/null
+++ b/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
@@ -0,0 +1,18 @@
+In cross builds we will have to respect sysroot
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: mklibs-0.1.39/src/mklibs
+===================================================================
+--- mklibs-0.1.39.orig/src/mklibs 2014-03-01 18:25:36.000000000 +0000
++++ mklibs-0.1.39/src/mklibs 2014-10-19 00:51:46.813534596 +0000
+@@ -495,7 +495,7 @@
+ present_symbols = {}
+ checked_libs = small_libs
+ checked_libs.extend(available_libs)
+- checked_libs.append(ldlib)
++ checked_libs.append(sysroot + ldlib)
+ for lib in checked_libs:
+ for symbol in provided_symbols(lib):
+ debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
index ff8d5003ee..b2fcae576a 100644
--- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb
+++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
@@ -9,13 +9,10 @@ DEPENDS = "python-native dpkg-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 \
"
-SRC_URI[md5sum] = "38a579a531401eb76f4bab4ccfb774a2"
-SRC_URI[sha256sum] = "fa2881ab4fe72b0504878357f1fc6b17920459b56e8a60dfb083ca28fb64e733"
+SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
+SRC_URI[sha256sum] = "1db24ae779d21ccfed49f22e49a2b7ee43ec0e9197bc206d81cd02f96e91e125"
inherit autotools gettext native pythonnative
-
-do_configure_prepend() {
- sed "s+MKLIBS_VERSION+${PV}+" ${S}/configure.ac
-}
diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index d88520c786..c54e3513f5 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=17;md5=d7747fc87f1eb22b946ef819969503f0"
BRANCH ?= "master"
-SRCREV = "11f2ceabc4ad3f0dd568e0ce68166e4803e0615b"
+SRCREV = "f4eb241519f8d500ce6068a70d2389be39ac5189"
PV = "0.1"
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
new file mode 100644
index 0000000000..05f1629d58
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
@@ -0,0 +1,44 @@
+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_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index f78bc7e7f9..52297c63ba 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+ file://fix-armv7-neon-alignment.patch \
"
PV = "1.5.1+git${SRCPV}"
diff --git a/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch b/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
new file mode 100644
index 0000000000..cb454917ff
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
@@ -0,0 +1,23 @@
+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_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index d995c8f042..f6dd3361c9 100644
--- a/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -31,7 +31,9 @@ RRECOMMENDS_${PN} = "\
SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
file://mtools-makeinfo.patch \
file://mtools.patch \
- file://no-x11.patch"
+ file://no-x11.patch \
+ file://fix-broken-lz.patch \
+"
SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
diff --git a/meta/recipes-devtools/nasm/nasm_2.11.02.bb b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
index db84ec579f..4a69a6a92e 100644
--- a/meta/recipes-devtools/nasm/nasm_2.11.02.bb
+++ b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
@@ -6,8 +6,8 @@ COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-SRC_URI[md5sum] = "3bbc8ed83115b8caf7931f35ec3bc5e0"
-SRC_URI[sha256sum] = "ece26b5ef565f94d19a72756d05965e424d2e5ca55f88b949852da70dd62f0e0"
+SRC_URI[md5sum] = "9d93e8df5f5c005567f47ed6ca3a93d4"
+SRC_URI[sha256sum] = "87b6d97d6981ca468f9dafda44cf1bb1ba122cec329d4d389af5db04fa0c3e6c"
inherit autotools-brokensep
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 2d16660742..2800a5deb7 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
PROVIDES += "virtual/update-alternatives"
-SRCREV = "d14458499af7dd41d8e424946c164961421b0ddb"
+SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
PV = "0.1.8+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/opkg-utils"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
index b121827ac7..0cf6b8be40 100644
--- a/meta/recipes-devtools/opkg/opkg-collateral.bb
+++ b/meta/recipes-devtools/opkg/opkg-collateral.bb
@@ -8,12 +8,14 @@ SRC_URI = "file://opkg.conf.comments \
file://dest \
file://src "
+S = "${WORKDIR}"
+
OPKGLIBDIR = "${localstatedir}/lib"
do_compile () {
cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
- echo "lists_dir ext ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
+ echo "option lists_dir ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
}
do_install () {
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index ba21d84960..56c54b6ab7 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -27,7 +27,7 @@ OPKGLIBDIR = "${target_localstatedir}/lib"
PACKAGECONFIG ??= ""
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
+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"
diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
index cf95ee22c6..48de923590 100644
--- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch
+++ b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
@@ -1,4 +1,4 @@
-From 45a1e33a048f479b15b99d09df3dd1b62fef0253 Mon Sep 17 00:00:00 2001
+From 60c3f93e95a3ca54ef0a7eebc5ef29a5d92d3110 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:20:22 +0000
Subject: [PATCH 2/2] opkg-0.2.x: add-exclude
@@ -12,10 +12,14 @@ no error will be generated.
The lifespan of the exclude_list covers the execution of the process,
so there is no need to free the data.
-Upstream-Status: Pending
+v2: Use xmalloc instead of malloc and xrealloc instead of realloc. In opkg,
+these functions are guaranteed not to return NULL.
+
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
libopkg/opkg_conf.c | 1 +
libopkg/opkg_conf.h | 2 ++
@@ -24,10 +28,10 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
4 files changed, 34 insertions(+)
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
-index 1e65bad..9c4c854 100644
+index 4eee37b..1ab63fb 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
-@@ -442,6 +442,7 @@ opkg_conf_init(void)
+@@ -447,6 +447,7 @@ opkg_conf_init(void)
pkg_dest_list_init(&conf->pkg_dest_list);
pkg_dest_list_init(&conf->tmp_dest_list);
nv_pair_list_init(&conf->arch_list);
@@ -36,7 +40,7 @@ index 1e65bad..9c4c854 100644
return 0;
}
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 6045a58..ad58849 100644
+index 2f189e0..6d6e613 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -51,6 +51,8 @@ struct opkg_conf
@@ -49,10 +53,10 @@ index 6045a58..ad58849 100644
int restrict_to_default_dest;
pkg_dest_t *default_dest;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index d2d279e..b572e18 100644
+index 41bf206..eb630d1 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -212,6 +212,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -204,6 +204,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
continue;
}
@@ -76,7 +80,7 @@ index d2d279e..b572e18 100644
if (satisfying_pkg != NULL) {
satisfier_entry_pkg = satisfying_pkg;
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index 0315d41..0db2794 100644
+index 6378380..f10d10b 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -45,6 +45,7 @@ enum {
@@ -87,7 +91,7 @@ index 0315d41..0db2794 100644
ARGS_OPT_NOACTION,
ARGS_OPT_DOWNLOAD_ONLY,
ARGS_OPT_NODEPS,
-@@ -95,6 +96,7 @@ static struct option long_options[] = {
+@@ -97,6 +98,7 @@ static struct option long_options[] = {
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
{"add-dest", 1, 0, ARGS_OPT_ADD_DEST},
@@ -95,7 +99,7 @@ index 0315d41..0db2794 100644
{"test", 0, 0, ARGS_OPT_NOACTION},
{"tmp-dir", 1, 0, 't'},
{"tmp_dir", 1, 0, 't'},
-@@ -198,6 +200,18 @@ args_parse(int argc, char *argv[])
+@@ -200,6 +202,18 @@ args_parse(int argc, char *argv[])
}
free(tuple);
break;
@@ -103,18 +107,18 @@ index 0315d41..0db2794 100644
+ tuple = xstrdup(optarg);
+ if (!conf->exclude_list) {
+ conf->exclude_count = 1;
-+ conf->exclude_list = malloc(sizeof(char *) * conf->exclude_count);
++ conf->exclude_list = xmalloc(sizeof(char *) * conf->exclude_count);
+ conf->exclude_list[conf->exclude_count - 1] = tuple;
+ } else {
+ conf->exclude_count++;
-+ conf->exclude_list = realloc(conf->exclude_list, sizeof(char *) * conf->exclude_count);
++ conf->exclude_list = xrealloc(conf->exclude_list, sizeof(char *) * conf->exclude_count);
+ conf->exclude_list[conf->exclude_count - 1] = tuple;
+ }
+ break;
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
-@@ -282,6 +296,7 @@ usage()
+@@ -287,6 +301,7 @@ usage()
printf("\t--offline-root <dir> offline installation of packages.\n");
printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n");
printf("\t--add-dest <name>:<path> Register destination with given path\n");
@@ -123,5 +127,5 @@ index 0315d41..0db2794 100644
printf("\t than the higher version one if more\n");
printf("\t than one candidate is found.\n");
--
-1.9.1
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
new file mode 100644
index 0000000000..5e5eafcd97
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
@@ -0,0 +1,39 @@
+From 41425d67d3589b1912416a17f740d6407c7834f2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 8 Oct 2014 19:53:13 +0800
+Subject: [PATCH] libopkg/opkg_remove.c: avoid remove pkg repeatly with option
+ --force-removal-of-dependent-packages
+
+While remove pkg with '--force-removal-of-dependent-packages',
+pkg may be added to pkgs remove list multiple times, add status
+check to make sure pkg only be removed once.
+
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ libopkg/opkg_remove.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
+index 34f9154..a225e41 100644
+--- a/libopkg/opkg_remove.c
++++ b/libopkg/opkg_remove.c
+@@ -250,6 +250,14 @@ opkg_remove_pkg(pkg_t *pkg, int from_upgrade)
+ if ((parent_pkg = pkg->parent) == NULL)
+ return 0;
+
++ /* While remove pkg with '--force-removal-of-dependent-packages',
++ pkg may be added to remove list multiple times, add status
++ check to make sure pkg only be removed once. */
++ if (conf->force_removal_of_dependent_packages &&
++ pkg->state_flag & SF_FILELIST_CHANGED &&
++ pkg->state_status == SS_NOT_INSTALLED)
++ return 0;
++
+ /* only attempt to remove dependent installed packages if
+ * force_depends is not specified or the package is being
+ * replaced.
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
index bcca56c6ce..c2d244d26e 100644
--- a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
+++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
@@ -1,11 +1,11 @@
-From 610207c9bc82f20c77d6f234465e36857c997ea0 Mon Sep 17 00:00:00 2001
+From 2e2ccc7e7fc81a7eee2d004d3644efbc1be1ad73 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:19:08 +0000
Subject: [PATCH 1/2] opkg-0.2.x: no-install-recommends
Add the ability to not install ANY recommended packages.
-Upstream-Status: Pending
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
@@ -15,7 +15,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 38fa375..6045a58 100644
+index e0e045a..2f189e0 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -82,6 +82,7 @@ struct opkg_conf
@@ -27,10 +27,10 @@ index 38fa375..6045a58 100644
char *overlay_root;
int query_all;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index a4df7de..d2d279e 100644
+index 8ab6508..41bf206 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -19,6 +19,7 @@
+@@ -21,6 +21,7 @@
#include <ctype.h>
#include "pkg.h"
@@ -38,7 +38,7 @@ index a4df7de..d2d279e 100644
#include "opkg_utils.h"
#include "pkg_hash.h"
#include "opkg_message.h"
-@@ -204,7 +205,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -196,7 +197,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
/* user request overrides package recommendation */
if (satisfying_pkg != NULL
&& (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
@@ -48,18 +48,18 @@ index a4df7de..d2d279e 100644
"%s at user request\n",
pkg->name, satisfying_pkg->name);
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index b711511..0315d41 100644
+index a1d121f..6378380 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
-@@ -50,6 +50,7 @@ enum {
- ARGS_OPT_NODEPS,
+@@ -51,6 +51,7 @@ enum {
ARGS_OPT_AUTOREMOVE,
ARGS_OPT_CACHE,
+ ARGS_OPT_COMBINE,
+ ARGS_OPT_NOINSTALL_RECOMMENDS,
};
static struct option long_options[] = {
-@@ -89,6 +90,7 @@ static struct option long_options[] = {
+@@ -91,6 +92,7 @@ static struct option long_options[] = {
{"noaction", 0, 0, ARGS_OPT_NOACTION},
{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
{"nodeps", 0, 0, ARGS_OPT_NODEPS},
@@ -67,7 +67,7 @@ index b711511..0315d41 100644
{"offline", 1, 0, 'o'},
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
-@@ -199,6 +201,9 @@ args_parse(int argc, char *argv[])
+@@ -201,6 +203,9 @@ args_parse(int argc, char *argv[])
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
@@ -77,7 +77,7 @@ index b711511..0315d41 100644
case ARGS_OPT_DOWNLOAD_ONLY:
conf->download_only = 1;
break;
-@@ -293,6 +298,8 @@ usage()
+@@ -300,6 +305,8 @@ usage()
printf("\t--noaction No action -- test only\n");
printf("\t--download-only No action -- download only\n");
printf("\t--nodeps Do not follow dependencies\n");
@@ -87,5 +87,5 @@ index b711511..0315d41 100644
printf("\t Remove package and all dependencies\n");
printf("\t--autoremove Remove packages that were installed\n");
--
-1.9.1
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
new file mode 100644
index 0000000000..8bde02af0d
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
@@ -0,0 +1,32 @@
+From d480d837ff57e855d1cf0b63054d6b1ad7aaf2ee Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 6 Jan 2015 17:54:43 -0800
+Subject: [PATCH] Makefile.am: remove ACLOCAL_AMFLAGS = -I shave -I m4
+
+Fixed:
+libtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I shave.
+
+They are already included by configure.ac:
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIR([shave])
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8baa62c..6679f77 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-ACLOCAL_AMFLAGS = -I shave -I m4
+-
+ SUBDIRS = libbb libopkg src tests utils man
+
+
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.2.bb b/meta/recipes-devtools/opkg/opkg_0.2.2.bb
deleted file mode 100644
index 3dd74898b3..0000000000
--- a/meta/recipes-devtools/opkg/opkg_0.2.2.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require opkg.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://no-install-recommends.patch \
- file://add-exclude.patch \
- file://opkg-configure.service \
-"
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-SRC_URI[md5sum] = "b3ecef90d67d2aed2a14c2116a027482"
-SRC_URI[sha256sum] = "aa554ce7538544aac4f69e8274a0f9b8b433b8c3b1d00704bd393f713303a12b"
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
new file mode 100644
index 0000000000..0d08bf9e7e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
@@ -0,0 +1,14 @@
+require opkg.inc
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://no-install-recommends.patch \
+ file://add-exclude.patch \
+ file://opkg-configure.service \
+ file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
+ file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \
+"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd"
+SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086"
diff --git a/meta/recipes-devtools/orc/orc_0.4.18.bb b/meta/recipes-devtools/orc/orc_0.4.18.bb
deleted file mode 100644
index 2375d8c696..0000000000
--- a/meta/recipes-devtools/orc/orc_0.4.18.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require orc.inc
-
-PR = "${INC_PR}.0"
-
-SRC_URI[orc.md5sum] = "1a2552e8d127526c48d644fe6437b377"
-SRC_URI[orc.sha256sum] = "34d3c8a7259f42bed4dcfbc106c5e3d0cc8e17eeaa73128d1c5eaf92883a6a24"
diff --git a/meta/recipes-devtools/orc/orc.inc b/meta/recipes-devtools/orc/orc_0.4.23.bb
index b1348310ab..0e07731ac6 100644
--- a/meta/recipes-devtools/orc/orc.inc
+++ b/meta/recipes-devtools/orc/orc_0.4.23.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "http://code.entropywave.com/projects/orc/"
LICENSE = "BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-INC_PR = "r2"
-
-SRC_URI = "http://code.entropywave.com/download/orc/orc-${PV}.tar.gz;name=orc"
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz;name=orc"
+SRC_URI[orc.md5sum] = "72e0612ace54d77aa2f7a006348ee81a"
+SRC_URI[orc.sha256sum] = "767eaebce2941737b43368225ec54598b3055ca78b4dc50c4092f5fcdc0bdfe7"
inherit autotools pkgconfig
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
new file mode 100644
index 0000000000..f4f0ef870e
--- /dev/null
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
@@ -0,0 +1,26 @@
+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_1.6.2.bb b/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
index f524854a2d..160990c142 100644
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
@@ -25,6 +25,7 @@ SRC_URI = "http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz \
file://uuid-libtool.patch \
file://uuid-nostrip.patch \
file://install-pc.patch \
+ file://ldflags.patch \
"
SRC_URI[md5sum] = "5db0d43a9022a6ebbbc25337ae28942f"
SRC_URI[sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"
diff --git a/meta/recipes-devtools/patchelf/patchelf_0.8.bb b/meta/recipes-devtools/patchelf/patchelf_0.8.bb
new file mode 100644
index 0000000000..c1b87f5539
--- /dev/null
+++ b/meta/recipes-devtools/patchelf/patchelf_0.8.bb
@@ -0,0 +1,12 @@
+SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2"
+LICENSE = "GPLv3"
+SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
+
+SRC_URI[md5sum] = "5b151e3c83b31f5931b4a9fc01635bfd"
+SRC_URI[sha256sum] = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
index e79347f679..ea3d78ebaa 100644
--- a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb
+++ b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
@@ -9,8 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz"
-SRC_URI[md5sum] = "bc42279c5aff3682c12be40f72805cec"
-SRC_URI[sha256sum] = "844ff25b1a11bcef92ef34b22f576f226a772b67196818656f8874513438f5b9"
+SRC_URI[md5sum] = "34c41888cec67759c21333bef13e950c"
+SRC_URI[sha256sum] = "578801df0661b1b7b8fed0ce4a9859239f919fd37529907681e51091a1bcb4de"
+
+RDEPENDS_${PN} += "bash python"
do_install() {
oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 26241e884c..9ccd417398 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -1,15 +1,13 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
DEPENDS += "expat expat-native"
-PR = "r3"
-
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
-SRC_URI[md5sum] = "c320d2ffa459e6cdc6f9f59c1185855e"
-SRC_URI[sha256sum] = "b48197cd2265a26c5f016489f11a7b450d8833cb8b3d6a46ee15975740894de9"
+SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
+SRC_URI[sha256sum] = "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216"
S = "${WORKDIR}/XML-Parser-${PV}"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
index 1fcb3224e8..b72afc0ca4 100644
--- a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
@@ -6,7 +6,7 @@ on top of an underlying XML parsing module to maintain XML files \
where the original uses plain Perl or SAX parsers."
HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7dbb3e2241fac8457967053fc1a1ddb"
DEPENDS += "libxml-parser-perl"
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/config.sh b/meta/recipes-devtools/perl/perl-5.20.0/config.sh
index 2532c8d413..1ac1355829 100644
--- a/meta/recipes-devtools/perl/perl-5.20.0/config.sh
+++ b/meta/recipes-devtools/perl/perl-5.20.0/config.sh
@@ -1104,3 +1104,10 @@ usekernprocpathname='undef'
usensgetexecutablepath='undef'
st_ino_sign='1'
st_ino_size='4'
+
+# 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-5.20.0/fix-FF_MORE-crash.patch b/meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch
new file mode 100644
index 0000000000..9ec041c833
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.20.0/fix-FF_MORE-crash.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Backport
+Reference: https://rt.perl.org/Public/Bug/Display.html?id=123591
+ From 62db6ea5fed19611596cbc5fc0b8a4df2c604e58 Mon Sep 17 00:00:00 2001
+ From: Tony Cook <tony@develop-help.com>
+ Date: Mon, 19 Jan 2015 16:03:18 +1100
+ Subject: [PATCH 1/1] [perl #123538] always set chophere and itembytes at the same time
+
+ Previously this would crash in FF_MORE because chophere was still NULL.
+
+Signed-off-by: Gary Thomas <gary@mlbassoc.com>
+Index: perl-5.20.0/pp_ctl.c
+===================================================================
+--- perl-5.20.0.orig/pp_ctl.c
++++ perl-5.20.0/pp_ctl.c
+@@ -590,6 +590,7 @@ PP(pp_formline)
+ break;
+ }
+ itembytes = s - item;
++ chophere = s;
+ break;
+ }
diff --git a/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
new file mode 100644
index 0000000000..de6f65294c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.20.0/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
@@ -0,0 +1,30 @@
+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-5.20.0/run-ptest b/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
index ed59b4b145..1e2dd1b66d 100644
--- a/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
+++ b/meta/recipes-devtools/perl/perl-5.20.0/run-ptest
@@ -1,2 +1,2 @@
#!/bin/sh
-cd t && ./TEST | sed -u -e 's/^\([^. \t]*\)\.\.\.\+ok/PASS: \1/' -e 's/^\([^. \t]*\)\.\.\.\+skipped/SKIP: \1/' -e 's/^\([^. \t]*\)\.\.\.\+\(.*\)/FAIL: \1\n\2/'
+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-native_5.20.0.bb b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
index 4364d41b35..586a347c0f 100644
--- a/meta/recipes-devtools/perl/perl-native_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
@@ -103,8 +103,13 @@ do_install () {
install $i ${D}${libdir}/perl/${PV}/CORE
done
- create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
- create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
+ create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}'
+ create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl${STAGING_LIBDIR}/perl:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_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"
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index 6a9df4ad4a..948ea7cddf 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -8,7 +8,7 @@ do_install_ptest () {
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
index 47a7548de4..041471a046 100644
--- a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
@@ -12,6 +12,8 @@
#| 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-build-.*|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/
+RDEPENDS_perl-misc += "perl"
+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"
@@ -345,36 +347,56 @@ 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-archive-tar"
RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-build"
RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-config-git"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-compress-zlib"
RDEPENDS_${PN}-module-cpan += "${PN}-module-cpan"
RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-md5"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-digest-sha"
RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-cbuilder"
RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-mm-unix"
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-file-glob"
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-file-temp"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-http-tiny"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-io-compress-base"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-json-pp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
RDEPENDS_${PN}-module-cpan += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ftp"
RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-parse-cpan-meta"
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-test-harness"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-test-more"
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-unicore"
RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
RDEPENDS_${PN}-module-cpan += "${PN}-module-version"
RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
diff --git a/meta/recipes-devtools/perl/perl_5.20.0.bb b/meta/recipes-devtools/perl/perl_5.20.0.bb
index 4bd452512d..db65202ec8 100644
--- a/meta/recipes-devtools/perl/perl_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "devel"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
# We need gnugrep (for -I)
@@ -63,6 +63,7 @@ SRC_URI += " \
file://fix_bad_rpath.patch \
file://perl-archlib-exp.patch \
file://dynaloaderhack.patch \
+ file://fix-FF_MORE-crash.patch \
\
\
file://config.sh \
@@ -74,6 +75,7 @@ SRC_URI += " \
file://config.sh-64-be \
file://perl-5.14.3-fix-CVE-2010-4777.patch \
file://0001-Makefile.SH-fix-do_install-failed.patch \
+ file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
"
# Fix test case issues
@@ -93,6 +95,11 @@ 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}/"
+
# LDFLAGS for shared libraries
export LDDLFLAGS = "${LDFLAGS} -shared"
@@ -116,6 +123,16 @@ 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
@@ -188,7 +205,7 @@ do_compile() {
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" ext/Errno/Errno_pm.PL
sed -i -e "s|\([ \"\']\+\)/usr/include|\1${STAGING_INCDIR}|g" cpan/Compress-Raw-Zlib/config.in
sed -i -e 's|/usr/lib|""|g' cpan/Compress-Raw-Zlib/config.in
- sed -i -e 's|SYSROOTLIB|${STAGING_LIBDIR}|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+ sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
cd Cross
oe_runmake perl LD="${CCLD}"
@@ -220,7 +237,7 @@ do_install() {
do_install_append_class-nativesdk () {
create_wrapper ${D}${bindir}/perl \
- PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+ PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}'
}
PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
index 62c886fce1..c4ada808ab 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -35,7 +35,7 @@ FILES_${PN} += "${datadir}/aclocal/pkg.m4"
# 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) (= ${PV})"
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
# 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.
diff --git a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
index 41b9a6e49e..7dc45c68f2 100644
--- a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb
+++ b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
@@ -2,12 +2,12 @@ SUMMARY = "Postinstall scriptlets"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-FILES_${PN}_append_class-nativesdk = " ${datadir}/postinst-intercepts/*"
+FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
-do_install_append_class-nativesdk() {
+do_install() {
install -d ${D}${datadir}/postinst-intercepts
install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
@@ -15,5 +15,5 @@ do_install_append_class-nativesdk() {
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
}
-BBCLASSEXTEND = "nativesdk"
+inherit nativesdk
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 3288822102..56781a4091 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -8,7 +8,7 @@ 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 = "6822ec76aa95f278195aeae59d4868ef224d7e4d"
+SRCREV = "faa069deec99bf61418d0bab831c83d7c1b797ca"
PV = "1.0+git${SRCPV}"
#
diff --git a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch b/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
deleted file mode 100644
index b5c81c9d3e..0000000000
--- a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-From be97cb958f2934fa398fc8e344b25b84ebd4e90c Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 25 Aug 2013 19:22:09 -0500
-Subject: [PATCH] pseudo_has_unload: add function
-
-Various wrappers checked for a non-null pseudo_get_value("PSEUDO_UNLOAD") to
-determine whether the environment should include the pseudo variables. None
-of those checks freed the returned value when it was not null. The new
-check function does.
-
-The new check function also sees whether PSEUDO_UNLOAD was defined in the
-environment that should be used in the wrapped system call. This allows
-pkg_postinst scripts to strip out the LD_PRELOAD setting, for example before
-invoking qemu to execute commands in an environment that does not have
-libpseudo.so.
-
-[YOCTO #4843]
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- ports/common/guts/execv.c | 2 +-
- ports/common/guts/execve.c | 2 +-
- ports/common/guts/execvp.c | 2 +-
- ports/common/guts/fork.c | 2 +-
- ports/linux/newclone/pseudo_wrappers.c | 2 +-
- ports/linux/oldclone/pseudo_wrappers.c | 2 +-
- ports/unix/guts/popen.c | 2 +-
- ports/unix/guts/system.c | 2 +-
- pseudo.h | 1 +
- pseudo_util.c | 27 +++++++++++++++++++++++++++
- 10 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/ports/common/guts/execv.c b/ports/common/guts/execv.c
-index 763e1f9..3e1f820 100644
---- a/ports/common/guts/execv.c
-+++ b/ports/common/guts/execv.c
-@@ -19,7 +19,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execve.c b/ports/common/guts/execve.c
-index a003657..ff6a44e 100644
---- a/ports/common/guts/execve.c
-+++ b/ports/common/guts/execve.c
-@@ -20,7 +20,7 @@
- }
-
- new_environ = pseudo_setupenvp(envp);
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(new_environ))
- new_environ = pseudo_dropenvp(new_environ);
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execvp.c b/ports/common/guts/execvp.c
-index 5e75be7..04253c3 100644
---- a/ports/common/guts/execvp.c
-+++ b/ports/common/guts/execvp.c
-@@ -20,7 +20,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/fork.c b/ports/common/guts/fork.c
-index df8abd7..bebe3b0 100644
---- a/ports/common/guts/fork.c
-+++ b/ports/common/guts/fork.c
-@@ -12,7 +12,7 @@
- */
- if (rc == 0) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/newclone/pseudo_wrappers.c b/ports/linux/newclone/pseudo_wrappers.c
-index 9dbac42..257e8bb 100644
---- a/ports/linux/newclone/pseudo_wrappers.c
-+++ b/ports/linux/newclone/pseudo_wrappers.c
-@@ -28,7 +28,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/oldclone/pseudo_wrappers.c b/ports/linux/oldclone/pseudo_wrappers.c
-index c0ce5dd..598d966 100644
---- a/ports/linux/oldclone/pseudo_wrappers.c
-+++ b/ports/linux/oldclone/pseudo_wrappers.c
-@@ -22,7 +22,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/unix/guts/popen.c b/ports/unix/guts/popen.c
-index 0ca16b0..5d44c0e 100644
---- a/ports/unix/guts/popen.c
-+++ b/ports/unix/guts/popen.c
-@@ -9,7 +9,7 @@
- * in ways that avoid our usual enforcement of the environment.
- */
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_popen(command, mode);
-diff --git a/ports/unix/guts/system.c b/ports/unix/guts/system.c
-index 028b372..6351592 100644
---- a/ports/unix/guts/system.c
-+++ b/ports/unix/guts/system.c
-@@ -9,7 +9,7 @@
- return 1;
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_system(command);
-diff --git a/pseudo.h b/pseudo.h
-index 56760a4..f600793 100644
---- a/pseudo.h
-+++ b/pseudo.h
-@@ -28,6 +28,7 @@ extern void pseudo_init_client(void);
- void pseudo_dump_env(char **envp);
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-+int pseudo_has_unload(char * const *envp);
-
- #include "pseudo_tables.h"
-
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 8d0969e..16c70e0 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -95,6 +95,33 @@ dump_env(char **envp) {
- }
- #endif
-
-+int
-+pseudo_has_unload(char * const *envp) {
-+ static const char unload[] = "PSEUDO_UNLOAD";
-+ static size_t unload_len = strlen(unload);
-+ size_t i = 0;
-+
-+ /* Is it in the caller environment? */
-+ if (NULL != getenv(unload))
-+ return 1;
-+
-+ /* Is it in the environment cache? */
-+ if (pseudo_util_initted == -1)
-+ pseudo_init_util();
-+ while (pseudo_env[i].key && strcmp(pseudo_env[i].key, unload))
-+ ++i;
-+ if (pseudo_env[i].key && pseudo_env[i].value)
-+ return 1;
-+
-+ /* Is it in the operational environment? */
-+ while (envp && *envp) {
-+ if ((!strncmp(*envp, unload, unload_len)) && ('=' == (*envp)[unload_len]))
-+ return 1;
-+ ++envp;
-+ }
-+ return 0;
-+}
-+
- /* Caller must free memory! */
- char *
- pseudo_get_value(const char *key) {
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/pseudo/files/fallback-group b/meta/recipes-devtools/pseudo/files/fallback-group
new file mode 100644
index 0000000000..81bf732312
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-group
@@ -0,0 +1,2 @@
+root:*:0:
+mail:*:8:
diff --git a/meta/recipes-devtools/pseudo/files/fallback-passwd b/meta/recipes-devtools/pseudo/files/fallback-passwd
new file mode 100644
index 0000000000..c1458dc0f6
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-passwd
@@ -0,0 +1 @@
+root::0:0:root:/home/root:/bin/sh
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
deleted file mode 100644
index e8eaf13f74..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Backport
-
-when install command sets the created directory mode, pseudo will change
-the mode of the directory to 0700 incorrectly.
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -25,6 +25,7 @@
- stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
- #endif
- if (stat_rc != -1) {
-+ buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
- pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
- } else {
- pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch b/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
deleted file mode 100644
index 7b1f82d577..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-commit 7e67d082737b3df4788caf85fedd607b3acd9786
-Author: Peter Seebach <peter.seebach@windriver.com>
-Date: Fri May 16 15:53:06 2014 -0500
-
- permissions updates: improve fchmodat, mask out write bits
-
- Upstream-Status: Backport of several patches from 1.6 branch,
- combined.
-
- Backport from pseudo 1.6 of improvements to fchmodat (handle
- AT_SYMLINK_NOFOLLOW by rejecting it if the host system does,
- to make GNU tar happier), also mask out write bits from filesystem
- modes to avoid security problems.
-
- Also start tracking umask so we can use the right modes for
- open, mkdir, and mknod.
-
- The 1.6 patches are:
-
- 87c53ea58befef48677846693aab445df1850e16
- 3c716e0bab4f0cfe4be84caa9ce5fd5e3f5e2a23
- c98e4f43b5d6499748a5057134408f4ba4854fb4
- 2f71a021b725c1aa415439209a89327f0b997d02
- 14925786b55202d8147b0af719038e8a23ef73c0
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index 113f675..cc966ce 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,18 @@
-+2014-05-27:
-+ * (seebs) start noticing umask, mask it out from open or mkdir
-+ calls rather than relying on underlying open/mkdir to do it.
-+
-+2014-05-16:
-+ * (seebs) fchmodat: don't drop flags, report failures, to improve
-+ compatibility/consistency. Cache the knowledge that
-+ AT_SYMLINK_NOFOLLOW gets ENOTSUP.
-+ * (seebs) mask out group/other write bits in real filesystem to
-+ reduce risks when assembling a rootfs including world-writeable
-+ directories.
-+
-+2014-05-15:
-+ * (seebs) drop flags when calling fchmodat() to appease GNU tar.
-+
- 2013-02-27:
- * (seebs) Oh, hey, what if I took out my debug messages?
- * (seebs) update docs a bit to reduce bitrot
-diff --git a/makewrappers b/makewrappers
-index e87cc56..0127766 100755
---- a/makewrappers
-+++ b/makewrappers
-@@ -204,6 +204,7 @@ class Function:
- 'uid_t': '0',
- 'int': '-1',
- 'long': '-1',
-+ 'mode_t': '0',
- 'ssize_t': '-1'
- }
-
-diff --git a/ports/darwin/guts/open.c b/ports/darwin/guts/open.c
-index c66cc15..520bb70 100644
---- a/ports/darwin/guts/open.c
-+++ b/ports/darwin/guts/open.c
-@@ -9,6 +9,9 @@
- struct stat buf = { };
- int existed = 1;
- int save_errno;
-+
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_FORCE_ASYNCH
- flags &= ~O_SYNC;
- #endif
-diff --git a/ports/linux/guts/__xmknodat.c b/ports/linux/guts/__xmknodat.c
-index 59b4f2f..0888b8a 100644
---- a/ports/linux/guts/__xmknodat.c
-+++ b/ports/linux/guts/__xmknodat.c
-@@ -9,6 +9,9 @@
- pseudo_msg_t *msg;
- struct stat64 buf;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- /* we don't use underlying call, so _ver is irrelevant to us */
- (void) ver;
-
-diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c
-index 8460073..4053549 100644
---- a/ports/linux/guts/openat.c
-+++ b/ports/linux/guts/openat.c
-@@ -10,6 +10,9 @@
- int existed = 1;
- int save_errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c
-index 59a92ce..69a953c 100644
---- a/ports/unix/guts/fchmodat.c
-+++ b/ports/unix/guts/fchmodat.c
-@@ -8,6 +8,7 @@
- */
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-+ static int picky_fchmodat = 0;
-
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
-@@ -15,6 +16,16 @@
- return -1;
- }
- if (flags & AT_SYMLINK_NOFOLLOW) {
-+ /* Linux, as of this writing, will always reject this.
-+ * GNU tar relies on getting the rejection. To cut down
-+ * on traffic, we check for the failure, and if we saw
-+ * a failure previously, we reject it right away and tell
-+ * the caller to retry.
-+ */
-+ if (picky_fchmodat) {
-+ errno = ENOTSUP;
-+ return -1;
-+ }
- rc = base_lstat(path, &buf);
- } else {
- rc = base_stat(path, &buf);
-@@ -50,13 +61,22 @@
-
- /* user bits added so "root" can always access files. */
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
-- /* note: if path was a symlink, and AT_NOFOLLOW_SYMLINKS was
-+ /* note: if path was a symlink, and AT_SYMLINK_NOFOLLOW was
- * specified, we already bailed previously. */
- real_chmod(path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)));
- #else
-- real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ rc = real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ /* AT_SYMLINK_NOFOLLOW isn't supported by fchmodat. GNU tar
-+ * tries to use it anyway, figuring it can just retry if that
-+ * fails. So we want to report that *particular* failure instead
-+ * of doing the fallback.
-+ */
-+ if (rc == -1 && errno == ENOTSUP && (flags & AT_SYMLINK_NOFOLLOW)) {
-+ picky_fchmodat = 1;
-+ return -1;
-+ }
- #endif
-- /* we ignore a failure from underlying fchmod, because pseudo
-+ /* we otherwise ignore failures from underlying fchmod, because pseudo
- * may believe you are permitted to change modes that the filesystem
- * doesn't. Note that we also don't need to know whether the
- * file might be a (pseudo) block device or some such; pseudo
-diff --git a/ports/unix/guts/mkdirat.c b/ports/unix/guts/mkdirat.c
-index e846b70..e0b6af9 100644
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -6,11 +6,14 @@
- * wrap_mkdirat(int dirfd, const char *path, mode_t mode) {
- * int rc = -1;
- */
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
- return -1;
- }
-+
- rc = real_mkdir(path, PSEUDO_FS_MODE(mode, 1));
- #else
- rc = real_mkdirat(dirfd, path, PSEUDO_FS_MODE(mode, 1));
-diff --git a/ports/unix/guts/mknodat.c b/ports/unix/guts/mknodat.c
-index 6fd5b42..5d8d47c 100644
---- a/ports/unix/guts/mknodat.c
-+++ b/ports/unix/guts/mknodat.c
-@@ -10,6 +10,9 @@
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/umask.c b/ports/unix/guts/umask.c
-new file mode 100644
-index 0000000..6b060d3
---- /dev/null
-+++ b/ports/unix/guts/umask.c
-@@ -0,0 +1,14 @@
-+/*
-+ * Copyright (c) 2014 Wind River Systems; see
-+ * guts/COPYRIGHT for information.
-+ *
-+ * mode_t umask(mode_t mask)
-+ * mode_t rc = 0;
-+ */
-+
-+ pseudo_umask = mask;
-+ rc = real_umask(mask);
-+
-+/* return rc;
-+ * }
-+ */
-diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in
-index 8460a65..e0e9739 100644
---- a/ports/unix/wrapfuncs.in
-+++ b/ports/unix/wrapfuncs.in
-@@ -67,3 +67,4 @@ void sync(void); /* async_skip= */
- int syncfs(int fd); /* async_skip=0 */
- int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); /* async_skip=0 */
- int msync(void *addr, size_t length, int flags); /* async_skip=0 */
-+mode_t umask(mode_t mask);
-diff --git a/pseudo_client.c b/pseudo_client.c
-index b6d11a6..535c810 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -71,6 +71,8 @@ int pseudo_disabled = 0;
- int pseudo_allow_fsync = 0;
- static int pseudo_local_only = 0;
-
-+int pseudo_umask = 022;
-+
- static char **fd_paths = NULL;
- static int nfds = 0;
- static int messages = 0;
-@@ -219,6 +221,9 @@ pseudo_init_client(void) {
- if (!pseudo_disabled && !pseudo_inited) {
- char *pseudo_path = 0;
-
-+ pseudo_umask = umask(022);
-+ umask(pseudo_umask);
-+
- pseudo_path = pseudo_prefix_path(NULL);
- if (pseudo_prefix_dir_fd == -1) {
- if (pseudo_path) {
-diff --git a/pseudo_client.h b/pseudo_client.h
-index f36a772..5bf820e 100644
---- a/pseudo_client.h
-+++ b/pseudo_client.h
-@@ -72,6 +72,8 @@ extern char *pseudo_passwd;
- extern size_t pseudo_chroot_len;
- extern int pseudo_nosymlinkexp;
-
-+extern int pseudo_umask;
-+
- /* Root can read and write files, and enter directories which have no
- * read, write, or execute permissions. (But can't execute files without
- * execute permissions!)
-@@ -85,6 +87,6 @@ extern int pseudo_nosymlinkexp;
- * None of this will behave very sensibly if umask has 0700 bits in it;
- * this is a known limitation.
- */
--#define PSEUDO_FS_MODE(mode, isdir) ((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0))
--#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0700) | ((user_mode & 0700)))
-+#define PSEUDO_FS_MODE(mode, isdir) (((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0)) & ~(S_IWGRP | S_IWOTH))
-+#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0722) | ((user_mode & 0722)))
-
diff --git a/meta/recipes-devtools/pseudo/files/shutdownping.patch b/meta/recipes-devtools/pseudo/files/shutdownping.patch
deleted file mode 100644
index 8af8e0b594..0000000000
--- a/meta/recipes-devtools/pseudo/files/shutdownping.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-There is a potential issue with the fastop code in pseudo since a process may
-exit and allow some other function to run before the server has processed
-the commands run by the process. Issues have been see with unpredictable
-file permissions.
-
-To avoid this, we ping the server before exitting which guarantees it has
-processed the current command queue.
-
-Debugged-by: RP
-Fix written by peter.seebach@windriver.com
-
-Upstream-Status: Submitted
-
-[YOCTO #5132]
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index f58ce4c..20943b6 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -75,6 +75,9 @@ static int nfds = 0;
- static int messages = 0;
- static struct timeval message_time = { .tv_sec = 0 };
- static int pseudo_inited = 0;
-+
-+static int sent_messages = 0;
-+
- int pseudo_nosymlinkexp = 0;
-
- /* note: these are int, not uid_t/gid_t, so I can use 'em with scanf */
-@@ -711,6 +714,11 @@ client_ping(void) {
- return 0;
- }
-
-+static void
-+void_client_ping(void) {
-+ client_ping();
-+}
-+
- int
- pseudo_fd(int fd, int how) {
- int newfd;
-@@ -1043,6 +1051,11 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
- /* disable wrappers */
- pseudo_antimagic();
-
-+ if (!sent_messages) {
-+ sent_messages = 1;
-+ atexit(void_client_ping);
-+ }
-+
- if (op == OP_RENAME) {
- va_list ap;
- va_start(ap, buf);
diff --git a/meta/recipes-devtools/pseudo/files/symver.patch b/meta/recipes-devtools/pseudo/files/symver.patch
deleted file mode 100644
index 8d1b377ec0..0000000000
--- a/meta/recipes-devtools/pseudo/files/symver.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-When running as pseudo-nativesdk, we might need to run host binaries
-linked against the host libc. Having a 2.14 libc dependency from memcpy is
-problematic so instruct the linker to use older symbols.
-
-Upstream-Status: Pending
-
-RP 2012/4/22
-
-Index: pseudo-1.3/pseudo.h
-===================================================================
---- pseudo-1.3.orig/pseudo.h 2012-04-22 12:17:59.078909060 +0000
-+++ pseudo-1.3/pseudo.h 2012-04-22 12:32:42.954888587 +0000
-@@ -29,6 +29,13 @@
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-
-+#ifdef __amd64__
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.2.5")
-+#else
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.0")
-+#endif
-+GLIBC_COMPAT_SYMBOL(memcpy);
-+
- #include "pseudo_tables.h"
-
- extern void pseudo_debug_verbose(void);
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 42738abfc5..11a8514675 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -7,11 +7,7 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/pseudo"
LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
SECTION = "base"
LICENSE = "LGPL2.1"
-DEPENDS = "sqlite3"
-
-SRC_URI_append_class-nativesdk = " file://symver.patch"
-
-SRC_URI_append_class-native = " file://symver.patch"
+DEPENDS = "sqlite3 attr"
FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
deleted file mode 100644
index 47291fd52e..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require pseudo.inc
-
-PR = "r5"
-
-SRC_URI = " \
- http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://0001-pseudo_has_unload-add-function.patch \
- file://shutdownping.patch \
- file://pseudo-1.5.1-install-directory-mode.patch \
- file://pseudo-fchmodat-permissions.patch \
-"
-
-SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
-SRC_URI[sha256sum] = "3b896f592f4d568569bd02323fad2d6b8c398e16ca36ee5a8947d2ff6c1d3d52"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
new file mode 100644
index 0000000000..3d5b1fbd3e
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
@@ -0,0 +1,19 @@
+require pseudo.inc
+
+SRC_URI = " \
+ http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://fallback-passwd \
+ file://fallback-group \
+"
+
+SRC_URI[md5sum] = "2fb800c90d643bfce55e1ce5ca67f3b3"
+SRC_URI[sha256sum] = "25a7528f9191f74cceccc08a90c00086f2b3a9f6b900ea419a4f092de9a06775"
+
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+
+do_install_append_class-native () {
+ install -d ${D}${sysconfdir}
+ # The fallback files should never be modified
+ install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
+ install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+}
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 66fc85ff8d..b505910fb5 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,7 +1,7 @@
require pseudo.inc
-SRCREV = "b9eb2b5633b5a23efe72c950494728d93c2b5823"
-PV = "1.5.1+git${SRCPV}"
+SRCREV = "41389d4279d6a5f694615906217f481605b183b7"
+PV = "1.6.4+git${SRCPV}"
DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc
deleted file mode 100644
index 0738c59ada..0000000000
--- a/meta/recipes-devtools/python/fix-path.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-do_install_append() {
- for i in `find ${D} -name "*.py"` ; do \
- sed -i -e s:${D}::g $i
- done
-
- for i in `find ${D} -name "*.la"` ; do \
- sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
- done
-
- if test -e ${D}${bindir} ; then
- for i in ${D}${bindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-
- if test -e ${D}${sbindir} ; then
- for i in ${D}${sbindir}/* ; do \
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- done
- fi
-}
-
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc
index a8afe13a79..2e68a26cbd 100644
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ b/meta/recipes-devtools/python/python-2.7-manifest.inc
@@ -5,14 +5,18 @@
-PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
+SUMMARY_${PN}-argparse="Python command line argument parser"
+RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
+FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
+
SUMMARY_${PN}-audio="Python Audio Handling"
RDEPENDS_${PN}-audio="${PN}-core"
FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
@@ -37,6 +41,10 @@ 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. See PEP 343."
+RDEPENDS_${PN}-contextlib="${PN}-core"
+FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.py* "
+
SUMMARY_${PN}-core="Python interpreter and core modules"
RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
@@ -122,11 +130,11 @@ 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"
+RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient"
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"
+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"
@@ -274,7 +282,7 @@ RDEPENDS_${PN}-zlib="${PN}-core"
FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/python/python-3.3-manifest.inc b/meta/recipes-devtools/python/python-3.3-manifest.inc
index 46a2d441af..61119c687c 100644
--- a/meta/recipes-devtools/python/python-3.3-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.3-manifest.inc
@@ -5,9 +5,9 @@
-PROVIDES+="${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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 "
+PROVIDES+="${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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 "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
@@ -30,8 +30,8 @@ RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
FILES_${PN}-compression="${libdir}/python3.3/gzip.* ${libdir}/python3.3/zipfile.* ${libdir}/python3.3/tarfile.* ${libdir}/python3.3/lib-dynload/bz2.*.so "
SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copy_reg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
+FILES_${PN}-core="${libdir}/python3.3/__future__.* ${libdir}/python3.3/_abcoll.* ${libdir}/python3.3/abc.* ${libdir}/python3.3/copy.* ${libdir}/python3.3/copyreg.* ${libdir}/python3.3/ConfigParser.* ${libdir}/python3.3/genericpath.* ${libdir}/python3.3/getopt.* ${libdir}/python3.3/linecache.* ${libdir}/python3.3/new.* ${libdir}/python3.3/os.* ${libdir}/python3.3/posixpath.* ${libdir}/python3.3/struct.* ${libdir}/python3.3/warnings.* ${libdir}/python3.3/site.* ${libdir}/python3.3/stat.* ${libdir}/python3.3/UserDict.* ${libdir}/python3.3/UserList.* ${libdir}/python3.3/UserString.* ${libdir}/python3.3/lib-dynload/binascii.*.so ${libdir}/python3.3/lib-dynload/_struct.*.so ${libdir}/python3.3/lib-dynload/time.*.so ${libdir}/python3.3/lib-dynload/xreadlines.*.so ${libdir}/python3.3/types.* ${libdir}/python3.3/platform.* ${bindir}/python* ${libdir}/python3.3/_weakrefset.* ${libdir}/python3.3/sysconfig.* ${libdir}/python3.3/_sysconfigdata.* ${libdir}/python3.3/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
RDEPENDS_${PN}-crypt="${PN}-core"
@@ -185,6 +185,10 @@ SUMMARY_${PN}-readline="Python readline support"
RDEPENDS_${PN}-readline="${PN}-core"
FILES_${PN}-readline="${libdir}/python3.3/lib-dynload/readline.*.so ${libdir}/python3.3/rlcompleter.* "
+SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
+RDEPENDS_${PN}-reprlib="${PN}-core"
+FILES_${PN}-reprlib="${libdir}/python3.3/reprlib.py "
+
SUMMARY_${PN}-resource="Python resource control interface"
RDEPENDS_${PN}-resource="${PN}-core"
FILES_${PN}-resource="${libdir}/python3.3/lib-dynload/resource.*.so "
@@ -258,7 +262,7 @@ RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
FILES_${PN}-xmlrpc="${libdir}/python3.3/xmlrpclib.* ${libdir}/python3.3/SimpleXMLRPCServer.* ${libdir}/python3.3/DocXMLRPCServer.* ${libdir}/python3.3/xmlrpc "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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 "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${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}-elementtree ${PN}-email ${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}-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 "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/python/python-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
deleted file mode 100644
index b2850a3831..0000000000
--- a/meta/recipes-devtools/python/python-argparse_1.2.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Python command-line parsing library"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8"
-SRCNAME = "argparse"
-PR = "r4"
-RDEPENDS_${PN} += "python-codecs python-textutils"
-
-SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c"
-SRC_URI[sha256sum] = "ddaf4b0a618335a32b6664d4ae038a1de8fbada3b25033f9021510ed2b3941a4"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python-dbus_1.2.0.bb b/meta/recipes-devtools/python/python-dbus_1.2.0.bb
index e64f99f87a..b314dce1c7 100644
--- a/meta/recipes-devtools/python/python-dbus_1.2.0.bb
+++ b/meta/recipes-devtools/python/python-dbus_1.2.0.bb
@@ -14,6 +14,10 @@ S = "${WORKDIR}/dbus-python-${PV}"
inherit distutils-base autotools pkgconfig
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python-docutils-native python-epydoc-native"
+
export BUILD_SYS
export HOST_SYS
diff --git a/meta/recipes-devtools/python/python-distribute_0.6.32.bb b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
index 58bb8b4545..70001457e0 100644
--- a/meta/recipes-devtools/python/python-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -39,6 +39,12 @@ do_install_append() {
echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
}
+do_install_append_class-nativesdk() {
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' ${D}${bindir}/easy_install-${PYTHON_BASEVERSION}
+}
+
RDEPENDS_${PN} = "\
python-distutils \
python-compression \
@@ -46,4 +52,4 @@ RDEPENDS_${PN} = "\
RPROVIDES_${PN} += "python-setuptools"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-docutils_0.11.bb b/meta/recipes-devtools/python/python-docutils_0.12.bb
index f5da973d99..8cda88d277 100644
--- a/meta/recipes-devtools/python/python-docutils_0.11.bb
+++ b/meta/recipes-devtools/python/python-docutils_0.12.bb
@@ -2,13 +2,13 @@ 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=da0d261d1db78ab21ce86c79364a4098"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
DEPENDS = "python"
SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "20ac380a18b369824276864d98ec0ad6"
-SRC_URI[sha256sum] = "9af4166adf364447289c5c697bb83c52f1d6f57e77849abcccd6a4a18a5e7ec9"
+SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
+SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
S = "${WORKDIR}/docutils-${PV}"
diff --git a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb b/meta/recipes-devtools/python/python-git_0.3.3.bb
index 02a0eac040..860c37bf99 100644
--- a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb
+++ b/meta/recipes-devtools/python/python-git_0.3.3.bb
@@ -10,8 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
DEPENDS = "python-gitdb"
SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-SRC_URI[md5sum] = "849082fe29adc653a3621465213cab96"
-SRC_URI[sha256sum] = "fd6786684a0d0dd7ebb961da754e3312fafe0c8e88f55ceb09858aa0af6094e0"
+
+SRC_URI[md5sum] = "c9fdde02c476c11168fd620659496aba"
+SRC_URI[sha256sum] = "08193acf4e22b57a471cde3748ebce7c17e0f15f1e5042db74ca2c5e9e3e4db5"
S = "${WORKDIR}/GitPython-${PV}"
diff --git a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb b/meta/recipes-devtools/python/python-gitdb_0.6.1.bb
index 9e961528b9..ead93e1e7d 100644
--- a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb
+++ b/meta/recipes-devtools/python/python-gitdb_0.6.1.bb
@@ -6,8 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
DEPENDS = "python-async python-smmap"
SRC_URI = "https://pypi.python.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
-SRC_URI[md5sum] = "25353bb8d3ea527ba443dd88cd4e8a1c"
-SRC_URI[sha256sum] = "de5d2dac0daec4a9cd7bb1ae1cd42d53510dcf597397c608c12a154b69ad3783"
+
+SRC_URI[md5sum] = "daeb85a5e97d2d100fd37cf522fd65d5"
+SRC_URI[sha256sum] = "0d784ec4a75e93c8f65d4aca219c17e388a052d461714ed0edfda657e542b716"
S = "${WORKDIR}/gitdb-${PV}"
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb
index 0571d3a488..e55f5feac2 100644
--- a/meta/recipes-devtools/python/python-native_2.7.3.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.3.bb
@@ -19,6 +19,7 @@ SRC_URI += "\
file://parallel-makeinst-create-bindir.patch \
file://python-fix-build-error-with-Readline-6.3.patch \
file://gcc-4.8-fix-configure-Wformat.patch \
+ file://json-flaw-fix.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -57,4 +58,8 @@ do_install() {
# (these often end up too long for the #! parser in the kernel as the
# buffer is 128 bytes long).
ln -s python-native/python ${D}${bindir}/nativepython
+
+ # We don't want modules in ~/.local being used in preference to those
+ # installed in the native sysroot, so disable user site support.
+ sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
}
diff --git a/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64/config.h b/meta/recipes-devtools/python/python-numpy/mips64/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/config.h b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/powerpc64/config.h b/meta/recipes-devtools/python/python-numpy/powerpc64/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/powerpc64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
index f8974cf802..d4fd279230 100644
--- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb
+++ b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
@@ -42,6 +42,18 @@ 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}"
diff --git a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
index 5b59b6ccc1..70fe25c1a1 100644
--- a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
+++ b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
@@ -20,6 +20,8 @@ S = "${WORKDIR}/py2cairo-${PV}"
inherit distutils pkgconfig
+BBCLASSEXTEND = "native"
+
do_configure() {
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
}
diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
index 907380f1ca..c5349ee578 100644
--- a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
+++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
@@ -2,16 +2,16 @@ Upstream-Status: Pending
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Index: pycurl-7.19.3/setup.py
+Index: pycurl-7.19.3.1/setup.py
===================================================================
---- pycurl-7.19.3.orig/setup.py 2014-01-10 08:04:40.000000000 +0200
-+++ pycurl-7.19.3/setup.py 2014-02-04 15:09:08.411552887 +0200
-@@ -211,7 +211,7 @@
- # If neither --libs nor --static-libs work, fail.
- optbuf = ""
- 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()
+--- pycurl-7.19.3.1.orig/setup.py 2014-07-16 12:57:24.065346887 +0000
++++ pycurl-7.19.3.1/setup.py 2014-07-16 12:57:53.057347678 +0000
+@@ -147,7 +147,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.19.3.bb b/meta/recipes-devtools/python/python-pycurl_7.19.5.bb
index aee6cdda82..e4619c740e 100644
--- a/meta/recipes-devtools/python/python-pycurl_7.19.3.bb
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.5.bb
@@ -2,7 +2,7 @@ SUMMARY = "Python bindings for libcurl"
HOMEPAGE = "http://pycurl.sourceforge.net/"
SECTION = "devel/python"
LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=204;endline=219;md5=57e5ab0c0f964533fc59d93dec5695bb \
+LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=181;md5=57e5ab0c0f964533fc59d93dec5695bb \
file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
file://COPYING-MIT;md5=e8200955c773b2a0fd6cea36ea5e87be"
@@ -15,8 +15,8 @@ SRC_URI = "\
file://no-static-link.patch \
"
-SRC_URI[archive.md5sum] = "b9091b7438d3de1552e28862d2971cd1"
-SRC_URI[archive.sha256sum] = "05e48835fe445ff327dcd373f49d9970e0b828a07cd4d08a23264507a742d616"
+SRC_URI[archive.md5sum] = "47b4eac84118e2606658122104e62072"
+SRC_URI[archive.sha256sum] = "69a0aa7c9dddbfe4cebf4d1f674c490faccf739fc930d85d8990ce2fd0551a43"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils
@@ -29,6 +29,11 @@ export STAGING_LIBDIR
BBCLASSEXTEND = "native"
+# Ensure the docstrings are generated as make clean will remove them
+do_compile_prepend() {
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
+}
+
do_install_append() {
rm -rf ${D}${datadir}/share
}
diff --git a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
index 2e65b3808a..45a0603eb7 100644
--- a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
+++ b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
@@ -2,8 +2,8 @@ SUMMARY = "Python GObject bindings"
SECTION = "devel/python"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-DEPENDS = "python python-pygobject-native glib-2.0"
-DEPENDS_class-native = "python-native glib-2.0-native"
+DEPENDS = "python python-pygobject-native libffi glib-2.0"
+DEPENDS_class-native = "python-native libffi-native glib-2.0-native"
RDEPENDS_class-native = ""
MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
diff --git a/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
new file mode 100644
index 0000000000..b6156540bd
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
@@ -0,0 +1,13 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: pygtk-2.24.0/pygtk-2.0.pc.in
+===================================================================
+--- pygtk-2.24.0.orig/pygtk-2.0.pc.in
++++ pygtk-2.24.0/pygtk-2.0.pc.in
+@@ -1,5 +1,6 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
++libdir=@libdir@
+ includedir=@includedir@
+ datarootdir=@datarootdir@
+ datadir=@datadir@
diff --git a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
index 3dbef897a2..053f37fcbe 100644
--- a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
+++ b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
@@ -15,6 +15,7 @@ SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/${SRCNAME}-${PV}.tar
file://fix-gtkunixprint.patch \
file://prevent_to_get_display_during_import.patch \
file://nodocs.patch \
+ file://fix-pygtk-2.0.pc.patch \
file://acinclude.m4 \
file://update-dependences-of-defs.c.patch"
@@ -39,15 +40,30 @@ do_configure_prepend() {
sed -i 's:tests docs:tests:' ${S}/Makefile.am
}
-# dirty fix #1: remove dependency on python-pygobject-dev
+# dirty fix #2: fix build system paths leaking in
do_install_append() {
- find ${D} -name "*.la"|xargs rm -f
- rm -f ${D}/${bindir}/pygtk-codegen-2.0
- rm -rf ${D}/${libdir}/pkgconfig
-}
+ for i in `find ${D} -name "*.py"` ; do \
+ sed -i -e s:${D}::g $i
+ done
-# dirty fix #2: fix build system paths leaking in
-require fix-path.inc
+ for i in `find ${D} -name "*.la"` ; do \
+ sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
+ done
+
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ if test -e ${D}${sbindir} ; then
+ for i in ${D}${sbindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ sed -i -e '1s|^#!.*python|#!/usr/bin/env python|' ${D}${bindir}/pygtk-demo
+}
PACKAGES =+ "${PN}-demo"
FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk "
diff --git a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb b/meta/recipes-devtools/python/python-scons-native_2.3.2.bb
index 067ed61a4e..dae89ab5d2 100644
--- a/meta/recipes-devtools/python/python-scons-native_2.3.0.bb
+++ b/meta/recipes-devtools/python/python-scons-native_2.3.2.bb
@@ -4,5 +4,5 @@ DEPENDS = "python-native"
RDEPENDS_${PN} = ""
do_install_append() {
- create_wrapper ${D}${bindir}/scons PYTHONPATH='$PYTHONPATH:${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
+ create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
}
diff --git a/meta/recipes-devtools/python/python-scons_2.3.0.bb b/meta/recipes-devtools/python/python-scons_2.3.2.bb
index eb2735d46f..fc5b302aae 100644
--- a/meta/recipes-devtools/python/python-scons_2.3.0.bb
+++ b/meta/recipes-devtools/python/python-scons_2.3.2.bb
@@ -1,13 +1,13 @@
SUMMARY = "Software Construction tool (make/autotools replacement)"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=98e9a1e6029e715255c52032a1eba637"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f0ad8a74a10870caa5e08a3e45d719e2"
SRCNAME = "scons"
SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "083ce5624d6adcbdaf2526623f456ca9"
-SRC_URI[sha256sum] = "9442069999cf4b2caa94a5886ab4c2c71de1718ed5e9176c18e2b6dbca463b4b"
+SRC_URI[md5sum] = "bbd428da35ec176575a2b0be1f8d7162"
+SRC_URI[sha256sum] = "f993320c5e9515e6567fcce73df0a7a8808414bf1223c69123d3dcf339a449d4"
S = "${WORKDIR}/${SRCNAME}-${PV}"
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
new file mode 100644
index 0000000000..8a27f2583a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
@@ -0,0 +1,37 @@
+python-smartpm: Add checking for "rpm-ignoresize" option
+
+The do_rootfs takes a very long time when build host has mounted many NFS
+devices. syscall lstat() was being called on every filesystem mounted on the
+build host during building.
+The reason for the lstat() is that rpm is verifying that enough free disk space
+is available to do the install. However, since the install is into the target
+rootfs it should not matter how much free space there is in the host mounts.
+Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip
+checking for diskspace when install a rpm package.
+
+Upstream-Status: Pending
+
+Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ smart/backends/rpm/pm.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 5da9ee6..f0488ec 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -241,6 +241,10 @@ class RPMPackageManager(PackageManager):
+ except AttributeError:
+ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
+
++ if sysconf.get("rpm-ignoresize", False):
++ probfilter |= rpm.RPMPROB_FILTER_DISKNODES
++ probfilter |= rpm.RPMPROB_FILTER_DISKSPACE
++
+ if force or reinstall:
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
index 113618255f..82d2e6cf31 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
@@ -1,4 +1,4 @@
-From 7ee23804a06f81476cc2b31a6db11b52d7af764e Mon Sep 17 00:00:00 2001
+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
@@ -9,19 +9,24 @@ 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>
---
+ smart.py | 5 +++-
smart/commands/install.py | 5 ++++
smart/transaction.py | 65 +++++++++++++++++++++++++++++++++++------------
- 2 files changed, 54 insertions(+), 16 deletions(-)
+ 3 files changed, 58 insertions(+), 17 deletions(-)
-diff --git a/smart/commands/install.py b/smart/commands/install.py
-index 590222c..6ef9682 100644
---- a/smart/commands/install.py
-+++ b/smart/commands/install.py
+Index: smart-1.4.1/smart/commands/install.py
+===================================================================
+--- smart-1.4.1.orig/smart/commands/install.py
++++ smart-1.4.1/smart/commands/install.py
@@ -50,6 +50,8 @@ def option_parser():
parser = OptionParser(usage=USAGE,
description=DESCRIPTION,
@@ -41,10 +46,10 @@ index 590222c..6ef9682 100644
if opts.explain:
sysconf.set("explain-changesets", True, soft=True)
-diff --git a/smart/transaction.py b/smart/transaction.py
-index 5730a42..e3e61c6 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
+Index: smart-1.4.1/smart/transaction.py
+===================================================================
+--- smart-1.4.1.orig/smart/transaction.py
++++ smart-1.4.1/smart/transaction.py
@@ -555,6 +555,8 @@ class Transaction(object):
changeset.set(pkg, INSTALL)
isinst = changeset.installed
@@ -162,6 +167,57 @@ index 5730a42..e3e61c6 100644
elif op is REMOVE:
self._remove(pkg, changeset, locked, pending)
elif op is UPGRADE:
---
-1.8.4.2
-
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -243,15 +253,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 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:
++ if probs 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/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
index 3f27262156..531ea51cad 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
@@ -7,34 +7,39 @@ Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 707a146..aec82e7 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager):
+[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -106,6 +106,26 @@ class RPMPackageManager(PackageManager):
flags |= rpm.RPMTRANS_FLAG_TEST
ts.setFlags(flags)
-+ dflags = ts.setDFlags(0)
-+ if sysconf.get("rpm-noupgrade", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
-+ if sysconf.get("rpm-norequires", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
-+ if sysconf.get("rpm-noconflicts", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
-+ if sysconf.get("rpm-noobsoletes", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
-+ if sysconf.get("rpm-noparentdirs", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
-+ if sysconf.get("rpm-nolinktos", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
-+ if sysconf.get("rpm-nosuggest", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
-+ ts.setDFlags(dflags)
++ try:
++ dflags = ts.setDFlags(0)
++ if sysconf.get("rpm-noupgrade", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
++ if sysconf.get("rpm-norequires", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
++ if sysconf.get("rpm-noconflicts", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
++ if sysconf.get("rpm-noobsoletes", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
++ if sysconf.get("rpm-noparentdirs", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
++ if sysconf.get("rpm-nolinktos", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
++ if sysconf.get("rpm-nosuggest", False):
++ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
++ ts.setDFlags(dflags)
++ except AttributeError, ae:
++ pass
+
# Set rpm verbosity level.
levelname = sysconf.get('rpm-log-level')
level = {
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
index fece5b9009..2ca0f6d593 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
@@ -24,7 +24,7 @@ index aa76f91..63fbb35 100644
+ 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()
+
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch b/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
new file mode 100644
index 0000000000..708ffe67d3
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
@@ -0,0 +1,49 @@
+
+This patch checks for rpm5 related functions in order to allow rpm4
+to work correctly. Currently the rpm4 archscore and filter work
+differently enough that they need to be changed.
+
+Upstream-Status: Inappropriate [OE-Core Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: smart-1.4.1/smart/backends/rpm/base.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/base.py
++++ smart-1.4.1/smart/backends/rpm/base.py
+@@ -338,10 +338,14 @@ class RPMObsoletes(Depends):
+
+ _SCOREMAP = {}
+ def getArchScore(arch, _sm=_SCOREMAP):
+- if arch not in _sm:
+- score = rpm.archscore(arch)
+- _sm[arch] = score
+- return _sm.get(arch, 0)
++ try:
++ rpm.platformscore(arch)
++ if arch not in _sm:
++ score = rpm.archscore(arch)
++ _sm[arch] = score
++ return _sm.get(arch, 0)
++ except AttributeError:
++ return 1
+
+ # TODO: Embed color into nameprovides and obsoletes relations.
+ _COLORMAP = {"noarch": 0, "x86_64": 2, "ppc64": 2, "s390x": 2, "sparc64": 2}
+Index: smart-1.4.1/smart/backends/rpm/pm.py
+===================================================================
+--- smart-1.4.1.orig/smart/backends/rpm/pm.py
++++ smart-1.4.1/smart/backends/rpm/pm.py
+@@ -235,6 +235,12 @@ class RPMPackageManager(PackageManager):
+ if sysconf.get("rpm-order"):
+ ts.order()
+ probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
++ try:
++ # Test for RPM5 function
++ rpm.platformscore("")
++ except AttributeError:
++ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
++
+ if force or reinstall:
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
index 09715794b3..c75f10fbf3 100644
--- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -8,7 +8,7 @@ SECTION = "devel/python"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
-DEPENDS = "python rpm gettext-native"
+DEPENDS = "python rpm gettext-native python-rpm"
PR = "r9"
SRCNAME = "smart"
@@ -32,7 +32,9 @@ SRC_URI = "\
file://smart-config-ignore-all-recommends.patch \
file://smart-attempt.patch \
file://smart-filename-NAME_MAX.patch \
- "
+ file://smart-rpm4-fixes.patch \
+ file://smart-add-for-rpm-ignoresize-check.patch \
+ "
SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
SRC_URI[sha256sum] = "b1d519ddb43d60f293b065c28870a5d9e8b591cd49e8c68caea48ace91085eba"
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index 19942baeb0..bc5e5b91f7 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org"
LICENSE = "PSFv2"
SECTION = "devel/python"
# bump this on every change in contrib/python/generate-manifest-2.7.py
-INC_PR = "r0"
+INC_PR = "r1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6"
@@ -14,7 +14,7 @@ SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a3
PYTHON_MAJMIN = "2.7"
-inherit autotools-brokensep
+inherit autotools
PYTHONLSBOPTS = "--with-wctype-functions"
PYTHONLSBOPTS_linuxstdbase = "ac_cv_sizeof_off_t=8"
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 208c57c822..bedc3909d8 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -2,17 +2,22 @@ _tkinter module needs tk module along with tcl. tk is not yet integrated
in yocto so we skip the check for this module.
Avoid a warning by not adding this module to missing variable.
+Also simply disable the tk module since its not in DEPENDS.
+
Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.3/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.3.orig/setup.py 2014-07-07 13:45:15.056233820 +0000
++++ Python-2.7.3/setup.py 2014-07-16 16:06:37.145656284 +0000
+@@ -1639,10 +1639,12 @@
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ #self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
diff --git a/meta/recipes-devtools/python/python/json-flaw-fix.patch b/meta/recipes-devtools/python/python/json-flaw-fix.patch
new file mode 100644
index 0000000000..e9a6cca017
--- /dev/null
+++ b/meta/recipes-devtools/python/python/json-flaw-fix.patch
@@ -0,0 +1,27 @@
+
+python: fix _json module arbitrary process memory read vulnerability
+
+Upstream-Status: submitted
+
+Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com>
+
+--- a/Modules/_json.c 2014-07-15 15:37:17.151046356 +0200
++++ b/Modules/_json.c 2014-07-15 15:38:37.335605042 +0200
+@@ -1491,7 +1491,7 @@ scan_once_str(PyScannerObject *s, PyObje
+ PyObject *res;
+ char *str = PyString_AS_STRING(pystr);
+ Py_ssize_t length = PyString_GET_SIZE(pystr);
+- if (idx >= length) {
++ if ( idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+@@ -1578,7 +1578,7 @@ scan_once_unicode(PyScannerObject *s, Py
+ PyObject *res;
+ Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
+ Py_ssize_t length = PyUnicode_GET_SIZE(pystr);
+- if (idx >= length) {
++ if ( idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch
new file mode 100644
index 0000000000..725531a240
--- /dev/null
+++ b/meta/recipes-devtools/python/python/posix_close.patch
@@ -0,0 +1,43 @@
+backport from http://bugs.python.org/issue20594
+
+- Issue #20594: Avoid name clash with the libc function posix_close.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1392131776 18000
+# Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932
+# Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3
+avoid name clash with posix_close (closes #20594)
+
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__,
+ "close(fd)\n\n\
+ Close a file descriptor (for low level IO).");
+
+-static PyObject *
+-posix_close(PyObject *self, PyObject *args)
++/*
++The underscore at end of function name avoids a name clash with the libc
++function posix_close.
++*/
++static PyObject *
++posix_close_(PyObject *self, PyObject *args)
+ {
+ int fd, res;
+ if (!PyArg_ParseTuple(args, "i:close", &fd))
+@@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = {
+ {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
+ #endif /* HAVE_TCSETPGRP */
+ {"open", posix_open, METH_VARARGS, posix_open__doc__},
+- {"close", posix_close, METH_VARARGS, posix_close__doc__},
++ {"close", posix_close_, METH_VARARGS, posix_close__doc__},
+ {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
+ {"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
+ {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},
+
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
new file mode 100644
index 0000000000..60ef145c7c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
@@ -0,0 +1,75 @@
+From 104eb318283dde5203aa6cf7384287bef181e308 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Wed, 12 Nov 2014 01:58:02 -0500
+Subject: [PATCH] python: fix CVE-2014-7185
+
+Reference: http://bugs.python.org/issue21831
+
+CVE-2014-7185: Integer overflow in bufferobject.c in Python before
+2.7.8 allows context-dependent attackers to obtain sensitive
+information from process memory via a large size and offset in a
+"buffer" function.
+
+Upstream-Status: Backport
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ Lib/test/test_buffer.py | 6 ++++++
+ Misc/NEWS | 3 +++
+ Objects/bufferobject.c | 2 +-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
+index 6bdc34d..3ac1f8c 100644
+--- a/Lib/test/test_buffer.py
++++ b/Lib/test/test_buffer.py
+@@ -4,6 +4,7 @@ For now, tests just new or changed functionality.
+
+ """
+
++import sys
+ import unittest
+ from test import test_support
+
+@@ -21,6 +22,11 @@ class BufferTests(unittest.TestCase):
+ self.assertEqual(b[start:stop:step],
+ s[start:stop:step])
+
++ def test_large_buffer_size_and_offset(self):
++ data = bytearray('hola mundo')
++ buf = buffer(data, sys.maxsize, sys.maxsize)
++ self.assertEqual(buf[:4096], "")
++
+
+ def test_main():
+ with test_support.check_py3k_warnings(("buffer.. not supported",
+diff --git a/Misc/NEWS b/Misc/NEWS
+index e8778ad..77396c5 100644
+--- a/Misc/NEWS
++++ b/Misc/NEWS
+@@ -1896,6 +1896,9 @@ What's New in Python 2.7 Release Candidate 1?
+ Core and Builtins
+ -----------------
+
++- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
++ the buffer type. CVE-2014-7185.
++
+ - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
+ start byte and the continuation byte(s) are now considered invalid, instead
+ of the number of bytes specified by the start byte.
+diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
+index c52f0bc..c542506 100644
+--- a/Objects/bufferobject.c
++++ b/Objects/bufferobject.c
+@@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size,
+ *size = count;
+ else
+ *size = self->b_size;
+- if (offset + *size > count)
++ if (*size > count - offset)
+ *size = count - offset;
+ }
+ return 1;
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
new file mode 100644
index 0000000000..2d35520a6d
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
@@ -0,0 +1,37 @@
+python: Building without SSLv3 support
+
+Building without SSLv3 support when openssl is built
+without any support for SSLv3
+
+Upstream-Status: Backport
+
+Reference:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76A8611#22
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+diff -ruN a/Modules/_ssl.c b/Modules/_ssl.c
+--- a/Modules/_ssl.c 2014-11-26 07:43:58.755679939 +0100
++++ b/Modules/_ssl.c 2014-11-26 07:49:10.454182400 +0100
+@@ -302,8 +302,10 @@
+ PySSL_BEGIN_ALLOW_THREADS
+ if (proto_version == PY_SSL_VERSION_TLS1)
+ self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
++#ifndef OPENSSL_NO_SSL3
+ else if (proto_version == PY_SSL_VERSION_SSL3)
+ self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
++#endif
+ #ifndef OPENSSL_NO_SSL2
+ else if (proto_version == PY_SSL_VERSION_SSL2)
+ self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
+@@ -1777,8 +1779,10 @@
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
+ PY_SSL_VERSION_SSL2);
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
+ PY_SSL_VERSION_SSL3);
++#endif
+ PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
+ PY_SSL_VERSION_SSL23);
+ PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
new file mode 100644
index 0000000000..3462620917
--- /dev/null
+++ b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Vinay Sajip <vinay_sajip@yahoo.co.uk>
+# Date 1334583503 -3600
+# Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0
+# Parent 33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1
+Issue #14452: remove BOM insertion code.
+
+Backport from https://hg.python.org/cpython/rev/af46a001d5ec.
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
+--- a/Lib/logging/handlers.py
++++ b/Lib/logging/handlers.py
+@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
+ # Message is a string. Convert to bytes as required by RFC 5424
+ if type(msg) is unicode:
+ msg = msg.encode('utf-8')
+- if codecs:
+- msg = codecs.BOM_UTF8 + msg
+ msg = prio + msg
+ try:
+ if self.unixsocket:
diff --git a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
index 573096cb1c..0ef3a8762f 100644
--- a/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python3-distribute_0.6.32.bb
@@ -37,6 +37,8 @@ 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
+ sed -i -e '1s|^#!.*python|#!/usr/bin/env python3|' \
+ ${D}${PYTHON_SITEPACKAGES_DIR}/distribute-${PV}-py${PYTHON_BASEVERSION}.egg/setuptools/tests/test_resources.py
}
RDEPENDS_${PN} = "\
diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
index 9ae2a0b373..73ce0952bd 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -27,6 +27,8 @@ file://fix-ast.h-dependency.patch \
file://makerace.patch \
${DISTRO_SRC_URI} \
file://python3-fix-build-error-with-Readline-6.3.patch \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
diff --git a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
new file mode 100644
index 0000000000..2bc8b8c460
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
@@ -0,0 +1,33 @@
+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
new file mode 100644
index 0000000000..74490d93a5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -0,0 +1,28 @@
+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/setup.py-check-cross_compiling-when-get-FLAGS.patch b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
new file mode 100644
index 0000000000..fc2e12dfe5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
@@ -0,0 +1,50 @@
+From 8dad810f3a3d073f09ad72e1a3ee0a895eab2ca1 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 19:05:36 -0800
+Subject: [PATCH] setup.py:check cross_compiling when get FLAGS
+
+Fixed when compile target pythnon3:
+gcc -isystem/path/to/sysroots/x86_64-linux/usr/include \
+ -L=/path/to/sysroots/x86_64-linux/usr/lib
+
+This is incorrect, the native sysroot should not be used by target
+python3.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ setup.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index e8339cd..83fd31f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -238,7 +238,10 @@ class PyBuildExt(build_ext):
+ # unfortunately, distutils doesn't let us provide separate C and C++
+ # compilers
+ if compiler is not None:
+- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
++ if cross_compiling:
++ (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '')
++ else:
++ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+ self.compiler.set_executables(**args)
+
+@@ -457,7 +460,10 @@ class PyBuildExt(build_ext):
+ ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+ ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+- env_val = sysconfig.get_config_var(env_var)
++ if cross_compiling:
++ env_val = os.environ.get(env_var)
++ else:
++ env_val = sysconfig.get_config_var(env_var)
+ if env_val:
+ # To prevent optparse from raising an exception about any
+ # options in env_val that it doesn't know about we strip out
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
new file mode 100644
index 0000000000..de07643f2b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -0,0 +1,54 @@
+From fc93b3cc23b4f9698ae92a42986dbb02b6f19588 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 06:29:50 -0800
+Subject: [PATCH] sysconfig.py: add _PYTHON_PROJECT_SRC
+
+python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B
+and S, but it doesn't work when compile Modules, the target python3 runs
+python3-native's sysconfig to get srcdir which is the native's, there
+would be errors when native's srcdir has been removed, add
+_PYTHON_PROJECT_SRC to fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Lib/distutils/sysconfig.py | 5 ++++-
+ Lib/sysconfig.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index a545ab9..74317d1 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -554,7 +554,10 @@ def get_config_vars(*args):
+ _config_vars['exec_prefix'] = EXEC_PREFIX
+
+ # Always convert srcdir to an absolute path
+- srcdir = _config_vars.get('srcdir', project_base)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _config_vars.get('srcdir', project_base)
+ if os.name == 'posix':
+ if python_build:
+ # If srcdir is a relative path (typically '.' or '..')
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 7287f11..cc92998 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -562,7 +562,10 @@ def get_config_vars(*args):
+ _CONFIG_VARS['userbase'] = _getuserbase()
+
+ # Always convert srcdir to an absolute path
+- srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
+ if os.name == 'posix':
+ if _PYTHON_BUILD:
+ # If srcdir is a relative path (typically '.' or '..')
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index a1cb12078f..6147408937 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -37,6 +37,10 @@ SRC_URI += "\
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 \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
@@ -62,6 +66,11 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
# No ctypes option for python 3
PYTHONLSBOPTS = ""
@@ -73,7 +82,7 @@ do_configure_prepend() {
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux*
+ cd ${S}/Lib/plat-linux*
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -84,7 +93,7 @@ do_compile() {
cd -
# remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
- sed -i -e s,ccache,'$(CCACHE)', Makefile
+ sed -i -e s,ccache\ ,'$(CCACHE) ', Makefile
# remove any bogus LD_LIBRARY_PATH
sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
@@ -104,8 +113,6 @@ do_compile() {
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -116,8 +123,8 @@ do_compile() {
ARCH=${TARGET_ARCH} \
OPT="${CFLAGS}" libpython3.so
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
+ 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} \
@@ -132,16 +139,13 @@ do_install() {
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
install -d ${D}${libdir}/pkgconfig
install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
# 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}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ 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} \
@@ -150,9 +154,8 @@ do_install() {
ARCH=${TARGET_ARCH} \
DESTDIR=${D} LIBDIR=${libdir}
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native3/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native3/python3 \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ 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} \
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 0d641720f1..a4c95c18e0 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -36,6 +36,11 @@ SRC_URI += "\
file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \
file://python-fix-build-error-with-Readline-6.3.patch \
file://python-2.7.3-CVE-2014-1912.patch \
+ file://json-flaw-fix.patch \
+ file://posix_close.patch \
+ file://remove-BOM-insection-code.patch \
+ file://python-2.7.3-CVE-2014-7185.patch \
+ file://python2.7.3-nossl3.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -47,6 +52,9 @@ inherit autotools multilib_header python-dir pythonnative
TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
+# The following is a hack until we drop ac_cv_sizeof_off_t from site files
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
+
do_configure_prepend() {
rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
@@ -54,7 +62,7 @@ do_configure_prepend() {
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux2
+ cd ${S}/Lib/plat-linux2
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -73,7 +81,7 @@ do_compile() {
if [ ! -f Makefile.orig ]; then
install -m 0644 Makefile Makefile.orig
fi
- sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ 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' \
@@ -86,7 +94,7 @@ do_compile() {
install -m 0644 Makefile Makefile.sysroot
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
@@ -103,7 +111,7 @@ do_install() {
install -m 0644 Makefile.orig Makefile
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
# After swizzling the makefile, we need to run the build again.
# install can race with the build so we have to run this first, then install
@@ -154,8 +162,8 @@ 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"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
# package libpython2
PACKAGES =+ "lib${BPN}2"
diff --git a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
index 3834aed6d0..b0c2ea5be9 100644
--- a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
@@ -14,6 +14,10 @@ Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
Updated it on 2014-01-15 for rebasing
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Update it when upgrade qemu to 2.2.0
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
hw/arm/versatilepb.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -22,7 +26,7 @@ diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index b48d84c..ad2cd5a 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
-@@ -199,6 +199,12 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id)
+@@ -198,6 +198,12 @@ static void versatile_init(MachineState *machine, int board_id)
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
@@ -32,9 +36,9 @@ index b48d84c..ad2cd5a 100644
+ ((unsigned int)ram_size / (1 << 20)));
+ exit(1);
+ }
- memory_region_init_ram(ram, NULL, "versatile.ram", args->ram_size);
+ memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size,
+ &error_abort);
vmstate_register_ram_global(ram);
- /* ??? RAM should repeat to fill physical memory space. */
--
1.7.10.4
diff --git a/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch b/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch
new file mode 100644
index 0000000000..171bda7e95
--- /dev/null
+++ b/meta/recipes-devtools/qemu/files/exclude-some-arm-EABI-obsolete-syscalls.patch
@@ -0,0 +1,93 @@
+[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-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
index 5a60bfda82..5c3565544e 100644
--- a/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -1,18 +1,22 @@
-# possible arch values are arm mips mipsel mips64 mips64el ppc ppc64 ppc64abi32
+# 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
def get_qemu_target_list(d):
import bb
archs = d.getVar('QEMU_TARGETS', True).split()
- targets = ""
+ tos = d.getVar('HOST_OS', True)
+ softmmuonly = ""
for arch in ['mips64', 'mips64el', 'ppcemb']:
if arch in archs:
- targets += arch + "-softmmu,"
+ softmmuonly += arch + "-softmmu,"
archs.remove(arch)
+ linuxuseronly = ""
for arch in ['armeb', 'alpha', 'ppc64abi32', 'sparc32plus']:
if arch in archs:
- targets += arch + "-linux-user,"
+ linuxuseronly += arch + "-linux-user,"
archs.remove(arch)
- return targets + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ if 'linux' not in tos:
+ return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 611ee61beb..49415c1250 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,32 +1,31 @@
SUMMARY = "Fast open source processor emulator"
HOMEPAGE = "http://qemu.org"
LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "glib-2.0 zlib alsa-lib pixman dtc libsdl \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
-DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native"
-DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc"
-RDEPENDS_${PN}_class-nativesdk = "nativesdk-libsdl"
+DEPENDS = "glib-2.0 zlib pixman"
RDEPENDS_${PN}_class-target += "bash python"
require qemu-targets.inc
-inherit autotools-brokensep
+inherit autotools
BBCLASSEXTEND = "native nativesdk"
+PR = "r1"
+
# QEMU_TARGETS is overridable variable
-QEMU_TARGETS ?= "arm i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
SRC_URI = "\
file://powerpc_rom.bin \
- file://no-strip.patch \
file://larger_default_ram_size.patch \
file://disable-grabs.patch \
+ file://exclude-some-arm-EABI-obsolete-syscalls.patch \
+ file://wacom.patch \
"
SRC_URI_append_class-native = "\
file://fix-libcap-header-issue-on-some-distro.patch \
"
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --audio-drv-list=oss,alsa --disable-bluez --with-system-pixman --extra-cflags='${CFLAGS}'"
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
"
@@ -34,26 +33,32 @@ export LIBTOOL="${HOST_SYS}-libtool"
do_configure_prepend_class-native() {
# Append build host pkg-config paths for native target since the host may provide sdl
- BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+ BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
+ if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
+ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+ fi
# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
}
do_configure_prepend_class-nativesdk() {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
# Undo the -lX11 added by linker-flags.patch
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
fi
}
+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="--enable-kvm"
+ KVMOPTS="${KVMENABLE}"
fi
${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
@@ -81,11 +86,17 @@ do_install_append() {
}
# END of qemu-mips workaround
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "fdt sdl alsa"
+PACKAGECONFIG_class-native ??= "fdt alsa"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+NATIVEDEPS = ""
+NATIVEDEPS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxext-native', '',d)}"
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl ${NATIVEDEPS},"
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
PACKAGECONFIG[xen] = "--enable-xen, --disable-xen,,"
+PACKAGECONFIG[quorum] = "--enable-quorum, --disable-quorum, gnutls,"
PACKAGECONFIG[vnc-tls] = "--enable-vnc --enable-vnc-tls,--disable-vnc-tls, gnutls,"
PACKAGECONFIG[vnc-ws] = "--enable-vnc --enable-vnc-ws,--disable-vnc-ws, gnutls,"
PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
@@ -95,10 +106,17 @@ PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
PACKAGECONFIG[nss] = "--enable-smartcard-nss,--disable-smartcard-nss,nss,"
PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+ libvte,"
+PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+ libvte,"
PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
-PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl,"
PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
+PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
+PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
+PACKAGECONFIG[alsa] = ",,alsa-lib"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,mesa"
+PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
+PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
+
+EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
# Qemu target will not build in world build for ARM or Mips
BROKEN_qemuarm = "1"
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
new file mode 100644
index 0000000000..59cdc1c304
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
@@ -0,0 +1,32 @@
+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/no-strip.patch b/meta/recipes-devtools/qemu/qemu/no-strip.patch
deleted file mode 100644
index d6a4377cd0..0000000000
--- a/meta/recipes-devtools/qemu/qemu/no-strip.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: qemu-0.14.0/Makefile
-===================================================================
---- qemu-0.14.0.orig/Makefile
-+++ qemu-0.14.0/Makefile
-@@ -235,7 +235,7 @@ install-sysconfig:
- install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
- $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
- ifneq ($(TOOLS),)
-- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
-+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
- endif
- ifneq ($(BLOBS),)
- $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
new file mode 100644
index 0000000000..cd06aa4ac6
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -0,0 +1,130 @@
+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.0.0.bb b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
index b8ce62428b..209b910103 100644
--- a/meta/recipes-devtools/qemu/qemu_2.0.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
@@ -3,23 +3,16 @@ require qemu.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-SRC_URI += "file://qemu-enlarge-env-entry-size.patch \
- file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch"
-
+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 \
+ "
SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "2790f44fd76da5de5024b4aafeb594c2"
-SRC_URI[sha256sum] = "60cc1aa0cad39cec891f970bed60ca8a484f071adad4943123599ac223543a3b"
+SRC_URI[md5sum] = "f7a5e2da22d057eb838a91da7aff43c8"
+SRC_URI[sha256sum] = "b68c9b6c7c694f5489b5a6bffe993cd976ffbb78e7d178eb3bc016caf460039c"
COMPATIBLE_HOST_class-target_mips64 = "null"
-do_sanitize_sources() {
- # These .git files point to a nonexistent path "../.git/modules" and will confuse git
- # if it tries to recurse into those directories.
- rm -f ${S}/dtc/.git ${S}/pixman/.git
-}
-
-addtask sanitize_sources after do_unpack before do_patch
-
do_install_append() {
# Prevent QA warnings about installed ${localstatedir}/run
if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index d2981b5575..959cd6fba0 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -9,7 +9,7 @@ do_install () {
echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
qemu_binary=${@qemu_target_binary(d)}
- qemu_options='${@d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or d.getVar('QEMU_OPTIONS', True) or ""}'
+ qemu_options='${QEMU_OPTIONS}'
echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
fallback_qemu_bin=
case $qemu_binary in
diff --git a/meta/recipes-devtools/quilt/quilt-0.63.inc b/meta/recipes-devtools/quilt/quilt-0.63.inc
index f3757859ff..220a3bcdcf 100644
--- a/meta/recipes-devtools/quilt/quilt-0.63.inc
+++ b/meta/recipes-devtools/quilt/quilt-0.63.inc
@@ -19,6 +19,8 @@ EXTRA_OECONF_darwin += "--without-date \
--without-getopt \
"
+CLEANBROKEN = "1"
+
PACKAGES += "guards guards-doc"
FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
${bindir}/quilt ${libdir}/quilt"
@@ -55,5 +57,5 @@ do_install_ptest() {
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-text-parsewords bash \
"
diff --git a/meta/recipes-devtools/quilt/quilt/run-ptest b/meta/recipes-devtools/quilt/quilt/run-ptest
index 1ea0dae128..958a9df5b6 100755
--- a/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -1,5 +1,5 @@
#!/bin/sh
ln -sf /bin/ed /usr/bin/ed
-for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? == 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
+for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
rm -f /usr/bin/ed
diff --git a/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch b/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch
new file mode 100644
index 0000000000..98b646092b
--- /dev/null
+++ b/meta/recipes-devtools/remake/remake/remake-remove-errors-about-colophon-and-cygnus-comma.patch
@@ -0,0 +1,39 @@
+From 1316f10a97a4a2f5d11a30ec367aa61101318742 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@enea.com>
+Date: Wed, 6 Aug 2014 15:05:56 +0200
+Subject: [PATCH] remake: remove errors about @colophon and @cygnus commands
+ not defined
+
+texinfo5 needs replacing @ with @@ when it is part of the text
+
+Upstream-Status: Backport
+Signed-off-by: Maxin B. John <maxin.john@enea.com>
+---
+ doc/remake.texi | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/remake.texi b/doc/remake.texi
+index cd73437..fa5ba16 100644
+--- a/doc/remake.texi
++++ b/doc/remake.texi
+@@ -2752,7 +2752,7 @@ this list, we would like to add your names!
+ @printindex cp
+
+ @tex
+-% I think something like @colophon should be in texinfo. In the
++% I think something like @@colophon should be in texinfo. In the
+ % meantime:
+ \long\def\colophon{\hbox to0pt{}\vfill
+ \centerline{The body of this manual is set in}
+@@ -2764,7 +2764,7 @@ this list, we would like to add your names!
+ \centerline{{\sl\fontname\tensl\/}}
+ \centerline{are used for emphasis.}\vfill}
+ \page\colophon
+-% Blame: doc@cygnus.com, 1991.
++% Blame: doc@@cygnus.com, 1991.
+ @end tex
+
+ @bye
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/remake/remake_git.bb b/meta/recipes-devtools/remake/remake_git.bb
index 405c69f6a6..2ba2b809f8 100644
--- a/meta/recipes-devtools/remake/remake_git.bb
+++ b/meta/recipes-devtools/remake/remake_git.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
require remake.inc
-SRC_URI += "file://version-remake.texi.patch"
+SRC_URI += "file://version-remake.texi.patch \
+ file://remake-remove-errors-about-colophon-and-cygnus-comma.patch \
+ "
SRCREV = "f05508e521987c8494c92d9c2871aec46307d51d"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
new file mode 100644
index 0000000000..b877870411
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/python/rpmmodule.c b/python/rpmmodule.c
+index a4fe217..728c66c 100644
+--- a/python/rpmmodule.c
++++ b/python/rpmmodule.c
+@@ -396,6 +396,10 @@ static int initModule(PyObject *m)
+ REGISTER_ENUM(RPMSENSE_STRONG);
+ REGISTER_ENUM(RPMSENSE_CONFIG);
+
++#if defined(RPM_VENDOR_OE)
++ REGISTER_ENUM(RPMSENSE_MISSINGOK);
++#endif
++
+ REGISTER_ENUM(RPMTRANS_FLAG_TEST);
+ REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS);
+ REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
new file mode 100644
index 0000000000..7a646de373
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/build/pack.c
+===================================================================
+--- rpm-4.11.2.orig/build/pack.c
++++ rpm-4.11.2/build/pack.c
+@@ -571,9 +571,9 @@ rpmRC packageBinaries(rpmSpec spec, cons
+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+ }
+
+- if (cheating) {
+- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
+- }
++// if (cheating) {
++// (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
++// }
+
+ { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+ char *binRpm, *binDir;
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
new file mode 100644
index 0000000000..be0626c8b3
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+diff --git a/installplatform b/installplatform
+index 8c3eba0..fa15e91 100755
+--- a/installplatform
++++ b/installplatform
+@@ -112,7 +112,7 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
+ [ -z "$CANONARCH" ] && continue
+
+ if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
+- LIB=${LIB}64
++ LIB=${LIB}
+ fi
+
+ PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
new file mode 100755
index 0000000000..083b174f17
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
@@ -0,0 +1,16 @@
+#!/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-4.11.2/remove-db3-from-configure.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
new file mode 100644
index 0000000000..2640e54b5b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
@@ -0,0 +1,26 @@
+
+Disable configuring the db3 directory since we will be using the
+external DB provided as part of OE-Core already, no need to have
+duplicate database code.
+
+Upstream-Status: Inappropriate [OE-Core Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: rpm-4.11.2/configure.ac
+===================================================================
+--- rpm-4.11.2.orig/configure.ac
++++ rpm-4.11.2/configure.ac
+@@ -825,9 +825,9 @@ AC_SUBST(RPMCONFIGDIR)
+
+ AC_SUBST(OBJDUMP)
+
+-if test "$with_external_db" = no; then
+- AC_CONFIG_SUBDIRS(db3)
+-fi
++#if test "$with_external_db" = no; then
++# AC_CONFIG_SUBDIRS(db3)
++#fi
+
+ AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
+ AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
new file mode 100644
index 0000000000..f1ecab7b0e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/build/files.c
+===================================================================
+--- rpm-4.11.2.orig/build/files.c
++++ rpm-4.11.2/build/files.c
+@@ -1321,12 +1321,6 @@ static rpmRC addFile(FileList fl, const
+ }
+ }
+
+- /* Error out when a non-directory is specified as one in spec */
+- if (fl->cur.isDir && (statp == &statbuf) && !S_ISDIR(statp->st_mode)) {
+- rpmlog(RPMLOG_ERR, _("Not a directory: %s\n"), diskPath);
+- goto exit;
+- }
+-
+ /* Don't recurse into explicit %dir, don't double-recurse from fts */
+ if ((fl->cur.isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) {
+ return recurseDir(fl, diskPath);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
new file mode 100644
index 0000000000..9333dea441
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
@@ -0,0 +1,194 @@
+Upstream-Status: Inappropriate [OE-Core]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+
+Index: rpm-4.11.2/lib/psm.c
+===================================================================
+--- rpm-4.11.2.orig/lib/psm.c
++++ rpm-4.11.2/lib/psm.c
+@@ -421,7 +421,8 @@ static rpmRC runScript(rpmpsm psm, ARGV_
+
+ rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
+ rc = rpmScriptRun(script, arg1, arg2, sfd,
+- prefixes, warn_only, selinux);
++ prefixes, warn_only, selinux, rpmtsRootDir(psm->ts) );
++
+ rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
+
+ /* Map warn-only errors to "notfound" for script stop callback */
+@@ -958,15 +959,49 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
+ case PSM_DESTROY:
+ break;
+ case PSM_SCRIPT: /* Run current package scriptlets. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
++
+ rc = runInstScript(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+ case PSM_TRIGGERS:
+ /* Run triggers in other package(s) this package sets off. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
+ rc = runTriggers(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+ case PSM_IMMED_TRIGGERS:
+ /* Run triggers in this package other package(s) set off. */
++#ifdef RPM_VENDOR_OE
++ {
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootOut();
++#endif
+ rc = runImmedTriggers(psm);
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper)
++ (void) rpmChrootIn();
++ }
++#endif
+ break;
+
+ case PSM_RPMDB_ADD: {
+Index: rpm-4.11.2/lib/rpmscript.c
+===================================================================
+--- rpm-4.11.2.orig/lib/rpmscript.c
++++ rpm-4.11.2/lib/rpmscript.c
+@@ -92,7 +92,7 @@ static rpmRC runLuaScript(int selinux, A
+ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
+
+ static void doScriptExec(int selinux, ARGV_const_t argv, ARGV_const_t prefixes,
+- FD_t scriptFd, FD_t out)
++ FD_t scriptFd, FD_t out, char * rootDir )
+ {
+ int pipes[2];
+ int flag;
+@@ -158,13 +158,12 @@ static void doScriptExec(int selinux, AR
+ setenv("RPM_INSTALL_PREFIX", *pf, 1);
+ }
+ }
+-
+- if (chdir("/") == 0) {
++ if (chdir(rootDir) == 0) {
+ /* XXX Don't mtrace into children. */
+ unsetenv("MALLOC_CHECK_");
+
+ /* Permit libselinux to do the scriptlet exec. */
+- if (selinux == 1) {
++ if (selinux == 1) {
+ xx = rpm_execcon(0, argv[0], argv, environ);
+ }
+
+@@ -175,12 +174,12 @@ static void doScriptExec(int selinux, AR
+ _exit(127); /* exit 127 for compatibility with bash(1) */
+ }
+
+-static char * writeScript(const char *cmd, const char *script)
++static char * writeScript(const char *cmd, const char *script, char * rootDir)
+ {
+ char *fn = NULL;
+ size_t slen = strlen(script);
+ int ok = 0;
+- FD_t fd = rpmMkTempFile("/", &fn);
++ FD_t fd = rpmMkTempFile(rootDir, &fn);
+
+ if (Ferror(fd))
+ goto exit;
+@@ -204,7 +203,7 @@ exit:
+ */
+ static rpmRC runExtScript(int selinux, ARGV_const_t prefixes,
+ const char *sname, rpmlogLvl lvl, FD_t scriptFd,
+- ARGV_t * argvp, const char *script, int arg1, int arg2)
++ ARGV_t * argvp, const char *script, int arg1, int arg2,char * rootDir)
+ {
+ FD_t out = NULL;
+ char * fn = NULL;
+@@ -215,7 +214,7 @@ static rpmRC runExtScript(int selinux, A
+ rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
+
+ if (script) {
+- fn = writeScript(*argvp[0], script);
++ fn = writeScript(*argvp[0], script, rootDir);
+ if (fn == NULL) {
+ rpmlog(RPMLOG_ERR,
+ _("Couldn't create temporary file for %s: %s\n"),
+@@ -258,7 +257,7 @@ static rpmRC runExtScript(int selinux, A
+ } else if (pid == 0) {/* Child */
+ rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
+ sname, *argvp[0], (unsigned)getpid());
+- doScriptExec(selinux, *argvp, prefixes, scriptFd, out);
++ doScriptExec(selinux, *argvp, prefixes, scriptFd, out, rootDir);
+ }
+
+ do {
+@@ -297,13 +296,27 @@ exit:
+ }
+
+ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+- ARGV_const_t prefixes, int warn_only, int selinux)
++ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir)
+ {
+ ARGV_t args = NULL;
+ rpmlogLvl lvl = warn_only ? RPMLOG_WARNING : RPMLOG_ERR;
+ rpmRC rc;
+-
+- if (script == NULL) return RPMRC_OK;
++#ifdef RPM_VENDOR_OE
++ const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
++#endif
++
++ if (script == NULL) return RPMRC_OK;
++#ifdef RPM_VENDOR_OE
++ if (scriptletWrapper && *scriptletWrapper) {
++ argvAdd(&args, scriptletWrapper);
++
++ if ( rootDir ) {
++ argvAdd(&args, rootDir);
++ } else {
++ argvAdd(&args, "/");
++ }
++ }
++#endif
+
+ /* construct a new argv as we can't modify the one from header */
+ if (script->args) {
+@@ -315,7 +328,7 @@ rpmRC rpmScriptRun(rpmScript script, int
+ if (rstreq(args[0], "<lua>")) {
+ rc = runLuaScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
+ } else {
+- rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
++ rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, rootDir);
+ }
+ argvFree(args);
+
+Index: rpm-4.11.2/lib/rpmscript.h
+===================================================================
+--- rpm-4.11.2.orig/lib/rpmscript.h
++++ rpm-4.11.2/lib/rpmscript.h
+@@ -29,7 +29,7 @@ rpmScript rpmScriptFree(rpmScript script
+
+ RPM_GNUC_INTERNAL
+ rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
+- ARGV_const_t prefixes, int warn_only, int selinux);
++ ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir);
+
+ RPM_GNUC_INTERNAL
+ rpmTagVal rpmScriptTag(rpmScript script);
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
new file mode 100644
index 0000000000..3da608573a
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
@@ -0,0 +1,384 @@
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/build/pack.c b/build/pack.c
+index b6b2bea..5c3d8df 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -273,8 +273,10 @@ static rpmTagVal depevrtags[] = {
+ RPMTAG_CONFLICTVERSION,
+ RPMTAG_ORDERVERSION,
+ RPMTAG_TRIGGERVERSION,
+- RPMTAG_SUGGESTSVERSION,
+- RPMTAG_ENHANCESVERSION,
++ RPMTAG_SUGGESTVERSION,
++ RPMTAG_ENHANCEVERSION,
++ RPMTAG_RECOMMENDVERSION,
++ RPMTAG_SUPPLEMENTVERSION,
+ 0
+ };
+
+diff --git a/build/parsePreamble.c b/build/parsePreamble.c
+index 5772bef..cbbbee3 100644
+--- a/build/parsePreamble.c
++++ b/build/parsePreamble.c
+@@ -821,6 +821,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
+ }
+ /* fallthrough */
+ case RPMTAG_PREREQ:
++ case RPMTAG_RECOMMENDFLAGS:
++ case RPMTAG_SUGGESTFLAGS:
++ case RPMTAG_SUPPLEMENTFLAGS:
++ case RPMTAG_ENHANCEFLAGS:
+ case RPMTAG_CONFLICTFLAGS:
+ case RPMTAG_OBSOLETEFLAGS:
+ case RPMTAG_PROVIDEFLAGS:
+@@ -922,6 +926,10 @@ static struct PreambleRec_s const preambleList[] = {
+ {RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
+ {RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
+ {RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
++ {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")},
++ {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")},
++ {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")},
++ {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")},
+ {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
+ {RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
+ {RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
+diff --git a/build/parseReqs.c b/build/parseReqs.c
+index ba080a1..1427111 100644
+--- a/build/parseReqs.c
++++ b/build/parseReqs.c
+@@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
+ nametag = RPMTAG_REQUIRENAME;
+ tagflags |= RPMSENSE_ANY;
+ break;
++ case RPMTAG_RECOMMENDFLAGS:
++ nametag = RPMTAG_RECOMMENDNAME;
++ break;
++ case RPMTAG_SUGGESTFLAGS:
++ nametag = RPMTAG_SUGGESTNAME;
++ break;
++ case RPMTAG_SUPPLEMENTFLAGS:
++ nametag = RPMTAG_SUPPLEMENTNAME;
++ break;
++ case RPMTAG_ENHANCEFLAGS:
++ nametag = RPMTAG_ENHANCENAME;
++ break;
+ case RPMTAG_PROVIDEFLAGS:
+ nametag = RPMTAG_PROVIDENAME;
+ break;
+diff --git a/build/reqprov.c b/build/reqprov.c
+index a368f42..c270af6 100644
+--- a/build/reqprov.c
++++ b/build/reqprov.c
+@@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal tagN,
+ extra = Flags & RPMSENSE_TRIGGER;
+ dsp = &pkg->triggers;
+ break;
++ case RPMTAG_RECOMMENDNAME:
++ versiontag = RPMTAG_RECOMMENDVERSION;
++ flagtag = RPMTAG_RECOMMENDFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->recommends;
++ break;
++ case RPMTAG_SUGGESTNAME:
++ versiontag = RPMTAG_SUGGESTVERSION;
++ flagtag = RPMTAG_SUGGESTFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->suggests;
++ break;
++ case RPMTAG_SUPPLEMENTNAME:
++ versiontag = RPMTAG_SUPPLEMENTVERSION;
++ flagtag = RPMTAG_SUPPLEMENTFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->supplements;
++ break;
++ case RPMTAG_ENHANCENAME:
++ versiontag = RPMTAG_ENHANCEVERSION;
++ flagtag = RPMTAG_ENHANCEFLAGS;
++ extra = Flags & _ALL_REQUIRES_MASK;
++ dsp = &pkg->enhances;
++ break;
+ case RPMTAG_REQUIRENAME:
+ default:
+ tagN = RPMTAG_REQUIRENAME;
+diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
+index a9e4c7c..0a1977f 100644
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -93,6 +93,10 @@ struct Package_s {
+ rpmds ds; /*!< Requires: N = EVR */
+ rpmds requires;
+ rpmds provides;
++ rpmds recommends;
++ rpmds suggests;
++ rpmds supplements;
++ rpmds enhances;
+ rpmds conflicts;
+ rpmds obsoletes;
+ rpmds triggers;
+diff --git a/build/spec.c b/build/spec.c
+index 703ec78..7ae2120 100644
+--- a/build/spec.c
++++ b/build/spec.c
+@@ -139,6 +139,11 @@ static Package freePackage(Package pkg)
+ pkg->ds = rpmdsFree(pkg->ds);
+ pkg->requires = rpmdsFree(pkg->requires);
+ pkg->provides = rpmdsFree(pkg->provides);
++ pkg->recommends = rpmdsFree(pkg->recommends);
++ pkg->suggests = rpmdsFree(pkg->suggests);
++ pkg->supplements = rpmdsFree(pkg->supplements);
++ pkg->enhances = rpmdsFree(pkg->enhances);
++
+ pkg->conflicts = rpmdsFree(pkg->conflicts);
+ pkg->obsoletes = rpmdsFree(pkg->obsoletes);
+ pkg->triggers = rpmdsFree(pkg->triggers);
+diff --git a/lib/rpmds.c b/lib/rpmds.c
+index 7a51167..1e5dda0 100644
+--- a/lib/rpmds.c
++++ b/lib/rpmds.c
+@@ -52,6 +52,22 @@ static int dsType(rpmTagVal tag,
+ t = "Requires";
+ evr = RPMTAG_REQUIREVERSION;
+ f = RPMTAG_REQUIREFLAGS;
++ } else if (tag == RPMTAG_SUPPLEMENTNAME) {
++ t = "Supplements";
++ evr = RPMTAG_SUPPLEMENTVERSION;
++ f = RPMTAG_SUPPLEMENTFLAGS;
++ } else if (tag == RPMTAG_ENHANCENAME) {
++ t = "Enhances";
++ evr = RPMTAG_ENHANCEVERSION;
++ f = RPMTAG_ENHANCEFLAGS;
++ } else if (tag == RPMTAG_RECOMMENDNAME) {
++ t = "Recommends";
++ evr = RPMTAG_RECOMMENDVERSION;
++ f = RPMTAG_RECOMMENDFLAGS;
++ } else if (tag == RPMTAG_SUGGESTNAME) {
++ t = "Suggests";
++ evr = RPMTAG_SUGGESTVERSION;
++ f = RPMTAG_SUGGESTFLAGS;
+ } else if (tag == RPMTAG_CONFLICTNAME) {
+ t = "Conflicts";
+ evr = RPMTAG_CONFLICTVERSION;
+diff --git a/lib/rpmtag.h b/lib/rpmtag.h
+index 64b03f1..b943229 100644
+--- a/lib/rpmtag.h
++++ b/lib/rpmtag.h
+@@ -217,14 +217,14 @@ typedef enum rpmTag_e {
+ RPMTAG_PRETRANSPROG = 1153, /* s[] */
+ RPMTAG_POSTTRANSPROG = 1154, /* s[] */
+ RPMTAG_DISTTAG = 1155, /* s */
+- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */
+-#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */
+- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */
+- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */
+- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */
+-#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */
+- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */
+- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */
++ RPMTAG_OLDSUGGESTSNAME = 1156, /* s[] (unimplemented) */
++#define RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */
++ RPMTAG_OLDSUGGESTSVERSION = 1157, /* s[] (unimplemented) */
++ RPMTAG_OLDSUGGESTSFLAGS = 1158, /* i[] (unimplemented) */
++ RPMTAG_OLDENHANCESNAME = 1159, /* s[] (unimplemented) */
++#define RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */
++ RPMTAG_OLDENHANCESVERSION = 1160, /* s[] (unimplemented) */
++ RPMTAG_OLDENHANCESFLAGS = 1161, /* i[] (unimplemented) */
+ RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
+ RPMTAG_CVSID = 1163, /* s (unimplemented) */
+ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
+@@ -261,6 +261,7 @@ typedef enum rpmTag_e {
+ RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */
+ RPMTAG_DBINSTANCE = 1195, /* i extension */
+ RPMTAG_NVRA = 1196, /* s extension */
++
+ /* tags 1997-4999 reserved */
+ RPMTAG_FILENAMES = 5000, /* s[] extension */
+ RPMTAG_FILEPROVIDE = 5001, /* s[] extension */
+@@ -307,6 +308,26 @@ typedef enum rpmTag_e {
+ RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */
+ RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */
+ RPMTAG_FILENLINKS = 5045, /* i[] extension */
++ RPMTAG_RECOMMENDNAME = 5046, /* s[] */
++#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */
++ RPMTAG_RECOMMENDVERSION = 5047, /* s[] */
++ RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */
++ RPMTAG_SUGGESTNAME = 5049, /* s[] */
++#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */
++ RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */
++ RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */
++ RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */
++#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */
++ RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */
++ RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */
++ RPMTAG_ENHANCENAME = 5055, /* s[] */
++#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */
++ RPMTAG_ENHANCEVERSION = 5056, /* s[] */
++ RPMTAG_ENHANCEFLAGS = 5057, /* i[] */
++ RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */
++ RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */
++ RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */
++ RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */
+
+ RPMTAG_FIRSTFREE_TAG /*!< internal */
+ } rpmTag;
+diff --git a/lib/tagexts.c b/lib/tagexts.c
+index 29b2bae..e940310 100644
+--- a/lib/tagexts.c
++++ b/lib/tagexts.c
+@@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
+ return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
+ }
+
++static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
++}
++
++static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
++}
++
++static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
++}
++
++static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
++{
++ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
++}
++
+ static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
+ {
+ return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME);
+@@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = {
+ { RPMTAG_EPOCHNUM, epochnumTag },
+ { RPMTAG_INSTFILENAMES, instfilenamesTag },
+ { RPMTAG_REQUIRENEVRS, requirenevrsTag },
++ { RPMTAG_RECOMMENDNEVRS, recommendnevrsTag},
++ { RPMTAG_SUGGESTNEVRS, suggestnevrsTag},
++ { RPMTAG_SUPPLEMENTNEVRS, supplementnevrsTag},
++ { RPMTAG_ENHANCENEVRS, enhancenevrsTag},
+ { RPMTAG_PROVIDENEVRS, providenevrsTag },
+ { RPMTAG_OBSOLETENEVRS, obsoletenevrsTag },
+ { RPMTAG_CONFLICTNEVRS, conflictnevrsTag },
+diff --git a/rpmpopt.in b/rpmpopt.in
+index 805599e..036ab4e 100644
+--- a/rpmpopt.in
++++ b/rpmpopt.in
+@@ -67,6 +67,19 @@ rpm alias --requires --qf \
+ --POPTdesc=$"list capabilities required by package(s)"
+ rpm alias -R --requires
+
++rpm alias --recommends --qf \
++ "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
++ --POPTdesc=$"list capabilities recommended by package(s)"
++rpm alias --suggests --qf \
++ "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
++ --POPTdesc=$"list capabilities suggested by package(s)"
++rpm alias --supplements --qf \
++ "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
++ --POPTdesc=$"list capabilities supplemented by package(s)"
++rpm alias --enhances --qf \
++ "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
++ --POPTdesc=$"list capabilities enhanced by package(s)"
++
+ rpm alias --info --qf '\
+ Name : %{NAME}\n\
+ %|EPOCH?{Epoch : %{EPOCH}\n}|\
+diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec
+index cb4cbbd..7c47f6d 100644
+--- a/tests/data/SPECS/deptest.spec
++++ b/tests/data/SPECS/deptest.spec
+@@ -10,6 +10,10 @@ BuildArch: noarch
+ %{?provs:Provides: %{provs}}
+ %{?cfls:Conflicts: %{cfls}}
+ %{?obs:Obsoletes: %{obs}}
++%{?recs:Recommends: %{recs}}
++%{?sugs:Suggests: %{sugs}}
++%{?sups:Supplements: %{sups}}
++%{?ens:Enhances: %{ens}}
+
+ %description
+ %{summary}
+diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
+index 6230903..c4c954c 100644
+--- a/tests/rpmbuild.at
++++ b/tests/rpmbuild.at
+@@ -185,3 +185,25 @@ lrwxrwxrwx /opt/globtest/linkgood
+ ],
+ [])
+ AT_CLEANUP
++
++# ------------------------------
++# Check if weak and reverse requires can be built
++AT_SETUP([Weak and reverse requires])
++AT_KEYWORDS([build])
++AT_CHECK([
++
++runroot rpmbuild -bb --quiet \
++ --define "pkg weakdeps" \
++ --define "recs foo > 1.2.3" \
++ --define "sugs bar >= 0.1.2" \
++ --define "sups baz" \
++ --define "ens zap = 3" \
++ /data/SPECS/deptest.spec
++
++runroot rpm -qp --qf "[%{supplementname}\n]" /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
++],
++[0],
++[baz
++],
++[ignore])
++AT_CLEANUP
+diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
+index 13131e2..80cca63 100644
+--- a/tests/rpmgeneral.at
++++ b/tests/rpmgeneral.at
+@@ -79,6 +79,11 @@ DISTTAG
+ DISTURL
+ DSAHEADER
+ E
++ENHANCEFLAGS
++ENHANCENAME
++ENHANCENEVRS
++ENHANCES
++ENHANCEVERSION
+ EPOCH
+ EPOCHNUM
+ EVR
+@@ -199,6 +204,11 @@ PROVIDES
+ PROVIDEVERSION
+ PUBKEYS
+ R
++RECOMMENDFLAGS
++RECOMMENDNAME
++RECOMMENDNEVRS
++RECOMMENDS
++RECOMMENDVERSION
+ RECONTEXTS
+ RELEASE
+ REMOVETID
+@@ -219,7 +229,17 @@ SOURCE
+ SOURCEPACKAGE
+ SOURCEPKGID
+ SOURCERPM
++SUGGESTFLAGS
++SUGGESTNAME
++SUGGESTNEVRS
++SUGGESTS
++SUGGESTVERSION
+ SUMMARY
++SUPPLEMENTFLAGS
++SUPPLEMENTNAME
++SUPPLEMENTNEVRS
++SUPPLEMENTS
++SUPPLEMENTVERSION
+ TRIGGERCONDS
+ TRIGGERFLAGS
+ TRIGGERINDEX
diff --git a/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
new file mode 100644
index 0000000000..8d84cf8a11
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
@@ -0,0 +1,38 @@
+
+Use pkgconfig to get the correct include paths
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
+
+diff --git a/configure.ac b/configure.ac
+index e97f727..8179f44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -540,10 +540,10 @@ esac],
+
+ AS_IF([test "$enable_python" = yes],[
+ AM_PATH_PYTHON([2.6],[
+- WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
++ WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I python)
+ WITH_PYTHON_SUBPACKAGE=1
+ save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
++ CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE"
+ AC_CHECK_HEADER([Python.h],[],
+ [AC_MSG_ERROR([missing Python.h])
+ ])
+diff --git a/python/Makefile.am b/python/Makefile.am
+index fff51ae..f37cb9d 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py
+
+ AM_CPPFLAGS = -I$(top_builddir)/include/
+ AM_CPPFLAGS += -I$(top_srcdir)/python
+-AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@
++AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@
+
+ pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la
+ pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py
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
new file mode 100644
index 0000000000..23bc3361d9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
@@ -0,0 +1,49 @@
+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: Pending
+
+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/rpm-disable-Wno-override-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
new file mode 100644
index 0000000000..8b5f8d66c8
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
@@ -0,0 +1,32 @@
+From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 8 Jul 2014 07:41:10 +0800
+Subject: [PATCH] configure.ac: disable -Wno-override-init
+
+Fixed rpm-native.do_configure error on CentOS 5.x:
+
+cc1: error: unrecognized command line option "-Wno-override-init"
+
+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 adeffe0..6746b4c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings,
+ # XXX gcc-4.2 on Mac OS X hasn't
+ # CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
+ # XXX rpmio/set.c needs this
+- CFLAGS="$CFLAGS -Wno-override-init"
++# CFLAGS="$CFLAGS -Wno-override-init"
+ elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then
+ dnl # Sun Studio (usually "cc")
+ CFLAGS="$CFLAGS -v"
+--
+1.8.2.1
+
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
new file mode 100644
index 0000000000..d2d9b09845
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
@@ -0,0 +1,24 @@
+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: Inapproriate (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/rpmqv_cc_b_gone.patch b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
new file mode 100644
index 0000000000..f08bd688f1
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
@@ -0,0 +1,32 @@
+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.
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -127,13 +127,13 @@ rpm_SOURCES = build.c
+ rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
+ rpm_LDADD = rpm.o $(myLDADD)
+ rpm.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c
+
+ rpmbuild_SOURCES = build.c
+ rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
+ rpmbuild_LDADD = rpmbuild.o $(myLDADD)
+ rpmbuild.o: $(top_srcdir)/rpmqv.c
+- $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.cc
++ $(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c
+
+ .PHONY: splint
+ splint:
diff --git a/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
new file mode 100644
index 0000000000..4e44bc4fec
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
@@ -0,0 +1,135 @@
+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_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."
+
+HOMEPAGE = "http://www.rpm.org"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python"
+
+SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \
+ file://use-pkgconfig-for-python.patch \
+ file://remove-db3-from-configure.patch \
+ file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \
+ file://support-suggests-tag.patch \
+ file://remove-dir-check.patch \
+ file://disable_shortcircuited.patch \
+ file://fix_libdir.patch \
+ file://rpm-scriptetexechelp.patch \
+ file://pythondeps.sh \
+ "
+
+SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
+SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4"
+
+PR = "r1"
+
+inherit autotools
+inherit pythonnative
+inherit pkgconfig
+inherit gettext
+
+EXTRA_OECONF += "--host=${HOST_SYS} \
+ --program-prefix= \
+ --prefix=${prefix} \
+ --exec-prefix=${prefix} \
+ --bindir=${prefix}/bin \
+ --sbindir=${prefix}/sbin \
+ --sysconfdir=${sysconfdir} \
+ --datadir=${prefix}/share \
+ --includedir=${prefix}/include \
+ --libdir=${prefix}/lib \
+ --libexecdir=${prefix}/libexec \
+ --localstatedir=${localstatedir} \
+ --sharedstatedir=${prefix}/com \
+ --mandir=${mandir} \
+ --infodir=${infodir} \
+ --disable-dependency-tracking \
+ --with-acl \
+ --without-lua \
+ --without-cap \
+ --enable-shared \
+ --enable-python \
+ --with-external-db \
+ "
+
+CPPFLAGS_append = " `pkg-config --cflags nss`"
+LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections"
+CCFLAGS_append = " -fPIC "
+CXXFLAGS_append = " -fPIC "
+CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE "
+
+do_configure_prepend() {
+ rm -rf sqlite
+ rm -f m4/libtool.m4
+ rm -f m4/lt*.m4
+ rm -rf db3/configure*
+}
+
+do_install_append() {
+ mv ${D}/${base_bindir}/rpm ${D}/${bindir}/
+ rmdir ${D}/${base_bindir}
+ rm -f ${D}${prefix}/lib/*.la
+ rm -f ${D}${prefix}/lib/rpm-plugins/*.la
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
+ rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
+ rm -fr ${D}/var
+ install -d ${D}${prefix}/lib/rpm/bin
+ ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit
+ ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore
+ install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
+}
+
+pkg_postinst_${PN}() {
+
+ [ "x\$D" == "x" ] && ldconfig
+ test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb
+ rm -f ${localstatedir}/lib/rpm/Filemd5s \
+ ${localstatedir}/lib/rpm/Filedigests \
+ ${localstatedir}/lib/rpm/Requireversion \
+ ${localstatedir}/lib/rpm/Provideversion
+
+}
+
+pkg_postrm_${PN}() {
+ [ "x\$D" == "x" ] && ldconfig
+
+}
+
+PACKAGES += "python-${PN}"
+PROVIDES += "python-rpm"
+
+FILES_${PN} += "${libdir}/rpm \
+ ${libdir}/rpm-plugins/exec.so \
+ "
+RDEPENDS_${PN} = "base-files run-postinsts"
+RDEPENDS_${PN}_class-native = "base-files run-postinsts"
+
+FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \
+ ${libdir}/rpm-plugins/.debug/* \
+ ${libdir}/python2.7/site-packages/rpm/.debug/* \
+ "
+
+FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la"
+
+FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*"
+RDEPENDS_python-${PN} = "${PN} python"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index 4ab22e7602..a85e28fa1f 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -108,6 +108,8 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
file://rpm-fix-logio-cp.patch \
file://rpm-db5-or-db6.patch \
file://rpm-rpmpgp-fix.patch \
+ file://rpm-disable-Wno-override-init.patch \
+ file://rpm-realpath.patch \
"
# Uncomment the following line to enable platform score debugging
@@ -273,8 +275,6 @@ FILES_${PN}-libs = "${libdir}/librpm-*.so \
${libdir}/librpmbuild-*.so \
"
-RDEPENDS_${PN}-build += "bash"
-
FILES_${PN}-build = "${prefix}/src/rpm \
${bindir}/rpmbuild \
${bindir}/rpmbuild.real \
@@ -348,7 +348,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file"
+RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN}"
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index cc836befe0..d99a300285 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -91,6 +91,10 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
file://rpm-payload-use-hashed-inode.patch \
file://rpm-fix-logio-cp.patch \
file://rpm-db5-or-db6.patch \
+ file://rpm-disable-Wno-override-init.patch \
+ file://rpmqv_cc_b_gone.patch \
+ file://rpm-realpath.patch \
+ file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
"
# Uncomment the following line to enable platform score debugging
@@ -259,8 +263,6 @@ FILES_${PN}-libs = "${libdir}/librpm-*.so \
${libdir}/librpmbuild-*.so \
"
-RDEPENDS_${PN}-build += "bash"
-
FILES_${PN}-build = "${prefix}/src/rpm \
${bindir}/rpmbuild \
${bindir}/rpmbuild.real \
@@ -334,7 +336,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file"
+RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN}"
@@ -342,6 +344,7 @@ FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*"
FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+PROVIDES += "python-rpm"
FILES_perl-module-rpm = "${libdir}/perl/*/* \
"
diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 4e9d055f24..7f4caf9886 100644
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
@@ -275,7 +275,13 @@ int printDepList(rpmts *ts, int tscount)
char *name = strdup((char *)he->p.ptr);
/* Get its requires */
he->tag = RPMTAG_REQUIRENAME;
- rc = (headerGet(h, he, 0) != 1);
+ if (rc = (headerGet(h, he, 0) != 1)) {
+ if (debugmode) {
+ printf("DEBUG: %s requires null\n", name);
+ }
+ rc = 0;
+ continue;
+ }
ARGV_t reqs = (ARGV_t)he->p.ptr;
/* Get its requireflags */
he->tag = RPMTAG_REQUIREFLAGS;
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.0.bb b/meta/recipes-devtools/rsync/rsync_3.1.0.bb
deleted file mode 100644
index 72c072dae5..0000000000
--- a/meta/recipes-devtools/rsync/rsync_3.1.0.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require rsync.inc
-
-
-SRC_URI += "file://acinclude.m4"
-
-SRC_URI[md5sum] = "3be148772a33224771a8d4d2a028b132"
-SRC_URI[sha256sum] = "81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e"
-
-EXTRA_OECONF += "--disable-xattr-support --disable-acl-support"
-
-# 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
- cp -f ${WORKDIR}/acinclude.m4 ${S}/
-
- # by default, if crosscompiling, rsync
- # disables a number of capabilities, hardlinking
- # symlinks and special files (ie devices)
- export rsync_cv_can_hardlink_special=yes
- export rsync_cv_can_hardlink_symlink=yes
-}
-
-do_configure_append () {
- cp -f ${S}/configure ${S}/configure.sh
-}
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.1.bb b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
new file mode 100644
index 0000000000..5ff8ae8bb4
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
@@ -0,0 +1,27 @@
+require rsync.inc
+
+
+SRC_URI += "file://acinclude.m4"
+
+SRC_URI[md5sum] = "43bd6676f0b404326eee2d63be3cdcfe"
+SRC_URI[sha256sum] = "7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621"
+
+PACKAGECONFIG ??= "acl attr"
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+
+# 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
+ cp -f ${WORKDIR}/acinclude.m4 ${S}/
+
+ # By default, if crosscompiling, rsync disables a number of
+ # capabilities, hardlinking symlinks and special files (i.e. devices)
+ export rsync_cv_can_hardlink_special=yes
+ export rsync_cv_can_hardlink_symlink=yes
+}
+
+do_configure_append () {
+ cp -f ${S}/configure ${S}/configure.sh
+}
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 822327aadc..85a043949e 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -13,5 +13,4 @@ RemainAfterExit=No
TimeoutSec=0
[Install]
-WantedBy=basic.target
WantedBy=sysinit.target
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 64f85c262d..d126132a87 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -9,6 +9,8 @@ SRC_URI = "file://run-postinsts \
file://run-postinsts.init \
file://run-postinsts.service"
+S = "${WORKDIR}"
+
inherit allarch systemd update-rc.d
INITSCRIPT_NAME = "run-postinsts"
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch
deleted file mode 100644
index 8b9904fd56..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4024.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Upstream-Status: Backport
-
-Reference:http://squashfs.git.sourceforge.net/git/gitweb.cgi?p=
-squashfs/squashfs;a=commit;h=19c38fba0be1ce949ab44310d7f49887576cc123
-
-Fix potential stack overflow in get_component() where an individual
-pathname component in an extract file (specified on the command line
-or in an extract file) could exceed the 1024 byte sized targname
-allocated on the stack.
-
-Fix by dynamically allocating targname rather than storing it as
-a fixed size on the stack.
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-29 17:04:08.000000000 +0800
-+++ b/unsquashfs.c 2012-11-29 17:04:25.000000000 +0800
-@@ -1034,15 +1034,18 @@ void squashfs_closedir(struct dir *dir)
- }
-
-
--char *get_component(char *target, char *targname)
-+char *get_component(char *target, char **targname)
- {
-+ char *start;
-+
- while(*target == '/')
- target ++;
-
-+ start = target;
- while(*target != '/' && *target!= '\0')
-- *targname ++ = *target ++;
-+ target ++;
-
-- *targname = '\0';
-+ *targname = strndup(start, target - start);
-
- return target;
- }
-@@ -1068,12 +1071,12 @@ void free_path(struct pathname *paths)
-
- struct pathname *add_path(struct pathname *paths, char *target, char *alltarget)
- {
-- char targname[1024];
-+ char *targname;
- int i, error;
-
- TRACE("add_path: adding \"%s\" extract file\n", target);
-
-- target = get_component(target, targname);
-+ target = get_component(target, &targname);
-
- if(paths == NULL) {
- paths = malloc(sizeof(struct pathname));
-@@ -1097,7 +1100,7 @@ struct pathname *add_path(struct pathnam
- sizeof(struct path_entry));
- if(paths->name == NULL)
- EXIT_UNSQUASH("Out of memory in add_path\n");
-- paths->name[i].name = strdup(targname);
-+ paths->name[i].name = targname;
- paths->name[i].paths = NULL;
- if(use_regex) {
- paths->name[i].preg = malloc(sizeof(regex_t));
-@@ -1130,6 +1133,8 @@ struct pathname *add_path(struct pathnam
- /*
- * existing matching entry
- */
-+ free(targname);
-+
- if(paths->name[i].paths == NULL) {
- /*
- * No sub-directory which means this is the leaf
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch
deleted file mode 100644
index 0dabfba663..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-4.2-fix-CVE-2012-4025.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-Upstream-Status: Backport
-
-Reference: http://squashfs.git.sourceforge.net/git/gitweb.cgi?
-p=squashfs/squashfs;a=patch;h=8515b3d420f502c5c0236b86e2d6d7e3b23c190e
-
-Integer overflow in the queue_init function in unsquashfs.c in
-unsquashfs in Squashfs 4.2 and earlier allows remote attackers
-to execute arbitrary code via a crafted block_log field in the
-superblock of a .sqsh file, leading to a heap-based buffer overflow.
-
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4025
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
---- a/unsquashfs.c 2012-11-30 17:57:57.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 17:58:09.000000000 +0800
-@@ -33,6 +33,7 @@
- #include <sys/types.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-+#include <limits.h>
-
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_deflate, *to_writer, *from_writer;
-@@ -138,6 +139,24 @@ void sigalrm_handler()
- }
-
-
-+int add_overflow(int a, int b)
-+{
-+ return (INT_MAX - a) < b;
-+}
-+
-+
-+int shift_overflow(int a, int shift)
-+{
-+ return (INT_MAX >> shift) < a;
-+}
-+
-+
-+int multiply_overflow(int a, int multiplier)
-+{
-+ return (INT_MAX / multiplier) < a;
-+}
-+
-+
- struct queue *queue_init(int size)
- {
- struct queue *queue = malloc(sizeof(struct queue));
-@@ -145,6 +164,10 @@ struct queue *queue_init(int size)
- if(queue == NULL)
- EXIT_UNSQUASH("Out of memory in queue_init\n");
-
-+ if(add_overflow(size, 1) ||
-+ multiply_overflow(size + 1, sizeof(void *)))
-+ EXIT_UNSQUASH("Size too large in queue_init\n");
-+
- queue->data = malloc(sizeof(void *) * (size + 1));
- if(queue->data == NULL)
- EXIT_UNSQUASH("Out of memory in queue_init\n");
-@@ -1948,13 +1971,30 @@ void initialise_threads(int fragment_buf
- * allocate to_reader, to_deflate and to_writer queues. Set based on
- * open file limit and cache size, unless open file limit is unlimited,
- * in which case set purely based on cache limits
-+ *
-+ * In doing so, check that the user supplied values do not overflow
-+ * a signed int
- */
- if (max_files != -1) {
-+ if(add_overflow(data_buffer_size, max_files) ||
-+ add_overflow(data_buffer_size, max_files * 2))
-+ EXIT_UNSQUASH("Data queue size is too large\n");
-+
- to_reader = queue_init(max_files + data_buffer_size);
- to_deflate = queue_init(max_files + data_buffer_size);
- to_writer = queue_init(max_files * 2 + data_buffer_size);
- } else {
-- int all_buffers_size = fragment_buffer_size + data_buffer_size;
-+ int all_buffers_size;
-+
-+ if(add_overflow(fragment_buffer_size, data_buffer_size))
-+ EXIT_UNSQUASH("Data and fragment queues combined are"
-+ " too large\n");
-+
-+ all_buffers_size = fragment_buffer_size + data_buffer_size;
-+
-+ if(add_overflow(all_buffers_size, all_buffers_size))
-+ EXIT_UNSQUASH("Data and fragment queues combined are"
-+ " too large\n");
-
- to_reader = queue_init(all_buffers_size);
- to_deflate = queue_init(all_buffers_size);
-@@ -2059,6 +2099,32 @@ void progress_bar(long long current, lon
- }
-
-
-+int parse_number(char *arg, int *res)
-+{
-+ char *b;
-+ long number = strtol(arg, &b, 10);
-+
-+ /* check for trailing junk after number */
-+ if(*b != '\0')
-+ return 0;
-+
-+ /* check for strtol underflow or overflow in conversion */
-+ if(number == LONG_MIN || number == LONG_MAX)
-+ return 0;
-+
-+ /* reject negative numbers as invalid */
-+ if(number < 0)
-+ return 0;
-+
-+ /* check if long result will overflow signed int */
-+ if(number > INT_MAX)
-+ return 0;
-+
-+ *res = number;
-+ return 1;
-+}
-+
-+
- #define VERSION() \
- printf("unsquashfs version 4.2 (2011/02/28)\n");\
- printf("copyright (C) 2011 Phillip Lougher "\
-@@ -2140,8 +2206,8 @@ int main(int argc, char *argv[])
- } else if(strcmp(argv[i], "-data-queue") == 0 ||
- strcmp(argv[i], "-da") == 0) {
- if((++i == argc) ||
-- (data_buffer_size = strtol(argv[i], &b,
-- 10), *b != '\0')) {
-+ !parse_number(argv[i],
-+ &data_buffer_size)) {
- ERROR("%s: -data-queue missing or invalid "
- "queue size\n", argv[0]);
- exit(1);
-@@ -2154,8 +2220,8 @@ int main(int argc, char *argv[])
- } else if(strcmp(argv[i], "-frag-queue") == 0 ||
- strcmp(argv[i], "-fr") == 0) {
- if((++i == argc) ||
-- (fragment_buffer_size = strtol(argv[i],
-- &b, 10), *b != '\0')) {
-+ !parse_number(argv[i],
-+ &fragment_buffer_size)) {
- ERROR("%s: -frag-queue missing or invalid "
- "queue size\n", argv[0]);
- exit(1);
-@@ -2280,11 +2346,39 @@ options:
- block_log = sBlk.s.block_log;
-
- /*
-+ * Sanity check block size and block log.
-+ *
-+ * Check they're within correct limits
-+ */
-+ if(block_size > SQUASHFS_FILE_MAX_SIZE ||
-+ block_log > SQUASHFS_FILE_MAX_LOG)
-+ EXIT_UNSQUASH("Block size or block_log too large."
-+ " File system is corrupt.\n");
-+
-+ /*
-+ * Check block_size and block_log match
-+ */
-+ if(block_size != (1 << block_log))
-+ EXIT_UNSQUASH("Block size and block_log do not match."
-+ " File system is corrupt.\n");
-+
-+ /*
- * convert from queue size in Mbytes to queue size in
-- * blocks
-+ * blocks.
-+ *
-+ * In doing so, check that the user supplied values do not
-+ * overflow a signed int
- */
-- fragment_buffer_size <<= 20 - block_log;
-- data_buffer_size <<= 20 - block_log;
-+ if(shift_overflow(fragment_buffer_size, 20 - block_log))
-+ EXIT_UNSQUASH("Fragment queue size is too large\n");
-+ else
-+ fragment_buffer_size <<= 20 - block_log;
-+
-+ if(shift_overflow(data_buffer_size, 20 - block_log))
-+ EXIT_UNSQUASH("Data queue size is too large\n");
-+ else
-+ data_buffer_size <<= 20 - block_log;
-+
- initialise_threads(fragment_buffer_size, data_buffer_size);
-
- fragment_data = malloc(block_size);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch
deleted file mode 100644
index fa075f9e7d..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-add-a-commment-and-fix-some-other-comments.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Backport
-
-unsquashfs: add a commment and fix some other comments
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-30 15:27:14.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 15:27:56.000000000 +0800
-@@ -814,7 +814,7 @@ int write_file(struct inode *inode, char
-
- /*
- * the writer thread is queued a squashfs_file structure describing the
-- * file. If the file has one or more blocks or a fragments they are
-+ * file. If the file has one or more blocks or a fragment they are
- * queued separately (references to blocks in the cache).
- */
- file->fd = file_fd;
-@@ -838,7 +838,7 @@ int write_file(struct inode *inode, char
- block->offset = 0;
- block->size = i == file_end ? inode->data & (block_size - 1) :
- block_size;
-- if(block_list[i] == 0) /* sparse file */
-+ if(block_list[i] == 0) /* sparse block */
- block->buffer = NULL;
- else {
- block->buffer = cache_get(data_cache, start,
-@@ -2161,6 +2161,10 @@ options:
- block_size = sBlk.s.block_size;
- block_log = sBlk.s.block_log;
-
-+ /*
-+ * convert from queue size in Mbytes to queue size in
-+ * blocks
-+ */
- fragment_buffer_size <<= 20 - block_log;
- data_buffer_size <<= 20 - block_log;
- initialise_threads(fragment_buffer_size, data_buffer_size);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch
deleted file mode 100644
index c60f7b42af..0000000000
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-Upstream-Status: Backport
-
-unsquashfs: fix open file limit
-
-Previously Unsquashfs relied on the to_writer queue being
-set to 1000 to limit the amount of open file read-ahead to a
-maximum of 500. For the default process limit of 1024 open files
-this was perhaps acceptable, but it obviously breaks if ulimit has
-been used to set the open file limit to below 504 (this includes
-stdin, stdout, stderr and the Squashfs filesystem being unsquashed).
-
-More importantly setting the to_writer queue to 1000 to limit
-the amount of files open has always been an inherent performance
-hit because the to_writer queue queues blocks. It limits the
-block readhead to 1000 blocks, irrespective of how many files
-that represents. A single file containing more than 1000 blocks
-will still be limited to a 1000 block readahead even though the
-data block cache typically can buffer more than this (at the
-default data cache size of 256 Mbytes and the default block size
-of 128 Kbytes, it can buffer 2048 blocks). Obviously the
-caches serve more than just a read-ahead role (they also
-cache decompressed blocks in case they're referenced later e.g.
-by duplicate files), but the artificial limit imposed on
-the read-ahead due to setting the to_writer queue to 1000 is
-unnecessary.
-
-This commit does away with the need to limit the to_writer queue,
-by introducing open_wait() and close_wake() calls which correctly
-track the amount of open files.
-
-Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
-diff -urpN a/unsquashfs.c b/unsquashfs.c
---- a/unsquashfs.c 2012-11-30 15:31:29.000000000 +0800
-+++ b/unsquashfs.c 2012-11-30 15:32:03.000000000 +0800
-@@ -31,6 +31,8 @@
-
- #include <sys/sysinfo.h>
- #include <sys/types.h>
-+#include <sys/time.h>
-+#include <sys/resource.h>
-
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_deflate, *to_writer, *from_writer;
-@@ -784,6 +786,46 @@ failure:
- }
-
-
-+pthread_mutex_t open_mutex = PTHREAD_MUTEX_INITIALIZER;
-+pthread_cond_t open_empty = PTHREAD_COND_INITIALIZER;
-+int open_unlimited, open_count;
-+#define OPEN_FILE_MARGIN 10
-+
-+
-+void open_init(int count)
-+{
-+ open_count = count;
-+ open_unlimited = count == -1;
-+}
-+
-+
-+int open_wait(char *pathname, int flags, mode_t mode)
-+{
-+ if (!open_unlimited) {
-+ pthread_mutex_lock(&open_mutex);
-+ while (open_count == 0)
-+ pthread_cond_wait(&open_empty, &open_mutex);
-+ open_count --;
-+ pthread_mutex_unlock(&open_mutex);
-+ }
-+
-+ return open(pathname, flags, mode);
-+}
-+
-+
-+void close_wake(int fd)
-+{
-+ close(fd);
-+
-+ if (!open_unlimited) {
-+ pthread_mutex_lock(&open_mutex);
-+ open_count ++;
-+ pthread_cond_signal(&open_empty);
-+ pthread_mutex_unlock(&open_mutex);
-+ }
-+}
-+
-+
- int write_file(struct inode *inode, char *pathname)
- {
- unsigned int file_fd, i;
-@@ -794,8 +836,8 @@ int write_file(struct inode *inode, char
-
- TRACE("write_file: regular file, blocks %d\n", inode->blocks);
-
-- file_fd = open(pathname, O_CREAT | O_WRONLY | (force ? O_TRUNC : 0),
-- (mode_t) inode->mode & 0777);
-+ file_fd = open_wait(pathname, O_CREAT | O_WRONLY |
-+ (force ? O_TRUNC : 0), (mode_t) inode->mode & 0777);
- if(file_fd == -1) {
- ERROR("write_file: failed to create file %s, because %s\n",
- pathname, strerror(errno));
-@@ -1712,7 +1754,7 @@ void *writer(void *arg)
- }
- }
-
-- close(file_fd);
-+ close_wake(file_fd);
- if(failed == FALSE)
- set_attributes(file->pathname, file->mode, file->uid,
- file->gid, file->time, file->xattr, force);
-@@ -1803,9 +1845,9 @@ void *progress_thread(void *arg)
-
- void initialise_threads(int fragment_buffer_size, int data_buffer_size)
- {
-- int i;
-+ struct rlimit rlim;
-+ int i, max_files, res;
- sigset_t sigmask, old_mask;
-- int all_buffers_size = fragment_buffer_size + data_buffer_size;
-
- sigemptyset(&sigmask);
- sigaddset(&sigmask, SIGINT);
-@@ -1841,10 +1883,86 @@ void initialise_threads(int fragment_buf
- EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
- deflator_thread = &thread[3];
-
-- to_reader = queue_init(all_buffers_size);
-- to_deflate = queue_init(all_buffers_size);
-- to_writer = queue_init(1000);
-+ /*
-+ * dimensioning the to_reader and to_deflate queues. The size of
-+ * these queues is directly related to the amount of block
-+ * read-ahead possible. To_reader queues block read requests to
-+ * the reader thread and to_deflate queues block decompression
-+ * requests to the deflate thread(s) (once the block has been read by
-+ * the reader thread). The amount of read-ahead is determined by
-+ * the combined size of the data_block and fragment caches which
-+ * determine the total number of blocks which can be "in flight"
-+ * at any one time (either being read or being decompressed)
-+ *
-+ * The maximum file open limit, however, affects the read-ahead
-+ * possible, in that for normal sizes of the fragment and data block
-+ * caches, where the incoming files have few data blocks or one fragment
-+ * only, the file open limit is likely to be reached before the
-+ * caches are full. This means the worst case sizing of the combined
-+ * sizes of the caches is unlikely to ever be necessary. However, is is
-+ * obvious read-ahead up to the data block cache size is always possible
-+ * irrespective of the file open limit, because a single file could
-+ * contain that number of blocks.
-+ *
-+ * Choosing the size as "file open limit + data block cache size" seems
-+ * to be a reasonable estimate. We can reasonably assume the maximum
-+ * likely read-ahead possible is data block cache size + one fragment
-+ * per open file.
-+ *
-+ * dimensioning the to_writer queue. The size of this queue is
-+ * directly related to the amount of block read-ahead possible.
-+ * However, unlike the to_reader and to_deflate queues, this is
-+ * complicated by the fact the to_writer queue not only contains
-+ * entries for fragments and data_blocks but it also contains
-+ * file entries, one per open file in the read-ahead.
-+ *
-+ * Choosing the size as "2 * (file open limit) +
-+ * data block cache size" seems to be a reasonable estimate.
-+ * We can reasonably assume the maximum likely read-ahead possible
-+ * is data block cache size + one fragment per open file, and then
-+ * we will have a file_entry for each open file.
-+ */
-+ res = getrlimit(RLIMIT_NOFILE, &rlim);
-+ if (res == -1) {
-+ ERROR("failed to get open file limit! Defaulting to 1\n");
-+ rlim.rlim_cur = 1;
-+ }
-+
-+ if (rlim.rlim_cur != RLIM_INFINITY) {
-+ /*
-+ * leave OPEN_FILE_MARGIN free (rlim_cur includes fds used by
-+ * stdin, stdout, stderr and filesystem fd
-+ */
-+ if (rlim.rlim_cur <= OPEN_FILE_MARGIN)
-+ /* no margin, use minimum possible */
-+ max_files = 1;
-+ else
-+ max_files = rlim.rlim_cur - OPEN_FILE_MARGIN;
-+ } else
-+ max_files = -1;
-+
-+ /* set amount of available files for use by open_wait and close_wake */
-+ open_init(max_files);
-+
-+ /*
-+ * allocate to_reader, to_deflate and to_writer queues. Set based on
-+ * open file limit and cache size, unless open file limit is unlimited,
-+ * in which case set purely based on cache limits
-+ */
-+ if (max_files != -1) {
-+ to_reader = queue_init(max_files + data_buffer_size);
-+ to_deflate = queue_init(max_files + data_buffer_size);
-+ to_writer = queue_init(max_files * 2 + data_buffer_size);
-+ } else {
-+ int all_buffers_size = fragment_buffer_size + data_buffer_size;
-+
-+ to_reader = queue_init(all_buffers_size);
-+ to_deflate = queue_init(all_buffers_size);
-+ to_writer = queue_init(all_buffers_size * 2);
-+ }
-+
- from_writer = queue_init(1);
-+
- fragment_cache = cache_init(block_size, fragment_buffer_size);
- data_cache = cache_init(block_size, data_buffer_size);
- pthread_create(&thread[0], NULL, reader, NULL);
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb
index 57400cdda0..d36f0fea44 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_4.3.bb
@@ -3,31 +3,28 @@
SUMMARY = "Tools for manipulating SquashFS filesystems"
SECTION = "base"
LICENSE = "GPL-2 & PD"
-LIC_FILES_CHKSUM = "file://../COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://../../7zC.txt;beginline=12;endline=16;md5=2056cd6d919ebc3807602143c7449a7c \
"
-DEPENDS = "attr zlib xz"
-PR = "r2"
+DEPENDS = "attr zlib xz lzo lz4"
SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${PV}.tar.gz;name=squashfs \
http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
"
-SRC_URI += "file://squashfs-4.2-fix-CVE-2012-4024.patch \
- file://squashfs-add-a-commment-and-fix-some-other-comments.patch \
- file://squashfs-fix-open-file-limit.patch \
- file://squashfs-4.2-fix-CVE-2012-4025.patch \
- "
-SRC_URI[squashfs.md5sum] = "1b7a781fb4cf8938842279bd3e8ee852"
-SRC_URI[squashfs.sha256sum] = "d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96"
+
+SRC_URI[squashfs.md5sum] = "d92ab59aabf5173f2a59089531e30dbf"
+SRC_URI[squashfs.sha256sum] = "0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6"
+
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
S = "${WORKDIR}/squashfs${PV}/squashfs-tools"
+SPDX_S = "${WORKDIR}/squashfs${PV}"
# 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"
+EXTRA_OEMAKE = "MAKEFLAGS= LZMA_SUPPORT=1 LZMA_DIR=../.. XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1"
do_compile() {
oe_runmake mksquashfs
@@ -39,4 +36,4 @@ do_install () {
ARM_INSTRUCTION_SET = "arm"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
deleted file mode 100644
index f5556b23e3..0000000000
--- a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-strace: Add ptest
-
-Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
-Upstream-Status: Pending
-
---- old/tests/Makefile.am 2013-07-23 13:44:24.660481381 +0200
-+++ new/tests/Makefile.am 2013-07-23 16:22:42.937654391 +0200
-@@ -9,3 +9,20 @@
- EXTRA_DIST = init.sh $(TESTS)
-
- CLEANFILES = check.log
-+
-+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
-+
-+install-ptest:
-+ install $(BUILDDIR)/strace $(DESTDIR)
-+ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
-+ install -d $(DESTDIR)/$(TESTDIR)
-+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
-+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
-+ for file in $(check_PROGRAMS); do \
-+ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
-+ done
-+ for file in $(EXTRA_DIST); do \
-+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
-+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
-+ done
-+ sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
diff --git a/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
new file mode 100644
index 0000000000..df013102d7
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
@@ -0,0 +1,53 @@
+strace: Add ptest
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 2 +-
+ tests/Makefile.am | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 054f85b..9aec566 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_INIT([strace],
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_HEADERS([config.h])
+-AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 922452a..b17837f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -37,3 +37,21 @@ TEST_LOG_COMPILER = $(srcdir)/run.sh
+ EXTRA_DIST = init.sh run.sh sigaction.awk $(TESTS)
+
+ CLEANFILES = $(TESTS:=.tmp)
++
++buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
++
++install-ptest:
++ install $(BUILDDIR)/strace $(DESTDIR)
++ install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
++ install -d $(DESTDIR)/$(TESTDIR)
++ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
++ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
++ sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
++ for file in $(check_PROGRAMS); do \
++ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
++ done
++ for file in $(EXTRA_DIST); do \
++ 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
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace-4.8/git-version-gen b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
index 8fee74e121..8fee74e121 100755
--- a/meta/recipes-devtools/strace/strace-4.8/git-version-gen
+++ b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
diff --git a/meta/recipes-devtools/strace/strace-4.8/run-ptest b/meta/recipes-devtools/strace/strace-4.9/run-ptest
index 133cf92d02..133cf92d02 100755
--- a/meta/recipes-devtools/strace/strace-4.8/run-ptest
+++ b/meta/recipes-devtools/strace/strace-4.9/run-ptest
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
index 27266d9052..15e37bce03 100644
--- a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch
+++ b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
@@ -3,18 +3,24 @@ Add options "aio" and "acl" to enable/disable libaio and acl support.
Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 27 ++++++++++++++++++++++++++-
+ 1 file changed, 26 insertions(+), 1 deletion(-)
---- strace-4.8/configure.ac.orig 2013-06-21 15:37:52.145892182 +0800
-+++ strace-4.8/configure.ac 2013-06-21 15:45:49.029909004 +0800
-@@ -219,7 +219,6 @@ AC_CHECK_HEADERS(m4_normalize([
- netinet/sctp.h
+diff --git a/configure.ac b/configure.ac
+index 054f85b..8ed49f1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,7 +238,6 @@ AC_CHECK_HEADERS(m4_normalize([
poll.h
+ scsi/sg.h
stropts.h
- sys/acl.h
sys/asynch.h
sys/conf.h
sys/epoll.h
-@@ -231,6 +230,19 @@ AC_CHECK_HEADERS(m4_normalize([
+@@ -250,6 +249,18 @@ AC_CHECK_HEADERS(m4_normalize([
sys/uio.h
sys/vfs.h
]))
@@ -22,30 +28,25 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+AC_ARG_ENABLE([acl],
+ [AS_HELP_STRING([--enable-acl], [turn on acl support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([sys/acl.h])
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
-+
+)
+
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
[], [], [#include <stddef.h>
#include <sys/socket.h>
-@@ -301,10 +313,19 @@ AC_CHECK_SIZEOF([long])
- AC_CHECK_SIZEOF([long long])
- AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
+@@ -649,6 +660,20 @@ if test "x$st_cv_have___builtin_popcount" = xyes; then
+ [Define to 1 if the system provides __builtin_popcount function])
+ fi
--AC_CHECK_HEADERS([libaio.h], [
-- AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-- AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
--])
+AC_ARG_ENABLE([aio],
+ [AS_HELP_STRING([--enable-aio], [turn on libaio support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([libaio.h], [
+ AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
+ AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
@@ -55,6 +56,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
+)
-
++
AC_PATH_PROG([PERL], [perl])
+ dnl stack trace with libunwind
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace_4.8.bb b/meta/recipes-devtools/strace/strace_4.9.bb
index 71563d4a41..cce130d58c 100644
--- a/meta/recipes-devtools/strace/strace_4.8.bb
+++ b/meta/recipes-devtools/strace/strace_4.9.bb
@@ -11,16 +11,17 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://run-ptest \
"
-SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
-SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
+SRC_URI[md5sum] = "885eafadb10f6c60464a266d3929a2a4"
+SRC_URI[sha256sum] = "095bfea5c540b91d297ccac73b21b92fd54a24599fd70395db87ff9eb7fd6f65"
inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
PACKAGECONFIG_class-target ?= "libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind"
export INCLUDES = "-I. -I./linux"
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch
deleted file mode 100644
index e8acb12a21..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/allow-updated-neon.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Allow neon 0.30 to be usable also
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: subversion-1.7.10/configure.ac
-===================================================================
---- subversion-1.7.10.orig/configure.ac
-+++ subversion-1.7.10/configure.ac
-@@ -118,7 +118,7 @@ AC_PATH_PROG(PKG_CONFIG, pkg-config)
-
- # Either a space-separated list of allowable Neon versions, or "any" to
- # mean allow anything.
--NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29"
-+NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28 0\.29 0\.30"
- NEON_RECOMMENDED_VER="0.29.6"
- NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz"
- dnl You can skip the neon version check only if you know what you are doing
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch
deleted file mode 100644
index fb79b8cc51..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/fix-install-depends.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-install-neon-lib should depend on libsvn_delta's installation
-
-install-neon-lib needs libsvn_delta-1.la which will be regenerated
-during libsvn_delta-1.la's installation, if libsvn_delta-1.la is
-in regenerating and at the same time install-neon-lib links it, the
-error willl happen.
-
-Let install-neon-lib run after libsvn_delta-1.la is installed will fix
-the problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- build-outputs.mk | 2 +-
- build.conf | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
---- subversion-1.7.6.orig/build-outputs.mk
-+++ subversion-1.7.6/build-outputs.mk
-@@ -983,11 +983,11 @@ install-locale: subversion/po/de.mo subv
- $(MKDIR) $(DESTDIR)$(localedir)/zh_CN/LC_MESSAGES
- cd subversion/po ; $(INSTALL_LOCALE) zh_CN.mo $(DESTDIR)$(localedir)/zh_CN/LC_MESSAGES/$(PACKAGE_NAME).mo
- $(MKDIR) $(DESTDIR)$(localedir)/zh_TW/LC_MESSAGES
- cd subversion/po ; $(INSTALL_LOCALE) zh_TW.mo $(DESTDIR)$(localedir)/zh_TW/LC_MESSAGES/$(PACKAGE_NAME).mo
-
--install-neon-lib: subversion/libsvn_ra_neon/libsvn_ra_neon-1.la
-+install-neon-lib: subversion/libsvn_ra_neon/libsvn_ra_neon-1.la $(SVN_FS_LIB_INSTALL_DEPS)
- $(MKDIR) $(DESTDIR)$(neon_libdir)
- cd subversion/libsvn_ra_neon ; $(INSTALL_NEON_LIB) libsvn_ra_neon-1.la $(DESTDIR)$(neon_libdir)/libsvn_ra_neon-1.la
-
- install-ramod-lib: subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_ra_svn/libsvn_ra_svn-1.la subversion/libsvn_repos/libsvn_repos-1.la subversion/libsvn_ra_local/libsvn_ra_local-1.la
- $(MKDIR) $(DESTDIR)$(ramod_libdir)
---- subversion-1.7.6.orig/build.conf
-+++ subversion-1.7.6/build.conf
-@@ -270,10 +270,12 @@ msvc-export = svn_ra.h private\svn_ra_pr
- [libsvn_ra_neon]
- type = ra-module
- path = subversion/libsvn_ra_neon
- install = neon-lib
- libs = libsvn_delta libsvn_subr aprutil apriconv apr neon
-+# conditionally add more dependencies
-+add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
- msvc-static = yes
-
- # Accessing repositories via DAV through serf
- [libsvn_ra_serf]
- type = ra-module
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch
deleted file mode 100644
index 013d0c3649..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/neon.m4-fix-includes-and-cflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix to get correct SVN_NEON_CONFIG and CFLAGS when sysroot path contains '-D' and '-I'
-characters.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
-index f951039..a813145 100644
---- a/build/ac-macros/neon.m4
-+++ b/build/ac-macros/neon.m4
-@@ -105,8 +105,8 @@ AC_DEFUN(SVN_NEON_CONFIG,
- test "$svn_allowed_neon" = "any"; then
- svn_allowed_neon_on_system="yes"
- if test "$NEON_PKG_CONFIG" = "yes"; then
-- SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`]
-- CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/-I[^ ]*//g'`"]
-+ SVN_NEON_INCLUDES=["`$PKG_CONFIG neon --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`"]
-+ CFLAGS=["$CFLAGS `$PKG_CONFIG neon --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
- old_CFLAGS="$CFLAGS"
- old_LIBS="$LIBS"
- NEON_LIBS=`$PKG_CONFIG neon --libs`
-@@ -126,8 +126,8 @@ int main()
- CFLAGS="$old_CFLAGS"
- LIBS="$old_LIBS"
- else
-- SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`]
-- CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/-I[^ ]*//g'`"]
-+ SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/^-D[^ ]*//g' -e 's/ -D[^ ]*//g'`]
-+ CFLAGS=["$CFLAGS `$neon_config --cflags | $SED -e 's/^-I[^ ]*//g' -e 's/ -I[^ ]*//g'`"]
- NEON_LIBS=`$neon_config --libs`
- fi
- svn_lib_neon="yes"
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch
deleted file mode 100644
index 88bd25e0d9..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4131.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Backport
-
-Index: subversion/mod_dav_svn/repos.c
-===================================================================
---- a/subversion/mod_dav_svn/repos.c (revision 1503527)
-+++ b/subversion/mod_dav_svn/repos.c (revision 1503528)
-@@ -2408,21 +2408,12 @@
- svn_boolean_t is_urlpath,
- apr_pool_t *pool)
- {
-- apr_size_t len;
-- char *tmp = apr_pstrdup(pool, path);
--
-- len = strlen(tmp);
--
-- if (len > 0)
-+ if (*path != '\0') /* not an empty string */
- {
-- /* Remove any trailing slash; else svn_path_dirname() asserts. */
-- if (tmp[len-1] == '/')
-- tmp[len-1] = '\0';
--
- if (is_urlpath)
-- return svn_urlpath__dirname(tmp, pool);
-+ return svn_urlpath__dirname(path, pool);
- else
-- return svn_fspath__dirname(tmp, pool);
-+ return svn_fspath__dirname(path, pool);
- }
-
- return path;
-@@ -2458,7 +2449,9 @@
- parent->versioned = 1;
- parent->hooks = resource->hooks;
- parent->pool = resource->pool;
-- parent->uri = get_parent_path(resource->uri, TRUE, resource->pool);
-+ parent->uri = get_parent_path(svn_urlpath__canonicalize(resource->uri,
-+ resource->pool),
-+ TRUE, resource->pool);
- parent->info = parentinfo;
-
- parentinfo->uri_path =
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch
deleted file mode 100644
index a5900d8b7d..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4277.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Backport
-
---- a/subversion/svnserve/main.c
-+++ b/subversion/svnserve/main.c
-@@ -403,8 +403,9 @@ static svn_error_t *write_pid_file(const
- const char *contents = apr_psprintf(pool, "%" APR_PID_T_FMT "\n",
- getpid());
-
-+ SVN_ERR(svn_io_remove_file2(filename, TRUE, pool));
- SVN_ERR(svn_io_file_open(&file, filename,
-- APR_WRITE | APR_CREATE | APR_TRUNCATE,
-+ APR_WRITE | APR_CREATE | APR_EXCL,
- APR_OS_DEFAULT, pool));
- SVN_ERR(svn_io_file_write_full(file, contents, strlen(contents), NULL,
- pool));
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch b/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch
deleted file mode 100644
index a54d6944ed..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/subversion-CVE-2013-4505.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Upstream-Status: Backport
-
-Index: tools/server-side/mod_dontdothat/mod_dontdothat.c
-===================================================================
---- a/tools/server-side/mod_dontdothat/mod_dontdothat.c (revision 1239695)
-+++ b/tools/server-side/mod_dontdothat/mod_dontdothat.c (revision 1542078)
-@@ -30,12 +30,15 @@
- #include <util_filter.h>
- #include <ap_config.h>
- #include <apr_strings.h>
-+#include <apr_uri.h>
-
- #include <expat.h>
-
- #include "mod_dav_svn.h"
- #include "svn_string.h"
- #include "svn_config.h"
-+#include "svn_path.h"
-+#include "private/svn_fspath.h"
-
- module AP_MODULE_DECLARE_DATA dontdothat_module;
-
-@@ -161,26 +164,71 @@
- }
- }
-
-+/* duplicate of dav_svn__log_err() from mod_dav_svn/util.c */
-+static void
-+log_dav_err(request_rec *r,
-+ dav_error *err,
-+ int level)
-+{
-+ dav_error *errscan;
-+
-+ /* Log the errors */
-+ /* ### should have a directive to log the first or all */
-+ for (errscan = err; errscan != NULL; errscan = errscan->prev) {
-+ apr_status_t status;
-+
-+ if (errscan->desc == NULL)
-+ continue;
-+
-+#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
-+ status = errscan->aprerr;
-+#else
-+ status = errscan->save_errno;
-+#endif
-+
-+ ap_log_rerror(APLOG_MARK, level, status, r,
-+ "%s [%d, #%d]",
-+ errscan->desc, errscan->status, errscan->error_id);
-+ }
-+}
-+
- static svn_boolean_t
- is_this_legal(dontdothat_filter_ctx *ctx, const char *uri)
- {
- const char *relative_path;
- const char *cleaned_uri;
- const char *repos_name;
-+ const char *uri_path;
- int trailing_slash;
- dav_error *derr;
-
-- /* Ok, so we need to skip past the scheme, host, etc. */
-- uri = ap_strstr_c(uri, "://");
-- if (uri)
-- uri = ap_strchr_c(uri + 3, '/');
-+ /* uri can be an absolute uri or just a path, we only want the path to match
-+ * against */
-+ if (uri && svn_path_is_url(uri))
-+ {
-+ apr_uri_t parsed_uri;
-+ apr_status_t rv = apr_uri_parse(ctx->r->pool, uri, &parsed_uri);
-+ if (APR_SUCCESS != rv)
-+ {
-+ /* Error parsing the URI, log and reject request. */
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, ctx->r,
-+ "mod_dontdothat: blocked request after failing "
-+ "to parse uri: '%s'", uri);
-+ return FALSE;
-+ }
-+ uri_path = parsed_uri.path;
-+ }
-+ else
-+ {
-+ uri_path = uri;
-+ }
-
-- if (uri)
-+ if (uri_path)
- {
- const char *repos_path;
-
- derr = dav_svn_split_uri(ctx->r,
-- uri,
-+ uri_path,
- ctx->cfg->base_path,
- &cleaned_uri,
- &trailing_slash,
-@@ -194,7 +242,7 @@
- if (! repos_path)
- repos_path = "";
-
-- repos_path = apr_psprintf(ctx->r->pool, "/%s", repos_path);
-+ repos_path = svn_fspath__canonicalize(repos_path, ctx->r->pool);
-
- /* First check the special cases that are always legal... */
- for (idx = 0; idx < ctx->allow_recursive_ops->nelts; ++idx)
-@@ -228,7 +276,20 @@
- }
- }
- }
-+ else
-+ {
-+ log_dav_err(ctx->r, derr, APLOG_ERR);
-+ return FALSE;
-+ }
-+
- }
-+ else
-+ {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r,
-+ "mod_dontdothat: empty uri passed to is_this_legal(), "
-+ "module bug?");
-+ return FALSE;
-+ }
-
- return TRUE;
- }
diff --git a/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch b/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch
new file mode 100644
index 0000000000..ec3be496f3
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.8.10/disable_macos.patch
@@ -0,0 +1,68 @@
+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 @@
+ AC_DEFUN(SVN_LIB_MACHO_ITERATE,
+ [
+ AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
+- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- #include <mach-o/dyld.h>
+- #include <mach-o/loader.h>
+- ]],[[
+- const struct mach_header *header = _dyld_get_image_header(0);
+- const char *name = _dyld_get_image_name(0);
+- if (name && header) return 0;
+- return 1;
+- ]])],[
+- AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1],
+- [Is Mach-O low-level _dyld API available?])
+- AC_MSG_RESULT([yes])
+- ],[
+ AC_MSG_RESULT([no])
+- ])
+ ])
+
+ dnl SVN_LIB_MACOS_PLIST
+@@ -46,34 +32,7 @@
+ AC_DEFUN(SVN_LIB_MACOS_PLIST,
+ [
+ AC_MSG_CHECKING([for Mac OS property list utilities])
+-
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+- #include <AvailabilityMacros.h>
+- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
+- || !defined(MAC_OS_X_VERSION_10_0) \
+- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0)
+- #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"
+- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
+- [Is Mac OS property list API available?])
+- AC_MSG_RESULT([yes])
+- ],[
+ AC_MSG_RESULT([no])
+- ])
+ ])
+
+ dnl SVN_LIB_MACOS_KEYCHAIN
diff --git a/meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch b/meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch
index 5cd572bfc8..5cd572bfc8 100644
--- a/meta/recipes-devtools/subversion/subversion-1.7.10/libtool2.patch
+++ b/meta/recipes-devtools/subversion/subversion-1.8.10/libtool2.patch
diff --git a/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch
new file mode 100644
index 0000000000..03d5b9710f
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3522.patch
@@ -0,0 +1,439 @@
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/subversion/libsvn_ra_serf/util.c.old b/subversion/libsvn_ra_serf/util.c
+index b6c0141..8b09770 100644
+--- a/subversion/libsvn_ra_serf/util.c.old
++++ b/subversion/libsvn_ra_serf/util.c
+@@ -21,7 +21,6 @@
+ #define APR_WANT_STRFUNC
+ #include <apr.h>
+ #include <apr_want.h>
+-#include <apr_fnmatch.h>
+
+ #include <serf.h>
+ #include <serf_bucket_types.h>
+@@ -30,6 +29,7 @@
+ #include "svn_private_config.h"
+ #include "svn_xml.h"
+ #include "private/svn_dep_compat.h"
++#include "private/svn_cert.h"
+
+ #include "ra_serf.h"
+
+@@ -113,7 +113,12 @@ ssl_server_cert(void *baton, int failures,
+ apr_uint32_t svn_failures;
+ svn_error_t *err;
+ apr_hash_t *issuer, *subject, *serf_cert;
++ apr_array_header_t *san;
+ void *creds;
++ svn_boolean_t found_matching_hostname = FALSE;
++ svn_boolean_t found_san_entry = FALSE;
++ svn_string_t *actual_hostname =
++ svn_string_create(conn->hostname, scratch_pool);
+
+ /* Implicitly approve any non-server certs. */
+ if (serf_ssl_cert_depth(cert) > 0)
+@@ -129,6 +134,7 @@ ssl_server_cert(void *baton, int failures,
+ serf_cert = serf_ssl_cert_certificate(cert, subpool);
+
+ cert_info.hostname = apr_hash_get(subject, "CN", APR_HASH_KEY_STRING);
++ san = apr_hash_get(serf_cert, "subjectAltName", APR_HASH_KEY_STRING);
+ cert_info.fingerprint = apr_hash_get(serf_cert, "sha1", APR_HASH_KEY_STRING);
+ if (! cert_info.fingerprint)
+ cert_info.fingerprint = apr_pstrdup(subpool, "<unknown>");
+@@ -145,16 +145,43 @@ ssl_server_cert(void *baton, int failures,
+
+ svn_failures = ssl_convert_serf_failures(failures);
+
+- /* Match server certificate CN with the hostname of the server */
+- if (cert_info.hostname)
++ /* Try to find matching server name via subjectAltName first... */
++ if (san)
+ {
+- if (apr_fnmatch(cert_info.hostname, conn->hostinfo,
+- APR_FNM_PERIOD) == APR_FNM_NOMATCH)
++ int i;
++ found_san_entry = san->nelts > 0;
++ for (i = 0; i < san->nelts; i++)
+ {
+- svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
++ char *s = APR_ARRAY_IDX(san, i, char*);
++ svn_string_t *cert_hostname = svn_string_create(s, scratch_pool);
++
++ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
++ {
++ found_matching_hostname = TRUE;
++ cert_info.hostname = s;
++ break;
++ }
+ }
+ }
+
++ /* Match server certificate CN with the hostname of the server iff
++ * we didn't find any subjectAltName fields and try to match them.
++ * Per RFC 2818 they are authoritative if present and CommonName
++ * should be ignored. */
++ if (!found_matching_hostname && !found_san_entry && cert_info.hostname)
++ {
++ svn_string_t *cert_hostname = svn_string_create(cert_info.hostname,
++ scratch_pool);
++
++ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
++ {
++ found_matching_hostname = TRUE;
++ }
++ }
++
++ if (!found_matching_hostname)
++ svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
++
+ svn_auth_set_parameter(conn->session->wc_callbacks->auth_baton,
+ SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
+ &svn_failures);
+@@ -261,6 +293,10 @@ svn_ra_serf__conn_setup(apr_socket_t *sock,
+ if (!conn->ssl_context)
+ {
+ conn->ssl_context = serf_bucket_ssl_encrypt_context_get(rb);
++
++#if SERF_VERSION_AT_LEAST(1,0,0)
++ serf_ssl_set_hostname(conn->ssl_context, conn->hostinfo);
++#endif
+
+ serf_ssl_client_cert_provider_set(conn->ssl_context,
+ svn_ra_serf__handle_client_cert,
+diff --git a/subversion/libsvn_subr/dirent_uri.c.old b/subversion/libsvn_subr/dirent_uri.c
+index eef99ba..a5f9e7e 100644
+--- a/subversion/libsvn_subr/dirent_uri.c.old
++++ b/subversion/libsvn_subr/dirent_uri.c
+@@ -30,6 +30,7 @@
+ #include "svn_path.h"
+
+ #include "private_uri.h"
++#include "private/svn_cert.h"
+
+ /* The canonical empty path. Can this be changed? Well, change the empty
+ test below and the path library will work, not so sure about the fs/wc
+@@ -1194,3 +1195,81 @@ svn_uri_is_canonical(const char *uri, apr_pool_t *pool)
+
+ return TRUE;
+ }
++
++
++/* -------------- The cert API (see private/svn_cert.h) ------------- */
++
++svn_boolean_t
++svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname)
++{
++ apr_size_t pattern_pos = 0, hostname_pos = 0;
++
++ /* support leading wildcards that composed of the only character in the
++ * left-most label. */
++ if (pattern->len >= 2 &&
++ pattern->data[pattern_pos] == '*' &&
++ pattern->data[pattern_pos + 1] == '.')
++ {
++ while (hostname_pos < hostname->len &&
++ hostname->data[hostname_pos] != '.')
++ {
++ hostname_pos++;
++ }
++ /* Assume that the wildcard must match something. Rule 2 says
++ * that *.example.com should not match example.com. If the wildcard
++ * ends up not matching anything then it matches .example.com which
++ * seems to be essentially the same as just example.com */
++ if (hostname_pos == 0)
++ return FALSE;
++
++ pattern_pos++;
++ }
++
++ while (pattern_pos < pattern->len && hostname_pos < hostname->len)
++ {
++ char pattern_c = pattern->data[pattern_pos];
++ char hostname_c = hostname->data[hostname_pos];
++
++ /* fold case as described in RFC 4343.
++ * Note: We actually convert to lowercase, since our URI
++ * canonicalization code converts to lowercase and generally
++ * most certs are issued with lowercase DNS names, meaning
++ * this avoids the fold operation in most cases. The RFC
++ * suggests the opposite transformation, but doesn't require
++ * any specific implementation in any case. It is critical
++ * that this folding be locale independent so you can't use
++ * tolower(). */
++ pattern_c = canonicalize_to_lower(pattern_c);
++ hostname_c = canonicalize_to_lower(hostname_c);
++
++ if (pattern_c != hostname_c)
++ {
++ /* doesn't match */
++ return FALSE;
++ }
++ else
++ {
++ /* characters match so skip both */
++ pattern_pos++;
++ hostname_pos++;
++ }
++ }
++
++ /* ignore a trailing period on the hostname since this has no effect on the
++ * security of the matching. See the following for the long explanation as
++ * to why:
++ * https://bugzilla.mozilla.org/show_bug.cgi?id=134402#c28
++ */
++ if (pattern_pos == pattern->len &&
++ hostname_pos == hostname->len - 1 &&
++ hostname->data[hostname_pos] == '.')
++ hostname_pos++;
++
++ if (pattern_pos != pattern->len || hostname_pos != hostname->len)
++ {
++ /* end didn't match */
++ return FALSE;
++ }
++
++ return TRUE;
++}
+diff --git a/subversion/tests/libsvn_subr/dirent_uri-test.c.old b/subversion/tests/libsvn_subr/dirent_uri-test.c
+index d71d9c1..370b64a 100644
+--- a/subversion/tests/libsvn_subr/dirent_uri-test.c.old
++++ b/subversion/tests/libsvn_subr/dirent_uri-test.c
+@@ -31,6 +31,7 @@
+
+ #include "svn_pools.h"
+ #include "svn_dirent_uri.h"
++#include "private/svn_cert.h"
+
+ #include "../svn_test.h"
+ #include "../../libsvn_subr/private_uri.h"
+@@ -1671,6 +1672,145 @@ test_uri_internal_style(const char **msg,
+ return SVN_NO_ERROR;
+ }
+
++struct cert_match_dns_test {
++ const char *pattern;
++ const char *hostname;
++ svn_boolean_t expected;
++};
++
++static svn_error_t *
++run_cert_match_dns_tests(struct cert_match_dns_test *tests, apr_pool_t *pool)
++{
++ struct cert_match_dns_test *ct;
++ apr_pool_t *iterpool = svn_pool_create(pool);
++
++ for (ct = tests; ct->pattern; ct++)
++ {
++ svn_boolean_t result;
++ svn_string_t *pattern, *hostname;
++
++ svn_pool_clear(iterpool);
++
++ pattern = svn_string_create(ct->pattern, iterpool);
++ hostname = svn_string_create(ct->hostname, iterpool);
++
++ result = svn_cert__match_dns_identity(pattern, hostname);
++ if (result != ct->expected)
++ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
++ "Expected %s but got %s for pattern '%s' on "
++ "hostname '%s'",
++ ct->expected ? "match" : "no match",
++ result ? "match" : "no match",
++ pattern->data, hostname->data);
++
++ }
++
++ svn_pool_destroy(iterpool);
++
++ return SVN_NO_ERROR;
++}
++
++static struct cert_match_dns_test cert_match_dns_tests[] = {
++ { "foo.example.com", "foo.example.com", TRUE }, /* exact match */
++ { "foo.example.com", "FOO.EXAMPLE.COM", TRUE }, /* case differences */
++ { "FOO.EXAMPLE.COM", "foo.example.com", TRUE },
++ { "*.example.com", "FoO.ExAmPlE.CoM", TRUE },
++ { "*.ExAmPlE.CoM", "foo.example.com", TRUE },
++ { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", TRUE },
++ { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TRUE },
++ { "foo.example.com", "bar.example.com", FALSE }, /* difference at start */
++ { "foo.example.com", "foo.example.net", FALSE }, /* difference at end */
++ { "foo.example.com", "foo.example.commercial", FALSE }, /* hostname longer */
++ { "foo.example.commercial", "foo.example.com", FALSE }, /* pattern longer */
++ { "foo.example.comcom", "foo.example.com", FALSE }, /* repeated suffix */
++ { "foo.example.com", "foo.example.comcom", FALSE },
++ { "foo.example.com.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.example.com.com", FALSE },
++ { "foofoo.example.com", "foo.example.com", FALSE }, /* repeated prefix */
++ { "foo.example.com", "foofoo.example.com", FALSE },
++ { "foo.foo.example.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.foo.example.com", FALSE },
++ { "foo.*.example.com", "foo.bar.example.com", FALSE }, /* RFC 6125 s. 6.4.3
++ Rule 1 */
++ { "*.example.com", "foo.example.com", TRUE }, /* RFC 6125 s. 6.4.3 Rule 2 */
++ { "*.example.com", "bar.foo.example.com", FALSE }, /* Rule 2 */
++ { "*.example.com", "example.com", FALSE }, /* Rule 2 */
++ { "*.example.com", ".example.com", FALSE }, /* RFC doesn't say what to do
++ here and a leading period on
++ a hostname doesn't make sense
++ so we'll just reject this. */
++ { "*", "foo.example.com", FALSE }, /* wildcard must be left-most label,
++ implies that there must be more than
++ one label. */
++ { "*", "example.com", FALSE },
++ { "*", "com", FALSE },
++ { "*.example.com", "foo.example.net", FALSE }, /* difference in literal text
++ with a wildcard. */
++ { "*.com", "example.com", TRUE }, /* See Errata ID 3090 for RFC 6125,
++ probably shouldn't allow this but
++ we do for now. */
++ { "*.", "example.com", FALSE }, /* test some dubious 2 character wildcard
++ patterns */
++ { "*.", "example.", TRUE }, /* This one feels questionable */
++ { "*.", "example", FALSE },
++ { "*.", ".", FALSE },
++ { "a", "a", TRUE }, /* check that single letter exact matches work */
++ { "a", "b", FALSE }, /* and single letter not matches shouldn't */
++ { "*.*.com", "foo.example.com", FALSE }, /* unsupported wildcards */
++ { "*.*.com", "example.com", FALSE },
++ { "**.example.com", "foo.example.com", FALSE },
++ { "**.example.com", "example.com", FALSE },
++ { "f*.example.com", "foo.example.com", FALSE },
++ { "f*.example.com", "bar.example.com", FALSE },
++ { "*o.example.com", "foo.example.com", FALSE },
++ { "*o.example.com", "bar.example.com", FALSE },
++ { "f*o.example.com", "foo.example.com", FALSE },
++ { "f*o.example.com", "bar.example.com", FALSE },
++ { "foo.e*.com", "foo.example.com", FALSE },
++ { "foo.*e.com", "foo.example.com", FALSE },
++ { "foo.e*e.com", "foo.example.com", FALSE },
++ { "foo.example.com", "foo.example.com.", TRUE }, /* trailing dot */
++ { "*.example.com", "foo.example.com.", TRUE },
++ { "foo", "foo.", TRUE },
++ { "foo.example.com.", "foo.example.com", FALSE },
++ { "*.example.com.", "foo.example.com", FALSE },
++ { "foo.", "foo", FALSE },
++ { "foo.example.com", "foo.example.com..", FALSE },
++ { "*.example.com", "foo.example.com..", FALSE },
++ { "foo", "foo..", FALSE },
++ { "foo.example.com..", "foo.example.com", FALSE },
++ { "*.example.com..", "foo.example.com", FALSE },
++ { "foo..", "foo", FALSE },
++ { NULL }
++};
++
++static svn_error_t *
++test_cert_match_dns_identity(apr_pool_t *pool)
++{
++ return run_cert_match_dns_tests(cert_match_dns_tests, pool);
++}
++
++/* This test table implements results that should happen if we supported
++ * RFC 6125 s. 6.4.3 Rule 3. We don't so it's expected to fail for now. */
++static struct cert_match_dns_test rule3_tests[] = {
++ { "baz*.example.net", "baz1.example.net", TRUE },
++ { "*baz.example.net", "foobaz.example.net", TRUE },
++ { "b*z.example.net", "buuz.example.net", TRUE },
++ { "b*z.example.net", "bz.example.net", FALSE }, /* presume wildcard can't
++ match nothing */
++ { "baz*.example.net", "baz.example.net", FALSE },
++ { "*baz.example.net", "baz.example.net", FALSE },
++ { "b*z.example.net", "buuzuuz.example.net", TRUE }, /* presume wildcard
++ should be greedy */
++ { NULL }
++};
++
++static svn_error_t *
++test_rule3(apr_pool_t *pool)
++{
++ return run_cert_match_dns_tests(rule3_tests, pool);
++}
++
+
+ /* The test table. */
+
+@@ -1699,5 +1839,7 @@ struct svn_test_descriptor_t test_funcs[] =
+ SVN_TEST_PASS(test_uri_local_style),
+ SVN_TEST_PASS(test_dirent_internal_style),
+ SVN_TEST_PASS(test_uri_internal_style),
++ SVN_TEST_PASS(test_cert_match_dns_identity),
++ SVN_TEST_XFAIL(test_rule3),
+ SVN_TEST_NULL
+ };
+diff --git a/subversion/include/private/svn_cert.h b/subversion/include/private/svn_cert.h
+new file mode 100644
+index 0000000..32e32a0
+--- /dev/null
++++ b/subversion/include/private/svn_cert.h
+@@ -0,0 +1,68 @@
++/**
++ * @copyright
++ * ====================================================================
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements. See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership. The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied. See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ * ====================================================================
++ * @endcopyright
++ *
++ * @file svn_cert.h
++ * @brief Implementation of certificate validation functions
++ */
++
++#ifndef SVN_CERT_H
++#define SVN_CERT_H
++
++#include <apr.h>
++
++#include "svn_types.h"
++#include "svn_string.h"
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++
++/* Return TRUE iff @a pattern matches @a hostname as defined
++ * by the matching rules of RFC 6125. In the context of RFC
++ * 6125 the pattern is the domain name portion of the presented
++ * identifier (which comes from the Common Name or a DNSName
++ * portion of the subjectAltName of an X.509 certificate) and
++ * the hostname is the source domain (i.e. the host portion
++ * of the URI the user entered).
++ *
++ * @note With respect to wildcards we only support matching
++ * wildcards in the left-most label and as the only character
++ * in the left-most label (i.e. we support RFC 6125 § 6.4.3
++ * Rule 1 and 2 but not the optional Rule 3). This may change
++ * in the future.
++ *
++ * @note Subversion does not at current support internationalized
++ * domain names. Both values are presumed to be in NR-LDH label
++ * or A-label form (see RFC 5890 for the definition).
++ *
++ * @since New in 1.9.
++ */
++svn_boolean_t
++svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname);
++
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* SVN_CERT_H */
diff --git a/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch
new file mode 100644
index 0000000000..23e738e985
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2014-3528.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/subversion/libsvn_subr/config_auth.c.old b/subversion/libsvn_subr/config_auth.c
+index ff50270..c511d04 100644
+--- a/subversion/libsvn_subr/config_auth.c.old
++++ b/subversion/libsvn_subr/config_auth.c
+@@ -85,6 +85,7 @@ svn_config_read_auth_data(apr_hash_t **hash,
+ if (kind == svn_node_file)
+ {
+ svn_stream_t *stream;
++ svn_string_t *stored_realm;
+
+ SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
+ _("Unable to open auth file for reading"));
+@@ -95,6 +96,12 @@ svn_config_read_auth_data(apr_hash_t **hash,
+ apr_psprintf(pool, _("Error parsing '%s'"),
+ svn_path_local_style(auth_path, pool)));
+
++ stored_realm = apr_hash_get(*hash, SVN_CONFIG_REALMSTRING_KEY,
++ APR_HASH_KEY_STRING);
++
++ if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0)
++ *hash = NULL; /* Hash collision, or somebody tampering with storage */
++
+ SVN_ERR(svn_stream_close(stream));
+ }
+
diff --git a/meta/recipes-devtools/subversion/subversion_1.6.15.bb b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
index 1bc637473b..b135bb7a3f 100644
--- a/meta/recipes-devtools/subversion/subversion_1.6.15.bb
+++ b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
@@ -17,7 +17,10 @@ SRC_URI = "http://subversion.tigris.org/downloads/${BPN}-${PV}.tar.bz2 \
file://subversion-CVE-2013-4505.patch \
file://subversion-CVE-2013-1845.patch \
file://subversion-CVE-2013-1847-CVE-2013-1846.patch \
- file://subversion-CVE-2013-4277.patch"
+ file://subversion-CVE-2013-4277.patch \
+ file://subversion-CVE-2014-3522.patch \
+ file://subversion-CVE-2014-3528.patch \
+"
SRC_URI[md5sum] = "113fca1d9e4aa389d7dc2b210010fa69"
SRC_URI[sha256sum] = "b2919d603a5f3c19f42e3265c4b930e2376c43b3969b90ef9c42b2f72d5aaa45"
diff --git a/meta/recipes-devtools/subversion/subversion_1.7.10.bb b/meta/recipes-devtools/subversion/subversion_1.7.10.bb
deleted file mode 100644
index e745ce764e..0000000000
--- a/meta/recipes-devtools/subversion/subversion_1.7.10.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util neon sqlite3 file"
-RDEPENDS_${PN} = "neon"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://libtool2.patch \
- file://fix-install-depends.patch \
- file://allow-updated-neon.patch \
- file://neon.m4-fix-includes-and-cflags.patch \
- file://subversion-CVE-2013-4505.patch \
- file://subversion-CVE-2013-4131.patch \
- file://subversion-CVE-2013-4277.patch \
-"
-SRC_URI[md5sum] = "4088a77e14232876c9b4ff1541e6e200"
-SRC_URI[sha256sum] = "c1df222bec83d014d17785e2ceba6bc80962f64b280967de0285836d8d77a8e7"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4a14fd2da3134e40a087eb4326a4ecd4"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-
-EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs \
- --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
- --with-apr-util=${STAGING_BINDIR_CROSS} \
- ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-
-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
-}
diff --git a/meta/recipes-devtools/subversion/subversion_1.8.10.bb b/meta/recipes-devtools/subversion/subversion_1.8.10.bb
new file mode 100644
index 0000000000..b223d26b3d
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion_1.8.10.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+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://libtool2.patch \
+ file://disable_macos.patch \
+"
+SRC_URI[md5sum] = "3068256761b40863df96128834d6b71b"
+SRC_URI[sha256sum] = "1cc900c8a7974337c3ed389dc6b5c59012ec48c7d4107ae31fd7c929ded47dcc"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2f0119e478700b5428e26386cff923"
+
+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} "
+
+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/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch b/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
deleted file mode 100644
index fb03bbfe2c..0000000000
--- a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Upstream-Status: Backport [ba638fd9bf72b0c786c88909014136cfa641a147]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From b663fd7257481438256f8267831dc10b06363b22 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Tue, 16 Jul 2013 22:16:11 +0100
-Subject: [PATCH 1/4] movebits: Add SMT_TERMINAL - a last resort region type
-
-Some memory regions are usable, but only as a last resort just before we
-hand over control to a kernel image. Add the necessary movebits
-infrastructure to use these regions when all other options have been
-exhausted.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/lib/syslinux/zonelist.c
----
- com32/include/syslinux/movebits.h | 1 +
- com32/lib/syslinux/movebits.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/com32/include/syslinux/movebits.h b/com32/include/syslinux/movebits.h
-index 8bcdf3e..114a896 100644
---- a/com32/include/syslinux/movebits.h
-+++ b/com32/include/syslinux/movebits.h
-@@ -34,6 +34,7 @@ enum syslinux_memmap_types {
- SMT_RESERVED, /* Unusable memory */
- SMT_ALLOC, /* Memory allocated by user */
- SMT_ZERO, /* Memory that should be zeroed */
-+ SMT_TERMINAL, /* Memory to be used as a last resort */
- };
-
- struct syslinux_memmap {
-diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c
-index 7a05f3c..8ffdc63 100644
---- a/com32/lib/syslinux/movebits.c
-+++ b/com32/lib/syslinux/movebits.c
-@@ -160,7 +160,7 @@ static const struct syslinux_memmap *is_free_zone(const struct syslinux_memmap
- if (list->start <= start) {
- if (llast >= last) {
- /* Chunk has a single, well-defined type */
-- if (list->type == SMT_FREE) {
-+ if (list->type == SMT_FREE || list->type == SMT_TERMINAL) {
- dprintf("F: 0x%08x bytes at 0x%08x\n",
- list->next->start, list->start);
- return list; /* It's free */
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch b/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
deleted file mode 100644
index 48d3955910..0000000000
--- a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
+++ /dev/null
@@ -1,450 +0,0 @@
-Upstream-Status: Backport [787d7e568fe08d7080d2cd03cd9ee27c327eca67]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 2e05f34c0c5bc0144bb203a169009dfb6837b4e3 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 12:15:16 +0100
-Subject: [PATCH 2/4] memscan: build a linked list of memory scanners
-
-By registering memory scanners at runtime we can support multiple memory
-scanner functions, which helps us to isolate them and keep things
-modular, only registering them for specific platform/derivative
-combinations. This is preparation for adding a memory scanner that is
-specific to PXELINUX on bios and understands when the memory region
-occupied by the PXE stack can be reused.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/include/syslinux/memscan.h
- com32/lib/syslinux/memscan.c
----
- com32/include/syslinux/firmware.h | 4 +-
- com32/include/syslinux/memscan.h | 14 +++-
- com32/lib/syslinux/memscan.c | 143 +++++++-------------------------------
- core/bios.c | 125 ++++++++++++++++++++++++++++++++-
- efi/main.c | 14 ++--
- 5 files changed, 173 insertions(+), 127 deletions(-)
-
-diff --git a/com32/include/syslinux/firmware.h b/com32/include/syslinux/firmware.h
-index 4a43c86..6cc06a0 100644
---- a/com32/include/syslinux/firmware.h
-+++ b/com32/include/syslinux/firmware.h
-@@ -1,7 +1,8 @@
- #ifndef _SYSLINUX_FIRMWARE_H
- #define _SYSLINUX_FIRMWARE_H
-
--#include <syslinux/memscan.h>
-+#include <inttypes.h>
-+#include <stdbool.h>
-
- struct term_state;
-
-@@ -42,7 +43,6 @@ struct mem_ops {
- void *(*malloc)(size_t, enum heap, size_t);
- void *(*realloc)(void *, size_t);
- void (*free)(void *);
-- int (*scan_memory)(scan_memory_callback_t, void *);
- };
-
- struct initramfs;
-diff --git a/com32/include/syslinux/memscan.h b/com32/include/syslinux/memscan.h
-index c3ebf84..ab78e28 100644
---- a/com32/include/syslinux/memscan.h
-+++ b/com32/include/syslinux/memscan.h
-@@ -29,11 +29,19 @@
- #ifndef _SYSLINUX_MEMSCAN_H
- #define _SYSLINUX_MEMSCAN_H
-
--#include <stdbool.h>
-+#include <linux/list.h>
- #include <syslinux/movebits.h> /* addr_t */
-
--typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t, bool);
-+typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t,
-+ enum syslinux_memmap_types type);
-+
-+struct syslinux_memscan {
-+ int (*func)(scan_memory_callback_t callback, void *data);
-+ struct list_head next;
-+};
-+
-+void syslinux_memscan_add(struct syslinux_memscan *entry);
-+int syslinux_memscan_new(int (*func)(scan_memory_callback_t cb, void *data));
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data);
--int bios_scan_memory(scan_memory_callback_t callback, void *data);
-
- #endif /* _SYSLINUX_MEMSCAN_H */
-diff --git a/com32/lib/syslinux/memscan.c b/com32/lib/syslinux/memscan.c
-index 0ff25d7..fdb7274 100644
---- a/com32/lib/syslinux/memscan.c
-+++ b/com32/lib/syslinux/memscan.c
-@@ -32,133 +32,44 @@
- * Query the system for free memory
- */
-
--#include <assert.h>
--#include <stdbool.h>
--#include <stdlib.h>
--#include <string.h>
--#include <inttypes.h>
--#include <com32.h>
--
- #include <syslinux/memscan.h>
--#include <syslinux/firmware.h>
-
--struct e820_entry {
-- uint64_t start;
-- uint64_t len;
-- uint32_t type;
--};
-+static LIST_HEAD(syslinux_memscan_head);
-
--int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+/*
-+ * Add a memscan entry to the list.
-+ */
-+void syslinux_memscan_add(struct syslinux_memscan *entry)
- {
-- static com32sys_t ireg;
-- com32sys_t oreg;
-- struct e820_entry *e820buf;
-- uint64_t start, len, maxlen;
-- int memfound = 0;
-- int rv;
-- addr_t dosmem;
-- const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+ list_add(&entry->next, &syslinux_memscan_head);
-+}
-
-- /* Use INT 12h to get DOS memory */
-- __intcall(0x12, &__com32_zero_regs, &oreg);
-- dosmem = oreg.eax.w[0] << 10;
-- if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-- /* INT 12h reports nonsense... now what? */
-- uint16_t ebda_seg = *(uint16_t *) 0x40e;
-- if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-- dosmem = ebda_seg << 4;
-- else
-- dosmem = 640 * 1024; /* Hope for the best... */
-- }
-- rv = callback(data, bios_data, dosmem - bios_data, true);
-- if (rv)
-- return rv;
-+/*
-+ * Build a new memscan entry and add it to the list.
-+ */
-+int syslinux_memscan_new(int func(scan_memory_callback_t, void *data))
-+{
-+ struct syslinux_memscan *entry;
-
-- /* First try INT 15h AX=E820h */
-- e820buf = lzalloc(sizeof *e820buf);
-- if (!e820buf)
-+ entry = malloc(sizeof *entry);
-+ if (!entry)
- return -1;
-
-- ireg.eax.l = 0xe820;
-- ireg.edx.l = 0x534d4150;
-- ireg.ebx.l = 0;
-- ireg.ecx.l = sizeof(*e820buf);
-- ireg.es = SEG(e820buf);
-- ireg.edi.w[0] = OFFS(e820buf);
--
-- do {
-- __intcall(0x15, &ireg, &oreg);
--
-- if ((oreg.eflags.l & EFLAGS_CF) ||
-- (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-- break;
--
-- start = e820buf->start;
-- len = e820buf->len;
--
-- if (start < 0x100000000ULL) {
-- /* Don't rely on E820 being valid for low memory. Doing so
-- could mean stuff like overwriting the PXE stack even when
-- using "keeppxe", etc. */
-- if (start < 0x100000ULL) {
-- if (len > 0x100000ULL - start)
-- len -= 0x100000ULL - start;
-- else
-- len = 0;
-- start = 0x100000ULL;
-- }
--
-- maxlen = 0x100000000ULL - start;
-- if (len > maxlen)
-- len = maxlen;
--
-- if (len) {
-- rv = callback(data, (addr_t) start, (addr_t) len,
-- e820buf->type == 1);
-- if (rv)
-- return rv;
-- memfound = 1;
-- }
-- }
--
-- ireg.ebx.l = oreg.ebx.l;
-- } while (oreg.ebx.l);
--
-- lfree(e820buf);
--
-- if (memfound)
-- return 0;
--
-- /* Next try INT 15h AX=E801h */
-- ireg.eax.w[0] = 0xe801;
-- __intcall(0x15, &ireg, &oreg);
--
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
--
-- if (oreg.edx.w[0]) {
-- rv = callback(data, (addr_t) 16 << 20, oreg.edx.w[0] << 16, true);
-- if (rv)
-- return rv;
-- }
--
-- return 0;
-- }
--
-- /* Finally try INT 15h AH=88h */
-- ireg.eax.w[0] = 0x8800;
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
-- }
--
-+ entry->func = func;
-+ syslinux_memscan_add(entry);
- return 0;
- }
-
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-- return firmware->mem->scan_memory(callback, data);
-+ struct syslinux_memscan *entry;
-+ int rv = 0;
-+
-+ list_for_each_entry(entry, &syslinux_memscan_head, next) {
-+ rv = entry->func(callback, data);
-+ if (rv)
-+ break;
-+ }
-+
-+ return rv;
- }
-diff --git a/core/bios.c b/core/bios.c
-index 53223e8..5344833 100644
---- a/core/bios.c
-+++ b/core/bios.c
-@@ -501,6 +501,129 @@ static inline void bios_timer_init(void)
-
- extern uint16_t *bios_free_mem;
-
-+struct e820_entry {
-+ uint64_t start;
-+ uint64_t len;
-+ uint32_t type;
-+};
-+
-+static int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ static com32sys_t ireg;
-+ com32sys_t oreg;
-+ struct e820_entry *e820buf;
-+ uint64_t start, len, maxlen;
-+ int memfound = 0;
-+ int rv;
-+ addr_t dosmem;
-+ const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+
-+ /* Use INT 12h to get DOS memory */
-+ __intcall(0x12, &__com32_zero_regs, &oreg);
-+ dosmem = oreg.eax.w[0] << 10;
-+ if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-+ /* INT 12h reports nonsense... now what? */
-+ uint16_t ebda_seg = *(uint16_t *) 0x40e;
-+ if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-+ dosmem = ebda_seg << 4;
-+ else
-+ dosmem = 640 * 1024; /* Hope for the best... */
-+ }
-+ rv = callback(data, bios_data, dosmem - bios_data, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ /* First try INT 15h AX=E820h */
-+ e820buf = lzalloc(sizeof *e820buf);
-+ if (!e820buf)
-+ return -1;
-+
-+ ireg.eax.l = 0xe820;
-+ ireg.edx.l = 0x534d4150;
-+ ireg.ebx.l = 0;
-+ ireg.ecx.l = sizeof(*e820buf);
-+ ireg.es = SEG(e820buf);
-+ ireg.edi.w[0] = OFFS(e820buf);
-+
-+ do {
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if ((oreg.eflags.l & EFLAGS_CF) ||
-+ (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-+ break;
-+
-+ start = e820buf->start;
-+ len = e820buf->len;
-+
-+ if (start < 0x100000000ULL) {
-+ /* Don't rely on E820 being valid for low memory. Doing so
-+ could mean stuff like overwriting the PXE stack even when
-+ using "keeppxe", etc. */
-+ if (start < 0x100000ULL) {
-+ if (len > 0x100000ULL - start)
-+ len -= 0x100000ULL - start;
-+ else
-+ len = 0;
-+ start = 0x100000ULL;
-+ }
-+
-+ maxlen = 0x100000000ULL - start;
-+ if (len > maxlen)
-+ len = maxlen;
-+
-+ if (len) {
-+ enum syslinux_memmap_types type;
-+
-+ type = e820buf->type == 1 ? SMT_FREE : SMT_RESERVED;
-+ rv = callback(data, (addr_t) start, (addr_t) len, type);
-+ if (rv)
-+ return rv;
-+ memfound = 1;
-+ }
-+ }
-+
-+ ireg.ebx.l = oreg.ebx.l;
-+ } while (oreg.ebx.l);
-+
-+ lfree(e820buf);
-+
-+ if (memfound)
-+ return 0;
-+
-+ /* Next try INT 15h AX=E801h */
-+ ireg.eax.w[0] = 0xe801;
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ if (oreg.edx.w[0]) {
-+ rv = callback(data, (addr_t) 16 << 20,
-+ oreg.edx.w[0] << 16, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+ }
-+
-+ /* Finally try INT 15h AH=88h */
-+ ireg.eax.w[0] = 0x8800;
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+}
-+
-+static struct syslinux_memscan bios_memscan = {
-+ .func = bios_scan_memory,
-+};
-+
- void bios_init(void)
- {
- int i;
-@@ -515,6 +638,7 @@ void bios_init(void)
-
- /* Init the memory subsystem */
- bios_free_mem = (uint16_t *)0x413;
-+ syslinux_memscan_add(&bios_memscan);
- mem_init();
-
- /* CPU-dependent initialization and related checks. */
-@@ -534,7 +658,6 @@ struct mem_ops bios_mem_ops = {
- .malloc = bios_malloc,
- .realloc = bios_realloc,
- .free = bios_free,
-- .scan_memory = bios_scan_memory,
- };
-
- struct firmware bios_fw = {
-diff --git a/efi/main.c b/efi/main.c
-index 13b9403..fb8cf05 100644
---- a/efi/main.c
-+++ b/efi/main.c
-@@ -296,21 +296,21 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- for (i = 0; i < nr_entries; bufpos += desc_sz, i++) {
- EFI_MEMORY_DESCRIPTOR *m;
- UINT64 region_sz;
-- int valid;
-+ enum syslinux_memmap_types type;
-
- m = (EFI_MEMORY_DESCRIPTOR *)bufpos;
- region_sz = m->NumberOfPages * EFI_PAGE_SIZE;
-
- switch (m->Type) {
- case EfiConventionalMemory:
-- valid = 1;
-+ type = SMT_FREE;
- break;
- default:
-- valid = 0;
-+ type = SMT_RESERVED;
- break;
- }
-
-- rv = callback(data, m->PhysicalStart, region_sz, valid);
-+ rv = callback(data, m->PhysicalStart, region_sz, type);
- if (rv)
- break;
- }
-@@ -319,11 +319,16 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- return rv;
- }
-
-+static struct syslinux_memscan efi_memscan = {
-+ .func = efi_scan_memory,
-+};
-+
- extern uint16_t *bios_free_mem;
- void efi_init(void)
- {
- /* XXX timer */
- *bios_free_mem = 0;
-+ syslinux_memscan_add(&efi_memscan);
- mem_init();
- }
-
-@@ -1103,7 +1108,6 @@ struct mem_ops efi_mem_ops = {
- .malloc = efi_malloc,
- .realloc = efi_realloc,
- .free = efi_free,
-- .scan_memory = efi_scan_memory,
- };
-
- struct firmware efi_fw = {
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch b/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
deleted file mode 100644
index 70d65fd71d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-Status: Backport [d2f94e74fbd60bf491753895d2474105efb3dedf]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 5d57e8eb46f209481069d70eaa778481f6fa3edb Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 13:04:30 +0100
-Subject: [PATCH 3/4] PXELINUX: Add bios memscan function
-
-We can mark the memory region occupied by the PXE stack as SMT_TERMINAL
-provided that KeepPXE isn't set. Historically some very old
-non-relocatable kernel images (memtest86+) have a load address that
-falls within the PXE stack region, so we need to attempt to load into
-that region if at all possible.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
----
- core/fs/pxe/bios.c | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 81aa715..5f61824 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -1,4 +1,5 @@
- #include <syslinux/firmware.h>
-+#include <syslinux/memscan.h>
- #include <core.h>
- #include "pxe.h"
- #include <net.h>
-@@ -10,6 +11,9 @@ static uint16_t real_base_mem; /* Amount of DOS memory after freeing */
- static bool has_gpxe;
- static uint32_t gpxe_funcs;
-
-+static addr_t pxe_code_start, pxe_code_size;
-+static addr_t pxe_data_start, pxe_data_size;
-+
- /*
- * Validity check on possible !PXE structure in buf
- * return 1 for success, 0 for failure.
-@@ -88,6 +92,29 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
- return memory_scan(0x10000, is_pxenv);
- }
-
-+static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ int rv = 0;
-+
-+ /*
-+ * If we are planning on calling unload_pxe() and unmapping the PXE
-+ * region before we transfer control away from PXELINUX we can mark
-+ * that region as SMT_TERMINAL to indicate that the region will
-+ * become free at some point in the future.
-+ */
-+ if (!KeepPXE) {
-+ dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_code_start, pxe_code_start + pxe_code_size);
-+ rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
-+
-+ dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_data_start, pxe_data_start + pxe_data_size);
-+ rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-+ }
-+
-+ return rv;
-+}
-+
- /*
- * Find the !PXE structure; we search for the following, in order:
- *
-@@ -204,6 +231,14 @@ int pxe_init(bool quiet)
- printf("UNDI data segment at %04X len %04X\n", data_seg, data_len);
- }
-
-+ pxe_code_start = code_seg << 4;
-+ pxe_code_size = code_len;
-+
-+ pxe_data_start = data_seg << 4;
-+ pxe_data_size = data_len;
-+
-+ syslinux_memscan_new(pxelinux_scan_memory);
-+
- code_seg = code_seg + ((code_len + 15) >> 4);
- data_seg = data_seg + ((data_len + 15) >> 4);
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch b/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
deleted file mode 100644
index ee0a77237d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-Status: Backport [c0ea15936de8378d1da6843d3dbddd8dddba1011]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From f3347f9b09135d71a4effae1614b22dcdf16a7e2 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 24 Jul 2013 18:33:14 +0100
-Subject: [PATCH 4/4] pxe: use bios_fbm() and real_base_mem to calculate free
- space
-
-We don't need to individually add the PXE regions, we already have two
-symbols that denote the memory region that will be freed when calling
-unload_pxe().
-
-This essentially reverts commit 03dda0f1 ("pxe: mark all PXE regions as
-SMT_TERMINAL").
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- core/fs/pxe/bios.c
----
- core/fs/pxe/bios.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 5f61824..ffdffaf 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -94,24 +94,24 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
-
- static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-+ addr_t start, size;
- int rv = 0;
-
-+ if (KeepPXE)
-+ return 0;
-+
- /*
- * If we are planning on calling unload_pxe() and unmapping the PXE
- * region before we transfer control away from PXELINUX we can mark
- * that region as SMT_TERMINAL to indicate that the region will
- * become free at some point in the future.
- */
-- if (!KeepPXE) {
-- dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_code_start, pxe_code_start + pxe_code_size);
-- rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
--
-- dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_data_start, pxe_data_start + pxe_data_size);
-- rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-- }
-+ start = bios_fbm() << 10;
-+ size = (real_base_mem - bios_fbm()) << 10;
-+ dprintf("Marking PXE region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ start, start + size);
-
-+ callback(data, start, size, SMT_TERMINAL);
- return rv;
- }
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch b/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
deleted file mode 100644
index 09a6945ba9..0000000000
--- a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1 Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Fri, 20 Jun 2014 11:32:11 +0800
-Subject: [PATCH 1/2] isohybrid: fix overflow on 32 bit system
-
-When call isohybrid with option '-u', it overflows on a 32 bits host. It
-seeks to 512 bytes before the end of the image to install gpt header. If
-the size of image is larger than LONG_MAX, it overflows fseek() and
-cause error:
-
-isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
-
-Replace fseek with fseeko to fix this issue.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- utils/isohybrid.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/isohybrid.c b/utils/isohybrid.c
-index 410bb60..23fc6c0 100644
---- a/utils/isohybrid.c
-+++ b/utils/isohybrid.c
-@@ -1126,7 +1126,7 @@ main(int argc, char *argv[])
- * end of the image
- */
-
-- if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
-+ if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
- SEEK_SET))
- err(1, "%s: seek error - 8", argv[0]);
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
index 6b695791cd..312b1e8aed 100644
--- a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
@@ -24,15 +24,12 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
com32/Makefile | 1 +
1 file changed, 1 insertion(+)
-diff --git a/com32/Makefile b/com32/Makefile
-index 7ea1b01..9a1721b 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -20,3 +20,4 @@ modules: lib libutil gpllib
- rosh: lib libutil
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -21,3 +21,4 @@ rosh: lib libutil
samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
+gpllib: lib
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
new file mode 100644
index 0000000000..c0714b5175
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
@@ -0,0 +1,34 @@
+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/syslinux-remove-clean-script.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
new file mode 100644
index 0000000000..7c003e165b
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
@@ -0,0 +1,17 @@
+This script try to call git submodule, since we are downloading
+the tarball it seems in-correct to do this.
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: syslinux-6.03/efi/Makefile
+===================================================================
+--- syslinux-6.03.orig/efi/Makefile
++++ syslinux-6.03/efi/Makefile
+@@ -101,7 +101,6 @@ tidy dist:
+ rm -f *.so *.o wrapper
+ find . \( -name \*.o -o -name \*.a -o -name .\*.d -o -name \*.tmp \) -print0 | \
+ xargs -0r rm -f
+- $(topdir)/efi/clean-gnu-efi.sh $(EFI_SUBARCH) $(objdir)
+
+ clean: tidy
+
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.01.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index e8a1fd4ffe..7e3176e84e 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.01.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -8,17 +8,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
# ldlinux.* stuff for now, so skip mtools-native
DEPENDS = "nasm-native util-linux"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.bz2 \
- file://0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch \
- file://0002-memscan-build-a-linked-list-of-memory-scanners.patch \
- file://0003-PXELINUX-Add-bios-memscan-function.patch \
- file://0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.xz \
file://syslinux-fix-parallel-building-issue.patch \
- file://isohybrid-fix-overflow-on-32-bit-system.patch \
+ file://syslinux-libupload-depend-lib.patch \
+ file://syslinux-remove-clean-script.patch \
"
-SRC_URI[md5sum] = "6945ee89e29119d459baed4937bbc534"
-SRC_URI[sha256sum] = "83a04cf81e6a46b80ee5a321926eea095af3498b04317e3674b46c125c7a5b43"
+SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
+SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
@@ -45,6 +42,10 @@ do_configure() {
}
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}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
@@ -61,6 +62,7 @@ do_install() {
PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
RDEPENDS_${PN} += "mtools"
+RDEPENDS_${PN}-misc += "perl"
FILES_${PN} = "${bindir}/syslinux"
FILES_${PN}-extlinux = "${sbindir}/extlinux"
diff --git a/meta/recipes-devtools/tcltk/tcl/run-ptest b/meta/recipes-devtools/tcltk/tcl/run-ptest
index a5d6548d2a..dadba655f2 100644
--- a/meta/recipes-devtools/tcltk/tcl/run-ptest
+++ b/meta/recipes-devtools/tcltk/tcl/run-ptest
@@ -1,8 +1,8 @@
#!/bin/sh
for i in `ls tests/*.test |awk -F/ '{print $2}'`; \
- do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i &>$i.tmp; \
+ do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i >$i.tmp 2>&1; \
grep -q "^Files with failing tests:" $i.tmp; \
- if [ $? == 0 ]; then echo "FAIL: $i"; \
+ if [ $? -eq 0 ]; then echo "FAIL: $i"; \
else echo "PASS: $i"; rm -f $i.tmp; fi; \
done
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
index 27f73f2ce2..73c0d25567 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
@@ -24,8 +24,8 @@ SRC_URI = "${BASE_SRC_URI} \
file://alter-includedir.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "aae4b701ee527c6e4e1a6f9c7399882e"
-SRC_URI[sha256sum] = "16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514"
+SRC_URI[md5sum] = "db382feca91754b7f93da16dc4cdad1f"
+SRC_URI[sha256sum] = "6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005"
SRC_URI_class-native = "${BASE_SRC_URI}"
@@ -81,6 +81,7 @@ FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
# isn't getting picked up by shlibs code
RDEPENDS_${PN} += "tcl-lib"
RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/ubootchart/files/sysvinit.patch b/meta/recipes-devtools/ubootchart/files/sysvinit.patch
deleted file mode 100644
index fc82ed8e78..0000000000
--- a/meta/recipes-devtools/ubootchart/files/sysvinit.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [distribution]
-
-Index: ubootchart.conf
-===================================================================
---- ubootchart.conf (revision 9)
-+++ ubootchart.conf (working copy)
-@@ -1,6 +1,6 @@
-
- # If you want to chain on and run somthing other than /sbin/init...
--export init_prog=/sbin/init
-+export init_prog=/sbin/init.sysvinit
-
- # On startup ubootchart will mount a tmpfs filesystem at this
- # location and chdir here. This is only used for the logging of
diff --git a/meta/recipes-devtools/ubootchart/files/ubootchart-stop b/meta/recipes-devtools/ubootchart/files/ubootchart-stop
deleted file mode 100644
index 3444069c9a..0000000000
--- a/meta/recipes-devtools/ubootchart/files/ubootchart-stop
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-kill -USR1 $(pidof ubootchartd_bin)
diff --git a/meta/recipes-devtools/ubootchart/files/ubootchart.desktop b/meta/recipes-devtools/ubootchart/files/ubootchart.desktop
deleted file mode 100644
index 5552b3bc6f..0000000000
--- a/meta/recipes-devtools/ubootchart/files/ubootchart.desktop
+++ /dev/null
@@ -1,6 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Exec=/sbin/ubootchart-stop
-Name=Stop Bootchart
-Type=Application
-Categories=Programming;
diff --git a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb b/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
deleted file mode 100644
index b13755e855..0000000000
--- a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "A boot profiling tool"
-HOMEPAGE = "http://code.google.com/p/ubootchart/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-SRCREV = "12"
-PV = "0.0+r${SRCPV}"
-PR = "r6"
-
-#RRECOMMENDS_${PN} = "acct"
-
-SRC_URI = "svn://ubootchart.googlecode.com/svn/;protocol=http;module=trunk \
- file://sysvinit.patch;striplevel=0 \
- file://ubootchart-stop \
- file://ubootchart.desktop"
-
-S = "${WORKDIR}/trunk"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "init"
-ALTERNATIVE_TARGET[init] = "${base_sbindir}/ubootchartd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY = "70"
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${INCLUDES} ${S}/ubootchartd_bin.c -o ubootchartd_bin
-}
-
-do_install() {
- install -m 0755 -d ${D}${base_sbindir} ${D}${sysconfdir}/ubootchart ${D}${datadir}/applications
- install -m 0755 ${S}/ubootchartd_bin ${D}${base_sbindir}
- install -m 0755 ${S}/ubootchartd ${D}${base_sbindir}
- install -m 0644 ${S}/ubootchart.conf ${D}${sysconfdir}/ubootchart
- install -m 0755 ${S}/start.sh ${D}${sysconfdir}/ubootchart
- install -m 0755 ${S}/finish.sh ${D}${sysconfdir}/ubootchart
-
- install -m 0755 ${WORKDIR}/ubootchart-stop ${D}${base_sbindir}
- install -m 0644 ${WORKDIR}/ubootchart.desktop ${D}${datadir}/applications
-}
diff --git a/meta/recipes-devtools/unifdef/files/unifdef.c b/meta/recipes-devtools/unifdef/files/unifdef.c
deleted file mode 100644
index 5cbac15608..0000000000
--- a/meta/recipes-devtools/unifdef/files/unifdef.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/*
- * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by Dave Yost.
- * It was rewritten to support ANSI C by Tony Finch. The original version of
- * unifdef carried the following copyright notice. None of its code remains
- * in this version (though some of the names remain).
- *
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-#ifndef lint
-#if 0
-static const char copyright[] =
-"@(#) Copyright (c) 1985, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif
-#ifdef __IDSTRING
-__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
-__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
-#endif
-#endif /* not lint */
-#ifdef __FBSDID
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
-#endif
-
-/*
- * unifdef - remove ifdef'ed lines
- *
- * Wishlist:
- * provide an option which will append the name of the
- * appropriate symbol after #else's and #endif's
- * provide an option which will check symbols after
- * #else's and #endif's to see that they match their
- * corresponding #ifdef or #ifndef
- *
- * The first two items above require better buffer handling, which would
- * also make it possible to handle all "dodgy" directives correctly.
- */
-
-#include <ctype.h>
-#include <err.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-size_t strlcpy(char *dst, const char *src, size_t siz);
-
-/* types of input lines: */
-typedef enum {
- LT_TRUEI, /* a true #if with ignore flag */
- LT_FALSEI, /* a false #if with ignore flag */
- LT_IF, /* an unknown #if */
- LT_TRUE, /* a true #if */
- LT_FALSE, /* a false #if */
- LT_ELIF, /* an unknown #elif */
- LT_ELTRUE, /* a true #elif */
- LT_ELFALSE, /* a false #elif */
- LT_ELSE, /* #else */
- LT_ENDIF, /* #endif */
- LT_DODGY, /* flag: directive is not on one line */
- LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
- LT_PLAIN, /* ordinary line */
- LT_EOF, /* end of file */
- LT_COUNT
-} Linetype;
-
-static char const * const linetype_name[] = {
- "TRUEI", "FALSEI", "IF", "TRUE", "FALSE",
- "ELIF", "ELTRUE", "ELFALSE", "ELSE", "ENDIF",
- "DODGY TRUEI", "DODGY FALSEI",
- "DODGY IF", "DODGY TRUE", "DODGY FALSE",
- "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
- "DODGY ELSE", "DODGY ENDIF",
- "PLAIN", "EOF"
-};
-
-/* state of #if processing */
-typedef enum {
- IS_OUTSIDE,
- IS_FALSE_PREFIX, /* false #if followed by false #elifs */
- IS_TRUE_PREFIX, /* first non-false #(el)if is true */
- IS_PASS_MIDDLE, /* first non-false #(el)if is unknown */
- IS_FALSE_MIDDLE, /* a false #elif after a pass state */
- IS_TRUE_MIDDLE, /* a true #elif after a pass state */
- IS_PASS_ELSE, /* an else after a pass state */
- IS_FALSE_ELSE, /* an else after a true state */
- IS_TRUE_ELSE, /* an else after only false states */
- IS_FALSE_TRAILER, /* #elifs after a true are false */
- IS_COUNT
-} Ifstate;
-
-static char const * const ifstate_name[] = {
- "OUTSIDE", "FALSE_PREFIX", "TRUE_PREFIX",
- "PASS_MIDDLE", "FALSE_MIDDLE", "TRUE_MIDDLE",
- "PASS_ELSE", "FALSE_ELSE", "TRUE_ELSE",
- "FALSE_TRAILER"
-};
-
-/* state of comment parser */
-typedef enum {
- NO_COMMENT = false, /* outside a comment */
- C_COMMENT, /* in a comment like this one */
- CXX_COMMENT, /* between // and end of line */
- STARTING_COMMENT, /* just after slash-backslash-newline */
- FINISHING_COMMENT, /* star-backslash-newline in a C comment */
- CHAR_LITERAL, /* inside '' */
- STRING_LITERAL /* inside "" */
-} Comment_state;
-
-static char const * const comment_name[] = {
- "NO", "C", "CXX", "STARTING", "FINISHING", "CHAR", "STRING"
-};
-
-/* state of preprocessor line parser */
-typedef enum {
- LS_START, /* only space and comments on this line */
- LS_HASH, /* only space, comments, and a hash */
- LS_DIRTY /* this line can't be a preprocessor line */
-} Line_state;
-
-static char const * const linestate_name[] = {
- "START", "HASH", "DIRTY"
-};
-
-/*
- * Minimum translation limits from ISO/IEC 9899:1999 5.2.4.1
- */
-#define MAXDEPTH 64 /* maximum #if nesting */
-#define MAXLINE 4096 /* maximum length of line */
-#define MAXSYMS 4096 /* maximum number of symbols */
-
-/*
- * Sometimes when editing a keyword the replacement text is longer, so
- * we leave some space at the end of the tline buffer to accommodate this.
- */
-#define EDITSLOP 10
-
-/*
- * Globals.
- */
-
-static bool complement; /* -c: do the complement */
-static bool debugging; /* -d: debugging reports */
-static bool iocccok; /* -e: fewer IOCCC errors */
-static bool killconsts; /* -k: eval constant #ifs */
-static bool lnblank; /* -l: blank deleted lines */
-static bool lnnum; /* -n: add #line directives */
-static bool symlist; /* -s: output symbol list */
-static bool text; /* -t: this is a text file */
-
-static const char *symname[MAXSYMS]; /* symbol name */
-static const char *value[MAXSYMS]; /* -Dsym=value */
-static bool ignore[MAXSYMS]; /* -iDsym or -iUsym */
-static int nsyms; /* number of symbols */
-
-static FILE *input; /* input file pointer */
-static const char *filename; /* input file name */
-static int linenum; /* current line number */
-
-static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
-static char *keyword; /* used for editing #elif's */
-
-static Comment_state incomment; /* comment parser state */
-static Line_state linestate; /* #if line parser state */
-static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
-static bool ignoring[MAXDEPTH]; /* ignore comments state */
-static int stifline[MAXDEPTH]; /* start of current #if */
-static int depth; /* current #if nesting */
-static int delcount; /* count of deleted lines */
-static bool keepthis; /* don't delete constant #if */
-
-static int exitstat; /* program exit status */
-
-static void addsym(bool, bool, char *);
-static void debug(const char *, ...);
-static void done(void);
-static void error(const char *);
-static int findsym(const char *);
-static void flushline(bool);
-static Linetype getline34(void);
-static Linetype ifeval(const char **);
-static void ignoreoff(void);
-static void ignoreon(void);
-static void keywordedit(const char *);
-static void nest(void);
-static void process(void);
-static const char *skipcomment(const char *);
-static const char *skipsym(const char *);
-static void state(Ifstate);
-static int strlcmp(const char *, const char *, size_t);
-static void unnest(void);
-static void usage(void);
-
-#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
-
-/*
- * The main program.
- */
-int
-main(int argc, char *argv[])
-{
- int opt;
-
- while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
- switch (opt) {
- case 'i': /* treat stuff controlled by these symbols as text */
- /*
- * For strict backwards-compatibility the U or D
- * should be immediately after the -i but it doesn't
- * matter much if we relax that requirement.
- */
- opt = *optarg++;
- if (opt == 'D')
- addsym(true, true, optarg);
- else if (opt == 'U')
- addsym(true, false, optarg);
- else
- usage();
- break;
- case 'D': /* define a symbol */
- addsym(false, true, optarg);
- break;
- case 'U': /* undef a symbol */
- addsym(false, false, optarg);
- break;
- case 'I':
- /* no-op for compatibility with cpp */
- break;
- case 'c': /* treat -D as -U and vice versa */
- complement = true;
- break;
- case 'd':
- debugging = true;
- break;
- case 'e': /* fewer errors from dodgy lines */
- iocccok = true;
- break;
- case 'k': /* process constant #ifs */
- killconsts = true;
- break;
- case 'l': /* blank deleted lines instead of omitting them */
- lnblank = true;
- break;
- case 'n': /* add #line directive after deleted lines */
- lnnum = true;
- break;
- case 's': /* only output list of symbols that control #ifs */
- symlist = true;
- break;
- case 't': /* don't parse C comments */
- text = true;
- break;
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
- if (argc > 1) {
- errx(2, "can only do one file");
- } else if (argc == 1 && strcmp(*argv, "-") != 0) {
- filename = *argv;
- input = fopen(filename, "r");
- if (input == NULL)
- err(2, "can't open %s", filename);
- } else {
- filename = "[stdin]";
- input = stdin;
- }
- process();
- abort(); /* bug */
-}
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
- " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
- exit(2);
-}
-
-/*
- * A state transition function alters the global #if processing state
- * in a particular way. The table below is indexed by the current
- * processing state and the type of the current line.
- *
- * Nesting is handled by keeping a stack of states; some transition
- * functions increase or decrease the depth. They also maintain the
- * ignore state on a stack. In some complicated cases they have to
- * alter the preprocessor directive, as follows.
- *
- * When we have processed a group that starts off with a known-false
- * #if/#elif sequence (which has therefore been deleted) followed by a
- * #elif that we don't understand and therefore must keep, we edit the
- * latter into a #if to keep the nesting correct.
- *
- * When we find a true #elif in a group, the following block will
- * always be kept and the rest of the sequence after the next #elif or
- * #else will be discarded. We edit the #elif into a #else and the
- * following directive to #endif since this has the desired behaviour.
- *
- * "Dodgy" directives are split across multiple lines, the most common
- * example being a multi-line comment hanging off the right of the
- * directive. We can handle them correctly only if there is no change
- * from printing to dropping (or vice versa) caused by that directive.
- * If the directive is the first of a group we have a choice between
- * failing with an error, or passing it through unchanged instead of
- * evaluating it. The latter is not the default to avoid questions from
- * users about unifdef unexpectedly leaving behind preprocessor directives.
- */
-typedef void state_fn(void);
-
-/* report an error */
-static void Eelif (void) { error("Inappropriate #elif"); }
-static void Eelse (void) { error("Inappropriate #else"); }
-static void Eendif(void) { error("Inappropriate #endif"); }
-static void Eeof (void) { error("Premature EOF"); }
-static void Eioccc(void) { error("Obfuscated preprocessor control line"); }
-/* plain line handling */
-static void print (void) { flushline(true); }
-static void drop (void) { flushline(false); }
-/* output lacks group's start line */
-static void Strue (void) { drop(); ignoreoff(); state(IS_TRUE_PREFIX); }
-static void Sfalse(void) { drop(); ignoreoff(); state(IS_FALSE_PREFIX); }
-static void Selse (void) { drop(); state(IS_TRUE_ELSE); }
-/* print/pass this block */
-static void Pelif (void) { print(); ignoreoff(); state(IS_PASS_MIDDLE); }
-static void Pelse (void) { print(); state(IS_PASS_ELSE); }
-static void Pendif(void) { print(); unnest(); }
-/* discard this block */
-static void Dfalse(void) { drop(); ignoreoff(); state(IS_FALSE_TRAILER); }
-static void Delif (void) { drop(); ignoreoff(); state(IS_FALSE_MIDDLE); }
-static void Delse (void) { drop(); state(IS_FALSE_ELSE); }
-static void Dendif(void) { drop(); unnest(); }
-/* first line of group */
-static void Fdrop (void) { nest(); Dfalse(); }
-static void Fpass (void) { nest(); Pelif(); }
-static void Ftrue (void) { nest(); Strue(); }
-static void Ffalse(void) { nest(); Sfalse(); }
-/* variable pedantry for obfuscated lines */
-static void Oiffy (void) { if (!iocccok) Eioccc(); Fpass(); ignoreon(); }
-static void Oif (void) { if (!iocccok) Eioccc(); Fpass(); }
-static void Oelif (void) { if (!iocccok) Eioccc(); Pelif(); }
-/* ignore comments in this block */
-static void Idrop (void) { Fdrop(); ignoreon(); }
-static void Itrue (void) { Ftrue(); ignoreon(); }
-static void Ifalse(void) { Ffalse(); ignoreon(); }
-/* edit this line */
-static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
-static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
-static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
-static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
-
-static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
-/* IS_OUTSIDE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
- print, done },
-/* IS_FALSE_PREFIX */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_PREFIX */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- print, Eeof },
-/* IS_PASS_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
- print, Eeof },
-/* IS_FALSE_MIDDLE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
- print, Eeof },
-/* IS_PASS_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
- print, Eeof },
-/* IS_FALSE_ELSE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
- drop, Eeof },
-/* IS_TRUE_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
- print, Eeof },
-/* IS_FALSE_TRAILER */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
- drop, Eeof }
-/*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
- TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
- PLAIN EOF */
-};
-
-/*
- * State machine utility functions
- */
-static void
-done(void)
-{
- if (incomment)
- error("EOF in comment");
- exit(exitstat);
-}
-static void
-ignoreoff(void)
-{
- if (depth == 0)
- abort(); /* bug */
- ignoring[depth] = ignoring[depth-1];
-}
-static void
-ignoreon(void)
-{
- ignoring[depth] = true;
-}
-static void
-keywordedit(const char *replacement)
-{
- size_t size = tline + sizeof(tline) - keyword;
- char *dst = keyword;
- const char *src = replacement;
- if (size != 0) {
- while ((--size != 0) && (*src != '\0'))
- *dst++ = *src++;
- *dst = '\0';
- }
- print();
-}
-static void
-nest(void)
-{
- depth += 1;
- if (depth >= MAXDEPTH)
- error("Too many levels of nesting");
- stifline[depth] = linenum;
-}
-static void
-unnest(void)
-{
- if (depth == 0)
- abort(); /* bug */
- depth -= 1;
-}
-static void
-state(Ifstate is)
-{
- ifstate[depth] = is;
-}
-
-/*
- * Write a line to the output or not, according to command line options.
- */
-static void
-flushline(bool keep)
-{
- if (symlist)
- return;
- if (keep ^ complement) {
- if (lnnum && delcount > 0)
- printf("#line %d\n", linenum);
- fputs(tline, stdout);
- delcount = 0;
- } else {
- if (lnblank)
- putc('\n', stdout);
- exitstat = 1;
- delcount += 1;
- }
-}
-
-/*
- * The driver for the state machine.
- */
-static void
-process(void)
-{
- Linetype lineval;
-
- for (;;) {
- linenum++;
- lineval = getline34();
- trans_table[ifstate[depth]][lineval]();
- debug("process %s -> %s depth %d",
- linetype_name[lineval],
- ifstate_name[ifstate[depth]], depth);
- }
-}
-
-/*
- * Parse a line and determine its type. We keep the preprocessor line
- * parser state between calls in the global variable linestate, with
- * help from skipcomment().
- */
-static Linetype
-getline34(void)
-{
- const char *cp;
- int cursym;
- int kwlen;
- Linetype retval;
- Comment_state wascomment;
-
- if (fgets(tline, MAXLINE, input) == NULL)
- return (LT_EOF);
- retval = LT_PLAIN;
- wascomment = incomment;
- cp = skipcomment(tline);
- if (linestate == LS_START) {
- if (*cp == '#') {
- linestate = LS_HASH;
- cp = skipcomment(cp + 1);
- } else if (*cp != '\0')
- linestate = LS_DIRTY;
- }
- if (!incomment && linestate == LS_HASH) {
- keyword = tline + (cp - tline);
- cp = skipsym(cp);
- kwlen = cp - keyword;
- /* no way can we deal with a continuation inside a keyword */
- if (strncmp(cp, "\\\n", 2) == 0)
- Eioccc();
- if (strlcmp("ifdef", keyword, kwlen) == 0 ||
- strlcmp("ifndef", keyword, kwlen) == 0) {
- cp = skipcomment(cp);
- if ((cursym = findsym(cp)) < 0)
- retval = LT_IF;
- else {
- retval = (keyword[2] == 'n')
- ? LT_FALSE : LT_TRUE;
- if (value[cursym] == NULL)
- retval = (retval == LT_TRUE)
- ? LT_FALSE : LT_TRUE;
- if (ignore[cursym])
- retval = (retval == LT_TRUE)
- ? LT_TRUEI : LT_FALSEI;
- }
- cp = skipsym(cp);
- } else if (strlcmp("if", keyword, kwlen) == 0)
- retval = ifeval(&cp);
- else if (strlcmp("elif", keyword, kwlen) == 0)
- retval = ifeval(&cp) - LT_IF + LT_ELIF;
- else if (strlcmp("else", keyword, kwlen) == 0)
- retval = LT_ELSE;
- else if (strlcmp("endif", keyword, kwlen) == 0)
- retval = LT_ENDIF;
- else {
- linestate = LS_DIRTY;
- retval = LT_PLAIN;
- }
- cp = skipcomment(cp);
- if (*cp != '\0') {
- linestate = LS_DIRTY;
- if (retval == LT_TRUE || retval == LT_FALSE ||
- retval == LT_TRUEI || retval == LT_FALSEI)
- retval = LT_IF;
- if (retval == LT_ELTRUE || retval == LT_ELFALSE)
- retval = LT_ELIF;
- }
- if (retval != LT_PLAIN && (wascomment || incomment)) {
- retval += LT_DODGY;
- if (incomment)
- linestate = LS_DIRTY;
- }
- /* skipcomment should have changed the state */
- if (linestate == LS_HASH)
- abort(); /* bug */
- }
- if (linestate == LS_DIRTY) {
- while (*cp != '\0')
- cp = skipcomment(cp + 1);
- }
- debug("parser %s comment %s line",
- comment_name[incomment], linestate_name[linestate]);
- return (retval);
-}
-
-/*
- * These are the binary operators that are supported by the expression
- * evaluator. Note that if support for division is added then we also
- * need short-circuiting booleans because of divide-by-zero.
- */
-static int op_lt(int a, int b) { return (a < b); }
-static int op_gt(int a, int b) { return (a > b); }
-static int op_le(int a, int b) { return (a <= b); }
-static int op_ge(int a, int b) { return (a >= b); }
-static int op_eq(int a, int b) { return (a == b); }
-static int op_ne(int a, int b) { return (a != b); }
-static int op_or(int a, int b) { return (a || b); }
-static int op_and(int a, int b) { return (a && b); }
-
-/*
- * An evaluation function takes three arguments, as follows: (1) a pointer to
- * an element of the precedence table which lists the operators at the current
- * level of precedence; (2) a pointer to an integer which will receive the
- * value of the expression; and (3) a pointer to a char* that points to the
- * expression to be evaluated and that is updated to the end of the expression
- * when evaluation is complete. The function returns LT_FALSE if the value of
- * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
- * expression could not be evaluated.
- */
-struct ops;
-
-typedef Linetype eval_fn(const struct ops *, int *, const char **);
-
-static eval_fn eval_table, eval_unary;
-
-/*
- * The precedence table. Expressions involving binary operators are evaluated
- * in a table-driven way by eval_table. When it evaluates a subexpression it
- * calls the inner function with its first argument pointing to the next
- * element of the table. Innermost expressions have special non-table-driven
- * handling.
- */
-static const struct ops {
- eval_fn *inner;
- struct op {
- const char *str;
- int (*fn)(int, int);
- } op[5];
-} eval_ops[] = {
- { eval_table, { { "||", op_or } } },
- { eval_table, { { "&&", op_and } } },
- { eval_table, { { "==", op_eq },
- { "!=", op_ne } } },
- { eval_unary, { { "<=", op_le },
- { ">=", op_ge },
- { "<", op_lt },
- { ">", op_gt } } }
-};
-
-/*
- * Function for evaluating the innermost parts of expressions,
- * viz. !expr (expr) defined(symbol) symbol number
- * We reset the keepthis flag when we find a non-constant subexpression.
- */
-static Linetype
-eval_unary(const struct ops *ops, int *valp, const char **cpp)
-{
- const char *cp;
- char *ep;
- int sym;
-
- cp = skipcomment(*cpp);
- if (*cp == '!') {
- debug("eval%d !", ops - eval_ops);
- cp++;
- if (eval_unary(ops, valp, &cp) == LT_IF)
- return (LT_IF);
- *valp = !*valp;
- } else if (*cp == '(') {
- cp++;
- debug("eval%d (", ops - eval_ops);
- if (eval_table(eval_ops, valp, &cp) == LT_IF)
- return (LT_IF);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- } else if (isdigit((unsigned char)*cp)) {
- debug("eval%d number", ops - eval_ops);
- *valp = strtol(cp, &ep, 0);
- cp = skipsym(cp);
- } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
- cp = skipcomment(cp+7);
- debug("eval%d defined", ops - eval_ops);
- if (*cp++ != '(')
- return (LT_IF);
- cp = skipcomment(cp);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- *valp = (value[sym] != NULL);
- cp = skipsym(cp);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- keepthis = false;
- } else if (!endsym(*cp)) {
- debug("eval%d symbol", ops - eval_ops);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- if (value[sym] == NULL)
- *valp = 0;
- else {
- *valp = strtol(value[sym], &ep, 0);
- if (*ep != '\0' || ep == value[sym])
- return (LT_IF);
- }
- cp = skipsym(cp);
- keepthis = false;
- } else {
- debug("eval%d bad expr", ops - eval_ops);
- return (LT_IF);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Table-driven evaluation of binary operators.
- */
-static Linetype
-eval_table(const struct ops *ops, int *valp, const char **cpp)
-{
- const struct op *op;
- const char *cp;
- int val;
-
- debug("eval%d", ops - eval_ops);
- cp = *cpp;
- if (ops->inner(ops+1, valp, &cp) == LT_IF)
- return (LT_IF);
- for (;;) {
- cp = skipcomment(cp);
- for (op = ops->op; op->str != NULL; op++)
- if (strncmp(cp, op->str, strlen(op->str)) == 0)
- break;
- if (op->str == NULL)
- break;
- cp += strlen(op->str);
- debug("eval%d %s", ops - eval_ops, op->str);
- if (ops->inner(ops+1, &val, &cp) == LT_IF)
- return (LT_IF);
- *valp = op->fn(*valp, val);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Evaluate the expression on a #if or #elif line. If we can work out
- * the result we return LT_TRUE or LT_FALSE accordingly, otherwise we
- * return just a generic LT_IF.
- */
-static Linetype
-ifeval(const char **cpp)
-{
- int ret;
- int val;
-
- debug("eval %s", *cpp);
- keepthis = killconsts ? false : true;
- ret = eval_table(eval_ops, &val, cpp);
- debug("eval = %d", val);
- return (keepthis ? LT_IF : ret);
-}
-
-/*
- * Skip over comments, strings, and character literals and stop at the
- * next character position that is not whitespace. Between calls we keep
- * the comment state in the global variable incomment, and we also adjust
- * the global variable linestate when we see a newline.
- * XXX: doesn't cope with the buffer splitting inside a state transition.
- */
-static const char *
-skipcomment(const char *cp)
-{
- if (text || ignoring[depth]) {
- for (; isspace((unsigned char)*cp); cp++)
- if (*cp == '\n')
- linestate = LS_START;
- return (cp);
- }
- while (*cp != '\0')
- /* don't reset to LS_START after a line continuation */
- if (strncmp(cp, "\\\n", 2) == 0)
- cp += 2;
- else switch (incomment) {
- case NO_COMMENT:
- if (strncmp(cp, "/\\\n", 3) == 0) {
- incomment = STARTING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "/*", 2) == 0) {
- incomment = C_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "//", 2) == 0) {
- incomment = CXX_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "\'", 1) == 0) {
- incomment = CHAR_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\"", 1) == 0) {
- incomment = STRING_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\n", 1) == 0) {
- linestate = LS_START;
- cp += 1;
- } else if (strchr(" \t", *cp) != NULL) {
- cp += 1;
- } else
- return (cp);
- continue;
- case CXX_COMMENT:
- if (strncmp(cp, "\n", 1) == 0) {
- incomment = NO_COMMENT;
- linestate = LS_START;
- }
- cp += 1;
- continue;
- case CHAR_LITERAL:
- case STRING_LITERAL:
- if ((incomment == CHAR_LITERAL && cp[0] == '\'') ||
- (incomment == STRING_LITERAL && cp[0] == '\"')) {
- incomment = NO_COMMENT;
- cp += 1;
- } else if (cp[0] == '\\') {
- if (cp[1] == '\0')
- cp += 1;
- else
- cp += 2;
- } else if (strncmp(cp, "\n", 1) == 0) {
- if (incomment == CHAR_LITERAL)
- error("unterminated char literal");
- else
- error("unterminated string literal");
- } else
- cp += 1;
- continue;
- case C_COMMENT:
- if (strncmp(cp, "*\\\n", 3) == 0) {
- incomment = FINISHING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "*/", 2) == 0) {
- incomment = NO_COMMENT;
- cp += 2;
- } else
- cp += 1;
- continue;
- case STARTING_COMMENT:
- if (*cp == '*') {
- incomment = C_COMMENT;
- cp += 1;
- } else if (*cp == '/') {
- incomment = CXX_COMMENT;
- cp += 1;
- } else {
- incomment = NO_COMMENT;
- linestate = LS_DIRTY;
- }
- continue;
- case FINISHING_COMMENT:
- if (*cp == '/') {
- incomment = NO_COMMENT;
- cp += 1;
- } else
- incomment = C_COMMENT;
- continue;
- default:
- abort(); /* bug */
- }
- return (cp);
-}
-
-/*
- * Skip over an identifier.
- */
-static const char *
-skipsym(const char *cp)
-{
- while (!endsym(*cp))
- ++cp;
- return (cp);
-}
-
-/*
- * Look for the symbol in the symbol table. If is is found, we return
- * the symbol table index, else we return -1.
- */
-static int
-findsym(const char *str)
-{
- const char *cp;
- int symind;
-
- cp = skipsym(str);
- if (cp == str)
- return (-1);
- if (symlist) {
- printf("%.*s\n", (int)(cp-str), str);
- /* we don't care about the value of the symbol */
- return (0);
- }
- for (symind = 0; symind < nsyms; ++symind) {
- if (strlcmp(symname[symind], str, cp-str) == 0) {
- debug("findsym %s %s", symname[symind],
- value[symind] ? value[symind] : "");
- return (symind);
- }
- }
- return (-1);
-}
-
-/*
- * Add a symbol to the symbol table.
- */
-static void
-addsym(bool ignorethis, bool definethis, char *sym)
-{
- int symind;
- char *val;
-
- symind = findsym(sym);
- if (symind < 0) {
- if (nsyms >= MAXSYMS)
- errx(2, "too many symbols");
- symind = nsyms++;
- }
- symname[symind] = sym;
- ignore[symind] = ignorethis;
- val = sym + (skipsym(sym) - sym);
- if (definethis) {
- if (*val == '=') {
- value[symind] = val+1;
- *val = '\0';
- } else if (*val == '\0')
- value[symind] = "";
- else
- usage();
- } else {
- if (*val != '\0')
- usage();
- value[symind] = NULL;
- }
-}
-
-/*
- * Compare s with n characters of t.
- * The same as strncmp() except that it checks that s[n] == '\0'.
- */
-static int
-strlcmp(const char *s, const char *t, size_t n)
-{
- while (n-- && *t != '\0')
- if (*s != *t)
- return ((unsigned char)*s - (unsigned char)*t);
- else
- ++s, ++t;
- return ((unsigned char)*s);
-}
-
-/*
- * Diagnostics.
- */
-static void
-debug(const char *msg, ...)
-{
- va_list ap;
-
- if (debugging) {
- va_start(ap, msg);
- vwarnx(msg, ap);
- va_end(ap);
- }
-}
-
-static void
-error(const char *msg)
-{
- if (depth == 0)
- warnx("%s: %d: %s", filename, linenum, msg);
- else
- warnx("%s: %d: %s (#if line %d depth %d)",
- filename, linenum, msg, stifline[depth], depth);
- errx(2, "output may be truncated");
-}
diff --git a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
deleted file mode 100644
index 9a28684236..0000000000
--- a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Kernel header preprocessor"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-
-PR = "r1"
-
-LIC_FILES_CHKSUM = "file://${WORKDIR}/unifdef.c;endline=32;md5=1a33f5c39aa718a89058721df61979bd"
-
-SRC_URI = "file://unifdef.c"
-
-inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef ${WORKDIR}/unifdef.c
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 unifdef ${D}${bindir}
-}
-
diff --git a/meta/recipes-devtools/unifdef/unifdef_2.10.bb b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
new file mode 100644
index 0000000000..b8a0079840
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Selectively remove #ifdef statements from sources"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+
+LIC_FILES_CHKSUM = "file://unifdef.c;endline=32;md5=2cc23f0382a6f560f6a9ecf4e040c0da"
+
+SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "bb5d895e5ebbba5c5cc0c2771cf97ebe"
+SRC_URI[sha256sum] = "3b9b2b6b1952e9b9c1b9f734edec270689a35bdbf33ae66b50e19b2ed0d2df06"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} prefix=${prefix}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 64e7daffe1..63056fde4c 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -7,14 +7,12 @@ BBCLASSEXTEND = "native"
HOMEPAGE = "http://vala-project.org"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-INC_PR = "r1"
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF = "--disable-vapigen"
+inherit autotools pkgconfig
+FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
FILES_${PN}-doc += "${datadir}/devhelp"
-FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi"
+FILES_${PN}-dbg += "${libdir}/${BPN}-${SHRT_VER}/.debug"
diff --git a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
index e6c7941a77..ac9dc8c83a 100644
--- a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
+++ b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
@@ -7,6 +7,8 @@ Subject: [PATCH] git-version-gen: don't append -dirty if we're not in git
* for example if we have some dirty directory and we unpack clean vala tarball in it, then it will append -dirty
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Inappropriate [OE-Specific]
---
build-aux/git-version-gen | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/meta/recipes-devtools/vala/vala_0.16.0.bb b/meta/recipes-devtools/vala/vala_0.16.0.bb
deleted file mode 100644
index 92120b4a36..0000000000
--- a/meta/recipes-devtools/vala/vala_0.16.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-PR = "${INC_PR}.1"
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
-
-SRC_URI[md5sum] = "84b742e9cca4c90fde3026c3793c03c1"
-SRC_URI[sha256sum] = "3adb37aa2b35e2e2daed47552e85dbcbf752c0f7768b269d856993620073a657"
diff --git a/meta/recipes-devtools/vala/vala_0.26.1.bb b/meta/recipes-devtools/vala/vala_0.26.1.bb
new file mode 100644
index 0000000000..3df9cd4bae
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.26.1.bb
@@ -0,0 +1,6 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
+
+SRC_URI[md5sum] = "723a03b822d4cc47abc4019685970a3e"
+SRC_URI[sha256sum] = "8407abb19ab3a58bbfc0d288abb47666ef81f76d0540258c03965e7545f59e6b"
diff --git a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch b/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
index fdc9cc0e83..225f84305f 100644
--- a/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
@@ -1,6 +1,6 @@
Modify vg_test wrapper to support PTEST formats
-This commit changes the valgrind regression test script vg_regtest to
+Change the valgrind regression test script vg_regtest to
support the yocto ptest stdout reporting format. The commit adds
'--yocto-ptest' as an optional argument to vg_regtest, which alters
the output to use the ptest infrastructure reporting format:
@@ -8,12 +8,16 @@ the output to use the ptest infrastructure reporting format:
instead of valgrind's internal test reporting format. Without the added
option, --yocto-ptest, the valgrind regression test output is unchanged.
+Enforce 30 seconds limit for the test.
+This resume execution of the remaining tests when valgrind hangs.
+
Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index 224385f..dbbd23d 100755
+index 224385f..3e0383b 100755
--- a/tests/vg_regtest.in
+++ b/tests/vg_regtest.in
@@ -39,11 +39,11 @@
@@ -55,7 +59,41 @@ index 224385f..dbbd23d 100755
} else {
die $usage;
}
-@@ -394,19 +397,21 @@ sub do_diffs($$$$)
+@@ -340,13 +343,28 @@ sub read_vgtest_file($)
+ #----------------------------------------------------------------------------
+ # Since most of the program time is spent in system() calls, need this to
+ # propagate a Ctrl-C enabling us to quit.
+-sub mysystem($)
++# Enforce 30 seconds limit for the test.
++# This resume execution of the remaining tests if valgrind hangs.
++sub mysystem($)
+ {
+- my $exit_code = system($_[0]);
+- ($exit_code == 2) and exit 1; # 2 is SIGINT
+- return $exit_code;
++ my $exit_code=0;
++ eval {
++ local $SIG{'ALRM'} = sub { die "timed out\n" };
++ alarm(30);
++ $exit_code = system($_[0]);
++ alarm (0);
++ ($exit_code == 2) and die "SIGINT\n"; # 2 is SIGINT
++ };
++ if ($@) {
++ if ($@ eq "timed out\n") {
++ print "timed out\n";
++ return 1;
++ }
++ if ($@ eq "SIGINT\n") {
++ exit 1;
++ }
++ }
+ }
+-
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+ sub filtered_rename($$)
+@@ -394,19 +412,21 @@ sub do_diffs($$$$)
# A match; remove .out and any previously created .diff files.
unlink("$name.$mid.out");
unlink(<$name.$mid.diff*>);
@@ -79,7 +117,7 @@ index 224385f..dbbd23d 100755
$vgtest =~ /^(.*)\.vgtest/;
my $name = $1;
my $fullname = "$dir/$name";
-@@ -425,7 +430,11 @@ sub do_one_test($$)
+@@ -425,7 +445,11 @@ sub do_one_test($$)
} elsif (256 == $prereq_res) {
# Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
# Prereq failed, skip.
@@ -92,7 +130,7 @@ index 224385f..dbbd23d 100755
return;
} else {
# Bad prereq; abort.
-@@ -438,7 +447,7 @@ sub do_one_test($$)
+@@ -438,7 +462,7 @@ sub do_one_test($$)
if (defined $progB) {
# If there is a progB, let's start it in background:
printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
@@ -101,7 +139,7 @@ index 224385f..dbbd23d 100755
# progB.done used to detect child has finished. See below.
# Note: redirection of stdout and stderr is before $progB to allow argsB
# to e.g. redirect stdoutB to stderrB
-@@ -452,7 +461,8 @@ sub do_one_test($$)
+@@ -452,7 +476,8 @@ sub do_one_test($$)
. "touch progB.done) &");
}
} else {
@@ -111,7 +149,7 @@ index 224385f..dbbd23d 100755
}
# Pass the appropriate --tool option for the directory (can be overridden
-@@ -487,7 +497,7 @@ sub do_one_test($$)
+@@ -487,7 +512,7 @@ sub do_one_test($$)
# Find all the .stdout.exp files. If none, use /dev/null.
my @stdout_exps = <$name.stdout.exp*>;
@stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
@@ -120,7 +158,7 @@ index 224385f..dbbd23d 100755
# Filter stderr
$stderr_filter_args = $name if (! defined $stderr_filter_args);
-@@ -496,7 +506,7 @@ sub do_one_test($$)
+@@ -496,7 +521,7 @@ sub do_one_test($$)
# Find all the .stderr.exp files. At least one must exist.
my @stderr_exps = <$name.stderr.exp*>;
(0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
@@ -129,7 +167,7 @@ index 224385f..dbbd23d 100755
if (defined $progB) {
# wait for the child to be finished
-@@ -520,7 +530,7 @@ sub do_one_test($$)
+@@ -520,7 +545,7 @@ sub do_one_test($$)
# Find all the .stdoutB.exp files. If none, use /dev/null.
my @stdoutB_exps = <$name.stdoutB.exp*>;
@stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
@@ -138,7 +176,7 @@ index 224385f..dbbd23d 100755
# Filter stderr
$stderrB_filter_args = $name if (! defined $stderrB_filter_args);
-@@ -529,7 +539,7 @@ sub do_one_test($$)
+@@ -529,7 +554,7 @@ sub do_one_test($$)
# Find all the .stderrB.exp files. At least one must exist.
my @stderrB_exps = <$name.stderrB.exp*>;
(0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
@@ -147,7 +185,7 @@ index 224385f..dbbd23d 100755
}
# Maybe do post-test check
-@@ -541,7 +551,7 @@ sub do_one_test($$)
+@@ -541,7 +566,7 @@ sub do_one_test($$)
# Find all the .post.exp files. If none, use /dev/null.
my @post_exps = <$name.post.exp*>;
@post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
@@ -156,7 +194,7 @@ index 224385f..dbbd23d 100755
}
}
-@@ -550,6 +560,13 @@ sub do_one_test($$)
+@@ -550,6 +575,13 @@ sub do_one_test($$)
print("(cleanup operation failed: $cleanup)\n");
}
@@ -170,7 +208,7 @@ index 224385f..dbbd23d 100755
$num_tests_done++;
}
-@@ -589,7 +606,7 @@ sub test_one_dir($$)
+@@ -589,7 +621,7 @@ sub test_one_dir($$)
my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
if ($found_tests) {
@@ -179,7 +217,7 @@ index 224385f..dbbd23d 100755
}
foreach my $f (@fs) {
if (-d $f) {
-@@ -599,7 +616,7 @@ sub test_one_dir($$)
+@@ -599,7 +631,7 @@ sub test_one_dir($$)
}
}
if ($found_tests) {
@@ -188,7 +226,7 @@ index 224385f..dbbd23d 100755
}
chdir("..");
-@@ -625,10 +642,12 @@ sub summarise_results
+@@ -625,10 +657,12 @@ sub summarise_results
$num_failures{"stdout"}, plural($num_failures{"stdout"}),
$num_failures{"stderrB"}, plural($num_failures{"stderrB"}),
$num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}),
diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch b/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch
deleted file mode 100644
index 7714b997fe..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/glibc-2.19.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Add support for compiling with glibc 2.19
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: valgrind-3.9.0/configure.ac
-===================================================================
---- valgrind-3.9.0.orig/configure.ac 2014-02-12 09:03:07.879873700 -0800
-+++ valgrind-3.9.0/configure.ac 2014-02-12 09:07:35.099871774 -0800
-@@ -918,6 +918,13 @@
- DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- ;;
-+ 2.19)
-+ AC_MSG_RESULT(2.19 family)
-+ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
-+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ ;;
- darwin)
- AC_MSG_RESULT(Darwin)
- AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch b/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch
new file mode 100644
index 0000000000..fab4044d17
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch
@@ -0,0 +1,30 @@
+Backport of glibc 2.19 and 2.20 support.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index 229ab98..1c18108 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -918,6 +918,20 @@ case "${GLIBC_VERSION}" in
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ AC_MSG_RESULT(2.19 family)
++ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
++ 2.20)
++ AC_MSG_RESULT(2.20 family)
++ AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
index 46dea60eb3..f84bf9ae9a 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
@@ -8,13 +8,13 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
-index 2a19f5b..ccdeb77 100644
---- a/none/tests/arm/Makefile.am
-+++ b/none/tests/arm/Makefile.am
-@@ -16,15 +16,16 @@ EXTRA_DIST = \
- vcvt_fixed_float_VFP.vgtest \
- vfp.stdout.exp vfp.stderr.exp vfp.vgtest
+Index: valgrind-3.10.0/none/tests/arm/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/arm/Makefile.am
++++ valgrind-3.10.0/none/tests/arm/Makefile.am
+@@ -17,15 +17,16 @@ EXTRA_DIST = \
+ vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
+ vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
+# For yocto:
+# Only include tests that don't require Thumb.
@@ -31,8 +31,8 @@ index 2a19f5b..ccdeb77 100644
- v6intThumb \
v6media \
vcvt_fixed_float_VFP \
- vfp
-@@ -34,32 +35,3 @@ AM_CXXFLAGS += @FLAG_M32@
+ vfp \
+@@ -36,34 +37,3 @@ AM_CXXFLAGS += @FLAG_M32@
AM_CCASFLAGS += @FLAG_M32@
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
@@ -65,3 +65,5 @@ index 2a19f5b..ccdeb77 100644
-intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+-
+-vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
index 2a14e1852c..1c640ffb71 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
@@ -36,10 +36,10 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
-index bd70eea..1436e8e 100644
---- a/memcheck/tests/ppc32/Makefile.am
-+++ b/memcheck/tests/ppc32/Makefile.am
+Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
@@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \
power_ISA2_05.stdout.exp_Without_FPPO
@@ -50,11 +50,11 @@ index bd70eea..1436e8e 100644
power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
-I$(top_srcdir)/include @FLAG_M32@
-diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am
-index 4f581b6..91ce7e7 100644
---- a/none/tests/ppc32/Makefile.am
-+++ b/none/tests/ppc32/Makefile.am
-@@ -50,16 +50,8 @@ check_PROGRAMS = \
+Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/none/tests/ppc32/Makefile.am
+@@ -52,16 +52,8 @@ check_PROGRAMS = \
allexec \
bug129390-ppc32 \
bug139050-ppc32 \
@@ -67,9 +67,9 @@ index 4f581b6..91ce7e7 100644
- test_isa_2_07_part1 \
- test_isa_2_07_part2 \
- test_tm \
-- test_touch_tm
+- test_touch_tm \
+ ldstrev lsw mftocrf mcrfs test_fx test_gx \
-+ twi tw xlc_dbl_u32 power6_bcmp
++ twi tw xlc_dbl_u32 power6_bcmp \
+ ldst_multiple \
+ data-cache-instructions
- AM_CFLAGS += @FLAG_M32@
- AM_CXXFLAGS += @FLAG_M32@
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest
index 7d0584ada9..f9a72ec4a9 100755
--- a/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
# 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.
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
new file mode 100644
index 0000000000..07a272633e
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
@@ -0,0 +1,25 @@
+
+Upstream-Status: Inapporpiate [embedded config]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: valgrind-3.10.0/none/tests/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/Makefile.am
++++ valgrind-3.10.0/none/tests/Makefile.am
+@@ -280,7 +280,6 @@ threaded_fork_LDADD = -lpthread
+ threadederrno_LDADD = -lpthread
+ tls_SOURCES = tls.c tls2.c
+ tls_DEPENDENCIES = tls.so tls2.so
+-tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
+ tls_LDADD = tls.so tls2.so -lpthread
+ tls_so_SOURCES = tls_so.c
+ tls_so_DEPENDENCIES = tls2.so
+@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN
+ tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
+ tls_so_LDADD = `pwd`/tls2.so
+ else
+- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
++ tls_so_LDFLAGS = -shared -fPIC
+ tls_so_LDADD = tls2.so
+ endif
+ tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
index 3c6aa13364..a25922ae09 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
@@ -9,22 +9,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
X11DEPENDS = "virtual/libx11"
DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
-PR = "r8"
SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://sepbuildfix.patch \
- file://glibc-2.19.patch \
+ file://glibc-2.20.patch \
file://force-nostabs.patch \
file://remove-arm-variant-specific.patch \
file://remove-ppc-tests-failing-build.patch \
+ file://valgrind-remove-rpath.patch \
file://add-ptest.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2"
-SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0"
+SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"
+SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997"
COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
COMPATIBLE_HOST_armv7a = 'arm.*-linux'
@@ -48,7 +48,7 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " sed perl eglibc-utils"
+RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
do_compile_ptest() {
oe_runmake check
diff --git a/meta/recipes-devtools/xmlto/files/catalog.xml b/meta/recipes-devtools/xmlto/files/catalog.xml
new file mode 100644
index 0000000000..6b8833d871
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/files/catalog.xml
@@ -0,0 +1,19 @@
+<?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.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
new file mode 100644
index 0000000000..69ca43221c
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
@@ -0,0 +1,30 @@
+configure.in: drop the test of xmllint and xsltproc
+
+The test is unnecessary, the xmllint and xsltproc were explicitly
+added to RDEPENDS.
+
+Upstream-Status: oe-specific
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -42,10 +42,10 @@ AC_ARG_VAR([LOCALE], [Name and path of the `locale' program.])
+ AC_PATH_PROG([LOCALE], [locale], [locale])
+
+ AC_ARG_VAR([XMLLINT], [Name and path of the `xmllint' program.])
+-AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
++dnl AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
+
+ AC_ARG_VAR([XSLTPROC], [Name and path of the `xsltproc' program.])
+-AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
++dnl AC_PATH_PROG([XSLTPROC], [xsltproc], [xsltproc])
+
+ dnl
+ dnl toolchains
+--
+1.8.1.2
+
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
new file mode 100644
index 0000000000..a7a01830ae
--- /dev/null
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
@@ -0,0 +1,38 @@
+SUMMARY = "A shell-script tool for converting XML files to various formats"
+HOMEPAGE = "https://fedorahosted.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 \
+ file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
+ file://catalog.xml \
+"
+SRC_URI[md5sum] = "0cca8be787ba01e00c618cb390c988b9"
+SRC_URI[sha256sum] = "cfd8d2a26077be1d5566dfe22dd66099ae4f4600dea97d6e113a2cc5b8708977"
+
+inherit autotools
+
+# xmlto needs getopt/xmllint/xsltproc/bash at runtime
+RDEPENDS_${PN} = "docbook-xml-dtd4 \
+ docbook-xsl-stylesheets \
+ util-linux \
+ libxml2 \
+ bash \
+"
+RDEPENDS_${PN}_append_class-target = " \
+ libxslt-bin \
+"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF_append = " 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_populate_sysroot[rdeptask] = "do_populate_sysroot"
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/at/atd.init
index eca379b3cd..eca379b3cd 100644
--- a/meta/recipes-extended/at/files/S99at
+++ b/meta/recipes-extended/at/at/atd.init
diff --git a/meta/recipes-extended/at/files/atd.service b/meta/recipes-extended/at/at/atd.service
index 6dc844504a..6dc844504a 100644
--- a/meta/recipes-extended/at/files/atd.service
+++ b/meta/recipes-extended/at/at/atd.service
diff --git a/meta/recipes-extended/at/files/configure-add-enable-pam.patch b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
index 1e5efef128..1e5efef128 100644
--- a/meta/recipes-extended/at/files/configure-add-enable-pam.patch
+++ b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
diff --git a/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
index d5ef0032be..d5ef0032be 100644
--- a/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch
+++ b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
diff --git a/meta/recipes-extended/at/files/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
index 66ff3e1c11..66ff3e1c11 100644
--- a/meta/recipes-extended/at/files/fix_parallel_build_error.patch
+++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
diff --git a/meta/recipes-extended/at/files/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch
index dfe76d7487..b5ceb9ae82 100644
--- a/meta/recipes-extended/at/files/pam.conf.patch
+++ b/meta/recipes-extended/at/at/pam.conf.patch
@@ -3,19 +3,25 @@ oe doesn't support "@include", use the concrete directive instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---- at-3.1.12/pam.conf.orig 2009-11-23 23:11:52.000000000 +0800
-+++ at-3.1.12/pam.conf 2011-07-15 11:14:04.132818950 +0800
-@@ -2,8 +2,8 @@
+Index: at-3.1.15/pam.conf
+===================================================================
+--- at-3.1.15.orig/pam.conf
++++ at-3.1.15/pam.conf
+@@ -1,10 +1,11 @@
+ #
# The PAM configuration file for the at daemon
#
-
--auth required pam_env.so
--@include common-auth
--@include common-account
--@include common-session-noninteractive
--session required pam_limits.so
++
+auth required pam_env.so
+auth include common-auth
+account include common-account
+session include common-session-noninteractive
+session required pam_limits.so
++session required pam_loginuid.so
+
+-auth required pam_env.so
+-@include common-auth
+-@include common-account
+-session required pam_loginuid.so
+-@include common-session-noninteractive
+-session required pam_limits.so
diff --git a/meta/recipes-extended/at/files/posixtm.c b/meta/recipes-extended/at/at/posixtm.c
index 5514ba4fe2..5514ba4fe2 100644
--- a/meta/recipes-extended/at/files/posixtm.c
+++ b/meta/recipes-extended/at/at/posixtm.c
diff --git a/meta/recipes-extended/at/files/posixtm.h b/meta/recipes-extended/at/at/posixtm.h
index e91749d736..e91749d736 100644
--- a/meta/recipes-extended/at/files/posixtm.h
+++ b/meta/recipes-extended/at/at/posixtm.h
diff --git a/meta/recipes-extended/at/at_3.1.14.bb b/meta/recipes-extended/at/at_3.1.16.bb
index 68a24b8cd0..f16edba5eb 100644
--- a/meta/recipes-extended/at/at_3.1.14.bb
+++ b/meta/recipes-extended/at/at_3.1.16.bb
@@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
DEPENDS = "flex flex-native \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
- ${VIRTUAL-RUNTIME_initscripts} \
"
PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
@@ -22,15 +20,15 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
file://posixtm.c \
file://posixtm.h \
file://file_replacement_with_gplv2.patch \
- file://S99at \
+ file://atd.init \
file://atd.service \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
PAM_SRC_URI = "file://pam.conf.patch \
file://configure-add-enable-pam.patch"
-SRC_URI[md5sum] = "d41cfd79033b6e49a8838add59a42ac6"
-SRC_URI[sha256sum] = "cd092bf05d29c25b286f55a960ce8b8c3c5beb571d86ed8eb1dfb3b61291b3ae"
+SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19"
+SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1"
EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-daemon_username=root \
@@ -39,7 +37,10 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--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
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE_${PN} = "atd.service"
@@ -53,9 +54,7 @@ do_install () {
oe_runmake -e "IROOT=${D}" install
install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/rcS.d
- install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
- ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
+ install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
# install systemd unit files
install -d ${D}${systemd_unitdir}/system
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 2fe0c6b574..0fd5af9797 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -4,10 +4,11 @@ SECTION = "base/shell"
DEPENDS = "ncurses bison-native"
-inherit autotools-brokensep gettext texinfo update-alternatives ptest
+inherit autotools gettext texinfo update-alternatives ptest
PARALLEL_MAKE = ""
+EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "--enable-job-control"
ALTERNATIVE_${PN} = "sh"
@@ -15,8 +16,6 @@ ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
ALTERNATIVE_PRIORITY = "100"
-export AUTOHEADER = "true"
-
RDEPENDS_${PN} += "base-files"
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-ptest += "make"
@@ -38,6 +37,10 @@ do_install_append () {
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
}
+do_install_append_class-target () {
+ # Clean host path in bashbug
+ sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
+}
do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
index fe04b28e7c..35e624bb8b 100644
--- a/meta/recipes-extended/bash/bash_3.2.48.bb
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -6,9 +6,15 @@ 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=patch001 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
- ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
+ ${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 \
@@ -17,12 +23,21 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
-SRC_URI[patch001.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
-SRC_URI[patch001.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
-SRC_URI[patch002.md5sum] = "8443d4385d73ec835abe401d90591377"
-SRC_URI[patch002.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
-SRC_URI[patch003.md5sum] = "15c6653042e9814aa87120098fc7a849"
-SRC_URI[patch003.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
-
-SRC_URI[md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
-SRC_URI[sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
+SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
+SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
+SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377"
+SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
+SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849"
+SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
+SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1"
+SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61"
+SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46"
+SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e"
+SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6"
+SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359"
+SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05"
+SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a"
+SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a"
+SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4"
+SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913"
+SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0"
diff --git a/meta/recipes-extended/bash/bash_4.3.bb b/meta/recipes-extended/bash/bash_4.3.bb
index 25b7410c52..23d31976bb 100644
--- a/meta/recipes-extended/bash/bash_4.3.bb
+++ b/meta/recipes-extended/bash/bash_4.3.bb
@@ -1,10 +1,42 @@
require bash.inc
+PR = "r1"
+
# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-001;apply=yes;striplevel=0;name=patch001 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-002;apply=yes;striplevel=0;name=patch002 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-003;apply=yes;striplevel=0;name=patch003 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-004;apply=yes;striplevel=0;name=patch004 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-005;apply=yes;striplevel=0;name=patch005 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-006;apply=yes;striplevel=0;name=patch006 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-007;apply=yes;striplevel=0;name=patch007 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-008;apply=yes;striplevel=0;name=patch008 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-009;apply=yes;striplevel=0;name=patch009 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-010;apply=yes;striplevel=0;name=patch010 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-011;apply=yes;striplevel=0;name=patch011 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-012;apply=yes;striplevel=0;name=patch012 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-013;apply=yes;striplevel=0;name=patch013 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-014;apply=yes;striplevel=0;name=patch014 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-015;apply=yes;striplevel=0;name=patch015 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-016;apply=yes;striplevel=0;name=patch016 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-017;apply=yes;striplevel=0;name=patch017 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-018;apply=yes;striplevel=0;name=patch018 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-019;apply=yes;striplevel=0;name=patch019 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-020;apply=yes;striplevel=0;name=patch020 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-021;apply=yes;striplevel=0;name=patch021 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-022;apply=yes;striplevel=0;name=patch022 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-023;apply=yes;striplevel=0;name=patch023 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-024;apply=yes;striplevel=0;name=patch024 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-025;apply=yes;striplevel=0;name=patch025 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-026;apply=yes;striplevel=0;name=patch026 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-027;apply=yes;striplevel=0;name=patch027 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-028;apply=yes;striplevel=0;name=patch028 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-029;apply=yes;striplevel=0;name=patch029 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-030;apply=yes;striplevel=0;name=patch030 \
file://execute_cmd.patch;striplevel=0 \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
@@ -15,4 +47,65 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1"
SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4"
+SRC_URI[patch001.md5sum] = "1ab682b4e36afa4cf1b426aa7ac81c0d"
+SRC_URI[patch001.sha256sum] = "ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742"
+SRC_URI[patch002.md5sum] = "8fc22cf50ec85da00f6af3d66f7ddc1b"
+SRC_URI[patch002.sha256sum] = "eee7cd7062ab29a9e4f02924d9c367264dcb8b162703f74ff6eb8f175a91502b"
+SRC_URI[patch003.md5sum] = "a41728eca78858758e26b5dea64ae506"
+SRC_URI[patch003.sha256sum] = "000e6eac50cd9053ce0630db01239dcdead04a2c2c351c47e2b51dac1ac1087d"
+SRC_URI[patch004.md5sum] = "bf8d53d227829d67235927689a03cc7a"
+SRC_URI[patch004.sha256sum] = "5ea0a42c6506720d26e6d3c5c358e9a0d49f6f189d69a8ed34d5935964821338"
+SRC_URI[patch005.md5sum] = "c0c00935c8b8ffff76e8ab77e7be7d15"
+SRC_URI[patch005.sha256sum] = "1ac83044032b9f5f11aeca8a344ae3c524ec2156185d3adbb8ad3e7a165aa3fa"
+SRC_URI[patch006.md5sum] = "6f01e364cd092faa28dd7119f47ddb5f"
+SRC_URI[patch006.sha256sum] = "a0648ee72d15e4a90c8b77a5c6b19f8d89e28c1bc881657d22fe26825f040213"
+SRC_URI[patch007.md5sum] = "dcf471d222bcd83283d3094e6ceeb6f8"
+SRC_URI[patch007.sha256sum] = "1113e321c59cf6a8648a36245bbe4217cf8acf948d71e67886dad7d486f8f3a3"
+SRC_URI[patch008.md5sum] = "f7553416646dc26c266454c78a916d36"
+SRC_URI[patch008.sha256sum] = "9941a98a4987192cc5ce3d45afe879983cad2f0bec96d441a4edd9033767f95e"
+SRC_URI[patch009.md5sum] = "7e73d2151f4064b484a4ba2c4b09960e"
+SRC_URI[patch009.sha256sum] = "c0226d6728946b2f53cdebf090bcd1c01627f01fee03295768605caa80bb40a5"
+SRC_URI[patch010.md5sum] = "a275463d21735bb6d7161f9fbd320d8f"
+SRC_URI[patch010.sha256sum] = "ce05799c0137314c70c7b6ea0477c90e1ac1d52e113344be8e32fa5a55c9f0b7"
+SRC_URI[patch011.md5sum] = "c17103ee20420d77e46b224c8d3fceda"
+SRC_URI[patch011.sha256sum] = "7c63402cdbc004a210f6c1c527b63b13d8bb9ec9c5a43d5c464a9010ff6f7f3b"
+SRC_URI[patch012.md5sum] = "3e2a057a19d02b3f92a3a09eacbc03ae"
+SRC_URI[patch012.sha256sum] = "3e1379030b35fbcf314e9e7954538cf4b43be1507142b29efae39eef997b8c12"
+SRC_URI[patch013.md5sum] = "fb377143a996d4ff087a2771bc8332f9"
+SRC_URI[patch013.sha256sum] = "bfa8ca5336ab1f5ef988434a4bdedf71604aa8a3659636afa2ce7c7446c42c79"
+SRC_URI[patch014.md5sum] = "1a1aaecc99a9d0cbc310e8e247dcc8b6"
+SRC_URI[patch014.sha256sum] = "5a4d6fa2365b6eb725a9d4966248b5edf7630a4aeb3fa8d526b877972658ac13"
+SRC_URI[patch015.md5sum] = "4f04387458a3c1b4d460d199f49991a8"
+SRC_URI[patch015.sha256sum] = "13293e8a24e003a44d7fe928c6b1e07b444511bed2d9406407e006df28355e8d"
+SRC_URI[patch016.md5sum] = "90e759709720c4f877525bebc9d5dc06"
+SRC_URI[patch016.sha256sum] = "92d60bcf49f61bd7f1ccb9602bead6f2c9946d79dea0e5ec0589bb3bfa5e0773"
+SRC_URI[patch017.md5sum] = "11e4046e1b86070f6adbb7ffc89641be"
+SRC_URI[patch017.sha256sum] = "1267c25c6b5ba57042a7bb6c569a6de02ffd0d29530489a16666c3b8a23e7780"
+SRC_URI[patch018.md5sum] = "cd5a9b46f5bea0dc0248c93c7dfac011"
+SRC_URI[patch018.sha256sum] = "7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58"
+SRC_URI[patch019.md5sum] = "cff4dc024d9d3456888aaaf8a36ca774"
+SRC_URI[patch019.sha256sum] = "a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23"
+SRC_URI[patch020.md5sum] = "167839c5f147347f4a03d88ab97ff787"
+SRC_URI[patch020.sha256sum] = "ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98"
+SRC_URI[patch021.md5sum] = "1d350671c48dec30b34d8b81f09cd79d"
+SRC_URI[patch021.sha256sum] = "41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9"
+SRC_URI[patch022.md5sum] = "11c349af66a55481a3215ef2520bec36"
+SRC_URI[patch022.sha256sum] = "fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88"
+SRC_URI[patch023.md5sum] = "b3cb0d80fd0c47728264405cbb3b23c7"
+SRC_URI[patch023.sha256sum] = "9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4"
+SRC_URI[patch024.md5sum] = "b5ea5600942acceb4b6f07313d2de74e"
+SRC_URI[patch024.sha256sum] = "3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c"
+SRC_URI[patch025.md5sum] = "193c06f578d38ffdbaebae9c51a7551f"
+SRC_URI[patch025.sha256sum] = "1e5186f5c4a619bb134a1177d9e9de879f3bb85d9c5726832b03a762a2499251"
+SRC_URI[patch026.md5sum] = "922578e2be7ed03729454e92ee8d3f3a"
+SRC_URI[patch026.sha256sum] = "2ecc12201b3ba4273b63af4e9aad2305168cf9babf6d11152796db08724c214d"
+SRC_URI[patch027.md5sum] = "8ff6948b16f2db5c29b1b9ae1085bbe7"
+SRC_URI[patch027.sha256sum] = "1eb76ad28561d27f7403ff3c76a36e932928a4b58a01b868d663c165f076dabe"
+SRC_URI[patch028.md5sum] = "dd51fa67913b5dca45a702b672b3323f"
+SRC_URI[patch028.sha256sum] = "e8b0dbed4724fa7b9bd8ff77d12c7f03da0fbfc5f8251ef5cb8511eb082b469d"
+SRC_URI[patch029.md5sum] = "0729364c977ef4271e9f8dfafadacf67"
+SRC_URI[patch029.sha256sum] = "4cc4a397fe6bc63ecb97d030a4e44258ef2d4e076d0e90c77782968cc43d6292"
+SRC_URI[patch030.md5sum] = "efb709fdb1368945513de23ccbfae053"
+SRC_URI[patch030.sha256sum] = "85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a58385b"
+
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
index b116052c7d..d8c8a860f8 100644
--- a/meta/recipes-extended/bc/bc_1.06.bb
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
SECTION = "base"
DEPENDS = "flex"
-PR = "r2"
+PR = "r3"
SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
file://fix-segment-fault.patch "
@@ -18,7 +18,7 @@ SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
-inherit autotools-brokensep texinfo update-alternatives
+inherit autotools texinfo update-alternatives
ALTERNATIVE_${PN} = "dc"
ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/byacc/byacc_20140422.bb b/meta/recipes-extended/byacc/byacc_20141128.bb
index cf57738bea..15c14c9733 100644
--- a/meta/recipes-extended/byacc/byacc_20140422.bb
+++ b/meta/recipes-extended/byacc/byacc_20141128.bb
@@ -7,5 +7,5 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3"
require byacc.inc
-SRC_URI[md5sum] = "e7c13c5e207dc05eab9145cc9972397b"
-SRC_URI[sha256sum] = "2f104c7e200dd86844d5f3521e12cb55fc48a9c3da3480a65fde2ca8c053bdcc"
+SRC_URI[md5sum] = "acb0ff0fb6cc414a6b50c799794b2425"
+SRC_URI[sha256sum] = "f517fc21f08c1a1f010177357df58fc64eb1131011e5dcd48c19fe44c47198d0"
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
index 14b1d1809d..47ee576a8e 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ([2.57])
AC_INIT(bzip2, 2.0.5, , libXrender)
-AM_INIT_AUTOMAKE()
+AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE
#AM_CONFIG_HEADER(config.h)
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 9dd9e6a1f9..ed12277566 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -8,10 +8,10 @@ LICENSE = "bzip2"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
PR = "r5"
-SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
- file://configure.ac \
- file://run-ptest \
- file://Makefile.am"
+SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
+ file://configure.ac;subdir=${BP} \
+ file://Makefile.am;subdir=${BP} \
+ file://run-ptest"
SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
@@ -27,12 +27,6 @@ ALTERNATIVE_${PN} = "bunzip2 bzcat"
#install binaries to bzip2-native under sysroot for replacement-native
EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
-do_extraunpack () {
- cp ${WORKDIR}/configure.ac ${S}/
- cp ${WORKDIR}/Makefile.am ${S}/
-}
-
-addtask extraunpack after do_unpack before do_patch
do_install_ptest () {
cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
new file mode 100644
index 0000000000..89cd3cfa50
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
@@ -0,0 +1,220 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <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.11.orig/src/copyin.c cpio-2.11/src/copyin.c
+--- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800
+@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_
+ }
+
+
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++ off_t n = file_hdr->c_filesize + 1;
++ char *link_name;
++
++ if (n == 0 || n > SIZE_MAX)
++ {
++ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
++ link_name = NULL;
++ }
++ else
++ {
++ link_name = xmalloc (n);
++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++ link_name[file_hdr->c_filesize] = '\0';
++ tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ }
++ return link_name;
++}
++
++
+ static void
+ list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
+ {
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- char *link_name = NULL; /* Name of hard and symbolic links. */
+-
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- long_format (file_hdr, link_name);
+- free (link_name);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
+- return;
++ char *link_name = get_link_name (file_hdr, in_file_des);
++ if (link_name)
++ {
++ long_format (file_hdr, link_name);
++ free (link_name);
++ }
+ }
+ else
+- {
+ long_format (file_hdr, file_hdr->c_tar_linkname);
+- return;
+- }
++ return;
+ }
+ else
+ #endif
+@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_
+
+ if (archive_format != arf_tar && archive_format != arf_ustar)
+ {
+- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+- link_name[file_hdr->c_filesize] = '\0';
+- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+- tape_skip_padding (in_file_des, file_hdr->c_filesize);
++ link_name = get_link_name (file_hdr, in_file_des);
+ }
+ else
+ {
+diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am
+--- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800
+@@ -52,6 +52,8 @@ TESTSUITE_AT = \
+ setstat04.at\
+ setstat05.at\
+ symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+ version.at
+
+ TESTSUITE = $(srcdir)/testsuite
+diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
+--- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800
+@@ -0,0 +1,49 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++cpio -ntv < ARCHIVE
++test $? -eq 2
++],
++[0],
++[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
++],[cpio: LINK: stored filename length too big
++cpio: premature end of file
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
+--- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite. -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++ dirname="xxxxxxxxx/$dirname"
++ mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at
+--- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800
+@@ -31,6 +31,8 @@ m4_include([version.at])
+
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
+ m4_include([interdir.at])
+
+ m4_include([setstat01.at])
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
new file mode 100644
index 0000000000..0148e70797
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
@@ -0,0 +1,217 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <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.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
index 5f88b30f1e..c42db6f352 100644
--- a/meta/recipes-extended/cpio/cpio_2.11.bb
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -3,9 +3,10 @@ include cpio_v2.inc
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-PR = "r4"
+PR = "r5"
SRC_URI += "file://remove-gets.patch \
+ file://fix-memory-overrun.patch \
"
SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
index b6da207b92..3f97dbe2ce 100644
--- a/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -3,11 +3,12 @@ require cpio_v2.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
-PR = "r3"
+PR = "r4"
SRC_URI += "file://m4extensions.patch \
- file://avoid_heap_overflow.patch \
- "
+ file://avoid_heap_overflow.patch \
+ file://fix-memory-overrun.patch \
+ "
SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb b/meta/recipes-extended/cracklib/cracklib_2.9.2.bb
index d70e76f43f..177ab27a2b 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.9.2.bb
@@ -13,13 +13,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
file://0002-craklib-fix-testnum-and-teststr-failed.patch"
-SRC_URI[md5sum] = "90536219c520add2ceb3c26f0d7da404"
-SRC_URI[sha256sum] = "408905c2539a97dc8cbbb6d7cd2046cb5647a345b4bda399220d9471be16d156"
+SRC_URI[md5sum] = "559072fdfc095cdb763c4de3471a889e"
+SRC_URI[sha256sum] = "c1c899291d443e99d1aecfbc879e4ac9c0cbc265574f47b487842da11e9759f5"
-inherit autotools-brokensep gettext
+PR = "r1"
-BBCLASSEXTEND = "native"
+inherit autotools gettext
do_install_append_class-target() {
create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab
index cc9169eda9..22c4feb2dc 100644
--- a/meta/recipes-extended/cronie/cronie/crontab
+++ b/meta/recipes-extended/cronie/cronie/crontab
@@ -7,4 +7,8 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-# m h dom mon dow user command
+# m h dom mon dow user command
+# 1 * * * * root cd / && run-parts /etc/cron.hourly
+# 30 7 * * * root cd / && run-parts /etc/cron.daily
+# 42 7 * * 7 root cd / && run-parts /etc/cron.weekly
+# 55 7 1 * * root cd / && run-parts /etc/cron.monthly
diff --git a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
deleted file mode 100644
index 7384a0bad4..0000000000
--- a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-For an out of tree build, the cronie-common.h file was not being
-found correctly, so point it to the top_srcdir
-
-Upstream-Status: Submitted
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: cronie-1.4.11/anacron/Makefile.am
-===================================================================
---- cronie-1.4.11.orig/anacron/Makefile.am
-+++ cronie-1.4.11/anacron/Makefile.am
-@@ -9,6 +9,7 @@ common_nodist = anacron-paths.h
- nodist_anacron_SOURCES = $(common_nodist)
- BUILT_SOURCES = $(common_nodist)
-
-+AM_CFLAGS = -I$(top_srcdir)
-
- LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
-
-Index: cronie-1.4.11/src/Makefile.am
-===================================================================
---- cronie-1.4.11.orig/src/Makefile.am
-+++ cronie-1.4.11/src/Makefile.am
-@@ -15,6 +15,7 @@ nodist_crond_SOURCES = $(common_nodist)
- nodist_crontab_SOURCES = $(common_nodist)
- BUILT_SOURCES = $(common_nodist)
-
-+AM_CFLAGS = -I$(top_srcdir)
-
- LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
-
diff --git a/meta/recipes-extended/cronie/cronie_1.4.11.bb b/meta/recipes-extended/cronie/cronie_1.4.12.bb
index 02234f6a36..977332b3fc 100644
--- a/meta/recipes-extended/cronie/cronie_1.4.11.bb
+++ b/meta/recipes-extended/cronie/cronie_1.4.12.bb
@@ -7,16 +7,14 @@ HOMEPAGE = "https://fedorahosted.org/cronie/"
BUGTRACKER = "mmaslano@redhat.com"
# Internet Systems Consortium License
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
+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://fix-out-of-tree-build.patch \
file://crond.init \
file://crontab \
file://crond.service \
@@ -25,18 +23,16 @@ SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
PAM_SRC_URI = "file://crond_pam_config.patch"
PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
-SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f"
-SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be"
+SRC_URI[md5sum] = "199db91e514a4d75e3222d69874b132f"
+SRC_URI[sha256sum] = "0f5c9bf32f352599451c4ca0d6bc076d19e73ecfa5a90b34ecfe47c918c8bafd"
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 ."
@@ -67,7 +63,7 @@ do_install_append () {
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
@@ -82,4 +78,4 @@ do_install_append () {
}
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 c083501de2..cfcd19c0f1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -2,19 +2,27 @@ SUMMARY = "An Internet printing system for Unix"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2"
DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
-PROVIDES = "cups14"
SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
- file://cups-no-gcrypt.patch \
- file://cups-str4402.patch \
+ file://cups.socket \
+ file://cups.path \
+ file://cups.service \
+ file://0001-test-ippserver.c-check-avahi-before-use.patch \
"
LEAD_SONAME = "libcupsdriver.so"
-inherit autotools-brokensep binconfig
+CLEANBROKEN = "1"
+
+inherit autotools-brokensep binconfig useradd systemd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system lpadmin"
+
+SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
@@ -26,7 +34,6 @@ EXTRA_OECONF = " \
--enable-gnutls \
--enable-dbus \
--enable-browsing \
- --disable-openssl \
--disable-gssapi \
--enable-debug \
--disable-relro \
@@ -41,6 +48,7 @@ EXTRA_OECONF = " \
do_configure() {
gnu-configize
libtoolize --force
+ autoconf --force
DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
}
@@ -63,12 +71,25 @@ do_compile () {
"-I."
}
-fakeroot do_install () {
+do_install () {
oe_runmake "DSTROOT=${D}" install
# Remove /var/run from package as cupsd will populate it on startup
rm -fr ${D}/${localstatedir}/run
rmdir ${D}/${libdir}/${BPN}/driver
+
+ # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
+ rm -rf ${D}${sysconfdir}/init.d/
+ rm -rf ${D}${sysconfdir}/rc*
+ fi
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
}
python do_package_append() {
@@ -80,6 +101,7 @@ python do_package_append() {
PACKAGES =+ "${PN}-lib ${PN}-libimage"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
FILES_${PN} += "${libdir}/cups/backend \
${libdir}/cups/cgi-bin \
${libdir}/cups/filter \
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 e6544b5607..5379eb6aa2 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
@@ -10,13 +10,13 @@ Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
ppdc/Makefile | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
-diff --git a/ppdc/Makefile b/ppdc/Makefile
-index 0288d47..fc87f1b 100644
---- a/ppdc/Makefile
-+++ b/ppdc/Makefile
-@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
+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 \
- libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
+ libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
- echo Generating localization strings...
- ./genstrings >sample.c
@@ -25,9 +25,9 @@ index 0288d47..fc87f1b 100644
#
-@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
+@@ -260,9 +260,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cu
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
- ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD compiler...
- ./ppdc-static -l en,fr -I ../data foo.drv
@@ -38,24 +38,26 @@ index 0288d47..fc87f1b 100644
#
-@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
- ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+@@ -288,17 +288,17 @@ ppdi-static: ppdc-static ppdi.o libcups
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+ ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
- echo Testing PPD importer...
+- echo Testing PPD importer...
- $(RM) -r ppd ppd2 sample-import.drv
-- ./ppdc-static -I ../data sample.drv
+- ./ppdc-static -l en -I ../data sample.drv
- ./ppdi-static -I ../data -o sample-import.drv ppd/*
-- ./ppdc-static -I ../data -d ppd2 sample-import.drv
+- ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
- if diff -r ppd ppd2 >/dev/null; then \
- echo PPD import OK; \
- else \
- echo PPD import FAILED; \
- exit 1; \
- fi
++# echo Testing PPD importer...
+# $(RM) -r ppd ppd2 sample-import.drv
-+# ./ppdc-static -I ../data sample.drv
++# ./ppdc-static -l en -I ../data sample.drv
+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
-+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
++# ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
+# if diff -r ppd ppd2 >/dev/null; then \
+# echo PPD import OK; \
+# else \
@@ -65,6 +67,3 @@ index 0288d47..fc87f1b 100644
#
---
-1.6.6.1
-
diff --git a/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
new file mode 100644
index 0000000000..4bcff69b77
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-test-ippserver.c-check-avahi-before-use.patch
@@ -0,0 +1,34 @@
+From fba92768324e76fa60d9c5f709e045bd4f7aee89 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 3 Jan 2015 05:56:24 +0000
+Subject: [PATCH] test/ippserver.c: check avahi before use it
+
+Fixed the error when --disable-avahi:
+ippserver.c:425:8: error: unknown type name 'AvahiThreadedPoll'
+
+The avahi is optional, we need check whether it is enabled before use as
+other code does.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ test/ippserver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/ippserver.c b/test/ippserver.c
+index c785e5f..26c8a66 100644
+--- a/test/ippserver.c
++++ b/test/ippserver.c
+@@ -421,7 +421,7 @@ static int valid_job_attributes(_ipp_client_t *client);
+
+ # ifdef HAVE_DNSSD
+ static DNSServiceRef DNSSDMaster = NULL;
+-# else /* HAVE_AVAHI */
++# elif defined(HAVE_AVAHI) /* HAVE_AVAHI */
+ static AvahiThreadedPoll *DNSSDMaster = NULL;
+ static AvahiClient *DNSSDClient = NULL;
+ # endif /* HAVE_DNSSD */
+--
+2.0.1
+
diff --git a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch
deleted file mode 100644
index 8bbcf39497..0000000000
--- a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Description: Don't build-depend on libgcrypt, as nothing is used from it
-Author: Didier Raboud <odyx@debian.org>
-Bug-Debian: https://bugs.debian.org/638416
-Bug: http://www.cups.org/str.php?L????
-
-[CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399
-
-Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
-
-Upstream-Status: Backport
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Last-Update: 2014-04-07
---- a/config-scripts/cups-ssl.m4
-+++ b/config-scripts/cups-ssl.m4
-@@ -66,7 +66,6 @@
- dnl Then look for GNU TLS...
- if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
- AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
-- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
- if $PKGCONFIG --exists gnutls; then
- have_ssl=1
- SSLLIBS=`$PKGCONFIG --libs gnutls`
-@@ -84,14 +83,6 @@
- if test $have_ssl = 1; then
- CUPS_SERVERCERT="ssl/server.crt"
- CUPS_SERVERKEY="ssl/server.key"
--
-- if $PKGCONFIG --exists gcrypt; then
-- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
-- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
-- elif test "x$LIBGCRYPTCONFIG" != x; then
-- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
-- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
-- fi
- fi
- fi
-
---- a/cups/http-private.h
-+++ b/cups/http-private.h
-@@ -80,7 +80,6 @@
- # elif defined HAVE_GNUTLS
- # include <gnutls/gnutls.h>
- # include <gnutls/x509.h>
--# include <gcrypt.h>
- # elif defined(HAVE_CDSASSL)
- # include <CoreFoundation/CoreFoundation.h>
- # include <Security/Security.h>
diff --git a/meta/recipes-extended/cups/cups/cups-str4402.patch b/meta/recipes-extended/cups/cups/cups-str4402.patch
deleted file mode 100644
index 69d349cab1..0000000000
--- a/meta/recipes-extended/cups/cups/cups-str4402.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-Upstream CUPS issue when building with out dnssd/avahi
-
-https://www.cups.org/str.php?L4408+P-1+S-2+C0+I0+E0+Q
-
-Upstream-Status: Backport [STR #4402]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
---- a/scheduler/dirsvc.c 2014-03-05 13:11:32.000000000 -0800
-+++ b/shceduler/dirsvc.c 2014-05-19 11:33:51.743124614 -0700
-@@ -50,6 +50,9 @@
- static void update_lpd(int onoff);
- static void update_smb(int onoff);
-
-+static void deregister_all_printers(int from_callback);
-+static void register_all_printers(int from_callback);
-+
-
- #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
- # ifdef __APPLE__
-@@ -60,12 +63,10 @@
- # ifdef HAVE_AVAHI
- static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata);
- # endif /* HAVE_AVAHI */
--static void dnssdDeregisterAllPrinters(int from_callback);
- static void dnssdDeregisterInstance(cupsd_srv_t *srv, int from_callback);
- static void dnssdDeregisterPrinter(cupsd_printer_t *p, int clear_name, int from_callback);
- static const char *dnssdErrorString(int error);
- static void dnssdFreeTxtRecord(cupsd_txt_t *txt);
--static void dnssdRegisterAllPrinters(int from_callback);
- # ifdef HAVE_DNSSD
- static void dnssdRegisterCallback(DNSServiceRef sdRef,
- DNSServiceFlags flags,
-@@ -241,7 +242,7 @@
- * Register the individual printers
- */
-
-- dnssdRegisterAllPrinters(0);
-+ register_all_printers(0);
- }
-
-
-@@ -259,7 +260,7 @@
- * De-register the individual printers
- */
-
-- dnssdDeregisterAllPrinters(0);
-+ deregister_all_printers(0);
-
- /*
- * Shut down browsing sockets...
-@@ -579,7 +580,7 @@
- * Register the individual printers
- */
-
-- dnssdRegisterAllPrinters(1);
-+ register_all_printers(1);
- break;
-
- case AVAHI_CLIENT_FAILURE:
-@@ -591,7 +592,7 @@
- * Unregister everything and close the client...
- */
-
-- dnssdDeregisterAllPrinters(1);
-+ deregister_all_printers(1);
- dnssdDeregisterInstance(&WebIFSrv, 1);
- avahi_client_free(DNSSDClient);
- DNSSDClient = NULL;
-@@ -631,28 +632,6 @@
-
-
- /*
-- * 'dnssdDeregisterAllPrinters()' - Deregister all printers.
-- */
--
--static void
--dnssdDeregisterAllPrinters(
-- int from_callback) /* I - Deregistering because of callback? */
--{
-- cupsd_printer_t *p; /* Current printer */
--
--
-- if (!DNSSDMaster)
-- return;
--
-- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-- p;
-- p = (cupsd_printer_t *)cupsArrayNext(Printers))
-- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-- dnssdDeregisterPrinter(p, 1, from_callback);
--}
--
--
--/*
- * 'dnssdDeregisterInstance()' - Deregister a DNS-SD service instance.
- */
-
-@@ -858,27 +837,6 @@
-
-
- /*
-- * 'dnssdRegisterAllPrinters()' - Register all printers.
-- */
--
--static void
--dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */
--{
-- cupsd_printer_t *p; /* Current printer */
--
--
-- if (!DNSSDMaster)
-- return;
--
-- for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-- p;
-- p = (cupsd_printer_t *)cupsArrayNext(Printers))
-- if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-- dnssdRegisterPrinter(p, from_callback);
--}
--
--
--/*
- * 'dnssdRegisterCallback()' - DNSServiceRegister callback.
- */
-
-@@ -1813,6 +1771,61 @@
- }
-
-
-+/*
-+ * 'deregister_all_printers()' - Deregister all printers.
-+ */
-+
-+static void
-+deregister_all_printers(
-+ int from_callback) /* I - Deregistering because of callback? */
-+{
-+ cupsd_printer_t *p; /* Current printer */
-+
-+
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ if (!DNSSDMaster)
-+ return;
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+
-+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-+ p;
-+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
-+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ dnssdDeregisterPrinter(p, 1, from_callback);
-+#else
-+ cupsdDeregisterPrinter(p, 1);
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+}
-+
-+
-+/*
-+ * 'register_all_printers()' - Register all printers.
-+ */
-+
-+static void
-+register_all_printers(int from_callback) /* I - Called from callback? */
-+{
-+ cupsd_printer_t *p; /* Current printer */
-+
-+
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ if (!DNSSDMaster)
-+ return;
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+
-+ for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-+ p;
-+ p = (cupsd_printer_t *)cupsArrayNext(Printers))
-+ if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
-+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
-+ dnssdRegisterPrinter(p, from_callback);
-+#else
-+ cupsdRegisterPrinter(p);
-+#endif /* HAVE_DNSSD || HAVE_AVAHI */
-+}
-+
-+
- /*
- * End of "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $".
- */
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
new file mode 100644
index 0000000000..de8cc57c27
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
+
+[Path]
+PathExistsGlob=/var/spool/cups/d*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
new file mode 100644
index 0000000000..7d3e839867
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@SBINDIR@/cupsd -f
+PrivateTmp=true
+
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
new file mode 100644
index 0000000000..33148705d6
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printing Service Sockets
+
+[Socket]
+ListenStream=/var/run/cups/cups.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/cups/cups_1.7.3.bb b/meta/recipes-extended/cups/cups_1.7.3.bb
deleted file mode 100644
index 2175ba71a2..0000000000
--- a/meta/recipes-extended/cups/cups_1.7.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"
-
-SRC_URI[md5sum] = "d498c3020acda0904ab0c13b6389a1ec"
-SRC_URI[sha256sum] = "fa989f856d1499169dc442fb2311053ea42fe455ca2721693ba5a9fe4b333e31"
diff --git a/meta/recipes-extended/cups/cups_2.0.1.bb b/meta/recipes-extended/cups/cups_2.0.1.bb
new file mode 100644
index 0000000000..c78b44d71f
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.0.1.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "7f7c33071035fb20d0879929a42da711"
+SRC_URI[sha256sum] = "60f7f2cca69f3b761a029fb314ee4299e3ea0fc02350f06d192cf31d58215525"
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
index ee4b8900bb..43ea3ce382 100644
--- a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
+++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
@@ -1,15 +1,17 @@
SUMMARY = "Collection of autoconf m4 macros"
SECTION = "base"
-HOMEPAGE = "http://cwautomacros.berlios.de/"
+HOMEPAGE = "http://sourceforge.net/projects/cwautomacros.berlios/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
-SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2"
-
-
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}.berlios/${BP}.tar.bz2"
SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
+do_configure() {
+ :
+}
+
do_install() {
oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb
index a467f20aa4..b708962447 100644
--- a/meta/recipes-extended/diffutils/diffutils_3.3.bb
+++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb
@@ -7,6 +7,8 @@ SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
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
diff --git a/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch
new file mode 100644
index 0000000000..bb96a18d82
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch
@@ -0,0 +1,50 @@
+Fix build with musl by using correct uint type names.
+
+This patch is taken from Sabotage Linux, the license statement for patches and
+build scripts in Sabotage Linux says:
+
+ To the extent possible under law, Christian Neukirchen has waived
+ all copyright and related or neighboring rights to this work.
+
+ http://creativecommons.org/publicdomain/zero/1.0/
+
+Therefore this should be good to include in OpenEmbedded.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-status: Pending
+
+diff -u ethtool-3.14.org/internal.h ethtool-3.14/internal.h
+--- ethtool-3.14.org/internal.h
++++ ethtool-3.14/internal.h
+@@ -7,6 +7,7 @@
+ #include "ethtool-config.h"
+ #endif
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -17,16 +18,16 @@
+
+ /* ethtool.h expects these to be defined by <linux/types.h> */
+ #ifndef HAVE_BE_TYPES
+-typedef __uint16_t __be16;
+-typedef __uint32_t __be32;
++typedef uint16_t __be16;
++typedef uint32_t __be32;
+ typedef unsigned long long __be64;
+ #endif
+
+ typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
+-typedef __int32_t s32;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
++typedef int32_t s32;
+
+ #include "ethtool-copy.h"
+ #include "net_tstamp-copy.h"
diff --git a/meta/recipes-extended/ethtool/ethtool_3.14.bb b/meta/recipes-extended/ethtool/ethtool_3.16.bb
index 49c79b68d7..92a0704800 100644
--- a/meta/recipes-extended/ethtool/ethtool_3.14.bb
+++ b/meta/recipes-extended/ethtool/ethtool_3.16.bb
@@ -9,10 +9,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
file://run-ptest \
file://avoid_parallel_tests.patch \
+ file://ethtool-uint.patch \
"
-SRC_URI[md5sum] = "997e20c25c43ad5800f8ae3204455a8a"
-SRC_URI[sha256sum] = "b1a988d6e397bd9d5d73cfd64329f85121936a050174bbfe90f8701fd893a1df"
+SRC_URI[md5sum] = "3806bae34c153e2b9e2859e85c54788d"
+SRC_URI[sha256sum] = "a6f1433824af7b390ed4e66dfc7cee047d6d1f56dbb8ceef9fe905d63aef5275"
inherit autotools ptest
RDEPENDS_${PN}-ptest += "make"
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
deleted file mode 100644
index 69c1486cf7..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
+++ /dev/null
@@ -1,781 +0,0 @@
-Upstream-Status: Backport
-
-commit af974034b68bf59337c7a384e488a518a77dfecd
-Author: James Youngman <jay@gnu.org>
-Date: Sat Jul 11 19:55:27 2009 +0100
-
- Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
-
- Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
- coredumps.
- * find/tree.c (set_new_parent): Initialise struct
- predicate->arg_text to NULL (instead of leaving it uninitialised).
- (get_new_pred_noarg): Likewise.
- (get_new_pred): Initialise predicate->arg_text to
- "ThisShouldBeSetToSomethingElse" to make it easier to notice
- bugs.
- (get_new_pred_chk_op): Use get_new_pred_noarg.
- (print_predicate): Use an if statement instead of
- two ternary operators.
- * find/util.c (insert_primary_withpred): Accept new argument, arg,
- being the argument (if any) of this predicate. Pass it to
- get_new_pred_chk_op.
- (insert_primary): Likewise (pass arg to insert_primary_withpred).
- (insert_primary_noarg): New function; calls insert_primary with
- arg=NULL.
- * find/parser.c (collect_arg_stat_info): Add an output parameter;
- the filename from which we collected the stat information.
- (parse_closeparen, parse_delete, parse_and, parse_or,
- parse_comma): Use get_new_pred_noarg.
- (parse_cnewer, parse_newer, parse_anewer): Use new
- collect_arg_stat_info and insert_primary interface.
- (parse_print, parse_prune, parse_nouser, parse_empty): Use
- insert_primary_noarg.
- (parse_accesscheck, parse_false): Use insert_primary_noarg.
- (parse_used, parse_iname, parse_fprint, insert_fprint,
- parse_fstype, parse_ilname): Use new collect_arg and
- insert_primary interfaces.
- (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
- parse_perm, parse_size, parse_user, parse_time): Use new
- collect_arg and insert_primary_withpred interface.
- (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
- (parse_newerXY, parse_nogroup): Use new insert_primary interface.
- (insert_regex, parse_samefile): Use new insert_primary_withpred
- interface.
- (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
- new insert_primary_withpred interface.
- * find/defs.h (struct predicate.arg_text): make const.
- Add declarations for new function get_new_pred_noarg and
- insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
- and insert_primary_withpred.
-
-diff --git a/ChangeLog b/ChangeLog
-index 6e346b8..e8ba0f8 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,0 +1,45 @@
-+2009-07-11 James Youngman <jay@gnu.org>
-+
-+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
-+ coredumps.
-+ * find/tree.c (set_new_parent): Initialise struct
-+ predicate->arg_text to NULL (instead of leaving it uninitialised).
-+ (get_new_pred_noarg): Likewise.
-+ (get_new_pred): Initialise predicate->arg_text to
-+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
-+ bugs.
-+ (get_new_pred_chk_op): Use get_new_pred_noarg.
-+ (print_predicate): Use an if statement instead of
-+ two ternary operators.
-+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
-+ being the argument (if any) of this predicate. Pass it to
-+ get_new_pred_chk_op.
-+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
-+ (insert_primary_noarg): New function; calls insert_primary with
-+ arg=NULL.
-+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
-+ the filename from which we collected the stat information.
-+ (parse_closeparen, parse_delete, parse_and, parse_or,
-+ parse_comma): Use get_new_pred_noarg.
-+ (parse_cnewer, parse_newer, parse_anewer): Use new
-+ collect_arg_stat_info and insert_primary interface.
-+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
-+ insert_primary_noarg.
-+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
-+ (parse_used, parse_iname, parse_fprint, insert_fprint,
-+ parse_fstype, parse_ilname): Use new collect_arg and
-+ insert_primary interfaces.
-+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
-+ parse_perm, parse_size, parse_user, parse_time): Use new
-+ collect_arg and insert_primary_withpred interface.
-+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
-+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
-+ (insert_regex, parse_samefile): Use new insert_primary_withpred
-+ interface.
-+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
-+ new insert_primary_withpred interface.
-+ * find/defs.h (struct predicate.arg_text): make const.
-+ Add declarations for new function get_new_pred_noarg and
-+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
-+ and insert_primary_withpred.
-+
-diff --git a/find/defs.h b/find/defs.h
-index 1708d83..4539fd9 100644
---- a/find/defs.h
-+++ b/find/defs.h
-@@ -297,7 +297,7 @@ struct predicate
- boolean artificial;
-
- /* The raw text of the argument of this predicate. */
-- char *arg_text;
-+ const char *arg_text;
-
- /* Information needed by the predicate processor.
- Next to each member are listed the predicates that use it. */
-@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
- /* tree.c */
- struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
- struct predicate * get_eval_tree PARAMS((void));
-+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
- struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
--struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
-+struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
-+ const char *arg));
- float calculate_derived_rates PARAMS((struct predicate *p));
-
- /* util.c */
--struct predicate *insert_primary PARAMS((const struct parser_table *entry));
--struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
-+struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
-+struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
-+struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
- void usage PARAMS((FILE *fp, int status, char *msg));
- extern boolean check_nofollow(void);
- void complete_pending_execs(struct predicate *p);
-diff --git a/find/parser.c b/find/parser.c
-index 534b670..2e6b989 100644
---- a/find/parser.c
-+++ b/find/parser.c
-@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
- }
-
- static boolean
--collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
-+collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
-+ const char **argument)
- {
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
- {
-+ *argument = filename;
- if (0 == (options.xstat)(filename, p))
- {
- return true;
-@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
- }
- else
- {
-+ *argument = NULL;
- return false;
- }
- }
-@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_and;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = AND_PREC;
-@@ -691,11 +694,12 @@ static boolean
- parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.xval = XVAL_ATIME;
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.kind = COMP_GT;
-@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_closeparen;
- our_pred->p_type = CLOSE_PAREN;
- our_pred->p_prec = NO_PREC;
-@@ -725,11 +729,12 @@ static boolean
- parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.kind = COMP_GT;
-@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_comma;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = COMMA_PREC;
-@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->side_effects = our_pred->no_default_print = true;
- /* -delete implies -depth */
- options.do_dir_first = false;
-@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
- return true;
- }
-@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->side_effects = our_pred->no_default_print = false;
- our_pred->est_success_rate = 0.0f;
-@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- insert_fls (const struct parser_table* entry, const char *filename)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary_noarg (entry);
- if (filename)
- open_output_file (filename, &our_pred->args.printf_vec);
- else
-@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, filename);
- open_output_file (filename, &our_pred->args.printf_vec);
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->need_stat = our_pred->need_type = false;
-@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- insert_fprint(const struct parser_table* entry, const char *filename)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, filename);
- if (filename)
- open_output_file (filename, &our_pred->args.printf_vec);
- else
-@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *typename;
- if (collect_arg(argv, arg_ptr, &typename))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, typename);
- our_pred->args.str = typename;
-
- /* This is an expensive operation, so although there are
-@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- return false;
- }
- }
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, groupname);
- our_pred->args.gid = gid;
- our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
- return true;
-@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *name;
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->args.str = name;
- /* Use the generic glob pattern estimator to figure out how many
- * links will match, but bear in mind that most files won't be links.
-@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- if (check_name_arg("-iname", name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
-@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck ();
- if (collect_arg (argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
-@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck();
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->args.str = name;
- our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
- return true;
-@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
- "arithmetic overflow while converting %s "
- "minutes to a number of seconds"))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, minutes);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
- return true;
-@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- fnmatch_sanitycheck();
- if (check_name_arg("-name", name))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
-@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) &argv;
- (void) &arg_ptr;
-
-- our_pred = get_new_pred_chk_op (entry);
-+ our_pred = get_new_pred_chk_op (entry, NULL);
- our_pred->pred_func = pred_negate;
- our_pred->p_type = UNI_OP;
- our_pred->p_prec = NEGATE_PREC;
-@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct predicate *our_pred;
- struct stat stat_newer;
-+ const char *arg;
-
- set_stat_placeholders(&stat_newer);
-- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
-+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, arg);
- our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
- our_pred->args.reftime.xval = XVAL_MTIME;
- our_pred->args.reftime.kind = COMP_GT;
-@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
- (*arg_ptr)++;
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, argv[*arg_ptr]);
-
-
- switch (x)
-@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) &argv;
- (void) &arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, NULL);
- our_pred->est_success_rate = 1e-4;
- #ifdef CACHE_IDS
- if (gid_unused == NULL)
-@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) arg_ptr;
-
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->est_success_rate = 1e-3;
- #ifdef CACHE_IDS
- if (uid_unused == NULL)
-@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred_chk_op (entry);
-+ our_pred = get_new_pred_chk_op (entry, NULL);
- our_pred->pred_func = pred_openparen;
- our_pred->p_type = OPEN_PAREN;
- our_pred->p_prec = NO_PREC;
-@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = get_new_pred (entry);
-+ our_pred = get_new_pred_noarg (entry);
- our_pred->pred_func = pred_or;
- our_pred->p_type = BI_OP;
- our_pred->p_prec = OR_PREC;
-@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
- const char *name;
- if (collect_arg(argv, arg_ptr, &name))
- {
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->args.str = name;
- our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
-@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
- rate = 0.9986; /* probably matches anything but a broken symlink */
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, perm_expr);
- our_pred->est_success_rate = rate;
- if (havekind)
- {
-@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- /* -print has the side effect of printing. This prevents us
- from doing undesired multiple printing when the user has
- already specified -print. */
-@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- if (options.do_dir_first == false)
- our_pred->need_stat = our_pred->need_type = false;
- /* -prune has a side effect that it does not descend into
-@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
- static boolean
- parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary_noarg (entry);
- (void) argv;
- (void) arg_ptr;
- our_pred->need_stat = our_pred->need_type = false;
-@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
- {
- struct re_pattern_buffer *re;
- const char *error_message;
-- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
-+ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
- our_pred->need_stat = our_pred->need_type = false;
- re = xmalloc (sizeof (struct re_pattern_buffer));
- our_pred->args.regex = re;
-@@ -2061,6 +2067,7 @@ static boolean
- parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- struct predicate *our_pred;
-+ char *arg;
- uintmax_t num;
- char suffix;
- enum comparison_type c_type;
-@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- */
- if ((argv == NULL) || (argv[*arg_ptr] == NULL))
- return false;
-+ arg = argv[*arg_ptr];
-
-- len = strlen (argv[*arg_ptr]);
-+ len = strlen (arg);
- if (len == 0)
- error (1, 0, _("invalid null argument to -size"));
-
-- suffix = argv[*arg_ptr][len - 1];
-+ suffix = arg[len - 1];
- switch (suffix)
- {
- case 'b':
- blksize = 512;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'c':
- blksize = 1;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'k':
- blksize = 1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'M': /* Megabytes */
- blksize = 1024*1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'G': /* Gigabytes */
- blksize = 1024*1024*1024;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case 'w':
- blksize = 2;
-- argv[*arg_ptr][len - 1] = '\0';
-+ arg[len - 1] = '\0';
- break;
-
- case '0':
-@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
- error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
- }
- /* TODO: accept fractional megabytes etc. ? */
-- if (!get_num (argv[*arg_ptr], &num, &c_type))
-+ if (!get_num (arg, &num, &c_type))
- {
- error(1, 0,
- _("Invalid argument `%s%c' to -size"),
-- argv[*arg_ptr], (int)suffix);
-+ arg, (int)suffix);
- return false;
- }
-- our_pred = insert_primary (entry);
-+our_pred = insert_primary (entry, arg);
- our_pred->args.size.kind = c_type;
- our_pred->args.size.blocksize = blksize;
- our_pred->args.size.size = num;
-@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct predicate *our_pred;
- struct stat st, fst;
- int fd, openflags;
-+ const char *filename;
-
- set_stat_placeholders(&st);
-- if (!collect_arg_stat_info(argv, arg_ptr, &st))
-+ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
- return false;
-
- set_stat_placeholders(&fst);
-@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- }
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, filename);
- our_pred->args.samefileid.ino = st.st_ino;
- our_pred->args.samefileid.dev = st.st_dev;
- our_pred->args.samefileid.fd = fd;
-@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
- (void) argv;
- (void) arg_ptr;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->est_success_rate = 1.0f;
- return true;
-@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct predicate *our_pred;
- (void) argv;
- (void) arg_ptr;
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary_noarg (entry);
- our_pred->need_stat = our_pred->need_type = false;
- our_pred->side_effects = our_pred->no_default_print = false;
- if (pred_is(our_pred, pred_executable))
-@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
- struct timespec zero = {0,0};
- if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
- {
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, offset_str);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
- return true;
-@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
- return false;
- }
- }
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, username);
- our_pred->args.uid = uid;
- our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
- return true;
-@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
- error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
- return false;
- }
-- our_pred = insert_primary_withpred (entry, which_pred);
-+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
- our_pred->est_success_rate = rate;
-
- /* Figure out if we will need to stat the file, because if we don't
-@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
- struct segment **segmentp; /* Address of current segment. */
- struct predicate *our_pred;
-
-- our_pred = insert_primary_withpred (entry, func);
-+ our_pred = insert_primary_withpred (entry, func, format_const);
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->args.printf_vec = *vec;
- our_pred->need_type = false;
-@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
- if ((argv == NULL) || (argv[*arg_ptr] == NULL))
- return false;
-
-- our_pred = insert_primary_withpred (entry, func);
-+ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
- our_pred->side_effects = our_pred->no_default_print = true;
- our_pred->need_type = our_pred->need_stat = false;
-
-@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
- return false;
-
-- our_pred = insert_primary (entry);
-+ our_pred = insert_primary (entry, orig_timearg);
- our_pred->args.reftime = tval;
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
-
-@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
-
- if (get_num (numstr, &num, &c_type))
- {
-- struct predicate *our_pred = insert_primary (entry);
-+ struct predicate *our_pred = insert_primary (entry, numstr);
- our_pred->args.numinfo.kind = c_type;
- our_pred->args.numinfo.l_val = num;
-
-diff --git a/find/tree.c b/find/tree.c
-index 7420c60..60a0601 100644
---- a/find/tree.c
-+++ b/find/tree.c
-@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
- /* Prints a predicate */
- void print_predicate(FILE *fp, const struct predicate *p)
- {
-- fprintf (fp, "%s%s%s",
-- p->p_name,
-- p->arg_text ? " " : "",
-- p->arg_text ? p->arg_text : "");
-+ if (p->arg_text)
-+ {
-+ fprintf (fp, "%s %s", p->p_name, p->arg_text);
-+ }
-+ else
-+ {
-+ fprintf (fp, "%s", p->p_name);
-+ }
- }
-
-
-@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
- new_parent->need_stat = false;
- new_parent->need_type = false;
- new_parent->p_cost = NeedsNothing;
--
-+ new_parent->arg_text = NULL;
-+
- switch (high_prec)
- {
- case COMMA_PREC:
-@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
- p->visits = p->successes = 0;
- }
-
-+
-+struct predicate *
-+get_new_pred_noarg (const struct parser_table *entry)
-+{
-+ struct predicate *p = get_new_pred(entry);
-+ if (p)
-+ {
-+ p->arg_text = NULL;
-+ }
-+ return p;
-+}
-+
-
- /* Return a pointer to a new predicate structure, which has been
- linked in as the last one in the predicates list.
-@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
- last_pred->no_default_print = false;
- last_pred->need_stat = true;
- last_pred->need_type = true;
-+ last_pred->p_cost = NeedsUnknown;
-+ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
- last_pred->args.str = NULL;
- last_pred->pred_next = NULL;
- last_pred->pred_left = NULL;
-@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
- predicate is an operator. If it isn't, the AND operator is inserted. */
-
- struct predicate *
--get_new_pred_chk_op (const struct parser_table *entry)
-+get_new_pred_chk_op (const struct parser_table *entry,
-+ const char *arg)
- {
- struct predicate *new_pred;
- static const struct parser_table *entry_and = NULL;
-@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
- case PRIMARY_TYPE:
- case CLOSE_PAREN:
- /* We need to interpose the and operator. */
-- new_pred = get_new_pred (entry_and);
-+ new_pred = get_new_pred_noarg (entry_and);
- new_pred->pred_func = pred_and;
- new_pred->p_name = "-a";
- new_pred->p_type = BI_OP;
- new_pred->p_prec = AND_PREC;
- new_pred->need_stat = false;
- new_pred->need_type = false;
-+ new_pred->arg_text = NULL;
- new_pred->args.str = NULL;
- new_pred->side_effects = false;
- new_pred->no_default_print = false;
-@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
- }
-
- new_pred = get_new_pred (entry);
-+ new_pred->arg_text = arg;
- new_pred->parser_entry = entry;
- return new_pred;
- }
-diff --git a/find/util.c b/find/util.c
-index a06eada..cc9a3eb 100644
---- a/find/util.c
-+++ b/find/util.c
-@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
- operator. */
-
- struct predicate *
--insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
-+insert_primary_withpred (const struct parser_table *entry,
-+ PRED_FUNC pred_func,
-+ const char *arg)
- {
- struct predicate *new_pred;
-
-- new_pred = get_new_pred_chk_op (entry);
-+ new_pred = get_new_pred_chk_op (entry, arg);
- new_pred->pred_func = pred_func;
- new_pred->p_name = entry->parser_name;
- new_pred->args.str = NULL;
-@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
- either not there at all (we are the very first node) or is an
- operator. */
- struct predicate *
--insert_primary (const struct parser_table *entry)
-+insert_primary (const struct parser_table *entry, const char *arg)
- {
- assert (entry->pred_func != NULL);
-- return insert_primary_withpred(entry, entry->pred_func);
-+ return insert_primary_withpred(entry, entry->pred_func, arg);
-+}
-+
-+struct predicate *
-+insert_primary_noarg (const struct parser_table *entry)
-+{
-+ return insert_primary(entry, NULL);
- }
-
-
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
deleted file mode 100644
index c0ff3ff1c0..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-Upstream-Status: Backport
-
-commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
-Author: James Youngman <jay@gnu.org>
-Date: Sat Feb 20 13:11:45 2010 +0000
-
- Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
-
- * find/parser.c (parse_fls): If the argument is invalid, reverse
- the change that collect_arg() made to *arg_ptr (that is, don't
- consume the argument).
- (parse_fprint0): Likewise.
- (parse_gid): Likewise.
- (parse_group): Likewise.
- (parse_inum): Likewise.
- (parse_links): Likewise.
- (do_parse_xmin): Likewise.
- (parse_name): Likewise.
- (parse_printf): Likewise.
- (parse_uid): Likewise.
- (parse_used): Likewise.
- (parse_time): Likewise.
-
- Signed-off-by: James Youngman <jay@gnu.org>
-
-diff --git a/ChangeLog b/ChangeLog
-index d0ce1fe..13539a4 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,0 +1,19 @@
-+2010-02-20 James Youngman <jay@gnu.org>
-+
-+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
-+ `-ctime'".
-+ * find/parser.c (parse_fls): If the argument is invalid, reverse
-+ the change that collect_arg() made to *arg_ptr (that is, don't
-+ consume the argument).
-+ (parse_fprint0): Likewise.
-+ (parse_gid): Likewise.
-+ (parse_group): Likewise.
-+ (parse_inum): Likewise.
-+ (parse_links): Likewise.
-+ (do_parse_xmin): Likewise.
-+ (parse_name): Likewise.
-+ (parse_printf): Likewise.
-+ (parse_uid): Likewise.
-+ (parse_used): Likewise.
-+ (parse_time): Likewise.
-+
-diff --git a/NEWS b/NEWS
-index 5394311..4e910df 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
-
- ** Bug Fixes
-
-+#28824: Corrected error message for "-ctime x".
-+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
-+ -uid, -used, -atime, -mtime, -ctime.
- #26537: find -prune now makes sure it has valid stat() information.
-
-diff --git a/find/parser.c b/find/parser.c
-index 2e6b989..08758ee 100644
---- a/find/parser.c
-+++ b/find/parser.c
-@@ -886,8 +886,14 @@ static boolean
- parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *filename;
-- return collect_arg(argv, arg_ptr, &filename)
-- && insert_fls(entry, filename);
-+ if (collect_arg(argv, arg_ptr, &filename))
-+ {
-+ if (insert_fls(entry, filename))
-+ return true;
-+ else
-+ --*arg_ptr; /* don't consume the invalid arg. */
-+ }
-+ return false;
- }
-
- static boolean
-@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *filename;
- if (collect_arg(argv, arg_ptr, &filename))
-- return insert_fprint(entry, filename);
-- else
-- return false;
-+ {
-+ if (insert_fprint(entry, filename))
-+ return true;
-+ else
-+ --*arg_ptr; /* don't consume the bad arg. */
-+ }
-+ return false;
- }
-
- static float estimate_fstype_success_rate(const char *fsname)
-@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1049,6 +1060,7 @@ static boolean
- parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *groupname;
-+ const int saved_argc = *arg_ptr;
-
- if (collect_arg(argv, arg_ptr, &groupname))
- {
-@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- "because it has the unexpected suffix %s"),
- quotearg_n_style(0, options.err_quoting_style, groupname),
- quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- error(1, 0, _("argument to -group is empty, but should be a group name"));
- }
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
- error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
- predicate,
- quotearg_n_style(0, options.err_quoting_style, depthstr));
-+ /* NOTREACHED */
- return false;
- }
- /* missing argument */
-@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
- enum xval xv)
- {
- const char *minutes;
-+ const int saved_argc = *arg_ptr;
-
- if (collect_arg(argv, arg_ptr, &minutes))
- {
-@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
- our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
- return true;
- }
-+ else
-+ {
-+ /* Don't consume the invalid argument. */
-+ *arg_ptr = saved_argc;
-+ }
- }
- return false;
- }
-@@ -1427,6 +1450,8 @@ static boolean
- parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *name;
-+ const int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &name))
- {
- fnmatch_sanitycheck();
-@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
- our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
- return true;
- }
-+ else
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
-+ }
- }
- return false;
- }
-@@ -1954,11 +1983,21 @@ static boolean
- parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *format;
-+ const int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &format))
- {
- struct format_val fmt;
- open_stdout(&fmt);
-- return insert_fprintf (&fmt, entry, pred_fprintf, format);
-+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
-+ {
-+ return true;
-+ }
-+ else
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
-+ return false;
-+ }
- }
- return false;
- }
-@@ -1967,15 +2006,21 @@ static boolean
- parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
- {
- const char *format, *filename;
-+ int saved_argc = *arg_ptr;
-+
- if (collect_arg(argv, arg_ptr, &filename))
- {
- if (collect_arg(argv, arg_ptr, &format))
- {
- struct format_val fmt;
- open_output_file (filename, &fmt);
-- return insert_fprintf (&fmt, entry, pred_fprintf, format);
-+ saved_argc = *arg_ptr;
-+
-+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
-+ return true;
- }
- }
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
- return false;
- }
-
-@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
- }
- else
- {
-+ --*arg_ptr; /* don't consume the invalid argument. */
- return false;
- }
- }
-@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
- else
- {
- error(1, 0, _("Invalid argument %s to -used"), offset_str);
-+ /*NOTREACHED*/
- return false;
- }
- }
-@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
- if (strlen(typeletter) != 1u)
- {
- error(1, 0, _("Arguments to -type should contain only one letter"));
-+ /*NOTREACHED*/
- return false;
- }
-
-@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
- #endif
- default: /* None of the above ... nuke 'em. */
- error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
-+ /*NOTREACHED*/
- return false;
- }
- our_pred = insert_primary_withpred (entry, which_pred, typeletter);
-@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- const char *errmsg = "arithmetic overflow while converting %s "
- "days to a number of seconds";
- struct timespec origin;
-+ const int saved_argc = *arg_ptr;
-
- if (!collect_arg(argv, arg_ptr, &timearg))
- return false;
-@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
- timearg = orig_timearg;
-
- if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
-- return false;
-+ {
-+ *arg_ptr = saved_argc; /* don't consume the invalid argument */
-+ return false;
-+ }
-
- our_pred = insert_primary (entry, orig_timearg);
- our_pred->args.reftime = tval;
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
deleted file mode 100644
index 940aaf6ff5..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Upstream-Status: Backport
-
-commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
-Author: James Youngman <jay@gnu.org>
-Date: Sat Feb 20 19:53:13 2010 +0000
-
- Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
-
- * doc/find.texi (Problems with -exec and filenames): Add missing
- $0 argument in example for sh -c 'something "$@" sh ...
- * NEWS: Mention this change.
-
- Signed-off-by: James Youngman <jay@gnu.org>
-
-diff --git a/ChangeLog b/ChangeLog
-index 13539a4..e94ba96 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,5 +1,10 @@
- 2010-02-20 James Youngman <jay@gnu.org>
-
-+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
-+ * doc/find.texi (Problems with -exec and filenames): Add missing
-+ $0 argument in example for sh -c 'something "$@" sh ...
-+ * NEWS: Mention this change.
-+
- Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
- `-ctime'".
- * find/parser.c (parse_fls): If the argument is invalid, reverse
-diff --git a/NEWS b/NEWS
-index 4e910df..4c97be9 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
-
- ** Bug Fixes
-
-+#28872: Mistake in "#safer" example in "Problems with -exec and
-+ filenames" section of the Texinfo manual.
-+
- #28824: Corrected error message for "-ctime x".
- Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
- -uid, -used, -atime, -mtime, -ctime.
-diff --git a/doc/find.texi b/doc/find.texi
-index 2e5958d..391ffa0 100644
---- a/doc/find.texi
-+++ b/doc/find.texi
-@@ -4830,8 +4830,8 @@ problem:
-
- @example
- # safer
--find -exec sh -c 'something "$@@"' @{@} \;
--find -execdir sh -c 'something "$@@"' @{@}\;
-+find -exec sh -c 'something "$@@"' sh @{@} \;
-+find -execdir sh -c 'something "$@@"' sh @{@}\;
- @end example
-
- This approach is not guaranteed to avoid every problem, but it is much
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
deleted file mode 100644
index a48cdc221c..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Fix documentation build errors
-
-This fixes the following errors building the findutils documentation:
-find-maint.texi:45: misplaced {
-find-maint.texi:45: misplaced }
-find-maint.texi:236: warning: node next `Make the Compiler Find the Bugs' in menu `The File System Is Being Modified' and in sectioning `Factor Out Repeated Code' differ
-find-maint.texi:335: warning: node `Debugging is For Users Too' is next for `Factor Out Repeated Code' in sectioning but not in menu
-find-maint.texi:335: warning: node prev `Factor Out Repeated Code' in menu `Debugging is For Users Too' and in sectioning `Make the Compiler Find the Bugs' differ
-find-maint.texi:378: warning: node next `Debugging is For Users Too' in menu `Factor Out Repeated Code' and in sectioning `Don't Trust the File System Contents' differ
-find-maint.texi:378: warning: node prev `Debugging is For Users Too' in menu `Don't Trust the File System Contents' and in sectioning `Factor Out Repeated Code' differ
-find-maint.texi:392: warning: node next `Don't Trust the File System Contents' in menu `Debugging is For Users Too' and in sectioning `The File System Is Being Modified' differ
-find-maint.texi:392: warning: node prev `Don't Trust the File System Contents' in menu `The File System Is Being Modified' and in sectioning `Debugging is For Users Too' differ
-find-maint.texi:417: warning: node `Don't Trust the File System Contents' is next for `The File System Is Being Modified' in menu but not in sectioning
-find-maint.texi:417: warning: node prev `The File System Is Being Modified' in menu `Make the Compiler Find the Bugs' and in sectioning `Don't Trust the File System Contents' differ
-find.texi:53: misplaced {
-find.texi:53: misplaced }
-find.texi:1862: warning: node `Formatting Flags' is next for `Time Directives' in menu but not in sectioning
-find.texi:1975: warning: node `Formatting Flags' is next for `Combined Time Formats' in sectioning but not in menu
-find.texi:2004: warning: node prev `Formatting Flags' in menu `Time Directives' and in sectioning `Combined Time Formats' differ
-find.texi:2004: warning: node up `Formatting Flags' in menu `Format Directives' and in sectioning `Time Formats' differ
-find.texi:1893: node `Time Formats' lacks menu item for `Formatting Flags' despite being its Up target
-
-Upstream-Status: Backport
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
---- a/doc/find-maint.texi
-+++ b/doc/find-maint.texi
-@@ -42,7 +42,7 @@ Free Documentation License''.
-
- @page
- @vskip 0pt plus 1filll
--@insertcopying{}
-+@insertcopying
- @end titlepage
-
- @contents
-@@ -227,10 +227,10 @@ circumstances.
-
- @menu
- * Make the Compiler Find the Bugs::
-+* Factor Out Repeated Code::
- * The File System Is Being Modified::
- * Don't Trust the File System Contents::
- * Debugging is For Users Too::
--* Factor Out Repeated Code::
- @end menu
-
- @node Make the Compiler Find the Bugs
---- a/doc/find.texi
-+++ b/doc/find.texi
-@@ -50,7 +50,7 @@ Texts. A copy of the license is included in the section entitled
-
- @page
- @vskip 0pt plus 1filll
--@insertcopying{}
-+@insertcopying
- @end titlepage
-
- @contents
-@@ -1665,6 +1665,7 @@ no output is ever sent to it.
- * Escapes::
- * Format Directives::
- * Time Formats::
-+* Formatting Flags::
- @end menu
-
- @node Escapes
-@@ -1733,7 +1734,6 @@ from the novel you are reading.
- * Size Directives::
- * Location Directives::
- * Time Directives::
--* Formatting Flags::
- @end menu
-
- @node Name Directives
-@@ -2002,7 +2002,7 @@ seconds field includes a fractional part.
- @end table
-
- @node Formatting Flags
--@subsubsection Formatting Flags
-+@subsection Formatting Flags
-
- The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
- and @samp{+} flags, but the other directives do not, even if they
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
deleted file mode 100644
index d4a7e95728..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes following issue with automake 1.12
-
-| configure.ac:80: error: automatic de-ANSI-fication support has been removed
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/03
-
-Index: findutils-4.4.2/configure.ac
-===================================================================
---- findutils-4.4.2.orig/configure.ac
-+++ findutils-4.4.2/configure.ac
-@@ -77,8 +77,6 @@ AC_PROG_CPP
- dnl for gnulib
- gl_EARLY
-
--AM_C_PROTOTYPES
--
- AC_PROG_INSTALL
- AC_PROG_RANLIB
- dnl AC_PROG_LIBTOOL
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
deleted file mode 100644
index b78cc7539c..0000000000
--- a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Pending
-
-Author: H.J. Lu <hjl.tools@gmail.com>
-
-Work around gnulib time_t assumption in findutils for x32
-
-time_t is 64bit and long int is 32bit on x32. But gnulib used in
-findutils assumes time_t values fit into long int. Such assumption is
-invalid for x32 and should be removed.
-
-This patch is a workaround to compile gnulib for x32.
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
-
-
-Index: findutils-4.4.2/gnulib/lib/getdate.y
-===================================================================
---- findutils-4.4.2.orig/gnulib/lib/getdate.y
-+++ findutils-4.4.2/gnulib/lib/getdate.y
-@@ -114,7 +114,6 @@
- wraps around, but there's no portable way to check for that at
- compile-time. */
- verify (TYPE_IS_INTEGER (time_t));
--verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
-
- /* An integer value, and the number of digits in its textual
- representation. */
-Index: findutils-4.4.2/gnulib/lib/mktime.c
-===================================================================
---- findutils-4.4.2.orig/gnulib/lib/mktime.c
-+++ findutils-4.4.2/gnulib/lib/mktime.c
-@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
- {
- verify (C99_integer_division, -1 / 2 == 0);
- verify (long_int_year_and_yday_are_wide_enough,
-- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
-+ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
-
- /* Compute intervening leap days correctly even if year is negative.
- Take care to avoid integer overflow here. */
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
index 4f4068a091..37c84cc59b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -7,7 +7,7 @@ BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
SECTION = "console/utils"
-SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
+SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz"
inherit autotools gettext texinfo update-alternatives
diff --git a/meta/recipes-extended/findutils/findutils_4.4.2.bb b/meta/recipes-extended/findutils/findutils_4.4.2.bb
deleted file mode 100644
index faf2ebe462..0000000000
--- a/meta/recipes-extended/findutils/findutils_4.4.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require findutils.inc
-
-# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-PR = "r6"
-
-SRC_URI += "file://01-27017.patch \
- file://02-28824.patch \
- file://03-28872.patch \
- file://findutils_fix_for_x32.patch \
- file://findutils_fix_for_automake-1.12.patch \
- file://findutils_fix_doc.patch \
- "
-
-SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
-SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"
-
-DEPENDS = "bison-native"
-
-# http://savannah.gnu.org/bugs/?27299
-CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
-
-EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/findutils/findutils_4.5.14.bb b/meta/recipes-extended/findutils/findutils_4.5.14.bb
new file mode 100644
index 0000000000..9253637fc1
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.5.14.bb
@@ -0,0 +1,15 @@
+require findutils.inc
+
+# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
+SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
+
+# http://savannah.gnu.org/bugs/?27299
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+
+EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
index 7d214eafbe..d23f0bf6d7 100644
--- a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
+++ b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest
@@ -3,8 +3,8 @@
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; \
+ make -f Maketests $i >$i.tmp 2>&1; \
grep -q "Error" $i.tmp; \
- if [ $? == 0 ]; then echo "FAIL: $i"; \
+ if [ $? -eq 0 ]; then echo "FAIL: $i"; \
else echo "PASS: $i"; rm -f $i.tmp; fi; \
done
diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
new file mode 100644
index 0000000000..a1c9368cc9
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it
+
+Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
+
+This addresses the cryto dependency seen during build.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Rebase the patch to ghostscript-9.15
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cups/libs/cups/http-private.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h
+index 99a85c3..a674852 100644
+--- a/cups/libs/cups/http-private.h
++++ b/cups/libs/cups/http-private.h
+@@ -80,7 +80,6 @@ typedef int socklen_t;
+ # elif defined HAVE_GNUTLS
+ # include <gnutls/gnutls.h>
+ # include <gnutls/x509.h>
+-# include <gcrypt.h>
+ # elif defined(HAVE_CDSASSL)
+ # include <CoreFoundation/CoreFoundation.h>
+ # include <Security/Security.h>
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
index 601f5f127e..ae9da6e08e 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
@@ -12,6 +12,9 @@ RP: Extended || true to all CP_ operations, they all can race e.g.:
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Rebase the patch to ghostscript-9.15
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
diff --git a/base/expat.mak b/base/expat.mak
index 4ee9c8c..2e16a9d 100644
--- a/base/expat.mak
@@ -39,10 +42,10 @@ index 16f2b95..409f75b 100644
# Define the shared version.
$(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE)
diff --git a/base/gs.mak b/base/gs.mak
-index 7d75fb0..2a9596c 100644
+index 3fc67df..1fc3e26 100644
--- a/base/gs.mak
+++ b/base/gs.mak
-@@ -433,7 +433,7 @@ $(gconfxx_h) : $(ld_tr)
+@@ -434,7 +434,7 @@ $(gconfxx_h) : $(ld_tr)
$(gconfig_h) : $(gconfxx_h)
$(RM_) $(gconfig_h)
@@ -78,7 +81,7 @@ index bb74630..44617a0 100644
# dev file for shared (separately built) jbig2dec library
$(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE)
diff --git a/base/jpeg.mak b/base/jpeg.mak
-index 5310a20..43cee63 100644
+index e300a04..9fdad5a 100644
--- a/base/jpeg.mak
+++ b/base/jpeg.mak
@@ -96,7 +96,7 @@ jconfig_h=$(GLGEN)jconfig.h
@@ -148,7 +151,7 @@ index 5310a20..43cee63 100644
# In order to avoid having to keep the dependency lists for the IJG code
# accurate, we simply make all of them depend on the only files that
-@@ -174,40 +174,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_)
+@@ -181,40 +181,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_)
$(SETMOD) $(JGEN)jpegc0 $(jpegc0_)
$(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP)
@@ -196,7 +199,7 @@ index 5310a20..43cee63 100644
jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ)
-@@ -223,90 +223,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege
+@@ -230,90 +230,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege
$(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3)
$(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP)
@@ -304,7 +307,7 @@ index 5310a20..43cee63 100644
jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ)
-@@ -322,76 +322,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd
+@@ -329,76 +329,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd
$(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3)
$(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP)
@@ -436,10 +439,10 @@ index 52f750c..33a9c16 100644
# dev file for shared (separately built) lcms library
$(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE)
diff --git a/base/lcups.mak b/base/lcups.mak
-index 0bfb3ac..fcdb170 100644
+index 7504c44..7b9b979 100644
--- a/base/lcups.mak
+++ b/base/lcups.mak
-@@ -114,7 +114,7 @@ libcups.config-clean :
+@@ -116,7 +116,7 @@ libcups.config-clean :
# instantiate the requested build option (shared or compiled in)
$(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev
@@ -448,7 +451,7 @@ index 0bfb3ac..fcdb170 100644
# Define the shared version.
$(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE)
-@@ -131,7 +131,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \
+@@ -133,7 +133,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \
# for simplicity we have every source file depend on all headers
$(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h
@@ -457,7 +460,7 @@ index 0bfb3ac..fcdb170 100644
$(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h
$(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c
-@@ -218,7 +218,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS)
+@@ -220,7 +220,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS)
$(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c
$(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS)
@@ -466,7 +469,7 @@ index 0bfb3ac..fcdb170 100644
$(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c
$(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS)
-@@ -255,7 +255,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS)
+@@ -257,7 +257,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS)
$(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c
$(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS)
@@ -475,18 +478,18 @@ index 0bfb3ac..fcdb170 100644
$(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c
$(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS)
-@@ -271,5 +271,5 @@ $(LIBCUPSOBJ)usersys.$(OBJ) : $(LIBCUPSSRC)usersys.c $(LIBSCUPSHEADERS)
- $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c
+@@ -279,5 +279,5 @@ $(LIBCUPSOBJ)thread.$(OBJ) : $(LIBCUPSSRC)thread.c $(LIBSCUPSHEADERS)
+ $(LCUPS_CC) $(LCUPSO_)thread.$(OBJ) $(C_) $(LIBCUPSSRC)thread.c
$(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS)
- $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c
+ $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true
$(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c
diff --git a/base/lcupsi.mak b/base/lcupsi.mak
-index ea4047f..0102d93 100644
+index da47da5..fa7d74c 100644
--- a/base/lcupsi.mak
+++ b/base/lcupsi.mak
-@@ -73,7 +73,7 @@ libcupsi.config-clean :
+@@ -59,7 +59,7 @@ libcupsi.config-clean :
# instantiate the requested build option (shared or compiled in)
$(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev
@@ -509,10 +512,10 @@ index 3f50892..97c76a0 100644
# external link .dev
$(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE)
diff --git a/base/lib.mak b/base/lib.mak
-index 3ad7db3..87b4f01 100644
+index 90c9249..fb11aba 100644
--- a/base/lib.mak
+++ b/base/lib.mak
-@@ -343,7 +343,7 @@ md5_=$(GLOBJ)md5.$(OBJ)
+@@ -350,7 +350,7 @@ md5_=$(GLOBJ)md5.$(OBJ)
$(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE)
$(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22
$(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h
@@ -521,7 +524,7 @@ index 3ad7db3..87b4f01 100644
$(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c
$(RM_) $(GLGEN)md5.c $(GLGEN)md5.h
-@@ -624,19 +624,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\
+@@ -631,19 +631,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\
$(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\
$(MAKEDDIRS)
$(RM_) $(GLGEN)gconfig.c
@@ -544,7 +547,7 @@ index 3ad7db3..87b4f01 100644
$(GLCCAUX) $(C_) $(AUXO_)gscdefs.$(OBJ) $(AUX)gscdefs.c
$(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\
-@@ -1527,7 +1527,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\
+@@ -1535,7 +1535,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\
$(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c
$(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ)
@@ -553,7 +556,7 @@ index 3ad7db3..87b4f01 100644
# sdcparam is used by the filter operator and the PS/PDF writer.
# It is not included automatically in sdcte/d.
-@@ -1555,7 +1555,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\
+@@ -1563,7 +1563,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\
$(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c
$(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -562,7 +565,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
-@@ -1571,7 +1571,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
+@@ -1579,7 +1579,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
$(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c
$(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -571,7 +574,7 @@ index 3ad7db3..87b4f01 100644
# sdeparam is used by the filter operator and the PS/PDF writer.
# It is not included automatically in sdcte.
-@@ -1603,7 +1603,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\
+@@ -1611,7 +1611,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\
$(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c
$(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -580,7 +583,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
-@@ -1620,7 +1620,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
+@@ -1628,7 +1628,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
$(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
@@ -589,7 +592,7 @@ index 3ad7db3..87b4f01 100644
# sddparam is used by the filter operator.
# It is not included automatically in sdctd.
-@@ -1643,7 +1643,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_)
+@@ -1651,7 +1651,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_)
# We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory.
$(GLD)slzwe.dev : $(GLD)lzwe.dev
@@ -598,7 +601,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\
$(slzwx_h) $(strimpl_h) $(MAKEDIRS)
-@@ -1659,7 +1659,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_)
+@@ -1667,7 +1667,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_)
# We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory.
$(GLD)slzwd.dev : $(GLD)lzwd.dev
@@ -607,7 +610,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\
$(slzwx_h) $(strimpl_h) $(MAKEDIRS)
-@@ -1709,7 +1709,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\
+@@ -1717,7 +1717,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\
# ---------------- JBIG2 compression filter ---------------- #
$(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev
@@ -616,7 +619,7 @@ index 3ad7db3..87b4f01 100644
# jbig2dec version
sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ)
-@@ -1745,7 +1745,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \
+@@ -1753,7 +1753,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \
# ---------------- JPEG 2000 compression filter ---------------- #
$(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev
@@ -625,7 +628,7 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
$(memory__h) $(gsmalloc_h) \
-@@ -1874,7 +1874,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\
+@@ -1882,7 +1882,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\
$(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c
$(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -634,7 +637,7 @@ index 3ad7db3..87b4f01 100644
szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ)
$(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_)
-@@ -1890,7 +1890,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\
+@@ -1898,7 +1898,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\
$(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c
$(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -643,7 +646,7 @@ index 3ad7db3..87b4f01 100644
szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ)
$(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_)
-@@ -1906,7 +1906,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\
+@@ -1914,7 +1914,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\
$(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c
$(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -652,7 +655,7 @@ index 3ad7db3..87b4f01 100644
# ---------------- Page devices ---------------- #
# We include this here, rather than in devs.mak, because it is more like
-@@ -2796,7 +2796,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\
+@@ -2804,7 +2804,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\
$(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c
$(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(gp_h)
@@ -661,16 +664,16 @@ index 3ad7db3..87b4f01 100644
$(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
-@@ -2808,7 +2808,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
- $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c
+@@ -2817,7 +2817,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
- $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h)
+ $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h) \
+ $(gxsync_h)
- $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ)
+ $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true
# Note that gsicc_create requires compile with lcms to obtain icc34.h
# header file that is used for creating ICC structures from PS objects.
-@@ -2828,7 +2828,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\
+@@ -2837,7 +2837,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\
$(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
$(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS)
@@ -679,7 +682,7 @@ index 3ad7db3..87b4f01 100644
#include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */
-@@ -3132,7 +3132,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS)
+@@ -3141,7 +3141,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS)
$(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS)
$(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS)
@@ -688,7 +691,7 @@ index 3ad7db3..87b4f01 100644
# the following module is only included if the romfs.dev FEATURE is enabled
$(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
-@@ -3148,7 +3148,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
+@@ -3157,7 +3157,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
$(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c
$(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
@@ -711,7 +714,7 @@ index ca1b7cc..ad6446d 100644
# external link .dev
$(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE)
diff --git a/base/macos-mcp.mak b/base/macos-mcp.mak
-index 4ded7f3..3599ed9 100644
+index 38a2937..2ab7cae 100644
--- a/base/macos-mcp.mak
+++ b/base/macos-mcp.mak
@@ -383,11 +383,11 @@ CWPROJ_XML=./ghostscript.mcp.xml
@@ -731,7 +734,7 @@ index 4ded7f3..3599ed9 100644
$(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
diff --git a/base/openjpeg.mak b/base/openjpeg.mak
-index 32be240..4a6b429 100644
+index b194709..dac7901 100644
--- a/base/openjpeg.mak
+++ b/base/openjpeg.mak
@@ -99,7 +99,7 @@ open_jpeg_HDRS = \
@@ -744,7 +747,7 @@ index 32be240..4a6b429 100644
# external link .dev
$(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE)
diff --git a/base/openvms.mak b/base/openvms.mak
-index e5ae40b..286ee84 100644
+index 1ea06fe..84378a4 100644
--- a/base/openvms.mak
+++ b/base/openvms.mak
@@ -365,7 +365,7 @@ SH=
@@ -757,7 +760,7 @@ index e5ae40b..286ee84 100644
# Define the command for deleting (a) file(s) (including wild cards)
diff --git a/base/png.mak b/base/png.mak
-index f01c426..8a89884 100644
+index 1725ddb..0d54b80 100644
--- a/base/png.mak
+++ b/base/png.mak
@@ -79,7 +79,7 @@ png.config-clean :
@@ -772,7 +775,7 @@ index f01c426..8a89884 100644
@@ -134,7 +134,7 @@ $(PNGOBJ)pngget.$(OBJ) : $(PNGSRC)pngget.c $(PDEP)
# Define the version of libpng.dev that we are actually using.
- $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev
+ $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(MAKEDIRS)
- $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev
+ $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true
@@ -841,7 +844,7 @@ index 6aa3599..70a61f8 100644
RMN_=rm -f
diff --git a/base/zlib.mak b/base/zlib.mak
-index 6c50605..7fb8c9b 100644
+index 78d398a..3d48145 100644
--- a/base/zlib.mak
+++ b/base/zlib.mak
@@ -83,7 +83,7 @@ $(ZOBJ)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP)
@@ -865,17 +868,17 @@ index 6c50605..7fb8c9b 100644
@@ -127,7 +127,7 @@ $(ZOBJ)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP)
# Decoding (decompression) code.
- $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev
+ $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(MAKEDIRS)
- $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev
+ $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true
$(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
$(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME)
diff --git a/devices/devs.mak b/devices/devs.mak
-index bc22594..4bd0a11 100644
+index 0a668d4..a19082e 100644
--- a/devices/devs.mak
+++ b/devices/devs.mak
-@@ -1555,7 +1555,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev
+@@ -1547,7 +1547,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev
png_i_=-include $(PNGGENDIR)$(D)libpng
$(DEVOBJ)gdevpng.$(OBJ) : $(DEVSRC)gdevpng.c\
@@ -885,7 +888,7 @@ index bc22594..4bd0a11 100644
$(DD)pngmono.dev : $(DEVS_MAK) $(libpng_dev) $(png_) $(GLD)page.dev $(GDEV)
diff --git a/psi/int.mak b/psi/int.mak
-index 62cba0e..a1e963a 100644
+index 7d36e66..71b88f5 100644
--- a/psi/int.mak
+++ b/psi/int.mak
@@ -274,7 +274,7 @@ $(PSOBJ)iconfig.$(OBJ) : $(gconfig_h) $(PSSRC)iconf.c $(stdio__h)\
@@ -925,5 +928,5 @@ index 62cba0e..a1e963a 100644
fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
--
-1.8.1.2
+1.9.1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
new file mode 100644
index 0000000000..a05de29def
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
new file mode 100644
index 0000000000..0d0a16bfa3
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb b/meta/recipes-extended/ghostscript/ghostscript_9.15.bb
index e14e656b93..850ed81705 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.15.bb
@@ -6,8 +6,6 @@ documents in an X11 environment. \
Furthermore, it can render PostScript and PDF files as graphics to be printed \
on non-PostScript printers. Supported printers include common \
dot-matrix, inkjet and laser models. \
-\
-Package gsfonts contains a set of standard fonts for Ghostscript. \
"
HOMEPAGE = "http://www.ghostscript.com"
SECTION = "console/utils"
@@ -25,6 +23,7 @@ SRC_URI = "${SRC_URI_BASE} \
file://ghostscript-9.02-genarch.patch \
file://objarch.h \
file://ghostscript-9.02-parallel-make.patch \
+ file://cups-no-gcrypt.patch \
"
SRC_URI_class-native = "${SRC_URI_BASE} \
@@ -32,8 +31,10 @@ SRC_URI_class-native = "${SRC_URI_BASE} \
file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
"
-SRC_URI[md5sum] = "586494befb443363338c1b6379f13973"
-SRC_URI[sha256sum] = "ab2ba5ce11c8db396c9acf774a497182d7686d04670976cc3e690ada7db9f0d4"
+SRC_URI[md5sum] = "5a78ab0990ff6ec3a103576bc8777c46"
+SRC_URI[sha256sum] = "27f11e4fe5b89857ae745687281d1e4daf9681edc858a3f7e8e77ef09609777a"
+
+PR = "r1"
EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
--with-fontpath=${datadir}/fonts \
@@ -59,7 +60,7 @@ EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
CFLAGS += "-DHAVE_SYS_TIME_H=1"
BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
-inherit autotools-brokensep
+inherit autotools
do_configure_prepend () {
mkdir -p obj
@@ -81,8 +82,8 @@ do_configure_append () {
do_install_append () {
mkdir -p ${D}${datadir}/ghostscript/${PV}/
- cp -r Resource ${D}${datadir}/ghostscript/${PV}/
- cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
}
do_compile_class-native () {
diff --git a/meta/recipes-extended/grep/grep_2.19.bb b/meta/recipes-extended/grep/grep_2.21.bb
index f38a9a6171..2c378d8442 100644
--- a/meta/recipes-extended/grep/grep_2.19.bb
+++ b/meta/recipes-extended/grep/grep_2.21.bb
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
-SRC_URI[md5sum] = "ac732142227d9fe9567d71301e127979"
-SRC_URI[sha256sum] = "6388295be48cfcaf7665d9cd3914e6625ea000e9414132bfefd45cf1d8eec34d"
+SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
+SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
inherit autotools gettext texinfo
@@ -36,3 +36,4 @@ 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
index 79842baac8..1ce112e43d 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -47,3 +47,5 @@ ALTERNATIVE_${PN} = "grep egrep fgrep"
ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
index 38e1d36b83..7fbce9bc4a 100644
--- a/meta/recipes-extended/groff/groff_1.18.1.4.bb
+++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -32,7 +32,7 @@ do_install_append() {
# 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,#! ${PERLPATH},' ${D}${bindir}/$i
+ sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
fi
done
diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
new file mode 100644
index 0000000000..92863d6c4b
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
@@ -0,0 +1,31 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+Index: gzip-1.3.12/Makefile.am
+===================================================================
+diff -urpN a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800
++++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800
+@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
+ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+ -e 's|[@]bindir@|'\''$(bindir)'\''|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a+x $@-t \
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index eeeafe02c3..b90856e796 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
inherit autotools texinfo
@@ -30,3 +31,5 @@ ALTERNATIVE_${PN} = "gunzip gzip zcat"
ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/hdparm/hdparm_9.43.bb b/meta/recipes-extended/hdparm/hdparm_9.45.bb
index 805f76a6b3..d11412d40c 100644
--- a/meta/recipes-extended/hdparm/hdparm_9.43.bb
+++ b/meta/recipes-extended/hdparm/hdparm_9.45.bb
@@ -18,8 +18,8 @@ RDEPENDS_wiper = "bash gawk stat"
SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
-SRC_URI[md5sum] = "f73233be118d86c779a8463d8b6a3cdb"
-SRC_URI[sha256sum] = "2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a"
+SRC_URI[md5sum] = "1c75d0751a44928b6c4bc81fb16d7fe8"
+SRC_URI[sha256sum] = "23b01caa56a995cf0897877b6aff98ea622a5df255bc2894b1a7693387f38669"
EXTRA_OEMAKE += 'STRIP="echo"'
diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb
new file mode 100644
index 0000000000..d14f658726
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "A development image that builds the kernel and packages that are \
+sensitive to kernel updates and version changes"
+
+# Could also be core-image-basic, but we'll keep this small for now
+require recipes-core/images/core-image-minimal.bb
+
+KERNEL_DEV_UTILS ?= "dropbear"
+KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
+KERNEL_DEV_MODULE ?= ""
+
+CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
+ ${KERNEL_DEV_UTILS} \
+ ${KERNEL_DEV_TOOLS} \
+ "
+
+# We need extra space for things like kernel builds, etc.
+IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
diff --git a/meta/recipes-extended/less/less_458.bb b/meta/recipes-extended/less/less_471.bb
index 3e4518a339..81d354ccf0 100644
--- a/meta/recipes-extended/less/less_458.bb
+++ b/meta/recipes-extended/less/less_471.bb
@@ -26,8 +26,8 @@ DEPENDS = "ncurses"
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "935b38aa2e73c888c210dedf8fd94f49"
-SRC_URI[sha256sum] = "e536c7819ede54b3d487f0ffc4c14b3620bed83734d92a81e89f62346db0fcac"
+SRC_URI[md5sum] = "9a40d29a2d84b41f9f36d7dd90b4f950"
+SRC_URI[sha256sum] = "37f613fa9a526378788d790a92217d59b523574cf7159f6538da8564b3fb27f8"
inherit autotools update-alternatives
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
index 91f4588cc5..9d6447d98a 100644
--- a/meta/recipes-extended/libaio/libaio/00_arches.patch
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -2,10 +2,10 @@ Upstream-Status: Inappropriate [embedded specific]
from openembedded, added by Qing He <qing.he@intel.com>
-Index: libaio-0.3.109/src/syscall-m68k.h
+Index: libaio-0.3.110/src/syscall-m68k.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-m68k.h
++++ libaio-0.3.110/src/syscall-m68k.h
@@ -0,0 +1,78 @@
+#define __NR_io_setup 241
+#define __NR_io_destroy 242
@@ -85,164 +85,27 @@ Index: libaio-0.3.109/src/syscall-m68k.h
+return (type) __res; \
+}
+
-Index: libaio-0.3.109/src/syscall-sparc.h
+Index: libaio-0.3.110/src/syscall.h
===================================================================
---- /dev/null
-+++ libaio-0.3.109/src/syscall-sparc.h
-@@ -0,0 +1,130 @@
-+/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
-+
-+/*
-+ * System calls under the Sparc.
-+ *
-+ * Don't be scared by the ugly clobbers, it is the only way I can
-+ * think of right now to force the arguments into fixed registers
-+ * before the trap into the system call with gcc 'asm' statements.
-+ *
-+ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
-+ *
-+ * SunOS compatibility based upon preliminary work which is:
-+ *
-+ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
-+ */
-+
-+
-+#define __NR_io_setup 268
-+#define __NR_io_destroy 269
-+#define __NR_io_submit 270
-+#define __NR_io_cancel 271
-+#define __NR_io_getevents 272
-+
-+
-+#define io_syscall1(type,fname,sname,type1,arg1) \
-+type fname(type1 arg1) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
-+type fname(type1 arg1,type2 arg2) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res >= 0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
-+type fname(type1 arg1,type2 arg2,type3 arg3) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+register long __o3 __asm__ ("o3") = (long)(arg4); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
-+ type5,arg5) \
-+type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
-+{ \
-+long __res; \
-+register long __g1 __asm__ ("g1") = __NR_##sname; \
-+register long __o0 __asm__ ("o0") = (long)(arg1); \
-+register long __o1 __asm__ ("o1") = (long)(arg2); \
-+register long __o2 __asm__ ("o2") = (long)(arg3); \
-+register long __o3 __asm__ ("o3") = (long)(arg4); \
-+register long __o4 __asm__ ("o4") = (long)(arg5); \
-+__asm__ __volatile__ ("t 0x10\n\t" \
-+ "bcc 1f\n\t" \
-+ "mov %%o0, %0\n\t" \
-+ "sub %%g0, %%o0, %0\n\t" \
-+ "1:\n\t" \
-+ : "=r" (__res), "=&r" (__o0) \
-+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
-+ : "cc"); \
-+if (__res < -255 || __res>=0) \
-+ return (type) __res; \
-+return -1; \
-+}
-+
-Index: libaio-0.3.109/src/syscall.h
-===================================================================
---- libaio-0.3.109.orig/src/syscall.h
-+++ libaio-0.3.109/src/syscall.h
-@@ -24,6 +24,14 @@
- #include "syscall-alpha.h"
- #elif defined(__arm__)
- #include "syscall-arm.h"
+--- 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(__sparc__)
-+#include "syscall-sparc.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
+#elif defined(__mips__)
+#include "syscall-mips.h"
#else
- #error "add syscall-arch.h"
- #endif
-Index: libaio-0.3.109/src/syscall-mips.h
+ #warning "using generic syscall method"
+ #include "syscall-generic.h"
+Index: libaio-0.3.110/src/syscall-mips.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-mips.h
++++ libaio-0.3.110/src/syscall-mips.h
@@ -0,0 +1,223 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
@@ -467,45 +330,10 @@ Index: libaio-0.3.109/src/syscall-mips.h
+
+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
+
-Index: libaio-0.3.109/src/libaio.h
-===================================================================
---- libaio-0.3.109.orig/src/libaio.h
-+++ libaio-0.3.109/src/libaio.h
-@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd {
- #define PADDEDptr(x, y) x; unsigned y
- #define PADDEDul(x, y) unsigned long x; unsigned y
- # endif
-+#elif defined(__m68k__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__sparc__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__hppa__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+#elif defined(__mips__)
-+# if defined (__MIPSEB__) /* big endian, 32 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x, y) unsigned y; x
-+#define PADDEDul(x, y) unsigned y; unsigned long x
-+# elif defined(__MIPSEL__) /* little endian, 32 bits */
-+#define PADDED(x, y) x; unsigned y
-+#define PADDEDptr(x, y) x; unsigned y
-+#define PADDEDul(x, y) unsigned long x; unsigned y
-+# else
-+# error "neither mipseb nor mipsel?"
-+# endif
- #else
- #error endian?
- #endif
-Index: libaio-0.3.109/src/syscall-parisc.h
+Index: libaio-0.3.110/src/syscall-parisc.h
===================================================================
--- /dev/null
-+++ libaio-0.3.109/src/syscall-parisc.h
++++ libaio-0.3.110/src/syscall-parisc.h
@@ -0,0 +1,146 @@
+/*
+ * Linux system call numbers.
@@ -653,10 +481,10 @@ Index: libaio-0.3.109/src/syscall-parisc.h
+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
+}
+
-Index: libaio-0.3.109/src/syscall-arm.h
+Index: libaio-0.3.110/src/syscall-arm.h
===================================================================
---- libaio-0.3.109.orig/src/syscall-arm.h
-+++ libaio-0.3.109/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; \
}
diff --git a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
deleted file mode 100644
index e3d10585de..0000000000
--- a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Submitted
-
-Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-
----
- harness/cases/16.t | 2 ++
- src/libaio.h | 10 ++++++++++
- 2 files changed, 12 insertions(+)
-
---- a/src/libaio.h
-+++ b/src/libaio.h
-@@ -107,6 +107,16 @@
- # else
- # error "neither mipseb nor mipsel?"
- # endif
-+#elif defined(__aarch64__)
-+# if defined (__AARCH64EB__) /* big endian, 64 bits */
-+#define PADDED(x, y) unsigned y; x
-+#define PADDEDptr(x,y) x
-+#define PADDEDul(x, y) unsigned long x
-+# elif defined(__AARCH64EL__) /* little endian, 64 bits */
-+#define PADDED(x, y) x, y
-+#define PADDEDptr(x, y) x
-+#define PADDEDul(x, y) unsigned long x
-+# endif
- #else
- #error endian?
- #endif
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
new file mode 100644
index 0000000000..9d4bb46aaf
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
@@ -0,0 +1,58 @@
+From 62fd97fbc5c53835baa18f210fca593fc8b5c636 Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <jianchuan.wang@windriver.com>
+Date: Wed, 15 Oct 2014 07:04:02 +0800
+Subject: [PATCH] libaio: fix for mips64
+
+Add mips64 support in the libaio.h
+ - add macro PADDED/PADDEDptr/PADDEDul in the mips64 for structure iocb
+ to be matched userland with kernel
+
+Upstream-Status: Backport
+
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+---
+ src/libaio.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+Index: libaio-0.3.110/src/libaio.h
+===================================================================
+--- libaio-0.3.110.orig/src/libaio.h
++++ libaio-0.3.110/src/libaio.h
+@@ -51,7 +51,7 @@ typedef enum io_iocb_cmd {
+
+ /* little endian, 32 bits */
+ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
+- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
++ defined(__sh__) || defined(__bfin__) || (defined(__mips__) && defined(__MIPSEL__)) || \
+ defined(__cris__)
+ #define PADDED(x, y) x; unsigned y
+ #define PADDEDptr(x, y) x; unsigned y
+@@ -59,7 +59,8 @@ typedef enum io_iocb_cmd {
+
+ /* little endian, 64 bits */
+ #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
+- (defined(__aarch64__) && defined(__AARCH64EL__))
++ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
++ (defined(__mips64) && defined(__MIPSEL__))
+ #define PADDED(x, y) x, y
+ #define PADDEDptr(x, y) x
+ #define PADDEDul(x, y) unsigned long x
+@@ -67,7 +68,8 @@ 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(__mips64) && defined(__MIPSEL__))
+ #define PADDED(x, y) unsigned y; x
+ #define PADDEDptr(x,y) x
+ #define PADDEDul(x, y) unsigned long x
+@@ -75,7 +77,7 @@ typedef enum io_iocb_cmd {
+ /* big endian, 32 bits */
+ #elif defined(__PPC__) || defined(__s390__) || \
+ (defined(__arm__) && defined(__ARMEB__)) || \
+- defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
++ defined(__sparc__) || (defined(__mips__) && defined(__MIPSEB__)) || defined(__m68k__) || \
+ defined(__hppa__) || defined(__frv__) || defined(__avr32__)
+ #define PADDED(x, y) unsigned y; x
+ #define PADDEDptr(x, y) unsigned y; x
diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch
deleted file mode 100644
index 4d88ec167b..0000000000
--- a/meta/recipes-extended/libaio/libaio/toolchain.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-8/27/2010 - created by Qing He <qing.he@intel.com>
-
-diff --git a/src/Makefile b/src/Makefile
-index 8d134cc..df8e5b6 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -2,7 +2,6 @@ prefix=/usr
- includedir=$(prefix)/include
- libdir=$(prefix)/lib
-
--ARCH := $(shell uname -m | sed -e s/i.86/i386/)
- CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
- SO_CFLAGS=-shared $(CFLAGS)
- L_CFLAGS=$(CFLAGS)
-@@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
-
- libaio.a: $(libaio_objs)
- rm -f libaio.a
-- ar r libaio.a $^
-- ranlib libaio.a
-+ $(AR) r libaio.a $^
-+ $(RANLIB) libaio.a
-
- $(libname): $(libaio_sobjs) libaio.map
- $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.110.bb
index 978f5f5fb5..9e364149d2 100644
--- a/meta/recipes-extended/libaio/libaio_0.3.109.bb
+++ b/meta/recipes-extended/libaio/libaio_0.3.110.bb
@@ -5,22 +5,20 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-PR = "r2"
-
SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
file://00_arches.patch \
- file://toolchain.patch \
file://destdir.patch \
file://libaio_fix_for_x32.patch \
- file://libaio-generic.patch \
- file://libaio-aarch64.patch \
file://libaio_fix_for_mips_syscalls.patch \
+ file://libaio_fix_for_mips64.patch \
"
-SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756"
-SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d"
+SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
+SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
+# Need libc for stack-protector's __stack_chk_fail_local() bounce function
+LDFLAGS_append_x86 = " -lc"
do_configure () {
sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile
diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
index 2a2d0f90f9..96e2d500ed 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -27,6 +27,7 @@ PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
+PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://libarchive-CVE-2013-0211.patch \
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb
index ff8d345ccb..4df1d08d8f 100644
--- a/meta/recipes-extended/libidn/libidn_0.6.14.bb
+++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -29,4 +29,5 @@ do_configure_prepend() {
do_install_append() {
rm -rf ${D}${libdir}/Libidn.dll
+ rm -rf ${D}${datadir}/emacs
}
diff --git a/meta/recipes-extended/libidn/libidn_1.28.bb b/meta/recipes-extended/libidn/libidn_1.29.bb
index bd079c1fe2..04b534474d 100644
--- a/meta/recipes-extended/libidn/libidn_1.28.bb
+++ b/meta/recipes-extended/libidn/libidn_1.29.bb
@@ -3,13 +3,13 @@ DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specification
HOMEPAGE = "http://www.gnu.org/software/libidn/"
SECTION = "libs"
LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3231f57e8fce0f62f81b03107e788888 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=b35f8839295dd730a55f1a19ec086217 \
file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://lib/idna.h;endline=21;md5=f73089b7f52dd2cb3540e274bd76106d \
- file://src/idn.c;endline=20;md5=d7797e6cc3a7b48e6050fc0d27104595"
+ file://lib/idna.h;endline=21;md5=61a0e126c0c5552290d9bfa57e407dd6 \
+ file://src/idn.c;endline=20;md5=3f55c28bede16bd7b1244be73067d195"
inherit pkgconfig autotools gettext texinfo
@@ -19,8 +19,8 @@ SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
file://dont-depend-on-help2man.patch \
"
-SRC_URI[md5sum] = "43a6f14b16559e10a492acc65c4b0acc"
-SRC_URI[sha256sum] = "dd357a968449abc97c7e5fa088a4a384de57cb36564f9d4e0d898ecc6373abfb"
+SRC_URI[md5sum] = "2b67bb507207af379f9461e1307dc84b"
+SRC_URI[sha256sum] = "fb82747dbbf9b36f703ed27293317d818d7e851d4f5773dedf3efa4db32a7c7c"
# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
# so package command into a separate package
diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
index 88e2d820ee..3edf002497 100644
--- a/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb
+++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
@@ -10,15 +10,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
DEPENDS += "xz-native"
PROVIDES = "virtual/librpc"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2;name=libtirpc \
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
file://libtirpc-0.2.1-fortify.patch \
"
SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch"
-SRC_URI[libtirpc.md5sum] = "847995e8d002cbf1387bda05947be086"
-SRC_URI[libtirpc.sha256sum] = "45c3e21dfc23a5ba501f9dfc6671678316fdfdb8355a1ec404ae2aa2f81943a1"
+SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368"
+SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db"
SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
index 0acc37d94f..0cf5aa2df2 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb
@@ -29,6 +29,9 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
SRC_URI[md5sum] = "f7a88130ee9984b421ad8aa80629750a"
SRC_URI[sha256sum] = "4a71c1f6d8af41ed894b507720c4c17184dc320590013881d5170ca7f15c5bf7"
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+
EXTRA_OECONF = " \
--without-bzip2 \
--without-ldap \
@@ -37,7 +40,6 @@ EXTRA_OECONF = " \
--with-pcre \
--without-webdav-props \
--without-webdav-locks \
- --without-openssl \
--disable-static \
"
@@ -51,7 +53,7 @@ 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 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+ 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
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 43068bdbd7..43ebcffbae 100644
--- a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
+++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -7,19 +7,20 @@ Upstream-Status: Submitted
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- config.c | 8 --------
- 1 files changed, 0 insertions(+), 8 deletions(-)
+ config.c | 9 ---------
+ 1 file changed, 9 deletions(-)
diff --git a/config.c b/config.c
-index a85d1df..24575b3 100644
+index e0eadb7..c23092f 100644
--- a/config.c
+++ b/config.c
-@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+@@ -1515,15 +1515,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
dirName, strerror(errno));
goto error;
}
-
-- if (sb.st_dev != sb2.st_dev) {
+- if (sb.st_dev != sb2.st_dev
+- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY))) {
- message(MESS_ERROR,
- "%s:%d olddir %s and log file %s "
- "are on different devices\n", configFile,
@@ -30,5 +31,4 @@ index a85d1df..24575b3 100644
}
--
-1.7.4.1
-
+1.7.9.5
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
deleted file mode 100644
index b386b85bf6..0000000000
--- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Rotates, compresses, removes and mails system log files"
-SECTION = "console/utils"
-HOMEPAGE = "https://fedorahosted.org/logrotate/"
-LICENSE = "GPLv2"
-
-DEPENDS="coreutils popt"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
-
-SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
- file://act-as-mv-when-rotate.patch \
- file://disable-check-different-filesystems.patch \
- file://update-the-manual.patch \
- "
-
-SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213"
-SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64"
-
-EXTRA_OEMAKE = ""
-
-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/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
new file mode 100644
index 0000000000..00432dede2
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
@@ -0,0 +1,62 @@
+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] = "49846e873dddea15964cd0355b9943ca"
+SRC_URI[sha256sum] = "46a1510ef4a1f4359edd5f361112cfd1523942e85ff28e6cbb0c81bad1829d0f"
+
+PACKAGECONFIG ?= "\
+ ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+ LFS= \
+ OS_NAME='${OS_NAME}' \
+ \
+ 'CC=${CC}' \
+ 'RPM_OPT_FLAGS=${CFLAGS}' \
+ 'EXTRA_LDFLAGS=${LDFLAGS}' \
+ \
+ ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+ ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
+do_install(){
+ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir}
+ mkdir -p ${D}${sysconfdir}/logrotate.d
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${localstatedir}/lib
+ install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+ install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+ touch ${D}${localstatedir}/lib/logrotate.status
+}
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index d265731e04..b4ef98eea7 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
PR = "r2"
# lsb_release needs getopt
-RDEPENDS_${PN} += "util-linux"
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}"
LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
@@ -21,6 +21,8 @@ SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
S = "${WORKDIR}/lsb-release-1.4"
+CLEANBROKEN = "1"
+
do_install(){
oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
@@ -119,3 +121,11 @@ FILES_${PN} += "/lib64 \
${base_libdir}/lsb/* \
${libdir}/sendmail \
"
+
+# The sysroot/${libdir}/sendmail conflicts with esmtp's, and it's a
+# symlink to ${sbindir}/sendmail which is meaningless for sysroot, so
+# remove it.
+SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_sendmail"
+remove_sysroot_sendmail() {
+ rm -r "${SYSROOT_DESTDIR}${libdir}/sendmail"
+}
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.54.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.60.bb
index 29ec7024d2..f67eff7271 100644
--- a/meta/recipes-extended/lsb/lsbinitscripts_9.54.bb
+++ b/meta/recipes-extended/lsb/lsbinitscripts_9.60.bb
@@ -6,12 +6,12 @@ DEPENDS = "popt glib-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.54.tar.bz2/cf63862785d224394053f081865eb853/initscripts-9.54.tar.bz2 \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.60.tar.bz2/5c9cd83e4e04257fef3ffd8e549b7f81/initscripts-9.60.tar.bz2 \
file://functions.patch \
"
-SRC_URI[md5sum] = "cf63862785d224394053f081865eb853"
-SRC_URI[sha256sum] = "686a9aa4d265fc26f134163b2ceb02d421b72c49d97197c285f39087753b0b19"
+SRC_URI[md5sum] = "5c9cd83e4e04257fef3ffd8e549b7f81"
+SRC_URI[sha256sum] = "254508884ceeef22e24f4e8b051bb51958ae8252bd7b02cd2b7bcce3fb453dc2"
inherit update-alternatives
@@ -27,4 +27,5 @@ 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
+ sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${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
index ab79985b1b..b9971a17d1 100644
--- a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2012 Wind River Systems, Inc.
#
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.88.bb
index 5676cd9822..0e49f9217c 100644
--- a/meta/recipes-extended/lsof/lsof_4.87.bb
+++ b/meta/recipes-extended/lsof/lsof_4.88.bb
@@ -6,8 +6,8 @@ LICENSE = "BSD"
SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
-SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
-SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
+SRC_URI[md5sum] = "1b29c10db4aa88afcaeeaabeef6790db"
+SRC_URI[sha256sum] = "fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b"
LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
S = "${WORKDIR}/lsof_${PV}_src"
@@ -15,9 +15,16 @@ 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')
+ 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')
d.setVar('SRC_URI', '${LOCALSRC}')
+ d.setVar('S', s)
bb.build.exec_func('base_do_unpack', d)
d.setVar('SRC_URI', src_uri)
}
@@ -30,8 +37,8 @@ export LSOF_INCLUDE = "${STAGING_INCDIR}"
do_configure () {
export LSOF_AR="${AR} cr"
export LSOF_RANLIB="${RANLIB}"
- if [ "x${EGLIBCVERSION}" != "x" ];then
- LINUX_CLIB=`echo ${EGLIBCVERSION} |sed -e 's,\.,,g'`
+ if [ "x${GLIBCVERSION}" != "x" ];then
+ LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
export LINUX_CLIB
fi
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
new file mode 100644
index 0000000000..064f00ae3d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
@@ -0,0 +1,39 @@
+[PATCH] add knob to control whether numa support should be checked
+
+Upstream-Status: Pending
+
+otherwise the random dependency will be generated
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure.ac | 10 +-
+diff --git a/configure.ac b/configure.ac
+index 9f397e7..1357256 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -142,6 +142,12 @@ else
+ AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
+ fi
+
++AC_ARG_WITH([numa],
++ AC_HELP_STRING([--without-numa],
++ [without the numa support]),
++ [],[with_numa=yes],
++)
++
+ AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
+
+ # END testsuites knobs
+@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
+ LTP_CHECK_SYSCALL_EVENTFD
+ LTP_CHECK_SYSCALL_KEYCTL
+ LTP_CHECK_SYSCALL_MODIFY_LDT
++if test "x$with_numa" = xyes; then
+ LTP_CHECK_SYSCALL_NUMA
++fi
+ LTP_CHECK_SYSCALL_QUOTACTL
+ LTP_CHECK_SYSCALL_SIGNALFD
+ LTP_CHECK_SYSCALL_UNSHARE
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
new file mode 100644
index 0000000000..36ff4c775d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
@@ -0,0 +1,37 @@
+[PATCH] add knob to control whether tirpc support should be checked
+
+Upstream-Status: Pending
+
+tirpc support is broken upstream. in the meantime, allow to disable tirpc.
+
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+---
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- 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
+@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT
+ 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
diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
new file mode 100644
index 0000000000..4836010bdf
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
+[PATCH] make setregid02 work
+
+Upstream-Status: Inappropriate [configuration]
+
+there is no "nobody" group in oe-core, the user "nobody" belongs to
+"nogroup" group, so replace nobody with nogroup to make the test pass
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
+index 8058627..866bee4 100644
+--- a/testcases/kernel/syscalls/setregid/setregid02.c
++++ b/testcases/kernel/syscalls/setregid/setregid02.c
+@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
+
+ static struct passwd *ltpuser;
+
+-static struct group nobody, root, bin;
++static struct group nogroup, root, bin;
+
+ /*
+ * The following structure contains all test data. Each structure in the array
+@@ -57,17 +57,17 @@ struct test_data_t {
+ char *test_msg;
+ } test_data[] = {
+ {
+- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
++ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(-1, root),"}, {
+- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
++ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(-1, bin)"}, {
+- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ "After setregid(root,-1),"}, {
+- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ "After setregid(bin, -1),"}, {
+- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
++ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(root, bin)"}, {
+- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
++ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ "After setregid(bin, root),"}
+ };
+
+@@ -165,7 +165,7 @@ static void setup(void)
+ } while (0)
+
+ GET_GID(root);
+- GET_GID(nobody);
++ GET_GID(nogroup);
+ GET_GID(bin);
+
+ TEST_PAUSE;
+--
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20150119.bb
index 995d6170ee..b422646903 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20150119.bb
@@ -19,12 +19,15 @@ LIC_FILES_CHKSUM = "\
file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
"
-DEPENDS = "attr libaio libcap acl openssl"
-SRCREV = "f4c3bfe1eab51eb72caeb0f3336d2790c9a8bd1b"
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+SRCREV = "b6ab85d764339b025526bdaf0b5026a67b3a677a"
SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
file://ltp-Do-not-link-against-libfl.patch \
+ file://make-setregid02-work.patch \
+ file://add-knob-for-numa.patch \
+ file://add-knob-for-tirpc.patch \
"
S = "${WORKDIR}/git"
@@ -36,13 +39,11 @@ TARGET_CC_ARCH += "${LDFLAGS}"
export prefix = "/opt/ltp"
export exec_prefix = "/opt/ltp"
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-
-# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
-# we explicitly force regeneration of that directory and pass configure options.
-do_configure_append() {
- (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
-}
+# 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,
@@ -58,13 +59,9 @@ do_install(){
# Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-
- # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core
- # We will add expect for enhancement in future
- find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f
}
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs"
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect"
FILES_${PN}-dbg += "\
/opt/ltp/runtest/.debug \
diff --git a/meta/recipes-extended/man-pages/man-pages_3.69.bb b/meta/recipes-extended/man-pages/man-pages_3.76.bb
index 6ddae51ed0..ed8a15f51d 100644
--- a/meta/recipes-extended/man-pages/man-pages_3.69.bb
+++ b/meta/recipes-extended/man-pages/man-pages_3.76.bb
@@ -7,8 +7,8 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-SRC_URI[md5sum] = "6ba05c9633edba4da64160b95ab7299d"
-SRC_URI[sha256sum] = "933ecb86ac9cce6736540d2556c49f362e34c8417fb708a3b1fe3eb3072b2217"
+SRC_URI[md5sum] = "d00cf09677caefc3e827737afc565583"
+SRC_URI[sha256sum] = "eff558c13b61a46136994514b3ec00a74dcf00414d3bde4f0edca80a36d36359"
RDEPENDS_${PN} = "man"
@@ -27,3 +27,10 @@ do_install() {
# Only deliveres man-pages so FILES_${PN} gets everything
FILES_${PN}-doc = ""
FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf
index bb3c69720e..fc10be2758 100644
--- a/meta/recipes-extended/man/man/man.conf
+++ b/meta/recipes-extended/man/man/man.conf
@@ -133,7 +133,8 @@ MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
# The command given must act as a filter.
#
.gz /bin/gunzip -c
-.bz2 /bin/bzip2 -c -d
+.bz2 /usr/bin/bunzip2 -c
+.xz /usr/bin/unxz -c
.z
.Z /bin/zcat
.F
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
index a66e01cb9a..cd9edbed89 100644
--- a/meta/recipes-extended/man/man_1.6g.bb
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -9,7 +9,20 @@ PR = "r1"
DEPENDS = "groff less"
-SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
+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 \
@@ -47,7 +60,7 @@ do_configure () {
}
-fakeroot do_install() {
+do_install() {
oe_runmake install DESTDIR=${D}
}
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch
new file mode 100644
index 0000000000..e23d9dd81c
--- /dev/null
+++ b/meta/recipes-extended/mc/mc/mc-CTRL.patch
@@ -0,0 +1,31 @@
+Fix build with musl by ensuring CTRL is defined.
+
+musl does not define CTRL in <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
index 0e4434c7d9..b47eb02323 100644
--- a/meta/recipes-extended/mc/mc_4.7.5.2.bb
+++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -8,7 +8,9 @@ RDEPENDS_${PN} = "ncurses-terminfo"
PR = "r3"
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ file://mc-CTRL.patch \
+ "
SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
diff --git a/meta/recipes-extended/mc/mc_4.8.12.bb b/meta/recipes-extended/mc/mc_4.8.13.bb
index b8971931d9..ef5b1a23e2 100644
--- a/meta/recipes-extended/mc/mc_4.8.12.bb
+++ b/meta/recipes-extended/mc/mc_4.8.13.bb
@@ -6,10 +6,12 @@ SECTION = "console/utils"
DEPENDS = "ncurses glib-2.0"
RDEPENDS_${PN} = "ncurses-terminfo"
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ file://mc-CTRL.patch \
+ "
-SRC_URI[md5sum] = "a64c426364bfaee56b628f6c0738aade"
-SRC_URI[sha256sum] = "1054fcc27a488771cbe5b85d7c10135fa1cd1b7682a19930d44b51a023e39396"
+SRC_URI[md5sum] = "12a521a50da6a86852177591b9623d5e"
+SRC_URI[sha256sum] = "22e1b809edba957eb9a392138bf87fea3877f7ca0b7463b7cc2eb94afa6f3e49"
inherit autotools gettext pkgconfig
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
index 40d68d6664..7140990396 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
@@ -8,13 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://mdadm-3.2.2_fix_for_x32.patch \
file://gcc-4.9.patch \
"
-SRC_URI[md5sum] = "8ac04259cdd74b4566c3b6dea9414b57"
-SRC_URI[sha256sum] = "9c07e518bdf3392ebac8874eb686258e10ea3ae0ff7a8acb6d014718a9c3ed45"
+SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220"
+SRC_URI[sha256sum] = "0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c"
CFLAGS += "-fno-strict-aliasing"
@@ -32,6 +32,7 @@ EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
# int-ll64.h included
EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
do_compile() {
oe_runmake
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb
index f1936afd23..3c16228b0d 100644
--- a/meta/recipes-extended/mingetty/mingetty_1.08.bb
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
PR = "r3"
LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
-SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990"
SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
index 4b7024ba85..c9ad1da253 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
@@ -9,15 +9,15 @@ DEPENDS = "zlib gnutls"
#COPYING or Licence
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
"
-SRC_URI[md5sum] = "aa60e22211118f222470439cea60f795"
-SRC_URI[sha256sum] = "2bf0c5c7e78f9905f48de235a75111a1a88238793043bbeae00360b22f1a5f88"
+SRC_URI[md5sum] = "6ebba4809bbc665b8a665a018d1a5ee1"
+SRC_URI[sha256sum] = "c45d47f2dc77484e3f74c0f66aef0d5d95de6c47ed71d9f926d86d546f8346f3"
inherit gettext autotools update-alternatives pkgconfig
-EXTRA_OECONF += "--without-gnome-keyring --without-libidn"
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
ALTERNATIVE_${PN} = "sendmail"
ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
new file mode 100644
index 0000000000..06f81420e9
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
@@ -0,0 +1,32 @@
+From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Wed, 7 Dec 2011 19:14:09 +0100
+Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64
+
+Upstream-Status: Backport
+
+commit 81814dc2b14843009193efd307d814c26baa61f0 from
+git://git.code.sf.net/p/net-tools/code
+
+---
+ ifconfig.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ifconfig.c b/ifconfig.c
+index bc405c6..dae8922 100644
+--- a/ifconfig.c
++++ b/ifconfig.c
+@@ -890,7 +890,9 @@ int main(int argc, char **argv)
+ continue;
+ }
+
+- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
++ /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
++ ip = 0;
++ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
+
+ if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
+ fprintf(stderr, _("Interface %s not initialized\n"),
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
index 5a7b3070c8..0e4ee754a4 100644
--- a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
file://net-tools-config.h \
- file://net-tools-config.make"
+ file://net-tools-config.make \
+ file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
+ "
S = "${WORKDIR}/net-tools-1.60"
@@ -32,6 +34,7 @@ nettools_do_patch() {
cd ${S}
quilt pop -a || true
if [ -d ${S}/.pc-nettools ]; then
+ rm -rf ${S}/.pc
mv ${S}/.pc-nettools ${S}/.pc
QUILT_PATCHES=${S}/debian/patches quilt pop -a
rm -rf ${S}/.pc ${S}/debian
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
index d591fbd3d2..d591fbd3d2 100644
--- a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb
+++ b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
diff --git a/meta/recipes-extended/newt/libnewt_0.52.17.bb b/meta/recipes-extended/newt/libnewt_0.52.18.bb
index 09b017e24e..fa2493b554 100644
--- a/meta/recipes-extended/newt/libnewt_0.52.17.bb
+++ b/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -17,16 +17,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
# slang needs to be >= 2.2
DEPENDS = "slang popt"
-PR = "r2"
-
SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
file://remove_slang_include.patch \
file://fix_SHAREDDIR.patch \
file://cross_ar.patch \
"
-SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b"
-SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b"
+SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
+SRC_URI[sha256sum] = "771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e"
S = "${WORKDIR}/newt-${PV}"
@@ -34,6 +32,8 @@ EXTRA_OECONF = "--without-tcl --without-python"
inherit autotools-brokensep
+CLEANBROKEN = "1"
+
export STAGING_INCDIR
export STAGING_LIBDIR
@@ -46,4 +46,9 @@ do_configure_prepend() {
sh autogen.sh
}
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
FILES_whiptail = "${bindir}/whiptail"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index 0c9d4dc952..e0f32e0a1d 100644
--- a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -25,7 +25,6 @@ PACKAGES = "\
"
-RPROVIDES_packagegroup-core-lsb = "task-core-lsb"
RDEPENDS_packagegroup-core-lsb = "\
packagegroup-core-sys-extended \
packagegroup-core-db \
@@ -129,7 +128,7 @@ RDEPENDS_packagegroup-core-lsb-core = "\
cups \
diffutils \
ed \
- eglibc-utils \
+ glibc-utils \
elfutils \
file \
findutils \
@@ -159,7 +158,7 @@ RDEPENDS_packagegroup-core-lsb-core = "\
util-linux \
xdg-utils \
\
- eglibc \
+ glibc \
libgcc \
libpam \
libxml2 \
@@ -212,6 +211,7 @@ QT4PKGS = " \
${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
"
QT4PKGS_mips64 = ""
+QT4PKGS_mips64n32 = ""
SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
@@ -246,13 +246,13 @@ RDEPENDS_packagegroup-core-lsb-runtime-add = "\
libxml-parser-perl \
libxml-perl \
libxml-sax-perl \
- eglibc-localedatas \
- eglibc-gconvs \
- eglibc-charmaps \
- eglibc-binaries \
- eglibc-localedata-posix \
- eglibc-extra-nss \
- eglibc-pcprofile \
+ glibc-localedatas \
+ glibc-gconvs \
+ glibc-charmaps \
+ glibc-binaries \
+ glibc-localedata-posix \
+ glibc-extra-nss \
+ glibc-pcprofile \
libclass-isa-perl \
libenv-perl \
libdumpvalue-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
new file mode 100644
index 0000000000..680029ae0d
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
@@ -0,0 +1,226 @@
+From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <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_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 3190aaf0d1..b3b39da864 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -26,6 +26,7 @@ SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
file://pam-security-abstract-securetty-handling.patch \
file://pam-unix-nullok-secure.patch \
file://pam_timestamp-fix-potential-directory-traversal-issu.patch \
+ file://libpam-xtests-remove-bash-dependency.patch \
"
SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
@@ -61,7 +62,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libd
FILES_${PN}-runtime = "${sysconfdir}"
FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
-PACKAGES_DYNAMIC += "^pam-plugin-.*"
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
def get_multilib_bit(d):
baselib = d.getVar('baselib', True) or ''
@@ -69,12 +70,27 @@ def get_multilib_bit(d):
libpam_suffix = "suffix${@get_multilib_bit(d)}"
-RPROVIDES_${PN} += "libpam-${libpam_suffix}"
-RPROVIDES_${PN}-runtime += "libpam-runtime-${libpam_suffix}"
-
-RDEPENDS_${PN}-runtime = "libpam-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
-RDEPENDS_${PN}-xtests = "libpam-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
-RRECOMMENDS_${PN} = "libpam-runtime-${libpam_suffix}"
+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):
@@ -85,14 +101,14 @@ python populate_packages_prepend () {
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)
- mlprefix = d.getVar('MLPREFIX', True) or ''
rdeps = d.getVar('RDEPENDS_' + pkg, True)
if rdeps:
- rdeps = rdeps + " " + mlprefix + "libpam-" + libpam_suffix
+ rdeps = rdeps + " " + pn + "-" + libpam_suffix
else:
- rdeps = mlprefix + "libpam-" + libpam_suffix
+ rdeps = pn + "-" + libpam_suffix
d.setVar('RDEPENDS_' + pkg, rdeps)
provides = d.getVar('RPROVIDES_' + pkg, True)
@@ -102,19 +118,22 @@ python populate_packages_prepend () {
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-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
- mlprefix = d.getVar('MLPREFIX', True) or ''
+ 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='')
}
@@ -142,3 +161,11 @@ python do_pam_sanity () {
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"
diff --git a/meta/recipes-extended/parted/parted-3.1/Makefile b/meta/recipes-extended/parted/files/Makefile
index ee90be0814..ee90be0814 100644
--- a/meta/recipes-extended/parted/parted-3.1/Makefile
+++ b/meta/recipes-extended/parted/files/Makefile
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
new file mode 100644
index 0000000000..68ab715f32
--- /dev/null
+++ b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
@@ -0,0 +1,57 @@
+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/parted-3.1/fix-doc-mandir.patch b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
index 0711d4e297..0711d4e297 100644
--- a/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch
+++ b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/no_check.patch b/meta/recipes-extended/parted/files/no_check.patch
index 58d8db4426..58d8db4426 100644
--- a/meta/recipes-extended/parted/parted-3.1/no_check.patch
+++ b/meta/recipes-extended/parted/files/no_check.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/run-ptest b/meta/recipes-extended/parted/files/run-ptest
index 695c5e8a7b..695c5e8a7b 100644
--- a/meta/recipes-extended/parted/parted-3.1/run-ptest
+++ b/meta/recipes-extended/parted/files/run-ptest
diff --git a/meta/recipes-extended/parted/parted-3.1/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch
index e9bbe9a956..e9bbe9a956 100644
--- a/meta/recipes-extended/parted/parted-3.1/syscalls.patch
+++ b/meta/recipes-extended/parted/files/syscalls.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
deleted file mode 100644
index c4ca06d407..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-
-From: Gustavo Zacarias
-Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef
-Date: Mon, 3 Mar 2014 10:40:08 -0300
-
-The CPPFunction typedef (among others) have been deprecated in favour of
-specific prototyped typedefs since readline 4.2 (circa 2001).
-It's been working since because compatibility typedefs have been in
-place until they where removed in the recent readline 6.3 release.
-Switch to the new style to avoid build breakage.
-
-Signed-off-by: Gustavo Zacarias <address@hidden>
-
-Upstream-Status: Backport
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
----
- parted/ui.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/parted/ui.c b/parted/ui.c
-index 786deed..b33f6fc 100644
---- a/parted/ui.c
-+++ b/parted/ui.c
-@@ -1470,7 +1470,7 @@ init_readline (void)
- #ifdef HAVE_LIBREADLINE
- if (!opt_script_mode) {
- rl_initialize ();
-- rl_attempted_completion_function = (CPPFunction*) complete_function;
-+ rl_attempted_completion_function = (rl_completion_func_t *) complete_function;
- readline_state.in_readline = 0;
- }
- #endif
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
deleted file mode 100644
index b1eae97988..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
----
- dvh.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-Index: parted-3.1/libparted/labels/dvh.h
-===================================================================
---- parted-3.1.orig/libparted/labels/dvh.h 2013-02-25 10:46:13.204477586 +0800
-+++ parted-3.1/libparted/labels/dvh.h 2013-02-25 10:47:20.954477065 +0800
-@@ -112,8 +112,8 @@ struct device_parameters {
-
- struct volume_directory {
- char vd_name[VDNAMESIZE]; /* name */
-- int vd_lbn; /* logical block number */
-- int vd_nbytes; /* file length in bytes */
-+ unsigned int vd_lbn; /* logical block number */
-+ unsigned int vd_nbytes; /* file length in bytes */
- };
-
- /*
-@@ -125,9 +125,9 @@ struct volume_directory {
- * NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED
- */
- struct partition_table { /* one per logical partition */
-- int pt_nblks; /* # of logical blks in partition */
-- int pt_firstlbn; /* first lbn of partition */
-- int pt_type; /* use of partition */
-+ unsigned int pt_nblks; /* # of logical blks in partition */
-+ unsigned int pt_firstlbn; /* first lbn of partition */
-+ int pt_type; /* use of partition */
- };
-
- #define PTYPE_VOLHDR 0 /* partition is volume header */
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
deleted file mode 100644
index a9f26e9781..0000000000
--- a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Accepted [Expected to be included in parted versions > 3.1]
-Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9
-
-From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001
-From: Andreas Oberritter <obi@opendreambox.org>
-Date: Sun, 18 Mar 2012 17:39:14 +0000
-Subject: git-version-gen: don't let "prefix" envvar cause trouble
-
-* build-aux/git-version-gen (prefix): Initialize properly,
-so as not to use a value specified via the environment.
-Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
----
-diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
-index d5542a2..0fa9063 100755
---- a/build-aux/git-version-gen
-+++ b/build-aux/git-version-gen
-@@ -1,6 +1,6 @@
- #!/bin/sh
- # Print a version string.
--scriptversion=2012-01-06.07; # UTC
-+scriptversion=2012-03-18.17; # UTC
-
- # Copyright (C) 2007-2012 Free Software Foundation, Inc.
- #
-@@ -92,6 +92,8 @@ Options:
-
- Running without arguments will suffice in most cases."
-
-+prefix=v
-+
- while test $# -gt 0; do
- case $1 in
- --help) echo "$usage"; exit 0;;
-@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then
- fi
-
- tag_sed_script="${tag_sed_script:-s/x/x/}"
--prefix="${prefix:-v}"
-
- nl='
- '
---
-cgit v0.9.0.2
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.2.bb
index 9057463c7e..e2257696d7 100644
--- a/meta/recipes-extended/parted/parted_3.1.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -9,16 +9,14 @@ PR = "r1"
SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
file://no_check.patch \
file://syscalls.patch \
- file://fix-git-version-gen.patch \
file://fix-doc-mandir.patch \
- file://fix-dvh-overflows.patch \
- file://fix-deprecated-readline.patch \
+ file://fix-compile-failure-while-dis.patch \
file://run-ptest \
file://Makefile \
"
-SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb"
-SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15"
+SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
+SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
EXTRA_OECONF = "--disable-device-mapper"
@@ -42,4 +40,4 @@ do_install_ptest() {
sed -e 's| ../parted||' -i $t/tests/*.sh
}
-RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup"
+RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python"
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
index 0c10688feb..ad04871a8e 100644
--- a/meta/recipes-extended/pax/pax_3.4.bb
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -1,6 +1,6 @@
SUMMARY = "Portable Archive eXchange"
DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
-HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
BUGTRACKER = "http://www.openbsd.org/query-pr.html"
LICENSE = "BSD"
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
SECTION = "base"
PR = "r2"
-SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \
+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"
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
index 9c2c9d5584..ebe042238f 100644
--- a/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8
SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz"
-SRC_URI[md5sum] = "1c846c8c1125e6a075444abe65d99b63"
-SRC_URI[sha256sum] = "5db8b62fa0d036bd0cabc869ffe17941ad587d9a2af1ff030d554872adbc1ca1"
+SRC_URI[md5sum] = "68723e96be0b258a9e20480276e8a62c"
+SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814d3d58a"
S = "${WORKDIR}/Convert-ASN1-${PV}"
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
index 355fb2a4ec..b5caa95184 100644
--- a/meta/recipes-extended/pigz/pigz.inc
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -5,25 +5,25 @@ 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"
+LICENSE = "Zlib & Apache-2.0"
-SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz"
+SRC_URI = "http://zlib.net/${BPN}/${BP}.tar.gz"
PROVIDES_class-native += "gzip-native"
DEPENDS = "zlib"
-do_install () {
- if [ "${CLASSOVERRIDE}" = "class-target" ] ; then
- # Install files into /bin (FHS), which is typical place for gzip
- install -d ${D}${base_bindir}
- install ${B}/pigz ${D}${base_bindir}/gzip
- install ${B}/unpigz ${D}${base_bindir}/gunzip
- else
- install -d ${D}${bindir}
- install ${B}/pigz ${D}${bindir}/gzip
- install ${B}/unpigz ${D}${bindir}/gunzip
- fi
+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}/gzip
+ install ${B}/unpigz ${D}${base_bindir}/gunzip
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ install ${B}/unpigz ${D}${bindir}/gunzip
}
ALTERNATIVE_${PN} = "gzip gunzip"
diff --git a/meta/recipes-extended/pigz/pigz/link-order.patch b/meta/recipes-extended/pigz/pigz/link-order.patch
new file mode 100644
index 0000000000..4becc0e3fe
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz/link-order.patch
@@ -0,0 +1,38 @@
+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.1.bb b/meta/recipes-extended/pigz/pigz_2.3.3.bb
index cd5508d63e..080be2bbc9 100644
--- a/meta/recipes-extended/pigz/pigz_2.3.1.bb
+++ b/meta/recipes-extended/pigz/pigz_2.3.3.bb
@@ -1,8 +1,10 @@
require pigz.inc
LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
-SRC_URI[md5sum] = "e803f8bc0770c7a5e96dccb1d2dd2aab"
-SRC_URI[sha256sum] = "629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54"
+SRC_URI += "file://link-order.patch"
+
+SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb"
+SRC_URI[sha256sum] = "4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c"
NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
diff --git a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
deleted file mode 100644
index 203ccb3347..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-## 60_linux_init.dpatch by <david.sugar@canonical.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix Linux version detection which relied on elf loader side-effect.
-## DP: This patch also depends on 40_gnu-kbsd-version, which modified
-## DP: init_Linux_version().
-
-@DPATCH@
-
-Upstream-Status: inappropriate [upstream unmaintained]
----
- proc/sysinfo.c | 1 +
- proc/version.c | 5 +++--
- proc/version.h | 1 +
- 3 files changed, 5 insertions(+), 2 deletions(-)
-
-Index: procps-3.2.8/proc/sysinfo.c
-===================================================================
---- procps-3.2.8.orig/proc/sysinfo.c
-+++ procps-3.2.8/proc/sysinfo.c
-@@ -212,6 +212,7 @@ static int check_for_privs(void){
- static void init_libproc(void) __attribute__((constructor));
- static void init_libproc(void){
- have_privs = check_for_privs();
-+ init_Linux_version(); // make sure we have version before continuing...
- // ought to count CPUs in /proc/stat instead of relying
- // on glibc, which foolishly tries to parse /proc/cpuinfo
- //
-Index: procps-3.2.8/proc/version.c
-===================================================================
---- procps-3.2.8.orig/proc/version.c
-+++ procps-3.2.8/proc/version.c
-@@ -33,8 +33,7 @@ void display_version(void) {
-
- int linux_version_code;
-
--static void init_Linux_version(void) __attribute__((constructor));
--static void init_Linux_version(void) {
-+void init_Linux_version(void) {
- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
- FILE *fp;
- char buf[256];
-Index: procps-3.2.8/proc/version.h
-===================================================================
---- procps-3.2.8.orig/proc/version.h
-+++ procps-3.2.8/proc/version.h
-@@ -14,6 +14,7 @@
-
- EXTERN_C_BEGIN
-
-+extern void init_Linux_version(void); /* initialize linux version */
- extern void display_version(void); /* display suite version */
- extern const char procps_version[]; /* global buf for suite version */
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
deleted file mode 100644
index 1523c3dfb2..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Do not try to detect 64bit/32bit system
-we already feed that information via compiler
-defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate [OE specific]
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile 2014-05-03 01:00:01.707387583 -0700
-+++ procps-3.2.8/Makefile 2014-05-03 08:53:08.087175369 -0700
-@@ -118,15 +118,6 @@
- # until you go looking for a 64-bit curses library.
- check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
-
--# Be 64-bit if at all possible. In a cross-compiling situation, one may
--# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT
--# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST
--# produce separate executables for ppc and ppc64, s390 and s390x,
--# i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
--# Failure to do so will cause data corruption.
--m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
--ALL_CFLAGS += $(m64)
--
- ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
- ALL_CFLAGS += $(call check_gcc,-Wpadded,)
- ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,)
diff --git a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
deleted file mode 100644
index 2582857e25..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Upstream-Status: Inappropriate [not author, no upstream]
-
-Imported from Debian.
-Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50
-Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749
-
-Stops procps utilities from printing a warning when used with
-kernels having only two digit versions, e.g. 3.0.
-
-Author: <csmall@debian.org>
-Description: Rework version parsing so its ok with other OSes
---- a/proc/version.c
-+++ b/proc/version.c
-@@ -35,15 +35,23 @@
-
- static void init_Linux_version(void) __attribute__((constructor));
- static void init_Linux_version(void) {
-- static struct utsname uts;
-- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
-+ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
-+ FILE *fp;
-+ char buf[256];
-
-- if (uname(&uts) == -1) /* failure implies impending death */
-- exit(1);
-- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
-+ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
-+ exit(1);
-+ if (fgets(buf, 256, fp) == NULL) {
-+ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
-+ fclose(fp);
-+ exit(1);
-+ }
-+ fclose(fp);
-+ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
- fprintf(stderr, /* *very* unlikely to happen by accident */
- "Non-standard uts for running kernel:\n"
-- "release %s=%d.%d.%d gives version code %d\n",
-- uts.release, x, y, z, LINUX_VERSION(x,y,z));
-+ "release %s=%d.%d.%d gives version code %d\n",
-+ buf,
-+ x, y, z, LINUX_VERSION(x,y,z));
- linux_version_code = LINUX_VERSION(x, y, z);
- }
diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch
deleted file mode 100644
index 2a59a5ff68..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/install.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile
---- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800
-+++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800
-@@ -29,9 +29,6 @@
- ln_sf := ln -sf
- install := install -D --owner 0 --group 0
-
--# Lame x86-64 /lib64 and /usr/lib64 abomination:
--lib64 := lib$(shell [ -d /lib64 ] && echo 64)
--
- usr/bin := $(DESTDIR)/usr/bin/
- bin := $(DESTDIR)/bin/
- sbin := $(DESTDIR)/sbin/
-@@ -39,8 +36,8 @@
- man1 := $(DESTDIR)/usr/share/man/man1/
- man5 := $(DESTDIR)/usr/share/man/man5/
- man8 := $(DESTDIR)/usr/share/man/man8/
--lib := $(DESTDIR)/$(lib64)/
--usr/lib := $(DESTDIR)/usr/$(lib64)/
-+lib := $(DESTDIR)/$(base_libdir)/
-+usr/lib := $(DESTDIR)/$(libdir)/
- usr/include := $(DESTDIR)/usr/include/
-
- #SKIP := $(bin)kill $(man1)kill.1
-@@ -222,10 +219,10 @@
- ###### install
-
- $(BINFILES) : all
-- $(install) --mode a=rx $(notdir $@) $@
-+ $(install) -m 555 $(notdir $@) $@
-
- $(MANFILES) : all
-- $(install) --mode a=r $(notdir $@) $@
-+ $(install) -m 444 $(notdir $@) $@
-
- install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
- cd $(usr/bin) && $(ln_f) skill snice
diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
deleted file mode 100644
index 2ca972482d..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-diff --git a/pwdx.c b/pwdx.c
-index cb96a52..29ebce2 100644
---- a/pwdx.c
-+++ b/pwdx.c
-@@ -13,7 +13,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <regex.h>
--#include <limits.h>
-+#include <linux/limits.h>
- #include <unistd.h>
- #include <errno.h>
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
deleted file mode 100644
index 2a65c3509f..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Upstream-Status: Pending
-
-*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005
---- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005
-***************
-*** 96,102 ****
- #################### install rules ###########################
-
- $(lib)$(SOFILE) : proc/$(SONAME)
-! $(install) --mode a=rx $< $@
-
- ifneq ($(SOLINK),$(SOFILE))
- .PHONY: $(lib)$(SOLINK)
---- 96,102 ----
- #################### install rules ###########################
-
- $(lib)$(SOFILE) : proc/$(SONAME)
-! $(install) -m 555 $< $@
-
- ifneq ($(SOLINK),$(SOFILE))
- .PHONY: $(lib)$(SOLINK)
-***************
-*** 115,121 ****
- $(ldconfig)
-
- $(usr/lib)$(ANAME) : proc/$(ANAME)
-! $(install) --mode a=r $< $@
-
- # Junk anyway... supposed to go in /usr/include/$(NAME)
- #INSTALL += $(addprefix $(include),$(HDRFILES))
---- 115,121 ----
- $(ldconfig)
-
- $(usr/lib)$(ANAME) : proc/$(ANAME)
-! $(install) -m 444 $< $@
-
- # Junk anyway... supposed to go in /usr/include/$(NAME)
- #INSTALL += $(addprefix $(include),$(HDRFILES))
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
deleted file mode 100644
index 0306c8d639..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-Upstream-Status: Pending
-
-fix that top will quit after cpu offline
-
-top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot
-is still the original cpu numbers when calling cpus_refresh, in which
-it is trying to read and sscanf Cpu_tot times /proc/stat.
-
-The patch is from procps-3.2.8-2.fc12.src.rpm
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
----
---- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
-+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
-@@ -912,6 +912,7 @@
- static CPU_t *cpus_refresh (CPU_t *cpus)
- {
- static FILE *fp = NULL;
-+ static int cpu_max;
- int i;
- int num;
- // enough for a /proc/stat CPU line (not the intr line)
-@@ -926,24 +927,29 @@
- can hold tics representing the /proc/stat cpu summary (the first
- line read) -- that slot supports our View_CPUSUM toggle */
- cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
-+ cpu_max = Cpu_tot;
- }
-+ else if (cpu_max > Cpu_tot)
-+ /* move saved CUPs summary to cpu_max possition */
-+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
-+
- rewind(fp);
- fflush(fp);
-
- // first value the last slot with the cpu summary line
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
-- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
- num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
-- &cpus[Cpu_tot].u,
-- &cpus[Cpu_tot].n,
-- &cpus[Cpu_tot].s,
-- &cpus[Cpu_tot].i,
-- &cpus[Cpu_tot].w,
-- &cpus[Cpu_tot].x,
-- &cpus[Cpu_tot].y,
-- &cpus[Cpu_tot].z
-+ &cpus[cpu_max].u,
-+ &cpus[cpu_max].n,
-+ &cpus[cpu_max].s,
-+ &cpus[cpu_max].i,
-+ &cpus[cpu_max].w,
-+ &cpus[cpu_max].x,
-+ &cpus[cpu_max].y,
-+ &cpus[cpu_max].z
- );
- if (num < 4)
- std_err("failed /proc/stat read");
-@@ -955,7 +961,7 @@
- }
-
- // now value each separate cpu's tics
-- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
-+ for (i = 0; ; i++) {
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
- cpus[i].x = 0; // FIXME: can't tell by kernel version number
- cpus[i].y = 0; // FIXME: can't tell by kernel version number
-@@ -964,9 +970,35 @@
- &cpus[i].id,
- &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
- );
-- if (num < 4)
-- std_err("failed /proc/stat read");
-+ if (num < 4) {
-+ Cpu_tot = i;
-+ break;
-+ }
-+ if (i == cpu_max - 1) {
-+ // Bump cpu_max and extend cpus
-+ cpu_max++;
-+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
-+ if (!cpus) std_err("realloc failed");
-+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
-+ }
-+ }
-+
-+ if (cpu_max > Cpu_tot)
-+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
-+
-+ // and just in case we're 2.2.xx compiled without SMP support...
-+ if (Cpu_tot == 1) {
-+ cpus[0].id = cpus[1].id = 0;
-+ cpus[0].u = cpus[1].u;
-+ cpus[0].n = cpus[1].n;
-+ cpus[0].s = cpus[1].s;
-+ cpus[0].i = cpus[1].i;
-+ cpus[0].w = cpus[1].w;
-+ cpus[0].x = cpus[1].x;
-+ cpus[0].y = cpus[1].y;
-+ cpus[0].z = cpus[1].z;
- }
-+
- return cpus;
- }
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
deleted file mode 100644
index c8cee26eac..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Backport
-
-Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla:
-http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1
-
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile
-+++ procps-3.2.8/Makefile
-@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
- # want this rule first, use := on ALL, and ALL not filled in yet
- all: do_all
-
---include */module.mk
-+-include proc/module.mk
-+-include ps/module.mk
-
- do_all: $(ALL)
-
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
deleted file mode 100644
index 1a294142f5..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001
-From: Daniel Novotny <dnovotny@fedoraproject.org>
-Date: Mon, 16 Feb 2009 12:22:20 +0000
-Subject: add cgroup support
-
-Rebased for 3.2.8: Andrei Gherzan <andrei.gherzan@windriver.com>
-
-Upstream-Status: Pending
-
-The patch was imported from the meta-ivi repository
-(git://git.yoctoproject.org/meta-ivi) as of commit id
-74b9624fe94b2b90810717a13d481b0db9d2d95a
-
-Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
-
-Index: procps-3.2.8/ps/output.c
-===================================================================
---- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200
-+++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200
-@@ -1099,6 +1099,39 @@
- return snprintf(outbuf, COLWID, "*");
- }
-
-+static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){
-+ char filename[48];
-+ FILE *fd;
-+ int counter = 0;
-+ int c;
-+ int is_cgroup = 0;
-+
-+ outbuf[0]='\0';
-+ snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid);
-+ fd = fopen(filename, "r");
-+ if (likely(fd == NULL)) goto fail;
-+ while (( (c = fgetc(fd)) != EOF) && (counter<665)) {
-+ if (is_cgroup == 0) {
-+ if (c == ':') {
-+ is_cgroup = 1;
-+ if (counter>0)
-+ outbuf[counter++]=';';
-+ }
-+ }else
-+ if ((c == '\n') || (c == '\0'))
-+ is_cgroup = 0;
-+ else
-+ outbuf[counter++]=c;
-+ }
-+ outbuf[counter]='\0';
-+ close(fd);
-+ if (counter>0)
-+ return counter;
-+fail:
-+ outbuf[0] = '-';
-+ outbuf[1] = '\0';
-+ return 1;
-+}
-
- /****************** FLASK & seLinux security stuff **********************/
- // move the bulk of this to libproc sometime
-@@ -1293,6 +1326,7 @@
- {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT},
- {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT},
- {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/
-+{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/
- {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT},
- {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/
- {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT},
-Index: procps-3.2.8/ps/ps.1
-===================================================================
---- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200
-+++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200
-@@ -904,6 +904,10 @@
- displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
- T}
-
-+cgroup CGROUP T{
-+display control groups to which the process belonges.
-+t}
-+
- class CLS T{
- scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).
- Field's possible values are:
diff --git a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
deleted file mode 100644
index 0775eaba26..0000000000
--- a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005
---- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005
-***************
-*** 33,40 ****
-
-
- $(bin)ps: ps/ps
-! $(install) --mode a=rx $< $@
-
- $(man1)ps.1 : ps/ps.1
-! $(install) --mode a=r $< $@
- -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
---- 33,40 ----
-
-
- $(bin)ps: ps/ps
-! $(install) -m 555 $< $@
-
- $(man1)ps.1 : ps/ps.1
-! $(install) -m 444 $< $@
- -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc
deleted file mode 100644
index da91da232d..0000000000
--- a/meta/recipes-extended/procps/procps.inc
+++ /dev/null
@@ -1,31 +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 = "http://procps.sf.net"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \
- file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
- file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://install.patch"
-
-inherit autotools-brokensep update-alternatives
-
-do_install_append() {
- mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN}
-}
-
-FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-FILES_SOLIBSDEV = ""
-
-ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch"
-ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
-ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl"
-ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps"
-ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch"
-ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}"
-ALTERNATIVE_PRIORITY = "110"
diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch
new file mode 100644
index 0000000000..934ae80954
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/fix-configure.patch
@@ -0,0 +1,19 @@
+
+exec_prefix is /usr default in OE-Core
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: procps-ng-3.3.10/configure.ac
+===================================================================
+--- procps-ng-3.3.10.orig/configure.ac
++++ procps-ng-3.3.10/configure.ac
+@@ -70,7 +70,7 @@ AC_FUNC_MMAP
+ AC_FUNC_REALLOC
+ AC_FUNC_STRTOD
+
+-usrbin_execdir='${exec_prefix}/usr/bin'
++usrbin_execdir='${exec_prefix}/bin'
+ AC_SUBST([usrbin_execdir])
+
+ AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf
index 34e7488bf7..34e7488bf7 100644
--- a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
+++ b/meta/recipes-extended/procps/procps/sysctl.conf
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
deleted file mode 100644
index b314bfe33c..0000000000
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-require procps.inc
-
-PR = "r12"
-
-SRC_URI += "file://procmodule.patch \
- file://psmodule.patch \
- file://linux-limits.patch \
- file://sysctl.conf \
- file://procps-3.2.8+gmake-3.82.patch \
- file://gnu-kbsd-version.patch \
- file://60_linux_version_init.patch \
- file://procps-3.2.7-top-remcpu.patch \
- file://procps-3.2.8-ps-cgroup.patch \
- file://detect_bitness.patch \
- "
-
-SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"
-SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535"
-
-EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \
- CPPFLAGS=-I${STAGING_INCDIR} \
- LDFLAGS="${LDFLAGS}" \
- CURSES=-lncurses \
- install="install -D" \
- ldconfig=echo'
-
-do_install_append () {
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
diff --git a/meta/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.10.bb
new file mode 100644
index 0000000000..d8b04dc204
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.3.10.bb
@@ -0,0 +1,62 @@
+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://fix-configure.patch \
+ file://sysctl.conf \
+ "
+
+SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
+SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill"
+
+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
+ # Remove now empty dir
+ rmdir ${D}/${sbindir}
+
+ 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 = "100"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+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/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
new file mode 100644
index 0000000000..e57d60f6a3
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
@@ -0,0 +1,46 @@
+From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
+From: Brad Jorsch <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
new file mode 100644
index 0000000000..c0835e041e
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
+From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
+From: Paul Barker <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_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb
index 22f65c52be..66aba9ec57 100644
--- a/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -4,3 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
+
+SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
+ file://0002-Include-limits.h-for-PATH_MAX.patch \
+ "
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
deleted file mode 100644
index b556a46347..0000000000
--- a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001
-From: Steve Dickson <steved@redhat.com>
-Date: Wed, 21 Aug 2013 14:40:22 -0400
-Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am
-
-Upstream-Status: backport
-
-Commit 8d7a0708 cause a regression where the rpcuser id was not
-being set, which in turn cause rpcbind to immediately exit.
-This patch removes the extra ',' that was in the AC_ARG_WITH
-statement in the configure.ac file.
-
-Signed-off-by: Steve Dickson <steved@redhat.com>
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2b67720..1cf42d3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
- AC_SUBST([statedir], [$with_statedir])
-
- AC_ARG_WITH([rpcuser],
-- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
-+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
- ,, [with_rpcuser=root])
- AC_SUBST([rpcuser], [$with_rpcuser])
-
---
-1.8.3.2
-
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index 4de28d4ae1..b3ae2541a0 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -1,14 +1,12 @@
[Unit]
-Description=RPC Bind
-After=network.target
-Wants=rpcbind.target
-Before=rpcbind.target
+Description=RPC Bind Service
+Requires=rpcbind.socket
[Service]
Type=forking
EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
-Restart=always
+SuccessExitStatus=2
[Install]
-WantedBy=multi-user.target
+Also=rpcbind.socket
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
new file mode 100644
index 0000000000..d63c1d9720
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+
+[Socket]
+ListenStream=/var/run/rpcbind.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb
index 89e567bfb2..fd4b2b5b07 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.2.bb
@@ -11,10 +11,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
- file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \
file://init.d \
${UCLIBCPATCHES} \
file://rpcbind.conf \
+ file://rpcbind.socket \
file://rpcbind.service \
"
@@ -23,8 +23,8 @@ UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
"
UCLIBCPATCHES ?= ""
-SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68"
-SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e"
+SRC_URI[md5sum] = "8acf839bfef2364a05fbd6be5f8edf9a"
+SRC_URI[sha256sum] = "13dbc8c796dbe0ce8df873007bea0490c8460b56202d918c9eb6fa0358a08f29"
inherit autotools update-rc.d systemd pkgconfig
@@ -34,15 +34,20 @@ 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"
-SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket"
inherit useradd
USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home \
+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 () {
@@ -56,6 +61,7 @@ do_install_append () {
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' \
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index c5218ec1db..962a4993a9 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -34,6 +34,9 @@ SRC_URI[patch.sha256sum] = "10acb274b2fb0bb7137a0d66e52fa0f18125bc5198c7a8d5af38
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)}"
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
index fe242e16bd..4c0f3452ac 100644
--- a/meta/recipes-extended/sed/sed_4.1.2.bb
+++ b/meta/recipes-extended/sed/sed_4.1.2.bb
@@ -31,4 +31,3 @@ ALTERNATIVE_${PN} = "sed"
ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
ALTERNATIVE_PRIORITY = "100"
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
index 74ac16bea9..72976deb64 100644
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -14,7 +14,7 @@ SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
inherit autotools texinfo update-alternatives gettext ptest
-RDEPENDS_${PN}-ptest += "make locale-base-ru-ru"
+RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}"
EXTRA_OECONF = "--disable-acl \
${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
@@ -40,4 +40,3 @@ do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
}
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
new file mode 100644
index 0000000000..828b95a572
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
@@ -0,0 +1,46 @@
+From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <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-su.c-fix-to-exec-command-correctly.patch b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch
new file mode 100644
index 0000000000..31337de362
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+Subject: su.c: fix to exec command correctly
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/su.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/su.c b/src/su.c
+index 3704217..bc4f2ac 100644
+--- a/src/su.c
++++ b/src/su.c
+@@ -1156,7 +1156,7 @@ int main (int argc, char **argv)
+ * Use the shell and create an argv
+ * with the rest of the command line included.
+ */
+- argv[-1] = cp;
++ argv[-1] = shellstr;
+ execve_shell (shellstr, &argv[-1], environ);
+ err = errno;
+ (void) fprintf (stderr,
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
new file mode 100644
index 0000000000..85dde8e1bb
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
@@ -0,0 +1,109 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: useradd.c: create parent directories when necessary
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 49 insertions(+), 23 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index 4bd969d..cb5dd6c 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1893,6 +1893,35 @@ static void usr_update (void)
+ }
+
+ /*
++ * mkdir_p - create directories, including parent directories when needed
++ *
++ * similar to `mkdir -p'
++ */
++void mkdir_p(const char *path) {
++ int len = strlen(path);
++ char newdir[len + 1];
++ mode_t mode = 0755;
++ int i = 0;
++
++ if (path[i] == '\0') {
++ return;
++ }
++
++ /* skip the leading '/' */
++ i++;
++
++ while(path[i] != '\0') {
++ if (path[i] == '/') {
++ strncpy(newdir, path, i);
++ newdir[i] = '\0';
++ mkdir(newdir, mode);
++ }
++ i++;
++ }
++ mkdir(path, mode);
++}
++
++/*
+ * create_home - create the user's home directory
+ *
+ * create_home() creates the user's home directory if it does not
+@@ -1907,36 +1936,33 @@ static void create_home (void)
+ fail_exit (E_HOMEDIR);
+ }
+ #endif
+- /* XXX - create missing parent directories. --marekm */
+- if (mkdir (user_home, 0) != 0) {
+- fprintf (stderr,
+- _("%s: cannot create directory %s\n"),
+- Prog, user_home);
+-#ifdef WITH_AUDIT
+- audit_logger (AUDIT_ADD_USER, Prog,
+- "adding home directory",
+- user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_FAILURE);
+-#endif
+- fail_exit (E_HOMEDIR);
+- }
+- chown (user_home, user_id, user_gid);
+- chmod (user_home,
+- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+- home_added = true;
++ mkdir_p(user_home);
++ }
++ if (access (user_home, F_OK) != 0) {
+ #ifdef WITH_AUDIT
+ audit_logger (AUDIT_ADD_USER, Prog,
+ "adding home directory",
+ user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_SUCCESS);
++ SHADOW_AUDIT_FAILURE);
+ #endif
+-#ifdef WITH_SELINUX
+- /* Reset SELinux to create files with default contexts */
+- if (reset_selinux_file_context () != 0) {
+- fail_exit (E_HOMEDIR);
+- }
++ fail_exit (E_HOMEDIR);
++ }
++ chown (user_home, user_id, user_gid);
++ chmod (user_home,
++ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
++ home_added = true;
++#ifdef WITH_AUDIT
++ audit_logger (AUDIT_ADD_USER, Prog,
++ "adding home directory",
++ user_name, (unsigned int) user_id,
++ SHADOW_AUDIT_SUCCESS);
+ #endif
++#ifdef WITH_SELINUX
++ /* Reset SELinux to create files with default contexts */
++ if (reset_selinux_file_context () != 0) {
++ fail_exit (E_HOMEDIR);
+ }
++#endif
+ }
+
+ /*
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch b/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
deleted file mode 100644
index 40444967ab..0000000000
--- a/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Add a --root command option to groupmems utility.
-
-This option allows the utility to be chrooted when run under pseudo.
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-diff -Naur old/src/groupmems.c new/src/groupmems.c
---- old/src/groupmems.c 2011-02-13 11:58:16.000000000 -0600
-+++ new/src/groupmems.c 2013-05-30 04:45:38.000000000 -0500
-@@ -60,6 +60,7 @@
- #define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
- #define EXIT_INVALID_USER 8 /* specified user does not exist */
- #define EXIT_INVALID_GROUP 9 /* specified group does not exist */
-+#define EXIT_BAD_ARG 10 /* invalid argument to option */
-
- /*
- * Global variables
-@@ -79,6 +80,7 @@
- static bool is_shadowgrp;
- static bool sgr_locked = false;
- #endif
-+static const char *newroot = "";
-
- /* local function prototypes */
- static char *whoami (void);
-@@ -368,6 +370,7 @@
- "Options:\n"
- " -g, --group groupname change groupname instead of the user's group\n"
- " (root only)\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- "\n"
- "Actions:\n"
- " -a, --add username add username to the members of the group\n"
-@@ -391,10 +394,11 @@
- {"group", required_argument, NULL, 'g'},
- {"list", no_argument, NULL, 'l'},
- {"purge", no_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((arg = getopt_long (argc, argv, "a:d:g:lp", long_options,
-+ while ((arg = getopt_long (argc, argv, "a:d:g:lpR:", long_options,
- &option_index)) != EOF) {
- switch (arg) {
- case 'a':
-@@ -416,6 +420,28 @@
- purge = true;
- ++exclusive;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (EXIT_BAD_ARG);
-+ }
-+ break;
- default:
- usage ();
- }
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
deleted file mode 100644
index ab87e35535..0000000000
--- a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
+++ /dev/null
@@ -1,1384 +0,0 @@
-Add a --root command option to the following utilties:
-
-* useradd
-* groupadd
-* usermod
-* groupmod
-* userdel
-* groupdel
-* passwd
-* gpasswd
-* pwconv
-* pwunconv
-* grpconv
-* grpunconv
-
-This option allows the utilities to be chrooted when run under pseudo.
-They can then be used to manipulate user and group account information
-in target sysroots.
-
-The useradd utility was also modified to create home directories
-recursively when necessary.
-
-Upstream-Status: Inappropriate [Other]
-Workaround is specific to our build system.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-2011-09-29 Fix the parsing of the --root option in gpasswd, useradd, usermod:
-
-In programs which need to scan the command line in two passes to handle
---root option separately from the rest of the arguments, replace the first
-calls to getopt_long with a simple iteration over the argument list since
-getopt_long has the bad habit of reordering arguments on the command line.
-
-Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
-
-diff -urN shadow-4.1.4.3.orig//src/gpasswd.c shadow-4.1.4.3//src/gpasswd.c
---- shadow-4.1.4.3.orig//src/gpasswd.c 2011-09-29 12:00:45.211000091 +0100
-+++ shadow-4.1.4.3//src/gpasswd.c 2011-09-29 12:09:54.590000090 +0100
-@@ -63,6 +63,7 @@
- * (/etc/gshadow present) */
- static bool is_shadowgrp;
- #endif
-+static const char *newroot = "";
-
- /* Flags set by options */
- static bool aflg = false;
-@@ -97,6 +98,7 @@
- static void usage (void);
- static RETSIGTYPE catch_signals (int killed);
- static bool is_valid_user_list (const char *users);
-+static void process_root_flag (int argc, char **argv);
- static void process_flags (int argc, char **argv);
- static void check_flags (int argc, int opt_index);
- static void open_files (void);
-@@ -136,6 +138,7 @@
- "Options:\n"
- " -a, --add USER add USER to GROUP\n"
- " -d, --delete USER remove USER from GROUP\n"
-+ " -Q --root CHROOT_DIR directory to chroot into\n"
- " -r, --remove-password remove the GROUP's password\n"
- " -R, --restrict restrict access to GROUP to its members\n"
- " -M, --members USER,... set the list of members of GROUP\n"
-@@ -226,6 +229,57 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-Q")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ('/' != root[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - process the command line options and arguments
- */
- static void process_flags (int argc, char **argv)
-@@ -235,6 +289,7 @@
- static struct option long_options[] = {
- {"add", required_argument, NULL, 'a'},
- {"delete", required_argument, NULL, 'd'},
-+ {"root", required_argument, NULL, 'Q'},
- {"remove-password", no_argument, NULL, 'r'},
- {"restrict", no_argument, NULL, 'R'},
- {"administrators", required_argument, NULL, 'A'},
-@@ -242,7 +297,7 @@
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((flag = getopt_long (argc, argv, "a:A:d:gM:rR", long_options, &option_index)) != -1) {
-+ while ((flag = getopt_long (argc, argv, "a:A:d:gM:Q:rR", long_options, &option_index)) != -1) {
- switch (flag) {
- case 'a': /* add a user */
- aflg = true;
-@@ -283,6 +338,9 @@
- }
- Mflg = true;
- break;
-+ case 'Q':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 'r': /* remove group password */
- rflg = true;
- break;
-@@ -995,6 +1053,8 @@
- setbuf (stdout, NULL);
- setbuf (stderr, NULL);
-
-+ process_root_flag (argc, argv);
-+
- #ifdef SHADOWGRP
- is_shadowgrp = sgr_file_present ();
- #endif
-diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3//src/groupadd.c
---- shadow-4.1.4.3.orig//src/groupadd.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupadd.c 2011-09-29 11:59:28.386000092 +0100
-@@ -76,6 +76,7 @@
- static gid_t group_id;
- static /*@null@*/char *group_passwd;
- static /*@null@*/char *empty_list = NULL;
-+static const char *newroot = "";
-
- static bool oflg = false; /* permit non-unique group ID to be specified with -g */
- static bool gflg = false; /* ID value for the new group */
-@@ -120,6 +121,7 @@
- (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
- " (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
-@@ -383,12 +385,13 @@
- {"key", required_argument, NULL, 'K'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {NULL, 0, NULL, '\0'}
- };
-
- while ((c =
-- getopt_long (argc, argv, "fg:hK:op:r", long_options,
-+ getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
- &option_index)) != -1) {
- switch (c) {
- case 'f':
-@@ -440,6 +443,28 @@
- pflg = true;
- group_passwd = optarg;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r':
- rflg = true;
- break;
-diff -urN shadow-4.1.4.3.orig//src/groupdel.c shadow-4.1.4.3//src/groupdel.c
---- shadow-4.1.4.3.orig//src/groupdel.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupdel.c 2011-09-29 11:59:28.386000092 +0100
-@@ -36,6 +36,7 @@
-
- #include <ctype.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <grp.h>
- #include <pwd.h>
- #ifdef ACCT_TOOLS_SETUID
-@@ -59,6 +60,7 @@
-
- static char *group_name;
- static gid_t group_id = -1;
-+static const char *newroot = "";
-
- #ifdef SHADOWGRP
- static bool is_shadow_grp;
-@@ -70,12 +72,14 @@
- /*@-exitarg@*/
- #define E_SUCCESS 0 /* success */
- #define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
- #define E_NOTFOUND 6 /* specified group doesn't exist */
- #define E_GROUP_BUSY 8 /* can't remove user's primary group */
- #define E_GRP_UPDATE 10 /* can't update group file */
-
- /* local function prototypes */
- static void usage (void);
-+static void process_flags (int argc, char **argv);
- static void grp_update (void);
- static void close_files (void);
- static void open_files (void);
-@@ -86,11 +90,78 @@
- */
- static void usage (void)
- {
-- fputs (_("Usage: groupdel group\n"), stderr);
-+ (void) fprintf (stderr,
-+ _("Usage: groupdel [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -g, --group GROUP group name to delete\n"), stderr);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
- exit (E_USAGE);
- }
-
- /*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"group", required_argument, NULL, 'g'},
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "g:R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'g':
-+ group_name = optarg;
-+ break;
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
-+/*
- * grp_update - update group file entries
- *
- * grp_update() writes the new records to the group files.
-@@ -328,14 +399,14 @@
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
- (void) textdomain (PACKAGE);
-
-- if (argc != 2) {
-+ if (argc == 1) {
- usage ();
- }
-
-- group_name = argv[1];
--
- OPENLOG ("groupdel");
-
-+ process_flags (argc, argv);
-+
- #ifdef ACCT_TOOLS_SETUID
- #ifdef USE_PAM
- {
-diff -urN shadow-4.1.4.3.orig//src/groupmod.c shadow-4.1.4.3//src/groupmod.c
---- shadow-4.1.4.3.orig//src/groupmod.c 2011-09-29 12:00:45.212000091 +0100
-+++ shadow-4.1.4.3//src/groupmod.c 2011-09-29 11:59:28.387000092 +0100
-@@ -79,6 +79,7 @@
- static char *group_passwd;
- static gid_t group_id;
- static gid_t group_newid;
-+static char *newroot = "";
-
- struct cleanup_info_mod info_passwd;
- struct cleanup_info_mod info_group;
-@@ -126,6 +127,7 @@
- (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
- " PASSWORD\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
- }
-@@ -346,10 +348,11 @@
- {"new-name", required_argument, NULL, 'n'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {NULL, 0, NULL, '\0'}
- };
- while ((c =
-- getopt_long (argc, argv, "g:hn:op:",
-+ getopt_long (argc, argv, "g:hn:op:R:",
- long_options, &option_index)) != -1) {
- switch (c) {
- case 'g':
-@@ -373,6 +376,28 @@
- group_passwd = optarg;
- pflg = true;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- default:
- usage ();
- }
-diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
---- shadow-4.1.4.3.orig//src/grpconv.c 2011-09-29 12:00:45.213000091 +0100
-+++ shadow-4.1.4.3//src/grpconv.c 2011-09-29 11:59:28.387000092 +0100
-@@ -39,6 +39,7 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <grp.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -50,6 +51,14 @@
- #ifdef SHADOWGRP
- #include "groupio.h"
- #include "sgroupio.h"
-+
-+/*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+
- /*
- * Global variables
- */
-@@ -57,9 +66,12 @@
-
- static bool gr_locked = false;
- static bool sgr_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -82,6 +94,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: grpconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct group *gr;
-@@ -89,9 +172,6 @@
- const struct sgrp *sg;
- struct sgrp sgent;
-
-- if (1 != argc) {
-- (void) fputs (_("Usage: grpconv\n"), stderr);
-- }
- Prog = Basename (argv[0]);
-
- (void) setlocale (LC_ALL, "");
-@@ -100,6 +180,8 @@
-
- OPENLOG ("grpconv");
-
-+ process_flags (argc, argv);
-+
- if (gr_lock () == 0) {
- fprintf (stderr,
- _("%s: cannot lock %s; try again later.\n"),
-diff -urN shadow-4.1.4.3.orig//src/grpunconv.c shadow-4.1.4.3//src/grpunconv.c
---- shadow-4.1.4.3.orig//src/grpunconv.c 2011-09-29 12:00:45.213000091 +0100
-+++ shadow-4.1.4.3//src/grpunconv.c 2011-09-29 11:59:28.387000092 +0100
-@@ -43,6 +43,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <time.h>
- #include <unistd.h>
- #include <grp.h>
-@@ -51,6 +52,14 @@
- #ifdef SHADOWGRP
- #include "groupio.h"
- #include "sgroupio.h"
-+
-+/*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+
- /*
- * Global variables
- */
-@@ -58,9 +67,12 @@
-
- static bool gr_locked = false;
- static bool sgr_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -83,6 +95,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: grpunconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct group *gr;
-@@ -100,6 +183,8 @@
-
- OPENLOG ("grpunconv");
-
-+ process_flags (argc, argv);
-+
- if (sgr_file_present () == 0) {
- exit (0); /* no /etc/gshadow, nothing to do */
- }
-diff -urN shadow-4.1.4.3.orig//src/passwd.c shadow-4.1.4.3//src/passwd.c
---- shadow-4.1.4.3.orig//src/passwd.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/passwd.c 2011-09-29 11:59:28.388000092 +0100
-@@ -75,6 +75,7 @@
- static char *name; /* The name of user whose password is being changed */
- static char *myname; /* The current user's name */
- static bool amroot; /* The caller's real UID was 0 */
-+static const char *newroot = "";
-
- static bool
- aflg = false, /* -a - show status for all users */
-@@ -174,6 +175,7 @@
- " -n, --mindays MIN_DAYS set minimum number of days before password\n"
- " change to MIN_DAYS\n"
- " -q, --quiet quiet mode\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- " -r, --repository REPOSITORY change password in REPOSITORY repository\n"
- " -S, --status report password status on the named account\n"
- " -u, --unlock unlock the password of the named account\n"
-@@ -803,6 +805,7 @@
- {"lock", no_argument, NULL, 'l'},
- {"mindays", required_argument, NULL, 'n'},
- {"quiet", no_argument, NULL, 'q'},
-+ {"root", required_argument, NULL, 'R'},
- {"repository", required_argument, NULL, 'r'},
- {"status", no_argument, NULL, 'S'},
- {"unlock", no_argument, NULL, 'u'},
-@@ -811,7 +814,7 @@
- {NULL, 0, NULL, '\0'}
- };
-
-- while ((c = getopt_long (argc, argv, "adei:kln:qr:Suw:x:",
-+ while ((c = getopt_long (argc, argv, "adei:kln:qR:r:Suw:x:",
- long_options, &option_index)) != -1) {
- switch (c) {
- case 'a':
-@@ -858,6 +861,28 @@
- case 'q':
- qflg = true; /* ok for users */
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r':
- /* -r repository (files|nis|nisplus) */
- /* only "files" supported for now */
-diff -urN shadow-4.1.4.3.orig//src/pwconv.c shadow-4.1.4.3//src/pwconv.c
---- shadow-4.1.4.3.orig//src/pwconv.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/pwconv.c 2011-09-29 11:59:28.388000092 +0100
-@@ -59,6 +59,7 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#include <getopt.h>
- #include <pwd.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -79,6 +80,7 @@
- #define E_SUCCESS 0 /* success */
- #define E_NOPERM 1 /* permission denied */
- #define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
- #define E_FAILURE 3 /* unexpected failure, nothing done */
- #define E_MISSING 4 /* unexpected failure, passwd file missing */
- #define E_PWDBUSY 5 /* passwd file(s) busy */
-@@ -90,9 +92,12 @@
-
- static bool spw_locked = false;
- static bool pw_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -115,6 +120,77 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: pwconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-+
- int main (int argc, char **argv)
- {
- const struct passwd *pw;
-@@ -122,9 +198,6 @@
- const struct spwd *sp;
- struct spwd spent;
-
-- if (1 != argc) {
-- (void) fputs (_("Usage: pwconv\n"), stderr);
-- }
- Prog = Basename (argv[0]);
-
- (void) setlocale (LC_ALL, "");
-@@ -133,6 +206,8 @@
-
- OPENLOG ("pwconv");
-
-+ process_flags (argc, argv);
-+
- if (pw_lock () == 0) {
- fprintf (stderr,
- _("%s: cannot lock %s; try again later.\n"),
-diff -urN shadow-4.1.4.3.orig//src/pwunconv.c shadow-4.1.4.3//src/pwunconv.c
---- shadow-4.1.4.3.orig//src/pwunconv.c 2011-09-29 12:00:45.214000091 +0100
-+++ shadow-4.1.4.3//src/pwunconv.c 2011-09-29 11:59:28.388000092 +0100
-@@ -35,6 +35,7 @@
- #ident "$Id: pwunconv.c 2852 2009-04-30 21:44:35Z nekral-guest $"
-
- #include <fcntl.h>
-+#include <getopt.h>
- #include <pwd.h>
- #include <stdio.h>
- #include <sys/types.h>
-@@ -46,15 +47,24 @@
- #include "shadowio.h"
-
- /*
-+ * exit status values
-+ */
-+/*@-exitarg@*/
-+#define E_USAGE 2 /* invalid command syntax */
-+#define E_BAD_ARG 3 /* invalid argument to option */
-+/*
- * Global variables
- */
- char *Prog;
-
- static bool spw_locked = false;
- static bool pw_locked = false;
-+static const char *newroot = "";
-
- /* local function prototypes */
- static void fail_exit (int status);
-+static void usage (void);
-+static void process_flags (int argc, char **argv);
-
- static void fail_exit (int status)
- {
-@@ -75,6 +85,76 @@
- exit (status);
- }
-
-+/*
-+ * usage - display usage message and exit
-+ */
-+static void usage (void)
-+{
-+ (void) fprintf (stderr,
-+ _("Usage: pwunconv [options]\n"
-+ "\n"
-+ "Options:\n"),
-+ Prog);
-+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
-+ (void) fputs ("\n", stderr);
-+ exit (E_USAGE);
-+}
-+
-+/*
-+ * process_flags - perform command line argument setting
-+ *
-+ * process_flags() interprets the command line arguments and sets
-+ * the values that the user will be created with accordingly. The
-+ * values are checked for sanity.
-+ */
-+static void process_flags (int argc, char **argv)
-+{
-+ {
-+ /*
-+ * Parse the command line options.
-+ */
-+ int c;
-+ static struct option long_options[] = {
-+ {"help", no_argument, NULL, 'h'},
-+ {"root", required_argument, NULL, 'R'},
-+ {NULL, 0, NULL, '\0'}
-+ };
-+ while ((c = getopt_long (argc, argv,
-+ "R:",
-+ long_options, NULL)) != -1) {
-+ switch (c) {
-+ case 'h':
-+ usage ();
-+ break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ default:
-+ usage ();
-+ }
-+ }
-+ }
-+}
-
- int main (int argc, char **argv)
- {
-@@ -93,6 +173,8 @@
-
- OPENLOG ("pwunconv");
-
-+ process_flags (argc, argv);
-+
- if (!spw_file_present ()) {
- /* shadow not installed, do nothing */
- exit (0);
-diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3//src/useradd.c
---- shadow-4.1.4.3.orig//src/useradd.c 2011-09-29 12:00:45.215000091 +0100
-+++ shadow-4.1.4.3//src/useradd.c 2011-09-29 11:59:28.520000092 +0100
-@@ -112,6 +112,7 @@
- #ifdef WITH_SELINUX
- static const char *user_selinux = "";
- #endif
-+static const char *newroot = "";
-
- static long user_expire = -1;
- static bool is_shadow_pwd;
-@@ -189,6 +190,7 @@
- static void new_spent (struct spwd *);
- static void grp_update (void);
-
-+static void process_root_flag (int argc, char **argv);
- static void process_flags (int argc, char **argv);
- static void close_files (void);
- static void open_files (void);
-@@ -711,6 +713,7 @@
- (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
- " (non-unique) UID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
-+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
- (void) fputs (_(" -u, --uid UID user ID of the new account\n"), stderr);
-@@ -943,6 +946,57 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ('/' != root[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - perform command line argument setting
- *
- * process_flags() interprets the command line arguments and sets
-@@ -978,6 +1032,7 @@
- {"no-user-group", no_argument, NULL, 'N'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {"shell", required_argument, NULL, 's'},
- #ifdef WITH_SELINUX
-@@ -989,9 +1044,9 @@
- };
- while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
- #else
-- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -1156,6 +1211,9 @@
- }
- user_pass = optarg;
- break;
-+ case 'R':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 'r':
- rflg = true;
- break;
-@@ -1735,6 +1793,36 @@
- }
- }
- #endif
-+
-+/*
-+ * mkdir_p - create directories, including parent directories when needed
-+ *
-+ * similar to mkdir -p
-+ */
-+void mkdir_p(const char *path) {
-+ int len = strlen(path);
-+ char newdir[len + 1];
-+ mode_t mode = 0755;
-+ int i = 0;
-+
-+ if (path[i] == '\0') {
-+ return;
-+ }
-+
-+ /* skip the leading '/' */
-+ i++;
-+
-+ while(path[i] != '\0') {
-+ if (path[i] == '/') {
-+ strncpy(newdir, path, i);
-+ newdir[i] = '\0';
-+ mkdir(newdir, mode);
-+ }
-+ i++;
-+ }
-+ mkdir(path, mode);
-+}
-+
- /*
- * create_home - create the user's home directory
- *
-@@ -1748,34 +1836,31 @@
- #ifdef WITH_SELINUX
- selinux_file_context (user_home);
- #endif
-- /* XXX - create missing parent directories. --marekm */
-- if (mkdir (user_home, 0) != 0) {
-- fprintf (stderr,
-- _("%s: cannot create directory %s\n"),
-- Prog, user_home);
--#ifdef WITH_AUDIT
-- audit_logger (AUDIT_ADD_USER, Prog,
-- "adding home directory",
-- user_name, (unsigned int) user_id,
-- SHADOW_AUDIT_FAILURE);
--#endif
-- fail_exit (E_HOMEDIR);
-- }
-- chown (user_home, user_id, user_gid);
-- chmod (user_home,
-- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
-- home_added = true;
-+ mkdir_p(user_home);
-+ }
-+ if (access (user_home, F_OK) != 0) {
- #ifdef WITH_AUDIT
- audit_logger (AUDIT_ADD_USER, Prog,
- "adding home directory",
- user_name, (unsigned int) user_id,
-- SHADOW_AUDIT_SUCCESS);
-+ SHADOW_AUDIT_FAILURE);
-+#endif
-+ fail_exit (E_HOMEDIR);
-+ }
-+ chown (user_home, user_id, user_gid);
-+ chmod (user_home,
-+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
-+ home_added = true;
-+#ifdef WITH_AUDIT
-+ audit_logger (AUDIT_ADD_USER, Prog,
-+ "adding home directory",
-+ user_name, (unsigned int) user_id,
-+ SHADOW_AUDIT_SUCCESS);
- #endif
- #ifdef WITH_SELINUX
-- /* Reset SELinux to create files with default contexts */
-- setfscreatecon (NULL);
-+ /* Reset SELinux to create files with default contexts */
-+ setfscreatecon (NULL);
- #endif
-- }
- }
-
- /*
-@@ -1861,6 +1946,7 @@
- */
- user_groups[0] = (char *) 0;
-
-+ process_root_flag (argc, argv);
-
- is_shadow_pwd = spw_file_present ();
- #ifdef SHADOWGRP
-diff -urN shadow-4.1.4.3.orig//src/userdel.c shadow-4.1.4.3//src/userdel.c
---- shadow-4.1.4.3.orig//src/userdel.c 2011-09-29 12:00:45.216000091 +0100
-+++ shadow-4.1.4.3//src/userdel.c 2011-09-29 11:59:28.389000092 +0100
-@@ -79,6 +79,7 @@
- static char *user_name;
- static uid_t user_id;
- static char *user_home;
-+static const char *newroot = "";
-
- static bool fflg = false;
- static bool rflg = false;
-@@ -119,6 +120,7 @@
- " -f, --force force removal of files,\n"
- " even if not owned by user\n"
- " -h, --help display this help message and exit\n"
-+ " -R, --root CHROOT_DIR directory to chroot into\n"
- " -r, --remove remove home directory and mail spool\n"
- "\n"), stderr);
- exit (E_USAGE);
-@@ -768,12 +770,34 @@
- {"remove", no_argument, NULL, 'r'},
- {NULL, 0, NULL, '\0'}
- };
-- while ((c = getopt_long (argc, argv, "fhr",
-+ while ((c = getopt_long (argc, argv, "fhR:r",
- long_options, NULL)) != -1) {
- switch (c) {
- case 'f': /* force remove even if not owned by user */
- fflg = true;
- break;
-+ case 'R':
-+ if ('/' != optarg[0]) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, optarg);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = optarg;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
- case 'r': /* remove home dir and mailbox */
- rflg = true;
- break;
-diff -urN shadow-4.1.4.3.orig//src/usermod.c shadow-4.1.4.3//src/usermod.c
---- shadow-4.1.4.3.orig//src/usermod.c 2011-09-29 12:00:45.216000091 +0100
-+++ shadow-4.1.4.3//src/usermod.c 2011-09-29 11:59:28.390000092 +0100
-@@ -110,6 +110,7 @@
- static long user_newinactive;
- static long sys_ngroups;
- static char **user_groups; /* NULL-terminated list */
-+static const char *newroot = "";
-
- static bool
- aflg = false, /* append to existing secondary group set */
-@@ -164,6 +165,7 @@
- #endif
- static void grp_update (void);
-
-+static void process_root_flag (int, char **);
- static void process_flags (int, char **);
- static void close_files (void);
- static void open_files (void);
-@@ -323,6 +325,7 @@
- " new location (use only with -d)\n"
- " -o, --non-unique allow using duplicate (non-unique) UID\n"
- " -p, --password PASSWORD use encrypted password for the new password\n"
-+ " -R --root CHROOT_DIR directory to chroot into\n"
- " -s, --shell SHELL new login shell for the user account\n"
- " -u, --uid UID new UID for the user account\n"
- " -U, --unlock unlock the user account\n"
-@@ -802,6 +805,58 @@
- }
-
- /*
-+ * process_root_flag - chroot if given the --root option
-+ *
-+ * We do this outside of process_flags() because
-+ * the is_shadow_pwd boolean needs to be set before
-+ * process_flags(), and if we do need to chroot() we
-+ * must do so before is_shadow_pwd gets set.
-+ */
-+static void process_root_flag (int argc, char **argv)
-+{
-+ /*
-+ * Parse the command line options.
-+ */
-+ int i;
-+ char *root;
-+
-+ for (i = 0; i < argc; i++) {
-+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
-+ if (i + 1 == argc) {
-+ fprintf (stderr,
-+ _("%s: option '%s' requires an argument\n"),
-+ Prog, argv[i]);
-+ exit (E_BAD_ARG);
-+ }
-+ root = argv[i + 1];
-+
-+ if ( (!VALID (root) )
-+ || ( ('/' != root[0]) ) ) {
-+ fprintf (stderr,
-+ _("%s: invalid chroot path '%s'\n"),
-+ Prog, root);
-+ exit (E_BAD_ARG);
-+ }
-+ newroot = root;
-+
-+ if (access (newroot, F_OK) != 0) {
-+ fprintf(stderr,
-+ _("%s: chroot directory %s does not exist\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ if ( chroot(newroot) != 0 ) {
-+ fprintf(stderr,
-+ _("%s: unable to chroot to directory %s\n"),
-+ Prog, newroot);
-+ exit (E_BAD_ARG);
-+ }
-+ break;
-+ }
-+ }
-+}
-+
-+/*
- * process_flags - perform command line argument setting
- *
- * process_flags() interprets the command line arguments and sets the
-@@ -895,6 +950,7 @@
- {"move-home", no_argument, NULL, 'm'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
-+ {"root", required_argument, NULL, 'R'},
- #ifdef WITH_SELINUX
- {"selinux-user", required_argument, NULL, 'Z'},
- #endif
-@@ -905,9 +961,9 @@
- };
- while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "ac:d:e:f:g:G:hl:Lmop:s:u:UZ:",
-+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
- #else
-- "ac:d:e:f:g:G:hl:Lmop:s:u:U",
-+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -999,6 +1055,9 @@
- user_pass = optarg;
- pflg = true;
- break;
-+ case 'R':
-+ /* no-op since we handled this in process_root_flag() earlier */
-+ break;
- case 's':
- if (!VALID (optarg)) {
- fprintf (stderr,
-@@ -1715,6 +1774,8 @@
-
- OPENLOG ("usermod");
-
-+ process_root_flag (argc, argv);
-+
- is_shadow_pwd = spw_file_present ();
- #ifdef SHADOWGRP
- is_shadow_grp = sgr_file_present ();
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
index eafb935a3a..68da25f406 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
@@ -3,20 +3,19 @@ Upstream-Status: Inappropriate [OE specific]
Allow for setting password in clear text.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
---
src/Makefile.am | 8 ++++----
src/groupadd.c | 8 +++++++-
- src/groupmod.c | 9 ++++++++-
+ src/groupmod.c | 8 +++++++-
src/useradd.c | 9 +++++++--
- src/usermod.c | 10 ++++++++--
- 5 files changed, 34 insertions(+), 10 deletions(-)
+ src/usermod.c | 8 +++++++-
+ 5 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 6a3b4c5..1ffdbc6 100644
+index 25e288d..856b087 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -76,10 +76,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
+@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
@@ -29,47 +28,46 @@ index 6a3b4c5..1ffdbc6 100644
grpck_LDADD = $(LDADD) $(LIBSELINUX)
grpconv_LDADD = $(LDADD) $(LIBSELINUX)
grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
-@@ -99,9 +99,9 @@ su_SOURCES = \
+@@ -111,9 +111,9 @@ su_SOURCES = \
suauth.c
su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
sulogin_LDADD = $(LDADD) $(LIBCRYPT)
--useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
- userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
--usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
+ userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE)
+-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
vipw_LDADD = $(LDADD) $(LIBSELINUX)
install-am: all-am
diff --git a/src/groupadd.c b/src/groupadd.c
-index 66b38de..3157486 100644
+index f716f57..4e28c26 100644
--- a/src/groupadd.c
+++ b/src/groupadd.c
-@@ -124,6 +124,7 @@ static void usage (void)
+@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
- " (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear text password for the new group\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs ("\n", stderr);
-@@ -388,13 +389,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'},
+ " (non-unique) GID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
+ {"key", required_argument, NULL, 'K'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
-+ getopt_long (argc, argv, "fg:hK:op:P:R:r", long_options,
- &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'f':
-@@ -446,6 +448,10 @@ static void process_flags (int argc, char **argv)
+@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
pflg = true;
group_passwd = optarg;
break;
@@ -77,37 +75,35 @@ index 66b38de..3157486 100644
+ pflg = true;
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'r':
+ rflg = true;
+ break;
diff --git a/src/groupmod.c b/src/groupmod.c
-index 27eb159..17acbc3 100644
+index d9d3807..68f49d1 100644
--- a/src/groupmod.c
+++ b/src/groupmod.c
-@@ -127,6 +127,8 @@ static void usage (void)
- (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
+@@ -127,6 +127,7 @@ static void usage (int status)
+ (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
- " PASSWORD\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this (clear text)\n"
-+ " PASSWORD\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
-@@ -348,11 +350,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'},
+ " PASSWORD\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+ exit (status);
+@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
+ {"new-name", required_argument, NULL, 'n'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "g:hn:op:R:",
-+ getopt_long (argc, argv, "g:hn:op:P:R:",
- long_options, &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "g:hn:op:R:",
++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'g':
-@@ -376,6 +379,10 @@ static void process_flags (int argc, char **argv)
+@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
group_passwd = optarg;
pflg = true;
break;
@@ -115,84 +111,81 @@ index 27eb159..17acbc3 100644
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
+ default:
diff --git a/src/useradd.c b/src/useradd.c
-index 2102630..390909c 100644
+index b3bd451..4416f90 100644
--- a/src/useradd.c
+++ b/src/useradd.c
-@@ -716,6 +716,7 @@ static void usage (void)
+@@ -773,6 +773,7 @@ static void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
- " (non-unique) UID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD clear text password of the new account\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
-@@ -1035,6 +1036,7 @@ static void process_flags (int argc, char **argv)
- {"no-user-group", no_argument, NULL, 'N'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout);
+@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
+ {"no-user-group", no_argument, NULL, 'N'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {"shell", required_argument, NULL, 's'},
-@@ -1047,9 +1049,9 @@ static void process_flags (int argc, char **argv)
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:UZ:",
- #else
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:U",
- #endif
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
+ #else /* !WITH_SELINUX */
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
+ #endif /* !WITH_SELINUX */
long_options, NULL)) != -1) {
switch (c) {
-@@ -1214,6 +1216,9 @@ static void process_flags (int argc, char **argv)
+@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
}
user_pass = optarg;
break;
-+ case 'P': /* set clear text password */
++ case 'P': /* set clear text password */
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'r':
+ rflg = true;
break;
diff --git a/src/usermod.c b/src/usermod.c
-index 8363597..f4c1cee 100644
+index e7d4351..b79f7a3 100644
--- a/src/usermod.c
+++ b/src/usermod.c
-@@ -325,6 +325,7 @@ static void usage (void)
- " new location (use only with -d)\n"
- " -o, --non-unique allow using duplicate (non-unique) UID\n"
- " -p, --password PASSWORD use encrypted password for the new password\n"
-+ " -P, --clear-password PASSWORD use clear text password for the new password\n"
- " -R --root CHROOT_DIR directory to chroot into\n"
- " -s, --shell SHELL new login shell for the user account\n"
- " -u, --uid UID new UID for the user account\n"
-@@ -950,6 +951,7 @@ static void process_flags (int argc, char **argv)
- {"move-home", no_argument, NULL, 'm'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
+ " new location (use only with -d)\n"), usageout);
+ (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
+ (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout);
+@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
+ {"move-home", no_argument, NULL, 'm'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- #ifdef WITH_SELINUX
- {"selinux-user", required_argument, NULL, 'Z'},
-@@ -961,9 +963,9 @@ static void process_flags (int argc, char **argv)
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+ {"uid", required_argument, NULL, 'u'},
+@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
+ {NULL, 0, NULL, '\0'}
};
while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UZ:",
- #else
-- "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",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -1055,6 +1057,10 @@ static void process_flags (int argc, char **argv)
+- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
+ #ifdef ENABLE_SUBIDS
+ "v:w:V:W:"
+ #endif /* ENABLE_SUBIDS */
+@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
user_pass = optarg;
pflg = true;
break;
@@ -200,9 +193,9 @@ index 8363597..f4c1cee 100644
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'R': /* no-op, handled in process_root_flag () */
break;
+ case 's':
--
1.7.9.5
diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
new file mode 100644
index 0000000000..185590cabd
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
@@ -0,0 +1,41 @@
+From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <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/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
new file mode 100644
index 0000000000..4fa3d184ed
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Inappropriate [OE specific]
+
+commonio.c: fix unexpected open failure in chroot environment
+
+When using commands with '-R <newroot>' option in our pseudo environment,
+we would usually get the 'Pemission Denied' error. This patch serves as
+a workaround to this problem.
+
+Note that this patch doesn't change the logic in the code, it just expands
+the codes.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lib/commonio.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/lib/commonio.c b/lib/commonio.c
+index cc536bf..51cafd9 100644
+--- a/lib/commonio.c
++++ b/lib/commonio.c
+@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode)
+ db->cursor = NULL;
+ db->changed = false;
+
+- fd = open (db->filename,
+- (db->readonly ? O_RDONLY : O_RDWR)
+- | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
+- saved_errno = errno;
++ if (db->readonly) {
++ fd = open (db->filename,
++ (true ? O_RDONLY : O_RDWR)
++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++ saved_errno = errno;
++ } else {
++ fd = open (db->filename,
++ (false ? O_RDONLY : O_RDWR)
++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++ saved_errno = errno;
++ }
++
+ db->fp = NULL;
+ if (fd >= 0) {
+ #ifdef WITH_TCB
+--
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
deleted file mode 100644
index 80ebdc22a4..0000000000
--- a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-shadow: Fix parsing of gshadow entries
-
-Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096]
-
-newgrp command does not function properly.
-Even with the valid password, it outputs: "'Invalid password'"
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
-
-2010-02-14 Michael Bunk <mb@computer-leipzig.com>
-
- * NEWS, lib/gshadow.c: Fix parsing of gshadow entries.
-
-diff -urpN a/lib/gshadow.c b/lib/gshadow.c
---- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800
-+++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800
-@@ -222,6 +222,7 @@ void endsgent (void)
- if (NULL == buf) {
- return NULL;
- }
-+ buflen = BUFSIZ;
- }
-
- if (NULL == fp) {
-@@ -229,9 +230,9 @@ void endsgent (void)
- }
-
- #ifdef USE_NIS
-- while (fgetsx (buf, (int) sizeof buf, fp) == buf)
-+ while (fgetsx (buf, (int) buflen, fp) == buf)
- #else
-- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
-+ if (fgetsx (buf, (int) buflen, fp) == buf)
- #endif
- {
- while ( ((cp = strrchr (buf, '\n')) == NULL)
diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000000..02cb91aafd
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Subject: fix installation failure with subids disabled
+
+Signed-off-by: Chen Qi <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/securetty b/meta/recipes-extended/shadow/files/securetty
index 0b1629f143..2be341a216 100644
--- a/meta/recipes-extended/shadow/files/securetty
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -9,23 +9,46 @@ ttyS2
ttyS3
# ARM AMBA SoCs
+ttyAM0
+ttyAM1
+ttyAM2
+ttyAM3
ttyAMA0
ttyAMA1
ttyAMA2
ttyAMA3
+# QCOM Socs
+ttyHSL0
+ttyHSL1
+ttyHSL2
+ttyHSL3
+ttyMSM0
+ttyMSM1
+ttyMSM2
+
# Samsung ARM SoCs
ttySAC0
ttySAC1
ttySAC2
ttySAC3
+# STM SoCs
+ttyAS0
+ttyAS1
+ttyAS2
+ttyAS3
+
# TI OMAP SoCs
ttyO0
ttyO1
ttyO2
ttyO3
+# Xilinx Zynq SoC
+ttyPS0
+ttyPS1
+
# USB dongles
ttyUSB0
ttyUSB1
@@ -137,6 +160,14 @@ ttymxc3
ttymxc4
ttymxc5
+# Freescale lpuart ports
+ttyLP0
+ttyLP1
+ttyLP2
+ttyLP3
+ttyLP4
+ttyLP5
+
# Standard serial ports, with devfs
tts/0
tts/1
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
deleted file mode 100644
index 651474674b..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/283725
-https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/libmisc/env.c
-===================================================================
---- shadow-4.1.4.2.orig/libmisc/env.c 2009-04-27 13:07:56.000000000 -0700
-+++ shadow-4.1.4.2/libmisc/env.c 2010-06-03 17:44:51.456408474 -0700
-@@ -251,7 +251,7 @@ void sanitize_env (void)
- if (strncmp (*cur, *bad, strlen (*bad)) != 0) {
- continue;
- }
-- if (strchr (*cur, '/') != NULL) {
-+ if (strchr (*cur, '/') == NULL) {
- continue; /* OK */
- }
- for (move = cur; NULL != *move; move++) {
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
deleted file mode 100644
index 640200b796..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/300790
-http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html
-
-2009-11-05 Nicolas François <nicolas.francois@centraliens.net>
-
- * NEWS, src/groupmod.c: Fixed groupmod when configured with
- --enable-account-tools-setuid.
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/src/groupmod.c
-===================================================================
---- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700
-+++ shadow-4.1.4.2/src/groupmod.c 2010-06-03 17:45:43.828952613 -0700
-@@ -720,7 +720,7 @@ int main (int argc, char **argv)
- {
- struct passwd *pampw;
- pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
-- if (NULL == pamh) {
-+ if (NULL == pampw) {
- fprintf (stderr,
- _("%s: Cannot determine your user name.\n"),
- Prog);
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
deleted file mode 100644
index 0dc4d75b97..0000000000
--- a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# commit message copied from openembedded:
-# commit 246c80637b135f3a113d319b163422f98174ee6c
-# Author: Khem Raj <raj.khem@gmail.com>
-# Date: Wed Jun 9 13:37:03 2010 -0700
-#
-# shadow-4.1.4.2: Add patches to support dots in login id.
-#
-# Signed-off-by: Khem Raj <raj.khem@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
-
-http://bugs.gentoo.org/show_bug.cgi?id=301957
-https://alioth.debian.org/scm/browser.php?group_id=30580
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: shadow-4.1.4.2/src/su.c
-===================================================================
---- shadow-4.1.4.2.orig/src/su.c 2009-07-23 13:38:56.000000000 -0700
-+++ shadow-4.1.4.2/src/su.c 2010-06-03 17:46:47.718944010 -0700
-@@ -378,7 +378,7 @@ int main (int argc, char **argv)
- #endif
- #endif /* !USE_PAM */
-
-- sanitize_env ();
-+ /* sanitize_env (); */
-
- (void) setlocale (LC_ALL, "");
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
diff --git a/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch b/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
deleted file mode 100644
index a793f09a4e..0000000000
--- a/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-# patch is from openembedded:
-# commit 2db61370333f7a2fc1dbb86385734883387e0217
-# Author: Martin Jansa <Martin.Jansa@gmail.com>
-# Date: Fri Apr 2 07:34:46 2010 +0200
-#
-# shadow: fix do_install with automake-1.11
-#
-# Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-#
-# comment added by Kevin Tian <kevin.tian@intel.com>
-
-man_nopan is for !USE_PAM already included in man_MANS and automake-1.11 hates to install some file twice
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -uNr shadow-4.1.4.2.orig/man/Makefile.am shadow-4.1.4.2/man/Makefile.am
---- shadow-4.1.4.2.orig/man/Makefile.am 2009-03-14 15:40:10.000000000 +0100
-+++ shadow-4.1.4.2/man/Makefile.am 2010-04-02 07:31:17.000000000 +0200
-@@ -163,7 +163,6 @@
- $(man_MANS) \
- $(man_XMANS) \
- $(addprefix login.defs.d/,$(login_defs_v)) \
-- $(man_nopam) \
- id.1 \
- id.1.xml \
- sulogin.8 \
-diff -uNr shadow-4.1.4.2.orig/man/fr/Makefile.am shadow-4.1.4.2/man/fr/Makefile.am
---- shadow-4.1.4.2.orig/man/fr/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/fr/Makefile.am 2010-04-02 07:42:11.000000000 +0200
-@@ -52,7 +52,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1
-
- include ../generate_translations.mak
-diff -uNr shadow-4.1.4.2.orig/man/it/Makefile.am shadow-4.1.4.2/man/it/Makefile.am
---- shadow-4.1.4.2.orig/man/it/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/it/Makefile.am 2010-04-02 07:42:20.000000000 +0200
-@@ -46,7 +46,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- logoutd.8
-
-diff -uNr shadow-4.1.4.2.orig/man/ja/Makefile.am shadow-4.1.4.2/man/ja/Makefile.am
---- shadow-4.1.4.2.orig/man/ja/Makefile.am 2007-12-31 17:48:28.000000000 +0100
-+++ shadow-4.1.4.2/man/ja/Makefile.am 2010-04-02 07:42:17.000000000 +0200
-@@ -49,7 +49,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- shadow.3 \
- sulogin.8
-diff -uNr shadow-4.1.4.2.orig/man/pl/Makefile.am shadow-4.1.4.2/man/pl/Makefile.am
---- shadow-4.1.4.2.orig/man/pl/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/pl/Makefile.am 2010-04-02 07:42:07.000000000 +0200
-@@ -49,7 +49,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- getspnam.3 \
- id.1 \
- shadow.3 \
-diff -uNr shadow-4.1.4.2.orig/man/ru/Makefile.am shadow-4.1.4.2/man/ru/Makefile.am
---- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:39:00.000000000 +0200
-+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:42:01.000000000 +0200
-@@ -54,7 +54,6 @@
-
- EXTRA_DIST = \
- $(man_MANS) \
-- $(man_nopam) \
- id.1 \
- sulogin.8
-
-diff -uNr shadow-4.1.4.2.orig/man/sv/Makefile.am shadow-4.1.4.2/man/sv/Makefile.am
---- shadow-4.1.4.2.orig/man/sv/Makefile.am 2008-09-06 18:44:45.000000000 +0200
-+++ shadow-4.1.4.2/man/sv/Makefile.am 2010-04-02 07:42:24.000000000 +0200
-@@ -53,8 +53,7 @@
- endif
-
- EXTRA_DIST = \
-- $(man_MANS) \
-- $(man_nopam)
-+ $(man_MANS)
-
- include ../generate_translations.mak
-
---- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:54:09.000000000 +0200
-+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:51:57.000000000 +0200
-@@ -1,7 +1,6 @@
- mandir = @mandir@/ru
-
- man_MANS = \
-- $(man_nopam) \
- chage.1 \
- chfn.1 \
- chgpasswd.8 \
diff --git a/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch b/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
deleted file mode 100644
index 6a27ed387d..0000000000
--- a/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: pending
-
-Automake 1.12 has deprecated automatic de-ANSI-fication support
-
-This patch avoids this issue with automake 1.12:
-
-| configure.in:22: error: automatic de-ANSI-fication support has been removed
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/02
-
-Index: shadow-4.1.4.3/configure.in
-===================================================================
---- shadow-4.1.4.3.orig/configure.in
-+++ shadow-4.1.4.3/configure.in
-@@ -19,7 +19,6 @@ AC_PROG_CC
- AC_ISC_POSIX
- AC_PROG_LN_S
- AC_PROG_YACC
--AM_C_PROTOTYPES
- AM_PROG_LIBTOOL
-
- dnl Checks for libraries.
diff --git a/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch b/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
deleted file mode 100644
index 7cd45afebb..0000000000
--- a/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-
-This patch is from Slackware, I tried to find the actual
-author to add that attribution. The comment below is the
-best summary, I will not repeat it here.
-
-Upstream-Status: Backport from slackware
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: shadow-4.1.4.3/lib/encrypt.c
-===================================================================
---- shadow-4.1.4.3.orig/lib/encrypt.c
-+++ shadow-4.1.4.3/lib/encrypt.c
-@@ -45,15 +45,40 @@ char *pw_encrypt (const char *clear, con
- static char cipher[128];
- char *cp;
-
-- cp = crypt (clear, salt);
-- if (!cp) {
-- /*
-- * Single Unix Spec: crypt() may return a null pointer,
-- * and set errno to indicate an error. The caller doesn't
-- * expect us to return NULL, so...
-- */
-- perror ("crypt");
-- exit (EXIT_FAILURE);
-+ cp = crypt (clear, salt);
-+ if (!cp) {
-+ /*
-+ * In glibc-2.17 and newer, crypt() will return NULL if
-+ * it was called using an invalid salt format. Previous
-+ * versions of glibc would go ahead and compute a DES hash
-+ * using the invalid salt. The salt value in this case was
-+ * always '!'. We might arrive at this place if either the
-+ * user does not exist, or if the hash in /etc/shadow doesn't
-+ * have the proper magic for one of the supported hash
-+ * formats (for example, if the account was locked using
-+ * "passwd -l". To handle this situation, we will recompute
-+ * the hash using a hardcoded salt as was previously done
-+ * by glibc. The hash returned by the old glibc function
-+ * always began with "!!", which would ensure that it could
-+ * never match an otherwise valid hash in /etc/shadow that
-+ * was disabled with a "!" at the beginning (since the second
-+ * character would never be "!" as well), so we will also
-+ * prepend the resulting hash with "!!". Finally, in case
-+ * crypt() failed for some other reason we will check to see
-+ * if we still get NULL from crypt even with the valid salt
-+ * and will fail if that's the case.
-+ */
-+
-+ /* Recalculate hash using a hardcoded, valid SHA512 salt: */
-+ cp = crypt (clear, "$6$8IIcy/1EPOk/");
-+
-+ if (!cp) {
-+ perror ("crypt");
-+ exit (EXIT_FAILURE);
-+ } else {
-+ sprintf (cipher, "!!%s", cp);
-+ return cipher;
-+ }
- }
-
- /* The GNU crypt does not return NULL if the algorithm is not
diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch
deleted file mode 100644
index ff5016c0bf..0000000000
--- a/meta/recipes-extended/shadow/files/useradd.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Work around a bug introduced with the --root option which was causing
-all other arguments to be ignored.
-
-Upstream-Status: inappropriate
-Signed-off-by: Phil Blundell <philb@gnu.org>
-
---- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100
-+++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100
-@@ -1957,6 +1957,8 @@
-
- get_defaults ();
-
-+ optind = 1;
-+
- process_flags (argc, argv);
-
- #ifdef ACCT_TOOLS_SETUID
diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000000..37dc153fca
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+usermod: fix compilation failure with subids disabled
+
+Signed-off-by: Chen Qi <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.1.4.3.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
index 0e0410043b..c78f888cf4 100644
--- a/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
@@ -9,6 +9,8 @@ PR = "r3"
SRC_URI = "file://securetty"
+S = "${WORKDIR}"
+
# Since SERIAL_CONSOLES is likely to be set from the machine configuration
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
index 697569c47e..697569c47e 100644
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 6848e054b3..bb3a927c17 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -1,50 +1,42 @@
SUMMARY = "Tools to change and administer password and group data"
HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
-SECTION = "base utils"
+SECTION = "base/utils"
LICENSE = "BSD | Artistic-1.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
+LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
DEPENDS = "shadow-native"
DEPENDS_class-native = ""
DEPENDS_class-nativesdk = ""
-SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
- file://shadow.automake-1.11.patch \
- file://shadow_fix_for_automake-1.12.patch \
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
file://shadow-4.1.3-dots-in-usernames.patch \
- file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+ file://usermod-fix-compilation-failure-with-subids-disabled.patch \
+ file://fix-installation-failure-with-subids-disabled.patch \
+ file://0001-su.c-fix-to-exec-command-correctly.patch \
+ file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
+ file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
"
SRC_URI_append_class-target = " \
file://login_defs_pam.sed \
- file://shadow-4.1.4.2-groupmod-pam-check.patch \
- file://shadow-4.1.4.2-su_no_sanitize_env.patch \
file://shadow-update-pam-conf.patch \
- file://slackware_fix_for_glib-2.17_crypt.patch \
- file://fix-etc-gshadow-reading.patch \
"
SRC_URI_append_class-native = " \
- file://add_root_cmd_options.patch \
file://disable-syslog.patch \
- file://useradd.patch \
- file://add_root_cmd_groupmems.patch \
file://allow-for-setting-password-in-clear-text.patch \
+ file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
+ file://0001-useradd.c-create-parent-directories-when-necessary.patch \
"
SRC_URI_append_class-nativesdk = " \
- file://add_root_cmd_options.patch \
file://disable-syslog.patch \
- file://useradd.patch \
- file://add_root_cmd_groupmems.patch \
"
-SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
-SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
-
-PR = "r14"
+SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
+SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41"
# Additional Policy files for PAM
PAM_SRC_URI = "file://pam.d/chfn \
@@ -61,12 +53,14 @@ EXTRA_OECONF += "--without-audit \
--without-libcrack \
--without-selinux \
--with-group-name-max-length=24 \
+ --enable-subordinate-ids=yes \
${NSCDOPT}"
NSCDOPT = ""
NSCDOPT_class-native = "--without-nscd"
NSCDOPT_class-nativesdk = "--without-nscd"
NSCDOPT_libc-uclibc = " --without-nscd"
+NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}"
PAM_PLUGINS = "libpam-runtime \
pam-plugin-faildelay \
@@ -85,6 +79,8 @@ PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG_class-native = ""
PACKAGECONFIG_class-nativesdk = ""
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
RDEPENDS_${PN} = "shadow-securetty \
base-passwd"
@@ -164,13 +160,17 @@ ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
+
pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
- rootarg="--root=$D"
+ rootarg="--root $D"
else
rootarg=""
fi
- pwconv $rootarg
- grpconv $rootarg
+ pwconv $rootarg || exit 1
+ grpconv $rootarg || exit 1
}
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb
index 5675cb8cc9..5675cb8cc9 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.2.1.bb
diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
new file mode 100644
index 0000000000..958fe983c5
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
@@ -0,0 +1,116 @@
+From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001
+From: Zheng Junling <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 | 60 ++++++------------------------------------------------------
+ 1 file changed, 6 insertions(+), 54 deletions(-)
+
+diff --git a/configure b/configure
+index 7a96256..91632f3 100755
+--- a/configure
++++ b/configure
+@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+ /usr/include/iconv,/usr/lib \
+ /usr/iconv/include,/usr/iconv/lib \
+ /usr/include,/usr/lib \
++ /usr/include,/usr/lib64 \
+ /opt/include/iconv,/opt/lib \
+ /opt/iconv/include,/opt/iconv/lib \
+ /opt/include,/opt/lib"
+@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+ xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
+ xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
+ found=0
+- if test -r $xincdir/$xincfile
++ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
+ then
+ for E in $exts
+ do
+- if test -r "$xlibdir/$xlibfile.$E"
++ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
+ then
+- jd_iconv_include_dir="$xincdir"
+- jd_iconv_library_dir="$xlibdir"
++ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
++ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
+ jd_with_iconv_library="yes"
+ found=1
+ break
+@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
+ then
+ ICONV_LIB=""
+ else
+-
+-if test "X$jd_iconv_library_dir" != "X"
+-then
+- if test "X$RPATH" = "X"
+- then
+-
+-case "$host_os" in
+- *linux*|*solaris* )
+- if test "X$GCC" = Xyes
+- then
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-Wl,-R,"
+- else
+- RPATH="-Wl,-R"
+- fi
+- else
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-R "
+- else
+- RPATH="-R"
+- fi
+- fi
+- ;;
+- *osf*|*openbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-rpath,"
+- else
+- RPATH="-rpath "
+- fi
+- ;;
+- *netbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-R"
+- fi
+- ;;
+-esac
+-
+- if test "X$RPATH" != "X"
+- then
+- RPATH="$RPATH$jd_iconv_library_dir"
+- fi
+- else
+- RPATH="$RPATH:$jd_iconv_library_dir"
+- fi
+-fi
+-
++ RPATH=""
+ fi
+
+ ICONV_INC=-I$jd_iconv_include_dir
+--
+1.8.3.4
+
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
index 90ed2d0a47..ed1190ad69 100644
--- a/meta/recipes-extended/slang/slang_2.2.4.bb
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -21,10 +21,13 @@ SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
file://fix-check-pcre.patch \
file://change-char-type-to-signed-char-in-macros.patch \
file://sprintf-bug-concerning-8-bit-characters.patch \
+ file://slang-fix-the-iconv-existence-checking.patch \
"
inherit autotools-brokensep
+CLEANBROKEN = "1"
+
SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
diff --git a/meta/recipes-extended/sudo/files/volatiles.99_sudo b/meta/recipes-extended/sudo/files/volatiles.99_sudo
deleted file mode 100644
index ecb576eaa3..0000000000
--- a/meta/recipes-extended/sudo/files/volatiles.99_sudo
+++ /dev/null
@@ -1 +0,0 @@
-d root root 0755 /var/run/sudo none
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 6de984a9f5..6e9aec824b 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -6,18 +6,20 @@ SECTION = "admin"
LICENSE = "ISC & BSD & Zlib"
LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=69e337d679950e304953813158595256 \
file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \
- file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
- file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
- file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \
- file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
- file://compat/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
+ 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=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \
+ file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
inherit autotools
PACKAGECONFIG ??= ""
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+CONFFILES_${PN} = "${sysconfdir}/sudoers"
+
EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
do_configure_prepend () {
@@ -28,7 +30,7 @@ do_configure_prepend () {
# mksigname/mksiglist are used on build host to generate source files
do_compile_prepend () {
- oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C compat mksigname mksiglist
+ 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
}
# Explicitly create ${localstatedir}/lib before do_install to ensure
diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.11p2.bb
index 46d47817e5..c5e2545c18 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.11p2.bb
@@ -2,12 +2,12 @@ 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://volatiles.99_sudo"
+ "
PAM_SRC_URI = "file://sudo.pam"
-SRC_URI[md5sum] = "fcd8d0d9f9f0397d076ee901e242ed39"
-SRC_URI[sha256sum] = "6eda135fa68163108f1c24de6975de5ddb09d75730bb62d6390bda7b04345400"
+SRC_URI[md5sum] = "84012b4871b6c775c957cd310d5bad87"
+SRC_URI[sha256sum] = "8133849418fa18cf6b6bb6893d1855ff7afe21db8923234a00bf045c90fba1ad"
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
@@ -22,9 +22,8 @@ do_install_append () {
chmod 4111 ${D}${bindir}/sudo
chmod 0440 ${D}${sysconfdir}/sudoers
- # Explicitly remove the ${localstatedir}/run directory as we can
- # manage it by a configuration file under ${sysconfdir}/default/volatiles/
+ # Explicitly remove the ${localstatedir}/run directory to avoid QA error
rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
- install -d ${D}/${sysconfdir}/default/volatiles
- install -m 644 ${WORKDIR}/volatiles.99_sudo ${D}/${sysconfdir}/default/volatiles/99_sudo
}
+
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
new file mode 100644
index 0000000000..975ecc2b63
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
@@ -0,0 +1,4 @@
+require sysklogd.inc
+
+SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8"
+SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
deleted file mode 100644
index 5c9588945d..0000000000
--- a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require sysklogd.inc
-PR = "r7"
-
-SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
-SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 09a5d28d4a..566cb08fc2 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -4,7 +4,7 @@ HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
LICENSE = "GPLv2+"
SECTION = "console/utils"
-SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \
+SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
file://99_sysstat \
"
diff --git a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
deleted file mode 100644
index 654457dbe1..0000000000
--- a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-SRC_URI[md5sum] = "039dcd235dfcfb3d4acc0a05730f9512"
-SRC_URI[sha256sum] = "3bfd1b4c5b99314585709c092096234b6e181741729f601d18d0ed7f0612612a"
diff --git a/meta/recipes-extended/sysstat/sysstat_11.0.2.bb b/meta/recipes-extended/sysstat/sysstat_11.0.2.bb
new file mode 100644
index 0000000000..ce83f4f0f9
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_11.0.2.bb
@@ -0,0 +1,6 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI[md5sum] = "27d4ca66869dce132ace3194dd7d7539"
+SRC_URI[sha256sum] = "acd87fdfbe7c796480f14fc26119d8f785d26827d74a0f5bced6c492a91f1b96"
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb b/meta/recipes-extended/tar/tar-replacement-native_1.28.bb
index 071ede765b..071ede765b 100644
--- a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb
+++ b/meta/recipes-extended/tar/tar-replacement-native_1.28.bb
diff --git a/meta/recipes-extended/tar/tar_1.27.1.bb b/meta/recipes-extended/tar/tar_1.28.bb
index 439bb500b9..a15b4b60e3 100644
--- a/meta/recipes-extended/tar/tar_1.27.1.bb
+++ b/meta/recipes-extended/tar/tar_1.28.bb
@@ -5,6 +5,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI += "file://remove-gets.patch \
"
-
-SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf"
-SRC_URI[sha256sum] = "9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6"
+SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
+SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
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 c7954e7ccd..4d6430634e 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -87,10 +87,12 @@ do_install () {
oe_libinstall -a libwrap ${D}${libdir}
oe_libinstall -C shared -so libwrap ${D}${base_libdir}
- rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
- libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
- ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
- rm -f ${D}${base_libdir}/libwrap.so
+ if [ "${libdir}" != "${base_libdir}" ] ; then
+ rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+ libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
+ ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
+ rm -f ${D}${base_libdir}/libwrap.so
+ fi
install -d ${D}${sbindir}
for b in ${BINS}; do
@@ -117,5 +119,10 @@ do_install () {
install -d ${D}${includedir}
install -m 0644 tcpd.h ${D}${includedir}/
+
+ install -d ${D}${sysconfdir}
+ touch ${D}${sysconfdir}/hosts.allow
+ touch ${D}${sysconfdir}/hosts.deny
}
+FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny"
diff --git a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
deleted file mode 100644
index d1c9fe5746..0000000000
--- a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: texi2html-5.0/po_document/Makefile.in.in
-===================================================================
---- texi2html-5.0.orig/po_document/Makefile.in.in
-+++ texi2html-5.0/po_document/Makefile.in.in
-@@ -9,7 +9,7 @@
- # General Public License and is *not* in the public domain.
- #
- # Origin: gettext-0.17
--GETTEXT_MACRO_VERSION = 0.17
-+GETTEXT_MACRO_VERSION = 0.18
-
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
-Index: texi2html-5.0/po_messages/Makefile.in.in
-===================================================================
---- texi2html-5.0.orig/po_messages/Makefile.in.in
-+++ texi2html-5.0/po_messages/Makefile.in.in
-@@ -9,7 +9,7 @@
- # General Public License and is *not* in the public domain.
- #
- # Origin: gettext-0.17
--GETTEXT_MACRO_VERSION = 0.17
-+GETTEXT_MACRO_VERSION = 0.18
-
- PACKAGE = @PACKAGE@
- VERSION = @VERSION@
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb
index aa5f1fddaf..eac289e3b5 100644
--- a/meta/recipes-extended/texi2html/texi2html_5.0.bb
+++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PR = "r2"
SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \
- file://fix_gettext_version.patch"
+ "
SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
@@ -15,15 +15,10 @@ SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89
inherit autotools gettext texinfo
do_configure_prepend() {
- # Make a directory for the old gettext setup
- if [ ! -d ${S}/po ]; then
- mkdir ${S}/po
- fi
-}
-
-do_configure_append() {
- # Clean up the phony po directory
- rm -rf ${S}/po
+ # 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 () {
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 b0ebf75a15..8b7033eccc 100644
--- a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
@@ -44,7 +44,7 @@ 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, eglibc) actually look for the substring "GNU texinfo,"
+# 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
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
new file mode 100644
index 0000000000..4a8cc57a56
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
@@ -0,0 +1,28 @@
+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
new file mode 100644
index 0000000000..2cc5fbb1fc
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
@@ -0,0 +1,49 @@
+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
new file mode 100644
index 0000000000..d9bed6933d
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
@@ -0,0 +1,24 @@
+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_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb
new file mode 100644
index 0000000000..6b36b97603
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_4.8.bb
@@ -0,0 +1,56 @@
+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"
+
+S = "${WORKDIR}/${BP}"
+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_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb
index be90aba1d2..d50a86e781 100644
--- a/meta/recipes-extended/texinfo/texinfo_5.2.bb
+++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb
@@ -9,6 +9,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PROVIDES_append_class-native = " texinfo-replacement-native"
+def compress_pkg(d):
+ if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+ compress = d.getVar("DOC_COMPRESS", True)
+ if compress == "gz":
+ return "gzip"
+ elif compress == "bz2":
+ return "bzip2"
+ elif compress == "xz":
+ return "xz"
+ return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
DEPENDS = "zlib ncurses texinfo-replacement-native"
DEPENDS_class-native = "zlib-native ncurses-native"
@@ -32,6 +45,12 @@ 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
@@ -51,7 +70,7 @@ do_install_append_class-native() {
PACKAGES += "info info-doc"
FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
-FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.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*"
diff --git a/meta/recipes-extended/tzcode/tzcode-native.inc b/meta/recipes-extended/tzcode/tzcode-native.inc
index f0343332ae..4af1e20739 100644
--- a/meta/recipes-extended/tzcode/tzcode-native.inc
+++ b/meta/recipes-extended/tzcode/tzcode-native.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
LICENSE = "PD & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=0b7570113550eb5d30aa4bd220964b8f"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6"
S = "${WORKDIR}"
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2014e.bb b/meta/recipes-extended/tzcode/tzcode-native_2014e.bb
deleted file mode 100644
index 405ed60f86..0000000000
--- a/meta/recipes-extended/tzcode/tzcode-native_2014e.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
- ftp://ftp.iana.org/tz/releases/tzdata2014e.tar.gz;name=tzdata"
-
-SRC_URI[tzcode.md5sum] = "552251600ee3571c244d33c7196ec2ed"
-SRC_URI[tzcode.sha256sum] = "43ebc426ab4911e222a4487f24289adfd2bc5eb09363a5e77cdabf56374a8c1c"
-SRC_URI[tzdata.md5sum] = "8a49fdedd4e832da8e85f7f9bcaedc33"
-SRC_URI[tzdata.sha256sum] = "08e243a79051f838d86ac1311a78b74047951302d448024e823b5b7aa71f86c5"
-
-require tzcode-native.inc
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015a.bb b/meta/recipes-extended/tzcode/tzcode-native_2015a.bb
new file mode 100644
index 0000000000..a0a31d6cfb
--- /dev/null
+++ b/meta/recipes-extended/tzcode/tzcode-native_2015a.bb
@@ -0,0 +1,10 @@
+# note that we allow for us to use data later than our code version
+#
+SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
+ ftp://ftp.iana.org/tz/releases/tzdata2015a.tar.gz;name=tzdata"
+
+SRC_URI[tzcode.md5sum] = "8f375ede46ae137fbac047ac431bda37"
+SRC_URI[tzcode.sha256sum] = "885bab11f286852f34030d7a86ede7d4126319ca74b8ee22be8ca7c17d72dd19"
+SRC_URI[tzdata.md5sum] = "4ed11c894a74a5ea64201b1c6dbb8831"
+SRC_URI[tzdata.sha256sum] = "c52490917d00a8e7fc9b5f0b1b65ef6ec76d612b5b20c81bf86a04147af18e4c"
+require tzcode-native.inc
diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc
index 06a6bea4f1..f13a4fe910 100644
--- a/meta/recipes-extended/tzdata/tzdata.inc
+++ b/meta/recipes-extended/tzdata/tzdata.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Timezone data"
HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
SECTION = "base"
LICENSE = "PD & BSD"
-LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
+LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1"
DEPENDS = "tzcode-native"
inherit allarch
diff --git a/meta/recipes-extended/tzdata/tzdata_2014e.bb b/meta/recipes-extended/tzdata/tzdata_2014e.bb
deleted file mode 100644
index b53d32331b..0000000000
--- a/meta/recipes-extended/tzdata/tzdata_2014e.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzdata.md5sum] = "8a49fdedd4e832da8e85f7f9bcaedc33"
-SRC_URI[tzdata.sha256sum] = "08e243a79051f838d86ac1311a78b74047951302d448024e823b5b7aa71f86c5"
-
-require tzdata.inc
diff --git a/meta/recipes-extended/tzdata/tzdata_2015a.bb b/meta/recipes-extended/tzdata/tzdata_2015a.bb
new file mode 100644
index 0000000000..6151aee115
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2015a.bb
@@ -0,0 +1,6 @@
+SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzdata.md5sum] = "4ed11c894a74a5ea64201b1c6dbb8831"
+SRC_URI[tzdata.sha256sum] = "c52490917d00a8e7fc9b5f0b1b65ef6ec76d612b5b20c81bf86a04147af18e4c"
+
+require tzdata.inc
diff --git a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
index f5976eb5cf..14ab9c56ab 100644
--- a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch
+++ b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
@@ -33,11 +33,11 @@ Signed-off-by: Roy.Li <rongqing.li@windriver.com>
src/watchdog.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
-Index: watchdog-5.13/src/watchdog.c
+Index: watchdog-5.14/src/watchdog.c
===================================================================
---- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800
-+++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700
-@@ -28,6 +28,7 @@
+--- watchdog-5.14.orig/src/watchdog.c
++++ watchdog-5.14/src/watchdog.c
+@@ -24,6 +24,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <linux/oom.h>
@@ -45,21 +45,35 @@ Index: watchdog-5.13/src/watchdog.c
#include <linux/watchdog.h>
#include <string.h>
-@@ -567,6 +568,8 @@
- pid_t child_pid;
- int oom_adjusted = 0;
- struct stat s;
-+ struct icmp_filter filt;
-+ filt.data = ~(1<<ICMP_ECHOREPLY);
+Index: watchdog-5.14/src/net.c
+===================================================================
+--- watchdog-5.14.orig/src/net.c
++++ watchdog-5.14/src/net.c
+@@ -11,7 +11,8 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <netinet/ip.h>
+-#include <netinet/ip_icmp.h>
++#include <linux/icmp.h>
++//#include <netinet/ip_icmp.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h> /* for gethostname() etc */
+@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist)
+ {
+ struct list *act;
+ int hold = 0;
++ struct icmp_filter filt;
++ filt.data = ~(1<<ICMP_ECHOREPLY);
++
+
+ if (tlist != NULL) {
+ for (act = tlist; act != NULL; act = act->next) {
+@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist)
+ fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno));
+ }
+
++ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
+ /* this is necessary for broadcast pings to work */
+ (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
- #if USE_SYSLOG
- char *opts = "d:i:n:Ffsvbql:p:t:c:r:m:a:";
-@@ -703,7 +706,7 @@
- perror(progname);
- exit(1);
- }
--
-+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
- /* this is necessary for broadcast pings to work */
- (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
-
diff --git a/meta/recipes-extended/watchdog/files/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
index 2fad3a112f..2fad3a112f 100644
--- a/meta/recipes-extended/watchdog/files/fixsepbuild.patch
+++ b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
diff --git a/meta/recipes-extended/watchdog/watchdog_5.13.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
index b9e29d22fc..c77d91dcdd 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.13.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://fixsepbuild.patch \
file://fix-ping-failure.patch"
-SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1"
-SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0"
+
+SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
+SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
inherit autotools
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
index 642d502a50..049b898d39 100644
--- a/meta/recipes-extended/wget/wget.inc
+++ b/meta/recipes-extended/wget/wget.inc
@@ -7,12 +7,18 @@ DEPENDS = "gnutls zlib libpcre"
INC_PR = "r16"
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives pkgconfig
EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
- ac_cv_header_uuid_uuid_h=no"
+ --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
ALTERNATIVE_${PN} = "wget"
+ALTERNATIVE_${PN}_class-nativesdk = ""
ALTERNATIVE_PRIORITY = "100"
RRECOMMENDS_${PN} += "ca-certificates"
+
+BBCLASSEXTEND += "nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
diff --git a/meta/recipes-extended/wget/wget_1.15.bb b/meta/recipes-extended/wget/wget_1.15.bb
deleted file mode 100644
index c2fcca740c..0000000000
--- a/meta/recipes-extended/wget/wget_1.15.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://fix_makefile.patch \
- "
-SRC_URI[md5sum] = "506df41295afc6486662cc47470b4618"
-SRC_URI[sha256sum] = "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
-
-require wget.inc
diff --git a/meta/recipes-extended/wget/wget_1.16.1.bb b/meta/recipes-extended/wget/wget_1.16.1.bb
new file mode 100644
index 0000000000..ca6f0fee25
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.16.1.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://fix_makefile.patch \
+ "
+
+SRC_URI[md5sum] = "5d12410a398ec9907e105e8734561ba0"
+SRC_URI[sha256sum] = "3b834ce69366d4681f295307fce36ee14e122c4ee68a4d1291b62b0b26755a77"
+
+require wget.inc
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
new file mode 100644
index 0000000000..495cdc6cf4
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
@@ -0,0 +1,28 @@
+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.20/automake.patch b/meta/recipes-extended/which/which-2.20/automake.patch
new file mode 100644
index 0000000000..ef00bc9f23
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/automake.patch
@@ -0,0 +1,15 @@
+Update autoconf prologue to use "foreign" strictness.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index d974461..a20dfa8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(which.c)
+-AM_INIT_AUTOMAKE(which, 2.20)
++AC_INIT([which],[2.20])
++AC_CONFIG_SRCDIR(which.c)
++AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
index 5fa5d9e8eb..fd68520d97 100644
--- a/meta/recipes-extended/which/which_2.18.bb
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r2"
SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
- file://fix_name_conflict_group_member.patch"
+ file://fix_name_conflict_group_member.patch \
+ file://automake-foreign.patch \
+"
SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb
index f3c6037786..74835543de 100644
--- a/meta/recipes-extended/which/which_2.20.bb
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -18,6 +18,7 @@ PR = "r3"
EXTRA_OECONF = "--disable-iberty"
SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
+ file://automake.patch \
file://remove-declaration.patch"
SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744"
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service
new file mode 100644
index 0000000000..d5fdc5bc29
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service
@@ -0,0 +1,13 @@
+[Unit]
+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
+
+[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 1928949e94..288186e1ba 100644
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -17,12 +17,15 @@ SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
file://xinetd-CVE-2013-4342.patch \
+ file://xinetd.service \
"
SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c"
SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3"
-inherit autotools update-rc.d
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "xinetd.service"
INITSCRIPT_NAME = "xinetd"
INITSCRIPT_PARAMS = "defaults"
@@ -52,6 +55,13 @@ do_install() {
install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
+
+ # Install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/xinetd.service
}
CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.2.0.bb
index b8501a5a39..3439ec911f 100644
--- a/meta/recipes-extended/xz/xz_5.1.3alpha.bb
+++ b/meta/recipes-extended/xz/xz_5.2.0.bb
@@ -25,8 +25,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[md5sum] = "bbb2daa876c87fb2cf9fe4590af9694e"
-SRC_URI[sha256sum] = "9f94506e301d5b6863921bba861a99ba00de384dafb4e5f409679a93e41613d4"
+SRC_URI[md5sum] = "be585bdf8672e4406632eda3d819e284"
+SRC_URI[sha256sum] = "231ef369982240bb20ed7cffa52bb12a4a297ce6871f480ab85e8a7ba98bf3d6"
inherit autotools gettext
@@ -38,3 +38,5 @@ FILES_liblzma-staticdev = "${libdir}/liblzma.a"
FILES_liblzma-dbg = "${libdir}/.debug/liblzma*"
BBCLASSEXTEND = "native nativesdk"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
index 7bdd723ffc..a63d4546f6 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.7.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
@@ -20,10 +20,10 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
file://fatal-loader.patch \
"
-SRC_URI[md5sum] = "1195d26f14adfe99ff0878d37678a70a"
-SRC_URI[sha256sum] = "0aafc365eab1083a53f15e4828333b968219ffcb1a995ac6289c0147c9ffad06"
+SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542"
+SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be"
-inherit autotools pkgconfig gettext pixbufcache ptest
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome
LIBV = "2.10.0"
@@ -42,10 +42,7 @@ PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-EXTRA_OECONF = "\
- --disable-introspection \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '--enable-installed-tests', '--disable-installed-tests', d)} \
-"
+EXTRA_OECONF = "--disable-introspection"
PACKAGES =+ "${PN}-xlib"
@@ -67,11 +64,6 @@ FILES_${PN}-dbg += " \
${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
"
-FILES_${PN}-ptest += "${libexecdir}/installed-tests \
- ${datadir}/installed-tests/gdk-pixbuf"
-
-RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
-
PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
PACKAGES_DYNAMIC_class-native = ""
diff --git a/meta/recipes-gnome/gnome/gnome-common_3.7.4.bb b/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
index 1fd2d83b2f..1f9fe8bf5c 100644
--- a/meta/recipes-gnome/gnome/gnome-common_3.7.4.bb
+++ b/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
@@ -10,8 +10,8 @@ inherit gnomebase allarch
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "974cd54626f1d1787481288ef26bd4ba"
-SRC_URI[archive.sha256sum] = "2af2d97010d2a9aeb3b99dd2ce07d1ef023e15a27b412ffe4f067f016ff7117b"
+SRC_URI[archive.md5sum] = "ba58c61d0d81b7c3ff8452c620513a9d"
+SRC_URI[archive.sha256sum] = "4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c"
EXTRA_AUTORECONF = ""
DEPENDS = ""
diff --git a/meta/recipes-gnome/gnome/gnome-desktop.inc b/meta/recipes-gnome/gnome/gnome-desktop.inc
deleted file mode 100644
index 3853022710..0000000000
--- a/meta/recipes-gnome/gnome/gnome-desktop.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-DEPENDS = "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils startup-notification"
-
-EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs"
-
-do_configure_prepend () {
- cp ${STAGING_DATADIR_NATIVE}/gnome-common/data/omf.make ${S}
-}
-
-FILES_${PN} += "${datadir}/gnome-about ${datadir}/libgnome-desktop/pnp.ids"
-
-PR = "r6"
-
-inherit gnomebase
-
-do_install_append () {
- sed -i -e's,${STAGING_BINDIR_NATIVE},${bindir},g' ${D}${bindir}/gnome-about
- sed -i -e '1s,#!.*python,#! ${USRBINPATH}/env python,' ${D}${bindir}/gnome-about
-}
-
-
diff --git a/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb b/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb
deleted file mode 100644
index 424eafeaf0..0000000000
--- a/meta/recipes-gnome/gnome/gnome-desktop_2.32.1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gnome-desktop.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SRC_URI[archive.md5sum] = "5c80d628a240eb9d9ff78913b31f2f67"
-SRC_URI[archive.sha256sum] = "55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d"
diff --git a/meta/recipes-gnome/gnome/gnome-doc-utils.inc b/meta/recipes-gnome/gnome/gnome-doc-utils.inc
index e148ce3350..958750690a 100644
--- a/meta/recipes-gnome/gnome/gnome-doc-utils.inc
+++ b/meta/recipes-gnome/gnome/gnome-doc-utils.inc
@@ -10,6 +10,8 @@ DEPENDS_class-native = "libxml2-native libxslt-native intltool-native glib-2.0-n
inherit gnomebase gettext python-dir pythonnative autotools-brokensep
+CLEANBROKEN = "1"
+
EXTRA_OECONF += "--disable-scrollkeeper"
do_install_append() {
diff --git a/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb b/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb
deleted file mode 100644
index a0123d9005..0000000000
--- a/meta/recipes-gnome/gnome/gsettings-desktop-schemas_3.10.1.bb
+++ /dev/null
@@ -1,16 +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"
-PR = "r1"
-
-DEPENDS = "glib-2.0 intltool-native gobject-introspection-stub-native"
-
-inherit gnomebase gsettings gettext
-
-GNOME_COMPRESS_TYPE = "xz"
-
-SRC_URI[archive.md5sum] = "f9ffca591a984f19a1dd9caeb96b5f23"
-SRC_URI[archive.sha256sum] = "452378c4960a145747ec69f8c6a874e5b7715454df3e2452d1ff1a0a82e76811"
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
deleted file mode 100644
index 71e334d897..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Fri, 16 Nov 2012 22:07:28 +0100
-Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Code was copied from GtkToggleButton.
-
-Upstream-Status: submitted [1]
-
-[1] https://bugzilla.gnome.org/show_bug.cgi?id=689138
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- gtk/gtkbutton.c | 8 ++++++--
- 1 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
-index f472007..1beb1b6 100644
---- a/gtk/gtkbutton.c
-+++ b/gtk/gtkbutton.c
-@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
- static void
- gtk_button_update_state (GtkButton *button)
- {
-- gboolean depressed;
-+ gboolean depressed, touchscreen;
- GtkStateType new_state;
-
-+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
-+ "gtk-touchscreen-mode", &touchscreen,
-+ NULL);
-+
- if (button->activate_timeout)
- depressed = button->depress_on_activate;
- else
- depressed = button->in_button && button->button_down;
-
-- if (button->in_button && (!button->button_down || !depressed))
-+ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
- new_state = GTK_STATE_PRELIGHT;
- else
- new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
---
-1.7.6.5
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
deleted file mode 100644
index 354f0ab376..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 69b9441eab2a7215509687dc22b48b6f212d22aa Mon Sep 17 00:00:00 2001
-From: Rob Bradford <rob@linux.intel.com>
-Date: Thu, 4 Jun 2009 15:43:20 +0100
-Subject: [PATCH] =?utf-8?q?bgo#584832=20=E2=80=93=20Duplicate=20the=20exec=20string=20returned=20by=20gtk=5Frecent=5Finfo=5Fget=5Fapplication=5Finfo?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf-8
-Content-Transfer-Encoding: 8bit
-
-This function states that the caller is responsible for freeing the string
-passed returned by reference. Unfortunately if you do this you get a crash
-since the internal value is returned without being duplicated.
----
- gtk/gtkrecentmanager.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-Upstream-Status: Pending
-
-Index: gtk+-2.21.2/gtk/gtkrecentmanager.c
-===================================================================
---- gtk+-2.21.2.orig/gtk/gtkrecentmanager.c 2010-06-22 18:11:30.000000000 +0800
-+++ gtk+-2.21.2/gtk/gtkrecentmanager.c 2010-06-22 18:11:53.000000000 +0800
-@@ -1766,7 +1766,7 @@
- }
-
- if (app_exec)
-- *app_exec = ai->exec;
-+ *app_exec = g_strdup (ai->exec);
-
- if (count)
- *count = ai->count;
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
deleted file mode 100644
index ba893292d6..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkcellrenderer.c
-===================================================================
---- gtk/gtkcellrenderer.c.orig 2010-06-22 17:21:22.000000000 +0800
-+++ gtk/gtkcellrenderer.c 2010-06-22 17:21:25.000000000 +0800
-@@ -566,6 +566,7 @@
-
- if (cell->cell_background_set && !selected)
- {
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_t *cr = gdk_cairo_create (window);
-
- gdk_cairo_rectangle (cr, background_area);
-@@ -573,6 +574,16 @@
- cairo_fill (cr);
-
- cairo_destroy (cr);
-+#else
-+ GdkGC *gc;
-+
-+ gc = gdk_gc_new (window);
-+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
-+ gdk_draw_rectangle (window, gc, TRUE,
-+ background_area->x, background_area->y,
-+ background_area->width, background_area->height);
-+ g_object_unref (gc);
-+#endif
- }
-
- GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
deleted file mode 100644
index d67b797852..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Pending
-https://bugzilla.gnome.org/show_bug.cgi?id=671515
-
-Signed-Off-By: Xiaofeng Yan <xiaofeng.yan@windriver.com>
-# Pick up ${NM} from the environment
-
-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:25:06.073937041 +0200
-@@ -190,7 +190,7 @@
- AC_SYS_LARGEFILE
-
- AM_PROG_AS
--AC_PATH_PROG(NM, nm, nm)
-+AC_CHECK_TOOLS(NM, [$NM nm], nm)
-
- dnl Initialize maintainer mode
- AM_MAINTAINER_MODE([enable])
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
deleted file mode 100644
index 2803691246..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gtk+-2.21.2/docs/faq/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/docs/faq/Makefile.am 2010-04-09 10:29:53.000000000 +0800
-+++ gtk+-2.21.2/docs/faq/Makefile.am 2010-06-22 17:39:24.000000000 +0800
-@@ -3,34 +3,36 @@
- EXTRA_DIST += \
- gtk-faq.sgml
-
--if HAVE_DOCBOOK
-+
- html:
-+if HAVE_DOCBOOK
- if test -w $(srcdir); then \
- (cd $(srcdir); \
- db2html gtk-faq.sgml; \
- test -d html && rm -r html; \
- mv gtk-faq html); \
- fi
--
--pdf:
-- if test -w $(srcdir); then \
-- (cd $(srcdir); db2pdf gtk-faq.sgml); \
-- fi
--
--dist-hook: html
-- cp -Rp $(srcdir)/html $(distdir)
- else
--html:
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "***"
-+endif
-
- pdf:
-+if HAVE_DOCBOOK
-+ if test -w $(srcdir); then \
-+ (cd $(srcdir); db2pdf gtk-faq.sgml); \
-+ fi
-+else
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "***"
-+endif
-
--dist-hook:
-+dist-hook: html
-+if HAVE_DOCBOOK
-+ cp -Rp $(srcdir)/html $(distdir)
-+else
- echo "***"
- echo "*** Warning: FAQ not built"
- echo "*** DISTRIBUTION IS INCOMPLETE"
-Index: gtk+-2.21.2/gtk-doc.make
-===================================================================
---- gtk+-2.21.2.orig/gtk-doc.make 2010-05-28 00:01:48.000000000 +0800
-+++ gtk+-2.21.2/gtk-doc.make 2010-06-22 17:39:24.000000000 +0800
-@@ -23,7 +23,7 @@
-
- TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
--EXTRA_DIST = \
-+EXTRA_DIST += \
- $(content_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
-Index: gtk+-2.21.2/gtk/tests/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/gtk/tests/Makefile.am 2010-06-10 20:53:46.000000000 +0800
-+++ gtk+-2.21.2/gtk/tests/Makefile.am 2010-06-22 17:39:24.000000000 +0800
-@@ -58,13 +58,13 @@
- # this doesn't work in make distcheck, since running
- # on a naked X server creates slightly different event
- # sequences than running on a normal desktop
--# TEST_PROGS += crossingevents
-+#TEST_PROGS += crossingevents
- crossingevents_SOURCES = crossingevents.c
- crossingevents_LDADD = $(progs_ldadd)
-
- # this doesn't work in make distcheck, since it doesn't
- # find file-chooser-test-dir
--# TEST_PROGS += filechooser
-+#TEST_PROGS += filechooser
- filechooser_SOURCES = filechooser.c pixbuf-init.c
- filechooser_LDADD = $(progs_ldadd)
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
deleted file mode 100644
index 3083b77830..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkentry.c
-===================================================================
-RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
-retrieving revision 1.317
-diff -u -r1.317 gtkentry.c
---- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
-+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
-@@ -3337,7 +3337,9 @@
- if (GTK_WIDGET_DRAWABLE (entry))
- {
- PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_t *cr;
-+#endif
- gint x, y;
- gint start_pos, end_pos;
-
-@@ -3345,23 +3347,35 @@
-
- get_layout_position (entry, &x, &y);
-
-+#ifdef USE_CAIRO_INTERNALLY
- cr = gdk_cairo_create (entry->text_area);
-
- cairo_move_to (cr, x, y);
- gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
- pango_cairo_show_layout (cr, layout);
-+#else
-+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
-+ x, y,
-+ layout);
-+#endif
-
- if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
- {
- gint *ranges;
- gint n_ranges, i;
- PangoRectangle logical_rect;
-- GdkColor *selection_color, *text_color;
- GtkBorder inner_border;
-+#ifdef USE_CAIRO_INTERNALLY
-+ GdkColor *selection_color, *text_color;
-+#else
-+ GdkGC *selection_gc, *text_gc;
-+ GdkRegion *clip_region;
-+#endif
-
- pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
- gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
-
-+#ifdef USE_CAIRO_INTERNALLY
- if (GTK_WIDGET_HAS_FOCUS (entry))
- {
- selection_color = &widget->style->base [GTK_STATE_SELECTED];
-@@ -3390,11 +3404,46 @@
- cairo_move_to (cr, x, y);
- gdk_cairo_set_source_color (cr, text_color);
- pango_cairo_show_layout (cr, layout);
--
-+#else
-+ if (GTK_WIDGET_HAS_FOCUS (entry))
-+ {
-+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
-+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
-+ }
-+ else
-+ {
-+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
-+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
-+ }
-+
-+ clip_region = gdk_region_new ();
-+ for (i = 0; i < n_ranges; ++i)
-+ {
-+ GdkRectangle rect;
-+
-+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
-+ rect.y = y;
-+ rect.width = ranges[2 * i + 1];
-+ rect.height = logical_rect.height;
-+
-+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
-+ rect.x, rect.y, rect.width, rect.height);
-+
-+ gdk_region_union_with_rect (clip_region, &rect);
-+ }
-+
-+ gdk_gc_set_clip_region (text_gc, clip_region);
-+ gdk_draw_layout (entry->text_area, text_gc,
-+ x, y,
-+ layout);
-+ gdk_gc_set_clip_region (text_gc, NULL);
-+ gdk_region_destroy (clip_region);
-+#endif
- g_free (ranges);
- }
--
-+#ifdef USE_CAIRO_INTERNALLY
- cairo_destroy (cr);
-+#endif
- }
- }
-
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
deleted file mode 100644
index 13ff318768..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
+++ /dev/null
@@ -1,1814 +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 -Nurd gtk+-2.24.15/configure.ac.orig gtk+-2.24.15/configure.ac.orig
---- gtk+-2.24.15/configure.ac.orig 1970-01-01 02:00:00.000000000 +0200
-+++ gtk+-2.24.15/configure.ac.orig 2013-02-12 21:33:21.821926163 +0200
-@@ -0,0 +1,1775 @@
-+# Process this file with autoconf to produce a configure script.
-+# Process this file with autoconf to produce a configure script.
-+# require autoconf 2.54
-+AC_PREREQ(2.62)
-+
-+# Making releases:
-+# GTK_MICRO_VERSION += 1;
-+# GTK_INTERFACE_AGE += 1;
-+# GTK_BINARY_AGE += 1;
-+# if any functions have been added, set GTK_INTERFACE_AGE to 0.
-+# if backwards compatibility has been broken,
-+# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
-+
-+m4_define([gtk_major_version], [2])
-+m4_define([gtk_minor_version], [24])
-+m4_define([gtk_micro_version], [15])
-+m4_define([gtk_interface_age], [15])
-+m4_define([gtk_binary_age],
-+ [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
-+m4_define([gtk_version],
-+ [gtk_major_version.gtk_minor_version.gtk_micro_version])
-+# This is the X.Y used in -lgtk-FOO-X.Y
-+m4_define([gtk_api_version], [2.0])
-+
-+# Define a string for the earliest version that this release has
-+# backwards binary compatibility with for all interfaces a module
-+# might. Unless we add module-only API with lower stability
-+# guarantees, this should be unchanged until we break binary compat
-+# for GTK+.
-+#
-+#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
-+m4_define([gtk_binary_version], [2.10.0])
-+
-+# required versions of other packages
-+m4_define([glib_required_version], [2.28.0])
-+m4_define([pango_required_version], [1.20])
-+m4_define([atk_required_version], [1.29.2])
-+m4_define([cairo_required_version], [1.6])
-+m4_define([gdk_pixbuf_required_version], [2.21.0])
-+
-+
-+AC_INIT([gtk+], [gtk_version],
-+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
-+ [gtk+])
-+
-+AC_CONFIG_SRCDIR([gdk/gdktypes.h])
-+AC_CONFIG_HEADERS([config.h])
-+AC_CONFIG_MACRO_DIR([m4])
-+
-+# Save this value here, since automake will set cflags later
-+cflags_set=${CFLAGS+set}
-+
-+AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
-+
-+# Support silent build rules, requires at least automake-1.11. Enable
-+# by either passing --enable-silent-rules to configure or passing V=0
-+# to make
-+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
-+
-+#
-+# For each of the libraries we build, we define the following
-+
-+# substituted variables:
-+#
-+# foo_PACKAGES: pkg-config packages this library requires
-+# foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
-+# foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
-+# foo_DEP_LIBS: All libraries this module requires
-+# foo_DEP_CFLAGS: All cflags this module requires
-+
-+
-+GTK_MAJOR_VERSION=gtk_major_version
-+GTK_MINOR_VERSION=gtk_minor_version
-+GTK_MICRO_VERSION=gtk_micro_version
-+GTK_INTERFACE_AGE=gtk_interface_age
-+GTK_BINARY_AGE=gtk_binary_age
-+GTK_VERSION=gtk_version
-+GTK_API_VERSION=gtk_api_version
-+GTK_BINARY_VERSION=gtk_binary_version
-+AC_SUBST(GTK_MAJOR_VERSION)
-+AC_SUBST(GTK_MINOR_VERSION)
-+AC_SUBST(GTK_MICRO_VERSION)
-+AC_SUBST(GTK_INTERFACE_AGE)
-+AC_SUBST(GTK_BINARY_AGE)
-+AC_SUBST(GTK_API_VERSION)
-+AC_SUBST(GTK_VERSION)
-+AC_SUBST(GTK_BINARY_VERSION)
-+
-+# libtool versioning
-+#LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
-+#LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
-+#LT_REVISION=$GTK_INTERFACE_AGE
-+#LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
-+#LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
-+
-+m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
-+m4_define([lt_revision], [gtk_interface_age])
-+m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
-+LT_VERSION_INFO="lt_current:lt_revision:lt_age"
-+LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
-+AC_SUBST(LT_VERSION_INFO)
-+AC_SUBST(LT_CURRENT_MINUS_AGE)
-+
-+m4_define([gail_lt_current],[18])
-+m4_define([gail_lt_revision],[1])
-+m4_define([gail_lt_age],[0])
-+m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
-+m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
-+AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
-+AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
-+
-+GETTEXT_PACKAGE=gtk20
-+AC_SUBST(GETTEXT_PACKAGE)
-+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
-+ [The prefix for our gettext translation domains.])
-+
-+AC_CANONICAL_HOST
-+
-+MATH_LIB=-lm
-+AC_MSG_CHECKING([for native Win32])
-+LIB_EXE_MACHINE_FLAG=X86
-+EXE_MANIFEST_ARCHITECTURE=X86
-+case "$host" in
-+ *-*-mingw*)
-+ os_win32=yes
-+ gio_can_sniff=no
-+ MATH_LIB=
-+ case "$host" in
-+ x86_64-*-*)
-+ LIB_EXE_MACHINE_FLAG=X64
-+ EXE_MANIFEST_ARCHITECTURE=AMD64
-+ ;;
-+ esac
-+ ;;
-+ *)
-+ os_win32=no
-+ ;;
-+esac
-+AC_MSG_RESULT([$os_win32])
-+
-+AC_SUBST(LIB_EXE_MACHINE_FLAG)
-+AC_SUBST(EXE_MANIFEST_ARCHITECTURE)
-+
-+case $host in
-+ *-*-linux*)
-+ os_linux=yes
-+ ;;
-+esac
-+
-+dnl Initialize libtool
-+AC_PROG_CC
-+AM_DISABLE_STATIC
-+
-+dnl
-+dnl Check for a working C++ compiler, but do not bail out, if none is found.
-+dnl We use this for an automated test for C++ header correctness.
-+dnl
-+AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
-+AC_LANG_SAVE
-+AC_LANG_CPLUSPLUS
-+
-+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
-+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
-+
-+gtk_save_cxxflags="$CXXFLAGS"
-+CXXFLAGS="$CXXFLAGS -x objective-c++"
-+AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
-+AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
-+CXXFLAGS="$gtk_save_cxxflags"
-+AC_LANG_RESTORE
-+
-+if test "$os_win32" = "yes"; then
-+ if test x$enable_static = xyes -o x$enable_static = x; then
-+ AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
-+ enable_static=no
-+ fi
-+ if test x$enable_shared = xno; then
-+ AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
-+ fi
-+ enable_shared=yes
-+fi
-+
-+AC_LIBTOOL_WIN32_DLL
-+AM_PROG_LIBTOOL
-+dnl when using libtool 2.x create libtool early, because it's used in configure
-+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
-+
-+
-+# Make sure we use 64-bit versions of various file stuff.
-+AC_SYS_LARGEFILE
-+
-+AM_PROG_AS
-+AC_PATH_PROG(NM, nm, nm)
-+
-+dnl Initialize maintainer mode
-+AM_MAINTAINER_MODE([enable])
-+
-+AC_MSG_CHECKING([for some Win32 platform])
-+case "$host" in
-+ *-*-mingw*|*-*-cygwin*)
-+ platform_win32=yes
-+ ;;
-+ *)
-+ platform_win32=no
-+ ;;
-+esac
-+AC_MSG_RESULT([$platform_win32])
-+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-+
-+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
-+AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
-+AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
-+
-+if test "$os_win32" = "yes"; then
-+ AC_CHECK_TOOL(WINDRES, windres, no)
-+ if test "$WINDRES" = no; then
-+ AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
-+ fi
-+ AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
-+fi
-+AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
-+
-+m4_define([debug_default],
-+ m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
-+
-+dnl declare --enable-* args and collect ac_help strings
-+AC_ARG_ENABLE(debug,
-+ AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
-+ [turn on debugging @<:@default=debug_default@:>@]),,
-+ enable_debug=debug_default)
-+AC_ARG_ENABLE(shm,
-+ [AC_HELP_STRING([--enable-shm],
-+ [support shared memory if available [default=yes]])],,
-+ [enable_shm="yes"])
-+AC_ARG_ENABLE(xkb,
-+ [AC_HELP_STRING([--enable-xkb],
-+ [support XKB [default=maybe]])],,
-+ [enable_xkb="maybe"])
-+AC_ARG_ENABLE(xinerama,
-+ [AC_HELP_STRING([--enable-xinerama],
-+ [support xinerama extension if available [default=yes]])],,
-+ [enable_xinerama="yes"])
-+AC_ARG_ENABLE(rebuilds,
-+ [AC_HELP_STRING([--disable-rebuilds],
-+ [disable all source autogeneration rules])],,
-+ [enable_rebuilds=yes])
-+AC_ARG_ENABLE(visibility,
-+ [AC_HELP_STRING([--disable-visibility],
-+ [don't use ELF visibility attributes])],,
-+ [enable_visibility=yes])
-+
-+AC_ARG_WITH(xinput,
-+ [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
-+
-+if test "$platform_win32" = yes; then
-+ gdktarget=win32
-+else
-+ gdktarget=x11
-+fi
-+
-+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
-+ gdktarget=$with_gdktarget)
-+
-+AC_SUBST(gdktarget)
-+case $gdktarget in
-+ x11|win32|quartz|directfb) ;;
-+ *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
-+esac
-+
-+gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
-+gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
-+
-+AC_SUBST(gdktargetlib)
-+AC_SUBST(gtktargetlib)
-+
-+if test "x$enable_debug" = "xyes"; then
-+ test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
-+ GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
-+else
-+ if test "x$enable_debug" = "xno"; then
-+ GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
-+ else
-+ GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
-+ fi
-+fi
-+
-+
-+if test "x$enable_visibility" = "xno"; then
-+ GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
-+fi
-+
-+
-+AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
-+ [Define if debugging is enabled])
-+
-+
-+# Build time sanity check...
-+AM_SANITY_CHECK
-+
-+# Checks for programs.
-+AC_ISC_POSIX
-+AM_PROG_CC_C_O
-+AC_PROG_INSTALL
-+AC_PROG_MAKE_SET
-+
-+changequote(,)dnl
-+if test "x$GCC" = "xyes"; then
-+ case " $CFLAGS " in
-+ *[\ \ ]-Wall[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -Wall" ;;
-+ esac
-+
-+ if test "x$enable_ansi" = "xyes"; then
-+ case " $CFLAGS " in
-+ *[\ \ ]-ansi[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -ansi" ;;
-+ esac
-+
-+ case " $CFLAGS " in
-+ *[\ \ ]-pedantic[\ \ ]*) ;;
-+ *) CFLAGS="$CFLAGS -pedantic" ;;
-+ esac
-+ fi
-+fi
-+changequote([,])dnl
-+
-+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
-+
-+# Ensure MSVC-compatible struct packing convention is used when
-+# compiling for Win32 with gcc.
-+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
-+# gcc2 uses "-fnative-struct".
-+if test x"$os_win32" = xyes; then
-+ if test x"$GCC" = xyes; then
-+ msnative_struct=''
-+ AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
-+ if test -z "$ac_cv_prog_CC"; then
-+ our_gcc="$CC"
-+ else
-+ our_gcc="$ac_cv_prog_CC"
-+ fi
-+ case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
-+ 2.)
-+ if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
-+ msnative_struct='-fnative-struct'
-+ fi
-+ ;;
-+ *)
-+ if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
-+ msnative_struct='-mms-bitfields'
-+ fi
-+ ;;
-+ esac
-+ if test x"$msnative_struct" = x ; then
-+ AC_MSG_RESULT([no way])
-+ AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
-+ else
-+ CFLAGS="$CFLAGS $msnative_struct"
-+ AC_MSG_RESULT([${msnative_struct}])
-+ fi
-+ fi
-+fi
-+
-+# Honor aclocal flags
-+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-+
-+## Initial sanity check, done here so that users get told they
-+## have the wrong dependencies as early in the process as possible.
-+## Later on we actually use the cflags/libs from separate pkg-config
-+## calls. Oh, also the later pkg-config calls don't include
-+## the version requirements since those make the module lists
-+## annoying to construct
-+PKG_CHECK_MODULES(BASE_DEPENDENCIES,
-+ [glib-2.0 >= glib_required_version dnl
-+ atk >= atk_required_version dnl
-+ pango >= pango_required_version dnl
-+ cairo >= cairo_required_version dnl
-+ gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
-+
-+## In addition to checking that cairo is present, we also need to
-+## check that the correct cairo backend is there. E.g. if the GDK
-+## target is win32 we need the cairo-win32 backend and so on.
-+cairo_backend=$gdktarget
-+
-+# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
-+# backend names are identical.
-+if test "x$cairo_backend" = "xx11"; then
-+ cairo_backend=xlib
-+fi
-+PKG_CHECK_MODULES(CAIRO_BACKEND,
-+ [cairo-$cairo_backend >= cairo_required_version])
-+
-+PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
-+
-+if test "$os_win32" != yes; then
-+ # libtool option to control which symbols are exported
-+ # right now, symbols starting with _ are not exported
-+ LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
-+else
-+ # We currently use .def files on Windows (for gdk and gtk)
-+ LIBTOOL_EXPORT_OPTIONS=
-+fi
-+AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
-+
-+dnl ******************************************************
-+dnl * See whether to include shared library dependencies *
-+dnl ******************************************************
-+
-+AC_ARG_ENABLE(explicit-deps,
-+ [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
-+ [use explicit dependencies in .pc files [default=auto]])],,
-+ [enable_explicit_deps=auto])
-+
-+AC_MSG_CHECKING([Whether to write dependencies into .pc files])
-+case $enable_explicit_deps in
-+ auto)
-+ export SED
-+ deplibs_check_method=`(./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
-+ enable_explicit_deps=no
-+ fi
-+ ;;
-+ yes|no)
-+ ;;
-+ *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
-+ ;;
-+esac
-+AC_MSG_RESULT($enable_explicit_deps)
-+
-+AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
-+
-+# define a MAINT-like variable REBUILD which is set if Perl
-+# and awk are found, so autogenerated sources can be rebuilt
-+
-+AC_PATH_PROGS(PERL, perl5 perl)
-+
-+# We would like indent, but don't require it.
-+AC_CHECK_PROG(INDENT, indent, indent)
-+
-+REBUILD=\#
-+if test "x$enable_rebuilds" = "xyes" && \
-+ test -n "$PERL" && \
-+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
-+ REBUILD=
-+fi
-+AC_SUBST(REBUILD)
-+
-+AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
-+AC_CHECK_FUNCS(localtime_r)
-+
-+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
-+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
-+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
-+fi
-+
-+# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
-+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
-+ [Define if _NL_MEASUREMENT_MEASUREMENT is available])
-+fi
-+
-+# _NL_PAPER_HEIGHT is an enum and not a define
-+AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
-+ [Define if _NL_PAPER_HEIGHT is available])
-+fi
-+
-+# _NL_PAPER_WIDTH is an enum and not a define
-+AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
-+AC_TRY_LINK([#include <langinfo.h>], [
-+char c;
-+c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
-+ [Define if _NL_PAPER_WIDTH is available])
-+fi
-+
-+# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
-+AC_MSG_CHECKING(for sigsetjmp)
-+AC_TRY_LINK([#include <setjmp.h>], [
-+sigjmp_buf env;
-+sigsetjmp(env, 0);
-+], gtk_ok=yes, gtk_ok=no)
-+AC_MSG_RESULT($gtk_ok)
-+if test "$gtk_ok" = "yes"; then
-+ AC_DEFINE(HAVE_SIGSETJMP, 1,
-+ [Define to 1 if sigsetjmp is available])
-+fi
-+
-+# i18n stuff
-+ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
-+AM_GLIB_GNU_GETTEXT
-+LIBS="$LIBS $INTLLIBS"
-+AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
-+ sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
-+ esac])
-+
-+dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
-+dnl po-properties/POTFILES during configure; see GNOME #573515.
-+dnl
-+dnl Generate list of files to be processed by xgettext which will
-+dnl be included in po-properties/Makefile.
-+test -d po-properties || mkdir po-properties
-+if test "x$srcdir" != "x."; then
-+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-+ popropsrcprefix="$srcdir/"
-+ else
-+ popropsrcprefix="../$srcdir/"
-+ fi
-+else
-+ popropsrcprefix="../"
-+fi
-+rm -f po-properties/POTFILES
-+sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-+< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
-+dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
-+
-+AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
-+
-+dnl The DU4 header files don't provide library prototypes unless
-+dnl -std1 is given to the native cc.
-+AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
-+
-+gtk_save_LIBS=$LIBS
-+LIBS="$LIBS -lm"
-+AC_TRY_RUN([#include <math.h>
-+ int main (void) { return (log(1) != log(1.)); }],
-+ AC_MSG_RESULT(none needed),
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -std1"
-+ AC_TRY_RUN([#include <math.h>
-+ int main (void) { return (log(1) != log(1.)); }],
-+ AC_MSG_RESULT(-std1),
-+ AC_MSG_RESULT()
-+ CFLAGS="$gtk_save_CFLAGS"
-+ AC_MSG_WARN(
-+ [No ANSI prototypes found in library. (-std1 didn't work.)]),
-+ true
-+ ),
-+ AC_MSG_RESULT(none needed)
-+)
-+LIBS=$gtk_save_LIBS
-+
-+AC_MSG_CHECKING(for the BeOS)
-+case $host in
-+ *-*-beos*)
-+ AC_MSG_RESULT(yes)
-+ MATH_LIB=
-+ ;;
-+ *)
-+ AC_MSG_RESULT(no)
-+ ;;
-+esac
-+
-+AC_SUBST(MATH_LIB)
-+#
-+# see bug 162979
-+#
-+AC_MSG_CHECKING(for HP-UX)
-+case $host_os in
-+ hpux9* | hpux10* | hpux11*)
-+ AC_MSG_RESULT(yes)
-+ CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
-+ ;;
-+ *)
-+ AC_MSG_RESULT(no)
-+ ;;
-+esac
-+
-+dnl NeXTStep cc seems to need this
-+AC_MSG_CHECKING([for extra flags for POSIX compliance])
-+AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
-+ AC_MSG_RESULT(none needed),
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -posix"
-+ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
-+ AC_MSG_RESULT(-posix),
-+ AC_MSG_RESULT()
-+ CFLAGS="$gtk_save_CFLAGS"
-+ AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
-+
-+#
-+# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
-+#
-+
-+GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
-+
-+AM_PATH_GLIB_2_0(glib_required_version, :,
-+ AC_MSG_ERROR([
-+*** GLIB glib_required_version or better is required. The latest version of
-+*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
-+ gobject gmodule-no-export gthread)
-+
-+# See if it's safe to turn G_DISABLE_DEPRECATED on.
-+GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
-+GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
-+if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
-+ CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
-+fi
-+
-+CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
-+
-+
-+dnl
-+dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-+dnl
-+gtk_save_LIBS=$LIBS
-+LIBS="$LIBS $GLIB_LIBS"
-+AC_CHECK_FUNCS(bind_textdomain_codeset)
-+LIBS=$gtk_save_LIBS
-+
-+AC_CHECK_HEADERS(pwd.h,
-+ AC_DEFINE(HAVE_PWD_H, 1,
-+ [Define to 1 if pwd.h is available]))
-+AC_CHECK_HEADERS(sys/time.h,
-+ AC_DEFINE(HAVE_SYS_TIME_H, 1,
-+ [Define to 1 if time.h is available]))
-+AC_CHECK_HEADERS(unistd.h,
-+ AC_DEFINE(HAVE_UNISTD_H, 1,
-+ [Define to 1 if unistd.h is available]))
-+AC_CHECK_HEADERS(ftw.h,
-+ AC_DEFINE(HAVE_FTW_H, 1,
-+ [Define to 1 if ftw.h is available]))
-+
-+AC_MSG_CHECKING([for GNU ftw extensions])
-+AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
-+#define _GNU_SOURCE
-+#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
-+if test $gtk_ok = yes; then
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
-+else
-+ AC_MSG_RESULT([no])
-+fi
-+
-+saved_cflags="$CFLAGS"
-+saved_ldflags="$LDFLAGS"
-+
-+
-+# Checks for header files.
-+AC_HEADER_STDC
-+
-+# Checks for typedefs, structures, and compiler characteristics.
-+AC_C_CONST
-+
-+# Checks for library functions.
-+AC_TYPE_SIGNAL
-+AC_FUNC_MMAP
-+
-+AC_CHECK_FUNCS(mallinfo)
-+AC_CHECK_FUNCS(getresuid)
-+AC_TYPE_UID_T
-+
-+# Check if <sys/select.h> needs to be included for fd_set
-+AC_MSG_CHECKING([for fd_set])
-+AC_TRY_COMPILE([#include <sys/types.h>],
-+ [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
-+if test $gtk_ok = yes; then
-+ AC_MSG_RESULT([yes, found in sys/types.h])
-+else
-+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
-+ if test $gtk_ok = yes; then
-+ AC_DEFINE(HAVE_SYS_SELECT_H, 1,
-+ [Define to 1 if sys/select.h is available])
-+ AC_MSG_RESULT([yes, found in sys/select.h])
-+ else
-+ AC_DEFINE(NO_FD_SET, 1,
-+ [Define to 1 if fd_set is not available])
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+# `widechar' tests for gdki18n.h
-+AC_MSG_CHECKING(for wchar.h)
-+AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
-+if test $gdk_wchar_h = yes; then
-+ AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
-+fi
-+AC_MSG_RESULT($gdk_wchar_h)
-+
-+# Check for wctype.h (for iswalnum)
-+AC_MSG_CHECKING(for wctype.h)
-+AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
-+if test $gdk_wctype_h = yes; then
-+ AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
-+fi
-+AC_MSG_RESULT($gdk_wctype_h)
-+
-+# in Solaris 2.5, `iswalnum' is in -lw
-+GDK_WLIBS=
-+AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
-+
-+oLIBS="$LIBS"
-+LIBS="$LIBS $GDK_WLIBS"
-+# The following is necessary for Linux libc-5.4.38
-+AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
-+AC_TRY_LINK([#include <stdlib.h>],[
-+#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
-+# ifdef HAVE_WCTYPE_H
-+# include <wctype.h>
-+# else
-+# ifdef HAVE_WCHAR_H
-+# include <wchar.h>
-+# endif
-+# endif
-+#else
-+# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
-+#endif
-+iswalnum((wchar_t) 0);
-+], gdk_working_wctype=yes, gdk_working_wctype=no)
-+LIBS="$oLIBS"
-+
-+if test $gdk_working_wctype = no; then
-+ AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
-+ GDK_WLIBS=
-+fi
-+AC_MSG_RESULT($gdk_working_wctype)
-+AC_SUBST(GDK_WLIBS)
-+
-+# Check for uxtheme.h (for MS-Windows Engine)
-+AC_MSG_CHECKING(for uxtheme.h)
-+AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
-+if test $gtk_uxtheme_h = yes; then
-+ AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
-+fi
-+AC_MSG_RESULT($gtk_uxtheme_h)
-+
-+# Checks for gdkspawn
-+AC_CHECK_HEADERS(crt_externs.h)
-+AC_CHECK_FUNCS(_NSGetEnviron)
-+
-+AC_MSG_CHECKING(whether to build dynamic modules)
-+
-+AC_ARG_ENABLE(modules,
-+ [AC_HELP_STRING([--disable-modules],
-+ [disable dynamic module loading])])
-+
-+dynworks=false
-+deps=
-+if test x$enable_modules = xno; then
-+ AC_MSG_RESULT(no)
-+else
-+ AC_MSG_RESULT(yes)
-+ AC_MSG_CHECKING(whether dynamic modules work)
-+ ## for loop is to strip newline
-+ tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
-+ for I in $tmp; do
-+ dynworks=$I
-+ done
-+
-+ 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_deplibs_check=`$module_libtool_config | \
-+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
-+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-+ if test "x$module_deplibs_check" = "xnone" || \
-+ test "x$module_deplibs_check" = "xunknown" || \
-+ test "x$module_deplibs_check" = "x"; then
-+ dynworks=false
-+ fi
-+ fi
-+
-+ if $dynworks; then
-+ AC_DEFINE(USE_GMODULE, 1,
-+ [Define to 1 if gmodule works and should be used])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
-+
-+#
-+# Allow building some or all immodules included
-+#
-+AC_MSG_CHECKING(immodules to build)
-+
-+dnl due to an autoconf bug, commas in the first arg to
-+dnl AC_HELP_STRING cause problems.
-+dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
-+dnl [build the specified input method modules into gtk])
-+AC_ARG_WITH(included_immodules,
-+[ --with-included-immodules=MODULE1,MODULE2,...
-+ build the specified input methods into gtk])
-+
-+if $dynworks; then
-+ :
-+else
-+ ## if the option was specified, leave it; otherwise disable included immodules
-+ if test x$with_included_immodules = xno; then
-+ with_included_immodules=yes
-+ fi
-+fi
-+
-+all_immodules="am-et,cedilla,cyrillic-translit"
-+if test "$gdktarget" = "win32"; then
-+ all_immodules="${all_immodules},ime"
-+fi
-+all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
-+if test "$gdktarget" = "x11"; then
-+ all_immodules="${all_immodules},xim"
-+fi
-+
-+included_immodules=""
-+# If the switch specified without listing any specific ones, include all
-+if test "x$with_included_immodules" = xyes ; then
-+ included_immodules="$all_immodules"
-+else
-+ included_immodules="$with_included_immodules"
-+fi
-+
-+AC_MSG_RESULT($included_immodules)
-+AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
-+
-+INCLUDED_IMMODULE_OBJ=
-+INCLUDED_IMMODULE_DEFINE=
-+
-+IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
-+for immodule in $included_immodules; do
-+ immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
-+ if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
-+ :
-+ else
-+ AC_MSG_ERROR([the specified input method $immodule does not exist])
-+ fi
-+
-+ INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
-+ INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
-+ eval INCLUDE_$immodule_underscores=yes
-+done
-+IFS="$gtk_save_ifs"
-+AC_SUBST(INCLUDED_IMMODULE_OBJ)
-+AC_SUBST(INCLUDED_IMMODULE_DEFINE)
-+
-+AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
-+AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
-+
-+AC_HEADER_SYS_WAIT
-+
-+AC_TYPE_SIGNAL
-+
-+# Checks to see whether we should include mediaLib
-+# support.
-+#
-+AC_CHECK_HEADER(sys/systeminfo.h,
-+ AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
-+ [Define to 1 if sys/systeminfo.h is available]))
-+AC_CHECK_HEADER(sys/sysinfo.h,
-+ AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
-+ [Define to 1 if sys/sysinfo.h is available]))
-+
-+AC_MSG_CHECKING(for mediaLib 2.3)
-+use_mlib25=no
-+# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
-+# patch requires.
-+AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
-+if test $use_mlib = yes; then
-+ AC_DEFINE(USE_MEDIALIB, 1,
-+ [Define to 1 if medialib is available and should be used])
-+ MEDIA_LIB=-lmlib
-+
-+ AC_MSG_CHECKING(for mediaLib 2.5)
-+ # Check for a mediaLib 2.5 function since that is what is needed for
-+ # gdk_rgb_convert integration.
-+ AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
-+ if test $use_mlib25 = yes; then
-+ AC_DEFINE(USE_MEDIALIB25, 1,
-+ [Define to 1 if medialib 2.5 is available])
-+ fi
-+fi
-+AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
-+AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
-+
-+dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
-+
-+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-+
-+if test $cross_compiling = yes; then
-+ AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
-+ if test x$GTK_UPDATE_ICON_CACHE = xno; then
-+ REBUILD_PNGS=#
-+ fi
-+fi
-+
-+AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
-+
-+if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
-+ test "x$REBUILD_PNGS" = "x#" ; then
-+ AC_MSG_ERROR([
-+*** gtkbuiltincache.h is not in the tree, and cannot be built
-+*** because you don't have libpng, or (when cross-compiling) you
-+*** don't have a prebuilt gtk-update-icon-cache on the build system.])
-+fi
-+
-+########################################
-+# Windowing system checks
-+########################################
-+
-+GDK_EXTRA_LIBS="$GDK_WLIBS"
-+GDK_EXTRA_CFLAGS=
-+
-+# GTK+ uses some X calls, so needs to link against X directly
-+GTK_DEP_PACKAGES_FOR_X=
-+GTK_DEP_LIBS_FOR_X=
-+
-+if test "x$gdktarget" = "xx11"; then
-+ X_PACKAGES=fontconfig
-+
-+ #
-+ # We use fontconfig very peripherally when decoding the default
-+ # settings.
-+ #
-+ if $PKG_CONFIG --exists fontconfig; then : ; else
-+ AC_MSG_ERROR([
-+*** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
-+ fi
-+
-+ #
-+ # Check for basic X packages; we use pkg-config if available
-+ #
-+ if $PKG_CONFIG --exists x11 xext xrender; then
-+ have_base_x_pc=true
-+ X_PACKAGES="$X_PACKAGES x11 xext xrender"
-+ x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
-+ X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
-+
-+ # Strip out any .la files that pkg-config might give us (this happens
-+ # with -uninstalled.pc files)
-+ x_libs_for_checks=
-+ for I in $x_libs ; do
-+ case $I in
-+ *.la) ;;
-+ *) x_libs_for_checks="$x_libs_for_checks $I" ;;
-+ esac
-+ done
-+
-+ GTK_PACKAGES_FOR_X="x11"
-+ else
-+ have_base_x_pc=false
-+ AC_PATH_XTRA
-+ if test x$no_x = xyes ; then
-+ AC_MSG_ERROR([X development libraries not found])
-+ fi
-+
-+ x_cflags="$X_CFLAGS"
-+ x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
-+
-+ GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
-+ fi
-+
-+ # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
-+ x_extra_libs=
-+
-+ gtk_save_cppflags="$CPPFLAGS"
-+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-+
-+ gtk_save_LIBS=$LIBS
-+ LIBS="$x_libs_for_checks $LIBS"
-+
-+ # Sanity check for the X11 and Xext libraries. While everything we need from
-+ # Xext is optional, the chances a system has *none* of these things is so
-+ # small that we just unconditionally require it.
-+ AC_CHECK_FUNC(XOpenDisplay, :,
-+ AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
-+ AC_CHECK_FUNC(XextFindDisplay, :,
-+ AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
-+ AC_CHECK_FUNC(XRenderQueryExtension, :,
-+ AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
-+
-+ # Check for xReply
-+
-+ AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
-+ AC_TRY_COMPILE([#include <X11/Xlibint.h>],
-+ [xReply *rep;],
-+ [AC_MSG_RESULT([no])],
-+ [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
-+#include <X11/Xlibint.h>],
-+ [xReply *rep;],
-+ [AC_MSG_RESULT([yes])
-+ AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
-+ [Define if <X11/extensions/XIproto.h> needed for xReply])],
-+ [AC_MSG_RESULT([unknown])
-+ AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
-+
-+ # Check for XConvertCase, XInternAtoms (X11R6 specific)
-+
-+ AC_CHECK_FUNCS(XConvertCase XInternAtoms)
-+
-+ # Generic X11R6 check needed for XIM support; we could
-+ # probably use this to replace the above, but we'll
-+ # leave the separate checks for XConvertCase and XInternAtoms
-+ # for clarity
-+
-+ have_x11r6=false
-+ AC_CHECK_FUNC(XAddConnectionWatch,
-+ have_x11r6=true)
-+
-+ if $have_x11r6; then
-+ AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
-+ fi
-+ AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
-+
-+ # Check for XKB support.
-+
-+ if test "x$enable_xkb" = "xyes"; then
-+ AC_MSG_WARN(XKB support explicitly enabled)
-+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
-+ elif test "x$enable_xkb" = "xmaybe"; then
-+ AC_CHECK_FUNC(XkbQueryExtension,
-+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
-+ else
-+ AC_MSG_WARN(XKB support explicitly disabled)
-+ fi
-+
-+ # Check for shaped window extension
-+
-+ AC_CHECK_FUNC(XShapeCombineMask, :,
-+ [AC_MSG_ERROR([Shape extension not found, check your development headers])])
-+
-+ # X SYNC check
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $x_cflags"
-+
-+ AC_CHECK_FUNC(XSyncQueryExtension,
-+ [AC_CHECK_HEADER(X11/extensions/sync.h,
-+ AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
-+ :, [#include <X11/Xlib.h>])])
-+
-+ CFLAGS="$gtk_save_CFLAGS"
-+
-+ # Xshm checks
-+
-+ if test "x$enable_shm" = "xyes"; then
-+ # Check for the XShm extension, normally in Xext
-+ AC_CHECK_FUNC(XShmAttach,
-+ :,
-+ # On AIX, it is in XextSam instead
-+ [AC_CHECK_LIB(XextSam, XShmAttach,
-+ [GTK_ADD_LIB(x_extra_libs,XextSam)])])
-+ fi
-+
-+ if test "x$enable_shm" = "xyes"; then
-+ # Check for shared memory
-+ AC_CHECK_HEADER(sys/ipc.h,
-+ AC_DEFINE(HAVE_IPC_H, 1,
-+ [Define to 1 if ipc.h is available]),
-+ no_sys_ipc=yes)
-+ AC_CHECK_HEADER(sys/shm.h,
-+ AC_DEFINE(HAVE_SHM_H, 1,
-+ [Define to 1 if shm.h is available]),
-+ no_sys_shm=yes)
-+
-+ # Check for the X shared memory extension header file
-+ have_xshm=no
-+ AC_MSG_CHECKING(X11/extensions/XShm.h)
-+ if test "x$no_xext_lib" = "xyes"; then
-+ :
-+ else
-+ gtk_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS $x_cflags"
-+ AC_TRY_COMPILE([
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/ipc.h>
-+#include <sys/shm.h>
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+#include <X11/extensions/XShm.h>
-+], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
-+ CFLAGS="$gtk_save_CFLAGS"
-+ fi
-+ AC_MSG_RESULT($have_xshm)
-+ if test $have_xshm = yes ; then
-+ AC_DEFINE(HAVE_XSHM_H, 1,
-+ [Define to 1 if xshm.h is available])
-+ fi
-+ fi
-+
-+ if test "x$enable_xinerama" = "xyes"; then
-+ # Check for Xinerama extension (Solaris impl or Xfree impl)
-+ gtk_save_cppflags="$CPPFLAGS"
-+ CPPFLAGS="$CPPFLAGS $x_cflags"
-+
-+ # Check for XFree
-+ AC_MSG_CHECKING(for Xinerama support on XFree86)
-+
-+ have_xfree_xinerama=false
-+ if $PKG_CONFIG --exists xinerama ; then
-+ have_xfree_xinerama=true
-+ X_PACKAGES="$X_PACKAGES xinerama"
-+ else
-+ AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
-+ [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
-+ [GTK_ADD_LIB(x_extra_libs,Xinerama)
-+ have_xfree_xinerama=true], :,
-+ [#include <X11/Xlib.h>])])
-+ fi
-+
-+ if $have_xfree_xinerama ; then
-+ AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
-+ [Define to 1 if XFree Xinerama is available])
-+ AC_DEFINE(HAVE_XINERAMA, 1,
-+ [Define to 1 is Xinerama is available])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+
-+ case "$host" in
-+ *-*-solaris*)
-+ # Check for solaris
-+ AC_MSG_CHECKING(for Xinerama support on Solaris)
-+
-+ have_solaris_xinerama=false
-+ AC_CHECK_FUNC(XineramaGetInfo,
-+ [AC_CHECK_HEADER(X11/extensions/xinerama.h,
-+ [have_solaris_xinerama=true], :,
-+ [#include <X11/Xlib.h>])])
-+
-+ if $have_solaris_xinerama ; then
-+ AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
-+ [Define to 1 if solaris xinerama is available])
-+ AC_DEFINE(HAVE_XINERAMA, 1,
-+ [Define to 1 if xinerama is available])
-+ AC_MSG_RESULT(yes)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+ ;;
-+ *)
-+ ;;
-+ esac
-+ fi
-+ fi
-+
-+ # set up things for XInput
-+
-+ if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
-+ AC_DEFINE(XINPUT_XFREE, 1,
-+ [Define to 1 if XFree XInput should be used])
-+
-+ if $PKG_CONFIG --exists xi ; then
-+ X_PACKAGES="$X_PACKAGES xi"
-+ else
-+ GTK_ADD_LIB(x_extra_libs, Xi)
-+ fi
-+ else
-+ AC_DEFINE(XINPUT_NONE, 1,
-+ [Define to 1 if no XInput should be used])
-+ fi
-+
-+ AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
-+
-+ # Check for the RANDR extension
-+ if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
-+ AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
-+
-+ X_PACKAGES="$X_PACKAGES xrandr"
-+ fi
-+
-+ # Checks for Xcursor library
-+
-+ if $PKG_CONFIG --exists xcursor ; then
-+ AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
-+
-+ X_PACKAGES="$X_PACKAGES xcursor"
-+ fi
-+
-+ # Checks for XFixes extension
-+
-+ if $PKG_CONFIG --exists xfixes ; then
-+ AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xfixes"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
-+ fi
-+
-+ # Checks for Xcomposite extension
-+
-+ if $PKG_CONFIG --exists xcomposite ; then
-+ AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xcomposite"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
-+ fi
-+
-+ # Checks for Xdamage extension
-+
-+ if $PKG_CONFIG --exists xdamage ; then
-+ AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
-+
-+ X_PACKAGES="$X_PACKAGES xdamage"
-+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
-+ fi
-+
-+ if $have_base_x_pc ; then
-+ GDK_EXTRA_LIBS="$x_extra_libs"
-+ else
-+ GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
-+ fi
-+
-+ CPPFLAGS="$gtk_save_cppflags"
-+ LIBS="$gtk_save_libs"
-+
-+ AM_CONDITIONAL(USE_X11, true)
-+else
-+ XPACKAGES=
-+
-+ AM_CONDITIONAL(XINPUT_XFREE, false)
-+ AM_CONDITIONAL(USE_X11, false)
-+ AM_CONDITIONAL(HAVE_X11R6, false)
-+fi
-+
-+if test "x$gdktarget" = "xwin32"; then
-+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
-+ AM_CONDITIONAL(USE_WIN32, true)
-+else
-+ AM_CONDITIONAL(USE_WIN32, false)
-+fi
-+
-+AC_ARG_ENABLE(quartz-relocation,
-+ [AS_HELP_STRING([--enable-quartz-relocation],
-+ [enable bundle-based relocation functions])],
-+ [quartz_relocation=yes])
-+
-+if test "x$gdktarget" = "xquartz"; then
-+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
-+ AM_CONDITIONAL(USE_QUARTZ, true)
-+ if test "x$quartz_relocation" = xyes; then
-+ AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
-+ fi
-+
-+else
-+ AM_CONDITIONAL(USE_QUARTZ, false)
-+fi
-+
-+if test "x$gdktarget" = "xdirectfb"; then
-+ DIRECTFB_REQUIRED_VERSION=1.0.0
-+ AC_MSG_CHECKING(for DirectFB)
-+
-+ PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
-+ AM_CONDITIONAL(USE_DIRECTFB, true)
-+else
-+ AM_CONDITIONAL(USE_DIRECTFB, false)
-+fi
-+
-+
-+# Check for Pango flags
-+
-+if test "x$gdktarget" = "xwin32"; then
-+ PANGO_PACKAGES="pangowin32 pangocairo"
-+else
-+ PANGO_PACKAGES="pango pangocairo"
-+fi
-+
-+AC_MSG_CHECKING(Pango flags)
-+if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
-+ PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
-+ PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
-+
-+ AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
-+else
-+ AC_MSG_ERROR([
-+*** Pango not found. Pango built with Cairo support is required
-+*** to build GTK+. See http://www.pango.org for Pango information.
-+])
-+fi
-+
-+CFLAGS="$CFLAGS $PANGO_CFLAGS"
-+
-+if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
-+ :
-+else
-+ gtk_save_LIBS="$LIBS"
-+ LIBS="$PANGO_LIBS $LIBS"
-+ AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
-+*** Can't link to Pango. Pango is required to build
-+*** GTK+. For more information see http://www.pango.org]))
-+ LIBS="$gtk_save_LIBS"
-+fi
-+
-+CFLAGS="$saved_cflags"
-+LDFLAGS="$saved_ldflags"
-+
-+# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
-+if test "x$gdktarget" = "xx11"; then
-+ GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
-+else
-+ GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
-+fi
-+
-+GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB"
-+GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
-+#
-+# If we aren't writing explicit dependencies, then don't put the extra libraries we need
-+# into the pkg-config files
-+#
-+if test $enable_explicit_deps != yes ; then
-+ GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
-+ GDK_EXTRA_LIBS=
-+fi
-+
-+AC_SUBST(GDK_PACKAGES)
-+AC_SUBST(GDK_EXTRA_LIBS)
-+AC_SUBST(GDK_EXTRA_CFLAGS)
-+AC_SUBST(GDK_DEP_LIBS)
-+AC_SUBST(GDK_DEP_CFLAGS)
-+
-+
-+########################################
-+# Check for Accessibility Toolkit flags
-+########################################
-+
-+ATK_PACKAGES=atk
-+AC_MSG_CHECKING(ATK flags)
-+if $PKG_CONFIG --exists $ATK_PACKAGES ; then
-+ ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
-+ ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
-+
-+ AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
-+else
-+ AC_MSG_ERROR([
-+*** Accessibility Toolkit not found. Accessibility Toolkit is required
-+*** to build GTK+.
-+])
-+fi
-+
-+if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
-+ :
-+else
-+ gtk_save_LIBS="$LIBS"
-+ LIBS="$ATK_LIBS $LIBS"
-+ AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
-+ *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
-+ *** to build GTK+]))
-+ LIBS="$gtk_save_LIBS"
-+fi
-+
-+GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
-+if test "x$gdktarget" = "xx11"; then
-+ GTK_PACKAGES="$GTK_PACKAGES pangoft2"
-+fi
-+GTK_EXTRA_LIBS=
-+GTK_EXTRA_CFLAGS=
-+GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB"
-+GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
-+
-+if test x"$os_win32" = xyes; then
-+ GTK_EXTRA_CFLAGS="$msnative_struct"
-+fi
-+
-+GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
-+ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
-+PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
-+CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
-+
-+AC_SUBST(GTK_PACKAGES)
-+AC_SUBST(GTK_EXTRA_LIBS)
-+AC_SUBST(GTK_EXTRA_CFLAGS)
-+AC_SUBST(GTK_DEP_LIBS)
-+AC_SUBST(GTK_DEP_CFLAGS)
-+
-+AC_SUBST(GLIB_PREFIX)
-+AC_SUBST(ATK_PREFIX)
-+AC_SUBST(PANGO_PREFIX)
-+AC_SUBST(CAIRO_PREFIX)
-+
-+AC_SUBST(GTK_DEBUG_FLAGS)
-+AC_SUBST(GTK_XIM_FLAGS)
-+
-+GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
-+AC_SUBST(GDK_PIXBUF_LIBS)
-+
-+########################
-+# Checks needed for gail
-+########################
-+
-+old_LIBS="$LIBS"
-+dnl Checks for inet libraries:
-+AC_SEARCH_LIBS(gethostent, nsl)
-+AC_SEARCH_LIBS(setsockopt, socket)
-+AC_SEARCH_LIBS(connect, inet)
-+
-+dnl check for the sockaddr_un.sun_len member
-+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
-+ [struct_sockaddr_un_sun_len=true],
-+ [struct_sockaddr_un_suin_len=false],
-+ [#include <sys/types.h>
-+ #include <sys/un.h>]
-+ )
-+case $struct_sockaddr_un_sun_len in
-+ true)
-+ AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
-+ [Have the sockaddr_un.sun_len member])
-+ ;;
-+ *)
-+ ;;
-+esac
-+
-+GAIL_INET_LIBS="$LIBS"
-+AC_SUBST([GAIL_INET_LIBS])
-+
-+LIBS="$old_LIBS"
-+
-+################################################################
-+# Printing system checks
-+################################################################
-+
-+AC_ARG_ENABLE(cups,
-+ [AC_HELP_STRING([--disable-cups]
-+ [disable cups print backend])],,
-+ [enable_cups=auto])
-+
-+if test "x$enable_cups" = "xno"; then
-+ AM_CONDITIONAL(HAVE_CUPS, false)
-+else
-+ AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
-+ if test "x$CUPS_CONFIG" = "xno"; then
-+ if test "x$enable_cups" = "xauto"; then
-+ AM_CONDITIONAL(HAVE_CUPS, false)
-+ else
-+ AC_MSG_ERROR([
-+*** cups not found.
-+])
-+ fi
-+ else
-+ CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
-+ CUPS_LIBS=`$CUPS_CONFIG --libs`
-+
-+ CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
-+ CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
-+ CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
-+
-+ if test $CUPS_API_MAJOR -gt 1 -o \
-+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
-+ AC_DEFINE(HAVE_CUPS_API_1_2, 1,
-+ [Define to 1 if CUPS 1.2 API is available])
-+ fi
-+ if test $CUPS_API_MAJOR -gt 1 -o \
-+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
-+ AC_DEFINE(HAVE_CUPS_API_1_6, 1,
-+ [Define to 1 if CUPS 1.6 API is available])
-+
-+ fi
-+
-+ AC_SUBST(CUPS_API_MAJOR)
-+ AC_SUBST(CUPS_API_MINOR)
-+ AC_SUBST(CUPS_CFLAGS)
-+ AC_SUBST(CUPS_LIBS)
-+
-+ AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
-+
-+ AM_CONDITIONAL(HAVE_CUPS, true)
-+
-+ gtk_save_cflags="$CFLAGS"
-+ CFLAGS="$CUPS_CFLAGS"
-+ AC_TRY_COMPILE([#include <cups/http.h>],
-+ [http_t http; char *s = http.authstring;],
-+ [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
-+ [Define if cups http_t authstring field is accessible])],)
-+ CFLAGS="$gtk_save_cflags"
-+
-+ AC_SUBST(HAVE_HTTP_AUTHSTRING)
-+
-+ gtk_save_libs="$LIBS"
-+ LIBS="$CUPS_LIBS"
-+ AC_CHECK_FUNCS(httpGetAuthString)
-+ LIBS="$gtk_save_libs"
-+ fi
-+fi
-+
-+# Checks to see if we should compile with PAPI backend for GTK+
-+#
-+
-+AC_ARG_ENABLE(papi,
-+ [AC_HELP_STRING([--disable-papi]
-+ [disable papi print backend])],,
-+ [enable_papi=auto])
-+
-+if test "x$enable_papi" = "xno"; then
-+ AM_CONDITIONAL(HAVE_PAPI, false)
-+else
-+ AC_MSG_CHECKING(libpapi)
-+ AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
-+ if test $have_papi = yes; then
-+ AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
-+ fi
-+ AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
-+ if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
-+ AC_MSG_ERROR([
-+*** papi not found.
-+])
-+ fi
-+fi
-+
-+AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
-+
-+gtk_save_cppflags="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
-+
-+AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
-+*** Can't find cairo-pdf.h. You must build Cairo with the pdf
-+*** backend enabled.]))
-+
-+if test "$os_win32" != "yes"; then
-+ AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
-+*** Can't find cairo-ps.h. You must build Cairo with the
-+*** postscript backend enabled.]))
-+
-+ AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
-+*** Can't find cairo-svg.h. You must build Cairo with the
-+*** svg backend enabled.]))
-+fi
-+
-+CPPFLAGS="$gtk_save_cppflags"
-+
-+
-+AC_ARG_ENABLE(test-print-backend,
-+ [AC_HELP_STRING([--enable-test-print-backend],
-+ [build test print backend])],,
-+ [enable_test_print_backend=no])
-+AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
-+
-+if test "$os_win32" = "yes"; then
-+ AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]])
-+fi
-+
-+################################################################
-+# Strip -export-dynamic from the link lines of various libraries
-+################################################################
-+
-+#
-+# pkg-config --libs gmodule includes the "export_dynamic" flag,
-+# but this flag is only meaningful for executables. For libraries
-+# the effect is undefined; what it causes on Linux is that the
-+# export list from -export-symbols-regex is ignored and everything
-+# is exported
-+#
-+# 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`
-+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//"`
-+fi
-+
-+##################################################
-+# GObject introspection
-+##################################################
-+
-+GOBJECT_INTROSPECTION_CHECK([0.9.3])
-+
-+##################################################
-+# Checks for gtk-doc and docbook-tools
-+##################################################
-+
-+GTK_DOC_CHECK([1.11])
-+
-+AC_CHECK_PROG(DB2HTML, db2html, true, false)
-+AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
-+
-+AC_ARG_ENABLE(man,
-+ [AC_HELP_STRING([--enable-man],
-+ [regenerate man pages from Docbook [default=no]])],enable_man=yes,
-+ enable_man=no)
-+
-+if test "${enable_man}" != no; then
-+ dnl
-+ dnl Check for xsltproc
-+ dnl
-+ AC_PATH_PROG([XSLTPROC], [xsltproc])
-+ if test -z "$XSLTPROC"; then
-+ enable_man=no
-+ fi
-+
-+ dnl check for DocBook DTD and stylesheets in the local catalog.
-+ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
-+ [DocBook XML DTD V4.1.2],,enable_man=no)
-+ JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
-+ [DocBook XSL Stylesheets],,enable_man=no)
-+fi
-+
-+AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
-+
-+
-+##################################################
-+# Output commands
-+##################################################
-+
-+AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
-+ outfile=gdkconfig.h-tmp
-+ cat > $outfile <<\_______EOF
-+/* gdkconfig.h
-+ *
-+ * This is a generated file. Please modify `configure.in'
-+ */
-+
-+#ifndef GDKCONFIG_H
-+#define GDKCONFIG_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif /* __cplusplus */
-+
-+#ifndef GSEAL
-+/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
-+# ifdef GSEAL_ENABLE
-+# define GSEAL(ident) _g_sealed__ ## ident
-+# else
-+# define GSEAL(ident) ident
-+# endif
-+#endif /* !GSEAL */
-+
-+_______EOF
-+
-+ cat >>$outfile <<_______EOF
-+$gdk_windowing
-+$gdk_wc
-+_______EOF
-+
-+ cat >>$outfile <<_______EOF
-+
-+#ifdef __cplusplus
-+}
-+#endif /* __cplusplus */
-+
-+#endif /* GDKCONFIG_H */
-+_______EOF
-+
-+
-+ if cmp -s $outfile gdk/gdkconfig.h; then
-+ AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
-+ rm -f $outfile
-+ else
-+ mv $outfile gdk/gdkconfig.h
-+ fi
-+],[
-+if test "x$gdktarget" = "xx11" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_X11'
-+elif test "x$gdktarget" = "xwin32" ; then
-+ gdk_windowing='
-+#define GDK_NATIVE_WINDOW_POINTER
-+
-+#define GDK_WINDOWING_WIN32'
-+elif test "x$gdktarget" = "xquartz" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_QUARTZ'
-+elif test "x$gdktarget" = "xdirectfb" ; then
-+ gdk_windowing='
-+#define GDK_WINDOWING_DIRECTFB'
-+fi
-+
-+if test x$gdk_wchar_h = xyes; then
-+ gdk_wc='
-+#define GDK_HAVE_WCHAR_H 1'
-+fi
-+if test x$gdk_wctype_h = xyes; then
-+ gdk_wc="\$gdk_wc
-+#define GDK_HAVE_WCTYPE_H 1"
-+fi
-+if test x$gdk_working_wctype = xno; then
-+ gdk_wc="\$gdk_wc
-+#define GDK_HAVE_BROKEN_WCTYPE 1"
-+fi
-+
-+
-+])
-+
-+AC_CONFIG_FILES([
-+config.h.win32
-+gtk-zip.sh
-+Makefile
-+gdk-2.0.pc
-+gtk+-2.0.pc
-+gtk+-unix-print-2.0.pc
-+gail.pc
-+gdk-2.0-uninstalled.pc
-+gtk+-2.0-uninstalled.pc
-+gail-uninstalled.pc
-+m4macros/Makefile
-+po/Makefile.in
-+po-properties/Makefile.in
-+demos/Makefile
-+demos/gtk-demo/Makefile
-+demos/gtk-demo/geninclude.pl
-+tests/Makefile
-+docs/Makefile
-+docs/reference/Makefile
-+docs/reference/gdk/Makefile
-+docs/reference/gdk/version.xml
-+docs/reference/gtk/Makefile
-+docs/reference/gtk/version.xml
-+docs/reference/libgail-util/Makefile
-+docs/faq/Makefile
-+docs/tools/Makefile
-+docs/tutorial/Makefile
-+build/Makefile
-+build/win32/Makefile
-+build/win32/vs9/Makefile
-+build/win32/vs10/Makefile
-+gdk/Makefile
-+gdk/x11/Makefile
-+gdk/win32/Makefile
-+gdk/win32/rc/Makefile
-+gdk/win32/rc/gdk.rc
-+gdk/quartz/Makefile
-+gdk/directfb/Makefile
-+gdk/tests/Makefile
-+gtk/Makefile
-+gtk/makefile.msc
-+gtk/gtkversion.h
-+gtk/gtk-win32.rc
-+gtk/theme-bits/Makefile
-+gtk/tests/Makefile
-+modules/Makefile
-+modules/other/Makefile
-+modules/other/gail/Makefile
-+modules/other/gail/libgail-util/Makefile
-+modules/other/gail/tests/Makefile
-+modules/engines/Makefile
-+modules/engines/pixbuf/Makefile
-+modules/engines/ms-windows/Makefile
-+modules/engines/ms-windows/Theme/Makefile
-+modules/engines/ms-windows/Theme/gtk-2.0/Makefile
-+modules/input/Makefile
-+modules/printbackends/Makefile
-+modules/printbackends/cups/Makefile
-+modules/printbackends/lpr/Makefile
-+modules/printbackends/file/Makefile
-+modules/printbackends/papi/Makefile
-+modules/printbackends/test/Makefile
-+perf/Makefile
-+])
-+
-+AC_OUTPUT
-+
-+echo "configuration:
-+ target: $gdktarget"
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
deleted file mode 100644
index 597ba32470..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gtk+-2.21.2/gtk/Makefile.am
-===================================================================
---- gtk+-2.21.2.orig/gtk/Makefile.am 2010-06-22 17:21:41.000000000 +0800
-+++ gtk+-2.21.2/gtk/Makefile.am 2010-06-22 17:28:12.000000000 +0800
-@@ -1376,11 +1376,11 @@
- ./gtk-update-icon-cache
- endif
-
--gtkbuiltincache.h: @REBUILD@ stamp-icons
-- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
-- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
-- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
-- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
-+#gtkbuiltincache.h: @REBUILD@ stamp-icons
-+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
-+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
-+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
-+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
-
- EXTRA_DIST += \
- $(STOCK_ICONS) \
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch b/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
index 74e479fd1b..74e479fd1b 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch
+++ b/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
diff --git a/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
new file mode 100644
index 0000000000..1ae728e70d
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
+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+-2.24.22/toggle-font.diff b/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
index 340d12008b..340d12008b 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff
+++ b/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch b/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
index d0a970ad4d..d0a970ad4d 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch
+++ b/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 9e96275554..3e36676ac4 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -49,7 +49,11 @@ LIBV = "3.0.0"
FILES_${PN}-demo = "${bindir}/gtk3-demo \
${bindir}/gtk3-demo-application \
${bindir}/gtk3-widget-factory \
- ${datadir}/gtk-3.0/demo"
+ ${datadir}/gtk-3.0/demo \
+ ${datadir}/applications/gtk3-demo.desktop \
+ ${datadir}/applications/gtk3-widget-factory.desktop \
+ ${datadir}/icons/hicolor/*/apps/gtk3-demo.png \
+ ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory.png"
# The demo uses PNG files and mime type sniffing, so ensure that these
# dependencies are present.
@@ -101,6 +105,6 @@ python populate_packages_prepend () {
do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
if (d.getVar('DEBIAN_NAMES', 1)):
- d.setVar('PKG_${PN}', 'libgtk-3.0')
+ d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
}
diff --git a/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch b/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
deleted file mode 100644
index b4b1a09455..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Fix build when wayland backend enabled
-
-Upstream-Status: Submitted
-https://bugzilla.gnome.org/show_bug.cgi?id=710584
-
-Author: Emilio Pozuelo Monfort
-
---- gtk+-3.10.7/gtk/gtkapplication.c
-+++ gtk+-3.10.7/gtk/gtkapplication.c
-@@ -144,7 +144,6 @@
-
- gboolean register_session;
-
--#ifdef GDK_WINDOWING_X11
- guint next_id;
-
- GDBusConnection *session_bus;
-@@ -161,7 +160,6 @@
- GDBusProxy *client_proxy;
- gchar *app_id;
- gchar *client_path;
--#endif
-
- #ifdef GDK_WINDOWING_QUARTZ
- GMenu *combined;
-@@ -299,6 +297,8 @@
- g_free (application->priv->client_path);
- }
-
-+#endif
-+
- const gchar *
- gtk_application_get_app_menu_object_path (GtkApplication *application)
- {
-@@ -311,8 +311,6 @@
- return application->priv->menubar_path;
- }
-
--#endif
--
- #ifdef GDK_WINDOWING_QUARTZ
-
- typedef struct {
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb b/meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb
index d0174f6093..f4f197131b 100644
--- a/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb
+++ b/meta/recipes-gnome/gtk+/gtk+3_3.12.2.bb
@@ -4,12 +4,11 @@ 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://hardcoded_libtool.patch \
- file://fix-build-when-wayland-backend-enabled.patch \
file://fix-flags-for-native.patch \
"
-SRC_URI[md5sum] = "18a81944a8506231529a76bf2b68372b"
-SRC_URI[sha256sum] = "b7e9de15385031cff43897e7e59f6692eaabf500f36eef80e6b9d6486ad49427"
+SRC_URI[md5sum] = "0d6d8f9f79132b3b47475d047b369b1c"
+SRC_URI[sha256sum] = "61d74eea74231b1ea4b53084a9d6fc9917ab0e1d71b69d92cbf60a4b4fb385d0"
S = "${WORKDIR}/gtk+-${PV}"
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.25.bb
index 98c65a56c6..ada79567e7 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.25.bb
@@ -6,30 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
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://run-iconcache.patch \
- file://configure-nm.patch \
file://hardcoded_libtool.patch \
- file://cellrenderer-cairo.patch;striplevel=0 \
file://toggle-font.diff;striplevel=0 \
- file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
file://doc-fixes.patch \
- file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
"
-# TO MERGE
-# file://entry-cairo.patch;striplevel=0
-# file://filesystem-volumes.patch
-# file://filechooser-props.patch
-# file://filechooser-default.patch
-# file://filechooser-sizefix.patch
-# temporary
-# file://gtklabel-resize-patch
-# file://menu-deactivate.patch
-# file://combo-arrow-size.patch;striplevel=0
-# file://configurefix.patch
-
-SRC_URI[md5sum] = "5fbbfb7637bbd571a572a2dae0e736d2"
-SRC_URI[sha256sum] = "b114b6e9fb389bf3aa8a6d09576538f58dce740779653084046852fb4140ae7f"
+SRC_URI[md5sum] = "612350704dd3aacb95355a4981930c6f"
+SRC_URI[sha256sum] = "38af1020cb8ff3d10dda2c8807f11e92af9d2fa4045de61c62eedb7fbc7ea5b3"
EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
diff --git a/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb b/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
index 9ceeeff1fe..40f324352f 100644
--- a/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
+++ b/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PROVIDES = "gtk-doc gobject-introspection-stub"
-SRCREV = "3dfd0a09de696ec8c544762747f8a0f77153622e"
-PV = "0.0+git${SRCPV}"
+SRCREV = "1dea266593edb766d6d898c79451ef193eb17cfa"
+PV = "1.1+git${SRCPV}"
SRC_URI = "git://git.gnome.org/${BPN}"
diff --git a/meta/recipes-gnome/hicolor-icon-theme/files/index.theme b/meta/recipes-gnome/hicolor-icon-theme/files/index.theme
deleted file mode 100644
index 0471bd53f2..0000000000
--- a/meta/recipes-gnome/hicolor-icon-theme/files/index.theme
+++ /dev/null
@@ -1,1731 +0,0 @@
-[Icon Theme]
-Name=Hicolor
-Comment=Fallback icon theme
-Hidden=true
-Directories=16x16/actions,16x16/animations,16x16/apps,16x16/categories,16x16/devices,16x16/emblems,16x16/emotes,16x16/filesystems,16x16/intl,16x16/mimetypes,16x16/places,16x16/status,16x16/stock,16x16/stock/chart,16x16/stock/code,16x16/stock/data,16x16/stock/form,16x16/stock/image,16x16/stock/io,16x16/stock/media,16x16/stock/navigation,16x16/stock/net,16x16/stock/object,16x16/stock/table,16x16/stock/text,22x22/actions,22x22/animations,22x22/apps,22x22/categories,22x22/devices,22x22/emblems,22x22/emotes,22x22/filesystems,22x22/intl,22x22/mimetypes,22x22/places,22x22/status,22x22/stock,22x22/stock/chart,22x22/stock/code,22x22/stock/data,22x22/stock/form,22x22/stock/image,22x22/stock/io,22x22/stock/media,22x22/stock/navigation,22x22/stock/net,22x22/stock/object,22x22/stock/table,22x22/stock/text,24x24/actions,24x24/animations,24x24/apps,24x24/categories,24x24/devices,24x24/emblems,24x24/emotes,24x24/filesystems,24x24/intl,24x24/mimetypes,24x24/places,24x24/status,24x24/stock,24x24/stock/chart,24x24/stock/code,24x24/stock/data,24x24/stock/form,24x24/stock/image,24x24/stock/io,24x24/stock/media,24x24/stock/navigation,24x24/stock/net,24x24/stock/object,24x24/stock/table,24x24/stock/text,32x32/actions,32x32/animations,32x32/apps,32x32/categories,32x32/devices,32x32/emblems,32x32/emotes,32x32/filesystems,32x32/intl,32x32/mimetypes,32x32/places,32x32/status,32x32/stock,32x32/stock/chart,32x32/stock/code,32x32/stock/data,32x32/stock/form,32x32/stock/image,32x32/stock/io,32x32/stock/media,32x32/stock/navigation,32x32/stock/net,32x32/stock/object,32x32/stock/table,32x32/stock/text,36x36/actions,36x36/animations,36x36/apps,36x36/categories,36x36/devices,36x36/emblems,36x36/emotes,36x36/filesystems,36x36/intl,36x36/mimetypes,36x36/places,36x36/status,36x36/stock,36x36/stock/chart,36x36/stock/code,36x36/stock/data,36x36/stock/form,36x36/stock/image,36x36/stock/io,36x36/stock/media,36x36/stock/navigation,36x36/stock/net,36x36/stock/object,36x36/stock/table,36x36/stock/text,48x48/actions,48x48/animations,48x48/apps,48x48/categories,48x48/devices,48x48/emblems,48x48/emotes,48x48/filesystems,48x48/intl,48x48/mimetypes,48x48/places,48x48/status,48x48/stock,48x48/stock/chart,48x48/stock/code,48x48/stock/data,48x48/stock/form,48x48/stock/image,48x48/stock/io,48x48/stock/media,48x48/stock/navigation,48x48/stock/net,48x48/stock/object,48x48/stock/table,48x48/stock/text,64x64/actions,64x64/animations,64x64/apps,64x64/categories,64x64/devices,64x64/emblems,64x64/emotes,64x64/filesystems,64x64/intl,64x64/mimetypes,64x64/places,64x64/status,64x64/stock,64x64/stock/chart,64x64/stock/code,64x64/stock/data,64x64/stock/form,64x64/stock/image,64x64/stock/io,64x64/stock/media,64x64/stock/navigation,64x64/stock/net,64x64/stock/object,64x64/stock/table,64x64/stock/text,72x72/actions,72x72/animations,72x72/apps,72x72/categories,72x72/devices,72x72/emblems,72x72/emotes,72x72/filesystems,72x72/intl,72x72/mimetypes,72x72/places,72x72/status,72x72/stock,72x72/stock/chart,72x72/stock/code,72x72/stock/data,72x72/stock/form,72x72/stock/image,72x72/stock/io,72x72/stock/media,72x72/stock/navigation,72x72/stock/net,72x72/stock/object,72x72/stock/table,72x72/stock/text,96x96/actions,96x96/animations,96x96/apps,96x96/categories,96x96/devices,96x96/emblems,96x96/emotes,96x96/filesystems,96x96/intl,96x96/mimetypes,96x96/places,96x96/status,96x96/stock,96x96/stock/chart,96x96/stock/code,96x96/stock/data,96x96/stock/form,96x96/stock/image,96x96/stock/io,96x96/stock/media,96x96/stock/navigation,96x96/stock/net,96x96/stock/object,96x96/stock/table,96x96/stock/text,128x128/actions,128x128/animations,128x128/apps,128x128/categories,128x128/devices,128x128/emblems,128x128/emotes,128x128/filesystems,128x128/intl,128x128/mimetypes,128x128/places,128x128/status,128x128/stock,128x128/stock/chart,128x128/stock/code,128x128/stock/data,128x128/stock/form,128x128/stock/image,128x128/stock/io,128x128/stock/media,128x128/stock/navigation,128x128/stock/net,128x128/stock/object,128x128/stock/table,128x128/stock/text,192x192/actions,192x192/animations,192x192/apps,192x192/categories,192x192/devices,192x192/emblems,192x192/emotes,192x192/filesystems,192x192/intl,192x192/mimetypes,192x192/places,192x192/status,192x192/stock,192x192/stock/chart,192x192/stock/code,192x192/stock/data,192x192/stock/form,192x192/stock/image,192x192/stock/io,192x192/stock/media,192x192/stock/navigation,192x192/stock/net,192x192/stock/object,192x192/stock/table,192x192/stock/text,scalable/actions,scalable/animations,scalable/apps,scalable/categories,scalable/devices,scalable/emblems,scalable/emotes,scalable/filesystems,scalable/intl,scalable/mimetypes,scalable/places,scalable/status,scalable/stock,scalable/stock/chart,scalable/stock/code,scalable/stock/data,scalable/stock/form,scalable/stock/image,scalable/stock/io,scalable/stock/media,scalable/stock/navigation,scalable/stock/net,scalable/stock/object,scalable/stock/table,scalable/stock/text,12x12/apps,12x12/devices,12x12/filesystems,12x12/hildon,12x12/mimetypes,16x16/hildon,26x26/apps,26x26/devices,26x26/filesystems,26x26/hildon,26x26/mimetypes,34x34/apps,34x34/devices,34x34/filesystems,34x34/hildon,34x34/mimetypes,40x40/apps,40x40/devices,40x40/filesystems,40x40/hildon,40x40/mimetypes,50x50/apps,50x50/devices,50x50/filesystems,50x50/hildon,50x50/mimetypes,250x250/apps,250x250/devices,250x250/filesystems,250x250/hildon,250x250/mimetypes,scalable/hildon
-
-[12x12/apps]
-Size=12
-Context=Applications
-Type=Threshold
-
-[12x12/devices]
-Size=12
-Context=Devices
-Type=Threshold
-
-[12x12/filesystems]
-Size=12
-Context=FileSystems
-Type=Threshold
-
-[12x12/hildon]
-Size=12
-Context=hildon
-Type=Threshold
-
-[12x12/mimetypes]
-Size=12
-Context=MimeTypes
-Type=Threshold
-
-[16x16/actions]
-Size=16
-Context=Actions
-Type=Threshold
-
-[16x16/animations]
-Size=16
-Context=Animations
-Type=Threshold
-
-[16x16/apps]
-Size=16
-Context=Applications
-Type=Threshold
-
-[16x16/categories]
-Size=16
-Context=Categories
-Type=Threshold
-
-[16x16/devices]
-Size=16
-Context=Devices
-Type=Threshold
-
-[16x16/emblems]
-Size=16
-Context=Emblems
-Type=Threshold
-
-[16x16/emotes]
-Size=16
-Context=Emotes
-Type=Threshold
-
-[16x16/filesystems]
-Size=16
-Context=FileSystems
-Type=Threshold
-
-[16x16/hildon]
-Size=16
-Context=hildon
-Type=Threshold
-
-[16x16/intl]
-Size=16
-Context=International
-Type=Threshold
-
-[16x16/mimetypes]
-Size=16
-Context=MimeTypes
-Type=Threshold
-
-[16x16/places]
-Size=16
-Context=Places
-Type=Threshold
-
-[16x16/status]
-Size=16
-Context=Status
-Type=Threshold
-
-[16x16/stock/chart]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/code]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/data]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/form]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/image]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/io]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/media]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/navigation]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/net]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/object]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/table]
-Size=16
-Context=Stock
-Type=Threshold
-
-[16x16/stock/text]
-Size=16
-Context=Stock
-Type=Threshold
-
-[22x22/actions]
-Size=22
-Context=Actions
-Type=Threshold
-
-[22x22/animations]
-Size=22
-Context=Animations
-Type=Threshold
-
-[22x22/apps]
-Size=22
-Context=Applications
-Type=Fixed
-
-[22x22/categories]
-Size=22
-Context=Categories
-Type=Threshold
-
-[22x22/devices]
-Size=22
-Context=Devices
-Type=Threshold
-
-[22x22/emblems]
-Size=22
-Context=Emblems
-Type=Threshold
-
-[22x22/emotes]
-Size=22
-Context=Emotes
-Type=Threshold
-
-[22x22/filesystems]
-Size=22
-Context=FileSystems
-Type=Threshold
-
-[22x22/intl]
-Size=22
-Context=International
-Type=Threshold
-
-[22x22/mimetypes]
-Size=22
-Context=MimeTypes
-Type=Threshold
-
-[22x22/places]
-Size=22
-Context=Places
-Type=Threshold
-
-[22x22/status]
-Size=22
-Context=Status
-Type=Threshold
-
-[22x22/stock/chart]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/code]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/data]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/form]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/image]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/io]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/media]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/navigation]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/net]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/object]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/table]
-Size=22
-Context=Stock
-Type=Threshold
-
-[22x22/stock/text]
-Size=22
-Context=Stock
-Type=Threshold
-
-[24x24/actions]
-Size=24
-Context=Actions
-Type=Threshold
-
-[24x24/animations]
-Size=24
-Context=Animations
-Type=Threshold
-
-[24x24/apps]
-Size=24
-Context=Applications
-Type=Threshold
-
-[24x24/categories]
-Size=24
-Context=Categories
-Type=Threshold
-
-[24x24/devices]
-Size=24
-Context=Devices
-Type=Threshold
-
-[24x24/emblems]
-Size=24
-Context=Emblems
-Type=Threshold
-
-[24x24/emotes]
-Size=24
-Context=Emotes
-Type=Threshold
-
-[24x24/filesystems]
-Size=24
-Context=FileSystems
-Type=Threshold
-
-[24x24/intl]
-Size=24
-Context=International
-Type=Threshold
-
-[24x24/mimetypes]
-Size=24
-Context=MimeTypes
-Type=Threshold
-
-[24x24/places]
-Size=24
-Context=Places
-Type=Threshold
-
-[24x24/status]
-Size=24
-Context=Status
-Type=Threshold
-
-[24x24/stock/chart]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/code]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/data]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/form]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/image]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/io]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/media]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/navigation]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/net]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/object]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/table]
-Size=24
-Context=Stock
-Type=Threshold
-
-[24x24/stock/text]
-Size=24
-Context=Stock
-Type=Threshold
-
-[26x26/apps]
-Size=26
-Context=Applications
-Type=Threshold
-
-[26x26/devices]
-Size=26
-Context=Devices
-Type=Threshold
-
-[26x26/filesystems]
-Size=26
-Context=FileSystems
-Type=Threshold
-
-[26x26/hildon]
-Size=26
-Context=hildon
-Type=Threshold
-
-[26x26/mimetypes]
-Size=26
-Context=MimeTypes
-Type=Threshold
-
-[32x32/actions]
-Size=32
-Context=Actions
-Type=Threshold
-
-[32x32/animations]
-Size=32
-Context=Animations
-Type=Threshold
-
-[32x32/apps]
-Size=32
-Context=Applications
-Type=Threshold
-
-[32x32/categories]
-Size=32
-Context=Categories
-Type=Threshold
-
-[32x32/devices]
-Size=32
-Context=Devices
-Type=Threshold
-
-[32x32/emblems]
-Size=32
-Context=Emblems
-Type=Threshold
-
-[32x32/emotes]
-Size=32
-Context=Emotes
-Type=Threshold
-
-[32x32/filesystems]
-Size=32
-Context=FileSystems
-Type=Threshold
-
-[32x32/intl]
-Size=32
-Context=International
-Type=Threshold
-
-[32x32/mimetypes]
-Size=32
-Context=MimeTypes
-Type=Threshold
-
-[32x32/places]
-Size=32
-Context=Places
-Type=Threshold
-
-[32x32/status]
-Size=32
-Context=Status
-Type=Threshold
-
-[32x32/stock/chart]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/code]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/data]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/form]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/image]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/io]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/media]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/navigation]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/net]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/object]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/table]
-Size=32
-Context=Stock
-Type=Threshold
-
-[32x32/stock/text]
-Size=32
-Context=Stock
-Type=Threshold
-
-[34x34/apps]
-Size=34
-Context=Applications
-Type=Threshold
-
-[34x34/devices]
-Size=34
-Context=Devices
-Type=Threshold
-
-[34x34/filesystems]
-Size=34
-Context=FileSystems
-Type=Threshold
-
-[34x34/hildon]
-Size=34
-Context=hildon
-Type=Threshold
-
-[34x34/mimetypes]
-Size=34
-Context=MimeTypes
-Type=Threshold
-
-[36x36/actions]
-Size=36
-Context=Actions
-Type=Threshold
-
-[36x36/animations]
-Size=36
-Context=Animations
-Type=Threshold
-
-[36x36/apps]
-Size=36
-Context=Applications
-Type=Threshold
-
-[36x36/categories]
-Size=36
-Context=Categories
-Type=Threshold
-
-[36x36/devices]
-Size=36
-Context=Devices
-Type=Threshold
-
-[36x36/emblems]
-Size=36
-Context=Emblems
-Type=Threshold
-
-[36x36/emotes]
-Size=36
-Context=Emotes
-Type=Threshold
-
-[36x36/filesystems]
-Size=36
-Context=FileSystems
-Type=Threshold
-
-[36x36/intl]
-Size=36
-Context=International
-Type=Threshold
-
-[36x36/mimetypes]
-Size=36
-Context=MimeTypes
-Type=Threshold
-
-[36x36/places]
-Size=36
-Context=Places
-Type=Threshold
-
-[36x36/status]
-Size=36
-Context=Status
-Type=Threshold
-
-[36x36/stock/chart]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/code]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/data]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/form]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/image]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/io]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/media]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/navigation]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/net]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/object]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/table]
-Size=36
-Context=Stock
-Type=Threshold
-
-[36x36/stock/text]
-Size=36
-Context=Stock
-Type=Threshold
-
-[40x40/apps]
-Size=40
-Context=Applications
-Type=Threshold
-
-[40x40/devices]
-Size=40
-Context=Devices
-Type=Threshold
-
-[40x40/filesystems]
-Size=40
-Context=FileSystems
-Type=Threshold
-
-[40x40/hildon]
-Size=40
-Context=hildon
-Type=Threshold
-
-[40x40/mimetypes]
-Size=40
-Context=MimeTypes
-Type=Threshold
-
-[48x48/actions]
-Size=48
-Context=Actions
-Type=Threshold
-
-[48x48/animations]
-Size=48
-Context=Animations
-Type=Threshold
-
-[48x48/apps]
-Size=48
-Context=Applications
-Type=Threshold
-
-[48x48/categories]
-Size=48
-Context=Categories
-Type=Threshold
-
-[48x48/devices]
-Size=48
-Context=Devices
-Type=Threshold
-
-[48x48/emblems]
-Size=48
-Context=Emblems
-Type=Threshold
-
-[48x48/emotes]
-Size=48
-Context=Emotes
-Type=Threshold
-
-[48x48/filesystems]
-Size=48
-Context=FileSystems
-Type=Threshold
-
-[48x48/intl]
-Size=48
-Context=International
-Type=Threshold
-
-[48x48/mimetypes]
-Size=48
-Context=MimeTypes
-Type=Threshold
-
-[48x48/places]
-Size=48
-Context=Places
-Type=Threshold
-
-[48x48/status]
-Size=48
-Context=Status
-Type=Threshold
-
-[48x48/stock/chart]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/code]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/data]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/form]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/image]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/io]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/media]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/navigation]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/net]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/object]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/table]
-Size=48
-Context=Stock
-Type=Threshold
-
-[48x48/stock/text]
-Size=48
-Context=Stock
-Type=Threshold
-
-[50x50/apps]
-Size=50
-Context=Applications
-Type=Threshold
-
-[50x50/devices]
-Size=50
-Context=Devices
-Type=Threshold
-
-[50x50/filesystems]
-Size=50
-Context=FileSystems
-Type=Threshold
-
-[50x50/hildon]
-Size=50
-Context=hildon
-Type=Threshold
-
-[50x50/mimetypes]
-Size=50
-Context=MimeTypes
-Type=Threshold
-
-[64x64/actions]
-Size=64
-Context=Actions
-Type=Threshold
-
-[64x64/animations]
-Size=64
-Context=Animations
-Type=Threshold
-
-[64x64/apps]
-Size=64
-Context=Applications
-Type=Threshold
-
-[64x64/categories]
-Size=64
-Context=Categories
-Type=Threshold
-
-[64x64/devices]
-Size=64
-Context=Devices
-Type=Threshold
-
-[64x64/emblems]
-Size=64
-Context=Emblems
-Type=Threshold
-
-[64x64/emotes]
-Size=64
-Context=Emotes
-Type=Threshold
-
-[64x64/filesystems]
-Size=64
-Context=FileSystems
-Type=Threshold
-
-[64x64/intl]
-Size=64
-Context=International
-Type=Threshold
-
-[64x64/mimetypes]
-Size=64
-Context=MimeTypes
-Type=Threshold
-
-[64x64/places]
-Size=64
-Context=Places
-Type=Threshold
-
-[64x64/status]
-Size=64
-Context=Status
-Type=Threshold
-
-[64x64/stock/chart]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/code]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/data]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/form]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/image]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/io]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/media]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/navigation]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/net]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/object]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/table]
-Size=64
-Context=Stock
-Type=Threshold
-
-[64x64/stock/text]
-Size=64
-Context=Stock
-Type=Threshold
-[72x72/actions]
-Size=72
-Context=Actions
-Type=Threshold
-
-[72x72/animations]
-Size=72
-Context=Animations
-Type=Threshold
-
-[72x72/apps]
-Size=72
-Context=Applications
-Type=Threshold
-
-[72x72/categories]
-Size=72
-Context=Categories
-Type=Threshold
-
-[72x72/devices]
-Size=72
-Context=Devices
-Type=Threshold
-
-[72x72/emblems]
-Size=72
-Context=Emblems
-Type=Threshold
-
-[72x72/emotes]
-Size=72
-Context=Emotes
-Type=Threshold
-
-[72x72/filesystems]
-Size=72
-Context=FileSystems
-Type=Threshold
-
-[72x72/intl]
-Size=72
-Context=International
-Type=Threshold
-
-[72x72/mimetypes]
-Size=72
-Context=MimeTypes
-Type=Threshold
-
-[72x72/places]
-Size=72
-Context=Places
-Type=Threshold
-
-[72x72/status]
-Size=72
-Context=Status
-Type=Threshold
-
-[72x72/stock/chart]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/code]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/data]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/form]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/image]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/io]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/media]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/navigation]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/net]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/object]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/table]
-Size=72
-Context=Stock
-Type=Threshold
-
-[72x72/stock/text]
-Size=72
-Context=Stock
-Type=Threshold
-
-[96x96/actions]
-Size=96
-Context=Actions
-Type=Threshold
-
-[96x96/animations]
-Size=96
-Context=Animations
-Type=Threshold
-
-[96x96/apps]
-Size=96
-Context=Applications
-Type=Threshold
-
-[96x96/categories]
-Size=96
-Context=Categories
-Type=Threshold
-
-[96x96/devices]
-Size=96
-Context=Devices
-Type=Threshold
-
-[96x96/emblems]
-Size=96
-Context=Emblems
-Type=Threshold
-
-[96x96/emotes]
-Size=96
-Context=Emotes
-Type=Threshold
-
-[96x96/filesystems]
-Size=96
-Context=FileSystems
-Type=Threshold
-
-[96x96/intl]
-Size=96
-Context=International
-Type=Threshold
-
-[96x96/mimetypes]
-Size=96
-Context=MimeTypes
-Type=Threshold
-
-[96x96/places]
-Size=96
-Context=Places
-Type=Threshold
-
-[96x96/status]
-Size=96
-Context=Status
-Type=Threshold
-
-[96x96/stock/chart]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/code]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/data]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/form]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/image]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/io]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/media]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/navigation]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/net]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/object]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/table]
-Size=96
-Context=Stock
-Type=Threshold
-
-[96x96/stock/text]
-Size=96
-Context=Stock
-Type=Threshold
-
-[128x128/actions]
-Size=128
-Context=Actions
-Type=Threshold
-
-[128x128/animations]
-Size=128
-Context=Animations
-Type=Threshold
-
-[128x128/apps]
-Size=128
-Context=Applications
-Type=Threshold
-
-[128x128/categories]
-Size=128
-Context=Categories
-Type=Threshold
-
-[128x128/devices]
-Size=128
-Context=Devices
-Type=Threshold
-
-[128x128/emblems]
-Size=128
-Context=Emblems
-Type=Threshold
-
-[128x128/emotes]
-Size=128
-Context=Emotes
-Type=Threshold
-
-[128x128/filesystems]
-Size=128
-Context=FileSystems
-Type=Threshold
-
-[128x128/intl]
-Size=128
-Context=International
-Type=Threshold
-
-[128x128/mimetypes]
-Size=128
-Context=MimeTypes
-Type=Threshold
-
-[128x128/places]
-Size=128
-Context=Places
-Type=Threshold
-
-[128x128/status]
-Size=128
-Context=Status
-Type=Threshold
-
-[128x128/stock/chart]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/code]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/data]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/form]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/image]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/io]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/media]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/navigation]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/net]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/object]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/table]
-Size=128
-Context=Stock
-Type=Threshold
-
-[128x128/stock/text]
-Size=128
-Context=Stock
-Type=Threshold
-
-[192x192/actions]
-Size=192
-Context=Actions
-Type=Threshold
-
-[192x192/animations]
-Size=192
-Context=Animations
-Type=Threshold
-
-[192x192/apps]
-Size=192
-Context=Applications
-Type=Threshold
-
-[192x192/categories]
-Size=192
-Context=Categories
-Type=Threshold
-
-[192x192/devices]
-Size=192
-Context=Devices
-Type=Threshold
-
-[192x192/emblems]
-Size=192
-Context=Emblems
-Type=Threshold
-
-[192x192/emotes]
-Size=192
-Context=Emotes
-Type=Threshold
-
-[192x192/filesystems]
-Size=192
-Context=FileSystems
-Type=Threshold
-
-[192x192/intl]
-Size=192
-Context=International
-Type=Threshold
-
-[192x192/mimetypes]
-Size=192
-Context=MimeTypes
-Type=Threshold
-
-[192x192/places]
-Size=192
-Context=Places
-Type=Threshold
-
-[192x192/status]
-Size=192
-Context=Status
-Type=Threshold
-
-[192x192/stock/chart]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/code]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/data]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/form]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/image]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/io]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/media]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/navigation]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/net]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/object]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/table]
-Size=192
-Context=Stock
-Type=Threshold
-
-[192x192/stock/text]
-Size=192
-Context=Stock
-Type=Threshold
-
-[250x250/apps]
-Size=250
-Context=Applications
-Type=Threshold
-
-[250x250/devices]
-Size=250
-Context=Devices
-Type=Threshold
-
-[250x250/filesystems]
-Size=250
-Context=FileSystems
-Type=Threshold
-
-[250x250/hildon]
-Size=250
-Context=hildon
-Type=Threshold
-
-[250x250/mimetypes]
-Size=250
-Context=MimeTypes
-Type=Threshold
-
-[scalable/actions]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Actions
-Type=Scalable
-
-[scalable/animations]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Animations
-Type=Scalable
-
-[scalable/apps]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Applications
-Type=Scalable
-
-[scalable/categories]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Categories
-Type=Scalable
-
-[scalable/devices]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Devices
-Type=Scalable
-
-[scalable/emblems]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Emblems
-Type=Scalable
-
-[scalable/emotes]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Emotes
-Type=Scalable
-
-[scalable/filesystems]
-MinSize=1
-Size=128
-MaxSize=256
-Context=FileSystems
-Type=Scalable
-
-[scalable/hildon]
-MinSize=1
-Size=128
-MaxSize=256
-Context=hildon
-Type=Scalable
-
-[scalable/intl]
-MinSize=1
-Size=128
-MaxSize=256
-Context=International
-Type=Scalable
-
-[scalable/mimetypes]
-MinSize=1
-Size=128
-MaxSize=256
-Context=MimeTypes
-Type=Scalable
-
-[scalable/places]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Places
-Type=Scalable
-
-[scalable/status]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Status
-Type=Scalable
-
-[scalable/stock/chart]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/code]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/data]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/form]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/image]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/io]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/media]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/navigation]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/net]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/object]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/table]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[scalable/stock/text]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
-
-[12x12/stock]
-Size=12
-Context=Stock
-Type=Threshold
-
-[16x16/stock]
-Size=16
-Context=Stock
-Type=Threshold
-
-[22x22/stock]
-Size=22
-Context=Stock
-Type=Threshold
-
-[24x24/stock]
-Size=24
-Context=Stock
-Type=Threshold
-
-[26x26/stock]
-Size=26
-Context=Stock
-Type=Threshold
-
-[32x32/stock]
-Size=32
-Context=Stock
-Type=Threshold
-
-[34x34/stock]
-Size=34
-Context=Stock
-Type=Threshold
-
-[36x36/stock]
-Size=36
-Context=Stock
-Type=Threshold
-
-[48x48/stock]
-Size=48
-Context=Stock
-Type=Threshold
-
-[64x64/stock]
-Size=64
-Context=Stock
-Type=Threshold
-
-[72x72/stock]
-Size=72
-Context=Stock
-Type=Threshold
-
-[96x96/stock]
-Size=96
-Context=Stock
-Type=Threshold
-
-[128x128/stock]
-Size=128
-Context=Stock
-Type=Threshold
-
-[192x192/stock]
-Size=192
-Context=Stock
-Type=Threshold
-
-[scalable/stock]
-MinSize=1
-Size=128
-MaxSize=256
-Context=Stock
-Type=Scalable
diff --git a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb
index 4441e04f58..9cb8056655 100644
--- a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb
+++ b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.14.bb
@@ -5,19 +5,10 @@ BUGTRACKER = "https://bugs.freedesktop.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=f08a446809913fc9b3c718f0eaea0426"
-SECTION = "unknown"
-inherit gnomebase allarch autotools-brokensep
+SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "56d2c6c3a9df5a0acd332430e3f3ae3e"
+SRC_URI[sha256sum] = "7bed06e6ef316318274bda0fdaf39fce960e4222a0165c968d84acb428902ecd"
-PR = "r1"
-
-SRC_URI = "http://icon-theme.freedesktop.org/releases/${BPN}-${PV}.tar.gz \
- file://index.theme"
-
-SRC_URI[md5sum] = "55cafbcef8bcf7107f6d502149eb4d87"
-SRC_URI[sha256sum] = "9edca690617eaa19054951ca53501c802180262be8880ed84754ac46c93bec73"
+inherit allarch autotools
FILES_${PN} += "${datadir}/icons"
-
-do_install_append () {
- install -m 0644 ${WORKDIR}/index.theme ${D}/${datadir}/icons/hicolor
-}
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.0.0.bb b/meta/recipes-gnome/json-glib/json-glib_1.0.2.bb
index ce007094b4..0c25deca74 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.0.0.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.0.2.bb
@@ -12,8 +12,8 @@ DEPENDS = "glib-2.0"
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "d13485f5aa3b93227bbeb689ccfb596c"
-SRC_URI[archive.sha256sum] = "dbf558d2da989ab84a27e4e13daa51ceaa97eb959c2c2f80976c9322a8f4cdde"
+SRC_URI[archive.md5sum] = "e43efaf6852958207982e79141bf371e"
+SRC_URI[archive.sha256sum] = "887bd192da8f5edc53b490ec51bf3ffebd958a671f5963e4f3af32c22e35660a"
inherit gnome gettext lib_package
diff --git a/meta/recipes-gnome/libffi/libffi_3.1.bb b/meta/recipes-gnome/libffi/libffi_3.2.1.bb
index bc97aba20b..23028109cc 100644
--- a/meta/recipes-gnome/libffi/libffi_3.1.bb
+++ b/meta/recipes-gnome/libffi/libffi_3.2.1.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
file://fix-libffi.la-location.patch"
-SRC_URI[md5sum] = "f5898b29bbfd70502831a212d9249d10"
-SRC_URI[sha256sum] = "97feeeadca5e21870fa4433bc953d1b3af3f698d5df8a428f68b73cd60aef6eb"
+SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
+SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
EXTRA_OECONF += "--disable-builddir"
diff --git a/meta/recipes-gnome/librsvg/librsvg/vapigen.m4 b/meta/recipes-gnome/librsvg/librsvg/vapigen.m4
deleted file mode 100644
index f2df12f23f..0000000000
--- a/meta/recipes-gnome/librsvg/librsvg/vapigen.m4
+++ /dev/null
@@ -1,96 +0,0 @@
-dnl vapigen.m4
-dnl
-dnl Copyright 2012 Evan Nemerson
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
-# --------------------------------------
-# Check vapigen existence and version
-#
-# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
-AC_DEFUN([VAPIGEN_CHECK],
-[
- AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
- AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
-
- AC_ARG_ENABLE([vala],
- [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
- AS_IF([test "x$4" = "x"], [
- enable_vala=auto
- ], [
- enable_vala=$4
- ])
- ])
-
- AS_CASE([$enable_vala], [no], [enable_vala=no],
- [yes], [
- AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
- AC_MSG_ERROR([Vala bindings require GObject Introspection])
- ])
- ], [auto], [
- AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
- enable_vala=no
- ])
- ], [
- AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
- ])
-
- AS_IF([test "x$2" = "x"], [
- vapigen_pkg_name=vapigen
- ], [
- vapigen_pkg_name=vapigen-$2
- ])
- AS_IF([test "x$1" = "x"], [
- vapigen_pkg="$vapigen_pkg_name"
- ], [
- vapigen_pkg="$vapigen_pkg_name >= $1"
- ])
-
- PKG_PROG_PKG_CONFIG
-
- PKG_CHECK_EXISTS([$vapigen_pkg], [
- AS_IF([test "$enable_vala" = "auto"], [
- enable_vala=yes
- ])
- ], [
- AS_CASE([$enable_vala], [yes], [
- AC_MSG_ERROR([$vapigen_pkg not found])
- ], [auto], [
- enable_vala=no
- ])
- ])
-
- AC_MSG_CHECKING([for vala])
-
- AS_CASE([$enable_vala],
- [yes], [
- VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
- VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
- AS_IF([test "x$2" = "x"], [
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
- ], [
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
- ])
- ])
-
- AC_MSG_RESULT([$enable_vala])
-
- AC_SUBST([VAPIGEN])
- AC_SUBST([VAPIGEN_VAPIDIR])
- AC_SUBST([VAPIGEN_MAKEFILE])
-
- AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
-])
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb b/meta/recipes-gnome/librsvg/librsvg_2.40.6.bb
index 34d8ca1bf8..483d30980f 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.40.6.bb
@@ -14,29 +14,23 @@ inherit autotools pkgconfig gnomebase gtk-doc pixbufcache
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI += "file://gtk-option.patch \
- file://vapigen.m4"
+SRC_URI += "file://gtk-option.patch"
-SRC_URI[archive.md5sum] = "acdecdb9f08f3bf662a68bf7dafb8b82"
-SRC_URI[archive.sha256sum] = "48049b643294636df7de1a4b997414d699666f5dc44776945c218a257d2a291c"
+SRC_URI[archive.md5sum] = "259fd160b47ec11f3c27d7e18e507c99"
+SRC_URI[archive.sha256sum] = "8af349f241677b04b7a1ea6b9b33a6343e781bcccc8a09d00208a47342584f06"
EXTRA_OECONF = "--disable-introspection --disable-vala"
+# 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"
-# The tarball doesn't ship with macros, so drop a vapigen in there so we don't
-# need to build vala to configure.
-do_configure_prepend() {
- if test ! -e ${S}/m4/vapigen.m4; then
- mkdir --parents ${S}/m4
- mv ${WORKDIR}/vapigen.m4 ${S}/m4/
- fi
-}
-
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
diff --git a/meta/recipes-graphics/builder/files/builder_hob_start.sh b/meta/recipes-graphics/builder/files/builder_hob_start.sh
index 42c93ddbc0..65a68eec42 100644
--- a/meta/recipes-graphics/builder/files/builder_hob_start.sh
+++ b/meta/recipes-graphics/builder/files/builder_hob_start.sh
@@ -30,10 +30,6 @@ fi
cd /home/builder/poky
. ./oe-init-build-env
-#uncomment the settings for BB_NUMBER_THREADS and PARALLEL_MAKE
-sed -i 's/^#BB_NUMBER_THREADS =/BB_NUMBER_THREADS =/g' conf/local.conf
-sed -i 's/^#PARALLEL_MAKE =/PARALLEL_MAKE =/g' conf/local.conf
-
hob &
matchbox-terminal&
diff --git a/meta/recipes-graphics/cairo/cairo_1.12.16.bb b/meta/recipes-graphics/cairo/cairo_1.12.18.bb
index 246bd0be64..fd0bd8c36d 100644
--- a/meta/recipes-graphics/cairo/cairo_1.12.16.bb
+++ b/meta/recipes-graphics/cairo/cairo_1.12.18.bb
@@ -4,8 +4,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
-SRC_URI[md5sum] = "a1304edcdc99282f478b995ee5f8f854"
-SRC_URI[sha256sum] = "2505959eb3f1de3e1841023b61585bfd35684b9733c7b6a3643f4f4cbde6d846"
+SRC_URI[md5sum] = "8e4ff32b82c3b39387eb6f5c59ef848e"
+SRC_URI[sha256sum] = "dc59f0b7ac945ce4e138a03c227a29260915a8b05a4226c1f6f1be586ba7f5b6"
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0.inc b/meta/recipes-graphics/clutter/clutter-1.0.inc
index 77035d746f..da21cee8b5 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -2,7 +2,7 @@ SUMMARY = "Graphics library for creating hardware-accelerated user interfaces"
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPLv2.1+"
-inherit clutter
+inherit clutter ptest-gnome
DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0"
PACKAGE_BEFORE_PN += "${PN}-examples"
@@ -33,12 +33,15 @@ PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,${E
PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayland-compositor,wayland"
# Default configuration, distros might want to override
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+PACKAGECONFIG ??= "egl \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}"
FILES_${PN}-dbg += "${libdir}/clutter/examples/.debug"
FILES_${PN}-examples = "${libdir}/clutter/examples"
+FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
+
do_configure_prepend() {
# see https://bugzilla.gnome.org/show_bug.cgi?id=661128 for this
touch -t 200001010000 ${S}/po/clutter-1.0.pot
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
new file mode 100644
index 0000000000..80acab867c
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch
@@ -0,0 +1,20 @@
+Configure output from installed-tests to be TAP compliant, such that gnome-desktop-testing-runner properly interprets the results.
+
+Upstream-status: Pending
+
+Signed-off-by: Tim Orling <TicoTimo@gmail.com>
+
+Index: clutter-1.20.0/build/autotools/glib-tap.mk
+===================================================================
+--- clutter-1.20.0.orig/build/autotools/glib-tap.mk
++++ clutter-1.20.0/build/autotools/glib-tap.mk
+@@ -128,7 +128,8 @@ installed_test_meta_DATA = $(installed_t
+ $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
+ echo 'Type=session' >> $@.tmp; \
+ echo 'TestEnvironment=G_ENABLE_DIAGNOSTIC=0;CLUTTER_ENABLE_DIAGNOSTIC=0;' >> $@.tmp; \
+- echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
++ echo 'Exec=$(installed_testdir)/$< --tap' >> $@.tmp; \
++ echo 'Output=TAP' >> $@.tmp; \
+ mv $@.tmp $@)
+
+ CLEANFILES += $(installed_test_meta_DATA)
diff --git a/meta/recipes-graphics/clutter/clutter-1.0/run-ptest b/meta/recipes-graphics/clutter/clutter-1.0/run-ptest
new file mode 100644
index 0000000000..98877e5226
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+gnome-desktop-testing-runner clutter
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb
deleted file mode 100644
index 452e7eefd0..0000000000
--- a/meta/recipes-graphics/clutter/clutter-1.0_1.18.2.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require clutter-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI[archive.md5sum] = "471f5ea423e20d4140c7771873daef29"
-SRC_URI[archive.sha256sum] = "f9fe12e6148426063c90e67dfaeb56013bf1aea224ef502223d13eab6c1add63"
-
-SRC_URI += "file://install-examples.patch"
diff --git a/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb b/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb
new file mode 100644
index 0000000000..5f39a3a8ac
--- /dev/null
+++ b/meta/recipes-graphics/clutter/clutter-1.0_1.20.0.bb
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "a8a33a57a944c6d7c7c013ce9aa3222b"
+SRC_URI[archive.sha256sum] = "cc940809e6e1469ce349c4bddb0cbcc2c13c087d4fc15cda9278d855ee2d1293"
+
+SRC_URI += "file://install-examples.patch \
+ file://run-installed-tests-with-tap-output.patch \
+ file://run-ptest"
diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc
index e25968e468..af06484903 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -8,7 +8,8 @@ DEPENDS = "glib-2.0 gdk-pixbuf"
PACKAGES =+ "${PN}-examples \
libcogl libcogl-dev \
libcogl-gles2 libcogl-gles2-dev \
- libcogl-pango libcogl-pango-dev"
+ libcogl-pango libcogl-pango-dev \
+ libcogl-path libcogl-path-dev"
AUTOTOOLS_AUXDIR = "${S}/build"
# Extra DEPENDS for PACKAGECONFIG
@@ -41,7 +42,7 @@ PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDE
# EGL backends
PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
-PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11}"
+PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
# Wayland (server-side)
@@ -54,7 +55,9 @@ PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
# default.
PACKAGECONFIG ??= "cogl-pango gles2 \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx', '', d)}"
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
+ "
+
FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
FILES_libcogl = "${libdir}/libcogl${SOLIBS}"
@@ -68,12 +71,18 @@ FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
FILES_libcogl-gles2-dev = "${includedir}/cogl/cogl-gles2 \
${libdir}/libcogl-gles2${SOLIBSDEV} \
${libdir}/libcogl-gles2.la \
- ${libdir}/pkgconfig/cogl-gles2-experimental.pc"
+ ${libdir}/pkgconfig/cogl-gles2-*.pc"
FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS}"
FILES_libcogl-pango-dev = "${includedir}/cogl/cogl-pango \
${libdir}/libcogl-pango${SOLIBSDEV} \
${libdir}/libcogl-pango.la \
- ${libdir}/pkgconfig/cogl-pango-1.0.pc"
+ ${libdir}/pkgconfig/cogl-pango-*.pc"
+
+FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
+FILES_libcogl-path-dev = "${includedir}/cogl/cogl-path \
+ ${libdir}/libcogl-path${SOLIBSDEV} \
+ ${libdir}/libcogl-path.la \
+ ${libdir}/pkgconfig/cogl-path-*.pc"
# For backwards compatibility after Debian-renaming
RPROVIDES_libcogl = "cogl-1.0"
diff --git a/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch b/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
new file mode 100644
index 0000000000..0717ea6f88
--- /dev/null
+++ b/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
@@ -0,0 +1,28 @@
+From 88077ed156a714f32bb408f422278d61611ffd41 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Sat, 26 Jul 2014 16:57:46 -0300
+Subject: [PATCH] configure.in: Fix string argument syntax
+
+Upstream-Status: Submitted
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index bfe1b82..e939bbd 100644
+--- a/configure.in
++++ b/configure.in
+@@ -65,7 +65,7 @@ fi)
+
+ DIRECTFB_REQUIRED_VERSION=1.4.14
+
+-PKG_CHECK_MODULES(DIRECTFB, directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
++PKG_CHECK_MODULES([DIRECTFB], directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
+ AC_MSG_ERROR([$DIRECTFB_PKG_ERRORS
+ *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest version
+ *** of DirectFB is available from http://www.directfb.org/.]))
+--
+1.7.10.4
+
diff --git a/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb b/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
index 6057596071..9c3e8bf3d3 100644
--- a/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
+++ b/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
@@ -8,6 +8,7 @@ LICENSE = "MIT"
SRC_URI = " \
http://www.directfb.org/downloads/Extras/DirectFB-examples-${PV}.tar.gz \
+ file://configure.in-Fix-string-argument-syntax.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=ecf6fd2b19915afc4da56043926ca18f"
diff --git a/meta/recipes-graphics/directfb/directfb.inc b/meta/recipes-graphics/directfb/directfb.inc
index 51dc09bc10..669c0ffd9d 100644
--- a/meta/recipes-graphics/directfb/directfb.inc
+++ b/meta/recipes-graphics/directfb/directfb.inc
@@ -25,6 +25,9 @@ inherit autotools binconfig-disabled pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper"
+PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
EXTRA_OECONF = "\
--with-gfxdrivers=none \
diff --git a/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch b/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch
deleted file mode 100644
index 94a9ba5f02..0000000000
--- a/meta/recipes-graphics/directfb/directfb/fixsepbuild.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix out of tree builds
-
-Upstream-Status: Pending
-
-RP 2013/03/21
-
-Index: DirectFB-1.6.1/configure.in
-===================================================================
---- DirectFB-1.6.1.orig/configure.in 2013-03-19 01:38:28.174004720 +0000
-+++ DirectFB-1.6.1/configure.in 2013-03-21 12:18:10.253113675 +0000
-@@ -111,7 +111,7 @@
- AC_PATH_TOOL(FLUXCOMP, fluxcomp)
- AC_SUBST(FLUXCOMP)
- if test -z "$FLUXCOMP"; then
-- if ! test -e src/core/CoreDFB.cpp; then
-+ if ! test -e $srcdir/src/core/CoreDFB.cpp; then
- AC_MSG_ERROR([
- *** DirectFB compilation requires fluxcomp ***
-
diff --git a/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch b/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch
deleted file mode 100644
index 443df5a9da..0000000000
--- a/meta/recipes-graphics/directfb/directfb/rename-no-instrument-function-macro.patch
+++ /dev/null
@@ -1,345 +0,0 @@
-Rename __no_instrument_function__ macro to avoid conficting redefinitions
-of the same symbol.
-
-Upstream-Status: Pending
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: DirectFB-1.6.1/lib/direct/clock.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/clock.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/clock.c 2013-01-05 18:03:24.000000000 +0200
-@@ -36,28 +36,28 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_micros( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_SESSION );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_millis( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_SESSION ) / 1000LL;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_abs_micros( void )
- {
- return direct_clock_get_time( DIRECT_CLOCK_REALTIME );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- long long
- direct_clock_get_abs_millis( void )
- {
-Index: DirectFB-1.6.1/lib/direct/debug.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/debug.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/debug.c 2013-01-05 18:03:49.000000000 +0200
-@@ -48,7 +48,7 @@
-
- #if DIRECT_BUILD_DEBUGS /* Build with debug support? */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_log( DirectLogDomain *domain,
- unsigned int debug_level, /* 1-9, 0 = info */
-@@ -63,7 +63,7 @@
- va_end( ap );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_at( DirectLogDomain *domain,
- const char *format, ... )
-@@ -77,7 +77,7 @@
-
- #endif /* DIRECT_BUILD_DEBUGS */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_debug_at_always( DirectLogDomain *domain,
- const char *format, ... )
-@@ -93,7 +93,7 @@
-
- #if DIRECT_BUILD_DEBUGS /* Build with debug support? */
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_break( const char *func,
- const char *file,
-@@ -123,7 +123,7 @@
- direct_trap( "Break", SIGABRT );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_assertion( const char *exp,
- const char *func,
-@@ -144,7 +144,7 @@
- direct_trap( "Assertion", SIGTRAP );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_assumption( const char *exp,
- const char *func,
-Index: DirectFB-1.6.1/lib/direct/interface.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/interface.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/interface.c 2013-01-05 18:04:56.000000000 +0200
-@@ -522,7 +522,7 @@
-
- /**************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static InterfaceDesc *
- allocate_interface_desc( void )
- {
-@@ -543,7 +543,7 @@
- return &alloc_list[alloc_count++];
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ void
- fill_interface_desc( InterfaceDesc *desc,
- const void *interface_ptr,
-@@ -565,7 +565,7 @@
-
- /**************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_dbg_interface_add( const char *func,
- const char *file,
-@@ -586,7 +586,7 @@
- direct_mutex_unlock( &alloc_lock );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_dbg_interface_remove( const char *func,
- const char *file,
-Index: DirectFB-1.6.1/lib/direct/log.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/log.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/log.c 2013-01-05 18:04:18.000000000 +0200
-@@ -128,7 +128,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_printf( DirectLog *log,
- const char *format, ... )
-@@ -197,7 +197,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_log_lock( DirectLog *log )
- {
-@@ -211,7 +211,7 @@
- direct_mutex_lock( &log->lock );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_log_unlock( DirectLog *log )
- {
-@@ -262,7 +262,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectLog *
- direct_log_default( void )
- {
-Index: DirectFB-1.6.1/lib/direct/log_domain.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/log_domain.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/log_domain.c 2013-01-05 18:04:38.000000000 +0200
-@@ -69,7 +69,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ LogDomainEntry *
- lookup_domain( const char *name, bool sub );
-
-@@ -104,7 +104,7 @@
- return NULL;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static DirectLogLevel
- check_domain( DirectLogDomain *domain );
-
-@@ -207,7 +207,7 @@
- /* FIXME: merge following */
-
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_domain_vprintf( DirectLogDomain *domain,
- DirectLogLevel level,
-@@ -268,7 +268,7 @@
- return DR_OK;
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- direct_log_domain_log( DirectLogDomain *domain,
- DirectLogLevel level,
-Index: DirectFB-1.6.1/lib/direct/mem.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/mem.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/mem.c 2013-01-05 18:03:08.000000000 +0200
-@@ -121,7 +121,7 @@
-
- /**********************************************************************************************************************/
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- static __inline__ MemDesc *
- fill_mem_desc( MemDesc *desc, int bytes, const char *func, const char *file, int line, DirectTraceBuffer *trace )
- {
-Index: DirectFB-1.6.1/lib/direct/messages.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/messages.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/messages.c 2013-01-05 18:02:57.000000000 +0200
-@@ -40,7 +40,7 @@
-
- #if DIRECT_BUILD_TEXT
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_info( const char *format, ... )
- {
-@@ -57,7 +57,7 @@
- direct_log_printf( NULL, "(*) %s", buf );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_error( const char *format, ... )
- {
-@@ -76,7 +76,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_derror( DirectResult result, const char *format, ... )
- {
-@@ -95,7 +95,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_perror( int erno, const char *format, ... )
- {
-@@ -114,7 +114,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_dlerror( const char *dlerr, const char *format, ... )
- {
-@@ -133,7 +133,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_once( const char *func,
- const char *file,
-@@ -155,7 +155,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_unimplemented( const char *func,
- const char *file,
-@@ -166,7 +166,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_bug( const char *func,
- const char *file,
-@@ -188,7 +188,7 @@
- direct_trace_print_stack( NULL );
- }
-
--__no_instrument_function__
-+__dfb_no_instrument_function__
- void
- direct_messages_warn( const char *func,
- const char *file,
-Index: DirectFB-1.6.1/lib/direct/os/linux/glibc/types.h
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/os/linux/glibc/types.h 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/os/linux/glibc/types.h 2013-01-05 18:06:04.000000000 +0200
-@@ -74,7 +74,7 @@
-
- #define __inline__ inline
- #define D_UNUSED __attribute__((unused))
--#define __no_instrument_function__ __attribute__((no_instrument_function))
-+#define __dfb_no_instrument_function__ __attribute__((no_instrument_function))
- #define __constructor__ __attribute__((constructor))
- #define __destructor__ __attribute__((destructor))
- #define __typeof__(x) typeof(x)
-Index: DirectFB-1.6.1/lib/direct/util.c
-===================================================================
---- DirectFB-1.6.1.orig/lib/direct/util.c 2012-06-29 19:01:11.000000000 +0300
-+++ DirectFB-1.6.1/lib/direct/util.c 2013-01-05 18:03:59.000000000 +0200
-@@ -110,7 +110,7 @@
- /*
- * translates errno to DirectResult
- */
--__no_instrument_function__
-+__dfb_no_instrument_function__
- DirectResult
- errno2result( int erno )
- {
diff --git a/meta/recipes-graphics/directfb/directfb_1.7.4.bb b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
index 39b006e8b3..d25d98746f 100644
--- a/meta/recipes-graphics/directfb/directfb_1.7.4.bb
+++ b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
@@ -1,11 +1,9 @@
require directfb.inc
-RV = "1.7-4"
+RV = "1.7-6"
DEPENDS += "sysfsutils"
-SRC_URI += "file://fixsepbuild.patch"
-
EXTRA_OECONF = "\
--enable-freetype=yes \
--enable-zlib \
@@ -19,5 +17,5 @@ EXTRA_OECONF = "\
LEAD_SONAME = "libdirectfb-1.7.so.0"
-SRC_URI[md5sum] = "f5bdacde77fc653279819796ae11341e"
-SRC_URI[sha256sum] = "20ccd60011c788e50c940ab566943d050679067bc84dc37ca447f1b4af08481b"
+SRC_URI[md5sum] = "8a7bb06b3f58599b230b4cf314004512"
+SRC_URI[sha256sum] = "44f32bacfb842ea234599532f8481fe41b5bd2310d2bd101508eb3a5df26c9e1"
diff --git a/meta/recipes-graphics/drm/libdrm.inc b/meta/recipes-graphics/drm/libdrm.inc
index 1b2ffeb8e7..cfac9e2a2b 100644
--- a/meta/recipes-graphics/drm/libdrm.inc
+++ b/meta/recipes-graphics/drm/libdrm.inc
@@ -21,14 +21,16 @@ inherit autotools pkgconfig
EXTRA_OECONF += "--disable-cairo-tests \
--enable-omap-experimental-api \
+ --enable-freedreno-experimental-api \
--enable-install-test-programs \
+ --disable-manpages \
"
ALLOW_EMPTY_${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
- ${PN}-intel ${PN}-exynos ${PN}-kms"
+ ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno"
RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
- ${PN}-exynos"
+ ${PN}-exynos ${PN}-freedreno"
FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode* ${bindir}/*test"
FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
@@ -37,3 +39,4 @@ 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.*"
diff --git a/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch b/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch
deleted file mode 100644
index 8eb1d5e1ea..0000000000
--- a/meta/recipes-graphics/drm/libdrm/GNU_SOURCE_definition.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-uclibc headers need to know if _GNU_SOURCE is defined or not and its defined
-in config.h so include it first to get the definition if its there fixed build
-problems on uclibc
-
-test_decode.c:107:2: error: implicit declaration of function 'open_memstream' [-Werror=implicit-function-declaration]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: libdrm-2.4.30/intel/test_decode.c
-===================================================================
---- libdrm-2.4.30.orig/intel/test_decode.c 2012-02-03 14:28:46.409355918 -0800
-+++ libdrm-2.4.30/intel/test_decode.c 2012-02-03 14:29:02.357356689 -0800
-@@ -21,6 +21,8 @@
- * IN THE SOFTWARE.
- */
-
-+#include "config.h"
-+
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
-@@ -31,7 +33,6 @@
- #include <sys/mman.h>
- #include <err.h>
-
--#include "config.h"
- #include "intel_bufmgr.h"
- #include "intel_chipset.h"
-
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.53.bb b/meta/recipes-graphics/drm/libdrm_2.4.53.bb
deleted file mode 100644
index 323bef5d57..0000000000
--- a/meta/recipes-graphics/drm/libdrm_2.4.53.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require libdrm.inc
-
-SRC_URI += "file://installtests.patch \
- file://GNU_SOURCE_definition.patch \
- "
-SRC_URI[md5sum] = "342886a137ddd9ed4341675d132388ad"
-SRC_URI[sha256sum] = "1b0c28fd2f2b92d2df0a73d1aed88f43cb0dee1267aea6bc52ccb5fca5757a08"
-
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.58.bb b/meta/recipes-graphics/drm/libdrm_2.4.58.bb
new file mode 100644
index 0000000000..7b1207e27e
--- /dev/null
+++ b/meta/recipes-graphics/drm/libdrm_2.4.58.bb
@@ -0,0 +1,6 @@
+require libdrm.inc
+
+SRC_URI += "file://installtests.patch "
+
+SRC_URI[md5sum] = "24213913333d72b36c16463ed92e522a"
+SRC_URI[sha256sum] = "b155fae6b9c9a3b02ef8b77f58c7c219194c996a4018dc55ba66c03996a365dd"
diff --git a/meta/recipes-graphics/freetype/freetype_2.5.3.bb b/meta/recipes-graphics/freetype/freetype_2.5.4.bb
index 2c861de63a..b5f0362eb3 100644
--- a/meta/recipes-graphics/freetype/freetype_2.5.3.bb
+++ b/meta/recipes-graphics/freetype/freetype_2.5.4.bb
@@ -14,8 +14,8 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=c017ff17fc6f0794adf93db5559ccd56
SECTION = "libs"
SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2"
-SRC_URI[md5sum] = "d6b60f06bfc046e43ab2a6cbfd171d65"
-SRC_URI[sha256sum] = "c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358e65f75e"
+SRC_URI[md5sum] = "438585445a2f1f71c77590155fd96616"
+SRC_URI[sha256sum] = "3b4e2c666b33b32ad29ff0fe5c6538e757d3c73368e5dfa88bd59b4bc95cbabb"
BINCONFIG = "${bindir}/freetype-config"
diff --git a/meta/recipes-graphics/glew/files/autotools.patch b/meta/recipes-graphics/glew/glew/autotools.patch
index 7dfe087d52..7dfe087d52 100644
--- a/meta/recipes-graphics/glew/files/autotools.patch
+++ b/meta/recipes-graphics/glew/glew/autotools.patch
diff --git a/meta/recipes-graphics/glew/files/fix-glew.pc-install.patch b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
index 9cbc0a95aa..70a99aeeee 100644
--- a/meta/recipes-graphics/glew/files/fix-glew.pc-install.patch
+++ b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
@@ -6,20 +6,20 @@ Upstream-Status: Inappropriate
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: glew-1.10.0/Makefile.am
+Index: glew-1.11.0/Makefile.am
===================================================================
---- glew-1.10.0.orig/Makefile.am
-+++ glew-1.10.0/Makefile.am
+--- glew-1.11.0.orig/Makefile.am
++++ glew-1.11.0/Makefile.am
@@ -3,3 +3,5 @@ ACLOCAL_AMFLAGS = -I m4 --install
SUBDIRS = include src
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glew.pc
-Index: glew-1.10.0/configure.ac
+Index: glew-1.11.0/configure.ac
===================================================================
---- glew-1.10.0.orig/configure.ac
-+++ glew-1.10.0/configure.ac
+--- glew-1.11.0.orig/configure.ac
++++ glew-1.11.0/configure.ac
@@ -66,5 +66,6 @@ AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
AC_CONFIG_FILES([Makefile
@@ -28,18 +28,19 @@ Index: glew-1.10.0/configure.ac
+ src/Makefile
+ glew.pc])
AC_OUTPUT
-Index: glew-1.10.0/glew.pc.in
+Index: glew-1.11.0/glew.pc.in
===================================================================
---- glew-1.10.0.orig/glew.pc.in
-+++ glew-1.10.0/glew.pc.in
-@@ -5,7 +5,7 @@ includedir=@includedir@
+--- glew-1.11.0.orig/glew.pc.in
++++ glew-1.11.0/glew.pc.in
+@@ -5,7 +5,7 @@ includedir=${prefix}/include/GL
Name: glew
Description: The OpenGL Extension Wrangler library
-Version: @version@
-Cflags: -I${includedir} @cflags@
-Libs: -L${libdir} -l@libname@
+-Requires: @requireslib@
+Version: @VERSION@
+Cflags: -I${includedir} @CFLAGS@
+Libs: -L${libdir} -lGLEW
- Requires: glu
++Requires: glu
diff --git a/meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
index 0707efba26..0707efba26 100644
--- a/meta/recipes-graphics/glew/files/glew_fix_for_automake-1.12.patch
+++ b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
diff --git a/meta/recipes-graphics/glew/glew_1.10.0.bb b/meta/recipes-graphics/glew/glew_1.11.0.bb
index 94f1bc1ed6..4231320dbd 100644
--- a/meta/recipes-graphics/glew/glew_1.10.0.bb
+++ b/meta/recipes-graphics/glew/glew_1.11.0.bb
@@ -15,7 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
file://fix-glew.pc-install.patch \
"
-SRC_URI[md5sum] = "2f09e5e6cb1b9f3611bcac79bc9c2d5d"
-SRC_URI[sha256sum] = "99c41320b63f6860869b5fb9af9a1854b15582796c64ee3dfd7096dc0c89f307"
+SRC_URI[md5sum] = "f6d72c7426a5f66580ad09e50816450a"
+SRC_URI[sha256sum] = "69bbce306ac281c4fa806a7a7d02c0596281a2d8f9d70690e98126f23ba513d6"
inherit autotools lib_package pkgconfig
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb
index 96a4932a51..333cf2e841 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.29.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_0.9.37.bb
@@ -11,8 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
SECTION = "libs"
SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-SRC_URI[md5sum] = "6251eb6d57e8c4e9e855188dbbdf8b6d"
-SRC_URI[sha256sum] = "601cea38c6fa0cf362dd9042c66cf4db711c5f9390de4ca46d6d2fc3f64de390"
+SRC_URI[md5sum] = "bfe733250e34629a188d82e3b971bc1e"
+SRC_URI[sha256sum] = "255f3b3842dead16863d1d0c216643d97b80bfa087aaa8fc5926da24ac120207"
+
inherit autotools pkgconfig lib_package
DEPENDS = "glib-2.0 cairo freetype"
diff --git a/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch b/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch
deleted file mode 100644
index 74a04074ec..0000000000
--- a/meta/recipes-graphics/menu-cache/files/Fix-segfault.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a497ea6aae3994b7f6527ef7599dd95baf2ad841 Mon Sep 17 00:00:00 2001
-From: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Date: Mon, 29 Apr 2013 12:04:20 +0300
-Subject: [PATCH] Fix segfault
-
-Apparently, g_io_channel_unref() was called twice: once in the
-menu-cache's on_client_closed() callback and once from the finalize
-function, g_io_unix_finalize()/g_io_win32_finalize(), which is called
-anyway when the source is removed.
-
-Upstream-Status: Pending
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
----
- menu-cache-daemon/menu-cached.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/menu-cache-daemon/menu-cached.c b/menu-cache-daemon/menu-cached.c
-index e246bb4..a10b6db 100644
---- a/menu-cache-daemon/menu-cached.c
-+++ b/menu-cache-daemon/menu-cached.c
-@@ -579,7 +579,6 @@ static void on_client_closed(gpointer user_data)
- }
- }
- /* DEBUG("client closed"); */
-- g_io_channel_unref(ch);
- }
-
- static gboolean on_client_data_in(GIOChannel* ch, GIOCondition cond, gpointer user_data)
---
-1.7.9.5
-
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb b/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb
deleted file mode 100644
index 98bbe76412..0000000000
--- a/meta/recipes-graphics/menu-cache/menu-cache_0.4.1.bb
+++ /dev/null
@@ -1,21 +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 = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libmenu-cache/menu-cache.h;endline=29;md5=26571532593adb17a37eac396260532c \
- file://menu-cache-daemon/menu-cached.c;endline=22;md5=fcecb7d315c57ef804103fa9cdab7111"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 zlib"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.gz \
- file://Fix-segfault.patch \
- "
-
-SRC_URI[md5sum] = "20fed982f5d8e6ec8a56a5b48894ecf0"
-SRC_URI[sha256sum] = "4fa9408e353fedba5b7314cbf6b6cd06d873a1424e281aa050d88bb9c0a0191e"
-
-
-inherit autotools pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
new file mode 100644
index 0000000000..ab909f7361
--- /dev/null
+++ b/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
@@ -0,0 +1,16 @@
+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 intltool-native libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4a8e6c1a86d5e64ec725d850a4abfbad"
+SRC_URI[sha256sum] = "ff7df437bbfd3119c5f662c6d209b98f15de03a7203308c6b56a4c1e1d419aaf"
+
+inherit autotools gettext pkgconfig gtk-doc
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
index c7851035a8..93ee9c286d 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch
@@ -1,7 +1,7 @@
-From 87f9a62329d7c5f4d351fbb63a41f2a1935fb2f1 Mon Sep 17 00:00:00 2001
+From b695c3a3fa3f4cd48c13aa26542110de27075518 Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Mon, 12 May 2014 15:22:32 -0400
-Subject: [PATCH] mesa-demos: Add missing data files.
+Subject: [PATCH 1/9] mesa-demos: Add missing data files.
Add some data files that are present in the git repository:
http://cgit.freedesktop.org/mesa/demos/tree/?id=mesa-demos-8.1.0
@@ -10,20 +10,21 @@ but not in the release tarball
Upstream-Status: Backport
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
- src/fpglsl/depth-read.glsl | 4 +
- src/fpglsl/infinite-loop.glsl | 7 +
- src/glsl/CH11-bumpmaptex.frag | 47 +++++++
- src/glsl/blinking-teapot.frag | 31 +++++
- src/glsl/blinking-teapot.vert | 16 +++
- src/glsl/convolution.frag | 21 +++
- src/glsl/simplex-noise.glsl | 279 +++++++++++++++++++++++++++++++++++++++
- src/glsl/skinning.vert | 24 ++++
- src/perf/glslstateschange1.frag | 19 +++
- src/perf/glslstateschange1.vert | 14 ++
- src/perf/glslstateschange2.frag | 17 +++
- src/perf/glslstateschange2.vert | 14 ++
- src/vpglsl/infinite-loop.glsl | 8 ++
+ src/fpglsl/depth-read.glsl | 4 +
+ src/fpglsl/infinite-loop.glsl | 7 +
+ src/glsl/CH11-bumpmaptex.frag | 47 +++++++
+ src/glsl/blinking-teapot.frag | 31 +++++
+ src/glsl/blinking-teapot.vert | 16 +++
+ src/glsl/convolution.frag | 21 +++
+ src/glsl/simplex-noise.glsl | 279 ++++++++++++++++++++++++++++++++++++++++
+ src/glsl/skinning.vert | 24 ++++
+ src/perf/glslstateschange1.frag | 19 +++
+ src/perf/glslstateschange1.vert | 14 ++
+ src/perf/glslstateschange2.frag | 17 +++
+ src/perf/glslstateschange2.vert | 14 ++
+ src/vpglsl/infinite-loop.glsl | 8 ++
13 files changed, 501 insertions(+)
create mode 100644 src/fpglsl/depth-read.glsl
create mode 100644 src/fpglsl/infinite-loop.glsl
@@ -619,5 +620,5 @@ index 0000000..bc7ae4b
+ gl_FrontColor = sum;
+}
--
-1.7.9.5
+2.0.0
diff --git a/meta/recipes-graphics/mesa/mesa-demos/glut.patch b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
index 84b6d4f7f3..c96af12acf 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/glut.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
@@ -1,13 +1,18 @@
-Correctly implement with AC_WITH(glut) so that --without-glut works.
+From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 9 Jul 2014 14:30:33 +0200
+Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
+ --without-glut works.
-Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57013]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ configure.ac | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
-Index: mesa-demos-8.0.1/configure.ac
-===================================================================
---- mesa-demos-8.0.1.orig/configure.ac 2010-07-13 19:52:41.000000000 +0100
-+++ mesa-demos-8.0.1/configure.ac 2012-11-12 12:49:54.940054571 +0000
-@@ -65,21 +65,25 @@
+diff --git a/configure.ac b/configure.ac
+index c4ee12b..9445424 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
dnl Check for GLUT
@@ -42,5 +47,8 @@ Index: mesa-demos-8.0.1/configure.ac
+ glut_enabled=yes
+])
- GLEW_CFLAGS=""
- GLEW_LIBS="-lGLEW"
+ dnl Check for FreeGLUT 2.6 or later
+ AC_EGREP_HEADER([glutInitContextProfile],
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
new file mode 100644
index 0000000000..4b07193a7f
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -0,0 +1,424 @@
+From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 9 Jul 2014 14:23:41 +0200
+Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
+ GLU
+
+* in some systems without X11 support we don't have GLEW, but
+ mesa-demos are still useful
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ configure.ac | 49 ++++++++++++++++++++---------
+ src/Makefile.am | 14 ++++++---
+ src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
+ src/egl/Makefile.am | 8 +++--
+ src/egl/opengles1/Makefile.am | 44 +++++++++++++++-----------
+ src/egl/opengles2/Makefile.am | 33 ++++++++++---------
+ 6 files changed, 135 insertions(+), 86 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9445424..bc4c8d1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
+ [AC_DEFINE(HAVE_FREEGLUT)],
+ [])
+
+-dnl Check for GLEW
+-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
+-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
+-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
++AC_ARG_ENABLE([glew],
++ [AS_HELP_STRING([--enable-glew],
++ [build demos which require glew @<:@default=yes@:>@])],
++ [enable_glew="$enableval"],
++ [enable_glew=yes]
++)
++
++if test "x$enable_glew" = xyes; then
++ dnl Check for GLEW
++ PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4], [glew_enabled=yes], [glew_enabled=no])
++ DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
++ DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
++fi
+
+ # LIBS was set by AC_CHECK_LIB above
+ LIBS=""
+
+-PKG_CHECK_MODULES(GLU, [glu], [],
+- [AC_CHECK_HEADER([GL/glu.h],
+- [],
+- AC_MSG_ERROR([GLU not found]))
+- AC_CHECK_LIB([GLU],
+- [gluBeginCurve],
+- [GLU_LIBS=-lGLU],
+- AC_MSG_ERROR([GLU required])) ])
++AC_ARG_ENABLE([glu],
++ [AS_HELP_STRING([--enable-glu],
++ [build demos which require glu @<:@default=yes@:>@])],
++ [enable_glu="$enableval"],
++ [enable_glu=yes]
++)
+
+-DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
+-DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
++if test "x$enable_glu" = xyes; then
++ PKG_CHECK_MODULES(GLU, [glu], [],
++ [AC_CHECK_HEADER([GL/glu.h],
++ [],
++ AC_MSG_ERROR([GLU not found]))
++ AC_CHECK_LIB([GLU],
++ [gluBeginCurve],
++ [GLU_LIBS=-lGLU
++ glu_enabled=yes],
++ AC_MSG_ERROR([GLU required])) ])
++
++ DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
++ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
++fi
+
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+@@ -304,6 +323,8 @@ AC_SUBST([WAYLAND_CFLAGS])
+ AC_SUBST([WAYLAND_LIBS])
+
+
++AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1647d64..754c47c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -23,14 +23,18 @@
+ # Eric Anholt <eric@anholt.net>
+
++if HAVE_GLEW
++UTIL = util
++endif
++
+ SUBDIRS = \
+- util \
++ $(UTIL) \
+ data \
+ demos \
+ egl \
+ fp \
+ fpglsl \
+ glsl \
+- gs \
++ gs \
+ objviewer \
+ osdemos \
+ perf \
+@@ -40,8 +39,12 @@ SUBDIRS = \
+ slang \
+ tests \
+ tools \
+- trivial \
+- vp \
+- vpglsl \
+ wgl \
+ xdemos
++
++if HAVE_GLEW
++SUBDIRS += \
++ vp \
++ vpglsl \
++ trivial
++endif
+diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am
+index 41603fa..ab1e3ab 100644
+--- a/src/demos/Makefile.am
++++ b/src/demos/Makefile.am
+@@ -30,91 +30,100 @@ AM_LDFLAGS = \
+ $(DEMO_LIBS) \
+ $(GLUT_LIBS)
+
++bin_PROGRAMS =
++
+ if HAVE_GLUT
+-bin_PROGRAMS = \
++if HAVE_GLEW
++bin_PROGRAMS += \
+ arbfplight \
+ arbfslight \
+ arbocclude \
+ arbocclude2 \
+- bounce \
+- clearspd \
+ copypix \
+ cubemap \
+ cuberender \
+ dinoshade \
+- dissolve \
+- drawpix \
+ engine \
+ fbo_firecube \
+ fbotexture \
+- fire \
+ fogcoord \
+ fplight \
+ fslight \
++ gloss \
++ isosurf \
++ multiarb \
++ paltex \
++ pointblast \
++ projtex \
++ shadowtex \
++ spriteblast \
++ stex3d \
++ textures \
++ vao_demo \
++ winpos
++
++copypix_LDADD = ../util/libutil.la
++cubemap_LDADD = ../util/libutil.la
++cuberender_LDADD = ../util/libutil.la
++engine_LDADD = ../util/libutil.la
++fbo_firecube_LDADD = ../util/libutil.la
++gloss_LDADD = ../util/libutil.la
++isosurf_LDADD = ../util/libutil.la
++multiarb_LDADD = ../util/libutil.la
++projtex_LDADD = ../util/libutil.la
++textures_LDADD = ../util/libutil.la
++winpos_LDADD = ../util/libutil.la
++endif
++
++if HAVE_GLU
++bin_PROGRAMS += \
++ bounce \
++ clearspd \
++ dissolve \
++ drawpix \
++ fire \
+ gamma \
+ gearbox \
+ gears \
+ geartrain \
+ glinfo \
+- gloss \
+ gltestperf \
+ ipers \
+- isosurf \
+ lodbias \
+ morph3d \
+- multiarb \
+- paltex \
+ pixeltest \
+- pointblast \
+- projtex \
+ ray \
+ readpix \
+ reflect \
+ renormal \
+- shadowtex \
+ singlebuffer \
+ spectex \
+- spriteblast \
+- stex3d \
+ teapot \
+ terrain \
+ tessdemo \
+ texcyl \
+ texenv \
+- textures \
+ trispd \
+ tunnel2 \
+- tunnel \
+- vao_demo \
+- winpos
+-endif
++ tunnel
+
+ tunnel_SOURCES = \
+ tunnel.c \
+ tunneldat.h
+
+-copypix_LDADD = ../util/libutil.la
+-cubemap_LDADD = ../util/libutil.la
+-cuberender_LDADD = ../util/libutil.la
+-drawpix_LDADD = ../util/libutil.la
+ dissolve_LDADD = ../util/libutil.la
+-engine_LDADD = ../util/libutil.la
+-fbo_firecube_LDADD = ../util/libutil.la
++drawpix_LDADD = ../util/libutil.la
+ fire_LDADD = ../util/libutil.la
+-gloss_LDADD = ../util/libutil.la
+ ipers_LDADD = ../util/libutil.la
+-isosurf_LDADD = ../util/libutil.la
+ lodbias_LDADD = ../util/libutil.la
+-multiarb_LDADD = ../util/libutil.la
+-projtex_LDADD = ../util/libutil.la
+ readpix_LDADD = ../util/libutil.la
+ reflect_LDADD = ../util/libutil.la
+ teapot_LDADD = ../util/libutil.la
+ texcyl_LDADD = ../util/libutil.la
+-textures_LDADD = ../util/libutil.la
+ tunnel_LDADD = ../util/libutil.la
+ tunnel2_LDADD = ../util/libutil.la
+-winpos_LDADD = ../util/libutil.la
++endif
++endif
+
+ EXTRA_DIST = \
+ README
+diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
+index d64a49e..4fe1ca8 100644
+--- a/src/egl/Makefile.am
++++ b/src/egl/Makefile.am
+@@ -24,8 +24,12 @@
+
+ SUBDIRS = \
+ eglut \
+- opengl \
+- openvg \
+ opengles1 \
+ opengles2 \
+ oes_vg
++
++if HAVE_GLU
++SUBDIRS += \
++ opengl \
++ openvg
++endif
+diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
+index 7a9828d..3455e75 100644
+--- a/src/egl/opengles1/Makefile.am
++++ b/src/egl/opengles1/Makefile.am
+@@ -36,28 +36,43 @@ AM_LDFLAGS = \
+ $(EGL_LIBS) \
+ -lm
+
++noinst_PROGRAMS =
++
+ if HAVE_EGL
+ if HAVE_GLESV1
+-noinst_PROGRAMS = \
+- bindtex \
+- clear \
++noinst_PROGRAMS += \
+ drawtex_screen \
++ gears_screen \
++ torus_screen \
++ tri_screen
++
++drawtex_screen_SOURCES = drawtex.c
++gears_screen_SOURCES = gears.c
++torus_screen_SOURCES = torus.c
++tri_screen_SOURCES = tri.c
++
++drawtex_screen_LDADD = ../eglut/libeglut_screen.la
++gears_screen_LDADD = ../eglut/libeglut_screen.la
++torus_screen_LDADD = ../eglut/libeglut_screen.la
++tri_screen_LDADD = ../eglut/libeglut_screen.la
++
++if HAVE_X11
++noinst_PROGRAMS += \
++ clear
++
++bin_PROGRAMS = \
++ bindtex \
+ drawtex_x11 \
+ eglfbdev \
+ es1_info \
+- gears_screen \
+ gears_x11 \
+ msaa \
+ pbuffer\
+ render_tex \
+ texture_from_pixmap \
+- torus_screen \
+ torus_x11 \
+- tri_screen \
+ tri_x11 \
+ two_win
+-endif
+-endif
+
+ bindtex_LDADD = $(X11_LIBS)
+ es1_info_LDADD = $(X11_LIBS)
+@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS)
+ clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
+ clear_LDFLAGS =
+
+-drawtex_screen_SOURCES = drawtex.c
+-gears_screen_SOURCES = gears.c
+-torus_screen_SOURCES = torus.c
+-tri_screen_SOURCES = tri.c
+-
+ drawtex_x11_SOURCES = drawtex.c
+ gears_x11_SOURCES = gears.c
+ torus_x11_SOURCES = torus.c
+ tri_x11_SOURCES = tri.c
+
+-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
+-gears_screen_LDADD = ../eglut/libeglut_screen.la
+-torus_screen_LDADD = ../eglut/libeglut_screen.la
+-tri_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ drawtex_x11_LDADD = ../eglut/libeglut_x11.la
+ gears_x11_LDADD = ../eglut/libeglut_x11.la
+ torus_x11_LDADD = ../eglut/libeglut_x11.la
+ tri_x11_LDADD = ../eglut/libeglut_x11.la
++endif
++endif
++endif
+diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
+index 41c1b80..74af460 100644
+--- a/src/egl/opengles2/Makefile.am
++++ b/src/egl/opengles2/Makefile.am
+@@ -36,26 +36,29 @@ AM_LDFLAGS = \
+ if HAVE_EGL
+ if HAVE_GLESV2
+ bin_PROGRAMS = \
+- es2_info \
+- es2gears_screen \
+- es2gears_x11 \
+- es2tri
++ es2gears_screen
++
++es2gears_screen_SOURCES = es2gears.c
++es2gears_screen_LDADD = ../eglut/libeglut_screen.la
++
+ if HAVE_WAYLAND
+ bin_PROGRAMS += es2gears_wayland
+-endif
+-endif
+-endif
+
+-es2_info_LDADD = $(X11_LIBS)
+-es2tri_LDADD = $(X11_LIBS)
++es2gears_wayland_SOURCES = es2gears.c
++es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
++endif
+
+-es2gears_screen_SOURCES = es2gears.c
++if HAVE_X11
++bin_PROGRAMS += \
++ es2tri \
++ es2_info \
++ es2gears_x11
+
++es2_info_LDADD = $(X11_LIBS)
+ es2gears_x11_SOURCES = es2gears.c
+-
+-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ es2gears_x11_LDADD = ../eglut/libeglut_x11.la
++es2tri_LDADD = $(X11_LIBS)
++endif
++endif
++endif
+
+-es2gears_wayland_SOURCES = es2gears.c
+-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
index c89f87891b..f77b97f3e5 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch
@@ -1,24 +1,24 @@
-From bc7fa67d13e8032601df5cf04e15c53a7204dcd7 Mon Sep 17 00:00:00 2001
+From 5e10108d76a59abac21c7e540bcfd2ddaccca2cb Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew_moseley@mentor.com>
Date: Fri, 9 May 2014 11:50:24 -0400
-Subject: [PATCH] mesa-demos: Use DEMOS_DATA_DIR to locate data files
+Subject: [PATCH 4/9] Use DEMOS_DATA_DIR to locate data files
Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=78496]
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
- src/glsl/bezier.c | 2 +-
- src/glsl/blinking-teapot.c | 4 ++--
- src/glsl/brick.c | 4 ++--
- src/glsl/bump.c | 6 +++---
- src/glsl/convolutions.c | 2 +-
- src/glsl/mandelbrot.c | 4 ++--
- src/glsl/multitex.c | 4 ++--
- src/glsl/simplex-noise.c | 2 +-
- src/glsl/skinning.c | 4 ++--
- src/glsl/texdemo1.c | 8 ++++----
- src/glsl/toyball.c | 4 ++--
- src/objviewer/objview.c | 12 ++++++------
- src/perf/glslstateschange.c | 8 ++++----
+ src/glsl/bezier.c | 2 +-
+ src/glsl/blinking-teapot.c | 4 ++--
+ src/glsl/brick.c | 4 ++--
+ src/glsl/bump.c | 6 +++---
+ src/glsl/convolutions.c | 2 +-
+ src/glsl/mandelbrot.c | 4 ++--
+ src/glsl/multitex.c | 4 ++--
+ src/glsl/simplex-noise.c | 2 +-
+ src/glsl/skinning.c | 4 ++--
+ src/glsl/texdemo1.c | 8 ++++----
+ src/glsl/toyball.c | 4 ++--
+ src/objviewer/objview.c | 12 ++++++------
+ src/perf/glslstateschange.c | 8 ++++----
13 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c
@@ -230,5 +230,5 @@ index 7422b78..dbf8332 100644
{ "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 },
{ "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 },
--
-1.7.9.5
+2.0.0
diff --git a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch b/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
index 46a3e98cfe..aac2a37294 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-build-fix.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
@@ -1,11 +1,11 @@
-From ab76f645e29b0a603ff95d88f976bc35ab6301ee Mon Sep 17 00:00:00 2001
+From 453353a221de9c64479f4372565d2cd8591b36cc Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Fri, 29 Jun 2012 11:26:04 +0100
-Subject: [PATCH 1/2] mesa-demos: Fix build when EGL_MESA_screen_surface
- extension isn't present
+Subject: [PATCH 5/9] Fix build when EGL_MESA_screen_surface extension isn't
+ present
-The EGL demos won't build against EGL implementations that don't support
-the EGL_MESA_screen_surface extension. Fix this, in most cases, by
+The EGL demos won't build against EGL implementations that don't support
+the EGL_MESA_screen_surface extension. Fix this, in most cases, by
wrapping relevant bits of code in #ifdef EGL_MESA_screen_surface.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
@@ -15,12 +15,19 @@ Applied and fixed up in Yocto by...
Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Upstream-Status: Pending
+---
+ src/egl/eglut/eglut.c | 9 +++++++--
+ src/egl/eglut/eglut_screen.c | 14 ++++++++++++++
+ src/egl/opengl/demo1.c | 2 ++
+ src/egl/opengl/demo2.c | 7 ++++++-
+ src/egl/opengl/demo3.c | 7 ++++++-
+ 5 files changed, 35 insertions(+), 4 deletions(-)
-Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/eglut/eglut.c
-+++ mesa-demos-8.0.1/src/egl/eglut/eglut.c
-@@ -51,8 +51,9 @@ _eglutNow(void)
+diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
+index 2ee6f15..f6a2ad4 100644
+--- a/src/egl/eglut/eglut.c
++++ b/src/egl/eglut/eglut.c
+@@ -76,8 +76,9 @@ _eglutNow(void)
static void
_eglutDestroyWindow(struct eglut_window *win)
{
@@ -32,7 +39,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
eglDestroySurface(_eglut->dpy, win->surface);
_eglutNativeFiniWindow(win);
-@@ -150,7 +151,9 @@ _eglutCreateWindow(const char *title, in
+@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
win->config, win->native.u.pixmap, NULL);
break;
case EGL_PBUFFER_BIT:
@@ -42,7 +49,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
win->surface = win->native.u.surface;
break;
default:
-@@ -264,8 +267,10 @@ eglutDestroyWindow(int win)
+@@ -289,8 +292,10 @@ eglutDestroyWindow(int win)
if (window->index != win)
return;
@@ -53,11 +60,11 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut.c
eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
_eglutDestroyWindow(_eglut->current);
-Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/eglut/eglut_screen.c
-+++ mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
-@@ -10,26 +10,33 @@
+diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
+index 021a8f1..094a4e2 100644
+--- a/src/egl/eglut/eglut_screen.c
++++ b/src/egl/eglut/eglut_screen.c
+@@ -35,26 +35,33 @@
#define MAX_MODES 100
@@ -91,7 +98,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
static void
init_kms(void)
{
-@@ -69,19 +76,23 @@ init_kms(void)
+@@ -94,19 +101,23 @@ init_kms(void)
kms_width = width;
kms_height = height;
}
@@ -115,7 +122,7 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
init_kms();
i = 0;
-@@ -103,14 +114,17 @@ _eglutNativeInitWindow(struct eglut_wind
+@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title,
win->native.width = kms_width;
win->native.height = kms_height;
@@ -133,10 +140,10 @@ Index: mesa-demos-8.0.1/src/egl/eglut/eglut_screen.c
}
void
-Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo1.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo1.c
+diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
+index d892734..3a3564c 100644
+--- a/src/egl/opengl/demo1.c
++++ b/src/egl/opengl/demo1.c
@@ -18,6 +18,7 @@
static void
TestScreens(EGLDisplay dpy)
@@ -153,10 +160,10 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
}
/**
-Index: mesa-demos-8.0.1/src/egl/opengl/demo2.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo2.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo2.c
+diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
+index 505b474..bfef59e 100644
+--- a/src/egl/opengl/demo2.c
++++ b/src/egl/opengl/demo2.c
@@ -16,6 +16,7 @@
/*#define FRONTBUFFER*/
@@ -204,10 +211,10 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo2.c
return 0;
}
-Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo3.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo3.c
+diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c
+index f84ca23..31b5d8b 100644
+--- a/src/egl/opengl/demo3.c
++++ b/src/egl/opengl/demo3.c
@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = {
0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
};
@@ -217,7 +224,7 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
static void Init(void)
{
-@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GL
+@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
fclose(f);
}
}
@@ -255,3 +262,6 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo3.c
return 0;
}
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch b/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
index 795370819b..12e0805f15 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
@@ -1,11 +1,11 @@
-From cf90a5c0c173d017a80cde057da57c365b3b1a40 Mon Sep 17 00:00:00 2001
+From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Fri, 29 Jun 2012 12:00:26 +0100
-Subject: [PATCH 2/2] mesa-demos: Query display for EGL_MESA_screen_surface
- extension before using it
+Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension
+ before using it
-This code makes heavy use of the EGL_MESA_screen_surface extension so
-check the display to determine if it's supported by the underlying EGL
+This code makes heavy use of the EGL_MESA_screen_surface extension so
+check the display to determine if it's supported by the underlying EGL
implementation. If it doesn't then bail.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
@@ -15,11 +15,14 @@ Applied and fixed up in Yocto by...
Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Upstream-Status: Pending
+---
+ src/egl/opengl/demo1.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
-Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
-===================================================================
---- mesa-demos-8.0.1.orig/src/egl/opengl/demo1.c
-+++ mesa-demos-8.0.1/src/egl/opengl/demo1.c
+diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
+index 3a3564c..06e2138 100644
+--- a/src/egl/opengl/demo1.c
++++ b/src/egl/opengl/demo1.c
@@ -110,6 +110,12 @@ main(int argc, char *argv[])
printf("EGL version = %d.%d\n", maj, min);
printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
@@ -33,3 +36,6 @@ Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
eglGetConfigs(d, NULL, 0, &numConfigs);
configs = malloc(sizeof(*configs) *numConfigs);
eglGetConfigs(d, configs, numConfigs, &numConfigs);
+--
+2.0.0
+
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
new file mode 100644
index 0000000000..89d2fac4fd
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
@@ -0,0 +1,74 @@
+From d930b2da57f7c9efb80c8cef8f8adad15bbbc0d3 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 7/9] Install few more test programs
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.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(-)
+
+diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
+index 0c7228f..87b2f1a 100644
+--- a/src/egl/opengl/Makefile.am
++++ b/src/egl/opengl/Makefile.am
+@@ -50,7 +50,7 @@ endif
+ endif
+
+ if HAVE_EGL
+-noinst_PROGRAMS = \
++bin_PROGRAMS = \
+ demo1 \
+ demo2 \
+ demo3 \
+diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
+index 3455e75..516e516 100644
+--- a/src/egl/opengles1/Makefile.am
++++ b/src/egl/opengles1/Makefile.am
+@@ -36,11 +36,11 @@ AM_LDFLAGS = \
+ $(EGL_LIBS) \
+ -lm
+
+-noinst_PROGRAMS =
++bin_PROGRAMS =
+
+ if HAVE_EGL
+ if HAVE_GLESV1
+-noinst_PROGRAMS += \
++bin_PROGRAMS += \
+ drawtex_screen \
+ gears_screen \
+ torus_screen \
+@@ -57,10 +57,8 @@ torus_screen_LDADD = ../eglut/libeglut_screen.la
+ tri_screen_LDADD = ../eglut/libeglut_screen.la
+
+ if HAVE_X11
+-noinst_PROGRAMS += \
+- clear
+-
+-bin_PROGRAMS = \
++bin_PROGRAMS += \
++ clear \
+ bindtex \
+ drawtex_x11 \
+ eglfbdev \
+diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
+index 7318a43..b545225 100644
+--- a/src/egl/openvg/Makefile.am
++++ b/src/egl/openvg/Makefile.am
+@@ -49,7 +49,7 @@ endif
+
+ if HAVE_EGL
+ if HAVE_VG
+-noinst_PROGRAMS = \
++bin_PROGRAMS = \
+ lion_screen \
+ sp_screen \
+ $(EGL_X11_DEMOS)
+--
+2.0.0
+
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
new file mode 100644
index 0000000000..a6085754d2
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
@@ -0,0 +1,101 @@
+From 0b6f95f9b8ece22e9856c150e4be29fd86eaf546 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
+ EXTRA_DATA
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/fpglsl/Makefile.am | 2 ++
+ src/glsl/Makefile.am | 10 ++++++++--
+ src/perf/Makefile.am | 6 ++++++
+ src/vpglsl/Makefile.am | 1 +
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
+index 47c1039..fd43c91 100644
+--- a/src/fpglsl/Makefile.am
++++ b/src/fpglsl/Makefile.am
+@@ -39,10 +39,12 @@ noinst_PROGRAMS = \
+ endif
+
+ EXTRA_DIST = \
++ depth-read.glsl \
+ dowhile2.glsl \
+ dowhile.glsl \
+ forbreak.glsl \
+ for.glsl \
++ infinite-loop.glsl \
+ mov.glsl \
+ mov-imm.glsl \
+ simpleif.glsl \
+diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
+index 4faa8db..079a29d 100644
+--- a/src/glsl/Makefile.am
++++ b/src/glsl/Makefile.am
+@@ -37,7 +37,7 @@ AM_LDFLAGS = \
+ if HAVE_GLUT
+ bin_PROGRAMS = \
+ array \
+- bezier \
++ bezier \
+ bitmap \
+ brick \
+ bump \
+@@ -123,12 +123,16 @@ EXTRA_DIST = \
+ CH06-brick.vert \
+ CH11-bumpmap.frag \
+ CH11-bumpmap.vert \
++ CH11-bumpmaptex.frag \
+ CH11-toyball.frag \
+ CH11-toyball.vert \
+ CH18-mandel.frag \
+ CH18-mandel.vert \
+- bezier.geom \
++ bezier.geom \
+ brick.shtest \
++ blinking-teapot.frag \
++ blinking-teapot.vert \
++ convolution.frag \
+ convolution.vert \
+ cubemap.frag \
+ mandelbrot.shtest \
+@@ -138,5 +142,7 @@ EXTRA_DIST = \
+ reflect.vert \
+ shadowtex.frag \
+ simple.vert \
++ simplex-noise.glsl \
+ skinning.frag \
++ skinning.vert \
+ toyball.shtest
+diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
+index 5363c58..c5cca8d 100644
+--- a/src/perf/Makefile.am
++++ b/src/perf/Makefile.am
+@@ -57,3 +57,9 @@ bin_PROGRAMS = \
+ endif
+
+ glslstateschange_LDADD = libperf.la ../util/libutil.la
++
++EXTRA_DIST = \
++ glslstateschange1.frag \
++ glslstateschange1.vert \
++ glslstateschange2.frag \
++ glslstateschange2.vert
+diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
+index 4a85ed4..48b08f4 100644
+--- a/src/vpglsl/Makefile.am
++++ b/src/vpglsl/Makefile.am
+@@ -44,6 +44,7 @@ EXTRA_DIST = \
+ func2.glsl \
+ ifelse.glsl \
+ if.glsl \
++ infinite-loop.glsl \
+ 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
new file mode 100644
index 0000000000..1262dee237
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
@@ -0,0 +1,73 @@
+From c8c3de5417d6b6c7d7579c528c0cab718f4bfdb6 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
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/fpglsl/Makefile.am | 3 ++-
+ src/glsl/Makefile.am | 3 ++-
+ src/perf/Makefile.am | 3 ++-
+ src/vpglsl/Makefile.am | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
+index fd43c91..2bf51de 100644
+--- a/src/fpglsl/Makefile.am
++++ b/src/fpglsl/Makefile.am
+@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
+ fp-tri
+ endif
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ depth-read.glsl \
+ dowhile2.glsl \
+ dowhile.glsl \
+diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
+index 079a29d..f66ec29 100644
+--- a/src/glsl/Makefile.am
++++ b/src/glsl/Makefile.am
+@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la
+ vert_tex_LDADD = ../util/libutil.la
+ vsraytrace_LDADD = ../util/libutil.la
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ CH06-brick.frag \
+ CH06-brick.vert \
+ CH11-bumpmap.frag \
+diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
+index c5cca8d..140256d 100644
+--- a/src/perf/Makefile.am
++++ b/src/perf/Makefile.am
+@@ -58,7 +58,8 @@ endif
+
+ glslstateschange_LDADD = libperf.la ../util/libutil.la
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ glslstateschange1.frag \
+ glslstateschange1.vert \
+ glslstateschange2.frag \
+diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
+index 48b08f4..5526867 100644
+--- a/src/vpglsl/Makefile.am
++++ b/src/vpglsl/Makefile.am
+@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
+ vp-tris
+ endif
+
+-EXTRA_DIST = \
++demosdatadir=$(datadir)/$(PACKAGE)/
++dist_demosdata_DATA= \
+ for.glsl \
+ func.glsl \
+ func2.glsl \
+--
+2.0.0
+
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index f95b0a33a0..1caa50bc1b 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -9,22 +9,24 @@ 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"
-DEPENDS = "virtual/libgl glew"
-
SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
- file://glut.patch \
- file://egl-mesa-screen-surface-build-fix.patch \
- file://egl-mesa-screen-surface-query.patch \
- file://0001-mesa-demos-Add-missing-data-files.patch \
- file://0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch"
-
-SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542"
-SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828"
+ file://0001-mesa-demos-Add-missing-data-files.patch \
+ file://0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch \
+ file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
+ file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
+ file://0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch \
+ file://0006-Query-display-for-EGL_MESA_screen_surface-extension-.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 \
+"
+SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
+SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
inherit autotools pkgconfig
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 glu \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew', '', d)}"
# The Wayland code doesn't work with Wayland 1.0, so disable it for now
#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
@@ -42,12 +44,10 @@ PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg"
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"
-do_install_append () {
- install -m 0644 ${S}/src/perf/*.frag \
- ${S}/src/perf/*.vert \
- ${S}/src/glsl/*.frag \
- ${S}/src/glsl/*.vert \
- ${S}/src/glsl/*.geom \
- ${S}/src/glsl/*.glsl ${D}${datadir}/${BPN}
+do_install_append() {
+ # it can be completely empty when all PACKAGECONFIG options are disabled
+ rmdir --ignore-fail-on-non-empty ${D}${bindir}
}
diff --git a/meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb b/meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb
index 2acc21dce5..2acc21dce5 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_10.1.3.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_10.3.4.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 3298e00ebe..cb1837ac51 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -65,6 +65,7 @@ MESA_LLVM_RELEASE ?= "3.3"
PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --with-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
+PACKAGECONFIG[xa] = "--enable-xa, --disable-xa"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
@@ -87,6 +88,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libegl-gallium libgbm-gallium \
libopenvg libopenvg-dev \
libxvmcsoftpipe libxvmcsoftpipe-dev \
+ libxatracker libxatracker-dev \
mesa-megadriver \
"
@@ -143,7 +145,7 @@ python mesa_populate_packages() {
for p in dri_pkgs:
m = re.match('^(.*)_dri\.so$', p)
if m:
- pkg_name = " mesa-driver-%s" % legitimize_package_name(m.group(1))
+ 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)
@@ -171,6 +173,7 @@ FILES_libegl-gallium = "${libdir}/egl/egl_gallium.so*"
FILES_libgbm-gallium = "${libdir}/gbm/gbm_gallium_drm.so*"
FILES_libopenvg = "${libdir}/libOpenVG.so.*"
FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*"
+FILES_libxatracker = "${libdir}/libxatracker.so.*"
FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
@@ -185,5 +188,8 @@ FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayl
FILES_libopenvg-dev = "${libdir}/libOpenVG.so ${libdir}/libOpenVG.la* \
${includedir}/VG ${libdir}/pkgconfig/vg.pc"
FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la"
+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"
FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/* ${libdir}/gbm/.debug/* ${libdir}/gallium-pipe/.debug"
diff --git a/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch b/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch
deleted file mode 100644
index 2df5e61d21..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From debac5531f7107d239530ff6e29eeda72b9ec1e9 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 29 Jun 2013 11:20:51 +0200
-Subject: [PATCH 2/4] pipe_loader_sw: include xlib_sw_winsys.h only when
- HAVE_PIPE_LOADER_XLIB
-
-* HAVE_WINSYS_XLIB was removed in
- commit b3f1f665b0fef178ae193e6b111f14c9a5ad3b25
- Author: Matt Turner <mattst88@gmail.com>
- Date: Sun Jan 20 15:32:08 2013 -0800
- build: Get rid of GALLIUM_WINSYS_DIRS
-
-* HAVE_PIPE_LOADER_XLIB is set correctly:
- if test "x$NEED_WINSYS_XLIB" = xyes; then
- GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
- GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la"
- fi
-
-* fixes build of pipe_loader_sw without libx11 headers available
-
-Upstream-Status: Submitted https://bugs.freedesktop.org/show_bug.cgi?id=66357
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-index c2b78c6..0da3f4d 100644
---- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
-@@ -31,7 +31,9 @@
- #include "util/u_dl.h"
- #include "sw/null/null_sw_winsys.h"
- #include "target-helpers/inline_sw_helper.h"
-+#ifdef HAVE_PIPE_LOADER_XLIB
- #include "state_tracker/xlib_sw_winsys.h"
-+#endif
-
- struct pipe_loader_sw_device {
- struct pipe_loader_device base;
-@@ -44,7 +46,7 @@ struct pipe_loader_sw_device {
- static struct pipe_loader_ops pipe_loader_sw_ops;
-
- static struct sw_winsys *(*backends[])() = {
--#ifdef HAVE_WINSYS_XLIB
-+#ifdef HAVE_PIPE_LOADER_XLIB
- x11_sw_create,
- #endif
- null_sw_create
---
-1.8.2.1
-
diff --git a/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch b/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch
deleted file mode 100644
index 30a3d98758..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch
+++ /dev/null
@@ -1,362 +0,0 @@
-From 06c1ba29de8a26fffb73ee99f0fc54c704e9fee4 Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniel@fooishbar.org>
-Date: Fri, 24 May 2013 17:20:27 +0100
-Subject: [PATCH 3/5] EGL: Mutate NativeDisplayType depending on config
-
-If we go through ./configure without enabling X11 anywhere, then set the
-fallback types for EGL NativeDisplay and friends, rather than assuming
-X11/Xlib.
-
-Upstream-Status: Backport (slightly different solution was applied in master
-https://bugs.freedesktop.org/show_bug.cgi?id=64959)
-
-Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure.ac | 9 +++
- include/EGL/eglplatform.h | 146 -------------------------------------------
- include/EGL/eglplatform.h.in | 146 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 155 insertions(+), 146 deletions(-)
- delete mode 100644 include/EGL/eglplatform.h
- create mode 100644 include/EGL/eglplatform.h.in
-
-diff --git a/configure.ac b/configure.ac
-index 2b4a374..d4c7a95 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1565,12 +1565,20 @@ fi
-
- EGL_PLATFORMS="$egl_platforms"
-
-+if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
-+ MESA_EGL_NO_X11_HEADERS=0
-+else
-+ MESA_EGL_NO_X11_HEADERS=1
-+fi
-+
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_FBDEV, echo "$egl_platforms" | grep 'fbdev' >/dev/null 2>&1)
- AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep 'null' >/dev/null 2>&1)
-
-+AC_SUBST([MESA_EGL_NO_X11_HEADERS])
-+
- AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
- AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x")
-
-@@ -2042,6 +2050,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
-
- dnl Substitute the config
- AC_CONFIG_FILES([Makefile
-+ include/EGL/eglplatform.h
- src/Makefile
- src/egl/Makefile
- src/egl/drivers/Makefile
-diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
-deleted file mode 100644
-index 17fdc61..0000000
---- a/include/EGL/eglplatform.h
-+++ /dev/null
-@@ -1,146 +0,0 @@
--#ifndef __eglplatform_h_
--#define __eglplatform_h_
--
--/*
--** Copyright (c) 2007-2009 The Khronos Group Inc.
--**
--** Permission is hereby granted, free of charge, to any person obtaining a
--** copy of this software and/or associated documentation files (the
--** "Materials"), to deal in the Materials without restriction, including
--** without limitation the rights to use, copy, modify, merge, publish,
--** distribute, sublicense, and/or sell copies of the Materials, and to
--** permit persons to whom the Materials are 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 Materials.
--**
--** THE MATERIALS ARE 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
--** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
--*/
--
--/* Platform-specific types and definitions for egl.h
-- * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
-- *
-- * Adopters may modify khrplatform.h and this file to suit their platform.
-- * You are encouraged to submit all modifications to the Khronos group so that
-- * they can be included in future versions of this file. Please submit changes
-- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
-- * by filing a bug against product "EGL" component "Registry".
-- */
--
--#include <KHR/khrplatform.h>
--
--/* Macros used in EGL function prototype declarations.
-- *
-- * EGL functions should be prototyped as:
-- *
-- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
-- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
-- *
-- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
-- */
--
--#ifndef EGLAPI
--#define EGLAPI KHRONOS_APICALL
--#endif
--
--#ifndef EGLAPIENTRY
--#define EGLAPIENTRY KHRONOS_APIENTRY
--#endif
--#define EGLAPIENTRYP EGLAPIENTRY*
--
--/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
-- * are aliases of window-system-dependent types, such as X Display * or
-- * Windows Device Context. They must be defined in platform-specific
-- * code below. The EGL-prefixed versions of Native*Type are the same
-- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
-- *
-- * Khronos STRONGLY RECOMMENDS that you use the default definitions
-- * provided below, since these changes affect both binary and source
-- * portability of applications using EGL running on different EGL
-- * implementations.
-- */
--
--#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
--#ifndef WIN32_LEAN_AND_MEAN
--#define WIN32_LEAN_AND_MEAN 1
--#endif
--#include <windows.h>
--
--typedef HDC EGLNativeDisplayType;
--typedef HBITMAP EGLNativePixmapType;
--typedef HWND EGLNativeWindowType;
--
--#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
--
--typedef int EGLNativeDisplayType;
--typedef void *EGLNativeWindowType;
--typedef void *EGLNativePixmapType;
--
--#elif defined(WL_EGL_PLATFORM)
--
--typedef struct wl_display *EGLNativeDisplayType;
--typedef struct wl_egl_pixmap *EGLNativePixmapType;
--typedef struct wl_egl_window *EGLNativeWindowType;
--
--#elif defined(__GBM__)
--
--typedef struct gbm_device *EGLNativeDisplayType;
--typedef struct gbm_bo *EGLNativePixmapType;
--typedef void *EGLNativeWindowType;
--
--#elif defined(ANDROID) /* Android */
--
--struct ANativeWindow;
--struct egl_native_pixmap_t;
--
--typedef struct ANativeWindow *EGLNativeWindowType;
--typedef struct egl_native_pixmap_t *EGLNativePixmapType;
--typedef void *EGLNativeDisplayType;
--
--#elif defined(__unix__)
--
--#ifdef MESA_EGL_NO_X11_HEADERS
--
--typedef void *EGLNativeDisplayType;
--typedef khronos_uint32_t EGLNativePixmapType;
--typedef khronos_uint32_t EGLNativeWindowType;
--
--#else
--
--/* X11 (tentative) */
--#include <X11/Xlib.h>
--#include <X11/Xutil.h>
--
--typedef Display *EGLNativeDisplayType;
--typedef Pixmap EGLNativePixmapType;
--typedef Window EGLNativeWindowType;
--
--#endif /* MESA_EGL_NO_X11_HEADERS */
--
--#else
--#error "Platform not recognized"
--#endif
--
--/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
--typedef EGLNativeDisplayType NativeDisplayType;
--typedef EGLNativePixmapType NativePixmapType;
--typedef EGLNativeWindowType NativeWindowType;
--
--
--/* Define EGLint. This must be a signed integral type large enough to contain
-- * all legal attribute names and values passed into and out of EGL, whether
-- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
-- * handle, or other. While in general a 32-bit integer will suffice, if
-- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
-- * integer type.
-- */
--typedef khronos_int32_t EGLint;
--
--#endif /* __eglplatform_h */
-diff --git a/include/EGL/eglplatform.h.in b/include/EGL/eglplatform.h.in
-new file mode 100644
-index 0000000..5126c92
---- /dev/null
-+++ b/include/EGL/eglplatform.h.in
-@@ -0,0 +1,146 @@
-+#ifndef __eglplatform_h_
-+#define __eglplatform_h_
-+
-+/*
-+** Copyright (c) 2007-2009 The Khronos Group Inc.
-+**
-+** Permission is hereby granted, free of charge, to any person obtaining a
-+** copy of this software and/or associated documentation files (the
-+** "Materials"), to deal in the Materials without restriction, including
-+** without limitation the rights to use, copy, modify, merge, publish,
-+** distribute, sublicense, and/or sell copies of the Materials, and to
-+** permit persons to whom the Materials are 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 Materials.
-+**
-+** THE MATERIALS ARE 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
-+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-+*/
-+
-+/* Platform-specific types and definitions for egl.h
-+ * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
-+ *
-+ * Adopters may modify khrplatform.h and this file to suit their platform.
-+ * You are encouraged to submit all modifications to the Khronos group so that
-+ * they can be included in future versions of this file. Please submit changes
-+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
-+ * by filing a bug against product "EGL" component "Registry".
-+ */
-+
-+#include <KHR/khrplatform.h>
-+
-+/* Macros used in EGL function prototype declarations.
-+ *
-+ * EGL functions should be prototyped as:
-+ *
-+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
-+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
-+ *
-+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
-+ */
-+
-+#ifndef EGLAPI
-+#define EGLAPI KHRONOS_APICALL
-+#endif
-+
-+#ifndef EGLAPIENTRY
-+#define EGLAPIENTRY KHRONOS_APIENTRY
-+#endif
-+#define EGLAPIENTRYP EGLAPIENTRY*
-+
-+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
-+ * are aliases of window-system-dependent types, such as X Display * or
-+ * Windows Device Context. They must be defined in platform-specific
-+ * code below. The EGL-prefixed versions of Native*Type are the same
-+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
-+ *
-+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
-+ * provided below, since these changes affect both binary and source
-+ * portability of applications using EGL running on different EGL
-+ * implementations.
-+ */
-+
-+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-+#ifndef WIN32_LEAN_AND_MEAN
-+#define WIN32_LEAN_AND_MEAN 1
-+#endif
-+#include <windows.h>
-+
-+typedef HDC EGLNativeDisplayType;
-+typedef HBITMAP EGLNativePixmapType;
-+typedef HWND EGLNativeWindowType;
-+
-+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-+
-+typedef int EGLNativeDisplayType;
-+typedef void *EGLNativeWindowType;
-+typedef void *EGLNativePixmapType;
-+
-+#elif defined(WL_EGL_PLATFORM)
-+
-+typedef struct wl_display *EGLNativeDisplayType;
-+typedef struct wl_egl_pixmap *EGLNativePixmapType;
-+typedef struct wl_egl_window *EGLNativeWindowType;
-+
-+#elif defined(__GBM__)
-+
-+typedef struct gbm_device *EGLNativeDisplayType;
-+typedef struct gbm_bo *EGLNativePixmapType;
-+typedef void *EGLNativeWindowType;
-+
-+#elif defined(ANDROID) /* Android */
-+
-+struct ANativeWindow;
-+struct egl_native_pixmap_t;
-+
-+typedef struct ANativeWindow *EGLNativeWindowType;
-+typedef struct egl_native_pixmap_t *EGLNativePixmapType;
-+typedef void *EGLNativeDisplayType;
-+
-+#elif defined(__unix__)
-+
-+#if @MESA_EGL_NO_X11_HEADERS@
-+
-+typedef void *EGLNativeDisplayType;
-+typedef khronos_uint32_t EGLNativePixmapType;
-+typedef khronos_uint32_t EGLNativeWindowType;
-+
-+#else
-+
-+/* X11 (tentative) */
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+typedef Display *EGLNativeDisplayType;
-+typedef Pixmap EGLNativePixmapType;
-+typedef Window EGLNativeWindowType;
-+
-+#endif /* MESA_EGL_NO_X11_HEADERS */
-+
-+#else
-+#error "Platform not recognized"
-+#endif
-+
-+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-+typedef EGLNativeDisplayType NativeDisplayType;
-+typedef EGLNativePixmapType NativePixmapType;
-+typedef EGLNativeWindowType NativeWindowType;
-+
-+
-+/* Define EGLint. This must be a signed integral type large enough to contain
-+ * all legal attribute names and values passed into and out of EGL, whether
-+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
-+ * handle, or other. While in general a 32-bit integer will suffice, if
-+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
-+ * integer type.
-+ */
-+typedef khronos_int32_t EGLint;
-+
-+#endif /* __eglplatform_h */
---
-1.8.2.1
-
diff --git a/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch b/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch
deleted file mode 100644
index 88a4fb0636..0000000000
--- a/meta/recipes-graphics/mesa/mesa/0006-fix-out-of-tree-egl.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Fix out of tree compilation failure due to
-0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch.
-
-Upstream-Status: Inappropriate (upstream has different solution to root problem)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
-index 45f7dfa..ed0e777 100644
---- a/src/egl/drivers/dri2/Makefile.am
-+++ b/src/egl/drivers/dri2/Makefile.am
-@@ -21,6 +21,7 @@
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/egl/main \
- -I$(top_srcdir)/src/gbm/main \
- -I$(top_srcdir)/src/gbm/backends/dri \
-diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am
-index 6bf67ea..7b87047 100644
---- a/src/egl/drivers/glx/Makefile.am
-+++ b/src/egl/drivers/glx/Makefile.am
-@@ -21,6 +21,7 @@
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/egl/main \
- $(X11_CFLAGS) \
- $(DEFINES)
-diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
-index ca5257a..13a5734 100644
---- a/src/egl/main/Makefile.am
-+++ b/src/egl/main/Makefile.am
-@@ -27,6 +27,7 @@ endif
-
- AM_CFLAGS = \
- -I$(top_srcdir)/include \
-+ -I$(top_builddir)/include \
- -I$(top_srcdir)/src/gbm/main \
- $(DEFINES) \
- $(EGL_CFLAGS) \
-@@ -135,4 +136,4 @@ egl_HEADERS = \
- $(top_srcdir)/include/EGL/eglext.h \
- $(top_srcdir)/include/EGL/egl.h \
- $(top_srcdir)/include/EGL/eglmesaext.h \
-- $(top_srcdir)/include/EGL/eglplatform.h
-+ $(top_builddir)/include/EGL/eglplatform.h
diff --git a/meta/recipes-graphics/mesa/mesa_10.1.3.bb b/meta/recipes-graphics/mesa/mesa_10.3.4.bb
index abc450a9c5..50092c9a5c 100644
--- a/meta/recipes-graphics/mesa/mesa_10.1.3.bb
+++ b/meta/recipes-graphics/mesa/mesa_10.3.4.bb
@@ -1,12 +1,9 @@
require ${BPN}.inc
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
- file://0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch \
- file://0006-fix-out-of-tree-egl.patch \
- "
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
-SRC_URI[md5sum] = "ba6dbe2b9cab0b4de840c996b9b6a3ad"
-SRC_URI[sha256sum] = "b2615e236ef25d0fb94b8420bdd2e2a520b7dd5ca2d4b93306154f7fd4adecc3"
+SRC_URI[md5sum] = "fa0558a3d02c2bb8c208c030ccdc992e"
+SRC_URI[sha256sum] = "e6373913142338d10515daf619d659433bfd2989988198930c13b0945a15e98a"
S = "${WORKDIR}/Mesa-${PV}"
diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb
index 59b0d1cdeb..b046ae2e65 100644
--- a/meta/recipes-graphics/mesa/mesa_git.bb
+++ b/meta/recipes-graphics/mesa/mesa_git.bb
@@ -2,16 +2,12 @@ require ${BPN}.inc
DEFAULT_PREFERENCE = "-1"
-LIC_FILES_CHKSUM = "file://docs/license.html;md5=f69a4626e9efc40fa0d3cc3b02c9eacf"
+LIC_FILES_CHKSUM = "file://docs/license.html;md5=6a23445982a7a972ac198e93cc1cb3de"
-PR = "${INC_PR}.0"
-SRCREV = "0028eb1083e6adc110a23a5f02c993cda217067a"
-PV = "10.1.3+git${SRCPV}"
+SRCREV = "c7b9a2e38a3e471562b50dab8be65db8ac6819f8"
+PV = "10.3.4+git${SRCPV}"
-SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa \
- file://0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch \
- file://0006-fix-out-of-tree-egl.patch \
- "
+SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;branch=10.4"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch b/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
index 3c8a832021..3c8a832021 100644
--- a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-build-dir.patch
+++ b/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
diff --git a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch b/meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch
index 82c93dd604..82c93dd604 100644
--- a/meta/recipes-graphics/mx/mx-1.0-1.4.7+gitAUTOINC+9b1db6b806/fix-test-includes.patch
+++ b/meta/recipes-graphics/mx/mx-1.0/fix-test-includes.patch
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
index cb2aba0a5f..7540821c4e 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
@@ -13,11 +13,6 @@ PACKAGES = "\
${PN}-core \
"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-core = "task-core-clutter-core"
-RREPLACES_${PN}-core = "task-core-clutter-core"
-RCONFLICTS_${PN}-core = "task-core-clutter-core"
-
SUMMARY_${PN}-core = "Clutter graphics library"
RDEPENDS_${PN}-core = "\
clutter-1.0 \
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
index 7786133930..53dc0ae19e 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
@@ -1,6 +1,8 @@
SUMMARY = "DirectFB without X11"
LICENSE = "MIT"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
inherit packagegroup
TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
index a5d02ede8e..2eff3713bc 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
@@ -5,11 +5,6 @@ PR = "r1"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-x11-mini task-core-x11-base"
-RREPLACES_${PN} = "task-core-x11-mini task-core-x11-base"
-RCONFLICTS_${PN} = "task-core-x11-mini task-core-x11-base"
-
RDEPENDS_${PN} = "\
packagegroup-core-x11-xserver \
packagegroup-core-x11-utils \
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index d58f74384f..2d68e97383 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -6,10 +6,10 @@ SUMMARY = "X11 display server"
LICENSE = "MIT"
PR = "r40"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
+inherit packagegroup
+
XSERVER ?= "xserver-xorg xf86-video-fbdev xf86-input-evdev"
XSERVERCODECS ?= ""
@@ -17,8 +17,3 @@ RDEPENDS_${PN} = "\
${XSERVER} \
${XSERVERCODECS} \
"
-
-# Allow replacing task-x11-server in meta-oe
-RPROVIDES_${PN} = "task-x11-server task-xserver"
-RREPLACES_${PN} = "task-x11-server task-xserver"
-RCONFLICTS_${PN} = "task-x11-server task-xserver"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 1a51428eaf..fde5144b46 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -30,11 +30,3 @@ RDEPENDS_${PN}-utils = "\
xset \
xrandr \
"
-
-# Allow replacing task-x11* in meta-oe
-RPROVIDES_${PN} = "task-x11"
-RREPLACES_${PN} = "task-x11"
-RCONFLICTS_${PN} = "task-x11"
-RPROVIDES_${PN}-utils = "task-x11-utils"
-RREPLACES_${PN}-utils = "task-x11-utils"
-RCONFLICTS_${PN}-utils = "task-x11-utils"
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index c02d8c02d2..b59d33d14f 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -67,7 +67,7 @@ fi
# This binary needs to be compiled for the host architecture. This isn't pretty!
do_compile_prepend () {
if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
- make CC="${BUILD_CC}" 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
+ make CC="${BUILD_CC}" CFLAGS="" 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
}
@@ -90,8 +90,8 @@ FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug"
FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-FILES_${PN}-ptest += "${libexecdir}/pango/installed-tests/* \
+FILES_${PN}-ptest += "${libexecdir}/installed-tests/* \
${datadir}/installed-tests/pango"
-FILES_${PN}-dbg += "${libexecdir}/pango/installed-tests/.debug"
+FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
RDEPENDS_${PN}-ptest += "gnome-desktop-testing liberation-fonts"
diff --git a/meta/recipes-graphics/pango/pango_1.36.3.bb b/meta/recipes-graphics/pango/pango_1.36.8.bb
index 7782f92b89..4605c768a5 100644
--- a/meta/recipes-graphics/pango/pango_1.36.3.bb
+++ b/meta/recipes-graphics/pango/pango_1.36.8.bb
@@ -8,5 +8,5 @@ SRC_URI += "file://run-ptest \
file://multilib-fix-clean.patch \
"
-SRC_URI[archive.md5sum] = "d9532826e95bdb374355deebc42441bb"
-SRC_URI[archive.sha256sum] = "ad48e32917f94aa9d507486d44366e59355fcfd46ef86d119ddcba566ada5d22"
+SRC_URI[archive.md5sum] = "217a9a753006275215fa9fa127760ece"
+SRC_URI[archive.sha256sum] = "18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07"
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 7417cd5364..68ac7e7677 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -11,9 +11,11 @@ PV = "1.0+gitr${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS = "virtual/libx11 waffle virtual/libgl libglu python-mako-native python-numpy-native"
+DEPENDS = "virtual/libx11 libxrender waffle virtual/libgl libglu python-mako-native python-numpy-native"
-inherit cmake pythonnative
+inherit cmake pythonnative distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
# As piglit doesn't install, enforce in-tree builds so that we can easily copy
# contents out of $S and $B.
@@ -45,4 +47,7 @@ do_install() {
FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/"
-RDEPENDS_${PN} = "python waffle python-json python-subprocess python-multiprocessing python-textutils python-netserver python-shell mesa-demos"
+RDEPENDS_${PN} = "python waffle python-json python-subprocess \
+ python-multiprocessing python-textutils python-netserver python-shell \
+ mesa-demos bash \
+ "
diff --git a/meta/recipes-graphics/tslib/tslib_1.1.bb b/meta/recipes-graphics/tslib/tslib_1.1.bb
index 05d58b68d5..6d8c7dd7eb 100644
--- a/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.1.bb
@@ -32,8 +32,6 @@ do_install_append() {
install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
}
-SRC_URI_OVERRIDES_PACKAGE_ARCH = "0"
-
# People should consider using udev's /dev/input/touchscreen0 symlink
# instead of detect-stylus
#RDEPENDS_tslib-conf_weird-machine = "detect-stylus"
diff --git a/meta/recipes-graphics/wayland/libinput_0.7.0.bb b/meta/recipes-graphics/wayland/libinput_0.7.0.bb
new file mode 100644
index 0000000000..98d29426e6
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput_0.7.0.bb
@@ -0,0 +1,14 @@
+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=673e626420c7f859fbe2be3a9c13632d"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "381b61396de28c12716ef7a5475fea50"
+SRC_URI[sha256sum] = "129f485afe5e4a9394641293991c97cb99f5f3338340d0d65b704ff463d1579e"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-graphics/wayland/wayland_1.5.0.bb b/meta/recipes-graphics/wayland/wayland_1.6.0.bb
index b1ae59ef13..00713bff3f 100644
--- a/meta/recipes-graphics/wayland/wayland_1.5.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.6.0.bb
@@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \
file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c"
SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "1d882776b27329b91d2d500b6d66dd1d"
-SRC_URI[sha256sum] = "0069e1e9af888b3e05384380ad8cc6c976ea3e81d08ba19b7675ce1d693a41b5"
+SRC_URI[md5sum] = "d34c141c975084e4fb668e77b38f840e"
+SRC_URI[sha256sum] = "a7d5102dcf53d08c059d24bc62de491d7cd482070abeb6737a20d0d86ba6fc7f"
SRC_URI_append_class-native = " \
file://disable-macro-checks-not-used-for-scanner.patch \
"
@@ -23,7 +23,6 @@ inherit autotools pkgconfig
# We need wayland-native for the wayland-scanner utility
BBCLASSEXTEND = "native"
-DEPENDS_class-native = "expat-native libffi-native"
DEPENDS = "expat libffi wayland-native"
EXTRA_OECONF = "--disable-documentation --disable-scanner"
diff --git a/meta/recipes-graphics/wayland/weston_1.5.0.bb b/meta/recipes-graphics/wayland/weston_1.6.0.bb
index 4a8584f79a..d30e48bfa0 100644
--- a/meta/recipes-graphics/wayland/weston_1.5.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.6.0.bb
@@ -12,8 +12,8 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://make-lcms-explicitly-configurable.patch \
file://make-libwebp-explicitly-configurable.patch \
"
-SRC_URI[md5sum] = "8eb40d230efc2411f083c20656534780"
-SRC_URI[sha256sum] = "06388ba04ac79aa72d685cc1a8e646ddb2b8cfe11fcc742294f9addac48b7684"
+SRC_URI[md5sum] = "c60ce9dde99a089db0539d8f6b557827"
+SRC_URI[sha256sum] = "dc3ea5d13bbf025fabc006216c5ddc0d80d5f4ebe778912b8c4d1d4acaaa614d"
inherit autotools pkgconfig useradd
@@ -60,6 +60,8 @@ PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
# Weston with webp support
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+# Weston with libinput backend
+PACKAGECONFIG[libinput] = "--enable-libinput-backend,--disable-libinput-backend,libinput"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
@@ -77,7 +79,7 @@ do_install_append() {
PACKAGES += "${PN}-examples"
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${datadir}"
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libdir}/weston ${datadir}"
FILES_${PN}-examples = "${bindir}/*"
RDEPENDS_${PN} += "xkeyboard-config"
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
index 0a16ff5f83..b68d40e1be 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
@@ -47,6 +47,6 @@ do_install() {
RDEPENDS_${PN} = "${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
INITSCRIPT_NAME = "xserver-nodm"
-INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+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/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index f6692a814b..ef6c11c3f2 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -4,8 +4,8 @@
# Provides: xserver
# Required-Start: $local_fs $remote_fs dbus
# Required-Stop: $local_fs $remote_fs
-# Default-Start: 2 5
-# Default-Stop: 0 1 6
+# Default-Start: 5
+# Default-Stop: 0 1 2 3 6
### END INIT INFO
killproc() { # kill the named process(es)
diff --git a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
index 65f74c21c5..31cf186767 100644
--- a/meta/recipes-graphics/xorg-app/mkfontscale_1.1.1.bb
+++ b/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
@@ -14,5 +14,5 @@ BBCLASSEXTEND = "native"
LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f"
-SRC_URI[md5sum] = "03de3f15db678e277f5ef9c013aca1ad"
-SRC_URI[sha256sum] = "244017992477ced2397a44fd0ddcfb0f1d9899128613f5c4db81471163b0b731"
+SRC_URI[md5sum] = "9bdd6ebfa62b1bbd474906ac86a40fd8"
+SRC_URI[sha256sum] = "8c6d5228af885477b9aec60ca6f172578e7d2de42234357af62fb00439453f20"
diff --git a/meta/recipes-graphics/xorg-app/rgb_1.0.5.bb b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
index 26d4f1b5ba..87268046e6 100644
--- a/meta/recipes-graphics/xorg-app/rgb_1.0.5.bb
+++ b/meta/recipes-graphics/xorg-app/rgb_1.0.6.bb
@@ -9,9 +9,8 @@ format."
DEPENDS += " xproto util-macros"
LIC_FILES_CHKSUM = "file://COPYING;md5=ef598adbe241bd0b0b9113831f6e249a"
PE = "1"
-PR = "${INC_PR}.0"
-SRC_URI[md5sum] = "bcd820d967eaa51bd25b86c0ee682d4e"
-SRC_URI[sha256sum] = "8e936e648ffddce2e7184790efa15e4fa2bcb47f9da5469515d212c61bc8f857"
+SRC_URI[md5sum] = "eab5bbd7642e5c784429307ec210d198"
+SRC_URI[sha256sum] = "bbca7c6aa59939b9f6a0fb9fff15dfd62176420ffd4ae30c8d92a6a125fbe6b0"
FILES_${PN} += "${datadir}/X11"
diff --git a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb b/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
index 96ea030be1..84d0cb8044 100644
--- a/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
+++ b/meta/recipes-graphics/xorg-app/xeyes_1.1.1.bb
@@ -11,4 +11,4 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3ea51b365051ac32d1813a7dbaa4bfc6"
SRC_URI[md5sum] = "a3035dcecdbdb89e864177c080924981"
SRC_URI[sha256sum] = "975e98680cd59e1f9439016386609546ed08c284d0f05a95276f96aca6e8a521"
-DEPENDS += " virtual/libx11 libxau libxt libxext libxmu libxrender"
+DEPENDS += "libxau libxt libxext libxmu libxrender"
diff --git a/meta/recipes-graphics/xorg-app/xinit_1.3.3.bb b/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
index 583ea87eeb..93185188ee 100644
--- a/meta/recipes-graphics/xorg-app/xinit_1.3.3.bb
+++ b/meta/recipes-graphics/xorg-app/xinit_1.3.4.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18f01e7b39807bebe2b8df101a039b68"
PE = "1"
-SRC_URI[md5sum] = "3b8da0e6237aee9828cc809c647510a7"
-SRC_URI[sha256sum] = "74b2878de6e3d5b5948f1562a77e7f53b4e10621e505ddb278050c7f3cae00af"
+SRC_URI[md5sum] = "4e928452dfaf73851413a2d8b8c76388"
+SRC_URI[sha256sum] = "75d88d7397a07e01db253163b7c7a00b249b3d30e99489f2734cac9a0c7902b3"
EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
diff --git a/meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb b/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
index 5c274b133e..efac0699c9 100644
--- a/meta/recipes-graphics/xorg-app/xkbcomp_1.2.4.bb
+++ b/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
@@ -15,5 +15,5 @@ DEPENDS += "libxkbfile"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "a0fc1ac3fc4fe479ade09674347c5aa0"
-SRC_URI[sha256sum] = "91d0c9ab445d21dfe1892dbae5ae5264f39bae68223dd092ffc547c9450b5a2d"
+SRC_URI[md5sum] = "0012a8e3092cddf7f87b250f96bb38c5"
+SRC_URI[sha256sum] = "cfac973778fabf5216121ad60b7af8ab74ce7513af0f9260cf8c5309e1622b2a"
diff --git a/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch b/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch
deleted file mode 100644
index 40f81f0f74..0000000000
--- a/meta/recipes-graphics/xorg-app/xmodmap/gnu-source.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 42f99a7a7b836f6f9704a7b1747eb722c93446ec Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <alan.coopersmith@oracle.com>
-Date: Mon, 23 Apr 2012 14:28:39 +0000
-Subject: include config.h before stdio.h & other system headers
-
-Ensures definitions like _GNU_SOURCE are visible when needed.
-
-Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
----
-diff --git a/exec.c b/exec.c
-index dbcb669..419b10e 100644
---- a/exec.c
-+++ b/exec.c
-@@ -54,6 +54,10 @@ from The Open Group.
- * original xmodmap, written by David Rosenthal, of Sun Microsystems.
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
-diff --git a/pf.c b/pf.c
-index 0eb0f55..3f0c3f4 100644
---- a/pf.c
-+++ b/pf.c
-@@ -26,6 +26,10 @@ from The Open Group.
-
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
-diff --git a/xmodmap.c b/xmodmap.c
-index 58a8e70..0f89629 100644
---- a/xmodmap.c
-+++ b/xmodmap.c
-@@ -26,6 +26,10 @@ from The Open Group.
-
- */
-
-+#ifdef HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
- #include <X11/Xos.h>
- #include <X11/Xlib.h>
- #include <stdio.h>
---
-cgit v0.9.0.2-2-gbebe
diff --git a/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb b/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
index 65a55e3560..87efb76022 100644
--- a/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
+++ b/meta/recipes-graphics/xorg-app/xmodmap_1.0.8.bb
@@ -13,7 +13,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=272c17e96370e1e74773fa22d9989621"
PE = "1"
-SRC_URI += "file://gnu-source.patch"
-
SRC_URI[md5sum] = "5511da3361eea4eaa21427652c559e1c"
SRC_URI[sha256sum] = "efe2e3c89858a2db3bdcf969f55f55d0af4f5007789198344de0595249a99fc3"
diff --git a/meta/recipes-graphics/xorg-app/xorg-app-common.inc b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
index 524a2d3077..59a04fa494 100644
--- a/meta/recipes-graphics/xorg-app/xorg-app-common.inc
+++ b/meta/recipes-graphics/xorg-app/xorg-app-common.inc
@@ -5,12 +5,15 @@ SECTION = "x11/apps"
LICENSE = "MIT-X"
DEPENDS = "util-macros-native virtual/libx11"
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
INC_PR = "r8"
SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2"
S = "${WORKDIR}/${BPN}-${PV}"
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_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
index efbb1b3f6c..d78bf0451c 100644
--- a/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
+++ b/meta/recipes-graphics/xorg-app/xprop_1.2.2.bb
@@ -10,7 +10,7 @@ formatting information."
LIC_FILES_CHKSUM = "file://COPYING;md5=e226ab8db88ac0bc0391673be40c9f91"
-DEPENDS += " libxmu virtual/libx11"
+DEPENDS += "libxmu"
PE = "1"
diff --git a/meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb b/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
index 84f01b02dd..41bd42069c 100644
--- a/meta/recipes-graphics/xorg-app/xrandr_1.4.2.bb
+++ b/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
@@ -11,5 +11,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
DEPENDS += "libxrandr libxrender"
PE = "1"
-SRC_URI[md5sum] = "78fd973d9b532106f8777a3449176148"
-SRC_URI[sha256sum] = "b2e76ee92ff827f1c52ded7c666fe6f2704ca81cdeef882397da4e3e8ab490bc"
+SRC_URI[md5sum] = "441fdb98d2abc6051108b7075d948fc7"
+SRC_URI[sha256sum] = "7154ac3486b86923692f2d6cdb2991a2ee72bc32af2c4379a6f1c068f204be1b"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb
index 6cbe165d93..6d71ba8186 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.8.2.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.1.bb
@@ -14,7 +14,7 @@ xorg.conf for each input device that will use this driver. "
LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
-DEPENDS += "mtdev"
+DEPENDS += "mtdev libevdev"
-SRC_URI[md5sum] = "be7f91905c41bb3c3a0eb54063c7e4bf"
-SRC_URI[sha256sum] = "750461749a83bdee7771592aa5c0db5e267b18d847078a4b8622f55b04797eb3"
+SRC_URI[md5sum] = "8f73a98e32dccc9d054b54727cc4093f"
+SRC_URI[sha256sum] = "0ce30328adfeac90a6f4b508d992fb834d8e50b484b29d3d58cf6683fa8502f9"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
index aca958cf64..1f0b78a157 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
@@ -10,6 +10,6 @@ driver."
LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
-SRC_URI[md5sum] = "36b5b92000c4644f648b58a535e4ee73"
-SRC_URI[sha256sum] = "5d601e4bae53d5e9ead4ecd700f1beb5aeaf78b79e634c4aa381a9ce00276488"
+SRC_URI[md5sum] = "77085b649c5c0b333565ba562f573951"
+SRC_URI[sha256sum] = "3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch
new file mode 100644
index 0000000000..f36bb7579d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch
@@ -0,0 +1,60 @@
+From 96e60a4ea242d2decf109835981ae186cc36f642 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 29 Aug 2014 07:57:41 +1000
+Subject: Include xorg-server.h to fix build errors on newest glibc
+
+In file included from /usr/include/string.h:634:0,
+ from /usr/include/xorg/os.h:53,
+ from /usr/include/xorg/misc.h:115,
+ from /usr/include/xorg/xf86str.h:37,
+ from /usr/include/xorg/xf86Xinput.h:54,
+ from synproto.h:36,
+ from synproto.c:24:
+/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__'
+ strndup(const char *str, size_t n);
+
+See http://lists.freedesktop.org/archives/xorg-devel/2014-July/043070.html
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+Status: Backport
+
+Index: xf86-input-synaptics-1.8.0/src/eventcomm.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/eventcomm.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/eventcomm.h 2014-08-28 18:40:28.620070587 -0700
+@@ -27,6 +27,8 @@
+ #ifndef _EVENTCOMM_H_
+ #define _EVENTCOMM_H_
+
++#include <xorg-server.h>
++
+ #include <linux/input.h>
+ #include <linux/version.h>
+ #include <xf86Xinput.h>
+Index: xf86-input-synaptics-1.8.0/src/ps2comm.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/ps2comm.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/ps2comm.h 2014-08-28 18:40:28.620070587 -0700
+@@ -22,6 +22,8 @@
+ #ifndef _PS2COMM_H_
+ #define _PS2COMM_H_
+
++#include <xorg-server.h>
++
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include "xf86_OSproc.h"
+Index: xf86-input-synaptics-1.8.0/src/synproto.h
+===================================================================
+--- xf86-input-synaptics-1.8.0.orig/src/synproto.h 2014-08-28 18:40:28.628070587 -0700
++++ xf86-input-synaptics-1.8.0/src/synproto.h 2014-08-28 18:40:28.624070587 -0700
+@@ -31,6 +31,8 @@
+ #include "config.h"
+ #endif
+
++#include <xorg-server.h>
++
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <xf86Xinput.h>
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb
index 8045790e9d..435faa6024 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.7.4.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.1.bb
@@ -12,9 +12,11 @@ advanced features of the touchpad to become available."
LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
-SRC_URI[md5sum] = "deaa740072c19fef8e2fb1d7787392b7"
-SRC_URI[sha256sum] = "56a2d2df7bd39e29f56102c62f153e023f3e9b2f5e255309d33fab8e81945af7"
+SRC_URI += "file://always_include_xorg_server.h.patch"
-DEPENDS += "libxi mtdev libxtst"
+SRC_URI[md5sum] = "ed70d0cba94262a4008dcef654ab34a9"
+SRC_URI[sha256sum] = "d74fdaf29e9888a2cb494e16d0a9ddb24265c5c765b05392b69c50e84ffbf09a"
+
+DEPENDS += "libxi mtdev libxtst libevdev"
FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch
new file mode 100644
index 0000000000..12fb9df2fd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse/always_include_config.h.patch
@@ -0,0 +1,81 @@
+From 336f8633837abe4a1e5ba84b53ac8b9dac5d29a2 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Date: Thu, 28 Nov 2013 11:59:53 -0800
+Subject: Always include config.h first
+
+This fixes some build warnings about CSRG_BASED being redefined due to
+incorrect header include ordering.
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+Upstream-Status: Backport
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_client.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_client.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_client.c 2014-08-28 18:33:16.152070587 -0700
+@@ -39,6 +39,10 @@
+ #endif
+
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include "vmmouse_client.h"
+ #include "vmmouse_proto.h"
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_proto.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.c 2014-08-28 18:33:16.156070587 -0700
+@@ -33,6 +33,10 @@
+ */
+
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #include "vmmouse_proto.h"
+
+
+Index: xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.h
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/shared/vmmouse_proto.h 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/shared/vmmouse_proto.h 2014-08-28 18:33:16.156070587 -0700
+@@ -36,11 +36,6 @@
+ #ifndef _VMMOUSE_PROTO_H_
+ #define _VMMOUSE_PROTO_H_
+
+-
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif
+-
+ #include <stdint.h>
+
+ #ifdef HAVE_XORG_SERVER_1_1_0
+Index: xf86-input-vmmouse-13.0.0/tools/vmmouse_detect.c
+===================================================================
+--- xf86-input-vmmouse-13.0.0.orig/tools/vmmouse_detect.c 2014-08-28 18:33:16.168070587 -0700
++++ xf86-input-vmmouse-13.0.0/tools/vmmouse_detect.c 2014-08-28 18:33:16.160070587 -0700
+@@ -26,14 +26,14 @@
+ */
+
+
+-#include <stdlib.h>
+-#include <signal.h>
+-#include "vmmouse_client.h"
+-
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
++#include <stdlib.h>
++#include <signal.h>
++#include "vmmouse_client.h"
++
+ void
+ segvCB(int sig)
+ {
diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
index 35ef5991c3..83ea960a88 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.0.0.bb
@@ -8,6 +8,8 @@ standard 'mouse' driver if a VMware virtual machine is not detected."
PR = "${INC_PR}.0"
+SRC_URI += "file://always_include_config.h.patch"
+
SRC_URI[md5sum] = "34f9f64ee6a1a51fc8266a9af24e1e07"
SRC_URI[sha256sum] = "04cfb60366008d4db815c550d8fb8d0a4270c75fa7a20fa3bddc9ecbd355612c"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb b/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb
new file mode 100644
index 0000000000..01cd37e364
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-cirrus_1.5.2.bb
@@ -0,0 +1,13 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- cirrus display driver"
+DESCRIPTION = "cirrus is an Xorg driver for Cirrus Logic VGA adapters. These \
+devices are not so common in the wild anymore, but QEMU can emulate one, so \
+the driver is still useful."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddc7ca860dc5fd014e7f160ea699295"
+
+SRC_URI[md5sum] = "91fd6b677d62027cd3001debb587a6a6"
+SRC_URI[sha256sum] = "3361e1a65d9b84c464752fd612bdf6087622c6dd204121715366a170e5c3ccd7"
+
+DEPENDS += "libpciaccess"
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
new file mode 100644
index 0000000000..8a5dd39ae1
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/always_include_xorg_server.h.patch
@@ -0,0 +1,24 @@
+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
new file mode 100644
index 0000000000..dda508dcfd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
@@ -0,0 +1,17 @@
+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_2.99.910.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
index 60eace46d4..26b68b461c 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.910.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
@@ -9,23 +9,30 @@ Infrastructure (DRI)."
LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
-DEPENDS += "virtual/libx11 drm libpciaccess pixman"
-
-SRC_URI += "file://compat-api-Map-changes-of-DamageUnregister-API-in-1..patch \
+SRC_URI += "file://disable-x11-dri3.patch \
+ file://always_include_xorg_server.h.patch \
"
-PACKAGECONFIG ??= "sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri', '', d)}"
+SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
+SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
+
+DEPENDS += "virtual/libx11 drm libpciaccess pixman"
+
+PACKAGECONFIG ??= "sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xf86driproto dri2proto"
+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"
+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'
-SRC_URI[md5sum] = "a9a5c2c15766c06a024381efe0d724bb"
-SRC_URI[sha256sum] = "203d46064449da0e23a111418dfb189422ba96ea08707167c8dee463e2d745b1"
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb b/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb
index 5bb89266cd..b22078792a 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.8.1.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-modesetting_0.9.0.bb
@@ -4,5 +4,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5e53d3fcadb1c23d122ad63cb099a918"
SUMMARY = "X.Org X server -- modesetting display driver"
DESCRIPTION = "Provides a generic kernel modesetting display driver for the X.Org X server."
-SRC_URI[md5sum] = "eb275e1ff0031897bcf23e2e5cb8655a"
-SRC_URI[sha256sum] = "3ba8d8d7cb679497abc6486e2e843f8ea1582d830a27448ed4c90413e58312ca"
+SRC_URI[md5sum] = "da588d4f54111c2deae035998058ce10"
+SRC_URI[sha256sum] = "90cf085573203dfadd48ea69bd694c4d04ccbe088b6855e9c85c34bb8a95d75c"
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
new file mode 100644
index 0000000000..dc0b9b3f41
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb/0007-always_include_xorg_server.h.patch
@@ -0,0 +1,48 @@
+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
index 50ce4c2f9c..4ad25389cd 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
@@ -20,6 +20,7 @@ SRC_URI = "git://git.pingu.fi/xf86-video-omapfb;protocol=http \
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"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch
new file mode 100644
index 0000000000..cf66403e89
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0001-configure-fix-build-without-xatracker.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From bdaa9de44a197ba1297b990422ed9e515289f141 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Tue, 1 Apr 2014 10:11:13 +0200
+Subject: [PATCH 1/2] configure: fix build without xatracker
+
+ACTION-IF-NOT-FOUND is the fourth argument to PKG_CHECK_MODULES, not the
+fifth.
+
+Debian bug#743239 <https://bugs.debian.org/743239>
+
+Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
+Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index dd3ad4e..be40ed7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -126,7 +126,7 @@ if test x$BUILD_VMWGFX = xyes; then
+ [PKG_CHECK_EXISTS([xatracker = 2.0.0],
+ [AC_DEFINE([HAVE_XA_2], 1,
+ [Has version 2 of XA])])],
+- [],[BUILD_VMWGFX=no])
++ [BUILD_VMWGFX=no])
+ #
+ # Check for prime.
+ #
+--
+1.7.10.4
+
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
new file mode 100644
index 0000000000..6039d089a1
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
@@ -0,0 +1,98 @@
+Upstream-Status:Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+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
+
+---
+ configure.ac | 49 ++++++++++++++++++++-----------------------------
+ 1 file changed, 20 insertions(+), 29 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be40ed7..8e15307 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,13 @@ AC_ARG_ENABLE(vmwarectrl-client,
+ [VMWARECTRL=$enableval], [VMWARECTRL=no])
+ AM_CONDITIONAL(BUILD_VMWARECTRL, [test "x$VMWARECTRL" = xyes])
+
++# Define a configure option to build the vmwgfx driver
++AC_ARG_ENABLE(vmwgfx,
++ AS_HELP_STRING([--disable-vmwgfx],
++ [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
++ [VMWGFX="$enableval"], [VMWGFX="yes"])
++AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
++
+ # Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+@@ -85,11 +92,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
+ [Has version 1.5.0 or greater of the Xserver])])
+
+-PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
+- [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
+- [Has version 1.7.0 or greater of the Xserver])
+- BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
+-
+ 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)
+
+ AC_SUBST([moduledir])
+
+-if test x$BUILD_VMWGFX = xyes; then
+- PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
+-fi
+-if test x$BUILD_VMWGFX = xyes; then
+-#
+-# 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])])],
+- [BUILD_VMWGFX=no])
+-#
+-# Check for prime.
+-#
++AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
++if test x$VMWGFX = xyes; then
++ PKG_CHECK_MODULES([LIBDRM], [libdrm])
++ # Check for prime.
+ PKG_CHECK_EXISTS([libdrm >= 2.4.38],
+ [AC_DEFINE([HAVE_LIBDRM_2_4_38], 1,
+ [Has version 2.4.38 or greater of libdrm])])
+-fi
+
+-DRIVER_NAME=vmware
+-AC_SUBST([DRIVER_NAME])
+-
+-AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
+-if test x$BUILD_VMWGFX = xyes; then
+- AC_MSG_RESULT([yes])
++ # 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_MSG_RESULT([no])
+ fi
+
+-AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
++DRIVER_NAME=vmware
++AC_SUBST([DRIVER_NAME])
+
+ AC_CONFIG_FILES([
+ Makefile
+--
+1.7.10.4
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch
deleted file mode 100644
index 4b3a3094d9..0000000000
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware/vmwgfx-option.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Upstream-Status: Submitted (http://lists.x.org/archives/xorg-devel/2013-September/037762.html)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 5ec0aae666feb88d01256cdebbf94a6b373bf4c4 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 11 Sep 2013 21:40:44 +0100
-Subject: [PATCH] build: add explicit option to enable/disable VMWGFX
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- configure.ac | 31 ++++++++++++++-----------------
- 1 file changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0631bcc..3e14abd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -85,11 +85,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
- [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
- [Has version 1.5.0 or greater of the Xserver])])
-
--PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
-- [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
-- [Has version 1.7.0 or greater of the Xserver])
-- BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
--
- 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,25 +109,27 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-
- AC_SUBST([moduledir])
-
--if test x$BUILD_VMWGFX = xyes; then
-- PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
--fi
--if test x$BUILD_VMWGFX = xyes; then
-- PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],[],[BUILD_VMWGFX=no])
--fi
--
- DRIVER_NAME=vmware
- AC_SUBST([DRIVER_NAME])
-
-+AC_ARG_ENABLE(vmwgfx,
-+ AS_HELP_STRING([--disable-vmwgfx],
-+ [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
-+ [VMWGFX="$enableval"], [VMWGFX="yes"])
-+
- AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
--if test x$BUILD_VMWGFX = xyes; then
-- AC_MSG_RESULT([yes])
-+if test "x$VMWGFX" = xyes; then
-+ AC_MSG_RESULT([yes])
-+ PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
-+ [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
-+ [Has version 1.7.0 or greater of the Xserver])])
-+ PKG_CHECK_MODULES([LIBDRM], [libdrm])
-+ PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0])
- AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
- else
-- AC_MSG_RESULT([no])
-+ AC_MSG_RESULT([no])
- fi
--
--AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
-+AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
-
- AC_CONFIG_FILES([
- Makefile
---
-1.7.10.4
-
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb
index 7b48e0c101..24041b5cad 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.1.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.0.2.bb
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5fcd7d437a959a15fbee8707747c6b53"
DEPENDS += "virtual/libx11 xineramaproto videoproto libpciaccess"
-SRC_URI += "file://vmwgfx-option.patch"
+SRC_URI += "file://0001-configure-fix-build-without-xatracker.patch \
+ file://0002-add-option-for-vmwgfx.patch"
-SRC_URI[md5sum] = "b08e0195ebf3f88a82129322cb93da08"
-SRC_URI[sha256sum] = "802dda415c22412edad6c3df44fe18a06e91d0f8456d9a58bac0d340fdf8fe3d"
+SRC_URI[md5sum] = "91d1d7d33181766714405ab013d31244"
+SRC_URI[sha256sum] = "c8ba3d2cead3620dba2cbf5defb7f1759b2b96f4fe209f4bf6976832b6763c54"
COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index b46974bc2d..7a710dc532 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -16,7 +16,9 @@ S = "${WORKDIR}/${BPN}-${PV}"
FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
FILES_${PN}-dbg += " ${libdir}/xorg/modules/drivers/.debug"
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/xserver
+REQUIRED_DISTRO_FEATURES = "x11"
# FIXME: We don't want to include the libtool archives (*.la) from modules
# directory, as they serve no useful purpose. Upstream should fix Makefile.am
@@ -25,8 +27,8 @@ do_install_append() {
}
# Function to add the relevant ABI dependency to drivers, which should be called
-# from a populate_packages append/prepend.
-def add_abi_depends(d, name):
+# from a PACKAGEFUNC.
+def _add_xorg_abi_depends(d, name):
# Map of ABI names exposed in the dependencies to pkg-config variables
abis = {
"video": "abi_videodrv",
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
index a544d71bf2..fbec0643ff 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -2,9 +2,10 @@ include xorg-driver-common.inc
DEPENDS += "inputproto kbproto "
-python populate_packages_prepend() {
- add_abi_depends(d, "input")
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "input")
}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
FILES_${PN} += " ${libdir}/xorg/modules/input/*.so"
FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug"
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
index 4fe33491b7..38281e0f23 100644
--- a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
+++ b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -2,6 +2,7 @@ include xorg-driver-common.inc
DEPENDS =+ "renderproto videoproto xextproto fontsproto"
-python populate_packages_prepend() {
- add_abi_depends(d, "video")
+python add_xorg_abi_depends() {
+ _add_xorg_abi_depends(d, "video")
}
+PACKAGEFUNCS =+ "add_xorg_abi_depends"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
index 8b42991d1c..cc4258ad7b 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.3.0.bb
@@ -17,7 +17,7 @@ RDEPENDS_${PN}_class-native = "mkfontdir-native mkfontscale-native"
PR = "${INC_PR}.0"
do_configure_prepend() {
- sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkg-config\" pkg-config#g" ${S}/fontutil.m4.in
+ sed -i "s#MAPFILES_PATH=\`pkg-config#MAPFILES_PATH=\`PKG_CONFIG_PATH=\"${STAGING_LIBDIR_NATIVE}/pkgconfig\" pkg-config#g" ${S}/fontutil.m4.in
}
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
index 3688685509..bee500b43a 100644
--- a/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
+++ b/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb
@@ -15,13 +15,15 @@ PR = "r2"
inherit allarch
+S = "${WORKDIR}/misc"
+
PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/X11/ ${datadir}/fonts/X11/"
RDEPENDS_${PN} += "font-alias"
do_install() {
install -d ${D}/${datadir}/fonts/X11/misc
- install -m 0644 ${WORKDIR}/misc/* ${D}/${datadir}/fonts/X11/misc/
+ install -m 0644 ${S}/* ${D}/${datadir}/fonts/X11/misc/
install -d ${D}/${libdir}/X11
ln -sf ${datadir}/fonts/X11/ ${D}/${libdir}/X11/fonts -s
}
diff --git a/meta/recipes-graphics/xorg-lib/libice_1.0.8.bb b/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
index ce6a194eaf..5049b7ee02 100644
--- a/meta/recipes-graphics/xorg-lib/libice_1.0.8.bb
+++ b/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
@@ -20,5 +20,8 @@ XORG_PN = "libICE"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "471b5ca9f5562ac0d6eac7a0bf650738"
-SRC_URI[sha256sum] = "24a991284d02ff0c789bc8d11ad2e4dffe144cb70f24e28f9ce3e8b1ee08b71e"
+SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
+SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
+
+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/libsm_1.2.2.bb b/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
index 180acfae0b..1925136369 100644
--- a/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
@@ -11,7 +11,12 @@ require xorg-lib-common.inc
LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=c0fb37f44e02bdbde80546024400728d"
-DEPENDS += "libice xproto xtrans e2fsprogs"
+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"
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
new file mode 100644
index 0000000000..30686206ab
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
@@ -0,0 +1,72 @@
+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: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=81822]
+
+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);
+ if (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);
+ if (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);
+ if (args) Xfree(args);
+ if (ic) {
+ ic->core.next = im->core.ic_chain;
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
index 700bc3680f..a7226480c2 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.2.bb
@@ -5,6 +5,7 @@ BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://disable_tests.patch \
file://nls-always-use-XCOMM-instead-of-for-comments-in-Comp.patch \
+ file://libX11-Add-missing-NULL-check.patch \
"
SRC_URI[md5sum] = "c35d6ad95b06635a524579e88622fdb5"
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
deleted file mode 100644
index d88b025e1f..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxcb_1.10.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-include libxcb.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
-
-
-DEPENDS += "libxdmcp"
-
-SRC_URI[md5sum] = "074c335cc4453467eeb234e3dadda700"
-SRC_URI[sha256sum] = "98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5"
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
new file mode 100644
index 0000000000..c162702105
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
@@ -0,0 +1,10 @@
+include libxcb.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
+
+
+DEPENDS += "libxdmcp"
+
+SRC_URI[md5sum] = "5a873ebd383d1a60612dd6ec6b42c781"
+SRC_URI[sha256sum] = "03635d70045b9ede90778e67516135828a57de87ac508f987024f43c03620ff7"
diff --git a/meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb b/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
index ec66175684..efa8b65ace 100644
--- a/meta/recipes-graphics/xorg-lib/libxext_1.3.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
@@ -22,5 +22,5 @@ XORG_PN = "libXext"
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "4376101e51bb2c6c44d9ab14344e85ad"
-SRC_URI[sha256sum] = "f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0"
+SRC_URI[md5sum] = "52df7c4c1f0badd9f82ab124fb32eb97"
+SRC_URI[sha256sum] = "b518d4d332231f313371fdefac59e3776f4f0823bcb23cf7c7305bfb57b16e35"
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
index d587ba8c54..ef0bde29fb 100644
--- a/meta/recipes-graphics/xorg-lib/libxfont_1.4.7.bb
+++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
@@ -18,5 +18,5 @@ XORG_PN = "libXfont"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "b21ee5739d5d2e5028b302fbf9fe630b"
-SRC_URI[sha256sum] = "d16ea3541835d296b19cfb05d7e64fc62173d8e7eb93284402ec761b951d1543"
+SRC_URI[md5sum] = "664629bfa7cdf8b984155019fd395dcb"
+SRC_URI[sha256sum] = "3a3c52c4adf9352b2160f07ff0596af17ab14f91d6509564e606678a1261c25f"
diff --git a/meta/recipes-graphics/xorg-lib/libxft/freetype.patch b/meta/recipes-graphics/xorg-lib/libxft/freetype.patch
deleted file mode 100644
index 9f1aa21bac..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxft/freetype.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From f568fa5a8220fd06659c0f26a93adcc81a42917c Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 2 Dec 2013 13:48:40 +0000
-Subject: [PATCH] xftglyphs: use recommend freetype inclusion
-
-FreeType recommends to use their special macros to include the headers, because
-it gives them the ability to move headers around. They did this in 2.5.1 (yes,
-a point release) and this direct inclusion doesn't work anymore.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- src/xftglyphs.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/xftglyphs.c b/src/xftglyphs.c
-index 2f3dc5a..53302f0 100644
---- a/src/xftglyphs.c
-+++ b/src/xftglyphs.c
-@@ -21,10 +21,10 @@
- */
-
- #include "xftint.h"
--#include <freetype/ftoutln.h>
--#include <freetype/ftlcdfil.h>
--
--#include <freetype/ftsynth.h>
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
-+#include FT_LCD_FILTER_H
-+#include FT_SYNTHESIS_H
-
- /*
- * Validate the memory info for a font
---
-1.8.5
-
diff --git a/meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb b/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
index 16838f0eae..a967cdc585 100644
--- a/meta/recipes-graphics/xorg-lib/libxft_2.3.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
@@ -20,10 +20,8 @@ PROVIDES = "xft"
PE = "1"
-SRC_URI += "file://freetype.patch"
-
-SRC_URI[md5sum] = "78d64dece560c9e8699199f3faa521c0"
-SRC_URI[sha256sum] = "7fce32b92dcb7b2869bed567af2abc7bbad0d5d6fcf471b8a3e137964a31bbbd"
+SRC_URI[md5sum] = "331b3a2a3a1a78b5b44cfbd43f86fcfe"
+SRC_URI[sha256sum] = "f5a3c824761df351ca91827ac221090943ef28b248573486050de89f4bfcdc4c"
XORG_PN = "libXft"
diff --git a/meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb b/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
index 0ae98e0810..07033a3e78 100644
--- a/meta/recipes-graphics/xorg-lib/libxi_1.7.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
@@ -17,5 +17,5 @@ PE = "1"
XORG_PN = "libXi"
-SRC_URI[md5sum] = "f4df3532b1af1dcc905d804f55b30b4a"
-SRC_URI[sha256sum] = "df24781dc63645e2b561cd0b20bd8a0e7aff02e426a8d2a7641159004d4cb20e"
+SRC_URI[md5sum] = "9c4a69c34b19ec1e4212e849549544cb"
+SRC_URI[sha256sum] = "2cffc2686618dc1803725636cd92b36342c512dc60a7a35cba34bf7192a42244"
diff --git a/meta/recipes-graphics/xorg-lib/libxi_git.bb b/meta/recipes-graphics/xorg-lib/libxi_git.bb
deleted file mode 100644
index c17c1f7510..0000000000
--- a/meta/recipes-graphics/xorg-lib/libxi_git.bb
+++ /dev/null
@@ -1,18 +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."
-
-DEPENDS += "libxext inputproto"
-SRCREV = "d0326fe8cdbb08d4f52d79fd3fd4e1b2a0951d5e"
-PE = "1"
-PV = "1.2.99.5+gitr${SRCPV}"
-
-XORG_PN = "libXi"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/${XORG_PN}"
-S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
index 2b1806142f..a166b57603 100644
--- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.4.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
@@ -2,19 +2,19 @@ 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://COPYING;md5=9c0b824e72a22f9d2c40b9c93b1f0ddc"
+LIC_FILES_CHKSUM = "file://COPYING;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] = "4b717adce41c8305258e99a9b396330a"
-SRC_URI[sha256sum] = "a0fc71b07eeddba4af62bd709e24cec219778bb6871384aa850b2f5798a48957"
+SRC_URI[md5sum] = "2e1faeafcc609c30af3a561a91e84158"
+SRC_URI[sha256sum] = "90bd7824742b9a6f52a6cf80e2cadd6f5349cf600a358d08260772615b89d19c"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-docs"
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch b/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
new file mode 100644
index 0000000000..14a5fd209b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
@@ -0,0 +1,22 @@
+Revert a commit in pixman 0.32.6 which breaks compliation on MIPS machines with
+errors such as:
+
+pixman-0.32.6/pixman/pixman-mips-dspr2-asm.S:4267:
+Error: invalid operands `mflo $14,$ac3'
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- b/pixman/pixman-mips-dspr2-asm.h
++++ a/pixman/pixman-mips-dspr2-asm.h
+@@ -72,10 +72,7 @@
+ #define LEAF_MIPS32R2(symbol) \
+ .globl symbol; \
+ .align 2; \
+-#ifdef __ELF__
+- .hidden symbol; \
+ .type symbol, @function; \
+-#endif
+ .ent symbol, 0; \
+ symbol: .frame sp, 0, ra; \
+ .set push; \
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
index 51cca5d13a..467ba508ee 100644
--- a/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
@@ -29,9 +29,10 @@ EXTRA_OECONF_class-native = "--disable-gtk"
SRC_URI += "\
file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
+ file://mips-export-revert.patch \
"
-SRC_URI[md5sum] = "cdb566504fe9daf6728c7b03cc7ea228"
-SRC_URI[sha256sum] = "ae2bd664057e330d41b40336ed296d3512318ce7f2401cc42601f2613d371e4c"
+SRC_URI[md5sum] = "8a9e8f14743a39cf303803f369c1f344"
+SRC_URI[sha256sum] = "201fc0d7d6bc0017496f2bd27b3ca14224aea0df6b624c5ee2dc0307a4ff14a4"
REQUIRED_DISTRO_FEATURES = ""
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
index 1d36893f93..91464b6c98 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util-image_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
@@ -6,6 +6,5 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://image/xcb_image.c;endline=24;md5=eafdf965cfb89955fdedf75054223fb4 \
file://image/xcb_image.h;beginline=4;endline=27;md5=48cd25ae55e7de525fe1e1a3a7672e1c"
-SRC_URI[md5sum] = "fabb80b36490b00fc91289e2c7f66770"
-SRC_URI[sha256sum] = "d35a3c0eaae171f5081ec127fb9cec174b716ce5d78196a87f2785376da021df"
-
+SRC_URI[md5sum] = "08fe8ffecc8d4e37c0ade7906b3f4c87"
+SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc" \ No newline at end of file
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb
index 39ead34e92..bca64ed61f 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-keysyms_0.4.0.bb
@@ -3,8 +3,7 @@ require xcb-util.inc
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://keysyms/keysyms.c;endline=30;md5=2f8de023ed823bb92f0b47900574ea9e \
"
-
-SRC_URI[md5sum] = "64e4aad2d48cd4a92e2da13b9f35bfd2"
-SRC_URI[sha256sum] = "7be1acf053bd68a1910fc861b2cbcbad7637b5618590dd5484d43a96f7995c6e"
+SRC_URI[md5sum] = "1022293083eec9e62d5659261c29e367"
+SRC_URI[sha256sum] = "0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb
deleted file mode 100644
index 2b4ee703f5..0000000000
--- a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xcb-util.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://ewmh/ewmh.c;endline=27;md5=63fd80552d7dc886f4eb267610d5bb9d \
- file://ewmh/xcb_ewmh.h;beginline=4;endline=30;md5=73b589f90ef90b4a43998955daad5cd8 \
- file://icccm/icccm.c;endline=28;md5=e2b3240a0c197e8977adde2a5cf18d50 \
- file://icccm/xcb_icccm.h;beginline=4;endline=31;md5=393772b7b07b9868d479d538238c1d8a \
- "
-
-SRC_URI[md5sum] = "1b5182b894753de63c9fad1ce6124534"
-SRC_URI[sha256sum] = "66f97c18f7d98d3c873fe5db5842d2fca34519274c31ee668551ab8995a2f51f"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb
new file mode 100644
index 0000000000..39f1383299
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xcb-util-wm_0.4.1.bb
@@ -0,0 +1,11 @@
+require xcb-util.inc
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://ewmh/ewmh.c.m4;endline=27;md5=63fd80552d7dc886f4eb267610d5bb9d \
+ file://ewmh/xcb_ewmh.h.m4;beginline=4;endline=30;md5=73b589f90ef90b4a43998955daad5cd8 \
+ file://icccm/icccm.c;endline=28;md5=e2b3240a0c197e8977adde2a5cf18d50 \
+ file://icccm/xcb_icccm.h;beginline=4;endline=31;md5=393772b7b07b9868d479d538238c1d8a \
+ "
+
+SRC_URI[md5sum] = "87b19a1cd7bfcb65a24e36c300e03129"
+SRC_URI[sha256sum] = "28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f"
diff --git a/meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb b/meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb
index c5d8858115..206f07a65c 100644
--- a/meta/recipes-graphics/xorg-lib/xcb-util_0.3.9.bb
+++ b/meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb
@@ -4,5 +4,5 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://src/xcb_aux.c;endline=30;md5=ae305b9c2a38f9ba27060191046a6460 \
file://src/xcb_event.h;endline=27;md5=627be355aee59e1b8ade80d5bd90fad9"
-SRC_URI[md5sum] = "01dcc7a16d5020530552712710646ea2"
-SRC_URI[sha256sum] = "c611259c0ab20fd76f79f48f4684843c18ea9c967eba78a45e8b3636315c18c4"
+SRC_URI[md5sum] = "2e97feed81919465a04ccc71e4073313"
+SRC_URI[sha256sum] = "46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9"
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb
index b80309d2ac..5536b6217a 100644
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.11.bb
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.13.bb
@@ -13,8 +13,8 @@ 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] = "e3defd29cc464cc1a1dfa0eebaca53b1"
-SRC_URI[sha256sum] = "e7125460892c2b5c3a8d843cb18c24b60c46051e925c2888a61fa672a2f76d76"
+SRC_URI[md5sum] = "a415775ca8ecf4dfafc9488b8cbd7114"
+SRC_URI[sha256sum] = "7b5be9f2b9a30102512b15308aec55f7f54289df24ac21de82ebb4bf145f9fce"
SECTION = "x11/libs"
DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
@@ -23,7 +23,7 @@ EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
FILES_${PN} += "${datadir}/X11/xkb"
-inherit autotools pkgconfig
+inherit autotools pkgconfig gettext
do_install_append () {
install -d ${D}${datadir}/X11/xkb/compiled
diff --git a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
index 7231664773..09df0109cb 100644
--- a/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
+++ b/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
@@ -13,9 +13,14 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
inherit autotools distro_features_check pkgconfig
-EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop --without-xmlto"
+EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
UNKNOWN_CONFIGURE_WHITELIST += "--enable-malloc0returnsnull --disable-malloc0returnsnull \
- --disable-specs --without-groff --without-ps2pdf --without-fop --without-xmlto"
+ --disable-specs --without-groff --without-ps2pdf --without-fop \
+ --without-xmlto --with-xmlto \
+"
REQUIRED_DISTRO_FEATURES ?= "x11"
diff --git a/meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
index f2b89217bb..d5b7f1a2c6 100644
--- a/meta/recipes-graphics/xorg-lib/xtrans_1.3.4.bb
+++ b/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb
@@ -20,5 +20,5 @@ inherit gettext
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "a615e17d9fee6f097fc3b716eacb3dca"
-SRC_URI[sha256sum] = "054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a"
+SRC_URI[md5sum] = "c5ba432dd1514d858053ffe9f4737dd8"
+SRC_URI[sha256sum] = "adbd3b36932ce4c062cd10f57d78a156ba98d618bdb6f50664da327502bc8301"
diff --git a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb b/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
index 4b9101a699..27fc281748 100644
--- a/meta/recipes-graphics/xorg-proto/fontsproto_2.1.2.bb
+++ b/meta/recipes-graphics/xorg-proto/fontsproto_2.1.3.bb
@@ -14,5 +14,5 @@ PE = "1"
BBCLASSEXTEND = "native"
-SRC_URI[md5sum] = "c5f4f1fb4ba7766eedbc9489e81f3be2"
-SRC_URI[sha256sum] = "869c97e5a536a8f3c9bc8b9923780ff1f062094bab935e26f96df3d6f1aa68a9"
+SRC_URI[md5sum] = "36934d00b00555eaacde9f091f392f97"
+SRC_URI[sha256sum] = "259046b0dd9130825c4a4c479ba3591d6d0f17a33f54e294b56478729a6e5ab8"
diff --git a/meta/recipes-graphics/xorg-proto/inputproto_2.3.bb b/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
index a39ce497aa..7e8e0c155f 100644
--- a/meta/recipes-graphics/xorg-proto/inputproto_2.3.bb
+++ b/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
@@ -16,6 +16,5 @@ inherit gettext
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[md5sum] = "94db391e60044e140c9854203d080654"
-SRC_URI[sha256sum] = "7d26b193f6699f8e9c1e28bf026844b7ecea33dd644402523471be109152c32f"
-
+SRC_URI[md5sum] = "6caebead4b779ba031727f66a7ffa358"
+SRC_URI[sha256sum] = "5a47ee62053a6acef3a83f506312494be1461068d0b9269d818839703b95c1d1"
diff --git a/meta/recipes-graphics/xorg-proto/presentproto_git.bb b/meta/recipes-graphics/xorg-proto/presentproto_git.bb
index 7fca51d31e..dbb6f32bc0 100644
--- a/meta/recipes-graphics/xorg-proto/presentproto_git.bb
+++ b/meta/recipes-graphics/xorg-proto/presentproto_git.bb
@@ -17,6 +17,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/presentproto"
S = "${WORKDIR}/git"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
index 0b67b5703e..5bc5a112e5 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.10.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
@@ -5,5 +5,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
-SRC_URI[md5sum] = "ade74b8e9c870dc7515adfa209e66063"
-SRC_URI[sha256sum] = "7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05"
+SRC_URI[md5sum] = "6bf2797445dc6d43e9e4707c082eff9c"
+SRC_URI[sha256sum] = "b4aceee6502a0ce45fc39b33c541a2df4715d00b72e660ebe8c5bb444771e32e"
diff --git a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc b/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
index 625a718560..7a417c9742 100644
--- a/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
+++ b/meta/recipes-graphics/xorg-proto/xorg-proto-common.inc
@@ -14,9 +14,12 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
DEPENDS = "util-macros"
inherit autotools pkgconfig
-EXTRA_OECONF = "--without-fop --without-xmlto"
+EXTRA_OECONF = "--without-fop"
-UNKNOWN_CONFIGURE_WHITELIST += "--without-fop --without-xmlto"
+UNKNOWN_CONFIGURE_WHITELIST += "--without-fop --without-xmlto --with-xmlto"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
RDEPENDS_${PN}-dev = ""
diff --git a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb b/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
index 23cef63ea2..ccf2f4b451 100644
--- a/meta/recipes-graphics/xorg-util/gccmakedep_1.0.2.bb
+++ b/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
@@ -13,5 +13,5 @@ RDEPENDS_${PN} = "gcc"
PR = "r3"
PE = "1"
-SRC_URI[md5sum] = "fc49f45251c1336fe1dad5dba1c83fcd"
-SRC_URI[sha256sum] = "fdd3963294e80b27416f902a5c029c033d321f03310d3cafa3afb62b50ddce92"
+SRC_URI[md5sum] = "127ddb6131eb4a56fdf6644a63ade788"
+SRC_URI[sha256sum] = "f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548" \ No newline at end of file
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 10a6d9a0bc..bbda9eaa63 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
@@ -30,11 +30,6 @@ Section "InputDevice"
Option "USB" "on"
EndSection
-Section "Device"
- Identifier "Graphics Controller"
- Driver "vmware"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
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 10a6d9a0bc..bbda9eaa63 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
@@ -30,11 +30,6 @@ Section "InputDevice"
Option "USB" "on"
EndSection
-Section "Device"
- Identifier "Graphics Controller"
- Driver "vmware"
-EndSection
-
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
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 549c7c89bf..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,6 +7,8 @@ PR = "r33"
SRC_URI = "file://xorg.conf"
+S = "${WORKDIR}"
+
CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 8b5747e282..61542955a9 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -99,7 +99,6 @@ FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so"
FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so"
EXTRA_OECONF += "--with-fop=no \
- --without-xmlto \
--with-pic \
--disable-static \
--disable-xinerama \
@@ -113,10 +112,13 @@ EXTRA_OECONF += "--with-fop=no \
--sysconfdir=/etc/X11 \
--localstatedir=/var \
--with-xkb-output=/var/lib/xkb \
+ --with-sha1=libcrypto \
ac_cv_file__usr_share_sgml_X11_defs_ent=no \
+ --disable-systemd-logind \
"
PACKAGECONFIG ??= "udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri2 glx', '', 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"
@@ -125,6 +127,7 @@ PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11"
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"
do_install_append () {
# Its assumed base-files creates this for us
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch
new file mode 100644
index 0000000000..604d23a376
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/Fix-subwindow-in-Xi-emulated-events.patch
@@ -0,0 +1,41 @@
+From db424318d0bb29cbcdf3a07fcc2e023586f1219f Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <fourdan@xfce.org>
+Date: Fri, 2 Jan 2015 18:50:17 +0100
+Subject: [PATCH] Fix subwindow in Xi emulated events
+
+Bug: 70790
+Upstream status: Submitted
+ https://bugs.freedesktop.org/show_bug.cgi?id=70790
+
+Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
+---
+ Xi/exevents.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Xi/exevents.c b/Xi/exevents.c
+index b0bc47e..0857bce 100644
+--- a/Xi/exevents.c
++++ b/Xi/exevents.c
+@@ -1403,7 +1403,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+
+ if (grab->ownerEvents) {
+ WindowPtr focus = NullWindow;
+- WindowPtr sprite_win = dev->spriteInfo->sprite->win;
++ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
+
+ deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev);
+ }
+@@ -1429,8 +1429,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
+ }
+ else {
+ GrabPtr devgrab = dev->deviceGrab.grab;
++ WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite);
+
+- DeliverDeviceEvents(win, ptrev, grab, win, dev);
++ DeliverDeviceEvents(sprite_win, ptrev, grab, win, dev);
+ /* FIXME: bad hack
+ * Implicit passive grab activated in response to this event. Store
+ * the event.
+--
+2.1.0
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch
deleted file mode 100644
index 045e24a281..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/aarch64.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Subject: Add AArch64 support to xserver-xorg
-Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-lnx_video.c parts are not existing in 1.14 branch.
-
-Xserver was checked in AArch64 fastmodel (commercial one with graphics support).
-
-http://patchwork.freedesktop.org/patch/12785/
-
-Upstream-Status: Pending
-
----
- include/servermd.h | 7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
---- xorg-server-1.13.1.orig/include/servermd.h
-+++ xorg-server-1.13.1/include/servermd.h
-@@ -243,10 +243,17 @@ SOFTWARE.
- #define BITMAP_BIT_ORDER LSBFirst
- #define GLYPHPADBYTES 4
- /* ???? */
- #endif /* AMD64 */
-
-+#if defined(__aarch64__) || defined(aarch64) || defined(__aarch64)
-+#define IMAGE_BYTE_ORDER MSBFirst
-+#define BITMAP_BIT_ORDER MSBFirst
-+#define GLYPHPADBYTES 4
-+/* ???? */
-+#endif /* AArch64 */
-+
- #if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
- defined(__alpha__) || defined(__alpha) || \
- defined(__i386__) || \
- defined(__s390x__) || defined(__s390__)
-
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch
deleted file mode 100644
index 2f98bb8c89..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/crosscompile.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff --git a/configure.ac b/configure.ac
-index b3b752c..600500b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
- dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
- dnl compiling, assume default font path uses standard FONTROOTDIR directories.
- DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
--if test "$cross_compiling" != yes; then
-- AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
-- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
-- [case $host_os in
-+ case $host_os in
- darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
-- esac])
--fi
-+ esac
- AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
- [ FONTPATH="$withval" ],
- [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch
deleted file mode 100644
index 168368e6c3..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/mips64-compiler.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-on mips64/n64 pointers are 64bit therefore the pointer conversions to int dont work well
-so we end up with incompatible conversion errors
-
-This patch choses the right values for mips64
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: xorg-server-1.13.0/hw/xfree86/common/compiler.h
-===================================================================
---- xorg-server-1.13.0-orig/hw/xfree86/common/compiler.h 2012-06-14 23:04:29.000000000 +0300
-+++ xorg-server-1.13.0/hw/xfree86/common/compiler.h 2012-11-08 10:06:50.865831783 +0200
-@@ -101,6 +101,7 @@
- #if defined(NO_INLINE) || defined(DO_PROTOTYPES)
- #if !defined(__arm__)
- #if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \
-+ && !defined(__mips64) \
- && !(defined(__alpha__) && defined(linux)) \
- && !(defined(__ia64__) && defined(linux)) \
-
-@@ -721,7 +722,7 @@
- }
-
- #elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
--#ifdef __arm32__
-+#if defined (__arm32__) || defined (__mips64)
- #define PORT_SIZE long
- #else
- #define PORT_SIZE short
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
index 55e09134ce..682ddf7006 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xshmfence-option.patch
@@ -1,7 +1,7 @@
Upstream-Status: Submitted
Signed-off-by: Ross Burton <ross.burton@intel.com>
-commit 1affe20d5c82befc3b1626e557409dab5343c47b
+commit ca29a9f3e689f3840426897f58aaa3974932ae78
Author: Ross Burton <ross.burton@intel.com>
Date: Mon Jul 7 12:53:35 2014 +0100
@@ -13,7 +13,7 @@ Date: Mon Jul 7 12:53:35 2014 +0100
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/configure.ac b/configure.ac
-index 2daa6be..fd1cf3f 100644
+index c214638..a1ca9ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -648,6 +648,7 @@ AC_ARG_ENABLE(kdrive-kbd, AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd d
@@ -24,24 +24,18 @@ index 2daa6be..fd1cf3f 100644
dnl chown/chmod to be setuid root as part of build
-@@ -1235,18 +1236,19 @@ esac
+@@ -1235,18 +1236,21 @@ esac
AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes)
-PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
- [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
-+HAVE_XSHMFENCE=no
-+if test "x$WANT_XSHMFENCE" != "xno"; then
-+ PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
-+ [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
-
-+ if test "$WANT_XSHMFENCE,$HAVE_XSHMFENCE" = "yes,no"; then
-+ AC_MSG_ERROR([libxshmfence requested but not found.])
-+ fi
-+ AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
-+ REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
+
+-AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
++PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE, [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
++if test "x$WANT_XSHMFENCE" = "xauto"; then
++ WANT_XSHMFENCE="$HAVE_XSHMFENCE"
+fi
- AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
-case x"$HAVE_XSHMFENCE" in
- xyes)
@@ -49,7 +43,15 @@ index 2daa6be..fd1cf3f 100644
- REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
- ;;
-esac
--
++if test "x$WANT_XSHMFENCE" = "xyes"; then
++ if test "x$HAVE_XSHMFENCE" != "xyes"; then
++ AC_MSG_ERROR([xshmfence requested but not installed.])
++ fi
++ AC_DEFINE(HAVE_XSHMFENCE, 1, [Have xshmfence support])
++ REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
++fi
+
++AM_CONDITIONAL(XSHMFENCE, [test "x$WANT_XSHMFENCE" = xyes])
case "$DRI3,$HAVE_XSHMFENCE" in
yes,yes | auto,yes)
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb
index 22ac604433..7d7d83e97b 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.15.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.2.bb
@@ -1,16 +1,14 @@
require xserver-xorg.inc
# Misc build failure for master HEAD
-SRC_URI += "file://crosscompile.patch \
- file://fix_open_max_preprocessor_error.patch \
- file://mips64-compiler.patch \
- file://aarch64.patch \
+SRC_URI += "file://fix_open_max_preprocessor_error.patch \
file://xorg-CVE-2013-6424.patch \
file://xshmfence-option.patch \
+ file://Fix-subwindow-in-Xi-emulated-events.patch \
"
-SRC_URI[md5sum] = "e4c70262ed89764be8f8f5d699ed9227"
-SRC_URI[sha256sum] = "626db6882602ebe1ff81f7a4231c7ccc6ceb5032f2b5b3954bf749e1567221e2"
+SRC_URI[md5sum] = "89620960b13515db8d0a8dbb92a1378a"
+SRC_URI[sha256sum] = "446e0c3ebd556aced78ec0000ba9ae73f1e5317117d497f827afba48b787ce64"
# These extensions are now integrated into the server, so declare the migration
# path for in-place upgrades.
diff --git a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index b9c7c20c2b..037d161340 100644
--- a/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -59,8 +59,12 @@ Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
INCS = -I. -I.. -I../btt
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-@@ -35,7 +36,7 @@ btrecord: btrecord.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+@@ -32,10 +33,10 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LDFLAGS)
btreplay: btreplay.o
- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
index 946faac7d2..6a93a35a39 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
@@ -9,3 +9,5 @@ SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea"
SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f"
S = "${WORKDIR}/cryptodev-linux-${PV}"
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 3eca25fe41..0c409b0c0b 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -4,15 +4,19 @@ SECTION = "bootloader"
LICENSE = "GPLv2 | BSD"
DEPENDS = "flex-native bison-native"
-inherit autotools-brokensep
-
-SRC_URI = "git://www.jdl.com/software/dtc.git \
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
file://make_install.patch \
"
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}"'
+EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
S = "${WORKDIR}/git"
+do_install () {
+ oe_runmake install
+}
+
PACKAGES =+ "${PN}-misc"
FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
+
+RDEPENDS_${PN}-misc += "bash"
diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb
index 0bd3acf6c0..4446142a30 100644
--- a/meta/recipes-kernel/dtc/dtc_git.bb
+++ b/meta/recipes-kernel/dtc/dtc_git.bb
@@ -3,8 +3,8 @@ require dtc.inc
LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-SRCREV = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
-PV = "1.4.0+git${SRCPV}"
+SRCREV = "302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2"
+PV = "1.4.1+git${SRCPV}"
S = "${WORKDIR}/git"
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 1a2f881c7a..ce872354f2 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70c
DEPENDS = "git-native"
-SRCREV = "a42509b01ccfe5020a226b23d3a52c07b3fb2051"
+SRCREV = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index 50b448caed..7797a25738 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -10,8 +10,21 @@ DEPENDS = "zlib xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz"
-inherit autotools-brokensep
+PR = "r1"
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+inherit autotools
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
INSANE_SKIP_${PN} = "arch"
+
+do_compile_prepend() {
+ # 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/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
new file mode 100644
index 0000000000..b697a54b90
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
@@ -0,0 +1,801 @@
+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>
+---
+
+Index: kexec-tools-2.0.4/configure.ac
+===================================================================
+--- kexec-tools-2.0.4.orig/configure.ac
++++ kexec-tools-2.0.4/configure.ac
+@@ -30,6 +30,9 @@ case $target_cpu in
+ powerpc64 )
+ ARCH="ppc64"
+ ;;
++ aarch64 )
++ ARCH="arm64"
++ ;;
+ arm* )
+ ARCH="arm"
+ ;;
+Index: kexec-tools-2.0.4/kexec/Makefile
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/Makefile
++++ kexec-tools-2.0.4/kexec/Makefile
+@@ -70,6 +70,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/mips/Makefile
+Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/arch/arm64/crashdump-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/arch/arm64/include/arch/options.h
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/arch/arm64/kexec-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/arch/arm64/kexec-arm64.h
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/arch/arm64/kexec-elf-arm64.c
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/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.4/kexec/kexec-syscall.h
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec-syscall.h
++++ kexec-tools-2.0.4/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
+@@ -72,6 +72,8 @@ static inline long kexec_load(void *entr
+ #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)
+@@ -114,5 +116,8 @@ static inline long kexec_load(void *entr
+ #if defined(__mips__)
+ #define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS
+ #endif
++#if defined(__arm64__)
++#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
++#endif
+
+ #endif /* KEXEC_SYSCALL_H */
+Index: kexec-tools-2.0.4/kexec/kexec.c
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec.c
++++ kexec-tools-2.0.4/kexec/kexec.c
+@@ -659,6 +659,8 @@ static int my_load(const char *type, int
+ info.backup_start = 0;
+ 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.4/purgatory/arch/arm64/Makefile
+===================================================================
+--- /dev/null
++++ kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
+@@ -0,0 +1,7 @@
++#
++# Purgatory arm64
++#
++
++arm64_PURGATORY_SRCS =
++
++dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
+Index: kexec-tools-2.0.4/configure
+===================================================================
+--- kexec-tools-2.0.4.orig/configure
++++ kexec-tools-2.0.4/configure
+@@ -2256,6 +2256,9 @@ case $target_cpu in
+ powerpc64 )
+ ARCH="ppc64"
+ ;;
++ aarch64 )
++ ARCH="arm64"
++ ;;
+ arm* )
+ ARCH="arm"
+ ;;
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb
deleted file mode 100644
index a5c1ced494..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch"
-
-SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab"
-SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0"
-
-PACKAGES =+ "kexec kdump"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump"
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb
new file mode 100644
index 0000000000..c478732300
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.8.bb
@@ -0,0 +1,19 @@
+require kexec-tools.inc
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
+ file://kexec-aarch64.patch \
+ "
+
+SRC_URI[md5sum] = "45bd2bc676ae202579e4c185563126af"
+SRC_URI[sha256sum] = "95083c707577154a2241c5af0985f1eb3412d1ba208ef91813e9158b0a901179"
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump"
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index ec20bf8d30..44b7650e4e 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -19,21 +19,21 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/kernel-abiversion" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
else
- kernelabi=\$(cat ${STAGING_KERNEL_DIR}/kernel-abiversion)
+ 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
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/System.map-\$4 ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/System.map-\$4" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
- exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_KERNEL_DIR}/System.map-\$4" "\$4"
+ exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
fi
EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 504a32fcee..899881e1fb 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -11,14 +11,14 @@ SECTION = "base"
DEPENDS += "pkgconfig-native"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
inherit autotools gtk-doc ptest
-SRCREV = "49d8e0b59052999de577ab732b719cfbeb89504d"
+SRCREV = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
# Lookout for PV bump too when SRCREV is changed
-PV = "17+git${SRCPV}"
+PV = "19+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
@@ -31,7 +31,10 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
S = "${WORKDIR}/git"
EXTRA_AUTORECONF += "--install --symlink"
-EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib"
+EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
do_configure_prepend () {
gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make
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
index 2320b92eba..7c0a27510b 100644
--- 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
@@ -1,6 +1,6 @@
-From 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Tue, 10 Sep 2013 13:44:18 +0800
+From 4b68940b1ed46c54a5a0bdf6bb9d4599bc64e6f4 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 24 Dec 2014 10:12:40 +0800
Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh
We can't use htobe* and be*toh functions because they are not
@@ -11,12 +11,13 @@ 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 files changed, 2 insertions(+), 1 deletions(-)
+ 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 6b80caa..3544a36 100644
+index 2b976a5..ffe58c2 100644
--- a/libkmod/libkmod-signature.c
+++ b/libkmod/libkmod-signature.c
@@ -19,6 +19,7 @@
@@ -24,10 +25,10 @@ index 6b80caa..3544a36 100644
#include <endian.h>
+#include <byteswap.h>
- #include <stdint.h>
+ #include <inttypes.h>
+ #include <stdio.h>
#include <stdlib.h>
- #include <string.h>
-@@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
+@@ -124,7 +125,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;
@@ -37,5 +38,5 @@ index 6b80caa..3544a36 100644
return false;
--
-1.7.5.4
+1.9.1
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
index 37adec3d2f..598dd2cb5f 100755
--- a/meta/recipes-kernel/kmod/kmod/run-ptest
+++ b/meta/recipes-kernel/kmod/kmod/run-ptest
@@ -1,3 +1,5 @@
#!/bin/sh
touch testsuite/stamp-rootfs
+tar xf testmodule.tar
make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL
+find testsuite -name *.ko -exec rm -f {} \;
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
index d4c21a4387..08dd81569c 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -34,6 +34,10 @@ do_install_append () {
# install depmod.d file for search/ dir
install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
+ if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+ find testsuite -name *.ko -exec tar rf testmodule.tar {} \;
+ find testsuite -name *.ko -exec rm -f {} \;
+ fi
}
do_compile_prepend() {
@@ -44,7 +48,10 @@ do_compile_ptest () {
oe_runmake buildtest-TESTS rootfs
}
-INHIBIT_PACKAGE_STRIP = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
+do_install_ptest () {
+ install testmodule.tar ${D}${PTEST_PATH}
+}
+
INSANE_SKIP_${PN}-ptest = "arch"
inherit update-alternatives
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index 516e2c5267..cb0a3c5ed1 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -4,18 +4,22 @@ HOMEPAGE = "http://www.latencytop.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
-DEPENDS = "virtual/libintl ncurses glib-2.0 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+DEPENDS = "virtual/libintl ncurses glib-2.0"
PR = "r3"
-SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
file://latencytop-makefile.patch \
file://latencytop-fsync.patch"
SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
-EXTRA_OEMAKE_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'HAS_GTK_GUI=1', '', d)}"
+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}"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index a107f804fa..16ebf6ad6b 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
- file://LICENCE.iwlwifi_firmware;md5=8b938534f77ffd453690eb34ed84ae8b \
+ file://LICENCE.iwlwifi_firmware;md5=5106226b2863d00d8ed553221ddf8cd2 \
file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
@@ -24,7 +24,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
"
-SRCREV = "dec41bce44e0dff6a2c3358a958fadf22bf58858"
+SRCREV = "0e5f63771d0df6d7859f7c4100a74d737c62ac88"
PE = "1"
PV = "0.0+git${SRCPV}"
@@ -34,6 +34,8 @@ S = "${WORKDIR}/git"
inherit allarch update-alternatives
+CLEANBROKEN = "1"
+
do_compile() {
:
}
@@ -42,7 +44,7 @@ do_install() {
install -d ${D}/lib/firmware/
cp -r * ${D}/lib/firmware/
- # Avoid Makefile to be deplyed
+ # Avoid Makefile to be deployed
rm ${D}/lib/firmware/Makefile
# Remove unbuild firmware which needs cmake and bash
@@ -67,9 +69,13 @@ PACKAGES =+ "${PN}-ralink \
${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 \
${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \
- ${PN}-iwlwifi-license ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2b-6 ${PN}-iwlwifi-7260-7 \
- ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-135-6"
-
+ ${PN}-iwlwifi-license ${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-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9 \
+ ${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9 \
+ "
FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
@@ -208,18 +214,40 @@ RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin"
+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-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
-
-FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
+RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-9 = "${PN}-iwlwifi-license"
+
+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-135-6 = "/lib/firmware/iwlwifi-135-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-7 = "/lib/firmware/iwlwifi-7260-7.ucode"
+FILES_${PN}-iwlwifi-7260-8 = "/lib/firmware/iwlwifi-7260-8.ucode"
+FILES_${PN}-iwlwifi-7260-9 = "/lib/firmware/iwlwifi-7260-9.ucode"
+FILES_${PN}-iwlwifi-7265-8 = "/lib/firmware/iwlwifi-7265-8.ucode"
+FILES_${PN}-iwlwifi-7265-9 = "/lib/firmware/iwlwifi-7265-9.ucode"
FILES_${PN} += "/lib/firmware/*"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb
deleted file mode 100644
index 9ac70af942..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.14.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-KORG_ARCHIVE_COMPRESSION = "xz"
-
-require linux-libc-headers.inc
-
-SRC_URI[md5sum] = "b621207b3f6ecbb67db18b13258f8ea8"
-SRC_URI[sha256sum] = "61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa"
-
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb
new file mode 100644
index 0000000000..7332597332
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.17.7.bb
@@ -0,0 +1,7 @@
+KORG_ARCHIVE_COMPRESSION = "xz"
+
+require linux-libc-headers.inc
+
+SRC_URI[md5sum] = "59cc7d0a236b08de743d6d9421f0f2c6"
+SRC_URI[sha256sum] = "a3c8e6aee912bfd2e69abf9df5a06058434a8771bcaa1784b5980bf1b5298e1c"
+
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
new file mode 100644
index 0000000000..e36de1b812
--- /dev/null
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Linux kernel Development Source"
+DESCRIPTION = "Development source linux kernel. When built, this recipe packages the \
+source of the preferred virtual/kernel provider and makes it available for full kernel \
+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
+
+# Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
+inherit module-base
+
+# We need the kernel to be staged (unpacked, patched and configured) before
+# we can grab the source and make the source package. We also need the bits from
+# ${B} not to change while we install, so virtual/kernel must finish do_compile.
+do_install[depends] += "virtual/kernel:do_shared_workdir"
+# Need the source, not just the output of populate_sysroot
+do_install[depends] += "virtual/kernel:do_compile"
+
+# There's nothing to do here, except install the source where we can package it
+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"
+
+# Define where the kernel headers are installed on the target as well as where
+# they are staged.
+KERNEL_SRC_PATH = "/usr/src/kernel"
+S = "${STAGING_KERNEL_DIR}"
+B = "${STAGING_KERNEL_BUILDDIR}"
+
+KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+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
+}
+# 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"
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 5d29f5cc12..cc0e4e64a9 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -33,6 +33,10 @@ do_compile () {
:
}
+do_shared_workdir () {
+ :
+}
+
do_install() {
:
}
@@ -45,7 +49,6 @@ do_deploy() {
:
}
-do_bundle_initramfs[nostamp] = "1"
-addtask bundle_initramfs after do_compile
+addtask bundle_initramfs after do_install before do_deploy
addtask deploy after do_install
-
+addtask shared_workdir after do_compile before do_install
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 9b49eee876..00feadedd8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -23,7 +23,6 @@ python () {
}
KBRANCH = "standard/base"
-KBRANCH_DEFAULT = "${KBRANCH}"
KMETA = "meta"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
@@ -36,7 +35,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${K
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 ?= "3.14+"
+LINUX_VERSION ?= "3.17+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
index 65a74d3ec7..8acbd2e59b 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/preempt-rt/base"
+KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
+require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "c373b342af7bcbeda346df9598a5b1e9784d362f"
-SRCREV_machine_qemuppc ?= "767da5a30782cc1bc6522cef8aa5fd8130ecc06c"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+SRCREV_machine ?= "94a79d98e40b51466600fb3375ad2908c38dd192"
+SRCREV_machine_qemuppc ?= "c1dcbac7751652784f180fdb91f87bc37fba8c52"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
index 6d5096cd85..7dbf82c3e6 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/preempt-rt/base"
+KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
+require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "5c79217cdf1c16a3cacd28968e8c3e417e994c86"
-SRCREV_machine_qemuppc ?= "1ad208565754a1122df5500246f3142e2a3eff39"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+SRCREV_machine ?= "7f0712d10247ffca8e48e944f49707bcf9117ead"
+SRCREV_machine_qemuppc ?= "8bed2a975d491c963cff56496f7e35f5bcff926f"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-LINUX_VERSION ?= "3.14.5"
+LINUX_VERSION ?= "3.14.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
deleted file mode 100644
index e01ffeec7a..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.4.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH = "standard/preempt-rt/base"
-KBRANCH_qemuppc = "standard/preempt-rt/qemuppc"
-
-LINUX_VERSION ?= "3.4.91"
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-KMETA = "meta"
-
-SRCREV_machine ?= "5993b0a650d24f810edb22bab577287d0c6d4f4b"
-SRCREV_machine_qemuppc ?= "765d61e4883bb6db3be516722465f2e8d1fc73cd"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-PR = "${INC_PR}.1"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-# Omit broken machines from COMPATIBLE_MACHINE
-# qemuppc hangs at boot
-# qemumips panics at boot
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm)"
-
-# Functionality flags
-KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc"
-KERNEL_FEATURES_append_qemux86-64 = " cfg/sound.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
index b70d7bc081..9ea81b8874 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
@@ -1,16 +1,16 @@
+KBRANCH ?= "standard/tiny/base"
+
require recipes-kernel/linux/linux-yocto.inc
-KBRANCH_DEFAULT = "standard/tiny/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
KMETA = "meta"
-SRCREV_machine ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+SRCREV_machine ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
index 7eb90a6929..67bf4624f8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
@@ -1,15 +1,15 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH = "standard/tiny/base"
+KBRANCH ?= "standard/tiny/base"
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
-LINUX_VERSION ?= "3.14.5"
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "3.14.24"
KMETA = "meta"
-SRCREV_machine ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+SRCREV_machine ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
new file mode 100644
index 0000000000..1a4f9a8145
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
@@ -0,0 +1,21 @@
+KBRANCH ?= "standard/tiny/base"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "3.17.6"
+
+KMETA = "meta"
+
+SRCREV_machine ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_meta ?= "b81030f9ec2de3dc6c048e142dcbff62e305cc40"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+
+COMPATIBLE_MACHINE = "(qemux86)"
+
+# Functionality flags
+KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb
deleted file mode 100644
index fd5c9f7696..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.4.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-# We need lzma (as CONFIG_KERNEL_LZMA=y)
-DEPENDS += "xz-native"
-
-KBRANCH_DEFAULT = "standard/tiny/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-LINUX_VERSION ?= "3.4.91"
-
-KMETA = "meta"
-
-SRCREV_machine ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-PR = "${INC_PR}.1"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-COMPATIBLE_MACHINE = "(qemux86)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 4ed318886f..7416af99f5 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
INC_PR = "r4"
DEPENDS += "xz-native bc-native"
+DEPENDS_append_aarch64 = " libgcc"
+KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
# 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,
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.10.bb b/meta/recipes-kernel/linux/linux-yocto_3.10.bb
index 57395b4ebb..978775a7d3 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.10.bb
@@ -1,28 +1,27 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/base"
-KBRANCH_DEFAULT = "standard/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
+require recipes-kernel/linux/linux-yocto.inc
# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "db489eed7f5c86037358cc9d0fefa7b90dbbaa86"
-SRCREV_machine_qemumips ?= "780aac11b3f20ed2f5df3f173b0d02b28a6eb96b"
-SRCREV_machine_qemuppc ?= "48a9dec5fc4cc9c19d12866c6ec560a83df21d85"
-SRCREV_machine_qemux86 ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_machine_qemux86-64 ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_machine_qemumips64 ?= "d4b0d6f727167d7946e03dbfb50fef0891207bd1"
-SRCREV_machine ?= "aa677a2d02677ec92d59a8c36d001cf2f5cf3260"
-SRCREV_meta ?= "199943142f7e0a283240246ee6c02f4376b315f0"
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc/base"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "f6b075991c91b7c2bb641b389757863e2fd34b8c"
+SRCREV_machine_qemumips ?= "48afdc632312b6cc26fe7bca151cfb66b2ebc308"
+SRCREV_machine_qemuppc ?= "cf35ea9ac92153858dadd2f4ab71cccd3a1fa26b"
+SRCREV_machine_qemux86 ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_machine_qemux86-64 ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_machine_qemumips64 ?= "ebdb374ca5130ef456d0baf75b6fe7a242932d0d"
+SRCREV_machine ?= "b2ac933df119a3444a32fcccf5e4ad453f5ac89d"
+SRCREV_meta ?= "f4ab00d96a3d8e443d7f7744ad996e184eac03b5"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-LINUX_VERSION ?= "3.10.43"
+LINUX_VERSION ?= "3.10.62"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
index 1bdf520a92..5f0a09e973 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
@@ -1,33 +1,35 @@
-require recipes-kernel/linux/linux-yocto.inc
+KBRANCH ?= "standard/base"
-KBRANCH = "standard/base"
+require recipes-kernel/linux/linux-yocto.inc
# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "2489f1f4d7aa27bf0808d7fa80a50399c643516d"
-SRCREV_machine_qemumips ?= "63b4ca3223d9481baa77f527f50d906d15747141"
-SRCREV_machine_qemuppc ?= "e5dfe8f89b45effe445d04e0f9b391948eb108ae"
-SRCREV_machine_qemux86 ?= "41d5fe27dc3d3e769cb6af01770cac3d75a91e1a"
-SRCREV_machine_qemux86-64 ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_machine_qemumips64 ?= "103df748c6e83d5874a8385592f758feeb818324"
-SRCREV_machine ?= "96930820e0cb6d4b31d5e0c8f3174805f4a868b3"
-SRCREV_meta ?= "602be954ac45e8aea06cb93d6766bbf83c242090"
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc/base"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "6166316d47b859aa38bfecc61f4808828af03937"
+SRCREV_machine_qemuarm64 ?= "902f34d36102a4b2008b776ecae686f80d307e12"
+SRCREV_machine_qemumips ?= "4ececcc09c6550a0896728163907e729d817c2fd"
+SRCREV_machine_qemuppc ?= "1cc5b09f8bb7f40b289d149d370c62dcc8109501"
+SRCREV_machine_qemux86 ?= "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
+SRCREV_machine_qemux86-64 ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_machine_qemumips64 ?= "737272b1dfd361d9ea19812a9717e2798e3c4576"
+SRCREV_machine ?= "02120556b0ebc20c30374ccf211e8e4ceac2bb1c"
+SRCREV_meta ?= "a227f20eff056e511d504b2e490f3774ab260d6f"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-LINUX_VERSION ?= "3.14.5"
+LINUX_VERSION ?= "3.14.24"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "meta"
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.17.bb b/meta/recipes-kernel/linux/linux-yocto_3.17.bb
new file mode 100644
index 0000000000..973d8aaa84
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_3.17.bb
@@ -0,0 +1,39 @@
+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/common-pc"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "a1183153c56ace9f9140c73ce730ec181f78dc0f"
+SRCREV_machine_qemuarm64 ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
+SRCREV_machine_qemumips ?= "18c8db2009f25524a29a5258d041e0442c10817d"
+SRCREV_machine_qemuppc ?= "6d2bbdac0e6560542fa2252d91eee9ae0f17f9c7"
+SRCREV_machine_qemux86 ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_machine_qemux86-64 ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_machine_qemumips64 ?= "2306cb2dd019c8b731879331ba314035a7271e7b"
+SRCREV_machine ?= "5ff54d8fbf74278e9e5074cbba516a14f0915ff7"
+SRCREV_meta ?= "b81030f9ec2de3dc6c048e142dcbff62e305cc40"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+
+LINUX_VERSION ?= "3.17.6"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "meta"
+
+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_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_3.4.bb b/meta/recipes-kernel/linux/linux-yocto_3.4.bb
deleted file mode 100644
index 1eabf764ef..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_3.4.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require recipes-kernel/linux/linux-yocto.inc
-
-KBRANCH_DEFAULT = "standard/base"
-KBRANCH = "${KBRANCH_DEFAULT}"
-
-# board specific branches
-KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
-KBRANCH_qemumips = "standard/mti-malta32"
-KBRANCH_qemuppc = "standard/qemuppc"
-KBRANCH_qemux86 = "standard/common-pc/base"
-KBRANCH_qemux86-64 = "standard/common-pc-64/base"
-KBRANCH_qemumips64 = "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "192b56b2f529af1be014ea85667c9f3fea0afd53"
-SRCREV_machine_qemumips ?= "58fb8b8fb2f9911cac84cd840d63c8a58bada6ca"
-SRCREV_machine_qemuppc ?= "4fe50989bc8bcb3564ca37c2cffd42ac176b428d"
-SRCREV_machine_qemux86 ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_machine_qemux86-64 ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_machine ?= "498189ccb98f833daa2092ceee72da8c878e0009"
-SRCREV_meta ?= "a8742041c8b9f447d4ad4c3f478e022f1e4bfcfd"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.4.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-
-LINUX_VERSION ?= "3.4.91"
-
-PR = "${INC_PR}.5"
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "meta"
-
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-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)}"
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
deleted file mode 100644
index 258eedd3ba..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: backport
-
-babeltrace: Fix support out of tree builds in babeltrace
-
-Signed-off-by: Lars Persson <larper@axis.com>
-
-diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am
-index c834699..2c6b0bd 100644
---- a/formats/lttng-live/Makefile.am
-+++ b/formats/lttng-live/Makefile.am
-@@ -1,4 +1,4 @@
--AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
-+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
-
- lib_LTLIBRARIES = libbabeltrace-lttng-live.la
-
-
diff --git a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
deleted file mode 100644
index 8e81d2d781..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
-Date: Fri, 16 May 2014 10:10:38 +0800
-Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-The buffers from objstack_alloc will store pointers, so they must
-be aligned on a pointer's size, or else it will cause issues on the
-CPUs which do not support unaligned addresses access.
-
-Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
----
- formats/ctf/metadata/objstack.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c
-index 9e264a4..14d9252 100644
---- a/formats/ctf/metadata/objstack.c
-+++ b/formats/ctf/metadata/objstack.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <babeltrace/list.h>
- #include <babeltrace/babeltrace-internal.h>
-+#include <babeltrace/align.h>
-
- #define OBJSTACK_INIT_LEN 128
- #define OBJSTACK_POISON 0xcc
-@@ -39,7 +40,7 @@ struct objstack_node {
- struct bt_list_head node;
- size_t len;
- size_t used_len;
-- char data[];
-+ char __attribute__ ((aligned (sizeof(void *)))) data[];
- };
-
- BT_HIDDEN
-@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len)
- struct objstack_node *last_node;
- void *p;
-
-+ len = ALIGN(len, sizeof(void *));
-+
- /* Get last node */
- last_node = bt_list_entry(objstack->head.prev,
- struct objstack_node, node);
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
index a8ea4cb213..f616146393 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
@@ -8,15 +8,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
inherit autotools pkgconfig
-DEPENDS = "glib-2.0 util-linux popt"
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79"
-PV = "1.2.1+git${SRCPV}"
+SRCREV = "90395824efc007de88787a6b8e400a07c980be1c"
+PV = "1.2.4+git${SRCPV}"
-SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
- file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \
- file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \
-"
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
new file mode 100644
index 0000000000..9c3dc9c1e1
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
@@ -0,0 +1,130 @@
+Upstream-Status: Backport
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Fri, 25 Jul 2014 12:30:43 -0400
+Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event
+ length
+
+A noargs probe could have event fields. noargs just means that the probe
+does not receive any argument as parameter. However, it could very well
+serialize data into fields (global variables, constants, etc).
+
+It just happens that LTTng does not serialize any data in noargs events
+at the moment, but this may very well change.
+
+The if (0) with (void) variable access strategy to stop compiler from
+complaining from unused variables does not seem to work as expected with
+gcc 4.9.1. Use "unused" attribute instead.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 35 insertions(+), 14 deletions(-)
+
+diff --git a/probes/lttng-events.h b/probes/lttng-events.h
+index 596b70608584..ba9563b15cf9 100644
+--- a/probes/lttng-events.h
++++ b/probes/lttng-events.h
+@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
+ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
+ { \
+ size_t __event_len = 0; \
+- unsigned int __dynamic_len_idx = 0; \
++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
++ \
++ _tstruct \
++ return __event_len; \
++}
++
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
++static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \
++{ \
++ size_t __event_len = 0; \
++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
+ \
+- if (0) \
+- (void) __dynamic_len_idx; /* don't warn if unused */ \
+ _tstruct \
+ return __event_len; \
+ }
+@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \
+ return __event_align; \
+ }
+
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
++static inline size_t __event_get_align__##_name(void) \
++{ \
++ size_t __event_align = 1; \
++ _tstruct \
++ return __event_align; \
++}
++
+ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
+
+@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \
+ #undef TP_STRUCT__entry
+ #define TP_STRUCT__entry(args...) args
+
+-#undef DECLARE_EVENT_CLASS
+-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
++#undef DECLARE_EVENT_CLASS_NOARGS
++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
+ struct __event_typemap__##_name { \
+ _tstruct \
+ };
+
++#undef DECLARE_EVENT_CLASS
++#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
++ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print)
++
+ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
+
+
+@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \
+ struct lttng_channel *__chan = __event->chan; \
+ struct lib_ring_buffer_ctx __ctx; \
+ size_t __event_len, __event_align; \
+- size_t __dynamic_len_idx = 0; \
+- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \
+- struct __event_typemap__##_name __typemap; \
++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
++ struct __event_typemap__##_name __typemap __attribute__((unused)); \
+ int __ret; \
+ \
+- if (0) { \
+- (void) __dynamic_len_idx; /* don't warn if unused */ \
+- (void) __typemap; /* don't warn if unused */ \
+- } \
+ if (!_TP_SESSION_CHECK(session, __chan->session)) \
+ return; \
+ if (unlikely(!ACCESS_ONCE(__chan->session->active))) \
+@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \
+ struct lttng_channel *__chan = __event->chan; \
+ struct lib_ring_buffer_ctx __ctx; \
+ size_t __event_len, __event_align; \
++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
++ struct __event_typemap__##_name __typemap __attribute__((unused)); \
+ int __ret; \
+ \
+ if (!_TP_SESSION_CHECK(session, __chan->session)) \
+@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \
+ return; \
+ if (unlikely(!ACCESS_ONCE(__event->enabled))) \
+ return; \
+- __event_len = 0; \
+- __event_align = 1; \
++ __event_len = __event_get_size__##_name(__dynamic_len); \
++ __event_align = __event_get_align__##_name(); \
+ lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
+ __event_align, -1); \
+ __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
+--
+1.8.1.2
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
new file mode 100644
index 0000000000..3541b50b79
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Backport
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 21 Aug 2014 11:15:50 -0400
+Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+index 2354884074eb..3c299c58a1cf 100644
+--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
++++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
+@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn,
+ tp_memcpy(insn,
+ vcpu->arch.emulate_ctxt.decode.fetch.data,
+ 15)
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
+ tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start)
+ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
+ tp_assign(len, vcpu->arch.emulate_ctxt._eip
+@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn,
+ tp_memcpy(insn,
+ vcpu->arch.emulate_ctxt.fetch.data,
+ 15)
++#else
++ tp_assign(rip, vcpu->arch.emulate_ctxt._eip -
++ (vcpu->arch.emulate_ctxt.fetch.ptr -
++ vcpu->arch.emulate_ctxt.fetch.data))
++ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
++ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr -
++ vcpu->arch.emulate_ctxt.fetch.data)
++ tp_memcpy(insn,
++ vcpu->arch.emulate_ctxt.fetch.data,
++ 15)
+ #endif
+ tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
+ tp_assign(failed, failed)
+--
+1.8.1.2
+
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb b/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
deleted file mode 100644
index 81a3983c64..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb
+++ /dev/null
@@ -1,36 +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"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
- file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
- file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
-
-DEPENDS = "virtual/kernel"
-
-inherit module
-
-SRCREV = "eef112db0e63feff6cbf0a98cda9af607cefb377"
-PV = "2.3.3"
-
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.3 \
- file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
- file://bio-bvec-iter.patch \
- "
-
-export INSTALL_MOD_DIR="kernel/lttng-modules"
-export KERNEL_SRC="${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-modules_2.4.1.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb
index 5e05ffc698..6ec83d090a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.4.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.2.bb
@@ -1,23 +1,24 @@
SECTION = "devel"
SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
-LICENSE = "LGPLv2.1 & GPLv2"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
DEPENDS = "virtual/kernel"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
inherit module
-SRCREV = "a0383def517e3aebbbcebae61fe2bcfb50d31e71"
-PV = "2.4.1"
+SRCREV = "16d7431c3a78605ea598dbd3f081a2b1a8463f23"
-# lttng currently blacklists arm with gcc-4.8
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux'
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.4 \
+SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
+ file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
+ file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
"
export INSTALL_MOD_DIR="kernel/lttng-modules"
diff --git a/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch b/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch
deleted file mode 100644
index 2c1756e6ed..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/Fix-alignment-problems-on-targets-not-supporting-una.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 9dc4d3a8dcc7cfb6991e760e78f614afd593bf66 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
-Date: Tue, 1 Apr 2014 17:46:23 +0200
-Subject: [PATCH v2] Fix: alignment problems on targets not supporting unaligned
- access.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Submitted (https://www.mail-archive.com/lttng-dev@lists.lttng.org/msg06012.html)
-
-Accessing floats, doubles and 64 bit int at unaligned addresses is not
-supported on all configurations of arm processors and if it is it's
-emulated and slow. This patch replaces direct assignments with memcpy.
-
-Signed-off-by: Fredrik Markström <fredrik.markstrom@gmail.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-index 762d604..8c6dc96 100644
---- a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-+++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c
-@@ -222,7 +222,7 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node)
- if (!insn)
- return -ENOMEM;
- insn->op = FILTER_OP_LOAD_S64;
-- *(int64_t *) insn->data = node->u.load.u.num;
-+ memcpy(insn->data, &node->u.load.u.num, sizeof(int64_t));
- ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len);
- free(insn);
- return ret;
-@@ -237,7 +237,7 @@ int visit_node_load(struct filter_parser_ctx *ctx, struct ir_op *node)
- if (!insn)
- return -ENOMEM;
- insn->op = FILTER_OP_LOAD_DOUBLE;
-- *(double *) insn->data = node->u.load.u.flt;
-+ memcpy(insn->data, &node->u.load.u.flt, sizeof(double));
- ret = bytecode_push(&ctx->bytecode, insn, 1, insn_len);
- free(insn);
- return ret;
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb b/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb
deleted file mode 100644
index db8b65b2e7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools_2.3.1.bb
+++ /dev/null
@@ -1,60 +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 lttng-ust"
-RDEPENDS_${PN}-ptest += "make"
-
-SRCREV = "5d985544a7ad54afa0514ea7f522a89d8d844860"
-PV = "v2.3.1"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.3 \
- file://runtest.patch \
- file://run-ptest \
- file://Fix-alignment-problems-on-targets-not-supporting-una.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest
-
-export KERNELDIR="${STAGING_KERNEL_DIR}"
-
-FILES_${PN} += "${libdir}/lttng/libexec/*"
-FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug"
-
-# Since files are installed into ${libdir}/lttng/libexec we match
-# the libexec insane test so skip it.
-INSANE_SKIP_${PN} = "libexec"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-
-do_install_ptest () {
- chmod +x ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
- for i in `find ${D}/${libdir}/${PN}/ptest -perm /u+x -type f`; do
- sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -i $i
- done
-
- sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
- -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/regression/run-report.py
- sed -e "s:src/bin:bin:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
-
-}
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb
deleted file mode 100644
index aab9bf6bbf..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools_2.4.0.bb
+++ /dev/null
@@ -1,60 +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 lttng-ust"
-RDEPENDS_${PN}-ptest += "make"
-
-SRCREV = "8e3234eea2d81f8a962214c570532f8e096a9a8d"
-PV = "v2.4.0"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.4 \
- file://runtest-2.4.0.patch \
- file://run-ptest \
- file://Fix-alignment-problems-on-targets-not-supporting-una.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest
-
-export KERNELDIR="${STAGING_KERNEL_DIR}"
-
-FILES_${PN} += "${libdir}/lttng/libexec/*"
-FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug"
-
-# Since files are installed into ${libdir}/lttng/libexec we match
-# the libexec insane test so skip it.
-INSANE_SKIP_${PN} = "libexec"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-
-do_install_ptest () {
- chmod +x ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
- for i in `find ${D}/${libdir}/${PN}/ptest -perm /u+x -type f`; do
- sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -i $i
- done
-
- sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
- -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/regression/run-report.py
- sed -e "s:src/bin:bin:g" \
- -i ${D}/${libdir}/${PN}/ptest/tests/utils/utils.sh
-
-}
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb b/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb
new file mode 100644
index 0000000000..87052ebb8e
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.5.3.bb
@@ -0,0 +1,76 @@
+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 lttng-ust libxml2"
+RDEPENDS_${PN}-ptest += "make perl bash"
+
+SRCREV = "75d966798cf8cbe8ca12773c2bf2822983bd78a3"
+
+PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+ am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
+"
+PACKAGECONFIG ??= "lttng-ust"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
+PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust"
+
+SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \
+ file://runtest-2.4.0.patch \
+ file://run-ptest \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep ptest pkgconfig
+
+export KERNELDIR="${STAGING_KERNEL_DIR}"
+
+FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
+ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \
+ ${libdir}/python2.7/site-packages/.debug"
+FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
+FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.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}/config/libxml.m4
+}
+
+do_install_ptest () {
+ chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
+ for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
+ sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+ -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+ -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
+ -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+ -i $i
+ done
+
+ sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
+ -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
+ -i ${D}${PTEST_PATH}/tests/regression/run-report.py
+ sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
+ -i ${D}${PTEST_PATH}/tests/utils/utils.sh
+ sed -e "s:ini_config:\.libs\/ini_config:" \
+ -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
+}
diff --git a/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
new file mode 100644
index 0000000000..cec5410369
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
@@ -0,0 +1,19 @@
+lttng-ust: add aarch64 recognition
+
+Treat the same as "arm".
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -230,6 +230,7 @@ changequote([,])dnl
+ s390) NO_UNALIGNED_ACCESS=1 ;;
+ s390x) NO_UNALIGNED_ACCESS=1 ;;
+ arm*) NO_UNALIGNED_ACCESS=1 ;;
++ aarch64) NO_UNALIGNED_ACCESS=1 ;;
+ mips*) NO_UNALIGNED_ACCESS=1 ;;
+ tile*) NO_UNALIGNED_ACCESS=1 ;;
+ *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;;
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb b/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb
deleted file mode 100644
index 44e3e2bc9c..0000000000
--- a/meta/recipes-kernel/lttng/lttng-ust_2.3.1.bb
+++ /dev/null
@@ -1,32 +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+ & BSD & 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} = "python"
-
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "lttng2-ust"
-RREPLACES_${PN} = "lttng2-ust"
-RCONFLICTS_${PN} = "lttng2-ust"
-
-SRCREV = "535d0408caee93577c2b4d8ad3cd672fa97eac1d"
-PV = "2.3.1"
-PE = "2"
-
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.3 \
- "
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- ( cd ${S}; ${S}/bootstrap )
-}
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb
index 1629554b09..eda52bb81f 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.4.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.5.2.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library t
HOMEPAGE = "http://lttng.org/ust"
BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
-LICENSE = "LGPLv2.1+ & BSD & GPLv2"
+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"
@@ -11,18 +11,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
inherit autotools lib_package
DEPENDS = "liburcu util-linux"
+RDEPENDS_${PN}-bin = "python-core"
# For backwards compatibility after rename
RPROVIDES_${PN} = "lttng2-ust"
RREPLACES_${PN} = "lttng2-ust"
RCONFLICTS_${PN} = "lttng2-ust"
-SRCREV = "5ba5bf7fba804d2de773ae1c71106a8ed856c56a"
-PV = "2.4.0"
+SRCREV = "85d1d2791f3cebfd741a821261bf2924928a90e7"
PE = "2"
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.4 \
+SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \
file://lttng-ust-doc-examples-disable.patch \
+ file://add-aarch64.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 125f5fb073..db670cfbb4 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -4,8 +4,11 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
SRC_URI = "file://modutils.sh \
file://PD.patch"
+
PR = "r7"
+S = "${WORKDIR}"
+
INITSCRIPT_NAME = "modutils.sh"
INITSCRIPT_PARAMS = "start 05 S ."
@@ -18,3 +21,13 @@ do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
+
+DEPENDS_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
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask modutils.service
+ fi
+}
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index 76d0b6cbe5..49e6b16c1c 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -18,15 +18,16 @@ 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 = "file://opstart.patch \
+SRC_URI = "file://filemode-fix.patch \
file://acinclude.m4 \
+ file://automake-foreign.patch \
file://oprofile-cross-compile-tests.patch \
file://run-ptest \
file://root-home-dir.patch"
-inherit autotools-brokensep pkgconfig ptest
+inherit autotools pkgconfig ptest
-EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x"
+EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x ac_cv_prog_XSLTPROC="
do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
autotools_do_configure
@@ -39,7 +40,6 @@ do_compile_ptest() {
do_install_ptest() {
subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
- cd ${S}
for tooltest in ${subdirs}
do
find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
@@ -53,6 +53,6 @@ do_install_ptest() {
cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
# needed by litutil++ file_manip_tests
- cp libutil++/tests/file_manip_tests.cpp \
+ 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-AArch64-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
deleted file mode 100644
index a2385cd2b2..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-Date: Tue, 15 Jan 2013 07:37:33 +0100
-Subject: [PATCH] Add rmb() definition for AArch64 architecture
-
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-Status: backport
----
- 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 815d51d..2df00b7 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -148,6 +148,11 @@ void op_release_resources(void);
- #define cpu_relax() asm volatile("":::"memory")
- #endif
-
-+#ifdef __aarch64__
-+#define rmb() asm volatile("dmb ld" ::: "memory")
-+#define cpu_relax() asm volatile("yield" ::: "memory")
-+#endif
-+
- #ifdef __mips__
- #include <asm/unistd.h>
- #define rmb() asm volatile( \
---
-1.8.0
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
deleted file mode 100644
index 93c62400cf..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-Upstream-Status: Backport
-
-From 63b5692aace5ff6022f892822b4bfdc51ed25bfb Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Fri, 2 May 2014 07:54:08 -0500
-Subject: [PATCH] Tidy powerpc64 bfd target check
-
-Testing for a bfd_target vector might (will!) break. See
-https://sourceware.org/ml/binutils/2014-04/msg00283.html
-
-It's safer to ask BFD for the target name. I left the direct target
-vector checks in configure tests, and updated them, even though the
-target vector is no longer used in oprofile code, because a run-time
-configure test for powerpc64 support in bfd:
- #include <bfd.h>
- int main(void)
- { return !bfd_find_target("elf64-powerpc", (void *)0); }
-unfortunately isn't possible when cross-compiling.
-
-The bfd_target vector tests could be omitted if we aren't bothered by
-the small runtime overhead of a strncmp on targets other than
-powerpc64.
-
- * libutil++/bfd_support.cpp (get_synth_symbols): Don't check for
- ppc64 target vector, use bfd_get_target to return the target
- name instead.
- * m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to
- use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or
- bfd_elf64_powerpc_vec.
-
-Signed-off-by: Alan Modra <amodra@gmail.com>
----
- libutil++/bfd_support.cpp | 10 +++++++--
- m4/binutils.m4 | 50 ++++++++++++++++++++++-----------------------
- 2 files changed, 33 insertions(+), 27 deletions(-)
-
-Index: oprofile-0.9.9/libutil++/bfd_support.cpp
-===================================================================
---- oprofile-0.9.9.orig/libutil++/bfd_support.cpp 2013-07-29 08:55:06.000000000 -0700
-+++ oprofile-0.9.9/libutil++/bfd_support.cpp 2014-05-02 09:12:05.761146347 -0700
-@@ -633,10 +633,16 @@
-
- bool bfd_info::get_synth_symbols()
- {
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec)
-- || (abfd->xvec == &bfd_elf64_powerpcle_vec);
-+ const char* targname = bfd_get_target(abfd);
-+ // Match elf64-powerpc and elf64-powerpc-freebsd, but not
-+ // elf64-powerpcle. elf64-powerpcle is a different ABI without
-+ // function descriptors, so we don't need the synthetic
-+ // symbols to have function code marked by a symbol.
-+ bool is_elf64_powerpc_target = (!strncmp(targname, "elf64-powerpc", 13)
-+ && (targname[13] == 0
-+ || targname[13] == '-'));
-+
-+
-
- if (!is_elf64_powerpc_target)
- return false;
-Index: oprofile-0.9.9/m4/binutils.m4
-===================================================================
---- oprofile-0.9.9.orig/m4/binutils.m4 2013-07-29 08:55:07.000000000 -0700
-+++ oprofile-0.9.9/m4/binutils.m4 2014-05-02 09:07:32.471148147 -0700
-@@ -22,32 +22,32 @@
-
- AC_LANG_PUSH(C)
- # Determine if bfd_get_synthetic_symtab macro is available
--OS="`uname`"
--if test "$OS" = "Linux"; then
-- AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-- rm -f test-for-synth
-- AC_LANG_CONFTEST(
-- [AC_LANG_PROGRAM([[#include <bfd.h>]],
-- [[asymbol * synthsyms; bfd * ibfd = 0;
-- long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- char * ppc_name = bfd_elf64_powerpc_vec.name;
-- char * ppcle_name = bfd_elf64_powerpcle_vec.name;
-- printf("%s %s\n", ppc_name, ppcle_name);]])
-- ])
-- $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS -o test-for-synth > /dev/null 2>&1
-- if test -f test-for-synth; then
-- echo "yes"
-- SYNTHESIZE_SYMBOLS='1'
-- else
-- echo "no"
-- SYNTHESIZE_SYMBOLS='0'
-- fi
-- AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-- rm -f test-for-synth*
-+AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target powerpc_elf64_vec;
-+ char *ppc_name = powerpc_elf64_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=2],
-+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target bfd_elf64_powerpc_vec;
-+ char *ppc_name = bfd_elf64_powerpc_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=1],
-+ [AC_MSG_RESULT([no])
-+ SYNTHESIZE_SYMBOLS=0])
-+ ])
-+AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-
--fi
- AC_LANG_POP(C)
- ]
- )
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
new file mode 100644
index 0000000000..b9bb6c5779
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
@@ -0,0 +1,12 @@
+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/filemode-fix.patch b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
new file mode 100644
index 0000000000..f7ebe24691
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
@@ -0,0 +1,41 @@
+With security_flags.inc:
+
+| In file included from /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/fcntl.h:302:0,
+| from opjitconv.c:25:
+| In function 'open',
+| inlined from 'copy_dumpfile' at opjitconv.c:219:6:
+| /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
+| __open_missing_mode ();
+| ^
+| Makefile:440: recipe for target 'opjitconv.o' failed
+
+Why does this only happen on mips? mips has:
+
+O_CREAT = 0x100
+and
+S_IRUSR = 0400
+
+and these (in hex and otcal) are equivalent. Most other platforms
+have O_CREAT = 0100.
+
+http://sourceforge.net/p/oprofile/oprofile/ci/4598ca73b0a367ca46d4a2843261e20e1896773b
+
+The file should not be created, only opened if its present, therefore use O_RDONLY instead.
+
+RP 2014/11/6
+
+Upstream-Status: Backport
+
+Index: oprofile-1.0.0/opjitconv/opjitconv.c
+===================================================================
+--- oprofile-1.0.0.orig/opjitconv/opjitconv.c 2014-09-12 14:39:47.000000000 +0000
++++ oprofile-1.0.0/opjitconv/opjitconv.c 2014-11-06 13:14:25.941639003 +0000
+@@ -216,7 +216,7 @@
+ int file_locked = 0;
+ unsigned int usecs_waited = 0;
+ int rc = OP_JIT_CONV_OK;
+- int fd = open(dumpfile, S_IRUSR);
++ int fd = open(dumpfile, O_RDONLY);
+ if (fd < 0) {
+ perror("opjitconv failed to open JIT dumpfile");
+ return OP_JIT_CONV_FAIL;
diff --git a/meta/recipes-kernel/oprofile/oprofile/opstart.patch b/meta/recipes-kernel/oprofile/oprofile/opstart.patch
deleted file mode 100644
index 8696f4ef4d..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/opstart.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-Upstream-Status: Pending
-
-The patch gives a low overhead way of starting/stopping oprofile which
-doesn't involve script exection.
-
-(written by RP in OpenedHand days)
-
-diff --git a/utils/Makefile.am b/utils/Makefile.am
-index d34b060..dff15f9 100644
---- oprofile.orig/utils/Makefile.am
-+++ oprofile/utils/Makefile.am
-@@ -7,7 +7,7 @@ AM_LDFLAGS = @OP_LDFLAGS@
-
- LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
-
--bin_PROGRAMS = ophelp op-check-perfevents
-+bin_PROGRAMS = ophelp op-check-perfevents opstart
- dist_bin_SCRIPTS = opcontrol
-
- op_check_perfevents_SOURCES = op_perf_events_checker.c
-@@ -15,3 +15,10 @@ op_check_perfevents_CPPFLAGS = ${AM_CFLAGS} @PERF_EVENT_FLAGS@
-
- ophelp_SOURCES = ophelp.c
- ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
-+
-+opstart_SOURCES = opstart.c
-+
-+install-exec-local:
-+ cd $(DESTDIR)/$(bindir) && \
-+ rm -f opstop && \
-+ $(LN_S) opstart opstop
-Index: oprofile/utils/opstart.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,110 @@
-+/**
-+ * @file opstart.c
-+ * Start/Stop oprofile
-+ *
-+ * @remark Copyright 2007 Openedhand Ltd.
-+ * @remark Read the file COPYING
-+ *
-+ * @author Richard Purdie
-+ */
-+
-+#include <signal.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
-+int main(const int argc, const char* argv[])
-+{
-+ const char *enable = "/dev/oprofile/enable";
-+ const char *lockfile;
-+ unsigned long dpid;
-+ struct stat sbuf;
-+ FILE *lfile, *efile;
-+ int sig, enb, err;
-+
-+ if (argc >= 2) {
-+ printf("Error: Invalid options.\n");
-+ return 1;
-+ }
-+
-+ lockfile = getenv("LOCK_FILE");
-+ if (!lockfile)
-+ lockfile = "/var/lib/oprofile/lock";
-+
-+ /* Add SESSION_DIR support? */
-+
-+ if (geteuid()) {
-+ printf("Error: This program must be run as root.\n");
-+ return 1;
-+ }
-+
-+ if (stat(enable, &sbuf)) {
-+ printf("Error: Could not find /dev/oprofile/enable, the"
-+ " kernel module probably isn't loaded.\n");
-+ printf("This binary only works with 2.6 kernels and oprofile"
-+ " must have been initialised with 'opcontrol --start-daemon'.\n");
-+ return 1;
-+ }
-+
-+ if (stat(lockfile, &sbuf)) {
-+ printf("Error: Could not find lockfile %s.\n", lockfile);
-+ printf("The oprofile daemon must be running (oprofile must"
-+ " have been initialised with 'opcontrol --start-daemon').\n");
-+ return 1;
-+ }
-+
-+ lfile = fopen(lockfile, "r");
-+ if (!lfile) {
-+ printf("Error opening lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+
-+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
-+ if (err != 1) {
-+ printf("Error reading pid from lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+ fclose(lfile);
-+
-+ efile = fopen(enable, "r");
-+ if (!efile) {
-+ printf("Error opening %s.\n", enable);
-+ return 1;
-+ }
-+
-+ if (strstr(argv[0], "opstart")) {
-+ printf("Starting Profiler\n");
-+ sig = SIGUSR1;
-+ enb = 1;
-+ } else if (strstr(argv[0], "opstop")) {
-+ printf("Stopping Oprofile.\n");
-+ printf("You need to run 'opcontrol --dump' when the session"
-+ " is finished.\n");
-+ sig = SIGUSR2;
-+ enb = 0;
-+ } else {
-+ printf("Error: Please call as 'opstart' or 'opstop'\n");
-+ return 1;
-+ }
-+
-+ err = kill(dpid, 0);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ fprintf(efile, "%d\n", enb);
-+ err = kill(dpid, sig);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-Index: oprofile/configure.ac
-===================================================================
---- oprofile.orig/configure.ac 2008-07-02 15:13:58.000000000 +0100
-+++ oprofile/configure.ac 2008-07-02 15:17:37.000000000 +0100
-@@ -16,6 +16,7 @@
- AM_CONFIG_HEADER(config.h)
-
- AC_PROG_RANLIB
-+AC_PROG_LN_S
- AC_PROG_LIBTOOL
-
- dnl for the man page
-@@ -241,6 +242,8 @@
- doc/xsl/catalog-1.xml \
- doc/oprofile.1 \
- doc/opcontrol.1 \
-+ doc/opstart.1 \
-+ doc/opstop.1 \
- doc/ophelp.1 \
- doc/opreport.1 \
- doc/opannotate.1 \
-Index: oprofile/doc/Makefile.am
-===================================================================
---- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100
-+++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100
-@@ -11,6 +11,8 @@
- man_MANS = \
- oprofile.1 \
- opcontrol.1 \
-+ opstart.1 \
-+ opstop.1 \
- opreport.1 \
- opannotate.1 \
- opgprof.1 \
-Index: oprofile/doc/opstart.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,27 @@
-+.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstart \- start OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstart
-+.SH DESCRIPTION
-+.B opstart
-+is a simple optimised command to start profiling with 2.6 Linux kernels.
-+OProfile should have already been initialised by calling "opcontrol --start-daemon".
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstart.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
-Index: oprofile/doc/opstop.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,28 @@
-+.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstop \- stop OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstop
-+.SH DESCRIPTION
-+.B opstop
-+is a simple optimsed command to stop profiling with 2.6 Linux kernels.
-+You need to run "opcontrol --dump" before being able to view a profile
-+with opreport.
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstop.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
index 45cab7d3d8..20fc5e503b 100644
--- a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
@@ -1,7 +1,7 @@
oprofile: Determine the root home directory dynamically
This commit detects the root home directory dynamically with changes to
-the opcontrol script and the oprofile gui app source.
+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
@@ -12,109 +12,33 @@ Upstream-Status: inappropriate [OE specific]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/doc/opcontrol.1.in b/doc/opcontrol.1.in
-index c434704..f57eb76 100644
---- a/doc/opcontrol.1.in
-+++ b/doc/opcontrol.1.in
-@@ -171,7 +171,7 @@ No special environment variables are recognised by opcontrol.
-
- .SH FILES
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I /var/lib/oprofile/samples/
-diff --git a/doc/oprofile.1.in b/doc/oprofile.1.in
-index 3d0f0ed..5c623e1 100644
---- a/doc/oprofile.1.in
-+++ b/doc/oprofile.1.in
-@@ -150,7 +150,7 @@ No special environment variables are recognised by oprofile.
- .I $HOME/.oprofile/
- Configuration files
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I @prefix@/share/oprofile/
-diff --git a/doc/oprofile.html b/doc/oprofile.html
-index 128d9f7..d7e4dea 100644
---- a/doc/oprofile.html
-+++ b/doc/oprofile.html
-@@ -1394,7 +1394,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <code class="filename">/root/.oprofile/daemonrc</code>.
-+ saved in <code class="filename">~root/.oprofile/daemonrc</code>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
- </p>
-@@ -1430,7 +1430,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Start data collection with either arguments provided by <code class="option">--setup</code>
-- or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
-+ or information saved in <code class="filename">~root/.oprofile/daemonrc</code>. Specifying
- the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
- whilst it is running.
+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>
-diff --git a/doc/oprofile.xml b/doc/oprofile.xml
-index 6a17c6d..0968d76 100644
---- a/doc/oprofile.xml
-+++ b/doc/oprofile.xml
-@@ -568,7 +568,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--setup</option></term>
- <listitem><para>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <filename>/root/.oprofile/daemonrc</filename>.
-+ saved in <filename>~root/.oprofile/daemonrc</filename>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
- </para></listitem>
-@@ -592,7 +592,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--start</option></term>
- <listitem><para>
- Start data collection with either arguments provided by <option>--setup</option>
-- or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
-+ or information saved in <filename>~root/.oprofile/daemonrc</filename>. Specifying
- the addition <option>--verbose</option> makes the daemon generate lots of debug data
- whilst it is running.
+ </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>
-diff --git a/gui/oprof_start_util.cpp b/gui/oprof_start_util.cpp
-index d293431..d13fa8f 100644
---- a/gui/oprof_start_util.cpp
-+++ b/gui/oprof_start_util.cpp
-@@ -20,6 +20,8 @@
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
-+#include <sys/types.h>
-+#include <pwd.h>
-
- #include <qfiledialog.h>
- #include <qmessagebox.h>
-@@ -39,7 +41,8 @@ namespace {
- // return the ~ expansion suffixed with a '/'
- string const get_config_dir()
- {
-- return "/root";
-+ struct *pw = getpwnam("root");
-+ return pw->pw_dir;
- }
-
- string daemon_pid;
-diff --git a/utils/opcontrol b/utils/opcontrol
-index 09fa5a7..a8acdae 100644
---- a/utils/opcontrol
-+++ b/utils/opcontrol
-@@ -385,7 +385,7 @@ do_init()
- OPROFILED="$OPDIR/oprofiled"
-
- # location for daemon setup information
-- SETUP_DIR="/root/.oprofile"
-+ SETUP_DIR="`grep root /etc/passwd | cut -d: -f6`/.oprofile"
- SETUP_FILE="$SETUP_DIR/daemonrc"
- SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
-
+ </varlistentry>
+ <varlistentry>
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest
index 583ee1b8a8..4814be652a 100644
--- a/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ b/meta/recipes-kernel/oprofile/oprofile/run-ptest
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+
saved_dir=$PWD
for dir in */tests ; do
cd $dir
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
deleted file mode 100644
index 6080a3e0e5..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://0001-Add-rmb-definition-for-AArch64-architecture.patch \
- file://0001-Tidy-powerpc64-bfd-target-check.patch \
- "
-SRC_URI[md5sum] = "00aec1287da2dfffda17a9b1c0a01868"
-SRC_URI[sha256sum] = "1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597"
-
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
new file mode 100644
index 0000000000..f4a34b32e6
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
@@ -0,0 +1,13 @@
+require oprofile.inc
+
+DEPENDS += "virtual/kernel"
+DEPENDS_append_powerpc64 = " libpfm4"
+
+SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ba0b340e5c421a93959776c836ed35b3"
+SRC_URI[sha256sum] = "847110b4ecdcf8c8353cd38f94c1b704aad4bfcd9453e38b88d112cfb7e3c45a"
+
+S = "${WORKDIR}/oprofile-${PV}"
+
+PR = "r1"
diff --git a/meta/recipes-kernel/oprofile/oprofile_git.bb b/meta/recipes-kernel/oprofile/oprofile_git.bb
deleted file mode 100644
index ca562db121..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_git.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require oprofile.inc
-
-SRCREV = "88f43190d412d28ebf5c75a76ba20343d0fe4c41"
-PV = "0.9.7+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI += "git://oprofile.git.sourceforge.net/gitroot/${BPN}/${BPN}"
-
-S = "${WORKDIR}/git"
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 20968f98cc..fcfd0ada1f 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -20,15 +20,19 @@ BUILDPERF_libc-uclibc = "no"
# 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)}"
+
+DEPENDS = " \
+ virtual/${MLPREFIX}libc \
+ ${MLPREFIX}elfutils \
+ ${MLPREFIX}binutils \
+ ${TUI_DEPENDS} \
+ ${SCRIPTING_DEPENDS} \
+ ${LIBUNWIND_DEPENDS} \
+ bison flex \
+"
-DEPENDS = "virtual/kernel \
- virtual/${MLPREFIX}libc \
- ${MLPREFIX}elfutils \
- ${MLPREFIX}binutils \
- ${TUI_DEPENDS} \
- ${SCRIPTING_DEPENDS} \
- bison flex \
- "
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
PROVIDES = "virtual/perf"
@@ -44,7 +48,7 @@ export HOST_SYS
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
-do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot"
+do_populate_lic[depends] += "virtual/kernel:do_patch"
# needed for building the tools/perf Perl binding
inherit perlnative cpan-base
@@ -54,51 +58,46 @@ export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}
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)}"
-S = "${STAGING_KERNEL_DIR}"
-# The source should be ready after the do_unpack
-do_unpack[depends] += "virtual/kernel:do_populate_sysroot"
+inherit kernelsrc
B = "${WORKDIR}/${BPN}-${PV}"
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.
LDFLAGS="-ldl -lutil"
-EXTRA_OEMAKE = \
- '-C ${S}/tools/perf \
- O=${B} \
- CROSS_COMPILE=${TARGET_PREFIX} \
- ARCH=${ARCH} \
- CC="${CC}" \
- AR="${AR}" \
- perfexecdir=${libexecdir} \
- NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
- '
+EXTRA_OEMAKE = '\
+ -C ${S}/tools/perf \
+ O=${B} \
+ CROSS_COMPILE=${TARGET_PREFIX} \
+ ARCH=${ARCH} \
+ CC="${CC}" \
+ AR="${AR}" \
+ EXTRA_CFLAGS="-ldw" \
+ perfexecdir=${libexecdir} \
+ NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
+ ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \
+'
EXTRA_OEMAKE += "\
- 'prefix=${prefix}' \
- 'bindir=${bindir}' \
- 'sharedir=${datadir}' \
- 'sysconfdir=${sysconfdir}' \
- 'perfexecdir=${libexecdir}/perf-core' \
- \
- 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
- 'sharedir=${@os.path.relpath(datadir, prefix)}' \
- 'mandir=${@os.path.relpath(mandir, prefix)}' \
- 'infodir=${@os.path.relpath(infodir, prefix)}' \
+ 'prefix=${prefix}' \
+ 'bindir=${bindir}' \
+ 'sharedir=${datadir}' \
+ 'sysconfdir=${sysconfdir}' \
+ 'perfexecdir=${libexecdir}/perf-core' \
+ \
+ 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
+ 'sharedir=${@os.path.relpath(datadir, prefix)}' \
+ 'mandir=${@os.path.relpath(mandir, prefix)}' \
+ 'infodir=${@os.path.relpath(infodir, prefix)}' \
"
-# PPC64 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. And MIPS64 has the same issue.
-EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-
PARALLEL_MAKE = ""
do_compile() {
@@ -118,6 +117,10 @@ do_install() {
}
do_configure_prepend () {
+ # Fix for rebuilding
+ rm -rf ${B}/
+ mkdir ${B}/
+
#kernels before 3.1 do not support WERROR env variable
sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
if [ -e "${S}/tools/perf/config/Makefile" ]; then
@@ -128,10 +131,13 @@ do_configure_prepend () {
# 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
# 64 bit build (and library) are not exected. To ensure that libraries are
- # installed to the correct location, we can make the substitution in the
- # config/Makefile. For non multilib builds, this has no impact.
+ # installed to the correct location, we can use the weak assignment in the
+ # config/Makefile.
if [ -e "${S}/tools/perf/config/Makefile" ]; then
- sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
+ # Match $(prefix)/$(lib) and $(prefix)/lib
+ sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
+ -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
+ ${S}/tools/perf/config/Makefile
fi
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
@@ -145,10 +151,19 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
fi
+
+ # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
+ if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
+ sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
+ fi
+ if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
+ sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
+ sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
+ fi
}
python do_package_prepend() {
- bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d)
+ d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0])
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -160,6 +175,7 @@ RDEPENDS_${PN} += "elfutils"
RDEPENDS_${PN}-archive =+ "bash"
RDEPENDS_${PN}-python =+ "bash python"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
+RDEPENDS_${PN}-tests =+ "python"
RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
diff --git a/meta/recipes-kernel/powertop/powertop_2.5.bb b/meta/recipes-kernel/powertop/powertop_2.7.bb
index 86a7f604de..5ba07e9ab9 100644
--- a/meta/recipes-kernel/powertop/powertop_2.5.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.7.bb
@@ -6,21 +6,23 @@ DEPENDS = "ncurses libnl pciutils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-SRC_URI = "http://01.org/powertop/sites/default/files/downloads/powertop-${PV}.tar.gz"
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz"
-SRC_URI[md5sum] = "806bbcbd44fcea1f807c9582fc1f7d3e"
-SRC_URI[sha256sum] = "8b2c08a555d79e1c428863470c41cb023971d74ba4801d80a05e35adeec23c0b"
+SRC_URI[md5sum] = "e0d686e47daaf7e9d89031f7763432ef"
+SRC_URI[sha256sum] = "8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca"
inherit autotools gettext pkgconfig
# we need to explicitly link with libintl in uClibc systems
-LDFLAGS += "${EXTRA_LDFLAGS}"
+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
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb
index ef1e270883..e18aebf7bd 100644
--- a/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -14,7 +14,13 @@ SRC_URI = "git://git.gnome.org/sysprof \
SRC_URI_append_arm = " file://rmb-arm.patch"
SRC_URI_append_mips = " file://rmb-mips.patch"
SRC_URI_append_mips64 = " file://rmb-mips.patch"
+SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
+
+# We do not yet work for aarch64.
+#
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 4d2bec4714..758908bff9 100644
--- a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -21,7 +21,7 @@ EXTRA_OEMAKE = ""
# support. Note that staprun expects it in the systemtap/runtime directory,
# not in /lib/modules.
do_compile() {
- if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config
+ if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config
then
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
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
new file mode 100644
index 0000000000..b4f2fbc066
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/configure-allow-to-disable-libvirt.patch
@@ -0,0 +1,39 @@
+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/system_map_location.patch b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
new file mode 100644
index 0000000000..013af5c3a4
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/system_map_location.patch
@@ -0,0 +1,23 @@
+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_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 488d417150..d0dd42a643 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -20,6 +20,9 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
EXTRA_OECONF += "${STAP_DOCS} "
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+
inherit autotools gettext pkgconfig
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 717d66f738..f9a19d964a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,11 +1,13 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d"
-PV = "2.5+git${SRCPV}"
+SRCREV = "7682e51d2e11a35b2977ba9a85ab42f326b8ff8f"
+PV = "2.6+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
+ file://system_map_location.patch \
+ file://configure-allow-to-disable-libvirt.patch \
"
# systemtap doesn't support mips
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
index e64abe2ecc..28412c72d3 100644
--- a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
+++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
@@ -6,15 +6,21 @@ require trace-cmd.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
-DEPENDS = "gtk+"
+DEPENDS = "gtk+ libxml2"
RDEPENDS_${PN} = "trace-cmd"
SRC_URI_append = "file://kernelshark-fix-syntax-error-of-shell.patch"
EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui"
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.*.d
+}
+
do_install() {
oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui
+ rm ${D}${bindir}/trace-cmd
rm -rf ${D}${datadir}/trace-cmd
rmdir ${D}${datadir}
}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
deleted file mode 100644
index 8fdeedb008..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a6e259b2cd43db3c0f69441f627a8cf214f88506 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Thu, 5 Apr 2012 15:19:44 -0400
-Subject: [PATCH] trace-cmd: Add checks for invalid pointers to fix segfaults
-
-Upstream-Status: Backport
-
-Running 'trace-cmd report' after running latency tracers will cause a
-segfault due to invalid pointers. Adding checks to ensure
-pointers/lists are initialized before attempting to use them prevents
-these segfaults.
-
-Link: http://lkml.kernel.org/r/1333653586-3379-2-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-input.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/trace-input.c b/trace-input.c
-index b6af1e6..5151c1e 100644
---- a/trace-input.c
-+++ b/trace-input.c
-@@ -695,7 +695,8 @@ static void __free_page(struct tracecmd_input *handle, struct page *page)
-
- static void free_page(struct tracecmd_input *handle, int cpu)
- {
-- if (!handle->cpu_data[cpu].page)
-+ if (!handle->cpu_data || cpu >= handle->cpus ||
-+ !handle->cpu_data[cpu].page)
- return;
-
- __free_page(handle, handle->cpu_data[cpu].page);
-@@ -746,8 +747,12 @@ void tracecmd_record_ref(struct record *record)
-
- static void free_next(struct tracecmd_input *handle, int cpu)
- {
-- struct record *record = handle->cpu_data[cpu].next;
-+ struct record *record;
-+
-+ if (!handle->cpu_data || cpu >= handle->cpus)
-+ return;
-
-+ record = handle->cpu_data[cpu].next;
- if (!record)
- return;
-
-@@ -2337,7 +2342,8 @@ void tracecmd_close(struct tracecmd_input *handle)
- /* The tracecmd_peek_data may have cached a record */
- free_next(handle, cpu);
- free_page(handle, cpu);
-- if (!list_empty(&handle->cpu_data[cpu].pages))
-+ if (handle->cpu_data &&
-+ !list_empty(&handle->cpu_data[cpu].pages))
- warning("pages still allocated on cpu %d%s",
- cpu, show_records(&handle->cpu_data[cpu].pages));
- }
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
deleted file mode 100644
index 4c00c512bb..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 356dee73d9ced3e019dea2883a7f357fd4664b3e Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Thu, 5 Apr 2012 15:19:45 -0400
-Subject: [PATCH] trace-cmd: Do not call stop_threads() if doing latency
- tracing
-
-Upstream-Status: Backport
-
-If we are using a latency tracer we do not call start_threads() we
-should therefore not call stop_threads() if 'latency'. Attempting
-to call stop_threads() without first calling start_threads() will
-cause a segfault since pids will be uninitialized.
-
-Link: http://lkml.kernel.org/r/1333653586-3379-3-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-record.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/trace-record.c b/trace-record.c
-index fcec28b..1c56fa9 100644
---- a/trace-record.c
-+++ b/trace-record.c
-@@ -2216,7 +2216,8 @@ void trace_record (int argc, char **argv)
- }
-
- disable_tracing();
-- stop_threads();
-+ if (!latency)
-+ stop_threads();
- }
-
- for (cpu = 0; cpu < cpu_count; cpu++) {
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch
deleted file mode 100644
index 724e1e80b1..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From d65740d61e7a4ea6d8d77237954b33dd18e3276c Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Sun, 8 Apr 2012 11:38:45 -0400
-Subject: [PATCH] trace-cmd: Setting plugin to 'nop' clears data before it's
- recorded
-
-Upstream-Status: Backport
-
-commit e09a5db1a929ab668c273b87c4f0a32b81e1c21a
-[trace-cmd: Add trace-cmd record --date option]
-
-moved the call to disable_all() in trace_record() from after record_data()
-to before it. Unfortunately disable_all() sets 'nop' in 'current_tracer'
-which has the side affect of clearing 'trace', thus all the latency tracer
-reports are empty/useless. Here we make disable_all() optionally call
-set_plugin() thus, where we need to, we can delay the disabling of the tracer
-until we have had a chance to capture 'trace'. We have added this delayed
-behavior to trace_record() to fix the latency reports, for all other calls to
-disable_all() we continue to have set_plugin() called.
-
-Link: http://lkml.kernel.org/r/1333899525-6436-1-git-send-email-mark.asselstine@windriver.com
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
-Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
----
- trace-record.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/trace-record.c b/trace-record.c
-index 1c56fa9..95d4a2a 100644
---- a/trace-record.c
-+++ b/trace-record.c
-@@ -897,11 +897,13 @@ static void disable_tracing(void)
- write_tracing_on(0);
- }
-
--static void disable_all(void)
-+static void disable_all(int disable_tracer)
- {
- disable_tracing();
-
-- set_plugin("nop");
-+ if (disable_tracer)
-+ set_plugin("nop");
-+
- reset_events();
-
- /* Force close and reset of ftrace pid file */
-@@ -1573,7 +1575,7 @@ static void set_funcs(void)
- /* make sure we are filtering functions */
- if (func_stack) {
- if (!functions_filtered()) {
-- disable_all();
-+ disable_all(1);
- die("Function stack trace set, but functions not filtered");
- }
- save_option(FUNC_STACK_TRACE);
-@@ -1938,7 +1940,7 @@ void trace_record (int argc, char **argv)
- break;
- }
- }
-- disable_all();
-+ disable_all(1);
- set_buffer_size();
- exit(0);
- } else
-@@ -2147,7 +2149,7 @@ void trace_record (int argc, char **argv)
-
- if (!extract) {
- fset = set_ftrace(!disable);
-- disable_all();
-+ disable_all(1);
-
- /* Record records the date first */
- if (record && date)
-@@ -2227,7 +2229,7 @@ void trace_record (int argc, char **argv)
- }
-
- if (!keep)
-- disable_all();
-+ disable_all(0);
-
- printf("Kernel buffer statistics:\n"
- " Note: \"entries\" are the entries left in the kernel ring buffer and are not\n"
-@@ -2249,6 +2251,8 @@ void trace_record (int argc, char **argv)
- if (keep)
- exit(0);
-
-+ set_plugin("nop");
-+
- /* If tracing_on was enabled before we started, set it on now */
- if (tracing_on_init_val)
- write_tracing_on(tracing_on_init_val);
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
deleted file mode 100644
index 8e7c2a45f9..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-trace-cmd: fix syntax error of shell
-
-Delete "<<<" syntax of bash in Makefile, else we would get following error:
-
- Syntax error: redirection unexpected
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- Makefile | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c1fa906..7973c53 100644
---- a/Makefile
-+++ b/Makefile
-@@ -89,8 +89,7 @@ endif
-
- # $(call test-build, snippet, ret) -> ret if snippet compiles
- # -> empty otherwise
--test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \
-- <<<'$1' && echo y), $2)
-+test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2)
-
- # have udis86 disassembler library?
- udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
deleted file mode 100644
index 6f3319dfd1..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
+++ /dev/null
@@ -1,23 +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;endine=8;md5=6ad47cc2b03385d8456771eec5eeea0b"
-
-SRC_URI_append = "file://trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch \
- file://trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch \
- file://trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch \
- file://trace-cmd-fix-syntax-error-of-shell.patch \
-"
-
-EXTRA_OEMAKE = "'prefix=${prefix}'"
-
-FILES_${PN}-dbg += "${datadir}/trace-cmd/plugins/.debug/"
-
-do_install() {
- oe_runmake prefix="${prefix}" DESTDIR="${D}" install
-}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb
new file mode 100644
index 0000000000..a4d5382aaf
--- /dev/null
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb
@@ -0,0 +1,41 @@
+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;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \
+"
+SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547"
+
+PV = "2.3.2+git${SRCPV}"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \
+"
+
+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 \
+"
+
+FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug"
+
+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-lsb4/libpng/libpng12_1.2.51.bb b/meta/recipes-lsb4/libpng/libpng12_1.2.52.bb
index 6b2dcba1f1..5b67fe8b53 100644
--- a/meta/recipes-lsb4/libpng/libpng12_1.2.51.bb
+++ b/meta/recipes-lsb4/libpng/libpng12_1.2.52.bb
@@ -2,8 +2,8 @@ SUMMARY = "PNG image format decoding library"
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=ec135c8490e3b3d4ba2cc21f84c3a294 \
- file://png.h;beginline=314;endline=428;md5=151cf86c4efc2a7400f8a9a61d743d8e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4495b57387451782e5f34c2968c35ed0 \
+ file://png.h;beginline=314;endline=428;md5=0c93e62d39955f2b879c056165cfad43"
DEPENDS = "zlib"
PN = "libpng12"
@@ -11,8 +11,8 @@ S = "${WORKDIR}/libpng-${PV}"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng12/${PV}/libpng-${PV}.tar.xz"
-SRC_URI[md5sum] = "4efba67fa5aa2b785c6fcec2cc3e90c9"
-SRC_URI[sha256sum] = "c7d7b813b022afd70474f78bcc3655c7bb54edbf28dd4652e5521cbb6da56d4a"
+SRC_URI[md5sum] = "49d5c71929bf69a172147c47b9309fbe"
+SRC_URI[sha256sum] = "d4fb0fbf14057ad6d0319034188fc2aecddb493da8e3031b7b072ed28f510ec0"
BINCONFIG_GLOB = "${PN}-config"
diff --git a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb b/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
index 19247d8f12..a3e58f031e 100644
--- a/meta/recipes-lsb4/perl/libpod-plainer-perl_1.03.bb
+++ b/meta/recipes-lsb4/perl/libpod-plainer-perl_1.04.bb
@@ -9,12 +9,12 @@ 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=80b4a99d477135bfcd1d0a44a041c63c"
+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] = "15d42071d6bd861cb72daa8cc3111cd3"
-SRC_URI[sha256sum] = "9d153b1d8609606a3424f07a7f4ce955af32131d484cb9602812122bb1ee745b"
+SRC_URI[md5sum] = "f502eacd1a40894b9dfea55fc2cd5e7d"
+SRC_URI[sha256sum] = "1bbfbf7d1d4871e5a83bab2137e22d089078206815190eb1d5c1260a3499456f"
S = "${WORKDIR}/Pod-Plainer-${PV}"
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
new file mode 100755
index 0000000000..06cdcb9894
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
@@ -0,0 +1,32 @@
+From f6b879e7cc87d83343f5004369146881d1d1e335 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@freescale.com>
+Date: Wed, 23 Jul 2014 15:09:58 +0800
+Subject: [PATCH] pcm: pcm_local.h: include <time.h> to enable CLOCK_MONOTONIC
+
+CLOCK_MONITONIC is defined in <bits/time.h>, add <time.h> before <sys/time.h>.
+
+Commit f6b879e7cc87d83343f5004369146881d1d1e335 in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_local.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
+index 2206afe..80bbe59 100644
+--- a/src/pcm/pcm_local.h
++++ b/src/pcm/pcm_local.h
+@@ -24,6 +24,7 @@
+ #include <stdlib.h>
+ #include <limits.h>
+ #include <sys/uio.h>
++#include <time.h>
+ #include <sys/time.h>
+
+ #define _snd_mask sndrv_mask
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
new file mode 100755
index 0000000000..8be3d757a1
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
@@ -0,0 +1,34 @@
+From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@freescale.com>
+Date: Mon, 14 Jul 2014 16:55:48 +0800
+Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary
+
+For long time test case, the hw_ptr will exceed the boundary, then cause
+the avail size wrong.
+
+Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_rate.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
+index 7f667d4..2563d82 100644
+--- a/src/pcm/pcm_rate.c
++++ b/src/pcm/pcm_rate.c
+@@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
+ rate->hw_ptr =
+ (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
+ rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
++
++ rate->hw_ptr %= pcm->boundary;
+ }
+
+ static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
new file mode 100755
index 0000000000..89363d55d2
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
@@ -0,0 +1,345 @@
+From 3f179d6cc7c222dfa42fe094b7ef1e21685a05bc Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 22 Jul 2014 11:55:40 +0200
+Subject: [PATCH] pcm: route: Use get32 for multi-source route calculation
+
+The PCM route plugin can assign the destination value from average of
+multiple sources with attenuation. This requires the read of each
+channel value, sums and writes the resultant value in the requested
+format.
+
+Currently, get_labels is used for reading source values while
+put32_labels is used for writing the dest value. This is, however,
+a buggy implementation; get_labels gives the value as is only with
+endianness and signedness conversions, but put32_labels assumes that
+the value is normalized to 32bit int and it shifts down to the dest
+format. In addition, the current code lacks get_labels entries for
+the 24bit formats, as Shengjiu Wang spotted out.
+
+For fixing these bugs, this patch replaces the read with
+get32_labels and use always 64bit int for sum. This simplifies the
+code a lot and drops many lines.
+
+Commit fd84adc63e307572d05274be44c782a787087cda in master branch
+
+Upstream Status: Backported
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_route.c | 128 +++++++++-----------------------------------------
+ src/pcm/plugin_ops.h | 81 --------------------------------
+ 2 files changed, 23 insertions(+), 186 deletions(-)
+
+diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
+index 2beedf6..1ed9c5f 100644
+--- a/src/pcm/pcm_route.c
++++ b/src/pcm/pcm_route.c
+@@ -60,7 +60,7 @@ typedef struct {
+ typedef struct snd_pcm_route_ttable_dst snd_pcm_route_ttable_dst_t;
+
+ typedef struct {
+- enum {UINT32=0, UINT64=1, FLOAT=2} sum_idx;
++ enum {UINT64, FLOAT} sum_idx;
+ unsigned int get_idx;
+ unsigned int put_idx;
+ unsigned int conv_idx;
+@@ -232,55 +232,34 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ const snd_pcm_route_ttable_dst_t* ttable,
+ const snd_pcm_route_params_t *params)
+ {
+-#define GETS_LABELS
++#define GET32_LABELS
+ #define PUT32_LABELS
+ #include "plugin_ops.h"
+-#undef GETS_LABELS
++#undef GET32_LABELS
+ #undef PUT32_LABELS
+- static void *const zero_labels[3] = {
+- &&zero_int32, &&zero_int64,
++ static void *const zero_labels[2] = {
++ &&zero_int64,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ &&zero_float
+ #endif
+ };
+ /* sum_type att */
+- static void *const add_labels[3 * 2] = {
+- &&add_int32_noatt, &&add_int32_att,
++ static void *const add_labels[2 * 2] = {
+ &&add_int64_noatt, &&add_int64_att,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ &&add_float_noatt, &&add_float_att
+ #endif
+ };
+- /* sum_type att shift */
+- static void *const norm_labels[3 * 2 * 4] = {
+- 0,
+- &&norm_int32_8_noatt,
+- &&norm_int32_16_noatt,
+- &&norm_int32_24_noatt,
+- 0,
+- &&norm_int32_8_att,
+- &&norm_int32_16_att,
+- &&norm_int32_24_att,
+- &&norm_int64_0_noatt,
+- &&norm_int64_8_noatt,
+- &&norm_int64_16_noatt,
+- &&norm_int64_24_noatt,
+- &&norm_int64_0_att,
+- &&norm_int64_8_att,
+- &&norm_int64_16_att,
+- &&norm_int64_24_att,
++ /* sum_type att */
++ static void *const norm_labels[2 * 2] = {
++ &&norm_int64_noatt,
++ &&norm_int64_att,
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+- &&norm_float_0,
+- &&norm_float_8,
+- &&norm_float_16,
+- &&norm_float_24,
+- &&norm_float_0,
+- &&norm_float_8,
+- &&norm_float_16,
+- &&norm_float_24,
++ &&norm_float,
++ &&norm_float,
+ #endif
+ };
+- void *zero, *get, *add, *norm, *put32;
++ void *zero, *get32, *add, *norm, *put32;
+ int nsrcs = ttable->nsrcs;
+ char *dst;
+ int dst_step;
+@@ -322,9 +301,9 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ }
+
+ zero = zero_labels[params->sum_idx];
+- get = gets_labels[params->get_idx];
++ get32 = get32_labels[params->get_idx];
+ add = add_labels[params->sum_idx * 2 + ttable->att];
+- norm = norm_labels[params->sum_idx * 8 + ttable->att * 4 + 4 - params->src_size];
++ norm = norm_labels[params->sum_idx * 2 + ttable->att];
+ put32 = put32_labels[params->put_idx];
+ dst = snd_pcm_channel_area_addr(dst_area, dst_offset);
+ dst_step = snd_pcm_channel_area_step(dst_area);
+@@ -335,9 +314,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+
+ /* Zero sum */
+ goto *zero;
+- zero_int32:
+- sum.as_sint32 = 0;
+- goto zero_end;
+ zero_int64:
+ sum.as_sint64 = 0;
+ goto zero_end;
+@@ -351,21 +327,14 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ const char *src = srcs[srcidx];
+
+ /* Get sample */
+- goto *get;
+-#define GETS_END after_get
++ goto *get32;
++#define GET32_END after_get
+ #include "plugin_ops.h"
+-#undef GETS_END
++#undef GET32_END
+ after_get:
+
+ /* Sum */
+ goto *add;
+- add_int32_att:
+- sum.as_sint32 += sample * ttp->as_int;
+- goto after_sum;
+- add_int32_noatt:
+- if (ttp->as_int)
+- sum.as_sint32 += sample;
+- goto after_sum;
+ add_int64_att:
+ sum.as_sint64 += (int64_t) sample * ttp->as_int;
+ goto after_sum;
+@@ -389,48 +358,10 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+
+ /* Normalization */
+ goto *norm;
+- norm_int32_8_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_8_att:
+- sum.as_sint64 <<= 8;
+- norm_int64_0_att:
+- div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_16_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_16_att:
+- sum.as_sint64 <<= 16;
++ norm_int64_att:
+ div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_24_att:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_24_att:
+- sum.as_sint64 <<= 24;
+- div(sum.as_sint64);
+- goto norm_int;
+-
+- norm_int32_8_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_8_noatt:
+- sum.as_sint64 <<= 8;
+- goto norm_int;
+-
+- norm_int32_16_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_16_noatt:
+- sum.as_sint64 <<= 16;
+- goto norm_int;
+-
+- norm_int32_24_noatt:
+- sum.as_sint64 = sum.as_sint32;
+- norm_int64_24_noatt:
+- sum.as_sint64 <<= 24;
+- goto norm_int;
+-
+- norm_int64_0_noatt:
+- norm_int:
++ /* fallthru */
++ norm_int64_noatt:
+ if (sum.as_sint64 > (int64_t)0x7fffffff)
+ sample = 0x7fffffff; /* maximum positive value */
+ else if (sum.as_sint64 < -(int64_t)0x80000000)
+@@ -440,16 +371,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
+ goto after_norm;
+
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+- norm_float_8:
+- sum.as_float *= 1 << 8;
+- goto norm_float;
+- norm_float_16:
+- sum.as_float *= 1 << 16;
+- goto norm_float;
+- norm_float_24:
+- sum.as_float *= 1 << 24;
+- goto norm_float;
+- norm_float_0:
+ norm_float:
+ sum.as_float = rint(sum.as_float);
+ if (sum.as_float > (int64_t)0x7fffffff)
+@@ -644,7 +565,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
+ return err;
+ route->params.use_getput = snd_pcm_format_physical_width(src_format) == 24 ||
+ snd_pcm_format_physical_width(dst_format) == 24;
+- route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S16);
++ route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32);
+ route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format);
+ route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
+ route->params.src_size = snd_pcm_format_width(src_format) / 8;
+@@ -652,10 +573,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
+ #if SND_PCM_PLUGIN_ROUTE_FLOAT
+ route->params.sum_idx = FLOAT;
+ #else
+- if (snd_pcm_format_width(src_format) == 32)
+- route->params.sum_idx = UINT64;
+- else
+- route->params.sum_idx = UINT32;
++ route->params.sum_idx = UINT64;
+ #endif
+ return 0;
+ }
+diff --git a/src/pcm/plugin_ops.h b/src/pcm/plugin_ops.h
+index 21535c9..eb8c2c4 100644
+--- a/src/pcm/plugin_ops.h
++++ b/src/pcm/plugin_ops.h
+@@ -668,87 +668,6 @@ getu_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GETU_END;
+ }
+ #endif
+
+-#ifdef GETS_LABELS
+-/* width endswap sign_toggle */
+-static void *const gets_labels[4 * 2 * 2] = {
+- &&gets_1_1, /* 8h -> 8h */
+- &&gets_1_9, /* 8h ^> 8h */
+- &&gets_1_1, /* 8s -> 8h */
+- &&gets_1_9, /* 8s ^> 8h */
+- &&gets_12_12, /* 16h -> 16h */
+- &&gets_12_92, /* 16h ^> 16h */
+- &&gets_12_21, /* 16s -> 16h */
+- &&gets_12_A1, /* 16s ^> 16h */
+- &&gets_0123_0123, /* 24h -> 24h */
+- &&gets_0123_0923, /* 24h ^> 24h */
+- &&gets_1230_0321, /* 24s -> 24h */
+- &&gets_1230_0B21, /* 24s ^> 24h */
+- &&gets_1234_1234, /* 32h -> 32h */
+- &&gets_1234_9234, /* 32h ^> 32h */
+- &&gets_1234_4321, /* 32s -> 32h */
+- &&gets_1234_C321, /* 32s ^> 32h */
+-};
+-#endif
+-
+-#ifdef GETS_END
+-while (0) {
+-gets_1_1: sample = as_s8c(src); goto GETS_END;
+-gets_1_9: sample = (int8_t)(as_s8c(src) ^ 0x80); goto GETS_END;
+-gets_12_12: sample = as_s16c(src); goto GETS_END;
+-gets_12_92: sample = (int16_t)(as_s16c(src) ^ 0x8000); goto GETS_END;
+-gets_12_21: sample = (int16_t)bswap_16(as_s16c(src)); goto GETS_END;
+-gets_12_A1: sample = (int16_t)bswap_16(as_s16c(src) ^ 0x80); goto GETS_END;
+-gets_0123_0123: sample = sx24((int32_t)(as_s32c(src) << 8) >> 8); goto GETS_END;
+-gets_0123_0923: sample = sx24((int32_t)((as_s32c(src) ^ 0x800000) << 8) >> 8); goto GETS_END;
+-gets_1230_0321: sample = sx24((int32_t)(bswap_32(as_s32c(src)) << 8) >> 8); goto GETS_END;
+-gets_1230_0B21: sample = sx24((int32_t)(bswap_32(as_s32c(src) ^ 0x8000) << 8) >> 8); goto GETS_END;
+-gets_1234_1234: sample = as_s32c(src); goto GETS_END;
+-gets_1234_9234: sample = (int32_t)(as_s32c(src) ^ 0x80000000); goto GETS_END;
+-gets_1234_4321: sample = (int32_t)bswap_32(as_s32c(src)); goto GETS_END;
+-gets_1234_C321: sample = (int32_t)bswap_32(as_s32c(src) ^ 0x80); goto GETS_END;
+-}
+-#endif
+-
+-#ifdef PUT_LABELS
+-/* width endswap sign_toggle */
+-static void *const put_labels[4 * 2 * 2] = {
+- &&put_1_1, /* 8h -> 8h */
+- &&put_1_9, /* 8h ^> 8h */
+- &&put_1_1, /* 8h -> 8s */
+- &&put_1_9, /* 8h ^> 8s */
+- &&put_12_12, /* 16h -> 16h */
+- &&put_12_92, /* 16h ^> 16h */
+- &&put_12_21, /* 16h -> 16s */
+- &&put_12_29, /* 16h ^> 16s */
+- &&put_0123_0123, /* 24h -> 24h */
+- &&put_0123_0923, /* 24h ^> 24h */
+- &&put_0123_3210, /* 24h -> 24s */
+- &&put_0123_3290, /* 24h ^> 24s */
+- &&put_1234_1234, /* 32h -> 32h */
+- &&put_1234_9234, /* 32h ^> 32h */
+- &&put_1234_4321, /* 32h -> 32s */
+- &&put_1234_4329, /* 32h ^> 32s */
+-};
+-#endif
+-
+-#ifdef PUT_END
+-put_1_1: as_s8(dst) = sample; goto PUT_END;
+-put_1_9: as_u8(dst) = sample ^ 0x80; goto PUT_END;
+-put_12_12: as_s16(dst) = sample; goto PUT_END;
+-put_12_92: as_u16(dst) = sample ^ 0x8000; goto PUT_END;
+-put_12_21: as_s16(dst) = bswap_16(sample); goto PUT_END;
+-put_12_29: as_u16(dst) = bswap_16(sample) ^ 0x80; goto PUT_END;
+-/* this always writes the unused byte in 24-bit formats as 0x00 */
+-put_0123_0123: as_s32(dst) = sx24(sample & 0x00ffffff); goto PUT_END;
+-put_0123_0923: as_u32(dst) = sx24((sample & 0x00ffffff) ^ 0x800000); goto PUT_END;
+-put_0123_3210: as_s32(dst) = sx24s(bswap_32(sample) & 0xffffff00); goto PUT_END;
+-put_0123_3290: as_u32(dst) = sx24s((bswap_32(sample) & 0xffffff00) ^ 0x8000); goto PUT_END;
+-put_1234_1234: as_s32(dst) = sample; goto PUT_END;
+-put_1234_9234: as_u32(dst) = sample ^ 0x80000000; goto PUT_END;
+-put_1234_4321: as_s32(dst) = bswap_32(sample); goto PUT_END;
+-put_1234_4329: as_u32(dst) = bswap_32(sample) ^ 0x80; goto PUT_END;
+-#endif
+-
+ #ifdef PUT32F_LABELS
+ /* type (0 = float, 1 = float64), endswap */
+ static void *const put32float_labels[2 * 2] = {
+--
+1.7.9.5
+
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
index 41b3c23a40..75a6eb8a3c 100644
--- 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
@@ -1,6 +1,6 @@
-From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001
+From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001
From: "Hong H. Pham" <hong.pham@windriver.com>
-Date: Tue, 26 Feb 2013 19:40:04 -0500
+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
@@ -8,24 +8,25 @@ 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: Pending
+Upstream-Status: Inappropriate [configuration]
Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
- configure.in | 5 ++++-
- src/userfile.c | 2 +-
+ configure.ac | 5 ++++-
+ src/userfile.c | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
-diff --git a/configure.in b/configure.in
-index 4bcb0d6..ba1c2dd 100644
---- a/configure.in
-+++ b/configure.in
-@@ -333,7 +333,10 @@ arm*)
- esac
+diff --git a/configure.ac b/configure.ac
+index b8353a0..773b72f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -311,7 +311,10 @@ fi
+ AC_SUBST(ALSA_DEPLIBS)
- dnl Check for wordexp.h
--AC_CHECK_HEADERS([wordexp.h])
-+AC_CHECK_HEADERS([wordexp.h],
+ dnl Check for headers
+-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h],
+ dnl Make sure wordexp is supported by the C library
+ AC_CHECK_FUNCS([wordexp])
+)
@@ -46,5 +47,5 @@ index 3a73836..b8ce809 100644
#include <assert.h>
int snd_user_file(const char *file, char **result)
--
-1.7.10.4
+1.9.1
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
deleted file mode 100644
index f1a7947c2b..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
-From: Kai Kang <jiashuo.kang at gmail.com>
-Date: Thu, 15 Aug 2013 17:17:19 +0800
-Subject: [PATCH] Update iatomic.h functions definitions for mips
-
-Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
-__inline__' that may cause compile fails when cross compile for mips.
-The error message looks like:
-
-| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
-| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
-
-Replace the 'extern __inline__' with 'static __inline__' to fix this
-issue.
-
-Signed-off-by: Kai Kang <jiashuo.kang at gmail.com>
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- include/iatomic.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/iatomic.h b/include/iatomic.h
-index 5711fe8..2393297 100644
---- a/include/iatomic.h
-+++ b/include/iatomic.h
-@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
- * Atomically adds @i to @v. Note that the guaranteed useful range
- * of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_add(int i, atomic_t * v)
-+static __inline__ void atomic_add(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
- * Atomically subtracts @i from @v. Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */
--extern __inline__ void atomic_sub(int i, atomic_t * v)
-+static __inline__ void atomic_sub(int i, atomic_t * v)
- {
- unsigned long temp;
-
-@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
- /*
- * Same as above, but return the result value
- */
--extern __inline__ int atomic_add_return(int i, atomic_t * v)
-+static __inline__ int atomic_add_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
-@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
- return result;
- }
-
--extern __inline__ int atomic_sub_return(int i, atomic_t * v)
-+static __inline__ int atomic_sub_return(int i, atomic_t * v)
- {
- unsigned long temp, result;
-
---
-1.8.1.2
-
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
index cbe04484a4..9a4aab44d4 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
@@ -14,13 +14,15 @@ BBCLASSEXTEND = "native nativesdk"
#FIXME: remove the following
ARM_INSTRUCTION_SET = "arm"
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
file://Check-if-wordexp-function-is-supported.patch \
file://fix-tstamp-declaration.patch \
- file://Update-iatomic.h-functions-definitions-for-mips.patch \
- "
-SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b"
-SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19"
+ file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \
+ file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \
+ file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \
+"
+SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3"
+SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d"
inherit autotools pkgconfig
@@ -31,14 +33,13 @@ EXTRA_OECONF = "--disable-python"
EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
-PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev"
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug"
FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
FILES_libasound = "${libdir}/libasound.so.*"
FILES_alsa-server = "${bindir}/*"
FILES_alsa-conf = "${datadir}/alsa/"
-FILES_alsa-dev += "${libdir}/pkgconfig/ ${includedir}/alsa ${datadir}/aclocal/*"
FILES_alsa-conf-base = "\
${datadir}/alsa/alsa.conf \
${datadir}/alsa/cards/aliases.conf \
@@ -46,4 +47,8 @@ ${datadir}/alsa/pcm/default.conf \
${datadir}/alsa/pcm/dmix.conf \
${datadir}/alsa/pcm/dsnoop.conf"
-RDEPENDS_libasound = "alsa-conf-base"
+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-tools/mips_has_no_io_h.patch b/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch
deleted file mode 100644
index 09b10f17e6..0000000000
--- a/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: alsa-tools-1.0.26.1/hda-verb/hda-verb.c
-===================================================================
---- alsa-tools-1.0.26.1.orig/hda-verb/hda-verb.c
-+++ alsa-tools-1.0.26.1/hda-verb/hda-verb.c
-@@ -13,7 +13,7 @@
- #include <ctype.h>
- #include <unistd.h>
- #include <sys/ioctl.h>
--#ifndef __PPC__
-+#if !(__PPC__ || __mips__)
- #include <sys/io.h>
- #endif
- #include <sys/types.h>
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
index 62d71eaacd..4b9509e863 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
@@ -8,20 +8,19 @@ DEPENDS = "alsa-lib ncurses"
LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/alsa-tools-${PV}.tar.bz2 \
- file://mips_has_no_io_h.patch \
+SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
file://autotools.patch \
- ${@bb.utils.contains_any('DISTRO_FEATURES', 'x11 wayland directfb', '', \
- 'file://makefile_no_gtk.patch', d)}"
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
+ 'file://makefile_no_gtk.patch', d)}"
-SRC_URI[md5sum] = "1ea381d00a6069a98613aa7effa4cb51"
-SRC_URI[sha256sum] = "6562611b5a6560712f109e09740a9d4fa47296b07ed9590cb44139c5f154ada2"
+SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6"
+SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761"
inherit autotools-brokensep pkgconfig
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_any('DISTRO_FEATURES', 'x11 wayland directfb', 'gtk+', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
# configure.ac/.in doesn't exist so force copy
diff --git a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
index 968c81ee2b..2d49cc5622 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
@@ -13,5 +13,5 @@ S = "${WORKDIR}/alsa-utils-${PV}"
do_install() {
install -d ${D}${sbindir}
- install -m 0755 ${S}/alsaconf/alsaconf ${D}${sbindir}/
+ install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
}
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
index 477cd11b12..e99dd515f0 100644
--- 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
@@ -1,35 +1,44 @@
-From 37c99a3cbff36915b56a5703eeaed3c70796f80f Mon Sep 17 00:00:00 2001
+From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Sun, 9 Oct 2011 20:06:35 +0200
-Subject: [PATCH] alsactl: don't let systemd unit restore the volume when asound.state is missing
+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
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
Upstream-Status: Pending
-Index: alsa-utils-1.0.27.2/alsactl/Makefile.am
-===================================================================
---- alsa-utils-1.0.27.2.orig/alsactl/Makefile.am
-+++ alsa-utils-1.0.27.2/alsactl/Makefile.am
-@@ -36,8 +36,8 @@ install-data-hook:
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+---
+ 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 47f06e9..b728c06 100644
+--- a/alsactl/Makefile.am
++++ b/alsactl/Makefile.am
+@@ -43,9 +43,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' \
++ $(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
-Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
-===================================================================
---- alsa-utils-1.0.27.2.orig/alsactl/alsa-restore.service.in
-+++ alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
+diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
+index 245a439..b017854 100644
+--- a/alsactl/alsa-restore.service.in
++++ b/alsactl/alsa-restore.service.in
@@ -10,6 +10,7 @@ DefaultDependencies=no
After=alsa-state.service
Before=shutdown.target
@@ -38,3 +47,6 @@ Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
[Service]
Type=oneshot
+--
+1.9.1
+
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
new file mode 100644
index 0000000000..5df004aeae
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
@@ -0,0 +1,48 @@
+Upstream-Status: Pending
+
+aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming
+via CTRL-C. Fixed the issue by reverting buggy patches and
+properly handling 'in_aborting' flag in appropriate functions.
+
+Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
+Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
+
+--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530
++++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530
+@@ -392,14 +392,22 @@
+ putchar('\n');
+ if (!quiet_mode)
+ fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig));
+- if (handle)
++ if (stream == SND_PCM_STREAM_CAPTURE) {
++ if (fmt_rec_table[file_type].end) {
++ fmt_rec_table[file_type].end(fd);
++ fd = -1;
++ }
++ stream = -1;
++ }
++ if (fd > 1) {
++ close(fd);
++ fd = -1;
++ }
++ if (handle && sig != SIGABRT) {
+ snd_pcm_abort(handle);
+- if (sig == SIGABRT) {
+- /* do not call snd_pcm_close() and abort immediately */
+ handle = NULL;
+- prg_exit(EXIT_FAILURE);
+ }
+- signal(sig, signal_handler);
++ prg_exit(EXIT_FAILURE);
+ }
+
+ /* call on SIGUSR1 signal. */
+@@ -2096,7 +2104,7 @@
+ ssize_t result = count, r;
+ size_t size;
+
+- while (count > 0) {
++ while (count > 0 && !in_aborting) {
+ size = count;
+ if (size > chunk_bytes - buffer_pos)
+ size = chunk_bytes - buffer_pos;
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
index 123926a069..ac5512a7df 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
@@ -9,22 +9,25 @@ DEPENDS = "alsa-lib ncurses libsamplerate0 udev"
PACKAGECONFIG ??= "udev"
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 \
+ file://alsa-utils-aplay-interrupt-signal-handling.patch \
"
-SRC_URI[md5sum] = "b65e9a04181bd7c9db7667a4566f8dc3"
-SRC_URI[sha256sum] = "02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea"
+SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211"
+SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc"
# 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 = "--disable-xmlto"
EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
-inherit autotools-brokensep gettext pkgconfig
+PR = "r1"
+
+inherit autotools gettext pkgconfig
# This are all packages that we need to make. Also, the now empty alsa-utils
# ipk depends on them.
diff --git a/meta/recipes-multimedia/flac/flac_1.3.0.bb b/meta/recipes-multimedia/flac/flac_1.3.0.bb
index ab37cbe0ad..ba9b62822c 100644
--- a/meta/recipes-multimedia/flac/flac_1.3.0.bb
+++ b/meta/recipes-multimedia/flac/flac_1.3.0.bb
@@ -21,13 +21,16 @@ SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
SRC_URI[md5sum] = "13b5c214cee8373464d3d65dee362cdd"
SRC_URI[sha256sum] = "fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc"
-inherit autotools-brokensep gettext
+PR = "r1"
+
+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)}"
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
new file mode 100644
index 0000000000..7da0e14525
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
@@ -0,0 +1,34 @@
+gst-ffmpeg: aacdec: check channel count
+
+Prevent out of array accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/aacdec.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
+index 239153a..6c17c33 100644
+--- a/gst-libs/ext/libav/libavcodec/aacdec.c
++++ b/gst-libs/ext/libav/libavcodec/aacdec.c
+@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
+ }
+ }
+
++ if (avctx->channels > MAX_CHANNELS) {
++ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
++ return AVERROR_INVALIDDATA;
++ }
++
+ AAC_INIT_VLC_STATIC( 0, 304);
+ AAC_INIT_VLC_STATIC( 1, 270);
+ AAC_INIT_VLC_STATIC( 2, 550);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
new file mode 100644
index 0000000000..31fa51a3ea
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
@@ -0,0 +1,40 @@
+From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 30 Aug 2013 23:40:47 +0200
+Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/dsputil.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
+index 53dc2eb..6264832 100644
+--- a/gst-libs/ext/libav/libavcodec/dsputil.c
++++ b/gst-libs/ext/libav/libavcodec/dsputil.c
+@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
+
+ static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
+ long i;
+- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
++ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
+ long a = *(long*)(src+i);
+ long b = *(long*)(dst+i);
+ *(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
+@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
+ }
+ }else
+ #endif
+- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
++ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
+ long a = *(long*)(src1+i);
+ long b = *(long*)(src2+i);
+ *(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
new file mode 100644
index 0000000000..5ff65834e4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
@@ -0,0 +1,50 @@
+gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
+
+Fixes Ticket2982
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/parser.c | 10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/parser.c b/libavcodec/parser.c
+index 2c6de6e..66eca06 100644
+--- a/gst-libs/ext/libav/libavcodec/parser.c
++++ b/gst-libs/ext/libav/libavcodec/parser.c
+@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
+ if(next == END_NOT_FOUND){
+ void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
+
+- if(!new_buffer)
++ if(!new_buffer) {
++ pc->index = 0;
+ return AVERROR(ENOMEM);
++ }
+ pc->buffer = new_buffer;
+ memcpy(&pc->buffer[pc->index], *buf, *buf_size);
+ pc->index += *buf_size;
+@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
+ /* append to buffer */
+ if(pc->index){
+ void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
+-
+- if(!new_buffer)
++ if(!new_buffer) {
++ pc->overread_index =
++ pc->index = 0;
+ return AVERROR(ENOMEM);
++ }
+ pc->buffer = new_buffer;
+ if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
+ memcpy(&pc->buffer[pc->index], *buf,
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
new file mode 100644
index 0000000000..7f6eb48889
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
@@ -0,0 +1,81 @@
+gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
+ using the pointers
+
+Fixes out of array accesses
+Fixes Ticket2850
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Singed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/rpza.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
+index 635b406..f291a95 100644
+--- a/gst-libs/ext/libav/libavcodec/rpza.c
++++ b/gst-libs/ext/libav/libavcodec/rpza.c
+@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ unsigned short *pixels = (unsigned short *)s->frame.data[0];
+
+ int row_ptr = 0;
+- int pixel_ptr = 0;
++ int pixel_ptr = -4;
+ int block_ptr;
+ int pixel_x, pixel_y;
+ int total_blocks;
+@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ colorA = AV_RB16 (&s->buf[stream_ptr]);
+ stream_ptr += 2;
+ while (n_blocks--) {
++ ADVANCE_BLOCK()
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ for (pixel_x = 0; pixel_x < 4; pixel_x++){
+@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ }
+ break;
+
+@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
+ color4[2] |= ((21 * ta + 11 * tb) >> 5);
+
+ while (n_blocks--) {
++ ADVANCE_BLOCK();
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ index = s->buf[stream_ptr++];
+@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ }
+ break;
+
+ /* Fill block with 16 colors */
+ case 0x00:
++ ADVANCE_BLOCK();
+ block_ptr = row_ptr + pixel_ptr;
+ for (pixel_y = 0; pixel_y < 4; pixel_y++) {
+ for (pixel_x = 0; pixel_x < 4; pixel_x++){
+@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
+ }
+ block_ptr += row_inc;
+ }
+- ADVANCE_BLOCK();
+ break;
+
+ /* Unknown opcode */
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
new file mode 100644
index 0000000000..3ca6fc4dc5
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
@@ -0,0 +1,32 @@
+From c17a0ad1df15a94d0b1239adc2afb593bdf0a153 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 3 Oct 2014 22:50:45 +0200
+Subject: [PATCH 1/2] avcodec/smc: fix off by 1 error
+
+Upstream-Status: Backport
+
+Fixes out of array access
+Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/smc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/ext/libav/libavcodec/smc.c b/gst-libs/ext/libav/libavcodec/smc.c
+index 3cd5e53..dec9f71 100644
+--- a/gst-libs/ext/libav/libavcodec/smc.c
++++ b/gst-libs/ext/libav/libavcodec/smc.c
+@@ -69,7 +69,7 @@ typedef struct SmcContext {
+ row_ptr += stride * 4; \
+ } \
+ total_blocks--; \
+- if (total_blocks < 0) \
++ if (total_blocks < 0 + !!n_blocks) \
+ { \
+ av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
+ return; \
+--
+2.1.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
new file mode 100644
index 0000000000..e0e4239c2f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
@@ -0,0 +1,29 @@
+gst-ffmpeg: error concealment: initialize block index.
+
+Fixes CVE-2011-3941 (out of bounds write)
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/error_resilience.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
+index 8bb5d0c..d55c000 100644
+--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
++++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
+@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
+ s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
+ s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
+
++ ff_init_block_index(s);
++ ff_update_block_index(s);
++
+ if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
+ H264Context *h= (void*)s;
+ h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
new file mode 100644
index 0000000000..8eef6e99cc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
@@ -0,0 +1,37 @@
+gst-ffmpeg: error_concealment: Check that the picture is not in a half
+
+Fixes state becoming inconsistent
+Fixes a null pointer dereference
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/error_resilience.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
+index 01f7424..2b6bc42 100644
+--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
++++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
+@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
+ s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
+ s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
+
++ if ( s->picture_structure == PICT_FRAME
++ && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
++ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
++ return;
++ }
++
+ if(s->current_picture.motion_val[0] == NULL){
+ av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
new file mode 100644
index 0000000000..80325db4d6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
@@ -0,0 +1,36 @@
+gst-ffmpeg: ffserver: set oformat
+
+Fix Ticket1986
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
+
+Upstream-Status: Backport
+
+---
+ ffserver.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/ffserver.c b/ffserver.c
+index 4044d0f..8740140 100644
+--- a/gst-libs/ext/libav/ffserver.c
++++ b/gst-libs/ext/libav/ffserver.c
+@@ -2937,12 +2937,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
+ {
+ AVFormatContext *avc;
+ AVStream *avs = NULL;
++ AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
+ int i;
+
+ avc = avformat_alloc_context();
+- if (avc == NULL) {
++ if (avc == NULL || !rtp_format) {
+ return -1;
+ }
++ avc->oformat = rtp_format;
+ av_dict_set(&avc->metadata, "title",
+ stream->title[0] ? stream->title : "No Title", 0);
+ avc->nb_streams = stream->nb_streams;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
new file mode 100644
index 0000000000..05a9de3334
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
@@ -0,0 +1,145 @@
+gst-ffmpeg: h264: set parameters from SPS whenever it changes
+
+Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
+alternating bit depths.
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/gst-libs/ext/libav/libavcodec/h264.c.old b/gst-libs/ext/libav/libavcodec/h264.c
+index 3621f41..718906a 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.c.old
++++ b/gst-libs/ext/libav/libavcodec/h264.c
+@@ -2491,6 +2491,34 @@ int ff_h264_get_profile(SPS *sps)
+ return profile;
+ }
+
++static int h264_set_parameter_from_sps(H264Context *h)
++{
++ MpegEncContext *s = &h->s;
++ AVCodecContext * avctx= s->avctx;
++
++ if (s->flags& CODEC_FLAG_LOW_DELAY ||
++ (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
++ s->low_delay=1;
++
++ if(avctx->has_b_frames < 2)
++ avctx->has_b_frames= !s->low_delay;
++
++ if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
++ if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
++ avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
++ h->pixel_shift = h->sps.bit_depth_luma > 8;
++
++ ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
++ ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
++ dsputil_init(&s->dsp, s->avctx);
++ } else {
++ av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
++ return -1;
++ }
++ }
++ return 0;
++}
++
+ /**
+ * decodes a slice header.
+ * This will also call MPV_common_init() and frame_start() as needed.
+@@ -2505,7 +2533,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
+ MpegEncContext * const s0 = &h0->s;
+ unsigned int first_mb_in_slice;
+ unsigned int pps_id;
+- int num_ref_idx_active_override_flag;
++ int num_ref_idx_active_override_flag, ret;
+ unsigned int slice_type, tmp, i, j;
+ int default_ref_list_done = 0;
+ int last_pic_structure;
+@@ -2569,7 +2597,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
+ av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id);
+ return -1;
+ }
+- h->sps = *h0->sps_buffers[h->pps.sps_id];
++
++ if (h->pps.sps_id != h->current_sps_id ||
++ h0->sps_buffers[h->pps.sps_id]->new) {
++ h0->sps_buffers[h->pps.sps_id]->new = 0;
++
++ h->current_sps_id = h->pps.sps_id;
++ h->sps = *h0->sps_buffers[h->pps.sps_id];
++
++ if ((ret = h264_set_parameter_from_sps(h)) < 0)
++ return ret;
++ }
+
+ s->avctx->profile = ff_h264_get_profile(&h->sps);
+ s->avctx->level = h->sps.level_idc;
+@@ -3811,26 +3811,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
+ case NAL_SPS:
+ init_get_bits(&s->gb, ptr, bit_length);
+ ff_h264_decode_seq_parameter_set(h);
+-
+- if (s->flags& CODEC_FLAG_LOW_DELAY ||
+- (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
+- s->low_delay=1;
+-
+- if(avctx->has_b_frames < 2)
+- avctx->has_b_frames= !s->low_delay;
+-
+- if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
+- if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
+- avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
+- h->pixel_shift = h->sps.bit_depth_luma > 8;
+-
+- ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
+- ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
+- dsputil_init(&s->dsp, s->avctx);
+- } else {
+- av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
+- return -1;
+- }
++ if (h264_set_parameter_from_sps(h) < 0) {
++ return -1;
+ }
+ break;
+ case NAL_PPS:
+diff --git a/gst-libs/ext/libav/libavcodec/h264.h.old b/gst-libs/ext/libav/libavcodec/h264.h
+index e3cc815..b77ad98 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.h.old
++++ b/gst-libs/ext/libav/libavcodec/h264.h
+@@ -202,6 +202,7 @@ typedef struct SPS{
+ int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8
+ int residual_color_transform_flag; ///< residual_colour_transform_flag
+ int constraint_set_flags; ///< constraint_set[0-3]_flag
++ int new; ///< flag to keep track if the decoder context needs re-init due to changed SPS
+ }SPS;
+
+ /**
+@@ -333,6 +334,7 @@ typedef struct H264Context{
+ int emu_edge_width;
+ int emu_edge_height;
+
++ unsigned current_sps_id; ///< id of the current SPS
+ SPS sps; ///< current sps
+
+ /**
+diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c.old b/gst-libs/ext/libav/libavcodec/h264_ps.c
+index 7491807..0929098 100644
+--- a/gst-libs/ext/libav/libavcodec/h264_ps.c.old
++++ b/gst-libs/ext/libav/libavcodec/h264_ps.c
+@@ -438,10 +438,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
+ sps->timing_info_present_flag ? sps->time_scale : 0
+ );
+ }
++ sps->new = 1;
+
+ av_free(h->sps_buffers[sps_id]);
+- h->sps_buffers[sps_id]= sps;
+- h->sps = *sps;
++ h->sps_buffers[sps_id] = sps;
++ h->sps = *sps;
++ h->current_sps_id = sps_id;
++
+ return 0;
+ fail:
+ av_free(sps);
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
new file mode 100644
index 0000000000..5d45c1a96c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
@@ -0,0 +1,33 @@
+gst-ffmpeg: h264: skip error concealment when SPS and slices are
+ mismatching
+
+Fixes out of array accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d)
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/h264.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index da144db..0aab4e7 100644
+--- a/gst-libs/ext/libav/libavcodec/h264.c
++++ b/gst-libs/ext/libav/libavcodec/h264.c
+@@ -2351,7 +2351,7 @@ static int field_end(H264Context *h, int in_setup)
+ * past end by one (callers fault) and resync_mb_y != 0
+ * causes problems for the first MB line, too.
+ */
+- if (!FIELD_PICTURE)
++ if (!FIELD_PICTURE && h->current_slice && !h->sps.new)
+ ff_er_frame_end(s);
+
+ ff_MPV_frame_end(s);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
new file mode 100644
index 0000000000..1e62b50360
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
@@ -0,0 +1,39 @@
+gst-ffmpeg: h264_sei: Fix infinite loop.
+
+Fixsot yet fixed parts of CVE-2011-3946.
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/h264_sei.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+
+diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
+index 374e53d..80d70e5 100644
+--- a/gst-libs/ext/libav/libavcodec/h264_sei.c
++++ b/gst-libs/ext/libav/libavcodec/h264_sei.c
+@@ -169,11 +169,15 @@ int ff_h264_decode_sei(H264Context *h){
+
+ type=0;
+ do{
++ if (get_bits_left(&s->gb) < 8)
++ return -1;
+ type+= show_bits(&s->gb, 8);
+ }while(get_bits(&s->gb, 8) == 255);
+
+ size=0;
+ do{
++ if (get_bits_left(&s->gb) < 8)
++ return -1;
+ size+= show_bits(&s->gb, 8);
+ }while(get_bits(&s->gb, 8) == 255);
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
new file mode 100644
index 0000000000..6b60d163fb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
@@ -0,0 +1,30 @@
+gst-ffmpeg: huffyuvdec: check width more completely, avoid out of array
+ accesses
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/huffyuv.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
+index 6e88114..ca5bcd8 100644
+--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
++++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
+@@ -526,6 +526,10 @@ s->bgr32=1;
+ assert(0);
+ }
+
++ if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && avctx->width%4) {
++ av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 this colorspace and predictor\n");
++ return AVERROR_INVALIDDATA;
++ }
+ alloc_temp(s);
+
+ // av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
new file mode 100644
index 0000000000..ea4aa222b3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
@@ -0,0 +1,45 @@
+gst-ffmpeg: lavf: compute probe buffer size more reliably.
+
+The previous code computes the offset by reversing the growth
+of the allocated buffer size: it is complex and did lead to
+inconsistencies when the size limit is reached.
+
+Fix trac ticket #1991.
+(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)
+
+Conflicts:
+ libavformat/utils.c
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+---
+ libavformat/utils.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 7940037..be73c4a 100644
+--- a/gst-libs/ext/libav/libavformat/utils.c
++++ b/gst-libs/ext/libav/libavformat/utils.c
+@@ -459,7 +459,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
+ {
+ AVProbeData pd = { filename ? filename : "", NULL, -offset };
+ unsigned char *buf = NULL;
+- int ret = 0, probe_size;
++ int ret = 0, probe_size, buf_offset = 0;
+
+ if (!max_probe_size) {
+ max_probe_size = PROBE_BUF_MAX;
+@@ -499,7 +499,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
+ score = 0;
+ ret = 0; /* error was end of file, nothing read */
+ }
+- pd.buf_size += ret;
++ pd.buf_size = buf_offset += ret;
+ pd.buf = &buf[offset];
+
+ memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
new file mode 100644
index 0000000000..1e5fb7deb1
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
@@ -0,0 +1,44 @@
+gst-ffmpeg: pngdec/filter: dont access out of array elements at the end
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+---
+ libavcodec/pngdec.c | 12 ++++--------
+ 1 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
+index 97c0ad1..193e35e 100644
+--- a/gst-libs/ext/libav/libavcodec/pngdec.c
++++ b/gst-libs/ext/libav/libavcodec/pngdec.c
+@@ -190,7 +190,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
+ if(bpp >= 2) g = dst[1];\
+ if(bpp >= 3) b = dst[2];\
+ if(bpp >= 4) a = dst[3];\
+- for(; i < size; i+=bpp) {\
++ for(; i <= size - bpp; i+=bpp) {\
+ dst[i+0] = r = op(r, src[i+0], last[i+0]);\
+ if(bpp == 1) continue;\
+ dst[i+1] = g = op(g, src[i+1], last[i+1]);\
+@@ -206,13 +206,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
+ else if(bpp == 2) UNROLL1(2, op)\
+ else if(bpp == 3) UNROLL1(3, op)\
+ else if(bpp == 4) UNROLL1(4, op)\
+- else {\
+- for (; i < size; i += bpp) {\
+- int j;\
+- for (j = 0; j < bpp; j++)\
+- dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
+- }\
+- }
++ for (; i < size; i++) {\
++ dst[i] = op(dst[i-bpp], src[i], last[i]);\
++ }\
+
+ /* NOTE: 'dst' can be equal to 'last' */
+ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
new file mode 100644
index 0000000000..8c94232d6d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
@@ -0,0 +1,30 @@
+gst-ffmpeg: qdm2: check array index before use, fix out of array
+ accesses
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/qdm2.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
+index 4cf4b2f..1dfb8d5 100644
+--- a/gst-libs/ext/libav/libavcodec/qdm2.c
++++ b/gst-libs/ext/libav/libavcodec/qdm2.c
+@@ -1257,6 +1257,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
+ for (i = 0; packet_bytes > 0; i++) {
+ int j;
+
++ if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
++ SAMPLES_NEEDED_2("too many packet bytes");
++ return;
++ }
++
+ q->sub_packet_list_A[i].next = NULL;
+
+ if (i > 0) {
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
new file mode 100644
index 0000000000..43ffc03a69
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
@@ -0,0 +1,58 @@
+gst-ffmpeg: qdm2dec: fix buffer overflow. Fixes NGS00144
+
+This also adds a few lines of code from master that are needed for this fix.
+
+Thanks to Phillip for suggestions to improve the patch.
+Found-by: Phillip Langlois
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/qdm2.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
+index 3aa9e5b..e000df8 100644
+--- a/gst-libs/ext/libav/libavcodec/qdm2.c
++++ b/gst-libs/ext/libav/libavcodec/qdm2.c
+@@ -76,6 +76,7 @@ do { \
+ #define SAMPLES_NEEDED_2(why) \
+ av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
+
++#define QDM2_MAX_FRAME_SIZE 512
+
+ typedef int8_t sb_int8_array[2][30][64];
+
+@@ -168,7 +169,7 @@ typedef struct {
+ /// I/O data
+ const uint8_t *compressed_data;
+ int compressed_size;
+- float output_buffer[1024];
++ float output_buffer[QDM2_MAX_FRAME_SIZE * MPA_MAX_CHANNELS * 2];
+
+ /// Synthesis filter
+ MPADSPContext mpadsp;
+@@ -1819,6 +1820,9 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
+ s->group_order = av_log2(s->group_size) + 1;
+ s->frame_size = s->group_size / 16; // 16 iterations per super block
+
++ if (s->frame_size > QDM2_MAX_FRAME_SIZE)
++ return AVERROR_INVALIDDATA;
++
+ s->sub_sampling = s->fft_order - 7;
+ s->frequency_range = 255 / (1 << (2 - s->sub_sampling));
+
+@@ -1887,6 +1891,9 @@ static int qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
+ int ch, i;
+ const int frame_size = (q->frame_size * q->channels);
+
++ if((unsigned)frame_size > FF_ARRAY_ELEMS(q->output_buffer)/2)
++ return -1;
++
+ /* select input buffer */
+ q->compressed_data = in;
+ q->compressed_size = q->checksum_size;
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
new file mode 100644
index 0000000000..15b161469c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
@@ -0,0 +1,32 @@
+gst-ffmpeg: smackerdec: Check that the last indexes are within the
+ table.
+
+Fixes CVE-2011-3944
+
+Upstream-Status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/smacker.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
+index 30f99b4..2a8bae8 100644
+--- a/gst-libs/ext/libav/libavcodec/smacker.c
++++ b/gst-libs/ext/libav/libavcodec/smacker.c
+@@ -259,6 +259,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
+ if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
+ if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
+ if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
++ if(huff.current > huff.length){
++ ctx.last[0] = ctx.last[1] = ctx.last[2] = 1;
++ av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
++ return -1;
++ }
+
+ *recodes = huff.values;
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
new file mode 100644
index 0000000000..a1989cfeab
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
@@ -0,0 +1,32 @@
+gst-ffmpeg: vp3: Copy all 3 frames for thread updates.
+
+This fixes a double release of the current frame on deinit.
+Fixes CVE-2011-3934
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue.Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/vp3.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
+index 738ae9f..b5daafc 100644
+--- a/gst-libs/ext/libav/libavcodec/vp3.c
++++ b/gst-libs/ext/libav/libavcodec/vp3.c
+@@ -1859,7 +1859,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ ||s->width != s1->width
+ ||s->height!= s1->height) {
+ if (s != s1)
+- copy_fields(s, s1, golden_frame, current_frame);
++ copy_fields(s, s1, golden_frame, keyframe);
+ return -1;
+ }
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
new file mode 100644
index 0000000000..e83d8f402b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
@@ -0,0 +1,183 @@
+gst-ffmpeg: vp3: fix oob read for negative tokens and memleaks on error.
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue.Tao <yue.tao@windriver.com>
+
+---
+ libavcodec/vp3.c | 59 +++++++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
+index 36715bb..ce14e63 100644
+--- a/gst-libs/ext/libav/libavcodec/vp3.c
++++ b/gst-libs/ext/libav/libavcodec/vp3.c
+@@ -45,6 +45,7 @@
+ #define FRAGMENT_PIXELS 8
+
+ static av_cold int vp3_decode_end(AVCodecContext *avctx);
++static void vp3_decode_flush(AVCodecContext *avctx);
+
+ //FIXME split things out into their own arrays
+ typedef struct Vp3Fragment {
+@@ -890,7 +891,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ /* decode a VLC into a token */
+ token = get_vlc2(gb, vlc_table, 11, 3);
+ /* use the token to get a zero run, a coefficient, and an eob run */
+- if (token <= 6) {
++ if ((unsigned) token <= 6U) {
+ eob_run = eob_run_base[token];
+ if (eob_run_get_bits[token])
+ eob_run += get_bits(gb, eob_run_get_bits[token]);
+@@ -908,7 +909,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ coeff_i += eob_run;
+ eob_run = 0;
+ }
+- } else {
++ } else if (token >= 0) {
+ bits_to_get = coeff_get_bits[token];
+ if (bits_to_get)
+ bits_to_get = get_bits(gb, bits_to_get);
+@@ -942,6 +943,10 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
+ for (i = coeff_index+1; i <= coeff_index+zero_run; i++)
+ s->num_coded_frags[plane][i]--;
+ coeff_i++;
++ } else {
++ av_log(s->avctx, AV_LOG_ERROR,
++ "Invalid token %d\n", token);
++ return -1;
+ }
+ }
+
+@@ -991,6 +996,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ /* unpack the Y plane DC coefficients */
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
+ 0, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ /* reverse prediction of the Y-plane DC coefficients */
+ reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]);
+@@ -998,8 +1005,12 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ /* unpack the C plane DC coefficients */
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
+ 1, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
+ 2, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ /* reverse prediction of the C-plane DC coefficients */
+ if (!(s->avctx->flags & CODEC_FLAG_GRAY))
+@@ -1036,11 +1047,17 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
+ for (i = 1; i <= 63; i++) {
+ residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
+ 0, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+
+ residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
+ 1, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
+ 2, residual_eob_run);
++ if (residual_eob_run < 0)
++ return residual_eob_run;
+ }
+
+ return 0;
+@@ -1777,10 +1794,15 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data;
+ int qps_changed = 0, i, err;
+
++#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
++
+ if (!s1->current_frame.data[0]
+ ||s->width != s1->width
+- ||s->height!= s1->height)
++ ||s->height!= s1->height) {
++ if (s != s1)
++ copy_fields(s, s1, golden_frame, current_frame);
+ return -1;
++ }
+
+ if (s != s1) {
+ // init tables if the first frame hasn't been decoded
+@@ -1796,8 +1818,6 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
+ memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1]));
+ }
+
+-#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
+-
+ // copy previous frame data
+ copy_fields(s, s1, golden_frame, dsp);
+
+@@ -1987,9 +2007,6 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
+ Vp3DecodeContext *s = avctx->priv_data;
+ int i;
+
+- if (avctx->is_copy && !s->current_frame.data[0])
+- return 0;
+-
+ av_free(s->superblock_coding);
+ av_free(s->all_fragments);
+ av_free(s->coded_fragment_list[0]);
+@@ -2016,12 +2033,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
+ free_vlc(&s->motion_vector_vlc);
+
+ /* release all frames */
+- if (s->golden_frame.data[0])
+- ff_thread_release_buffer(avctx, &s->golden_frame);
+- if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY)
+- ff_thread_release_buffer(avctx, &s->last_frame);
+- /* no need to release the current_frame since it will always be pointing
+- * to the same frame as either the golden or last frame */
++ vp3_decode_flush(avctx);
+
+ return 0;
+ }
+@@ -2341,6 +2353,23 @@ static void vp3_decode_flush(AVCodecContext *avctx)
+ ff_thread_release_buffer(avctx, &s->current_frame);
+ }
+
++static int vp3_init_thread_copy(AVCodecContext *avctx)
++{
++ Vp3DecodeContext *s = avctx->priv_data;
++
++ s->superblock_coding = NULL;
++ s->all_fragments = NULL;
++ s->coded_fragment_list[0] = NULL;
++ s->dct_tokens_base = NULL;
++ s->superblock_fragments = NULL;
++ s->macroblock_coding = NULL;
++ s->motion_val[0] = NULL;
++ s->motion_val[1] = NULL;
++ s->edge_emu_buffer = NULL;
++
++ return 0;
++}
++
+ AVCodec ff_theora_decoder = {
+ .name = "theora",
+ .type = AVMEDIA_TYPE_VIDEO,
+@@ -2352,6 +2381,7 @@ AVCodec ff_theora_decoder = {
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
+ .flush = vp3_decode_flush,
+ .long_name = NULL_IF_CONFIG_SMALL("Theora"),
++ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
+ .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
+ };
+ #endif
+@@ -2367,5 +2397,6 @@ AVCodec ff_vp3_decoder = {
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
+ .flush = vp3_decode_flush,
+ .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
++ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
+ .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
+ };
+--
+1.7.5.4
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
new file mode 100644
index 0000000000..c8bafd570e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
@@ -0,0 +1,68 @@
+From 6043c431c97d55173f339fafbd033d3c0642e2e9 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 3 Oct 2014 01:50:27 +0200
+Subject: [PATCH 2/2] avcodec/mjpegdec: check bits per pixel for changes
+ similar to dimensions
+
+Upstream-Status: Backport
+
+Fixes out of array accesses
+Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+
+Conflicts:
+ libavcodec/mjpegdec.c
+---
+ libavcodec/mjpegdec.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/gst-libs/ext/libav/libavcodec/mjpegdec.c b/gst-libs/ext/libav/libavcodec/mjpegdec.c
+index 84343c0..c0137d8 100644
+--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
++++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
+@@ -210,16 +210,16 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
+
+ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+ {
+- int len, nb_components, i, width, height, pix_fmt_id;
++ int len, nb_components, i, bits, width, height, pix_fmt_id;
+
+ /* XXX: verify len field validity */
+ len = get_bits(&s->gb, 16);
+- s->bits= get_bits(&s->gb, 8);
++ bits= get_bits(&s->gb, 8);
+
+- if(s->pegasus_rct) s->bits=9;
+- if(s->bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
++ if(s->pegasus_rct) bits=9;
++ if(bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
+
+- if (s->bits != 8 && !s->lossless){
++ if (bits != 8 && !s->lossless){
+ av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
+ return -1;
+ }
+@@ -239,7 +239,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+ if (nb_components <= 0 ||
+ nb_components > MAX_COMPONENTS)
+ return -1;
+- if (s->ls && !(s->bits <= 8 || nb_components == 1)){
++ if (s->ls && !(bits <= 8 || nb_components == 1)){
+ av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n");
+ return -1;
+ }
+@@ -272,10 +272,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
+
+ /* if different size, realloc/alloc picture */
+ /* XXX: also check h_count and v_count */
+- if (width != s->width || height != s->height) {
++ if (width != s->width || height != s->height || bits != s->bits) {
+ av_freep(&s->qscale_table);
+
+ s->width = width;
++ s->bits= bits;
+ s->height = height;
+ s->interlaced = 0;
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
new file mode 100644
index 0000000000..3c8d8e353e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
@@ -0,0 +1,100 @@
+gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0855
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/gst-libs/ext/libav/libavcodec/alac.c.old b/gst-libs/ext/libav/libavcodec/alac.c
+index 2a0df8c..bcbd56d 100644
+--- a/gst-libs/ext/libav/libavcodec/alac.c.old
++++ b/gst-libs/ext/libav/libavcodec/alac.c
+@@ -87,18 +87,44 @@ typedef struct {
+ int wasted_bits;
+ } ALACContext;
+
+-static void allocate_buffers(ALACContext *alac)
++static av_cold int alac_decode_close(AVCodecContext *avctx)
++{
++ ALACContext *alac = avctx->priv_data;
++
++ int chan;
++ for (chan = 0; chan < MAX_CHANNELS; chan++) {
++ av_freep(&alac->predicterror_buffer[chan]);
++ av_freep(&alac->outputsamples_buffer[chan]);
++ av_freep(&alac->wasted_bits_buffer[chan]);
++ }
++
++ return 0;
++}
++
++static int allocate_buffers(ALACContext *alac)
+ {
+ int chan;
++ int buf_size;
++
++ if (alac->setinfo_max_samples_per_frame > INT_MAX / sizeof(int32_t))
++ goto buf_alloc_fail;
++ buf_size = alac->setinfo_max_samples_per_frame * sizeof(int32_t);
++
+ for (chan = 0; chan < MAX_CHANNELS; chan++) {
+- alac->predicterror_buffer[chan] =
+- av_malloc(alac->setinfo_max_samples_per_frame * 4);
+
+- alac->outputsamples_buffer[chan] =
+- av_malloc(alac->setinfo_max_samples_per_frame * 4);
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->predicterror_buffer[chan],
++ buf_size, buf_alloc_fail);
+
+- alac->wasted_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4);
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->outputsamples_buffer[chan],
++ buf_size, buf_alloc_fail);
++
++ FF_ALLOC_OR_GOTO(alac->avctx, alac->wasted_bits_buffer[chan],
++ buf_size, buf_alloc_fail);
+ }
++ return 0;
++buf_alloc_fail:
++ alac_decode_close(alac->avctx);
++ return AVERROR(ENOMEM);
+ }
+
+ static int alac_set_info(ALACContext *alac)
+@@ -131,8 +157,6 @@ static int alac_set_info(ALACContext *alac)
+ bytestream_get_be32(&ptr); /* bitrate ? */
+ bytestream_get_be32(&ptr); /* samplerate */
+
+- allocate_buffers(alac);
+-
+ return 0;
+ }
+
+@@ -659,6 +683,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
+
+ static av_cold int alac_decode_init(AVCodecContext * avctx)
+ {
++ int ret;
+ ALACContext *alac = avctx->priv_data;
+ alac->avctx = avctx;
+ alac->numchannels = alac->avctx->channels;
+@@ -674,18 +699,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
+ return -1;
+ }
+
+- return 0;
+-}
+-
+-static av_cold int alac_decode_close(AVCodecContext *avctx)
+-{
+- ALACContext *alac = avctx->priv_data;
+-
+- int chan;
+- for (chan = 0; chan < MAX_CHANNELS; chan++) {
+- av_freep(&alac->predicterror_buffer[chan]);
+- av_freep(&alac->outputsamples_buffer[chan]);
+- av_freep(&alac->wasted_bits_buffer[chan]);
++ if ((ret = allocate_buffers(alac)) < 0) {
++ av_log(avctx, AV_LOG_ERROR, "Error allocating buffers\n");
++ return ret;
+ }
+
+ return 0;
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch
new file mode 100644
index 0000000000..9055b341dc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch
@@ -0,0 +1,9304 @@
+Taken from gentoo patchset:
+http://dev.gentoo.org/~tetromino/distfiles/gst-plugins-ffmpeg/gst-ffmpeg-0.10.13_p2012.11-libav-9-patches.tar.xz
+
+Upstream-Status: Pending
+
+Contains following changes, rebased to apply on top of our changes
+0002-Fix-includes-for-systemwide-build.patch
+0003-libav-Switch-to-non-deprecated-symbols.patch
+0005-av-Update-for-some-constant-changes.patch
+0006-av-Remove-palette-support-for-now.patch
+0007-av-Port-remaining-simple-bits.patch
+0008-av-Use-av_codec_is_-en-de-coder-API-instead-of-priva.patch
+0009-avprotocol-Port-from-the-URL-protocol-handler-to-san.patch
+0010-avdec-don-t-wait-for-keyframe.patch
+
+Following changes were skipped:
+0001-Partially-revert-commit-0300801b.patch
+0004-av-update-to-use-AVOption-variants.patch
+0011-av_get_bits_per_sample_format-was-removed-in-libav-9.patch
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.c 2014-08-08 15:26:07.872857555 +0200
+@@ -151,9 +151,6 @@
+ #endif
+ gst_ffmpegaudioresample_register (plugin);
+
+- av_register_protocol2 (&gstreamer_protocol, sizeof (URLProtocol));
+- av_register_protocol2 (&gstpipe_protocol, sizeof (URLProtocol));
+-
+ /* Now we can return the pointer to the newly created Plugin object. */
+ return TRUE;
+ }
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpeg.h 2011-05-17 10:53:16.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpeg.h 2014-08-08 15:26:07.872857555 +0200
+@@ -58,10 +58,13 @@
+ int gst_ffmpeg_avcodec_close (AVCodecContext *avctx);
+ int gst_ffmpeg_av_find_stream_info(AVFormatContext *ic);
+
+-G_END_DECLS
++int gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context);
++int gst_ffmpegdata_close (AVIOContext * h);
++typedef struct _GstFFMpegPipe GstFFMpegPipe;
++int gst_ffmpeg_pipe_open (GstFFMpegPipe *ffpipe, int flags, AVIOContext ** context);
++int gst_ffmpeg_pipe_close (AVIOContext * h);
+
+-extern URLProtocol gstreamer_protocol;
+-extern URLProtocol gstpipe_protocol;
++G_END_DECLS
+
+ /* use GST_FFMPEG URL_STREAMHEADER with URL_WRONLY if the first
+ * buffer should be used as streamheader property on the pad's caps. */
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcfg.c 2011-07-12 16:35:27.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcfg.c 2014-08-08 15:24:17.899853612 +0200
+@@ -147,7 +147,6 @@
+ {FF_DCT_FASTINT, "Fast Integer", "fastint"},
+ {FF_DCT_INT, "Accurate Integer", "int"},
+ {FF_DCT_MMX, "MMX", "mmx"},
+- {FF_DCT_MLIB, "MLIB", "mlib"},
+ {FF_DCT_ALTIVEC, "ALTIVEC", "altivec"},
+ {FF_DCT_FAAN, "FAAN", "faan"},
+ {0, NULL, NULL},
+@@ -173,8 +172,6 @@
+ {FF_IDCT_SIMPLE, "Simple", "simple"},
+ {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"},
+ {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"},
+- {FF_IDCT_PS2, "PS2", "ps2"},
+- {FF_IDCT_MLIB, "MLIB", "mlib"},
+ {FF_IDCT_ARM, "ARM", "arm"},
+ {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"},
+ {FF_IDCT_SH4, "SH4", "sh4"},
+@@ -263,16 +260,11 @@
+
+ if (!ffmpeg_flags_type) {
+ static const GFlagsValue ffmpeg_flags[] = {
+- {CODEC_FLAG_OBMC, "Use overlapped block motion compensation (h263+)",
+- "obmc"},
+ {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
+ {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
+- {CODEC_FLAG_H263P_AIV, "H.263 alternative inter VLC", "aiv"},
+ {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
+ {CODEC_FLAG_GMC, "GMC", "gmc"},
+ {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
+- {CODEC_FLAG_PART,
+- "Store MV, DC and AC coefficients in seperate partitions", "part"},
+ {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
+ {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
+ {CODEC_FLAG_NORMALIZE_AQP,
+@@ -282,13 +274,9 @@
+ "global-headers"},
+ {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
+ "aic"},
+- {CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
+ {CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
+ {CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection",
+ "qp-rd"},
+- {CODEC_FLAG_H263P_SLICE_STRUCT, "H263 slice struct", "ss"},
+- {CODEC_FLAG_SVCD_SCAN_OFFSET,
+- "Reserve space for SVCD scan offset user data", "scanoffset"},
+ {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
+ {0, NULL, NULL},
+ };
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c 2014-08-08 15:31:30.968869139 +0200
+@@ -25,8 +25,10 @@
+ #include <gst/gst.h>
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avcodec.h>
++#include <channel_layout.h>>
+ #else
+ #include <libavcodec/avcodec.h>
++#include <libavutil/channel_layout.h>
+ #endif
+ #include <string.h>
+
+@@ -35,43 +37,6 @@
+
+ #include <gst/pbutils/codec-utils.h>
+
+-/*
+- * Read a palette from a caps.
+- */
+-
+-static void
+-gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
+-{
+- GstStructure *str = gst_caps_get_structure (caps, 0);
+- const GValue *palette_v;
+- const GstBuffer *palette;
+-
+- /* do we have a palette? */
+- if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
+- palette = gst_value_get_buffer (palette_v);
+- if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
+- if (context->palctrl)
+- av_free (context->palctrl);
+- context->palctrl = av_malloc (sizeof (AVPaletteControl));
+- context->palctrl->palette_changed = 1;
+- memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
+- AVPALETTE_SIZE);
+- }
+- }
+-}
+-
+-static void
+-gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
+-{
+- if (context->palctrl) {
+- GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
+-
+- memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
+- AVPALETTE_SIZE);
+- gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
+- }
+-}
+-
+ /* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
+ static const struct
+ {
+@@ -79,26 +44,26 @@
+ GstAudioChannelPosition gst;
+ } _ff_to_gst_layout[] = {
+ {
+- CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
+- CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
+- CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
+- CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
+- CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
+- CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
+- CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
+- CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
+- CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
+- CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
+- CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
+- CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
+- CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
+- CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
++ AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
++ AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
++ AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
++ AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
++ AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
++ AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
++ AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
++ AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
++ AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
++ AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
++ AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
+ };
+
+ static GstAudioChannelPosition *
+@@ -342,8 +307,8 @@
+
+ if (channel_layout == 0) {
+ const guint64 default_channel_set[] = {
+- 0, 0, CH_LAYOUT_SURROUND, CH_LAYOUT_QUAD, CH_LAYOUT_5POINT0,
+- CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
++ 0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
++ AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
+ };
+
+ switch (codec_id) {
+@@ -1267,8 +1232,6 @@
+ case CODEC_ID_FLIC:
+ case CODEC_ID_VMDVIDEO:
+ case CODEC_ID_VMDAUDIO:
+- case CODEC_ID_SONIC:
+- case CODEC_ID_SONIC_LS:
+ case CODEC_ID_SNOW:
+ case CODEC_ID_VIXL:
+ case CODEC_ID_QPEG:
+@@ -1689,11 +1652,6 @@
+ gst_buffer_unref (data);
+ }
+
+- /* palette */
+- if (context) {
+- gst_ffmpeg_set_palette (caps, context);
+- }
+-
+ GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
+
+ } else {
+@@ -1830,9 +1788,6 @@
+ "bpp", G_TYPE_INT, bpp,
+ "depth", G_TYPE_INT, depth,
+ "endianness", G_TYPE_INT, endianness, NULL);
+- if (caps && context) {
+- gst_ffmpeg_set_palette (caps, context);
+- }
+ }
+ } else if (fmt) {
+ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
+@@ -1857,7 +1812,7 @@
+ */
+
+ static GstCaps *
+-gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt,
++gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
+ AVCodecContext * context, enum CodecID codec_id)
+ {
+ GstCaps *caps = NULL;
+@@ -1867,22 +1822,22 @@
+ gboolean signedness = FALSE;
+
+ switch (sample_fmt) {
+- case SAMPLE_FMT_S16:
++ case AV_SAMPLE_FMT_S16:
+ signedness = TRUE;
+ bpp = 16;
+ break;
+
+- case SAMPLE_FMT_S32:
++ case AV_SAMPLE_FMT_S32:
+ signedness = TRUE;
+ bpp = 32;
+ break;
+
+- case SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_FLT:
+ integer = FALSE;
+ bpp = 32;
+ break;
+
+- case SAMPLE_FMT_DBL:
++ case AV_SAMPLE_FMT_DBL:
+ integer = FALSE;
+ bpp = 64;
+ break;
+@@ -1941,12 +1896,12 @@
+ }
+ } else {
+ GstCaps *temp;
+- enum SampleFormat i;
++ enum AVSampleFormat i;
+ AVCodecContext ctx = { 0, };
+
+ ctx.channels = -1;
+ caps = gst_caps_new_empty ();
+- for (i = 0; i <= SAMPLE_FMT_DBL; i++) {
++ for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
+ temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
+ if (temp != NULL) {
+ gst_caps_append (caps, temp);
+@@ -2049,9 +2004,9 @@
+ gst_structure_get_int (structure, "endianness", &endianness)) {
+ if (endianness == G_BYTE_ORDER) {
+ if (width == 32)
+- context->sample_fmt = SAMPLE_FMT_FLT;
++ context->sample_fmt = AV_SAMPLE_FMT_FLT;
+ else if (width == 64)
+- context->sample_fmt = SAMPLE_FMT_DBL;
++ context->sample_fmt = AV_SAMPLE_FMT_DBL;
+ }
+ }
+ } else {
+@@ -2062,9 +2017,9 @@
+ gst_structure_get_int (structure, "endianness", &endianness)) {
+ if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
+ if ((width == 16) && (depth == 16))
+- context->sample_fmt = SAMPLE_FMT_S16;
++ context->sample_fmt = AV_SAMPLE_FMT_S16;
+ else if ((width == 32) && (depth == 32))
+- context->sample_fmt = SAMPLE_FMT_S32;
++ context->sample_fmt = AV_SAMPLE_FMT_S32;
+ }
+ }
+ }
+@@ -2190,7 +2145,6 @@
+ } else {
+ if (bpp == 8) {
+ context->pix_fmt = PIX_FMT_PAL8;
+- gst_ffmpeg_get_palette (caps, context);
+ }
+ }
+ }
+@@ -2576,7 +2530,6 @@
+ switch (codec_type) {
+ case AVMEDIA_TYPE_VIDEO:
+ gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
+- gst_ffmpeg_get_palette (caps, context);
+ break;
+ case AVMEDIA_TYPE_AUDIO:
+ gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.orig 2014-08-08 15:30:34.006867097 +0200
+@@ -0,0 +1,3447 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ * This file:
++ * Copyright (c) 2002-2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
++ *
++ * 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., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include <gst/gst.h>
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#include <channel_layout.h>>
++#else
++#include <libavcodec/avcodec.h>
++#include <libavutil/channel_layout.h>
++#endif
++#include <string.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++
++#include <gst/pbutils/codec-utils.h>
++
++/*
++ * Read a palette from a caps.
++ */
++
++static void
++gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
++{
++ GstStructure *str = gst_caps_get_structure (caps, 0);
++ const GValue *palette_v;
++ const GstBuffer *palette;
++
++ /* do we have a palette? */
++ if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
++ palette = gst_value_get_buffer (palette_v);
++ if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
++ if (context->palctrl)
++ av_free (context->palctrl);
++ context->palctrl = av_malloc (sizeof (AVPaletteControl));
++ context->palctrl->palette_changed = 1;
++ memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
++ AVPALETTE_SIZE);
++ }
++ }
++}
++
++static void
++gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
++{
++ if (context->palctrl) {
++ GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
++
++ memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
++ AVPALETTE_SIZE);
++ gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
++ }
++}
++
++/* IMPORTANT: Keep this sorted by the ffmpeg channel masks */
++static const struct
++{
++ guint64 ff;
++ GstAudioChannelPosition gst;
++} _ff_to_gst_layout[] = {
++ {
++ AV_CH_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
++ AV_CH_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
++ AV_CH_LOW_FREQUENCY, GST_AUDIO_CHANNEL_POSITION_LFE}, {
++ AV_CH_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
++ AV_CH_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
++ AV_CH_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
++ AV_CH_FRONT_RIGHT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
++ AV_CH_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
++ AV_CH_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
++ AV_CH_SIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
++ AV_CH_TOP_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_LEFT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_NONE}, {
++ AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
++ AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
++};
++
++static GstAudioChannelPosition *
++gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
++{
++ guint nchannels = 0, i, j;
++ GstAudioChannelPosition *pos = NULL;
++ gboolean none_layout = FALSE;
++
++ for (i = 0; i < 64; i++) {
++ if ((channel_layout & (G_GUINT64_CONSTANT (1) << i)) != 0) {
++ nchannels++;
++ }
++ }
++
++ if (channel_layout == 0) {
++ nchannels = channels;
++ none_layout = TRUE;
++ }
++
++ if (nchannels != channels) {
++ GST_ERROR ("Number of channels is different (%u != %u)", channels,
++ nchannels);
++ return NULL;
++ }
++
++ pos = g_new (GstAudioChannelPosition, nchannels);
++
++ for (i = 0, j = 0; i < G_N_ELEMENTS (_ff_to_gst_layout); i++) {
++ if ((channel_layout & _ff_to_gst_layout[i].ff) != 0) {
++ pos[j++] = _ff_to_gst_layout[i].gst;
++
++ if (_ff_to_gst_layout[i].gst == GST_AUDIO_CHANNEL_POSITION_NONE)
++ none_layout = TRUE;
++ }
++ }
++
++ if (j != nchannels) {
++ GST_WARNING ("Unknown channels in channel layout - assuming NONE layout");
++ none_layout = TRUE;
++ }
++
++ if (!none_layout && !gst_audio_check_channel_positions (pos, nchannels)) {
++ GST_ERROR ("Invalid channel layout %" G_GUINT64_FORMAT
++ " - assuming NONE layout", channel_layout);
++ none_layout = TRUE;
++ }
++
++ if (none_layout) {
++ if (nchannels == 1) {
++ pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
++ } else if (nchannels == 2) {
++ pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
++ pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
++ } else if (channel_layout == 0) {
++ g_free (pos);
++ pos = NULL;
++ } else {
++ for (i = 0; i < nchannels; i++)
++ pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
++ }
++ }
++
++ if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER) {
++ GST_DEBUG ("mono common case; won't set channel positions");
++ g_free (pos);
++ pos = NULL;
++ } else if (nchannels == 2 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT
++ && pos[1] == GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT) {
++ GST_DEBUG ("stereo common case; won't set channel positions");
++ g_free (pos);
++ pos = NULL;
++ }
++
++ return pos;
++}
++
++/* this macro makes a caps width fixed or unfixed width/height
++ * properties depending on whether we've got a context.
++ *
++ * See below for why we use this.
++ *
++ * We should actually do this stuff at the end, like in riff-media.c,
++ * but I'm too lazy today. Maybe later.
++ */
++static GstCaps *
++gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id,
++ const char *mimetype, const char *fieldname, ...)
++{
++ GstStructure *structure = NULL;
++ GstCaps *caps = NULL;
++ va_list var_args;
++ gint i;
++
++ GST_LOG ("context:%p, codec_id:%d, mimetype:%s", context, codec_id, mimetype);
++
++ /* fixed, non probing context */
++ if (context != NULL && context->width != -1) {
++ gint num, denom;
++
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, context->width,
++ "height", G_TYPE_INT, context->height, NULL);
++
++ num = context->time_base.den / context->ticks_per_frame;
++ denom = context->time_base.num;
++
++ if (!denom) {
++ GST_LOG ("invalid framerate: %d/0, -> %d/1", num, num);
++ denom = 1;
++ }
++ if (gst_util_fraction_compare (num, denom, 1000, 1) > 0) {
++ GST_LOG ("excessive framerate: %d/%d, -> 0/1", num, denom);
++ num = 0;
++ denom = 1;
++ }
++ GST_LOG ("setting framerate: %d/%d", num, denom);
++ gst_caps_set_simple (caps,
++ "framerate", GST_TYPE_FRACTION, num, denom, NULL);
++ } else {
++ /* so we are after restricted caps in this case */
++ switch (codec_id) {
++ case CODEC_ID_H261:
++ {
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 352,
++ "height", G_TYPE_INT, 288,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ gst_caps_append (caps, gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 176,
++ "height", G_TYPE_INT, 144,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
++ break;
++ }
++ case CODEC_ID_H263:
++ {
++ /* 128x96, 176x144, 352x288, 704x576, and 1408x1152. slightly reordered
++ * because we want automatic negotiation to go as close to 320x240 as
++ * possible. */
++ const static gint widths[] = { 352, 704, 176, 1408, 128 };
++ const static gint heights[] = { 288, 576, 144, 1152, 96 };
++ GstCaps *temp;
++ gint n_sizes = G_N_ELEMENTS (widths);
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < n_sizes; i++) {
++ temp = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, widths[i],
++ "height", G_TYPE_INT, heights[i],
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++
++ gst_caps_append (caps, temp);
++ }
++ break;
++ }
++ case CODEC_ID_DVVIDEO:
++ {
++ static struct
++ {
++ guint32 csp;
++ gint width, height;
++ gint par_n, par_d;
++ gint framerate_n, framerate_d;
++ } profiles[] = {
++ {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 10, 11, 30000, 1001}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 480, 40, 33, 30000, 1001}, {
++ GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 59, 54, 25, 1}, {
++ GST_MAKE_FOURCC ('I', '4', '2', '0'), 720, 576, 118, 81, 25, 1}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 59, 54, 25, 1}, {
++ GST_MAKE_FOURCC ('Y', '4', '1', 'B'), 720, 576, 118, 81, 25, 1}
++ };
++ GstCaps *temp;
++ gint n_sizes = G_N_ELEMENTS (profiles);
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < n_sizes; i++) {
++ temp = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, profiles[i].width,
++ "height", G_TYPE_INT, profiles[i].height,
++ "framerate", GST_TYPE_FRACTION, profiles[i].framerate_n,
++ profiles[i].framerate_d, "pixel-aspect-ratio", GST_TYPE_FRACTION,
++ profiles[i].par_n, profiles[i].par_d, NULL);
++
++ gst_caps_append (caps, temp);
++ }
++ break;
++ }
++ case CODEC_ID_DNXHD:
++ {
++ caps = gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 1920,
++ "height", G_TYPE_INT, 1080,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ gst_caps_append (caps, gst_caps_new_simple (mimetype,
++ "width", G_TYPE_INT, 1280,
++ "height", G_TYPE_INT, 720,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL));
++ break;
++ }
++ default:
++ break;
++ }
++ }
++
++ /* no fixed caps or special restrictions applied;
++ * default unfixed setting */
++ if (!caps) {
++ GST_DEBUG ("Creating default caps");
++ caps = gst_caps_new_simple (mimetype,
++ "width", GST_TYPE_INT_RANGE, 16, 4096,
++ "height", GST_TYPE_INT_RANGE, 16, 4096,
++ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
++ }
++
++ for (i = 0; i < gst_caps_get_size (caps); i++) {
++ va_start (var_args, fieldname);
++ structure = gst_caps_get_structure (caps, i);
++ gst_structure_set_valist (structure, fieldname, var_args);
++ va_end (var_args);
++ }
++
++ return caps;
++}
++
++/* same for audio - now with channels/sample rate
++ */
++static GstCaps *
++gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
++ const char *mimetype, const char *fieldname, ...)
++{
++ GstCaps *caps = NULL;
++ GstStructure *structure = NULL;
++ gint i;
++ va_list var_args;
++
++ /* fixed, non-probing context */
++ if (context != NULL && context->channels != -1) {
++ GstAudioChannelPosition *pos;
++ guint64 channel_layout = context->channel_layout;
++
++ if (channel_layout == 0) {
++ const guint64 default_channel_set[] = {
++ 0, 0, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_5POINT0,
++ AV_CH_LAYOUT_5POINT1, 0, AV_CH_LAYOUT_7POINT1
++ };
++
++ switch (codec_id) {
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ case CODEC_ID_DTS:
++ if (context->channels > 0
++ && context->channels < G_N_ELEMENTS (default_channel_set))
++ channel_layout = default_channel_set[context->channels - 1];
++ break;
++ default:
++ break;
++ }
++ }
++
++ caps = gst_caps_new_simple (mimetype,
++ "rate", G_TYPE_INT, context->sample_rate,
++ "channels", G_TYPE_INT, context->channels, NULL);
++
++ pos = gst_ff_channel_layout_to_gst (channel_layout, context->channels);
++ if (pos != NULL) {
++ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
++ g_free (pos);
++ }
++ } else {
++ gint maxchannels = 2;
++ const gint *rates = NULL;
++ gint n_rates = 0;
++
++ /* so we must be after restricted caps in this case */
++ switch (codec_id) {
++ case CODEC_ID_AAC:
++ case CODEC_ID_AAC_LATM:
++ case CODEC_ID_DTS:
++ maxchannels = 6;
++ break;
++ case CODEC_ID_MP2:
++ {
++ const static gint l_rates[] =
++ { 48000, 44100, 32000, 24000, 22050, 16000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ {
++ const static gint l_rates[] = { 48000, 44100, 32000 };
++ maxchannels = 6;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_ADPCM_G722:
++ {
++ const static gint l_rates[] = { 16000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ maxchannels = 1;
++ break;
++ }
++ case CODEC_ID_ADPCM_G726:
++ {
++ const static gint l_rates[] = { 8000 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ maxchannels = 1;
++ break;
++ }
++ case CODEC_ID_ADPCM_SWF:
++ {
++ const static gint l_rates[] = { 11025, 22050, 44100 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_ROQ_DPCM:
++ {
++ const static gint l_rates[] = { 22050 };
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_AMR_NB:
++ {
++ const static gint l_rates[] = { 8000 };
++ maxchannels = 1;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ case CODEC_ID_AMR_WB:
++ {
++ const static gint l_rates[] = { 16000 };
++ maxchannels = 1;
++ n_rates = G_N_ELEMENTS (l_rates);
++ rates = l_rates;
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* TODO: handle context->channel_layouts here to set
++ * the list of channel layouts supported by the encoder.
++ * Unfortunately no encoder uses this yet....
++ */
++ /* regardless of encode/decode, open up channels if applicable */
++ /* Until decoders/encoders expose the maximum number of channels
++ * they support, we whitelist them here. */
++ switch (codec_id) {
++ case CODEC_ID_WMAPRO:
++ case CODEC_ID_TRUEHD:
++ maxchannels = 8;
++ break;
++ default:
++ break;
++ }
++
++ if (maxchannels == 1)
++ caps = gst_caps_new_simple (mimetype,
++ "channels", G_TYPE_INT, maxchannels, NULL);
++ else
++ caps = gst_caps_new_simple (mimetype,
++ "channels", GST_TYPE_INT_RANGE, 1, maxchannels, NULL);
++ if (n_rates) {
++ GValue list = { 0, };
++ GstStructure *structure;
++
++ g_value_init (&list, GST_TYPE_LIST);
++ for (i = 0; i < n_rates; i++) {
++ GValue v = { 0, };
++
++ g_value_init (&v, G_TYPE_INT);
++ g_value_set_int (&v, rates[i]);
++ gst_value_list_append_value (&list, &v);
++ g_value_unset (&v);
++ }
++ structure = gst_caps_get_structure (caps, 0);
++ gst_structure_set_value (structure, "rate", &list);
++ g_value_unset (&list);
++ } else
++ gst_caps_set_simple (caps, "rate", GST_TYPE_INT_RANGE, 4000, 96000, NULL);
++ }
++
++ for (i = 0; i < gst_caps_get_size (caps); i++) {
++ va_start (var_args, fieldname);
++ structure = gst_caps_get_structure (caps, i);
++ gst_structure_set_valist (structure, fieldname, var_args);
++ va_end (var_args);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG codec ID and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * CodecID is primarily meant for compressed data GstCaps!
++ *
++ * encode is a special parameter. gstffmpegdec will say
++ * FALSE, gstffmpegenc will say TRUE. The output caps
++ * depends on this, in such a way that it will be very
++ * specific, defined, fixed and correct caps for encoders,
++ * yet very wide, "forgiving" caps for decoders. Example
++ * for mp3: decode: audio/mpeg,mpegversion=1,layer=[1-3]
++ * but encode: audio/mpeg,mpegversion=1,layer=3,bitrate=x,
++ * rate=x,channels=x.
++ */
++
++GstCaps *
++gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
++ AVCodecContext * context, gboolean encode)
++{
++ GstCaps *caps = NULL;
++ gboolean buildcaps = FALSE;
++
++ GST_LOG ("codec_id:%d, context:%p, encode:%d", codec_id, context, encode);
++
++ switch (codec_id) {
++ case CODEC_ID_MPEG1VIDEO:
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 1,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ break;
++
++ case CODEC_ID_MPEG2VIDEO:
++ if (encode) {
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 2,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ } else {
++ /* decode both MPEG-1 and MPEG-2; width/height/fps are all in
++ * the MPEG video stream headers, so may be omitted from caps. */
++ caps = gst_caps_new_simple ("video/mpeg",
++ "mpegversion", GST_TYPE_INT_RANGE, 1, 2,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ }
++ break;
++
++ case CODEC_ID_MPEG2VIDEO_XVMC:
++ /* this is a special ID - don't need it in GStreamer, I think */
++ break;
++
++ case CODEC_ID_H263:
++ if (encode) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu",
++ "h263version", G_TYPE_STRING, "h263", NULL);
++ } else {
++ /* don't pass codec_id, we can decode other variants with the H263
++ * decoder that don't have specific size requirements
++ */
++ caps = gst_ff_vid_caps_new (context, CODEC_ID_NONE, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu", NULL);
++ }
++ break;
++
++ case CODEC_ID_H263P:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
++ "variant", G_TYPE_STRING, "itu",
++ "h263version", G_TYPE_STRING, "h263p", NULL);
++ if (encode && context) {
++
++ gst_caps_set_simple (caps,
++ "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV,
++ "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER,
++ "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
++ "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
++ NULL);
++ }
++ break;
++
++ case CODEC_ID_H263I:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-intel-h263",
++ "variant", G_TYPE_STRING, "intel", NULL);
++ break;
++
++ case CODEC_ID_H261:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h261", NULL);
++ break;
++
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ {
++ gint version;
++
++ switch (codec_id) {
++ case CODEC_ID_RV40:
++ version = 4;
++ break;
++ case CODEC_ID_RV30:
++ version = 3;
++ break;
++ case CODEC_ID_RV20:
++ version = 2;
++ break;
++ default:
++ version = 1;
++ break;
++ }
++
++ /* FIXME: context->sub_id must be filled in during decoding */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-pn-realvideo",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "rmversion", G_TYPE_INT, version, NULL);
++ if (context) {
++ gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL);
++ if (context->extradata_size >= 8) {
++ gst_caps_set_simple (caps,
++ "subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata),
++ NULL);
++ }
++ }
++ }
++ break;
++
++ case CODEC_ID_MP1:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_MP2:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_MP3:
++ if (encode) {
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
++ } else {
++ /* Decodes MPEG-1 layer 1/2/3. Samplerate, channels et al are
++ * in the MPEG audio header, so may be omitted from caps. */
++ caps = gst_caps_new_simple ("audio/mpeg",
++ "mpegversion", G_TYPE_INT, 1,
++ "layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
++ }
++ break;
++
++ case CODEC_ID_MUSEPACK7:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id,
++ "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 7,
++ NULL);
++ break;
++
++ case CODEC_ID_MUSEPACK8:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id,
++ "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 8,
++ NULL);
++ break;
++
++ case CODEC_ID_AC3:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL);
++ break;
++
++ case CODEC_ID_EAC3:
++ /* FIXME: bitrate */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-eac3", NULL);
++ break;
++
++ case CODEC_ID_TRUEHD:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-true-hd", NULL);
++ break;
++
++ case CODEC_ID_ATRAC1:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac1",
++ NULL);
++ break;
++
++ case CODEC_ID_ATRAC3:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-vnd.sony.atrac3",
++ NULL);
++ break;
++
++ case CODEC_ID_DTS:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dts", NULL);
++ break;
++
++ case CODEC_ID_APE:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-ffmpeg-parsed-ape",
++ NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_MLP:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mlp", NULL);
++ break;
++
++ case CODEC_ID_IMC:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-imc", NULL);
++ break;
++
++ /* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB
++ * is Quicktime's MJPEG-B. LJPEG is lossless JPEG. I don't know what
++ * sp5x is, but it's apparently something JPEG... We don't separate
++ * between those in GStreamer. Should we (at least between MJPEG,
++ * MJPEG-B and sp5x decoding...)? */
++ case CODEC_ID_MJPEG:
++ case CODEC_ID_LJPEG:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/jpeg", NULL);
++ break;
++
++ case CODEC_ID_SP5X:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/sp5x", NULL);
++ break;
++
++ case CODEC_ID_MJPEGB:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mjpeg-b", NULL);
++ break;
++
++ case CODEC_ID_MPEG4:
++ if (encode && context != NULL) {
++ /* I'm not exactly sure what ffmpeg outputs... ffmpeg itself uses
++ * the AVI fourcc 'DIVX', but 'mp4v' for Quicktime... */
++ switch (context->codec_tag) {
++ case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-divx",
++ "divxversion", G_TYPE_INT, 5, NULL);
++ break;
++ case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
++ default:
++ /* FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "mpegversion", G_TYPE_INT, 4, NULL);
++ break;
++ }
++ } else {
++ /* The trick here is to separate xvid, divx, mpeg4, 3ivx et al */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
++ "mpegversion", G_TYPE_INT, 4,
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ if (encode) {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", G_TYPE_INT, 5, NULL));
++ } else {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", GST_TYPE_INT_RANGE, 4, 5,
++ NULL));
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-xvid", NULL));
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-3ivx", NULL));
++ }
++ }
++ break;
++
++ case CODEC_ID_RAWVIDEO:
++ caps =
++ gst_ffmpeg_codectype_to_caps (AVMEDIA_TYPE_VIDEO, context, codec_id,
++ encode);
++ break;
++
++ case CODEC_ID_MSMPEG4V1:
++ case CODEC_ID_MSMPEG4V2:
++ case CODEC_ID_MSMPEG4V3:
++ {
++ gint version = 41 + codec_id - CODEC_ID_MSMPEG4V1;
++
++ /* encode-FIXME: bitrate */
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msmpeg",
++ "msmpegversion", G_TYPE_INT, version, NULL);
++ if (!encode && codec_id == CODEC_ID_MSMPEG4V3) {
++ gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
++ "video/x-divx", "divxversion", G_TYPE_INT, 3, NULL));
++ }
++ }
++ break;
++
++ case CODEC_ID_WMV1:
++ case CODEC_ID_WMV2:
++ {
++ gint version = (codec_id == CODEC_ID_WMV1) ? 1 : 2;
++
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, version, NULL);
++ }
++ break;
++
++ case CODEC_ID_FLV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-flash-video",
++ "flvversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_SVQ1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
++ "svqversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_SVQ3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
++ "svqversion", G_TYPE_INT, 3, NULL);
++ break;
++
++ case CODEC_ID_DVAUDIO:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dv", NULL);
++ break;
++
++ case CODEC_ID_DVVIDEO:
++ {
++ if (encode && context) {
++ guint32 fourcc;
++
++ switch (context->pix_fmt) {
++ case PIX_FMT_YUYV422:
++ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
++ break;
++ case PIX_FMT_YUV420P:
++ fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ case PIX_FMT_YUVA420P:
++ fourcc = GST_MAKE_FOURCC ('A', '4', '2', '0');
++ break;
++ case PIX_FMT_YUV411P:
++ fourcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
++ break;
++ case PIX_FMT_YUV422P:
++ fourcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
++ break;
++ case PIX_FMT_YUV410P:
++ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
++ break;
++ default:
++ GST_WARNING
++ ("Couldnt' find fourcc for pixfmt %d, defaulting to I420",
++ context->pix_fmt);
++ fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ }
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, FALSE,
++ "format", GST_TYPE_FOURCC, fourcc, NULL);
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_WMAV1:
++ case CODEC_ID_WMAV2:
++ {
++ gint version = (codec_id == CODEC_ID_WMAV1) ? 1 : 2;
++
++ if (context) {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, version,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ } else {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, version,
++ "block_align", GST_TYPE_INT_RANGE, 0, G_MAXINT,
++ "bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
++ }
++ }
++ break;
++ case CODEC_ID_WMAPRO:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
++ "wmaversion", G_TYPE_INT, 3, NULL);
++ break;
++ }
++
++ case CODEC_ID_WMAVOICE:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wms", NULL);
++ break;
++ }
++
++ case CODEC_ID_MACE3:
++ case CODEC_ID_MACE6:
++ {
++ gint version = (codec_id == CODEC_ID_MACE3) ? 3 : 6;
++
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mace",
++ "maceversion", G_TYPE_INT, version, NULL);
++ }
++ break;
++
++ case CODEC_ID_HUFFYUV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_CYUV:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-compressed-yuv",
++ NULL);
++ break;
++
++ case CODEC_ID_H264:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h264", NULL);
++ break;
++
++ case CODEC_ID_INDEO5:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 5, NULL);
++ break;
++
++ case CODEC_ID_INDEO3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 3, NULL);
++ break;
++
++ case CODEC_ID_INDEO2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
++ "indeoversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_FLASHSV:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-flash-screen", NULL);
++ break;
++
++ case CODEC_ID_VP3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp3", NULL);
++ break;
++
++ case CODEC_ID_VP5:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp5", NULL);
++ break;
++
++ case CODEC_ID_VP6:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6", NULL);
++ break;
++
++ case CODEC_ID_VP6F:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-flash", NULL);
++ break;
++
++ case CODEC_ID_VP6A:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-alpha", NULL);
++ break;
++
++ case CODEC_ID_VP8:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp8", NULL);
++ break;
++
++ case CODEC_ID_THEORA:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
++ break;
++
++ case CODEC_ID_AAC:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg", NULL);
++
++ if (!encode) {
++ GValue arr = { 0, };
++ GValue item = { 0, };
++
++ g_value_init (&arr, GST_TYPE_LIST);
++ g_value_init (&item, G_TYPE_INT);
++ g_value_set_int (&item, 2);
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_int (&item, 4);
++ gst_value_list_append_value (&arr, &item);
++ g_value_unset (&item);
++
++ gst_caps_set_value (caps, "mpegversion", &arr);
++ g_value_unset (&arr);
++
++ g_value_init (&arr, GST_TYPE_LIST);
++ g_value_init (&item, G_TYPE_STRING);
++ g_value_set_string (&item, "raw");
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_string (&item, "adts");
++ gst_value_list_append_value (&arr, &item);
++ g_value_set_string (&item, "adif");
++ gst_value_list_append_value (&arr, &item);
++ g_value_unset (&item);
++
++ gst_caps_set_value (caps, "stream-format", &arr);
++ g_value_unset (&arr);
++ } else {
++ gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
++ "stream-format", G_TYPE_STRING, "raw",
++ "base-profile", G_TYPE_STRING, "lc", NULL);
++
++ if (context && context->extradata_size > 0)
++ gst_codec_utils_aac_caps_set_level_and_profile (caps,
++ context->extradata, context->extradata_size);
++ }
++
++ break;
++ }
++ case CODEC_ID_AAC_LATM: /* LATM/LOAS AAC syntax */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
++ "mpegversion", G_TYPE_INT, 4, "stream-format", G_TYPE_STRING, "loas",
++ NULL);
++ break;
++
++ case CODEC_ID_ASV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
++ "asusversion", G_TYPE_INT, 1, NULL);
++ break;
++ case CODEC_ID_ASV2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
++ "asusversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_FFV1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ffv",
++ "ffvversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_4XM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-4xm", NULL);
++ break;
++
++ case CODEC_ID_XAN_WC3:
++ case CODEC_ID_XAN_WC4:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-xan",
++ "wcversion", G_TYPE_INT, 3 - CODEC_ID_XAN_WC3 + codec_id, NULL);
++ break;
++
++ case CODEC_ID_CLJR:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id,
++ "video/x-cirrus-logic-accupak", NULL);
++ break;
++
++ case CODEC_ID_FRAPS:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-fraps", NULL);
++ break;
++
++ case CODEC_ID_MDEC:
++ case CODEC_ID_ROQ:
++ case CODEC_ID_INTERPLAY_VIDEO:
++ buildcaps = TRUE;
++ break;
++
++ case CODEC_ID_VCR1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ati-vcr",
++ "vcrversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_RPZA:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "video/x-apple-video", NULL);
++ break;
++
++ case CODEC_ID_CINEPAK:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-cinepak", NULL);
++ break;
++
++ /* WS_VQA belogns here (order) */
++
++ case CODEC_ID_MSRLE:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
++ "layout", G_TYPE_STRING, "microsoft", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
++ }
++ break;
++
++ case CODEC_ID_QTRLE:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
++ "layout", G_TYPE_STRING, "quicktime", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
++ }
++ break;
++
++ case CODEC_ID_MSVIDEO1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msvideocodec",
++ "msvideoversion", G_TYPE_INT, 1, NULL);
++ break;
++
++ case CODEC_ID_WMV3:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, 3, NULL);
++ break;
++ case CODEC_ID_VC1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
++ "wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
++ GST_MAKE_FOURCC ('W', 'V', 'C', '1'), NULL);
++ break;
++ case CODEC_ID_QDM2:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
++ break;
++
++ case CODEC_ID_MSZH:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mszh", NULL);
++ break;
++
++ case CODEC_ID_ZLIB:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zlib", NULL);
++ break;
++
++ case CODEC_ID_TRUEMOTION1:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
++ "trueversion", G_TYPE_INT, 1, NULL);
++ break;
++ case CODEC_ID_TRUEMOTION2:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
++ "trueversion", G_TYPE_INT, 2, NULL);
++ break;
++
++ case CODEC_ID_ULTI:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ultimotion",
++ NULL);
++ break;
++
++ case CODEC_ID_TSCC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
++ }
++ break;
++
++ case CODEC_ID_KMVC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-kmvc", NULL);
++ break;
++
++ case CODEC_ID_NUV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-nuv", NULL);
++ break;
++
++ case CODEC_ID_GIF:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/gif", NULL);
++ break;
++
++ case CODEC_ID_PNG:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/png", NULL);
++ break;
++
++ case CODEC_ID_PPM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/ppm", NULL);
++ break;
++
++ case CODEC_ID_PBM:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/pbm", NULL);
++ break;
++
++ case CODEC_ID_PAM:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-portable-anymap",
++ NULL);
++ break;
++
++ case CODEC_ID_PGM:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-portable-graymap",
++ NULL);
++ break;
++
++ case CODEC_ID_PCX:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-pcx", NULL);
++ break;
++
++ case CODEC_ID_SGI:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-sgi", NULL);
++ break;
++
++ case CODEC_ID_TARGA:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/x-tga", NULL);
++ break;
++
++ case CODEC_ID_TIFF:
++ caps = gst_ff_vid_caps_new (context, codec_id, "image/tiff", NULL);
++ break;
++
++ case CODEC_ID_SUNRAST:
++ caps =
++ gst_ff_vid_caps_new (context, codec_id, "image/x-sun-raster", NULL);
++ break;
++
++ case CODEC_ID_SMC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-smc", NULL);
++ break;
++
++ case CODEC_ID_QDRAW:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-qdrw", NULL);
++ break;
++
++ case CODEC_ID_DNXHD:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dnxhd", NULL);
++ break;
++
++ case CODEC_ID_MIMIC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mimic", NULL);
++ break;
++
++ case CODEC_ID_VMNC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vmnc", NULL);
++ break;
++
++ case CODEC_ID_TRUESPEECH:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-truespeech", NULL);
++ break;
++
++ case CODEC_ID_QCELP:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/qcelp", NULL);
++ break;
++
++ case CODEC_ID_AMV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-amv", NULL);
++ break;
++
++ case CODEC_ID_AASC:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-aasc", NULL);
++ break;
++
++ case CODEC_ID_LOCO:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-loco", NULL);
++ break;
++
++ case CODEC_ID_ZMBV:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zmbv", NULL);
++ break;
++
++ case CODEC_ID_LAGARITH:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-lagarith", NULL);
++ break;
++
++ case CODEC_ID_CSCD:
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camstudio", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
++ } else {
++ gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
++ }
++ break;
++
++ case CODEC_ID_WS_VQA:
++ case CODEC_ID_IDCIN:
++ case CODEC_ID_8BPS:
++ case CODEC_ID_FLIC:
++ case CODEC_ID_VMDVIDEO:
++ case CODEC_ID_VMDAUDIO:
++ case CODEC_ID_SNOW:
++ case CODEC_ID_VIXL:
++ case CODEC_ID_QPEG:
++ case CODEC_ID_PGMYUV:
++ case CODEC_ID_FFVHUFF:
++ case CODEC_ID_WNV1:
++ case CODEC_ID_MP3ADU:
++ case CODEC_ID_MP3ON4:
++ case CODEC_ID_WESTWOOD_SND1:
++ case CODEC_ID_MMVIDEO:
++ case CODEC_ID_AVS:
++ case CODEC_ID_CAVS:
++ buildcaps = TRUE;
++ break;
++
++ /* weird quasi-codecs for the demuxers only */
++ case CODEC_ID_PCM_S16LE:
++ case CODEC_ID_PCM_S16BE:
++ case CODEC_ID_PCM_U16LE:
++ case CODEC_ID_PCM_U16BE:
++ case CODEC_ID_PCM_S8:
++ case CODEC_ID_PCM_U8:
++ {
++ gint width = 0, depth = 0, endianness = 0;
++ gboolean signedness = FALSE; /* blabla */
++
++ switch (codec_id) {
++ case CODEC_ID_PCM_S16LE:
++ width = 16;
++ depth = 16;
++ endianness = G_LITTLE_ENDIAN;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_S16BE:
++ width = 16;
++ depth = 16;
++ endianness = G_BIG_ENDIAN;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_U16LE:
++ width = 16;
++ depth = 16;
++ endianness = G_LITTLE_ENDIAN;
++ signedness = FALSE;
++ break;
++ case CODEC_ID_PCM_U16BE:
++ width = 16;
++ depth = 16;
++ endianness = G_BIG_ENDIAN;
++ signedness = FALSE;
++ break;
++ case CODEC_ID_PCM_S8:
++ width = 8;
++ depth = 8;
++ endianness = G_BYTE_ORDER;
++ signedness = TRUE;
++ break;
++ case CODEC_ID_PCM_U8:
++ width = 8;
++ depth = 8;
++ endianness = G_BYTE_ORDER;
++ signedness = FALSE;
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
++ "width", G_TYPE_INT, width,
++ "depth", G_TYPE_INT, depth,
++ "endianness", G_TYPE_INT, endianness,
++ "signed", G_TYPE_BOOLEAN, signedness, NULL);
++ }
++ break;
++
++ case CODEC_ID_PCM_MULAW:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mulaw", NULL);
++ break;
++
++ case CODEC_ID_PCM_ALAW:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alaw", NULL);
++ break;
++
++ case CODEC_ID_ADPCM_G722:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/G722", NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ break;
++
++ case CODEC_ID_ADPCM_G726:
++ {
++ /* the G726 decoder can also handle G721 */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
++ "layout", G_TYPE_STRING, "g726", NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++
++ if (!encode) {
++ gst_caps_append (caps, gst_caps_new_simple ("audio/x-adpcm",
++ "layout", G_TYPE_STRING, "g721",
++ "channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL));
++ }
++ break;
++ }
++ case CODEC_ID_ADPCM_IMA_QT:
++ case CODEC_ID_ADPCM_IMA_WAV:
++ case CODEC_ID_ADPCM_IMA_DK3:
++ case CODEC_ID_ADPCM_IMA_DK4:
++ case CODEC_ID_ADPCM_IMA_WS:
++ case CODEC_ID_ADPCM_IMA_SMJPEG:
++ case CODEC_ID_ADPCM_IMA_AMV:
++ case CODEC_ID_ADPCM_IMA_ISS:
++ case CODEC_ID_ADPCM_IMA_EA_EACS:
++ case CODEC_ID_ADPCM_IMA_EA_SEAD:
++ case CODEC_ID_ADPCM_MS:
++ case CODEC_ID_ADPCM_4XM:
++ case CODEC_ID_ADPCM_XA:
++ case CODEC_ID_ADPCM_ADX:
++ case CODEC_ID_ADPCM_EA:
++ case CODEC_ID_ADPCM_CT:
++ case CODEC_ID_ADPCM_SWF:
++ case CODEC_ID_ADPCM_YAMAHA:
++ case CODEC_ID_ADPCM_SBPRO_2:
++ case CODEC_ID_ADPCM_SBPRO_3:
++ case CODEC_ID_ADPCM_SBPRO_4:
++ case CODEC_ID_ADPCM_EA_R1:
++ case CODEC_ID_ADPCM_EA_R2:
++ case CODEC_ID_ADPCM_EA_R3:
++ case CODEC_ID_ADPCM_EA_MAXIS_XA:
++ case CODEC_ID_ADPCM_EA_XAS:
++ case CODEC_ID_ADPCM_THP:
++ {
++ const gchar *layout = NULL;
++
++ switch (codec_id) {
++ case CODEC_ID_ADPCM_IMA_QT:
++ layout = "quicktime";
++ break;
++ case CODEC_ID_ADPCM_IMA_WAV:
++ layout = "dvi";
++ break;
++ case CODEC_ID_ADPCM_IMA_DK3:
++ layout = "dk3";
++ break;
++ case CODEC_ID_ADPCM_IMA_DK4:
++ layout = "dk4";
++ break;
++ case CODEC_ID_ADPCM_IMA_WS:
++ layout = "westwood";
++ break;
++ case CODEC_ID_ADPCM_IMA_SMJPEG:
++ layout = "smjpeg";
++ break;
++ case CODEC_ID_ADPCM_IMA_AMV:
++ layout = "amv";
++ break;
++ case CODEC_ID_ADPCM_IMA_ISS:
++ layout = "iss";
++ break;
++ case CODEC_ID_ADPCM_IMA_EA_EACS:
++ layout = "ea-eacs";
++ break;
++ case CODEC_ID_ADPCM_IMA_EA_SEAD:
++ layout = "ea-sead";
++ break;
++ case CODEC_ID_ADPCM_MS:
++ layout = "microsoft";
++ break;
++ case CODEC_ID_ADPCM_4XM:
++ layout = "4xm";
++ break;
++ case CODEC_ID_ADPCM_XA:
++ layout = "xa";
++ break;
++ case CODEC_ID_ADPCM_ADX:
++ layout = "adx";
++ break;
++ case CODEC_ID_ADPCM_EA:
++ layout = "ea";
++ break;
++ case CODEC_ID_ADPCM_CT:
++ layout = "ct";
++ break;
++ case CODEC_ID_ADPCM_SWF:
++ layout = "swf";
++ break;
++ case CODEC_ID_ADPCM_YAMAHA:
++ layout = "yamaha";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_2:
++ layout = "sbpro2";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_3:
++ layout = "sbpro3";
++ break;
++ case CODEC_ID_ADPCM_SBPRO_4:
++ layout = "sbpro4";
++ break;
++ case CODEC_ID_ADPCM_EA_R1:
++ layout = "ea-r1";
++ break;
++ case CODEC_ID_ADPCM_EA_R2:
++ layout = "ea-r3";
++ break;
++ case CODEC_ID_ADPCM_EA_R3:
++ layout = "ea-r3";
++ break;
++ case CODEC_ID_ADPCM_EA_MAXIS_XA:
++ layout = "ea-maxis-xa";
++ break;
++ case CODEC_ID_ADPCM_EA_XAS:
++ layout = "ea-xas";
++ break;
++ case CODEC_ID_ADPCM_THP:
++ layout = "thp";
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ /* FIXME: someone please check whether we need additional properties
++ * in this caps definition. */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
++ "layout", G_TYPE_STRING, layout, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ break;
++
++ case CODEC_ID_AMR_NB:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR", NULL);
++ break;
++
++ case CODEC_ID_AMR_WB:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR-WB", NULL);
++ break;
++
++ case CODEC_ID_GSM:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-gsm", NULL);
++ break;
++
++ case CODEC_ID_GSM_MS:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/ms-gsm", NULL);
++ break;
++
++ case CODEC_ID_NELLYMOSER:
++ caps =
++ gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL);
++ break;
++
++ case CODEC_ID_SIPR:
++ {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-sipro", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "leaf_size", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_RA_144:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_COOK:
++ {
++ gint version = 0;
++
++ switch (codec_id) {
++ case CODEC_ID_RA_144:
++ version = 1;
++ break;
++ case CODEC_ID_RA_288:
++ version = 2;
++ break;
++ case CODEC_ID_COOK:
++ version = 8;
++ break;
++ default:
++ break;
++ }
++
++ /* FIXME: properties? */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-pn-realaudio",
++ "raversion", G_TYPE_INT, version, NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "leaf_size", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ }
++ break;
++
++ case CODEC_ID_ROQ_DPCM:
++ case CODEC_ID_INTERPLAY_DPCM:
++ case CODEC_ID_XAN_DPCM:
++ case CODEC_ID_SOL_DPCM:
++ {
++ const gchar *layout = NULL;
++
++ switch (codec_id) {
++ case CODEC_ID_ROQ_DPCM:
++ layout = "roq";
++ break;
++ case CODEC_ID_INTERPLAY_DPCM:
++ layout = "interplay";
++ break;
++ case CODEC_ID_XAN_DPCM:
++ layout = "xan";
++ break;
++ case CODEC_ID_SOL_DPCM:
++ layout = "sol";
++ break;
++ default:
++ g_assert (0); /* don't worry, we never get here */
++ break;
++ }
++
++ /* FIXME: someone please check whether we need additional properties
++ * in this caps definition. */
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dpcm",
++ "layout", G_TYPE_STRING, layout, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ }
++ break;
++
++ case CODEC_ID_SHORTEN:
++ caps = gst_caps_new_simple ("audio/x-shorten", NULL);
++ break;
++
++ case CODEC_ID_ALAC:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++
++ case CODEC_ID_FLAC:
++ /* Note that ffmpeg has no encoder yet, but just for safety. In the
++ * encoder case, we want to add things like samplerate, channels... */
++ if (!encode) {
++ caps = gst_caps_new_simple ("audio/x-flac", NULL);
++ }
++ break;
++
++ case CODEC_ID_DVD_SUBTITLE:
++ case CODEC_ID_DVB_SUBTITLE:
++ caps = NULL;
++ break;
++ case CODEC_ID_BMP:
++ caps = gst_caps_new_simple ("image/bmp", NULL);
++ break;
++ case CODEC_ID_TTA:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
++ if (context) {
++ gst_caps_set_simple (caps,
++ "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
++ }
++ break;
++ case CODEC_ID_TWINVQ:
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-twin-vq", NULL);
++ break;
++ default:
++ GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id);
++ break;
++ }
++
++ if (buildcaps) {
++ AVCodec *codec;
++
++ if ((codec = avcodec_find_decoder (codec_id)) ||
++ (codec = avcodec_find_encoder (codec_id))) {
++ gchar *mime = NULL;
++
++ GST_LOG ("Could not create stream format caps for %s", codec->name);
++
++ switch (codec->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ mime = g_strdup_printf ("video/x-gst_ff-%s", codec->name);
++ caps = gst_ff_vid_caps_new (context, codec_id, mime, NULL);
++ g_free (mime);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ mime = g_strdup_printf ("audio/x-gst_ff-%s", codec->name);
++ caps = gst_ff_aud_caps_new (context, codec_id, mime, NULL);
++ if (context)
++ gst_caps_set_simple (caps,
++ "block_align", G_TYPE_INT, context->block_align,
++ "bitrate", G_TYPE_INT, context->bit_rate, NULL);
++ g_free (mime);
++ break;
++ default:
++ break;
++ }
++ }
++ }
++
++ if (caps != NULL) {
++
++ /* set private data */
++ if (context && context->extradata_size > 0) {
++ GstBuffer *data = gst_buffer_new_and_alloc (context->extradata_size);
++
++ memcpy (GST_BUFFER_DATA (data), context->extradata,
++ context->extradata_size);
++ gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, data, NULL);
++ gst_buffer_unref (data);
++ }
++
++ /* palette */
++ if (context) {
++ gst_ffmpeg_set_palette (caps, context);
++ }
++
++ GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
++
++ } else {
++ GST_LOG ("No caps found for codec_id=%d", codec_id);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG Pixel Format and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * See below for usefullness
++ */
++
++GstCaps *
++gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context,
++ enum CodecID codec_id)
++{
++ GstCaps *caps = NULL;
++
++ int bpp = 0, depth = 0, endianness = 0;
++ gulong g_mask = 0, r_mask = 0, b_mask = 0, a_mask = 0;
++ guint32 fmt = 0;
++
++ switch (pix_fmt) {
++ case PIX_FMT_YUVJ420P:
++ case PIX_FMT_YUV420P:
++ fmt = GST_MAKE_FOURCC ('I', '4', '2', '0');
++ break;
++ case PIX_FMT_YUVA420P:
++ fmt = GST_MAKE_FOURCC ('A', '4', '2', '0');
++ break;
++ case PIX_FMT_YUYV422:
++ fmt = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
++ break;
++ case PIX_FMT_RGB24:
++ bpp = depth = 24;
++ endianness = G_BIG_ENDIAN;
++ r_mask = 0xff0000;
++ g_mask = 0x00ff00;
++ b_mask = 0x0000ff;
++ break;
++ case PIX_FMT_BGR24:
++ bpp = depth = 24;
++ endianness = G_BIG_ENDIAN;
++ r_mask = 0x0000ff;
++ g_mask = 0x00ff00;
++ b_mask = 0xff0000;
++ break;
++ case PIX_FMT_YUVJ422P:
++ case PIX_FMT_YUV422P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
++ break;
++ case PIX_FMT_YUVJ444P:
++ case PIX_FMT_YUV444P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '4', '4');
++ break;
++ case PIX_FMT_RGB32:
++ bpp = 32;
++ depth = 32;
++ endianness = G_BIG_ENDIAN;
++#if (G_BYTE_ORDER == G_BIG_ENDIAN)
++ r_mask = 0x00ff0000;
++ g_mask = 0x0000ff00;
++ b_mask = 0x000000ff;
++ a_mask = 0xff000000;
++#else
++ r_mask = 0x0000ff00;
++ g_mask = 0x00ff0000;
++ b_mask = 0xff000000;
++ a_mask = 0x000000ff;
++#endif
++ break;
++ case PIX_FMT_YUV410P:
++ fmt = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
++ break;
++ case PIX_FMT_YUV411P:
++ fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
++ break;
++ case PIX_FMT_RGB565:
++ bpp = depth = 16;
++ endianness = G_BYTE_ORDER;
++ r_mask = 0xf800;
++ g_mask = 0x07e0;
++ b_mask = 0x001f;
++ break;
++ case PIX_FMT_RGB555:
++ bpp = 16;
++ depth = 15;
++ endianness = G_BYTE_ORDER;
++ r_mask = 0x7c00;
++ g_mask = 0x03e0;
++ b_mask = 0x001f;
++ break;
++ case PIX_FMT_PAL8:
++ bpp = depth = 8;
++ endianness = G_BYTE_ORDER;
++ break;
++ case PIX_FMT_GRAY8:
++ bpp = depth = 8;
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-gray",
++ "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
++ break;
++ default:
++ /* give up ... */
++ break;
++ }
++
++ if (caps == NULL) {
++ if (bpp != 0) {
++ if (r_mask != 0) {
++ if (a_mask) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "red_mask", G_TYPE_INT, r_mask,
++ "green_mask", G_TYPE_INT, g_mask,
++ "blue_mask", G_TYPE_INT, b_mask,
++ "alpha_mask", G_TYPE_INT, a_mask,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "red_mask", G_TYPE_INT, r_mask,
++ "green_mask", G_TYPE_INT, g_mask,
++ "blue_mask", G_TYPE_INT, b_mask,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ }
++ } else {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp,
++ "depth", G_TYPE_INT, depth,
++ "endianness", G_TYPE_INT, endianness, NULL);
++ if (caps && context) {
++ gst_ffmpeg_set_palette (caps, context);
++ }
++ }
++ } else if (fmt) {
++ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
++ "format", GST_TYPE_FOURCC, fmt, NULL);
++ }
++ }
++
++ if (caps != NULL) {
++ GST_DEBUG ("caps for pix_fmt=%d: %" GST_PTR_FORMAT, pix_fmt, caps);
++ } else {
++ GST_LOG ("No caps found for pix_fmt=%d", pix_fmt);
++ }
++
++ return caps;
++}
++
++/* Convert a FFMPEG Sample Format and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * See below for usefullness
++ */
++
++static GstCaps *
++gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt,
++ AVCodecContext * context, enum CodecID codec_id)
++{
++ GstCaps *caps = NULL;
++
++ int bpp = 0;
++ gboolean integer = TRUE;
++ gboolean signedness = FALSE;
++
++ switch (sample_fmt) {
++ case AV_SAMPLE_FMT_S16:
++ signedness = TRUE;
++ bpp = 16;
++ break;
++
++ case AV_SAMPLE_FMT_S32:
++ signedness = TRUE;
++ bpp = 32;
++ break;
++
++ case AV_SAMPLE_FMT_FLT:
++ integer = FALSE;
++ bpp = 32;
++ break;
++
++ case AV_SAMPLE_FMT_DBL:
++ integer = FALSE;
++ bpp = 64;
++ break;
++ default:
++ /* .. */
++ break;
++ }
++
++ if (bpp) {
++ if (integer) {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
++ "signed", G_TYPE_BOOLEAN, signedness,
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
++ } else {
++ caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-float",
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "width", G_TYPE_INT, bpp, NULL);
++ }
++ }
++
++ if (caps != NULL) {
++ GST_LOG ("caps for sample_fmt=%d: %" GST_PTR_FORMAT, sample_fmt, caps);
++ } else {
++ GST_LOG ("No caps found for sample_fmt=%d", sample_fmt);
++ }
++
++ return caps;
++}
++
++GstCaps *
++gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context,
++ enum CodecID codec_id, gboolean encode, AVCodec * codec)
++{
++ GstCaps *caps = NULL;
++
++ GST_DEBUG ("context:%p, codec_id:%d, encode:%d, codec:%p",
++ context, codec_id, encode, codec);
++ if (codec)
++ GST_DEBUG ("sample_fmts:%p, samplerates:%p",
++ codec->sample_fmts, codec->supported_samplerates);
++
++ if (context) {
++ /* Specific codec context */
++ caps = gst_ffmpeg_smpfmt_to_caps (context->sample_fmt, context, codec_id);
++ } else if (codec && codec->sample_fmts) {
++ GstCaps *temp;
++ int i;
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; codec->sample_fmts[i] != -1; i++) {
++ temp =
++ gst_ffmpeg_smpfmt_to_caps (codec->sample_fmts[i], context, codec_id);
++ if (temp != NULL)
++ gst_caps_append (caps, temp);
++ }
++ } else {
++ GstCaps *temp;
++ enum AVSampleFormat i;
++ AVCodecContext ctx = { 0, };
++
++ ctx.channels = -1;
++ caps = gst_caps_new_empty ();
++ for (i = 0; i <= AV_SAMPLE_FMT_DBL; i++) {
++ temp = gst_ffmpeg_smpfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
++ if (temp != NULL) {
++ gst_caps_append (caps, temp);
++ }
++ }
++ }
++ return caps;
++}
++
++GstCaps *
++gst_ffmpeg_codectype_to_video_caps (AVCodecContext * context,
++ enum CodecID codec_id, gboolean encode, AVCodec * codec)
++{
++ GstCaps *caps;
++
++ GST_LOG ("context:%p, codec_id:%d, encode:%d, codec:%p",
++ context, codec_id, encode, codec);
++
++ if (context) {
++ caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context, codec_id);
++ } else {
++ GstCaps *temp;
++ enum PixelFormat i;
++ AVCodecContext ctx = { 0, };
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; i < PIX_FMT_NB; i++) {
++ ctx.width = -1;
++ ctx.pix_fmt = i;
++ temp = gst_ffmpeg_pixfmt_to_caps (i, encode ? &ctx : NULL, codec_id);
++ if (temp != NULL) {
++ gst_caps_append (caps, temp);
++ }
++ }
++ }
++ return caps;
++}
++
++/* Convert a FFMPEG codec Type and optional AVCodecContext
++ * to a GstCaps. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the GstCaps
++ *
++ * AVMediaType is primarily meant for uncompressed data GstCaps!
++ */
++
++GstCaps *
++gst_ffmpeg_codectype_to_caps (enum AVMediaType codec_type,
++ AVCodecContext * context, enum CodecID codec_id, gboolean encode)
++{
++ GstCaps *caps;
++
++ switch (codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ caps =
++ gst_ffmpeg_codectype_to_video_caps (context, codec_id, encode, NULL);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ caps =
++ gst_ffmpeg_codectype_to_audio_caps (context, codec_id, encode, NULL);
++ break;
++ default:
++ caps = NULL;
++ break;
++ }
++
++ return caps;
++}
++
++/* Convert a GstCaps (audio/raw) to a FFMPEG SampleFmt
++ * and other audio properties in a AVCodecContext.
++ *
++ * For usefullness, see below
++ */
++
++static void
++gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps,
++ AVCodecContext * context, gboolean raw)
++{
++ GstStructure *structure;
++ gint depth = 0, width = 0, endianness = 0;
++ gboolean signedness = FALSE;
++ const gchar *name;
++
++ g_return_if_fail (gst_caps_get_size (caps) == 1);
++ structure = gst_caps_get_structure (caps, 0);
++
++ gst_structure_get_int (structure, "channels", &context->channels);
++ gst_structure_get_int (structure, "rate", &context->sample_rate);
++ gst_structure_get_int (structure, "block_align", &context->block_align);
++ gst_structure_get_int (structure, "bitrate", &context->bit_rate);
++
++ if (!raw)
++ return;
++
++ name = gst_structure_get_name (structure);
++
++ if (!strcmp (name, "audio/x-raw-float")) {
++ /* FLOAT */
++ if (gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if (endianness == G_BYTE_ORDER) {
++ if (width == 32)
++ context->sample_fmt = AV_SAMPLE_FMT_FLT;
++ else if (width == 64)
++ context->sample_fmt = AV_SAMPLE_FMT_DBL;
++ }
++ }
++ } else {
++ /* INT */
++ if (gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "depth", &depth) &&
++ gst_structure_get_boolean (structure, "signed", &signedness) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if ((endianness == G_BYTE_ORDER) && (signedness == TRUE)) {
++ if ((width == 16) && (depth == 16))
++ context->sample_fmt = AV_SAMPLE_FMT_S16;
++ else if ((width == 32) && (depth == 32))
++ context->sample_fmt = AV_SAMPLE_FMT_S32;
++ }
++ }
++ }
++}
++
++
++/* Convert a GstCaps (video/raw) to a FFMPEG PixFmt
++ * and other video properties in a AVCodecContext.
++ *
++ * For usefullness, see below
++ */
++
++static void
++gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
++ AVCodecContext * context, gboolean raw)
++{
++ GstStructure *structure;
++ const GValue *fps;
++ const GValue *par = NULL;
++
++ GST_DEBUG ("converting caps %" GST_PTR_FORMAT, caps);
++ g_return_if_fail (gst_caps_get_size (caps) == 1);
++ structure = gst_caps_get_structure (caps, 0);
++
++ gst_structure_get_int (structure, "width", &context->width);
++ gst_structure_get_int (structure, "height", &context->height);
++ gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
++
++ fps = gst_structure_get_value (structure, "framerate");
++ if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
++
++ /* somehow these seem mixed up.. */
++ context->time_base.den = gst_value_get_fraction_numerator (fps);
++ context->time_base.num = gst_value_get_fraction_denominator (fps);
++ context->ticks_per_frame = 1;
++
++ GST_DEBUG ("setting framerate %d/%d = %lf",
++ context->time_base.den, context->time_base.num,
++ 1. * context->time_base.den / context->time_base.num);
++ }
++
++ par = gst_structure_get_value (structure, "pixel-aspect-ratio");
++ if (par && GST_VALUE_HOLDS_FRACTION (par)) {
++
++ context->sample_aspect_ratio.num = gst_value_get_fraction_numerator (par);
++ context->sample_aspect_ratio.den = gst_value_get_fraction_denominator (par);
++
++ GST_DEBUG ("setting pixel-aspect-ratio %d/%d = %lf",
++ context->sample_aspect_ratio.den, context->sample_aspect_ratio.num,
++ 1. * context->sample_aspect_ratio.den /
++ context->sample_aspect_ratio.num);
++ }
++
++ if (!raw)
++ return;
++
++ g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
++
++ if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
++ guint32 fourcc;
++
++ if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
++ switch (fourcc) {
++ case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
++ context->pix_fmt = PIX_FMT_YUYV422;
++ break;
++ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUV420P;
++ break;
++ case GST_MAKE_FOURCC ('A', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUVA420P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
++ context->pix_fmt = PIX_FMT_YUV411P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
++ context->pix_fmt = PIX_FMT_YUV422P;
++ break;
++ case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
++ context->pix_fmt = PIX_FMT_YUV410P;
++ break;
++#if 0
++ case FIXME:
++ context->pix_fmt = PIX_FMT_YUV444P;
++ break;
++#endif
++ }
++ }
++ } else if (strcmp (gst_structure_get_name (structure),
++ "video/x-raw-rgb") == 0) {
++ gint bpp = 0, rmask = 0, endianness = 0;
++
++ if (gst_structure_get_int (structure, "bpp", &bpp) &&
++ gst_structure_get_int (structure, "endianness", &endianness)) {
++ if (gst_structure_get_int (structure, "red_mask", &rmask)) {
++ switch (bpp) {
++ case 32:
++#if (G_BYTE_ORDER == G_BIG_ENDIAN)
++ if (rmask == 0x00ff0000)
++#else
++ if (rmask == 0x0000ff00)
++#endif
++ context->pix_fmt = PIX_FMT_RGB32;
++ break;
++ case 24:
++ if (rmask == 0x0000FF)
++ context->pix_fmt = PIX_FMT_BGR24;
++ else
++ context->pix_fmt = PIX_FMT_RGB24;
++ break;
++ case 16:
++ if (endianness == G_BYTE_ORDER)
++ context->pix_fmt = PIX_FMT_RGB565;
++ break;
++ case 15:
++ if (endianness == G_BYTE_ORDER)
++ context->pix_fmt = PIX_FMT_RGB555;
++ break;
++ default:
++ /* nothing */
++ break;
++ }
++ } else {
++ if (bpp == 8) {
++ context->pix_fmt = PIX_FMT_PAL8;
++ gst_ffmpeg_get_palette (caps, context);
++ }
++ }
++ }
++ } else if (strcmp (gst_structure_get_name (structure),
++ "video/x-raw-gray") == 0) {
++ gint bpp = 0;
++
++ if (gst_structure_get_int (structure, "bpp", &bpp)) {
++ switch (bpp) {
++ case 8:
++ context->pix_fmt = PIX_FMT_GRAY8;
++ break;
++ }
++ }
++ }
++}
++
++/* Convert a GstCaps and a FFMPEG codec Type to a
++ * AVCodecContext. If the context is ommitted, no fixed values
++ * for video/audio size will be included in the context
++ *
++ * AVMediaType is primarily meant for uncompressed data GstCaps!
++ */
++
++void
++gst_ffmpeg_caps_with_codectype (enum AVMediaType type,
++ const GstCaps * caps, AVCodecContext * context)
++{
++ if (context == NULL)
++ return;
++
++ switch (type) {
++ case AVMEDIA_TYPE_VIDEO:
++ gst_ffmpeg_caps_to_pixfmt (caps, context, TRUE);
++ break;
++
++ case AVMEDIA_TYPE_AUDIO:
++ gst_ffmpeg_caps_to_smpfmt (caps, context, TRUE);
++ break;
++
++ default:
++ /* unknown */
++ break;
++ }
++}
++
++#if 0
++static void
++nal_escape (guint8 * dst, guint8 * src, guint size, guint * destsize)
++{
++ guint8 *dstp = dst;
++ guint8 *srcp = src;
++ guint8 *end = src + size;
++ gint count = 0;
++
++ while (srcp < end) {
++ if (count == 2 && *srcp <= 0x03) {
++ GST_DEBUG ("added escape code");
++ *dstp++ = 0x03;
++ count = 0;
++ }
++ if (*srcp == 0)
++ count++;
++ else
++ count = 0;
++
++ GST_DEBUG ("copy %02x, count %d", *srcp, count);
++ *dstp++ = *srcp++;
++ }
++ *destsize = dstp - dst;
++}
++
++/* copy the config, escaping NAL units as we iterate them, if something fails we
++ * copy everything and hope for the best. */
++static void
++copy_config (guint8 * dst, guint8 * src, guint size, guint * destsize)
++{
++ guint8 *dstp = dst;
++ guint8 *srcp = src;
++ gint cnt, i;
++ guint nalsize, esize;
++
++ /* check size */
++ if (size < 7)
++ goto full_copy;
++
++ /* check version */
++ if (*srcp != 1)
++ goto full_copy;
++
++ cnt = *(srcp + 5) & 0x1f; /* Number of sps */
++
++ GST_DEBUG ("num SPS %d", cnt);
++
++ memcpy (dstp, srcp, 6);
++ srcp += 6;
++ dstp += 6;
++
++ for (i = 0; i < cnt; i++) {
++ GST_DEBUG ("copy SPS %d", i);
++ nalsize = (srcp[0] << 8) | srcp[1];
++ nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
++ dstp[0] = esize >> 8;
++ dstp[1] = esize & 0xff;
++ dstp += esize + 2;
++ srcp += nalsize + 2;
++ }
++
++ cnt = *(dstp++) = *(srcp++); /* Number of pps */
++
++ GST_DEBUG ("num PPS %d", cnt);
++
++ for (i = 0; i < cnt; i++) {
++ GST_DEBUG ("copy PPS %d", i);
++ nalsize = (srcp[0] << 8) | srcp[1];
++ nal_escape (dstp + 2, srcp + 2, nalsize, &esize);
++ dstp[0] = esize >> 8;
++ dstp[1] = esize & 0xff;
++ dstp += esize + 2;
++ srcp += nalsize + 2;
++ }
++ *destsize = dstp - dst;
++
++ return;
++
++full_copy:
++ {
++ GST_DEBUG ("something unexpected, doing full copy");
++ memcpy (dst, src, size);
++ *destsize = size;
++ return;
++ }
++}
++#endif
++
++/*
++ * caps_with_codecid () transforms a GstCaps for a known codec
++ * ID into a filled-in context.
++ * codec_data from caps will override possible extradata already in the context
++ */
++
++void
++gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
++ enum AVMediaType codec_type, const GstCaps * caps, AVCodecContext * context)
++{
++ GstStructure *str;
++ const GValue *value;
++ const GstBuffer *buf;
++
++ GST_LOG ("codec_id:%d, codec_type:%d, caps:%" GST_PTR_FORMAT " context:%p",
++ codec_id, codec_type, caps, context);
++
++ if (!context || !gst_caps_get_size (caps))
++ return;
++
++ str = gst_caps_get_structure (caps, 0);
++
++ /* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
++ if ((value = gst_structure_get_value (str, "codec_data"))) {
++ guint size;
++ guint8 *data;
++
++ buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
++ size = GST_BUFFER_SIZE (buf);
++ data = GST_BUFFER_DATA (buf);
++
++ /* free the old one if it is there */
++ if (context->extradata)
++ av_free (context->extradata);
++
++#if 0
++ if (codec_id == CODEC_ID_H264) {
++ guint extrasize;
++
++ GST_DEBUG ("copy, escaping codec_data %d", size);
++ /* ffmpeg h264 expects the codec_data to be escaped, there is no real
++ * reason for this but let's just escape it for now. Start by allocating
++ * enough space, x2 is more than enough.
++ *
++ * FIXME, we disabled escaping because some file already contain escaped
++ * codec_data and then we escape twice and fail. It's better to leave it
++ * as is, as that is what most players do. */
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (size * 2 +
++ FF_INPUT_BUFFER_PADDING_SIZE));
++ copy_config (context->extradata, data, size, &extrasize);
++ GST_DEBUG ("escaped size: %d", extrasize);
++ context->extradata_size = extrasize;
++ } else
++#endif
++ {
++ /* allocate with enough padding */
++ GST_DEBUG ("copy codec_data");
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (size + FF_INPUT_BUFFER_PADDING_SIZE));
++ memcpy (context->extradata, data, size);
++ context->extradata_size = size;
++ }
++
++ /* Hack for VC1. Sometimes the first (length) byte is 0 for some files */
++ if (codec_id == CODEC_ID_VC1 && size > 0 && data[0] == 0) {
++ context->extradata[0] = (guint8) size;
++ }
++
++ GST_DEBUG ("have codec data of size %d", size);
++ } else if (context->extradata == NULL && codec_id != CODEC_ID_AAC_LATM &&
++ codec_id != CODEC_ID_FLAC) {
++ /* no extradata, alloc dummy with 0 sized, some codecs insist on reading
++ * extradata anyway which makes then segfault. */
++ context->extradata =
++ av_mallocz (GST_ROUND_UP_16 (FF_INPUT_BUFFER_PADDING_SIZE));
++ context->extradata_size = 0;
++ GST_DEBUG ("no codec data");
++ }
++
++ switch (codec_id) {
++ case CODEC_ID_MPEG4:
++ {
++ const gchar *mime = gst_structure_get_name (str);
++
++ if (!strcmp (mime, "video/x-divx"))
++ context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
++ else if (!strcmp (mime, "video/x-xvid"))
++ context->codec_tag = GST_MAKE_FOURCC ('X', 'V', 'I', 'D');
++ else if (!strcmp (mime, "video/x-3ivx"))
++ context->codec_tag = GST_MAKE_FOURCC ('3', 'I', 'V', '1');
++ else if (!strcmp (mime, "video/mpeg"))
++ context->codec_tag = GST_MAKE_FOURCC ('m', 'p', '4', 'v');
++ }
++ break;
++
++ case CODEC_ID_SVQ3:
++ /* FIXME: this is a workaround for older gst-plugins releases
++ * (<= 0.8.9). This should be removed at some point, because
++ * it causes wrong decoded frame order. */
++ if (!context->extradata) {
++ gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag;
++ guint16 flags;
++
++ if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) ||
++ gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) ||
++ gst_structure_get_int (str, "low_delay", &low_delay) ||
++ gst_structure_get_int (str, "unknown_svq3_flag",
++ &unknown_svq3_flag)) {
++ context->extradata = (guint8 *) av_mallocz (0x64);
++ g_stpcpy ((gchar *) context->extradata, "SVQ3");
++ flags = 1 << 3;
++ flags |= low_delay;
++ flags = flags << 2;
++ flags |= unknown_svq3_flag;
++ flags = flags << 6;
++ flags |= halfpel_flag;
++ flags = flags << 1;
++ flags |= thirdpel_flag;
++ flags = flags << 3;
++
++ flags = GUINT16_FROM_LE (flags);
++
++ memcpy ((gchar *) context->extradata + 0x62, &flags, 2);
++ context->extradata_size = 0x64;
++ }
++ }
++ break;
++
++ case CODEC_ID_MSRLE:
++ case CODEC_ID_QTRLE:
++ case CODEC_ID_TSCC:
++ case CODEC_ID_CSCD:
++ case CODEC_ID_APE:
++ {
++ gint depth;
++
++ if (gst_structure_get_int (str, "depth", &depth)) {
++ context->bits_per_coded_sample = depth;
++ } else {
++ GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
++ }
++
++ }
++ break;
++
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ {
++ gint format;
++
++ if (gst_structure_get_int (str, "format", &format))
++ context->sub_id = format;
++
++ break;
++ }
++ case CODEC_ID_COOK:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_RA_144:
++ case CODEC_ID_SIPR:
++ {
++ gint leaf_size;
++ gint bitrate;
++
++ if (gst_structure_get_int (str, "leaf_size", &leaf_size))
++ context->block_align = leaf_size;
++ if (gst_structure_get_int (str, "bitrate", &bitrate))
++ context->bit_rate = bitrate;
++ }
++ case CODEC_ID_ALAC:
++ gst_structure_get_int (str, "samplesize",
++ &context->bits_per_coded_sample);
++ break;
++
++ case CODEC_ID_DVVIDEO:
++ {
++ guint32 fourcc;
++
++ if (gst_structure_get_fourcc (str, "format", &fourcc))
++ switch (fourcc) {
++ case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
++ context->pix_fmt = PIX_FMT_YUYV422;
++ break;
++ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUV420P;
++ break;
++ case GST_MAKE_FOURCC ('A', '4', '2', '0'):
++ context->pix_fmt = PIX_FMT_YUVA420P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
++ context->pix_fmt = PIX_FMT_YUV411P;
++ break;
++ case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
++ context->pix_fmt = PIX_FMT_YUV422P;
++ break;
++ case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
++ context->pix_fmt = PIX_FMT_YUV410P;
++ break;
++ default:
++ GST_WARNING ("couldn't convert fourcc %" GST_FOURCC_FORMAT
++ " to a pixel format", GST_FOURCC_ARGS (fourcc));
++ break;
++ }
++ break;
++ }
++ case CODEC_ID_H263P:
++ {
++ gboolean val;
++
++ if (!gst_structure_get_boolean (str, "annex-f", &val) || val)
++ context->flags |= CODEC_FLAG_4MV;
++ else
++ context->flags &= ~CODEC_FLAG_4MV;
++ if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) &&
++ (!gst_structure_get_boolean (str, "annex-t", &val) || val))
++ context->flags |= CODEC_FLAG_AC_PRED;
++ else
++ context->flags &= ~CODEC_FLAG_AC_PRED;
++ if (!gst_structure_get_boolean (str, "annex-j", &val) || val)
++ context->flags |= CODEC_FLAG_LOOP_FILTER;
++ else
++ context->flags &= ~CODEC_FLAG_LOOP_FILTER;
++ break;
++ }
++ case CODEC_ID_ADPCM_G726:
++ {
++ const gchar *layout;
++
++ if ((layout = gst_structure_get_string (str, "layout"))) {
++ if (!strcmp (layout, "g721")) {
++ context->sample_rate = 8000;
++ context->channels = 1;
++ context->bit_rate = 32000;
++ }
++ }
++ break;
++ }
++ default:
++ break;
++ }
++
++ if (!gst_caps_is_fixed (caps))
++ return;
++
++ /* common properties (width, height, fps) */
++ switch (codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
++ gst_ffmpeg_get_palette (caps, context);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
++ break;
++ default:
++ break;
++ }
++
++ /* fixup of default settings */
++ switch (codec_id) {
++ case CODEC_ID_QCELP:
++ /* QCELP is always mono, no matter what the caps say */
++ context->channels = 1;
++ break;
++ default:
++ break;
++ }
++}
++
++/* _formatid_to_caps () is meant for muxers/demuxers, it
++ * transforms a name (ffmpeg way of ID'ing these, why don't
++ * they have unique numerical IDs?) to the corresponding
++ * caps belonging to that mux-format
++ *
++ * Note: we don't need any additional info because the caps
++ * isn't supposed to contain any useful info besides the
++ * media type anyway
++ */
++
++GstCaps *
++gst_ffmpeg_formatid_to_caps (const gchar * format_name)
++{
++ GstCaps *caps = NULL;
++
++ if (!strcmp (format_name, "mpeg")) {
++ caps = gst_caps_new_simple ("video/mpeg",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "mpegts")) {
++ caps = gst_caps_new_simple ("video/mpegts",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "rm")) {
++ caps = gst_caps_new_simple ("application/x-pn-realmedia",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "asf")) {
++ caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
++ } else if (!strcmp (format_name, "avi")) {
++ caps = gst_caps_new_simple ("video/x-msvideo", NULL);
++ } else if (!strcmp (format_name, "wav")) {
++ caps = gst_caps_new_simple ("audio/x-wav", NULL);
++ } else if (!strcmp (format_name, "ape")) {
++ caps = gst_caps_new_simple ("application/x-ape", NULL);
++ } else if (!strcmp (format_name, "swf")) {
++ caps = gst_caps_new_simple ("application/x-shockwave-flash", NULL);
++ } else if (!strcmp (format_name, "au")) {
++ caps = gst_caps_new_simple ("audio/x-au", NULL);
++ } else if (!strcmp (format_name, "dv")) {
++ caps = gst_caps_new_simple ("video/x-dv",
++ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
++ } else if (!strcmp (format_name, "4xm")) {
++ caps = gst_caps_new_simple ("video/x-4xm", NULL);
++ } else if (!strcmp (format_name, "matroska")) {
++ caps = gst_caps_new_simple ("video/x-matroska", NULL);
++ } else if (!strcmp (format_name, "mp3")) {
++ caps = gst_caps_new_simple ("application/x-id3", NULL);
++ } else if (!strcmp (format_name, "flic")) {
++ caps = gst_caps_new_simple ("video/x-fli", NULL);
++ } else if (!strcmp (format_name, "flv")) {
++ caps = gst_caps_new_simple ("video/x-flv", NULL);
++ } else if (!strcmp (format_name, "tta")) {
++ caps = gst_caps_new_simple ("audio/x-ttafile", NULL);
++ } else if (!strcmp (format_name, "aiff")) {
++ caps = gst_caps_new_simple ("audio/x-aiff", NULL);
++ } else if (!strcmp (format_name, "mov_mp4_m4a_3gp_3g2")) {
++ caps =
++ gst_caps_from_string
++ ("application/x-3gp; video/quicktime; audio/x-m4a");
++ } else if (!strcmp (format_name, "mov")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)apple");
++ } else if (!strcmp (format_name, "mp4")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)iso");
++ } else if (!strcmp (format_name, "3gp")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)3gpp");
++ } else if (!strcmp (format_name, "3g2")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)3g2");
++ } else if (!strcmp (format_name, "psp")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)psp");
++ } else if (!strcmp (format_name, "ipod")) {
++ caps = gst_caps_from_string ("video/quicktime,variant=(string)ipod");
++ } else if (!strcmp (format_name, "aac")) {
++ caps = gst_caps_new_simple ("audio/mpeg",
++ "mpegversion", G_TYPE_INT, 4, NULL);
++ } else if (!strcmp (format_name, "gif")) {
++ caps = gst_caps_from_string ("image/gif");
++ } else if (!strcmp (format_name, "ogg")) {
++ caps = gst_caps_from_string ("application/ogg");
++ } else if (!strcmp (format_name, "mxf") || !strcmp (format_name, "mxf_d10")) {
++ caps = gst_caps_from_string ("application/mxf");
++ } else if (!strcmp (format_name, "gxf")) {
++ caps = gst_caps_from_string ("application/gxf");
++ } else if (!strcmp (format_name, "yuv4mpegpipe")) {
++ caps = gst_caps_new_simple ("application/x-yuv4mpeg",
++ "y4mversion", G_TYPE_INT, 2, NULL);
++ } else if (!strcmp (format_name, "mpc")) {
++ caps = gst_caps_from_string ("audio/x-musepack, streamversion = (int) 7");
++ } else if (!strcmp (format_name, "vqf")) {
++ caps = gst_caps_from_string ("audio/x-vqf");
++ } else if (!strcmp (format_name, "nsv")) {
++ caps = gst_caps_from_string ("video/x-nsv");
++ } else if (!strcmp (format_name, "amr")) {
++ caps = gst_caps_from_string ("audio/x-amr-nb-sh");
++ } else if (!strcmp (format_name, "webm")) {
++ caps = gst_caps_from_string ("video/webm");
++ } else {
++ gchar *name;
++
++ GST_LOG ("Could not create stream format caps for %s", format_name);
++ name = g_strdup_printf ("application/x-gst_ff-%s", format_name);
++ caps = gst_caps_new_simple (name, NULL);
++ g_free (name);
++ }
++
++ return caps;
++}
++
++gboolean
++gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
++ enum CodecID ** video_codec_list, enum CodecID ** audio_codec_list,
++ AVOutputFormat * plugin)
++{
++ static enum CodecID tmp_vlist[] = {
++ CODEC_ID_NONE,
++ CODEC_ID_NONE
++ };
++ static enum CodecID tmp_alist[] = {
++ CODEC_ID_NONE,
++ CODEC_ID_NONE
++ };
++
++ GST_LOG ("format_name : %s", format_name);
++
++ if (!strcmp (format_name, "mp4")) {
++ static enum CodecID mp4_video_list[] = {
++ CODEC_ID_MPEG4, CODEC_ID_H264,
++ CODEC_ID_MJPEG,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mp4_audio_list[] = {
++ CODEC_ID_AAC, CODEC_ID_MP3,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mp4_video_list;
++ *audio_codec_list = mp4_audio_list;
++ } else if (!strcmp (format_name, "mpeg")) {
++ static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG1VIDEO,
++ CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP1,
++ CODEC_ID_MP2,
++ CODEC_ID_MP3,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpeg_video_list;
++ *audio_codec_list = mpeg_audio_list;
++ } else if (!strcmp (format_name, "dvd")) {
++ static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP2,
++ CODEC_ID_AC3,
++ CODEC_ID_DTS,
++ CODEC_ID_PCM_S16BE,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpeg_video_list;
++ *audio_codec_list = mpeg_audio_list;
++ } else if (!strcmp (format_name, "mpegts")) {
++ static enum CodecID mpegts_video_list[] = { CODEC_ID_MPEG1VIDEO,
++ CODEC_ID_MPEG2VIDEO,
++ CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mpegts_audio_list[] = { CODEC_ID_MP2,
++ CODEC_ID_MP3,
++ CODEC_ID_AC3,
++ CODEC_ID_DTS,
++ CODEC_ID_AAC,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = mpegts_video_list;
++ *audio_codec_list = mpegts_audio_list;
++ } else if (!strcmp (format_name, "vob")) {
++ static enum CodecID vob_video_list[] =
++ { CODEC_ID_MPEG2VIDEO, CODEC_ID_NONE };
++ static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3,
++ CODEC_ID_DTS, CODEC_ID_NONE
++ };
++
++ *video_codec_list = vob_video_list;
++ *audio_codec_list = vob_audio_list;
++ } else if (!strcmp (format_name, "flv")) {
++ static enum CodecID flv_video_list[] = { CODEC_ID_FLV1, CODEC_ID_NONE };
++ static enum CodecID flv_audio_list[] = { CODEC_ID_MP3, CODEC_ID_NONE };
++
++ *video_codec_list = flv_video_list;
++ *audio_codec_list = flv_audio_list;
++ } else if (!strcmp (format_name, "asf")) {
++ static enum CodecID asf_video_list[] =
++ { CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_MSMPEG4V3, CODEC_ID_NONE };
++ static enum CodecID asf_audio_list[] =
++ { CODEC_ID_WMAV1, CODEC_ID_WMAV2, CODEC_ID_MP3, CODEC_ID_NONE };
++
++ *video_codec_list = asf_video_list;
++ *audio_codec_list = asf_audio_list;
++ } else if (!strcmp (format_name, "dv")) {
++ static enum CodecID dv_video_list[] = { CODEC_ID_DVVIDEO, CODEC_ID_NONE };
++ static enum CodecID dv_audio_list[] = { CODEC_ID_PCM_S16LE, CODEC_ID_NONE };
++
++ *video_codec_list = dv_video_list;
++ *audio_codec_list = dv_audio_list;
++ } else if (!strcmp (format_name, "mov")) {
++ static enum CodecID mov_video_list[] = {
++ CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_MPEG4,
++ CODEC_ID_H263, CODEC_ID_H263P,
++ CODEC_ID_H264, CODEC_ID_DVVIDEO,
++ CODEC_ID_MJPEG,
++ CODEC_ID_NONE
++ };
++ static enum CodecID mov_audio_list[] = {
++ CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_ADPCM_IMA_QT,
++ CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_AAC,
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE,
++ CODEC_ID_MP3, CODEC_ID_NONE
++ };
++
++ *video_codec_list = mov_video_list;
++ *audio_codec_list = mov_audio_list;
++ } else if ((!strcmp (format_name, "3gp") || !strcmp (format_name, "3g2"))) {
++ static enum CodecID tgp_video_list[] = {
++ CODEC_ID_MPEG4, CODEC_ID_H263, CODEC_ID_H263P, CODEC_ID_H264,
++ CODEC_ID_NONE
++ };
++ static enum CodecID tgp_audio_list[] = {
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_AAC,
++ CODEC_ID_NONE
++ };
++
++ *video_codec_list = tgp_video_list;
++ *audio_codec_list = tgp_audio_list;
++ } else if (!strcmp (format_name, "mmf")) {
++ static enum CodecID mmf_audio_list[] = {
++ CODEC_ID_ADPCM_YAMAHA, CODEC_ID_NONE
++ };
++ *video_codec_list = NULL;
++ *audio_codec_list = mmf_audio_list;
++ } else if (!strcmp (format_name, "amr")) {
++ static enum CodecID amr_audio_list[] = {
++ CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
++ CODEC_ID_NONE
++ };
++ *video_codec_list = NULL;
++ *audio_codec_list = amr_audio_list;
++ } else if (!strcmp (format_name, "gif")) {
++ static enum CodecID gif_image_list[] = {
++ CODEC_ID_RAWVIDEO, CODEC_ID_NONE
++ };
++ *video_codec_list = gif_image_list;
++ *audio_codec_list = NULL;
++ } else if ((plugin->audio_codec != CODEC_ID_NONE) ||
++ (plugin->video_codec != CODEC_ID_NONE)) {
++ tmp_vlist[0] = plugin->video_codec;
++ tmp_alist[0] = plugin->audio_codec;
++
++ *video_codec_list = tmp_vlist;
++ *audio_codec_list = tmp_alist;
++ } else {
++ GST_LOG ("Format %s not found", format_name);
++ return FALSE;
++ }
++
++ return TRUE;
++}
++
++/* Convert a GstCaps to a FFMPEG codec ID. Size et all
++ * are omitted, that can be queried by the user itself,
++ * we're not eating the GstCaps or anything
++ * A pointer to an allocated context is also needed for
++ * optional extra info
++ */
++
++enum CodecID
++gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
++{
++ enum CodecID id = CODEC_ID_NONE;
++ const gchar *mimetype;
++ const GstStructure *structure;
++ gboolean video = FALSE, audio = FALSE; /* we want to be sure! */
++
++ g_return_val_if_fail (caps != NULL, CODEC_ID_NONE);
++ g_return_val_if_fail (gst_caps_get_size (caps) == 1, CODEC_ID_NONE);
++ structure = gst_caps_get_structure (caps, 0);
++
++ mimetype = gst_structure_get_name (structure);
++
++ if (!strcmp (mimetype, "video/x-raw-rgb") ||
++ !strcmp (mimetype, "video/x-raw-yuv")) {
++ id = CODEC_ID_RAWVIDEO;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-raw-int")) {
++ gint depth, width, endianness;
++ gboolean signedness;
++
++ if (gst_structure_get_int (structure, "endianness", &endianness) &&
++ gst_structure_get_boolean (structure, "signed", &signedness) &&
++ gst_structure_get_int (structure, "width", &width) &&
++ gst_structure_get_int (structure, "depth", &depth) && depth == width) {
++ switch (depth) {
++ case 8:
++ if (signedness) {
++ id = CODEC_ID_PCM_S8;
++ } else {
++ id = CODEC_ID_PCM_U8;
++ }
++ break;
++ case 16:
++ switch (endianness) {
++ case G_BIG_ENDIAN:
++ if (signedness) {
++ id = CODEC_ID_PCM_S16BE;
++ } else {
++ id = CODEC_ID_PCM_U16BE;
++ }
++ break;
++ case G_LITTLE_ENDIAN:
++ if (signedness) {
++ id = CODEC_ID_PCM_S16LE;
++ } else {
++ id = CODEC_ID_PCM_U16LE;
++ }
++ break;
++ }
++ break;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-mulaw")) {
++ id = CODEC_ID_PCM_MULAW;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-alaw")) {
++ id = CODEC_ID_PCM_ALAW;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-dv")) {
++ gboolean sys_strm;
++
++ if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
++ !sys_strm) {
++ id = CODEC_ID_DVVIDEO;
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-dv")) { /* ??? */
++ id = CODEC_ID_DVAUDIO;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h263")) {
++ const gchar *h263version =
++ gst_structure_get_string (structure, "h263version");
++ if (h263version && !strcmp (h263version, "h263p"))
++ id = CODEC_ID_H263P;
++ else
++ id = CODEC_ID_H263;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-intel-h263")) {
++ id = CODEC_ID_H263I;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h261")) {
++ id = CODEC_ID_H261;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/mpeg")) {
++ gboolean sys_strm;
++ gint mpegversion;
++
++ if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
++ gst_structure_get_int (structure, "mpegversion", &mpegversion) &&
++ !sys_strm) {
++ switch (mpegversion) {
++ case 1:
++ id = CODEC_ID_MPEG1VIDEO;
++ break;
++ case 2:
++ id = CODEC_ID_MPEG2VIDEO;
++ break;
++ case 4:
++ id = CODEC_ID_MPEG4;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "image/jpeg")) {
++ id = CODEC_ID_MJPEG; /* A... B... */
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-jpeg-b")) {
++ id = CODEC_ID_MJPEGB;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-wmv")) {
++ gint wmvversion = 0;
++
++ if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
++ switch (wmvversion) {
++ case 1:
++ id = CODEC_ID_WMV1;
++ break;
++ case 2:
++ id = CODEC_ID_WMV2;
++ break;
++ case 3:
++ {
++ guint32 fourcc;
++
++ /* WMV3 unless the fourcc exists and says otherwise */
++ id = CODEC_ID_WMV3;
++
++ if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
++ if ((fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1')) ||
++ (fourcc == GST_MAKE_FOURCC ('W', 'M', 'V', 'A'))) {
++ id = CODEC_ID_VC1;
++ }
++ }
++ }
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-vorbis")) {
++ id = CODEC_ID_VORBIS;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-qdm2")) {
++ id = CODEC_ID_QDM2;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/mpeg")) {
++ gint layer = 0;
++ gint mpegversion = 0;
++
++ if (gst_structure_get_int (structure, "mpegversion", &mpegversion)) {
++ switch (mpegversion) {
++ case 2: /* ffmpeg uses faad for both... */
++ case 4:
++ id = CODEC_ID_AAC;
++ break;
++ case 1:
++ if (gst_structure_get_int (structure, "layer", &layer)) {
++ switch (layer) {
++ case 1:
++ id = CODEC_ID_MP1;
++ break;
++ case 2:
++ id = CODEC_ID_MP2;
++ break;
++ case 3:
++ id = CODEC_ID_MP3;
++ break;
++ }
++ }
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-musepack")) {
++ gint streamversion = -1;
++
++ if (gst_structure_get_int (structure, "streamversion", &streamversion)) {
++ if (streamversion == 7)
++ id = CODEC_ID_MUSEPACK7;
++ } else {
++ id = CODEC_ID_MUSEPACK7;
++ }
++ } else if (!strcmp (mimetype, "audio/x-wma")) {
++ gint wmaversion = 0;
++
++ if (gst_structure_get_int (structure, "wmaversion", &wmaversion)) {
++ switch (wmaversion) {
++ case 1:
++ id = CODEC_ID_WMAV1;
++ break;
++ case 2:
++ id = CODEC_ID_WMAV2;
++ break;
++ case 3:
++ id = CODEC_ID_WMAPRO;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-wms")) {
++ id = CODEC_ID_WMAVOICE;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-ac3")) {
++ id = CODEC_ID_AC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-eac3")) {
++ id = CODEC_ID_EAC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-vnd.sony.atrac3") ||
++ !strcmp (mimetype, "audio/atrac3")) {
++ id = CODEC_ID_ATRAC3;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-dts")) {
++ id = CODEC_ID_DTS;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "application/x-ape")) {
++ id = CODEC_ID_APE;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-msmpeg")) {
++ gint msmpegversion = 0;
++
++ if (gst_structure_get_int (structure, "msmpegversion", &msmpegversion)) {
++ switch (msmpegversion) {
++ case 41:
++ id = CODEC_ID_MSMPEG4V1;
++ break;
++ case 42:
++ id = CODEC_ID_MSMPEG4V2;
++ break;
++ case 43:
++ id = CODEC_ID_MSMPEG4V3;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-svq")) {
++ gint svqversion = 0;
++
++ if (gst_structure_get_int (structure, "svqversion", &svqversion)) {
++ switch (svqversion) {
++ case 1:
++ id = CODEC_ID_SVQ1;
++ break;
++ case 3:
++ id = CODEC_ID_SVQ3;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-huffyuv")) {
++ id = CODEC_ID_HUFFYUV;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-mace")) {
++ gint maceversion = 0;
++
++ if (gst_structure_get_int (structure, "maceversion", &maceversion)) {
++ switch (maceversion) {
++ case 3:
++ id = CODEC_ID_MACE3;
++ break;
++ case 6:
++ id = CODEC_ID_MACE6;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-theora")) {
++ id = CODEC_ID_THEORA;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp3")) {
++ id = CODEC_ID_VP3;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp5")) {
++ id = CODEC_ID_VP5;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6")) {
++ id = CODEC_ID_VP6;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6-flash")) {
++ id = CODEC_ID_VP6F;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp6-alpha")) {
++ id = CODEC_ID_VP6A;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-vp8")) {
++ id = CODEC_ID_VP8;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-flash-screen")) {
++ id = CODEC_ID_FLASHSV;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-indeo")) {
++ gint indeoversion = 0;
++
++ if (gst_structure_get_int (structure, "indeoversion", &indeoversion)) {
++ switch (indeoversion) {
++ case 5:
++ id = CODEC_ID_INDEO5;
++ break;
++ case 3:
++ id = CODEC_ID_INDEO3;
++ break;
++ case 2:
++ id = CODEC_ID_INDEO2;
++ break;
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "video/x-divx")) {
++ gint divxversion = 0;
++
++ if (gst_structure_get_int (structure, "divxversion", &divxversion)) {
++ switch (divxversion) {
++ case 3:
++ id = CODEC_ID_MSMPEG4V3;
++ break;
++ case 4:
++ case 5:
++ id = CODEC_ID_MPEG4;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-3ivx")) {
++ id = CODEC_ID_MPEG4;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-xvid")) {
++ id = CODEC_ID_MPEG4;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-ffv")) {
++ gint ffvversion = 0;
++
++ if (gst_structure_get_int (structure, "ffvversion", &ffvversion) &&
++ ffvversion == 1) {
++ id = CODEC_ID_FFV1;
++ video = TRUE;
++ }
++ } else if (!strcmp (mimetype, "audio/x-adpcm")) {
++ const gchar *layout;
++
++ layout = gst_structure_get_string (structure, "layout");
++ if (layout == NULL) {
++ /* break */
++ } else if (!strcmp (layout, "quicktime")) {
++ id = CODEC_ID_ADPCM_IMA_QT;
++ } else if (!strcmp (layout, "microsoft")) {
++ id = CODEC_ID_ADPCM_MS;
++ } else if (!strcmp (layout, "dvi")) {
++ id = CODEC_ID_ADPCM_IMA_WAV;
++ } else if (!strcmp (layout, "4xm")) {
++ id = CODEC_ID_ADPCM_4XM;
++ } else if (!strcmp (layout, "smjpeg")) {
++ id = CODEC_ID_ADPCM_IMA_SMJPEG;
++ } else if (!strcmp (layout, "dk3")) {
++ id = CODEC_ID_ADPCM_IMA_DK3;
++ } else if (!strcmp (layout, "dk4")) {
++ id = CODEC_ID_ADPCM_IMA_DK4;
++ } else if (!strcmp (layout, "westwood")) {
++ id = CODEC_ID_ADPCM_IMA_WS;
++ } else if (!strcmp (layout, "iss")) {
++ id = CODEC_ID_ADPCM_IMA_ISS;
++ } else if (!strcmp (layout, "xa")) {
++ id = CODEC_ID_ADPCM_XA;
++ } else if (!strcmp (layout, "adx")) {
++ id = CODEC_ID_ADPCM_ADX;
++ } else if (!strcmp (layout, "ea")) {
++ id = CODEC_ID_ADPCM_EA;
++ } else if (!strcmp (layout, "g726")) {
++ id = CODEC_ID_ADPCM_G726;
++ } else if (!strcmp (layout, "g721")) {
++ id = CODEC_ID_ADPCM_G726;
++ } else if (!strcmp (layout, "ct")) {
++ id = CODEC_ID_ADPCM_CT;
++ } else if (!strcmp (layout, "swf")) {
++ id = CODEC_ID_ADPCM_SWF;
++ } else if (!strcmp (layout, "yamaha")) {
++ id = CODEC_ID_ADPCM_YAMAHA;
++ } else if (!strcmp (layout, "sbpro2")) {
++ id = CODEC_ID_ADPCM_SBPRO_2;
++ } else if (!strcmp (layout, "sbpro3")) {
++ id = CODEC_ID_ADPCM_SBPRO_3;
++ } else if (!strcmp (layout, "sbpro4")) {
++ id = CODEC_ID_ADPCM_SBPRO_4;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-4xm")) {
++ id = CODEC_ID_4XM;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-dpcm")) {
++ const gchar *layout;
++
++ layout = gst_structure_get_string (structure, "layout");
++ if (!layout) {
++ /* .. */
++ } else if (!strcmp (layout, "roq")) {
++ id = CODEC_ID_ROQ_DPCM;
++ } else if (!strcmp (layout, "interplay")) {
++ id = CODEC_ID_INTERPLAY_DPCM;
++ } else if (!strcmp (layout, "xan")) {
++ id = CODEC_ID_XAN_DPCM;
++ } else if (!strcmp (layout, "sol")) {
++ id = CODEC_ID_SOL_DPCM;
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-flac")) {
++ id = CODEC_ID_FLAC;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-shorten")) {
++ id = CODEC_ID_SHORTEN;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-alac")) {
++ id = CODEC_ID_ALAC;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-cinepak")) {
++ id = CODEC_ID_CINEPAK;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-pn-realvideo")) {
++ gint rmversion;
++
++ if (gst_structure_get_int (structure, "rmversion", &rmversion)) {
++ switch (rmversion) {
++ case 1:
++ id = CODEC_ID_RV10;
++ break;
++ case 2:
++ id = CODEC_ID_RV20;
++ break;
++ case 3:
++ id = CODEC_ID_RV30;
++ break;
++ case 4:
++ id = CODEC_ID_RV40;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ video = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-sipro")) {
++ id = CODEC_ID_SIPR;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/x-pn-realaudio")) {
++ gint raversion;
++
++ if (gst_structure_get_int (structure, "raversion", &raversion)) {
++ switch (raversion) {
++ case 1:
++ id = CODEC_ID_RA_144;
++ break;
++ case 2:
++ id = CODEC_ID_RA_288;
++ break;
++ case 8:
++ id = CODEC_ID_COOK;
++ break;
++ }
++ }
++ if (id != CODEC_ID_NONE)
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-rle")) {
++ const gchar *layout;
++
++ if ((layout = gst_structure_get_string (structure, "layout"))) {
++ if (!strcmp (layout, "microsoft")) {
++ id = CODEC_ID_MSRLE;
++ video = TRUE;
++ }
++ }
++ } else if (!strcmp (mimetype, "video/x-xan")) {
++ gint wcversion = 0;
++
++ if ((gst_structure_get_int (structure, "wcversion", &wcversion))) {
++ switch (wcversion) {
++ case 3:
++ id = CODEC_ID_XAN_WC3;
++ video = TRUE;
++ break;
++ case 4:
++ id = CODEC_ID_XAN_WC4;
++ video = TRUE;
++ break;
++ default:
++ break;
++ }
++ }
++ } else if (!strcmp (mimetype, "audio/AMR")) {
++ audio = TRUE;
++ id = CODEC_ID_AMR_NB;
++ } else if (!strcmp (mimetype, "audio/AMR-WB")) {
++ id = CODEC_ID_AMR_WB;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "audio/qcelp")) {
++ id = CODEC_ID_QCELP;
++ audio = TRUE;
++ } else if (!strcmp (mimetype, "video/x-h264")) {
++ id = CODEC_ID_H264;
++ video = TRUE;
++ } else if (!strcmp (mimetype, "video/x-flash-video")) {
++ gint flvversion = 0;
++
++ if ((gst_structure_get_int (structure, "flvversion", &flvversion))) {
++ switch (flvversion) {
++ case 1:
++ id = CODEC_ID_FLV1;
++ video = TRUE;
++ break;
++ default:
++ break;
++ }
++ }
++
++ } else if (!strcmp (mimetype, "audio/x-nellymoser")) {
++ id = CODEC_ID_NELLYMOSER;
++ audio = TRUE;
++ } else if (!strncmp (mimetype, "audio/x-gst_ff-", 15)) {
++ gchar ext[16];
++ AVCodec *codec;
++
++ if (strlen (mimetype) <= 30 &&
++ sscanf (mimetype, "audio/x-gst_ff-%s", ext) == 1) {
++ if ((codec = avcodec_find_decoder_by_name (ext)) ||
++ (codec = avcodec_find_encoder_by_name (ext))) {
++ id = codec->id;
++ audio = TRUE;
++ }
++ }
++ } else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
++ gchar ext[16];
++ AVCodec *codec;
++
++ if (strlen (mimetype) <= 30 &&
++ sscanf (mimetype, "video/x-gst_ff-%s", ext) == 1) {
++ if ((codec = avcodec_find_decoder_by_name (ext)) ||
++ (codec = avcodec_find_encoder_by_name (ext))) {
++ id = codec->id;
++ video = TRUE;
++ }
++ }
++ }
++
++ if (context != NULL) {
++ if (video == TRUE) {
++ context->codec_type = AVMEDIA_TYPE_VIDEO;
++ } else if (audio == TRUE) {
++ context->codec_type = AVMEDIA_TYPE_AUDIO;
++ } else {
++ context->codec_type = AVMEDIA_TYPE_UNKNOWN;
++ }
++ context->codec_id = id;
++ gst_ffmpeg_caps_with_codecid (id, context->codec_type, caps, context);
++ }
++
++ if (id != CODEC_ID_NONE) {
++ GST_DEBUG ("The id=%d belongs to the caps %" GST_PTR_FORMAT, id, caps);
++ } else {
++ GST_WARNING ("Couldn't figure out the id for caps %" GST_PTR_FORMAT, caps);
++ }
++
++ return id;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegcodecmap.c.rej 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegcodecmap.c.rej 2014-08-08 15:31:06.055868246 +0200
+@@ -0,0 +1,12 @@
++--- ext/ffmpeg/gstffmpegcodecmap.c
+++++ ext/ffmpeg/gstffmpegcodecmap.c
++@@ -1884,9 +1842,6 @@
++ gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-rgb",
++ "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, "endianness",
++ G_TYPE_INT, endianness, NULL);
++- if (caps && context) {
++- gst_ffmpeg_set_palette (caps, context);
++- }
++ }
++ } else if (fmt) {
++ caps = gst_ff_vid_caps_new (context, codec_id, encode, "video/x-raw-yuv",
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c 2014-08-08 14:46:31.462772351 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c 2014-08-08 15:32:18.608870847 +0200
+@@ -88,7 +88,6 @@
+ gint depth;
+ } audio;
+ } format;
+- gboolean waiting_for_key;
+ gboolean discont;
+ gboolean clear_ts;
+
+@@ -438,7 +437,6 @@
+ ffmpegdec->pcache = NULL;
+ ffmpegdec->par = NULL;
+ ffmpegdec->opened = FALSE;
+- ffmpegdec->waiting_for_key = TRUE;
+ ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
+ ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
+ ffmpegdec->do_padding = DEFAULT_DO_PADDING;
+@@ -608,11 +606,6 @@
+ gst_ffmpeg_avcodec_close (ffmpegdec->context);
+ ffmpegdec->opened = FALSE;
+
+- if (ffmpegdec->context->palctrl) {
+- av_free (ffmpegdec->context->palctrl);
+- ffmpegdec->context->palctrl = NULL;
+- }
+-
+ if (ffmpegdec->context->extradata) {
+ av_free (ffmpegdec->context->extradata);
+ ffmpegdec->context->extradata = NULL;
+@@ -864,7 +857,7 @@
+
+ /* workaround encoder bugs */
+ ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
+- ffmpegdec->context->error_recognition = 1;
++ ffmpegdec->context->err_recognition = 1;
+
+ /* for slow cpus */
+ ffmpegdec->context->lowres = ffmpegdec->lowres;
+@@ -944,7 +937,7 @@
+ fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
+ width, height);
+
+- if (!ffmpegdec->context->palctrl && ffmpegdec->can_allocate_aligned) {
++ if (ffmpegdec->can_allocate_aligned) {
+ GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
+ /* no pallete, we can use the buffer size to alloc */
+ ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
+@@ -1083,7 +1076,6 @@
+ /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
+ * the opaque data. */
+ picture->type = FF_BUFFER_TYPE_USER;
+- picture->age = 256 * 256 * 256 * 64;
+ picture->opaque = buf;
+
+ #ifdef EXTRA_REF
+@@ -1414,10 +1406,6 @@
+ } else {
+ if (diff >= 0) {
+ /* we're too slow, try to speed up */
+- if (ffmpegdec->waiting_for_key) {
+- /* we were waiting for a keyframe, that's ok */
+- goto skipping;
+- }
+ /* switch to skip_frame mode */
+ goto skip_frame;
+ }
+@@ -1427,11 +1415,6 @@
+ ffmpegdec->processed++;
+ return TRUE;
+
+-skipping:
+- {
+- res = FALSE;
+- goto drop_qos;
+- }
+ normal_mode:
+ {
+ if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
+@@ -1528,43 +1511,6 @@
+ }
+
+
+-/* figure out if the current picture is a keyframe, return TRUE if that is
+- * the case. */
+-static gboolean
+-check_keyframe (GstFFMpegDec * ffmpegdec)
+-{
+- GstFFMpegDecClass *oclass;
+- gboolean is_itype = FALSE;
+- gboolean is_reference = FALSE;
+- gboolean iskeyframe;
+-
+- /* figure out if we are dealing with a keyframe */
+- oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
+-
+- /* remember that we have B frames, we need this for the DTS -> PTS conversion
+- * code */
+- if (!ffmpegdec->has_b_frames && ffmpegdec->picture->pict_type == FF_B_TYPE) {
+- GST_DEBUG_OBJECT (ffmpegdec, "we have B frames");
+- ffmpegdec->has_b_frames = TRUE;
+- }
+-
+- is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
+- is_reference = (ffmpegdec->picture->reference == 1);
+-
+- iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
+- || (oclass->in_plugin->id == CODEC_ID_INDEO3)
+- || (oclass->in_plugin->id == CODEC_ID_MSZH)
+- || (oclass->in_plugin->id == CODEC_ID_ZLIB)
+- || (oclass->in_plugin->id == CODEC_ID_VP3)
+- || (oclass->in_plugin->id == CODEC_ID_HUFFYUV);
+-
+- GST_LOG_OBJECT (ffmpegdec,
+- "current picture: type: %d, is_keyframe:%d, is_itype:%d, is_reference:%d",
+- ffmpegdec->picture->pict_type, iskeyframe, is_itype, is_reference);
+-
+- return iskeyframe;
+-}
+-
+ /* get an outbuf buffer with the current picture */
+ static GstFlowReturn
+ get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
+@@ -1694,7 +1640,6 @@
+ {
+ gint len = -1;
+ gint have_data;
+- gboolean iskeyframe;
+ gboolean mode_switch;
+ gboolean decode;
+ gint skip_frame = AVDISCARD_DEFAULT;
+@@ -1809,7 +1754,6 @@
+ gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
+ }
+
+-
+ /* Whether a frame is interlaced or not is unknown at the time of
+ buffer allocation, so caps on the buffer in opaque will have
+ the previous frame's interlaced flag set. So if interlacedness
+@@ -1831,10 +1775,6 @@
+ }
+ }
+
+- /* check if we are dealing with a keyframe here, this will also check if we
+- * are dealing with B frames. */
+- iskeyframe = check_keyframe (ffmpegdec);
+-
+ /* check that the timestamps go upwards */
+ if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
+ /* timestamps go backwards, this means frames were reordered and we must
+@@ -1865,7 +1805,7 @@
+ * timestamps */
+ if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
+ /* PTS and DTS are the same for keyframes */
+- if (!iskeyframe && ffmpegdec->next_out != -1) {
++ if (ffmpegdec->next_out != -1) {
+ /* interpolate all timestamps except for keyframes, FIXME, this is
+ * wrong when QoS is active. */
+ GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
+@@ -1874,16 +1814,6 @@
+ }
+ }
+
+- /* when we're waiting for a keyframe, see if we have one or drop the current
+- * non-keyframe */
+- if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
+- if (G_LIKELY (!iskeyframe))
+- goto drop_non_keyframe;
+-
+- /* we have a keyframe, we can stop waiting for one */
+- ffmpegdec->waiting_for_key = FALSE;
+- }
+-
+ /* get a handle to the output buffer */
+ *ret = get_output_buffer (ffmpegdec, outbuf);
+ if (G_UNLIKELY (*ret != GST_FLOW_OK))
+@@ -2000,20 +1930,11 @@
+ else
+ ffmpegdec->next_out = -1;
+
+- /* palette is not part of raw video frame in gst and the size
+- * of the outgoing buffer needs to be adjusted accordingly */
+- if (ffmpegdec->context->palctrl != NULL)
+- GST_BUFFER_SIZE (*outbuf) -= AVPALETTE_SIZE;
+-
+ /* now see if we need to clip the buffer against the segment boundaries. */
+ if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
+ out_duration)))
+ goto clipped;
+
+- /* mark as keyframe or delta unit */
+- if (!iskeyframe)
+- GST_BUFFER_FLAG_SET (*outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
+-
+ if (ffmpegdec->picture->top_field_first)
+ GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
+
+@@ -2024,11 +1945,6 @@
+ return len;
+
+ /* special cases */
+-drop_non_keyframe:
+- {
+- GST_WARNING_OBJECT (ffmpegdec, "Dropping non-keyframe (seek/init)");
+- goto beach;
+- }
+ no_output:
+ {
+ GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
+@@ -2422,7 +2338,6 @@
+ gst_ffmpegdec_reset_ts (ffmpegdec);
+ gst_ffmpegdec_reset_qos (ffmpegdec);
+ gst_ffmpegdec_flush_pcache (ffmpegdec);
+- ffmpegdec->waiting_for_key = TRUE;
+ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
+ clear_queued (ffmpegdec);
+ break;
+@@ -2560,17 +2475,6 @@
+
+ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
+
+- /* do early keyframe check pretty bad to rely on the keyframe flag in the
+- * source for this as it might not even be parsed (UDP/file/..). */
+- if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
+- GST_DEBUG_OBJECT (ffmpegdec, "waiting for keyframe");
+- if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DELTA_UNIT) &&
+- oclass->in_plugin->type != AVMEDIA_TYPE_AUDIO)
+- goto skip_keyframe;
+-
+- GST_DEBUG_OBJECT (ffmpegdec, "got keyframe");
+- ffmpegdec->waiting_for_key = FALSE;
+- }
+ /* parse cache joining. If there is cached data */
+ if (ffmpegdec->pcache) {
+ /* join with previous data */
+@@ -2805,12 +2709,6 @@
+ gst_buffer_unref (inbuf);
+ return GST_FLOW_NOT_NEGOTIATED;
+ }
+-skip_keyframe:
+- {
+- GST_DEBUG_OBJECT (ffmpegdec, "skipping non keyframe");
+- gst_buffer_unref (inbuf);
+- return GST_FLOW_OK;
+- }
+ }
+
+ static GstStateChangeReturn
+@@ -2936,7 +2834,7 @@
+ gchar *plugin_name;
+
+ /* only decoders */
+- if (!in_plugin->decode) {
++ if (!av_codec_is_decoder (in_plugin)) {
+ goto next;
+ }
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.orig 2014-08-08 15:31:06.057868246 +0200
+@@ -0,0 +1,2973 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ *
++ * 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., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <assert.h>
++#include <string.h>
++
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#else
++#include <libavcodec/avcodec.h>
++#endif
++
++#include <gst/gst.h>
++#include <gst/video/video.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++#include "gstffmpegutils.h"
++
++/* define to enable alternative buffer refcounting algorithm */
++#undef EXTRA_REF
++
++typedef struct _GstFFMpegDec GstFFMpegDec;
++
++#define MAX_TS_MASK 0xff
++
++/* for each incomming buffer we keep all timing info in a structure like this.
++ * We keep a circular array of these structures around to store the timing info.
++ * The index in the array is what we pass as opaque data (to pictures) and
++ * pts (to parsers) so that ffmpeg can remember them for us. */
++typedef struct
++{
++ gint idx;
++ GstClockTime timestamp;
++ GstClockTime duration;
++ gint64 offset;
++} GstTSInfo;
++
++struct _GstFFMpegDec
++{
++ GstElement element;
++
++ /* We need to keep track of our pads, so we do so here. */
++ GstPad *srcpad;
++ GstPad *sinkpad;
++
++ /* decoding */
++ AVCodecContext *context;
++ AVFrame *picture;
++ gboolean opened;
++ union
++ {
++ struct
++ {
++ gint width, height;
++ gint clip_width, clip_height;
++ gint par_n, par_d;
++ gint fps_n, fps_d;
++ gint old_fps_n, old_fps_d;
++ gboolean interlaced;
++
++ enum PixelFormat pix_fmt;
++ } video;
++ struct
++ {
++ gint channels;
++ gint samplerate;
++ gint depth;
++ } audio;
++ } format;
++ gboolean discont;
++ gboolean clear_ts;
++
++ /* for tracking DTS/PTS */
++ gboolean has_b_frames;
++ gboolean reordered_in;
++ GstClockTime last_in;
++ GstClockTime last_diff;
++ guint last_frames;
++ gboolean reordered_out;
++ GstClockTime last_out;
++ GstClockTime next_out;
++
++ /* parsing */
++ gboolean turnoff_parser; /* used for turning off aac raw parsing
++ * See bug #566250 */
++ AVCodecParserContext *pctx;
++ GstBuffer *pcache;
++ guint8 *padded;
++ guint padded_size;
++
++ GValue *par; /* pixel aspect ratio of incoming data */
++ gboolean current_dr; /* if direct rendering is enabled */
++ gboolean extra_ref; /* keep extra ref around in get/release */
++
++ /* some properties */
++ enum AVDiscard skip_frame;
++ gint lowres;
++ gboolean direct_rendering;
++ gboolean do_padding;
++ gboolean debug_mv;
++ gboolean crop;
++ int max_threads;
++
++ /* QoS stuff *//* with LOCK */
++ gdouble proportion;
++ GstClockTime earliest_time;
++ gint64 processed;
++ gint64 dropped;
++
++ /* clipping segment */
++ GstSegment segment;
++
++ gboolean is_realvideo;
++
++ GstTSInfo ts_info[MAX_TS_MASK + 1];
++ gint ts_idx;
++
++ /* reverse playback queue */
++ GList *queued;
++
++ /* Can downstream allocate 16bytes aligned data. */
++ gboolean can_allocate_aligned;
++};
++
++typedef struct _GstFFMpegDecClass GstFFMpegDecClass;
++
++struct _GstFFMpegDecClass
++{
++ GstElementClass parent_class;
++
++ AVCodec *in_plugin;
++ GstPadTemplate *srctempl, *sinktempl;
++};
++
++#define GST_TS_INFO_NONE &ts_info_none
++static const GstTSInfo ts_info_none = { -1, -1, -1, -1 };
++
++static const GstTSInfo *
++gst_ts_info_store (GstFFMpegDec * dec, GstClockTime timestamp,
++ GstClockTime duration, gint64 offset)
++{
++ gint idx = dec->ts_idx;
++ dec->ts_info[idx].idx = idx;
++ dec->ts_info[idx].timestamp = timestamp;
++ dec->ts_info[idx].duration = duration;
++ dec->ts_info[idx].offset = offset;
++ dec->ts_idx = (idx + 1) & MAX_TS_MASK;
++
++ return &dec->ts_info[idx];
++}
++
++static const GstTSInfo *
++gst_ts_info_get (GstFFMpegDec * dec, gint idx)
++{
++ if (G_UNLIKELY (idx < 0 || idx > MAX_TS_MASK))
++ return GST_TS_INFO_NONE;
++
++ return &dec->ts_info[idx];
++}
++
++#define GST_TYPE_FFMPEGDEC \
++ (gst_ffmpegdec_get_type())
++#define GST_FFMPEGDEC(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGDEC,GstFFMpegDec))
++#define GST_FFMPEGDEC_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGDEC,GstFFMpegDecClass))
++#define GST_IS_FFMPEGDEC(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGDEC))
++#define GST_IS_FFMPEGDEC_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEC))
++
++#define DEFAULT_LOWRES 0
++#define DEFAULT_SKIPFRAME 0
++#define DEFAULT_DIRECT_RENDERING TRUE
++#define DEFAULT_DO_PADDING TRUE
++#define DEFAULT_DEBUG_MV FALSE
++#define DEFAULT_CROP TRUE
++#define DEFAULT_MAX_THREADS 1
++
++enum
++{
++ PROP_0,
++ PROP_LOWRES,
++ PROP_SKIPFRAME,
++ PROP_DIRECT_RENDERING,
++ PROP_DO_PADDING,
++ PROP_DEBUG_MV,
++ PROP_CROP,
++ PROP_MAX_THREADS,
++ PROP_LAST
++};
++
++/* A number of function prototypes are given so we can refer to them later. */
++static void gst_ffmpegdec_base_init (GstFFMpegDecClass * klass);
++static void gst_ffmpegdec_class_init (GstFFMpegDecClass * klass);
++static void gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec);
++static void gst_ffmpegdec_finalize (GObject * object);
++
++static gboolean gst_ffmpegdec_query (GstPad * pad, GstQuery * query);
++static gboolean gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event);
++
++static gboolean gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps);
++static gboolean gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event);
++static GstFlowReturn gst_ffmpegdec_chain (GstPad * pad, GstBuffer * buf);
++
++static GstStateChangeReturn gst_ffmpegdec_change_state (GstElement * element,
++ GstStateChange transition);
++
++static void gst_ffmpegdec_set_property (GObject * object,
++ guint prop_id, const GValue * value, GParamSpec * pspec);
++static void gst_ffmpegdec_get_property (GObject * object,
++ guint prop_id, GValue * value, GParamSpec * pspec);
++
++static gboolean gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec,
++ gboolean force);
++
++/* some sort of bufferpool handling, but different */
++static int gst_ffmpegdec_get_buffer (AVCodecContext * context,
++ AVFrame * picture);
++static void gst_ffmpegdec_release_buffer (AVCodecContext * context,
++ AVFrame * picture);
++
++static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
++
++#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("ffdec-params")
++
++static GstElementClass *parent_class = NULL;
++
++#define GST_FFMPEGDEC_TYPE_LOWRES (gst_ffmpegdec_lowres_get_type())
++static GType
++gst_ffmpegdec_lowres_get_type (void)
++{
++ static GType ffmpegdec_lowres_type = 0;
++
++ if (!ffmpegdec_lowres_type) {
++ static const GEnumValue ffmpegdec_lowres[] = {
++ {0, "0", "full"},
++ {1, "1", "1/2-size"},
++ {2, "2", "1/4-size"},
++ {0, NULL, NULL},
++ };
++
++ ffmpegdec_lowres_type =
++ g_enum_register_static ("GstFFMpegDecLowres", ffmpegdec_lowres);
++ }
++
++ return ffmpegdec_lowres_type;
++}
++
++#define GST_FFMPEGDEC_TYPE_SKIPFRAME (gst_ffmpegdec_skipframe_get_type())
++static GType
++gst_ffmpegdec_skipframe_get_type (void)
++{
++ static GType ffmpegdec_skipframe_type = 0;
++
++ if (!ffmpegdec_skipframe_type) {
++ static const GEnumValue ffmpegdec_skipframe[] = {
++ {0, "0", "Skip nothing"},
++ {1, "1", "Skip B-frames"},
++ {2, "2", "Skip IDCT/Dequantization"},
++ {5, "5", "Skip everything"},
++ {0, NULL, NULL},
++ };
++
++ ffmpegdec_skipframe_type =
++ g_enum_register_static ("GstFFMpegDecSkipFrame", ffmpegdec_skipframe);
++ }
++
++ return ffmpegdec_skipframe_type;
++}
++
++static void
++gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
++{
++ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
++ GstPadTemplate *sinktempl, *srctempl;
++ GstCaps *sinkcaps, *srccaps;
++ AVCodec *in_plugin;
++ gchar *longname, *classification, *description;
++
++ in_plugin =
++ (AVCodec *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
++ GST_FFDEC_PARAMS_QDATA);
++ g_assert (in_plugin != NULL);
++
++ /* construct the element details struct */
++ longname = g_strdup_printf ("FFmpeg %s decoder", in_plugin->long_name);
++ classification = g_strdup_printf ("Codec/Decoder/%s",
++ (in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
++ description = g_strdup_printf ("FFmpeg %s decoder", in_plugin->name);
++ gst_element_class_set_details_simple (element_class, longname, classification,
++ description,
++ "Wim Taymans <wim.taymans@gmail.com>, "
++ "Ronald Bultje <rbultje@ronald.bitfreak.net>, "
++ "Edward Hervey <bilboed@bilboed.com>");
++ g_free (longname);
++ g_free (classification);
++ g_free (description);
++
++ /* get the caps */
++ sinkcaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, FALSE);
++ if (!sinkcaps) {
++ GST_DEBUG ("Couldn't get sink caps for decoder '%s'", in_plugin->name);
++ sinkcaps = gst_caps_from_string ("unknown/unknown");
++ }
++ if (in_plugin->type == AVMEDIA_TYPE_VIDEO) {
++ srccaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv");
++ } else {
++ srccaps = gst_ffmpeg_codectype_to_audio_caps (NULL,
++ in_plugin->id, FALSE, in_plugin);
++ }
++ if (!srccaps) {
++ GST_DEBUG ("Couldn't get source caps for decoder '%s'", in_plugin->name);
++ srccaps = gst_caps_from_string ("unknown/unknown");
++ }
++
++ /* pad templates */
++ sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK,
++ GST_PAD_ALWAYS, sinkcaps);
++ srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
++
++ gst_element_class_add_pad_template (element_class, srctempl);
++ gst_element_class_add_pad_template (element_class, sinktempl);
++
++ klass->in_plugin = in_plugin;
++ klass->srctempl = srctempl;
++ klass->sinktempl = sinktempl;
++}
++
++static void
++gst_ffmpegdec_class_init (GstFFMpegDecClass * klass)
++{
++ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
++ GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
++
++ parent_class = g_type_class_peek_parent (klass);
++
++ gobject_class->finalize = gst_ffmpegdec_finalize;
++
++ gobject_class->set_property = gst_ffmpegdec_set_property;
++ gobject_class->get_property = gst_ffmpegdec_get_property;
++
++ if (klass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
++ int caps;
++
++ g_object_class_install_property (gobject_class, PROP_SKIPFRAME,
++ g_param_spec_enum ("skip-frame", "Skip frames",
++ "Which types of frames to skip during decoding",
++ GST_FFMPEGDEC_TYPE_SKIPFRAME, 0,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_LOWRES,
++ g_param_spec_enum ("lowres", "Low resolution",
++ "At which resolution to decode images", GST_FFMPEGDEC_TYPE_LOWRES,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DIRECT_RENDERING,
++ g_param_spec_boolean ("direct-rendering", "Direct Rendering",
++ "Enable direct rendering", DEFAULT_DIRECT_RENDERING,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DO_PADDING,
++ g_param_spec_boolean ("do-padding", "Do Padding",
++ "Add 0 padding before decoding data", DEFAULT_DO_PADDING,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ g_object_class_install_property (gobject_class, PROP_DEBUG_MV,
++ g_param_spec_boolean ("debug-mv", "Debug motion vectors",
++ "Whether ffmpeg should print motion vectors on top of the image",
++ DEFAULT_DEBUG_MV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++#if 0
++ g_object_class_install_property (gobject_class, PROP_CROP,
++ g_param_spec_boolean ("crop", "Crop",
++ "Crop images to the display region",
++ DEFAULT_CROP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++#endif
++
++ caps = klass->in_plugin->capabilities;
++ if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
++ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS,
++ g_param_spec_int ("max-threads", "Maximum decode threads",
++ "Maximum number of worker threads to spawn. (0 = auto)",
++ 0, G_MAXINT, DEFAULT_MAX_THREADS,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++ }
++ }
++
++ gstelement_class->change_state = gst_ffmpegdec_change_state;
++}
++
++static void
++gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ /* setup pads */
++ ffmpegdec->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
++ gst_pad_set_setcaps_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_setcaps));
++ gst_pad_set_event_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_sink_event));
++ gst_pad_set_chain_function (ffmpegdec->sinkpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_chain));
++ gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
++
++ ffmpegdec->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
++ gst_pad_use_fixed_caps (ffmpegdec->srcpad);
++ gst_pad_set_event_function (ffmpegdec->srcpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_src_event));
++ gst_pad_set_query_function (ffmpegdec->srcpad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegdec_query));
++ gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
++
++ /* some ffmpeg data */
++ ffmpegdec->context = avcodec_alloc_context ();
++ ffmpegdec->picture = avcodec_alloc_frame ();
++ ffmpegdec->pctx = NULL;
++ ffmpegdec->pcache = NULL;
++ ffmpegdec->par = NULL;
++ ffmpegdec->opened = FALSE;
++ ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
++ ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
++ ffmpegdec->do_padding = DEFAULT_DO_PADDING;
++ ffmpegdec->debug_mv = DEFAULT_DEBUG_MV;
++ ffmpegdec->crop = DEFAULT_CROP;
++ ffmpegdec->max_threads = DEFAULT_MAX_THREADS;
++
++ ffmpegdec->format.video.par_n = -1;
++ ffmpegdec->format.video.fps_n = -1;
++ ffmpegdec->format.video.old_fps_n = -1;
++ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
++
++ /* We initially assume downstream can allocate 16 bytes aligned buffers */
++ ffmpegdec->can_allocate_aligned = TRUE;
++}
++
++static void
++gst_ffmpegdec_finalize (GObject * object)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ if (ffmpegdec->context != NULL) {
++ av_free (ffmpegdec->context);
++ ffmpegdec->context = NULL;
++ }
++
++ if (ffmpegdec->picture != NULL) {
++ av_free (ffmpegdec->picture);
++ ffmpegdec->picture = NULL;
++ }
++
++ G_OBJECT_CLASS (parent_class)->finalize (object);
++}
++
++static gboolean
++gst_ffmpegdec_query (GstPad * pad, GstQuery * query)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstPad *peer;
++ gboolean res;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ res = FALSE;
++
++ if ((peer = gst_pad_get_peer (ffmpegdec->sinkpad))) {
++ /* just forward to peer */
++ res = gst_pad_query (peer, query);
++ gst_object_unref (peer);
++ }
++#if 0
++ {
++ GstFormat bfmt;
++
++ bfmt = GST_FORMAT_BYTES;
++
++ /* ok, do bitrate calc... */
++ if ((type != GST_QUERY_POSITION && type != GST_QUERY_TOTAL) ||
++ *fmt != GST_FORMAT_TIME || ffmpegdec->context->bit_rate == 0 ||
++ !gst_pad_query (peer, type, &bfmt, value))
++ return FALSE;
++
++ if (ffmpegdec->pcache && type == GST_QUERY_POSITION)
++ *value -= GST_BUFFER_SIZE (ffmpegdec->pcache);
++ *value *= GST_SECOND / ffmpegdec->context->bit_rate;
++ }
++#endif
++
++ gst_object_unref (ffmpegdec);
++
++ return res;
++}
++
++static void
++gst_ffmpegdec_reset_ts (GstFFMpegDec * ffmpegdec)
++{
++ ffmpegdec->last_in = GST_CLOCK_TIME_NONE;
++ ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
++ ffmpegdec->last_frames = 0;
++ ffmpegdec->last_out = GST_CLOCK_TIME_NONE;
++ ffmpegdec->next_out = GST_CLOCK_TIME_NONE;
++ ffmpegdec->reordered_in = FALSE;
++ ffmpegdec->reordered_out = FALSE;
++}
++
++static void
++gst_ffmpegdec_update_qos (GstFFMpegDec * ffmpegdec, gdouble proportion,
++ GstClockTime timestamp)
++{
++ GST_LOG_OBJECT (ffmpegdec, "update QOS: %f, %" GST_TIME_FORMAT,
++ proportion, GST_TIME_ARGS (timestamp));
++
++ GST_OBJECT_LOCK (ffmpegdec);
++ ffmpegdec->proportion = proportion;
++ ffmpegdec->earliest_time = timestamp;
++ GST_OBJECT_UNLOCK (ffmpegdec);
++}
++
++static void
++gst_ffmpegdec_reset_qos (GstFFMpegDec * ffmpegdec)
++{
++ gst_ffmpegdec_update_qos (ffmpegdec, 0.5, GST_CLOCK_TIME_NONE);
++ ffmpegdec->processed = 0;
++ ffmpegdec->dropped = 0;
++}
++
++static void
++gst_ffmpegdec_read_qos (GstFFMpegDec * ffmpegdec, gdouble * proportion,
++ GstClockTime * timestamp)
++{
++ GST_OBJECT_LOCK (ffmpegdec);
++ *proportion = ffmpegdec->proportion;
++ *timestamp = ffmpegdec->earliest_time;
++ GST_OBJECT_UNLOCK (ffmpegdec);
++}
++
++static gboolean
++gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegDec *ffmpegdec;
++ gboolean res;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_QOS:
++ {
++ gdouble proportion;
++ GstClockTimeDiff diff;
++ GstClockTime timestamp;
++
++ gst_event_parse_qos (event, &proportion, &diff, &timestamp);
++
++ /* update our QoS values */
++ gst_ffmpegdec_update_qos (ffmpegdec, proportion, timestamp + diff);
++
++ /* forward upstream */
++ res = gst_pad_push_event (ffmpegdec->sinkpad, event);
++ break;
++ }
++ default:
++ /* forward upstream */
++ res = gst_pad_push_event (ffmpegdec->sinkpad, event);
++ break;
++ }
++
++ gst_object_unref (ffmpegdec);
++
++ return res;
++}
++
++/* with LOCK */
++static void
++gst_ffmpegdec_close (GstFFMpegDec * ffmpegdec)
++{
++ if (!ffmpegdec->opened)
++ return;
++
++ GST_LOG_OBJECT (ffmpegdec, "closing ffmpeg codec");
++
++ if (ffmpegdec->par) {
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = NULL;
++ }
++
++ if (ffmpegdec->context->priv_data)
++ gst_ffmpeg_avcodec_close (ffmpegdec->context);
++ ffmpegdec->opened = FALSE;
++
++ if (ffmpegdec->context->extradata) {
++ av_free (ffmpegdec->context->extradata);
++ ffmpegdec->context->extradata = NULL;
++ }
++
++ if (ffmpegdec->pctx) {
++ if (ffmpegdec->pcache) {
++ gst_buffer_unref (ffmpegdec->pcache);
++ ffmpegdec->pcache = NULL;
++ }
++ av_parser_close (ffmpegdec->pctx);
++ ffmpegdec->pctx = NULL;
++ }
++
++ ffmpegdec->format.video.par_n = -1;
++ ffmpegdec->format.video.fps_n = -1;
++ ffmpegdec->format.video.old_fps_n = -1;
++ ffmpegdec->format.video.interlaced = FALSE;
++}
++
++/* with LOCK */
++static gboolean
++gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ if (gst_ffmpeg_avcodec_open (ffmpegdec->context, oclass->in_plugin) < 0)
++ goto could_not_open;
++
++ ffmpegdec->opened = TRUE;
++ ffmpegdec->is_realvideo = FALSE;
++
++ GST_LOG_OBJECT (ffmpegdec, "Opened ffmpeg codec %s, id %d",
++ oclass->in_plugin->name, oclass->in_plugin->id);
++
++ /* open a parser if we can */
++ switch (oclass->in_plugin->id) {
++ case CODEC_ID_MPEG4:
++ case CODEC_ID_MJPEG:
++ case CODEC_ID_VC1:
++ GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
++ ffmpegdec->pctx = NULL;
++ break;
++ case CODEC_ID_H264:
++ /* For H264, only use a parser if there is no context data, if there is,
++ * we're talking AVC */
++ if (ffmpegdec->context->extradata_size == 0) {
++ GST_LOG_OBJECT (ffmpegdec, "H264 with no extradata, creating parser");
++ ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
++ } else {
++ GST_LOG_OBJECT (ffmpegdec,
++ "H264 with extradata implies framed data - not using parser");
++ ffmpegdec->pctx = NULL;
++ }
++ break;
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV40:
++ ffmpegdec->is_realvideo = TRUE;
++ break;
++ default:
++ if (!ffmpegdec->turnoff_parser) {
++ ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id);
++ if (ffmpegdec->pctx)
++ GST_LOG_OBJECT (ffmpegdec, "Using parser %p", ffmpegdec->pctx);
++ else
++ GST_LOG_OBJECT (ffmpegdec, "No parser for codec");
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "Parser deactivated for format");
++ }
++ break;
++ }
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ ffmpegdec->format.video.width = 0;
++ ffmpegdec->format.video.height = 0;
++ ffmpegdec->format.video.clip_width = -1;
++ ffmpegdec->format.video.clip_height = -1;
++ ffmpegdec->format.video.pix_fmt = PIX_FMT_NB;
++ ffmpegdec->format.video.interlaced = FALSE;
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ ffmpegdec->format.audio.samplerate = 0;
++ ffmpegdec->format.audio.channels = 0;
++ ffmpegdec->format.audio.depth = 0;
++ break;
++ default:
++ break;
++ }
++
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ /* FIXME, reset_qos holds the LOCK */
++ ffmpegdec->proportion = 0.0;
++ ffmpegdec->earliest_time = -1;
++
++ return TRUE;
++
++ /* ERRORS */
++could_not_open:
++ {
++ gst_ffmpegdec_close (ffmpegdec);
++ GST_DEBUG_OBJECT (ffmpegdec, "ffdec_%s: Failed to open FFMPEG codec",
++ oclass->in_plugin->name);
++ return FALSE;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstFFMpegDecClass *oclass;
++ GstStructure *structure;
++ const GValue *par;
++ const GValue *fps;
++ gboolean ret = TRUE;
++
++ ffmpegdec = (GstFFMpegDec *) (gst_pad_get_parent (pad));
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ GST_DEBUG_OBJECT (pad, "setcaps called");
++
++ GST_OBJECT_LOCK (ffmpegdec);
++
++ /* stupid check for VC1 */
++ if ((oclass->in_plugin->id == CODEC_ID_WMV3) ||
++ (oclass->in_plugin->id == CODEC_ID_VC1))
++ oclass->in_plugin->id = gst_ffmpeg_caps_to_codecid (caps, NULL);
++
++ /* close old session */
++ if (ffmpegdec->opened) {
++ GST_OBJECT_UNLOCK (ffmpegdec);
++ gst_ffmpegdec_drain (ffmpegdec);
++ GST_OBJECT_LOCK (ffmpegdec);
++ gst_ffmpegdec_close (ffmpegdec);
++
++ /* and reset the defaults that were set when a context is created */
++ avcodec_get_context_defaults (ffmpegdec->context);
++ }
++
++ /* set buffer functions */
++ ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
++ ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
++ ffmpegdec->context->draw_horiz_band = NULL;
++
++ /* default is to let format decide if it needs a parser */
++ ffmpegdec->turnoff_parser = FALSE;
++
++ ffmpegdec->has_b_frames = FALSE;
++
++ GST_LOG_OBJECT (ffmpegdec, "size %dx%d", ffmpegdec->context->width,
++ ffmpegdec->context->height);
++
++ /* get size and so */
++ gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
++ oclass->in_plugin->type, caps, ffmpegdec->context);
++
++ GST_LOG_OBJECT (ffmpegdec, "size after %dx%d", ffmpegdec->context->width,
++ ffmpegdec->context->height);
++
++ if (!ffmpegdec->context->time_base.den || !ffmpegdec->context->time_base.num) {
++ GST_DEBUG_OBJECT (ffmpegdec, "forcing 25/1 framerate");
++ ffmpegdec->context->time_base.num = 1;
++ ffmpegdec->context->time_base.den = 25;
++ }
++
++ /* get pixel aspect ratio if it's set */
++ structure = gst_caps_get_structure (caps, 0);
++
++ par = gst_structure_get_value (structure, "pixel-aspect-ratio");
++ if (par) {
++ GST_DEBUG_OBJECT (ffmpegdec, "sink caps have pixel-aspect-ratio of %d:%d",
++ gst_value_get_fraction_numerator (par),
++ gst_value_get_fraction_denominator (par));
++ /* should be NULL */
++ if (ffmpegdec->par)
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = g_new0 (GValue, 1);
++ gst_value_init_and_copy (ffmpegdec->par, par);
++ }
++
++ /* get the framerate from incoming caps. fps_n is set to -1 when
++ * there is no valid framerate */
++ fps = gst_structure_get_value (structure, "framerate");
++ if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
++ ffmpegdec->format.video.fps_n = gst_value_get_fraction_numerator (fps);
++ ffmpegdec->format.video.fps_d = gst_value_get_fraction_denominator (fps);
++ GST_DEBUG_OBJECT (ffmpegdec, "Using framerate %d/%d from incoming caps",
++ ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
++ } else {
++ ffmpegdec->format.video.fps_n = -1;
++ GST_DEBUG_OBJECT (ffmpegdec, "Using framerate from codec");
++ }
++
++ /* figure out if we can use direct rendering */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = FALSE;
++ if (ffmpegdec->direct_rendering) {
++ GST_DEBUG_OBJECT (ffmpegdec, "trying to enable direct rendering");
++ if (oclass->in_plugin->capabilities & CODEC_CAP_DR1) {
++ if (oclass->in_plugin->id == CODEC_ID_H264) {
++ GST_DEBUG_OBJECT (ffmpegdec, "disable direct rendering setup for H264");
++ /* does not work, many stuff reads outside of the planes */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = TRUE;
++ } else if ((oclass->in_plugin->id == CODEC_ID_SVQ1) ||
++ (oclass->in_plugin->id == CODEC_ID_VP5) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6F) ||
++ (oclass->in_plugin->id == CODEC_ID_VP6A)) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "disable direct rendering setup for broken stride support");
++ /* does not work, uses a incompatible stride. See #610613 */
++ ffmpegdec->current_dr = FALSE;
++ ffmpegdec->extra_ref = TRUE;
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "enabled direct rendering");
++ ffmpegdec->current_dr = TRUE;
++ }
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "direct rendering not supported");
++ }
++ }
++ if (ffmpegdec->current_dr) {
++ /* do *not* draw edges when in direct rendering, for some reason it draws
++ * outside of the memory. */
++ ffmpegdec->context->flags |= CODEC_FLAG_EMU_EDGE;
++ }
++
++ /* for AAC we only use av_parse if not on stream-format==raw or ==loas */
++ if (oclass->in_plugin->id == CODEC_ID_AAC
++ || oclass->in_plugin->id == CODEC_ID_AAC_LATM) {
++ const gchar *format = gst_structure_get_string (structure, "stream-format");
++
++ if (format == NULL || strcmp (format, "raw") == 0) {
++ ffmpegdec->turnoff_parser = TRUE;
++ }
++ }
++
++ /* for FLAC, don't parse if it's already parsed */
++ if (oclass->in_plugin->id == CODEC_ID_FLAC) {
++ if (gst_structure_has_field (structure, "streamheader"))
++ ffmpegdec->turnoff_parser = TRUE;
++ }
++
++ /* workaround encoder bugs */
++ ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
++ ffmpegdec->context->err_recognition = 1;
++
++ /* for slow cpus */
++ ffmpegdec->context->lowres = ffmpegdec->lowres;
++ ffmpegdec->context->skip_frame = ffmpegdec->skip_frame;
++
++ /* ffmpeg can draw motion vectors on top of the image (not every decoder
++ * supports it) */
++ ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
++
++ if (ffmpegdec->max_threads == 0)
++ ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
++ else
++ ffmpegdec->context->thread_count = ffmpegdec->max_threads;
++
++ /* open codec - we don't select an output pix_fmt yet,
++ * simply because we don't know! We only get it
++ * during playback... */
++ if (!gst_ffmpegdec_open (ffmpegdec))
++ goto open_failed;
++
++ /* clipping region */
++ gst_structure_get_int (structure, "width",
++ &ffmpegdec->format.video.clip_width);
++ gst_structure_get_int (structure, "height",
++ &ffmpegdec->format.video.clip_height);
++
++ GST_DEBUG_OBJECT (pad, "clipping to %dx%d",
++ ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
++
++ /* take into account the lowres property */
++ if (ffmpegdec->format.video.clip_width != -1)
++ ffmpegdec->format.video.clip_width >>= ffmpegdec->lowres;
++ if (ffmpegdec->format.video.clip_height != -1)
++ ffmpegdec->format.video.clip_height >>= ffmpegdec->lowres;
++
++ GST_DEBUG_OBJECT (pad, "final clipping to %dx%d",
++ ffmpegdec->format.video.clip_width, ffmpegdec->format.video.clip_height);
++
++done:
++ GST_OBJECT_UNLOCK (ffmpegdec);
++
++ gst_object_unref (ffmpegdec);
++
++ return ret;
++
++ /* ERRORS */
++open_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "Failed to open");
++ if (ffmpegdec->par) {
++ g_free (ffmpegdec->par);
++ ffmpegdec->par = NULL;
++ }
++ ret = FALSE;
++ goto done;
++ }
++}
++
++static GstFlowReturn
++alloc_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf,
++ gint width, gint height)
++{
++ GstFlowReturn ret;
++ gint fsize;
++
++ ret = GST_FLOW_ERROR;
++ *outbuf = NULL;
++
++ GST_LOG_OBJECT (ffmpegdec, "alloc output buffer");
++
++ /* see if we need renegotiation */
++ if (G_UNLIKELY (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)))
++ goto negotiate_failed;
++
++ /* get the size of the gstreamer output buffer given a
++ * width/height/format */
++ fsize = gst_ffmpeg_avpicture_get_size (ffmpegdec->context->pix_fmt,
++ width, height);
++
++ if (ffmpegdec->can_allocate_aligned) {
++ GST_LOG_OBJECT (ffmpegdec, "calling pad_alloc");
++ /* no pallete, we can use the buffer size to alloc */
++ ret = gst_pad_alloc_buffer_and_set_caps (ffmpegdec->srcpad,
++ GST_BUFFER_OFFSET_NONE, fsize,
++ GST_PAD_CAPS (ffmpegdec->srcpad), outbuf);
++ if (G_UNLIKELY (ret != GST_FLOW_OK))
++ goto alloc_failed;
++
++ /* If buffer isn't 128-bit aligned, create a memaligned one ourselves */
++ if (((uintptr_t) GST_BUFFER_DATA (*outbuf)) % 16) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Downstream can't allocate aligned buffers.");
++ ffmpegdec->can_allocate_aligned = FALSE;
++ gst_buffer_unref (*outbuf);
++ *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
++ }
++ } else {
++ GST_LOG_OBJECT (ffmpegdec,
++ "not calling pad_alloc, we have a pallete or downstream can't give 16 byte aligned buffers.");
++ /* for paletted data we can't use pad_alloc_buffer(), because
++ * fsize contains the size of the palette, so the overall size
++ * is bigger than ffmpegcolorspace's unit size, which will
++ * prompt GstBaseTransform to complain endlessly ... */
++ *outbuf = new_aligned_buffer (fsize, GST_PAD_CAPS (ffmpegdec->srcpad));
++ ret = GST_FLOW_OK;
++ }
++ /* set caps, we do this here because the buffer is still writable here and we
++ * are sure to be negotiated */
++ gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ return ret;
++
++ /* special cases */
++negotiate_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "negotiate failed");
++ return GST_FLOW_NOT_NEGOTIATED;
++ }
++alloc_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed %d (%s)", ret,
++ gst_flow_get_name (ret));
++ return ret;
++ }
++}
++
++static int
++gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture)
++{
++ GstBuffer *buf = NULL;
++ GstFFMpegDec *ffmpegdec;
++ gint width, height;
++ gint coded_width, coded_height;
++ gint res;
++
++ ffmpegdec = (GstFFMpegDec *) context->opaque;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "getting buffer");
++
++ /* apply the last info we have seen to this picture, when we get the
++ * picture back from ffmpeg we can use this to correctly timestamp the output
++ * buffer */
++ picture->reordered_opaque = context->reordered_opaque;
++ /* make sure we don't free the buffer when it's not ours */
++ picture->opaque = NULL;
++
++ /* take width and height before clipping */
++ width = context->width;
++ height = context->height;
++ coded_width = context->coded_width;
++ coded_height = context->coded_height;
++
++ GST_LOG_OBJECT (ffmpegdec, "dimension %dx%d, coded %dx%d", width, height,
++ coded_width, coded_height);
++ if (!ffmpegdec->current_dr) {
++ GST_LOG_OBJECT (ffmpegdec, "direct rendering disabled, fallback alloc");
++ res = avcodec_default_get_buffer (context, picture);
++
++ GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", picture->linesize[0],
++ picture->linesize[1], picture->linesize[2]);
++ GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
++ (guint) (picture->data[1] - picture->data[0]),
++ (guint) (picture->data[2] - picture->data[0]));
++ return res;
++ }
++
++ switch (context->codec_type) {
++ case AVMEDIA_TYPE_VIDEO:
++ /* some ffmpeg video plugins don't see the point in setting codec_type ... */
++ case AVMEDIA_TYPE_UNKNOWN:
++ {
++ GstFlowReturn ret;
++ gint clip_width, clip_height;
++
++ /* take final clipped output size */
++ if ((clip_width = ffmpegdec->format.video.clip_width) == -1)
++ clip_width = width;
++ if ((clip_height = ffmpegdec->format.video.clip_height) == -1)
++ clip_height = height;
++
++ GST_LOG_OBJECT (ffmpegdec, "raw outsize %d/%d", width, height);
++
++ /* this is the size ffmpeg needs for the buffer */
++ avcodec_align_dimensions (context, &width, &height);
++
++ GST_LOG_OBJECT (ffmpegdec, "aligned outsize %d/%d, clip %d/%d",
++ width, height, clip_width, clip_height);
++
++ if (width != clip_width || height != clip_height) {
++ /* We can't alloc if we need to clip the output buffer later */
++ GST_LOG_OBJECT (ffmpegdec, "we need clipping, fallback alloc");
++ return avcodec_default_get_buffer (context, picture);
++ }
++
++ /* alloc with aligned dimensions for ffmpeg */
++ ret = alloc_output_buffer (ffmpegdec, &buf, width, height);
++ if (G_UNLIKELY (ret != GST_FLOW_OK)) {
++ /* alloc default buffer when we can't get one from downstream */
++ GST_LOG_OBJECT (ffmpegdec, "alloc failed, fallback alloc");
++ return avcodec_default_get_buffer (context, picture);
++ }
++
++ /* copy the right pointers and strides in the picture object */
++ gst_ffmpeg_avpicture_fill ((AVPicture *) picture,
++ GST_BUFFER_DATA (buf), context->pix_fmt, width, height);
++ break;
++ }
++ case AVMEDIA_TYPE_AUDIO:
++ default:
++ GST_ERROR_OBJECT (ffmpegdec,
++ "_get_buffer() should never get called for non-video buffers !");
++ g_assert_not_reached ();
++ break;
++ }
++
++ /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to
++ * the opaque data. */
++ picture->type = FF_BUFFER_TYPE_USER;
++ picture->opaque = buf;
++
++#ifdef EXTRA_REF
++ if (picture->reference != 0 || ffmpegdec->extra_ref) {
++ GST_DEBUG_OBJECT (ffmpegdec, "adding extra ref");
++ gst_buffer_ref (buf);
++ }
++#endif
++
++ GST_LOG_OBJECT (ffmpegdec, "returned buffer %p", buf);
++
++ return 0;
++}
++
++static void
++gst_ffmpegdec_release_buffer (AVCodecContext * context, AVFrame * picture)
++{
++ gint i;
++ GstBuffer *buf;
++ GstFFMpegDec *ffmpegdec;
++
++ ffmpegdec = (GstFFMpegDec *) context->opaque;
++
++ /* check if it was our buffer */
++ if (picture->opaque == NULL) {
++ GST_DEBUG_OBJECT (ffmpegdec, "default release buffer");
++ avcodec_default_release_buffer (context, picture);
++ return;
++ }
++
++ /* we remove the opaque data now */
++ buf = GST_BUFFER_CAST (picture->opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "release buffer %p", buf);
++ picture->opaque = NULL;
++
++#ifdef EXTRA_REF
++ if (picture->reference != 0 || ffmpegdec->extra_ref) {
++ GST_DEBUG_OBJECT (ffmpegdec, "remove extra ref");
++ gst_buffer_unref (buf);
++ }
++#else
++ gst_buffer_unref (buf);
++#endif
++
++ /* zero out the reference in ffmpeg */
++ for (i = 0; i < 4; i++) {
++ picture->data[i] = NULL;
++ picture->linesize[i] = 0;
++ }
++}
++
++static void
++gst_ffmpegdec_add_pixel_aspect_ratio (GstFFMpegDec * ffmpegdec,
++ GstStructure * s)
++{
++ gboolean demuxer_par_set = FALSE;
++ gboolean decoder_par_set = FALSE;
++ gint demuxer_num = 1, demuxer_denom = 1;
++ gint decoder_num = 1, decoder_denom = 1;
++
++ GST_OBJECT_LOCK (ffmpegdec);
++
++ if (ffmpegdec->par) {
++ demuxer_num = gst_value_get_fraction_numerator (ffmpegdec->par);
++ demuxer_denom = gst_value_get_fraction_denominator (ffmpegdec->par);
++ demuxer_par_set = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "Demuxer PAR: %d:%d", demuxer_num,
++ demuxer_denom);
++ }
++
++ if (ffmpegdec->context->sample_aspect_ratio.num &&
++ ffmpegdec->context->sample_aspect_ratio.den) {
++ decoder_num = ffmpegdec->context->sample_aspect_ratio.num;
++ decoder_denom = ffmpegdec->context->sample_aspect_ratio.den;
++ decoder_par_set = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "Decoder PAR: %d:%d", decoder_num,
++ decoder_denom);
++ }
++
++ GST_OBJECT_UNLOCK (ffmpegdec);
++
++ if (!demuxer_par_set && !decoder_par_set)
++ goto no_par;
++
++ if (demuxer_par_set && !decoder_par_set)
++ goto use_demuxer_par;
++
++ if (decoder_par_set && !demuxer_par_set)
++ goto use_decoder_par;
++
++ /* Both the demuxer and the decoder provide a PAR. If one of
++ * the two PARs is 1:1 and the other one is not, use the one
++ * that is not 1:1. */
++ if (demuxer_num == demuxer_denom && decoder_num != decoder_denom)
++ goto use_decoder_par;
++
++ if (decoder_num == decoder_denom && demuxer_num != demuxer_denom)
++ goto use_demuxer_par;
++
++ /* Both PARs are non-1:1, so use the PAR provided by the demuxer */
++ goto use_demuxer_par;
++
++use_decoder_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Setting decoder provided pixel-aspect-ratio of %u:%u", decoder_num,
++ decoder_denom);
++ gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, decoder_num,
++ decoder_denom, NULL);
++ return;
++ }
++
++use_demuxer_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Setting demuxer provided pixel-aspect-ratio of %u:%u", demuxer_num,
++ demuxer_denom);
++ gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, demuxer_num,
++ demuxer_denom, NULL);
++ return;
++ }
++no_par:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Neither demuxer nor codec provide a pixel-aspect-ratio");
++ return;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
++{
++ GstFFMpegDecClass *oclass;
++ GstCaps *caps;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ if (!force && ffmpegdec->format.video.width == ffmpegdec->context->width
++ && ffmpegdec->format.video.height == ffmpegdec->context->height
++ && ffmpegdec->format.video.fps_n == ffmpegdec->format.video.old_fps_n
++ && ffmpegdec->format.video.fps_d == ffmpegdec->format.video.old_fps_d
++ && ffmpegdec->format.video.pix_fmt == ffmpegdec->context->pix_fmt
++ && ffmpegdec->format.video.par_n ==
++ ffmpegdec->context->sample_aspect_ratio.num
++ && ffmpegdec->format.video.par_d ==
++ ffmpegdec->context->sample_aspect_ratio.den)
++ return TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Renegotiating video from %dx%d@ %d:%d PAR %d/%d fps to %dx%d@ %d:%d PAR %d/%d fps",
++ ffmpegdec->format.video.width, ffmpegdec->format.video.height,
++ ffmpegdec->format.video.par_n, ffmpegdec->format.video.par_d,
++ ffmpegdec->format.video.old_fps_n, ffmpegdec->format.video.old_fps_n,
++ ffmpegdec->context->width, ffmpegdec->context->height,
++ ffmpegdec->context->sample_aspect_ratio.num,
++ ffmpegdec->context->sample_aspect_ratio.den,
++ ffmpegdec->format.video.fps_n, ffmpegdec->format.video.fps_d);
++ ffmpegdec->format.video.width = ffmpegdec->context->width;
++ ffmpegdec->format.video.height = ffmpegdec->context->height;
++ ffmpegdec->format.video.old_fps_n = ffmpegdec->format.video.fps_n;
++ ffmpegdec->format.video.old_fps_d = ffmpegdec->format.video.fps_d;
++ ffmpegdec->format.video.pix_fmt = ffmpegdec->context->pix_fmt;
++ ffmpegdec->format.video.par_n =
++ ffmpegdec->context->sample_aspect_ratio.num;
++ ffmpegdec->format.video.par_d =
++ ffmpegdec->context->sample_aspect_ratio.den;
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ {
++ gint depth = av_smp_format_depth (ffmpegdec->context->sample_fmt);
++ if (!force && ffmpegdec->format.audio.samplerate ==
++ ffmpegdec->context->sample_rate &&
++ ffmpegdec->format.audio.channels == ffmpegdec->context->channels &&
++ ffmpegdec->format.audio.depth == depth)
++ return TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Renegotiating audio from %dHz@%dchannels (%d) to %dHz@%dchannels (%d)",
++ ffmpegdec->format.audio.samplerate, ffmpegdec->format.audio.channels,
++ ffmpegdec->format.audio.depth,
++ ffmpegdec->context->sample_rate, ffmpegdec->context->channels, depth);
++ ffmpegdec->format.audio.samplerate = ffmpegdec->context->sample_rate;
++ ffmpegdec->format.audio.channels = ffmpegdec->context->channels;
++ ffmpegdec->format.audio.depth = depth;
++ }
++ break;
++ default:
++ break;
++ }
++
++ caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type,
++ ffmpegdec->context, oclass->in_plugin->id, FALSE);
++
++ if (caps == NULL)
++ goto no_caps;
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ {
++ gint width, height;
++ gboolean interlaced;
++
++ width = ffmpegdec->format.video.clip_width;
++ height = ffmpegdec->format.video.clip_height;
++ interlaced = ffmpegdec->format.video.interlaced;
++
++ if (width != -1 && height != -1) {
++ /* overwrite the output size with the dimension of the
++ * clipping region but only if they are smaller. */
++ if (width < ffmpegdec->context->width)
++ gst_caps_set_simple (caps, "width", G_TYPE_INT, width, NULL);
++ if (height < ffmpegdec->context->height)
++ gst_caps_set_simple (caps, "height", G_TYPE_INT, height, NULL);
++ }
++ gst_caps_set_simple (caps, "interlaced", G_TYPE_BOOLEAN, interlaced,
++ NULL);
++
++ /* If a demuxer provided a framerate then use it (#313970) */
++ if (ffmpegdec->format.video.fps_n != -1) {
++ gst_caps_set_simple (caps, "framerate",
++ GST_TYPE_FRACTION, ffmpegdec->format.video.fps_n,
++ ffmpegdec->format.video.fps_d, NULL);
++ }
++ gst_ffmpegdec_add_pixel_aspect_ratio (ffmpegdec,
++ gst_caps_get_structure (caps, 0));
++ break;
++ }
++ case AVMEDIA_TYPE_AUDIO:
++ {
++ break;
++ }
++ default:
++ break;
++ }
++
++ if (!gst_pad_set_caps (ffmpegdec->srcpad, caps))
++ goto caps_failed;
++
++ gst_caps_unref (caps);
++
++ return TRUE;
++
++ /* ERRORS */
++no_caps:
++ {
++#ifdef HAVE_FFMPEG_UNINSTALLED
++ /* using internal ffmpeg snapshot */
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
++ ("Could not find GStreamer caps mapping for FFmpeg codec '%s'.",
++ oclass->in_plugin->name), (NULL));
++#else
++ /* using external ffmpeg */
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
++ ("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
++ "you are using an external libavcodec. This is most likely due to "
++ "a packaging problem and/or libavcodec having been upgraded to a "
++ "version that is not compatible with this version of "
++ "gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
++ "packages come from the same source/repository.",
++ oclass->in_plugin->name), (NULL));
++#endif
++ return FALSE;
++ }
++caps_failed:
++ {
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
++ ("Could not set caps for ffmpeg decoder (%s), not fixed?",
++ oclass->in_plugin->name));
++ gst_caps_unref (caps);
++
++ return FALSE;
++ }
++}
++
++/* perform qos calculations before decoding the next frame.
++ *
++ * Sets the skip_frame flag and if things are really bad, skips to the next
++ * keyframe.
++ *
++ * Returns TRUE if the frame should be decoded, FALSE if the frame can be dropped
++ * entirely.
++ */
++static gboolean
++gst_ffmpegdec_do_qos (GstFFMpegDec * ffmpegdec, GstClockTime timestamp,
++ gboolean * mode_switch)
++{
++ GstClockTimeDiff diff;
++ gdouble proportion;
++ GstClockTime qostime, earliest_time;
++ gboolean res = TRUE;
++
++ *mode_switch = FALSE;
++
++ /* no timestamp, can't do QoS */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (timestamp)))
++ goto no_qos;
++
++ /* get latest QoS observation values */
++ gst_ffmpegdec_read_qos (ffmpegdec, &proportion, &earliest_time);
++
++ /* skip qos if we have no observation (yet) */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (earliest_time))) {
++ /* no skip_frame initialy */
++ ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
++ goto no_qos;
++ }
++
++ /* qos is done on running time of the timestamp */
++ qostime = gst_segment_to_running_time (&ffmpegdec->segment, GST_FORMAT_TIME,
++ timestamp);
++
++ /* timestamp can be out of segment, then we don't do QoS */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (qostime)))
++ goto no_qos;
++
++ /* see how our next timestamp relates to the latest qos timestamp. negative
++ * values mean we are early, positive values mean we are too late. */
++ diff = GST_CLOCK_DIFF (qostime, earliest_time);
++
++ GST_DEBUG_OBJECT (ffmpegdec, "QOS: qostime %" GST_TIME_FORMAT
++ ", earliest %" GST_TIME_FORMAT, GST_TIME_ARGS (qostime),
++ GST_TIME_ARGS (earliest_time));
++
++ /* if we using less than 40% of the available time, we can try to
++ * speed up again when we were slow. */
++ if (proportion < 0.4 && diff < 0) {
++ goto normal_mode;
++ } else {
++ if (diff >= 0) {
++ /* we're too slow, try to speed up */
++ /* switch to skip_frame mode */
++ goto skip_frame;
++ }
++ }
++
++no_qos:
++ ffmpegdec->processed++;
++ return TRUE;
++
++normal_mode:
++ {
++ if (ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
++ ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
++ *mode_switch = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec, "QOS: normal mode %g < 0.4", proportion);
++ }
++ ffmpegdec->processed++;
++ return TRUE;
++ }
++skip_frame:
++ {
++ if (ffmpegdec->context->skip_frame != AVDISCARD_NONREF) {
++ ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
++ *mode_switch = TRUE;
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "QOS: hurry up, diff %" G_GINT64_FORMAT " >= 0", diff);
++ }
++ goto drop_qos;
++ }
++drop_qos:
++ {
++ GstClockTime stream_time, jitter;
++ GstMessage *qos_msg;
++
++ ffmpegdec->dropped++;
++ stream_time =
++ gst_segment_to_stream_time (&ffmpegdec->segment, GST_FORMAT_TIME,
++ timestamp);
++ jitter = GST_CLOCK_DIFF (qostime, earliest_time);
++ qos_msg =
++ gst_message_new_qos (GST_OBJECT_CAST (ffmpegdec), FALSE, qostime,
++ stream_time, timestamp, GST_CLOCK_TIME_NONE);
++ gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000);
++ gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS,
++ ffmpegdec->processed, ffmpegdec->dropped);
++ gst_element_post_message (GST_ELEMENT_CAST (ffmpegdec), qos_msg);
++
++ return res;
++ }
++}
++
++/* returns TRUE if buffer is within segment, else FALSE.
++ * if Buffer is on segment border, it's timestamp and duration will be clipped */
++static gboolean
++clip_video_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
++ GstClockTime in_dur)
++{
++ gboolean res = TRUE;
++ gint64 cstart, cstop;
++ GstClockTime stop;
++
++ GST_LOG_OBJECT (dec,
++ "timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
++ GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur));
++
++ /* can't clip without TIME segment */
++ if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
++ goto beach;
++
++ /* we need a start time */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
++ goto beach;
++
++ /* generate valid stop, if duration unknown, we have unknown stop */
++ stop =
++ GST_CLOCK_TIME_IS_VALID (in_dur) ? (in_ts + in_dur) : GST_CLOCK_TIME_NONE;
++
++ /* now clip */
++ res =
++ gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &cstart,
++ &cstop);
++ if (G_UNLIKELY (!res))
++ goto beach;
++
++ /* we're pretty sure the duration of this buffer is not till the end of this
++ * segment (which _clip will assume when the stop is -1) */
++ if (stop == GST_CLOCK_TIME_NONE)
++ cstop = GST_CLOCK_TIME_NONE;
++
++ /* update timestamp and possibly duration if the clipped stop time is
++ * valid */
++ GST_BUFFER_TIMESTAMP (buf) = cstart;
++ if (GST_CLOCK_TIME_IS_VALID (cstop))
++ GST_BUFFER_DURATION (buf) = cstop - cstart;
++
++ GST_LOG_OBJECT (dec,
++ "clipped timestamp:%" GST_TIME_FORMAT " , duration:%" GST_TIME_FORMAT,
++ GST_TIME_ARGS (cstart), GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
++
++beach:
++ GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
++ return res;
++}
++
++
++/* get an outbuf buffer with the current picture */
++static GstFlowReturn
++get_output_buffer (GstFFMpegDec * ffmpegdec, GstBuffer ** outbuf)
++{
++ GstFlowReturn ret;
++
++ ret = GST_FLOW_OK;
++ *outbuf = NULL;
++
++ if (ffmpegdec->picture->opaque != NULL) {
++ /* we allocated a picture already for ffmpeg to decode into, let's pick it
++ * up and use it now. */
++ *outbuf = (GstBuffer *) ffmpegdec->picture->opaque;
++ GST_LOG_OBJECT (ffmpegdec, "using opaque buffer %p", *outbuf);
++#ifndef EXTRA_REF
++ gst_buffer_ref (*outbuf);
++#endif
++ } else {
++ AVPicture pic, *outpic;
++ gint width, height;
++
++ GST_LOG_OBJECT (ffmpegdec, "get output buffer");
++
++ /* figure out size of output buffer, this is the clipped output size because
++ * we will copy the picture into it but only when the clipping region is
++ * smaller than the actual picture size. */
++ if ((width = ffmpegdec->format.video.clip_width) == -1)
++ width = ffmpegdec->context->width;
++ else if (width > ffmpegdec->context->width)
++ width = ffmpegdec->context->width;
++
++ if ((height = ffmpegdec->format.video.clip_height) == -1)
++ height = ffmpegdec->context->height;
++ else if (height > ffmpegdec->context->height)
++ height = ffmpegdec->context->height;
++
++ GST_LOG_OBJECT (ffmpegdec, "clip width %d/height %d", width, height);
++
++ ret = alloc_output_buffer (ffmpegdec, outbuf, width, height);
++ if (G_UNLIKELY (ret != GST_FLOW_OK))
++ goto alloc_failed;
++
++ /* original ffmpeg code does not handle odd sizes correctly.
++ * This patched up version does */
++ gst_ffmpeg_avpicture_fill (&pic, GST_BUFFER_DATA (*outbuf),
++ ffmpegdec->context->pix_fmt, width, height);
++
++ outpic = (AVPicture *) ffmpegdec->picture;
++
++ GST_LOG_OBJECT (ffmpegdec, "linsize %d %d %d", outpic->linesize[0],
++ outpic->linesize[1], outpic->linesize[2]);
++ GST_LOG_OBJECT (ffmpegdec, "data %u %u %u", 0,
++ (guint) (outpic->data[1] - outpic->data[0]),
++ (guint) (outpic->data[2] - outpic->data[0]));
++
++ av_picture_copy (&pic, outpic, ffmpegdec->context->pix_fmt, width, height);
++ }
++ ffmpegdec->picture->reordered_opaque = -1;
++
++ return ret;
++
++ /* special cases */
++alloc_failed:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed");
++ return ret;
++ }
++}
++
++static void
++clear_queued (GstFFMpegDec * ffmpegdec)
++{
++ g_list_foreach (ffmpegdec->queued, (GFunc) gst_mini_object_unref, NULL);
++ g_list_free (ffmpegdec->queued);
++ ffmpegdec->queued = NULL;
++}
++
++static GstFlowReturn
++flush_queued (GstFFMpegDec * ffmpegdec)
++{
++ GstFlowReturn res = GST_FLOW_OK;
++
++ while (ffmpegdec->queued) {
++ GstBuffer *buf = GST_BUFFER_CAST (ffmpegdec->queued->data);
++
++ GST_LOG_OBJECT (ffmpegdec, "pushing buffer %p, offset %"
++ G_GUINT64_FORMAT ", timestamp %"
++ GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT, buf,
++ GST_BUFFER_OFFSET (buf),
++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
++
++ /* iterate ouput queue an push downstream */
++ res = gst_pad_push (ffmpegdec->srcpad, buf);
++
++ ffmpegdec->queued =
++ g_list_delete_link (ffmpegdec->queued, ffmpegdec->queued);
++ }
++ return res;
++}
++
++static void
++gst_avpacket_init (AVPacket * packet, guint8 * data, guint size)
++{
++ memset (packet, 0, sizeof (AVPacket));
++ packet->data = data;
++ packet->size = size;
++}
++
++/* gst_ffmpegdec_[video|audio]_frame:
++ * ffmpegdec:
++ * data: pointer to the data to decode
++ * size: size of data in bytes
++ * in_timestamp: incoming timestamp.
++ * in_duration: incoming duration.
++ * in_offset: incoming offset (frame number).
++ * outbuf: outgoing buffer. Different from NULL ONLY if it contains decoded data.
++ * ret: Return flow.
++ *
++ * Returns: number of bytes used in decoding. The check for successful decode is
++ * outbuf being non-NULL.
++ */
++static gint
++gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
++ guint8 * data, guint size,
++ const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
++{
++ gint len = -1;
++ gint have_data;
++ gboolean mode_switch;
++ gboolean decode;
++ gint skip_frame = AVDISCARD_DEFAULT;
++ GstClockTime out_timestamp, out_duration, out_pts;
++ gint64 out_offset;
++ const GstTSInfo *out_info;
++ AVPacket packet;
++
++ *ret = GST_FLOW_OK;
++ *outbuf = NULL;
++
++ ffmpegdec->context->opaque = ffmpegdec;
++
++ /* in case we skip frames */
++ ffmpegdec->picture->pict_type = -1;
++
++ /* run QoS code, we don't stop decoding the frame when we are late because
++ * else we might skip a reference frame */
++ decode = gst_ffmpegdec_do_qos (ffmpegdec, dec_info->timestamp, &mode_switch);
++
++ if (ffmpegdec->is_realvideo && data != NULL) {
++ gint slice_count;
++ gint i;
++
++ /* setup the slice table for realvideo */
++ if (ffmpegdec->context->slice_offset == NULL)
++ ffmpegdec->context->slice_offset = g_malloc (sizeof (guint32) * 1000);
++
++ slice_count = (*data++) + 1;
++ ffmpegdec->context->slice_count = slice_count;
++
++ for (i = 0; i < slice_count; i++) {
++ data += 4;
++ ffmpegdec->context->slice_offset[i] = GST_READ_UINT32_LE (data);
++ data += 4;
++ }
++ }
++
++ if (!decode) {
++ /* no decoding needed, save previous skip_frame value and brutely skip
++ * decoding everything */
++ skip_frame = ffmpegdec->context->skip_frame;
++ ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
++ }
++
++ /* save reference to the timing info */
++ ffmpegdec->context->reordered_opaque = (gint64) dec_info->idx;
++ ffmpegdec->picture->reordered_opaque = (gint64) dec_info->idx;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "stored opaque values idx %d", dec_info->idx);
++
++ /* now decode the frame */
++ gst_avpacket_init (&packet, data, size);
++ len = avcodec_decode_video2 (ffmpegdec->context,
++ ffmpegdec->picture, &have_data, &packet);
++
++ /* restore previous state */
++ if (!decode)
++ ffmpegdec->context->skip_frame = skip_frame;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "after decode: len %d, have_data %d",
++ len, have_data);
++
++ /* when we are in skip_frame mode, don't complain when ffmpeg returned
++ * no data because we told it to skip stuff. */
++ if (len < 0 && (mode_switch || ffmpegdec->context->skip_frame))
++ len = 0;
++
++ if (len > 0 && have_data <= 0 && (mode_switch
++ || ffmpegdec->context->skip_frame)) {
++ /* we consumed some bytes but nothing decoded and we are skipping frames,
++ * disable the interpollation of DTS timestamps */
++ ffmpegdec->last_out = -1;
++ }
++
++ /* no data, we're done */
++ if (len < 0 || have_data <= 0)
++ goto beach;
++
++ /* get the output picture timing info again */
++ out_info = gst_ts_info_get (ffmpegdec, ffmpegdec->picture->reordered_opaque);
++ out_pts = out_info->timestamp;
++ out_duration = out_info->duration;
++ out_offset = out_info->offset;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "pts %" G_GUINT64_FORMAT " duration %" G_GUINT64_FORMAT " offset %"
++ G_GINT64_FORMAT, out_pts, out_duration, out_offset);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: pts %" G_GUINT64_FORMAT,
++ (guint64) ffmpegdec->picture->pts);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: num %d",
++ ffmpegdec->picture->coded_picture_number);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: ref %d",
++ ffmpegdec->picture->reference);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: display %d",
++ ffmpegdec->picture->display_picture_number);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: opaque %p",
++ ffmpegdec->picture->opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "picture: reordered opaque %" G_GUINT64_FORMAT,
++ (guint64) ffmpegdec->picture->reordered_opaque);
++ GST_DEBUG_OBJECT (ffmpegdec, "repeat_pict:%d",
++ ffmpegdec->picture->repeat_pict);
++ GST_DEBUG_OBJECT (ffmpegdec, "interlaced_frame:%d",
++ ffmpegdec->picture->interlaced_frame);
++
++ if (G_UNLIKELY (ffmpegdec->picture->interlaced_frame !=
++ ffmpegdec->format.video.interlaced)) {
++ GST_WARNING ("Change in interlacing ! picture:%d, recorded:%d",
++ ffmpegdec->picture->interlaced_frame,
++ ffmpegdec->format.video.interlaced);
++ ffmpegdec->format.video.interlaced = ffmpegdec->picture->interlaced_frame;
++ gst_ffmpegdec_negotiate (ffmpegdec, TRUE);
++ }
++
++ /* Whether a frame is interlaced or not is unknown at the time of
++ buffer allocation, so caps on the buffer in opaque will have
++ the previous frame's interlaced flag set. So if interlacedness
++ has changed since allocation, we update the buffer (if any)
++ caps now with the correct interlaced flag. */
++ if (ffmpegdec->picture->opaque != NULL) {
++ GstBuffer *buffer = ffmpegdec->picture->opaque;
++ if (GST_BUFFER_CAPS (buffer) && GST_PAD_CAPS (ffmpegdec->srcpad)) {
++ GstStructure *s = gst_caps_get_structure (GST_BUFFER_CAPS (buffer), 0);
++ gboolean interlaced;
++ gboolean found = gst_structure_get_boolean (s, "interlaced", &interlaced);
++ if (!found || (!!interlaced != !!ffmpegdec->format.video.interlaced)) {
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Buffer interlacing does not match pad, updating");
++ buffer = gst_buffer_make_metadata_writable (buffer);
++ gst_buffer_set_caps (buffer, GST_PAD_CAPS (ffmpegdec->srcpad));
++ ffmpegdec->picture->opaque = buffer;
++ }
++ }
++ }
++
++ /* check that the timestamps go upwards */
++ if (ffmpegdec->last_out != -1 && ffmpegdec->last_out > out_pts) {
++ /* timestamps go backwards, this means frames were reordered and we must
++ * be dealing with DTS as the buffer timestamps */
++ if (!ffmpegdec->reordered_out) {
++ GST_DEBUG_OBJECT (ffmpegdec, "detected reordered out timestamps");
++ ffmpegdec->reordered_out = TRUE;
++ }
++ if (ffmpegdec->reordered_in) {
++ /* we reset the input reordering here because we want to recover from an
++ * occasionally wrong reordered input timestamp */
++ GST_DEBUG_OBJECT (ffmpegdec, "assuming DTS input timestamps");
++ ffmpegdec->reordered_in = FALSE;
++ }
++ }
++
++ if (out_pts == 0 && out_pts == ffmpegdec->last_out) {
++ GST_LOG_OBJECT (ffmpegdec, "ffmpeg returns 0 timestamps, ignoring");
++ /* some codecs only output 0 timestamps, when that happens, make us select an
++ * output timestamp based on the input timestamp. We do this by making the
++ * ffmpeg timestamp and the interpollated next timestamp invalid. */
++ out_pts = -1;
++ ffmpegdec->next_out = -1;
++ } else
++ ffmpegdec->last_out = out_pts;
++
++ /* we assume DTS as input timestamps unless we see reordered input
++ * timestamps */
++ if (!ffmpegdec->reordered_in && ffmpegdec->reordered_out) {
++ /* PTS and DTS are the same for keyframes */
++ if (ffmpegdec->next_out != -1) {
++ /* interpolate all timestamps except for keyframes, FIXME, this is
++ * wrong when QoS is active. */
++ GST_DEBUG_OBJECT (ffmpegdec, "interpolate timestamps");
++ out_pts = -1;
++ out_offset = -1;
++ }
++ }
++
++ /* get a handle to the output buffer */
++ *ret = get_output_buffer (ffmpegdec, outbuf);
++ if (G_UNLIKELY (*ret != GST_FLOW_OK))
++ goto no_output;
++
++ /*
++ * Timestamps:
++ *
++ * 1) Copy picture timestamp if valid
++ * 2) else interpolate from previous output timestamp
++ * 3) else copy input timestamp
++ */
++ out_timestamp = -1;
++ if (out_pts != -1) {
++ /* Get (interpolated) timestamp from FFMPEG */
++ out_timestamp = (GstClockTime) out_pts;
++ GST_LOG_OBJECT (ffmpegdec, "using timestamp %" GST_TIME_FORMAT
++ " returned by ffmpeg", GST_TIME_ARGS (out_timestamp));
++ }
++ if (!GST_CLOCK_TIME_IS_VALID (out_timestamp) && ffmpegdec->next_out != -1) {
++ out_timestamp = ffmpegdec->next_out;
++ GST_LOG_OBJECT (ffmpegdec, "using next timestamp %" GST_TIME_FORMAT,
++ GST_TIME_ARGS (out_timestamp));
++ }
++ if (!GST_CLOCK_TIME_IS_VALID (out_timestamp)) {
++ out_timestamp = dec_info->timestamp;
++ GST_LOG_OBJECT (ffmpegdec, "using in timestamp %" GST_TIME_FORMAT,
++ GST_TIME_ARGS (out_timestamp));
++ }
++ GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
++
++ /*
++ * Offset:
++ * 0) Use stored input offset (from opaque)
++ * 1) Use value converted from timestamp if valid
++ * 2) Use input offset if valid
++ */
++ if (out_offset != GST_BUFFER_OFFSET_NONE) {
++ /* out_offset already contains the offset from ts_info */
++ GST_LOG_OBJECT (ffmpegdec, "Using offset returned by ffmpeg");
++ } else if (out_timestamp != GST_CLOCK_TIME_NONE) {
++ GstFormat out_fmt = GST_FORMAT_DEFAULT;
++ GST_LOG_OBJECT (ffmpegdec, "Using offset converted from timestamp");
++ /* FIXME, we should really remove this as it's not nice at all to do
++ * upstream queries for each frame to get the frame offset. We also can't
++ * really remove this because it is the only way of setting frame offsets
++ * on outgoing buffers. We should have metadata so that the upstream peer
++ * can set a frame number on the encoded data. */
++ gst_pad_query_peer_convert (ffmpegdec->sinkpad,
++ GST_FORMAT_TIME, out_timestamp, &out_fmt, &out_offset);
++ } else if (dec_info->offset != GST_BUFFER_OFFSET_NONE) {
++ /* FIXME, the input offset is input media specific and might not
++ * be the same for the output media. (byte offset as input, frame number
++ * as output, for example) */
++ GST_LOG_OBJECT (ffmpegdec, "using in_offset %" G_GINT64_FORMAT,
++ dec_info->offset);
++ out_offset = dec_info->offset;
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "no valid offset found");
++ out_offset = GST_BUFFER_OFFSET_NONE;
++ }
++ GST_BUFFER_OFFSET (*outbuf) = out_offset;
++
++ /*
++ * Duration:
++ *
++ * 1) Use reordered input duration if valid
++ * 2) Else use input duration
++ * 3) else use input framerate
++ * 4) else use ffmpeg framerate
++ */
++ if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
++ /* We have a valid (reordered) duration */
++ GST_LOG_OBJECT (ffmpegdec, "Using duration returned by ffmpeg");
++ } else if (GST_CLOCK_TIME_IS_VALID (dec_info->duration)) {
++ GST_LOG_OBJECT (ffmpegdec, "using in_duration");
++ out_duration = dec_info->duration;
++ } else if (GST_CLOCK_TIME_IS_VALID (ffmpegdec->last_diff)) {
++ GST_LOG_OBJECT (ffmpegdec, "using last-diff");
++ out_duration = ffmpegdec->last_diff;
++ } else {
++ /* if we have an input framerate, use that */
++ if (ffmpegdec->format.video.fps_n != -1 &&
++ (ffmpegdec->format.video.fps_n != 1000 &&
++ ffmpegdec->format.video.fps_d != 1)) {
++ GST_LOG_OBJECT (ffmpegdec, "using input framerate for duration");
++ out_duration = gst_util_uint64_scale_int (GST_SECOND,
++ ffmpegdec->format.video.fps_d, ffmpegdec->format.video.fps_n);
++ } else {
++ /* don't try to use the decoder's framerate when it seems a bit abnormal,
++ * which we assume when den >= 1000... */
++ if (ffmpegdec->context->time_base.num != 0 &&
++ (ffmpegdec->context->time_base.den > 0 &&
++ ffmpegdec->context->time_base.den < 1000)) {
++ GST_LOG_OBJECT (ffmpegdec, "using decoder's framerate for duration");
++ out_duration = gst_util_uint64_scale_int (GST_SECOND,
++ ffmpegdec->context->time_base.num *
++ ffmpegdec->context->ticks_per_frame,
++ ffmpegdec->context->time_base.den);
++ } else {
++ GST_LOG_OBJECT (ffmpegdec, "no valid duration found");
++ }
++ }
++ }
++
++ /* Take repeat_pict into account */
++ if (GST_CLOCK_TIME_IS_VALID (out_duration)) {
++ out_duration += out_duration * ffmpegdec->picture->repeat_pict / 2;
++ }
++ GST_BUFFER_DURATION (*outbuf) = out_duration;
++
++ if (out_timestamp != -1 && out_duration != -1 && out_duration != 0)
++ ffmpegdec->next_out = out_timestamp + out_duration;
++ else
++ ffmpegdec->next_out = -1;
++
++ /* now see if we need to clip the buffer against the segment boundaries. */
++ if (G_UNLIKELY (!clip_video_buffer (ffmpegdec, *outbuf, out_timestamp,
++ out_duration)))
++ goto clipped;
++
++ if (ffmpegdec->picture->top_field_first)
++ GST_BUFFER_FLAG_SET (*outbuf, GST_VIDEO_BUFFER_TFF);
++
++
++beach:
++ GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
++ *ret, *outbuf, len);
++ return len;
++
++ /* special cases */
++no_output:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "no output buffer");
++ len = -1;
++ goto beach;
++ }
++clipped:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ goto beach;
++ }
++}
++
++/* returns TRUE if buffer is within segment, else FALSE.
++ * if Buffer is on segment border, it's timestamp and duration will be clipped */
++static gboolean
++clip_audio_buffer (GstFFMpegDec * dec, GstBuffer * buf, GstClockTime in_ts,
++ GstClockTime in_dur)
++{
++ GstClockTime stop;
++ gint64 diff, ctime, cstop;
++ gboolean res = TRUE;
++
++ GST_LOG_OBJECT (dec,
++ "timestamp:%" GST_TIME_FORMAT ", duration:%" GST_TIME_FORMAT
++ ", size %u", GST_TIME_ARGS (in_ts), GST_TIME_ARGS (in_dur),
++ GST_BUFFER_SIZE (buf));
++
++ /* can't clip without TIME segment */
++ if (G_UNLIKELY (dec->segment.format != GST_FORMAT_TIME))
++ goto beach;
++
++ /* we need a start time */
++ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (in_ts)))
++ goto beach;
++
++ /* trust duration */
++ stop = in_ts + in_dur;
++
++ res = gst_segment_clip (&dec->segment, GST_FORMAT_TIME, in_ts, stop, &ctime,
++ &cstop);
++ if (G_UNLIKELY (!res))
++ goto out_of_segment;
++
++ /* see if some clipping happened */
++ if (G_UNLIKELY ((diff = ctime - in_ts) > 0)) {
++ /* bring clipped time to bytes */
++ diff =
++ gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
++ GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
++
++ GST_DEBUG_OBJECT (dec, "clipping start to %" GST_TIME_FORMAT " %"
++ G_GINT64_FORMAT " bytes", GST_TIME_ARGS (ctime), diff);
++
++ GST_BUFFER_SIZE (buf) -= diff;
++ GST_BUFFER_DATA (buf) += diff;
++ }
++ if (G_UNLIKELY ((diff = stop - cstop) > 0)) {
++ /* bring clipped time to bytes */
++ diff =
++ gst_util_uint64_scale_int (diff, dec->format.audio.samplerate,
++ GST_SECOND) * (dec->format.audio.depth * dec->format.audio.channels);
++
++ GST_DEBUG_OBJECT (dec, "clipping stop to %" GST_TIME_FORMAT " %"
++ G_GINT64_FORMAT " bytes", GST_TIME_ARGS (cstop), diff);
++
++ GST_BUFFER_SIZE (buf) -= diff;
++ }
++ GST_BUFFER_TIMESTAMP (buf) = ctime;
++ GST_BUFFER_DURATION (buf) = cstop - ctime;
++
++beach:
++ GST_LOG_OBJECT (dec, "%sdropping", (res ? "not " : ""));
++ return res;
++
++ /* ERRORS */
++out_of_segment:
++ {
++ GST_LOG_OBJECT (dec, "out of segment");
++ goto beach;
++ }
++}
++
++static gint
++gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
++ AVCodec * in_plugin, guint8 * data, guint size,
++ const GstTSInfo * dec_info, GstBuffer ** outbuf, GstFlowReturn * ret)
++{
++ gint len = -1;
++ gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE;
++ GstClockTime out_timestamp, out_duration;
++ gint64 out_offset;
++ AVPacket packet;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "size:%d, offset:%" G_GINT64_FORMAT ", ts:%" GST_TIME_FORMAT ", dur:%"
++ GST_TIME_FORMAT ", ffmpegdec->next_out:%" GST_TIME_FORMAT, size,
++ dec_info->offset, GST_TIME_ARGS (dec_info->timestamp),
++ GST_TIME_ARGS (dec_info->duration), GST_TIME_ARGS (ffmpegdec->next_out));
++
++ *outbuf =
++ new_aligned_buffer (AVCODEC_MAX_AUDIO_FRAME_SIZE,
++ GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ gst_avpacket_init (&packet, data, size);
++ len = avcodec_decode_audio3 (ffmpegdec->context,
++ (int16_t *) GST_BUFFER_DATA (*outbuf), &have_data, &packet);
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Decode audio: len=%d, have_data=%d", len, have_data);
++
++ if (len >= 0 && have_data > 0) {
++ GST_DEBUG_OBJECT (ffmpegdec, "Creating output buffer");
++ if (!gst_ffmpegdec_negotiate (ffmpegdec, FALSE)) {
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ len = -1;
++ goto beach;
++ }
++
++ /* Buffer size */
++ GST_BUFFER_SIZE (*outbuf) = have_data;
++
++ /*
++ * Timestamps:
++ *
++ * 1) Copy input timestamp if valid
++ * 2) else interpolate from previous input timestamp
++ */
++ /* always take timestamps from the input buffer if any */
++ if (GST_CLOCK_TIME_IS_VALID (dec_info->timestamp)) {
++ out_timestamp = dec_info->timestamp;
++ } else {
++ out_timestamp = ffmpegdec->next_out;
++ }
++
++ /*
++ * Duration:
++ *
++ * 1) calculate based on number of samples
++ */
++ out_duration = gst_util_uint64_scale (have_data, GST_SECOND,
++ ffmpegdec->format.audio.depth * ffmpegdec->format.audio.channels *
++ ffmpegdec->format.audio.samplerate);
++
++ /* offset:
++ *
++ * Just copy
++ */
++ out_offset = dec_info->offset;
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "Buffer created. Size:%d , timestamp:%" GST_TIME_FORMAT " , duration:%"
++ GST_TIME_FORMAT, have_data,
++ GST_TIME_ARGS (out_timestamp), GST_TIME_ARGS (out_duration));
++
++ GST_BUFFER_TIMESTAMP (*outbuf) = out_timestamp;
++ GST_BUFFER_DURATION (*outbuf) = out_duration;
++ GST_BUFFER_OFFSET (*outbuf) = out_offset;
++ gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (ffmpegdec->srcpad));
++
++ /* the next timestamp we'll use when interpolating */
++ if (GST_CLOCK_TIME_IS_VALID (out_timestamp))
++ ffmpegdec->next_out = out_timestamp + out_duration;
++
++ /* now see if we need to clip the buffer against the segment boundaries. */
++ if (G_UNLIKELY (!clip_audio_buffer (ffmpegdec, *outbuf, out_timestamp,
++ out_duration)))
++ goto clipped;
++
++ } else {
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ }
++
++ /* If we don't error out after the first failed read with the AAC decoder,
++ * we must *not* carry on pushing data, else we'll cause segfaults... */
++ if (len == -1 && (in_plugin->id == CODEC_ID_AAC
++ || in_plugin->id == CODEC_ID_AAC_LATM)) {
++ GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
++ ("Decoding of AAC stream by FFMPEG failed."));
++ *ret = GST_FLOW_ERROR;
++ }
++
++beach:
++ GST_DEBUG_OBJECT (ffmpegdec, "return flow %d, out %p, len %d",
++ *ret, *outbuf, len);
++ return len;
++
++ /* ERRORS */
++clipped:
++ {
++ GST_DEBUG_OBJECT (ffmpegdec, "buffer clipped");
++ gst_buffer_unref (*outbuf);
++ *outbuf = NULL;
++ goto beach;
++ }
++}
++
++/* gst_ffmpegdec_frame:
++ * ffmpegdec:
++ * data: pointer to the data to decode
++ * size: size of data in bytes
++ * got_data: 0 if no data was decoded, != 0 otherwise.
++ * in_time: timestamp of data
++ * in_duration: duration of data
++ * ret: GstFlowReturn to return in the chain function
++ *
++ * Decode the given frame and pushes it downstream.
++ *
++ * Returns: Number of bytes used in decoding, -1 on error/failure.
++ */
++
++static gint
++gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
++ guint8 * data, guint size, gint * got_data, const GstTSInfo * dec_info,
++ GstFlowReturn * ret)
++{
++ GstFFMpegDecClass *oclass;
++ GstBuffer *outbuf = NULL;
++ gint have_data = 0, len = 0;
++
++ if (G_UNLIKELY (ffmpegdec->context->codec == NULL))
++ goto no_codec;
++
++ GST_LOG_OBJECT (ffmpegdec, "data:%p, size:%d, id:%d", data, size,
++ dec_info->idx);
++
++ *ret = GST_FLOW_OK;
++ ffmpegdec->context->frame_number++;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ switch (oclass->in_plugin->type) {
++ case AVMEDIA_TYPE_VIDEO:
++ len =
++ gst_ffmpegdec_video_frame (ffmpegdec, data, size, dec_info, &outbuf,
++ ret);
++ break;
++ case AVMEDIA_TYPE_AUDIO:
++ len =
++ gst_ffmpegdec_audio_frame (ffmpegdec, oclass->in_plugin, data, size,
++ dec_info, &outbuf, ret);
++
++ /* if we did not get an output buffer and we have a pending discont, don't
++ * clear the input timestamps, we will put them on the next buffer because
++ * else we might create the first buffer with a very big timestamp gap. */
++ if (outbuf == NULL && ffmpegdec->discont) {
++ GST_DEBUG_OBJECT (ffmpegdec, "no buffer but keeping timestamp");
++ ffmpegdec->clear_ts = FALSE;
++ }
++ break;
++ default:
++ GST_ERROR_OBJECT (ffmpegdec, "Asked to decode non-audio/video frame !");
++ g_assert_not_reached ();
++ break;
++ }
++
++ if (outbuf)
++ have_data = 1;
++
++ if (len < 0 || have_data < 0) {
++ GST_WARNING_OBJECT (ffmpegdec,
++ "ffdec_%s: decoding error (len: %d, have_data: %d)",
++ oclass->in_plugin->name, len, have_data);
++ *got_data = 0;
++ goto beach;
++ } else if (len == 0 && have_data == 0) {
++ *got_data = 0;
++ goto beach;
++ } else {
++ /* this is where I lost my last clue on ffmpeg... */
++ *got_data = 1;
++ }
++
++ if (outbuf) {
++ GST_LOG_OBJECT (ffmpegdec,
++ "Decoded data, now pushing buffer %p with offset %" G_GINT64_FORMAT
++ ", timestamp %" GST_TIME_FORMAT " and duration %" GST_TIME_FORMAT,
++ outbuf, GST_BUFFER_OFFSET (outbuf),
++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
++ GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
++
++ /* mark pending discont */
++ if (ffmpegdec->discont) {
++ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
++ ffmpegdec->discont = FALSE;
++ }
++
++ if (ffmpegdec->segment.rate > 0.0) {
++ /* and off we go */
++ *ret = gst_pad_push (ffmpegdec->srcpad, outbuf);
++ } else {
++ /* reverse playback, queue frame till later when we get a discont. */
++ GST_DEBUG_OBJECT (ffmpegdec, "queued frame");
++ ffmpegdec->queued = g_list_prepend (ffmpegdec->queued, outbuf);
++ *ret = GST_FLOW_OK;
++ }
++ } else {
++ GST_DEBUG_OBJECT (ffmpegdec, "We didn't get a decoded buffer");
++ }
++
++beach:
++ return len;
++
++ /* ERRORS */
++no_codec:
++ {
++ GST_ERROR_OBJECT (ffmpegdec, "no codec context");
++ return -1;
++ }
++}
++
++static void
++gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec)
++{
++ GstFFMpegDecClass *oclass;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
++ gint have_data, len, try = 0;
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "codec has delay capabilities, calling until ffmpeg has drained everything");
++
++ do {
++ GstFlowReturn ret;
++
++ len =
++ gst_ffmpegdec_frame (ffmpegdec, NULL, 0, &have_data, &ts_info_none,
++ &ret);
++ if (len < 0 || have_data == 0)
++ break;
++ } while (try++ < 10);
++ }
++ if (ffmpegdec->segment.rate < 0.0) {
++ /* if we have some queued frames for reverse playback, flush them now */
++ flush_queued (ffmpegdec);
++ }
++}
++
++static void
++gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec)
++{
++ if (ffmpegdec->pctx) {
++ gint size, bsize;
++ guint8 *data;
++ guint8 bdata[FF_INPUT_BUFFER_PADDING_SIZE];
++
++ bsize = FF_INPUT_BUFFER_PADDING_SIZE;
++ memset (bdata, 0, bsize);
++
++ /* parse some dummy data to work around some ffmpeg weirdness where it keeps
++ * the previous pts around */
++ av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
++ &data, &size, bdata, bsize, -1, -1, -1);
++ ffmpegdec->pctx->pts = -1;
++ ffmpegdec->pctx->dts = -1;
++ }
++
++ if (ffmpegdec->pcache) {
++ gst_buffer_unref (ffmpegdec->pcache);
++ ffmpegdec->pcache = NULL;
++ }
++}
++
++static gboolean
++gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegDec *ffmpegdec;
++ gboolean ret = FALSE;
++
++ ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
++
++ GST_DEBUG_OBJECT (ffmpegdec, "Handling %s event",
++ GST_EVENT_TYPE_NAME (event));
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_EOS:
++ {
++ gst_ffmpegdec_drain (ffmpegdec);
++ break;
++ }
++ case GST_EVENT_FLUSH_STOP:
++ {
++ if (ffmpegdec->opened) {
++ avcodec_flush_buffers (ffmpegdec->context);
++ }
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ gst_ffmpegdec_reset_qos (ffmpegdec);
++ gst_ffmpegdec_flush_pcache (ffmpegdec);
++ gst_segment_init (&ffmpegdec->segment, GST_FORMAT_TIME);
++ clear_queued (ffmpegdec);
++ break;
++ }
++ case GST_EVENT_NEWSEGMENT:
++ {
++ gboolean update;
++ GstFormat fmt;
++ gint64 start, stop, time;
++ gdouble rate, arate;
++
++ gst_event_parse_new_segment_full (event, &update, &rate, &arate, &fmt,
++ &start, &stop, &time);
++
++ switch (fmt) {
++ case GST_FORMAT_TIME:
++ /* fine, our native segment format */
++ break;
++ case GST_FORMAT_BYTES:
++ {
++ gint bit_rate;
++
++ bit_rate = ffmpegdec->context->bit_rate;
++
++ /* convert to time or fail */
++ if (!bit_rate)
++ goto no_bitrate;
++
++ GST_DEBUG_OBJECT (ffmpegdec, "bitrate: %d", bit_rate);
++
++ /* convert values to TIME */
++ if (start != -1)
++ start = gst_util_uint64_scale_int (start, GST_SECOND, bit_rate);
++ if (stop != -1)
++ stop = gst_util_uint64_scale_int (stop, GST_SECOND, bit_rate);
++ if (time != -1)
++ time = gst_util_uint64_scale_int (time, GST_SECOND, bit_rate);
++
++ /* unref old event */
++ gst_event_unref (event);
++
++ /* create new converted time segment */
++ fmt = GST_FORMAT_TIME;
++ /* FIXME, bitrate is not good enough too find a good stop, let's
++ * hope start and time were 0... meh. */
++ stop = -1;
++ event = gst_event_new_new_segment (update, rate, fmt,
++ start, stop, time);
++ break;
++ }
++ default:
++ /* invalid format */
++ goto invalid_format;
++ }
++
++ /* drain pending frames before trying to use the new segment, queued
++ * buffers belonged to the previous segment. */
++ if (ffmpegdec->context->codec)
++ gst_ffmpegdec_drain (ffmpegdec);
++
++ GST_DEBUG_OBJECT (ffmpegdec,
++ "NEWSEGMENT in time start %" GST_TIME_FORMAT " -- stop %"
++ GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
++
++ /* and store the values */
++ gst_segment_set_newsegment_full (&ffmpegdec->segment, update,
++ rate, arate, fmt, start, stop, time);
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* and push segment downstream */
++ ret = gst_pad_push_event (ffmpegdec->srcpad, event);
++
++done:
++ gst_object_unref (ffmpegdec);
++
++ return ret;
++
++ /* ERRORS */
++no_bitrate:
++ {
++ GST_WARNING_OBJECT (ffmpegdec, "no bitrate to convert BYTES to TIME");
++ gst_event_unref (event);
++ goto done;
++ }
++invalid_format:
++ {
++ GST_WARNING_OBJECT (ffmpegdec, "unknown format received in NEWSEGMENT");
++ gst_event_unref (event);
++ goto done;
++ }
++}
++
++static GstFlowReturn
++gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
++{
++ GstFFMpegDec *ffmpegdec;
++ GstFFMpegDecClass *oclass;
++ guint8 *data, *bdata;
++ gint size, bsize, len, have_data;
++ GstFlowReturn ret = GST_FLOW_OK;
++ GstClockTime in_timestamp;
++ GstClockTime in_duration;
++ gboolean discont;
++ gint64 in_offset;
++ const GstTSInfo *in_info;
++ const GstTSInfo *dec_info;
++
++ ffmpegdec = (GstFFMpegDec *) (GST_PAD_PARENT (pad));
++
++ if (G_UNLIKELY (!ffmpegdec->opened))
++ goto not_negotiated;
++
++ discont = GST_BUFFER_IS_DISCONT (inbuf);
++
++ /* The discont flags marks a buffer that is not continuous with the previous
++ * buffer. This means we need to clear whatever data we currently have. We
++ * currently also wait for a new keyframe, which might be suboptimal in the
++ * case of a network error, better show the errors than to drop all data.. */
++ if (G_UNLIKELY (discont)) {
++ GST_DEBUG_OBJECT (ffmpegdec, "received DISCONT");
++ /* drain what we have queued */
++ gst_ffmpegdec_drain (ffmpegdec);
++ gst_ffmpegdec_flush_pcache (ffmpegdec);
++ avcodec_flush_buffers (ffmpegdec->context);
++ ffmpegdec->discont = TRUE;
++ gst_ffmpegdec_reset_ts (ffmpegdec);
++ }
++ /* by default we clear the input timestamp after decoding each frame so that
++ * interpollation can work. */
++ ffmpegdec->clear_ts = TRUE;
++
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++
++ /* parse cache joining. If there is cached data */
++ if (ffmpegdec->pcache) {
++ /* join with previous data */
++ GST_LOG_OBJECT (ffmpegdec, "join parse cache");
++ inbuf = gst_buffer_join (ffmpegdec->pcache, inbuf);
++ /* no more cached data, we assume we can consume the complete cache */
++ ffmpegdec->pcache = NULL;
++ }
++
++ in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
++ in_duration = GST_BUFFER_DURATION (inbuf);
++ in_offset = GST_BUFFER_OFFSET (inbuf);
++
++ /* get handle to timestamp info, we can pass this around to ffmpeg */
++ in_info = gst_ts_info_store (ffmpegdec, in_timestamp, in_duration, in_offset);
++
++ if (in_timestamp != -1) {
++ /* check for increasing timestamps if they are jumping backwards, we
++ * probably are dealing with PTS as timestamps */
++ if (!ffmpegdec->reordered_in && ffmpegdec->last_in != -1) {
++ if (in_timestamp < ffmpegdec->last_in) {
++ GST_LOG_OBJECT (ffmpegdec, "detected reordered input timestamps");
++ ffmpegdec->reordered_in = TRUE;
++ ffmpegdec->last_diff = GST_CLOCK_TIME_NONE;
++ } else if (in_timestamp > ffmpegdec->last_in) {
++ GstClockTime diff;
++ /* keep track of timestamp diff to estimate duration */
++ diff = in_timestamp - ffmpegdec->last_in;
++ /* need to scale with amount of frames in the interval */
++ if (ffmpegdec->last_frames)
++ diff /= ffmpegdec->last_frames;
++
++ GST_LOG_OBJECT (ffmpegdec, "estimated duration %" GST_TIME_FORMAT " %u",
++ GST_TIME_ARGS (diff), ffmpegdec->last_frames);
++
++ ffmpegdec->last_diff = diff;
++ }
++ }
++ ffmpegdec->last_in = in_timestamp;
++ ffmpegdec->last_frames = 0;
++ }
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Received new data of size %u, offset:%" G_GUINT64_FORMAT ", ts:%"
++ GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT ", info %d",
++ GST_BUFFER_SIZE (inbuf), GST_BUFFER_OFFSET (inbuf),
++ GST_TIME_ARGS (in_timestamp), GST_TIME_ARGS (in_duration), in_info->idx);
++
++ /* workarounds, functions write to buffers:
++ * libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
++ * libavcodec/svq3.c:svq3_decode_slice_header too.
++ * ffmpeg devs know about it and will fix it (they said). */
++ if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
++ oclass->in_plugin->id == CODEC_ID_SVQ3) {
++ inbuf = gst_buffer_make_writable (inbuf);
++ }
++
++ bdata = GST_BUFFER_DATA (inbuf);
++ bsize = GST_BUFFER_SIZE (inbuf);
++
++ if (ffmpegdec->do_padding) {
++ /* add padding */
++ if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
++ ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
++ ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size);
++ GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d",
++ ffmpegdec->padded_size);
++ }
++ memcpy (ffmpegdec->padded, bdata, bsize);
++ memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++
++ bdata = ffmpegdec->padded;
++ }
++
++ do {
++ guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE];
++
++ /* parse, if at all possible */
++ if (ffmpegdec->pctx) {
++ gint res;
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Calling av_parser_parse2 with offset %" G_GINT64_FORMAT ", ts:%"
++ GST_TIME_FORMAT " size %d", in_offset, GST_TIME_ARGS (in_timestamp),
++ bsize);
++
++ /* feed the parser. We pass the timestamp info so that we can recover all
++ * info again later */
++ res = av_parser_parse2 (ffmpegdec->pctx, ffmpegdec->context,
++ &data, &size, bdata, bsize, in_info->idx, in_info->idx, in_offset);
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "parser returned res %d and size %d, id %" G_GINT64_FORMAT, res, size,
++ ffmpegdec->pctx->pts);
++
++ /* store pts for decoding */
++ if (ffmpegdec->pctx->pts != AV_NOPTS_VALUE && ffmpegdec->pctx->pts != -1)
++ dec_info = gst_ts_info_get (ffmpegdec, ffmpegdec->pctx->pts);
++ else {
++ /* ffmpeg sometimes loses track after a flush, help it by feeding a
++ * valid start time */
++ ffmpegdec->pctx->pts = in_info->idx;
++ ffmpegdec->pctx->dts = in_info->idx;
++ dec_info = in_info;
++ }
++
++ GST_LOG_OBJECT (ffmpegdec, "consuming %d bytes. id %d", size,
++ dec_info->idx);
++
++ if (res) {
++ /* there is output, set pointers for next round. */
++ bsize -= res;
++ bdata += res;
++ } else {
++ /* Parser did not consume any data, make sure we don't clear the
++ * timestamp for the next round */
++ ffmpegdec->clear_ts = FALSE;
++ }
++
++ /* if there is no output, we must break and wait for more data. also the
++ * timestamp in the context is not updated. */
++ if (size == 0) {
++ if (bsize > 0)
++ continue;
++ else
++ break;
++ }
++ } else {
++ data = bdata;
++ size = bsize;
++
++ dec_info = in_info;
++ }
++
++ if (ffmpegdec->do_padding) {
++ /* add temporary padding */
++ memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ }
++
++ /* decode a frame of audio/video now */
++ len =
++ gst_ffmpegdec_frame (ffmpegdec, data, size, &have_data, dec_info, &ret);
++
++ if (ffmpegdec->do_padding) {
++ memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
++ }
++
++ if (ret != GST_FLOW_OK) {
++ GST_LOG_OBJECT (ffmpegdec, "breaking because of flow ret %s",
++ gst_flow_get_name (ret));
++ /* bad flow retun, make sure we discard all data and exit */
++ bsize = 0;
++ break;
++ }
++ if (!ffmpegdec->pctx) {
++ if (len == 0 && !have_data) {
++ /* nothing was decoded, this could be because no data was available or
++ * because we were skipping frames.
++ * If we have no context we must exit and wait for more data, we keep the
++ * data we tried. */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding didn't return any data, breaking");
++ break;
++ } else if (len < 0) {
++ /* a decoding error happened, we must break and try again with next data. */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding error, breaking");
++ bsize = 0;
++ break;
++ }
++ /* prepare for the next round, for codecs with a context we did this
++ * already when using the parser. */
++ bsize -= len;
++ bdata += len;
++ } else {
++ if (len == 0) {
++ /* nothing was decoded, this could be because no data was available or
++ * because we were skipping frames. Since we have a parser we can
++ * continue with the next frame */
++ GST_LOG_OBJECT (ffmpegdec,
++ "Decoding didn't return any data, trying next");
++ } else if (len < 0) {
++ /* we have a context that will bring us to the next frame */
++ GST_LOG_OBJECT (ffmpegdec, "Decoding error, trying next");
++ }
++ }
++
++ /* make sure we don't use the same old timestamp for the next frame and let
++ * the interpollation take care of it. */
++ if (ffmpegdec->clear_ts) {
++ in_timestamp = GST_CLOCK_TIME_NONE;
++ in_duration = GST_CLOCK_TIME_NONE;
++ in_offset = GST_BUFFER_OFFSET_NONE;
++ in_info = GST_TS_INFO_NONE;
++ } else {
++ ffmpegdec->clear_ts = TRUE;
++ }
++ ffmpegdec->last_frames++;
++
++ GST_LOG_OBJECT (ffmpegdec, "Before (while bsize>0). bsize:%d , bdata:%p",
++ bsize, bdata);
++ } while (bsize > 0);
++
++ /* keep left-over */
++ if (ffmpegdec->pctx && bsize > 0) {
++ in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
++ in_offset = GST_BUFFER_OFFSET (inbuf);
++
++ GST_LOG_OBJECT (ffmpegdec,
++ "Keeping %d bytes of data with offset %" G_GINT64_FORMAT ", timestamp %"
++ GST_TIME_FORMAT, bsize, in_offset, GST_TIME_ARGS (in_timestamp));
++
++ ffmpegdec->pcache = gst_buffer_create_sub (inbuf,
++ GST_BUFFER_SIZE (inbuf) - bsize, bsize);
++ /* we keep timestamp, even though all we really know is that the correct
++ * timestamp is not below the one from inbuf */
++ GST_BUFFER_TIMESTAMP (ffmpegdec->pcache) = in_timestamp;
++ GST_BUFFER_OFFSET (ffmpegdec->pcache) = in_offset;
++ } else if (bsize > 0) {
++ GST_DEBUG_OBJECT (ffmpegdec, "Dropping %d bytes of data", bsize);
++ }
++ gst_buffer_unref (inbuf);
++
++ return ret;
++
++ /* ERRORS */
++not_negotiated:
++ {
++ oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
++ GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
++ ("ffdec_%s: input format was not set before data start",
++ oclass->in_plugin->name));
++ gst_buffer_unref (inbuf);
++ return GST_FLOW_NOT_NEGOTIATED;
++ }
++}
++
++static GstStateChangeReturn
++gst_ffmpegdec_change_state (GstElement * element, GstStateChange transition)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) element;
++ GstStateChangeReturn ret;
++
++ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ GST_OBJECT_LOCK (ffmpegdec);
++ gst_ffmpegdec_close (ffmpegdec);
++ GST_OBJECT_UNLOCK (ffmpegdec);
++ clear_queued (ffmpegdec);
++ g_free (ffmpegdec->padded);
++ ffmpegdec->padded = NULL;
++ ffmpegdec->padded_size = 0;
++ ffmpegdec->can_allocate_aligned = TRUE;
++ break;
++ default:
++ break;
++ }
++
++ return ret;
++}
++
++static void
++gst_ffmpegdec_set_property (GObject * object,
++ guint prop_id, const GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ switch (prop_id) {
++ case PROP_LOWRES:
++ ffmpegdec->lowres = ffmpegdec->context->lowres = g_value_get_enum (value);
++ break;
++ case PROP_SKIPFRAME:
++ ffmpegdec->skip_frame = ffmpegdec->context->skip_frame =
++ g_value_get_enum (value);
++ break;
++ case PROP_DIRECT_RENDERING:
++ ffmpegdec->direct_rendering = g_value_get_boolean (value);
++ break;
++ case PROP_DO_PADDING:
++ ffmpegdec->do_padding = g_value_get_boolean (value);
++ break;
++ case PROP_DEBUG_MV:
++ ffmpegdec->debug_mv = ffmpegdec->context->debug_mv =
++ g_value_get_boolean (value);
++ break;
++ case PROP_CROP:
++ ffmpegdec->crop = g_value_get_boolean (value);
++ break;
++ case PROP_MAX_THREADS:
++ ffmpegdec->max_threads = g_value_get_int (value);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
++gst_ffmpegdec_get_property (GObject * object,
++ guint prop_id, GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object;
++
++ switch (prop_id) {
++ case PROP_LOWRES:
++ g_value_set_enum (value, ffmpegdec->context->lowres);
++ break;
++ case PROP_SKIPFRAME:
++ g_value_set_enum (value, ffmpegdec->context->skip_frame);
++ break;
++ case PROP_DIRECT_RENDERING:
++ g_value_set_boolean (value, ffmpegdec->direct_rendering);
++ break;
++ case PROP_DO_PADDING:
++ g_value_set_boolean (value, ffmpegdec->do_padding);
++ break;
++ case PROP_DEBUG_MV:
++ g_value_set_boolean (value, ffmpegdec->context->debug_mv);
++ break;
++ case PROP_CROP:
++ g_value_set_boolean (value, ffmpegdec->crop);
++ break;
++ case PROP_MAX_THREADS:
++ g_value_set_int (value, ffmpegdec->max_threads);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++gboolean
++gst_ffmpegdec_register (GstPlugin * plugin)
++{
++ GTypeInfo typeinfo = {
++ sizeof (GstFFMpegDecClass),
++ (GBaseInitFunc) gst_ffmpegdec_base_init,
++ NULL,
++ (GClassInitFunc) gst_ffmpegdec_class_init,
++ NULL,
++ NULL,
++ sizeof (GstFFMpegDec),
++ 0,
++ (GInstanceInitFunc) gst_ffmpegdec_init,
++ };
++ GType type;
++ AVCodec *in_plugin;
++ gint rank;
++
++ in_plugin = av_codec_next (NULL);
++
++ GST_LOG ("Registering decoders");
++
++ while (in_plugin) {
++ gchar *type_name;
++ gchar *plugin_name;
++
++ /* only decoders */
++ if (!in_plugin->decode) {
++ goto next;
++ }
++
++ /* no quasi-codecs, please */
++ if (in_plugin->id == CODEC_ID_RAWVIDEO ||
++ in_plugin->id == CODEC_ID_V210 ||
++ in_plugin->id == CODEC_ID_V210X ||
++ in_plugin->id == CODEC_ID_R210 ||
++ (in_plugin->id >= CODEC_ID_PCM_S16LE &&
++ in_plugin->id <= CODEC_ID_PCM_BLURAY)) {
++ goto next;
++ }
++
++ /* No decoders depending on external libraries (we don't build them, but
++ * people who build against an external ffmpeg might have them.
++ * We have native gstreamer plugins for all of those libraries anyway. */
++ if (!strncmp (in_plugin->name, "lib", 3)) {
++ GST_DEBUG
++ ("Not using external library decoder %s. Use the gstreamer-native ones instead.",
++ in_plugin->name);
++ goto next;
++ }
++
++ /* No vdpau plugins until we can figure out how to properly use them
++ * outside of ffmpeg. */
++ if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
++ GST_DEBUG
++ ("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
++ in_plugin->name);
++ goto next;
++ }
++
++ if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
++ GST_DEBUG
++ ("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
++ in_plugin->name);
++ goto next;
++ }
++
++ GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
++
++ /* no codecs for which we're GUARANTEED to have better alternatives */
++ /* MPEG1VIDEO : the mpeg2video decoder is preferred */
++ /* MP1 : Use MP3 for decoding */
++ /* MP2 : Use MP3 for decoding */
++ /* Theora: Use libtheora based theoradec */
++ if (!strcmp (in_plugin->name, "gif") ||
++ !strcmp (in_plugin->name, "vorbis") ||
++ !strcmp (in_plugin->name, "theora") ||
++ !strcmp (in_plugin->name, "mpeg1video") ||
++ !strcmp (in_plugin->name, "wavpack") ||
++ !strcmp (in_plugin->name, "mp1") ||
++ !strcmp (in_plugin->name, "mp2") ||
++ !strcmp (in_plugin->name, "libfaad") ||
++ !strcmp (in_plugin->name, "mpeg4aac") ||
++ !strcmp (in_plugin->name, "ass") ||
++ !strcmp (in_plugin->name, "srt") ||
++ !strcmp (in_plugin->name, "pgssub") ||
++ !strcmp (in_plugin->name, "dvdsub") ||
++ !strcmp (in_plugin->name, "dvbsub")) {
++ GST_LOG ("Ignoring decoder %s", in_plugin->name);
++ goto next;
++ }
++
++ /* construct the type */
++ plugin_name = g_strdup ((gchar *) in_plugin->name);
++ g_strdelimit (plugin_name, NULL, '_');
++ type_name = g_strdup_printf ("ffdec_%s", plugin_name);
++ g_free (plugin_name);
++
++ type = g_type_from_name (type_name);
++
++ if (!type) {
++ /* create the gtype now */
++ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
++ g_type_set_qdata (type, GST_FFDEC_PARAMS_QDATA, (gpointer) in_plugin);
++ }
++
++ /* (Ronald) MPEG-4 gets a higher priority because it has been well-
++ * tested and by far outperforms divxdec/xviddec - so we prefer it.
++ * msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
++ * VC1/WMV3 are not working and thus unpreferred for now. */
++ switch (in_plugin->id) {
++ case CODEC_ID_MPEG4:
++ case CODEC_ID_MSMPEG4V3:
++ case CODEC_ID_H264:
++ case CODEC_ID_RA_144:
++ case CODEC_ID_RA_288:
++ case CODEC_ID_RV10:
++ case CODEC_ID_RV20:
++ case CODEC_ID_RV30:
++ case CODEC_ID_RV40:
++ case CODEC_ID_COOK:
++ rank = GST_RANK_SECONDARY;
++ break;
++ /* DVVIDEO: we have a good dv decoder, fast on both ppc as well as x86.
++ * They say libdv's quality is better though. leave as secondary.
++ * note: if you change this, see the code in gstdv.c in good/ext/dv.
++ *
++ * SIPR: decoder should have a higher rank than realaudiodec.
++ */
++ case CODEC_ID_DVVIDEO:
++ case CODEC_ID_SIPR:
++ rank = GST_RANK_SECONDARY;
++ break;
++ case CODEC_ID_MP3:
++ rank = GST_RANK_NONE;
++ break;
++ /* TEMPORARILY DISABLING AC3/EAC3/DTS for 0.10.12 release
++ * due to downmixing failure.
++ * See Bug #608892 for more details */
++ case CODEC_ID_EAC3:
++ case CODEC_ID_AC3:
++ case CODEC_ID_DTS:
++ rank = GST_RANK_NONE;
++ break;
++ default:
++ rank = GST_RANK_MARGINAL;
++ break;
++ }
++ if (!gst_element_register (plugin, type_name, rank, type)) {
++ g_warning ("Failed to register %s", type_name);
++ g_free (type_name);
++ return FALSE;
++ }
++
++ g_free (type_name);
++
++ next:
++ in_plugin = av_codec_next (in_plugin);
++ }
++
++ GST_LOG ("Finished Registering decoders");
++
++ return TRUE;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdec.c.rej 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdec.c.rej 2014-08-08 15:26:38.471858652 +0200
+@@ -0,0 +1,11 @@
++--- ext/ffmpeg/gstffmpegdec.c
+++++ ext/ffmpeg/gstffmpegdec.c
++@@ -1565,7 +1564,7 @@
++ gst_message_new_latency (GST_OBJECT_CAST (ffmpegdec)));
++ }
++
++- is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
+++ is_itype = (ffmpegdec->picture->pict_type == AV_PICTURE_TYPE_I);
++ is_reference = (ffmpegdec->picture->reference == 1);
++
++ iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegdemux.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegdemux.c 2014-08-08 15:26:07.874857555 +0200
+@@ -343,8 +343,11 @@
+ demux->audiopads = 0;
+
+ /* close demuxer context from ffmpeg */
+- av_close_input_file (demux->context);
+- demux->context = NULL;
++ if (demux->seekable)
++ gst_ffmpegdata_close (demux->context->pb);
++ else
++ gst_ffmpeg_pipe_close (demux->context->pb);
++ avformat_close_input (&demux->context);
+
+ GST_OBJECT_LOCK (demux);
+ demux->opened = FALSE;
+@@ -1146,9 +1149,9 @@
+ static gboolean
+ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
+ {
++ AVIOContext *iocontext = NULL;
+ GstFFMpegDemuxClass *oclass =
+ (GstFFMpegDemuxClass *) G_OBJECT_GET_CLASS (demux);
+- gchar *location;
+ gint res, n_streams, i;
+ #if 0
+ /* Re-enable once converted to new AVMetaData API
+@@ -1164,15 +1167,14 @@
+
+ /* open via our input protocol hack */
+ if (demux->seekable)
+- location = g_strdup_printf ("gstreamer://%p", demux->sinkpad);
++ res = gst_ffmpegdata_open (demux->sinkpad, AVIO_FLAG_READ, &iocontext);
+ else
+- location = g_strdup_printf ("gstpipe://%p", &demux->ffpipe);
+- GST_DEBUG_OBJECT (demux, "about to call av_open_input_file %s", location);
++ res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
+
+- res = av_open_input_file (&demux->context, location,
+- oclass->in_plugin, 0, NULL);
++ demux->context = avformat_alloc_context ();
++ demux->context->pb = iocontext;
++ res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);
+
+- g_free (location);
+ GST_DEBUG_OBJECT (demux, "av_open_input returned %d", res);
+ if (res < 0)
+ goto open_failed;
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegenc.c 2011-10-31 11:14:03.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegenc.c 2014-08-08 15:32:18.608870847 +0200
+@@ -770,7 +770,7 @@
+ GST_OBJECT_UNLOCK (ffmpegenc);
+
+ if (force_keyframe)
+- ffmpegenc->picture->pict_type = FF_I_TYPE;
++ ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
+
+ frame_size = gst_ffmpeg_avpicture_fill ((AVPicture *) ffmpegenc->picture,
+ GST_BUFFER_DATA (inbuf),
+@@ -1136,7 +1136,7 @@
+ const GstStructure *s;
+ s = gst_event_get_structure (event);
+ if (gst_structure_has_name (s, "GstForceKeyUnit")) {
+- ffmpegenc->picture->pict_type = FF_I_TYPE;
++ ffmpegenc->picture->pict_type = AV_PICTURE_TYPE_I;
+ }
+ break;
+ }
+@@ -1339,7 +1339,7 @@
+ }
+
+ /* only encoders */
+- if (!in_plugin->encode) {
++ if (!av_codec_is_encoder (in_plugin)) {
+ goto next;
+ }
+
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c 2014-08-08 15:26:07.874857555 +0200
+@@ -24,8 +24,10 @@
+ #include <string.h>
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avformat.h>
++#include <opt.h>
+ #else
+ #include <libavformat/avformat.h>
++#include <libavutil/opt.h>
+ #endif
+
+ #include <gst/gst.h>
+@@ -336,9 +338,6 @@
+ ffmpegmux->context = g_new0 (AVFormatContext, 1);
+ ffmpegmux->context->oformat = oclass->in_plugin;
+ ffmpegmux->context->nb_streams = 0;
+- g_snprintf (ffmpegmux->context->filename,
+- sizeof (ffmpegmux->context->filename),
+- "gstreamer://%p", ffmpegmux->srcpad);
+ ffmpegmux->opened = FALSE;
+
+ ffmpegmux->videopads = 0;
+@@ -450,10 +449,10 @@
+ gst_element_add_pad (element, pad);
+
+ /* AVStream needs to be created */
+- st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
++ st = avformat_new_stream (ffmpegmux->context, NULL);
++ st->id = collect_pad->padnum;
+ st->codec->codec_type = type;
+ st->codec->codec_id = CODEC_ID_NONE; /* this is a check afterwards */
+- st->stream_copy = 1; /* we're not the actual encoder */
+ st->codec->bit_rate = bitrate;
+ st->codec->frame_size = framesize;
+ /* we fill in codec during capsnego */
+@@ -485,7 +484,7 @@
+ collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
+
+ st = ffmpegmux->context->streams[collect_pad->padnum];
+- ffmpegmux->context->preload = ffmpegmux->preload;
++ av_opt_set_int (&ffmpegmux->context, "preload", ffmpegmux->preload, 0);
+ ffmpegmux->context->max_delay = ffmpegmux->max_delay;
+
+ /* for the format-specific guesses, we'll go to
+@@ -552,7 +551,7 @@
+
+ /* open "file" (gstreamer protocol to next element) */
+ if (!ffmpegmux->opened) {
+- int open_flags = URL_WRONLY;
++ int open_flags = AVIO_FLAG_WRITE;
+
+ /* we do need all streams to have started capsnego,
+ * or things will go horribly wrong */
+@@ -646,19 +645,13 @@
+ open_flags |= GST_FFMPEG_URL_STREAMHEADER;
+ }
+
+- if (url_fopen (&ffmpegmux->context->pb,
+- ffmpegmux->context->filename, open_flags) < 0) {
++ if (gst_ffmpegdata_open (ffmpegmux->srcpad, open_flags,
++ &ffmpegmux->context->pb) < 0) {
+ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
+ ("Failed to open stream context in ffmux"));
+ return GST_FLOW_ERROR;
+ }
+
+- if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
+- GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
+- ("Failed to initialize muxer"));
+- return GST_FLOW_ERROR;
+- }
+-
+ /* now open the mux format */
+ if (av_write_header (ffmpegmux->context) < 0) {
+ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
+@@ -670,7 +663,7 @@
+ ffmpegmux->opened = TRUE;
+
+ /* flush the header so it will be used as streamheader */
+- put_flush_packet (ffmpegmux->context->pb);
++ avio_flush (ffmpegmux->context->pb);
+ }
+
+ /* take the one with earliest timestamp,
+@@ -770,8 +763,8 @@
+ /* close down */
+ av_write_trailer (ffmpegmux->context);
+ ffmpegmux->opened = FALSE;
+- put_flush_packet (ffmpegmux->context->pb);
+- url_fclose (ffmpegmux->context->pb);
++ avio_flush (ffmpegmux->context->pb);
++ gst_ffmpegdata_close (ffmpegmux->context->pb);
+ gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
+ return GST_FLOW_UNEXPECTED;
+ }
+@@ -795,6 +788,10 @@
+ break;
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+ gst_collect_pads_stop (ffmpegmux->collect);
++ if (ffmpegmux->opened) {
++ ffmpegmux->opened = FALSE;
++ gst_ffmpegdata_close (ffmpegmux->context->pb);
++ }
+ break;
+ default:
+ break;
+@@ -809,7 +806,7 @@
+ gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
+ if (ffmpegmux->opened) {
+ ffmpegmux->opened = FALSE;
+- url_fclose (ffmpegmux->context->pb);
++ avio_close (ffmpegmux->context->pb);
+ }
+ break;
+ case GST_STATE_CHANGE_READY_TO_NULL:
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegmux.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegmux.c.orig 2011-07-13 11:07:28.000000000 +0200
+@@ -0,0 +1,970 @@
++/* GStreamer
++ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
++ *
++ * 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., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <string.h>
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avformat.h>
++#else
++#include <libavformat/avformat.h>
++#endif
++
++#include <gst/gst.h>
++#include <gst/base/gstcollectpads.h>
++
++#include "gstffmpeg.h"
++#include "gstffmpegcodecmap.h"
++#include "gstffmpegutils.h"
++
++typedef struct _GstFFMpegMux GstFFMpegMux;
++typedef struct _GstFFMpegMuxPad GstFFMpegMuxPad;
++
++struct _GstFFMpegMuxPad
++{
++ GstCollectData collect; /* we extend the CollectData */
++
++ gint padnum;
++};
++
++struct _GstFFMpegMux
++{
++ GstElement element;
++
++ GstCollectPads *collect;
++ /* We need to keep track of our pads, so we do so here. */
++ GstPad *srcpad;
++
++ AVFormatContext *context;
++ gboolean opened;
++
++ gint videopads, audiopads;
++
++ /*< private > */
++ /* event_function is the collectpads default eventfunction */
++ GstPadEventFunction event_function;
++ int preload;
++ int max_delay;
++};
++
++typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
++
++struct _GstFFMpegMuxClass
++{
++ GstElementClass parent_class;
++
++ AVOutputFormat *in_plugin;
++};
++
++#define GST_TYPE_FFMPEGMUX \
++ (gst_ffmpegdec_get_type())
++#define GST_FFMPEGMUX(obj) \
++ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGMUX,GstFFMpegMux))
++#define GST_FFMPEGMUX_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGMUX,GstFFMpegMuxClass))
++#define GST_IS_FFMPEGMUX(obj) \
++ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGMUX))
++#define GST_IS_FFMPEGMUX_CLASS(klass) \
++ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGMUX))
++
++enum
++{
++ /* FILL ME */
++ LAST_SIGNAL
++};
++
++enum
++{
++ ARG_0,
++ /* FILL ME */
++};
++
++enum
++{
++ PROP_0,
++ PROP_PRELOAD,
++ PROP_MAXDELAY
++};
++
++/* A number of function prototypes are given so we can refer to them later. */
++static void gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass);
++static void gst_ffmpegmux_base_init (gpointer g_class);
++static void gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux,
++ GstFFMpegMuxClass * g_class);
++static void gst_ffmpegmux_finalize (GObject * object);
++
++static gboolean gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps);
++static GstPad *gst_ffmpegmux_request_new_pad (GstElement * element,
++ GstPadTemplate * templ, const gchar * name);
++static GstFlowReturn gst_ffmpegmux_collected (GstCollectPads * pads,
++ gpointer user_data);
++
++static gboolean gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event);
++
++static GstStateChangeReturn gst_ffmpegmux_change_state (GstElement * element,
++ GstStateChange transition);
++
++static void gst_ffmpegmux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * pspec);
++static void gst_ffmpegmux_get_property (GObject * object, guint prop_id,
++ GValue * value, GParamSpec * pspec);
++
++static GstCaps *gst_ffmpegmux_get_id_caps (enum CodecID *id_list);
++static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
++ const gchar * field, guint num, const gint * values);
++
++#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("ffmux-params")
++
++static GstElementClass *parent_class = NULL;
++
++/*static guint gst_ffmpegmux_signals[LAST_SIGNAL] = { 0 }; */
++
++typedef struct
++{
++ const char *name;
++ const char *replacement;
++} GstFFMpegMuxReplacement;
++
++static const char *
++gst_ffmpegmux_get_replacement (const char *name)
++{
++ static const GstFFMpegMuxReplacement blacklist[] = {
++ {"avi", "avimux"},
++ {"matroska", "matroskamux"},
++ {"mov", "qtmux"},
++ {"mpegts", "mpegtsmux"},
++ {"mp4", "mp4mux"},
++ {"mpjpeg", "multipartmux"},
++ {"ogg", "oggmux"},
++ {"wav", "wavenc"},
++ {"webm", "webmmux"},
++ {"mxf", "mxfmux"},
++ {"3gp", "gppmux"},
++ {"yuv4mpegpipe", "y4menc"},
++ {"aiff", "aiffmux"},
++ {"adts", "aacparse"},
++ {"asf", "asfmux"},
++ {"asf_stream", "asfmux"},
++ {"flv", "flvmux"},
++ {"mp3", "id3v2mux"},
++ {"mp2", "id3v2mux"}
++ };
++ int i;
++
++ for (i = 0; i < sizeof (blacklist) / sizeof (blacklist[0]); i++) {
++ if (strcmp (blacklist[i].name, name) == 0) {
++ return blacklist[i].replacement;
++ }
++ }
++
++ return NULL;
++}
++
++static gboolean
++gst_ffmpegmux_is_formatter (const char *name)
++{
++ static const char *replace[] = {
++ "mp2", "mp3", NULL
++ };
++ int i;
++
++ for (i = 0; replace[i]; i++)
++ if (strcmp (replace[i], name) == 0)
++ return TRUE;
++ return FALSE;
++}
++
++static void
++gst_ffmpegmux_base_init (gpointer g_class)
++{
++ GstFFMpegMuxClass *klass = (GstFFMpegMuxClass *) g_class;
++ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
++ GstPadTemplate *videosinktempl, *audiosinktempl, *srctempl;
++ AVOutputFormat *in_plugin;
++ GstCaps *srccaps, *audiosinkcaps, *videosinkcaps;
++ enum CodecID *video_ids = NULL, *audio_ids = NULL;
++ gchar *longname, *description;
++ const char *replacement;
++ gboolean is_formatter;
++
++ in_plugin =
++ (AVOutputFormat *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
++ GST_FFMUX_PARAMS_QDATA);
++ g_assert (in_plugin != NULL);
++
++ /* construct the element details struct */
++ replacement = gst_ffmpegmux_get_replacement (in_plugin->name);
++ is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
++ if (replacement != NULL) {
++ longname =
++ g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
++ in_plugin->long_name, is_formatter ? "formatter" : "muxer",
++ replacement);
++ description =
++ g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
++ in_plugin->long_name, is_formatter ? "formatter" : "muxer",
++ replacement);
++ } else {
++ longname = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
++ is_formatter ? "formatter" : "muxer");
++ description = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
++ is_formatter ? "formatter" : "muxer");
++ }
++ gst_element_class_set_details_simple (element_class, longname,
++ is_formatter ? "Formatter/Metadata" : "Codec/Muxer", description,
++ "Wim Taymans <wim.taymans@chello.be>, "
++ "Ronald Bultje <rbultje@ronald.bitfreak.net>");
++ g_free (longname);
++ g_free (description);
++
++ /* Try to find the caps that belongs here */
++ srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
++ if (!srccaps) {
++ GST_DEBUG ("Couldn't get source caps for muxer '%s', skipping format",
++ in_plugin->name);
++ goto beach;
++ }
++
++ if (!gst_ffmpeg_formatid_get_codecids (in_plugin->name,
++ &video_ids, &audio_ids, in_plugin)) {
++ gst_caps_unref (srccaps);
++ GST_DEBUG
++ ("Couldn't get sink caps for muxer '%s'. Most likely because no input format mapping exists.",
++ in_plugin->name);
++ goto beach;
++ }
++
++ videosinkcaps = video_ids ? gst_ffmpegmux_get_id_caps (video_ids) : NULL;
++ audiosinkcaps = audio_ids ? gst_ffmpegmux_get_id_caps (audio_ids) : NULL;
++
++ /* fix up allowed caps for some muxers */
++ /* FIXME : This should be in gstffmpegcodecmap.c ! */
++ if (strcmp (in_plugin->name, "flv") == 0) {
++ const gint rates[] = { 44100, 22050, 11025 };
++
++ gst_ffmpeg_mux_simple_caps_set_int_list (audiosinkcaps, "rate", 3, rates);
++ } else if (strcmp (in_plugin->name, "gif") == 0) {
++ if (videosinkcaps)
++ gst_caps_unref (videosinkcaps);
++
++ videosinkcaps =
++ gst_caps_from_string ("video/x-raw-rgb, bpp=(int)24, depth=(int)24");
++ }
++
++ /* pad templates */
++ srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
++ gst_element_class_add_pad_template (element_class, srctempl);
++
++ if (audiosinkcaps) {
++ audiosinktempl = gst_pad_template_new ("audio_%d",
++ GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
++ gst_element_class_add_pad_template (element_class, audiosinktempl);
++ }
++
++ if (videosinkcaps) {
++ videosinktempl = gst_pad_template_new ("video_%d",
++ GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
++ gst_element_class_add_pad_template (element_class, videosinktempl);
++ }
++
++beach:
++ klass->in_plugin = in_plugin;
++}
++
++static void
++gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass)
++{
++ GObjectClass *gobject_class;
++ GstElementClass *gstelement_class;
++
++ gobject_class = (GObjectClass *) klass;
++ gstelement_class = (GstElementClass *) klass;
++
++ parent_class = g_type_class_peek_parent (klass);
++
++ gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_set_property);
++ gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_ffmpegmux_get_property);
++
++ g_object_class_install_property (gobject_class, PROP_PRELOAD,
++ g_param_spec_int ("preload", "preload",
++ "Set the initial demux-decode delay (in microseconds)", 0, G_MAXINT,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (gobject_class, PROP_MAXDELAY,
++ g_param_spec_int ("maxdelay", "maxdelay",
++ "Set the maximum demux-decode delay (in microseconds)", 0, G_MAXINT,
++ 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ gstelement_class->request_new_pad = gst_ffmpegmux_request_new_pad;
++ gstelement_class->change_state = gst_ffmpegmux_change_state;
++ gobject_class->finalize = gst_ffmpegmux_finalize;
++}
++
++static void
++gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux, GstFFMpegMuxClass * g_class)
++{
++ GstElementClass *klass = GST_ELEMENT_CLASS (g_class);
++ GstFFMpegMuxClass *oclass = (GstFFMpegMuxClass *) klass;
++ GstPadTemplate *templ = gst_element_class_get_pad_template (klass, "src");
++
++ ffmpegmux->srcpad = gst_pad_new_from_template (templ, "src");
++ gst_pad_set_caps (ffmpegmux->srcpad, gst_pad_template_get_caps (templ));
++ gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
++
++ ffmpegmux->collect = gst_collect_pads_new ();
++ gst_collect_pads_set_function (ffmpegmux->collect,
++ (GstCollectPadsFunction) gst_ffmpegmux_collected, ffmpegmux);
++
++ ffmpegmux->context = g_new0 (AVFormatContext, 1);
++ ffmpegmux->context->oformat = oclass->in_plugin;
++ ffmpegmux->context->nb_streams = 0;
++ g_snprintf (ffmpegmux->context->filename,
++ sizeof (ffmpegmux->context->filename),
++ "gstreamer://%p", ffmpegmux->srcpad);
++ ffmpegmux->opened = FALSE;
++
++ ffmpegmux->videopads = 0;
++ ffmpegmux->audiopads = 0;
++ ffmpegmux->preload = 0;
++ ffmpegmux->max_delay = 0;
++}
++
++static void
++gst_ffmpegmux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * pspec)
++{
++ GstFFMpegMux *src;
++
++ src = (GstFFMpegMux *) object;
++
++ switch (prop_id) {
++ case PROP_PRELOAD:
++ src->preload = g_value_get_int (value);
++ break;
++ case PROP_MAXDELAY:
++ src->max_delay = g_value_get_int (value);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
++gst_ffmpegmux_get_property (GObject * object, guint prop_id, GValue * value,
++ GParamSpec * pspec)
++{
++ GstFFMpegMux *src;
++
++ src = (GstFFMpegMux *) object;
++
++ switch (prop_id) {
++ case PROP_PRELOAD:
++ g_value_set_int (value, src->preload);
++ break;
++ case PROP_MAXDELAY:
++ g_value_set_int (value, src->max_delay);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++
++static void
++gst_ffmpegmux_finalize (GObject * object)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) object;
++
++ g_free (ffmpegmux->context);
++ gst_object_unref (ffmpegmux->collect);
++
++ if (G_OBJECT_CLASS (parent_class)->finalize)
++ G_OBJECT_CLASS (parent_class)->finalize (object);
++}
++
++static GstPad *
++gst_ffmpegmux_request_new_pad (GstElement * element,
++ GstPadTemplate * templ, const gchar * name)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) element;
++ GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
++ GstFFMpegMuxPad *collect_pad;
++ gchar *padname;
++ GstPad *pad;
++ AVStream *st;
++ enum AVMediaType type;
++ gint bitrate = 0, framesize = 0;
++
++ g_return_val_if_fail (templ != NULL, NULL);
++ g_return_val_if_fail (templ->direction == GST_PAD_SINK, NULL);
++ g_return_val_if_fail (ffmpegmux->opened == FALSE, NULL);
++
++ /* figure out a name that *we* like */
++ if (templ == gst_element_class_get_pad_template (klass, "video_%d")) {
++ padname = g_strdup_printf ("video_%d", ffmpegmux->videopads++);
++ type = AVMEDIA_TYPE_VIDEO;
++ bitrate = 64 * 1024;
++ framesize = 1152;
++ } else if (templ == gst_element_class_get_pad_template (klass, "audio_%d")) {
++ padname = g_strdup_printf ("audio_%d", ffmpegmux->audiopads++);
++ type = AVMEDIA_TYPE_AUDIO;
++ bitrate = 285 * 1024;
++ } else {
++ g_warning ("ffmux: unknown pad template!");
++ return NULL;
++ }
++
++ /* create pad */
++ pad = gst_pad_new_from_template (templ, padname);
++ collect_pad = (GstFFMpegMuxPad *)
++ gst_collect_pads_add_pad (ffmpegmux->collect, pad,
++ sizeof (GstFFMpegMuxPad));
++ collect_pad->padnum = ffmpegmux->context->nb_streams;
++
++ /* small hack to put our own event pad function and chain up to collect pad */
++ ffmpegmux->event_function = GST_PAD_EVENTFUNC (pad);
++ gst_pad_set_event_function (pad,
++ GST_DEBUG_FUNCPTR (gst_ffmpegmux_sink_event));
++
++ gst_pad_set_setcaps_function (pad, GST_DEBUG_FUNCPTR (gst_ffmpegmux_setcaps));
++ gst_element_add_pad (element, pad);
++
++ /* AVStream needs to be created */
++ st = av_new_stream (ffmpegmux->context, collect_pad->padnum);
++ st->codec->codec_type = type;
++ st->codec->codec_id = CODEC_ID_NONE; /* this is a check afterwards */
++ st->stream_copy = 1; /* we're not the actual encoder */
++ st->codec->bit_rate = bitrate;
++ st->codec->frame_size = framesize;
++ /* we fill in codec during capsnego */
++
++ /* we love debug output (c) (tm) (r) */
++ GST_DEBUG ("Created %s pad for ffmux_%s element",
++ padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
++ g_free (padname);
++
++ return pad;
++}
++
++/**
++ * gst_ffmpegmux_setcaps
++ * @pad: #GstPad
++ * @caps: New caps.
++ *
++ * Set caps to pad.
++ *
++ * Returns: #TRUE on success.
++ */
++static gboolean
++gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (gst_pad_get_parent (pad));
++ GstFFMpegMuxPad *collect_pad;
++ AVStream *st;
++
++ collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad);
++
++ st = ffmpegmux->context->streams[collect_pad->padnum];
++ ffmpegmux->context->preload = ffmpegmux->preload;
++ ffmpegmux->context->max_delay = ffmpegmux->max_delay;
++
++ /* for the format-specific guesses, we'll go to
++ * our famous codec mapper */
++ if (gst_ffmpeg_caps_to_codecid (caps, st->codec) == CODEC_ID_NONE)
++ goto not_accepted;
++
++ /* copy over the aspect ratios, ffmpeg expects the stream aspect to match the
++ * codec aspect. */
++ st->sample_aspect_ratio = st->codec->sample_aspect_ratio;
++
++ GST_LOG_OBJECT (pad, "accepted caps %" GST_PTR_FORMAT, caps);
++ return TRUE;
++
++ /* ERRORS */
++not_accepted:
++ {
++ GST_LOG_OBJECT (pad, "rejecting caps %" GST_PTR_FORMAT, caps);
++ return FALSE;
++ }
++}
++
++
++static gboolean
++gst_ffmpegmux_sink_event (GstPad * pad, GstEvent * event)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) gst_pad_get_parent (pad);
++ gboolean res = TRUE;
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_TAG:{
++ GstTagList *taglist;
++ GstTagSetter *setter = GST_TAG_SETTER (ffmpegmux);
++ const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter);
++
++ gst_event_parse_tag (event, &taglist);
++ gst_tag_setter_merge_tags (setter, taglist, mode);
++ break;
++ }
++ default:
++ break;
++ }
++
++ /* chaining up to collectpads default event function */
++ res = ffmpegmux->event_function (pad, event);
++
++ gst_object_unref (ffmpegmux);
++ return res;
++}
++
++static GstFlowReturn
++gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
++{
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) user_data;
++ GSList *collected;
++ GstFFMpegMuxPad *best_pad;
++ GstClockTime best_time;
++#if 0
++ /* Re-enable once converted to new AVMetaData API
++ * See #566605
++ */
++ const GstTagList *tags;
++#endif
++
++ /* open "file" (gstreamer protocol to next element) */
++ if (!ffmpegmux->opened) {
++ int open_flags = URL_WRONLY;
++
++ /* we do need all streams to have started capsnego,
++ * or things will go horribly wrong */
++ for (collected = ffmpegmux->collect->data; collected;
++ collected = g_slist_next (collected)) {
++ GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
++ AVStream *st = ffmpegmux->context->streams[collect_pad->padnum];
++
++ /* check whether the pad has successfully completed capsnego */
++ if (st->codec->codec_id == CODEC_ID_NONE) {
++ GST_ELEMENT_ERROR (ffmpegmux, CORE, NEGOTIATION, (NULL),
++ ("no caps set on stream %d (%s)", collect_pad->padnum,
++ (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) ?
++ "video" : "audio"));
++ return GST_FLOW_ERROR;
++ }
++ /* set framerate for audio */
++ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
++ switch (st->codec->codec_id) {
++ case CODEC_ID_PCM_S16LE:
++ case CODEC_ID_PCM_S16BE:
++ case CODEC_ID_PCM_U16LE:
++ case CODEC_ID_PCM_U16BE:
++ case CODEC_ID_PCM_S8:
++ case CODEC_ID_PCM_U8:
++ st->codec->frame_size = 1;
++ break;
++ default:
++ {
++ GstBuffer *buffer;
++
++ /* FIXME : This doesn't work for RAW AUDIO...
++ * in fact I'm wondering if it even works for any kind of audio... */
++ buffer = gst_collect_pads_peek (ffmpegmux->collect,
++ (GstCollectData *) collect_pad);
++ if (buffer) {
++ st->codec->frame_size =
++ st->codec->sample_rate *
++ GST_BUFFER_DURATION (buffer) / GST_SECOND;
++ gst_buffer_unref (buffer);
++ }
++ }
++ }
++ }
++ }
++
++#if 0
++ /* Re-enable once converted to new AVMetaData API
++ * See #566605
++ */
++
++ /* tags */
++ tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (ffmpegmux));
++ if (tags) {
++ gint i;
++ gchar *s;
++
++ /* get the interesting ones */
++ if (gst_tag_list_get_string (tags, GST_TAG_TITLE, &s)) {
++ strncpy (ffmpegmux->context->title, s,
++ sizeof (ffmpegmux->context->title));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &s)) {
++ strncpy (ffmpegmux->context->author, s,
++ sizeof (ffmpegmux->context->author));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_COPYRIGHT, &s)) {
++ strncpy (ffmpegmux->context->copyright, s,
++ sizeof (ffmpegmux->context->copyright));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_COMMENT, &s)) {
++ strncpy (ffmpegmux->context->comment, s,
++ sizeof (ffmpegmux->context->comment));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &s)) {
++ strncpy (ffmpegmux->context->album, s,
++ sizeof (ffmpegmux->context->album));
++ }
++ if (gst_tag_list_get_string (tags, GST_TAG_GENRE, &s)) {
++ strncpy (ffmpegmux->context->genre, s,
++ sizeof (ffmpegmux->context->genre));
++ }
++ if (gst_tag_list_get_int (tags, GST_TAG_TRACK_NUMBER, &i)) {
++ ffmpegmux->context->track = i;
++ }
++ }
++#endif
++
++ /* set the streamheader flag for gstffmpegprotocol if codec supports it */
++ if (!strcmp (ffmpegmux->context->oformat->name, "flv")) {
++ open_flags |= GST_FFMPEG_URL_STREAMHEADER;
++ }
++
++ if (url_fopen (&ffmpegmux->context->pb,
++ ffmpegmux->context->filename, open_flags) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
++ ("Failed to open stream context in ffmux"));
++ return GST_FLOW_ERROR;
++ }
++
++ if (av_set_parameters (ffmpegmux->context, NULL) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, INIT, (NULL),
++ ("Failed to initialize muxer"));
++ return GST_FLOW_ERROR;
++ }
++
++ /* now open the mux format */
++ if (av_write_header (ffmpegmux->context) < 0) {
++ GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL),
++ ("Failed to write file header - check codec settings"));
++ return GST_FLOW_ERROR;
++ }
++
++ /* we're now opened */
++ ffmpegmux->opened = TRUE;
++
++ /* flush the header so it will be used as streamheader */
++ put_flush_packet (ffmpegmux->context->pb);
++ }
++
++ /* take the one with earliest timestamp,
++ * and push it forward */
++ best_pad = NULL;
++ best_time = GST_CLOCK_TIME_NONE;
++ for (collected = ffmpegmux->collect->data; collected;
++ collected = g_slist_next (collected)) {
++ GstFFMpegMuxPad *collect_pad = (GstFFMpegMuxPad *) collected->data;
++ GstBuffer *buffer = gst_collect_pads_peek (ffmpegmux->collect,
++ (GstCollectData *) collect_pad);
++
++ /* if there's no buffer, just continue */
++ if (buffer == NULL) {
++ continue;
++ }
++
++ /* if we have no buffer yet, just use the first one */
++ if (best_pad == NULL) {
++ best_pad = collect_pad;
++ best_time = GST_BUFFER_TIMESTAMP (buffer);
++ goto next_pad;
++ }
++
++ /* if we do have one, only use this one if it's older */
++ if (GST_BUFFER_TIMESTAMP (buffer) < best_time) {
++ best_time = GST_BUFFER_TIMESTAMP (buffer);
++ best_pad = collect_pad;
++ }
++
++ next_pad:
++ gst_buffer_unref (buffer);
++
++ /* Mux buffers with invalid timestamp first */
++ if (!GST_CLOCK_TIME_IS_VALID (best_time))
++ break;
++ }
++
++ /* now handle the buffer, or signal EOS if we have
++ * no buffers left */
++ if (best_pad != NULL) {
++ GstBuffer *buf;
++ AVPacket pkt;
++ gboolean need_free = FALSE;
++
++ /* push out current buffer */
++ buf = gst_collect_pads_pop (ffmpegmux->collect,
++ (GstCollectData *) best_pad);
++
++ ffmpegmux->context->streams[best_pad->padnum]->codec->frame_number++;
++
++ /* set time */
++ pkt.pts = gst_ffmpeg_time_gst_to_ff (GST_BUFFER_TIMESTAMP (buf),
++ ffmpegmux->context->streams[best_pad->padnum]->time_base);
++ pkt.dts = pkt.pts;
++
++ if (strcmp (ffmpegmux->context->oformat->name, "gif") == 0) {
++ AVStream *st = ffmpegmux->context->streams[best_pad->padnum];
++ AVPicture src, dst;
++
++ need_free = TRUE;
++ pkt.size = st->codec->width * st->codec->height * 3;
++ pkt.data = g_malloc (pkt.size);
++
++ dst.data[0] = pkt.data;
++ dst.data[1] = NULL;
++ dst.data[2] = NULL;
++ dst.linesize[0] = st->codec->width * 3;
++
++ gst_ffmpeg_avpicture_fill (&src, GST_BUFFER_DATA (buf),
++ PIX_FMT_RGB24, st->codec->width, st->codec->height);
++
++ av_picture_copy (&dst, &src, PIX_FMT_RGB24,
++ st->codec->width, st->codec->height);
++ } else {
++ pkt.data = GST_BUFFER_DATA (buf);
++ pkt.size = GST_BUFFER_SIZE (buf);
++ }
++
++ pkt.stream_index = best_pad->padnum;
++ pkt.flags = 0;
++
++ if (!GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT))
++ pkt.flags |= AV_PKT_FLAG_KEY;
++
++ if (GST_BUFFER_DURATION_IS_VALID (buf))
++ pkt.duration =
++ gst_ffmpeg_time_gst_to_ff (GST_BUFFER_DURATION (buf),
++ ffmpegmux->context->streams[best_pad->padnum]->time_base);
++ else
++ pkt.duration = 0;
++ av_write_frame (ffmpegmux->context, &pkt);
++ gst_buffer_unref (buf);
++ if (need_free)
++ g_free (pkt.data);
++ } else {
++ /* close down */
++ av_write_trailer (ffmpegmux->context);
++ ffmpegmux->opened = FALSE;
++ put_flush_packet (ffmpegmux->context->pb);
++ url_fclose (ffmpegmux->context->pb);
++ gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ());
++ return GST_FLOW_UNEXPECTED;
++ }
++
++ return GST_FLOW_OK;
++}
++
++static GstStateChangeReturn
++gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition)
++{
++ GstFlowReturn ret;
++ GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (element);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_NULL_TO_READY:
++ break;
++ case GST_STATE_CHANGE_READY_TO_PAUSED:
++ gst_collect_pads_start (ffmpegmux->collect);
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ gst_collect_pads_stop (ffmpegmux->collect);
++ break;
++ default:
++ break;
++ }
++
++ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
++
++ switch (transition) {
++ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
++ break;
++ case GST_STATE_CHANGE_PAUSED_TO_READY:
++ gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux));
++ if (ffmpegmux->opened) {
++ ffmpegmux->opened = FALSE;
++ url_fclose (ffmpegmux->context->pb);
++ }
++ break;
++ case GST_STATE_CHANGE_READY_TO_NULL:
++ break;
++ default:
++ break;
++ }
++
++ return ret;
++}
++
++static GstCaps *
++gst_ffmpegmux_get_id_caps (enum CodecID *id_list)
++{
++ GstCaps *caps, *t;
++ gint i;
++
++ caps = gst_caps_new_empty ();
++ for (i = 0; id_list[i] != CODEC_ID_NONE; i++) {
++ if ((t = gst_ffmpeg_codecid_to_caps (id_list[i], NULL, TRUE)))
++ gst_caps_append (caps, t);
++ }
++ if (gst_caps_is_empty (caps)) {
++ gst_caps_unref (caps);
++ return NULL;
++ }
++
++ return caps;
++}
++
++/* set a list of integer values on the caps, e.g. for sample rates */
++static void
++gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps, const gchar * field,
++ guint num, const gint * values)
++{
++ GValue list = { 0, };
++ GValue val = { 0, };
++ gint i;
++
++ g_return_if_fail (GST_CAPS_IS_SIMPLE (caps));
++
++ g_value_init (&list, GST_TYPE_LIST);
++ g_value_init (&val, G_TYPE_INT);
++
++ for (i = 0; i < num; ++i) {
++ g_value_set_int (&val, values[i]);
++ gst_value_list_append_value (&list, &val);
++ }
++
++ gst_structure_set_value (gst_caps_get_structure (caps, 0), field, &list);
++
++ g_value_unset (&val);
++ g_value_unset (&list);
++}
++
++gboolean
++gst_ffmpegmux_register (GstPlugin * plugin)
++{
++ GTypeInfo typeinfo = {
++ sizeof (GstFFMpegMuxClass),
++ (GBaseInitFunc) gst_ffmpegmux_base_init,
++ NULL,
++ (GClassInitFunc) gst_ffmpegmux_class_init,
++ NULL,
++ NULL,
++ sizeof (GstFFMpegMux),
++ 0,
++ (GInstanceInitFunc) gst_ffmpegmux_init,
++ };
++ static const GInterfaceInfo tag_setter_info = {
++ NULL, NULL, NULL
++ };
++ GType type;
++ AVOutputFormat *in_plugin;
++
++ in_plugin = av_oformat_next (NULL);
++
++ GST_LOG ("Registering muxers");
++
++ while (in_plugin) {
++ gchar *type_name;
++ gchar *p;
++ GstRank rank = GST_RANK_MARGINAL;
++
++ if ((!strncmp (in_plugin->name, "u16", 3)) ||
++ (!strncmp (in_plugin->name, "s16", 3)) ||
++ (!strncmp (in_plugin->name, "u24", 3)) ||
++ (!strncmp (in_plugin->name, "s24", 3)) ||
++ (!strncmp (in_plugin->name, "u8", 2)) ||
++ (!strncmp (in_plugin->name, "s8", 2)) ||
++ (!strncmp (in_plugin->name, "u32", 3)) ||
++ (!strncmp (in_plugin->name, "s32", 3)) ||
++ (!strncmp (in_plugin->name, "f32", 3)) ||
++ (!strncmp (in_plugin->name, "f64", 3)) ||
++ (!strncmp (in_plugin->name, "raw", 3)) ||
++ (!strncmp (in_plugin->name, "crc", 3)) ||
++ (!strncmp (in_plugin->name, "null", 4)) ||
++ (!strncmp (in_plugin->name, "gif", 3)) ||
++ (!strncmp (in_plugin->name, "frame", 5)) ||
++ (!strncmp (in_plugin->name, "image", 5)) ||
++ (!strncmp (in_plugin->name, "mulaw", 5)) ||
++ (!strncmp (in_plugin->name, "alaw", 4)) ||
++ (!strncmp (in_plugin->name, "h26", 3)) ||
++ (!strncmp (in_plugin->name, "rtp", 3)) ||
++ (!strncmp (in_plugin->name, "ass", 3)) ||
++ (!strncmp (in_plugin->name, "ffmetadata", 10)) ||
++ (!strncmp (in_plugin->name, "srt", 3))
++ ) {
++ GST_LOG ("Ignoring muxer %s", in_plugin->name);
++ goto next;
++ }
++
++ if ((!strncmp (in_plugin->long_name, "raw ", 4))) {
++ GST_LOG ("Ignoring raw muxer %s", in_plugin->name);
++ goto next;
++ }
++
++ if (gst_ffmpegmux_get_replacement (in_plugin->name))
++ rank = GST_RANK_NONE;
++
++ /* FIXME : We need a fast way to know whether we have mappings for this
++ * muxer type. */
++
++ /* construct the type */
++ type_name = g_strdup_printf ("ffmux_%s", in_plugin->name);
++
++ p = type_name;
++
++ while (*p) {
++ if (*p == '.')
++ *p = '_';
++ p++;
++ }
++
++ type = g_type_from_name (type_name);
++
++ if (!type) {
++ /* create the type now */
++ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
++ g_type_set_qdata (type, GST_FFMUX_PARAMS_QDATA, (gpointer) in_plugin);
++ g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, &tag_setter_info);
++ }
++
++ if (!gst_element_register (plugin, type_name, rank, type)) {
++ g_free (type_name);
++ return FALSE;
++ }
++
++ g_free (type_name);
++
++ next:
++ in_plugin = av_oformat_next (in_plugin);
++ }
++
++ GST_LOG ("Finished registering muxers");
++
++ return TRUE;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegprotocol.c 2011-07-12 16:35:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegprotocol.c 2014-08-08 15:26:07.875857555 +0200
+@@ -46,63 +46,14 @@
+ };
+
+ static int
+-gst_ffmpegdata_open (URLContext * h, const char *filename, int flags)
+-{
+- GstProtocolInfo *info;
+- GstPad *pad;
+-
+- GST_LOG ("Opening %s", filename);
+-
+- info = g_new0 (GstProtocolInfo, 1);
+-
+- info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
+- flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+- h->flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+-
+- /* we don't support R/W together */
+- if (flags != URL_RDONLY && flags != URL_WRONLY) {
+- GST_WARNING ("Only read-only or write-only are supported");
+- return -EINVAL;
+- }
+-
+- if (sscanf (&filename[12], "%p", &pad) != 1) {
+- GST_WARNING ("could not decode pad from %s", filename);
+- return -EIO;
+- }
+-
+- /* make sure we're a pad and that we're of the right type */
+- g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
+-
+- switch (flags) {
+- case URL_RDONLY:
+- g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
+- break;
+- case URL_WRONLY:
+- g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
+- break;
+- }
+-
+- info->eos = FALSE;
+- info->pad = pad;
+- info->offset = 0;
+-
+- h->priv_data = (void *) info;
+- h->is_streamed = FALSE;
+- h->max_packet_size = 0;
+-
+- return 0;
+-}
+-
+-static int
+-gst_ffmpegdata_peek (URLContext * h, unsigned char *buf, int size)
++gst_ffmpegdata_peek (void *priv_data, unsigned char *buf, int size)
+ {
+ GstProtocolInfo *info;
+ GstBuffer *inbuf = NULL;
+ GstFlowReturn ret;
+ int total = 0;
+
+- g_return_val_if_fail (h->flags == URL_RDONLY, AVERROR (EIO));
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ GST_DEBUG ("Pulling %d bytes at position %" G_GUINT64_FORMAT, size,
+ info->offset);
+@@ -134,17 +85,17 @@
+ }
+
+ static int
+-gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size)
++gst_ffmpegdata_read (void *priv_data, unsigned char *buf, int size)
+ {
+ gint res;
+ GstProtocolInfo *info;
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ GST_DEBUG ("Reading %d bytes of data at position %" G_GUINT64_FORMAT, size,
+ info->offset);
+
+- res = gst_ffmpegdata_peek (h, buf, size);
++ res = gst_ffmpegdata_peek (priv_data, buf, size);
+ if (res >= 0)
+ info->offset += res;
+
+@@ -154,15 +105,13 @@
+ }
+
+ static int
+-gst_ffmpegdata_write (URLContext * h, const unsigned char *buf, int size)
++gst_ffmpegdata_write (void *priv_data, const unsigned char *buf, int size)
+ {
+ GstProtocolInfo *info;
+ GstBuffer *outbuf;
+
+ GST_DEBUG ("Writing %d bytes", size);
+- info = (GstProtocolInfo *) h->priv_data;
+-
+- g_return_val_if_fail (h->flags != URL_RDONLY, -EIO);
++ info = (GstProtocolInfo *) priv_data;
+
+ /* create buffer and push data further */
+ if (gst_pad_alloc_buffer_and_set_caps (info->pad,
+@@ -179,7 +128,7 @@
+ }
+
+ static int64_t
+-gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
++gst_ffmpegdata_seek (void *priv_data, int64_t pos, int whence)
+ {
+ GstProtocolInfo *info;
+ guint64 newpos = 0;
+@@ -187,70 +136,62 @@
+ GST_DEBUG ("Seeking to %" G_GINT64_FORMAT ", whence=%d",
+ (gint64) pos, whence);
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) priv_data;
+
+ /* TODO : if we are push-based, we need to return sensible info */
+
+- switch (h->flags) {
+- case URL_RDONLY:
+- {
+- /* sinkpad */
+- switch (whence) {
+- case SEEK_SET:
+- newpos = (guint64) pos;
+- break;
+- case SEEK_CUR:
+- newpos = info->offset + pos;
+- break;
+- case SEEK_END:
+- case AVSEEK_SIZE:
+- /* ffmpeg wants to know the current end position in bytes ! */
+- {
+- GstFormat format = GST_FORMAT_BYTES;
+- gint64 duration;
+-
+- GST_DEBUG ("Seek end");
+-
+- if (gst_pad_is_linked (info->pad))
+- if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
+- &duration))
+- newpos = ((guint64) duration) + pos;
+- }
+- break;
+- default:
+- g_assert (0);
+- break;
++ if (GST_PAD_IS_SINK (info->pad)) {
++ /* sinkpad */
++ switch (whence) {
++ case SEEK_SET:
++ newpos = (guint64) pos;
++ break;
++ case SEEK_CUR:
++ newpos = info->offset + pos;
++ break;
++ case SEEK_END:
++ case AVSEEK_SIZE:
++ /* ffmpeg wants to know the current end position in bytes ! */
++ {
++ GstFormat format = GST_FORMAT_BYTES;
++ gint64 duration;
++
++ GST_DEBUG ("Seek end");
++
++ if (gst_pad_is_linked (info->pad))
++ if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
++ &duration))
++ newpos = ((guint64) duration) + pos;
+ }
+- /* FIXME : implement case for push-based behaviour */
+- if (whence != AVSEEK_SIZE)
+- info->offset = newpos;
++ break;
++ default:
++ g_assert (0);
++ break;
+ }
+- break;
+- case URL_WRONLY:
+- {
+- /* srcpad */
+- switch (whence) {
+- case SEEK_SET:
+- info->offset = (guint64) pos;
+- gst_pad_push_event (info->pad, gst_event_new_new_segment
+- (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
+- GST_CLOCK_TIME_NONE, info->offset));
+- break;
+- case SEEK_CUR:
+- info->offset += pos;
+- gst_pad_push_event (info->pad, gst_event_new_new_segment
+- (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
+- GST_CLOCK_TIME_NONE, info->offset));
+- break;
+- default:
+- break;
+- }
+- newpos = info->offset;
++ /* FIXME : implement case for push-based behaviour */
++ if (whence != AVSEEK_SIZE)
++ info->offset = newpos;
++ } else if (GST_PAD_IS_SRC (info->pad)) {
++ /* srcpad */
++ switch (whence) {
++ case SEEK_SET:
++ info->offset = (guint64) pos;
++ gst_pad_push_event (info->pad, gst_event_new_new_segment
++ (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
++ GST_CLOCK_TIME_NONE, info->offset));
++ break;
++ case SEEK_CUR:
++ info->offset += pos;
++ gst_pad_push_event (info->pad, gst_event_new_new_segment
++ (TRUE, 1.0, GST_FORMAT_BYTES, info->offset,
++ GST_CLOCK_TIME_NONE, info->offset));
++ break;
++ default:
++ break;
+ }
+- break;
+- default:
+- g_assert (0);
+- break;
++ newpos = info->offset;
++ } else {
++ g_assert_not_reached ();
+ }
+
+ GST_DEBUG ("Now at offset %" G_GUINT64_FORMAT " (returning %" G_GUINT64_FORMAT
+@@ -258,85 +199,91 @@
+ return newpos;
+ }
+
+-static int
+-gst_ffmpegdata_close (URLContext * h)
++int
++gst_ffmpegdata_close (AVIOContext * h)
+ {
+ GstProtocolInfo *info;
+
+- info = (GstProtocolInfo *) h->priv_data;
++ info = (GstProtocolInfo *) h->opaque;
+ if (info == NULL)
+ return 0;
+
+ GST_LOG ("Closing file");
+
+- switch (h->flags) {
+- case URL_WRONLY:
+- {
+- /* send EOS - that closes down the stream */
+- gst_pad_push_event (info->pad, gst_event_new_eos ());
+- break;
+- }
+- default:
+- break;
++ if (GST_PAD_IS_SRC (info->pad)) {
++ /* send EOS - that closes down the stream */
++ gst_pad_push_event (info->pad, gst_event_new_eos ());
+ }
+
+ /* clean up data */
+ g_free (info);
+- h->priv_data = NULL;
++ h->opaque = NULL;
++
++ av_freep (&h->buffer);
++ av_free (h);
+
+ return 0;
+ }
+
++int
++gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context)
++{
++ GstProtocolInfo *info;
++ static const int buffer_size = 4096;
++ unsigned char *buffer = NULL;
+
+-URLProtocol gstreamer_protocol = {
+- /*.name = */ "gstreamer",
+- /*.url_open = */ gst_ffmpegdata_open,
+- /*.url_read = */ gst_ffmpegdata_read,
+- /*.url_write = */ gst_ffmpegdata_write,
+- /*.url_seek = */ gst_ffmpegdata_seek,
+- /*.url_close = */ gst_ffmpegdata_close,
+-};
++ info = g_new0 (GstProtocolInfo, 1);
+
++ info->set_streamheader = flags & GST_FFMPEG_URL_STREAMHEADER;
++ flags &= ~GST_FFMPEG_URL_STREAMHEADER;
+
+-/* specialized protocol for cross-thread pushing,
+- * based on ffmpeg's pipe protocol */
++ /* we don't support R/W together */
++ if ((flags & AVIO_FLAG_WRITE) && (flags & AVIO_FLAG_READ)) {
++ GST_WARNING ("Only read-only or write-only are supported");
++ return -EINVAL;
++ }
+
+-static int
+-gst_ffmpeg_pipe_open (URLContext * h, const char *filename, int flags)
+-{
+- GstFFMpegPipe *ffpipe;
++ /* make sure we're a pad and that we're of the right type */
++ g_return_val_if_fail (GST_IS_PAD (pad), -EINVAL);
+
+- GST_LOG ("Opening %s", filename);
++ if ((flags & AVIO_FLAG_READ))
++ g_return_val_if_fail (GST_PAD_IS_SINK (pad), -EINVAL);
++ if ((flags & AVIO_FLAG_WRITE))
++ g_return_val_if_fail (GST_PAD_IS_SRC (pad), -EINVAL);
+
+- /* we don't support W together */
+- if (flags != URL_RDONLY) {
+- GST_WARNING ("Only read-only is supported");
+- return -EINVAL;
+- }
++ info->eos = FALSE;
++ info->pad = pad;
++ info->offset = 0;
+
+- if (sscanf (&filename[10], "%p", &ffpipe) != 1) {
+- GST_WARNING ("could not decode pipe info from %s", filename);
+- return -EIO;
++ buffer = av_malloc (buffer_size);
++ if (buffer == NULL) {
++ GST_WARNING ("Failed to allocate buffer");
++ return -ENOMEM;
+ }
+
+- /* sanity check */
+- g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
+-
+- h->priv_data = (void *) ffpipe;
+- h->is_streamed = TRUE;
+- h->max_packet_size = 0;
++ *context =
++ avio_alloc_context (buffer, buffer_size, flags, (void *) info,
++ gst_ffmpegdata_read, gst_ffmpegdata_write, gst_ffmpegdata_seek);
++ (*context)->seekable = AVIO_SEEKABLE_NORMAL;
++ if (!(flags & AVIO_FLAG_WRITE)) {
++ (*context)->buf_ptr = (*context)->buf_end;
++ (*context)->write_flag = 0;
++ }
+
+ return 0;
+ }
+
++/* specialized protocol for cross-thread pushing,
++ * based on ffmpeg's pipe protocol */
++
+ static int
+-gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size)
++gst_ffmpeg_pipe_read (void *priv_data, unsigned char *buf, int size)
+ {
+ GstFFMpegPipe *ffpipe;
+ const guint8 *data;
+ guint available;
+
+- ffpipe = (GstFFMpegPipe *) h->priv_data;
++ ffpipe = (GstFFMpegPipe *) priv_data;
+
+ GST_LOG ("requested size %d", size);
+
+@@ -367,21 +314,38 @@
+ return size;
+ }
+
+-static int
+-gst_ffmpeg_pipe_close (URLContext * h)
++int
++gst_ffmpeg_pipe_close (AVIOContext * h)
+ {
+ GST_LOG ("Closing pipe");
+
+- h->priv_data = NULL;
++ h->opaque = NULL;
++ av_freep (&h->buffer);
++ av_free (h);
+
+ return 0;
+ }
+
+-URLProtocol gstpipe_protocol = {
+- "gstpipe",
+- gst_ffmpeg_pipe_open,
+- gst_ffmpeg_pipe_read,
+- NULL,
+- NULL,
+- gst_ffmpeg_pipe_close,
+-};
++int
++gst_ffmpeg_pipe_open (GstFFMpegPipe * ffpipe, int flags, AVIOContext ** context)
++{
++ static const int buffer_size = 4096;
++ unsigned char *buffer = NULL;
++
++ /* sanity check */
++ g_return_val_if_fail (GST_IS_ADAPTER (ffpipe->adapter), -EINVAL);
++
++ buffer = av_malloc (buffer_size);
++ if (buffer == NULL) {
++ GST_WARNING ("Failed to allocate buffer");
++ return -ENOMEM;
++ }
++
++ *context =
++ avio_alloc_context (buffer, buffer_size, 0, (void *) ffpipe,
++ gst_ffmpeg_pipe_read, NULL, NULL);
++ (*context)->seekable = 0;
++ (*context)->buf_ptr = (*context)->buf_end;
++
++ return 0;
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c 2011-07-13 11:07:28.000000000 +0200
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c 2014-08-08 15:34:04.007874626 +0200
+@@ -25,6 +25,11 @@
+ #ifdef __APPLE__
+ #include <sys/sysctl.h>
+ #endif
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avformat.h>
++#else
++#include <libavformat/avformat.h>
++#endif
+
+ G_CONST_RETURN gchar *
+ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
+@@ -39,21 +44,21 @@
+ }
+
+ gint
+-av_smp_format_depth (enum SampleFormat smp_fmt)
++av_smp_format_depth (enum AVSampleFormat smp_fmt)
+ {
+ gint depth = -1;
+ switch (smp_fmt) {
+- case SAMPLE_FMT_U8:
++ case AV_SAMPLE_FMT_U8:
+ depth = 1;
+ break;
+- case SAMPLE_FMT_S16:
++ case AV_SAMPLE_FMT_S16:
+ depth = 2;
+ break;
+- case SAMPLE_FMT_S32:
+- case SAMPLE_FMT_FLT:
++ case AV_SAMPLE_FMT_S32:
++ case AV_SAMPLE_FMT_FLT:
+ depth = 4;
+ break;
+- case SAMPLE_FMT_DBL:
++ case AV_SAMPLE_FMT_DBL:
+ depth = 8;
+ break;
+ default:
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.c.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.c.orig 2011-07-13 11:07:28.000000000 +0200
+@@ -0,0 +1,483 @@
++/* GStreamer
++ * Copyright (c) 2009 Edward Hervey <bilboed@bilboed.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., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include "gstffmpegutils.h"
++#include <unistd.h>
++#ifdef __APPLE__
++#include <sys/sysctl.h>
++#endif
++
++G_CONST_RETURN gchar *
++gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
++{
++ AVCodec *codec;
++ /* Let's use what ffmpeg can provide us */
++
++ if ((codec = avcodec_find_decoder (codec_id)) ||
++ (codec = avcodec_find_encoder (codec_id)))
++ return codec->long_name;
++ return NULL;
++}
++
++gint
++av_smp_format_depth (enum SampleFormat smp_fmt)
++{
++ gint depth = -1;
++ switch (smp_fmt) {
++ case SAMPLE_FMT_U8:
++ depth = 1;
++ break;
++ case SAMPLE_FMT_S16:
++ depth = 2;
++ break;
++ case SAMPLE_FMT_S32:
++ case SAMPLE_FMT_FLT:
++ depth = 4;
++ break;
++ case SAMPLE_FMT_DBL:
++ depth = 8;
++ break;
++ default:
++ GST_ERROR ("UNHANDLED SAMPLE FORMAT !");
++ break;
++ }
++ return depth;
++}
++
++
++/*
++ * Fill in pointers to memory in a AVPicture, where
++ * everything is aligned by 4 (as required by X).
++ * This is mostly a copy from imgconvert.c with some
++ * small changes.
++ */
++
++#define FF_COLOR_RGB 0 /* RGB color space */
++#define FF_COLOR_GRAY 1 /* gray color space */
++#define FF_COLOR_YUV 2 /* YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
++#define FF_COLOR_YUV_JPEG 3 /* YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
++
++#define FF_PIXEL_PLANAR 0 /* each channel has one component in AVPicture */
++#define FF_PIXEL_PACKED 1 /* only one components containing all the channels */
++#define FF_PIXEL_PALETTE 2 /* one components containing indexes for a palette */
++
++typedef struct PixFmtInfo
++{
++ const char *name;
++ uint8_t nb_channels; /* number of channels (including alpha) */
++ uint8_t color_type; /* color type (see FF_COLOR_xxx constants) */
++ uint8_t pixel_type; /* pixel storage type (see FF_PIXEL_xxx constants) */
++ uint8_t is_alpha:1; /* true if alpha can be specified */
++ uint8_t x_chroma_shift; /* X chroma subsampling factor is 2 ^ shift */
++ uint8_t y_chroma_shift; /* Y chroma subsampling factor is 2 ^ shift */
++ uint8_t depth; /* bit depth of the color components */
++} PixFmtInfo;
++
++
++/* this table gives more information about formats */
++static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
++void
++gst_ffmpeg_init_pix_fmt_info (void)
++{
++ /* YUV formats */
++ pix_fmt_info[PIX_FMT_YUV420P].name = g_strdup ("yuv420p");
++ pix_fmt_info[PIX_FMT_YUV420P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV420P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV420P].depth = 8,
++ pix_fmt_info[PIX_FMT_YUV420P].x_chroma_shift = 1,
++ pix_fmt_info[PIX_FMT_YUV420P].y_chroma_shift = 1;
++
++ pix_fmt_info[PIX_FMT_YUV422P].name = g_strdup ("yuv422p");
++ pix_fmt_info[PIX_FMT_YUV422P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV422P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV422P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV422P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV422P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUV422P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUV444P].name = g_strdup ("yuv444p");
++ pix_fmt_info[PIX_FMT_YUV444P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV444P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV444P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV444P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV444P].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_YUV444P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUYV422].name = g_strdup ("yuv422");
++ pix_fmt_info[PIX_FMT_YUYV422].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_YUYV422].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUYV422].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_YUYV422].depth = 8;
++ pix_fmt_info[PIX_FMT_YUYV422].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUYV422].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUV410P].name = g_strdup ("yuv410p");
++ pix_fmt_info[PIX_FMT_YUV410P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV410P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV410P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV410P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV410P].x_chroma_shift = 2;
++ pix_fmt_info[PIX_FMT_YUV410P].y_chroma_shift = 2;
++
++ pix_fmt_info[PIX_FMT_YUV411P].name = g_strdup ("yuv411p");
++ pix_fmt_info[PIX_FMT_YUV411P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUV411P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUV411P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUV411P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUV411P].x_chroma_shift = 2;
++ pix_fmt_info[PIX_FMT_YUV411P].y_chroma_shift = 0;
++
++ /* JPEG YUV */
++ pix_fmt_info[PIX_FMT_YUVJ420P].name = g_strdup ("yuvj420p");
++ pix_fmt_info[PIX_FMT_YUVJ420P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ420P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ420P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ420P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUVJ420P].y_chroma_shift = 1;
++
++ pix_fmt_info[PIX_FMT_YUVJ422P].name = g_strdup ("yuvj422p");
++ pix_fmt_info[PIX_FMT_YUVJ422P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ422P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ422P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ422P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ422P].x_chroma_shift = 1;
++ pix_fmt_info[PIX_FMT_YUVJ422P].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_YUVJ444P].name = g_strdup ("yuvj444p");
++ pix_fmt_info[PIX_FMT_YUVJ444P].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_YUVJ444P].color_type = FF_COLOR_YUV_JPEG;
++ pix_fmt_info[PIX_FMT_YUVJ444P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVJ444P].depth = 8;
++ pix_fmt_info[PIX_FMT_YUVJ444P].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_YUVJ444P].y_chroma_shift = 0;
++
++ /* RGB formats */
++ pix_fmt_info[PIX_FMT_RGB24].name = g_strdup ("rgb24");
++ pix_fmt_info[PIX_FMT_RGB24].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_RGB24].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB24].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB24].depth = 8;
++ pix_fmt_info[PIX_FMT_RGB24].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB24].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_BGR24].name = g_strdup ("bgr24");
++ pix_fmt_info[PIX_FMT_BGR24].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_BGR24].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_BGR24].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_BGR24].depth = 8;
++ pix_fmt_info[PIX_FMT_BGR24].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_BGR24].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB32].name = g_strdup ("rgba32");
++ pix_fmt_info[PIX_FMT_RGB32].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_RGB32].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_RGB32].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB32].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB32].depth = 8;
++ pix_fmt_info[PIX_FMT_RGB32].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB32].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB565].name = g_strdup ("rgb565");
++ pix_fmt_info[PIX_FMT_RGB565].nb_channels = 3;
++ pix_fmt_info[PIX_FMT_RGB565].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB565].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB565].depth = 5;
++ pix_fmt_info[PIX_FMT_RGB565].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB565].y_chroma_shift = 0;
++
++ pix_fmt_info[PIX_FMT_RGB555].name = g_strdup ("rgb555");
++ pix_fmt_info[PIX_FMT_RGB555].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_RGB555].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_RGB555].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_RGB555].pixel_type = FF_PIXEL_PACKED;
++ pix_fmt_info[PIX_FMT_RGB555].depth = 5;
++ pix_fmt_info[PIX_FMT_RGB555].x_chroma_shift = 0;
++ pix_fmt_info[PIX_FMT_RGB555].y_chroma_shift = 0;
++
++ /* gray / mono formats */
++ pix_fmt_info[PIX_FMT_GRAY8].name = g_strdup ("gray");
++ pix_fmt_info[PIX_FMT_GRAY8].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_GRAY8].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_GRAY8].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_GRAY8].depth = 8;
++
++ pix_fmt_info[PIX_FMT_MONOWHITE].name = g_strdup ("monow");
++ pix_fmt_info[PIX_FMT_MONOWHITE].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_MONOWHITE].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_MONOWHITE].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_MONOWHITE].depth = 1;
++
++ pix_fmt_info[PIX_FMT_MONOBLACK].name = g_strdup ("monob");
++ pix_fmt_info[PIX_FMT_MONOBLACK].nb_channels = 1;
++ pix_fmt_info[PIX_FMT_MONOBLACK].color_type = FF_COLOR_GRAY;
++ pix_fmt_info[PIX_FMT_MONOBLACK].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_MONOBLACK].depth = 1;
++
++ /* paletted formats */
++ pix_fmt_info[PIX_FMT_PAL8].name = g_strdup ("pal8");
++ pix_fmt_info[PIX_FMT_PAL8].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_PAL8].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_PAL8].color_type = FF_COLOR_RGB;
++ pix_fmt_info[PIX_FMT_PAL8].pixel_type = FF_PIXEL_PALETTE;
++ pix_fmt_info[PIX_FMT_PAL8].depth = 8;
++
++ pix_fmt_info[PIX_FMT_YUVA420P].name = g_strdup ("yuva420p");
++ pix_fmt_info[PIX_FMT_YUVA420P].nb_channels = 4;
++ pix_fmt_info[PIX_FMT_YUVA420P].is_alpha = 1;
++ pix_fmt_info[PIX_FMT_YUVA420P].color_type = FF_COLOR_YUV;
++ pix_fmt_info[PIX_FMT_YUVA420P].pixel_type = FF_PIXEL_PLANAR;
++ pix_fmt_info[PIX_FMT_YUVA420P].depth = 8,
++ pix_fmt_info[PIX_FMT_YUVA420P].x_chroma_shift = 1,
++ pix_fmt_info[PIX_FMT_YUVA420P].y_chroma_shift = 1;
++};
++
++int
++gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height)
++{
++ AVPicture dummy_pict;
++
++ return gst_ffmpeg_avpicture_fill (&dummy_pict, NULL, pix_fmt, width, height);
++}
++
++#define GEN_MASK(x) ((1<<(x))-1)
++#define ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
++#define ROUND_UP_2(x) ROUND_UP_X (x, 1)
++#define ROUND_UP_4(x) ROUND_UP_X (x, 2)
++#define ROUND_UP_8(x) ROUND_UP_X (x, 3)
++#define DIV_ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) >> (x))
++
++int
++gst_ffmpeg_avpicture_fill (AVPicture * picture,
++ uint8_t * ptr, enum PixelFormat pix_fmt, int width, int height)
++{
++ int size, w2, h2, size2;
++ int stride, stride2;
++ PixFmtInfo *pinfo;
++
++ pinfo = &pix_fmt_info[pix_fmt];
++
++ switch (pix_fmt) {
++ case PIX_FMT_YUV420P:
++ case PIX_FMT_YUV422P:
++ case PIX_FMT_YUV444P:
++ case PIX_FMT_YUV410P:
++ case PIX_FMT_YUV411P:
++ case PIX_FMT_YUVJ420P:
++ case PIX_FMT_YUVJ422P:
++ case PIX_FMT_YUVJ444P:
++ stride = ROUND_UP_4 (width);
++ h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size = stride * h2;
++ w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
++ stride2 = ROUND_UP_4 (w2);
++ h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size2 = stride2 * h2;
++ picture->data[0] = ptr;
++ picture->data[1] = picture->data[0] + size;
++ picture->data[2] = picture->data[1] + size2;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = stride2;
++ picture->linesize[2] = stride2;
++ picture->linesize[3] = 0;
++ GST_DEBUG ("planes %d %d %d", 0, size, size + size2);
++ GST_DEBUG ("strides %d %d %d", stride, stride2, stride2);
++ return size + 2 * size2;
++ case PIX_FMT_YUVA420P:
++ stride = ROUND_UP_4 (width);
++ h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size = stride * h2;
++ w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
++ stride2 = ROUND_UP_4 (w2);
++ h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
++ size2 = stride2 * h2;
++ picture->data[0] = ptr;
++ picture->data[1] = picture->data[0] + size;
++ picture->data[2] = picture->data[1] + size2;
++ picture->data[3] = picture->data[2] + size2;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = stride2;
++ picture->linesize[2] = stride2;
++ picture->linesize[3] = stride;
++ GST_DEBUG ("planes %d %d %d %d", 0, size, size + size2, size + 2 * size2);
++ GST_DEBUG ("strides %d %d %d %d", stride, stride2, stride2, stride);
++ return 2 * size + 2 * size2;
++ case PIX_FMT_RGB24:
++ case PIX_FMT_BGR24:
++ stride = ROUND_UP_4 (width * 3);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ /*case PIX_FMT_AYUV4444:
++ case PIX_FMT_BGR32:
++ case PIX_FMT_BGRA32:
++ case PIX_FMT_RGB32: */
++ case PIX_FMT_RGB32:
++ stride = width * 4;
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_RGB555:
++ case PIX_FMT_RGB565:
++ case PIX_FMT_YUYV422:
++ case PIX_FMT_UYVY422:
++ stride = ROUND_UP_4 (width * 2);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_UYYVYY411:
++ /* FIXME, probably not the right stride */
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = width + width / 2;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size + size / 2;
++ case PIX_FMT_GRAY8:
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_MONOWHITE:
++ case PIX_FMT_MONOBLACK:
++ stride = ROUND_UP_4 ((width + 7) >> 3);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 0;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size;
++ case PIX_FMT_PAL8:
++ /* already forced to be with stride, so same result as other function */
++ stride = ROUND_UP_4 (width);
++ size = stride * height;
++ picture->data[0] = ptr;
++ picture->data[1] = ptr + size; /* palette is stored here as 256 32 bit words */
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ picture->linesize[0] = stride;
++ picture->linesize[1] = 4;
++ picture->linesize[2] = 0;
++ picture->linesize[3] = 0;
++ return size + 256 * 4;
++ default:
++ picture->data[0] = NULL;
++ picture->data[1] = NULL;
++ picture->data[2] = NULL;
++ picture->data[3] = NULL;
++ return -1;
++ }
++
++ return 0;
++}
++
++/* Create a GstBuffer of the requested size and caps.
++ * The memory will be allocated by ffmpeg, making sure it's properly aligned
++ * for any processing. */
++
++GstBuffer *
++new_aligned_buffer (gint size, GstCaps * caps)
++{
++ GstBuffer *buf;
++
++ buf = gst_buffer_new ();
++ GST_BUFFER_DATA (buf) = GST_BUFFER_MALLOCDATA (buf) = av_malloc (size);
++ GST_BUFFER_SIZE (buf) = size;
++ GST_BUFFER_FREE_FUNC (buf) = av_free;
++ if (caps)
++ gst_buffer_set_caps (buf, caps);
++
++ return buf;
++}
++
++int
++gst_ffmpeg_auto_max_threads (void)
++{
++ static gsize n_threads = 0;
++ if (g_once_init_enter (&n_threads)) {
++ int n = 1;
++#if defined(_WIN32)
++ {
++ const char *s = getenv ("NUMBER_OF_PROCESSORS");
++ if (s) {
++ n = atoi (s);
++ }
++ }
++#elif defined(__APPLE__)
++ {
++ int mib[] = { CTL_HW, HW_NCPU };
++ size_t dataSize = sizeof (int);
++
++ if (sysctl (mib, 2, &n_threads, &dataSize, NULL, 0)) {
++ n = 1;
++ }
++ }
++#else
++ n = sysconf (_SC_NPROCESSORS_CONF);
++#endif
++ if (n < 1)
++ n = 1;
++
++ g_once_init_leave (&n_threads, n);
++ }
++
++ return (int) (n_threads);
++}
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h 2011-11-02 14:04:05.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h 2014-08-08 15:34:04.007874626 +0200
+@@ -23,6 +23,7 @@
+ #ifdef HAVE_FFMPEG_UNINSTALLED
+ #include <avcodec.h>
+ #else
++#include <libavutil/mathematics.h>
+ #include <libavcodec/avcodec.h>
+ #endif
+ #include <gst/gst.h>
+@@ -87,7 +88,7 @@
+ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
+
+ gint
+-av_smp_format_depth(enum SampleFormat smp_fmt);
++av_smp_format_depth(enum AVSampleFormat smp_fmt);
+
+ GstBuffer *
+ new_aligned_buffer (gint size, GstCaps * caps);
+diff -uNr gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig
+--- gst-ffmpeg-0.10.13.orig/ext/ffmpeg/gstffmpegutils.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gst-ffmpeg-0.10.13/ext/ffmpeg/gstffmpegutils.h.orig 2014-08-08 15:26:38.473858652 +0200
+@@ -0,0 +1,95 @@
++/* GStreamer
++ * Copyright (C) <2009> Edward Hervey <bilboed@bilboed.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., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifndef __GST_FFMPEG_UTILS_H__
++#define __GST_FFMPEG_UTILS_H__
++
++#ifdef HAVE_FFMPEG_UNINSTALLED
++#include <avcodec.h>
++#else
++#include <libavcodec/avcodec.h>
++#endif
++#include <gst/gst.h>
++
++/*
++ *Get the size of an picture
++ */
++int
++gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height);
++
++/*
++ * Fill in pointers in an AVPicture, aligned by 4 (required by X).
++ */
++
++int
++gst_ffmpeg_avpicture_fill (AVPicture * picture,
++ uint8_t * ptr,
++ enum PixelFormat pix_fmt,
++ int width,
++ int height);
++
++/*
++ * Convert from/to a GStreamer <-> FFMpeg timestamp.
++ */
++static inline guint64
++gst_ffmpeg_time_ff_to_gst (gint64 pts, AVRational base)
++{
++ guint64 out;
++
++ if (pts == AV_NOPTS_VALUE){
++ out = GST_CLOCK_TIME_NONE;
++ } else {
++ AVRational bq = { 1, GST_SECOND };
++ out = av_rescale_q (pts, base, bq);
++ }
++
++ return out;
++}
++
++static inline gint64
++gst_ffmpeg_time_gst_to_ff (guint64 time, AVRational base)
++{
++ gint64 out;
++
++ if (!GST_CLOCK_TIME_IS_VALID (time) || base.num == 0) {
++ out = AV_NOPTS_VALUE;
++ } else {
++ AVRational bq = { 1, GST_SECOND };
++ out = av_rescale_q (time, bq, base);
++ }
++
++ return out;
++}
++
++void
++gst_ffmpeg_init_pix_fmt_info(void);
++
++int
++gst_ffmpeg_auto_max_threads(void);
++
++G_CONST_RETURN gchar *
++gst_ffmpeg_get_codecid_longname (enum CodecID codec_id);
++
++gint
++av_smp_format_depth(enum AVSampleFormat smp_fmt);
++
++GstBuffer *
++new_aligned_buffer (gint size, GstCaps * caps);
++
++#endif /* __GST_FFMPEG_UTILS_H__ */
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
index a3b2f5cf29..219feaafc9 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
LICENSE_FLAGS = "commercial"
HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native"
+DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native libpostproc"
inherit autotools pkgconfig
@@ -36,6 +36,28 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
file://0001-alac-fix-nb_samples-order-case.patch \
file://0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch \
file://0001-roqvideodec-check-dimensions-validity.patch \
+ file://0001-aacdec-check-channel-count.patch \
+ file://0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch \
+ file://0001-error_concealment-Check-that-the-picture-is-not-in-a.patch \
+ file://0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch \
+ file://0001-vp3-Copy-all-3-frames-for-thread-updates.patch \
+ file://0001-h264_sei-Fix-infinite-loop.patch \
+ file://0001-avcodec-parser-reset-indexes-on-realloc-failure.patch \
+ file://0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch \
+ file://gst-ffmpeg-CVE-2013-0855.patch \
+ file://0001-qdm2dec-fix-buffer-overflow.patch \
+ file://0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch \
+ file://0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch \
+ file://0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch \
+ file://0001-error-concealment-initialize-block-index.patch \
+ file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \
+ file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \
+ file://0001-ffserver-set-oformat.patch \
+ file://0001-h264-set-parameters-from-SPS-whenever-it-changes.patch \
+ file://0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch \
+ file://0001-avcodec-smc-fix-off-by-1-error.patch \
+ file://0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch \
+ file://libav-9.patch \
"
SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb
index 47dbc3492b..1e2cd2a4ab 100644
--- a/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.31.bb
@@ -5,7 +5,10 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=259a43dd1c9854b71fc396f74699f4d2"
LICENSE_FLAGS = "commercial"
+GSTREAMER_DEBUG ?= "--disable-debug"
+EXTRA_OECONF += "${GSTREAMER_DEBUG} --with-gstreamer-api=0.10"
+
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-SRC_URI[md5sum] = "5d95a9a216dd15bc5c00c9414061115c"
-SRC_URI[sha256sum] = "30c79d24d8926f75dd4ef0f572942ce155ad541734b36a95591b9c0524dcc0f3"
+SRC_URI[md5sum] = "adf0390f3416bb72f91c358528be0c38"
+SRC_URI[sha256sum] = "dae0d0559a4e159c0dd92b7e18de059a5783f8d038904c7de4ca6393f7d55c7d"
diff --git a/meta/recipes-multimedia/gstreamer/gst-fluendo.inc b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
index c7e6595232..3cbb4652c7 100644
--- a/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-fluendo.inc
@@ -1,7 +1,7 @@
SUMMARY = "Fluendo closed-format GStreamer plug-in"
SECTION = "multimedia"
HOMEPAGE = "http://www.fluendo.com/resources/source-plugins.php"
-DEPENDS = "gstreamer zlib"
+DEPENDS = "gstreamer gst-plugins-base zlib"
inherit autotools pkgconfig
@@ -11,5 +11,4 @@ FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la ${libdir}/gstreamer-0.10/*.a"
-GSTREAMER_DEBUG ?= "--disable-debug"
-EXTRA_OECONF = "${GSTREAMER_DEBUG} --disable-valgrind"
+EXTRA_OECONF = "--disable-valgrind"
diff --git a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
index 518ab721af..039abe14fa 100644
--- a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb
@@ -1,6 +1,11 @@
SUMMARY = "GStreamer package groups"
LICENSE = "MIT"
-DEPENDS = "gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad"
+
+COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
+DEPENDS_UGLY="${@'gst-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS_BAD="${@'gst-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS = "gstreamer gst-plugins-base gst-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
+
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
index 2ecdcf25ce..0f64871497 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb
@@ -37,6 +37,7 @@ PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
PACKAGECONFIG[schro] = "--enable-schro,--disable-schro,schroedinger"
PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
ARM_INSTRUCTION_SET = "arm"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch
new file mode 100644
index 0000000000..52142562ab
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch
@@ -0,0 +1,37 @@
+audioresample: Fix build on x86 if emmintrin.h is available but can't be used
+
+On x86, EMMINTRIN is defined but not usable without SSE so check for
+__SSE__ and __SSE2__ as well.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=670690
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ gst/audioresample/resample.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
+index 98d006c..481fa01 100644
+--- a/gst/audioresample/resample.c
++++ b/gst/audioresample/resample.c
+@@ -77,13 +77,13 @@
+ #define EXPORT G_GNUC_INTERNAL
+
+ #ifdef _USE_SSE
+-#ifndef HAVE_XMMINTRIN_H
++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H)
+ #undef _USE_SSE
+ #endif
+ #endif
+
+ #ifdef _USE_SSE2
+-#ifndef HAVE_EMMINTRIN_H
++#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H)
+ #undef _USE_SSE2
+ #endif
+ #endif
+--
+1.7.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
index 4a8a9947a7..c8a949973d 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
DEPENDS += "alsa-lib liboil libogg libvorbis libtheora util-linux tremor glib-2.0-native"
SRC_URI += "file://gst-plugins-base-tremor.patch \
- file://configure.ac-fix-subparse-plugin.patch"
+ file://configure.ac-fix-subparse-plugin.patch \
+ file://audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch \
+"
SRC_URI[md5sum] = "776c73883e567f67b9c4a2847d8d041a"
SRC_URI[sha256sum] = "2cd3b0fa8e9b595db8f514ef7c2bdbcd639a0d63d154c00f8c9b609321f49976"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch b/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch
new file mode 100644
index 0000000000..48b8e98b81
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch
@@ -0,0 +1,47 @@
+From ce94b2c2b91b6db190c121860e12a6afafce7ae1 Mon Sep 17 00:00:00 2001
+From: Roland Krikava <rkrikava@gmail.com>
+Date: Fri, 2 Nov 2012 12:38:44 -0400
+Subject: [PATCH 407/440] mulawdec: fix integer overrun
+
+There might be more than 65535 samples in a chunk of data.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=687469
+
+Commit - 3be45f70220310ec1c60d819f90b5f2ae03b5d83 in 0.10 branch
+
+Upstream Status: Backported
+
+Signed-off-by: Roland Krikava <rkrikava@gmail.com>
+---
+ gst/law/mulaw-conversion.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gst/law/mulaw-conversion.c b/gst/law/mulaw-conversion.c
+index 8afae80..190a9f5 100644
+--- a/gst/law/mulaw-conversion.c
++++ b/gst/law/mulaw-conversion.c
+@@ -51,9 +51,10 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+ };
+- gint16 sign, exponent, mantissa, i;
++ gint16 sign, exponent, mantissa;
+ gint16 sample;
+ guint8 ulawbyte;
++ gint i;
+
+ for (i = 0; i < numsamples; i++) {
+ sample = in[i];
+@@ -102,7 +103,8 @@ mulaw_decode (guint8 * in, gint16 * out, gint numsamples)
+ static gint16 exp_lut[8] = { 0, 132, 396, 924, 1980, 4092, 8316, 16764 };
+ gint16 sign, exponent, mantissa;
+ guint8 ulawbyte;
+- gint16 linear, i;
++ gint16 linear;
++ gint i;
+
+ for (i = 0; i < numsamples; i++) {
+ ulawbyte = in[i];
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
index 88f90f3b85..495bb17649 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb
@@ -22,13 +22,14 @@ PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
PACKAGECONFIG[x11] = "--enable-x,--disable-x,virtual/libx11 libxfixes libxdamage"
DEPENDS += "gst-plugins-base gconf cairo libpng zlib libid3tag flac \
- speex libsoup-2.4"
+ speex libsoup-2.4 libcap"
inherit gettext gconf
-SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch"
-SRC_URI += "file://0001-v4l2_calls-define-V4L2_CID_HCENTER-and-V4L2_CID_VCEN.patch"
-
+SRC_URI += "file://0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch \
+ file://0001-v4l2_calls-define-V4L2_CID_HCENTER-and-V4L2_CID_VCEN.patch \
+ file://0407-mulawdec-fix-integer-overrun.patch \
+"
EXTRA_OECONF += "--disable-aalib --disable-esd --disable-shout2 --disable-libcaca --disable-hal \
--disable-examples --disable-taglib"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index 0503b34ea3..7bb567866f 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -50,6 +50,8 @@ ALLOW_EMPTY_${PN}-staticdev = "1"
PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
FILES_${PN}-apps = "${bindir}"
+RDEPENDS_${PN}-apps += "perl"
+
FILES_${PN} = "${datadir}/gstreamer-${LIBV}"
FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug"
FILES_${PN}-glib = "${datadir}/glib-2.0"
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins.inc b/meta/recipes-multimedia/gstreamer/gst-plugins.inc
index 26976092d6..c852c53fa9 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins.inc
@@ -19,10 +19,10 @@ require gst-plugins-package.inc
PACKAGES_DYNAMIC += "^${PN}-.*"
# apply gstreamer hack after Makefile.in.in in source is replaced by our version from
-# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed
+# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed
# http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html
-oe_runconf_prepend() {
+oe_runconf_prepend() {
if [ -e ${S}/po/Makefile.in.in ]; then
sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in
fi
-}
+}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch
new file mode 100644
index 0000000000..d07749682b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch
@@ -0,0 +1,32 @@
+From ed7f4802222234eef192aa3f74bc92268f338f97 Mon Sep 17 00:00:00 2001
+From: Sebastian Droege <sebastian.droege@collabora.co.uk>
+Date: Tue, 6 Mar 2012 12:28:02 +0100
+Subject: [PATCH] baseparse: Fix 'self-comparison always evaluates to true'
+
+This was really a bug.
+
+Commit is ed7f4802222234eef192aa3f74bc92268f338f97 in 0.10 branch
+
+Upstream Status: Backported
+
+Signed-off-by: Sebastian Droege <sebastian.droege@collabora.co.uk>
+---
+ libs/gst/base/gstbaseparse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
+index 851ec1d..108ee89 100644
+--- a/libs/gst/base/gstbaseparse.c
++++ b/libs/gst/base/gstbaseparse.c
+@@ -3899,7 +3899,7 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event)
+ seek event (in bytes) to upstream. Segment / flush handling happens
+ in corresponding src event handlers */
+ GST_DEBUG_OBJECT (parse, "seek in PUSH mode");
+- if (seekstop >= 0 && seekpos <= seekpos)
++ if (seekstop >= 0 && seekstop <= seekpos)
+ seekstop = seekpos;
+ new_event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+ GST_SEEK_TYPE_SET, seekpos, stop_type, seekstop);
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
index 350b528e94..11b1cfb08d 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
@@ -3,7 +3,7 @@ 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;md5=23a54f59b82572c203a559346e89ed57 \
+ file://gst-libs/ext/libav/LICENSE;md5=ea66e97a7ac1db978cf3529068a8c948 \
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 \
@@ -12,13 +12,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- "
-SRC_URI[md5sum] = "6454f9f22b3aa37694781633e0d20a9c"
-SRC_URI[sha256sum] = "2a69480d63fc2db93249d9e2e229ab3541bbc2db881b0f64de13d0bfc7d1f037"
+"
+SRC_URI[md5sum] = "f4922a46adbcbe7bd01331ff5dc7979d"
+SRC_URI[sha256sum] = "605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc"
+
LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
--ranlib='${RANLIB}' \
- ${GSTREAMER_1_0_DEBUG}"
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
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
index 5ce28ccbe7..bf1b87e6de 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -18,10 +18,12 @@ SRCREV = "127202d6f65584891dabf92be031f0d170b0e7f1"
LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
- ${GSTREAMER_1_0_DEBUG}"
+ ${GSTREAMER_1_0_DEBUG} \
+ --cross-prefix='${HOST_PREFIX}'"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
index a703d9b7a4..3ef10c3723 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -3,7 +3,10 @@ LICENSE = "MIT"
inherit packagegroup
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad"
+COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
+DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
PACKAGES = "\
gstreamer1.0-meta-base \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
index b76786bddb..d698904349 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -3,7 +3,7 @@ SECTION = "multimedia"
LICENSE = "LGPLv2.1"
LICENSE_FLAGS = "commercial"
HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
RDEPENDS_${PN} = "libomxil"
inherit autotools pkgconfig gettext
@@ -13,7 +13,7 @@ acpaths = "-I ${S}/common/m4 -I ${S}/m4"
PR = "r1"
GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
-GSTREAMER_1_0_OMX_CORE_NAME ?= "/usr/lib/libomxil-bellagio.so.0"
+GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}"
@@ -31,7 +31,7 @@ python __anonymous () {
}
set_omx_core_name() {
- sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}/etc/xdg/gstomx.conf"
+ 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 "
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
index f5956c66df..fe7c91cb30 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.0.0.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
-SRC_URI[md5sum] = "bb34b5742223267298bcffc209104a92"
-SRC_URI[sha256sum] = "7a1d8d28d70dacc6bd3c7ee7d7e40df6d5a1d38d7c256d5c9c5c8ef15c005014"
+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
index 11c77aeada..99c84668ef 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -2,21 +2,25 @@ DEFAULT_PREFERENCE = "-1"
include gstreamer1.0-omx.inc
-DEPENDS = "gstreamer1.0-plugins-bad"
-
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 \
- file://0001-omx-fixed-type-error-in-printf-call.patch \
+ 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 \
"
+
S = "${WORKDIR}/git"
-SRCREV = "a2db76b048db278ef0aa798e106b7594264e06c0"
+SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
+SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
+
+SRCREV_FORMAT = "gst-omx"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index ceb2de1917..9c15f2b1ed 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -2,25 +2,33 @@ require gstreamer1.0-plugins.inc
LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ "
-DEPENDS += "gstreamer1.0-plugins-base bzip2"
+DEPENDS += "gstreamer1.0-plugins-base bzip2 libpng jpeg"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
+SRC_URI += "file://configure-allow-to-disable-libssh2.patch \
+ "
+
inherit gettext
+# 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)}"
PACKAGECONFIG ??= " \
+ ${PACKAGECONFIG_GL} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglgles', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- orc curl uvch264 neon \
+ orc curl uvch264 neon sndfile \
hls sbc dash bz2 smoothstreaming \
"
+
# dash = Dynamic Adaptive Streaming over HTTP
PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass"
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[eglgles] = "--enable-eglgles,--disable-eglgles,virtual/egl virtual/libgles2"
+PACKAGECONFIG[gles2] = "--enable-gles2 --enable-egl,--disable-gles2 --disable-egl,virtual/libgles2 virtual/egl"
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
@@ -43,18 +51,27 @@ PACKAGECONFIG[schroedinger] = "--enable-schro,--disable-schro,schroedinger"
PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez4"
PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
+PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1"
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
+PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
# these plugins have not been ported to 1.0 (yet):
-# directdraw vcd apexsink cdaudio dc1394 lv2 linsys musepack mythtv
-# nas timidity teletextdec sdl sndfile xvid wininet acm gsettings
-# sndio cdxaparse dccp faceoverlay hdvparse ivfparse jp2kdecimator
-# linsys mve nuvdemux osx_video patchdetect quicktime real sdi stereo
-# tta videomeasure videosignal vmnc
+# directdraw vcd apexsink dc1394 lv2 linsys musepack mythtv
+# nas timidity teletextdec sdl xvid wininet acm gsettings
+# sndio qtwrapper cdxaparse dccp faceoverlay hdvparse tta
+# mve nuvdemux osx_video patchdetect quicktime real sdi
+# videomeasure gsettings
+
+# these plugins have no corresponding library in OE-core or meta-openembedded:
+# openni2 winks direct3d directdraw directsound winscreencap osx_video
+# apple_media android_media avc chromaprint daala dts gme gsm kate ladspa mimic
+# mpeg2enc mplex ofa openjpeg opensles pvr resindvd rtmp soundtouch spandsp spc
+# srtp vdpau voaacenc voamrwbenc wasapi zbar
EXTRA_OECONF += " \
--enable-dvb \
--enable-shm \
- --enable-mfc \
--enable-fbdev \
--enable-decklink \
--disable-acm \
@@ -62,13 +79,12 @@ EXTRA_OECONF += " \
--disable-apexsink \
--disable-apple_media \
--disable-avc \
- --disable-cdaudio \
--disable-chromaprint \
+ --disable-cocoa \
--disable-daala \
--disable-dc1394 \
--disable-direct3d \
--disable-directdraw \
- --disable-directshow \
--disable-directsound \
--disable-dts \
--disable-gme \
@@ -91,10 +107,8 @@ EXTRA_OECONF += " \
--disable-pvr \
--disable-quicktime \
--disable-resindvd \
- --disable-rtmp \
--disable-sdl \
--disable-sdltest \
- --disable-sndfile \
--disable-sndio \
--disable-soundtouch \
--disable-spandsp \
@@ -107,7 +121,6 @@ EXTRA_OECONF += " \
--disable-voaacenc \
--disable-voamrwbenc \
--disable-wasapi \
- --disable-webp \
--disable-wildmidi \
--disable-wininet \
--disable-winscreencap \
@@ -118,3 +131,5 @@ EXTRA_OECONF += " \
ARM_INSTRUCTION_SET = "arm"
+FILES_gstreamer1.0-plugins-bad-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
new file mode 100644
index 0000000000..042a32c04d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
@@ -0,0 +1,41 @@
+From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Wed, 27 Aug 2014 14:47:25 +0200
+Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in
+ configuration
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522]
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ configure.ac | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1a46afb..e85d4ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -661,10 +661,16 @@ case $host in
+ fi
+ ;;
+ *)
+- AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
+- AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
+- AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
+- AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++ if test "x$NEED_GL" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
++ AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
++ fi
++ if test "x$NEED_GLES2" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
++ fi
++ if test "x$NEED_EGL" != "xno"; then
++ AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++ fi
+
+ old_LIBS=$LIBS
+ old_CFLAGS=$CFLAGS
+--
+1.8.3.2
+
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
new file mode 100644
index 0000000000..d52afd5d57
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
@@ -0,0 +1,64 @@
+From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 18 Sep 2014 02:24:07 -0400
+Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2
+
+libssh2 is automatically linked to if present, this undetermined
+dependency may cause build errors like:
+
+ .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2
+
+libssh2 isn't an oe-core recipe, so allow to disable it from
+configure.
+
+Upstream-Status: Pending
+
+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, [
+ ])
+
+ dnl *** Curl ***
++AC_ARG_ENABLE([libssh2],
++ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@],
++ [case "${enableval}" in
++ yes) NEED_SSH2=yes ;;
++ no) NEED_SSH2=no ;;
++ auto) NEED_SSH2=auto ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;;
++ esac],[NEED_SSH2=auto])
++
+ 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, [
+ ])
+ AC_SUBST(CURL_CFLAGS)
+ AC_SUBST(CURL_LIBS)
+- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
+- HAVE_SSH2="yes"
+- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
+- ], [
+- HAVE_SSH2="no"
+- ])
++ if test "x$NEED_SSH2" != "xno"; then
++ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
++ HAVE_SSH2="yes"
++ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
++ ], [
++ HAVE_SSH2="no"
++ ])
++ fi
+ 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_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
index c57c98f2af..59065de811 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
@@ -4,7 +4,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \
file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
-SRC_URI[md5sum] = "16c2050716383926909664aa6c6aca2b"
-SRC_URI[sha256sum] = "984c133ec9d5d705e313d9e2bbd1472b93c6567460602a9a316578925ffe2eca"
+
+SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch"
+
+SRC_URI[md5sum] = "e0bb39412cf4a48fe0397bcf3a7cd451"
+SRC_URI[sha256sum] = "152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c"
+
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
index e1a5904abf..75859f9a89 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -19,8 +19,9 @@ EXTRA_OECONF += " \
-disable-openjpeg \
"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
new file mode 100644
index 0000000000..0407a30f90
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
@@ -0,0 +1,37 @@
+From b608d027fff6efc2d1988ebf169cbe3b2b44a61b Mon Sep 17 00:00:00 2001
+From: zhouming <b42586@freescale.com>
+Date: Thu, 8 May 2014 12:01:17 +0800
+Subject: [PATCH] ENGR00312034: do not change eos event to gap event if no
+ data has passed to streamsynchronizer.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=727074
+
+Upstream Status: Pending
+
+Signed-off-by: zhouming <b42586@freescale.com>
+---
+ gst/playback/gststreamsynchronizer.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
+index 3997d1b..3e17c55 100644
+--- a/gst/playback/gststreamsynchronizer.c
++++ b/gst/playback/gststreamsynchronizer.c
+@@ -488,12 +488,11 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
+ }
+ g_slist_free (pads);
+ } else {
+- /* if EOS, but no data has passed, then send something to replace EOS
+- * for preroll purposes */
++ /* if EOS, but no data has passed, then send EOS event */
+ if (!seen_data) {
+ GstEvent *gap_event;
+
+- gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
++ gap_event = gst_event_new_eos ();
+ ret = gst_pad_push_event (srcpad, gap_event);
+ } else {
+ GstEvent *gap_event;
+--
+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
new file mode 100644
index 0000000000..0fc561c012
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -0,0 +1,44 @@
+From af0dac26f62aaceb4bf266720911953793e0fc5d 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
+
+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 +++++++++++++
+ 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
+--- a/gst-libs/gst/tag/gsttagdemux.c
++++ b/gst-libs/gst/tag/gsttagdemux.c
+@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+ }
+ break;
+ }
++ case GST_QUERY_CAPS:
++ {
++
++ /* We can hijack caps query if we typefind already */
++ if (demux->priv->src_caps) {
++ gst_query_set_caps_result (query, demux->priv->src_caps);
++ res = TRUE;
++ } else {
++ res = gst_pad_query_default (pad, parent, query);
++ }
++ break;
++ }
++
+ 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/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
new file mode 100644
index 0000000000..51fdc7e177
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
@@ -0,0 +1,57 @@
+From 68fa1b1425ad2c5f7c5013d0943153a8a6d0934e Mon Sep 17 00:00:00 2001
+From: Jian Li <lj.qfy.sh@gmail.com>
+Date: Wed, 24 Sep 2014 17:21:02 +0800
+Subject: [PATCH] taglist not send to down stream if all the frame corrupted
+
+https://bugzilla.gnome.org/show_bug.cgi?id=737246
+
+Upstream status: Pending
+
+Signed-off-by: Jian Li <lj.qfy.sh@gmail.com>
+---
+ gst-libs/gst/audio/gstaudiodecoder.c | 9 +++++++++
+ gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
+index 3504678..3d69efe 100644
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
++++ b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2083,6 +2083,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
+ gst_audio_decoder_drain (dec);
+ GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+
++ /* send taglist if no valid frame is decoded util EOS */
++ if (dec->priv->taglist && dec->priv->taglist_changed) {
++ GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist);
++ if (!gst_tag_list_is_empty (dec->priv->taglist))
++ gst_audio_decoder_push_event (dec,
++ gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
++ dec->priv->taglist_changed = FALSE;
++ }
++
+ /* Forward EOS because no buffer or serialized event will come after
+ * EOS and nothing could trigger another _finish_frame() call. */
+ ret = gst_audio_decoder_push_event (dec, event);
+diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
+index dd8abe3..d9bfe4d 100644
+--- a/gst-libs/gst/video/gstvideodecoder.c
++++ b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1024,6 +1024,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
+ * parent class' ::sink_event() until a later time.
+ */
+ forward_immediate = TRUE;
++
++ /* send taglist if no valid frame is decoded util EOS */
++ if (decoder->priv->tags && decoder->priv->tags_changed) {
++ gst_video_decoder_push_event (decoder,
++ gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
++ decoder->priv->tags_changed = FALSE;
++ }
++
+ break;
+ }
+ case GST_EVENT_GAP:
+--
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index ed8babe2a0..11cf8b4fde 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -4,6 +4,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
"
-SRC_URI[md5sum] = "278e0a1872ecb981e91830b2cb7f3e98"
-SRC_URI[sha256sum] = "4d6273dc3f5a94bcc53ccfe0711cfddd49e31371d1136bf62fa1ecc604fc6550"
+
+SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
+"
+
+SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e"
+SRC_URI[sha256sum] = "77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d"
+
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
index a894abe501..fbe3a42cd7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -11,8 +11,9 @@ S = "${WORKDIR}/git"
SRCREV = "8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
index b73bcd06e7..b33ab2b705 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -3,7 +3,7 @@ require gstreamer1.0-plugins.inc
LICENSE = "GPLv2+ & LGPLv2.1+"
# libid3tag
-DEPENDS += "gstreamer1.0-plugins-base zlib bzip2"
+DEPENDS += "gstreamer1.0-plugins-base zlib bzip2 libcap"
inherit gettext
@@ -11,17 +11,18 @@ inherit gettext
PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
- orc cairo flac gdk-pixbuf jpeg libpng soup speex taglib \
+ orc cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
-X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
-X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
+X11ENABLEOPTS = "--enable-x --enable-xshm"
+X11DISABLEOPTS = "--disable-x --disable-xshm"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo"
PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac"
PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
+PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,udev"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
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
new file mode 100755
index 0000000000..53147df42b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
@@ -0,0 +1,62 @@
+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
+@@ -390,6 +390,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);
+
+@@ -400,7 +401,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");
+@@ -426,6 +426,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/decrease_asteriskh263_rank.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
new file mode 100755
index 0000000000..7f94f50760
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
@@ -0,0 +1,25 @@
+commit d71d74daac8ed54156ed103958ab455c63c72b0e
+Author: Song Bing <b06498@freescale.com>
+Date: Mon Nov 10 11:25:47 2014 +0800
+
+[asteriskh263] decrease the rank as we havn't this kind of decoder.
+
+Decrease the rank as we havn't this kind of decoder.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=739935
+
+Upstream Status: Pending
+
+Signed-off-by: Song Bing <b06498@freescale.com>
+
+diff --git a/gst/rtp/gstasteriskh263.c b/gst/rtp/gstasteriskh263.c
+index a01fbc8..8fa3194 100644
+--- a/gst/rtp/gstasteriskh263.c
++++ b/gst/rtp/gstasteriskh263.c
+@@ -226,5 +226,5 @@ gboolean
+ gst_asteriskh263_plugin_init (GstPlugin * plugin)
+ {
+ return gst_element_register (plugin, "asteriskh263",
+- GST_RANK_SECONDARY, GST_TYPE_ASTERISK_H263);
++ GST_RANK_SECONDARY - 1, GST_TYPE_ASTERISK_H263);
+ }
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
index 93813a06ec..943ab60397 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
@@ -3,7 +3,11 @@ 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[md5sum] = "8aac024ee0cd98b67a3066ad31d8c677"
-SRC_URI[sha256sum] = "c9c90368393c2e5e78387e95c02ce7b19f48e793bba6d8547f2c4b51c6f420d3"
-S = "${WORKDIR}/gst-plugins-good-${PV}"
+SRC_URI += "file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+ file://decrease_asteriskh263_rank.patch \
+"
+SRC_URI[md5sum] = "eaf1a6daf73749bc423feac301d60038"
+SRC_URI[sha256sum] = "79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641"
+
+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
index 8b11b20b1b..2c0e0efe68 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -10,8 +10,9 @@ S = "${WORKDIR}/git"
SRCREV = "fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
index dd5cb4e817..25cb28c060 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
@@ -2,7 +2,9 @@ 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[md5sum] = "c87a27db498bb736f6c266198657ea74"
-SRC_URI[sha256sum] = "4ef6f76a47d57b8385d457c7b620b4c28fc041ab1d7c2e3e2f5f05b12b988ea8"
+
+SRC_URI[md5sum] = "6954beed7bb9a93e426dee543ff46393"
+SRC_URI[sha256sum] = "5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067"
+
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
index 2f72497363..dcf5ffc3c1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -9,8 +9,9 @@ S = "${WORKDIR}/git"
SRCREV = "06b8ac10cee85c5c304ca320997aa8f44295a66f"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb
deleted file mode 100644
index 78d35f349c..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.2.3.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "239f805e755deb388162e957fcffff1d"
-SRC_URI[sha256sum] = "c12befa5ec63818842c150725d3e9e38bf9948366317b67dc2536dfd00765da1"
-
-
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
new file mode 100644
index 0000000000..bb9b42b53f
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
@@ -0,0 +1,6 @@
+include gstreamer1.0-rtsp-server.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+SRC_URI[md5sum] = "a9f9b8899ec7ab33663cda7627db40d3"
+SRC_URI[sha256sum] = "3089254bd31b7c1f1cf2c034a3b3551f92878f9e3cab65cef3a901a04c0f1d37"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
index 1204dd5fa3..94be84618e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.2.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
@@ -6,8 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
SRC_URI = " \
http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
file://0001-Fix-crash-with-gst-inspect.patch \
- "
-SRC_URI[md5sum] = "74d8f674187a5f0ddf38da594c3998c3"
-SRC_URI[sha256sum] = "1e7ca67a7870a82c9ed51d51d0008cdbc550c41d64cc3ff3f9a1c2fc311b4929"
+"
+SRC_URI[md5sum] = "88a9289c64a4950ebb4f544980234289"
+SRC_URI[sha256sum] = "40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae"
+
S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index 424c90a9e8..cb00d319a7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -10,8 +10,9 @@ S = "${WORKDIR}/git"
SRCREV = "3b8181a8c550e74acaba4e8c55bdc649fa551dc9"
-do_configure() {
+do_configure_prepend() {
+ cd ${S}
./autogen.sh --noconfigure
- oe_runconf
+ cd ${B}
}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb b/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
index 99eee81761..f08908a216 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb
@@ -13,7 +13,9 @@ PR = "r2"
SRC_URI = "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.bz2 \
file://check_fix.patch \
- file://gst-inspect-check-error.patch"
+ file://gst-inspect-check-error.patch \
+ file://0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch \
+"
SRC_URI[md5sum] = "a0cf7d6877f694a1a2ad2b4d1ecb890b"
SRC_URI[sha256sum] = "e556a529e0a8cf1cd0afd0cab2af5488c9524e7c3f409de29b5d82bb41ae7a30"
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index 1d617a2482..21c29fc5a7 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -10,6 +10,13 @@ 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 = "http://libav.org/releases/${BP}.tar.xz"
+
# Provides ffmpeg compat, see http://libav.org/about.html
PROVIDES = "ffmpeg"
@@ -60,8 +67,6 @@ EXTRA_OECONF = " \
--enable-avserver \
--enable-avplay \
--ld="${CCLD}" \
- --enable-libtheora \
- --enable-libvorbis \
--arch=${TARGET_ARCH} \
--target-os="linux" \
--enable-cross-compile \
@@ -87,10 +92,8 @@ do_install_append() {
install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
}
-FFMPEG_LIBS = "libavcodec libavdevice libavformat \
- libavutil libpostproc libswscale libavfilter"
-
PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
RSUGGESTS_${PN} = "mplayer"
FILES_${PN} = "${bindir}"
@@ -142,5 +145,3 @@ python populate_packages_prepend() {
for pkg in pkgs:
d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
}
-
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc|swscale).*"
diff --git a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
deleted file mode 100644
index d9b22b9b6a..0000000000
--- a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-Date: Thu, 10 Jan 2013 12:42:19 +0100
-Subject: [PATCH] configure: enable pic for AArch64
-
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-Status: Backport
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- git.orig/configure
-+++ git/configure
-@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
- check_host_cflags -Wall
-
- case "$arch" in
-- alpha|ia64|mips|parisc|ppc|sparc)
-+ alpha|ia64|mips|parisc|ppc|sparc|aarch64)
- spic=$shared
- ;;
- x86)
diff --git a/meta/recipes-multimedia/libav/libav_0.8.11.bb b/meta/recipes-multimedia/libav/libav_0.8.11.bb
deleted file mode 100644
index 662d205fee..0000000000
--- a/meta/recipes-multimedia/libav/libav_0.8.11.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require libav.inc
-
-SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
- file://0001-configure-enable-pic-for-AArch64.patch"
-
-SRC_URI[md5sum] = "cdc9b53c56a375baf73ea38cf7ade4f9"
-SRC_URI[sha256sum] = "5934e4f0dbf6e0fc4987de86cdd079f1d11a1410ae275e9f46472af17f05155a"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-PROVIDES += "libpostproc"
-
-EXTRA_OECONF += " \
- --enable-postproc \
-"
diff --git a/meta/recipes-multimedia/libav/libav_9.13.bb b/meta/recipes-multimedia/libav/libav_9.13.bb
deleted file mode 100644
index 7bfbc48ba7..0000000000
--- a/meta/recipes-multimedia/libav/libav_9.13.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require libav.inc
-
-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 = "http://libav.org/releases/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "23b9e34bffdaee366710fdf20157a570"
-SRC_URI[sha256sum] = "2ff05df6cd2259b3bb277eb16c234214f8e0530700d0c774d033eba23edde6ca"
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-multimedia/libav/libav_9.16.bb b/meta/recipes-multimedia/libav/libav_9.16.bb
new file mode 100644
index 0000000000..79ff3f84d1
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_9.16.bb
@@ -0,0 +1,4 @@
+require libav.inc
+
+SRC_URI[md5sum] = "7b44b75cec24b8e7545e5029e76917e0"
+SRC_URI[sha256sum] = "ca846473b0b8ed8e3404c52e5e92df6d35cb5fa487eec498525de3ffda4367a0"
diff --git a/meta/recipes-multimedia/libav/libpostproc_git.bb b/meta/recipes-multimedia/libav/libpostproc_git.bb
new file mode 100644
index 0000000000..88891db09b
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libpostproc_git.bb
@@ -0,0 +1,46 @@
+SUMMARY = "FFmpeg derived postprocessing library"
+HOMEPAGE = "http://git.videolan.org/?p=libpostproc.git;a=summary"
+SECTION = "libs"
+DEPENDS = "libav"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# because it depends on libav which has commercial flag
+LICENSE_FLAGS = "commercial"
+
+PV = "52.3.0+git${SRCPV}"
+
+SRCREV = "811db3b957dfde24aef2d0f82e297e5bf552d873"
+SRC_URI = "git://github.com/lu-zero/postproc;protocol=https"
+
+S = "${WORKDIR}/git"
+
+inherit autotools lib_package pkgconfig
+
+FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
+EXTRA_FFCONF ?= ""
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --enable-pthreads \
+ --enable-gpl \
+ --enable-postproc \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ --prefix=${prefix} \
+ \
+ --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}" \
+ ${EXTRA_FFCONF} \
+"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch b/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
index 8a04b54efd..2845fb1d3a 100644
--- a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
+++ b/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch
@@ -6,7 +6,8 @@ diff -Nurd libid3tag-0.15.1b/configure.ac libid3tag-0.15.1b/configure.ac
+++ libid3tag-0.15.1b/configure.ac 2013-01-03 06:41:02.734835014 +0200
@@ -28,7 +28,7 @@
- AM_INIT_AUTOMAKE
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch b/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
new file mode 100644
index 0000000000..3e544248d9
--- /dev/null
+++ b/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
@@ -0,0 +1,12 @@
+Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index e602fd3..e075b86 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
index 58d68a639b..30937ebe68 100644
--- a/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ b/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libmad-${PV}.tar.gz \
file://add-pkgconfig.patch \
file://fix_for_mips_with_gcc-4.5.0.patch \
file://obsolete_automake_macros.patch \
+ file://automake-foreign.patch \
"
SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
diff --git a/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch b/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
new file mode 100644
index 0000000000..f408e4a621
--- /dev/null
+++ b/meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch
@@ -0,0 +1,36 @@
+Disable so versioning since they are really not a versioned shared lib.
+
+Upstream-Status: Submitted @ https://sourceforge.net/p/omxil/bugs/59/
+
+Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am 2014-07-20 15:25:42.687525225 -0400
+@@ -10,4 +10,5 @@
+ libomxaudio_effects_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
++libomxaudio_effects_la_LDFLAGS = -avoid-version
+
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am 2014-07-20 15:22:00.858425234 -0400
++++ libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am 2014-07-20 15:24:49.151259753 -0400
+@@ -10,4 +10,4 @@
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
+-
++libomxclocksrc_la_LDFLAGS = -avoid-version
+diff -rub libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am
+--- libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:00.862425254 -0400
++++ libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:36.462601786 -0400
+@@ -6,7 +6,7 @@
+ library_entry_point.c
+
+ libomxvideosched_la_LIBADD = $(top_builddir)/src/libomxil-bellagio.la
+-libomxvideosched_la_LDFLAGS =
++libomxvideosched_la_LDFLAGS = -avoid-version
+ libomxvideosched_la_CFLAGS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/base
diff --git a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
index 103d789482..40d6df8b6a 100644
--- a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
+++ b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
@@ -12,7 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/omxil/libomxil-bellagio-${PV}.tar.gz \
file://configure-fix.patch \
file://parallel-make.patch \
file://makefile-docdir-fix.patch \
- file://dynamicloader-linking.patch"
+ file://dynamicloader-linking.patch \
+ file://disable-so-versioning.patch"
SRC_URI[md5sum] = "a1de827fdb75c02c84e55f740ca27cb8"
SRC_URI[sha256sum] = "593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c"
@@ -23,12 +24,15 @@ inherit autotools
EXTRA_OECONF += "--disable-doc --disable-Werror"
-FILES_${PN} += "${libdir}/bellagio/*${SOLIBS} \
+#
+# The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
+# Make sure they get packaged in the main package.
+#
+FILES_${PN} += "${libdir}/bellagio/*.so \
${libdir}/omxloaders/*${SOLIBS}"
FILES_${PN}-staticdev += "${libdir}/bellagio/*.a \
${libdir}/omxloaders/*.a"
FILES_${PN}-dev += "${libdir}/bellagio/*.la \
- ${libdir}/bellagio/*${SOLIBSDEV} \
${libdir}/omxloaders/*.la \
${libdir}/omxloaders/*${SOLIBSDEV}"
FILES_${PN}-dbg += "${libdir}/bellagio/.debug/ \
diff --git a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch b/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch
deleted file mode 100644
index bbbca89e8f..0000000000
--- a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From fff7cbc01e061a235852f385866fe75fb17867e3 Mon Sep 17 00:00:00 2001
-From: Valentin Popa <valentin.popa@intel.com>
-Date: Tue, 26 Nov 2013 12:06:55 +0200
-Subject: [PATCH] configure: lower automake requirement
-
-We're not using parallel tests in OE-core yet
-
-Signed-off-by: Valentin Popa <valentin.popa@intel.com>
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
-Upstream-Status: Inapropriate [OE specific build hack]
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 28200c3..fab2515 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,7 +27,7 @@ AC_CONFIG_MACRO_DIR([scripts])
- # dist-xz requires automake 1.11 or later
- # 1.12.2 fixes a security issue in 1.11.2 and 1.12.1
- # 1.13 is required for parallel tests
--AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules subdir-objects])
-+AM_INIT_AUTOMAKE([1.12.2 foreign dist-xz color-tests silent-rules subdir-objects])
- # The following line causes --disable-maintainer-mode to be the default to
- # configure, this is necessary because libpng distributions cannot rely on the
- # time stamps of the autotools generated files being correct
---
-1.8.3.2
-
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb b/meta/recipes-multimedia/libpng/libpng_1.6.10.bb
deleted file mode 100644
index babf87e392..0000000000
--- a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cb7a834ba2891bc30b8577e49963a435 \
- file://png.h;endline=15;md5=853b11c4a19ec66decd641efd756bc2c \
- file://png.h;beginline=209;endline=323;md5=cface34a7db6b71eaa828fe934951f81"
-DEPENDS = "zlib"
-LIBV = "16"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \
- file://0001-configure-lower-automake-requirement.patch \
- "
-
-SRC_URI[md5sum] = "5f414b20f683b1d96b163c89e3eff768"
-SRC_URI[sha256sum] = "4003f0fd0e36110a2b742fc5b9e1ab93ed7a7ab57ae8dc65f0e8101458775a56"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_arm = " ${@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"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.16.bb b/meta/recipes-multimedia/libpng/libpng_1.6.16.bb
new file mode 100644
index 0000000000..a8677e8a37
--- /dev/null
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.16.bb
@@ -0,0 +1,28 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76dbddb73e547d9b3fa16909a98049c0 \
+ file://png.h;endline=15;md5=fd8f7ae7b090a168a9e023d0a5d68a3e \
+ file://png.h;beginline=229;endline=343;md5=44075eedf4763ada355d8f60ac3296c9"
+DEPENDS = "zlib"
+LIBV = "16"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "23b7286b5d4a86de950fd2ffc5cac742"
+SRC_URI[sha256sum] = "42f754df633e4e700544e5913cbe2fd4928bbfccdc07708a5cf84e59827fbe60"
+
+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"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch
new file mode 100644
index 0000000000..fc4adb59d8
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch
@@ -0,0 +1,786 @@
+libtiff: fix CVE-2013-1961.
+
+Upstream-Status: Backported
+
+Issue Description: CVE-2013-1961
+Stack-based buffer overflow in the t2p_write_pdf_page function in tiff2pdf
+in libtiff before 4.0.3 allows remote attackers to cause a denial of service
+(application crash) via a crafted image length and resolution in a TIFF image file.
+
+Fix Description: Replace sprintf with snprintf
+
+Signed-off-by: Priyanka Shobhan <priyanka_shobhan@mentor.com>
+---
+
+diff --git a/contrib/dbs/xtiff/xtiff.c b/contrib/dbs/xtiff/xtiff.c
+index 2634030..97e4ffe 100644
+--- a/contrib/dbs/xtiff/xtiff.c
++++ b/contrib/dbs/xtiff/xtiff.c
+@@ -512,9 +512,9 @@ SetNameLabel()
+ Arg args[1];
+
+ if (tfMultiPage)
+- sprintf(buffer, "%s - page %d", fileName, tfDirectory);
++ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
+ else
+- strcpy(buffer, fileName);
++ snprintf(buffer, sizeof(buffer), "%s", fileName);
+ XtSetArg(args[0], XtNlabel, buffer);
+ XtSetValues(labelWidget, args, 1);
+ }
+diff --git a/libtiff/tif_codec.c b/libtiff/tif_codec.c
+index e201667..703e87d 100644
+--- a/libtiff/tif_codec.c
++++ b/libtiff/tif_codec.c
+@@ -108,7 +108,8 @@ _notConfigured(TIFF* tif)
+ const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
+ char compression_code[20];
+
+- sprintf( compression_code, "%d", tif->tif_dir.td_compression );
++ snprintf(compression_code, sizeof(compression_code), "%d",
++ tif->tif_dir.td_compression );
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "%s compression support is not configured",
+ c ? c->name : compression_code );
+diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
+index d319931..4dae5e5 100644
+--- a/libtiff/tif_dirinfo.c
++++ b/libtiff/tif_dirinfo.c
+@@ -711,7 +711,7 @@ _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type)
+ * note that this name is a special sign to TIFFClose() and
+ * _TIFFSetupFields() to free the field
+ */
+- sprintf(fld->field_name, "Tag %d", (int) tag);
++ snprintf(fld->field_name, 32, "Tag %d", (int) tag);
+
+ return fld;
+ }
+diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c
+index 162aac1..a3eeb03 100644
+--- a/tools/rgb2ycbcr.c
++++ b/tools/rgb2ycbcr.c
+@@ -332,7 +332,8 @@ tiffcvt(TIFF* in, TIFF* out)
+ TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+ { char buf[2048];
+ char *cp = strrchr(TIFFFileName(in), '/');
+- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
++ snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
++ cp ? cp+1 : TIFFFileName(in));
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
+ }
+ TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
+diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c
+index bda754a..7ffaca0 100644
+--- a/tools/tiff2bw.c
++++ b/tools/tiff2bw.c
+@@ -205,7 +205,7 @@ main(int argc, char* argv[])
+ }
+ }
+ TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+- sprintf(thing, "B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
+ outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 356328c..957fd9f 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -3609,7 +3609,9 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
+ char buffer[16];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
++ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
++ t2p->pdf_majorversion&0xff,
++ t2p->pdf_minorversion&0xff);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
+
+@@ -3623,10 +3625,10 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen );
+ written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
+
+@@ -3665,13 +3667,13 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "/", 1);
+ for (i=0;i<namelen;i++){
+ if ( ((unsigned char)name[i]) < 0x21){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+ }
+ if ( ((unsigned char)name[i]) > 0x7E){
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ nextchar=1;
+@@ -3679,57 +3681,57 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
+ if (nextchar==0){
+ switch (name[i]){
+ case 0x23:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x25:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x28:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x29:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x2F:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3C:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x3E:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x5D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7B:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+ case 0x7D:
+- sprintf(buffer, "#%.2X", name[i]);
++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
+ buffer[sizeof(buffer) - 1] = '\0';
+ written += t2pWriteFile(output, (tdata_t) buffer, 3);
+ break;
+@@ -3844,14 +3846,14 @@ tsize_t t2p_write_pdf_stream_end(TIFF* output){
+ tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
+ if(len!=0){
+ written += t2p_write_pdf_stream_length(len, output);
+ } else {
+- buflen=sprintf(buffer, "%lu", (unsigned long)number);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ }
+@@ -3892,10 +3894,10 @@ tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){
+ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+- buflen=sprintf(buffer, "%lu", (unsigned long)len);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+
+@@ -3909,7 +3911,7 @@ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
+ tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
+ {
+ tsize_t written = 0;
+- char buffer[16];
++ char buffer[32];
+ int buflen = 0;
+
+ written += t2pWriteFile(output,
+@@ -3948,7 +3950,6 @@ tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output)
+ written += t2p_write_pdf_string(t2p->pdf_datetime, output);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
+- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
+ written += t2p_write_pdf_string(buffer, output);
+ written += t2pWriteFile(output, (tdata_t) "\n", 1);
+@@ -4089,7 +4090,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ {
+ tsize_t written=0;
+ tdir_t i=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ int page=0;
+@@ -4097,7 +4098,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
+ page = t2p->pdf_pages+1;
+ for (i=0;i<t2p->tiff_pagecount;i++){
+- buflen=sprintf(buffer, "%d", page);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", page);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ if ( ((i+1)%8)==0 ) {
+@@ -4112,8 +4113,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
++ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
+
+@@ -4128,28 +4128,28 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+
+ unsigned int i=0;
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[256];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "] \n", 3);
+ written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
+ written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
+@@ -4157,15 +4157,13 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen = sprintf(buffer, "%u", i+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4177,12 +4175,10 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
+ written += t2pWriteFile(output, (tdata_t) "/Im", 3);
+- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4191,9 +4187,7 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
+ if(t2p->tiff_transferfunctioncount != 0) {
+ written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
+ t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
+- buflen = sprintf(
+- buffer,
+- "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(object + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4566,7 +4560,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
+ if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){
+ for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
+ box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4581,7 +4575,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
+ }
+ } else {
+ box=t2p->pdf_imagebox;
+- buflen=sprintf(buffer,
++ buflen=snprintf(buffer, sizeof(buffer),
+ "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n",
+ t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
+ box.mat[0],
+@@ -4606,59 +4600,48 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
+ TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
+ written += t2pWriteFile(output,
+ (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im",
+ 42);
+- buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ if(tile != 0){
+ written += t2pWriteFile(output, (tdata_t) "_", 1);
+- buflen=sprintf(buffer, "%lu", (unsigned long)tile);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+ if(tile==0){
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
+ } else {
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ } else {
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ }
+ }
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
+- _TIFFmemset((tdata_t)buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+@@ -4702,11 +4685,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ t2p->pdf_colorspace ^= T2P_CS_PALETTE;
+ written += t2p_write_pdf_xobject_cs(t2p, output);
+ t2p->pdf_colorspace |= T2P_CS_PALETTE;
+- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
++ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " ", 1);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs );
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs );
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
+ return(written);
+@@ -4740,10 +4722,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ X_W /= Y_W;
+ Z_W /= Y_W;
+ Y_W = 1.0F;
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
+- buflen=sprintf(buffer, "[%d %d %d %d] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n",
+ t2p->pdf_labrange[0],
+ t2p->pdf_labrange[1],
+ t2p->pdf_labrange[2],
+@@ -4759,26 +4741,26 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
+ if(t2p->tiff_transferfunctioncount == 1){
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "[ ", 2);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 2));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)(t2p->pdf_xrefcount + 3));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
+@@ -4800,7 +4782,7 @@ tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){
+ written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
+ written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
+ written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
+- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
++ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
+ written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
+@@ -4827,7 +4809,7 @@ tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){
+ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[128];
++ char buffer[256];
+ int buflen=0;
+
+ float X_W=0.0;
+@@ -4895,16 +4877,16 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+ written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
+ if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
+ }
+ if(t2p->pdf_colorspace & T2P_CS_CALRGB){
+ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
+- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
+ X_R, Y_R, Z_R,
+ X_G, Y_G, Z_G,
+ X_B, Y_B, Z_B);
+@@ -4923,11 +4905,11 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
+
+@@ -4937,11 +4919,11 @@ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ written += t2pWriteFile(output, (tdata_t) "/N ", 3);
+- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
+ t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
+@@ -5006,7 +4988,7 @@ tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
+ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[16];
++ char buffer[32];
+ int buflen=0;
+
+ if(t2p->pdf_compression==T2P_COMPRESS_NONE){
+@@ -5021,41 +5003,33 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
+ if(tile==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(buffer, "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_length);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ } else {
+ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
+- buflen=sprintf(
+- buffer,
+- "%lu",
++ buflen=snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ }
+@@ -5082,21 +5056,17 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ if(t2p->pdf_compressionquality%100){
+ written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
+ written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen = sprintf(buffer, "%lu",
++ buflen = snprintf(buffer, sizeof(buffer), "%lu",
+ (unsigned long)t2p->tiff_width);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
+- _TIFFmemset(buffer, 0x00, 16);
+- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
+ }
+@@ -5116,16 +5086,16 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
+ tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
+
+ tsize_t written=0;
+- char buffer[21];
++ char buffer[64];
+ int buflen=0;
+ uint32 i=0;
+
+ written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+ written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
+ for (i=0;i<t2p->pdf_xrefcount;i++){
+- sprintf(buffer, "%.10lu 00000 n \n",
++ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
+ (unsigned long)t2p->pdf_xrefoffsets[i]);
+ written += t2pWriteFile(output, (tdata_t) buffer, 20);
+ }
+@@ -5149,17 +5119,14 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
+ snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
+
+ written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
+- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
++ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+@@ -5167,9 +5134,8 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
+ written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
+ sizeof(t2p->pdf_fileid) - 1);
+ written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
+- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
+ written += t2pWriteFile(output, (tdata_t) buffer, buflen);
+- _TIFFmemset(buffer, 0x00, 32);
+ written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
+
+ return(written);
+diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
+index 3330750..7a9a816 100644
+--- a/tools/tiff2ps.c
++++ b/tools/tiff2ps.c
+@@ -1789,8 +1789,8 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ imageOp = "imagemask";
+
+ (void)strcpy(im_x, "0");
+- (void)sprintf(im_y, "%lu", (long) h);
+- (void)sprintf(im_h, "%lu", (long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
++ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
+ tile_width = w;
+ tile_height = h;
+ if (TIFFIsTiled(tif)) {
+@@ -1811,7 +1811,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ }
+ if (tile_height < h) {
+ fputs("/im_y 0 def\n", fd);
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ } else {
+ repeat_count = tf_numberstrips;
+@@ -1823,7 +1823,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
+ fprintf(fd, "/im_h %lu def\n",
+ (unsigned long) tile_height);
+ (void)strcpy(im_h, "im_h");
+- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
+ }
+ }
+
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index 9cd5d86..a2443aa 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -2077,7 +2077,7 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex,
+ return 1;
+ }
+
+- sprintf (filenum, "-%03d%s", findex, export_ext);
++ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
+ filenum[14] = '\0';
+ strncat (exportname, filenum, 15);
+ }
+@@ -2230,8 +2230,8 @@ main(int argc, char* argv[])
+
+ /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
++ dump.infilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+@@ -2249,8 +2249,8 @@ main(int argc, char* argv[])
+
+ /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes
+ fewer than PATH_MAX */
+- memset (temp_filename, '\0', PATH_MAX + 1);
+- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
++ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
++ dump.outfilename, dump_images,
+ (dump.format == DUMP_TEXT) ? "txt" : "raw");
+ if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
+ {
+diff --git a/tools/tiffdither.c b/tools/tiffdither.c
+index f2f0f20..4308946 100644
+--- a/tools/tiffdither.c
++++ b/tools/tiffdither.c
+@@ -260,7 +260,7 @@ main(int argc, char* argv[])
+ TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
+ else
+ CopyField(TIFFTAG_FILLORDER, shortv);
+- sprintf(thing, "Dithered B&W version of %s", argv[optind]);
++ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
+ TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
+ CopyField(TIFFTAG_PHOTOMETRIC, shortv);
+ CopyField(TIFFTAG_ORIENTATION, shortv);
+--
+1.8.3.rc3
+
+
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
index af1f2b6ad8..b7d1129ad6 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb
@@ -6,6 +6,7 @@ HOMEPAGE = "http://www.remotesensing.org/libtiff/"
SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
file://libtool2.patch \
file://libtiff-CVE-2013-1960.patch \
+ file://libtiff-CVE-2013-1961.patch \
file://libtiff-CVE-2013-4232.patch \
file://libtiff-CVE-2013-4243.patch \
file://libtiff-CVE-2013-4244.patch \
diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
index 12112842c3..cede2bf100 100644
--- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
+++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
@@ -6,8 +6,6 @@ LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
-
PR = "r2"
SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \
@@ -18,7 +16,10 @@ SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e
inherit autotools pkgconfig
-EXTRA_OECONF = "--enable-shared --disable-sdl --with-x"
+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"
diff --git a/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch
new file mode 100644
index 0000000000..a563b8b022
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch
@@ -0,0 +1,239 @@
+From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Wed, 23 Jan 2013 17:14:16 +0100
+Subject: [PATCH] Aarch64 basic port
+
+Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+
+
+Upstream-Status: Backport
+
+It is original from
+https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/atomic_ops.h | 4
+ src/atomic_ops/sysdeps/Makefile.am | 1
+ src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 189 insertions(+)
+ create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h
+
+--- libatomic_ops-7.2.orig/src/atomic_ops.h
++++ libatomic_ops-7.2/src/atomic_ops.h
+@@ -242,10 +242,14 @@
+ # endif /* __m68k__ */
+ # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
+ || defined(__powerpc64__) || defined(__ppc64__)
+ # include "atomic_ops/sysdeps/gcc/powerpc.h"
+ # endif /* __powerpc__ */
++# if defined(__aarch64__)
++# include "atomic_ops/sysdeps/gcc/aarch64.h"
++# define AO_CAN_EMUL_CAS
++# endif /* __aarch64__ */
+ # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS)
+ # include "atomic_ops/sysdeps/gcc/arm.h"
+ # define AO_CAN_EMUL_CAS
+ # endif /* __arm__ */
+ # if defined(__cris__) || defined(CRIS)
+--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am
++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am
+@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h
+ standard_ao_double_t.h \
+ README \
+ \
+ armcc/arm_v6.h \
+ \
++ gcc/aarch64.h \
+ gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \
+ gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \
+ gcc/mips.h gcc/powerpc.h gcc/s390.h \
+ gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \
+ \
+--- /dev/null
++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h
+@@ -0,0 +1,184 @@
++/*
++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
++ *
++ *
++ * 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 "../read_ordered.h"
++
++#include "../test_and_set_t_is_ao_t.h"
++
++AO_INLINE void
++AO_nop_full(void)
++{
++# ifndef AO_UNIPROCESSOR
++__sync_synchronize ();
++# endif
++}
++#define AO_HAVE_nop_full
++
++AO_INLINE AO_t
++AO_load(const volatile AO_t *addr)
++{
++ return __atomic_load_n (addr, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_load
++
++AO_INLINE AO_t
++AO_load_acquire(const volatile AO_t *addr)
++{
++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_load_acquire
++
++AO_INLINE void
++ AO_store(volatile AO_t *addr, AO_t value)
++{
++ __atomic_store_n(addr, value, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_store
++
++AO_INLINE void
++ AO_store_release(volatile AO_t *addr, AO_t value)
++{
++ __atomic_store_n(addr, value, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_store_release
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED);
++}
++# define AO_HAVE_test_and_set
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_acquire(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
++}
++# define AO_HAVE_test_and_set_acquire
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_release(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE);
++}
++# define AO_HAVE_test_and_set_release
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_full(volatile AO_TS_t *addr)
++{
++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
++}
++# define AO_HAVE_test_and_set_full
++
++AO_INLINE AO_t
++AO_fetch_and_add(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_add
++
++AO_INLINE AO_t
++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_add_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_add_release
++
++AO_INLINE AO_t
++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
++{
++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_add_full
++
++AO_INLINE AO_t
++AO_fetch_and_add1(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_add1
++
++AO_INLINE AO_t
++AO_fetch_and_add1_acquire(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_add1_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_add1_release(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_add1_release
++
++AO_INLINE AO_t
++AO_fetch_and_add1_full(volatile AO_t *p)
++{
++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_add1_full
++
++AO_INLINE AO_t
++AO_fetch_and_sub1(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED);
++}
++#define AO_HAVE_fetch_and_sub1
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_acquire(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE);
++}
++#define AO_HAVE_fetch_and_sub1_acquire
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_release(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE);
++}
++#define AO_HAVE_fetch_and_sub1_release
++
++AO_INLINE AO_t
++AO_fetch_and_sub1_full(volatile AO_t *p)
++{
++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST);
++}
++#define AO_HAVE_fetch_and_sub1_full
++
++/* Returns nonzero if the comparison succeeded. */
++AO_INLINE int
++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
++{
++ return __sync_bool_compare_and_swap(addr, old_val, new_val);
++}
++# define AO_HAVE_compare_and_swap
++
++AO_INLINE AO_t
++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
++{
++ return __sync_val_compare_and_swap(addr, old_val, new_val);
++}
++# define AO_HAVE_fetch_compare_and_swap
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
index f31f9835e5..5a582287b5 100644
--- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
PR = "r1"
SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \
+ file://0001-libatomic_ops-Aarch64-basic-port.patch \
"
SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8"
@@ -27,3 +28,5 @@ do_install_append() {
install -m 0755 -d ${D}${docdir}
mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 195a98296d..99cad76186 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
DEPENDS = "libatomics-ops liboil libsamplerate0 libsndfile1 libtool"
# optional
DEPENDS += "udev alsa-lib glib-2.0 dbus gconf"
-DEPENDS += "json-c gdbm speex libxml-parser-perl-native"
+DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap"
inherit autotools pkgconfig useradd gettext perlnative
@@ -79,7 +79,7 @@ PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainl
#upgrade path:
RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
-PACKAGES_DYNAMIC += "^pulseaudio-lib.* ^pulseaudio-module.* ^libpulse-lib.* ^libpulse-module.* "
+PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
FILES_libpulsecore = "${libdir}/libpulsecore*.so"
FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
new file mode 100644
index 0000000000..d5f33dc42e
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Backport
+
+commit 26b9d22dd24c17eb118d0205bf7b02b75d435e3c upstream
+
+rtp-recv: fix crash on empty UDP packets (CVE-2014-3970)
+
+On FIONREAD returning 0 bytes, we cannot return success, as the caller
+(rtpoll_work_cb in module-rtp-recv.c) would then try to
+pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger
+an assertion.
+
+Also we have to read out the possible empty packet from the socket, so
+that the kernel doesn't tell us again and again about it.
+
+Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
+
+diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
+index 9195493..c45981e 100644
+--- a/src/modules/rtp/rtp.c
++++ b/src/modules/rtp/rtp.c
+@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
+ goto fail;
+ }
+
+- if (size <= 0)
+- return 0;
++ if (size <= 0) {
++ /* size can be 0 due to any of the following reasons:
++ *
++ * 1. Somebody sent us a perfectly valid zero-length UDP packet.
++ * 2. Somebody sent us a UDP packet with a bad CRC.
++ *
++ * It is unknown whether size can actually be less than zero.
++ *
++ * In the first case, the packet has to be read out, otherwise the
++ * kernel will tell us again and again about it, thus preventing
++ * reception of any further packets. So let's just read it out
++ * now and discard it later, when comparing the number of bytes
++ * received (0) with the number of bytes wanted (1, see below).
++ *
++ * In the second case, recvmsg() will fail, thus allowing us to
++ * return the error.
++ *
++ * Just to avoid passing zero-sized memchunks and NULL pointers to
++ * recvmsg(), let's force allocation of at least one byte by setting
++ * size to 1.
++ */
++ size = 1;
++ }
+
+ if (c->memchunk.length < (unsigned) size) {
+ size_t l;
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
index 8d8c421179..99f0ef3a46 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb
@@ -2,7 +2,9 @@ require pulseaudio.inc
SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz \
file://0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch \
- file://volatiles.04_pulse"
+ file://volatiles.04_pulse \
+ file://CVE-2014-3970.patch \
+"
SRC_URI[md5sum] = "c43749838612f4860465e83ed62ca38e"
SRC_URI[sha256sum] = "99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939"
diff --git a/meta/recipes-multimedia/sbc/sbc_1.2.bb b/meta/recipes-multimedia/sbc/sbc_1.3.bb
index 9cdf01bb74..2d7f31bc1b 100644
--- a/meta/recipes-multimedia/sbc/sbc_1.2.bb
+++ b/meta/recipes-multimedia/sbc/sbc_1.3.bb
@@ -10,7 +10,7 @@ DEPENDS = "libsndfile1"
SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
-SRC_URI[md5sum] = "ec65c444ad4c32aa85702641045b19e9"
-SRC_URI[sha256sum] = "c2f01ea54f7473704825113a9cdd46a23e67c650eff575f0670c3d9d66c4a5dc"
+SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c"
+SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309"
inherit autotools pkgconfig
diff --git a/meta/recipes-qt/meta/meta-toolchain-qt.inc b/meta/recipes-qt/meta/meta-toolchain-qt.inc
index c9bdeae9ac..7e75d93b14 100644
--- a/meta/recipes-qt/meta/meta-toolchain-qt.inc
+++ b/meta/recipes-qt/meta/meta-toolchain-qt.inc
@@ -4,29 +4,32 @@ TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${QTNAME}-${DISTRO_VERSION}"
require recipes-core/meta/meta-toolchain.bb
-QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
+QT_TOOLS_PREFIX = "$OECORE_NATIVE_SYSROOT${bindir_nativesdk}"
-toolchain_create_sdk_env_script_append() {
- echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script
+create_sdk_files_append() {
+ mkdir -p ${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/
+ script=${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/${QT_DIR_NAME}.sh
+
+ echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' > $script
echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
echo 'export OE_QMAKE_CC=$CC' >> $script
echo 'export OE_QMAKE_CXX=$CXX' >> $script
echo 'export OE_QMAKE_LINK=$CXX' >> $script
echo 'export OE_QMAKE_AR=$AR' >> $script
- echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}/${libdir}' >> $script
- echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}/${includedir}/${QT_DIR_NAME}' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=$OECORE_TARGET_SYSROOT${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=$OECORE_TARGET_SYSROOT${includedir}/${QT_DIR_NAME}' >> $script
echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
- echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
- echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
- echo 'export QT_CONF_PATH=${SDKPATHNATIVE}/${sysconfdir}/qt.conf' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+ echo 'export QT_CONF_PATH=$OECORE_NATIVE_SYSROOT${sysconfdir}/qt.conf' >> $script
- # make a symbolic link to mkspecs for compatibility with Nokia's SDK
- # and QTCreator
- (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
+ # make a symbolic link to mkspecs for compatibility with Qt SDK
+ # and Qt Creator
+ (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
}
diff --git a/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb b/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
index 15dec8eef2..5f6916a430 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
@@ -7,17 +7,12 @@ LICENSE = "MIT"
PR = "r4"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
PACKAGES = "${PN}-demoapps"
-# For backwards compatibility after rename
-RPROVIDES_${PN}-demoapps = "task-core-qt-demos"
-RREPLACES_${PN}-demoapps = "task-core-qt-demos"
-RCONFLICTS_${PN}-demoapps = "task-core-qt-demos"
-
QTDEMOS ?= "quicky ${COMMERCIAL_QT} fotowall"
SUMMARY_${PN}-demoapps = "Qt demo applications"
diff --git a/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb b/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
index 02a649bab4..d4f0fd1d8c 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
@@ -3,15 +3,10 @@ PR = "r2"
LICENSE = "MIT"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-qt4e-base"
-RREPLACES_${PN} = "task-qt4e-base"
-RCONFLICTS_${PN} = "task-qt4e-base"
-
TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
RDEPENDS_${PN} = " \
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
index 0e7c800946..772c151d25 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
@@ -4,6 +4,10 @@ QTLIBPREFIX = ""
require packagegroup-qt-toolchain-target.inc
+inherit distro_features_check
+# depends on qt4-x11-free
+REQUIRED_DISTRO_FEATURES = "x11"
+
RDEPENDS_${PN} += " \
qt4-x11-free-dev \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libqtopengl4-dev', '', d)} \
diff --git a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
index fc1ccba9a7..02a032658d 100644
--- a/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
+++ b/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
@@ -1,7 +1,7 @@
LICENSE = "MIT"
# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "mips64.*-linux-gnun32"
+COMPATIBLE_HOST_mips64 = "null"
inherit packagegroup
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
index 3a1f2cb1b2..21f0273e2a 100644
--- a/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
+++ b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
@@ -2,8 +2,8 @@
set -e
-if [ -f /usr/bin/qtdemo ]; then
- QTDEMO="qtdemo > /var/log/Xsession.log 2> &1"
+if [ -x /usr/bin/qtdemo ]; then
+ QTDEMO="qtdemo"
else
QTDEMO="qtdemoE -qws"
fi
@@ -18,7 +18,7 @@ case "$1" in
if [ ! -f /etc/pointercal ]; then
/usr/bin/ts_calibrate
fi
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
Xorg &
export DISPLAY=:0
$QTDEMO &
@@ -26,7 +26,7 @@ case "$1" in
QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
fi
else
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
Xorg &
export DISPLAY=:0
fi
@@ -35,7 +35,7 @@ case "$1" in
;;
stop)
echo "Stopping qtdemo"
- if [ "$QTDEMO" = qtdemo ]; then
+ if [ "$QTDEMO" = "qtdemo" ]; then
killall Xorg
killall qtdemo
else
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
index fff3620b09..aa1b0b62f2 100644
--- a/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
+++ b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
@@ -6,6 +6,8 @@ PR = "r3"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+S = "${WORKDIR}"
+
do_install() {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo
diff --git a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
index d46acb9c7e..ae1769de3a 100644
--- a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
+++ b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
file://LGPL_EXCEPTION.txt;md5=411080a56ff917a5a1aa08c98acae354"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-mobility-${PV}:"
-SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/qt-mobility/qt-mobility-opensource-src-${PV}.tar.gz/ea5db5a8d3dd4709c2926dceda646bd8/qt-mobility-opensource-src-${PV}.tar.gz \
file://qt-mobility-configure.patch \
file://0001-gstvideoconnector-fixed-buffers-allocation.patch \
file://0002-Remove-unnecessary-rpaths-from-qml_device-example.patch \
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6.inc b/meta/recipes-qt/qt4/qt4-4.8.6.inc
index ae6692b50a..bd20dac66c 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6.inc
+++ b/meta/recipes-qt/qt4/qt4-4.8.6.inc
@@ -22,6 +22,11 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
file://0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch \
file://0027-tools.pro-disable-qmeegographicssystemhelper.patch \
file://0028-Don-t-crash-on-broken-GIF-images.patch \
+ file://0029-aarch64_arm64_fix_arch_detection.patch \
+ file://0030-aarch64_arm64_qatomic_support.patch \
+ file://0031-aarch64_arm64_mkspecs.patch \
+ file://0032-aarch64_add_header.patch \
+ file://Fix-QWSLock-invalid-argument-logs.patch \
file://g++.conf \
file://linux.conf \
"
@@ -31,6 +36,14 @@ SRC_URI[sha256sum] = "8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa70
S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
+# disable webkit for mips64 n32 temporarily that fails to compile,
+# qt upstream defect:
+# https://bugreports.qt-project.org/browse/QTBUG-39224
+QT_CONFIG_FLAGS_append_mips64n32 = " -no-webkit"
+
+# disable webkit for aarch64 temporarily that fails to compile
+QT_CONFIG_FLAGS_append_aarch64 = " -no-webkit"
+
FILES_${QT_BASE_NAME}-tools_append = " ${bindir}/qml ${bindir}/qmlplugindump"
FILES_${QT_BASE_NAME}-tools-dbg_append = " ${bindir}/.debug/qml ${bindir}/.debug/qmlplugindump"
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
index 7d3b336f77..1d23c929f4 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
@@ -7,7 +7,7 @@ Subject: [PATCH 07/21] dbus: Remove "const" usage that causes compile failure
Patch has apparently been rejected upstream, not because it is invalid
but because the submitter did not submit a merge request for it, so the
validity of the patch upstream is uncertain. For further details see:
-http://bugreports.qt.nokia.com/browse/QTBUG-17962
+https://bugreports.qt-project.org/browse/QTBUG-17962
Upstream-Status: Denied [possible retry]
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
index 8402eab635..8e411f3426 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0012-Add-2bpp-support.patch
@@ -4,7 +4,7 @@ Date: Wed, 26 Sep 2012 20:39:21 +0200
Subject: [PATCH 12/21] Add 2bpp support
Submitted upstream but rejected as being "out of scope":
-http://bugreports.qt.nokia.com/browse/QTBUG-3468
+https://bugreports.qt-project.org/browse/QTBUG-3468
Upstream-Status: Denied
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch
new file mode 100644
index 0000000000..fbd32b173d
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0029-aarch64_arm64_fix_arch_detection.patch
@@ -0,0 +1,53 @@
+From 800abbba658203fc8e746e3fc780a297cd4110cf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Wed, 20 Aug 2014 17:52:49 -0300
+Subject: [PATCH] Fix AArch64/arm64 detection.
+
+The detection needs to go before arm, else the system will detect AArch64/arm64
+as arm.
+
+This patch comes from Wookey, he has agreed to put it under BSD or Expat
+to allow it's inclusion in here:
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#255>
+
+Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ configure | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure b/configure
+index a9ba7c8..eb88b72 100755
+--- a/configure
++++ b/configure
+@@ -3241,17 +3241,17 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
+ fi
+ CFG_HOST_ARCH=s390
+ ;;
+- *:*:arm*)
++ *:*:aarch64*|*:*:arm64*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+- echo " ARM (arm)"
++ echo " AArch64 (aarch64)"
+ fi
+- CFG_HOST_ARCH=arm
++ CFG_HOST_ARCH=aarch64
+ ;;
+- *:*:aarch64*)
++ *:*:arm*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+- echo " AArch64 (aarch64)"
++ echo " ARM (arm)"
+ fi
+- CFG_HOST_ARCH=aarch64
++ CFG_HOST_ARCH=arm
+ ;;
+ Linux:*:sparc*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+--
+2.1.0
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch
new file mode 100644
index 0000000000..ba4c2a6b4f
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0030-aarch64_arm64_qatomic_support.patch
@@ -0,0 +1,491 @@
+From 294010b562c9846bb2bc4ee9c63ff78adc7c1f4f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Sat, 15 Mar 2014 15:40:49 -0300
+Subject: [PATCH] Add qatomic support for AArch64 (aka arm64).
+
+Patch by Mark Salter <msalter@redhat.com>
+licensed under BSD:
+
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#195>
+
+This patch is known to not be the most correct way
+to implement them, as it seems to be possible to do it in a faster way,
+but should work non the less until we can provide something better.
+
+Change-Id: Ib392b27dc54691fd4c2ea9896240ad71fb8128cc
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ src/corelib/arch/aarch64/arch.pri | 4 +
+ src/corelib/arch/aarch64/qatomic_aarch64.cpp | 70 ++++++
+ src/corelib/arch/arch.pri | 4 +-
+ src/corelib/arch/qatomic_aarch64.h | 335 +++++++++++++++++++++++++++
+ src/corelib/arch/qatomic_arch.h | 2 +
+ 5 files changed, 414 insertions(+), 1 deletion(-)
+ create mode 100644 src/corelib/arch/aarch64/arch.pri
+ create mode 100644 src/corelib/arch/aarch64/qatomic_aarch64.cpp
+ create mode 100644 src/corelib/arch/qatomic_aarch64.h
+
+diff --git a/src/corelib/arch/aarch64/arch.pri b/src/corelib/arch/aarch64/arch.pri
+new file mode 100644
+index 0000000..63523d9
+--- /dev/null
++++ b/src/corelib/arch/aarch64/arch.pri
+@@ -0,0 +1,4 @@
++#
++# AArch64 architecture
++#
++SOURCES += $$QT_ARCH_CPP/qatomic_aarch64.cpp
+diff --git a/src/corelib/arch/aarch64/qatomic_aarch64.cpp b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
+new file mode 100644
+index 0000000..fc851b9
+--- /dev/null
++++ b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
+@@ -0,0 +1,70 @@
++/****************************************************************************
++**
++** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the QtCore module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include <QtCore/qglobal.h>
++
++#include <unistd.h>
++#ifdef _POSIX_PRIORITY_SCHEDULING
++# include <sched.h>
++#endif
++#include <time.h>
++
++QT_BEGIN_NAMESPACE
++
++QT_USE_NAMESPACE
++
++Q_CORE_EXPORT void qt_atomic_yield(int *count)
++{
++#ifdef _POSIX_PRIORITY_SCHEDULING
++ if ((*count)++ < 50) {
++ sched_yield();
++ } else
++#endif
++ {
++ struct timespec tm;
++ tm.tv_sec = 0;
++ tm.tv_nsec = 2000001;
++ nanosleep(&tm, NULL);
++ *count = 0;
++ }
++}
++
++QT_END_NAMESPACE
+diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
+index cd23e5e..f50fca7 100644
+--- a/src/corelib/arch/arch.pri
++++ b/src/corelib/arch/arch.pri
+@@ -31,7 +31,9 @@ integrity:HEADERS += arch/qatomic_integrity.h
+ arch/qatomic_s390.h \
+ arch/qatomic_x86_64.h \
+ arch/qatomic_sh.h \
+- arch/qatomic_sh4a.h
++ arch/qatomic_sh4a.h \
++ arch/qatomic_aarch64.h \
++
+
+ QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
+ DEPENDPATH += $$QT_ARCH_CPP
+diff --git a/src/corelib/arch/qatomic_aarch64.h b/src/corelib/arch/qatomic_aarch64.h
+new file mode 100644
+index 0000000..de61ca8
+--- /dev/null
++++ b/src/corelib/arch/qatomic_aarch64.h
+@@ -0,0 +1,335 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the QtCore module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QATOMIC_AARCH64_H
++#define QATOMIC_AARCH64_H
++
++QT_BEGIN_HEADER
++
++QT_BEGIN_NAMESPACE
++
++#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isReferenceCountingNative()
++{ return true; }
++inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isTestAndSetNative()
++{ return true; }
++inline bool QBasicAtomicInt::isTestAndSetWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isFetchAndStoreNative()
++{ return true; }
++inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
++
++inline bool QBasicAtomicInt::isFetchAndAddNative()
++{ return true; }
++inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
++{ return false; }
++
++#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
++{ return true; }
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
++{ return false; }
++
++#ifndef Q_DATA_MEMORY_BARRIER
++# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
++#endif
++#ifndef Q_COMPILER_MEMORY_BARRIER
++# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
++#endif
++
++inline bool QBasicAtomicInt::ref()
++{
++ int newValue;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
++ Q_COMPILER_MEMORY_BARRIER;
++
++ return newValue != 0;
++}
++
++inline bool QBasicAtomicInt::deref()
++{
++ int newValue;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
++ Q_COMPILER_MEMORY_BARRIER;
++
++ return newValue != 0;
++}
++
++inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
++{
++ bool val;
++
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
++ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
++{
++ int val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
++{
++ int val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
++{
++ bool val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
++ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
++{
++ T *val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
++{
++ T *val;
++ Q_COMPILER_MEMORY_BARRIER;
++ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
++ Q_COMPILER_MEMORY_BARRIER;
++ return val;
++}
++
++inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
++{
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return testAndSetRelaxed(expectedValue, newValue);
++}
++
++inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
++{
++ int returnValue = fetchAndStoreRelaxed(newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndStoreRelaxed(newValue);
++}
++
++inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ int returnValue = fetchAndStoreRelaxed(newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
++{
++ int returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndAddRelaxed(valueToAdd);
++}
++
++inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ int returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
++{
++ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return testAndSetRelaxed(expectedValue, newValue);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ bool returnValue = testAndSetAcquire(expectedValue, newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
++{
++ T *returnValue = fetchAndStoreRelaxed(newValue);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndStoreRelaxed(newValue);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
++{
++ Q_DATA_MEMORY_BARRIER;
++ T *returnValue = fetchAndStoreRelaxed(newValue);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
++{
++ T *returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_DATA_MEMORY_BARRIER;
++ return returnValue;
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ return fetchAndAddRelaxed(valueToAdd);
++}
++
++template <typename T>
++Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
++{
++ Q_DATA_MEMORY_BARRIER;
++ T *returnValue = fetchAndAddRelaxed(valueToAdd);
++ Q_COMPILER_MEMORY_BARRIER;
++ return returnValue;
++}
++
++#undef Q_DATA_MEMORY_BARRIER
++#undef Q_COMPILER_MEMORY_BARRIER
++
++QT_END_NAMESPACE
++
++QT_END_HEADER
++
++#endif // QATOMIC_AARCH64_H
+diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
+index 141726c..3e96926 100644
+--- a/src/corelib/arch/qatomic_arch.h
++++ b/src/corelib/arch/qatomic_arch.h
+@@ -94,6 +94,8 @@ QT_BEGIN_HEADER
+ # include "QtCore/qatomic_sh4a.h"
+ #elif defined(QT_ARCH_NACL)
+ # include "QtCore/qatomic_generic.h"
++#elif defined(QT_ARCH_AARCH64)
++# include "QtCore/qatomic_aarch64.h"
+ #else
+ # error "Qt has not been ported to this architecture"
+ #endif
+--
+2.1.0
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch
new file mode 100644
index 0000000000..a01e7ada93
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0031-aarch64_arm64_mkspecs.patch
@@ -0,0 +1,124 @@
+From 7090fc80ff630712a90de92403190f647dd38a39 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
+ <perezmeyer@gmail.com>
+Date: Sat, 15 Mar 2014 15:35:00 -0300
+Subject: [PATCH] mkspecs for AArch64 (aka arm64).
+
+Patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
+licensed under either Public Domain or BSD:
+
+<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#179>
+
+Change-Id: I21f17953234cfb176bac023e52ecdc927fc5c1a9
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ configure | 3 +++
+ mkspecs/linux-g++-aarch64/qmake.conf | 27 ++++++++++++++++++++
+ mkspecs/linux-g++-aarch64/qplatformdefs.h | 42 +++++++++++++++++++++++++++++++
+ 3 files changed, 72 insertions(+)
+ create mode 100644 mkspecs/linux-g++-aarch64/qmake.conf
+ create mode 100644 mkspecs/linux-g++-aarch64/qplatformdefs.h
+
+diff --git a/configure b/configure
+index a9ba7c8..e57d053 100755
+--- a/configure
++++ b/configure
+@@ -2808,6 +2808,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
+ *86_64)
+ PLATFORM=qws/linux-x86_64-g++
+ ;;
++ aarch64)
++ PLATFORM=linux-aarch64-g++
++ ;;
+ *)
+ PLATFORM=qws/linux-generic-g++
+ ;;
+diff --git a/mkspecs/linux-g++-aarch64/qmake.conf b/mkspecs/linux-g++-aarch64/qmake.conf
+new file mode 100644
+index 0000000..ebc0a92
+--- /dev/null
++++ b/mkspecs/linux-g++-aarch64/qmake.conf
+@@ -0,0 +1,27 @@
++#
++# qmake configuration for linux-g++
++#
++# Written for GNU/Linux platforms that have both lib and lib64 directories,
++# like the AMD Opteron.
++#
++
++MAKEFILE_GENERATOR = UNIX
++TARGET_PLATFORM = unix
++TEMPLATE = app
++CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
++QT += core gui
++QMAKE_INCREMENTAL_STYLE = sublib
++
++QMAKE_CFLAGS =
++QMAKE_LFLAGS =
++
++QMAKE_CFLAGS_RELEASE += -O2
++
++include(../common/linux.conf)
++include(../common/gcc-base-unix.conf)
++include(../common/g++-unix.conf)
++
++QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
++QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
++
++load(qt_config)
+diff --git a/mkspecs/linux-g++-aarch64/qplatformdefs.h b/mkspecs/linux-g++-aarch64/qplatformdefs.h
+new file mode 100644
+index 0000000..562128b
+--- /dev/null
++++ b/mkspecs/linux-g++-aarch64/qplatformdefs.h
+@@ -0,0 +1,42 @@
++/****************************************************************************
++**
++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
++** Contact: http://www.qt-project.org/legal
++**
++** This file is part of the qmake spec of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and Digia. For licensing terms and
++** conditions see http://qt.digia.com/licensing. For further information
++** use the contact form at http://qt.digia.com/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 2.1 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 2.1 requirements
++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
++**
++** In addition, as a special exception, Digia gives you certain additional
++** rights. These rights are described in the Digia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 3.0 as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU General Public License version 3.0 requirements will be
++** met: http://www.gnu.org/copyleft/gpl.html.
++**
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "../linux-g++/qplatformdefs.h"
+--
+2.1.0
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch
new file mode 100644
index 0000000000..7132224ecc
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0032-aarch64_add_header.patch
@@ -0,0 +1,18 @@
+Add missing header for aarch64. And install ../corelib/arch/qatomic_aarch64.h.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff -Nru qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h
+--- qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h 1970-01-01 08:30:00.000000000 +0830
++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h 2014-09-09 17:18:03.768352551 +0800
+@@ -0,0 +1 @@
++#include "../../src/corelib/arch/qatomic_aarch64.h"
+--- qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri.orig 2014-09-09 18:05:37.100430311 +0800
++++ qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri 2014-09-09 18:05:59.112430911 +0800
+@@ -1,3 +1,3 @@
+-SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore
++SYNCQT.HEADER_FILES = ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_aarch64.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/xml/qxmlstream.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../../include/QtCore/QtCore
+ SYNCQT.HEADER_CLASSES = ../../include/QtCore/QAbstractState ../../include/QtCore/QAbstractTransition ../../include/QtCore/QEventTransition ../../include/QtCore/QFinalState ../../include/QtCore/QHistoryState ../../include/QtCore/QSignalTransition ../../include/QtCore/QState ../../include/QtCore/QStateMachine ../../include/QtCore/QAtomicInt ../../include/QtCore/QAtomicPointer ../../include/QtCore/QBasicAtomicInt ../../include/QtCore/QBasicAtomicPointer ../../include/QtCore/QMutex ../../include/QtCore/QMutexLocker ../../include/QtCore/QMutexData ../../include/QtCore/QReadWriteLock ../../include/QtCore/QReadLocker ../../include/QtCore/QWriteLocker ../../include/QtCore/QSemaphore ../../include/QtCore/QThread ../../include/QtCore/QThreadStorageData ../../include/QtCore/QThreadStorage ../../include/QtCore/QWaitCondition ../../include/QtCore/QXmlStreamStringRef ../../include/QtCore/QXmlStreamAttribute ../../include/QtCore/QXmlStreamAttributes ../../include/QtCore/QXmlStreamNamespaceDeclaration ../../include/QtCore/QXmlStreamNamespaceDeclarations ../../include/QtCore/QXmlStreamNotationDeclaration ../../include/QtCore/QXmlStreamNotationDeclarations ../../include/QtCore/QXmlStreamEntityDeclaration ../../include/QtCore/QXmlStreamEntityDeclarations ../../include/QtCore/QXmlStreamEntityResolver ../../include/QtCore/QXmlStreamReader ../../include/QtCore/QXmlStreamWriter ../../include/QtCore/QFuture ../../include/QtCore/QFutureIterator ../../include/QtCore/QMutableFutureIterator ../../include/QtCore/QFutureInterfaceBase ../../include/QtCore/QFutureInterface ../../include/QtCore/QFutureSynchronizer ../../include/QtCore/QFutureWatcherBase ../../include/QtCore/QFutureWatcher ../../include/QtCore/QRunnable ../../include/QtCore/QtConcurrentFilter ../../include/QtCore/QtConcurrentMap ../../include/QtCore/QtConcurrentRun ../../include/QtCore/QThreadPool ../../include/QtCore/QAbstractEventDispatcher ../../include/QtCore/QModelIndex ../../include/QtCore/QPersistentModelIndex ../../include/QtCore/QModelIndexList ../../include/QtCore/QAbstractItemModel ../../include/QtCore/QAbstractTableModel ../../include/QtCore/QAbstractListModel ../../include/QtCore/QBasicTimer ../../include/QtCore/QCoreApplication ../../include/QtCore/QtCleanUpFunction ../../include/QtCore/QEvent ../../include/QtCore/QTimerEvent ../../include/QtCore/QChildEvent ../../include/QtCore/QCustomEvent ../../include/QtCore/QDynamicPropertyChangeEvent ../../include/QtCore/QEventLoop ../../include/QtCore/QMetaMethod ../../include/QtCore/QMetaEnum ../../include/QtCore/QMetaProperty ../../include/QtCore/QMetaClassInfo ../../include/QtCore/QMetaType ../../include/QtCore/QMetaTypeId ../../include/QtCore/QMetaTypeId2 ../../include/QtCore/QMimeData ../../include/QtCore/QObjectList ../../include/QtCore/QObjectData ../../include/QtCore/QObject ../../include/QtCore/QObjectUserData ../../include/QtCore/QObjectCleanupHandler ../../include/QtCore/QGenericArgument ../../include/QtCore/QGenericReturnArgument ../../include/QtCore/QArgument ../../include/QtCore/QReturnArgument ../../include/QtCore/QMetaObject ../../include/QtCore/QMetaObjectAccessor ../../include/QtCore/QMetaObjectExtraData ../../include/QtCore/QPointer ../../include/QtCore/QSharedMemory ../../include/QtCore/QSignalMapper ../../include/QtCore/QSocketNotifier ../../include/QtCore/QSystemSemaphore ../../include/QtCore/QTimer ../../include/QtCore/QTranslator ../../include/QtCore/QVariant ../../include/QtCore/QVariantList ../../include/QtCore/QVariantMap ../../include/QtCore/QVariantHash ../../include/QtCore/QVariantComparisonHelper ../../include/QtCore/QFactoryInterface ../../include/QtCore/QLibrary ../../include/QtCore/QtPlugin ../../include/QtCore/QtPluginInstanceFunction ../../include/QtCore/QPluginLoader ../../include/QtCore/QUuid ../../include/QtCore/QtEndian ../../include/QtCore/QtGlobal ../../include/QtCore/QIntegerForSize ../../include/QtCore/QNoImplicitBoolCast ../../include/QtCore/Q_INT8 ../../include/QtCore/Q_UINT8 ../../include/QtCore/Q_INT16 ../../include/QtCore/Q_UINT16 ../../include/QtCore/Q_INT32 ../../include/QtCore/Q_UINT32 ../../include/QtCore/Q_INT64 ../../include/QtCore/Q_UINT64 ../../include/QtCore/Q_LLONG ../../include/QtCore/Q_ULLONG ../../include/QtCore/Q_LONG ../../include/QtCore/Q_ULONG ../../include/QtCore/QSysInfo ../../include/QtCore/QtMsgHandler ../../include/QtCore/QGlobalStatic ../../include/QtCore/QGlobalStaticDeleter ../../include/QtCore/QBool ../../include/QtCore/QTypeInfo ../../include/QtCore/QFlag ../../include/QtCore/QIncompatibleFlag ../../include/QtCore/QFlags ../../include/QtCore/QForeachContainer ../../include/QtCore/QForeachContainerBase ../../include/QtCore/QLibraryInfo ../../include/QtCore/Qt ../../include/QtCore/QInternal ../../include/QtCore/QCOORD ../../include/QtCore/QtConfig ../../include/QtCore/QTextCodec ../../include/QtCore/QTextEncoder ../../include/QtCore/QTextDecoder ../../include/QtCore/QTextCodecFactoryInterface ../../include/QtCore/QTextCodecPlugin ../../include/QtCore/QAbstractFileEngine ../../include/QtCore/QAbstractFileEngineHandler ../../include/QtCore/QAbstractFileEngineIterator ../../include/QtCore/QBuffer ../../include/QtCore/QDataStream ../../include/QtCore/QtDebug ../../include/QtCore/QDebug ../../include/QtCore/QNoDebug ../../include/QtCore/QDir ../../include/QtCore/QDirIterator ../../include/QtCore/QFile ../../include/QtCore/QFileInfo ../../include/QtCore/QFileInfoList ../../include/QtCore/QFileInfoListIterator ../../include/QtCore/QFileSystemWatcher ../../include/QtCore/QFSFileEngine ../../include/QtCore/QIODevice ../../include/QtCore/Q_PID ../../include/QtCore/QProcessEnvironment ../../include/QtCore/QProcess ../../include/QtCore/QResource ../../include/QtCore/QSettings ../../include/QtCore/QTemporaryFile ../../include/QtCore/QTextStream ../../include/QtCore/QTextStreamFunction ../../include/QtCore/QTextStreamManipulator ../../include/QtCore/QTS ../../include/QtCore/QTextIStream ../../include/QtCore/QTextOStream ../../include/QtCore/QUrl ../../include/QtCore/QAbstractAnimation ../../include/QtCore/QAnimationDriver ../../include/QtCore/QAnimationGroup ../../include/QtCore/QParallelAnimationGroup ../../include/QtCore/QPauseAnimation ../../include/QtCore/QPropertyAnimation ../../include/QtCore/QSequentialAnimationGroup ../../include/QtCore/QVariantAnimation ../../include/QtCore/QtAlgorithms ../../include/QtCore/QBitArray ../../include/QtCore/QBitRef ../../include/QtCore/QByteArray ../../include/QtCore/QByteRef ../../include/QtCore/QByteArrayMatcher ../../include/QtCore/QCache ../../include/QtCore/QLatin1Char ../../include/QtCore/QChar ../../include/QtCore/QtContainerFwd ../../include/QtCore/QContiguousCacheData ../../include/QtCore/QContiguousCacheTypedData ../../include/QtCore/QContiguousCache ../../include/QtCore/QCryptographicHash ../../include/QtCore/QDate ../../include/QtCore/QTime ../../include/QtCore/QDateTime ../../include/QtCore/QEasingCurve ../../include/QtCore/QElapsedTimer ../../include/QtCore/QHashData ../../include/QtCore/QHashDummyValue ../../include/QtCore/QHashDummyNode ../../include/QtCore/QHashNode ../../include/QtCore/QHash ../../include/QtCore/QMultiHash ../../include/QtCore/QHashIterator ../../include/QtCore/QMutableHashIterator ../../include/QtCore/QLine ../../include/QtCore/QLineF ../../include/QtCore/QLinkedListData ../../include/QtCore/QLinkedListNode ../../include/QtCore/QLinkedList ../../include/QtCore/QLinkedListIterator ../../include/QtCore/QMutableLinkedListIterator ../../include/QtCore/QListData ../../include/QtCore/QList ../../include/QtCore/QListIterator ../../include/QtCore/QMutableListIterator ../../include/QtCore/QSystemLocale ../../include/QtCore/QLocale ../../include/QtCore/QBBSystemLocaleData ../../include/QtCore/QMapData ../../include/QtCore/QMapNode ../../include/QtCore/QMapPayloadNode ../../include/QtCore/QMap ../../include/QtCore/QMultiMap ../../include/QtCore/QMapIterator ../../include/QtCore/QMutableMapIterator ../../include/QtCore/QMargins ../../include/QtCore/QPair ../../include/QtCore/QPoint ../../include/QtCore/QPointF ../../include/QtCore/QQueue ../../include/QtCore/QRect ../../include/QtCore/QRectF ../../include/QtCore/QRegExp ../../include/QtCore/QScopedPointerDeleter ../../include/QtCore/QScopedPointerArrayDeleter ../../include/QtCore/QScopedPointerPodDeleter ../../include/QtCore/QScopedPointer ../../include/QtCore/QScopedArrayPointer ../../include/QtCore/QScopedValueRollback ../../include/QtCore/QSet ../../include/QtCore/QSetIterator ../../include/QtCore/QMutableSetIterator ../../include/QtCore/QSharedData ../../include/QtCore/QSharedDataPointer ../../include/QtCore/QExplicitlySharedDataPointer ../../include/QtCore/QSharedPointer ../../include/QtCore/QWeakPointer ../../include/QtCore/QSize ../../include/QtCore/QSizeF ../../include/QtCore/QStack ../../include/QtCore/QStdWString ../../include/QtCore/QString ../../include/QtCore/QLatin1String ../../include/QtCore/QCharRef ../../include/QtCore/QConstString ../../include/QtCore/QStringRef ../../include/QtCore/QLatin1Literal ../../include/QtCore/QAbstractConcatenable ../../include/QtCore/QConcatenable ../../include/QtCore/QStringBuilder ../../include/QtCore/QStringListIterator ../../include/QtCore/QMutableStringListIterator ../../include/QtCore/QStringList ../../include/QtCore/QStringMatcher ../../include/QtCore/QTextBoundaryFinder ../../include/QtCore/QTimeLine ../../include/QtCore/QVarLengthArray ../../include/QtCore/QVectorData ../../include/QtCore/QVectorTypedData ../../include/QtCore/QVector ../../include/QtCore/QVectorIterator ../../include/QtCore/QMutableVectorIterator
+ SYNCQT.PRIVATE_HEADER_FILES = ../corelib/statemachine/qabstractstate_p.h ../corelib/statemachine/qabstracttransition_p.h ../corelib/statemachine/qeventtransition_p.h ../corelib/statemachine/qhistorystate_p.h ../corelib/statemachine/qsignaleventgenerator_p.h ../corelib/statemachine/qsignaltransition_p.h ../corelib/statemachine/qstate_p.h ../corelib/statemachine/qstatemachine_p.h ../corelib/thread/qmutex_p.h ../corelib/thread/qmutexpool_p.h ../corelib/thread/qorderedmutexlocker_p.h ../corelib/thread/qreadwritelock_p.h ../corelib/thread/qthread_p.h ../corelib/xml/qxmlstream_p.h ../corelib/xml/qxmlutils_p.h ../corelib/concurrent/qfutureinterface_p.h ../corelib/concurrent/qfuturewatcher_p.h ../corelib/concurrent/qthreadpool_p.h ../corelib/kernel/qabstracteventdispatcher_p.h ../corelib/kernel/qabstractitemmodel_p.h ../corelib/kernel/qcore_mac_p.h ../corelib/kernel/qcore_symbian_p.h ../corelib/kernel/qcore_unix_p.h ../corelib/kernel/qcoreapplication_p.h ../corelib/kernel/qcorecmdlineargs_p.h ../corelib/kernel/qcoreglobaldata_p.h ../corelib/kernel/qcrashhandler_p.h ../corelib/kernel/qeventdispatcher_blackberry_p.h ../corelib/kernel/qeventdispatcher_glib_p.h ../corelib/kernel/qeventdispatcher_symbian_p.h ../corelib/kernel/qeventdispatcher_unix_p.h ../corelib/kernel/qeventdispatcher_win_p.h ../corelib/kernel/qfunctions_p.h ../corelib/kernel/qmetaobject_p.h ../corelib/kernel/qobject_p.h ../corelib/kernel/qsharedmemory_p.h ../corelib/kernel/qsystemerror_p.h ../corelib/kernel/qsystemsemaphore_p.h ../corelib/kernel/qtranslator_p.h ../corelib/kernel/qvariant_p.h ../corelib/kernel/qwineventnotifier_p.h ../corelib/plugin/qelfparser_p.h ../corelib/plugin/qfactoryloader_p.h ../corelib/plugin/qlibrary_p.h ../corelib/plugin/qsystemlibrary_p.h ../corelib/global/qnumeric_p.h ../corelib/global/qt_pch.h ../corelib/codecs/qfontlaocodec_p.h ../corelib/codecs/qiconvcodec_p.h ../corelib/codecs/qisciicodec_p.h ../corelib/codecs/qlatincodec_p.h ../corelib/codecs/qsimplecodec_p.h ../corelib/codecs/qtextcodec_p.h ../corelib/codecs/qtsciicodec_p.h ../corelib/codecs/qutfcodec_p.h ../corelib/io/qabstractfileengine_p.h ../corelib/io/qdatastream_p.h ../corelib/io/qdataurl_p.h ../corelib/io/qdir_p.h ../corelib/io/qfile_p.h ../corelib/io/qfileinfo_p.h ../corelib/io/qfilesystemengine_p.h ../corelib/io/qfilesystementry_p.h ../corelib/io/qfilesystemiterator_p.h ../corelib/io/qfilesystemmetadata_p.h ../corelib/io/qfilesystemwatcher_dnotify_p.h ../corelib/io/qfilesystemwatcher_fsevents_p.h ../corelib/io/qfilesystemwatcher_inotify_p.h ../corelib/io/qfilesystemwatcher_kqueue_p.h ../corelib/io/qfilesystemwatcher_p.h ../corelib/io/qfilesystemwatcher_symbian_p.h ../corelib/io/qfilesystemwatcher_win_p.h ../corelib/io/qfsfileengine_iterator_p.h ../corelib/io/qfsfileengine_p.h ../corelib/io/qiodevice_p.h ../corelib/io/qnoncontiguousbytedevice_p.h ../corelib/io/qprocess_p.h ../corelib/io/qresource_iterator_p.h ../corelib/io/qresource_p.h ../corelib/io/qsettings_p.h ../corelib/io/qtldurl_p.h ../corelib/io/qurltlds_p.h ../corelib/io/qwindowspipewriter_p.h ../corelib/animation/qabstractanimation_p.h ../corelib/animation/qanimationgroup_p.h ../corelib/animation/qparallelanimationgroup_p.h ../corelib/animation/qpropertyanimation_p.h ../corelib/animation/qsequentialanimationgroup_p.h ../corelib/animation/qvariantanimation_p.h ../corelib/tools/qbytedata_p.h ../corelib/tools/qdatetime_p.h ../corelib/tools/qharfbuzz_p.h ../corelib/tools/qlocale_data_p.h ../corelib/tools/qlocale_p.h ../corelib/tools/qlocale_tools_p.h ../corelib/tools/qpodlist_p.h ../corelib/tools/qringbuffer_p.h ../corelib/tools/qscopedpointer_p.h ../corelib/tools/qsimd_p.h ../corelib/tools/qtools_p.h ../corelib/tools/qunicodetables_p.h
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch b/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch
new file mode 100644
index 0000000000..f3face5755
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/0033-configure-support-c-0x-standard-for-directfd.patch
@@ -0,0 +1,40 @@
+configure: support c++0x standard for directfd
+
+While directfd upgrade to 1.7.6, it always includes directfb++ utils
+when C++ is used and set c++0x as c++ standard.
+(In git://git.directfb.org/git/directfb/core/DirectFB.git
+commit b444bcae3197be9faf883460dcc239ef757d5922, and commit
+522beeb76f2a8d2dee30d928d2a5955bd06cf25c)
+
+The directfd in qt4 is c++, and there was a build failure:
+...
+| qdirectfbwindowsurface.cpp:336:69: error: in C++98 'rect' must be
+initialized by constructor, not by '{...}'
+| const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
+...
+
+The g++ used c++98 as default c++ standard, we should
+explicitly set c++0x for directfd in qt4.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index 5724bd6..ecc2f8b 100755
+--- a/configure
++++ b/configure
+@@ -6656,6 +6656,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
+ if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
+ QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
++ QT_CFLAGS_DIRECTFB="$QT_CFLAGS_DIRECTFB -std=c++0x"
+ QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
+ elif directfb-config --version >/dev/null 2>&1; then
+ QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
+--
+1.9.1
+
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch b/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch
new file mode 100644
index 0000000000..1f5f00f716
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/Fix-QWSLock-invalid-argument-logs.patch
@@ -0,0 +1,98 @@
+From 52c34001bad85c3032618070b1d6b2a3c6880715 Mon Sep 17 00:00:00 2001
+From: Neil Jerram <n...@ossau.homelinux.net>
+Date: Thu, 8 Nov 2012 08:18:32 +0000
+Subject: [PATCH] Fix QWSLock "invalid argument" logs
+
+There was no known actual problem associated with these logs, but they
+were spamming the log, so I thought it worth trying to understand and
+fix them.
+
+The confusion is that there are two different ways of creating QWSLock
+objects. "QWSLock()" creates an object that creates a new set of
+semaphores, whereas "QWSLock(id)" creates an object that aliases the
+existing set of semaphores with ID id. What seems to happen is that
+each application creates a semaphore set scoped to that
+application (QWSDisplay::Data::clientLock in qapplication_qws.cpp),
+then this semaphore set is passed by complex means to
+places (QWSClientPrivate and QWSMemorySurface) that use the semaphores
+for a short period and then delete their QWSLock objects.
+
+The problem was that the QWSLock destructor always destroyed the
+semaphore set, even when that QWSLock hadn't create the semaphores
+itself, hence making the semaphores invalid for other QWSLock objects
+still referencing the same set.
+
+Clearly a QWSLock object shouldn't destroy the semaphore set if it
+didn't create it itself, and that is confirmed by the fact that one of
+the implementations inside QWSLock already implements this logic, with
+the 'owned' flag. The fix is to implement this for the #ifndef
+QT_POSIX_IPC case - which is what is used in QtMoko - just as is
+already implemented for the #ifdef QT_POSIX_IPC case.
+
+Original patch can be found here:
+ http://www.mail-archive.com/community@lists.openmoko.org/msg65512.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
+ (Removed the commented-out debug statements from the original patch.)
+
+---
+
+diff --git a/src/gui/embedded/qwslock.cpp b/src/gui/embedded/qwslock.cpp
+index 9914a24..1055785 100644
+--- a/src/gui/embedded/qwslock.cpp
++++ b/src/gui/embedded/qwslock.cpp
+@@ -83,9 +83,12 @@ QWSLock::QWSLock(int id) : semId(id)
+ QWSSignalHandler::instance()->addWSLock(this);
+ #endif
+
++ owned = false;
++
+ #ifndef QT_POSIX_IPC
+ if (semId == -1) {
+ semId = semget(IPC_PRIVATE, 3, IPC_CREAT | 0666);
++ owned = true;
+ if (semId == -1) {
+ perror("QWSLock::QWSLock");
+ qFatal("Unable to create semaphore");
+@@ -100,7 +104,6 @@ QWSLock::QWSLock(int id) : semId(id)
+ }
+ #else
+ sems[0] = sems[1] = sems[2] = SEM_FAILED;
+- owned = false;
+
+ if (semId == -1) {
+ // ### generate really unique IDs
+@@ -134,9 +137,11 @@ QWSLock::~QWSLock()
+
+ if (semId != -1) {
+ #ifndef QT_POSIX_IPC
+- qt_semun semval;
+- semval.val = 0;
+- semctl(semId, 0, IPC_RMID, semval);
++ if (owned) {
++ qt_semun semval;
++ semval.val = 0;
++ semctl(semId, 0, IPC_RMID, semval);
++ }
+ semId = -1;
+ #else
+ // emulate the SEM_UNDO behavior for the BackingStore lock
+diff --git a/src/gui/embedded/qwslock_p.h b/src/gui/embedded/qwslock_p.h
+index d324e4f..d867d20 100644
+--- a/src/gui/embedded/qwslock_p.h
++++ b/src/gui/embedded/qwslock_p.h
+@@ -86,8 +86,8 @@ private:
+ int lockCount[2];
+ #ifdef QT_POSIX_IPC
+ sem_t *sems[3];
+- bool owned;
+ #endif
++ bool owned;
+ };
+
+ QT_END_NAMESPACE
+
+--
+1.7.10.4
diff --git a/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf b/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
index 8755031017..be78c249e9 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
+++ b/meta/recipes-qt/qt4/qt4-4.8.6/g++.conf
@@ -5,32 +5,14 @@
QMAKE_COMPILER = gcc
QMAKE_CC = $(OE_QMAKE_CC)
-QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS)
+QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
-QMAKE_CFLAGS_DEPS += -M
-QMAKE_CFLAGS_WARN_ON += -Wall -W
-QMAKE_CFLAGS_WARN_OFF += -w
-QMAKE_CFLAGS_RELEASE +=
-QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
-QMAKE_CFLAGS_STATIC_LIB += -fPIC
-QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
-QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXX = $(OE_QMAKE_CXX)
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS)
-QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
-QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
-QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
-QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
@@ -39,9 +21,6 @@ QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
QMAKE_LINK_C = $(OE_QMAKE_LINK)
QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
-QMAKE_LFLAGS_RELEASE +=
-QMAKE_LFLAGS_DEBUG +=
-QMAKE_LFLAGS_APP +=
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath-link,
diff --git a/meta/recipes-qt/qt4/qt4-embedded.inc b/meta/recipes-qt/qt4/qt4-embedded.inc
index e87de4b379..ef5cf2cf24 100644
--- a/meta/recipes-qt/qt4/qt4-embedded.inc
+++ b/meta/recipes-qt/qt4/qt4-embedded.inc
@@ -9,7 +9,9 @@ QT4EDEPENDS = ""
QT_BASE_LIB ?= "libqt-embedded"
# Set necessary variables in the profile
-SRC_URI += "file://qte.sh"
+SRC_URI += "file://qte.sh \
+ file://0033-configure-support-c-0x-standard-for-directfd.patch \
+"
QT_EMBEDDED_FLAGS ?= " \
-embedded $QT_ARCH \
diff --git a/meta/recipes-qt/qt4/qt4-native.inc b/meta/recipes-qt/qt4/qt4-native.inc
index bb16da666a..70bda7358f 100644
--- a/meta/recipes-qt/qt4/qt4-native.inc
+++ b/meta/recipes-qt/qt4/qt4-native.inc
@@ -18,6 +18,10 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
file://0021-configure-make-qt4-native-work-with-long-building-pa.patch \
+ file://0029-aarch64_arm64_fix_arch_detection.patch \
+ file://0030-aarch64_arm64_qatomic_support.patch \
+ file://0031-aarch64_arm64_mkspecs.patch \
+ file://0032-aarch64_add_header.patch \
file://g++.conf \
file://linux.conf \
"
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index 75a580c25f..09f6d93757 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -134,7 +134,7 @@ FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}"
RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}"
RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}"
-RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " eglibc-gconv-utf-16"
+RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " glibc-gconv-utf-16"
RRECOMMENDS_${QT_BASE_NAME}-demos += " \
${QT_BASE_NAME}-examples \
${QT_BASE_NAME}-plugin-sqldriver-sqlite \
diff --git a/meta/recipes-qt/qt4/qt4_arch.inc b/meta/recipes-qt/qt4/qt4_arch.inc
index c1d35ab726..07512db713 100644
--- a/meta/recipes-qt/qt4/qt4_arch.inc
+++ b/meta/recipes-qt/qt4/qt4_arch.inc
@@ -4,6 +4,7 @@ ARM_INSTRUCTION_SET = "arm"
set_arch() {
case ${TARGET_ARCH} in
+ aarch64) QT_ARCH=aarch64 ;;
arm*) QT_ARCH=arm ;;
i*86*) QT_ARCH=i386 ;;
mips*) QT_ARCH=mips ;;
diff --git a/meta/recipes-sato/images/core-image-sato-sdk.bb b/meta/recipes-sato/images/core-image-sato-sdk.bb
index 6d4b96a1f9..62836f94d3 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk.bb
@@ -6,9 +6,10 @@ form a standalone SDK."
QT4PKG = "qt4-pkgs"
QT4PKG_mips64 = ""
+QT4PKG_mips64n32 = ""
IMAGE_FEATURES += "dev-pkgs tools-sdk ${QT4PKG} \
tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks ssh-server-openssh"
-IMAGE_INSTALL += "kernel-dev"
+IMAGE_INSTALL += "kernel-devsrc"
diff --git a/meta/recipes-sato/midori/midori_0.5.5.bb b/meta/recipes-sato/midori/midori_0.5.5.bb
deleted file mode 100644
index b359037e22..0000000000
--- a/meta/recipes-sato/midori/midori_0.5.5.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "A lightweight web browser"
-HOMEPAGE = "http://www.twotoasts.de/index.php?/pages/midori_summary.html"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-DEPENDS = "webkit-gtk libsoup-2.4 openssl python-native python-docutils-native librsvg-native libnotify libunique"
-
-SRC_URI = "http://www.midori-browser.org/downloads/${BPN}_${PV}_all_.tar.bz2 \
-"
-
-SRC_URI[md5sum] = "b99e87d4b73a4732ed1c1e591f0242ac"
-SRC_URI[sha256sum] = "ca69382a285222a86028abebd73fed1976735883027ff0adc094b627789bbd62"
-
-# midori depends on webkit-gtk, and webkit-gtk can NOT be built on
-# MIPS64 with n32 ABI. So remove it from mips64 n32 temporarily.
-COMPATIBLE_HOST_mips64 = "mips64.*-linux$"
-
-inherit gtk-icon-cache pkgconfig vala pythonnative
-
-do_configure() {
- sed -i -e 's:, shell=False::g' -e s:/usr/X11R6/include::g -e s:/usr/X11R6/lib::g wscript
- ./configure \
- --prefix=${prefix} \
- --bindir=${bindir} \
- --sbindir=${sbindir} \
- --libexecdir=${libexecdir} \
- --datadir=${datadir} \
- --sysconfdir=${sysconfdir} \
- --sharedstatedir=${sharedstatedir} \
- --localstatedir=${localstatedir} \
- --libdir=${libdir} \
- --includedir=${includedir} \
- --infodir=${infodir} \
- --mandir=${mandir} \
- --disable-gtk3 \
- --disable-zeitgeist \
-}
-
-PARALLEL_MAKE = ""
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_install() {
- oe_runmake DESTDIR=${D} install
-}
-
-RRECOMMENDS_${PN} += "glib-networking ca-certificates gnome-icon-theme"
-
-FILES_${PN}-dev += "${datadir}/vala/vapi"
diff --git a/meta/recipes-sato/midori/midori_0.5.8.bb b/meta/recipes-sato/midori/midori_0.5.8.bb
new file mode 100644
index 0000000000..3aabdd4385
--- /dev/null
+++ b/meta/recipes-sato/midori/midori_0.5.8.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A lightweight web browser"
+HOMEPAGE = "http://midori-browser.org/"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+DEPENDS = "webkit-gtk libsoup-2.4 openssl python-native python-docutils-native librsvg-native libnotify libxscrnsaver"
+
+SRC_URI = "https://launchpad.net/midori/trunk/0.5.8/+download/${BPN}-${PV}.tar.bz2;subdir=${BPN}-${PV}"
+SRC_URI[md5sum] = "b89e25e74199d705e74767499a415976"
+SRC_URI[sha256sum] = "af19135fd4c4b04345df4d3592e7939c20f9b40eaca24550e6cb619751aa9381"
+
+# midori depends on webkit-gtk, and webkit-gtk can NOT be built on
+# MIPS64 with n32 ABI. So remove it from mips64 n32 temporarily.
+COMPATIBLE_HOST_mips64n32 = "null"
+
+inherit gtk-icon-cache pkgconfig vala pythonnative cmake
+
+EXTRA_OECMAKE = " \
+ -DCMAKE_INSTALL_PREFIX=${prefix} \
+ -DUSE_ZEITGEIST=0 \
+"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+RRECOMMENDS_${PN} += "glib-networking ca-certificates gnome-icon-theme"
+
+FILES_${PN} += "${datadir}/appdata"
diff --git a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 4ec5e8961c..bc3e0fd260 100644
--- a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -6,16 +6,11 @@ SUMMARY = "Sato desktop"
LICENSE = "MIT"
PR = "r33"
-inherit packagegroup
-
PACKAGE_ARCH = "${MACHINE_ARCH}"
-PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
+inherit packagegroup
-# For backwards compatibility after rename
-RPROVIDES_${PN} = "task-core-x11-sato"
-RREPLACES_${PN} = "task-core-x11-sato"
-RCONFLICTS_${PN} = "task-core-x11-sato"
+PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
RDEPENDS_${PN} = "\
${PN}-base \
diff --git a/meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb b/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
index 14c5cd5d63..14f58ae68f 100644
--- a/meta/recipes-sato/pcmanfm/pcmanfm_1.1.2.bb
+++ b/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
@@ -13,15 +13,15 @@ DEPENDS_append_poky = " libowl"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.gz \
+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] = "41104699e653ff2b0a9a9e80a257d6a2"
-SRC_URI[sha256sum] = "23ee33b34066ac83ce9a98bc9930049e69839438fb60489bd453bec8c2068950"
+SRC_URI[md5sum] = "c993402d407b0a3fc076f842ac1bc5c9"
+SRC_URI[sha256sum] = "cfa8d82fc63be147045174bef074807e1e32ce8c6bf4dbd8fad49e260bcf6380"
inherit autotools pkgconfig
@@ -31,3 +31,5 @@ do_install_append () {
install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
}
+
+FILES_${PN} += "${libdir}/pcmanfm"
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
new file mode 100644
index 0000000000..d246feeb09
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -0,0 +1,52 @@
+gtk.c: fix compiling failure with option -g -O
+
+There were compiling failure with option -g -O
+...
+././gtk.c: In function 'configure_area':
+././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ cairo_set_source_rgb(cr,
+ ^
+././gtk.c:384:14: note: 'cr' was declared here
+ cairo_t *cr;
+ ^
+././gtk.c: In function 'main':
+././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ fprintf(stderr, "%s: %s\n", pname, error);
+ ^
+cc1: all warnings being treated as errors
+...
+
+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(-)
+
+diff --git a/gtk.c b/gtk.c
+index a2eba2c..c54bf63 100644
+--- a/gtk.c
++++ b/gtk.c
+@@ -381,7 +381,7 @@ static void clear_backing_store(frontend *fe)
+
+ static void setup_backing_store(frontend *fe)
+ {
+- cairo_t *cr;
++ cairo_t *cr = NULL;
+ int i;
+
+ fe->pixmap = gdk_pixmap_new(fe->area->window, fe->pw, fe->ph, -1);
+@@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
+ 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
+
diff --git a/meta/recipes-sato/puzzles/puzzles_r10116.bb b/meta/recipes-sato/puzzles/puzzles_r10116.bb
index ef5392b68f..6ee4d962b2 100644
--- a/meta/recipes-sato/puzzles/puzzles_r10116.bb
+++ b/meta/recipes-sato/puzzles/puzzles_r10116.bb
@@ -7,7 +7,9 @@ MOD_PV = "${@d.getVar('PV',1)[1:]}"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
-SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV}"
+SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
+ file://fix-compiling-failure-with-option-g-O.patch \
+"
S = "${WORKDIR}/${BPN}"
diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb b/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
new file mode 100644
index 0000000000..239fbeda4d
--- /dev/null
+++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
@@ -0,0 +1,65 @@
+SECTION = "x11/utils"
+SUMMARY = "rxvt terminal clone supporting unicode"
+DESCRIPTION = "rxvt-unicode is a clone of the well known \
+terminal emulator rxvt, modified to store text in Unicode \
+(either UCS-2 or UCS-4) and to use locale-correct input and \
+output. It also supports mixing multiple fonts at the \
+same time, including Xft fonts."
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/main.C;beginline=1;endline=31;md5=7dac0395806570856e037f98aba8513b"
+
+DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf"
+
+SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
+ file://xwc.patch \
+ file://rxvt.desktop \
+ file://rxvt.png"
+
+SRC_URI[md5sum] = "a9a06c608258c5fd247c3725d8f44582"
+SRC_URI[sha256sum] = "75270ed72bc5895a64a1d7392bf45a622204192371c3965bd3dd978dc088956b"
+
+inherit autotools update-alternatives
+
+PROVIDES = "virtual/x-terminal-emulator"
+ALTERNATIVE_${PN} = "x-terminal-emulator"
+ALTERNATIVE_TARGET[x-terminal-emulator] = "${bindir}/rxvt"
+
+CFLAGS_append = " -fpermissive"
+
+EXTRA_OECONF = "--enable-menubar --enable-xim \
+ --enable-utmp --enable-wtmp --enable-lastlog \
+ --disable-strings --with-term=rxvt --enable-keepscrolling \
+ --enable-xft --with-name=rxvt --enable-frills \
+ --enable-swapscreen --enable-transparency \
+ --with-codesets=eu \
+ --enable-cursor-blink --enable-pointer-blank \
+ --enable-text-blink --enable-rxvt-scroll \
+ --enable-combining --enable-shared \
+ --enable-xgetdefault \
+ --disable-perl \
+ --with-x=${STAGING_DIR_HOST}${prefix}"
+
+do_configure_prepend () {
+ if [ ! -e ${S}/acinclude.m4 ]; then
+ cp ${S}/aclocal.m4 ${S}/acinclude.m4
+ fi
+}
+
+do_compile_prepend () {
+ echo '#define UTMP_FILE "${localstatedir}/run/utmp"' >> config.h
+ echo '#define WTMP_FILE "${localstatedir}/log/wtmp"' >> config.h
+ echo '#define LASTLOG_FILE "${localstatedir}/log/lastlog"' >> config.h
+ echo '#define HAVE_XLOCALE 1' >> config.h
+}
+
+do_install_append () {
+ install -d ${D}/${datadir}
+ install -d ${D}/${datadir}/applications
+ install -d ${D}/${datadir}/pixmaps/
+
+ install -m 0644 ${WORKDIR}/rxvt.png ${D}/${datadir}/pixmaps
+ install -m 0644 ${WORKDIR}/rxvt.desktop ${D}/${datadir}/applications
+}
+
+FILES_${PN} += "${datadir}/applications/rxvt.desktop ${datadir}/pixmaps/rxvt.png"
diff --git a/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb b/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
index 29f8a7993f..920e1a0a76 100644
--- a/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
+++ b/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb
@@ -32,7 +32,7 @@ SRC_URI[md5sum] = "dcbf9d5e2e6391f857c29a57528b32a6"
SRC_URI[sha256sum] = "ada02d636af61aed38f142d3cded662d141ce71264f624c4eb873621a74cc9e7"
# webkit-gtk can NOT be built on MIPS64 with n32 ABI
-COMPATIBLE_HOST_mips64 = "mips64.*-linux$"
+COMPATIBLE_HOST_mips64n32 = "null"
inherit autotools lib_package gtk-doc pkgconfig
diff --git a/meta/recipes-support/apr/apr-util_1.5.3.bb b/meta/recipes-support/apr/apr-util_1.5.4.bb
index 063a787396..ac01b63ecd 100644
--- a/meta/recipes-support/apr/apr-util_1.5.3.bb
+++ b/meta/recipes-support/apr/apr-util_1.5.4.bb
@@ -15,8 +15,8 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
file://run-ptest \
"
-SRC_URI[md5sum] = "71a11d037240b292f824ba1eb537b4e3"
-SRC_URI[sha256sum] = "76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743"
+SRC_URI[md5sum] = "866825c04da827c6e5f53daff5569f42"
+SRC_URI[sha256sum] = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19"
EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--without-odbc \
@@ -28,22 +28,25 @@ EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
--with-expat=${STAGING_DIR_HOST}${prefix}"
-inherit autotools-brokensep lib_package binconfig
+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 ${S}/build/rules.mk
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
fi
}
do_configure_prepend_class-native() {
- cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${S}/build/rules.mk
+ 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}#" ${S}/build/rules.mk
+ 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}#" ${S}/build/rules.mk
+ sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
}
FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so"
@@ -54,7 +57,7 @@ FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a"
inherit ptest
do_compile_ptest() {
- cd ${S}/test
+ cd ${B}/test
oe_runmake
}
@@ -62,6 +65,6 @@ do_install_ptest() {
t=${D}${PTEST_PATH}/test
mkdir $t
for i in testall data; do \
- cp -r ${S}/test/$i $t; \
+ cp -r ${B}/test/$i $t; \
done
}
diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb
index 2720b523f3..a27b2338d1 100644
--- a/meta/recipes-support/apr/apr_1.5.1.bb
+++ b/meta/recipes-support/apr/apr_1.5.1.bb
@@ -32,11 +32,17 @@ CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
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.
@@ -85,3 +91,5 @@ do_install_ptest() {
cp ${S}/test/testall $t/
cp ${S}/test/tryread $t/
}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
index 56dabd38eb..a4f0e140b2 100644
--- a/meta/recipes-support/aspell/aspell_0.60.6.1.bb
+++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -15,6 +15,8 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
+RDEPENDS_${PN}-utils += "perl"
+
FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
diff --git a/meta/recipes-support/atk/at-spi2-atk_2.12.0.bb b/meta/recipes-support/atk/at-spi2-atk_2.14.1.bb
index db6dc9032c..23913899ce 100644
--- a/meta/recipes-support/atk/at-spi2-atk_2.12.0.bb
+++ b/meta/recipes-support/atk/at-spi2-atk_2.14.1.bb
@@ -5,8 +5,8 @@ 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] = "aafc5e1bb17cd3ad440f6350e7a021c1"
-SRC_URI[sha256sum] = "3b5467c9f169812bc36a4245355b7deedea0a62eb22153df96ced88dcd1c3633"
+SRC_URI[md5sum] = "5c6a085249a6d4e792ead86dca183504"
+SRC_URI[sha256sum] = "058f34ea60edf0a5f831c9f2bdd280fe95c1bcafb76e466e44aa0fb356d17bcb"
DEPENDS = "dbus glib-2.0 atk at-spi2-core"
diff --git a/meta/recipes-support/atk/at-spi2-core_2.12.0.bb b/meta/recipes-support/atk/at-spi2-core_2.14.1.bb
index 31e133fe43..8d01124d01 100644
--- a/meta/recipes-support/atk/at-spi2-core_2.12.0.bb
+++ b/meta/recipes-support/atk/at-spi2-core_2.14.1.bb
@@ -5,13 +5,14 @@ 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] = "b12ad0e0924706f5e7f51216241068ef"
-SRC_URI[sha256sum] = "db550edd98e53b4252521459c2dcaf0f3b060a9bad52489b9dbadbaedad3fb89"
+
+SRC_URI[md5sum] = "a37993cc50d90465c9aeed95e2ac439a"
+SRC_URI[sha256sum] = "eef9660b14fdf0fb1f30d1be7c72d591fa7cbb87b00ca3a444425712f46ce657"
DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
inherit autotools gtk-doc pkgconfig
-EXTRA_OECONF = "--disable-introspection --disable-xevie"
+EXTRA_OECONF = "--disable-introspection --disable-xevie --with-dbus-daemondir=${bindir}"
FILES_${PN} += "${datadir}/dbus-1/services/*.service"
diff --git a/meta/recipes-support/atk/atk_2.12.0.bb b/meta/recipes-support/atk/atk_2.14.0.bb
index 9112bbb6c2..e0e9be3be9 100644
--- a/meta/recipes-support/atk/atk_2.12.0.bb
+++ b/meta/recipes-support/atk/atk_2.14.0.bb
@@ -5,8 +5,8 @@ SECTION = "x11/libs"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://atk/atkutil.c;endline=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \
- file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7"
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
DEPENDS = "glib-2.0"
@@ -14,8 +14,8 @@ inherit gnomebase gtk-doc
GNOME_COMPRESS_TYPE = "xz"
-SRC_URI[archive.md5sum] = "930238dec55fdbf8eda9975b44f07b76"
-SRC_URI[archive.sha256sum] = "48a8431974639c5a59c24fcd3ece1a19709872d5dfe78907524d9f5e9993f18f"
+SRC_URI[archive.md5sum] = "ecb7ca8469a5650581b1227d78051b8b"
+SRC_URI[archive.sha256sum] = "2875cc0b32bfb173c066c22a337f79793e0c99d2cc5e81c4dac0d5a523b8fbad"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
index bc9fd6dda3..b2bc8bac28 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -36,4 +36,4 @@ do_install_ptest() {
cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
}
-RDEPENDS_${PN}-ptest = "bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
+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/attr.inc b/meta/recipes-support/attr/attr.inc
index c37d34f23d..28c750f987 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -35,3 +35,5 @@ do_install_ptest() {
}
RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+
+BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index 72f623e593..b17e9b10a4 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -7,7 +7,7 @@ inherit autotools-brokensep gettext
# the package comes with a custom config.h.in, it cannot be
# overwritten by autoheader
-export AUTOHEADER = "true"
+EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
EXTRA_OECONF_append_class-native = " --enable-gettext=no"
diff --git a/meta/recipes-support/bdwgc/bdwgc_7.2d.bb b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
index 2ba7aa5a87..23ec95419c 100644
--- a/meta/recipes-support/bdwgc/bdwgc_7.2d.bb
+++ b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
@@ -16,17 +16,15 @@ DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
calls, and removing free calls."
-HOMEPAGE = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/"
+HOMEPAGE = "http://www.hboehm.info/gc/"
SECTION = "devel"
-LICENSE = "MIT & FSF-Unlimited & GPL-2.0"
-LIC_FILES_CHKSUM = "file://README.QUICK;md5=9b9dd874f6940641b6ab19893ee8f1cc \
- file://doc/README;md5=92e7dd0334d1f672b699cd0aca08bef0 \
- file://libatomic_ops/doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
-SRC_URI = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${PV}.tar.gz"
+SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz"
-SRC_URI[md5sum] = "91340b28c61753a789eb6077675d87d2"
-SRC_URI[sha256sum] = "d9fe0ae8650d43746a48bfb394cab01a319f3809cee19f8ebd16aa985b511c5e"
+SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
+SRC_URI[sha256sum] = "63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2"
FILES_${PN}-doc = "/usr/share"
REAL_PV = "${@[d.getVar('PV',1)[:-1], d.getVar('PV',1)][(d.getVar('PV',1)[-1]).isdigit()]}"
@@ -35,4 +33,9 @@ S = "${WORKDIR}/gc-${REAL_PV}"
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,libatomics-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
new file mode 100644
index 0000000000..b3298ce2db
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
@@ -0,0 +1,34 @@
+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/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest
index 5bc7460be9..2ee294d991 100644
--- a/meta/recipes-support/beecrypt/beecrypt/run-ptest
+++ b/meta/recipes-support/beecrypt/beecrypt/run-ptest
@@ -1,5 +1,5 @@
#!/bin/sh
cd tests
-for i in `ls`; do ./$i; if [ $? == 0 ]; then echo "PASS: $i"; \
+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
index 209b92e653..1e626f154c 100644
--- a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
+++ b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
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"
diff --git a/meta/recipes-support/boost/bjam-native_1.55.0.bb b/meta/recipes-support/boost/bjam-native_1.57.0.bb
index d85d1a96cb..d85d1a96cb 100644
--- a/meta/recipes-support/boost/bjam-native_1.55.0.bb
+++ b/meta/recipes-support/boost/bjam-native_1.57.0.bb
diff --git a/meta/recipes-support/boost/boost-1.55.0.inc b/meta/recipes-support/boost/boost-1.57.0.inc
index 7daadb6c9e..809419dbac 100644
--- a/meta/recipes-support/boost/boost-1.55.0.inc
+++ b/meta/recipes-support/boost/boost-1.57.0.inc
@@ -13,7 +13,7 @@ BOOST_P = "boost_${BOOST_VER}"
SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
-SRC_URI[md5sum] = "d6eef4b4cacb2183f2bf265a5a03a354"
-SRC_URI[sha256sum] = "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52"
+SRC_URI[md5sum] = "1be49befbdd9a5ce9def2983ba3e7b76"
+SRC_URI[sha256sum] = "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967"
S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 0a44d79746..6b42133aed 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -5,6 +5,8 @@ DEPENDS = "bjam-native zlib bzip2"
ARM_INSTRUCTION_SET = "arm"
BOOST_LIBS = "\
+ atomic \
+ chrono \
date_time \
filesystem \
graph \
@@ -90,7 +92,8 @@ EQD = '\"'
#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
-BJAM_TOOLS = "-sTOOLS=gcc \
+BJAM_TOOLS = "--ignore-site-config \
+ '-sTOOLS=gcc' \
'-sGCC=${CC} '${BJAM_CONF} \
'-sGXX=${CXX} '${BJAM_CONF} \
'-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
@@ -106,21 +109,29 @@ BJAM_TOOLS = "-sTOOLS=gcc \
def get_boost_parallel_make(bb, d):
pm = d.getVar('PARALLEL_MAKE', True)
if pm:
- # people are usually using "-jN" or "-j N", but let it work with something else appended to it
- import re
- pm_prefix = re.search("\D+", pm)
- pm_val = re.search("\d+", pm)
- if pm_prefix is None or pm_val is None:
- bb.error("Unable to analyse format of PARALLEL_MAKE variable: %s" % pm)
- pm_nval = min(64, int(pm_val.group(0)))
- return pm_prefix.group(0) + str(pm_nval) + pm[pm_val.end():]
- else:
- return ""
+ # 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(bb, d)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
${BJAM_TOOLS} \
- -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam \
+ -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
--builddir=${S}/${TARGET_SYS} \
--disable-icu \
${BJAM_EXTRA}'
@@ -132,12 +143,12 @@ do_boostconfig() {
cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
- if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/v2/user-config.jam
+ if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/example/user-config.jam
then
- echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/v2/user-config.jam
+ echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
fi
- echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/v2/user-config.jam
+ echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
sed -i '/^using python/d' project-config.jam
diff --git a/meta/recipes-support/boost/boost_1.55.0.bb b/meta/recipes-support/boost/boost_1.55.0.bb
deleted file mode 100644
index b199c88577..0000000000
--- a/meta/recipes-support/boost/boost_1.55.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include boost-${PV}.inc
-include boost.inc
-
-SRC_URI += "file://arm-intrinsics.patch"
diff --git a/meta/recipes-support/boost/boost_1.57.0.bb b/meta/recipes-support/boost/boost_1.57.0.bb
new file mode 100644
index 0000000000..c09d5f431f
--- /dev/null
+++ b/meta/recipes-support/boost/boost_1.57.0.bb
@@ -0,0 +1,6 @@
+include boost-${PV}.inc
+include boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+"
diff --git a/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 0000000000..ad879d466b
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+--- ConsoleKit-0.4.6.orig/configure.ac
++++ ConsoleKit-0.4.6/configure.ac
+@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+
+-PKG_CHECK_MODULES(POLKIT,
+- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+- have_polkit=yes,
+- have_polkit=no)
++AC_ARG_WITH([polkit],
++ [AS_HELP_STRING([--with-polkit],
++ [support PolicyKit @<:@default=check@:>@])],
++ [],
++ [with_polkit=check])
++
++AS_IF([test "x$with_polkit" != xno],
++ [PKG_CHECK_MODULES(POLKIT,
++ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
++ have_polkit=yes,
++ [if test "x$with_polkit" != xcheck; then
++ AC_MSG_FAILURE(
++ [--with-polkit was given, but test for polkit failed])
++ else
++ have_polkit=no
++ fi
++ ])])
++
+ if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+ fi
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 98516166cf..dfbd11c2d1 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -6,13 +6,15 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3"
-DEPENDS = "glib-2.0 dbus dbus-glib virtual/libx11"
+DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
RDEPENDS_${PN} += "base-files"
inherit autotools pkgconfig
SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
- file://sepbuildfix.patch"
+ file://sepbuildfix.patch \
+ file://add-polkit-configure-argument.patch \
+"
SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
@@ -23,8 +25,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
-# No option to turn it on or off, so rely on the build dependency for now.
-PACKAGECONFIG[policykit] = ",,polkit"
+PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
diff --git a/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch b/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch
deleted file mode 100644
index e4b8fe2ab6..0000000000
--- a/meta/recipes-support/curl/curl/remove_inappropriate_file_from_rel.patch
+++ /dev/null
@@ -1,8203 +0,0 @@
-Upstream-Status: Backport [to be fixed in 7.37.0]
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-
-diff -ruN a/src/tool_hugehelp.c b/src/tool_hugehelp.c
---- a/src/tool_hugehelp.c 2014-03-25 11:29:49.000000000 +0100
-+++ b/src/tool_hugehelp.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,8196 +0,0 @@
--#include "tool_setup.h"
--#ifndef HAVE_LIBZ
--/*
-- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: Tue Mar 25 11:29:49 2014
-- */
--#ifdef USE_MANUAL
--#include "tool_hugehelp.h"
--void hugehelp(void)
--{
-- fputs(
--" _ _ ____ _\n"
--" Project ___| | | | _ \\| |\n"
--" / __| | | | |_) | |\n"
--" | (__| |_| | _ <| |___\n"
--" \\___|\\___/|_| \\_\\_____|\n"
--"\n"
--"NAME\n"
--" curl - transfer a URL\n"
--"\n"
--"SYNOPSIS\n"
--" curl [options] [URL...]\n"
--"\n"
--"DESCRIPTION\n"
--" curl is a tool to transfer data from or to a server, using one of the\n"
--" supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,\n"
--, stdout);
-- fputs(
--" IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,\n"
--" TELNET and TFTP). The command is designed to work without user inter-\n"
--" action.\n"
--"\n"
--" curl offers a busload of useful tricks like proxy support, user authen-\n"
--" tication, FTP upload, HTTP post, SSL connections, cookies, file trans-\n"
--" fer resume, Metalink, and more. As you will see below, the number of\n"
--" features will make your head spin!\n"
--"\n"
--, stdout);
-- fputs(
--" curl is powered by libcurl for all transfer-related features. See\n"
--" libcurl(3) for details.\n"
--"\n"
--"URL\n"
--" The URL syntax is protocol-dependent. You'll find a detailed descrip-\n"
--" tion in RFC 3986.\n"
--"\n"
--" You can specify multiple URLs or parts of URLs by writing part sets\n"
--" within braces as in:\n"
--"\n"
--" http://site.{one,two,three}.com\n"
--"\n"
--" or you can get sequences of alphanumeric series by using [] as in:\n"
--"\n"
--" ftp://ftp.numericals.com/file[1-100].txt\n"
--, stdout);
-- fputs(
--" ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)\n"
--" ftp://ftp.letters.com/file[a-z].txt\n"
--"\n"
--" Nested sequences are not supported, but you can use several ones next\n"
--" to each other:\n"
--"\n"
--" http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html\n"
--"\n"
--" You can specify any amount of URLs on the command line. They will be\n"
--" fetched in a sequential manner in the specified order.\n"
--"\n"
--, stdout);
-- fputs(
--" You can specify a step counter for the ranges to get every Nth number\n"
--" or letter:\n"
--"\n"
--" http://www.numericals.com/file[1-100:10].txt\n"
--" http://www.letters.com/file[a-z:2].txt\n"
--"\n"
--" If you specify URL without protocol:// prefix, curl will attempt to\n"
--" guess what protocol you might want. It will then default to HTTP but\n"
--" try other protocols based on often-used host name prefixes. For exam-\n"
--, stdout);
-- fputs(
--" ple, for host names starting with \"ftp.\" curl will assume you want to\n"
--" speak FTP.\n"
--"\n"
--" curl will do its best to use what you pass to it as a URL. It is not\n"
--" trying to validate it as a syntactically correct URL by any means but\n"
--" is instead very liberal with what it accepts.\n"
--"\n"
--" curl will attempt to re-use connections for multiple file transfers, so\n"
--" that getting many files from the same server will not do multiple con-\n"
--, stdout);
-- fputs(
--" nects / handshakes. This improves speed. Of course this is only done on\n"
--" files specified on a single command line and cannot be used between\n"
--" separate curl invokes.\n"
--"\n"
--"PROGRESS METER\n"
--" curl normally displays a progress meter during operations, indicating\n"
--" the amount of transferred data, transfer speeds and estimated time\n"
--" left, etc.\n"
--"\n"
--" curl displays this data to the terminal by default, so if you invoke\n"
--, stdout);
-- fputs(
--" curl to do an operation and it is about to write data to the terminal,\n"
--" it disables the progress meter as otherwise it would mess up the output\n"
--" mixing progress meter and response data.\n"
--"\n"
--" If you want a progress meter for HTTP POST or PUT requests, you need to\n"
--" redirect the response output to a file, using shell redirect (>), -o\n"
--" [file] or similar.\n"
--"\n"
--" It is not the same case for FTP upload as that operation does not spit\n"
--, stdout);
-- fputs(
--" out any response data to the terminal.\n"
--"\n"
--" If you prefer a progress \"bar\" instead of the regular meter, -# is your\n"
--" friend.\n"
--"OPTIONS\n"
--" Options start with one or two dashes. Many of the options require an\n"
--" addition value next to it.\n"
--"\n"
--" The short \"single-dash\" form of the options, -d for example, may be\n"
--" used with or without a space between it and its value, although a space\n"
--" is a recommended separator. The long \"double-dash\" form, --data for\n"
--, stdout);
-- fputs(
--" example, requires a space between it and its value.\n"
--"\n"
--" Short version options that don't need any additional values can be used\n"
--" immediately next to each other, like for example you can specify all\n"
--" the options -O, -L and -v at once as -OLv.\n"
--"\n"
--" In general, all boolean options are enabled with --option and yet again\n"
--" disabled with --no-option. That is, you use the exact same option name\n"
--, stdout);
-- fputs(
--" but prefix it with \"no-\". However, in this list we mostly only list and\n"
--" show the --option version of them. (This concept with --no options was\n"
--" added in 7.19.0. Previously most options were toggled on/off on\n"
--" repeated use of the same command line option.)\n"
--"\n"
--" -#, --progress-bar\n"
--" Make curl display progress as a simple progress bar instead of\n"
--" the standard, more informational, meter.\n"
--"\n"
--" -:, --next\n"
--, stdout);
-- fputs(
--" Tells curl to use a separate operation for the following URL and\n"
--" associated options. This allows you to send several URL\n"
--" requests, each with their own specific options, for example,\n"
--" such as different user names or custom requests for each. (Added\n"
--" in 7.36.0)\n"
--"\n"
--" -0, --http1.0\n"
--" (HTTP) Tells curl to use HTTP version 1.0 instead of using its\n"
--" internally preferred: HTTP 1.1.\n"
--"\n"
--, stdout);
-- fputs(
--" --http1.1\n"
--" (HTTP) Tells curl to use HTTP version 1.1. This is the internal\n"
--" default version. (Added in 7.33.0)\n"
--"\n"
--" --http2\n"
--" (HTTP) Tells curl to issue its requests using HTTP 2. This\n"
--" requires that the underlying libcurl was built to support it.\n"
--" (Added in 7.33.0)\n"
--"\n"
--" --no-npn\n"
--" Disable the NPN TLS extension. NPN is enabled by default if\n"
--, stdout);
-- fputs(
--" libcurl was built with an SSL library that supports NPN. NPN is\n"
--" used by a libcurl that supports HTTP 2 to negotiate HTTP 2 sup-\n"
--" port with the server during https sessions.\n"
--"\n"
--" (Added in 7.36.0)\n"
--"\n"
--" --no-alpn\n"
--" Disable the ALPN TLS extension. ALPN is enabled by default if\n"
--" libcurl was built with an SSL library that supports ALPN. ALPN\n"
--, stdout);
-- fputs(
--" is used by a libcurl that supports HTTP 2 to negotiate HTTP 2\n"
--" support with the server during https sessions.\n"
--"\n"
--" (Added in 7.36.0)\n"
--"\n"
--" -1, --tlsv1\n"
--" (SSL) Forces curl to use TLS version 1.x when negotiating with a\n"
--" remote TLS server. You can use options --tlsv1.0, --tlsv1.1,\n"
--" and --tlsv1.2 to control the TLS version more precisely (if the\n"
--" SSL backend in use supports such a level of control).\n"
--"\n"
--, stdout);
-- fputs(
--" -2, --sslv2\n"
--" (SSL) Forces curl to use SSL version 2 when negotiating with a\n"
--" remote SSL server.\n"
--"\n"
--" -3, --sslv3\n"
--" (SSL) Forces curl to use SSL version 3 when negotiating with a\n"
--" remote SSL server.\n"
--"\n"
--" -4, --ipv4\n"
--" If curl is capable of resolving an address to multiple IP ver-\n"
--" sions (which it is if it is IPv6-capable), this option tells\n"
--" curl to resolve names to IPv4 addresses only.\n"
--, stdout);
-- fputs(
--"\n"
--" -6, --ipv6\n"
--" If curl is capable of resolving an address to multiple IP ver-\n"
--" sions (which it is if it is IPv6-capable), this option tells\n"
--" curl to resolve names to IPv6 addresses only.\n"
--"\n"
--" -a, --append\n"
--" (FTP/SFTP) When used in an upload, this will tell curl to append\n"
--" to the target file instead of overwriting it. If the file\n"
--" doesn't exist, it will be created. Note that this flag is\n"
--, stdout);
-- fputs(
--" ignored by some SSH servers (including OpenSSH).\n"
--"\n"
--" -A, --user-agent <agent string>\n"
--" (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
--" Some badly done CGIs fail if this field isn't set to\n"
--" \"Mozilla/4.0\". To encode blanks in the string, surround the\n"
--" string with single quote marks. This can also be set with the\n"
--" -H, --header option of course.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --anyauth\n"
--" (HTTP) Tells curl to figure out authentication method by itself,\n"
--" and use the most secure one the remote site claims to support.\n"
--" This is done by first doing a request and checking the response-\n"
--" headers, thus possibly inducing an extra network round-trip.\n"
--" This is used instead of setting a specific authentication\n"
--, stdout);
-- fputs(
--" method, which you can do with --basic, --digest, --ntlm, and\n"
--" --negotiate.\n"
--"\n"
--" Note that using --anyauth is not recommended if you do uploads\n"
--" from stdin, since it may require data to be sent twice and then\n"
--" the client must be able to rewind. If the need should arise when\n"
--" uploading from stdin, the upload operation will fail.\n"
--"\n"
--" -b, --cookie <name=data>\n"
--, stdout);
-- fputs(
--" (HTTP) Pass the data to the HTTP server as a cookie. It is sup-\n"
--" posedly the data previously received from the server in a \"Set-\n"
--" Cookie:\" line. The data should be in the format \"NAME1=VALUE1;\n"
--" NAME2=VALUE2\".\n"
--"\n"
--" If no '=' symbol is used in the line, it is treated as a file-\n"
--" name to use to read previously stored cookie lines from, which\n"
--, stdout);
-- fputs(
--" should be used in this session if they match. Using this method\n"
--" also activates the \"cookie parser\" which will make curl record\n"
--" incoming cookies too, which may be handy if you're using this in\n"
--" combination with the -L, --location option. The file format of\n"
--" the file to read cookies from should be plain HTTP headers or\n"
--" the Netscape/Mozilla cookie file format.\n"
--"\n"
--, stdout);
-- fputs(
--" NOTE that the file specified with -b, --cookie is only used as\n"
--" input. No cookies will be stored in the file. To store cookies,\n"
--" use the -c, --cookie-jar option or you could even save the HTTP\n"
--" headers to a file using -D, --dump-header!\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -B, --use-ascii\n"
--" (FTP/LDAP) Enable ASCII transfer. For FTP, this can also be\n"
--, stdout);
-- fputs(
--" enforced by using an URL that ends with \";type=A\". This option\n"
--" causes data sent to stdout to be in text mode for win32 systems.\n"
--"\n"
--" --basic\n"
--" (HTTP) Tells curl to use HTTP Basic authentication. This is the\n"
--" default and this option is usually pointless, unless you use it\n"
--" to override a previously set option that sets a different\n"
--" authentication method (such as --ntlm, --digest, or --negoti-\n"
--, stdout);
-- fputs(
--" ate).\n"
--"\n"
--" -c, --cookie-jar <file name>\n"
--" (HTTP) Specify to which file you want curl to write all cookies\n"
--" after a completed operation. Curl writes all cookies previously\n"
--" read from a specified file as well as all cookies received from\n"
--" remote server(s). If no cookies are known, no file will be writ-\n"
--" ten. The file will be written using the Netscape cookie file\n"
--, stdout);
-- fputs(
--" format. If you set the file name to a single dash, \"-\", the\n"
--" cookies will be written to stdout.\n"
--"\n"
--" This command line option will activate the cookie engine that\n"
--" makes curl record and use cookies. Another way to activate it is\n"
--" to use the -b, --cookie option.\n"
--"\n"
--" If the cookie jar can't be created or written to, the whole curl\n"
--" operation won't fail or even report an error clearly. Using -v\n"
--, stdout);
-- fputs(
--" will get a warning displayed, but that is the only visible feed-\n"
--" back you get about this possibly lethal situation.\n"
--"\n"
--" If this option is used several times, the last specified file\n"
--" name will be used.\n"
--"\n"
--" -C, --continue-at <offset>\n"
--" Continue/Resume a previous file transfer at the given offset.\n"
--" The given offset is the exact number of bytes that will be\n"
--, stdout);
-- fputs(
--" skipped, counting from the beginning of the source file before\n"
--" it is transferred to the destination. If used with uploads, the\n"
--" FTP server command SIZE will not be used by curl.\n"
--"\n"
--" Use \"-C -\" to tell curl to automatically find out where/how to\n"
--" resume the transfer. It then uses the given output/input files\n"
--" to figure that out.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--, stdout);
-- fputs(
--" --ciphers <list of ciphers>\n"
--" (SSL) Specifies which ciphers to use in the connection. The list\n"
--" of ciphers must specify valid ciphers. Read up on SSL cipher\n"
--" list details on this URL:\n"
--" http://www.openssl.org/docs/apps/ciphers.html\n"
--"\n"
--" NSS ciphers are done differently than OpenSSL and GnuTLS. The\n"
--" full list of NSS ciphers is in the NSSCipherSuite entry at this\n"
--, stdout);
-- fputs(
--" URL: http://git.fedora-\n"
--" hosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --compressed\n"
--" (HTTP) Request a compressed response using one of the algorithms\n"
--" curl supports, and save the uncompressed document. If this\n"
--" option is used and the server sends an unsupported encoding,\n"
--, stdout);
-- fputs(
--" curl will report an error.\n"
--"\n"
--" --connect-timeout <seconds>\n"
--" Maximum time in seconds that you allow the connection to the\n"
--" server to take. This only limits the connection phase, once\n"
--" curl has connected this option is of no more use. Since 7.32.0,\n"
--" this option accepts decimal values, but the actual timeout will\n"
--" decrease in accuracy as the specified timeout increases in deci-\n"
--, stdout);
-- fputs(
--" mal precision. See also the -m, --max-time option.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --create-dirs\n"
--" When used in conjunction with the -o option, curl will create\n"
--" the necessary local directory hierarchy as needed. This option\n"
--" creates the dirs mentioned with the -o option, nothing else. If\n"
--" the -o file name uses no dir or if the dirs it mentions already\n"
--, stdout);
-- fputs(
--" exist, no dir will be created.\n"
--"\n"
--" To create remote directories when using FTP or SFTP, try --ftp-\n"
--" create-dirs.\n"
--"\n"
--" --crlf (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).\n"
--"\n"
--" --crlfile <file>\n"
--" (HTTPS/FTPS) Provide a file using PEM format with a Certificate\n"
--" Revocation List that may specify peer certificates that are to\n"
--" be considered revoked.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" (Added in 7.19.7)\n"
--" -d, --data <data>\n"
--" (HTTP) Sends the specified data in a POST request to the HTTP\n"
--" server, in the same way that a browser does when a user has\n"
--" filled in an HTML form and presses the submit button. This will\n"
--" cause curl to pass the data to the server using the content-type\n"
--, stdout);
-- fputs(
--" application/x-www-form-urlencoded. Compare to -F, --form.\n"
--"\n"
--" -d, --data is the same as --data-ascii. To post data purely\n"
--" binary, you should instead use the --data-binary option. To URL-\n"
--" encode the value of a form field you may use --data-urlencode.\n"
--"\n"
--" If any of these options is used more than once on the same com-\n"
--" mand line, the data pieces specified will be merged together\n"
--, stdout);
-- fputs(
--" with a separating &-symbol. Thus, using '-d name=daniel -d\n"
--" skill=lousy' would generate a post chunk that looks like\n"
--" 'name=daniel&skill=lousy'.\n"
--"\n"
--" If you start the data with the letter @, the rest should be a\n"
--" file name to read the data from, or - if you want curl to read\n"
--" the data from stdin. Multiple files can also be specified. Post-\n"
--, stdout);
-- fputs(
--" ing data from a file named 'foobar' would thus be done with\n"
--" --data @foobar. When --data is told to read from a file like\n"
--" that, carriage returns and newlines will be stripped out.\n"
--"\n"
--" -D, --dump-header <file>\n"
--" Write the protocol headers to the specified file.\n"
--"\n"
--" This option is handy to use when you want to store the headers\n"
--" that an HTTP site sends to you. Cookies from the headers could\n"
--, stdout);
-- fputs(
--" then be read in a second curl invocation by using the -b,\n"
--" --cookie option! The -c, --cookie-jar option is however a better\n"
--" way to store cookies.\n"
--"\n"
--" When used in FTP, the FTP server response lines are considered\n"
--" being \"headers\" and thus are saved there.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --data-ascii <data>\n"
--" See -d, --data.\n"
--"\n"
--" --data-binary <data>\n"
--, stdout);
-- fputs(
--" (HTTP) This posts data exactly as specified with no extra pro-\n"
--" cessing whatsoever.\n"
--"\n"
--" If you start the data with the letter @, the rest should be a\n"
--" filename. Data is posted in a similar manner as --data-ascii\n"
--" does, except that newlines and carriage returns are preserved\n"
--" and conversions are never done.\n"
--"\n"
--" If this option is used several times, the ones following the\n"
--, stdout);
-- fputs(
--" first will append data as described in -d, --data.\n"
--"\n"
--" --data-urlencode <data>\n"
--" (HTTP) This posts data, similar to the other --data options with\n"
--" the exception that this performs URL-encoding. (Added in 7.18.0)\n"
--" To be CGI-compliant, the <data> part should begin with a name\n"
--" followed by a separator and a content specification. The <data>\n"
--" part can be passed to curl using one of the following syntaxes:\n"
--"\n"
--, stdout);
-- fputs(
--" content\n"
--" This will make curl URL-encode the content and pass that\n"
--" on. Just be careful so that the content doesn't contain\n"
--" any = or @ symbols, as that will then make the syntax\n"
--" match one of the other cases below!\n"
--"\n"
--" =content\n"
--" This will make curl URL-encode the content and pass that\n"
--" on. The preceding = symbol is not included in the data.\n"
--"\n"
--, stdout);
-- fputs(
--" name=content\n"
--" This will make curl URL-encode the content part and pass\n"
--" that on. Note that the name part is expected to be URL-\n"
--" encoded already.\n"
--"\n"
--" @filename\n"
--" This will make curl load data from the given file\n"
--" (including any newlines), URL-encode that data and pass\n"
--" it on in the POST.\n"
--"\n"
--" name@filename\n"
--, stdout);
-- fputs(
--" This will make curl load data from the given file\n"
--" (including any newlines), URL-encode that data and pass\n"
--" it on in the POST. The name part gets an equal sign\n"
--" appended, resulting in name=urlencoded-file-content. Note\n"
--" that the name is expected to be URL-encoded already.\n"
--"\n"
--" --delegation LEVEL\n"
--" Set LEVEL to tell the server what it is allowed to delegate when\n"
--, stdout);
-- fputs(
--" it comes to user credentials. Used with GSS/kerberos.\n"
--"\n"
--" none Don't allow any delegation.\n"
--"\n"
--" policy Delegates if and only if the OK-AS-DELEGATE flag is set\n"
--" in the Kerberos service ticket, which is a matter of\n"
--" realm policy.\n"
--"\n"
--" always Unconditionally allow the server to delegate.\n"
--"\n"
--" --digest\n"
--" (HTTP) Enables HTTP Digest authentication. This is an authenti-\n"
--, stdout);
-- fputs(
--" cation scheme that prevents the password from being sent over\n"
--" the wire in clear text. Use this in combination with the normal\n"
--" -u, --user option to set user name and password. See also\n"
--" --ntlm, --negotiate and --anyauth for related options.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--" --disable-eprt\n"
--, stdout);
-- fputs(
--" (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
--" when doing active FTP transfers. Curl will normally always first\n"
--" attempt to use EPRT, then LPRT before using PORT, but with this\n"
--" option, it will use PORT right away. EPRT and LPRT are exten-\n"
--" sions to the original FTP protocol, and may not work on all\n"
--" servers, but they enable more functionality in a better way than\n"
--, stdout);
-- fputs(
--" the traditional PORT command.\n"
--"\n"
--" --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
--" is an alias for --disable-eprt.\n"
--"\n"
--" Disabling EPRT only changes the active behavior. If you want to\n"
--" switch to passive mode you need to not use -P, --ftp-port or\n"
--" force it with --ftp-pasv.\n"
--"\n"
--" --disable-epsv\n"
--" (FTP) Tell curl to disable the use of the EPSV command when\n"
--, stdout);
-- fputs(
--" doing passive FTP transfers. Curl will normally always first\n"
--" attempt to use EPSV before PASV, but with this option, it will\n"
--" not try using EPSV.\n"
--"\n"
--" --epsv can be used to explicitly enable EPSV again and --no-epsv\n"
--" is an alias for --disable-epsv.\n"
--"\n"
--" Disabling EPSV only changes the passive behavior. If you want to\n"
--" switch to active mode you need to use -P, --ftp-port.\n"
--"\n"
--, stdout);
-- fputs(
--" --dns-interface <interface>\n"
--" Tell curl to send outgoing DNS requests through <interface>.\n"
--" This option is a counterpart to --interface (which does not\n"
--" affect DNS). The supplied string must be an interface name (not\n"
--" an address).\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-ipv4-addr <ip-address>\n"
--" Tell curl to bind to <ip-address> when making IPv4 DNS requests,\n"
--" so that the DNS requests originate from this address. The argu-\n"
--" ment should be a single IPv4 address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-ipv6-addr <ip-address>\n"
--" Tell curl to bind to <ip-address> when making IPv6 DNS requests,\n"
--" so that the DNS requests originate from this address. The argu-\n"
--" ment should be a single IPv6 address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--" backend that supports this operation. The c-ares backend is the\n"
--, stdout);
-- fputs(
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" --dns-servers <ip-address,ip-address>\n"
--" Set the list of DNS servers to be used instead of the system\n"
--" default. The list of IP addresses should be separated with com-\n"
--" mas. Port numbers may also optionally be given as :<port-number>\n"
--" after each IP address.\n"
--"\n"
--" This option requires that libcurl was built with a resolver\n"
--, stdout);
-- fputs(
--" backend that supports this operation. The c-ares backend is the\n"
--" only such one. (Added in 7.33.0)\n"
--"\n"
--" -e, --referer <URL>\n"
--" (HTTP) Sends the \"Referrer Page\" information to the HTTP server.\n"
--" This can also be set with the -H, --header flag of course. When\n"
--" used with -L, --location you can append \";auto\" to the --referer\n"
--" URL to make curl automatically set the previous URL when it fol-\n"
--, stdout);
-- fputs(
--" lows a Location: header. The \";auto\" string can be used alone,\n"
--" even if you don't set an initial --referer.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -E, --cert <certificate[:password]>\n"
--" (SSL) Tells curl to use the specified client certificate file\n"
--" when getting a file with HTTPS, FTPS or another SSL-based proto-\n"
--" col. The certificate must be in PKCS#12 format if using Secure\n"
--, stdout);
-- fputs(
--" Transport, or PEM format if using any other engine. If the\n"
--" optional password isn't specified, it will be queried for on the\n"
--" terminal. Note that this option assumes a \"certificate\" file\n"
--" that is the private key and the private certificate concate-\n"
--" nated! See --cert and --key to specify them independently.\n"
--"\n"
--" If curl is built against the NSS SSL library then this option\n"
--, stdout);
-- fputs(
--" can tell curl the nickname of the certificate to use within the\n"
--" NSS database defined by the environment variable SSL_DIR (or by\n"
--" default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib-\n"
--" nsspem.so) is available then PEM files may be loaded. If you\n"
--" want to use a file from the current directory, please precede it\n"
--" with \"./\" prefix, in order to avoid confusion with a nickname.\n"
--, stdout);
-- fputs(
--" If the nickname contains \":\", it needs to be preceded by \"\\\" so\n"
--" that it is not recognized as password delimiter. If the nick-\n"
--" name contains \"\\\", it needs to be escaped as \"\\\\\" so that it is\n"
--" not recognized as an escape character.\n"
--"\n"
--" (iOS and Mac OS X only) If curl is built against Secure Trans-\n"
--" port, then the certificate string can either be the name of a\n"
--, stdout);
-- fputs(
--" certificate/private key in the system or user keychain, or the\n"
--" path to a PKCS#12-encoded certificate and private key. If you\n"
--" want to use a file from the current directory, please precede it\n"
--" with \"./\" prefix, in order to avoid confusion with a nickname.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --engine <name>\n"
--" Select the OpenSSL crypto engine to use for cipher operations.\n"
--, stdout);
-- fputs(
--" Use --engine list to print a list of build-time supported\n"
--" engines. Note that not all (or none) of the engines may be\n"
--" available at run-time.\n"
--"\n"
--" --environment\n"
--" (RISC OS ONLY) Sets a range of environment variables, using the\n"
--" names the -w option supports, to allow easier extraction of use-\n"
--" ful information after having run curl.\n"
--"\n"
--" --egd-file <file>\n"
--, stdout);
-- fputs(
--" (SSL) Specify the path name to the Entropy Gathering Daemon\n"
--" socket. The socket is used to seed the random engine for SSL\n"
--" connections. See also the --random-file option.\n"
--"\n"
--" --cert-type <type>\n"
--" (SSL) Tells curl what certificate type the provided certificate\n"
--" is in. PEM, DER and ENG are recognized types. If not specified,\n"
--" PEM is assumed.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --cacert <CA certificate>\n"
--" (SSL) Tells curl to use the specified certificate file to verify\n"
--" the peer. The file may contain multiple CA certificates. The\n"
--" certificate(s) must be in PEM format. Normally curl is built to\n"
--" use a default file for this, so this option is typically used to\n"
--" alter that default file.\n"
--"\n"
--, stdout);
-- fputs(
--" curl recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
--" if it is set, and uses the given path as a path to a CA cert\n"
--" bundle. This option overrides that variable.\n"
--"\n"
--" The windows version of curl will automatically look for a CA\n"
--" certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
--" tory as curl.exe, or in the Current Working Directory, or in any\n"
--" folder along your PATH.\n"
--"\n"
--, stdout);
-- fputs(
--" If curl is built against the NSS SSL library, the NSS PEM\n"
--" PKCS#11 module (libnsspem.so) needs to be available for this\n"
--" option to work properly.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --capath <CA certificate directory>\n"
--" (SSL) Tells curl to use the specified certificate directory to\n"
--" verify the peer. Multiple paths can be provided by separating\n"
--, stdout);
-- fputs(
--" them with \":\" (e.g. \"path1:path2:path3\"). The certificates must\n"
--" be in PEM format, and if curl is built against OpenSSL, the\n"
--" directory must have been processed using the c_rehash utility\n"
--" supplied with OpenSSL. Using --capath can allow OpenSSL-powered\n"
--" curl to make SSL-connections much more efficiently than using\n"
--" --cacert if the --cacert file contains many CA certificates.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is set, the default capath value will be ignored,\n"
--" and if it is used several times, the last one will be used.\n"
--"\n"
--" -f, --fail\n"
--" (HTTP) Fail silently (no output at all) on server errors. This\n"
--" is mostly done to better enable scripts etc to better deal with\n"
--" failed attempts. In normal cases when an HTTP server fails to\n"
--" deliver a document, it returns an HTML document stating so\n"
--, stdout);
-- fputs(
--" (which often also describes why and more). This flag will pre-\n"
--" vent curl from outputting that and return error 22.\n"
--"\n"
--" This method is not fail-safe and there are occasions where non-\n"
--" successful response codes will slip through, especially when\n"
--" authentication is involved (response codes 401 and 407).\n"
--"\n"
--" -F, --form <name=content>\n"
--" (HTTP) This lets curl emulate a filled-in form in which a user\n"
--, stdout);
-- fputs(
--" has pressed the submit button. This causes curl to POST data\n"
--" using the Content-Type multipart/form-data according to RFC\n"
--" 2388. This enables uploading of binary files etc. To force the\n"
--" 'content' part to be a file, prefix the file name with an @\n"
--" sign. To just get the content part from a file, prefix the file\n"
--" name with the symbol <. The difference between @ and < is then\n"
--, stdout);
-- fputs(
--" that @ makes a file get attached in the post as a file upload,\n"
--" while the < makes a text field and just get the contents for\n"
--" that text field from a file.\n"
--"\n"
--" Example, to send your password file to the server, where 'pass-\n"
--" word' is the name of the form-field to which /etc/passwd will be\n"
--" the input:\n"
--"\n"
--" curl -F password=@/etc/passwd www.mypasswords.com\n"
--"\n"
--, stdout);
-- fputs(
--" To read content from stdin instead of a file, use - as the file-\n"
--" name. This goes for both @ and < constructs.\n"
--"\n"
--" You can also tell curl what Content-Type to use by using\n"
--" 'type=', in a manner similar to:\n"
--"\n"
--" curl -F \"web=@index.html;type=text/html\" url.com\n"
--"\n"
--" or\n"
--"\n"
--" curl -F \"name=daniel;type=text/foo\" url.com\n"
--"\n"
--" You can also explicitly change the name field of a file upload\n"
--, stdout);
-- fputs(
--" part by setting filename=, like this:\n"
--"\n"
--" curl -F \"file=@localfile;filename=nameinpost\" url.com\n"
--"\n"
--" If filename/path contains ',' or ';', it must be quoted by dou-\n"
--" ble-quotes like:\n"
--"\n"
--" curl -F \"file=@\\\"localfile\\\";filename=\\\"nameinpost\\\"\" url.com\n"
--"\n"
--" or\n"
--"\n"
--" curl -F 'file=@\"localfile\";filename=\"nameinpost\"' url.com\n"
--"\n"
--" Note that if a filename/path is quoted by double-quotes, any\n"
--, stdout);
-- fputs(
--" double-quote or backslash within the filename must be escaped by\n"
--" backslash.\n"
--"\n"
--" See further examples and details in the MANUAL.\n"
--"\n"
--" This option can be used multiple times.\n"
--"\n"
--" --ftp-account [data]\n"
--" (FTP) When an FTP server asks for \"account data\" after user name\n"
--" and password has been provided, this data is sent off using the\n"
--" ACCT command. (Added in 7.13.0)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --ftp-alternative-to-user <command>\n"
--" (FTP) If authenticating with the USER and PASS commands fails,\n"
--" send this command. When connecting to Tumbleweed's Secure\n"
--" Transport server over FTPS using a client certificate, using\n"
--" \"SITE AUTH\" will tell the server to retrieve the username from\n"
--" the certificate. (Added in 7.15.5)\n"
--"\n"
--, stdout);
-- fputs(
--" --ftp-create-dirs\n"
--" (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that\n"
--" doesn't currently exist on the server, the standard behavior of\n"
--" curl is to fail. Using this option, curl will instead attempt to\n"
--" create missing directories.\n"
--"\n"
--" --ftp-method [method]\n"
--" (FTP) Control what method curl should use to reach a file on an\n"
--" FTP(S) server. The method argument should be one of the follow-\n"
--, stdout);
-- fputs(
--" ing alternatives:\n"
--"\n"
--" multicwd\n"
--" curl does a single CWD operation for each path part in\n"
--" the given URL. For deep hierarchies this means very many\n"
--" commands. This is how RFC 1738 says it should be done.\n"
--" This is the default but the slowest behavior.\n"
--"\n"
--" nocwd curl does no CWD at all. curl will do SIZE, RETR, STOR\n"
--, stdout);
-- fputs(
--" etc and give a full path to the server for all these com-\n"
--" mands. This is the fastest behavior.\n"
--"\n"
--" singlecwd\n"
--" curl does one CWD with the full target directory and then\n"
--" operates on the file \"normally\" (like in the multicwd\n"
--" case). This is somewhat more standards compliant than\n"
--" 'nocwd' but without the full penalty of 'multicwd'.\n"
--" (Added in 7.15.1)\n"
--"\n"
--, stdout);
-- fputs(
--" --ftp-pasv\n"
--" (FTP) Use passive mode for the data connection. Passive is the\n"
--" internal default behavior, but using this option can be used to\n"
--" override a previous -P/-ftp-port option. (Added in 7.11.0)\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used. Undoing an enforced passive really isn't doable but you\n"
--" must then instead enforce the correct -P, --ftp-port again.\n"
--"\n"
--, stdout);
-- fputs(
--" Passive mode means that curl will try the EPSV command first and\n"
--" then PASV, unless --disable-epsv is used.\n"
--"\n"
--" --ftp-skip-pasv-ip\n"
--" (FTP) Tell curl to not use the IP address the server suggests in\n"
--" its response to curl's PASV command when curl connects the data\n"
--" connection. Instead curl will re-use the same IP address it\n"
--" already uses for the control connection. (Added in 7.14.2)\n"
--"\n"
--, stdout);
-- fputs(
--" This option has no effect if PORT, EPRT or EPSV is used instead\n"
--" of PASV.\n"
--"\n"
--" --ftp-pret\n"
--" (FTP) Tell curl to send a PRET command before PASV (and EPSV).\n"
--" Certain FTP servers, mainly drftpd, require this non-standard\n"
--" command for directory listings as well as up and downloads in\n"
--" PASV mode. (Added in 7.20.x)\n"
--"\n"
--" --ftp-ssl-ccc\n"
--, stdout);
-- fputs(
--" (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS\n"
--" layer after authenticating. The rest of the control channel com-\n"
--" munication will be unencrypted. This allows NAT routers to fol-\n"
--" low the FTP transaction. The default mode is passive. See --ftp-\n"
--" ssl-ccc-mode for other modes. (Added in 7.16.1)\n"
--"\n"
--" --ftp-ssl-ccc-mode [active/passive]\n"
--, stdout);
-- fputs(
--" (FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The\n"
--" passive mode will not initiate the shutdown, but instead wait\n"
--" for the server to do it, and will not reply to the shutdown from\n"
--" the server. The active mode initiates the shutdown and waits for\n"
--" a reply from the server. (Added in 7.16.2)\n"
--"\n"
--" --ftp-ssl-control\n"
--" (FTP) Require SSL/TLS for the FTP login, clear for transfer.\n"
--, stdout);
-- fputs(
--" Allows secure authentication, but non-encrypted data transfers\n"
--" for efficiency. Fails the transfer if the server doesn't sup-\n"
--" port SSL/TLS. (Added in 7.16.0) that can still be used but will\n"
--" be removed in a future version.\n"
--"\n"
--" --form-string <name=string>\n"
--" (HTTP) Similar to --form except that the value string for the\n"
--" named parameter is used literally. Leading '@' and '<' charac-\n"
--, stdout);
-- fputs(
--" ters, and the ';type=' string in the value have no special mean-\n"
--" ing. Use this in preference to --form if there's any possibility\n"
--" that the string value may accidentally trigger the '@' or '<'\n"
--" features of --form.\n"
--"\n"
--" -g, --globoff\n"
--" This option switches off the \"URL globbing parser\". When you set\n"
--" this option, you can specify URLs that contain the letters {}[]\n"
--, stdout);
-- fputs(
--" without having them being interpreted by curl itself. Note that\n"
--" these letters are not normal legal URL contents but they should\n"
--" be encoded according to the URI standard.\n"
--"\n"
--" -G, --get\n"
--" When used, this option will make all data specified with -d,\n"
--" --data, --data-binary or --data-urlencode to be used in an HTTP\n"
--" GET request instead of the POST request that otherwise would be\n"
--, stdout);
-- fputs(
--" used. The data will be appended to the URL with a '?' separator.\n"
--" If used in combination with -I, the POST data will instead be\n"
--" appended to the URL with a HEAD request.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used. This is because undoing a GET doesn't make sense, but you\n"
--" should then instead enforce the alternative method you prefer.\n"
--"\n"
--" -H, --header <header>\n"
--, stdout);
-- fputs(
--" (HTTP) Extra header to use when getting a web page. You may\n"
--" specify any number of extra headers. Note that if you should add\n"
--" a custom header that has the same name as one of the internal\n"
--" ones curl would use, your externally set header will be used\n"
--" instead of the internal one. This allows you to make even trick-\n"
--" ier stuff than curl would normally do. You should not replace\n"
--, stdout);
-- fputs(
--" internally set headers without knowing perfectly well what\n"
--" you're doing. Remove an internal header by giving a replacement\n"
--" without content on the right side of the colon, as in: -H\n"
--" \"Host:\". If you send the custom header with no-value then its\n"
--" header must be terminated with a semicolon, such as -H \"X-Cus-\n"
--" tom-Header;\" to send \"X-Custom-Header:\".\n"
--"\n"
--, stdout);
-- fputs(
--" curl will make sure that each header you add/replace is sent\n"
--" with the proper end-of-line marker, you should thus not add that\n"
--" as a part of the header content: do not add newlines or carriage\n"
--" returns, they will only mess things up for you.\n"
--"\n"
--" See also the -A, --user-agent and -e, --referer options.\n"
--"\n"
--" This option can be used multiple times to add/replace/remove\n"
--" multiple headers.\n"
--"\n"
--, stdout);
-- fputs(
--" --hostpubmd5 <md5>\n"
--" (SCP/SFTP) Pass a string containing 32 hexadecimal digits. The\n"
--" string should be the 128 bit MD5 checksum of the remote host's\n"
--" public key, curl will refuse the connection with the host unless\n"
--" the md5sums match. (Added in 7.17.1)\n"
--"\n"
--" --ignore-content-length\n"
--" (HTTP) Ignore the Content-Length header. This is particularly\n"
--, stdout);
-- fputs(
--" useful for servers running Apache 1.x, which will report incor-\n"
--" rect Content-Length for files larger than 2 gigabytes.\n"
--"\n"
--" -i, --include\n"
--" (HTTP) Include the HTTP-header in the output. The HTTP-header\n"
--" includes things like server-name, date of the document, HTTP-\n"
--" version and more...\n"
--"\n"
--" -I, --head\n"
--" (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature\n"
--, stdout);
-- fputs(
--" the command HEAD which this uses to get nothing but the header\n"
--" of a document. When used on an FTP or FILE file, curl displays\n"
--" the file size and last modification time only.\n"
--"\n"
--" --interface <name>\n"
--" Perform an operation using a specified interface. You can enter\n"
--" interface name, IP address or host name. An example could look\n"
--" like:\n"
--"\n"
--" curl --interface eth0:1 http://www.netscape.com/\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -j, --junk-session-cookies\n"
--" (HTTP) When curl is told to read cookies from a given file, this\n"
--" option will make it discard all \"session cookies\". This will\n"
--" basically have the same effect as if a new session is started.\n"
--" Typical browsers always discard session cookies when they're\n"
--" closed down.\n"
--"\n"
--" -J, --remote-header-name\n"
--, stdout);
-- fputs(
--" (HTTP) This option tells the -O, --remote-name option to use the\n"
--" server-specified Content-Disposition filename instead of\n"
--" extracting a filename from the URL.\n"
--"\n"
--" There's no attempt to decode %-sequences (yet) in the provided\n"
--" file name, so this option may provide you with rather unexpected\n"
--" file names.\n"
--"\n"
--" -k, --insecure\n"
--" (SSL) This option explicitly allows curl to perform \"insecure\"\n"
--, stdout);
-- fputs(
--" SSL connections and transfers. All SSL connections are attempted\n"
--" to be made secure by using the CA certificate bundle installed\n"
--" by default. This makes all connections considered \"insecure\"\n"
--" fail unless -k, --insecure is used.\n"
--"\n"
--" See this online resource for further details:\n"
--" http://curl.haxx.se/docs/sslcerts.html\n"
--"\n"
--" -K, --config <config file>\n"
--, stdout);
-- fputs(
--" Specify which config file to read curl arguments from. The con-\n"
--" fig file is a text file in which command line arguments can be\n"
--" written which then will be used as if they were written on the\n"
--" actual command line.\n"
--"\n"
--" Options and their parameters must be specified on the same con-\n"
--" fig file line, separated by whitespace, colon, or the equals\n"
--, stdout);
-- fputs(
--" sign. Long option names can optionally be given in the config\n"
--" file without the initial double dashes and if so, the colon or\n"
--" equals characters can be used as separators. If the option is\n"
--" specified with one or two dashes, there can be no colon or\n"
--" equals character between the option and its parameter.\n"
--"\n"
--" If the parameter is to contain whitespace, the parameter must be\n"
--, stdout);
-- fputs(
--" enclosed within quotes. Within double quotes, the following\n"
--" escape sequences are available: \\\\, \\\", \\t, \\n, \\r and \\v. A\n"
--" backslash preceding any other letter is ignored. If the first\n"
--" column of a config line is a '#' character, the rest of the line\n"
--" will be treated as a comment. Only write one option per physical\n"
--" line in the config file.\n"
--"\n"
--, stdout);
-- fputs(
--" Specify the filename to -K, --config as '-' to make curl read\n"
--" the file from stdin.\n"
--"\n"
--" Note that to be able to specify a URL in the config file, you\n"
--" need to specify it using the --url option, and not by simply\n"
--" writing the URL on its own line. So, it could look similar to\n"
--" this:\n"
--"\n"
--" url = \"http://curl.haxx.se/docs/\"\n"
--"\n"
--, stdout);
-- fputs(
--" When curl is invoked, it always (unless -q is used) checks for a\n"
--" default config file and uses it if found. The default config\n"
--" file is checked for in the following places in this order:\n"
--"\n"
--" 1) curl tries to find the \"home dir\": It first checks for the\n"
--" CURL_HOME and then the HOME environment variables. Failing that,\n"
--" it uses getpwuid() on UNIX-like systems (which returns the home\n"
--, stdout);
-- fputs(
--" dir given the current user in your system). On Windows, it then\n"
--" checks for the APPDATA variable, or as a last resort the '%USER-\n"
--" PROFILE%\\Application Data'.\n"
--"\n"
--" 2) On windows, if there is no _curlrc file in the home dir, it\n"
--" checks for one in the same dir the curl executable is placed. On\n"
--" UNIX-like systems, it will simply try to load .curlrc from the\n"
--" determined home dir.\n"
--"\n"
--, stdout);
-- fputs(
--" # --- Example file ---\n"
--" # this is a comment\n"
--" url = \"curl.haxx.se\"\n"
--" output = \"curlhere.html\"\n"
--" user-agent = \"superagent/1.0\"\n"
--"\n"
--" # and fetch another URL too\n"
--" url = \"curl.haxx.se/docs/manpage.html\"\n"
--" -O\n"
--" referer = \"http://nowhereatall.com/\"\n"
--" # --- End of example file ---\n"
--"\n"
--" This option can be used multiple times to load multiple config\n"
--" files.\n"
--"\n"
--, stdout);
-- fputs(
--" --keepalive-time <seconds>\n"
--" This option sets the time a connection needs to remain idle\n"
--" before sending keepalive probes and the time between individual\n"
--" keepalive probes. It is currently effective on operating systems\n"
--" offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options\n"
--" (meaning Linux, recent AIX, HP-UX and more). This option has no\n"
--" effect if --no-keepalive is used. (Added in 7.18.0)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--" If unspecified, the option defaults to 60 seconds.\n"
--"\n"
--" --key <key>\n"
--" (SSL/SSH) Private key file name. Allows you to provide your pri-\n"
--" vate key in this separate file.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --key-type <type>\n"
--" (SSL) Private key file type. Specify which type your --key pro-\n"
--, stdout);
-- fputs(
--" vided private key is. DER, PEM, and ENG are supported. If not\n"
--" specified, PEM is assumed.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --krb <level>\n"
--" (FTP) Enable Kerberos authentication and use. The level must be\n"
--" entered and should be one of 'clear', 'safe', 'confidential', or\n"
--" 'private'. Should you use a level that is not one of these,\n"
--, stdout);
-- fputs(
--" 'private' will instead be used.\n"
--"\n"
--" This option requires a library built with kerberos4 or GSSAPI\n"
--" (GSS-Negotiate) support. This is not very common. Use -V, --ver-\n"
--" sion to see if your curl supports it.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -l, --list-only\n"
--" (FTP) When listing an FTP directory, this switch forces a name-\n"
--, stdout);
-- fputs(
--" only view. This is especially useful if the user wants to\n"
--" machine-parse the contents of an FTP directory since the normal\n"
--" directory view doesn't use a standard look or format. When used\n"
--" like this, the option causes a NLST command to be sent to the\n"
--" server instead of LIST.\n"
--"\n"
--" Note: Some FTP servers list only files in their response to\n"
--, stdout);
-- fputs(
--" NLST; they do not include sub-directories and symbolic links.\n"
--"\n"
--" (POP3) When retrieving a specific email from POP3, this switch\n"
--" forces a LIST command to be performed instead of RETR. This is\n"
--" particularly useful if the user wants to see if a specific mes-\n"
--" sage id exists on the server and what size it is.\n"
--"\n"
--" Note: When combined with -X, --request <command>, this option\n"
--, stdout);
-- fputs(
--" can be used to send an UIDL command instead, so the user may use\n"
--" the email's unique identifier rather than it's message id to\n"
--" make the request. (Added in 7.21.5)\n"
--"\n"
--" -L, --location\n"
--" (HTTP/HTTPS) If the server reports that the requested page has\n"
--" moved to a different location (indicated with a Location: header\n"
--" and a 3XX response code), this option will make curl redo the\n"
--, stdout);
-- fputs(
--" request on the new place. If used together with -i, --include or\n"
--" -I, --head, headers from all requested pages will be shown. When\n"
--" authentication is used, curl only sends its credentials to the\n"
--" initial host. If a redirect takes curl to a different host, it\n"
--" won't be able to intercept the user+password. See also --loca-\n"
--" tion-trusted on how to change this. You can limit the amount of\n"
--, stdout);
-- fputs(
--" redirects to follow by using the --max-redirs option.\n"
--"\n"
--" When curl follows a redirect and the request is not a plain GET\n"
--" (for example POST or PUT), it will do the following request with\n"
--" a GET if the HTTP response was 301, 302, or 303. If the response\n"
--" code was any other 3xx code, curl will re-send the following\n"
--" request using the same unmodified method.\n"
--"\n"
--" --libcurl <file>\n"
--, stdout);
-- fputs(
--" Append this option to any ordinary curl command line, and you\n"
--" will get a libcurl-using C source code written to the file that\n"
--" does the equivalent of what your command-line operation does!\n"
--"\n"
--" If this option is used several times, the last given file name\n"
--" will be used. (Added in 7.16.1)\n"
--"\n"
--" --limit-rate <speed>\n"
--" Specify the maximum transfer rate you want curl to use. This\n"
--, stdout);
-- fputs(
--" feature is useful if you have a limited pipe and you'd like your\n"
--" transfer not to use your entire bandwidth.\n"
--"\n"
--" The given speed is measured in bytes/second, unless a suffix is\n"
--" appended. Appending 'k' or 'K' will count the number as kilo-\n"
--" bytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it\n"
--" gigabytes. Examples: 200K, 3m and 1G.\n"
--"\n"
--, stdout);
-- fputs(
--" The given rate is the average speed counted during the entire\n"
--" transfer. It means that curl might use higher transfer speeds in\n"
--" short bursts, but over time it uses no more than the given rate.\n"
--" If you also use the -Y, --speed-limit option, that option will\n"
--" take precedence and might cripple the rate-limiting slightly, to\n"
--" help keeping the speed-limit logic working.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --local-port <num>[-num]\n"
--" Set a preferred number or range of local port numbers to use for\n"
--" the connection(s). Note that port numbers by nature are a\n"
--" scarce resource that will be busy at times so setting this range\n"
--" to something too narrow might cause unnecessary connection setup\n"
--" failures. (Added in 7.15.2)\n"
--"\n"
--" --location-trusted\n"
--, stdout);
-- fputs(
--" (HTTP/HTTPS) Like -L, --location, but will allow sending the\n"
--" name + password to all hosts that the site may redirect to. This\n"
--" may or may not introduce a security breach if the site redirects\n"
--" you to a site to which you'll send your authentication info\n"
--" (which is plaintext in the case of HTTP Basic authentication).\n"
--"\n"
--" -m, --max-time <seconds>\n"
--, stdout);
-- fputs(
--" Maximum time in seconds that you allow the whole operation to\n"
--" take. This is useful for preventing your batch jobs from hang-\n"
--" ing for hours due to slow networks or links going down. Since\n"
--" 7.32.0, this option accepts decimal values, but the actual time-\n"
--" out will decrease in accuracy as the specified timeout increases\n"
--" in decimal precision. See also the --connect-timeout option.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --mail-auth <address>\n"
--" (SMTP) Specify a single address. This will be used to specify\n"
--" the authentication address (identity) of a submitted message\n"
--" that is being relayed to another server.\n"
--"\n"
--" (Added in 7.25.0)\n"
--"\n"
--" --mail-from <address>\n"
--" (SMTP) Specify a single address that the given mail should get\n"
--" sent from.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.20.0)\n"
--"\n"
--" --max-filesize <bytes>\n"
--" Specify the maximum size (in bytes) of a file to download. If\n"
--" the file requested is larger than this value, the transfer will\n"
--" not start and curl will return with exit code 63.\n"
--"\n"
--" NOTE: The file size is not always known prior to download, and\n"
--" for such files this option has no effect even if the file trans-\n"
--, stdout);
-- fputs(
--" fer ends up being larger than this given limit. This concerns\n"
--" both FTP and HTTP transfers.\n"
--"\n"
--" --mail-rcpt <address>\n"
--" (SMTP) Specify a single address, user name or mailing list name.\n"
--" When performing a mail transfer, the recipient should specify a\n"
--" valid email address to send the mail to. (Added in 7.20.0)\n"
--"\n"
--" When performing an address verification (VRFY command), the\n"
--, stdout);
-- fputs(
--" recipient should be specified as the user name or user name and\n"
--" domain (as per Section 3.5 of RFC5321). (Added in 7.34.0)\n"
--"\n"
--" When performing a mailing list expand (EXPN command), the recip-\n"
--" ient should be specified using the mailing list name, such as\n"
--" \"Friends\" or \"London-Office\". (Added in 7.34.0)\n"
--"\n"
--" --max-redirs <num>\n"
--" Set maximum number of redirection-followings allowed. If -L,\n"
--, stdout);
-- fputs(
--" --location is used, this option can be used to prevent curl from\n"
--" following redirections \"in absurdum\". By default, the limit is\n"
--" set to 50 redirections. Set this option to -1 to make it limit-\n"
--" less.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --metalink\n"
--" This option can tell curl to parse and process a given URI as\n"
--, stdout);
-- fputs(
--" Metalink file (both version 3 and 4 (RFC 5854) are supported)\n"
--" and make use of the mirrors listed within for failover if there\n"
--" are errors (such as the file or server not being available). It\n"
--" will also verify the hash of the file after the download com-\n"
--" pletes. The Metalink file itself is downloaded and processed in\n"
--" memory and not stored in the local file system.\n"
--"\n"
--, stdout);
-- fputs(
--" Example to use a remote Metalink file:\n"
--"\n"
--" curl --metalink http://www.example.com/example.metalink\n"
--"\n"
--" To use a Metalink file in the local file system, use FILE proto-\n"
--" col (file://):\n"
--"\n"
--" curl --metalink file://example.metalink\n"
--"\n"
--" Please note that if FILE protocol is disabled, there is no way\n"
--" to use a local Metalink file at the time of this writing. Also\n"
--, stdout);
-- fputs(
--" note that if --metalink and --include are used together,\n"
--" --include will be ignored. This is because including headers in\n"
--" the response will break Metalink parser and if the headers are\n"
--" included in the file described in Metalink file, hash check will\n"
--" fail.\n"
--"\n"
--" (Added in 7.27.0, if built against the libmetalink library.)\n"
--"\n"
--" -n, --netrc\n"
--, stdout);
-- fputs(
--" Makes curl scan the .netrc (_netrc on Windows) file in the\n"
--" user's home directory for login name and password. This is typi-\n"
--" cally used for FTP on UNIX. If used with HTTP, curl will enable\n"
--" user authentication. See netrc(4) or ftp(1) for details on the\n"
--" file format. Curl will not complain if that file doesn't have\n"
--" the right permissions (it should not be either world- or group-\n"
--, stdout);
-- fputs(
--" readable). The environment variable \"HOME\" is used to find the\n"
--" home directory.\n"
--"\n"
--" A quick and very simple example of how to setup a .netrc to\n"
--" allow curl to FTP to the machine host.domain.com with user name\n"
--" 'myself' and password 'secret' should look similar to:\n"
--"\n"
--" machine host.domain.com login myself password secret\n"
--"\n"
--" -N, --no-buffer\n"
--, stdout);
-- fputs(
--" Disables the buffering of the output stream. In normal work sit-\n"
--" uations, curl will use a standard buffered output stream that\n"
--" will have the effect that it will output the data in chunks, not\n"
--" necessarily exactly when the data arrives. Using this option\n"
--" will disable that buffering.\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --buffer to enforce the buffering.\n"
--"\n"
--, stdout);
-- fputs(
--" --netrc-file\n"
--" This option is similar to --netrc, except that you provide the\n"
--" path (absolute or relative) to the netrc file that Curl should\n"
--" use. You can only specify one netrc file per invocation. If\n"
--" several --netrc-file options are provided, only the last one\n"
--" will be used. (Added in 7.21.5)\n"
--"\n"
--" This option overrides any use of --netrc as they are mutually\n"
--, stdout);
-- fputs(
--" exclusive. It will also abide by --netrc-optional if specified.\n"
--"\n"
--" --netrc-optional\n"
--" Very similar to --netrc, but this option makes the .netrc usage\n"
--" optional and not mandatory as the --netrc option does.\n"
--"\n"
--" --negotiate\n"
--" (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate\n"
--" method was designed by Microsoft and is used in their web appli-\n"
--, stdout);
-- fputs(
--" cations. It is primarily meant as a support for Kerberos5\n"
--" authentication but may be also used along with another authenti-\n"
--" cation method. For more information see IETF draft draft-brezak-\n"
--" spnego-http-04.txt.\n"
--"\n"
--" If you want to enable Negotiate for your proxy authentication,\n"
--" then use --proxy-negotiate.\n"
--"\n"
--" This option requires a library built with GSSAPI support. This\n"
--, stdout);
-- fputs(
--" is not very common. Use -V, --version to see if your version\n"
--" supports GSS-Negotiate.\n"
--"\n"
--" When using this option, you must also provide a fake -u, --user\n"
--" option to activate the authentication code properly. Sending a\n"
--" '-u :' is enough as the user name and password from the -u\n"
--" option aren't actually used.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--, stdout);
-- fputs(
--" --no-keepalive\n"
--" Disables the use of keepalive messages on the TCP connection, as\n"
--" by default curl enables them.\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --keepalive to enforce keepalive.\n"
--"\n"
--" --no-sessionid\n"
--" (SSL) Disable curl's use of SSL session-ID caching. By default\n"
--" all transfers are done using the cache. Note that while nothing\n"
--, stdout);
-- fputs(
--" should ever get hurt by attempting to reuse SSL session-IDs,\n"
--" there seem to be broken SSL implementations in the wild that may\n"
--" require you to disable this in order for you to succeed. (Added\n"
--" in 7.16.0)\n"
--"\n"
--" Note that this is the negated option name documented. You can\n"
--" thus use --sessionid to enforce session-ID caching.\n"
--"\n"
--" --noproxy <no-proxy-list>\n"
--, stdout);
-- fputs(
--" Comma-separated list of hosts which do not use a proxy, if one\n"
--" is specified. The only wildcard is a single * character, which\n"
--" matches all hosts, and effectively disables the proxy. Each name\n"
--" in this list is matched as either a domain which contains the\n"
--" hostname, or the hostname itself. For example, local.com would\n"
--" match local.com, local.com:80, and www.local.com, but not\n"
--, stdout);
-- fputs(
--" www.notlocal.com. (Added in 7.19.4).\n"
--"\n"
--" --ntlm (HTTP) Enables NTLM authentication. The NTLM authentication\n"
--" method was designed by Microsoft and is used by IIS web servers.\n"
--" It is a proprietary protocol, reverse-engineered by clever peo-\n"
--" ple and implemented in curl based on their efforts. This kind of\n"
--" behavior should not be endorsed, you should encourage everyone\n"
--, stdout);
-- fputs(
--" who uses NTLM to switch to a public and documented authentica-\n"
--" tion method instead, such as Digest.\n"
--"\n"
--" If you want to enable NTLM for your proxy authentication, then\n"
--" use --proxy-ntlm.\n"
--"\n"
--" This option requires a library built with SSL support. Use -V,\n"
--" --version to see if your curl supports NTLM.\n"
--"\n"
--" If this option is used several times, only the first one is\n"
--" used.\n"
--"\n"
--, stdout);
-- fputs(
--" -o, --output <file>\n"
--" Write output to <file> instead of stdout. If you are using {} or\n"
--" [] to fetch multiple documents, you can use '#' followed by a\n"
--" number in the <file> specifier. That variable will be replaced\n"
--" with the current string for the URL being fetched. Like in:\n"
--"\n"
--" curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
--"\n"
--" or use several variables like:\n"
--"\n"
--, stdout);
-- fputs(
--" curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
--"\n"
--" You may use this option as many times as the number of URLs you\n"
--" have.\n"
--"\n"
--" See also the --create-dirs option to create the local directo-\n"
--" ries dynamically. Specifying the output as '-' (a single dash)\n"
--" will force the output to be done to stdout.\n"
--"\n"
--" -O, --remote-name\n"
--" Write output to a local file named like the remote file we get.\n"
--, stdout);
-- fputs(
--" (Only the file part of the remote file is used, the path is cut\n"
--" off.)\n"
--"\n"
--" The remote file name to use for saving is extracted from the\n"
--" given URL, nothing else.\n"
--"\n"
--" Consequentially, the file will be saved in the current working\n"
--" directory. If you want the file saved in a different directory,\n"
--" make sure you change current working directory before you invoke\n"
--, stdout);
-- fputs(
--" curl with the -O, --remote-name flag!\n"
--"\n"
--" There is no URL decoding done on the file name. If it has %20 or\n"
--" other URL encoded parts of the name, they will end up as-is as\n"
--" file name.\n"
--"\n"
--" You may use this option as many times as the number of URLs you\n"
--" have.\n"
--"\n"
--" --oauth2-bearer\n"
--" (IMAP, POP3, SMTP) Specify the Bearer Token for OAUTH 2.0 server\n"
--, stdout);
-- fputs(
--" authentication. The Bearer Token is used in conjunction with the\n"
--" user name which can be specified as part of the --url or -u,\n"
--" --user options.\n"
--"\n"
--" The Bearer Token and user name are formatted according to RFC\n"
--" 6750.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -p, --proxytunnel\n"
--" When an HTTP proxy is used (-x, --proxy), this option will cause\n"
--, stdout);
-- fputs(
--" non-HTTP protocols to attempt to tunnel through the proxy\n"
--" instead of merely using it to do HTTP-like operations. The tun-\n"
--" nel approach is made with the HTTP proxy CONNECT request and\n"
--" requires that the proxy allows direct connect to the remote port\n"
--" number curl wants to tunnel through to.\n"
--"\n"
--" -P, --ftp-port <address>\n"
--" (FTP) Reverses the default initiator/listener roles when con-\n"
--, stdout);
-- fputs(
--" necting with FTP. This switch makes curl use active mode. In\n"
--" practice, curl then tells the server to connect back to the\n"
--" client's specified address and port, while passive mode asks the\n"
--" server to setup an IP address and port for it to connect to.\n"
--" <address> should be one of:\n"
--"\n"
--" interface\n"
--" i.e \"eth0\" to specify which interface's IP address you\n"
--, stdout);
-- fputs(
--" want to use (Unix only)\n"
--"\n"
--" IP address\n"
--" i.e \"192.168.10.1\" to specify the exact IP address\n"
--"\n"
--" host name\n"
--" i.e \"my.host.domain\" to specify the machine\n"
--"\n"
--" - make curl pick the same IP address that is already used\n"
--" for the control connection\n"
--"\n"
--" If this option is used several times, the last one will be used. Dis-\n"
--, stdout);
-- fputs(
--" able the use of PORT with --ftp-pasv. Disable the attempt to use the\n"
--" EPRT command instead of PORT by using --disable-eprt. EPRT is really\n"
--" PORT++.\n"
--"\n"
--" Starting in 7.19.5, you can append \":[start]-[end]\" to the right of the\n"
--" address, to tell curl what TCP port range to use. That means you spec-\n"
--" ify a port range, from a lower to a higher number. A single number\n"
--" works as well, but do note that it increases the risk of failure since\n"
--, stdout);
-- fputs(
--" the port may not be available.\n"
--"\n"
--" --pass <phrase>\n"
--" (SSL/SSH) Passphrase for the private key\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --post301\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--" POST requests into GET requests when following a 301 redirect-\n"
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--, stdout);
-- fputs(
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.17.1)\n"
--"\n"
--" --post302\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--" POST requests into GET requests when following a 302 redirect-\n"
--, stdout);
-- fputs(
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.19.1)\n"
--"\n"
--" --post303\n"
--" (HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert\n"
--, stdout);
-- fputs(
--" POST requests into GET requests when following a 303 redirect-\n"
--" ion. The non-RFC behaviour is ubiquitous in web browsers, so\n"
--" curl does the conversion by default to maintain consistency.\n"
--" However, a server may require a POST to remain a POST after such\n"
--" a redirection. This option is meaningful only when using -L,\n"
--" --location (Added in 7.26.0)\n"
--"\n"
--" --proto <protocols>\n"
--, stdout);
-- fputs(
--" Tells curl to use the listed protocols for its initial\n"
--" retrieval. Protocols are evaluated left to right, are comma sep-\n"
--" arated, and are each a protocol name or 'all', optionally pre-\n"
--" fixed by zero or more modifiers. Available modifiers are:\n"
--"\n"
--" + Permit this protocol in addition to protocols already permit-\n"
--" ted (this is the default if no modifier is used).\n"
--"\n"
--, stdout);
-- fputs(
--" - Deny this protocol, removing it from the list of protocols\n"
--" already permitted.\n"
--"\n"
--" = Permit only this protocol (ignoring the list already permit-\n"
--" ted), though subject to later modification by subsequent\n"
--" entries in the comma separated list.\n"
--"\n"
--" For example:\n"
--"\n"
--" --proto -ftps uses the default protocols, but disables ftps\n"
--"\n"
--" --proto -all,https,+http\n"
--, stdout);
-- fputs(
--" only enables http and https\n"
--"\n"
--" --proto =http,https\n"
--" also only enables http and https\n"
--"\n"
--" Unknown protocols produce a warning. This allows scripts to\n"
--" safely rely on being able to disable potentially dangerous pro-\n"
--" tocols, without relying upon support for that protocol being\n"
--" built into curl to avoid an error.\n"
--"\n"
--, stdout);
-- fputs(
--" This option can be used multiple times, in which case the effect\n"
--" is the same as concatenating the protocols into one instance of\n"
--" the option.\n"
--"\n"
--" (Added in 7.20.2)\n"
--"\n"
--" --proto-redir <protocols>\n"
--" Tells curl to use the listed protocols after a redirect. See\n"
--" --proto for how protocols are represented.\n"
--"\n"
--" (Added in 7.20.2)\n"
--"\n"
--" --proxy-anyauth\n"
--, stdout);
-- fputs(
--" Tells curl to pick a suitable authentication method when commu-\n"
--" nicating with the given proxy. This might cause an extra\n"
--" request/response round-trip. (Added in 7.13.2)\n"
--"\n"
--" --proxy-basic\n"
--" Tells curl to use HTTP Basic authentication when communicating\n"
--" with the given proxy. Use --basic for enabling HTTP Basic with a\n"
--" remote host. Basic is the default authentication method curl\n"
--, stdout);
-- fputs(
--" uses with proxies.\n"
--"\n"
--" --proxy-digest\n"
--" Tells curl to use HTTP Digest authentication when communicating\n"
--" with the given proxy. Use --digest for enabling HTTP Digest with\n"
--" a remote host.\n"
--"\n"
--" --proxy-negotiate\n"
--" Tells curl to use HTTP Negotiate authentication when communicat-\n"
--" ing with the given proxy. Use --negotiate for enabling HTTP\n"
--" Negotiate with a remote host. (Added in 7.17.1)\n"
--"\n"
--, stdout);
-- fputs(
--" --proxy-ntlm\n"
--" Tells curl to use HTTP NTLM authentication when communicating\n"
--" with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
--" host.\n"
--"\n"
--" --proxy1.0 <proxyhost[:port]>\n"
--" Use the specified HTTP 1.0 proxy. If the port number is not\n"
--" specified, it is assumed at port 1080.\n"
--"\n"
--" The only difference between this and the HTTP proxy option (-x,\n"
--, stdout);
-- fputs(
--" --proxy), is that attempts to use CONNECT through the proxy will\n"
--" specify an HTTP 1.0 protocol instead of the default HTTP 1.1.\n"
--"\n"
--" --pubkey <key>\n"
--" (SSH) Public key file name. Allows you to provide your public\n"
--" key in this separate file.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -q If used as the first parameter on the command line, the curlrc\n"
--, stdout);
-- fputs(
--" config file will not be read and used. See the -K, --config for\n"
--" details on the default config file search path.\n"
--"\n"
--" -Q, --quote <command>\n"
--" (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP\n"
--" server. Quote commands are sent BEFORE the transfer takes place\n"
--" (just after the initial PWD command in an FTP transfer, to be\n"
--" exact). To make commands take place after a successful transfer,\n"
--, stdout);
-- fputs(
--" prefix them with a dash '-'. To make commands be sent after\n"
--" curl has changed the working directory, just before the transfer\n"
--" command(s), prefix the command with a '+' (this is only sup-\n"
--" ported for FTP). You may specify any number of commands. If the\n"
--" server returns failure for one of the commands, the entire oper-\n"
--" ation will be aborted. You must send syntactically correct FTP\n"
--, stdout);
-- fputs(
--" commands as RFC 959 defines to FTP servers, or one of the com-\n"
--" mands listed below to SFTP servers. This option can be used\n"
--" multiple times. When speaking to an FTP server, prefix the com-\n"
--" mand with an asterisk (*) to make curl continue even if the com-\n"
--" mand fails as by default curl will stop at first failure.\n"
--"\n"
--" SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP\n"
--, stdout);
-- fputs(
--" quote commands itself before sending them to the server. File\n"
--" names may be quoted shell-style to embed spaces or special char-\n"
--" acters. Following is the list of all supported SFTP quote com-\n"
--" mands:\n"
--"\n"
--" chgrp group file\n"
--" The chgrp command sets the group ID of the file named by\n"
--" the file operand to the group ID specified by the group\n"
--, stdout);
-- fputs(
--" operand. The group operand is a decimal integer group ID.\n"
--"\n"
--" chmod mode file\n"
--" The chmod command modifies the file mode bits of the\n"
--" specified file. The mode operand is an octal integer mode\n"
--" number.\n"
--"\n"
--" chown user file\n"
--" The chown command sets the owner of the file named by the\n"
--" file operand to the user ID specified by the user oper-\n"
--, stdout);
-- fputs(
--" and. The user operand is a decimal integer user ID.\n"
--"\n"
--" ln source_file target_file\n"
--" The ln and symlink commands create a symbolic link at the\n"
--" target_file location pointing to the source_file loca-\n"
--" tion.\n"
--"\n"
--" mkdir directory_name\n"
--" The mkdir command creates the directory named by the\n"
--" directory_name operand.\n"
--"\n"
--, stdout);
-- fputs(
--" pwd The pwd command returns the absolute pathname of the cur-\n"
--" rent working directory.\n"
--"\n"
--" rename source target\n"
--" The rename command renames the file or directory named by\n"
--" the source operand to the destination path named by the\n"
--" target operand.\n"
--"\n"
--" rm file\n"
--" The rm command removes the file specified by the file op-\n"
--" erand.\n"
--"\n"
--, stdout);
-- fputs(
--" rmdir directory\n"
--" The rmdir command removes the directory entry specified\n"
--" by the directory operand, provided it is empty.\n"
--"\n"
--" symlink source_file target_file\n"
--" See ln.\n"
--"\n"
--" -r, --range <range>\n"
--" (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial docu-\n"
--" ment) from a HTTP/1.1, FTP or SFTP server or a local FILE.\n"
--" Ranges can be specified in a number of ways.\n"
--"\n"
--, stdout);
-- fputs(
--" 0-499 specifies the first 500 bytes\n"
--"\n"
--" 500-999 specifies the second 500 bytes\n"
--"\n"
--" -500 specifies the last 500 bytes\n"
--"\n"
--" 9500- specifies the bytes from offset 9500 and forward\n"
--"\n"
--" 0-0,-1 specifies the first and last byte only(*)(H)\n"
--"\n"
--" 500-700,600-799\n"
--" specifies 300 bytes from offset 500(H)\n"
--"\n"
--" 100-199,500-599\n"
--, stdout);
-- fputs(
--" specifies two separate 100-byte ranges(*)(H)\n"
--"\n"
--" (*) = NOTE that this will cause the server to reply with a multipart\n"
--" response!\n"
--"\n"
--" Only digit characters (0-9) are valid in the 'start' and 'stop' fields\n"
--" of the 'start-stop' range syntax. If a non-digit character is given in\n"
--" the range, the server's response will be unspecified, depending on the\n"
--" server's configuration.\n"
--"\n"
--, stdout);
-- fputs(
--" You should also be aware that many HTTP/1.1 servers do not have this\n"
--" feature enabled, so that when you attempt to get a range, you'll\n"
--" instead get the whole document.\n"
--"\n"
--" FTP and SFTP range downloads only support the simple 'start-stop' syn-\n"
--" tax (optionally with one of the numbers omitted). FTP use depends on\n"
--" the extended FTP command SIZE.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -R, --remote-time\n"
--, stdout);
-- fputs(
--" When used, this will make curl attempt to figure out the time-\n"
--" stamp of the remote file, and if that is available make the\n"
--" local file get that same timestamp.\n"
--"\n"
--" --random-file <file>\n"
--" (SSL) Specify the path name to file containing what will be con-\n"
--" sidered as random data. The data is used to seed the random\n"
--" engine for SSL connections. See also the --egd-file option.\n"
--"\n"
--, stdout);
-- fputs(
--" --raw (HTTP) When used, it disables all internal HTTP decoding of con-\n"
--" tent or transfer encodings and instead makes them passed on\n"
--" unaltered, raw. (Added in 7.16.2)\n"
--"\n"
--" --remote-name-all\n"
--" This option changes the default action for all given URLs to be\n"
--" dealt with as if -O, --remote-name were used for each one. So if\n"
--" you want to disable that for a specific URL after --remote-name-\n"
--, stdout);
-- fputs(
--" all has been used, you must use \"-o -\" or --no-remote-name.\n"
--" (Added in 7.19.0)\n"
--"\n"
--" --resolve <host:port:address>\n"
--" Provide a custom address for a specific host and port pair.\n"
--" Using this, you can make the curl requests(s) use a specified\n"
--" address and prevent the otherwise normally resolved address to\n"
--" be used. Consider it a sort of /etc/hosts alternative provided\n"
--, stdout);
-- fputs(
--" on the command line. The port number should be the number used\n"
--" for the specific protocol the host will be used for. It means\n"
--" you need several entries if you want to provide address for the\n"
--" same host but different ports.\n"
--"\n"
--" This option can be used many times to add many host names to\n"
--" resolve.\n"
--"\n"
--" (Added in 7.21.3)\n"
--"\n"
--" --retry <num>\n"
--, stdout);
-- fputs(
--" If a transient error is returned when curl tries to perform a\n"
--" transfer, it will retry this number of times before giving up.\n"
--" Setting the number to 0 makes curl do no retries (which is the\n"
--" default). Transient error means either: a timeout, an FTP 4xx\n"
--" response code or an HTTP 5xx response code.\n"
--"\n"
--" When curl is about to retry a transfer, it will first wait one\n"
--, stdout);
-- fputs(
--" second and then for all forthcoming retries it will double the\n"
--" waiting time until it reaches 10 minutes which then will be the\n"
--" delay between the rest of the retries. By using --retry-delay\n"
--" you disable this exponential backoff algorithm. See also\n"
--" --retry-max-time to limit the total time allowed for retries.\n"
--" (Added in 7.12.3)\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --retry-delay <seconds>\n"
--" Make curl sleep this amount of time before each retry when a\n"
--" transfer has failed with a transient error (it changes the\n"
--" default backoff time algorithm between retries). This option is\n"
--" only interesting if --retry is also used. Setting this delay to\n"
--, stdout);
-- fputs(
--" zero will make curl use the default backoff time. (Added in\n"
--" 7.12.3)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --retry-max-time <seconds>\n"
--" The retry timer is reset before the first transfer attempt.\n"
--" Retries will be done as usual (see --retry) as long as the timer\n"
--" hasn't reached this given limit. Notice that if the timer hasn't\n"
--, stdout);
-- fputs(
--" reached the limit, the request will be made and while perform-\n"
--" ing, it may take longer than this given time period. To limit a\n"
--" single request's maximum time, use -m, --max-time. Set this\n"
--" option to zero to not timeout retries. (Added in 7.12.3)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -s, --silent\n"
--" Silent or quiet mode. Don't show progress meter or error mes-\n"
--, stdout);
-- fputs(
--" sages. Makes Curl mute. It will still output the data you ask\n"
--" for, potentially even to the terminal/stdout unless you redirect\n"
--" it.\n"
--"\n"
--" --sasl-ir\n"
--" Enable initial response in SASL authentication. (Added in\n"
--" 7.31.0)\n"
--"\n"
--" -S, --show-error\n"
--" When used with -s it makes curl show an error message if it\n"
--" fails.\n"
--"\n"
--" --ssl (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.\n"
--, stdout);
-- fputs(
--" Reverts to a non-secure connection if the server doesn't support\n"
--" SSL/TLS. See also --ftp-ssl-control and --ssl-reqd for differ-\n"
--" ent levels of encryption required. (Added in 7.20.0)\n"
--"\n"
--" This option was formerly known as --ftp-ssl (Added in 7.11.0).\n"
--" That option name can still be used but will be removed in a\n"
--" future version.\n"
--"\n"
--" --ssl-reqd\n"
--, stdout);
-- fputs(
--" (FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.\n"
--" Terminates the connection if the server doesn't support SSL/TLS.\n"
--" (Added in 7.20.0)\n"
--"\n"
--" This option was formerly known as --ftp-ssl-reqd (added in\n"
--" 7.15.5). That option name can still be used but will be removed\n"
--" in a future version.\n"
--"\n"
--" --ssl-allow-beast\n"
--" (SSL) This option tells curl to not work around a security flaw\n"
--, stdout);
-- fputs(
--" in the SSL3 and TLS1.0 protocols known as BEAST. If this option\n"
--" isn't used, the SSL layer may use workarounds known to cause\n"
--" interoperability problems with some older SSL implementations.\n"
--" WARNING: this option loosens the SSL security, and by using this\n"
--" flag you ask for exactly that. (Added in 7.25.0)\n"
--"\n"
--" --socks4 <host[:port]>\n"
--" Use the specified SOCKS4 proxy. If the port number is not speci-\n"
--, stdout);
-- fputs(
--" fied, it is assumed at port 1080. (Added in 7.15.2)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks4 proxy with -x, --proxy using a socks4:// protocol prefix.\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --socks4a <host[:port]>\n"
--, stdout);
-- fputs(
--" Use the specified SOCKS4a proxy. If the port number is not spec-\n"
--" ified, it is assumed at port 1080. (Added in 7.18.0)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks4a proxy with -x, --proxy using a socks4a:// protocol pre-\n"
--" fix.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --socks5-hostname <host[:port]>\n"
--" Use the specified SOCKS5 proxy (and let the proxy resolve the\n"
--" host name). If the port number is not specified, it is assumed\n"
--" at port 1080. (Added in 7.18.0)\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--, stdout);
-- fputs(
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks5 hostname proxy with -x, --proxy using a socks5h:// proto-\n"
--" col prefix.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--" (This option was previously wrongly documented and used as\n"
--" --socks without the number appended.)\n"
--"\n"
--" --socks5 <host[:port]>\n"
--, stdout);
-- fputs(
--" Use the specified SOCKS5 proxy - but resolve the host name\n"
--" locally. If the port number is not specified, it is assumed at\n"
--" port 1080.\n"
--"\n"
--" This option overrides any previous use of -x, --proxy, as they\n"
--" are mutually exclusive.\n"
--"\n"
--" Since 7.21.7, this option is superfluous since you can specify a\n"
--" socks5 proxy with -x, --proxy using a socks5:// protocol prefix.\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--" (This option was previously wrongly documented and used as\n"
--" --socks without the number appended.)\n"
--"\n"
--" This option (as well as --socks4) does not work with IPV6, FTPS\n"
--" or LDAP.\n"
--"\n"
--" --socks5-gssapi-service <servicename>\n"
--" The default service name for a socks server is rcmd/server-fqdn.\n"
--" This option allows you to change it.\n"
--"\n"
--, stdout);
-- fputs(
--" Examples: --socks5 proxy-name --socks5-gssapi-service sockd\n"
--" would use sockd/proxy-name --socks5 proxy-name --socks5-gssapi-\n"
--" service sockd/real-name would use sockd/real-name for cases\n"
--" where the proxy-name does not match the principal name. (Added\n"
--" in 7.19.4).\n"
--"\n"
--" --socks5-gssapi-nec\n"
--" As part of the gssapi negotiation a protection mode is negoti-\n"
--, stdout);
-- fputs(
--" ated. RFC 1961 says in section 4.3/4.4 it should be protected,\n"
--" but the NEC reference implementation does not. The option\n"
--" --socks5-gssapi-nec allows the unprotected exchange of the pro-\n"
--" tection mode negotiation. (Added in 7.19.4).\n"
--"\n"
--" --stderr <file>\n"
--" Redirect all writes to stderr to the specified file instead. If\n"
--" the file name is a plain '-', it is instead written to stdout.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -t, --telnet-option <OPT=val>\n"
--" Pass options to the telnet protocol. Supported options are:\n"
--"\n"
--" TTYPE=<term> Sets the terminal type.\n"
--"\n"
--" XDISPLOC=<X display> Sets the X display location.\n"
--"\n"
--" NEW_ENV=<var,val> Sets an environment variable.\n"
--"\n"
--" -T, --upload-file <file>\n"
--" This transfers the specified local file to the remote URL. If\n"
--, stdout);
-- fputs(
--" there is no file part in the specified URL, Curl will append the\n"
--" local file name. NOTE that you must use a trailing / on the last\n"
--" directory to really prove to Curl that there is no file name or\n"
--" curl will think that your last directory name is the remote file\n"
--" name to use. That will most likely cause the upload operation to\n"
--" fail. If this is used on an HTTP(S) server, the PUT command will\n"
--" be used.\n"
--"\n"
--, stdout);
-- fputs(
--" Use the file name \"-\" (a single dash) to use stdin instead of a\n"
--" given file. Alternately, the file name \".\" (a single period)\n"
--" may be specified instead of \"-\" to use stdin in non-blocking\n"
--" mode to allow reading server output while stdin is being\n"
--" uploaded.\n"
--"\n"
--" You can specify one -T for each URL on the command line. Each -T\n"
--, stdout);
-- fputs(
--" + URL pair specifies what to upload and to where. curl also sup-\n"
--" ports \"globbing\" of the -T argument, meaning that you can upload\n"
--" multiple files to a single URL by using the same URL globbing\n"
--" style supported in the URL, like this:\n"
--"\n"
--" curl -T \"{file1,file2}\" http://www.uploadtothissite.com\n"
--"\n"
--" or even\n"
--"\n"
--" curl -T \"img[1-1000].png\" ftp://ftp.picturemania.com/upload/\n"
--"\n"
--" --tcp-nodelay\n"
--, stdout);
-- fputs(
--" Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man\n"
--" page for details about this option. (Added in 7.11.2)\n"
--"\n"
--" --tftp-blksize <value>\n"
--" (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
--" size that curl will try to use when transferring data to or from\n"
--" a TFTP server. By default 512 bytes will be used.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.20.0)\n"
--"\n"
--" --tlsauthtype <authtype>\n"
--" Set TLS authentication type. Currently, the only supported\n"
--" option is \"SRP\", for TLS-SRP (RFC 5054). If --tlsuser and\n"
--" --tlspassword are specified but --tlsauthtype is not, then this\n"
--" option defaults to \"SRP\". (Added in 7.21.4)\n"
--"\n"
--" --tlspassword <password>\n"
--" Set password for use with the TLS authentication method speci-\n"
--, stdout);
-- fputs(
--" fied with --tlsauthtype. Requires that --tlsuser also be set.\n"
--" (Added in 7.21.4)\n"
--"\n"
--" --tlsuser <user>\n"
--" Set username for use with the TLS authentication method speci-\n"
--" fied with --tlsauthtype. Requires that --tlspassword also be\n"
--" set. (Added in 7.21.4)\n"
--"\n"
--" --tlsv1.0\n"
--" (SSL) Forces curl to use TLS version 1.0 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tlsv1.1\n"
--, stdout);
-- fputs(
--" (SSL) Forces curl to use TLS version 1.1 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tlsv1.2\n"
--" (SSL) Forces curl to use TLS version 1.2 when negotiating with a\n"
--" remote TLS server. (Added in 7.34.0)\n"
--"\n"
--" --tr-encoding\n"
--" (HTTP) Request a compressed Transfer-Encoding response using one\n"
--" of the algorithms curl supports, and uncompress the data while\n"
--" receiving it.\n"
--"\n"
--, stdout);
-- fputs(
--" (Added in 7.21.6)\n"
--"\n"
--" --trace <file>\n"
--" Enables a full trace dump of all incoming and outgoing data,\n"
--" including descriptive information, to the given output file. Use\n"
--" \"-\" as filename to have the output sent to stdout.\n"
--"\n"
--" This option overrides previous uses of -v, --verbose or --trace-\n"
--" ascii.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --trace-ascii <file>\n"
--, stdout);
-- fputs(
--" Enables a full trace dump of all incoming and outgoing data,\n"
--" including descriptive information, to the given output file. Use\n"
--" \"-\" as filename to have the output sent to stdout.\n"
--"\n"
--" This is very similar to --trace, but leaves out the hex part and\n"
--" only shows the ASCII part of the dump. It makes smaller output\n"
--" that might be easier to read for untrained humans.\n"
--"\n"
--, stdout);
-- fputs(
--" This option overrides previous uses of -v, --verbose or --trace.\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --trace-time\n"
--" Prepends a time stamp to each trace or verbose line that curl\n"
--" displays. (Added in 7.14.0)\n"
--"\n"
--" -u, --user <user:password;options>\n"
--" Specify the user name, password and optional login options to\n"
--, stdout);
-- fputs(
--" use for server authentication. Overrides -n, --netrc and\n"
--" --netrc-optional.\n"
--"\n"
--" If you simply specify the user name, with or without the login\n"
--" options, curl will prompt for a password.\n"
--"\n"
--" If you use an SSPI-enabled curl binary and perform NTLM authen-\n"
--" tication, you can force curl to select the user name and pass-\n"
--" word from your environment by simply specifying a single colon\n"
--, stdout);
-- fputs(
--" with this option: \"-u :\" or by specifying the login options on\n"
--" their own, for example \"-u ;auth=NTLM\".\n"
--"\n"
--" You can use the optional login options part to specify protocol\n"
--" specific options that may be used during authentication. At\n"
--" present only IMAP, POP3 and SMTP support login options as part\n"
--" of the user login information. For more information about the\n"
--, stdout);
-- fputs(
--" login options please see RFC 2384, RFC 5092 and IETF draft\n"
--" draft-earhart-url-smtp-00.txt (Added in 7.31.0).\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -U, --proxy-user <user:password>\n"
--" Specify the user name and password to use for proxy authentica-\n"
--" tion.\n"
--"\n"
--" If you use an SSPI-enabled curl binary and do NTLM authentica-\n"
--, stdout);
-- fputs(
--" tion, you can force curl to pick up the user name and password\n"
--" from your environment by simply specifying a single colon with\n"
--" this option: \"-U :\".\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --url <URL>\n"
--" Specify a URL to fetch. This option is mostly handy when you\n"
--" want to specify URL(s) in a config file.\n"
--"\n"
--, stdout);
-- fputs(
--" This option may be used any number of times. To control where\n"
--" this URL is written, use the -o, --output or the -O, --remote-\n"
--" name options.\n"
--" -v, --verbose\n"
--" Makes the fetching more verbose/talkative. Mostly useful for\n"
--" debugging. A line starting with '>' means \"header data\" sent by\n"
--" curl, '<' means \"header data\" received by curl that is hidden in\n"
--, stdout);
-- fputs(
--" normal cases, and a line starting with '*' means additional info\n"
--" provided by curl.\n"
--"\n"
--" Note that if you only want HTTP headers in the output, -i,\n"
--" --include might be the option you're looking for.\n"
--"\n"
--" If you think this option still doesn't give you enough details,\n"
--" consider using --trace or --trace-ascii instead.\n"
--"\n"
--" This option overrides previous uses of --trace-ascii or --trace.\n"
--"\n"
--, stdout);
-- fputs(
--" Use -s, --silent to make curl quiet.\n"
--"\n"
--" -w, --write-out <format>\n"
--" Defines what to display on stdout after a completed and success-\n"
--" ful operation. The format is a string that may contain plain\n"
--" text mixed with any number of variables. The string can be spec-\n"
--" ified as \"string\", to get read from a particular file you spec-\n"
--" ify it \"@filename\" and to tell curl to read the format from\n"
--, stdout);
-- fputs(
--" stdin you write \"@-\".\n"
--"\n"
--" The variables present in the output format will be substituted\n"
--" by the value or text that curl thinks fit, as described below.\n"
--" All variables are specified as %{variable_name} and to output a\n"
--" normal % you just write them as %%. You can output a newline by\n"
--" using \\n, a carriage return with \\r and a tab space with \\t.\n"
--"\n"
--, stdout);
-- fputs(
--" NOTE: The %-symbol is a special symbol in the win32-environment,\n"
--" where all occurrences of % must be doubled when using this\n"
--" option.\n"
--"\n"
--" The variables available are:\n"
--"\n"
--" content_type The Content-Type of the requested document, if\n"
--" there was any.\n"
--"\n"
--" filename_effective\n"
--" The ultimate filename that curl writes out to.\n"
--, stdout);
-- fputs(
--" This is only meaningful if curl is told to write\n"
--" to a file with the --remote-name or --output\n"
--" option. It's most useful in combination with the\n"
--" --remote-header-name option. (Added in 7.25.1)\n"
--"\n"
--" ftp_entry_path The initial path curl ended up in when logging on\n"
--" to the remote FTP server. (Added in 7.15.4)\n"
--"\n"
--, stdout);
-- fputs(
--" http_code The numerical response code that was found in the\n"
--" last retrieved HTTP(S) or FTP(s) transfer. In\n"
--" 7.18.2 the alias response_code was added to show\n"
--" the same info.\n"
--"\n"
--" http_connect The numerical code that was found in the last\n"
--" response (from a proxy) to a curl CONNECT\n"
--" request. (Added in 7.12.4)\n"
--"\n"
--, stdout);
-- fputs(
--" local_ip The IP address of the local end of the most\n"
--" recently done connection - can be either IPv4 or\n"
--" IPv6 (Added in 7.29.0)\n"
--"\n"
--" local_port The local port number of the most recently done\n"
--" connection (Added in 7.29.0)\n"
--"\n"
--" num_connects Number of new connects made in the recent trans-\n"
--" fer. (Added in 7.12.3)\n"
--"\n"
--, stdout);
-- fputs(
--" num_redirects Number of redirects that were followed in the\n"
--" request. (Added in 7.12.3)\n"
--"\n"
--" redirect_url When an HTTP request was made without -L to fol-\n"
--" low redirects, this variable will show the actual\n"
--" URL a redirect would take you to. (Added in\n"
--" 7.18.2)\n"
--"\n"
--" remote_ip The remote IP address of the most recently done\n"
--, stdout);
-- fputs(
--" connection - can be either IPv4 or IPv6 (Added in\n"
--" 7.29.0)\n"
--"\n"
--" remote_port The remote port number of the most recently done\n"
--" connection (Added in 7.29.0)\n"
--"\n"
--" size_download The total amount of bytes that were downloaded.\n"
--"\n"
--" size_header The total amount of bytes of the downloaded head-\n"
--" ers.\n"
--"\n"
--, stdout);
-- fputs(
--" size_request The total amount of bytes that were sent in the\n"
--" HTTP request.\n"
--"\n"
--" size_upload The total amount of bytes that were uploaded.\n"
--"\n"
--" speed_download The average download speed that curl measured for\n"
--" the complete download. Bytes per second.\n"
--"\n"
--" speed_upload The average upload speed that curl measured for\n"
--" the complete upload. Bytes per second.\n"
--"\n"
--, stdout);
-- fputs(
--" ssl_verify_result\n"
--" The result of the SSL peer certificate verifica-\n"
--" tion that was requested. 0 means the verification\n"
--" was successful. (Added in 7.19.0)\n"
--"\n"
--" time_appconnect\n"
--" The time, in seconds, it took from the start\n"
--" until the SSL/SSH/etc connect/handshake to the\n"
--, stdout);
-- fputs(
--" remote host was completed. (Added in 7.19.0)\n"
--"\n"
--" time_connect The time, in seconds, it took from the start\n"
--" until the TCP connect to the remote host (or\n"
--" proxy) was completed.\n"
--"\n"
--" time_namelookup\n"
--" The time, in seconds, it took from the start\n"
--" until the name resolving was completed.\n"
--"\n"
--" time_pretransfer\n"
--, stdout);
-- fputs(
--" The time, in seconds, it took from the start\n"
--" until the file transfer was just about to begin.\n"
--" This includes all pre-transfer commands and nego-\n"
--" tiations that are specific to the particular pro-\n"
--" tocol(s) involved.\n"
--"\n"
--" time_redirect The time, in seconds, it took for all redirection\n"
--, stdout);
-- fputs(
--" steps include name lookup, connect, pretransfer\n"
--" and transfer before the final transaction was\n"
--" started. time_redirect shows the complete execu-\n"
--" tion time for multiple redirections. (Added in\n"
--" 7.12.3)\n"
--"\n"
--" time_starttransfer\n"
--" The time, in seconds, it took from the start\n"
--, stdout);
-- fputs(
--" until the first byte was just about to be trans-\n"
--" ferred. This includes time_pretransfer and also\n"
--" the time the server needed to calculate the\n"
--" result.\n"
--"\n"
--" time_total The total time, in seconds, that the full opera-\n"
--" tion lasted. The time will be displayed with mil-\n"
--" lisecond resolution.\n"
--"\n"
--, stdout);
-- fputs(
--" url_effective The URL that was fetched last. This is most mean-\n"
--" ingful if you've told curl to follow location:\n"
--" headers.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -x, --proxy <[protocol://][user:password@]proxyhost[:port]>\n"
--" Use the specified proxy.\n"
--"\n"
--" The proxy string can be specified with a protocol:// prefix to\n"
--, stdout);
-- fputs(
--" specify alternative proxy protocols. Use socks4://, socks4a://,\n"
--" socks5:// or socks5h:// to request the specific SOCKS version to\n"
--" be used. No protocol specified, http:// and all others will be\n"
--" treated as HTTP proxies. (The protocol support was added in curl\n"
--" 7.21.7)\n"
--"\n"
--" If the port number is not specified in the proxy string, it is\n"
--" assumed to be 1080.\n"
--"\n"
--, stdout);
-- fputs(
--" This option overrides existing environment variables that set\n"
--" the proxy to use. If there's an environment variable setting a\n"
--" proxy, you can set proxy to \"\" to override it.\n"
--"\n"
--" All operations that are performed over an HTTP proxy will trans-\n"
--" parently be converted to HTTP. It means that certain protocol\n"
--" specific operations might not be available. This is not the case\n"
--, stdout);
-- fputs(
--" if you can tunnel through the proxy, as one with the -p, --prox-\n"
--" ytunnel option.\n"
--"\n"
--" User and password that might be provided in the proxy string are\n"
--" URL decoded by curl. This allows you to pass in special charac-\n"
--" ters such as @ by using %40 or pass in a colon with %3a.\n"
--"\n"
--" The proxy host can be specified the exact same way as the proxy\n"
--" environment variables, including the protocol prefix (http://)\n"
--, stdout);
-- fputs(
--" and the embedded user + password.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -X, --request <command>\n"
--" (HTTP) Specifies a custom request method to use when communicat-\n"
--" ing with the HTTP server. The specified request will be used\n"
--" instead of the method otherwise used (which defaults to GET).\n"
--" Read the HTTP 1.1 specification for details and explanations.\n"
--, stdout);
-- fputs(
--" Common additional HTTP requests include PUT and DELETE, but\n"
--" related technologies like WebDAV offers PROPFIND, COPY, MOVE and\n"
--" more.\n"
--"\n"
--" Normally you don't need this option. All sorts of GET, HEAD,\n"
--" POST and PUT requests are rather invoked by using dedicated com-\n"
--" mand line options.\n"
--"\n"
--" This option only changes the actual word used in the HTTP\n"
--, stdout);
-- fputs(
--" request, it does not alter the way curl behaves. So for example\n"
--" if you want to make a proper HEAD request, using -X HEAD will\n"
--" not suffice. You need to use the -I, --head option.\n"
--"\n"
--" (FTP) Specifies a custom FTP command to use instead of LIST when\n"
--" doing file lists with FTP.\n"
--"\n"
--" (POP3) Specifies a custom POP3 command to use instead of LIST or\n"
--" RETR. (Added in 7.26.0)\n"
--"\n"
--, stdout);
-- fputs(
--" (IMAP) Specifies a custom IMAP command to use instead of LIST.\n"
--" (Added in 7.30.0)\n"
--"\n"
--" (SMTP) Specifies a custom SMTP command to use instead of HELP or\n"
--" VRFY. (Added in 7.34.0)\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" --xattr\n"
--" When saving output to a file, this option tells curl to store\n"
--" certain file metadata in extended file attributes. Currently,\n"
--, stdout);
-- fputs(
--" the URL is stored in the xdg.origin.url attribute and, for HTTP,\n"
--" the content type is stored in the mime_type attribute. If the\n"
--" file system does not support extended attributes, a warning is\n"
--" issued.\n"
--"\n"
--" -y, --speed-time <time>\n"
--" If a download is slower than speed-limit bytes per second during\n"
--" a speed-time period, the download gets aborted. If speed-time is\n"
--, stdout);
-- fputs(
--" used, the default speed-limit will be 1 unless set with -Y.\n"
--"\n"
--" This option controls transfers and thus will not affect slow\n"
--" connects etc. If this is a concern for you, try the --connect-\n"
--" timeout option.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -Y, --speed-limit <speed>\n"
--" If a download is slower than this given speed (in bytes per sec-\n"
--, stdout);
-- fputs(
--" ond) for speed-time seconds it gets aborted. speed-time is set\n"
--" with -y and is 30 if not set.\n"
--"\n"
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -z, --time-cond <date expression>|<file>\n"
--" (HTTP/FTP) Request a file that has been modified later than the\n"
--" given time and date, or one that has been modified before that\n"
--" time. The <date expression> can be all sorts of date strings or\n"
--, stdout);
-- fputs(
--" if it doesn't match any internal ones, it is taken as a filename\n"
--" and tries to get the modification date (mtime) from <file>\n"
--" instead. See the curl_getdate(3) man pages for date expression\n"
--" details.\n"
--"\n"
--" Start the date expression with a dash (-) to make it request for\n"
--" a document that is older than the given date/time, default is a\n"
--" document that is newer than the specified date/time.\n"
--"\n"
--, stdout);
-- fputs(
--" If this option is used several times, the last one will be used.\n"
--"\n"
--" -h, --help\n"
--" Usage help.\n"
--"\n"
--" -M, --manual\n"
--" Manual. Display the huge help text.\n"
--"\n"
--" -V, --version\n"
--" Displays information about curl and the libcurl version it uses.\n"
--" The first line includes the full version of curl, libcurl and\n"
--" other 3rd party libraries linked with the executable.\n"
--"\n"
--, stdout);
-- fputs(
--" The second line (starts with \"Protocols:\") shows all protocols\n"
--" that libcurl reports to support.\n"
--"\n"
--" The third line (starts with \"Features:\") shows specific features\n"
--" libcurl reports to offer. Available features include:\n"
--"\n"
--" IPv6 You can use IPv6 with this.\n"
--"\n"
--" krb4 Krb4 for FTP is supported.\n"
--"\n"
--" SSL HTTPS and FTPS are supported.\n"
--"\n"
--, stdout);
-- fputs(
--" libz Automatic decompression of compressed files over HTTP is\n"
--" supported.\n"
--"\n"
--" NTLM NTLM authentication is supported.\n"
--"\n"
--" GSS-Negotiate\n"
--" Negotiate authentication and krb5 for FTP is supported.\n"
--"\n"
--" Debug This curl uses a libcurl built with Debug. This enables\n"
--" more error-tracking and memory debugging etc. For curl-\n"
--" developers only!\n"
--"\n"
--" AsynchDNS\n"
--, stdout);
-- fputs(
--" This curl uses asynchronous name resolves.\n"
--"\n"
--" SPNEGO SPNEGO Negotiate authentication is supported.\n"
--"\n"
--" Largefile\n"
--" This curl supports transfers of large files, files larger\n"
--" than 2GB.\n"
--"\n"
--" IDN This curl supports IDN - international domain names.\n"
--"\n"
--" SSPI SSPI is supported. If you use NTLM and set a blank user\n"
--, stdout);
-- fputs(
--" name, curl will authenticate with your current user and\n"
--" password.\n"
--"\n"
--" TLS-SRP\n"
--" SRP (Secure Remote Password) authentication is supported\n"
--" for TLS.\n"
--" Metalink\n"
--" This curl supports Metalink (both version 3 and 4 (RFC\n"
--" 5854)), which describes mirrors and hashes. curl will\n"
--, stdout);
-- fputs(
--" use mirrors for failover if there are errors (such as the\n"
--" file or server not being available).\n"
--"\n"
--"FILES\n"
--" ~/.curlrc\n"
--" Default config file, see -K, --config for details.\n"
--"\n"
--"ENVIRONMENT\n"
--" The environment variables can be specified in lower case or upper case.\n"
--" The lower case version has precedence. http_proxy is an exception as it\n"
--" is only available in lower case.\n"
--"\n"
--, stdout);
-- fputs(
--" Using an environment variable to set the proxy has the same effect as\n"
--" using the --proxy option.\n"
--"\n"
--" http_proxy [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for HTTP.\n"
--" HTTPS_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for HTTPS.\n"
--"\n"
--" [url-protocol]_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use for [url-protocol], where the pro-\n"
--, stdout);
-- fputs(
--" tocol is a protocol that curl supports and as specified in a\n"
--" URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.\n"
--"\n"
--" ALL_PROXY [protocol://]<host>[:port]\n"
--" Sets the proxy server to use if no protocol-specific proxy is\n"
--" set.\n"
--"\n"
--" NO_PROXY <comma-separated list of hosts>\n"
--" list of host names that shouldn't go through any proxy. If set\n"
--" to a asterisk '*' only, it matches all hosts.\n"
--"\n"
--"PROXY PROTOCOL PREFIXES\n"
--, stdout);
-- fputs(
--" Since curl version 7.21.7, the proxy string may be specified with a\n"
--" protocol:// prefix to specify alternative proxy protocols.\n"
--"\n"
--" If no protocol is specified in the proxy string or if the string\n"
--" doesn't match a supported one, the proxy will be treated as an HTTP\n"
--" proxy.\n"
--"\n"
--" The supported proxy protocol prefixes are as follows:\n"
--"\n"
--" socks4://\n"
--" Makes it the equivalent of --socks4\n"
--"\n"
--" socks4a://\n"
--, stdout);
-- fputs(
--" Makes it the equivalent of --socks4a\n"
--"\n"
--" socks5://\n"
--" Makes it the equivalent of --socks5\n"
--"\n"
--" socks5h://\n"
--" Makes it the equivalent of --socks5-hostname\n"
--"\n"
--"EXIT CODES\n"
--" There are a bunch of different error codes and their corresponding\n"
--" error messages that may appear during bad conditions. At the time of\n"
--" this writing, the exit codes are:\n"
--"\n"
--" 1 Unsupported protocol. This build of curl has no support for this\n"
--, stdout);
-- fputs(
--" protocol.\n"
--"\n"
--" 2 Failed to initialize.\n"
--"\n"
--" 3 URL malformed. The syntax was not correct.\n"
--"\n"
--" 4 A feature or option that was needed to perform the desired\n"
--" request was not enabled or was explicitly disabled at build-\n"
--" time. To make curl able to do this, you probably need another\n"
--" build of libcurl!\n"
--"\n"
--" 5 Couldn't resolve proxy. The given proxy host could not be\n"
--" resolved.\n"
--"\n"
--, stdout);
-- fputs(
--" 6 Couldn't resolve host. The given remote host was not resolved.\n"
--"\n"
--" 7 Failed to connect to host.\n"
--"\n"
--" 8 FTP weird server reply. The server sent data curl couldn't\n"
--" parse.\n"
--"\n"
--" 9 FTP access denied. The server denied login or denied access to\n"
--" the particular resource or directory you wanted to reach. Most\n"
--" often you tried to change to a directory that doesn't exist on\n"
--" the server.\n"
--"\n"
--, stdout);
-- fputs(
--" 11 FTP weird PASS reply. Curl couldn't parse the reply sent to the\n"
--" PASS request.\n"
--"\n"
--" 13 FTP weird PASV reply, Curl couldn't parse the reply sent to the\n"
--" PASV request.\n"
--"\n"
--" 14 FTP weird 227 format. Curl couldn't parse the 227-line the\n"
--" server sent.\n"
--"\n"
--" 15 FTP can't get host. Couldn't resolve the host IP we got in the\n"
--" 227-line.\n"
--"\n"
--, stdout);
-- fputs(
--" 17 FTP couldn't set binary. Couldn't change transfer method to\n"
--" binary.\n"
--"\n"
--" 18 Partial file. Only a part of the file was transferred.\n"
--"\n"
--" 19 FTP couldn't download/access the given file, the RETR (or simi-\n"
--" lar) command failed.\n"
--"\n"
--" 21 FTP quote error. A quote command returned error from the server.\n"
--" 22 HTTP page not retrieved. The requested url was not found or\n"
--, stdout);
-- fputs(
--" returned another error with the HTTP error code being 400 or\n"
--" above. This return code only appears if -f, --fail is used.\n"
--"\n"
--" 23 Write error. Curl couldn't write data to a local filesystem or\n"
--" similar.\n"
--"\n"
--" 25 FTP couldn't STOR file. The server denied the STOR operation,\n"
--" used for FTP uploading.\n"
--"\n"
--" 26 Read error. Various reading problems.\n"
--"\n"
--" 27 Out of memory. A memory allocation request failed.\n"
--"\n"
--, stdout);
-- fputs(
--" 28 Operation timeout. The specified time-out period was reached\n"
--" according to the conditions.\n"
--"\n"
--" 30 FTP PORT failed. The PORT command failed. Not all FTP servers\n"
--" support the PORT command, try doing a transfer using PASV\n"
--" instead!\n"
--"\n"
--" 31 FTP couldn't use REST. The REST command failed. This command is\n"
--" used for resumed FTP transfers.\n"
--"\n"
--" 33 HTTP range error. The range \"command\" didn't work.\n"
--"\n"
--, stdout);
-- fputs(
--" 34 HTTP post error. Internal post-request generation error.\n"
--"\n"
--" 35 SSL connect error. The SSL handshaking failed.\n"
--"\n"
--" 36 FTP bad download resume. Couldn't continue an earlier aborted\n"
--" download.\n"
--"\n"
--" 37 FILE couldn't read file. Failed to open the file. Permissions?\n"
--"\n"
--" 38 LDAP cannot bind. LDAP bind operation failed.\n"
--"\n"
--" 39 LDAP search failed.\n"
--"\n"
--" 41 Function not found. A required LDAP function was not found.\n"
--"\n"
--, stdout);
-- fputs(
--" 42 Aborted by callback. An application told curl to abort the oper-\n"
--" ation.\n"
--"\n"
--" 43 Internal error. A function was called with a bad parameter.\n"
--"\n"
--" 45 Interface error. A specified outgoing interface could not be\n"
--" used.\n"
--"\n"
--" 47 Too many redirects. When following redirects, curl hit the maxi-\n"
--" mum amount.\n"
--"\n"
--" 48 Unknown option specified to libcurl. This indicates that you\n"
--, stdout);
-- fputs(
--" passed a weird option to curl that was passed on to libcurl and\n"
--" rejected. Read up in the manual!\n"
--"\n"
--" 49 Malformed telnet option.\n"
--"\n"
--" 51 The peer's SSL certificate or SSH MD5 fingerprint was not OK.\n"
--"\n"
--" 52 The server didn't reply anything, which here is considered an\n"
--" error.\n"
--"\n"
--" 53 SSL crypto engine not found.\n"
--"\n"
--" 54 Cannot set SSL crypto engine as default.\n"
--"\n"
--" 55 Failed sending network data.\n"
--"\n"
--, stdout);
-- fputs(
--" 56 Failure in receiving network data.\n"
--"\n"
--" 58 Problem with the local certificate.\n"
--"\n"
--" 59 Couldn't use specified SSL cipher.\n"
--"\n"
--" 60 Peer certificate cannot be authenticated with known CA certifi-\n"
--" cates.\n"
--"\n"
--" 61 Unrecognized transfer encoding.\n"
--"\n"
--" 62 Invalid LDAP URL.\n"
--"\n"
--" 63 Maximum file size exceeded.\n"
--"\n"
--" 64 Requested FTP SSL level failed.\n"
--"\n"
--" 65 Sending the data requires a rewind that failed.\n"
--"\n"
--, stdout);
-- fputs(
--" 66 Failed to initialise SSL Engine.\n"
--"\n"
--" 67 The user name, password, or similar was not accepted and curl\n"
--" failed to log in.\n"
--"\n"
--" 68 File not found on TFTP server.\n"
--"\n"
--" 69 Permission problem on TFTP server.\n"
--"\n"
--" 70 Out of disk space on TFTP server.\n"
--"\n"
--" 71 Illegal TFTP operation.\n"
--"\n"
--" 72 Unknown TFTP transfer ID.\n"
--"\n"
--" 73 File already exists (TFTP).\n"
--"\n"
--" 74 No such user (TFTP).\n"
--"\n"
--, stdout);
-- fputs(
--" 75 Character conversion failed.\n"
--"\n"
--" 76 Character conversion functions required.\n"
--"\n"
--" 77 Problem with reading the SSL CA cert (path? access rights?).\n"
--"\n"
--" 78 The resource referenced in the URL does not exist.\n"
--"\n"
--" 79 An unspecified error occurred during the SSH session.\n"
--"\n"
--" 80 Failed to shut down the SSL connection.\n"
--"\n"
--" 82 Could not load CRL file, missing or wrong format (added in\n"
--" 7.19.0).\n"
--"\n"
--, stdout);
-- fputs(
--" 83 Issuer check failed (added in 7.19.0).\n"
--"\n"
--" 84 The FTP PRET command failed\n"
--"\n"
--" 85 RTSP: mismatch of CSeq numbers\n"
--"\n"
--" 86 RTSP: mismatch of Session Identifiers\n"
--"\n"
--" 87 unable to parse FTP file list\n"
--"\n"
--" 88 FTP chunk callback reported error\n"
--"\n"
--" 89 No connection available, the session will be queued\n"
--"\n"
--" XX More error codes will appear here in future releases. The exist-\n"
--" ing ones are meant to never change.\n"
--"\n"
--, stdout);
-- fputs(
--"AUTHORS / CONTRIBUTORS\n"
--" Daniel Stenberg is the main author, but the whole list of contributors\n"
--" is found in the separate THANKS file.\n"
--"\n"
--"WWW\n"
--" http://curl.haxx.se\n"
--"\n"
--"FTP\n"
--" ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
--"\n"
--"SEE ALSO\n"
--" ftp(1), wget(1)\n"
--"\n"
--"LATEST VERSION\n"
--"\n"
--" You always find news about what's going on as well as the latest versions\n"
--" from the curl web pages, located at:\n"
--"\n"
--" http://curl.haxx.se\n"
--"\n"
--"SIMPLE USAGE\n"
--"\n"
--" Get the main page from Netscape's web-server:\n"
--"\n"
--, stdout);
-- fputs(
--" curl http://www.netscape.com/\n"
--"\n"
--" Get the README file the user's home directory at funet's ftp-server:\n"
--"\n"
--" curl ftp://ftp.funet.fi/README\n"
--"\n"
--" Get a web page from a server using port 8000:\n"
--"\n"
--" curl http://www.weirdserver.com:8000/\n"
--"\n"
--" Get a directory listing of an FTP site:\n"
--"\n"
--" curl ftp://cool.haxx.se/\n"
--"\n"
--" Get the definition of curl from a dictionary:\n"
--"\n"
--" curl dict://dict.org/m:curl\n"
--"\n"
--" Fetch two documents at once:\n"
--"\n"
--, stdout);
-- fputs(
--" curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n"
--"\n"
--" Get a file off an FTPS server:\n"
--"\n"
--" curl ftps://files.are.secure.com/secrets.txt\n"
--"\n"
--" or use the more appropriate FTPS way to get the same file:\n"
--"\n"
--" curl --ftp-ssl ftp://files.are.secure.com/secrets.txt\n"
--"\n"
--" Get a file from an SSH server using SFTP:\n"
--"\n"
--" curl -u username sftp://shell.example.com/etc/issue\n"
--"\n"
--" Get a file from an SSH server using SCP using a private key to authenticate:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \\\n"
--" scp://shell.example.com/~/personal.txt\n"
--"\n"
--" Get the main page from an IPv6 web server:\n"
--"\n"
--" curl -g \"http://[2001:1890:1112:1::20]/\"\n"
--"\n"
--"DOWNLOAD TO A FILE\n"
--"\n"
--" Get a web page and store in a local file with a specific name:\n"
--"\n"
--" curl -o thatpage.html http://www.netscape.com/\n"
--"\n"
--" Get a web page and store in a local file, make the local file get the name\n"
--, stdout);
-- fputs(
--" of the remote document (if no file name part is specified in the URL, this\n"
--" will fail):\n"
--"\n"
--" curl -O http://www.netscape.com/index.html\n"
--"\n"
--" Fetch two files and store them with their remote names:\n"
--"\n"
--" curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n"
--"\n"
--"USING PASSWORDS\n"
--"\n"
--" FTP\n"
--"\n"
--" To ftp files using name+passwd, include them in the URL like:\n"
--"\n"
--" curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
--"\n"
--" or specify them with the -u flag like\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n"
--"\n"
--" FTPS\n"
--"\n"
--" It is just like for FTP, but you may also want to specify and use\n"
--" SSL-specific options for certificates etc.\n"
--"\n"
--" Note that using FTPS:// as prefix is the \"implicit\" way as described in the\n"
--" standards while the recommended \"explicit\" way is done by using FTP:// and\n"
--" the --ftp-ssl option.\n"
--"\n"
--" SFTP / SCP\n"
--"\n"
--" This is similar to FTP, but you can specify a private key to use instead of\n"
--, stdout);
-- fputs(
--" a password. Note that the private key may itself be protected by a password\n"
--" that is unrelated to the login password of the remote system. If you\n"
--" provide a private key file you must also provide a public key file.\n"
--"\n"
--" HTTP\n"
--"\n"
--" Curl also supports user and password in HTTP URLs, thus you can pick a file\n"
--" like:\n"
--"\n"
--" curl http://name:passwd@machine.domain/full/path/to/file\n"
--"\n"
--" or specify user and password separately like in\n"
--"\n"
--, stdout);
-- fputs(
--" curl -u name:passwd http://machine.domain/full/path/to/file\n"
--"\n"
--" HTTP offers many different methods of authentication and curl supports\n"
--" several: Basic, Digest, NTLM and Negotiate. Without telling which method to\n"
--" use, curl defaults to Basic. You can also ask curl to pick the most secure\n"
--" ones out of the ones that the server accepts for the given URL, by using\n"
--" --anyauth.\n"
--"\n"
--" NOTE! According to the URL specification, HTTP URLs can not contain a user\n"
--, stdout);
-- fputs(
--" and password, so that style will not work when using curl via a proxy, even\n"
--" though curl allows it at other times. When using a proxy, you _must_ use\n"
--" the -u style for user and password.\n"
--"\n"
--" HTTPS\n"
--"\n"
--" Probably most commonly used with private certificates, as explained below.\n"
--"\n"
--"PROXY\n"
--"\n"
--" curl supports both HTTP and SOCKS proxy servers, with optional authentication.\n"
--" It does not have special support for FTP proxy servers since there are no\n"
--, stdout);
-- fputs(
--" standards for those, but it can still be made to work with many of them. You\n"
--" can also use both HTTP and SOCKS proxies to transfer files to and from FTP\n"
--" servers.\n"
--"\n"
--" Get an ftp file using an HTTP proxy named my-proxy that uses port 888:\n"
--"\n"
--" curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n"
--"\n"
--" Get a file from an HTTP server that requires user and password, using the\n"
--" same proxy as above:\n"
--"\n"
--" curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
--"\n"
--, stdout);
-- fputs(
--" Some proxies require special authentication. Specify by using -U as above:\n"
--"\n"
--" curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
--"\n"
--" A comma-separated list of hosts and domains which do not use the proxy can\n"
--" be specified as:\n"
--"\n"
--" curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/\n"
--"\n"
--" If the proxy is specified with --proxy1.0 instead of --proxy or -x, then\n"
--" curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.\n"
--"\n"
--, stdout);
-- fputs(
--" curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.\n"
--"\n"
--" See also the environment variables Curl supports that offer further proxy\n"
--" control.\n"
--"\n"
--" Most FTP proxy servers are set up to appear as a normal FTP server from the\n"
--" client's perspective, with special commands to select the remote FTP server.\n"
--" curl supports the -u, -Q and --ftp-account options that can be used to\n"
--" set up transfers through many FTP proxies. For example, a file can be\n"
--, stdout);
-- fputs(
--" uploaded to a remote FTP server using a Blue Coat FTP proxy with the\n"
--" options:\n"
--"\n"
--" curl -u \"Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass\" \\\n"
--" --ftp-account Proxy-Password --upload-file local-file \\\n"
--" ftp://my-ftp.proxy.server:21/remote/upload/path/\n"
--"\n"
--" See the manual for your FTP proxy to determine the form it expects to set up\n"
--" transfers, and curl's -v option to see exactly what curl is sending.\n"
--"\n"
--"RANGES\n"
--"\n"
--" HTTP 1.1 introduced byte-ranges. Using this, a client can request\n"
--, stdout);
-- fputs(
--" to get only one or more subparts of a specified document. Curl supports\n"
--" this with the -r flag.\n"
--"\n"
--" Get the first 100 bytes of a document:\n"
--"\n"
--" curl -r 0-99 http://www.get.this/\n"
--"\n"
--" Get the last 500 bytes of a document:\n"
--"\n"
--" curl -r -500 http://www.get.this/\n"
--"\n"
--" Curl also supports simple ranges for FTP files as well. Then you can only\n"
--" specify start and stop position.\n"
--"\n"
--" Get the first 100 bytes of a document using FTP:\n"
--"\n"
--" curl -r 0-99 ftp://www.get.this/README\n"
--"\n"
--"UPLOADING\n"
--"\n"
--, stdout);
-- fputs(
--" FTP / FTPS / SFTP / SCP\n"
--"\n"
--" Upload all data on stdin to a specified server:\n"
--"\n"
--" curl -T - ftp://ftp.upload.com/myfile\n"
--"\n"
--" Upload data from a specified file, login with user and password:\n"
--"\n"
--" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n"
--"\n"
--" Upload a local file to the remote site, and use the local file name at the remote\n"
--" site too:\n"
--"\n"
--" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n"
--"\n"
--" Upload a local file to get appended to the remote file:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -T localfile -a ftp://ftp.upload.com/remotefile\n"
--"\n"
--" Curl also supports ftp upload through a proxy, but only if the proxy is\n"
--" configured to allow that kind of tunneling. If it does, you can run curl in\n"
--" a fashion similar to:\n"
--"\n"
--" curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n"
--"\n"
--" HTTP\n"
--"\n"
--" Upload all data on stdin to a specified HTTP site:\n"
--"\n"
--" curl -T - http://www.upload.com/myfile\n"
--"\n"
--" Note that the HTTP server must have been configured to accept PUT before\n"
--, stdout);
-- fputs(
--" this can be done successfully.\n"
--"\n"
--" For other ways to do HTTP data upload, see the POST section below.\n"
--"\n"
--"VERBOSE / DEBUG\n"
--"\n"
--" If curl fails where it isn't supposed to, if the servers don't let you in,\n"
--" if you can't understand the responses: use the -v flag to get verbose\n"
--" fetching. Curl will output lots of info and what it sends and receives in\n"
--" order to let the user see all client-server interaction (but it won't show\n"
--" you the actual data).\n"
--"\n"
--" curl -v ftp://ftp.upload.com/\n"
--"\n"
--, stdout);
-- fputs(
--" To get even more details and information on what curl does, try using the\n"
--" --trace or --trace-ascii options with a given file name to log to, like\n"
--" this:\n"
--"\n"
--" curl --trace trace.txt www.haxx.se\n"
--"\n"
--"\n"
--"DETAILED INFORMATION\n"
--"\n"
--" Different protocols provide different ways of getting detailed information\n"
--" about specific files/documents. To get curl to show detailed information\n"
--" about a single file, you should use -I/--head option. It displays all\n"
--, stdout);
-- fputs(
--" available info on a single file for HTTP and FTP. The HTTP information is a\n"
--" lot more extensive.\n"
--"\n"
--" For HTTP, you can get the header information (the same as -I would show)\n"
--" shown before the data by using -i/--include. Curl understands the\n"
--" -D/--dump-header option when getting files from both FTP and HTTP, and it\n"
--" will then store the headers in the specified file.\n"
--"\n"
--" Store the HTTP headers in a separate file (headers.txt in the example):\n"
--"\n"
--, stdout);
-- fputs(
--" curl --dump-header headers.txt curl.haxx.se\n"
--"\n"
--" Note that headers stored in a separate file can be very useful at a later\n"
--" time if you want curl to use cookies sent by the server. More about that in\n"
--" the cookies section.\n"
--"\n"
--"POST (HTTP)\n"
--"\n"
--" It's easy to post data using curl. This is done using the -d <data>\n"
--" option. The post data must be urlencoded.\n"
--"\n"
--" Post a simple \"name\" and \"phone\" guestbook.\n"
--"\n"
--" curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n"
--, stdout);
-- fputs(
--" http://www.where.com/guest.cgi\n"
--"\n"
--" How to post a form with curl, lesson #1:\n"
--"\n"
--" Dig out all the <input> tags in the form that you want to fill in. (There's\n"
--" a perl program called formfind.pl on the curl site that helps with this).\n"
--"\n"
--" If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n"
--" string\", which is in the format\n"
--"\n"
--" <variable1>=<data1>&<variable2>=<data2>&...\n"
--"\n"
--" The 'variable' names are the names set with \"name=\" in the <input> tags, and\n"
--, stdout);
-- fputs(
--" the data is the contents you want to fill in for the inputs. The data *must*\n"
--" be properly URL encoded. That means you replace space with + and that you\n"
--" replace weird letters with %XX where XX is the hexadecimal representation of\n"
--" the letter's ASCII code.\n"
--"\n"
--" Example:\n"
--"\n"
--" (page located at http://www.formpost.com/getthis/\n"
--"\n"
--" <form action=\"post.cgi\" method=\"post\">\n"
--" <input name=user size=10>\n"
--" <input name=pass type=password size=10>\n"
--, stdout);
-- fputs(
--" <input name=id type=hidden value=\"blablabla\">\n"
--" <input name=ding value=\"submit\">\n"
--" </form>\n"
--"\n"
--" We want to enter user 'foobar' with password '12345'.\n"
--"\n"
--" To post to this, you enter a curl command line like:\n"
--"\n"
--" curl -d \"user=foobar&pass=12345&id=blablabla&ding=submit\" (continues)\n"
--" http://www.formpost.com/getthis/post.cgi\n"
--"\n"
--"\n"
--" While -d uses the application/x-www-form-urlencoded mime-type, generally\n"
--, stdout);
-- fputs(
--" understood by CGI's and similar, curl also supports the more capable\n"
--" multipart/form-data type. This latter type supports things like file upload.\n"
--"\n"
--" -F accepts parameters like -F \"name=contents\". If you want the contents to\n"
--" be read from a file, use <@filename> as contents. When specifying a file,\n"
--" you can also specify the file content type by appending ';type=<mime type>'\n"
--" to the file name. You can also post the contents of several files in one\n"
--, stdout);
-- fputs(
--" field. For example, the field name 'coolfiles' is used to send three files,\n"
--" with different content types using the following syntax:\n"
--"\n"
--" curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n"
--" http://www.post.com/postit.cgi\n"
--"\n"
--" If the content-type is not specified, curl will try to guess from the file\n"
--" extension (it only knows a few), or use the previously specified type (from\n"
--" an earlier file if several files are specified in a list) or else it will\n"
--, stdout);
-- fputs(
--" use the default type 'application/octet-stream'.\n"
--"\n"
--" Emulate a fill-in form with -F. Let's say you fill in three fields in a\n"
--" form. One field is a file name which to post, one field is your name and one\n"
--" field is a file description. We want to post the file we have written named\n"
--" \"cooltext.txt\". To let curl do the posting of this data instead of your\n"
--" favourite browser, you have to read the HTML source of the form page and\n"
--, stdout);
-- fputs(
--" find the names of the input fields. In our example, the input field names\n"
--" are 'file', 'yourname' and 'filedescription'.\n"
--"\n"
--" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
--" -F \"filedescription=Cool text file with cool text inside\" \\\n"
--" http://www.post.com/postit.cgi\n"
--"\n"
--" To send two files in one post you can do it in two ways:\n"
--"\n"
--" 1. Send multiple files in a single \"field\" with a single field name:\n"
--"\n"
--" curl -F \"pictures=@dog.gif,cat.gif\"\n"
--"\n"
--, stdout);
-- fputs(
--" 2. Send two fields with two field names:\n"
--"\n"
--" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
--"\n"
--" To send a field value literally without interpreting a leading '@'\n"
--" or '<', or an embedded ';type=', use --form-string instead of\n"
--" -F. This is recommended when the value is obtained from a user or\n"
--" some other unpredictable source. Under these circumstances, using\n"
--" -F instead of --form-string would allow a user to trick curl into\n"
--" uploading a file.\n"
--"\n"
--"REFERRER\n"
--"\n"
--, stdout);
-- fputs(
--" An HTTP request has the option to include information about which address\n"
--" referred it to the actual page. Curl allows you to specify the\n"
--" referrer to be used on the command line. It is especially useful to\n"
--" fool or trick stupid servers or CGI scripts that rely on that information\n"
--" being available or contain certain data.\n"
--"\n"
--" curl -e www.coolsite.com http://www.showme.com/\n"
--"\n"
--" NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.\n"
--"\n"
--"USER AGENT\n"
--"\n"
--, stdout);
-- fputs(
--" An HTTP request has the option to include information about the browser\n"
--" that generated the request. Curl allows it to be specified on the command\n"
--" line. It is especially useful to fool or trick stupid servers or CGI\n"
--" scripts that only accept certain browsers.\n"
--"\n"
--" Example:\n"
--"\n"
--" curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n"
--"\n"
--" Other common strings:\n"
--" 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95\n"
--, stdout);
-- fputs(
--" 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95\n"
--" 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2\n"
--" 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX\n"
--" 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux\n"
--"\n"
--" Note that Internet Explorer tries hard to be compatible in every way:\n"
--" 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95\n"
--"\n"
--" Mozilla is not the only possible User-Agent name:\n"
--, stdout);
-- fputs(
--" 'Konqueror/1.0' KDE File Manager desktop client\n"
--" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
--"\n"
--"COOKIES\n"
--"\n"
--" Cookies are generally used by web servers to keep state information at the\n"
--" client's side. The server sets cookies by sending a response line in the\n"
--" headers that looks like 'Set-Cookie: <data>' where the data part then\n"
--" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
--, stdout);
-- fputs(
--" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
--" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
--" cookie should expire (\"expire=DATE\"), for what domain to use it\n"
--" (\"domain=NAME\") and if it should be used on secure connections only\n"
--" (\"secure\").\n"
--"\n"
--" If you've received a page from a server that contains a header like:\n"
--" Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
--"\n"
--, stdout);
-- fputs(
--" it means the server wants that first pair passed on when we get anything in\n"
--" a path beginning with \"/foo\".\n"
--"\n"
--" Example, get a page that wants my name passed in a cookie:\n"
--"\n"
--" curl -b \"name=Daniel\" www.sillypage.com\n"
--"\n"
--" Curl also has the ability to use previously received cookies in following\n"
--" sessions. If you get cookies from a server and store them in a file in a\n"
--" manner similar to:\n"
--"\n"
--" curl --dump-header headers www.example.com\n"
--"\n"
--, stdout);
-- fputs(
--" ... you can then in a second connect to that (or another) site, use the\n"
--" cookies from the 'headers' file like:\n"
--"\n"
--" curl -b headers www.example.com\n"
--"\n"
--" While saving headers to a file is a working way to store cookies, it is\n"
--" however error-prone and not the preferred way to do this. Instead, make curl\n"
--" save the incoming cookies using the well-known netscape cookie format like\n"
--" this:\n"
--"\n"
--" curl -c cookies.txt www.example.com\n"
--"\n"
--, stdout);
-- fputs(
--" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
--" you can make curl follow a location: (which often is used in combination\n"
--" with cookies). So that if a site sends cookies and a location, you can\n"
--" use a non-existing file to trigger the cookie awareness like:\n"
--"\n"
--" curl -L -b empty.txt www.example.com\n"
--"\n"
--" The file to read cookies from must be formatted using plain HTTP headers OR\n"
--" as netscape's cookie file. Curl will determine what kind it is based on the\n"
--, stdout);
-- fputs(
--" file contents. In the above command, curl will parse the header and store\n"
--" the cookies received from www.example.com. curl will send to the server the\n"
--" stored cookies which match the request as it follows the location. The\n"
--" file \"empty.txt\" may be a nonexistent file.\n"
--"\n"
--" Alas, to both read and write cookies from a netscape cookie file, you can\n"
--" set both -b and -c to use the same file:\n"
--"\n"
--" curl -b cookies.txt -c cookies.txt www.example.com\n"
--"\n"
--"PROGRESS METER\n"
--"\n"
--, stdout);
-- fputs(
--" The progress meter exists to show a user that something actually is\n"
--" happening. The different fields in the output have the following meaning:\n"
--"\n"
--" % Total % Received % Xferd Average Speed Time Curr.\n"
--" Dload Upload Total Current Left Speed\n"
--" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287\n"
--"\n"
--" From left-to-right:\n"
--" % - percentage completed of the whole transfer\n"
--, stdout);
-- fputs(
--" Total - total size of the whole expected transfer\n"
--" % - percentage completed of the download\n"
--" Received - currently downloaded amount of bytes\n"
--" % - percentage completed of the upload\n"
--" Xferd - currently uploaded amount of bytes\n"
--" Average Speed\n"
--" Dload - the average transfer speed of the download\n"
--" Average Speed\n"
--" Upload - the average transfer speed of the upload\n"
--" Time Total - expected time to complete the operation\n"
--, stdout);
-- fputs(
--" Time Current - time passed since the invoke\n"
--" Time Left - expected time left to completion\n"
--" Curr.Speed - the average transfer speed the last 5 seconds (the first\n"
--" 5 seconds of a transfer is based on less time of course.)\n"
--"\n"
--" The -# option will display a totally different progress bar that doesn't\n"
--" need much explanation!\n"
--"\n"
--"SPEED LIMIT\n"
--"\n"
--" Curl allows the user to set the transfer speed conditions that must be met\n"
--, stdout);
-- fputs(
--" to let the transfer keep going. By using the switch -y and -Y you\n"
--" can make curl abort transfers if the transfer speed is below the specified\n"
--" lowest limit for a specified time.\n"
--"\n"
--" To have curl abort the download if the speed is slower than 3000 bytes per\n"
--" second for 1 minute, run:\n"
--"\n"
--" curl -Y 3000 -y 60 www.far-away-site.com\n"
--"\n"
--" This can very well be used in combination with the overall time limit, so\n"
--" that the above operation must be completed in whole within 30 minutes:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n"
--"\n"
--" Forcing curl not to transfer data faster than a given rate is also possible,\n"
--" which might be useful if you're using a limited bandwidth connection and you\n"
--" don't want your transfer to use all of it (sometimes referred to as\n"
--" \"bandwidth throttle\").\n"
--"\n"
--" Make curl transfer data no faster than 10 kilobytes per second:\n"
--"\n"
--" curl --limit-rate 10K www.far-away-site.com\n"
--"\n"
--" or\n"
--"\n"
--" curl --limit-rate 10240 www.far-away-site.com\n"
--"\n"
--, stdout);
-- fputs(
--" Or prevent curl from uploading data faster than 1 megabyte per second:\n"
--"\n"
--" curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n"
--"\n"
--" When using the --limit-rate option, the transfer rate is regulated on a\n"
--" per-second basis, which will cause the total transfer speed to become lower\n"
--" than the given number. Sometimes of course substantially lower, if your\n"
--" transfer stalls during periods.\n"
--"\n"
--"CONFIG FILE\n"
--"\n"
--" Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
--, stdout);
-- fputs(
--" systems) from the user's home dir on startup.\n"
--"\n"
--" The config file could be made up with normal command line switches, but you\n"
--" can also specify the long options without the dashes to make it more\n"
--" readable. You can separate the options and the parameter with spaces, or\n"
--" with = or :. Comments can be used within the file. If the first letter on a\n"
--" line is a '#'-symbol the rest of the line is treated as a comment.\n"
--"\n"
--" If you want the parameter to contain spaces, you must enclose the entire\n"
--, stdout);
-- fputs(
--" parameter within double quotes (\"). Within those quotes, you specify a\n"
--" quote as \\\".\n"
--"\n"
--" NOTE: You must specify options and their arguments on the same line.\n"
--"\n"
--" Example, set default time out and proxy in a config file:\n"
--"\n"
--" # We want a 30 minute timeout:\n"
--" -m 1800\n"
--" # ... and we use a proxy for all accesses:\n"
--" proxy = proxy.our.domain.com:8080\n"
--"\n"
--" White spaces ARE significant at the end of lines, but all white spaces\n"
--, stdout);
-- fputs(
--" leading up to the first characters of each line are ignored.\n"
--"\n"
--" Prevent curl from reading the default file by using -q as the first command\n"
--" line parameter, like:\n"
--"\n"
--" curl -q www.thatsite.com\n"
--"\n"
--" Force curl to get and display a local help page in case it is invoked\n"
--" without URL by making a config file similar to:\n"
--"\n"
--" # default url to get\n"
--" url = \"http://help.with.curl.com/curlhelp.html\"\n"
--"\n"
--" You can specify another config file to be read by using the -K/--config\n"
--, stdout);
-- fputs(
--" flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
--" which can be handy if you want to hide options from being visible in process\n"
--" tables etc:\n"
--"\n"
--" echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n"
--"\n"
--"EXTRA HEADERS\n"
--"\n"
--" When using curl in your own very special programs, you may end up needing\n"
--" to pass on your own custom headers when getting a web page. You can do\n"
--" this by using the -H flag.\n"
--"\n"
--, stdout);
-- fputs(
--" Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
--" page:\n"
--"\n"
--" curl -H \"X-you-and-me: yes\" www.love.com\n"
--"\n"
--" This can also be useful in case you want curl to send a different text in a\n"
--" header than it normally does. The -H header you specify then replaces the\n"
--" header curl would normally send. If you replace an internal header with an\n"
--" empty one, you prevent that header from being sent. To prevent the Host:\n"
--" header from being used:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -H \"Host:\" www.server.com\n"
--"\n"
--"FTP and PATH NAMES\n"
--"\n"
--" Do note that when getting files with the ftp:// URL, the given path is\n"
--" relative the directory you enter. To get the file 'README' from your home\n"
--" directory at your ftp site, do:\n"
--"\n"
--" curl ftp://user:passwd@my.site.com/README\n"
--"\n"
--" But if you want the README file from the root directory of that very same\n"
--" site, you need to specify the absolute file name:\n"
--"\n"
--" curl ftp://user:passwd@my.site.com//README\n"
--"\n"
--, stdout);
-- fputs(
--" (I.e with an extra slash in front of the file name.)\n"
--"\n"
--"SFTP and SCP and PATH NAMES\n"
--"\n"
--" With sftp: and scp: URLs, the path name given is the absolute name on the\n"
--" server. To access a file relative to the remote user's home directory,\n"
--" prefix the file with /~/ , such as:\n"
--"\n"
--" curl -u $USER sftp://home.example.com/~/.bashrc\n"
--"\n"
--"FTP and firewalls\n"
--"\n"
--" The FTP protocol requires one of the involved parties to open a second\n"
--, stdout);
-- fputs(
--" connection as soon as data is about to get transferred. There are two ways to\n"
--" do this.\n"
--"\n"
--" The default way for curl is to issue the PASV command which causes the\n"
--" server to open another port and await another connection performed by the\n"
--" client. This is good if the client is behind a firewall that doesn't allow\n"
--" incoming connections.\n"
--"\n"
--" curl ftp.download.com\n"
--"\n"
--" If the server, for example, is behind a firewall that doesn't allow connections\n"
--, stdout);
-- fputs(
--" on ports other than 21 (or if it just doesn't support the PASV command), the\n"
--" other way to do it is to use the PORT command and instruct the server to\n"
--" connect to the client on the given IP number and port (as parameters to the\n"
--" PORT command).\n"
--"\n"
--" The -P flag to curl supports a few different options. Your machine may have\n"
--" several IP-addresses and/or network interfaces and curl allows you to select\n"
--" which of them to use. Default address can also be used:\n"
--"\n"
--, stdout);
-- fputs(
--" curl -P - ftp.download.com\n"
--"\n"
--" Download with PORT but use the IP address of our 'le0' interface (this does\n"
--" not work on windows):\n"
--"\n"
--" curl -P le0 ftp.download.com\n"
--"\n"
--" Download with PORT but use 192.168.0.10 as our IP address to use:\n"
--"\n"
--" curl -P 192.168.0.10 ftp.download.com\n"
--"\n"
--"NETWORK INTERFACE\n"
--"\n"
--" Get a web page from a server using a specified port for the interface:\n"
--"\n"
--" curl --interface eth0:1 http://www.netscape.com/\n"
--"\n"
--" or\n"
--"\n"
--, stdout);
-- fputs(
--" curl --interface 192.168.1.10 http://www.netscape.com/\n"
--"\n"
--"HTTPS\n"
--"\n"
--" Secure HTTP requires SSL libraries to be installed and used when curl is\n"
--" built. If that is done, curl is capable of retrieving and posting documents\n"
--" using the HTTPS protocol.\n"
--"\n"
--" Example:\n"
--"\n"
--" curl https://www.secure-site.com\n"
--"\n"
--" Curl is also capable of using your personal certificates to get/post files\n"
--" from sites that require valid certificates. The only drawback is that the\n"
--, stdout);
-- fputs(
--" certificate needs to be in PEM-format. PEM is a standard and open format to\n"
--" store certificates with, but it is not used by the most commonly used\n"
--" browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n"
--" want curl to use the certificates you use with your (favourite) browser, you\n"
--" may need to download/compile a converter that can convert your browser's\n"
--" formatted certificates to PEM formatted ones. This kind of converter is\n"
--, stdout);
-- fputs(
--" included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
--" N. Henson has written a patch for SSLeay that adds this functionality. You\n"
--" can get his patch (that requires an SSLeay installation) from his site at:\n"
--" http://www.drh-consultancy.demon.co.uk/\n"
--"\n"
--" Example on how to automatically retrieve a document using a certificate with\n"
--" a personal password:\n"
--"\n"
--" curl -E /path/to/cert.pem:password https://secure.site.com/\n"
--"\n"
--, stdout);
-- fputs(
--" If you neglect to specify the password on the command line, you will be\n"
--" prompted for the correct password before any data can be received.\n"
--"\n"
--" Many older SSL-servers have problems with SSLv3 or TLS, which newer versions\n"
--" of OpenSSL etc use, therefore it is sometimes useful to specify what\n"
--" SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n"
--" version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n"
--"\n"
--" curl -2 https://secure.site.com/\n"
--"\n"
--, stdout);
-- fputs(
--" Otherwise, curl will first attempt to use v3 and then v2.\n"
--"\n"
--" To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
--" formatted one that curl can use, do something like this:\n"
--"\n"
--" In Netscape, you start with hitting the 'Security' menu button.\n"
--"\n"
--" Select 'certificates->yours' and then pick a certificate in the list\n"
--"\n"
--" Press the 'Export' button\n"
--"\n"
--" enter your PIN code for the certs\n"
--"\n"
--" select a proper place to save it\n"
--"\n"
--, stdout);
-- fputs(
--" Run the 'openssl' application to convert the certificate. If you cd to the\n"
--" openssl installation, you can do it like:\n"
--"\n"
--" # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n"
--"\n"
--" In Firefox, select Options, then Advanced, then the Encryption tab,\n"
--" View Certificates. This opens the Certificate Manager, where you can\n"
--" Export. Be sure to select PEM for the Save as type.\n"
--"\n"
--" In Internet Explorer, select Internet Options, then the Content tab, then\n"
--, stdout);
-- fputs(
--" Certificates. Then you can Export, and depending on the format you may\n"
--" need to convert to PEM.\n"
--"\n"
--" In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL\n"
--" select Manage Certificates.\n"
--"\n"
--"RESUMING FILE TRANSFERS\n"
--"\n"
--" To continue a file transfer where it was previously aborted, curl supports\n"
--" resume on HTTP(S) downloads as well as FTP uploads and downloads.\n"
--"\n"
--" Continue downloading a document:\n"
--"\n"
--" curl -C - -o file ftp://ftp.server.com/path/file\n"
--"\n"
--, stdout);
-- fputs(
--" Continue uploading a document(*1):\n"
--"\n"
--" curl -C - -T file ftp://ftp.server.com/path/file\n"
--"\n"
--" Continue downloading a document from a web server(*2):\n"
--"\n"
--" curl -C - -o file http://www.server.com/\n"
--"\n"
--" (*1) = This requires that the FTP server supports the non-standard command\n"
--" SIZE. If it doesn't, curl will say so.\n"
--"\n"
--" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n"
--" doesn't, curl will say so.\n"
--"\n"
--"TIME CONDITIONS\n"
--"\n"
--, stdout);
-- fputs(
--" HTTP allows a client to specify a time condition for the document it\n"
--" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to\n"
--" specify them with the -z/--time-cond flag.\n"
--"\n"
--" For example, you can easily make a download that only gets performed if the\n"
--" remote file is newer than a local copy. It would be made like:\n"
--"\n"
--" curl -z local.html http://remote.server.com/remote.html\n"
--"\n"
--" Or you can download a file only if the local file is newer than the remote\n"
--, stdout);
-- fputs(
--" one. Do this by prepending the date string with a '-', as in:\n"
--"\n"
--" curl -z -local.html http://remote.server.com/remote.html\n"
--"\n"
--" You can specify a \"free text\" date as condition. Tell curl to only download\n"
--" the file if it was updated since January 12, 2012:\n"
--"\n"
--" curl -z \"Jan 12 2012\" http://remote.server.com/remote.html\n"
--"\n"
--" Curl will then accept a wide range of date formats. You always make the date\n"
--" check the other way around by prepending it with a dash '-'.\n"
--"\n"
--"DICT\n"
--"\n"
--" For fun try\n"
--"\n"
--, stdout);
-- fputs(
--" curl dict://dict.org/m:curl\n"
--" curl dict://dict.org/d:heisenbug:jargon\n"
--" curl dict://dict.org/d:daniel:web1913\n"
--"\n"
--" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
--" and 'lookup'. For example,\n"
--"\n"
--" curl dict://dict.org/find:curl\n"
--"\n"
--" Commands that break the URL description of the RFC (but not the DICT\n"
--" protocol) are\n"
--"\n"
--" curl dict://dict.org/show:db\n"
--" curl dict://dict.org/show:strat\n"
--"\n"
--, stdout);
-- fputs(
--" Authentication is still missing (but this is not required by the RFC)\n"
--"\n"
--"LDAP\n"
--"\n"
--" If you have installed the OpenLDAP library, curl can take advantage of it\n"
--" and offer ldap:// support.\n"
--"\n"
--" LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
--" advise you to dig up the syntax description for that elsewhere. Two places\n"
--" that might suit you are:\n"
--"\n"
--" Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n"
--" Working with LDAP URLs\":\n"
--, stdout);
-- fputs(
--" http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n"
--"\n"
--" RFC 2255, \"The LDAP URL Format\" http://curl.haxx.se/rfc/rfc2255.txt\n"
--"\n"
--" To show you an example, this is how I can get all people from my local LDAP\n"
--" server that has a certain sub-domain in their email address:\n"
--"\n"
--" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
--"\n"
--" If I want the same info in HTML format, I can get it by not using the -B\n"
--" (enforce ASCII) flag.\n"
--"\n"
--"ENVIRONMENT VARIABLES\n"
--"\n"
--, stdout);
-- fputs(
--" Curl reads and understands the following environment variables:\n"
--"\n"
--" http_proxy, HTTPS_PROXY, FTP_PROXY\n"
--"\n"
--" They should be set for protocol-specific proxies. General proxy should be\n"
--" set with\n"
--"\n"
--" ALL_PROXY\n"
--"\n"
--" A comma-separated list of host names that shouldn't go through any proxy is\n"
--" set in (only an asterisk, '*' matches all hosts)\n"
--"\n"
--" NO_PROXY\n"
--"\n"
--" If the host name matches one of these strings, or the host is within the\n"
--, stdout);
-- fputs(
--" domain of one of these strings, transactions with that node will not be\n"
--" proxied.\n"
--"\n"
--"\n"
--" The usage of the -x/--proxy flag overrides the environment variables.\n"
--"\n"
--"NETRC\n"
--"\n"
--" Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
--" to specify name and password for commonly visited FTP sites in a file so\n"
--" that you don't have to type them in each time you visit those sites. You\n"
--" realize this is a big security risk if someone else gets hold of your\n"
--, stdout);
-- fputs(
--" passwords, so therefore most unix programs won't read this file unless it is\n"
--" only readable by yourself (curl doesn't care though).\n"
--"\n"
--" Curl supports .netrc files if told to (using the -n/--netrc and\n"
--" --netrc-optional options). This is not restricted to just FTP,\n"
--" so curl can use it for all protocols where authentication is used.\n"
--"\n"
--" A very simple .netrc file could look something like:\n"
--"\n"
--" machine curl.haxx.se login iamdaniel password mysecret\n"
--"\n"
--"CUSTOM OUTPUT\n"
--"\n"
--, stdout);
-- fputs(
--" To better allow script programmers to get to know about the progress of\n"
--" curl, the -w/--write-out option was introduced. Using this, you can specify\n"
--" what information from the previous transfer you want to extract.\n"
--"\n"
--" To display the amount of bytes downloaded together with some text and an\n"
--" ending newline:\n"
--"\n"
--" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
--"\n"
--"KERBEROS FTP TRANSFER\n"
--"\n"
--" Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need\n"
--, stdout);
-- fputs(
--" the kerberos package installed and used at curl build time for it to be\n"
--" available.\n"
--"\n"
--" First, get the krb-ticket the normal way, like with the kinit/kauth tool.\n"
--" Then use curl in way similar to:\n"
--"\n"
--" curl --krb private ftp://krb4site.com -u username:fakepwd\n"
--"\n"
--" There's no use for a password on the -u switch, but a blank one will make\n"
--" curl ask for one and you already entered the real password to kinit/kauth.\n"
--"\n"
--"TELNET\n"
--"\n"
--, stdout);
-- fputs(
--" The curl telnet support is basic and very easy to use. Curl passes all data\n"
--" passed to it on stdin to the remote server. Connect to a remote telnet\n"
--" server using a command line similar to:\n"
--"\n"
--" curl telnet://remote.server.com\n"
--"\n"
--" And enter the data to pass to the server on stdin. The result will be sent\n"
--" to stdout or to the file you specify with -o.\n"
--"\n"
--" You might want the -N/--no-buffer option to switch off the buffered output\n"
--" for slow connections or similar.\n"
--"\n"
--, stdout);
-- fputs(
--" Pass options to the telnet protocol negotiation, by using the -t option. To\n"
--" tell the server we use a vt100 terminal, try something like:\n"
--"\n"
--" curl -tTTYPE=vt100 telnet://remote.server.com\n"
--"\n"
--" Other interesting options for it -t include:\n"
--"\n"
--" - XDISPLOC=<X display> Sets the X display location.\n"
--"\n"
--" - NEW_ENV=<var,val> Sets an environment variable.\n"
--"\n"
--" NOTE: The telnet protocol does not specify any way to login with a specified\n"
--, stdout);
-- fputs(
--" user and password so curl can't do that automatically. To do that, you need\n"
--" to track when the login prompt is received and send the username and\n"
--" password accordingly.\n"
--"\n"
--"PERSISTENT CONNECTIONS\n"
--"\n"
--" Specifying multiple files on a single command line will make curl transfer\n"
--" all of them, one after the other in the specified order.\n"
--"\n"
--" libcurl will attempt to use persistent connections for the transfers so that\n"
--" the second transfer to the same host can use the same connection that was\n"
--, stdout);
-- fputs(
--" already initiated and was left open in the previous transfer. This greatly\n"
--" decreases connection time for all but the first transfer and it makes a far\n"
--" better use of the network.\n"
--"\n"
--" Note that curl cannot use persistent connections for transfers that are used\n"
--" in subsequence curl invokes. Try to stuff as many URLs as possible on the\n"
--" same command line if they are using the same host, as that'll make the\n"
--" transfers faster. If you use an HTTP proxy for file transfers, practically\n"
--, stdout);
-- fputs(
--" all transfers will be persistent.\n"
--"\n"
--"MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE\n"
--"\n"
--" As is mentioned above, you can download multiple files with one command line\n"
--" by simply adding more URLs. If you want those to get saved to a local file\n"
--" instead of just printed to stdout, you need to add one save option for each\n"
--" URL you specify. Note that this also goes for the -O option (but not\n"
--" --remote-name-all).\n"
--"\n"
--" For example: get two files and use -O for the first and a custom file\n"
--, stdout);
-- fputs(
--" name for the second:\n"
--"\n"
--" curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg\n"
--"\n"
--" You can also upload multiple files in a similar fashion:\n"
--"\n"
--" curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt\n"
--"\n"
--"IPv6\n"
--"\n"
--" curl will connect to a server with IPv6 when a host lookup returns an IPv6\n"
--" address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6\n"
--" options can specify which address to use when both are available. IPv6\n"
--, stdout);
-- fputs(
--" addresses can also be specified directly in URLs using the syntax:\n"
--"\n"
--" http://[2001:1890:1112:1::20]/overview.html\n"
--"\n"
--" When this style is used, the -g option must be given to stop curl from\n"
--" interpreting the square brackets as special globbing characters. Link local\n"
--" and site local addresses including a scope identifier, such as fe80::1234%1,\n"
--" may also be used, but the scope portion must be numeric and the percent\n"
--" character must be URL escaped. The previous example in an SFTP URL might\n"
--, stdout);
-- fputs(
--" look like:\n"
--"\n"
--" sftp://[fe80::1234%251]/\n"
--"\n"
--" IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface\n"
--" or --ftp-port options) should not be URL encoded.\n"
--"\n"
--"METALINK\n"
--"\n"
--" Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way\n"
--" to list multiple URIs and hashes for a file. Curl will make use of the mirrors\n"
--" listed within for failover if there are errors (such as the file or server not\n"
--, stdout);
-- fputs(
--" being available). It will also verify the hash of the file after the download\n"
--" completes. The Metalink file itself is downloaded and processed in memory and\n"
--" not stored in the local file system.\n"
--"\n"
--" Example to use a remote Metalink file:\n"
--"\n"
--" curl --metalink http://www.example.com/example.metalink\n"
--"\n"
--" To use a Metalink file in the local file system, use FILE protocol (file://):\n"
--"\n"
--" curl --metalink file://example.metalink\n"
--"\n"
--, stdout);
-- fputs(
--" Please note that if FILE protocol is disabled, there is no way to use a local\n"
--" Metalink file at the time of this writing. Also note that if --metalink and\n"
--" --include are used together, --include will be ignored. This is because including\n"
--" headers in the response will break Metalink parser and if the headers are included\n"
--" in the file described in Metalink file, hash check will fail.\n"
--"\n"
--"MAILING LISTS\n"
--"\n"
--" For your convenience, we have several open mailing lists to discuss curl,\n"
--, stdout);
-- fputs(
--" its development and things relevant to this. Get all info at\n"
--" http://curl.haxx.se/mail/. Some of the lists available are:\n"
--"\n"
--" curl-users\n"
--"\n"
--" Users of the command line tool. How to use it, what doesn't work, new\n"
--" features, related tools, questions, news, installations, compilations,\n"
--" running, porting etc.\n"
--"\n"
--" curl-library\n"
--"\n"
--" Developers using or developing libcurl. Bugs, extensions, improvements.\n"
--"\n"
--" curl-announce\n"
--"\n"
--, stdout);
-- fputs(
--" Low-traffic. Only receives announcements of new public versions. At worst,\n"
--" that makes something like one or two mails per month, but usually only one\n"
--" mail every second month.\n"
--"\n"
--" curl-and-php\n"
--"\n"
--" Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n"
--" with a curl angle.\n"
--"\n"
--" curl-and-python\n"
--"\n"
--" Python hackers using curl with or without the python binding pycurl.\n"
--"\n"
--" Please direct curl questions, feature requests and trouble reports to one of\n"
--, stdout);
-- fputs(
--" these mailing lists instead of mailing any individual.\n"
--, stdout) ;
--}
--#endif /* USE_MANUAL */
--#else
--/*
-- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
-- * Generation time: Tue Mar 25 11:29:49 2014
-- */
--#ifdef USE_MANUAL
--#include "tool_hugehelp.h"
--#include <zlib.h>
--#include "memdebug.h" /* keep this as LAST include */
--static const unsigned char hugehelpgz[] = {
-- /* This mumbo-jumbo is the huge help text compressed with gzip.
-- Thanks to this operation, the size of this data shrunk from 156972
-- to 47509 bytes. You can disable the use of compressed help
-- texts by NOT passing -c to the mkhelp.pl tool. */
-- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
-- 0x6b, 0x5b, 0x23, 0x57, 0x92, 0x2e, 0xfa, 0x9d, 0x5f, 0x91, 0xad, 0x3e,
-- 0x3d, 0xc0, 0xb4, 0x24, 0x2e, 0x75, 0xb1, 0x8b, 0xae, 0xf2, 0x18, 0x53,
-- 0x94, 0xcd, 0x36, 0x55, 0xb0, 0x81, 0xf2, 0x65, 0xdb, 0x7e, 0xea, 0x49,
-- 0x49, 0x09, 0x64, 0x23, 0x29, 0xd5, 0x99, 0x29, 0x28, 0x7a, 0x66, 0xf6,
-- 0x6f, 0x3f, 0x11, 0x6f, 0x44, 0xac, 0xb5, 0x32, 0x57, 0x0a, 0xca, 0x9e,
-- 0x76, 0x9f, 0x39, 0xfb, 0x1c, 0xcf, 0x34, 0x05, 0x52, 0xe6, 0xba, 0xc6,
-- 0x8a, 0x15, 0xd7, 0x37, 0x92, 0xe4, 0xb1, 0xff, 0x3e, 0xe0, 0x7f, 0x1f,
-- 0xe8, 0x3f, 0xfa, 0x77, 0x2d, 0x49, 0x4e, 0xcb, 0xe2, 0xaf, 0xd9, 0xb8,
-- 0xee, 0x7e, 0xf6, 0xc3, 0x87, 0xff, 0x48, 0xe4, 0xff, 0xe8, 0x9d, 0x9f,
-- 0xe9, 0xdf, 0xb5, 0x07, 0xdb, 0xde, 0x4a, 0xfc, 0x0b, 0xff, 0xf1, 0x61,
-- 0x33, 0x79, 0xec, 0x85, 0xff, 0x48, 0x36, 0xf0, 0xc2, 0x07, 0xed, 0xe1,
-- 0x25, 0xff, 0xfe, 0xe1, 0xc3, 0xc3, 0x9d, 0xfc, 0xcc, 0xa3, 0xe2, 0x1f,
-- 0x5b, 0xfc, 0xde, 0xcf, 0x1f, 0xf8, 0x57, 0xfa, 0x64, 0x6d, 0xed, 0xdd,
-- 0xfe, 0xdb, 0x43, 0x7b, 0x75, 0xbc, 0x2c, 0xa7, 0xc9, 0x20, 0xa9, 0xcb,
-- 0x74, 0x5e, 0x5d, 0x66, 0x65, 0x92, 0x26, 0xef, 0xcf, 0x8e, 0xd7, 0xd6,
-- 0xce, 0x7f, 0x7c, 0x77, 0x72, 0x7a, 0x7e, 0x74, 0xde, 0x78, 0xec, 0xa7,
-- 0x62, 0x51, 0xe7, 0xc5, 0xbc, 0xfa, 0x25, 0xf9, 0x89, 0x1e, 0x1a, 0x0e,
-- 0x87, 0xbf, 0xac, 0xad, 0xbd, 0x3e, 0x3c, 0x3f, 0x38, 0x3b, 0x3a, 0xbd,
-- 0x38, 0x3a, 0x79, 0xd7, 0x78, 0x36, 0xc9, 0xab, 0x84, 0x1a, 0xab, 0x8b,
-- 0x62, 0x4a, 0x3f, 0x7c, 0xfb, 0x93, 0xb4, 0x4e, 0x93, 0xcb, 0xb2, 0x98,
-- 0x25, 0x45, 0xc9, 0x5f, 0xa4, 0x49, 0x95, 0x95, 0xb7, 0x59, 0xd9, 0x4f,
-- 0x96, 0x55, 0x3e, 0xbf, 0x4a, 0x8a, 0x79, 0x96, 0x14, 0x97, 0x49, 0x7d,
-- 0x9d, 0x59, 0x73, 0xd5, 0x72, 0xb1, 0x28, 0xca, 0x3a, 0x9b, 0x24, 0x8b,
-- 0xb2, 0xa8, 0x8b, 0x71, 0x31, 0xad, 0x92, 0x8d, 0xd7, 0x47, 0x07, 0x17,
-- 0xfd, 0xe4, 0xcd, 0xd1, 0xf1, 0x21, 0xfd, 0xbc, 0x38, 0xc5, 0x8f, 0xf3,
-- 0x7e, 0xf2, 0xf5, 0xc9, 0xe9, 0x37, 0x87, 0x67, 0xfd, 0xe4, 0x9b, 0x0b,
-- 0xfe, 0x8c, 0x7f, 0xd2, 0x87, 0xc9, 0xd1, 0xdb, 0xfd, 0xd3, 0xbe, 0x35,
-- 0xc7, 0x7f, 0xf0, 0x87, 0xc7, 0xaf, 0xe9, 0x43, 0xf9, 0x87, 0xff, 0x3c,
-- 0x3d, 0x39, 0x7d, 0xd2, 0xc7, 0x4f, 0xfa, 0xeb, 0xec, 0xe2, 0xed, 0x29,
-- 0xff, 0x3c, 0xa7, 0x9f, 0xe7, 0x07, 0xfc, 0x03, 0x7d, 0x9c, 0xbf, 0xb5,
-- 0x9f, 0xe7, 0xae, 0xb9, 0x8b, 0xc3, 0xe3, 0x77, 0x87, 0x17, 0x49, 0x3a,
-- 0x9f, 0x24, 0x17, 0xf4, 0xd0, 0xe6, 0x90, 0x3e, 0xba, 0xce, 0x92, 0x71,
-- 0x31, 0x9b, 0xf1, 0x67, 0xb4, 0x0a, 0x93, 0xac, 0xca, 0xaf, 0xe6, 0x34,
-- 0x7c, 0x9a, 0xed, 0x5d, 0x51, 0xde, 0x24, 0x77, 0x79, 0x7d, 0x5d, 0x2c,
-- 0x6b, 0x9a, 0x30, 0xad, 0x47, 0x92, 0xcf, 0xeb, 0xac, 0x1c, 0x58, 0x73,
-- 0xe9, 0x98, 0x57, 0x78, 0xb8, 0xd6, 0x58, 0xcb, 0xe2, 0x92, 0x56, 0xae,
-- 0xa2, 0xa5, 0x1a, 0x2d, 0xab, 0x69, 0x91, 0x4e, 0x78, 0x81, 0xe8, 0xe5,
-- 0xcb, 0x25, 0x2d, 0x6d, 0x99, 0x8f, 0x6f, 0xaa, 0x64, 0x9a, 0xdf, 0x64,
-- 0xbc, 0x3c, 0x1f, 0xef, 0x6d, 0xb9, 0xfa, 0xd2, 0x7c, 0xba, 0xa4, 0x95,
-- 0x9c, 0xbb, 0xe6, 0xeb, 0x7c, 0x9c, 0x72, 0x07, 0x58, 0xaf, 0x64, 0xb9,
-- 0xe0, 0xd6, 0x64, 0x9d, 0x92, 0x45, 0x51, 0xd1, 0x4b, 0xe7, 0xe7, 0xc7,
-- 0x34, 0xf6, 0xf9, 0x3c, 0xc3, 0x38, 0xaa, 0x3e, 0xfd, 0x51, 0xdc, 0xe4,
-- 0x19, 0xfd, 0x72, 0x99, 0x4f, 0xb3, 0x44, 0xf6, 0xd1, 0x35, 0xc7, 0x1b,
-- 0x9a, 0x94, 0x59, 0xb5, 0x9c, 0x65, 0xb4, 0x84, 0x6f, 0xb3, 0x3a, 0x9d,
-- 0xe6, 0xf3, 0x1b, 0xfa, 0x95, 0xa7, 0x3e, 0x2b, 0xca, 0x6c, 0x98, 0xec,
-- 0x57, 0xc9, 0x7d, 0xb1, 0xa4, 0x39, 0x4f, 0xa7, 0xb4, 0xd3, 0x59, 0x32,
-- 0xca, 0xa6, 0xc5, 0x5d, 0x9f, 0xf7, 0x37, 0x99, 0x2f, 0x67, 0x23, 0x6a,
-- 0xa0, 0xb8, 0xf4, 0xcd, 0xa5, 0xf5, 0x92, 0x9a, 0x93, 0xa7, 0x67, 0x29,
-- 0xcd, 0x89, 0xde, 0x2d, 0x93, 0xeb, 0x8c, 0xe6, 0x5c, 0x2d, 0xf2, 0xf9,
-- 0x1f, 0x9a, 0xeb, 0x42, 0x8b, 0xbb, 0x28, 0xee, 0xb2, 0x92, 0xd6, 0x76,
-- 0x74, 0x9f, 0xd0, 0x22, 0x8c, 0x84, 0xf4, 0x2e, 0x89, 0xb4, 0x92, 0x94,
-- 0x9a, 0x70, 0x64, 0x37, 0x28, 0xb3, 0x69, 0xca, 0x24, 0xe4, 0xfa, 0xa0,
-- 0x7d, 0x3a, 0xcf, 0x1c, 0x8d, 0xe9, 0xab, 0x1b, 0x4f, 0x36, 0xf1, 0xf2,
-- 0x84, 0x66, 0x92, 0x4f, 0x2b, 0xda, 0x06, 0x3e, 0x0c, 0xb6, 0xd3, 0x34,
-- 0x64, 0x3e, 0x1c, 0x44, 0x91, 0xf7, 0xf3, 0x3a, 0xfd, 0x88, 0xee, 0x95,
-- 0x22, 0x07, 0x93, 0x6c, 0x91, 0xcd, 0x27, 0xd9, 0xbc, 0x1e, 0x26, 0x3f,
-- 0x16, 0xcb, 0x75, 0xea, 0xfb, 0x32, 0xa7, 0x35, 0x48, 0xb5, 0x29, 0xea,
-- 0x99, 0xc8, 0x60, 0x5c, 0xe6, 0x8b, 0x60, 0x2b, 0x8a, 0x39, 0x6d, 0x7e,
-- 0x72, 0xf6, 0xe6, 0x20, 0x79, 0xf2, 0xe2, 0xf3, 0xe7, 0x7e, 0xcf, 0xa9,
-- 0x81, 0x64, 0x9c, 0xce, 0x69, 0xc6, 0xd9, 0x38, 0xbf, 0xbc, 0x4f, 0x66,
-- 0xcb, 0x69, 0x9d, 0x2f, 0x68, 0xf5, 0xa9, 0xf3, 0x8a, 0x8f, 0xcd, 0x22,
-- 0x2d, 0xeb, 0x8a, 0x89, 0x00, 0x1f, 0x60, 0xee, 0x77, 0x65, 0x5e, 0xf3,
-- 0xf1, 0xc1, 0x77, 0x34, 0xc2, 0xac, 0xae, 0xac, 0x39, 0x26, 0x37, 0xea,
-- 0x67, 0x54, 0xa6, 0x63, 0x5a, 0xda, 0xb4, 0xa2, 0x4e, 0xf7, 0x5c, 0x5f,
-- 0xc9, 0x75, 0x5d, 0x2f, 0xf6, 0xb6, 0xb6, 0xaa, 0xbc, 0xce, 0x86, 0xff,
-- 0x4e, 0x87, 0xaf, 0x5f, 0xdf, 0x15, 0xfd, 0xfa, 0xba, 0xcc, 0xb2, 0xff,
-- 0x1c, 0x12, 0x11, 0xbb, 0x07, 0xa9, 0xdb, 0x7b, 0x1d, 0xd7, 0x55, 0x56,
-- 0x53, 0x07, 0x7f, 0x5b, 0x66, 0x73, 0x6e, 0x90, 0x86, 0x91, 0x4e, 0x17,
-- 0xd7, 0x29, 0xed, 0x66, 0x46, 0xc4, 0xc8, 0xc7, 0x99, 0xe8, 0x85, 0x07,
-- 0x25, 0x07, 0xfa, 0xa7, 0x5f, 0xa2, 0x3e, 0x2f, 0xd1, 0x25, 0xfd, 0x1c,
-- 0xea, 0x4b, 0x29, 0xad, 0x35, 0x75, 0xb6, 0xc5, 0x34, 0xf6, 0xd3, 0xce,
-- 0x60, 0x67, 0x7b, 0xfb, 0x97, 0x61, 0xfd, 0xb1, 0xfe, 0xc4, 0x17, 0xb6,
-- 0xb7, 0xfd, 0x2b, 0xfc, 0xf4, 0x06, 0xcf, 0x38, 0x99, 0x12, 0xd1, 0x70,
-- 0xff, 0x7f, 0xcf, 0xca, 0xa2, 0xda, 0xec, 0x68, 0x6a, 0x9a, 0xd5, 0x74,
-- 0xf2, 0x82, 0x76, 0xd2, 0xc1, 0xdf, 0xa5, 0x5b, 0x7b, 0xf8, 0x5d, 0x56,
-- 0x81, 0x66, 0xfc, 0x64, 0x93, 0xb4, 0x24, 0xba, 0x2d, 0x6a, 0xcf, 0x94,
-- 0xfa, 0x74, 0x28, 0x6b, 0xb7, 0x34, 0x74, 0xe6, 0xe8, 0x69, 0x62, 0x67,
-- 0xe9, 0x94, 0x39, 0x59, 0x95, 0xcc, 0x33, 0x3f, 0x0d, 0x3a, 0xff, 0x59,
-- 0x3a, 0xbe, 0x4e, 0x0a, 0x22, 0xfe, 0x32, 0xde, 0x82, 0x74, 0x7e, 0x3f,
-- 0x2c, 0xca, 0xab, 0xad, 0xb4, 0x1c, 0x5f, 0xe7, 0xb7, 0xb4, 0x0e, 0x2f,
-- 0x5e, 0x3c, 0x1f, 0xd0, 0x8f, 0x17, 0xbf, 0x6c, 0xdd, 0x16, 0x53, 0x5a,
-- 0x96, 0xa7, 0xbf, 0x6c, 0xf1, 0xee, 0xfe, 0x7b, 0xda, 0x1f, 0xf5, 0xc7,
-- 0xff, 0x39, 0xbc, 0xae, 0x67, 0xd3, 0x95, 0x34, 0x43, 0x8d, 0x25, 0xe9,
-- 0xac, 0x58, 0xce, 0x6b, 0x47, 0x27, 0x44, 0x6e, 0x75, 0xc0, 0x99, 0xe8,
-- 0xa4, 0x66, 0xc2, 0xac, 0x98, 0x7c, 0xf8, 0xc0, 0xd1, 0xd9, 0xf4, 0x27,
-- 0xb1, 0x1e, 0x5f, 0xd3, 0xd4, 0x89, 0x6e, 0x52, 0x9d, 0x7e, 0x9d, 0xa7,
-- 0x7c, 0x26, 0x89, 0x35, 0x94, 0xfc, 0x31, 0x37, 0x25, 0x9d, 0xe5, 0xf4,
-- 0x5c, 0x51, 0x4e, 0xb2, 0xb2, 0x49, 0xc1, 0x18, 0x8e, 0x1f, 0x4f, 0x42,
-- 0x4b, 0xb9, 0xa0, 0xce, 0x97, 0xcc, 0xee, 0x70, 0xc8, 0xb8, 0x05, 0x3a,
-- 0x9e, 0x57, 0xb4, 0x4a, 0xb4, 0x32, 0x4c, 0x54, 0xbc, 0x70, 0xf7, 0xc9,
-- 0x3b, 0xda, 0x3c, 0x61, 0x0d, 0x01, 0xed, 0xc9, 0x66, 0xc5, 0x8b, 0x76,
-- 0x77, 0x77, 0xb7, 0x9a, 0x88, 0xf6, 0x76, 0x5a, 0x74, 0x14, 0xbc, 0xd4,
-- 0xb5, 0xfb, 0x7b, 0xbb, 0xcd, 0xfd, 0x3f, 0xba, 0xc4, 0xc6, 0xda, 0x1c,
-- 0xf8, 0xec, 0x1b, 0xef, 0xb6, 0x83, 0x4f, 0xad, 0xd1, 0xef, 0xd9, 0x65,
-- 0xfe, 0xb1, 0x6f, 0x17, 0x9f, 0xac, 0x65, 0x4a, 0xcd, 0xcf, 0x16, 0x35,
-- 0xef, 0xba, 0x35, 0x77, 0xb5, 0xcc, 0x2a, 0x22, 0xa1, 0xbb, 0xeb, 0x94,
-- 0x3e, 0xb6, 0x06, 0x12, 0x74, 0x31, 0xcb, 0xaf, 0xae, 0xeb, 0xe4, 0x2e,
-- 0x65, 0xfe, 0x71, 0x54, 0x4b, 0x13, 0xcc, 0xb8, 0x89, 0x6b, 0x5c, 0xa6,
-- 0x74, 0xfc, 0x79, 0x85, 0xc0, 0xa5, 0x89, 0xd8, 0x1c, 0x39, 0xd1, 0x5a,
-- 0x81, 0x94, 0x82, 0x7b, 0x71, 0x94, 0x56, 0xbc, 0x1b, 0x73, 0xda, 0xf4,
-- 0x9a, 0xd8, 0xfe, 0x92, 0xff, 0xba, 0x26, 0xc6, 0x9e, 0xcc, 0xd3, 0x59,
-- 0xa6, 0x03, 0x05, 0xef, 0x7b, 0xc3, 0x2c, 0x32, 0xfb, 0x98, 0xce, 0x1c,
-- 0x3f, 0x22, 0x06, 0xd3, 0x57, 0xd6, 0xe9, 0xde, 0xa8, 0x68, 0xd7, 0x88,
-- 0xe2, 0xf8, 0x18, 0xe1, 0x4c, 0xf5, 0xf8, 0xdc, 0xf4, 0x64, 0x9e, 0x18,
-- 0x63, 0x5a, 0x31, 0xef, 0x17, 0x0e, 0x4f, 0x83, 0x0f, 0x26, 0x4b, 0x8b,
-- 0x96, 0xde, 0xf0, 0x2d, 0xd3, 0xba, 0xcb, 0xf0, 0xda, 0xa4, 0x48, 0x72,
-- 0xe2, 0x60, 0x23, 0x3a, 0x5f, 0x3c, 0x33, 0x3e, 0x35, 0x58, 0x15, 0x6e,
-- 0x67, 0x41, 0x6d, 0xf2, 0x87, 0x79, 0xcd, 0x7c, 0x03, 0xe2, 0x08, 0x8d,
-- 0x97, 0x16, 0x05, 0x12, 0x05, 0x9d, 0xbd, 0x60, 0xfe, 0xe0, 0x78, 0xf4,
-- 0x6c, 0x72, 0x4b, 0x17, 0x0f, 0x49, 0x16, 0x99, 0x7b, 0x0b, 0x2c, 0x7a,
-- 0xcc, 0xd7, 0xdd, 0x74, 0x7a, 0x4f, 0x64, 0x57, 0x96, 0x2c, 0xba, 0xf1,
-- 0x0e, 0x8e, 0xe4, 0x70, 0xcc, 0x32, 0xba, 0x19, 0xc2, 0xe5, 0xcc, 0x99,
-- 0x49, 0x11, 0x91, 0xd2, 0x55, 0x03, 0x32, 0xa4, 0x2b, 0x01, 0xc7, 0x18,
-- 0x13, 0xc7, 0xe8, 0xb8, 0xed, 0xf1, 0x38, 0x5b, 0xd4, 0x55, 0xd7, 0x9c,
-- 0x6c, 0xc3, 0x69, 0x38, 0x65, 0xc6, 0x2b, 0x1f, 0xde, 0xa3, 0x58, 0x57,
-- 0xc7, 0xc7, 0x71, 0x95, 0xda, 0xd5, 0x44, 0x57, 0x6b, 0xe5, 0x56, 0xad,
-- 0x06, 0x6d, 0xd0, 0x59, 0xc0, 0x9a, 0xcf, 0x78, 0xa0, 0xfc, 0x70, 0x25,
-- 0x12, 0x13, 0xce, 0x1c, 0x6f, 0xa4, 0x88, 0x4c, 0xd2, 0x2f, 0x73, 0x23,
-- 0x5a, 0x4f, 0xd7, 0x38, 0xf5, 0xea, 0xf6, 0x94, 0xbb, 0xaf, 0x48, 0xd8,
-- 0x24, 0xee, 0x3c, 0xa9, 0xae, 0xe9, 0x3e, 0xa5, 0xad, 0xbf, 0xb8, 0xe6,
-- 0x99, 0xce, 0x88, 0x66, 0x6e, 0x79, 0x7f, 0x17, 0x59, 0x36, 0x19, 0x26,
-- 0x27, 0x97, 0x7c, 0x34, 0x4b, 0x1a, 0x74, 0x8d, 0xaf, 0x99, 0x5b, 0xd0,
-- 0xba, 0x4d, 0x20, 0x8d, 0xcd, 0x1d, 0x57, 0xc0, 0x50, 0x82, 0x63, 0xcf,
-- 0x94, 0x46, 0x8b, 0x9d, 0x30, 0xa3, 0x9f, 0x36, 0x59, 0x0b, 0x44, 0x00,
-- 0x62, 0x01, 0x3c, 0xbc, 0x51, 0x96, 0x80, 0x12, 0x47, 0x59, 0x7d, 0x97,
-- 0x65, 0xae, 0xb9, 0x2a, 0x23, 0x76, 0xc6, 0x9b, 0x26, 0x97, 0xf9, 0xfc,
-- 0xb6, 0xe0, 0x01, 0xae, 0xad, 0x9d, 0x9e, 0x9d, 0x7c, 0x7d, 0x76, 0x78,
-- 0x7e, 0x9e, 0xbc, 0x3d, 0xbc, 0x38, 0x3c, 0x6b, 0xac, 0xf4, 0xbc, 0x28,
-- 0x67, 0xd8, 0xd1, 0x49, 0x5e, 0x2d, 0xa6, 0xe9, 0x3d, 0x6f, 0x35, 0xcd,
-- 0xe4, 0xaa, 0xe4, 0x93, 0x35, 0xcb, 0x98, 0xb5, 0x4c, 0x96, 0x25, 0xc8,
-- 0xa2, 0x58, 0xd0, 0xf6, 0xa9, 0x10, 0x43, 0x8d, 0x4f, 0x20, 0xf9, 0xcc,
-- 0xaf, 0xfc, 0x4a, 0xd3, 0x6d, 0xae, 0x1c, 0x92, 0x59, 0xa4, 0xdb, 0x0f,
-- 0x96, 0x26, 0x20, 0xa5, 0xf6, 0xfd, 0x67, 0xb2, 0x4c, 0x15, 0xe6, 0x44,
-- 0x34, 0x9b, 0xcf, 0x20, 0x4b, 0xd0, 0xbf, 0x5e, 0x80, 0xc8, 0x2e, 0x49,
-- 0x7a, 0x22, 0xae, 0xd9, 0x22, 0x0d, 0x37, 0x4e, 0xac, 0x2b, 0x84, 0x5f,
-- 0x96, 0x86, 0xa9, 0x73, 0x1a, 0xeb, 0x2c, 0x9f, 0x13, 0x81, 0x11, 0x41,
-- 0xea, 0x29, 0x67, 0x4a, 0xa0, 0xb1, 0x5e, 0x0a, 0x4f, 0xd0, 0x15, 0x69,
-- 0x4a, 0xd5, 0xf4, 0x32, 0x6d, 0x36, 0x71, 0x56, 0x37, 0x3d, 0x0c, 0x8a,
-- 0x48, 0x93, 0x9a, 0x4f, 0x47, 0xcc, 0x9a, 0x58, 0xcc, 0x24, 0x69, 0x20,
-- 0xeb, 0xec, 0xcd, 0xc9, 0xad, 0xf4, 0x06, 0x8d, 0x2d, 0x1d, 0xf1, 0x8e,
-- 0xf2, 0x03, 0xad, 0x55, 0xa4, 0x43, 0x04, 0xde, 0x72, 0x97, 0x57, 0x38,
-- 0x54, 0x77, 0xc5, 0x72, 0x4a, 0x22, 0x1d, 0x3f, 0xb0, 0x5c, 0xe0, 0x05,
-- 0xea, 0x6a, 0xe1, 0x4f, 0xcf, 0x2c, 0xff, 0xc8, 0xab, 0xde, 0x6e, 0x85,
-- 0x86, 0x46, 0x7f, 0x2e, 0x68, 0x13, 0x64, 0x38, 0xc3, 0x36, 0x6f, 0x05,
-- 0xd7, 0x88, 0xf6, 0x90, 0x4f, 0x0b, 0xd8, 0xdd, 0xe9, 0xc9, 0xf9, 0x05,
-- 0xb3, 0xff, 0xd3, 0xf7, 0x17, 0xd4, 0x10, 0x5d, 0x43, 0x55, 0x4d, 0xdb,
-- 0xc9, 0x2f, 0xce, 0x33, 0x48, 0xd4, 0xd6, 0x1c, 0xed, 0x5a, 0x8e, 0x23,
-- 0x8e, 0x5b, 0xc5, 0xba, 0x94, 0x31, 0x8a, 0x9a, 0xc1, 0xc4, 0x6b, 0x4a,
-- 0x46, 0x75, 0x9d, 0x31, 0x8f, 0x76, 0x2f, 0x25, 0x1b, 0x5f, 0x6c, 0xd2,
-- 0x76, 0x0f, 0x5c, 0x73, 0x3f, 0xf1, 0xd3, 0xbf, 0x70, 0xcf, 0x55, 0x3e,
-- 0xcb, 0xa7, 0x69, 0x70, 0xb7, 0x29, 0x27, 0x62, 0xba, 0x76, 0xe7, 0x71,
-- 0x4c, 0x6c, 0x17, 0x83, 0xf6, 0x52, 0x35, 0xaf, 0x20, 0x4e, 0xb3, 0xdf,
-- 0xa8, 0x49, 0x91, 0xc9, 0x7b, 0x24, 0xca, 0xba, 0x85, 0xe3, 0x1d, 0xe3,
-- 0x63, 0xde, 0x58, 0xa6, 0xf6, 0xae, 0x45, 0xcb, 0xc6, 0x9c, 0x1c, 0xca,
-- 0x9a, 0x5b, 0xb8, 0xde, 0x28, 0x2d, 0x7b, 0x8e, 0x83, 0x89, 0x06, 0x45,
-- 0x8d, 0x5e, 0x2d, 0x69, 0xf0, 0xb2, 0xaa, 0xfd, 0x64, 0xf0, 0x47, 0x1e,
-- 0x39, 0x8b, 0xd4, 0xee, 0x44, 0x93, 0xac, 0x36, 0x9f, 0x0c, 0xd7, 0x4e,
-- 0xa0, 0xc0, 0x39, 0x6d, 0xef, 0x44, 0xf4, 0xbc, 0x44, 0xd8, 0xbf, 0x88,
-- 0x90, 0x89, 0xa8, 0x66, 0x74, 0x6f, 0xdf, 0x11, 0x0d, 0xa6, 0xb4, 0x84,
-- 0xc4, 0x4c, 0xde, 0xf2, 0xd0, 0xb5, 0x33, 0x55, 0x0e, 0xb1, 0x4f, 0xb4,
-- 0xac, 0x34, 0x2b, 0xa7, 0xd4, 0x4c, 0x26, 0x39, 0x56, 0x80, 0xd8, 0xf4,
-- 0x32, 0x83, 0x4c, 0x24, 0x1c, 0xde, 0xcf, 0x8b, 0x85, 0xeb, 0xea, 0x9a,
-- 0x24, 0xaa, 0xa4, 0x27, 0xcc, 0x64, 0xc0, 0x5d, 0xf4, 0x78, 0x51, 0x67,
-- 0xad, 0x0e, 0x68, 0x1e, 0x13, 0xbd, 0xa8, 0xf8, 0x02, 0x93, 0x7b, 0x6b,
-- 0x96, 0xde, 0x87, 0xf2, 0x0b, 0xd8, 0x0d, 0x46, 0x5d, 0x94, 0xee, 0xce,
-- 0xa6, 0x5b, 0x61, 0x41, 0x32, 0xb0, 0xb1, 0x21, 0xf0, 0x73, 0x9c, 0x9d,
-- 0x4a, 0x06, 0xd6, 0x27, 0x41, 0x96, 0x9f, 0xbc, 0xba, 0xb6, 0x47, 0x83,
-- 0xbb, 0x21, 0xa5, 0x79, 0x31, 0x7f, 0x63, 0x29, 0x7f, 0x62, 0xac, 0xab,
-- 0x28, 0x87, 0x18, 0xf9, 0xb4, 0x60, 0x8e, 0xd3, 0x9b, 0x14, 0xcb, 0x91,
-- 0x1b, 0x39, 0x86, 0xce, 0x44, 0x35, 0xc0, 0x8e, 0xf2, 0x9f, 0xd6, 0x9c,
-- 0x1b, 0xb6, 0x2e, 0x55, 0xf5, 0xe8, 0xd0, 0xfc, 0x42, 0x9d, 0x63, 0x91,
-- 0x88, 0xfb, 0x57, 0xbc, 0xa0, 0xb6, 0xe6, 0xa0, 0x34, 0xe2, 0xd6, 0xeb,
-- 0xb5, 0x1c, 0x0c, 0x88, 0x7f, 0xba, 0xea, 0xc4, 0x62, 0xd0, 0x46, 0x05,
-- 0x89, 0x4c, 0x79, 0xb1, 0x9b, 0x19, 0xcd, 0x68, 0x92, 0x13, 0x3b, 0x23,
-- 0x9e, 0x6a, 0xfb, 0xe2, 0x85, 0xd4, 0xbe, 0x28, 0x96, 0xbc, 0xd6, 0x3a,
-- 0x66, 0xe1, 0x4c, 0x0d, 0xd1, 0x8e, 0x35, 0xad, 0x90, 0xab, 0xda, 0x98,
-- 0x06, 0x27, 0xb4, 0x53, 0xc7, 0x98, 0xc7, 0xe0, 0x36, 0xe1, 0x93, 0x40,
-- 0x22, 0x34, 0x1f, 0x8b, 0xc1, 0xc9, 0xf1, 0x6d, 0x40, 0xd1, 0xac, 0x50,
-- 0xcc, 0xf9, 0xaa, 0xed, 0x43, 0x67, 0x1b, 0x15, 0x05, 0x89, 0xee, 0x7e,
-- 0x6a, 0x2c, 0x71, 0x67, 0x73, 0x66, 0x54, 0xba, 0xa3, 0x83, 0x81, 0x7c,
-- 0x85, 0x96, 0xef, 0x49, 0x6c, 0x4c, 0xaf, 0xd2, 0xdc, 0xd1, 0x9a, 0x32,
-- 0x35, 0xf7, 0xec, 0xbc, 0xd0, 0xc7, 0x79, 0xa7, 0xf8, 0x12, 0x57, 0xfe,
-- 0xb1, 0xc4, 0x5d, 0x97, 0xf1, 0xbc, 0x88, 0x01, 0xe0, 0x14, 0x6b, 0xb3,
-- 0x90, 0x7c, 0xac, 0xb9, 0x11, 0x64, 0x3d, 0x16, 0x9b, 0xc0, 0x05, 0x21,
-- 0x04, 0x51, 0x93, 0xbd, 0x61, 0xf2, 0x0d, 0x69, 0x9e, 0xb0, 0x5b, 0x40,
-- 0x18, 0xce, 0x59, 0x07, 0x27, 0x69, 0xe6, 0x2e, 0x23, 0xbd, 0xb7, 0xaa,
-- 0x69, 0x35, 0x71, 0x81, 0xe2, 0x33, 0x1a, 0xa7, 0xbb, 0xf2, 0xae, 0x8b,
-- 0x3b, 0x74, 0xeb, 0x26, 0xe1, 0x76, 0x12, 0x34, 0x3e, 0x1b, 0x26, 0x1b,
-- 0xb8, 0xa0, 0xc7, 0xbc, 0x58, 0x8b, 0xda, 0xcf, 0xc2, 0xad, 0x07, 0xb1,
-- 0xcc, 0x2a, 0x38, 0x58, 0x7c, 0x5b, 0xd1, 0x08, 0x92, 0xcf, 0x86, 0x3b,
-- 0x2f, 0x86, 0xdb, 0x43, 0x36, 0x53, 0x65, 0xb7, 0x79, 0xb1, 0xac, 0xa8,
-- 0x77, 0x0c, 0x25, 0x09, 0xde, 0x24, 0x55, 0x99, 0xaf, 0x90, 0xab, 0xab,
-- 0xa9, 0x5c, 0xde, 0x5b, 0xc5, 0xe5, 0x65, 0x70, 0xbf, 0x97, 0xa4, 0xc4,
-- 0xe2, 0x66, 0xe3, 0xc5, 0xd1, 0x43, 0x27, 0xfc, 0x2d, 0xbc, 0xd8, 0x75,
-- 0x39, 0x37, 0xdd, 0x0e, 0x0e, 0xfe, 0x48, 0x1b, 0x3d, 0x30, 0x4e, 0x34,
-- 0x20, 0x46, 0xd4, 0xb2, 0x4b, 0xbd, 0x65, 0x4d, 0x3e, 0xbc, 0x0e, 0x3d,
-- 0xdb, 0x12, 0x61, 0x2d, 0x07, 0x69, 0xb9, 0x0f, 0xa9, 0x85, 0xc4, 0xb1,
-- 0xb2, 0xc0, 0x3e, 0x10, 0x10, 0x19, 0x31, 0xa6, 0xf9, 0x24, 0x2d, 0x49,
-- 0xfd, 0x62, 0x33, 0x03, 0x3d, 0xcc, 0xa7, 0x2d, 0x15, 0x72, 0xef, 0x0b,
-- 0xbf, 0xf3, 0x24, 0x36, 0xd8, 0xe3, 0x01, 0x86, 0xaa, 0x98, 0x71, 0x1d,
-- 0xba, 0x06, 0x2a, 0x19, 0x99, 0x8a, 0xa1, 0xa9, 0x97, 0x4a, 0x3c, 0xe3,
-- 0x36, 0x6d, 0xe5, 0xb2, 0x98, 0x4e, 0x8b, 0x3b, 0xbe, 0x40, 0x58, 0x90,
-- 0x0c, 0xb6, 0xd5, 0xb6, 0xa3, 0xaa, 0x8a, 0x71, 0x2e, 0x76, 0x06, 0x5d,
-- 0x74, 0x68, 0x58, 0x30, 0x85, 0xf1, 0xab, 0x95, 0xde, 0xec, 0x2c, 0xb2,
-- 0x56, 0xc4, 0x49, 0x12, 0xa7, 0x2c, 0xc2, 0xb2, 0xd0, 0x6a, 0xce, 0x5f,
-- 0x78, 0x72, 0x24, 0x95, 0x0d, 0xd3, 0x48, 0x72, 0x5a, 0x9f, 0xe2, 0xce,
-- 0xb4, 0x3d, 0x52, 0xba, 0x1d, 0x6b, 0x0c, 0x8e, 0x6a, 0xbf, 0xd5, 0x5c,
-- 0xb5, 0xa4, 0x36, 0x68, 0xbd, 0x27, 0x39, 0x9b, 0x93, 0x48, 0xa1, 0x13,
-- 0x0b, 0x91, 0xc8, 0xf9, 0xf4, 0xda, 0x78, 0x59, 0xd5, 0x24, 0x64, 0x5a,
-- 0xaf, 0xd2, 0x14, 0xf5, 0x4b, 0x24, 0xb9, 0xcf, 0x74, 0xd6, 0x6a, 0x8e,
-- 0x88, 0xee, 0xb3, 0xe1, 0x93, 0xe7, 0xc3, 0xed, 0x80, 0x10, 0xb6, 0x79,
-- 0x9d, 0x59, 0xc9, 0xda, 0x19, 0x6e, 0xb7, 0x1e, 0xdf, 0xe0, 0xfb, 0x7c,
-- 0xd3, 0x96, 0xbc, 0xb1, 0xe6, 0xb8, 0xe9, 0xed, 0x1c, 0xd0, 0x9b, 0xe1,
-- 0x2d, 0x26, 0xf7, 0x75, 0xee, 0xad, 0x19, 0xae, 0x77, 0xda, 0xe1, 0x39,
-- 0x44, 0x41, 0xb9, 0x0b, 0xe9, 0x2e, 0xdf, 0x93, 0x96, 0x76, 0x86, 0x3b,
-- 0xc1, 0xd6, 0xeb, 0x70, 0x76, 0xba, 0x87, 0x13, 0x13, 0x40, 0x6b, 0x30,
-- 0x3b, 0x26, 0x30, 0x8b, 0x94, 0xe4, 0xfa, 0x6d, 0x35, 0x67, 0x6a, 0x9a,
-- 0xbe, 0x68, 0x4b, 0xa6, 0x8b, 0xf4, 0xa4, 0xb1, 0x48, 0x18, 0xd1, 0xee,
-- 0x27, 0x2c, 0x0f, 0xc8, 0x24, 0x27, 0x0d, 0x8b, 0xfb, 0xa5, 0x0d, 0xf1,
-- 0x5b, 0x23, 0xab, 0x82, 0xa1, 0xee, 0xca, 0x00, 0x3b, 0x48, 0x07, 0x17,
-- 0x0b, 0x2e, 0x06, 0x1e, 0xf9, 0x92, 0xee, 0xad, 0x72, 0x0a, 0x8d, 0xc9,
-- 0xec, 0x64, 0xc4, 0x48, 0x88, 0xbf, 0xe5, 0xd3, 0x5a, 0x09, 0x52, 0x4c,
-- 0x1a, 0x09, 0xee, 0xe5, 0xd6, 0xe8, 0x1e, 0x98, 0x0d, 0x71, 0xc3, 0xf9,
-- 0x62, 0xde, 0x7a, 0xe1, 0xb5, 0x70, 0x61, 0x15, 0xb3, 0xdf, 0x9d, 0xbe,
-- 0xa3, 0x99, 0x1d, 0x9f, 0xf3, 0xcd, 0x47, 0x6a, 0xa9, 0xac, 0x10, 0x3e,
-- 0xa5, 0x65, 0x35, 0xde, 0xee, 0xc5, 0x60, 0x92, 0x80, 0x5b, 0xcd, 0xc5,
-- 0x23, 0xc6, 0x51, 0xa0, 0x5b, 0x82, 0xed, 0x95, 0xf4, 0x6d, 0x99, 0x92,
-- 0xc6, 0x86, 0xb9, 0xea, 0x2c, 0x2a, 0x6e, 0x7e, 0x28, 0x3d, 0x47, 0xab,
-- 0x03, 0xe9, 0x00, 0x8a, 0xa0, 0x6b, 0xb9, 0xf9, 0xae, 0xac, 0x2c, 0xaf,
-- 0xca, 0x3c, 0xbb, 0x2a, 0x6a, 0x3e, 0xd2, 0xf6, 0x19, 0x3d, 0x33, 0x68,
-- 0x35, 0x87, 0x55, 0xc3, 0x80, 0xc0, 0x99, 0x44, 0x37, 0x53, 0x35, 0x84,
-- 0xf7, 0x9a, 0xb4, 0x2c, 0xe2, 0x6a, 0xe0, 0x06, 0x6b, 0x0f, 0x2d, 0xec,
-- 0xf3, 0x68, 0x61, 0xd3, 0xe9, 0xca, 0x95, 0xe5, 0xae, 0xf6, 0x8f, 0x69,
-- 0x7a, 0xbc, 0xae, 0xc1, 0xb2, 0xe2, 0xb3, 0x60, 0x59, 0x61, 0x1d, 0xb4,
-- 0x85, 0x5d, 0xbd, 0xb2, 0x58, 0xda, 0x4f, 0x5e, 0x5b, 0xee, 0x44, 0xba,
-- 0x6a, 0x1f, 0xcb, 0x4a, 0x35, 0xbd, 0x4f, 0x59, 0xdb, 0x60, 0x71, 0xe5,
-- 0xd3, 0x64, 0x37, 0x62, 0x59, 0x8b, 0xdf, 0x67, 0x71, 0x77, 0x98, 0x51,
-- 0xd5, 0xd3, 0xea, 0x36, 0xe2, 0x0b, 0x34, 0xe9, 0x4d, 0xb6, 0x8e, 0xb0,
-- 0xb5, 0x2f, 0xe4, 0x0b, 0xbc, 0xcc, 0x9e, 0x2d, 0x7c, 0x4c, 0xee, 0xd8,
-- 0x3a, 0x63, 0x13, 0x70, 0x06, 0x92, 0x34, 0x3a, 0x87, 0xb3, 0xa2, 0x96,
-- 0x97, 0x65, 0xe8, 0x43, 0x6f, 0xaa, 0xe3, 0x56, 0xfd, 0xdd, 0xac, 0xc3,
-- 0x19, 0x6e, 0xf7, 0xfd, 0xef, 0x3b, 0x6d, 0x16, 0xce, 0x77, 0xb0, 0xfb,
-- 0x16, 0x6b, 0x48, 0x72, 0x42, 0x5d, 0x16, 0x30, 0x16, 0x35, 0x86, 0x88,
-- 0x5b, 0x91, 0x38, 0xe3, 0x98, 0xf4, 0x37, 0xe2, 0x91, 0x1b, 0x79, 0xc3,
-- 0xa5, 0x62, 0xb2, 0x24, 0x6d, 0xf0, 0x28, 0x1d, 0xdf, 0xf0, 0x4d, 0x94,
-- 0xab, 0xf1, 0xd2, 0xb6, 0x49, 0x6e, 0x0b, 0xd2, 0x6b, 0x6f, 0x33, 0x76,
-- 0x40, 0x58, 0x47, 0x9b, 0x01, 0x6b, 0xdd, 0xe5, 0x45, 0xac, 0xaa, 0xe9,
-- 0xed, 0xee, 0xa7, 0x2e, 0x22, 0x77, 0x68, 0x23, 0xdc, 0x8d, 0x97, 0x50,
-- 0x2f, 0xb8, 0x15, 0x8b, 0xc8, 0x2f, 0xeb, 0x22, 0xfa, 0x31, 0x3c, 0xb1,
-- 0x31, 0x3c, 0xe9, 0x1c, 0x83, 0x0d, 0x62, 0xe5, 0x28, 0x9e, 0xfc, 0xba,
-- 0x8d, 0xec, 0x1c, 0xc3, 0x53, 0x1e, 0x43, 0xbe, 0xb8, 0x7d, 0xda, 0x7a,
-- 0x87, 0x74, 0x35, 0x73, 0x53, 0x8c, 0xd3, 0x05, 0x4e, 0x2d, 0x2d, 0x24,
-- 0x71, 0xe5, 0x62, 0x7a, 0xcb, 0x1d, 0x11, 0x0d, 0x90, 0x00, 0x07, 0x89,
-- 0xa7, 0x0e, 0x0c, 0x38, 0xc9, 0x11, 0x9d, 0x84, 0xdb, 0xc0, 0x27, 0x64,
-- 0x87, 0x41, 0x08, 0x65, 0xe3, 0xee, 0x3a, 0x67, 0x61, 0x20, 0x57, 0x8b,
-- 0x18, 0xed, 0xac, 0x68, 0xff, 0x47, 0xa7, 0xb7, 0xcf, 0x07, 0xda, 0xd1,
-- 0x66, 0x5f, 0x64, 0x52, 0x15, 0x32, 0x6b, 0xbe, 0x55, 0x5a, 0xcd, 0xd9,
-- 0x8a, 0xc8, 0x78, 0x32, 0x95, 0x03, 0xe8, 0x03, 0x6a, 0xe7, 0xa9, 0x0d,
-- 0x2c, 0x13, 0x43, 0x50, 0x30, 0xd9, 0xe7, 0x3a, 0xd9, 0xe7, 0xff, 0xc7,
-- 0x4c, 0xf6, 0xf9, 0xea, 0xc9, 0xa6, 0x3c, 0xd9, 0x74, 0xc1, 0xae, 0x9d,
-- 0x36, 0x79, 0x91, 0xa6, 0xbf, 0xc5, 0x5e, 0xc1, 0xcd, 0xe4, 0x7b, 0x26,
-- 0x20, 0x70, 0x3d, 0xb6, 0x96, 0xcf, 0x9d, 0x57, 0x0d, 0x63, 0x12, 0x4b,
-- 0x2e, 0x5b, 0x1b, 0x6c, 0x08, 0x9d, 0xcd, 0x31, 0x37, 0xc4, 0x55, 0x49,
-- 0xfa, 0x36, 0x5b, 0xc2, 0xd5, 0xdb, 0x16, 0xc8, 0xc0, 0xf4, 0x3f, 0x5a,
-- 0x26, 0xe7, 0xe6, 0xc9, 0xd9, 0x50, 0x2c, 0x12, 0x3a, 0x3f, 0xda, 0x16,
-- 0x47, 0x8a, 0xac, 0x62, 0x5d, 0x30, 0xfb, 0x98, 0xb3, 0x53, 0x2f, 0x57,
-- 0x8b, 0x32, 0xe9, 0x7e, 0xc9, 0xb8, 0x84, 0x88, 0x3f, 0x64, 0xf7, 0x06,
-- 0x53, 0xb4, 0x9a, 0x1c, 0x31, 0xd8, 0xe4, 0x72, 0x9a, 0x5e, 0x75, 0xdc,
-- 0x97, 0xf9, 0xd5, 0xbc, 0x50, 0x27, 0x5b, 0x55, 0xcc, 0xf8, 0x14, 0x7c,
-- 0xa3, 0xa7, 0xa0, 0x22, 0xce, 0x32, 0x1f, 0x4f, 0x97, 0xf0, 0xb4, 0x9c,
-- 0xd0, 0xc4, 0xe8, 0xab, 0x90, 0x45, 0xec, 0xf3, 0x02, 0xb2, 0x98, 0x39,
-- 0x48, 0xaf, 0x58, 0xe2, 0x7c, 0x29, 0xff, 0x54, 0x35, 0xf3, 0xef, 0x2f,
-- 0xba, 0x65, 0xa0, 0x73, 0xd5, 0x2b, 0x79, 0x6e, 0xef, 0xf9, 0xd5, 0xfd,
-- 0xe0, 0x1d, 0x5e, 0x29, 0x48, 0xce, 0x6a, 0x21, 0xc1, 0xbd, 0x61, 0x27,
-- 0xb2, 0xc5, 0xdd, 0x78, 0xa8, 0xc4, 0xdf, 0x26, 0xac, 0x09, 0xc1, 0x92,
-- 0x99, 0x1c, 0x7c, 0x7d, 0xc4, 0xb3, 0x4c, 0xf3, 0xa9, 0x98, 0xd9, 0x74,
-- 0xd6, 0x79, 0x36, 0x65, 0x2d, 0x0a, 0x4b, 0x06, 0xdf, 0x59, 0x12, 0x9a,
-- 0xed, 0xf5, 0xbf, 0xde, 0xdb, 0xe2, 0xef, 0xb4, 0x88, 0xe9, 0xd6, 0xd3,
-- 0xe1, 0x76, 0x8f, 0xc5, 0x7a, 0xda, 0xb2, 0x6c, 0x3e, 0x2e, 0x26, 0xdc,
-- 0xc9, 0x34, 0x9d, 0xdf, 0x54, 0xa2, 0x88, 0x89, 0x76, 0xc2, 0x63, 0xed,
-- 0x13, 0x13, 0x2d, 0xcb, 0x62, 0xc9, 0xa3, 0x8d, 0x78, 0xaf, 0x4e, 0x07,
-- 0xcc, 0x46, 0xcd, 0xa7, 0x7f, 0x5b, 0xf2, 0x86, 0xcc, 0xd2, 0xf2, 0xc6,
-- 0xcc, 0xb4, 0x7c, 0x4d, 0xa4, 0xd3, 0xaa, 0xc0, 0xce, 0x61, 0x5c, 0x4e,
-- 0x05, 0x68, 0x35, 0x37, 0xf8, 0x06, 0xa2, 0x37, 0x11, 0x0b, 0x7b, 0x54,
-- 0xe5, 0x20, 0x14, 0x66, 0xd4, 0x8d, 0x6e, 0x46, 0x50, 0x8e, 0x3f, 0x31,
-- 0x76, 0x6b, 0x9b, 0x32, 0xc2, 0x86, 0xcd, 0x4a, 0x7c, 0xb4, 0xd3, 0xb4,
-- 0xaa, 0x61, 0xf8, 0x31, 0x02, 0xe2, 0x07, 0x43, 0xf1, 0x3a, 0x9d, 0xdf,
-- 0xb3, 0x8f, 0xf9, 0x53, 0xc4, 0xeb, 0xcb, 0xfc, 0x6a, 0x59, 0x66, 0x62,
-- 0xf1, 0x82, 0x5b, 0xda, 0xbc, 0xd1, 0xac, 0xaf, 0x5d, 0x17, 0xa0, 0x2f,
-- 0x92, 0x73, 0xb3, 0xe9, 0x65, 0xd7, 0xbd, 0x67, 0x0a, 0x3b, 0x74, 0xda,
-- 0x2a, 0x1b, 0xa3, 0xa9, 0x79, 0xa6, 0x76, 0x2e, 0x70, 0x67, 0x76, 0x62,
-- 0x26, 0xe3, 0x69, 0x9a, 0xcf, 0xaa, 0x86, 0x48, 0xdb, 0xa6, 0x0c, 0x93,
-- 0xe8, 0x41, 0x14, 0x23, 0x36, 0xb1, 0x97, 0x15, 0x9b, 0x4f, 0xc0, 0xa7,
-- 0x4c, 0xca, 0x16, 0x03, 0xf6, 0x75, 0x36, 0xbe, 0x01, 0xd9, 0x05, 0x66,
-- 0xc5, 0x36, 0xaf, 0x92, 0x55, 0xc7, 0x82, 0x2d, 0xd9, 0x23, 0x4d, 0xe2,
-- 0xc8, 0x88, 0x68, 0x2e, 0x9f, 0x4f, 0x96, 0x63, 0x1c, 0x56, 0xb6, 0x96,
-- 0x90, 0x88, 0x56, 0xa6, 0x2c, 0xf2, 0xd4, 0x88, 0x01, 0x48, 0x40, 0x17,
-- 0x03, 0x22, 0x82, 0x45, 0xe7, 0xe8, 0xc0, 0xed, 0x44, 0x4e, 0x6d, 0x30,
-- 0x81, 0x4a, 0x5d, 0x03, 0xb0, 0xba, 0x9b, 0xf6, 0xd7, 0x5c, 0xcd, 0x56,
-- 0x73, 0xb2, 0xb6, 0xfd, 0x44, 0x38, 0xa9, 0x39, 0x2a, 0x27, 0x85, 0x92,
-- 0xd2, 0x80, 0xf4, 0xf5, 0x2a, 0x1f, 0x8b, 0xa1, 0x2a, 0xbf, 0xca, 0x98,
-- 0x5f, 0xb0, 0xf0, 0x59, 0x4f, 0x67, 0xe2, 0xc7, 0x6f, 0x13, 0xda, 0xc0,
-- 0x49, 0x6d, 0x11, 0x59, 0x85, 0x0c, 0x45, 0x54, 0x14, 0x47, 0x1f, 0x66,
-- 0x32, 0x0d, 0x8d, 0x68, 0xb9, 0xd8, 0x32, 0x69, 0x28, 0xc2, 0x32, 0xdb,
-- 0x6c, 0x07, 0x3e, 0x8f, 0xaa, 0x26, 0xde, 0xd2, 0xe7, 0x23, 0x32, 0x86,
-- 0x21, 0x9a, 0x0d, 0x7d, 0x66, 0x61, 0x34, 0x53, 0xe9, 0x88, 0x05, 0x43,
-- 0xf6, 0x3e, 0xdd, 0xe5, 0x63, 0x71, 0x3c, 0xc0, 0x79, 0xd6, 0x61, 0x36,
-- 0x18, 0x4f, 0x73, 0x7e, 0x70, 0x46, 0xaa, 0x2e, 0xbf, 0x25, 0x92, 0x34,
-- 0x5f, 0x0b, 0xa4, 0xd5, 0x4f, 0x1c, 0x47, 0x85, 0x09, 0xad, 0xba, 0x86,
-- 0xc9, 0x3b, 0x2d, 0x73, 0x78, 0xa7, 0xa2, 0xe6, 0x64, 0xcc, 0x3c, 0xc9,
-- 0x70, 0x9c, 0x50, 0xb5, 0xc4, 0x00, 0xec, 0xed, 0x07, 0x38, 0x3b, 0xcc,
-- 0x75, 0x82, 0x83, 0x33, 0xe2, 0xf3, 0x2a, 0xc1, 0x15, 0xc9, 0x4b, 0xbe,
-- 0x8e, 0x5e, 0xf1, 0x6c, 0x56, 0xb0, 0xc4, 0x53, 0xf8, 0xc4, 0xae, 0x9b,
-- 0xc6, 0xe1, 0x80, 0xf5, 0x89, 0x19, 0x45, 0x5a, 0x83, 0x03, 0x91, 0xa9,
-- 0xa7, 0x53, 0x53, 0x21, 0x8a, 0x62, 0x76, 0xe8, 0xda, 0x5a, 0x78, 0x6b,
-- 0x11, 0x6d, 0x4d, 0x96, 0xdf, 0xd2, 0xcc, 0xbd, 0xaf, 0x49, 0x1a, 0x87,
-- 0x13, 0xb8, 0x77, 0x9e, 0xd5, 0xed, 0xe6, 0x0e, 0xd0, 0xe1, 0x5e, 0x2f,
-- 0xf0, 0x25, 0x4b, 0xab, 0xba, 0x76, 0xa3, 0xcc, 0x3c, 0xc5, 0x62, 0x9d,
-- 0x21, 0x26, 0xca, 0xa1, 0x47, 0x3b, 0xaf, 0xbe, 0xdb, 0x3f, 0x7e, 0x7f,
-- 0xb8, 0xf3, 0x97, 0x36, 0xf9, 0xd0, 0x77, 0xbb, 0xf2, 0xdd, 0x6e, 0xaf,
-- 0x8b, 0x67, 0x11, 0x05, 0x25, 0xc9, 0xfa, 0xab, 0xf5, 0xa4, 0xba, 0x9f,
-- 0x8d, 0x8a, 0xa9, 0xe3, 0x5b, 0xda, 0x09, 0x8f, 0xa2, 0xaf, 0xf2, 0x41,
-- 0x2d, 0xd7, 0x9c, 0x2c, 0x0c, 0xdf, 0x90, 0xed, 0xb1, 0xc3, 0x21, 0xaa,
-- 0x02, 0x21, 0x28, 0x20, 0x9d, 0x84, 0x8b, 0x51, 0xd5, 0xb8, 0xf1, 0x74,
-- 0x83, 0xb8, 0xe5, 0x4a, 0x08, 0xb2, 0x9f, 0xc8, 0x49, 0x6a, 0xb3, 0x73,
-- 0x99, 0xb1, 0x73, 0x75, 0x99, 0x51, 0x50, 0x95, 0x93, 0x44, 0xe4, 0xef,
-- 0x7b, 0x22, 0xdf, 0x9a, 0x2d, 0x2a, 0xef, 0x2b, 0x61, 0x2a, 0x79, 0xa5,
-- 0xe7, 0xb3, 0xcd, 0xf0, 0x98, 0xe9, 0xb3, 0xff, 0xf2, 0x96, 0x66, 0x21,
-- 0x5b, 0xdf, 0xd3, 0xb1, 0x2c, 0x52, 0xe2, 0xe8, 0x65, 0x4f, 0xcf, 0xb3,
-- 0x8f, 0x94, 0x51, 0x9b, 0x01, 0x1f, 0xb0, 0x32, 0xb6, 0xd5, 0xd0, 0xa9,
-- 0xe3, 0x1e, 0x35, 0x9a, 0x87, 0xc3, 0xb2, 0x8c, 0x23, 0xf0, 0x81, 0xa2,
-- 0x51, 0xb3, 0x8b, 0xf0, 0x5e, 0x8f, 0xe4, 0x7a, 0x99, 0xe9, 0xf9, 0x15,
-- 0x6f, 0x60, 0x9b, 0xf4, 0xa9, 0xb1, 0x51, 0x3e, 0x37, 0xda, 0x56, 0xd5,
-- 0x6c, 0x70, 0xcc, 0x14, 0x3d, 0x2d, 0x94, 0xa5, 0x7b, 0xa3, 0xab, 0xfa,
-- 0x3b, 0x1d, 0x0d, 0x74, 0xda, 0xf3, 0x2c, 0xbc, 0xa8, 0x48, 0x64, 0x2b,
-- 0x6c, 0xa0, 0x72, 0xb6, 0x1c, 0x39, 0x2d, 0x88, 0xb9, 0xcf, 0x85, 0xf2,
-- 0x95, 0xeb, 0x26, 0x45, 0xd9, 0xd1, 0xdc, 0xbb, 0xac, 0xae, 0x48, 0x3a,
-- 0xcc, 0xb6, 0xf4, 0xd2, 0xb6, 0x8d, 0x44, 0x2f, 0x32, 0x90, 0x98, 0x7b,
-- 0x9d, 0x5c, 0x1c, 0x7a, 0x7b, 0x09, 0x9e, 0xf4, 0x9e, 0x4e, 0xb1, 0xc3,
-- 0x86, 0x87, 0xd6, 0x7c, 0xa4, 0xca, 0xa5, 0xd3, 0xd8, 0x42, 0xb5, 0x58,
-- 0xd6, 0x6c, 0xe6, 0x28, 0xdc, 0x64, 0xec, 0x0e, 0x55, 0xe2, 0xb2, 0xb3,
-- 0x41, 0x3d, 0x0d, 0x59, 0x9c, 0xc0, 0xc7, 0x2e, 0xe0, 0x2a, 0xb6, 0x59,
-- 0xc8, 0x32, 0x8f, 0xfd, 0x18, 0x06, 0x7f, 0x4d, 0xfd, 0x65, 0xaf, 0xf1,
-- 0x39, 0x58, 0x29, 0xba, 0xc7, 0xe7, 0x49, 0x95, 0xde, 0xca, 0x2b, 0x58,
-- 0xaf, 0xee, 0x3b, 0xcb, 0xbb, 0xc6, 0x8c, 0x61, 0xbf, 0xe6, 0xe6, 0x27,
-- 0xcb, 0xd9, 0x42, 0x85, 0x89, 0x3f, 0xfc, 0x7e, 0xb2, 0xc3, 0x57, 0x2a,
-- 0x1c, 0x0e, 0xd2, 0x6a, 0x9c, 0xe7, 0x5d, 0x02, 0x36, 0x07, 0xe7, 0x91,
-- 0x12, 0x77, 0x38, 0x17, 0x63, 0xd2, 0xfe, 0xf9, 0xc1, 0xd1, 0x91, 0xf7,
-- 0xca, 0x5a, 0x18, 0x03, 0x62, 0xf3, 0xea, 0x96, 0xbc, 0xd4, 0x6a, 0x2e,
-- 0x63, 0x03, 0xf1, 0x58, 0x64, 0x58, 0x99, 0x29, 0x3d, 0xca, 0x56, 0x5c,
-- 0x6c, 0x38, 0xdd, 0x47, 0x95, 0x1a, 0xf7, 0xff, 0x52, 0xdf, 0x2f, 0xb2,
-- 0x57, 0xfb, 0x3d, 0x67, 0xb8, 0x95, 0x79, 0xb6, 0x4f, 0x40, 0xba, 0x64,
-- 0x75, 0x41, 0x98, 0x1d, 0xae, 0x1e, 0xde, 0xbe, 0x89, 0xba, 0x5f, 0x95,
-- 0xef, 0xb1, 0x3b, 0x65, 0xc6, 0xf2, 0xe1, 0x25, 0x9c, 0x50, 0xf3, 0x27,
-- 0xbb, 0xc4, 0xb8, 0xe8, 0x2e, 0x9f, 0x55, 0xa1, 0x00, 0x85, 0xeb, 0xf7,
-- 0x41, 0x6b, 0x60, 0x64, 0x9e, 0xfc, 0x8a, 0x5f, 0x69, 0xdd, 0xfa, 0x0d,
-- 0x3b, 0xe5, 0x0a, 0xeb, 0x64, 0x0a, 0x49, 0xb4, 0xb5, 0x77, 0x4b, 0x31,
-- 0xa2, 0x92, 0xf0, 0x53, 0x4f, 0x89, 0x59, 0xf5, 0x93, 0xe5, 0x9c, 0xff,
-- 0x75, 0x4e, 0x92, 0x24, 0xaf, 0x3b, 0x94, 0x15, 0x56, 0x46, 0xca, 0x9c,
-- 0x65, 0xdf, 0x34, 0x09, 0xf9, 0xa6, 0x48, 0xa9, 0xe6, 0x49, 0x11, 0x51,
-- 0x80, 0x83, 0xd1, 0x38, 0x12, 0xce, 0xec, 0xce, 0x6d, 0x5e, 0xd7, 0x29,
-- 0x0b, 0x6e, 0x98, 0xb9, 0xda, 0xc9, 0x22, 0x81, 0x7c, 0xc2, 0xbb, 0x6e,
-- 0x82, 0x48, 0x9b, 0xb1, 0x13, 0xc3, 0x0c, 0x35, 0x90, 0xf6, 0x71, 0x79,
-- 0x09, 0x62, 0x67, 0xee, 0xbf, 0xe2, 0xae, 0xf5, 0xfa, 0x47, 0xa1, 0x1c,
-- 0x12, 0x6f, 0x38, 0x67, 0xb5, 0xed, 0x86, 0xf8, 0xd8, 0xd9, 0x63, 0xa5,
-- 0x27, 0xb6, 0x3d, 0x8e, 0x4b, 0x78, 0xc0, 0x99, 0x59, 0x92, 0xa2, 0xcb,
-- 0x77, 0x91, 0x13, 0x08, 0x86, 0xc9, 0x01, 0xac, 0x99, 0xdc, 0x42, 0x15,
-- 0x36, 0x11, 0x2e, 0x65, 0x64, 0x80, 0x60, 0x11, 0x10, 0xec, 0x30, 0x0d,
-- 0xf8, 0x12, 0xc6, 0x46, 0xab, 0x74, 0x97, 0x21, 0x1a, 0xa7, 0xd1, 0x58,
-- 0xe3, 0x42, 0xef, 0xb6, 0x67, 0xc8, 0x0d, 0xbf, 0x51, 0x6d, 0x42, 0xf6,
-- 0x99, 0x7b, 0x56, 0xc5, 0x5e, 0xb7, 0x9b, 0x79, 0x71, 0x47, 0x22, 0xcd,
-- 0xbc, 0x90, 0x5e, 0xec, 0x14, 0xf3, 0xb0, 0xdb, 0x8b, 0x5e, 0x67, 0x73,
-- 0xbd, 0xff, 0x95, 0x91, 0x5b, 0x40, 0x19, 0x9e, 0xae, 0xa1, 0x20, 0x9b,
-- 0x18, 0x6d, 0xbc, 0x39, 0xe4, 0xc9, 0x6d, 0xc9, 0x4f, 0x38, 0xb4, 0x0b,
-- 0xc0, 0xca, 0x02, 0x9e, 0x6c, 0x17, 0x77, 0x10, 0x77, 0x02, 0x77, 0x34,
-- 0x91, 0x45, 0x6f, 0xd0, 0xeb, 0x77, 0x29, 0x47, 0x6d, 0xfe, 0x6b, 0x63,
-- 0x72, 0x87, 0x36, 0xba, 0x0b, 0xe4, 0xe8, 0x9b, 0xdb, 0x4b, 0xfc, 0x5e,
-- 0x46, 0xd5, 0x12, 0xed, 0xa3, 0x77, 0xb3, 0x86, 0xd4, 0x61, 0x22, 0xd9,
-- 0xfc, 0x2a, 0x87, 0x42, 0x92, 0xb6, 0x49, 0x9c, 0x2f, 0x68, 0x3d, 0xc7,
-- 0x72, 0x3f, 0x3b, 0x8d, 0x46, 0x87, 0x36, 0x4c, 0xf6, 0xe7, 0x12, 0xcb,
-- 0x75, 0x97, 0x82, 0xf2, 0x5c, 0xfb, 0x10, 0x67, 0xe2, 0x03, 0xe8, 0xae,
-- 0x83, 0xf0, 0x4a, 0xd2, 0x3b, 0xb7, 0x93, 0x63, 0xbb, 0x51, 0xf2, 0x21,
-- 0x20, 0x3e, 0xb9, 0x0e, 0x01, 0x58, 0xad, 0x01, 0xf0, 0x92, 0xbb, 0x45,
-- 0x11, 0xee, 0x7d, 0x77, 0x5d, 0x4c, 0xc5, 0x6b, 0xd7, 0x6a, 0x2e, 0x90,
-- 0x6b, 0xe1, 0x70, 0x86, 0x3a, 0xcd, 0xbe, 0x22, 0xbe, 0x74, 0xca, 0x0c,
-- 0x06, 0x5b, 0x62, 0xae, 0xc4, 0x1f, 0xd8, 0xa9, 0x34, 0xcd, 0xd2, 0x72,
-- 0x7a, 0x4f, 0xc4, 0x21, 0x22, 0x4f, 0x32, 0xb8, 0x6d, 0x35, 0x87, 0xe5,
-- 0x64, 0x9b, 0x47, 0x4a, 0x73, 0x2f, 0xe7, 0xfc, 0x90, 0x7a, 0x09, 0x2d,
-- 0xb8, 0xb2, 0x16, 0xbf, 0xad, 0x38, 0x97, 0xf9, 0xca, 0xbd, 0xcd, 0x59,
-- 0xc3, 0x22, 0x7a, 0x20, 0x39, 0xbd, 0x4d, 0x89, 0x6c, 0xcf, 0x04, 0xd1,
-- 0xa0, 0x49, 0x09, 0x88, 0xb9, 0xce, 0x03, 0xb5, 0x8c, 0xce, 0xe2, 0x35,
-- 0xdd, 0x53, 0xa4, 0x2b, 0x2e, 0xd3, 0xd5, 0xcb, 0xf5, 0x49, 0x17, 0x9c,
-- 0xdc, 0x70, 0x61, 0x3c, 0x54, 0x07, 0x2d, 0x83, 0x5e, 0x57, 0xdc, 0x80,
-- 0x07, 0xb2, 0x79, 0xc4, 0xfc, 0xe6, 0x4b, 0xba, 0x06, 0xeb, 0xe4, 0x65,
-- 0x71, 0x79, 0x49, 0xd4, 0xfe, 0x45, 0x24, 0x68, 0xcb, 0x23, 0x5b, 0x67,
-- 0x88, 0xb5, 0x6e, 0x30, 0xdd, 0xa4, 0x19, 0x4e, 0x96, 0xa8, 0xfc, 0x72,
-- 0x95, 0xf3, 0x76, 0x48, 0x73, 0xb1, 0x86, 0xd9, 0xfc, 0xde, 0x16, 0x57,
-- 0x7c, 0xe1, 0x16, 0x97, 0x0d, 0x7d, 0x73, 0x74, 0xcf, 0x2c, 0x4a, 0x19,
-- 0x79, 0x3b, 0x4a, 0xd4, 0x64, 0xdf, 0x9b, 0x7c, 0xb1, 0xe0, 0xcd, 0x92,
-- 0xf0, 0x4e, 0x6c, 0xb3, 0xd3, 0x21, 0x46, 0x19, 0x1d, 0x0a, 0xec, 0xaa,
-- 0x39, 0x94, 0x8b, 0x25, 0x5d, 0xc4, 0x32, 0xe8, 0x51, 0x46, 0x27, 0xbd,
-- 0xdd, 0x9c, 0x09, 0xf0, 0x3e, 0x1c, 0x4b, 0x15, 0x9e, 0x09, 0x87, 0x5e,
-- 0xcd, 0x95, 0x83, 0xf2, 0x36, 0xf9, 0x28, 0x0f, 0x55, 0x20, 0xfb, 0x1d,
-- 0x87, 0xff, 0x8d, 0xd7, 0x92, 0xec, 0x3c, 0x9f, 0x1f, 0xfd, 0xaf, 0x43,
-- 0x1f, 0x3c, 0xe7, 0xa2, 0xd3, 0xee, 0x41, 0xed, 0x11, 0x3d, 0xbc, 0xe7,
-- 0x4b, 0xb0, 0x37, 0x38, 0xa0, 0xfd, 0xea, 0x61, 0x28, 0x0d, 0x6b, 0xde,
-- 0xb2, 0x2e, 0xd8, 0xef, 0x2c, 0x71, 0x86, 0x88, 0xf9, 0x66, 0x92, 0x23,
-- 0x7d, 0xb1, 0xcc, 0xb6, 0xe0, 0xec, 0x2f, 0x22, 0xce, 0x8b, 0x2d, 0x44,
-- 0x78, 0x8f, 0x13, 0x64, 0x8e, 0x6a, 0x09, 0xf7, 0x84, 0x54, 0xe1, 0xb7,
-- 0x4f, 0x03, 0x98, 0xb6, 0x20, 0x4b, 0x6a, 0xfc, 0x5d, 0xcc, 0x0b, 0xd4,
-- 0xae, 0x22, 0xd1, 0x46, 0x1d, 0xcc, 0xec, 0x1f, 0x68, 0xed, 0x19, 0xe7,
-- 0x8b, 0x6b, 0x16, 0x1b, 0x5f, 0x22, 0xb0, 0x81, 0x0d, 0x4c, 0xf2, 0xc1,
-- 0x17, 0x9d, 0xd6, 0xf7, 0x73, 0x3d, 0x18, 0x95, 0x5e, 0xa4, 0xf6, 0xb6,
-- 0xf2, 0xaf, 0xdc, 0x02, 0x92, 0x2d, 0x4c, 0x52, 0x83, 0x69, 0xa8, 0xe9,
-- 0x36, 0xcb, 0x71, 0x1d, 0x89, 0xea, 0x6e, 0xa1, 0x27, 0x08, 0xfb, 0xb4,
-- 0xaf, 0x86, 0xc9, 0x19, 0xee, 0xc8, 0xe5, 0x42, 0xe2, 0x12, 0xd9, 0x56,
-- 0xaf, 0xdf, 0x45, 0x4e, 0xaf, 0xaa, 0x6e, 0x88, 0x47, 0x88, 0xf6, 0x0f,
-- 0xfb, 0x9b, 0x37, 0xf4, 0x89, 0x3c, 0xf8, 0x8e, 0x64, 0xc6, 0xbd, 0xb6,
-- 0x2c, 0xed, 0xa3, 0x8a, 0x89, 0x37, 0xce, 0xab, 0x6a, 0x8a, 0x38, 0xee,
-- 0x49, 0x31, 0xae, 0xb6, 0xd2, 0xc5, 0xa2, 0xda, 0xb2, 0x01, 0x36, 0x22,
-- 0xb6, 0x4d, 0xeb, 0x38, 0x3f, 0x77, 0x73, 0xe3, 0x4b, 0x17, 0x36, 0x29,
-- 0x27, 0x2a, 0x4d, 0xe1, 0x79, 0x9b, 0xab, 0x69, 0xf5, 0x58, 0x3d, 0x40,
-- 0x5f, 0xcf, 0x97, 0x17, 0xc7, 0xe7, 0x72, 0xe1, 0xb6, 0x6f, 0xce, 0x25,
-- 0x1f, 0x51, 0xdb, 0x9d, 0xb0, 0x71, 0x28, 0x72, 0x72, 0x01, 0x9f, 0x9f,
-- 0x1f, 0xe0, 0xc3, 0xf3, 0x25, 0x8b, 0x30, 0xd4, 0x4d, 0x79, 0x2f, 0x6c,
-- 0x23, 0xba, 0x69, 0x78, 0xb6, 0xc9, 0x27, 0xff, 0xa7, 0x0b, 0x71, 0x95,
-- 0xd7, 0xc3, 0xcb, 0x6c, 0x52, 0x94, 0x69, 0x64, 0x29, 0x2b, 0x38, 0xa0,
-- 0x1e, 0xab, 0x33, 0xa6, 0xa7, 0xb6, 0x48, 0x3a, 0xfe, 0x40, 0xeb, 0x35,
-- 0xe4, 0xdf, 0xa1, 0xda, 0xc9, 0xa2, 0xd9, 0xc7, 0xbc, 0x5e, 0x7f, 0x7c,
-- 0x8d, 0x10, 0x3d, 0x3a, 0x0e, 0xd5, 0xef, 0x49, 0xd7, 0x24, 0xa4, 0xc1,
-- 0x05, 0x30, 0xe9, 0x16, 0x0a, 0xcf, 0xcc, 0x26, 0x98, 0xf8, 0x27, 0x7d,
-- 0xc8, 0x5e, 0x3b, 0x73, 0x89, 0xa4, 0xb0, 0xab, 0x82, 0xae, 0xd3, 0xeb,
-- 0x59, 0xa7, 0x1f, 0xc2, 0x7c, 0x6c, 0x7d, 0xec, 0x26, 0xd4, 0x34, 0xb9,
-- 0x4e, 0x96, 0xf3, 0xa0, 0x75, 0xa2, 0x84, 0x31, 0x31, 0x0a, 0x8e, 0x08,
-- 0x17, 0xe3, 0x47, 0xc7, 0xf6, 0x98, 0x9c, 0xed, 0x8d, 0x85, 0x66, 0xfc,
-- 0x32, 0x96, 0x57, 0x41, 0xb5, 0x61, 0xaf, 0xc4, 0xdc, 0xe7, 0x51, 0xc1,
-- 0x6c, 0xcd, 0x06, 0xea, 0xae, 0xd1, 0x61, 0x89, 0x5a, 0xd7, 0x78, 0x73,
-- 0xa9, 0x70, 0x5c, 0x07, 0xbc, 0xbc, 0xcc, 0xea, 0x5e, 0x56, 0x24, 0xd1,
-- 0x50, 0x27, 0x5f, 0x44, 0x41, 0x3f, 0x1f, 0xf3, 0xd9, 0x72, 0x86, 0x6d,
-- 0x60, 0xca, 0xd3, 0xc7, 0x84, 0x4d, 0xf1, 0x05, 0x8d, 0x88, 0x18, 0x9d,
-- 0xb9, 0xe7, 0x01, 0xce, 0x17, 0xd2, 0xbe, 0x64, 0x64, 0x3e, 0xf2, 0x2d,
-- 0x89, 0x53, 0x43, 0x27, 0xa5, 0x69, 0xa0, 0xd5, 0x8c, 0x43, 0x24, 0x9a,
-- 0xfc, 0x24, 0x59, 0x5c, 0xa7, 0x55, 0xd6, 0x47, 0xe0, 0x59, 0xd7, 0x54,
-- 0xe9, 0x5b, 0x7b, 0x3a, 0x8b, 0x34, 0xa3, 0x02, 0xf2, 0x30, 0xfc, 0xa8,
-- 0xb4, 0xb4, 0x9c, 0x2e, 0x04, 0x13, 0xe4, 0x67, 0xc3, 0x27, 0xbb, 0xc3,
-- 0xed, 0x7e, 0x64, 0x73, 0xf0, 0xaa, 0xa2, 0x05, 0x89, 0x13, 0x5f, 0x19,
-- 0xe7, 0x33, 0x17, 0x7d, 0x67, 0xb2, 0x4c, 0xc6, 0xb2, 0xdd, 0x52, 0xe9,
-- 0x13, 0x77, 0x45, 0x3e, 0x8d, 0xc3, 0x49, 0x58, 0x30, 0x13, 0x16, 0x49,
-- 0xad, 0x2d, 0xcb, 0x74, 0x7c, 0x2f, 0x01, 0xa5, 0xa1, 0x4d, 0xc2, 0x1a,
-- 0xa0, 0x71, 0xe1, 0x69, 0x1c, 0x70, 0xee, 0x74, 0x10, 0x89, 0x9f, 0x53,
-- 0xf5, 0x05, 0x83, 0xc9, 0x9e, 0x67, 0x99, 0x68, 0xc9, 0x10, 0x20, 0x67,
-- 0x2c, 0x83, 0xcc, 0xd2, 0x8f, 0xd8, 0xd0, 0x07, 0x45, 0xc8, 0x7f, 0xd0,
-- 0x51, 0x83, 0xc8, 0x49, 0xba, 0x5c, 0xd9, 0xa6, 0x66, 0x38, 0xd2, 0x9c,
-- 0xd1, 0x1b, 0x44, 0xf1, 0x57, 0x3a, 0x12, 0x2d, 0x33, 0x93, 0x45, 0xc2,
-- 0xf5, 0x03, 0x72, 0x95, 0x36, 0x3b, 0xec, 0x40, 0xb4, 0xb5, 0x74, 0x9a,
-- 0x38, 0x80, 0x81, 0x0d, 0x53, 0x1c, 0x7f, 0xc6, 0xcc, 0xa4, 0xa0, 0xbf,
-- 0xaf, 0x73, 0x1a, 0x79, 0x39, 0xbe, 0xc6, 0xba, 0xb2, 0xc1, 0x17, 0x3e,
-- 0xb1, 0x87, 0x54, 0x7e, 0xf4, 0x51, 0xa9, 0xed, 0x34, 0xe7, 0xab, 0x88,
-- 0xb5, 0xd6, 0x62, 0x6e, 0x32, 0x48, 0x6b, 0x74, 0x2c, 0xcf, 0x33, 0x5b,
-- 0xc8, 0xa6, 0x4c, 0x3d, 0x47, 0x5d, 0x46, 0xaf, 0x41, 0x11, 0xa8, 0x34,
-- 0xb8, 0xfa, 0x89, 0xe2, 0xa8, 0x69, 0x96, 0xa6, 0xc5, 0x60, 0x28, 0x1d,
-- 0xb1, 0xd9, 0x5b, 0xfa, 0x42, 0x20, 0x19, 0xab, 0x82, 0x6d, 0xf5, 0x50,
-- 0x3d, 0x7d, 0xfa, 0xbe, 0xad, 0xbd, 0x39, 0xfb, 0x22, 0xf5, 0xa6, 0xb0,
-- 0xf9, 0x98, 0x22, 0x68, 0x0b, 0x23, 0x97, 0xb5, 0xd3, 0xd7, 0x58, 0x78,
-- 0xa2, 0xc1, 0x48, 0xfa, 0x23, 0x5f, 0x13, 0x83, 0xc1, 0x65, 0x1d, 0x99,
-- 0x95, 0x83, 0x2d, 0x6d, 0xee, 0xf4, 0xf4, 0x12, 0x76, 0x9c, 0x4d, 0x16,
-- 0x60, 0x89, 0x52, 0xea, 0xe4, 0xf8, 0x0d, 0x1f, 0xe0, 0x83, 0x33, 0xfa,
-- 0x37, 0x37, 0x4f, 0x29, 0x5b, 0x43, 0x91, 0xcb, 0xc8, 0x66, 0x92, 0xb7,
-- 0xdf, 0x9d, 0x27, 0x1b, 0x27, 0xe7, 0x5b, 0x4f, 0x5e, 0x6c, 0x6f, 0xb6,
-- 0xdb, 0xe2, 0xa5, 0x82, 0xfa, 0xde, 0xa9, 0xb9, 0x9f, 0x6f, 0x71, 0x0a,
-- 0xe8, 0x26, 0xa7, 0xe9, 0xde, 0xb2, 0x61, 0xa2, 0x61, 0xd6, 0x3a, 0x3d,
-- 0x7c, 0x6b, 0xf6, 0x47, 0x71, 0xef, 0x93, 0x4c, 0x4d, 0xe3, 0x61, 0xef,
-- 0x49, 0x4c, 0x38, 0x67, 0xd9, 0xad, 0x59, 0x31, 0x93, 0x63, 0x88, 0x0a,
-- 0xe0, 0x59, 0x6c, 0x28, 0x35, 0xc1, 0x63, 0x91, 0xb1, 0x38, 0xe9, 0x5b,
-- 0x50, 0xb6, 0xc6, 0x17, 0x78, 0x24, 0xf0, 0x8d, 0xc0, 0x92, 0x2a, 0x1a,
-- 0x53, 0x89, 0x4b, 0x83, 0x83, 0xfa, 0x27, 0xbf, 0xdf, 0x09, 0xeb, 0x08,
-- 0x7e, 0xd9, 0x79, 0x31, 0xfc, 0xcc, 0x65, 0xc0, 0x0d, 0x26, 0x7d, 0x8b,
-- 0x49, 0x7e, 0xf9, 0x80, 0xcb, 0xe1, 0x3c, 0x13, 0x66, 0x1d, 0x32, 0x1c,
-- 0xbc, 0x04, 0x6f, 0x00, 0xe2, 0xf2, 0xcd, 0x51, 0xe6, 0xbd, 0xd7, 0x1d,
-- 0x86, 0x46, 0xcb, 0xee, 0x75, 0xbe, 0x51, 0x89, 0x28, 0x85, 0x9e, 0xab,
-- 0x8b, 0x96, 0x8c, 0xca, 0xe2, 0x8e, 0x43, 0x11, 0x11, 0x20, 0x0f, 0xea,
-- 0x4b, 0x25, 0x36, 0xf1, 0x3a, 0xb2, 0xaa, 0xd2, 0x9e, 0x4e, 0x9d, 0xa7,
-- 0xfd, 0x9b, 0x8b, 0xb7, 0xc7, 0x12, 0x21, 0xce, 0xd7, 0xde, 0x42, 0x7d,
-- 0xf8, 0x18, 0xf3, 0x72, 0x44, 0xf7, 0x01, 0x73, 0xdc, 0xda, 0x99, 0xc6,
-- 0xba, 0x18, 0x2d, 0xec, 0x78, 0x4e, 0x98, 0x5f, 0x74, 0xb9, 0x59, 0xf4,
-- 0xe2, 0xf1, 0xf6, 0x0b, 0xd6, 0xd7, 0xe8, 0x34, 0x0e, 0xd8, 0x50, 0xd8,
-- 0xb6, 0xf9, 0x2c, 0x16, 0x53, 0xb5, 0x63, 0x6d, 0x7d, 0x1c, 0x90, 0x40,
-- 0x38, 0xe0, 0xd1, 0x0d, 0xa8, 0x79, 0xf1, 0x14, 0x33, 0x8b, 0x39, 0xa0,
-- 0x2b, 0x5e, 0xe8, 0x24, 0x19, 0xbc, 0xe1, 0xad, 0xe0, 0x47, 0xa2, 0xed,
-- 0x0b, 0x76, 0x49, 0x95, 0x33, 0x2c, 0x5b, 0x5a, 0x59, 0x40, 0xb9, 0x18,
-- 0x4d, 0xd5, 0x0f, 0xbd, 0x40, 0x9c, 0xaf, 0xc4, 0x99, 0x2f, 0x48, 0x17,
-- 0x88, 0xac, 0x47, 0x6c, 0xae, 0x2f, 0xef, 0x25, 0xf2, 0x59, 0xad, 0xe9,
-- 0xe6, 0x56, 0x74, 0x96, 0x04, 0x69, 0x56, 0x9e, 0xf4, 0xe6, 0xfb, 0x82,
-- 0x65, 0xc0, 0x41, 0x64, 0x4d, 0x85, 0xdf, 0x9b, 0x5f, 0x93, 0x90, 0x7e,
-- 0x4e, 0x02, 0x95, 0x9d, 0x10, 0x67, 0x3a, 0x72, 0xda, 0xd2, 0x7b, 0x34,
-- 0xae, 0x0d, 0xbb, 0x45, 0xe8, 0x22, 0x7d, 0x9f, 0x46, 0x50, 0xf9, 0x00,
-- 0x72, 0x3b, 0x03, 0xb8, 0x83, 0x21, 0x06, 0x23, 0x82, 0x5c, 0xf3, 0x18,
-- 0x85, 0x8c, 0x48, 0x60, 0x8a, 0x6f, 0x3b, 0x33, 0xd9, 0xf4, 0x95, 0xe2,
-- 0x74, 0x61, 0x72, 0xbe, 0x0c, 0x1a, 0x36, 0x7d, 0x39, 0x3f, 0xb3, 0xac,
-- 0xbc, 0x82, 0x96, 0x79, 0x95, 0xd5, 0xb1, 0xb2, 0xa0, 0xfc, 0x42, 0xc3,
-- 0x82, 0xa1, 0xdc, 0xfe, 0xcb, 0x40, 0x1c, 0x50, 0xb8, 0x30, 0x96, 0x1c,
-- 0x9f, 0x2b, 0xd4, 0x91, 0xac, 0x73, 0x66, 0x82, 0x3a, 0xf3, 0xe6, 0xb4,
-- 0x10, 0xbc, 0x8f, 0xb1, 0xb2, 0x3c, 0x9d, 0xbe, 0x9a, 0x92, 0xe2, 0x7e,
-- 0xbf, 0x9e, 0x68, 0x5a, 0x8d, 0x06, 0xc0, 0xd7, 0xaa, 0xd8, 0x63, 0x33,
-- 0xc7, 0xd7, 0xcb, 0xf9, 0x8d, 0x29, 0xde, 0xd3, 0xa2, 0xe0, 0xf0, 0x02,
-- 0x0e, 0xc6, 0x6f, 0x35, 0xb7, 0x1e, 0xf4, 0xf6, 0x2f, 0x61, 0xdb, 0x5d,
-- 0xab, 0x8c, 0xdd, 0x47, 0x46, 0x87, 0x23, 0x72, 0x77, 0x73, 0x49, 0x3e,
-- 0x64, 0xf2, 0x65, 0xdf, 0x5c, 0xdd, 0x75, 0xc3, 0xa9, 0x15, 0x05, 0x44,
-- 0x89, 0x99, 0x0f, 0x37, 0x97, 0xf3, 0x9f, 0xb9, 0x56, 0xc5, 0x51, 0x46,
-- 0xec, 0x7c, 0x60, 0x4e, 0xde, 0x86, 0xe9, 0x94, 0x1f, 0xee, 0xb8, 0x0e,
-- 0x3d, 0x34, 0x00, 0x9c, 0xa9, 0xc3, 0xe4, 0x6d, 0x98, 0x30, 0xd7, 0x8c,
-- 0x86, 0x70, 0xbb, 0x38, 0x4c, 0x4e, 0x69, 0xbd, 0x06, 0x91, 0xf3, 0xe5,
-- 0xca, 0xb6, 0x1d, 0x0d, 0xf2, 0xba, 0xfa, 0x11, 0x4f, 0x92, 0xf5, 0xcb,
-- 0xa2, 0x18, 0xa5, 0xe5, 0xba, 0x6e, 0x00, 0x1c, 0xf7, 0x23, 0x55, 0xbe,
-- 0x78, 0x49, 0x22, 0xa7, 0x37, 0xda, 0xfa, 0x52, 0xde, 0x1a, 0x8a, 0xa4,
-- 0x12, 0x1c, 0xcf, 0x62, 0x3a, 0x71, 0x8b, 0xd0, 0xee, 0xb0, 0x63, 0xd3,
-- 0x78, 0x53, 0x49, 0x7c, 0x49, 0xcb, 0x32, 0x4f, 0xaf, 0x78, 0xb1, 0xeb,
-- 0x65, 0x39, 0x97, 0xec, 0xb2, 0x79, 0x76, 0x27, 0xce, 0x46, 0xef, 0x2b,
-- 0x2a, 0x61, 0x5d, 0x69, 0x6a, 0xf6, 0x91, 0x9b, 0xa6, 0xfb, 0x62, 0xfc,
-- 0x1e, 0x36, 0x6a, 0x4d, 0xef, 0x92, 0x74, 0xd3, 0xc0, 0xf1, 0xd3, 0x64,
-- 0xee, 0x70, 0x43, 0x75, 0xdb, 0x41, 0x03, 0x35, 0x43, 0xdc, 0x84, 0x2e,
-- 0x67, 0x93, 0x96, 0x21, 0xc8, 0xfd, 0x54, 0x0f, 0x16, 0xb7, 0xab, 0xdd,
-- 0x74, 0x4c, 0x5c, 0x18, 0x37, 0x1b, 0x65, 0x72, 0x18, 0xa0, 0x71, 0xcd,
-- 0x14, 0xdc, 0xcc, 0x50, 0x1d, 0xca, 0x41, 0xb6, 0xa3, 0x1b, 0xae, 0x38,
-- 0xb6, 0x62, 0xa2, 0x99, 0x0b, 0x75, 0xca, 0xca, 0xe7, 0x9a, 0x8d, 0x08,
-- 0x4d, 0xc3, 0xe1, 0x50, 0xcc, 0xdd, 0x6d, 0xee, 0x7c, 0x3f, 0x6a, 0x39,
-- 0x8d, 0x76, 0xb9, 0x61, 0x47, 0xfd, 0x03, 0xac, 0x11, 0xab, 0xfc, 0x6d,
-- 0xbc, 0x16, 0x92, 0x01, 0xc2, 0x17, 0x18, 0x0e, 0x4f, 0x9b, 0x71, 0x88,
-- 0x25, 0xb7, 0xe1, 0xd5, 0x8b, 0x16, 0xb8, 0x25, 0xf3, 0xaa, 0x2b, 0x2b,
-- 0x0b, 0xad, 0x56, 0x4e, 0xcd, 0x14, 0xc2, 0x48, 0xcb, 0x50, 0x9e, 0x88,
-- 0x64, 0x0d, 0x9e, 0x5e, 0x4f, 0x57, 0xad, 0xa7, 0x1e, 0x9f, 0xa5, 0xbc,
-- 0xc5, 0x9a, 0x26, 0x0e, 0x69, 0xf9, 0xbb, 0x46, 0x04, 0xf9, 0xdb, 0xa9,
-- 0x5b, 0xc0, 0x60, 0xf5, 0xc3, 0x5f, 0x6f, 0xd1, 0x9b, 0x7a, 0x01, 0x3d,
-- 0x24, 0x9b, 0x5c, 0xa8, 0x41, 0xb7, 0x56, 0x0f, 0x1c, 0xec, 0x96, 0x53,
-- 0x48, 0xf2, 0x2d, 0x8f, 0x2d, 0x07, 0x0c, 0x68, 0xe4, 0x0d, 0x9d, 0x80,
-- 0x48, 0x6e, 0x65, 0xe7, 0x3c, 0x07, 0x61, 0x11, 0x59, 0x56, 0x45, 0xd6,
-- 0x88, 0xea, 0x0c, 0xa2, 0x0e, 0x90, 0xb2, 0xa1, 0x99, 0x70, 0x9f, 0xc4,
-- 0x38, 0xbd, 0xbf, 0xba, 0x8b, 0x6b, 0x32, 0x07, 0xa2, 0x9b, 0xe3, 0xb5,
-- 0x32, 0x8f, 0x05, 0x6c, 0x22, 0x9a, 0x69, 0x2f, 0xc9, 0x86, 0x89, 0xe5,
-- 0xd9, 0x47, 0xf7, 0x7d, 0x47, 0x9c, 0x1f, 0x67, 0x87, 0x7c, 0x44, 0xae,
-- 0x90, 0x5e, 0x16, 0x8e, 0x85, 0x48, 0x06, 0x6e, 0x9b, 0xc9, 0x48, 0x5c,
-- 0x30, 0x68, 0x6b, 0xd2, 0x11, 0x66, 0x35, 0x86, 0xa4, 0x5e, 0xb9, 0xd4,
-- 0xab, 0x39, 0x48, 0x9c, 0x19, 0xe3, 0x6f, 0xa4, 0x19, 0x39, 0xc7, 0x85,
-- 0x04, 0x50, 0xb8, 0x04, 0x9a, 0x0e, 0x0d, 0x5f, 0xa2, 0xb0, 0xc4, 0xbb,
-- 0x82, 0x18, 0x49, 0x59, 0xe8, 0xb4, 0x52, 0xe8, 0x8c, 0x91, 0xac, 0xd2,
-- 0x03, 0xa4, 0xe3, 0x44, 0x8c, 0x5f, 0x43, 0x3d, 0x7d, 0xb7, 0xea, 0xca,
-- 0x12, 0xc5, 0x0f, 0xa3, 0xdc, 0xdd, 0x64, 0x91, 0x8e, 0x4b, 0x41, 0x2c,
-- 0xe6, 0xbc, 0xf2, 0x88, 0x3a, 0xbd, 0x4e, 0xcd, 0xd3, 0x90, 0x95, 0x2c,
-- 0x09, 0x55, 0x10, 0x9c, 0xcc, 0xd4, 0xd2, 0xcc, 0x08, 0xd9, 0xf9, 0x9c,
-- 0xa3, 0xd1, 0x23, 0x9d, 0x8c, 0x08, 0xe6, 0xe0, 0xeb, 0x23, 0x18, 0xa3,
-- 0xa6, 0x39, 0xb1, 0x54, 0x21, 0x29, 0x99, 0x8b, 0x00, 0x7b, 0x38, 0xca,
-- 0xba, 0x62, 0x5e, 0xa7, 0xe1, 0xd2, 0xcd, 0x8c, 0x35, 0xe7, 0x42, 0xe3,
-- 0xa5, 0x76, 0x79, 0x0e, 0x2e, 0x61, 0x11, 0x9b, 0x9c, 0x9a, 0x10, 0xeb,
-- 0x62, 0xc8, 0x52, 0x6f, 0x7f, 0xed, 0x5c, 0x3b, 0xf4, 0xae, 0xf9, 0x83,
-- 0x2c, 0x26, 0x8b, 0x55, 0x1e, 0x1c, 0x36, 0xb2, 0x7e, 0xf9, 0x5d, 0x16,
-- 0xa0, 0x94, 0xac, 0xda, 0x5b, 0x8b, 0x3c, 0x72, 0xe8, 0xbe, 0x1b, 0xbf,
-- 0xe8, 0xc2, 0x05, 0xce, 0xce, 0x5c, 0xe2, 0x98, 0x5b, 0xcb, 0x2c, 0x94,
-- 0xc1, 0x45, 0xee, 0x67, 0xa9, 0xbd, 0xcb, 0xeb, 0xe6, 0x8c, 0xb9, 0x74,
-- 0xda, 0xfe, 0x07, 0x9b, 0x8d, 0xa1, 0x8a, 0x11, 0x51, 0xb3, 0xb2, 0x09,
-- 0xf3, 0x87, 0xfa, 0x4a, 0xac, 0x35, 0x0b, 0x9b, 0xe5, 0xbf, 0xd3, 0x28,
-- 0xea, 0xc5, 0x1d, 0x92, 0xfb, 0xe4, 0x15, 0xcb, 0x36, 0x5f, 0x6a, 0x18,
-- 0x12, 0xdb, 0xf1, 0x54, 0xff, 0x13, 0x07, 0x89, 0x5c, 0x4b, 0x12, 0x94,
-- 0x23, 0x1a, 0x0f, 0x96, 0xa1, 0xbb, 0x39, 0x04, 0x04, 0x85, 0xab, 0x27,
-- 0xe4, 0x37, 0x86, 0x3d, 0x07, 0x60, 0x39, 0x51, 0x04, 0xc6, 0xab, 0xc7,
-- 0x57, 0xef, 0xd7, 0x2e, 0xdf, 0xc3, 0xab, 0x77, 0x71, 0x2d, 0xb9, 0x04,
-- 0x19, 0xc2, 0xdd, 0x5e, 0x05, 0xe1, 0x57, 0xec, 0x3f, 0x91, 0x00, 0x60,
-- 0x1f, 0xcf, 0xd2, 0x3c, 0x9a, 0x81, 0x17, 0xec, 0xd5, 0x3f, 0x6a, 0xd7,
-- 0x41, 0x8c, 0x90, 0xf2, 0x79, 0xf0, 0xdd, 0xcd, 0x09, 0x2f, 0x94, 0x44,
-- 0xa3, 0xa2, 0xce, 0xfc, 0x66, 0x0b, 0x12, 0x06, 0xb7, 0xc0, 0x59, 0x32,
-- 0x1f, 0x17, 0x6a, 0xfc, 0xc3, 0xe9, 0xeb, 0x50, 0x75, 0x1a, 0x1a, 0xcf,
-- 0xc4, 0xac, 0x2f, 0xd1, 0xfc, 0xbe, 0x34, 0xce, 0xfe, 0xd8, 0xe4, 0x1a,
-- 0xc1, 0x5a, 0x88, 0x13, 0x6c, 0xc8, 0xa9, 0xa0, 0x17, 0x75, 0xfe, 0x74,
-- 0x38, 0x13, 0x8d, 0x93, 0xf9, 0xa0, 0x6b, 0xd0, 0xa3, 0xe3, 0xf9, 0x9b,
-- 0xfd, 0xe6, 0x9a, 0x71, 0x56, 0x30, 0x98, 0xa8, 0x6e, 0x74, 0x77, 0x73,
-- 0x39, 0x5f, 0xe8, 0xb6, 0x7d, 0xac, 0xda, 0x77, 0x6e, 0xdf, 0xff, 0x61,
-- 0x53, 0x94, 0x68, 0x05, 0x51, 0x60, 0x04, 0x34, 0xe9, 0x8a, 0xe3, 0x54,
-- 0x24, 0x58, 0xf7, 0x6f, 0x6c, 0xa0, 0x4d, 0x18, 0xb7, 0x6b, 0x05, 0x13,
-- 0xc0, 0x05, 0xc5, 0x3e, 0x4f, 0x76, 0xe7, 0x4d, 0xa1, 0x16, 0x52, 0xe3,
-- 0xa0, 0x72, 0xaf, 0xed, 0x0f, 0x10, 0x78, 0xa8, 0x54, 0x3b, 0x04, 0x1d,
-- 0x3e, 0x40, 0xac, 0x8e, 0x38, 0xbb, 0xe9, 0x72, 0x25, 0x05, 0xd2, 0x4d,
-- 0x95, 0x4d, 0xb3, 0x2b, 0x11, 0x71, 0x8f, 0x0f, 0xbf, 0x3b, 0x3c, 0x8e,
-- 0x04, 0xae, 0x5a, 0x3e, 0x77, 0xde, 0xcb, 0xc0, 0xae, 0x61, 0xc8, 0x26,
-- 0x79, 0x25, 0x06, 0x79, 0xe9, 0x53, 0x5b, 0xec, 0x0c, 0x7c, 0xcd, 0x99,
-- 0x41, 0x6a, 0xfa, 0x04, 0xac, 0x34, 0x63, 0x92, 0x43, 0x05, 0x1f, 0xa8,
-- 0x82, 0x2d, 0x4f, 0x65, 0xaf, 0xaf, 0xcf, 0xcf, 0xb7, 0x6e, 0xb2, 0x72,
-- 0xc4, 0xf8, 0x4b, 0x31, 0x41, 0x21, 0x1e, 0x3f, 0x79, 0x8d, 0x08, 0x02,
-- 0xf1, 0x04, 0xf0, 0x2e, 0xfb, 0x99, 0x44, 0x6f, 0x2c, 0x8a, 0x69, 0x3e,
-- 0xbe, 0x4f, 0x5e, 0xeb, 0xc8, 0x24, 0x19, 0x04, 0xbb, 0x0e, 0x07, 0x80,
-- 0xda, 0x4b, 0x4f, 0xbe, 0x1d, 0xec, 0x9f, 0x0f, 0x5e, 0x1f, 0x1e, 0x1f,
-- 0x7e, 0xbd, 0x7f, 0x71, 0x28, 0x09, 0x0d, 0x08, 0xc3, 0x5c, 0xc1, 0x75,
-- 0x94, 0x22, 0xbe, 0xd5, 0x71, 0x62, 0x55, 0x38, 0x88, 0xb8, 0xce, 0xc7,
-- 0x37, 0x59, 0x6d, 0xc1, 0x9e, 0x86, 0x66, 0xc7, 0xdc, 0xba, 0x16, 0xd7,
-- 0x78, 0x77, 0x73, 0xb4, 0x35, 0xd3, 0x99, 0x0e, 0x35, 0x9a, 0x41, 0x3a,
-- 0xbd, 0x63, 0x24, 0x90, 0xf7, 0x73, 0x56, 0x4f, 0x34, 0x35, 0x9f, 0xa5,
-- 0x56, 0xcc, 0x3e, 0xd8, 0x92, 0x60, 0xfd, 0x1b, 0xbb, 0x8c, 0xe8, 0xa7,
-- 0x15, 0x41, 0x4b, 0x12, 0x22, 0xa7, 0xd9, 0x75, 0xaf, 0xf1, 0xe4, 0xca,
-- 0x00, 0x31, 0x56, 0xa3, 0xf5, 0xab, 0x48, 0x22, 0x16, 0x2a, 0xaa, 0xc6,
-- 0xd7, 0xd9, 0x4c, 0x0f, 0x17, 0xc7, 0x19, 0xd0, 0xa3, 0x8a, 0x12, 0x42,
-- 0x07, 0xec, 0x8e, 0xe3, 0x57, 0xe4, 0x28, 0x8b, 0xba, 0x21, 0x11, 0x70,
-- 0x08, 0x09, 0xeb, 0x8a, 0xec, 0xbc, 0xcb, 0x91, 0xa0, 0x2d, 0xa1, 0x20,
-- 0x88, 0x8a, 0x03, 0x95, 0x58, 0x6c, 0x69, 0x77, 0x34, 0xa9, 0x00, 0xbd,
-- 0xb4, 0x15, 0xb4, 0xa5, 0xa5, 0x93, 0xb8, 0x5c, 0x9f, 0x42, 0x23, 0xce,
-- 0x04, 0x4b, 0x4f, 0x4e, 0xb3, 0xbb, 0x19, 0x78, 0xa4, 0x82, 0xf3, 0x26,
-- 0x11, 0xb5, 0x71, 0x28, 0x3b, 0x22, 0xcb, 0x82, 0x90, 0x76, 0x41, 0x2b,
-- 0x70, 0x41, 0xeb, 0x6c, 0x91, 0x36, 0xe4, 0x38, 0x4b, 0xe8, 0xee, 0xd2,
-- 0x10, 0xea, 0xb6, 0x9a, 0xac, 0x1a, 0x5d, 0x4b, 0x14, 0x06, 0xa1, 0x4a,
-- 0x20, 0x53, 0xa9, 0x4a, 0x54, 0x67, 0x6e, 0x6a, 0x73, 0xd7, 0x91, 0xef,
-- 0x39, 0xc8, 0x16, 0x65, 0xdd, 0x11, 0x22, 0x29, 0x39, 0x16, 0xce, 0xb2,
-- 0x32, 0x09, 0xb2, 0x43, 0x83, 0x24, 0xfe, 0xc3, 0xd3, 0x33, 0x81, 0x28,
-- 0x3c, 0xe6, 0x5f, 0x34, 0x0c, 0xa2, 0xdd, 0x33, 0xb4, 0x79, 0x4d, 0x82,
-- 0x80, 0xc3, 0x15, 0x4a, 0xa8, 0x83, 0x29, 0xb2, 0xa0, 0x35, 0x09, 0x9b,
-- 0x50, 0x18, 0x1e, 0x25, 0x69, 0xcc, 0x27, 0x8a, 0xc3, 0x73, 0x78, 0x48,
-- 0x3c, 0x12, 0x1e, 0x42, 0x5f, 0x44, 0x23, 0x0c, 0x42, 0x42, 0x3f, 0xcc,
-- 0x3c, 0x7f, 0xc2, 0x5f, 0x8e, 0x96, 0xb5, 0xcb, 0x6f, 0x59, 0xe1, 0xea,
-- 0xec, 0x4b, 0x2a, 0x98, 0x5c, 0x33, 0xdc, 0x2c, 0xbf, 0x99, 0x94, 0x40,
-- 0xcf, 0x4a, 0x69, 0x28, 0xc3, 0xd6, 0x54, 0x01, 0x1e, 0xc1, 0xc9, 0xb1,
-- 0xdd, 0xf9, 0x65, 0x26, 0xf1, 0x53, 0x03, 0x80, 0xe2, 0xe1, 0x09, 0x9b,
-- 0xa5, 0x44, 0xbc, 0xb3, 0x02, 0x2c, 0xc2, 0x62, 0x8e, 0x60, 0x37, 0x0a,
-- 0xe2, 0x51, 0x64, 0x47, 0xd6, 0x6c, 0x28, 0xe7, 0xe3, 0xbb, 0xd7, 0xfc,
-- 0x5b, 0xb1, 0x5d, 0x5e, 0xaa, 0x17, 0x2b, 0x9d, 0xe6, 0xf5, 0xbd, 0x68,
-- 0x7a, 0x62, 0x31, 0x10, 0x1b, 0xc1, 0x75, 0xda, 0x95, 0xaa, 0x40, 0x0b,
-- 0xef, 0xf0, 0x3b, 0x30, 0x4b, 0xdd, 0xb6, 0xd8, 0x54, 0x0c, 0xda, 0x08,
-- 0xc1, 0x3d, 0x00, 0xe2, 0xf1, 0x91, 0x4d, 0xd1, 0x39, 0xab, 0xc5, 0x3a,
-- 0x14, 0x59, 0x19, 0xc6, 0xca, 0x50, 0x2a, 0x9f, 0x17, 0x5d, 0x54, 0xa5,
-- 0x0c, 0x82, 0x14, 0x10, 0x81, 0x00, 0x68, 0x92, 0x60, 0xd4, 0xbb, 0xe4,
-- 0x23, 0x83, 0x0d, 0xa0, 0x03, 0xd0, 0xf8, 0xf8, 0x5a, 0x71, 0xdd, 0xc4,
-- 0xdb, 0xc9, 0xb4, 0x34, 0xca, 0xae, 0xd3, 0xdb, 0x9c, 0x01, 0x53, 0x42,
-- 0xe4, 0x9f, 0xc8, 0x59, 0x52, 0x11, 0x01, 0x10, 0xbf, 0x55, 0x63, 0x3c,
-- 0xbf, 0x88, 0x08, 0xda, 0x00, 0xf1, 0x47, 0x36, 0x03, 0x91, 0xa9, 0x83,
-- 0x53, 0x84, 0x85, 0xb2, 0x47, 0x4a, 0x32, 0xd7, 0xa3, 0x58, 0x70, 0x04,
-- 0xfd, 0x3a, 0xe4, 0x0e, 0x7d, 0x34, 0xad, 0x6e, 0xbb, 0x4f, 0x58, 0x75,
-- 0xdb, 0x79, 0xc2, 0xe4, 0x88, 0x05, 0x39, 0xf9, 0x93, 0x30, 0xbb, 0xbd,
-- 0x71, 0xcc, 0xce, 0xbf, 0x73, 0x41, 0x46, 0x1d, 0x37, 0xa7, 0x1c, 0x2e,
-- 0x9b, 0x58, 0xd7, 0xe9, 0x52, 0xca, 0x76, 0xe7, 0xcb, 0x0e, 0xd8, 0x83,
-- 0x27, 0x0c, 0x63, 0x92, 0x33, 0x46, 0xfd, 0xeb, 0xc1, 0x3a, 0xdd, 0x3f,
-- 0xff, 0x2e, 0x38, 0x52, 0x81, 0xa2, 0xee, 0xf2, 0x01, 0xa3, 0x2b, 0xb9,
-- 0x86, 0x8b, 0x4f, 0x8e, 0x24, 0xb7, 0xd5, 0x49, 0x6a, 0xd5, 0xed, 0xa7,
-- 0x90, 0x1a, 0x0d, 0x24, 0x22, 0xb5, 0x68, 0x79, 0x1f, 0x22, 0xb5, 0x70,
-- 0x8f, 0x22, 0x52, 0x43, 0xfb, 0x11, 0xa5, 0xd9, 0xc2, 0xfe, 0x6a, 0x52,
-- 0x53, 0x12, 0x8d, 0x28, 0x0d, 0xde, 0x8b, 0xd3, 0x7e, 0x40, 0x62, 0x0d,
-- 0xba, 0x99, 0x57, 0x03, 0xc0, 0x41, 0x5c, 0x32, 0x72, 0xcf, 0x4b, 0xf7,
-- 0xeb, 0x17, 0x1d, 0x20, 0x23, 0x8e, 0x41, 0x23, 0x77, 0xb1, 0x58, 0xd6,
-- 0x57, 0x20, 0x85, 0xe4, 0xf5, 0xbb, 0xf3, 0x00, 0xd6, 0x81, 0x66, 0x51,
-- 0x02, 0x7e, 0x28, 0x6c, 0x6d, 0xf8, 0x98, 0x49, 0x96, 0xe5, 0x12, 0xc5,
-- 0x55, 0x14, 0x39, 0x96, 0x3d, 0x4b, 0xc1, 0xc8, 0x34, 0x87, 0xd6, 0xd0,
-- 0xa7, 0xa2, 0x30, 0xe5, 0x4b, 0x46, 0xc0, 0xa2, 0x81, 0x6c, 0x8a, 0x48,
-- 0xcc, 0x61, 0x22, 0x53, 0x36, 0xa0, 0x69, 0x86, 0xa2, 0xcb, 0x95, 0x9a,
-- 0x27, 0xbe, 0x4d, 0xb9, 0x68, 0x37, 0x3a, 0x9a, 0x73, 0x69, 0xbe, 0x9b,
-- 0x8f, 0x18, 0x93, 0x1d, 0x44, 0x85, 0xf9, 0x38, 0x42, 0x24, 0x82, 0x10,
-- 0x88, 0xc0, 0x92, 0x76, 0xcb, 0x8e, 0x48, 0x4f, 0x64, 0x82, 0x36, 0xe0,
-- 0x05, 0x94, 0xd0, 0x5d, 0xa4, 0x35, 0xc0, 0x78, 0x07, 0x29, 0x77, 0xe4,
-- 0x52, 0xdd, 0xab, 0x2e, 0xf3, 0x13, 0xc8, 0x09, 0x41, 0xe7, 0x6c, 0xeb,
-- 0x7a, 0x10, 0xf2, 0x02, 0x3b, 0xbf, 0xb8, 0x7d, 0x3a, 0xe0, 0xa9, 0xd2,
-- 0x5e, 0x2d, 0x06, 0x3a, 0xe7, 0x07, 0xb7, 0x7e, 0x94, 0x4b, 0xda, 0x6a,
-- 0xf8, 0xbc, 0x5c, 0xba, 0xa4, 0x2f, 0xf1, 0x4a, 0x23, 0xf1, 0x9a, 0x29,
-- 0xc2, 0x01, 0xbf, 0xb4, 0x29, 0x36, 0xb0, 0x59, 0x84, 0xcf, 0xd9, 0x05,
-- 0x46, 0xf2, 0x8b, 0x5a, 0xce, 0xf9, 0x64, 0x49, 0x17, 0xaa, 0xe7, 0xa4,
-- 0xe5, 0xd5, 0x32, 0x72, 0x94, 0xc1, 0x00, 0xe4, 0x6d, 0x95, 0x16, 0x4e,
-- 0x1d, 0x26, 0x80, 0xff, 0xbf, 0x7b, 0x13, 0x3f, 0x65, 0x17, 0x9f, 0xff,
-- 0xe3, 0x77, 0xf1, 0xf9, 0x7f, 0x93, 0x5d, 0x7c, 0xfe, 0xff, 0x91, 0x5d,
-- 0xb4, 0x5c, 0xf4, 0x60, 0x4f, 0xfa, 0xab, 0xb7, 0x93, 0xd5, 0x61, 0x0d,
-- 0xdf, 0x46, 0x70, 0x07, 0x87, 0x39, 0xf3, 0x3e, 0x58, 0x2b, 0xa2, 0x72,
-- 0x6b, 0x16, 0x5f, 0x03, 0x4e, 0x4f, 0xb2, 0x77, 0xba, 0x93, 0x6b, 0x34,
-- 0xfd, 0xc1, 0x22, 0x2f, 0x8f, 0x4e, 0x03, 0x54, 0x01, 0xbf, 0x3b, 0x06,
-- 0x2e, 0xa5, 0x2a, 0x72, 0xa7, 0xf7, 0xba, 0x62, 0x97, 0x26, 0xf1, 0x71,
-- 0x09, 0xc3, 0xae, 0x20, 0x81, 0xc2, 0xed, 0x29, 0xdb, 0x05, 0xb9, 0x60,
-- 0x64, 0x11, 0xc2, 0xb4, 0x41, 0x7b, 0x2f, 0x79, 0xb9, 0x07, 0xf2, 0xf8,
-- 0x17, 0x9d, 0x59, 0x28, 0x80, 0x8f, 0xf2, 0x43, 0xea, 0x26, 0x07, 0xa5,
-- 0x86, 0x26, 0x74, 0x50, 0x17, 0x3e, 0x8c, 0xb7, 0x3b, 0x3f, 0x42, 0x0e,
-- 0xbf, 0x89, 0x1e, 0xfe, 0x4b, 0xe4, 0x90, 0xf1, 0x65, 0x0d, 0x3c, 0x28,
-- 0x76, 0x89, 0xbe, 0x3f, 0x3b, 0x7e, 0x34, 0xba, 0xa5, 0x77, 0x26, 0xe8,
-- 0x51, 0x65, 0x72, 0x9a, 0x5e, 0x65, 0xbd, 0x10, 0x49, 0xec, 0x13, 0x30,
-- 0x06, 0xa2, 0x2c, 0x7d, 0x56, 0x46, 0x7d, 0x34, 0x58, 0x98, 0x94, 0x0f,
-- 0x53, 0x84, 0x4f, 0xc9, 0x17, 0xd7, 0x5f, 0x17, 0x30, 0x91, 0x88, 0xaa,
-- 0xcd, 0x6c, 0x4a, 0x4b, 0xdb, 0x56, 0xc7, 0x48, 0xef, 0x2f, 0x1c, 0x77,
-- 0xde, 0xb3, 0x01, 0xba, 0x29, 0xc7, 0xd1, 0xbb, 0x00, 0xdb, 0x70, 0xf6,
-- 0xd4, 0x66, 0xb4, 0xba, 0xa5, 0xd5, 0xb8, 0x4c, 0x02, 0x00, 0x1c, 0x5f,
-- 0x0b, 0xfc, 0xe0, 0x65, 0x31, 0x6d, 0x93, 0x26, 0x00, 0xcc, 0xd2, 0xe4,
-- 0x58, 0x07, 0xb5, 0xa7, 0xce, 0x59, 0xd9, 0x48, 0x1b, 0x92, 0x4a, 0x0d,
-- 0x2a, 0x22, 0x5a, 0x54, 0xea, 0x94, 0x91, 0xc5, 0xdb, 0x41, 0x24, 0x4c,
-- 0xbf, 0x2e, 0x07, 0x9c, 0xed, 0x40, 0x3c, 0x20, 0x88, 0x19, 0x39, 0xc0,
-- 0xa6, 0xdd, 0xb4, 0x7e, 0x47, 0x6f, 0xe5, 0x21, 0xbc, 0xbb, 0x1c, 0x9a,
-- 0xf6, 0x32, 0x08, 0xe7, 0xfa, 0x69, 0xcf, 0xcc, 0x07, 0xbf, 0x74, 0x47,
-- 0xb6, 0x47, 0x38, 0x5d, 0x16, 0x45, 0xe3, 0xfd, 0x8f, 0x9a, 0x6a, 0x1e,
-- 0xb4, 0xda, 0x65, 0xed, 0xc4, 0x72, 0x1b, 0xde, 0x6f, 0x6a, 0x89, 0x56,
-- 0x44, 0x00, 0x5a, 0xbb, 0x80, 0x63, 0xda, 0x12, 0x78, 0x6d, 0xc4, 0x2f,
-- 0x40, 0xbd, 0x0f, 0x04, 0xe4, 0x19, 0x7a, 0x6a, 0x64, 0xbf, 0xd1, 0xa0,
-- 0x14, 0x36, 0xbf, 0x06, 0x1d, 0x9b, 0x0c, 0x47, 0x47, 0xe6, 0xf4, 0xdb,
-- 0x83, 0xf3, 0x3f, 0xee, 0xec, 0x5a, 0x34, 0x5c, 0x6e, 0x10, 0x6b, 0xe7,
-- 0x40, 0x54, 0x68, 0x93, 0x37, 0xab, 0x27, 0x52, 0x4d, 0x80, 0x41, 0x58,
-- 0x7d, 0x10, 0x9d, 0x7b, 0x4d, 0x6c, 0xb3, 0x32, 0x36, 0x4d, 0x80, 0xf2,
-- 0xf1, 0xca, 0x59, 0xa7, 0x0e, 0xcf, 0xc1, 0xa8, 0x66, 0x46, 0x12, 0xcc,
-- 0x0d, 0xb7, 0x68, 0x0d, 0xa8, 0x12, 0xba, 0x15, 0x4b, 0x04, 0x26, 0x50,
-- 0xd7, 0x12, 0xf3, 0x13, 0x25, 0x9d, 0x29, 0x3a, 0x6a, 0xc3, 0xc2, 0xef,
-- 0xc9, 0x42, 0xd1, 0xa9, 0x45, 0x42, 0xee, 0x05, 0xeb, 0xd1, 0xeb, 0x34,
-- 0x3c, 0xcb, 0xdd, 0xa7, 0x37, 0x12, 0xfb, 0x8b, 0x25, 0x01, 0x2b, 0xb9,
-- 0xc9, 0xee, 0xd5, 0x8f, 0x9e, 0xb9, 0x0f, 0xc3, 0xc5, 0x65, 0xa8, 0x46,
-- 0x0e, 0x7f, 0x8c, 0x4c, 0xe6, 0xc4, 0xe6, 0xff, 0x20, 0xde, 0x6e, 0xa1,
-- 0x30, 0x51, 0x85, 0xb8, 0x39, 0x56, 0x04, 0x3c, 0xca, 0xc9, 0x8c, 0xa1,
-- 0x22, 0xac, 0x7e, 0xc0, 0xf4, 0xbe, 0x8b, 0xda, 0x0d, 0x5a, 0x47, 0x18,
-- 0x30, 0x34, 0xab, 0xaa, 0xb6, 0x60, 0xfe, 0x06, 0x50, 0x97, 0x7a, 0x9f,
-- 0xea, 0x87, 0x72, 0x57, 0xf9, 0x7b, 0x2f, 0xd3, 0xb0, 0xb5, 0x2d, 0x1f,
-- 0xdf, 0x40, 0xa4, 0xd7, 0x8b, 0x2e, 0x9c, 0x9e, 0xc5, 0x7a, 0x48, 0x15,
-- 0x81, 0x78, 0x17, 0x78, 0x00, 0x6c, 0x80, 0x67, 0xaa, 0xe4, 0xcb, 0x30,
-- 0x9f, 0x4b, 0x2e, 0x0d, 0xdc, 0xa3, 0xf3, 0xdb, 0xbc, 0x2c, 0xe6, 0x10,
-- 0x51, 0x6e, 0xd3, 0x32, 0x87, 0x72, 0x48, 0xa3, 0xfd, 0xf0, 0xfa, 0xe8,
-- 0x2c, 0xd9, 0xe0, 0x2c, 0xce, 0xd1, 0xfd, 0x8a, 0x5c, 0xd5, 0x64, 0x2b,
-- 0xab, 0xc7, 0x5b, 0x8b, 0x9b, 0x7c, 0x6b, 0x5e, 0x55, 0x93, 0xd1, 0xe6,
-- 0xd0, 0x11, 0x95, 0x74, 0xc9, 0xc4, 0x28, 0xb4, 0xbc, 0xc3, 0x8a, 0xdb,
-- 0x92, 0x1a, 0xde, 0xa0, 0x35, 0x88, 0x76, 0xa1, 0xa2, 0x85, 0x9e, 0x0d,
-- 0xab, 0x62, 0x13, 0xda, 0xe6, 0x6d, 0x9a, 0x4f, 0xcd, 0x40, 0x36, 0x17,
-- 0x82, 0x46, 0x68, 0x91, 0xc2, 0xc7, 0x8a, 0xbb, 0x02, 0x61, 0x7a, 0xea,
-- 0xf8, 0x8f, 0x62, 0x3a, 0xe6, 0xb5, 0x87, 0x8a, 0x94, 0x6c, 0x72, 0x8b,
-- 0x55, 0xa1, 0xd5, 0x04, 0xaa, 0xa2, 0x8b, 0x31, 0xee, 0x33, 0xa6, 0x3a,
-- 0xaf, 0x8a, 0xf8, 0xce, 0xb2, 0x38, 0x93, 0x56, 0x52, 0x8e, 0x87, 0x5b,
-- 0x3d, 0x87, 0x21, 0x9f, 0xcf, 0x05, 0x4b, 0x1f, 0x6a, 0xe9, 0x6d, 0x91,
-- 0xc3, 0x21, 0x7f, 0xb9, 0xac, 0x9c, 0x71, 0x14, 0xee, 0x5e, 0xdd, 0xae,
-- 0x61, 0xa7, 0x29, 0x32, 0xd8, 0x4e, 0x75, 0x64, 0x56, 0x49, 0x6f, 0xaf,
-- 0x87, 0xb3, 0x35, 0x07, 0x8c, 0xb5, 0x48, 0x38, 0x3a, 0x2a, 0x6c, 0x56,
-- 0xef, 0xe7, 0x5e, 0x12, 0xd9, 0x47, 0x6b, 0xef, 0x1a, 0x30, 0xe8, 0x8e,
-- 0xab, 0x79, 0xfe, 0x77, 0x41, 0x55, 0x70, 0x47, 0x78, 0x92, 0x21, 0xf6,
-- 0x1e, 0xe9, 0xd8, 0x6e, 0x87, 0x78, 0x04, 0x9d, 0x88, 0x0b, 0xc1, 0x90,
-- 0x7e, 0x8e, 0x87, 0x94, 0x21, 0x31, 0x14, 0xed, 0xf7, 0x7e, 0xc6, 0x90,
-- 0x82, 0x41, 0x74, 0x98, 0x2b, 0x9a, 0x43, 0xe2, 0x6c, 0x05, 0xcd, 0x2c,
-- 0xbd, 0x26, 0x29, 0x6b, 0x5c, 0x77, 0xdc, 0x1c, 0x1b, 0xf9, 0xc9, 0x39,
-- 0x0e, 0xe2, 0xdb, 0x74, 0x9c, 0xd0, 0xaf, 0x3f, 0x40, 0xba, 0xd8, 0x5c,
-- 0x7d, 0xc6, 0x94, 0x31, 0x2a, 0x2f, 0xec, 0x82, 0xfe, 0xeb, 0xfb, 0x33,
-- 0xd7, 0x62, 0xbb, 0xc1, 0x5d, 0x98, 0xe5, 0x60, 0x91, 0xa3, 0xcc, 0xbb,
-- 0x79, 0x38, 0x66, 0x32, 0x0a, 0x48, 0x71, 0x2f, 0x6f, 0x19, 0xab, 0x61,
-- 0x7e, 0x61, 0xf5, 0x16, 0x20, 0x7f, 0x32, 0x2b, 0x86, 0xb9, 0x9b, 0xbe,
-- 0xa1, 0x89, 0x32, 0xea, 0x08, 0x12, 0xa2, 0xe3, 0xa3, 0xb9, 0x48, 0x61,
-- 0x4c, 0x95, 0x5c, 0x59, 0x65, 0xfc, 0xce, 0x8f, 0x14, 0x0e, 0x54, 0xc2,
-- 0x67, 0x5d, 0x7f, 0x66, 0x38, 0xf9, 0x6f, 0x47, 0xfc, 0x69, 0x40, 0xfa,
-- 0xbf, 0x5f, 0x00, 0x93, 0xe6, 0xf1, 0xbe, 0xec, 0x4a, 0x12, 0x3f, 0xcf,
-- 0xa6, 0x00, 0x0c, 0xc7, 0x5e, 0x5b, 0x56, 0xd6, 0xb8, 0xbc, 0x5f, 0xb0,
-- 0x1d, 0x4c, 0xf3, 0x7f, 0x65, 0x85, 0xf8, 0xda, 0x92, 0xdc, 0xab, 0x00,
-- 0x8a, 0x7e, 0xd8, 0x91, 0x5b, 0xe8, 0x3a, 0x14, 0x75, 0x84, 0xb7, 0x8b,
-- 0xf6, 0x82, 0x3d, 0x2a, 0x69, 0xa8, 0xa2, 0x30, 0x59, 0x4e, 0x24, 0x49,
-- 0xc3, 0x57, 0x1f, 0x89, 0xe2, 0x72, 0xb9, 0xa1, 0x6a, 0xd8, 0x84, 0xe2,
-- 0x81, 0xc1, 0x14, 0xe5, 0x70, 0xc0, 0x72, 0xd9, 0xf5, 0xb6, 0x69, 0x9c,
-- 0x5e, 0xdf, 0x50, 0x14, 0x90, 0xb6, 0xf2, 0xe0, 0xd8, 0x25, 0x35, 0x53,
-- 0x2e, 0xe7, 0xe8, 0xbd, 0xb9, 0x52, 0x8e, 0xbf, 0xb7, 0xcf, 0xd9, 0xd9,
-- 0xd1, 0xf9, 0x01, 0x1f, 0xb0, 0x93, 0x77, 0xc7, 0x3f, 0xb2, 0xbc, 0x0d,
-- 0x08, 0x00, 0x94, 0xfb, 0xe0, 0xae, 0xbb, 0x2e, 0x86, 0xca, 0xd0, 0xd9,
-- 0x3b, 0x28, 0x59, 0xf1, 0xda, 0x58, 0xd6, 0xbd, 0xb3, 0x2d, 0xf6, 0x69,
-- 0x54, 0x4c, 0x2e, 0x70, 0xa2, 0x11, 0xc1, 0xe5, 0xac, 0xee, 0x70, 0xc4,
-- 0xd7, 0xd8, 0x30, 0xb0, 0x96, 0x31, 0x62, 0x13, 0x07, 0x80, 0x84, 0x82,
-- 0xbe, 0x68, 0x49, 0x6c, 0x35, 0xa4, 0xee, 0x69, 0xa2, 0xad, 0x44, 0x50,
-- 0x9a, 0xe8, 0x95, 0x38, 0x73, 0x57, 0xe4, 0x1f, 0x04, 0xd9, 0x8e, 0xf7,
-- 0x6a, 0x8a, 0xe4, 0xe0, 0x33, 0x0b, 0x8e, 0x15, 0x6a, 0x39, 0x64, 0x00,
-- 0xc5, 0x05, 0xdd, 0x33, 0x5f, 0xa7, 0xcc, 0x0b, 0xc4, 0xfe, 0x97, 0x66,
-- 0xb3, 0xe8, 0x82, 0xae, 0x0a, 0xf6, 0x3d, 0x9a, 0x1c, 0x27, 0x7f, 0x05,
-- 0x5e, 0x25, 0x58, 0x11, 0x25, 0x90, 0x8f, 0x17, 0x74, 0x42, 0x27, 0x50,
-- 0x09, 0x88, 0x49, 0x8e, 0x86, 0x12, 0xc7, 0xda, 0x58, 0x19, 0x8a, 0x76,
-- 0xee, 0xcf, 0x40, 0xde, 0x97, 0xa9, 0xb5, 0x53, 0x7f, 0x44, 0x6a, 0x41,
-- 0x98, 0x7b, 0xf2, 0x92, 0x7f, 0x76, 0x4f, 0x3b, 0xc0, 0xa8, 0x80, 0x2f,
-- 0xb9, 0x21, 0x3b, 0xf0, 0xbb, 0x1a, 0x7e, 0xca, 0x49, 0x19, 0x93, 0x06,
-- 0x8b, 0x8b, 0xad, 0xc1, 0x1c, 0xf4, 0x4b, 0x97, 0x72, 0x3f, 0x79, 0x7d,
-- 0x78, 0x06, 0xa6, 0x74, 0xf8, 0xee, 0x6b, 0xf8, 0x70, 0x02, 0x46, 0xcf,
-- 0x6d, 0x56, 0x72, 0xd7, 0x08, 0x96, 0xbe, 0xc9, 0x8e, 0xad, 0xe6, 0xf8,
-- 0x72, 0xe7, 0x2b, 0x1f, 0x32, 0xe0, 0xe4, 0x77, 0xcd, 0x68, 0x4a, 0x45,
-- 0x81, 0x38, 0xd8, 0x0f, 0x67, 0xf7, 0xe8, 0x6a, 0x75, 0x6b, 0x0d, 0x2d,
-- 0x75, 0x81, 0x9f, 0xa2, 0x11, 0x11, 0x5d, 0x75, 0xb9, 0x56, 0x39, 0x0d,
-- 0xa5, 0x89, 0xbb, 0xc0, 0xe7, 0x58, 0xaf, 0x58, 0x0f, 0xb2, 0xd8, 0x1c,
-- 0x98, 0x18, 0x93, 0x56, 0xdf, 0x3c, 0x1b, 0xd5, 0x66, 0x43, 0x61, 0x70,
-- 0x52, 0x3f, 0xcb, 0xd9, 0xea, 0x97, 0x68, 0xde, 0x95, 0xb1, 0x6d, 0x5d,
-- 0xae, 0x08, 0x93, 0xe5, 0x0c, 0x75, 0x07, 0x2b, 0xde, 0x97, 0x5b, 0xbd,
-- 0xb1, 0xf4, 0xb4, 0xa7, 0xaa, 0x93, 0x2a, 0x85, 0x47, 0x9e, 0x73, 0x3e,
-- 0x9f, 0x12, 0xeb, 0x11, 0xb4, 0x19, 0x6d, 0xaa, 0x43, 0x58, 0x00, 0xad,
-- 0x54, 0xab, 0x65, 0x50, 0x89, 0x02, 0x4f, 0xd6, 0x0f, 0x48, 0xe5, 0xfd,
-- 0x70, 0xb0, 0xff, 0xe1, 0xab, 0xf7, 0xef, 0x5e, 0x1f, 0x1f, 0xae, 0xb7,
-- 0x29, 0xf2, 0xd2, 0x23, 0x4f, 0x56, 0x88, 0x06, 0x50, 0xd8, 0x86, 0x30,
-- 0x47, 0x1b, 0x47, 0x1d, 0x30, 0x53, 0xf8, 0x0d, 0x80, 0x3a, 0xba, 0xe0,
-- 0x6d, 0xb3, 0xc8, 0x72, 0x3e, 0x01, 0xd4, 0x4f, 0x30, 0x79, 0xc3, 0x51,
-- 0x51, 0x73, 0x8b, 0x0d, 0xb0, 0xc3, 0x42, 0xc3, 0xf4, 0x47, 0x87, 0x95,
-- 0x54, 0xf0, 0x00, 0x32, 0x3e, 0x28, 0x3f, 0xd3, 0x50, 0xed, 0x91, 0x31,
-- 0x60, 0x85, 0xd0, 0x12, 0x1a, 0x4f, 0xc7, 0x76, 0x57, 0x3e, 0xf9, 0x6c,
-- 0x92, 0xac, 0x73, 0x4b, 0x44, 0xc9, 0x03, 0x1d, 0xe4, 0xb8, 0xac, 0xd7,
-- 0xfb, 0x26, 0xb5, 0xe4, 0x41, 0xc6, 0x05, 0x2e, 0xf8, 0x08, 0xfe, 0x83,
-- 0x33, 0xea, 0x52, 0xa1, 0xeb, 0x61, 0xf6, 0x31, 0x83, 0xba, 0xa8, 0x6f,
-- 0x1d, 0xa8, 0x64, 0xf0, 0x7d, 0x51, 0xc2, 0x3e, 0xfa, 0xda, 0x4b, 0x08,
-- 0xf2, 0x10, 0x69, 0x90, 0x71, 0xec, 0x22, 0x4b, 0x01, 0x29, 0xca, 0x2a,
-- 0xa0, 0x02, 0xdc, 0xe9, 0xfe, 0xc5, 0x37, 0x9d, 0x9e, 0x77, 0x5f, 0x6b,
-- 0x50, 0x49, 0xd1, 0xc9, 0x6d, 0x4e, 0x53, 0x08, 0xd5, 0xa3, 0xbe, 0xd3,
-- 0x99, 0x88, 0xac, 0xdb, 0x0c, 0x23, 0xd6, 0x26, 0x02, 0xed, 0xc1, 0x89,
-- 0xa9, 0x92, 0x0d, 0xe1, 0x6e, 0x46, 0x59, 0xe3, 0xd5, 0xb9, 0xb9, 0x56,
-- 0xf4, 0x8f, 0x38, 0xe0, 0x82, 0x01, 0xb8, 0x7f, 0x5f, 0x46, 0x04, 0x12,
-- 0x6c, 0x31, 0x22, 0x2f, 0x93, 0x7d, 0x82, 0x2d, 0xe3, 0x51, 0xa6, 0xe4,
-- 0x33, 0x28, 0xa3, 0x53, 0x2a, 0x7c, 0x4a, 0xf8, 0x3d, 0x18, 0x93, 0xcb,
-- 0xdf, 0xe0, 0x61, 0xb9, 0xf2, 0x13, 0xc1, 0x65, 0x30, 0xba, 0x4f, 0x82,
-- 0xc4, 0x9a, 0x98, 0xc3, 0xcd, 0x54, 0x48, 0xdc, 0xeb, 0x25, 0x1b, 0xd9,
-- 0xf0, 0x8a, 0x58, 0x5d, 0x8f, 0x9b, 0xda, 0xd9, 0xe3, 0x9f, 0xbb, 0xf8,
-- 0xf9, 0xa4, 0xa7, 0x7e, 0xab, 0x46, 0x36, 0x1e, 0xf3, 0xaf, 0x38, 0x0d,
-- 0xaf, 0xc1, 0xcd, 0xc4, 0xbf, 0x9f, 0x5f, 0x3e, 0x40, 0x42, 0x2a, 0xdf,
-- 0x75, 0x62, 0xca, 0xf8, 0x75, 0x10, 0x66, 0xc9, 0xd2, 0x03, 0x23, 0x81,
-- 0x72, 0xf5, 0x0e, 0x9a, 0xe0, 0x58, 0x92, 0xb8, 0x83, 0xac, 0xb1, 0x0f,
-- 0x65, 0x76, 0x9d, 0x56, 0xd7, 0xc9, 0xb2, 0xce, 0x39, 0x0c, 0xa0, 0x03,
-- 0xe9, 0x7a, 0xea, 0xc2, 0xd6, 0xb5, 0x63, 0xc3, 0x89, 0x73, 0x3b, 0x2b,
-- 0x96, 0x46, 0xa4, 0x4d, 0xeb, 0x23, 0x03, 0x2d, 0x80, 0xd8, 0xc5, 0x08,
-- 0x41, 0xad, 0x12, 0x8b, 0xc7, 0x4f, 0x86, 0xe5, 0xa8, 0x66, 0x6c, 0x4d,
-- 0x45, 0x6c, 0x42, 0x76, 0x49, 0x6b, 0x96, 0x07, 0x50, 0x03, 0x18, 0x72,
-- 0x9c, 0x19, 0x21, 0x77, 0x9c, 0x46, 0x59, 0xb9, 0xbf, 0xc1, 0x41, 0x9c,
-- 0x4a, 0x87, 0x7a, 0x55, 0xed, 0xcb, 0xe6, 0x71, 0x7a, 0x07, 0x6b, 0x15,
-- 0x80, 0x0f, 0xe1, 0xed, 0x3a, 0x5b, 0x49, 0x2d, 0x33, 0x62, 0x57, 0x10,
-- 0xda, 0x2e, 0x68, 0x50, 0x87, 0x0a, 0xfc, 0x5b, 0x4f, 0xce, 0x25, 0x7c,
-- 0xbc, 0x74, 0xa4, 0x57, 0x44, 0x57, 0xbd, 0x01, 0x62, 0x6c, 0xc5, 0xf1,
-- 0x8f, 0xbc, 0x4e, 0x1b, 0x5c, 0x8e, 0x43, 0x4a, 0x0b, 0xa5, 0x88, 0x5e,
-- 0xdb, 0x64, 0x03, 0x95, 0x46, 0x6f, 0x21, 0x61, 0xbe, 0xea, 0x44, 0xe5,
-- 0x67, 0xb4, 0x3f, 0x29, 0x0e, 0x82, 0x44, 0x23, 0xe8, 0xbc, 0x08, 0x03,
-- 0x51, 0xb7, 0x39, 0x0a, 0x44, 0x12, 0x5f, 0xce, 0xea, 0x71, 0xf0, 0xe5,
-- 0x24, 0x4b, 0xa7, 0x49, 0x57, 0x00, 0xfa, 0xa5, 0x14, 0x96, 0xb4, 0x38,
-- 0x00, 0x08, 0x45, 0x73, 0x0b, 0x1e, 0xd0, 0x08, 0x62, 0xc9, 0xa6, 0x9c,
-- 0x37, 0xc0, 0x22, 0x2f, 0x81, 0x76, 0x11, 0x1d, 0x5f, 0x56, 0xe4, 0x25,
-- 0x9d, 0xc5, 0x90, 0x07, 0xa0, 0x9f, 0xbb, 0xcc, 0x01, 0x44, 0x46, 0x22,
-- 0xe5, 0xd2, 0x3d, 0x80, 0xb4, 0x08, 0xc9, 0x89, 0x8b, 0xac, 0x07, 0x06,
-- 0xdd, 0x8c, 0x4a, 0x74, 0x8a, 0x68, 0x68, 0x81, 0xfc, 0x3c, 0xae, 0x7b,
-- 0x57, 0x24, 0x74, 0x53, 0xaf, 0x44, 0x58, 0xc8, 0xb1, 0x43, 0xa4, 0x10,
-- 0x0e, 0x22, 0xe6, 0x62, 0x09, 0x64, 0x52, 0x3c, 0x16, 0xcb, 0x5f, 0xcb,
-- 0xe9, 0x4a, 0x6b, 0xad, 0x34, 0xc5, 0x03, 0x55, 0xe0, 0xa1, 0xdd, 0xdd,
-- 0x6e, 0x2f, 0x87, 0xc2, 0x8b, 0xa9, 0x4d, 0x83, 0x97, 0x62, 0x50, 0xa5,
-- 0x97, 0x99, 0x59, 0xf8, 0xb8, 0x6e, 0x11, 0x03, 0xcb, 0x8e, 0x69, 0xf9,
-- 0x24, 0xf0, 0x1f, 0x9f, 0xb1, 0xd2, 0x34, 0x88, 0xeb, 0x69, 0xf0, 0x29,
-- 0x67, 0x5d, 0xc2, 0xe7, 0xe8, 0x24, 0xac, 0x5c, 0x5b, 0xfc, 0x75, 0x52,
-- 0x4d, 0xf3, 0x85, 0x39, 0xf5, 0xe9, 0x36, 0x05, 0x47, 0xc5, 0xfd, 0xdc,
-- 0x11, 0x1c, 0xd2, 0x82, 0x41, 0x83, 0x34, 0x7c, 0xcb, 0xde, 0x95, 0x49,
-- 0xb2, 0xe1, 0x9a, 0x97, 0xd6, 0x9f, 0x6e, 0xef, 0x60, 0xbc, 0x4f, 0xb7,
-- 0x3f, 0x0b, 0x93, 0xa4, 0x5d, 0x36, 0xa9, 0x02, 0x8a, 0x6a, 0xe0, 0xe9,
-- 0x43, 0x69, 0x10, 0x53, 0xd6, 0xcb, 0xb0, 0xaa, 0x19, 0x49, 0x8b, 0x30,
-- 0x05, 0x68, 0x8a, 0xed, 0x20, 0x9f, 0x4b, 0x42, 0x27, 0xfd, 0xab, 0x3b,
-- 0x99, 0x4a, 0x98, 0x5d, 0x1b, 0xd3, 0x23, 0x15, 0xd8, 0x32, 0x01, 0xad,
-- 0x90, 0x78, 0x77, 0xc9, 0xbe, 0x6d, 0xa6, 0xdf, 0x2a, 0x64, 0x9e, 0xdd,
-- 0x32, 0xc8, 0x20, 0x66, 0xbb, 0x61, 0x24, 0x39, 0x1a, 0xc7, 0x04, 0xea,
-- 0x11, 0x27, 0xda, 0x5e, 0xb0, 0x16, 0xa1, 0xd2, 0x6c, 0x5a, 0xd6, 0x5b,
-- 0xc8, 0xa9, 0x95, 0x88, 0xe2, 0x74, 0xcc, 0x68, 0x5a, 0xae, 0x0c, 0xe0,
-- 0xd9, 0x9b, 0x83, 0x56, 0x73, 0xbb, 0x4f, 0x3e, 0xff, 0xdc, 0xe5, 0xf5,
-- 0x67, 0x1a, 0x24, 0xe9, 0xa1, 0x5b, 0x49, 0x84, 0xd2, 0x7c, 0x23, 0xb1,
-- 0x03, 0x72, 0x01, 0x37, 0xce, 0xc4, 0x90, 0xb8, 0xa1, 0x98, 0xeb, 0xaf,
-- 0xeb, 0x9a, 0xae, 0x4b, 0xc8, 0xb0, 0x58, 0xad, 0xac, 0xb6, 0x98, 0xd6,
-- 0x09, 0x0a, 0xe0, 0x2c, 0x45, 0x03, 0x54, 0xbb, 0x1d, 0x1d, 0x82, 0x2f,
-- 0xa3, 0x28, 0xb4, 0xab, 0xb9, 0xa4, 0xf0, 0xfe, 0x95, 0xef, 0x90, 0xab,
-- 0xac, 0x8e, 0xe3, 0xdc, 0x15, 0xf2, 0x2d, 0xea, 0x62, 0x35, 0xd4, 0x94,
-- 0xd5, 0x4a, 0x90, 0x28, 0xfd, 0x97, 0x72, 0x3d, 0x1a, 0xa4, 0x4c, 0x50,
-- 0x64, 0xea, 0x4b, 0x10, 0xd1, 0x4b, 0x67, 0xf3, 0x9e, 0x77, 0x1a, 0xc4,
-- 0xbf, 0x34, 0xf8, 0x32, 0x35, 0xf9, 0x00, 0x57, 0xab, 0xae, 0x53, 0xab,
-- 0x0f, 0x8a, 0xeb, 0x9e, 0x53, 0x56, 0x1d, 0xd4, 0xaa, 0x21, 0xa0, 0x47,
-- 0xae, 0x8e, 0x5c, 0x23, 0x13, 0x5f, 0xba, 0x16, 0x81, 0x91, 0x28, 0x29,
-- 0xc3, 0x3c, 0x16, 0xac, 0x02, 0x7a, 0x70, 0xb0, 0x20, 0x35, 0x62, 0x4f,
-- 0xc3, 0xea, 0x59, 0x8d, 0x98, 0x69, 0xff, 0x7e, 0xb0, 0x4e, 0xd1, 0xc9,
-- 0x3f, 0x74, 0x75, 0xc2, 0x2c, 0x04, 0x07, 0x52, 0xa5, 0x8f, 0x66, 0x55,
-- 0x4d, 0xcb, 0x07, 0xe1, 0xf6, 0xf5, 0xe0, 0xaf, 0xf3, 0x33, 0xed, 0x93,
-- 0xcf, 0xef, 0xac, 0x5b, 0x5e, 0x76, 0x68, 0x37, 0x07, 0x65, 0xca, 0x70,
-- 0x1c, 0x7a, 0xa0, 0xd8, 0xb1, 0xb9, 0x27, 0x97, 0x71, 0xdc, 0xa1, 0xca,
-- 0x01, 0xe1, 0x69, 0xaf, 0x53, 0x9f, 0x19, 0xbc, 0x71, 0x03, 0x7d, 0xf5,
-- 0x65, 0xa3, 0xb5, 0xbb, 0xbb, 0xe1, 0xec, 0xde, 0xbe, 0xab, 0x1a, 0xe5,
-- 0x7a, 0x7d, 0x52, 0x91, 0xc2, 0xa9, 0x0a, 0x45, 0xf9, 0xec, 0xda, 0xd0,
-- 0xb7, 0xed, 0x8b, 0xe3, 0xd1, 0xd5, 0x6e, 0x38, 0x23, 0xab, 0x40, 0x73,
-- 0xf5, 0x38, 0x5f, 0x71, 0x38, 0x11, 0xcb, 0xbe, 0xa3, 0x82, 0xe8, 0xcd,
-- 0x48, 0x89, 0x13, 0x13, 0xeb, 0x72, 0x39, 0xae, 0xe3, 0x7b, 0xdf, 0xca,
-- 0x5e, 0xe0, 0x22, 0x10, 0xff, 0x83, 0x15, 0x4c, 0x05, 0x9d, 0x35, 0x4f,
-- 0xbb, 0x85, 0xb4, 0x41, 0x44, 0xec, 0x12, 0x49, 0xd6, 0x81, 0xd3, 0xb9,
-- 0xde, 0x97, 0x70, 0x4a, 0xcd, 0x97, 0xf3, 0x99, 0x5c, 0x2b, 0x97, 0xb2,
-- 0x77, 0x97, 0x8d, 0x5e, 0x7d, 0xc9, 0x0e, 0x97, 0x8f, 0xc0, 0x17, 0x12,
-- 0xbc, 0x4f, 0xa6, 0xa3, 0x2d, 0xfe, 0xb3, 0x97, 0xb0, 0x0a, 0xd3, 0xb1,
-- 0x92, 0x44, 0x7f, 0xab, 0x5a, 0x0c, 0x52, 0xb0, 0x83, 0xd6, 0x2e, 0x8b,
-- 0x62, 0x65, 0x63, 0xbe, 0x3e, 0x2e, 0x56, 0x23, 0x08, 0xa0, 0x93, 0x78,
-- 0x36, 0x4f, 0x58, 0x42, 0x4c, 0x6e, 0x8f, 0xf4, 0x68, 0x75, 0x25, 0x67,
-- 0x8d, 0xee, 0x1d, 0x38, 0xb8, 0x25, 0x6a, 0xbc, 0xd2, 0xfa, 0x6d, 0x2c,
-- 0x6f, 0xad, 0x5e, 0x10, 0x7e, 0xfa, 0xd5, 0x97, 0xc0, 0x47, 0xe1, 0x5f,
-- 0xff, 0xe2, 0xde, 0xe6, 0x1f, 0x44, 0x97, 0x74, 0xb6, 0x57, 0x4e, 0x84,
-- 0x84, 0x39, 0x7b, 0x7c, 0x4b, 0x24, 0x54, 0x93, 0x05, 0xd7, 0xfb, 0xeb,
-- 0xac, 0xdf, 0xad, 0xff, 0x65, 0x1d, 0x52, 0x84, 0x19, 0x14, 0x80, 0x71,
-- 0x2f, 0xe5, 0xba, 0x27, 0x45, 0x14, 0xcb, 0xc2, 0xa1, 0x7f, 0x78, 0x42,
-- 0x2a, 0x9a, 0x3f, 0x36, 0xe6, 0x9f, 0x7b, 0x6e, 0xd4, 0x3f, 0xf7, 0xfc,
-- 0xb8, 0x7f, 0xee, 0xf9, 0x91, 0xff, 0xdc, 0xfb, 0x0d, 0x3b, 0xba, 0x2e,
-- 0xcd, 0xfb, 0xd6, 0x83, 0xc6, 0x83, 0xb6, 0x7b, 0xeb, 0xab, 0x9a, 0x0e,
-- 0xad, 0xaf, 0xc8, 0x52, 0x48, 0x5a, 0xcb, 0x44, 0x07, 0xc8, 0xaf, 0x84,
-- 0x96, 0x0d, 0x94, 0x89, 0xf7, 0x3b, 0xf4, 0xe1, 0xf0, 0x01, 0x5e, 0x54,
-- 0x8e, 0x96, 0xa8, 0xa6, 0xac, 0x4c, 0x78, 0xaf, 0x9c, 0xeb, 0xc0, 0x2d,
-- 0xb5, 0x39, 0x53, 0x22, 0x17, 0x9b, 0x7b, 0x3d, 0x3a, 0xa3, 0x6c, 0x1d,
-- 0xbc, 0x5c, 0x96, 0x50, 0xfa, 0xb5, 0x8a, 0x98, 0xa4, 0x91, 0x1a, 0x44,
-- 0x9a, 0xf6, 0xf5, 0x76, 0xff, 0xdd, 0xfb, 0xfd, 0xe3, 0x07, 0xc3, 0x48,
-- 0xc2, 0x18, 0x51, 0x67, 0x88, 0x82, 0x48, 0x1e, 0x6a, 0xac, 0x1c, 0x57,
-- 0xc9, 0x77, 0x38, 0x57, 0x61, 0xfd, 0x89, 0xaf, 0xf4, 0x5f, 0x3a, 0x23,
-- 0x70, 0xbf, 0x57, 0x29, 0xf6, 0x4d, 0x88, 0x78, 0x7e, 0x23, 0xfc, 0xa7,
-- 0x67, 0xef, 0xf3, 0xeb, 0x3d, 0x35, 0xe5, 0xba, 0xca, 0x66, 0x1d, 0xda,
-- 0x82, 0xe3, 0xfa, 0x2c, 0xb9, 0x98, 0xbe, 0x06, 0x85, 0xb4, 0x1f, 0x54,
-- 0x69, 0x85, 0x5e, 0x82, 0xea, 0xd9, 0x97, 0xab, 0xcd, 0xd2, 0xfb, 0x07,
-- 0x07, 0x3e, 0x2e, 0xbb, 0x99, 0xe1, 0xd9, 0x88, 0x4b, 0xf9, 0xc7, 0xab,
-- 0xfa, 0x58, 0xb8, 0x29, 0x6a, 0x91, 0x71, 0xec, 0xea, 0xa0, 0x2e, 0x24,
-- 0x2f, 0xe2, 0xa5, 0x8e, 0xe6, 0x8b, 0xee, 0x48, 0x66, 0x36, 0x99, 0x84,
-- 0x82, 0xa6, 0x55, 0xa0, 0x40, 0xad, 0x8d, 0x73, 0x35, 0xba, 0x9e, 0xee,
-- 0x33, 0x6c, 0x9c, 0x26, 0x09, 0x88, 0xb6, 0x10, 0xc5, 0xb0, 0x65, 0x06,
-- 0x25, 0xec, 0xa7, 0x6f, 0xc9, 0xec, 0xa6, 0x67, 0x9a, 0x50, 0x76, 0xb1,
-- 0x9c, 0x11, 0xf5, 0x92, 0xc4, 0x31, 0x59, 0xaf, 0x92, 0x47, 0xe2, 0x0c,
-- 0x3c, 0xce, 0x57, 0x81, 0x9f, 0x08, 0x7f, 0x30, 0xc0, 0xe6, 0x8e, 0x90,
-- 0x8a, 0x7e, 0xe7, 0xdd, 0xd0, 0x3b, 0x3f, 0xba, 0x38, 0x4c, 0xf6, 0xdf,
-- 0x5f, 0x7c, 0xd3, 0x0b, 0x0a, 0xb0, 0x34, 0x33, 0x6c, 0x48, 0x59, 0x28,
-- 0xf3, 0xcc, 0x10, 0xb2, 0x79, 0xed, 0x44, 0x58, 0xeb, 0xc0, 0xca, 0x6d,
-- 0x79, 0xc4, 0x5b, 0x1b, 0xfd, 0x6c, 0xf8, 0x6c, 0xb3, 0xb5, 0x31, 0xab,
-- 0x21, 0xae, 0x82, 0xb2, 0x31, 0xba, 0x5a, 0x7c, 0x09, 0x04, 0x28, 0x4b,
-- 0x1c, 0x83, 0xb3, 0xe5, 0x11, 0x56, 0x21, 0x32, 0x9b, 0x65, 0x31, 0xce,
-- 0xd1, 0x74, 0x09, 0xab, 0x62, 0x63, 0xe3, 0x00, 0xec, 0x8f, 0x08, 0x40,
-- 0x9b, 0x37, 0x44, 0x99, 0xb0, 0x60, 0xa2, 0x8b, 0x8e, 0xee, 0x48, 0x62,
-- 0x32, 0xab, 0x2e, 0x63, 0x4a, 0x72, 0xb5, 0x82, 0x10, 0xa6, 0x3e, 0x06,
-- 0xdd, 0x32, 0x01, 0xc2, 0x27, 0x7a, 0x74, 0xc2, 0x42, 0x25, 0xb3, 0x5c,
-- 0xb2, 0xec, 0x03, 0x88, 0xa9, 0x36, 0x25, 0xab, 0x52, 0xf6, 0x93, 0xfc,
-- 0xdb, 0xcd, 0x03, 0x0e, 0xb4, 0xd2, 0x15, 0xa4, 0x05, 0x7d, 0x41, 0xe0,
-- 0xf4, 0x24, 0xba, 0xce, 0x03, 0xf9, 0xa3, 0x70, 0x95, 0xb8, 0x34, 0xb0,
-- 0xc0, 0x31, 0x20, 0xe8, 0xc6, 0xf9, 0x66, 0xe2, 0x0a, 0x72, 0xb1, 0x74,
-- 0xac, 0xed, 0x71, 0x7c, 0x65, 0x2b, 0x9e, 0x32, 0xca, 0x6b, 0xee, 0x82,
-- 0x1a, 0x09, 0x4e, 0x62, 0x7c, 0xd1, 0x82, 0xfb, 0x8d, 0xef, 0x26, 0xdd,
-- 0x19, 0x63, 0x52, 0x16, 0xb3, 0x90, 0x1a, 0xb0, 0x12, 0xb9, 0x79, 0xf0,
-- 0xfd, 0xeb, 0x56, 0xf1, 0x49, 0x29, 0xff, 0x28, 0xee, 0x5c, 0x89, 0xf1,
-- 0x5e, 0x95, 0x9d, 0x1c, 0x24, 0x57, 0xa2, 0x70, 0x3a, 0x03, 0xa4, 0x4f,
-- 0xb2, 0x6c, 0xe1, 0xf0, 0xce, 0x80, 0xfe, 0x2f, 0x8a, 0x30, 0x17, 0x40,
-- 0x47, 0xa9, 0xf3, 0x59, 0x7c, 0xe5, 0x38, 0xdf, 0x91, 0x70, 0x01, 0x9f,
-- 0x3c, 0xc6, 0x98, 0xa6, 0xa4, 0x66, 0x25, 0x3b, 0x9f, 0x3d, 0xf9, 0x3c,
-- 0xa9, 0x38, 0x37, 0x21, 0x6f, 0x21, 0xc5, 0x08, 0x56, 0xc0, 0xea, 0x1c,
-- 0x51, 0x95, 0x9b, 0xcd, 0xd8, 0x63, 0xa8, 0x78, 0x15, 0x27, 0x1f, 0xe2,
-- 0xe6, 0xd2, 0xe8, 0xfd, 0x38, 0x65, 0x90, 0x16, 0xd1, 0x64, 0x46, 0xac,
-- 0x18, 0xe0, 0x1d, 0x78, 0xb5, 0xc4, 0x0a, 0x33, 0x6c, 0x56, 0x98, 0x67,
-- 0x94, 0xd7, 0x7e, 0x72, 0x76, 0x78, 0x71, 0xd6, 0x4f, 0xce, 0x2f, 0x4e,
-- 0xce, 0x56, 0x24, 0xf6, 0xd6, 0x63, 0x30, 0x3d, 0x5e, 0x33, 0x26, 0x1b,
-- 0xc6, 0xcf, 0x34, 0x43, 0x7e, 0xc0, 0x31, 0x78, 0x17, 0x52, 0x61, 0x22,
-- 0x50, 0xc3, 0x67, 0x83, 0x55, 0xe9, 0xdc, 0x8d, 0xd5, 0x02, 0xd9, 0x10,
-- 0x2f, 0x7f, 0x70, 0x62, 0xb2, 0xed, 0x9f, 0x40, 0x21, 0x4c, 0x8b, 0x3c,
-- 0x5d, 0xc7, 0xb2, 0x31, 0x5a, 0x2d, 0x19, 0xe5, 0x0d, 0x92, 0x6a, 0xca,
-- 0x58, 0x41, 0x21, 0x42, 0x59, 0x68, 0xcd, 0x83, 0x6a, 0xf7, 0x2c, 0xe3,
-- 0xa4, 0x97, 0xb0, 0xe1, 0xfb, 0x26, 0x0b, 0xf0, 0xba, 0x1e, 0xa1, 0xdf,
-- 0xb4, 0x62, 0x03, 0x4e, 0x50, 0xb5, 0x86, 0x4b, 0x44, 0x89, 0x48, 0x0f,
-- 0x03, 0xa3, 0x31, 0x9e, 0x2a, 0x71, 0xb8, 0x06, 0x5d, 0x29, 0x4f, 0x0e,
-- 0xcf, 0x88, 0x77, 0x79, 0xdd, 0x25, 0xae, 0x14, 0x4a, 0x1d, 0xb2, 0x2f,
-- 0x24, 0xe0, 0x4c, 0x6b, 0x20, 0x45, 0xad, 0xdb, 0xa8, 0xd6, 0x1d, 0xa9,
-- 0xb5, 0xb8, 0xf2, 0x4e, 0x9b, 0x2b, 0x73, 0xde, 0x4f, 0x27, 0x67, 0x61,
-- 0x27, 0x7c, 0x23, 0xdb, 0xc8, 0xea, 0xbd, 0x42, 0x10, 0x08, 0xe1, 0x69,
-- 0x4f, 0xf5, 0xa9, 0x15, 0x71, 0xcb, 0x56, 0x1c, 0xd4, 0x47, 0x31, 0xd9,
-- 0x9e, 0x4b, 0x26, 0xce, 0xb2, 0xcd, 0x4e, 0x5b, 0x99, 0x34, 0x6d, 0x01,
-- 0xd5, 0x30, 0xf6, 0x7d, 0x99, 0x96, 0x64, 0x70, 0xba, 0xe5, 0xf3, 0x9d,
-- 0x0c, 0xa4, 0xab, 0x31, 0xf3, 0x9d, 0xdf, 0x2c, 0x78, 0x68, 0x3d, 0x0b,
-- 0xb5, 0x5f, 0x94, 0x08, 0x3c, 0x98, 0x67, 0x2b, 0xea, 0x67, 0x32, 0xa2,
-- 0xf7, 0x5c, 0x12, 0x9a, 0x24, 0x65, 0xda, 0x0a, 0x2c, 0xd8, 0x4a, 0x72,
-- 0x2a, 0x2c, 0xe7, 0xe5, 0xe2, 0x82, 0x9a, 0x14, 0x30, 0x70, 0xf2, 0x22,
-- 0xc4, 0x71, 0x25, 0x10, 0x58, 0x11, 0x42, 0x63, 0x57, 0x8a, 0x36, 0xa6,
-- 0xc6, 0x90, 0x12, 0x35, 0xda, 0x9b, 0x89, 0x38, 0x62, 0xa4, 0x8f, 0x8e,
-- 0xd2, 0x69, 0xb8, 0x8d, 0xc2, 0xe1, 0x20, 0x85, 0x7b, 0xc6, 0x50, 0x97,
-- 0xf7, 0x71, 0xae, 0x96, 0xcc, 0x36, 0x2e, 0x76, 0x24, 0x51, 0x62, 0xc8,
-- 0xa4, 0xd2, 0xaa, 0x08, 0xcd, 0x14, 0x25, 0x5b, 0xc9, 0xf6, 0x7d, 0xc6,
-- 0x88, 0xd8, 0xa0, 0xb7, 0x41, 0xbe, 0x78, 0x3c, 0x69, 0x93, 0x0d, 0x91,
-- 0xe6, 0x74, 0xf1, 0x41, 0xda, 0x0d, 0x14, 0xd7, 0xe5, 0xd5, 0x15, 0x52,
-- 0x04, 0xf2, 0x38, 0x19, 0xbb, 0xf2, 0xc6, 0x47, 0x45, 0xe4, 0x20, 0x31,
-- 0x8b, 0xc7, 0xdc, 0xc8, 0x44, 0x93, 0xce, 0x94, 0x96, 0x2b, 0x0f, 0x8b,
-- 0xb6, 0x32, 0x56, 0x00, 0xc6, 0x64, 0x2d, 0x3c, 0x35, 0x0e, 0x52, 0xd3,
-- 0xca, 0x6c, 0x00, 0xbd, 0xdc, 0x39, 0x04, 0x83, 0x11, 0x47, 0x21, 0x3e,
-- 0x9a, 0xab, 0x2e, 0x62, 0x8c, 0x9d, 0x2a, 0x2b, 0x59, 0x19, 0xf6, 0xd5,
-- 0xa0, 0xe0, 0xa7, 0xc3, 0xdd, 0xcd, 0x87, 0x54, 0x0b, 0x96, 0xdb, 0x89,
-- 0xf3, 0x67, 0x92, 0xb9, 0x44, 0xfa, 0x95, 0xa4, 0x8f, 0x4a, 0xfa, 0x61,
-- 0x29, 0x3b, 0x6b, 0x24, 0x6e, 0x24, 0x15, 0x03, 0x4a, 0xf3, 0x12, 0xb5,
-- 0xf7, 0x8d, 0x8e, 0x59, 0xfd, 0x68, 0x0a, 0xa0, 0x99, 0x90, 0xd2, 0xe4,
-- 0x94, 0x2e, 0x17, 0xb7, 0xca, 0x41, 0xde, 0x5d, 0xb2, 0x81, 0xd8, 0x05,
-- 0x1a, 0xc7, 0x66, 0xfb, 0x22, 0x64, 0xd4, 0xc9, 0x34, 0x0f, 0x35, 0x19,
-- 0x3a, 0x78, 0x33, 0xfa, 0x84, 0x9d, 0x02, 0x25, 0x8d, 0x81, 0x61, 0xd4,
-- 0xad, 0xbe, 0x95, 0x4a, 0xd8, 0x6c, 0x7b, 0x36, 0x2e, 0xba, 0xd6, 0x79,
-- 0x3f, 0xab, 0x17, 0x32, 0xf0, 0x49, 0x71, 0xdc, 0x10, 0x9d, 0xcd, 0x2a,
-- 0xac, 0x0d, 0xb1, 0x5c, 0x88, 0x2e, 0x57, 0xdc, 0xcd, 0x81, 0x96, 0x1e,
-- 0x53, 0x13, 0x06, 0xcf, 0x67, 0xa7, 0x15, 0x65, 0xbf, 0xbb, 0x3d, 0xfc,
-- 0xd8, 0x66, 0xa7, 0x55, 0x35, 0x1d, 0x8c, 0xc7, 0xe3, 0x95, 0x1c, 0xf5,
-- 0xe0, 0xe0, 0x20, 0xd9, 0x38, 0x40, 0xce, 0xf7, 0x81, 0x8e, 0xf2, 0xe0,
-- 0x9a, 0xcd, 0x34, 0x53, 0xae, 0xb1, 0x71, 0xbd, 0x64, 0xab, 0x1e, 0x0f,
-- 0x45, 0x19, 0xce, 0xf9, 0xf9, 0xf1, 0xd6, 0xc5, 0xf1, 0x79, 0x3b, 0xe4,
-- 0x3c, 0xbd, 0x67, 0x5d, 0x4f, 0x4a, 0x69, 0x34, 0xf4, 0x16, 0x91, 0xdb,
-- 0x00, 0xb7, 0x64, 0x41, 0xab, 0x46, 0x57, 0xd2, 0x4b, 0x67, 0x72, 0xc5,
-- 0x72, 0x6e, 0xf6, 0x75, 0xa7, 0x58, 0xcd, 0xb3, 0x39, 0xe2, 0xb7, 0x98,
-- 0xa5, 0x81, 0xca, 0xb4, 0x52, 0xf7, 0xbb, 0xfd, 0x0b, 0x2e, 0xd2, 0x56,
-- 0x6b, 0x4a, 0xc8, 0x8a, 0x80, 0x78, 0x07, 0xd6, 0x85, 0x4c, 0xce, 0x34,
-- 0x80, 0x31, 0xb7, 0x2b, 0x00, 0xac, 0x28, 0xaf, 0x8c, 0x2f, 0x0e, 0x35,
-- 0x22, 0xb8, 0x03, 0x46, 0x55, 0x57, 0x74, 0xe0, 0xee, 0x20, 0x09, 0xab,
-- 0xe6, 0x3f, 0xab, 0xd6, 0x86, 0xec, 0x3c, 0x8f, 0xef, 0xb7, 0xc6, 0xeb,
-- 0x3f, 0x49, 0x4e, 0xe3, 0x96, 0xf6, 0xfa, 0xcb, 0x6f, 0xda, 0x26, 0x44,
-- 0x6d, 0xa9, 0x2d, 0x9e, 0x1e, 0x33, 0xca, 0xb8, 0xe8, 0x08, 0x34, 0xd4,
-- 0x7b, 0x11, 0x7d, 0xbb, 0x24, 0xd6, 0x5a, 0x43, 0xf9, 0x15, 0x83, 0xae,
-- 0xa2, 0x4d, 0x9f, 0xa0, 0xa4, 0xc8, 0x08, 0xa8, 0xc5, 0xc2, 0x5d, 0xee,
-- 0xd2, 0x88, 0x6d, 0x18, 0xa7, 0x08, 0xf0, 0x10, 0x0a, 0x62, 0x2e, 0xe2,
-- 0xb1, 0x75, 0xb8, 0xfd, 0x65, 0xb6, 0x98, 0xde, 0x3b, 0x31, 0x4d, 0xdb,
-- 0x5e, 0xa5, 0xbf, 0x85, 0xc2, 0x7e, 0x98, 0xee, 0x69, 0x03, 0xac, 0x9a,
-- 0xad, 0xa0, 0xa3, 0x34, 0x97, 0x2a, 0xe8, 0x6d, 0xa6, 0xa6, 0x3d, 0xb7,
-- 0xca, 0xa4, 0xc5, 0x3b, 0xb4, 0xdb, 0xb9, 0x43, 0x42, 0xa5, 0x9d, 0xfb,
-- 0x71, 0xa6, 0xe7, 0x5e, 0xcf, 0x82, 0x5b, 0x07, 0xa6, 0x2f, 0x22, 0xb6,
-- 0x2b, 0x84, 0x7a, 0x0a, 0x8c, 0x82, 0x86, 0x1d, 0x58, 0x01, 0x81, 0xb6,
-- 0x5d, 0x42, 0x8b, 0xcd, 0x6b, 0x99, 0xc4, 0x96, 0x6f, 0x49, 0xd6, 0x9f,
-- 0xb9, 0x8a, 0x23, 0x7d, 0x45, 0x3c, 0xb5, 0x6c, 0xe4, 0x8e, 0xfd, 0x30,
-- 0x3f, 0xf1, 0x98, 0x6b, 0x79, 0xbc, 0x11, 0x0f, 0x62, 0x50, 0xc2, 0xc0,
-- 0x3c, 0xc3, 0xa6, 0xbe, 0x9b, 0x66, 0xba, 0xb2, 0x5e, 0xb6, 0xce, 0x31,
-- 0x5e, 0xb5, 0xed, 0x4d, 0xbd, 0xb2, 0x49, 0xaa, 0x20, 0x1e, 0xe6, 0xcd,
-- 0x1f, 0x2a, 0x13, 0x46, 0x79, 0xcb, 0x23, 0x01, 0x31, 0xbe, 0x35, 0x10,
-- 0xb5, 0xcb, 0x65, 0xcd, 0x93, 0xb6, 0x52, 0xec, 0xe1, 0x1e, 0xb0, 0x79,
-- 0x5e, 0x83, 0x72, 0xc5, 0x45, 0xf6, 0x70, 0x21, 0x52, 0x8f, 0x0b, 0xa6,
-- 0x7e, 0x35, 0x05, 0x5a, 0x73, 0xe9, 0x7b, 0xe2, 0xa1, 0xb6, 0x38, 0x5f,
-- 0x0b, 0x05, 0xe9, 0x72, 0xcb, 0x00, 0x91, 0xa2, 0xa4, 0x5f, 0x00, 0x1f,
-- 0x62, 0xb7, 0xd3, 0x94, 0xe3, 0xa6, 0x59, 0x4c, 0x1a, 0x26, 0xc7, 0x99,
-- 0x78, 0xa4, 0xd6, 0xbf, 0x5c, 0x07, 0xf5, 0xad, 0xbf, 0x5c, 0xd7, 0x30,
-- 0xe6, 0xb8, 0xd6, 0x4e, 0xa9, 0xd0, 0xf1, 0x3c, 0x84, 0x75, 0x31, 0x39,
-- 0xaf, 0xdb, 0x20, 0xd4, 0x42, 0x27, 0x23, 0x43, 0x4c, 0xc2, 0x5c, 0x93,
-- 0x0d, 0x48, 0xd0, 0x63, 0x89, 0xa8, 0x43, 0x7f, 0x6d, 0xe2, 0x71, 0x2c,
-- 0x24, 0xeb, 0x86, 0x3d, 0x45, 0x7e, 0xe6, 0xb2, 0xbd, 0x65, 0xb6, 0x5e,
-- 0x21, 0xe3, 0x43, 0xaa, 0xa9, 0x74, 0x05, 0x32, 0xb8, 0xb5, 0xd1, 0xf1,
-- 0xc8, 0x40, 0x90, 0xc3, 0x36, 0x1e, 0xe7, 0x9c, 0xe1, 0x00, 0xb1, 0x90,
-- 0xbe, 0x24, 0x91, 0x46, 0xc8, 0x1b, 0x73, 0x46, 0x08, 0x33, 0x4d, 0xba,
-- 0x4d, 0x7a, 0x59, 0xca, 0xbb, 0x09, 0x38, 0xf6, 0x36, 0x54, 0xee, 0xe0,
-- 0x8a, 0x25, 0xc2, 0xab, 0x69, 0x31, 0x2a, 0x2e, 0x2f, 0x1f, 0x90, 0x17,
-- 0x24, 0xd1, 0x1b, 0x6d, 0x08, 0x91, 0xf6, 0x38, 0xd1, 0x89, 0xdf, 0x1b,
-- 0x49, 0x3e, 0x3e, 0x0a, 0xea, 0x29, 0xaa, 0xa7, 0xd6, 0x1b, 0xea, 0xc2,
-- 0x77, 0x37, 0x13, 0x88, 0x25, 0x63, 0x59, 0x0a, 0x07, 0xb5, 0x66, 0x62,
-- 0xa6, 0x46, 0xde, 0x79, 0x5c, 0x40, 0x3a, 0x84, 0xff, 0xfe, 0x9f, 0x3f,
-- 0xfd, 0xd2, 0x11, 0xfa, 0xcc, 0x9a, 0x8d, 0x85, 0x9c, 0x22, 0xd4, 0x45,
-- 0xc0, 0x54, 0xa0, 0x43, 0xb0, 0x1c, 0xe2, 0x2b, 0x92, 0x68, 0x51, 0xd4,
-- 0x20, 0xcd, 0x25, 0x66, 0x70, 0x95, 0xef, 0x10, 0xa8, 0x7d, 0x45, 0x6d,
-- 0x71, 0x00, 0x0c, 0x24, 0x03, 0x24, 0x2d, 0xef, 0x4d, 0x73, 0x20, 0x15,
-- 0xaa, 0xb7, 0xc7, 0x07, 0xca, 0x81, 0x0d, 0x39, 0xff, 0xaa, 0xf2, 0xd9,
-- 0xf7, 0x67, 0x47, 0x4e, 0xa3, 0x0b, 0x76, 0xe2, 0x6b, 0xec, 0x44, 0xb4,
-- 0x6c, 0x1e, 0xdd, 0xb2, 0xdf, 0x06, 0x49, 0xf1, 0x48, 0x5f, 0xac, 0x56,
-- 0x4b, 0x21, 0xb5, 0x56, 0xb5, 0xbd, 0x49, 0xbf, 0x13, 0x86, 0xb5, 0xdf,
-- 0x86, 0x2a, 0x2e, 0x63, 0xfc, 0xbf, 0x46, 0x0e, 0xa7, 0x06, 0x2e, 0x44,
-- 0xd0, 0xd4, 0x5f, 0x93, 0xf4, 0xe6, 0x40, 0xac, 0x5b, 0xa9, 0x9e, 0x0d,
-- 0x80, 0x6b, 0xa9, 0xac, 0xc2, 0xf4, 0x7f, 0x87, 0x62, 0xa0, 0x6a, 0x1b,
-- 0xea, 0xd4, 0x8a, 0x2e, 0x3c, 0x40, 0xa4, 0xb0, 0x2e, 0x83, 0x8a, 0xf2,
-- 0x2b, 0x78, 0x6c, 0xc1, 0xec, 0xeb, 0xff, 0xb6, 0xee, 0x81, 0xf9, 0x3a,
-- 0x92, 0x39, 0x6c, 0xfc, 0x11, 0x42, 0xce, 0xe0, 0xa8, 0xef, 0x47, 0x29,
-- 0x9e, 0x70, 0xb9, 0x73, 0x5d, 0xad, 0xd8, 0x51, 0x07, 0x34, 0xf5, 0xaa,
-- 0x61, 0x7c, 0x73, 0xb8, 0xff, 0xda, 0xe6, 0xfa, 0x4f, 0x81, 0xb7, 0x71,
-- 0xe6, 0x91, 0x51, 0x26, 0x00, 0xdc, 0xcb, 0xb9, 0x15, 0xdf, 0xe5, 0x3d,
-- 0xb1, 0xbb, 0x03, 0xd4, 0x41, 0xa2, 0x36, 0x97, 0x70, 0x60, 0x92, 0xed,
-- 0x50, 0x1d, 0xd5, 0xee, 0xb4, 0x52, 0x79, 0x0c, 0x0c, 0x73, 0x66, 0xe3,
-- 0xe3, 0xd3, 0x2b, 0x2c, 0x2e, 0xa0, 0xdf, 0x30, 0x51, 0xf3, 0xa5, 0xfc,
-- 0xbb, 0xaa, 0x3c, 0xdc, 0xa1, 0xc0, 0x89, 0xea, 0xc3, 0xde, 0x51, 0xd9,
-- 0xca, 0xe4, 0xbb, 0xcb, 0x46, 0xc4, 0x59, 0xae, 0x48, 0x5e, 0xfa, 0x51,
-- 0xb0, 0xb0, 0xdb, 0x23, 0x57, 0xe6, 0xc1, 0xdc, 0x54, 0x0b, 0x2e, 0x71,
-- 0x5c, 0x3c, 0x1a, 0x57, 0xf8, 0xd6, 0x30, 0xaf, 0x4d, 0xf3, 0x24, 0xad,
-- 0x28, 0xed, 0x24, 0x82, 0xee, 0x64, 0xe5, 0xa4, 0xaa, 0x19, 0x94, 0xc9,
-- 0x8d, 0x8c, 0xdf, 0xbb, 0x4e, 0x03, 0xf4, 0xf0, 0xb9, 0x42, 0x88, 0x07,
-- 0x36, 0x4d, 0x33, 0x59, 0x44, 0x29, 0xb7, 0x16, 0xaa, 0x71, 0x67, 0xc6,
-- 0xd5, 0xbe, 0xf8, 0xcc, 0x19, 0x4d, 0xa7, 0x9c, 0xbb, 0xfc, 0x51, 0xd7,
-- 0x9b, 0x2b, 0xf8, 0x86, 0x2d, 0x8e, 0xee, 0x98, 0xc6, 0xe1, 0x72, 0x76,
-- 0x12, 0xe4, 0xf3, 0x86, 0x42, 0x37, 0xcf, 0xd1, 0x32, 0x56, 0x91, 0x1f,
-- 0x4a, 0xf7, 0x44, 0x9c, 0x49, 0xc4, 0x31, 0xfe, 0x55, 0xbd, 0x04, 0x37,
-- 0x4f, 0xe7, 0xe1, 0x38, 0x1d, 0x70, 0xca, 0xa4, 0x90, 0x85, 0x77, 0x96,
-- 0x49, 0x24, 0x41, 0xb0, 0xe0, 0x96, 0x8e, 0x57, 0x99, 0x6d, 0x5c, 0xf9,
-- 0x42, 0x07, 0x3a, 0xec, 0xf8, 0x34, 0x97, 0xc2, 0xc3, 0x15, 0xcf, 0xe0,
-- 0x9e, 0x19, 0xc0, 0x66, 0x45, 0xad, 0xba, 0x8b, 0xb9, 0xb1, 0x16, 0x50,
-- 0x05, 0x45, 0x73, 0x4d, 0x22, 0x16, 0x4d, 0x1c, 0x7a, 0x06, 0xcf, 0x5a,
-- 0x97, 0x8c, 0xb8, 0xfb, 0x55, 0x7e, 0x2b, 0xd4, 0x62, 0x23, 0xeb, 0xc8,
-- 0xa4, 0x70, 0x63, 0x30, 0x1f, 0x7e, 0x52, 0x98, 0xce, 0x24, 0xb8, 0x47,
-- 0x49, 0x85, 0x3a, 0x8c, 0x85, 0xe6, 0x5e, 0x8d, 0x8b, 0x29, 0x5f, 0x52,
-- 0x29, 0xdf, 0xe5, 0x7b, 0x44, 0xd9, 0x6d, 0xdf, 0xc8, 0x37, 0x45, 0x55,
-- 0xef, 0xf5, 0x82, 0xda, 0x7a, 0x2a, 0x48, 0x28, 0xf9, 0xe8, 0xe0, 0x24,
-- 0x66, 0x65, 0x5e, 0x0c, 0x54, 0xc4, 0x91, 0x0c, 0x27, 0xba, 0x88, 0x3a,
-- 0xeb, 0x88, 0x5a, 0x0c, 0x24, 0xa7, 0x37, 0x49, 0x52, 0xa6, 0x4b, 0x71,
-- 0x67, 0xe8, 0xd1, 0x59, 0xae, 0x83, 0x72, 0x35, 0x1d, 0xbf, 0x49, 0x7a,
-- 0x3f, 0x0c, 0x0e, 0x96, 0x55, 0x1c, 0x48, 0x3c, 0x1b, 0x7c, 0x83, 0x26,
-- 0xff, 0xd2, 0x73, 0x8a, 0xb6, 0x3c, 0xea, 0xbf, 0xda, 0xeb, 0x75, 0x07,
-- 0x7e, 0xfb, 0x2b, 0xa5, 0x72, 0xf5, 0xb0, 0x60, 0x39, 0xb7, 0x41, 0x02,
-- 0xc8, 0x97, 0xce, 0xce, 0x96, 0xae, 0xb6, 0x45, 0x76, 0x77, 0xae, 0xb9,
-- 0xe5, 0x2d, 0x2c, 0x10, 0x9f, 0x37, 0x19, 0x14, 0x97, 0x03, 0x94, 0x01,
-- 0xe4, 0xfa, 0xec, 0xec, 0x54, 0x09, 0x8e, 0x23, 0x10, 0x96, 0x99, 0xc0,
-- 0xa8, 0xed, 0xae, 0xfb, 0x59, 0xa3, 0xc3, 0x4b, 0xa7, 0xaa, 0xea, 0x80,
-- 0x74, 0x47, 0xf7, 0x58, 0xbd, 0xb1, 0xd7, 0x1d, 0x7a, 0x2f, 0xa7, 0x0f,
-- 0x29, 0x78, 0x6f, 0x54, 0x41, 0x0c, 0x01, 0x79, 0x7d, 0xb9, 0xc3, 0x31,
-- 0x6b, 0xb0, 0xde, 0x99, 0x58, 0x8d, 0xa0, 0xf6, 0x93, 0xae, 0x7f, 0x29,
-- 0x25, 0x61, 0x3b, 0x9d, 0xbc, 0x3e, 0x05, 0x64, 0xdf, 0x20, 0xd5, 0x06,
-- 0xd4, 0x91, 0x42, 0x82, 0x36, 0xd3, 0xe8, 0x57, 0x01, 0x9f, 0x35, 0x31,
-- 0x24, 0x10, 0xcd, 0xe0, 0x32, 0xbe, 0x9b, 0x1e, 0x5f, 0x04, 0xc5, 0xfb,
-- 0x65, 0xdf, 0x12, 0x71, 0xbd, 0xcb, 0x4d, 0xc2, 0xaf, 0x18, 0xf7, 0x0b,
-- 0x04, 0x77, 0xae, 0x1b, 0xb5, 0x58, 0x8e, 0x66, 0x93, 0x67, 0xc9, 0x4b,
-- 0xfa, 0x11, 0xc7, 0x31, 0x1f, 0x98, 0x57, 0x0d, 0x95, 0xb2, 0x53, 0x97,
-- 0x79, 0x27, 0xf2, 0x18, 0xff, 0xfa, 0x64, 0x97, 0x1a, 0xfe, 0x98, 0x5a,
-- 0x4d, 0x9e, 0x64, 0x92, 0x5f, 0xe5, 0x08, 0x99, 0x8c, 0xb5, 0x59, 0x13,
-- 0xe7, 0x03, 0xa7, 0x06, 0x2f, 0xd5, 0xce, 0xee, 0xe7, 0xc9, 0x28, 0xaf,
-- 0x93, 0xb7, 0xaf, 0x9f, 0x49, 0x5d, 0xf8, 0x6a, 0x39, 0xb3, 0x0d, 0xd5,
-- 0x2a, 0x2a, 0x3c, 0xce, 0xf5, 0xf6, 0x11, 0xa1, 0x81, 0x4f, 0xf3, 0x31,
-- 0xe7, 0xd5, 0xf5, 0x1b, 0x15, 0x96, 0x2e, 0xcd, 0xe6, 0x17, 0x14, 0x2c,
-- 0x72, 0x84, 0xc7, 0x2d, 0xa9, 0xcd, 0xb1, 0x43, 0x9b, 0xa5, 0x35, 0xa0,
-- 0xce, 0x2b, 0xab, 0x26, 0xdd, 0xd0, 0xa0, 0x3e, 0x6b, 0x5a, 0x06, 0x24,
-- 0x6c, 0xd6, 0x40, 0x28, 0x07, 0x24, 0x20, 0x5d, 0x45, 0x81, 0xa4, 0x76,
-- 0xb5, 0x1d, 0xe1, 0xd9, 0xa4, 0x19, 0x7d, 0x77, 0x8c, 0x37, 0x82, 0x5c,
-- 0x7f, 0xb9, 0xba, 0x99, 0x9c, 0xf3, 0xf1, 0x72, 0xca, 0xd5, 0x1d, 0xe3,
-- 0x3b, 0xde, 0xca, 0xb9, 0x18, 0xa6, 0x46, 0xb9, 0x94, 0x1a, 0x80, 0xfb,
-- 0x0b, 0x8e, 0x1b, 0x4b, 0x76, 0x86, 0x1f, 0xfb, 0x61, 0x01, 0x6b, 0x2d,
-- 0x37, 0x85, 0x3a, 0xd5, 0xe5, 0x20, 0x22, 0xf7, 0x71, 0xdd, 0x1e, 0x0d,
-- 0xb7, 0x2d, 0x11, 0x7b, 0x53, 0xf6, 0x7e, 0x94, 0x72, 0x11, 0xec, 0x12,
-- 0x43, 0xbd, 0x4a, 0x51, 0xb2, 0x30, 0xa0, 0x9e, 0xbc, 0x0f, 0x38, 0x24,
-- 0x80, 0xd4, 0xae, 0x9a, 0xb8, 0x7c, 0x1b, 0x54, 0x31, 0x31, 0x61, 0x40,
-- 0x85, 0x79, 0x09, 0x37, 0x15, 0xe9, 0x2e, 0xf8, 0x3a, 0x2e, 0xb3, 0xcd,
-- 0xcd, 0xb8, 0x43, 0x08, 0x47, 0x8a, 0x2c, 0xc1, 0x80, 0xef, 0xde, 0x3e,
-- 0xcb, 0x6a, 0x99, 0xe3, 0xd4, 0x41, 0x9c, 0xad, 0x34, 0x1a, 0xc7, 0xd3,
-- 0x23, 0xcf, 0xc3, 0xe2, 0x64, 0x87, 0xc3, 0x60, 0x56, 0x47, 0x26, 0xb1,
-- 0x74, 0x4d, 0x89, 0x4b, 0xe1, 0x6c, 0xbd, 0x39, 0x3a, 0x3e, 0xdc, 0x4c,
-- 0xde, 0x64, 0x00, 0xb9, 0x6a, 0x8e, 0x1b, 0xfc, 0xe2, 0x0f, 0xf2, 0x89,
-- 0x6d, 0x91, 0x6a, 0x5a, 0x5d, 0xbe, 0x6f, 0xb5, 0x0b, 0x41, 0x4e, 0x94,
-- 0x5d, 0x83, 0x44, 0x28, 0x89, 0x30, 0x05, 0xe2, 0xf5, 0xac, 0xda, 0x11,
-- 0xe4, 0xb4, 0x00, 0xb9, 0x3f, 0xb6, 0xbb, 0xf2, 0x6d, 0xe7, 0x4b, 0x9b,
-- 0x7d, 0xaf, 0x55, 0x0f, 0x19, 0xc5, 0xd3, 0x22, 0x3c, 0x68, 0x6f, 0x79,
-- 0xec, 0x1a, 0x94, 0x26, 0xee, 0x2f, 0xa9, 0x08, 0xda, 0x75, 0x16, 0xa4,
-- 0x50, 0x77, 0xfe, 0x77, 0x09, 0xe1, 0x45, 0xe0, 0xc4, 0xac, 0x98, 0x38,
-- 0x4c, 0x6b, 0xa9, 0x3f, 0xc6, 0xf3, 0x0d, 0x19, 0x4a, 0x80, 0xdb, 0xd5,
-- 0x95, 0xe5, 0x79, 0x2a, 0x10, 0xde, 0x3c, 0xa0, 0xd0, 0x17, 0x2f, 0x77,
-- 0xb5, 0x57, 0x53, 0x5c, 0x2b, 0x43, 0x17, 0xdd, 0xc6, 0xd5, 0xf4, 0x3a,
-- 0xe8, 0xc2, 0x7a, 0x4b, 0x84, 0x0c, 0x42, 0xa3, 0x39, 0xcd, 0x16, 0x87,
-- 0x5d, 0x62, 0xeb, 0xf6, 0xe7, 0x16, 0x78, 0xa3, 0xa5, 0xbc, 0x39, 0x91,
-- 0x27, 0x2a, 0x5f, 0xd8, 0x11, 0x1a, 0xa5, 0xc1, 0x4b, 0xc1, 0xcc, 0x48,
-- 0xdc, 0xdd, 0xde, 0xdb, 0x09, 0xab, 0x13, 0xce, 0xb5, 0xf2, 0x2e, 0x87,
-- 0x2c, 0x6d, 0xfd, 0x7e, 0xc1, 0x29, 0x7f, 0x65, 0xd2, 0xfc, 0xeb, 0x72,
-- 0x7e, 0x43, 0xb4, 0x55, 0x31, 0x05, 0x0f, 0xba, 0x2b, 0x24, 0xeb, 0xe9,
-- 0xfb, 0xde, 0xb9, 0x27, 0xda, 0xa5, 0x34, 0x1a, 0x45, 0xe0, 0x53, 0x75,
-- 0x6b, 0x0b, 0x55, 0x3c, 0x50, 0x0c, 0x2f, 0xc4, 0x20, 0x66, 0xdf, 0x34,
-- 0xd1, 0xce, 0x98, 0x03, 0x1f, 0x58, 0xcf, 0xec, 0xe9, 0x88, 0xac, 0xe9,
-- 0xde, 0xd0, 0xe3, 0x16, 0x47, 0x51, 0x52, 0x95, 0x26, 0x53, 0x5d, 0x5b,
-- 0x21, 0x75, 0x08, 0xd1, 0xea, 0x76, 0x60, 0xf9, 0x8a, 0xa3, 0xf2, 0xe8,
-- 0xbe, 0x4e, 0xac, 0x51, 0x11, 0x27, 0xb8, 0x50, 0x00, 0xaf, 0x47, 0xeb,
-- 0xb6, 0x94, 0x14, 0xb7, 0xc4, 0x8a, 0x1d, 0x55, 0x1e, 0xdb, 0xcf, 0x06,
-- 0x98, 0xb4, 0x06, 0x27, 0x2a, 0x05, 0x5f, 0xf2, 0xeb, 0xd1, 0xb9, 0x1c,
-- 0x4f, 0x0b, 0xde, 0x1d, 0x36, 0x56, 0x06, 0x2b, 0xff, 0x3f, 0xe4, 0xde,
-- 0xe6, 0xbb, 0x48, 0x4f, 0xfa, 0xa0, 0x23, 0x08, 0x2a, 0x0c, 0x00, 0xb7,
-- 0x2c, 0x25, 0xa4, 0x00, 0x41, 0x20, 0x38, 0x09, 0xda, 0x90, 0xd8, 0x56,
-- 0x97, 0xc8, 0xa4, 0x17, 0x56, 0x27, 0xf6, 0xe5, 0x20, 0xa8, 0x82, 0xeb,
-- 0xb8, 0xf5, 0x6b, 0x3a, 0xb6, 0x45, 0x95, 0xcb, 0xbe, 0xf8, 0x08, 0xb5,
-- 0x40, 0x4f, 0x8d, 0x83, 0x50, 0x2c, 0x79, 0xd7, 0xe1, 0xa1, 0x48, 0x1c,
-- 0xa4, 0x19, 0x5b, 0x39, 0xaa, 0xa1, 0x23, 0x39, 0x0e, 0x96, 0xa9, 0x79,
-- 0x11, 0xa2, 0x8e, 0xd2, 0x55, 0xcf, 0xa6, 0x80, 0x3f, 0x11, 0x15, 0x92,
-- 0x6a, 0x3b, 0xe7, 0xda, 0x3f, 0x1b, 0xf7, 0x59, 0xbd, 0xe9, 0x3d, 0xdb,
-- 0x16, 0xf7, 0xd5, 0x55, 0xda, 0x46, 0x0e, 0x6a, 0x2b, 0x55, 0x91, 0xcd,
-- 0x58, 0xfa, 0x92, 0x00, 0x0b, 0xf2, 0x75, 0x5d, 0x22, 0x9d, 0x97, 0x1d,
-- 0x09, 0x0a, 0xda, 0xbc, 0xaa, 0xb9, 0xf0, 0x52, 0xba, 0x91, 0x4b, 0xa9,
-- 0xea, 0x8a, 0x86, 0xd2, 0x4c, 0xd1, 0xa0, 0xdf, 0x20, 0x40, 0x54, 0x15,
-- 0x25, 0xf3, 0x44, 0x59, 0xb5, 0x01, 0x12, 0xec, 0xad, 0xb5, 0x5e, 0x5b,
-- 0xde, 0x3b, 0x3f, 0x0e, 0x73, 0x80, 0xc5, 0x72, 0xe8, 0x71, 0x27, 0xf7,
-- 0xe9, 0x58, 0x44, 0x8f, 0x70, 0x1a, 0x84, 0xac, 0x64, 0x34, 0x1d, 0x31,
-- 0xad, 0xcc, 0x88, 0xb8, 0xcc, 0xbc, 0xdc, 0x28, 0xab, 0xd2, 0xca, 0x3d,
-- 0xd3, 0xa4, 0x47, 0xd9, 0xf1, 0x94, 0x13, 0x0b, 0xda, 0xc7, 0xec, 0xbe,
-- 0x09, 0xa1, 0xc5, 0x47, 0x48, 0xa2, 0xc3, 0xb5, 0x96, 0xb9, 0x1f, 0x55,
-- 0x50, 0x45, 0x6d, 0xe5, 0x64, 0x51, 0x8c, 0xda, 0x7c, 0xb5, 0x8d, 0x45,
-- 0x8e, 0x7d, 0xb5, 0x81, 0x3c, 0x9c, 0xf8, 0x32, 0xaf, 0x74, 0x55, 0xa0,
-- 0xda, 0xb7, 0xa0, 0x5b, 0xa1, 0x56, 0xb1, 0x9a, 0xc0, 0x91, 0x38, 0x2e,
-- 0xc1, 0x91, 0x92, 0x2f, 0x83, 0x98, 0xc8, 0x15, 0xd5, 0x60, 0x91, 0x0a,
-- 0x79, 0x9d, 0x7e, 0xfc, 0x38, 0xac, 0x32, 0xa9, 0x6a, 0x5a, 0x55, 0x53,
-- 0xa4, 0x5d, 0x36, 0xcb, 0xc0, 0x0e, 0xbe, 0xd5, 0x1a, 0xd0, 0x97, 0xf9,
-- 0x15, 0x47, 0xef, 0xe1, 0xdf, 0xae, 0x24, 0x73, 0x4b, 0x2f, 0xb7, 0x5a,
-- 0xba, 0xfe, 0x49, 0xcf, 0x2f, 0x81, 0xf1, 0xa4, 0x31, 0x4c, 0xc2, 0x36,
-- 0x35, 0x37, 0x2e, 0xce, 0x5e, 0x71, 0x2f, 0xe7, 0x41, 0x1c, 0xfe, 0x34,
-- 0xf3, 0xe9, 0x1e, 0x76, 0xeb, 0x63, 0x35, 0x7c, 0xa3, 0x26, 0xe8, 0xb7,
-- 0x35, 0x26, 0xad, 0x1e, 0x6e, 0xb9, 0x22, 0xd0, 0x17, 0xc3, 0xfb, 0x41,
-- 0x19, 0xa6, 0xa8, 0x2c, 0x1c, 0x59, 0x6f, 0x6f, 0x74, 0x42, 0xfb, 0x68,
-- 0x89, 0xcc, 0x70, 0x0c, 0xd1, 0xbe, 0x9d, 0x2c, 0x02, 0x7a, 0xbe, 0xce,
-- 0xf2, 0xd2, 0x5b, 0xd8, 0x2b, 0x17, 0x04, 0xeb, 0xb9, 0x52, 0xab, 0x6c,
-- 0x58, 0xe7, 0x82, 0xb8, 0x92, 0x4d, 0xa8, 0x1d, 0xe6, 0xc1, 0xda, 0x98,
-- 0x4a, 0x69, 0x62, 0x24, 0x57, 0x92, 0xfc, 0xca, 0x32, 0x89, 0xa8, 0xb3,
-- 0xea, 0x9e, 0x01, 0x5a, 0x7c, 0xd5, 0x99, 0xda, 0x71, 0xcc, 0x19, 0xac,
-- 0x7a, 0x88, 0x05, 0xc3, 0x60, 0x0c, 0x99, 0x22, 0x06, 0x72, 0xf3, 0x5c,
-- 0x49, 0x76, 0xb6, 0xb3, 0xdc, 0x96, 0xb3, 0x05, 0x88, 0x15, 0x45, 0x60,
-- 0xb2, 0x24, 0x3a, 0x98, 0x44, 0xcb, 0xea, 0x5a, 0xa3, 0x75, 0x69, 0x9d,
-- 0x2b, 0xad, 0xe2, 0x8e, 0x91, 0xc6, 0xb8, 0xb8, 0x32, 0x64, 0x8f, 0x93,
-- 0x52, 0x35, 0x22, 0x51, 0xb8, 0x8e, 0x8e, 0x99, 0x25, 0xab, 0xa1, 0x47,
-- 0x75, 0xf1, 0x16, 0xc0, 0x4e, 0x63, 0x16, 0x78, 0xbf, 0x18, 0x0e, 0x10,
-- 0x37, 0x02, 0x6f, 0xc8, 0x1d, 0xe3, 0xe5, 0x62, 0x68, 0x92, 0x46, 0xc9,
-- 0xd5, 0x8b, 0xa4, 0x2b, 0xe2, 0xd6, 0x9f, 0x38, 0x3a, 0x97, 0xb1, 0x02,
-- 0x51, 0x5c, 0x8b, 0xac, 0xf2, 0x3c, 0xeb, 0xca, 0xef, 0xf9, 0xaa, 0xb2,
-- 0xf7, 0xde, 0xed, 0x22, 0x91, 0x8d, 0x66, 0xa3, 0x0f, 0xf7, 0xb3, 0xf9,
-- 0x9c, 0xd2, 0x4e, 0x5c, 0xf3, 0x4e, 0xee, 0x5c, 0x0b, 0xba, 0x96, 0x08,
-- 0x6e, 0x56, 0x21, 0xbf, 0xd7, 0x0f, 0x74, 0x27, 0x12, 0x8b, 0xe4, 0x6e,
-- 0x14, 0x43, 0x69, 0x37, 0x27, 0x48, 0x35, 0xfe, 0x6e, 0x02, 0xcf, 0xb5,
-- 0xb4, 0xe2, 0xbd, 0xe4, 0xe7, 0x9f, 0xfb, 0x09, 0x23, 0xe4, 0xfc, 0x4c,
-- 0xda, 0xc1, 0xcf, 0xec, 0xf7, 0xfb, 0xb9, 0x54, 0x64, 0xf3, 0x9f, 0x6f,
-- 0xa9, 0xcb, 0xfd, 0x55, 0x31, 0xdd, 0x49, 0x50, 0xa9, 0x23, 0x04, 0xe7,
-- 0xd2, 0x32, 0x45, 0xac, 0xbc, 0x49, 0x22, 0xe5, 0xd0, 0x16, 0xa8, 0x0b,
-- 0x5a, 0x98, 0x36, 0x66, 0x39, 0x9b, 0x4b, 0xde, 0x81, 0x72, 0x1a, 0xf0,
-- 0x01, 0x30, 0x8b, 0xf5, 0x3f, 0xae, 0xfb, 0xbd, 0x09, 0xca, 0x1e, 0xa9,
-- 0x2e, 0xcc, 0x0f, 0x46, 0xf6, 0x14, 0x61, 0x04, 0xb5, 0xd4, 0x23, 0x15,
-- 0x83, 0x08, 0x1f, 0x6e, 0xe8, 0x00, 0x27, 0x6c, 0xbc, 0xb8, 0x43, 0xa9,
-- 0x32, 0x58, 0x26, 0x65, 0x83, 0xd9, 0xee, 0xb2, 0xb8, 0xbe, 0x87, 0x10,
-- 0x16, 0x09, 0xc0, 0xf3, 0xb0, 0x7a, 0xb8, 0xb1, 0xb2, 0x98, 0xb3, 0x07,
-- 0x88, 0x1c, 0x4e, 0x92, 0x60, 0x9f, 0x56, 0xc8, 0x73, 0x69, 0x2c, 0xeb,
-- 0x83, 0xf5, 0x20, 0x57, 0x56, 0xa2, 0x5d, 0x56, 0xd4, 0xa8, 0xf3, 0xa8,
-- 0x37, 0x52, 0xa3, 0xee, 0xa1, 0xc8, 0x7f, 0x4d, 0x16, 0x17, 0xbc, 0x29,
-- 0x8f, 0xf8, 0x95, 0xc2, 0xf6, 0x1e, 0x0f, 0xbf, 0xdf, 0x61, 0xdf, 0x36,
-- 0x24, 0x62, 0x7b, 0x37, 0xaf, 0xc3, 0x0a, 0x66, 0xec, 0xf0, 0xf0, 0xc0,
-- 0xe8, 0x20, 0x0e, 0x98, 0x39, 0x91, 0x56, 0x9d, 0x93, 0x12, 0x71, 0xdf,
-- 0xc1, 0xa5, 0x2d, 0x94, 0x5d, 0xe0, 0x01, 0x51, 0x15, 0x83, 0xb1, 0x47,
-- 0xef, 0xe6, 0xc2, 0x65, 0x93, 0xf3, 0xa2, 0x2f, 0x25, 0x1e, 0x4c, 0xfb,
-- 0x08, 0xb2, 0x6a, 0x3a, 0xbc, 0x62, 0x91, 0x22, 0xc2, 0x63, 0x7a, 0x95,
-- 0xf4, 0x56, 0x5e, 0x83, 0xbd, 0xce, 0x12, 0x68, 0x26, 0xff, 0x73, 0xce,
-- 0xe3, 0x8d, 0x02, 0xc1, 0xa9, 0x7c, 0xbc, 0x61, 0xd7, 0xf9, 0xdf, 0xec,
-- 0x0a, 0xdf, 0x54, 0xfb, 0x8b, 0x44, 0x65, 0xae, 0x02, 0x10, 0xd3, 0xa5,
-- 0x55, 0xd6, 0x89, 0xd5, 0x81, 0xc6, 0x9a, 0xc3, 0x9a, 0x7e, 0x59, 0x2c,
-- 0xe7, 0x93, 0x66, 0xa4, 0xc6, 0x6a, 0xc6, 0xcb, 0xe9, 0x8b, 0xdc, 0xa3,
-- 0xa2, 0xd1, 0x59, 0xc6, 0x85, 0xab, 0x73, 0x04, 0xb3, 0x96, 0x66, 0x47,
-- 0xb0, 0xd4, 0xc6, 0x20, 0x46, 0xd1, 0xc2, 0xec, 0x6c, 0xaa, 0xd4, 0x86,
-- 0x22, 0xbb, 0x1c, 0x63, 0x9d, 0xab, 0xe9, 0xb5, 0x77, 0x5d, 0x08, 0xb2,
-- 0x42, 0x6f, 0x2f, 0x39, 0xaa, 0x2d, 0xf6, 0x4e, 0xe7, 0xb8, 0xca, 0xab,
-- 0x0c, 0xe8, 0x8a, 0x6f, 0x4e, 0xde, 0x1e, 0xba, 0x78, 0x4f, 0xd1, 0xf2,
-- 0xf9, 0x93, 0x4e, 0x78, 0x9d, 0x21, 0xdc, 0xf6, 0x96, 0x31, 0xdb, 0x8f,
-- 0xab, 0x7a, 0x60, 0x75, 0x48, 0x99, 0x5f, 0xdc, 0x2d, 0xf3, 0xc9, 0x06,
-- 0x72, 0x9a, 0xdf, 0xbf, 0x3b, 0xfa, 0x61, 0x20, 0x66, 0x0c, 0x60, 0x4f,
-- 0x55, 0x96, 0xd6, 0x6b, 0x49, 0xc1, 0xa2, 0xea, 0x17, 0xb3, 0x8e, 0xf4,
-- 0x78, 0x8b, 0x43, 0x0e, 0xe1, 0xa1, 0x90, 0xa3, 0x90, 0xcf, 0xc5, 0x95,
-- 0x20, 0x4d, 0x6e, 0x32, 0x03, 0x20, 0x16, 0x0a, 0x6c, 0x0b, 0xec, 0x7b,
-- 0x47, 0xec, 0x6a, 0xb0, 0xdf, 0xdc, 0xdc, 0xfe, 0xe9, 0xe9, 0xeb, 0xfd,
-- 0x8b, 0x7d, 0x37, 0x37, 0x5c, 0xc5, 0x60, 0x2a, 0xd0, 0x4d, 0x59, 0x70,
-- 0xd3, 0x22, 0x97, 0xeb, 0x7f, 0xe2, 0xb4, 0x86, 0xf6, 0x5d, 0x7f, 0x7a,
-- 0x76, 0xc2, 0x16, 0x86, 0x3f, 0xfd, 0xbc, 0xef, 0x0b, 0xb6, 0xa2, 0x20,
-- 0x5b, 0x5c, 0x36, 0x73, 0x77, 0x33, 0xe1, 0xf1, 0x19, 0xf8, 0x46, 0xdf,
-- 0x79, 0xc2, 0x25, 0x85, 0x38, 0xf9, 0xc0, 0x7b, 0x5a, 0x8e, 0x9d, 0xf0,
-- 0x24, 0xc6, 0x3b, 0xd9, 0xce, 0x7e, 0x1c, 0x11, 0x17, 0x4c, 0xa4, 0xf0,
-- 0x4c, 0xcc, 0x90, 0x35, 0x6c, 0xad, 0xa6, 0x24, 0xf1, 0x93, 0xd0, 0x5a,
-- 0x83, 0x75, 0xb0, 0xb1, 0x8d, 0xe9, 0x6b, 0xc2, 0x0b, 0xd5, 0xc6, 0x8f,
-- 0x72, 0xfb, 0x63, 0x1b, 0x24, 0x15, 0x12, 0xc0, 0x70, 0x85, 0x05, 0x48,
-- 0xc4, 0x63, 0x21, 0x85, 0x78, 0x86, 0x36, 0x5a, 0x55, 0xa7, 0xa2, 0xb3,
-- 0x23, 0xe6, 0x7b, 0xa2, 0x73, 0x9b, 0x43, 0xb4, 0x20, 0x7f, 0x24, 0xbe,
-- 0x33, 0xb0, 0x8c, 0x4a, 0x99, 0x36, 0x7d, 0x10, 0x3d, 0x54, 0x5b, 0xb1,
-- 0x11, 0xe3, 0xf3, 0xdd, 0x6c, 0x22, 0xe4, 0x0f, 0x6d, 0x59, 0x5e, 0x53,
-- 0xec, 0xf5, 0x29, 0x94, 0x2d, 0x44, 0x8a, 0x5e, 0x6c, 0x6e, 0x34, 0xe3,
-- 0x35, 0x3d, 0x5a, 0x2d, 0xd9, 0x60, 0xc3, 0x7f, 0x6d, 0xed, 0x0c, 0xb7,
-- 0x7b, 0xf1, 0xe8, 0x11, 0xef, 0x09, 0xa3, 0x98, 0x61, 0x6a, 0x0a, 0x4c,
-- 0x6a, 0xf1, 0xf8, 0x00, 0x85, 0x81, 0x91, 0x44, 0x0a, 0xc7, 0x5e, 0xd7,
-- 0x58, 0x06, 0x27, 0x91, 0xf1, 0x52, 0x8c, 0xe8, 0x9e, 0x23, 0xce, 0x0b,
-- 0x64, 0x96, 0xa6, 0xac, 0x0d, 0xc1, 0x10, 0xd3, 0xeb, 0x5e, 0xe0, 0xf9,
-- 0x44, 0x1c, 0x82, 0xad, 0x75, 0xfe, 0x4d, 0x29, 0x57, 0x6e, 0xff, 0xfd,
-- 0xe7, 0xab, 0xb9, 0x5d, 0xc3, 0xf2, 0x7e, 0x93, 0x91, 0x20, 0x38, 0x45,
-- 0x86, 0x11, 0xdb, 0xd1, 0x5e, 0x4a, 0x6d, 0xcd, 0x18, 0x22, 0xbb, 0xe1,
-- 0x0b, 0xa8, 0x7c, 0xdc, 0x98, 0xe0, 0x95, 0x85, 0x51, 0xd4, 0x1e, 0x49,
-- 0xa5, 0xcc, 0x38, 0xf0, 0x31, 0xc9, 0x27, 0x51, 0x22, 0xb3, 0xc6, 0x52,
-- 0xb2, 0xf7, 0x87, 0xf9, 0x95, 0x1b, 0x04, 0x2b, 0xdf, 0xa3, 0xcc, 0x89,
-- 0xfc, 0xd2, 0xba, 0x09, 0x87, 0x8c, 0xa2, 0x99, 0x93, 0x6a, 0xbe, 0x8c,
-- 0xe4, 0x85, 0xf6, 0xfb, 0x43, 0xe6, 0xb2, 0x79, 0x15, 0xa6, 0xcd, 0xc0,
-- 0xa8, 0xc3, 0x4f, 0x14, 0xce, 0xe4, 0x87, 0xfa, 0x75, 0x38, 0x53, 0x91,
-- 0x11, 0xf3, 0x52, 0xe1, 0xbb, 0x30, 0xc5, 0x8b, 0x83, 0xd3, 0x0f, 0xdf,
-- 0x1e, 0x1e, 0x9e, 0x1e, 0xbd, 0x3e, 0x3e, 0xd4, 0x7b, 0xc6, 0x7d, 0xf4,
-- 0xee, 0xe2, 0xbb, 0x63, 0x0f, 0xe1, 0xa5, 0x9e, 0x94, 0xb6, 0xba, 0xcf,
-- 0x51, 0x39, 0x68, 0xee, 0x38, 0x9f, 0x2f, 0x3f, 0x72, 0x49, 0xa9, 0x31,
-- 0x13, 0xf3, 0xfe, 0xd1, 0x0f, 0xfd, 0xe4, 0x9b, 0xd3, 0xc1, 0xfb, 0x1f,
-- 0x22, 0xa4, 0x84, 0x46, 0x20, 0x6c, 0x5b, 0xb0, 0x74, 0x61, 0xb1, 0x28,
-- 0xbb, 0xe0, 0xe7, 0x6e, 0xfa, 0x6f, 0x47, 0x25, 0xc2, 0x7f, 0xb4, 0x29,
-- 0x30, 0x8e, 0x64, 0x98, 0x07, 0x18, 0xaf, 0x81, 0x14, 0xaf, 0x57, 0x2f,
-- 0xc8, 0xe1, 0xf9, 0xb6, 0x56, 0x6e, 0x6d, 0x11, 0xe0, 0x7d, 0xf2, 0x92,
-- 0x7e, 0x74, 0x61, 0xd7, 0x6c, 0x9d, 0x9f, 0x7f, 0xc3, 0x05, 0xdf, 0x3d,
-- 0x50, 0xa2, 0xb3, 0xb5, 0x0c, 0x2d, 0x06, 0x4e, 0x3d, 0xca, 0x81, 0xd5,
-- 0xa6, 0x64, 0x78, 0xbd, 0xc8, 0xd6, 0xde, 0x80, 0x5a, 0xcc, 0x9d, 0x02,
-- 0x94, 0x75, 0x4b, 0x96, 0xff, 0xc0, 0x4c, 0x3e, 0xea, 0xf4, 0x51, 0x8c,
-- 0xb5, 0x68, 0x8a, 0xfc, 0xe8, 0xd0, 0xc9, 0xb7, 0x6a, 0x93, 0xe7, 0x46,
-- 0x30, 0x3f, 0x59, 0xb5, 0xae, 0x8a, 0xa7, 0x8a, 0xbb, 0xd3, 0xc0, 0xb6,
-- 0xa5, 0xd1, 0x0f, 0x19, 0x70, 0xad, 0x2f, 0xd0, 0x6b, 0x21, 0xec, 0x9a,
-- 0xc3, 0x19, 0x1c, 0x2a, 0xdc, 0xda, 0x2a, 0xbd, 0xaf, 0xff, 0x4f, 0x84,
-- 0x5b, 0xbb, 0x29, 0x47, 0xc9, 0xcb, 0x29, 0xbd, 0x38, 0xed, 0x4e, 0x72,
-- 0x94, 0x52, 0x58, 0xbe, 0xa4, 0x57, 0x0b, 0x58, 0x43, 0x21, 0xbc, 0x44,
-- 0xf4, 0x43, 0x33, 0xce, 0x79, 0x1d, 0x69, 0x7c, 0x35, 0x8c, 0x4d, 0xfc,
-- 0x46, 0x94, 0x10, 0xb6, 0x8e, 0x38, 0xcc, 0xf5, 0x7e, 0xb2, 0xce, 0xf0,
-- 0x21, 0xfc, 0x2f, 0x18, 0xaa, 0x16, 0x42, 0x5b, 0xef, 0xc7, 0x5a, 0xed,
-- 0xba, 0xae, 0xfa, 0x3a, 0x6d, 0x9c, 0xb4, 0xc6, 0xb4, 0x29, 0x48, 0x69,
-- 0x32, 0x0e, 0x8f, 0x40, 0x0c, 0x31, 0x5e, 0x94, 0xe8, 0x4b, 0x8d, 0xef,
-- 0xea, 0xaf, 0x6a, 0xae, 0x99, 0x8d, 0x17, 0x2d, 0x58, 0x27, 0x87, 0xf6,
-- 0x88, 0xff, 0xa9, 0x43, 0x0e, 0x0e, 0x80, 0xfe, 0xad, 0x6c, 0xdb, 0x53,
-- 0x96, 0xab, 0xbe, 0x3e, 0x3f, 0xdf, 0x3f, 0x3d, 0x6a, 0x2f, 0x35, 0x7d,
-- 0x3a, 0x78, 0x67, 0x65, 0xb3, 0x36, 0x8d, 0x52, 0xbc, 0x7f, 0x90, 0x67,
-- 0x80, 0xe4, 0x32, 0xbe, 0xfe, 0x39, 0x26, 0x1a, 0x50, 0x97, 0xdf, 0xb1,
-- 0xe2, 0xc5, 0xd6, 0xe2, 0x8e, 0x72, 0x4c, 0x0a, 0x6c, 0xa8, 0xa1, 0x2e,
-- 0xa5, 0x26, 0xf7, 0x19, 0x78, 0x7c, 0x5e, 0xff, 0x8e, 0x34, 0x35, 0x05,
-- 0xd8, 0x7a, 0x5e, 0xd5, 0x03, 0x76, 0x14, 0x75, 0x67, 0x00, 0x40, 0x4d,
-- 0xd1, 0xb0, 0x7a, 0xf3, 0x54, 0x05, 0x68, 0xa7, 0xc2, 0x34, 0xa4, 0xa4,
-- 0x0c, 0xe2, 0x8f, 0x58, 0xf4, 0x61, 0x4e, 0x34, 0xe8, 0x42, 0xb3, 0xbf,
-- 0xcd, 0xb3, 0x3b, 0xbf, 0x56, 0x21, 0x32, 0x8c, 0x79, 0x4f, 0x91, 0x37,
-- 0xee, 0x72, 0x53, 0x05, 0x7c, 0xb5, 0xea, 0x40, 0xda, 0x9b, 0xa5, 0xe3,
-- 0x6b, 0x12, 0xd8, 0x06, 0x88, 0x62, 0x4c, 0x42, 0xf8, 0x10, 0xc4, 0x4c,
-- 0xb6, 0x07, 0xca, 0xc9, 0x66, 0x1a, 0x1b, 0xd5, 0x59, 0x62, 0xcd, 0x3f,
-- 0xc8, 0x43, 0x74, 0xa1, 0x58, 0x42, 0xa5, 0x2e, 0x87, 0x14, 0x6a, 0x61,
-- 0x51, 0x3a, 0x5c, 0x40, 0x1f, 0xe7, 0xd7, 0xe1, 0xaa, 0x4a, 0x14, 0xf6,
-- 0xaf, 0x61, 0x43, 0x52, 0x34, 0x98, 0x34, 0x79, 0x77, 0x7c, 0xee, 0x73,
-- 0x28, 0x6a, 0xc5, 0xd0, 0x17, 0x9c, 0xd9, 0x55, 0xae, 0x86, 0x30, 0x9c,
-- 0xe8, 0xf8, 0xa8, 0xa3, 0x5a, 0x25, 0x2b, 0xe1, 0x7b, 0xa4, 0xc8, 0xce,
-- 0xc2, 0x3a, 0xda, 0x95, 0xd6, 0x66, 0x40, 0x8e, 0x93, 0xf8, 0x8e, 0xcd,
-- 0xe6, 0xc6, 0xba, 0x8a, 0x47, 0xf0, 0x89, 0x96, 0x98, 0x87, 0xf8, 0x17,
-- 0xb1, 0x5c, 0x6a, 0xa0, 0x86, 0x3a, 0x7a, 0x19, 0xe8, 0x66, 0x10, 0xa4,
-- 0xb5, 0x0a, 0xa7, 0x00, 0xec, 0x4a, 0x3e, 0x66, 0x75, 0xfa, 0x26, 0x8e,
-- 0x9a, 0xd8, 0x38, 0x3d, 0x39, 0x7d, 0xe2, 0xb2, 0x7f, 0x35, 0x0b, 0xb9,
-- 0xe1, 0x58, 0x1c, 0x27, 0x2c, 0x17, 0x29, 0xce, 0x11, 0x3f, 0xdd, 0x20,
-- 0xae, 0xae, 0x02, 0x57, 0x40, 0xe5, 0x3f, 0x8a, 0xd6, 0x51, 0x5d, 0x03,
-- 0xcd, 0x3a, 0x16, 0x9c, 0x0f, 0x19, 0xa4, 0xeb, 0x75, 0x20, 0x49, 0x98,
-- 0x57, 0xdf, 0x91, 0xa2, 0x86, 0x76, 0x83, 0x0e, 0x85, 0x0c, 0xfd, 0x49,
-- 0x0d, 0x46, 0x4d, 0xa7, 0x2d, 0x3a, 0xd6, 0x5c, 0x79, 0x3a, 0x9f, 0x48,
-- 0x56, 0x72, 0xd5, 0x4c, 0x4b, 0x96, 0x18, 0x7b, 0x14, 0x88, 0x60, 0xe7,
-- 0x2d, 0x00, 0xbc, 0x56, 0xec, 0xa4, 0x58, 0x08, 0x10, 0x04, 0xe9, 0x82,
-- 0x43, 0x7f, 0x10, 0x37, 0x95, 0x04, 0x68, 0xfa, 0xb4, 0xf7, 0xfe, 0xa3,
-- 0xd0, 0xe7, 0x41, 0xe1, 0x2a, 0x49, 0xe3, 0x21, 0x2d, 0x97, 0x44, 0x37,
-- 0xb7, 0x76, 0xba, 0x56, 0xea, 0xfb, 0xd1, 0x69, 0xb3, 0xe3, 0x87, 0x7e,
-- 0xe9, 0xaa, 0x00, 0xcd, 0x7b, 0xb5, 0x4e, 0xac, 0x67, 0x9e, 0xd3, 0x58,
-- 0x12, 0xb9, 0x00, 0x2e, 0x39, 0x42, 0x4d, 0xfd, 0x42, 0x88, 0x4c, 0xa0,
-- 0xe9, 0x71, 0xf2, 0x3b, 0x47, 0xe8, 0xf0, 0x92, 0xf0, 0x9a, 0x74, 0x1d,
-- 0xe5, 0x9b, 0x4c, 0xad, 0x69, 0x12, 0x8b, 0xd9, 0xcc, 0xc1, 0xd9, 0x69,
-- 0x24, 0x9a, 0x37, 0xea, 0x43, 0x74, 0xc6, 0x00, 0xa0, 0x82, 0xc0, 0xa6,
-- 0x07, 0xe5, 0x76, 0xe5, 0xe4, 0xad, 0x1a, 0x87, 0x06, 0x6a, 0x6b, 0x6f,
-- 0x48, 0xdd, 0xbb, 0xe2, 0x98, 0xf1, 0x36, 0x51, 0x48, 0x6c, 0x3d, 0x80,
-- 0x2d, 0x0d, 0x45, 0xa8, 0x4e, 0x5c, 0x69, 0x8a, 0x0d, 0x16, 0xbb, 0xc7,
-- 0x61, 0xc0, 0x57, 0xbb, 0x40, 0x44, 0x07, 0x06, 0x03, 0x07, 0x01, 0x3c,
-- 0xf9, 0xe1, 0x87, 0xe0, 0xd8, 0xb1, 0xaf, 0x6e, 0xb3, 0xdf, 0x60, 0xe8,
-- 0xad, 0x62, 0xc0, 0x74, 0x15, 0x77, 0xf1, 0x04, 0xa3, 0x01, 0x25, 0x2e,
-- 0xf6, 0xc7, 0x42, 0x5d, 0x1e, 0xba, 0x08, 0xda, 0xba, 0xb8, 0xca, 0xb0,
-- 0x15, 0x42, 0x39, 0x61, 0x3c, 0x48, 0x7c, 0x4b, 0xfb, 0xc0, 0x8a, 0xbe,
-- 0x8b, 0x03, 0x14, 0xff, 0x33, 0xe2, 0x54, 0xc2, 0xa5, 0xaa, 0xdc, 0x75,
-- 0x42, 0xd2, 0xc1, 0xdd, 0x7c, 0xd8, 0x55, 0xd1, 0x23, 0x46, 0xf5, 0x92,
-- 0x68, 0x68, 0xcc, 0x48, 0x0a, 0x9b, 0xa0, 0x14, 0x09, 0xdb, 0xe0, 0x82,
-- 0x3a, 0xaa, 0x0e, 0x36, 0x38, 0x8a, 0x24, 0x10, 0x9b, 0x3f, 0x42, 0x06,
-- 0x04, 0x04, 0x97, 0xd3, 0x51, 0x84, 0x07, 0x25, 0x35, 0xfc, 0x66, 0xe6,
-- 0x1a, 0x0c, 0x77, 0x8b, 0x1f, 0xef, 0xb0, 0x46, 0xdc, 0xa1, 0xec, 0x46,
-- 0x60, 0xa3, 0x44, 0xf4, 0x80, 0xe6, 0x38, 0x08, 0xe9, 0xff, 0xd9, 0x17,
-- 0xd2, 0x74, 0x75, 0x34, 0x13, 0x25, 0xbd, 0x28, 0x7a, 0x8f, 0x7d, 0xfd,
-- 0x75, 0xb9, 0xc4, 0x0a, 0xf1, 0x86, 0x70, 0xb2, 0x38, 0x9b, 0xdc, 0x0d,
-- 0xd4, 0x86, 0x25, 0x4d, 0x8b, 0x94, 0x00, 0x6a, 0xbc, 0x04, 0xe9, 0xce,
-- 0x80, 0xdf, 0x11, 0x79, 0x82, 0x6d, 0x5e, 0x62, 0x2c, 0x83, 0xb1, 0xad,
-- 0xe9, 0x6b, 0x1c, 0x0c, 0x66, 0xe9, 0xc7, 0x01, 0x1e, 0xab, 0x22, 0xf8,
-- 0xe2, 0xc8, 0xba, 0x28, 0x2d, 0x54, 0xe1, 0x82, 0x99, 0x1e, 0xe9, 0x82,
-- 0xc0, 0x35, 0x8c, 0x8f, 0x29, 0x88, 0xef, 0x86, 0xaf, 0x0f, 0x2f, 0xda,
-- 0x47, 0x0b, 0xb9, 0x30, 0xaa, 0x94, 0x23, 0xfc, 0x9a, 0x0b, 0x63, 0xbc,
-- 0xbf, 0xd8, 0xf4, 0xa5, 0x2b, 0x84, 0x4a, 0x03, 0xeb, 0xa0, 0xb5, 0xde,
-- 0x01, 0xe1, 0x27, 0x01, 0xcf, 0xca, 0x60, 0x81, 0xd1, 0xe7, 0x0e, 0x04,
-- 0x17, 0xdc, 0x79, 0xb2, 0xbd, 0xd3, 0xa7, 0x1f, 0xbb, 0xb0, 0x6f, 0x3d,
-- 0xd9, 0x7e, 0xe2, 0x6c, 0xf6, 0xf6, 0x54, 0x64, 0xb6, 0x47, 0xfa, 0x55,
-- 0x5a, 0x35, 0xeb, 0x72, 0x3c, 0xf9, 0xf8, 0x11, 0x5f, 0x35, 0xe3, 0xcf,
-- 0x06, 0x2e, 0xf4, 0x73, 0x95, 0x8f, 0xc2, 0x06, 0xee, 0x57, 0x1c, 0x86,
-- 0xaa, 0xe5, 0x5c, 0x02, 0x6c, 0xd8, 0xcc, 0x80, 0x98, 0xea, 0x50, 0x3a,
-- 0xb7, 0x82, 0x41, 0x9d, 0x40, 0xd9, 0xfb, 0x52, 0xbe, 0x26, 0x3c, 0xe4,
-- 0x4c, 0xa8, 0x73, 0x0e, 0xe2, 0x9f, 0x48, 0x34, 0xbf, 0xe6, 0xa9, 0x6a,
-- 0x5a, 0xa3, 0x7a, 0xe2, 0xf0, 0x7b, 0x07, 0x20, 0x3d, 0x22, 0x3d, 0x00,
-- 0x48, 0x66, 0x85, 0x8a, 0x06, 0x32, 0xd6, 0x83, 0x44, 0x5d, 0xb7, 0x58,
-- 0x11, 0x73, 0x35, 0x6a, 0xe8, 0xbb, 0x68, 0x50, 0xdd, 0x68, 0x1a, 0xe6,
-- 0xd0, 0x23, 0xd1, 0x7a, 0x2a, 0xf0, 0x2f, 0x72, 0x47, 0x89, 0x44, 0x2a,
-- 0xc3, 0x92, 0x38, 0x50, 0x1f, 0x18, 0xc4, 0xef, 0xfd, 0xe1, 0xbf, 0x28,
-- 0x9c, 0x06, 0xf5, 0xb0, 0x93, 0x2e, 0xe0, 0x9a, 0x86, 0xe0, 0xfa, 0x60,
-- 0x2a, 0x20, 0xce, 0xd5, 0x00, 0xaa, 0xeb, 0x4b, 0xba, 0x9b, 0xb3, 0xc9,
-- 0x4a, 0x47, 0xb2, 0x64, 0xf7, 0xa7, 0x1f, 0xf3, 0xd9, 0x72, 0xe6, 0x73,
-- 0xc9, 0x92, 0x04, 0xef, 0xba, 0xba, 0x89, 0x01, 0x2c, 0x6c, 0x27, 0xa8,
-- 0xa5, 0xc6, 0x8d, 0xe9, 0x0c, 0x55, 0x5e, 0xe0, 0xb7, 0x11, 0x36, 0x93,
-- 0xca, 0x39, 0x67, 0x8e, 0x99, 0x2f, 0x24, 0x44, 0x8b, 0xe3, 0xa3, 0x27,
-- 0x22, 0x19, 0xf2, 0xaa, 0xb6, 0x79, 0x88, 0x0d, 0x03, 0xe5, 0x28, 0x25,
-- 0xe6, 0x44, 0x02, 0xcf, 0x89, 0x33, 0x72, 0xb0, 0x01, 0x35, 0x71, 0x97,
-- 0x4f, 0xea, 0xeb, 0x4e, 0x88, 0x64, 0x5d, 0x47, 0xcc, 0x3b, 0x11, 0x90,
-- 0x0b, 0x8e, 0x05, 0xc6, 0x52, 0x21, 0x2e, 0x70, 0x4b, 0x4c, 0x0c, 0x2e,
-- 0x9f, 0x9b, 0xe4, 0x97, 0xe5, 0x25, 0x43, 0xea, 0x45, 0xf3, 0xb2, 0x84,
-- 0x89, 0xa1, 0x91, 0x2d, 0xb2, 0xb3, 0x6e, 0x04, 0xd5, 0xea, 0x5b, 0xd5,
-- 0xba, 0x04, 0x79, 0x08, 0xf7, 0x8e, 0xc4, 0xf0, 0xb3, 0x15, 0x3a, 0xb9,
-- 0xc9, 0xa7, 0x91, 0xe6, 0x8d, 0xde, 0x89, 0x94, 0xd7, 0x67, 0x92, 0xeb,
-- 0xf4, 0x76, 0x5d, 0xc3, 0x1c, 0x18, 0x1c, 0x2b, 0xd3, 0xa8, 0xc5, 0xbe,
-- 0x82, 0xe4, 0xad, 0x5f, 0x49, 0x37, 0x5f, 0xfb, 0x87, 0x5a, 0xcd, 0xf9,
-- 0x40, 0x47, 0x33, 0xc5, 0x56, 0x7b, 0xc9, 0xee, 0xf6, 0xf6, 0xb7, 0xc4,
-- 0x2f, 0x66, 0x58, 0xe6, 0x9d, 0xaf, 0x3b, 0x57, 0x48, 0x16, 0x08, 0x5b,
-- 0xac, 0xf8, 0x14, 0xe9, 0x2d, 0x0c, 0xa6, 0xba, 0x68, 0x52, 0x49, 0x92,
-- 0x4b, 0xb6, 0x2f, 0x03, 0x1b, 0x97, 0x2c, 0xfe, 0x8a, 0xad, 0x82, 0x39,
-- 0xad, 0x9d, 0x6c, 0x3f, 0x43, 0x6c, 0x3a, 0xef, 0xde, 0x35, 0xfd, 0xc6,
-- 0x72, 0x90, 0x6d, 0x2c, 0xfa, 0xe9, 0x48, 0x3e, 0xa6, 0x4b, 0x94, 0x61,
-- 0xcc, 0x96, 0x25, 0xd7, 0xcc, 0x43, 0x20, 0x21, 0x30, 0x80, 0x60, 0xe3,
-- 0x33, 0xef, 0xc4, 0xbc, 0x10, 0x50, 0x09, 0x08, 0x55, 0x75, 0x63, 0x3a,
-- 0x1d, 0x56, 0x27, 0xa6, 0x42, 0xdc, 0x57, 0x16, 0x69, 0x3b, 0xf8, 0x91,
-- 0x2f, 0x77, 0x0c, 0x40, 0xce, 0x89, 0xf3, 0x9e, 0x89, 0xea, 0x1d, 0x86,
-- 0x90, 0xb5, 0x27, 0xcb, 0x72, 0x88, 0xd6, 0xb2, 0x60, 0x0d, 0x0a, 0x26,
-- 0x39, 0xcc, 0x91, 0x41, 0x5b, 0x17, 0x8a, 0x6c, 0xc8, 0x03, 0x91, 0x96,
-- 0x61, 0x3e, 0x9c, 0xf2, 0x03, 0x53, 0xd6, 0x0e, 0x8b, 0x28, 0x6e, 0x7e,
-- 0xba, 0x80, 0x5d, 0xd2, 0x71, 0xd6, 0x60, 0x50, 0x9c, 0xea, 0x39, 0x06,
-- 0x6c, 0x34, 0xa7, 0x10, 0xfc, 0x8e, 0xa6, 0x14, 0x00, 0x9c, 0x09, 0x9e,
-- 0xc2, 0x4b, 0x22, 0xe0, 0x2f, 0x7e, 0xe2, 0x2a, 0x72, 0xbf, 0x74, 0xd4,
-- 0xcb, 0x4b, 0x35, 0x65, 0x86, 0x8f, 0x92, 0x65, 0xab, 0x94, 0xbe, 0x9c,
-- 0x03, 0xda, 0x91, 0xbc, 0x4e, 0xab, 0x5a, 0xe7, 0xab, 0x60, 0x74, 0x01,
-- 0xd7, 0x7b, 0x73, 0xf0, 0x46, 0xc5, 0xe8, 0x21, 0x0d, 0xbf, 0xa9, 0xc4,
-- 0x02, 0x5b, 0x43, 0x7c, 0xe5, 0xcf, 0x85, 0xc5, 0xc0, 0x45, 0xde, 0xa6,
-- 0x9a, 0x71, 0xca, 0x7c, 0xde, 0xc5, 0xea, 0xa0, 0x09, 0x9b, 0xef, 0x68,
-- 0x59, 0xdd, 0x33, 0x38, 0x8c, 0x18, 0xc1, 0xab, 0xc2, 0x21, 0xe4, 0x61,
-- 0x01, 0x31, 0xfc, 0x38, 0xba, 0x89, 0xf1, 0x4b, 0x24, 0x98, 0xb5, 0x2e,
-- 0x48, 0xdd, 0x4b, 0xcb, 0x92, 0xe4, 0x0e, 0xdd, 0x6a, 0xcd, 0x56, 0xa2,
-- 0xb1, 0xb3, 0x24, 0x0f, 0xeb, 0x86, 0xb3, 0x6b, 0x53, 0xdb, 0xcb, 0x45,
-- 0x47, 0x38, 0x12, 0xa7, 0x2f, 0x46, 0x98, 0x51, 0x8d, 0xdc, 0x60, 0x93,
-- 0xa5, 0x4d, 0x76, 0x7a, 0x48, 0x9c, 0x3f, 0x66, 0xbe, 0xd9, 0x94, 0xfe,
-- 0x35, 0x3b, 0x4a, 0x6e, 0x43, 0x85, 0x87, 0x36, 0xd3, 0xf9, 0x8a, 0x74,
-- 0xd4, 0xe4, 0xcf, 0x1e, 0x06, 0x4d, 0xaa, 0x67, 0x40, 0x44, 0x0c, 0xb4,
-- 0x82, 0x8a, 0xdd, 0xf1, 0xac, 0xf6, 0x78, 0xe9, 0xb2, 0xe8, 0xe4, 0xff,
-- 0xfc, 0x4c, 0x21, 0x1a, 0x92, 0xa8, 0xc6, 0x75, 0x59, 0x4c, 0x96, 0x63,
-- 0xd8, 0x0b, 0x38, 0xf0, 0x8a, 0x4b, 0x5e, 0x8f, 0x04, 0x95, 0xc9, 0x72,
-- 0x84, 0xb9, 0x69, 0x27, 0xdc, 0xc5, 0xd9, 0x33, 0xae, 0x64, 0x0d, 0x1e,
-- 0xc4, 0x1f, 0x62, 0xe1, 0xe4, 0x9b, 0x83, 0xfd, 0x5a, 0x0e, 0xc0, 0xb3,
-- 0x2d, 0x5d, 0xcf, 0x2f, 0x57, 0xa0, 0x10, 0x8b, 0x0f, 0x8d, 0xa5, 0xdb,
-- 0x8f, 0xb5, 0x73, 0xbd, 0xa7, 0x52, 0xb9, 0x19, 0x62, 0xd7, 0x57, 0x1c,
-- 0xed, 0xd9, 0x6a, 0x2f, 0xc4, 0xd6, 0x45, 0x99, 0x78, 0x96, 0x36, 0x1f,
-- 0x74, 0x83, 0xbc, 0xd5, 0xcb, 0x54, 0x78, 0xd6, 0xdc, 0xec, 0xd9, 0xb2,
-- 0xaa, 0xc2, 0x8d, 0x0c, 0x33, 0x80, 0xa6, 0x54, 0x4c, 0xb3, 0x24, 0x10,
-- 0x23, 0x3a, 0xfc, 0xeb, 0xc4, 0x73, 0x86, 0x01, 0x6c, 0x52, 0x10, 0x58,
-- 0xcf, 0x80, 0x30, 0x3c, 0x52, 0x03, 0xc8, 0x1f, 0x71, 0x26, 0x40, 0xf2,
-- 0xd7, 0x62, 0xa4, 0xda, 0x0a, 0x4b, 0xdc, 0x5d, 0x48, 0x55, 0x97, 0x08,
-- 0x37, 0x26, 0x1e, 0x4b, 0xfc, 0x5d, 0xa2, 0x12, 0x78, 0x40, 0xf3, 0xac,
-- 0x66, 0x6e, 0x83, 0x60, 0x64, 0x98, 0x2d, 0x12, 0xad, 0x4f, 0x8c, 0xf8,
-- 0x52, 0xe6, 0x01, 0x6c, 0x35, 0x6a, 0x35, 0xf7, 0xd9, 0xf0, 0xc9, 0xee,
-- 0x70, 0xbb, 0xa9, 0xb2, 0xa5, 0x63, 0x56, 0x1e, 0xaa, 0xc4, 0xd2, 0x2c,
-- 0x90, 0x3d, 0xe4, 0xcb, 0xa2, 0x5b, 0x5c, 0x17, 0xaf, 0xcf, 0x20, 0xf6,
-- 0xf6, 0xa9, 0xfc, 0x9c, 0x31, 0x70, 0x58, 0x85, 0x05, 0xa4, 0xf6, 0x96,
-- 0x65, 0x3a, 0xbe, 0x37, 0x50, 0x52, 0x1f, 0x68, 0xc4, 0x4d, 0x14, 0x80,
-- 0x11, 0x90, 0xa7, 0x23, 0xac, 0xed, 0xb9, 0x1b, 0x04, 0x73, 0xed, 0xbc,
-- 0x12, 0x4c, 0x93, 0x56, 0xfd, 0x13, 0x3d, 0xbe, 0x03, 0x6b, 0x6d, 0x85,
-- 0x12, 0xf1, 0x0f, 0x64, 0xb9, 0x6c, 0x2e, 0x18, 0x30, 0x9d, 0x25, 0x2f,
-- 0x57, 0xd4, 0x27, 0xdd, 0x38, 0x7f, 0x0b, 0x83, 0xa3, 0x93, 0xd3, 0x52,
-- 0x83, 0x88, 0x0a, 0xab, 0xc1, 0xe6, 0x55, 0x33, 0xbc, 0xce, 0x07, 0x89,
-- 0x74, 0xf0, 0xdb, 0xb6, 0x09, 0x5c, 0x43, 0xcf, 0x37, 0xc4, 0x5a, 0x51,
-- 0xdf, 0x6f, 0xba, 0xc8, 0x7c, 0x81, 0x6e, 0x86, 0x00, 0xa0, 0xc6, 0x8a,
-- 0xce, 0xa2, 0x60, 0x95, 0x66, 0x2b, 0x97, 0x19, 0x23, 0x74, 0x08, 0x0f,
-- 0x51, 0x6f, 0xaa, 0x15, 0xca, 0x6c, 0xcf, 0x2a, 0x34, 0x65, 0x3c, 0x6b,
-- 0xd6, 0x70, 0xc5, 0x9a, 0x80, 0x6c, 0x7f, 0xc5, 0x9a, 0x34, 0x97, 0xc4,
-- 0x33, 0x2e, 0x91, 0x08, 0x60, 0x41, 0x53, 0xa3, 0x7d, 0x9c, 0x97, 0x5c,
-- 0x19, 0x16, 0xee, 0xc3, 0xc3, 0xdc, 0x6e, 0x0f, 0xf3, 0x23, 0x2a, 0xe5,
-- 0xc0, 0x5e, 0xf5, 0x12, 0xd2, 0xd7, 0x17, 0x0f, 0x44, 0x1c, 0x99, 0x64,
-- 0x8d, 0xc7, 0x37, 0x4c, 0x00, 0xdd, 0x0c, 0xc0, 0x5c, 0xa5, 0x98, 0xbc,
-- 0xc2, 0xb1, 0x40, 0x9b, 0xef, 0xba, 0x2b, 0xf1, 0xa8, 0xb7, 0x3c, 0xe4,
-- 0xcd, 0x9c, 0x17, 0xd0, 0x25, 0x8e, 0x59, 0xbf, 0x09, 0xc8, 0xb0, 0xa2,
-- 0xc2, 0x3b, 0xc2, 0xd3, 0x21, 0xbd, 0x84, 0xba, 0x20, 0x80, 0xd3, 0x61,
-- 0x1e, 0xc9, 0x3e, 0x22, 0xf8, 0x87, 0xb4, 0xa6, 0xe7, 0x4f, 0x62, 0x73,
-- 0xdc, 0xc9, 0xc5, 0xe1, 0x1e, 0xc4, 0x48, 0x9f, 0x75, 0x61, 0x3a, 0xb3,
-- 0x04, 0xeb, 0x70, 0xa2, 0x24, 0x43, 0x08, 0x30, 0xc0, 0x60, 0x38, 0x3b,
-- 0x51, 0xe2, 0x3a, 0x70, 0x25, 0x90, 0x12, 0x28, 0xe6, 0xd8, 0x7a, 0x25,
-- 0xc6, 0x8f, 0x95, 0x0a, 0xf5, 0xda, 0x5b, 0x57, 0x31, 0xb6, 0x4b, 0xc9,
-- 0xd4, 0x43, 0xf2, 0x9b, 0x90, 0x67, 0xb4, 0x50, 0xaa, 0x66, 0x41, 0xcc,
-- 0x72, 0x56, 0x50, 0x2e, 0xe0, 0x98, 0x95, 0x91, 0x5f, 0x16, 0xc0, 0xc6,
-- 0x6c, 0x3f, 0x46, 0xee, 0xcb, 0x85, 0x61, 0xbc, 0x5c, 0xb6, 0x72, 0xd3,
-- 0x40, 0xbc, 0xe5, 0x78, 0x51, 0x3f, 0x46, 0xbc, 0xe7, 0x2e, 0xfe, 0xab,
-- 0x49, 0xba, 0x7d, 0x8f, 0x56, 0x2a, 0x17, 0xa9, 0x04, 0xe9, 0xc0, 0x5a,
-- 0xdd, 0x55, 0xe5, 0x4f, 0x2c, 0xc7, 0x6a, 0xdc, 0x15, 0xcb, 0x31, 0xa8,
-- 0xdd, 0x46, 0x67, 0x11, 0x79, 0xe3, 0x7c, 0x91, 0x07, 0x58, 0x86, 0x2e,
-- 0xfc, 0x2c, 0xf2, 0x7c, 0x4e, 0xd9, 0x42, 0x8b, 0x26, 0xdc, 0x61, 0x2a,
-- 0x7c, 0x5e, 0xa8, 0xb4, 0x5d, 0x0c, 0x1f, 0x38, 0x1a, 0xe1, 0xc0, 0xc2,
-- 0x71, 0xcd, 0x13, 0xd7, 0xa2, 0x14, 0x07, 0x31, 0x06, 0x94, 0x6c, 0x7c,
-- 0x77, 0xf6, 0xe6, 0x47, 0x07, 0x5f, 0xb4, 0xd9, 0x59, 0x61, 0xc3, 0xcf,
-- 0x20, 0x2c, 0xa0, 0xec, 0x2e, 0x00, 0xbd, 0x11, 0x1a, 0x6b, 0xe7, 0xff,
-- 0x88, 0x89, 0x6d, 0x52, 0x20, 0xda, 0x60, 0x83, 0x6b, 0x17, 0x72, 0x21,
-- 0x55, 0x95, 0xda, 0x9e, 0x0c, 0x9f, 0xc1, 0x2c, 0xfe, 0xe6, 0xe0, 0xd9,
-- 0x93, 0xdd, 0x9d, 0xcd, 0x56, 0xe1, 0xf7, 0xa7, 0x9f, 0x32, 0xcd, 0xe6,
-- 0x96, 0x65, 0x1f, 0x17, 0x4c, 0x30, 0x1b, 0x87, 0x3f, 0x9c, 0xbe, 0x0b,
-- 0x26, 0xe8, 0xf6, 0x24, 0x4e, 0x66, 0x9e, 0xb7, 0x00, 0x14, 0xfd, 0x1c,
-- 0xbd, 0xe1, 0x25, 0xa2, 0x0a, 0x97, 0x4c, 0xdb, 0xce, 0xef, 0x7d, 0x53,
-- 0xe6, 0x7c, 0x08, 0x7a, 0xbc, 0x1e, 0xbd, 0x63, 0x12, 0x3f, 0x48, 0xae,
-- 0x3c, 0x61, 0xf0, 0x96, 0xac, 0xd7, 0xae, 0x9d, 0xfc, 0x34, 0xe6, 0x6f,
-- 0x6a, 0x4c, 0x83, 0x36, 0xd0, 0xa1, 0x07, 0x18, 0x4f, 0xf3, 0x19, 0xeb,
-- 0x4e, 0x90, 0x63, 0xf9, 0xd5, 0x19, 0x92, 0x2a, 0x15, 0x44, 0x5d, 0x29,
-- 0x4d, 0x92, 0x58, 0x23, 0x30, 0x07, 0x67, 0x42, 0x76, 0x56, 0xd1, 0xd5,
-- 0xd0, 0x78, 0x26, 0xf0, 0xf8, 0x12, 0x10, 0x71, 0xcd, 0x20, 0x67, 0x6e,
-- 0x73, 0x03, 0xaa, 0x38, 0x51, 0x20, 0x49, 0x47, 0xd5, 0xb2, 0x9c, 0x2c,
-- 0x67, 0x34, 0xff, 0xaf, 0xee, 0x2d, 0xe4, 0xa0, 0x6f, 0x25, 0xc0, 0x67,
-- 0x52, 0xe1, 0x29, 0xba, 0x21, 0x24, 0x80, 0xf3, 0xd9, 0x76, 0xa3, 0xbd,
-- 0x21, 0x56, 0xa1, 0x65, 0xbf, 0x1a, 0xec, 0xb8, 0x9c, 0x75, 0x56, 0xde,
-- 0x60, 0x7f, 0x69, 0xfb, 0xc1, 0xba, 0xaa, 0x6e, 0xff, 0x23, 0xa5, 0x8a,
-- 0xac, 0x4e, 0x59, 0x70, 0x7b, 0x24, 0x3a, 0xa8, 0x0e, 0x61, 0xe7, 0xc4,
-- 0x63, 0x28, 0xa5, 0x1f, 0x51, 0xaf, 0x86, 0xef, 0x7f, 0x65, 0x90, 0x0c,
-- 0xf3, 0x11, 0xd3, 0xd6, 0x5b, 0xed, 0xc5, 0xec, 0x54, 0x1b, 0x60, 0x91,
-- 0x2e, 0x4f, 0xf1, 0x89, 0x14, 0xa5, 0x48, 0x36, 0x18, 0x1f, 0xf4, 0xd9,
-- 0xe7, 0xcf, 0x9e, 0x6e, 0x36, 0x83, 0x08, 0x36, 0x3b, 0x1c, 0x01, 0x58,
-- 0xb5, 0x65, 0xe5, 0xf0, 0x08, 0x66, 0x39, 0xca, 0xa7, 0x80, 0xce, 0xd5,
-- 0xa3, 0x20, 0x85, 0x28, 0xa0, 0x4a, 0xc1, 0x20, 0xa0, 0x8e, 0xd1, 0xc8,
-- 0x1c, 0xc1, 0x7d, 0x69, 0xf5, 0x95, 0x64, 0xc3, 0x32, 0xcd, 0xdd, 0x8d,
-- 0xe1, 0x92, 0x51, 0x71, 0x5b, 0xc9, 0xf5, 0xe0, 0xc2, 0xad, 0x37, 0xd9,
-- 0x84, 0xd1, 0x65, 0x71, 0x83, 0xa8, 0x18, 0xd4, 0x35, 0x42, 0x05, 0x9f,
-- 0x22, 0xb8, 0x88, 0x04, 0x9a, 0xcc, 0xd2, 0x39, 0xe5, 0xae, 0x4b, 0xba,
-- 0xa0, 0xc7, 0x16, 0xd3, 0x4c, 0x82, 0xc5, 0xf9, 0xf6, 0x74, 0x0b, 0x29,
-- 0x51, 0x83, 0x80, 0x77, 0xe1, 0xfd, 0xb7, 0x16, 0x34, 0xe8, 0xc0, 0xd7,
-- 0x11, 0x8a, 0x8c, 0x25, 0xb3, 0x6c, 0x66, 0x50, 0x9f, 0x72, 0xab, 0x17,
-- 0xa5, 0x2f, 0xc7, 0x20, 0xea, 0xb8, 0x5c, 0xd1, 0x88, 0x60, 0x5a, 0x55,
-- 0x10, 0xc1, 0x57, 0xf3, 0xd4, 0x04, 0xe6, 0xc6, 0xc0, 0x56, 0xc0, 0xaf,
-- 0x3b, 0x62, 0x0b, 0x53, 0x0b, 0xd5, 0x24, 0x8e, 0x80, 0x36, 0xfb, 0xdd,
-- 0x11, 0x65, 0x5c, 0x94, 0x40, 0x3a, 0x6d, 0x2d, 0xc3, 0x8a, 0xc1, 0x4b,
-- 0x5d, 0x02, 0x64, 0x84, 0xae, 0xaa, 0x79, 0x9d, 0x6c, 0x60, 0xbc, 0x5b,
-- 0x5b, 0x9b, 0x8f, 0x8e, 0x59, 0x1f, 0x7c, 0x6c, 0x8c, 0xa7, 0x52, 0xbc,
-- 0x94, 0x17, 0xd7, 0xec, 0x12, 0x44, 0x77, 0x7e, 0x10, 0xdc, 0x29, 0x6f,
-- 0x98, 0x80, 0x41, 0x4a, 0x50, 0x93, 0x8b, 0x09, 0xbd, 0x8b, 0xd0, 0x3e,
-- 0xdc, 0x3a, 0xcb, 0xec, 0x9a, 0x13, 0x57, 0xc1, 0x55, 0x12, 0x55, 0x95,
-- 0x27, 0x58, 0xa8, 0x36, 0x5b, 0x1f, 0xa7, 0x51, 0x6d, 0x9d, 0x79, 0x0b,
-- 0x5f, 0x3e, 0x98, 0x9f, 0xd8, 0xca, 0xbd, 0x83, 0x4b, 0x8e, 0x85, 0xe0,
-- 0xb5, 0x98, 0x23, 0x2c, 0x66, 0xc5, 0xf6, 0x74, 0xab, 0xd8, 0x52, 0x8c,
-- 0xd4, 0x22, 0x0f, 0xf2, 0xe1, 0x71, 0x20, 0x19, 0xf9, 0xbc, 0x4b, 0x6a,
-- 0xf5, 0xfe, 0x74, 0x69, 0x93, 0x94, 0xb4, 0x1b, 0x3f, 0x6f, 0xc1, 0x5c,
-- 0xb2, 0x64, 0x15, 0x0f, 0x89, 0x80, 0x34, 0x88, 0xee, 0xac, 0x6a, 0x47,
-- 0xdd, 0x58, 0x33, 0xab, 0x24, 0x84, 0x4f, 0x1b, 0xcb, 0xd9, 0x97, 0x43,
-- 0x8a, 0x40, 0xdb, 0x2e, 0x21, 0x18, 0xc8, 0xd6, 0x0f, 0x8a, 0xfd, 0x9f,
-- 0xb1, 0x56, 0x4b, 0xc3, 0x8a, 0x8b, 0x6d, 0x4f, 0xf3, 0x91, 0x5b, 0x68,
-- 0x0d, 0x9b, 0x19, 0x06, 0x37, 0xe8, 0x9c, 0x8d, 0x04, 0xa4, 0x4b, 0x97,
-- 0xe3, 0xc8, 0x2e, 0x80, 0x84, 0x36, 0xc9, 0x2c, 0xa8, 0xa4, 0x00, 0x37,
-- 0x2f, 0xd2, 0x10, 0x0f, 0x53, 0xf7, 0x1f, 0xf4, 0x97, 0xc2, 0x45, 0x42,
-- 0x6f, 0x86, 0x87, 0xa2, 0x23, 0xe2, 0x75, 0xbd, 0x72, 0x21, 0xba, 0x1a,
-- 0xb0, 0xc1, 0x4c, 0x12, 0x20, 0x71, 0x4e, 0x02, 0x4a, 0xbc, 0xef, 0xce,
-- 0x01, 0x12, 0xdf, 0x2f, 0xa2, 0xd8, 0xb7, 0xb1, 0x0b, 0x3c, 0x91, 0xf0,
-- 0x76, 0xe4, 0x60, 0x4b, 0xec, 0xb7, 0x77, 0xa2, 0xba, 0xa2, 0xf4, 0xa1,
-- 0x13, 0x49, 0x0a, 0xea, 0x74, 0x8c, 0xae, 0xa5, 0x71, 0x8a, 0xef, 0x10,
-- 0x73, 0xdc, 0xa0, 0x5b, 0x81, 0xb9, 0x79, 0xbd, 0xd8, 0xd8, 0xd9, 0x44,
-- 0x77, 0x56, 0x5b, 0xc0, 0x70, 0x4d, 0x3a, 0x33, 0x9f, 0x2c, 0xd2, 0x84,
-- 0xcb, 0x09, 0x1a, 0x16, 0x29, 0x33, 0x3e, 0x60, 0x0a, 0x23, 0x8a, 0xf4,
-- 0x52, 0xce, 0x83, 0x50, 0x87, 0x86, 0xad, 0xb0, 0x0b, 0xa2, 0x83, 0x38,
-- 0x05, 0x37, 0x65, 0xc1, 0xa1, 0xce, 0x95, 0x54, 0x79, 0xda, 0xc8, 0x9d,
-- 0x9c, 0x2c, 0xd7, 0x83, 0x95, 0x3e, 0xa4, 0xd5, 0x9b, 0x4e, 0x06, 0x48,
-- 0x65, 0xba, 0x2a, 0x8b, 0x18, 0xcb, 0x8e, 0xd3, 0x44, 0xf4, 0x06, 0x11,
-- 0x07, 0x44, 0x67, 0xb9, 0xc9, 0x1e, 0x47, 0xe5, 0xf7, 0xdc, 0x0d, 0x1f,
-- 0xc4, 0xfe, 0xb7, 0xcd, 0xc2, 0x8d, 0x2d, 0x8d, 0xc8, 0x74, 0x3f, 0xf9,
-- 0xdb, 0x32, 0x27, 0xb2, 0xe6, 0xbd, 0x45, 0x70, 0x15, 0x42, 0xbc, 0x33,
-- 0xe7, 0x90, 0x24, 0xee, 0xc1, 0x2e, 0x57, 0x68, 0x5e, 0x30, 0x47, 0x42,
-- 0xa7, 0x37, 0x2a, 0xeb, 0x28, 0xab, 0x09, 0x5b, 0xa1, 0x09, 0x04, 0x80,
-- 0xb1, 0x2c, 0x54, 0xdc, 0x44, 0x54, 0x91, 0xb8, 0x99, 0x45, 0x72, 0x66,
-- 0xd6, 0x2e, 0x54, 0xb0, 0xaa, 0xb8, 0xc2, 0xfa, 0xec, 0x9e, 0x2f, 0xb2,
-- 0xf5, 0x66, 0x95, 0x85, 0xf5, 0x8a, 0xed, 0x39, 0xf5, 0xba, 0xad, 0x6f,
-- 0x2b, 0xa5, 0x24, 0x86, 0x4b, 0x5f, 0xd1, 0xb5, 0x90, 0xb6, 0x74, 0xe1,
-- 0x5b, 0x97, 0xc6, 0xfd, 0x11, 0x7c, 0xd7, 0x97, 0xb0, 0xd7, 0xd1, 0x92,
-- 0x5d, 0xdf, 0xad, 0xa6, 0x5f, 0x0b, 0xb7, 0x16, 0xa9, 0x40, 0x9e, 0xd0,
-- 0x22, 0x50, 0x1e, 0xe3, 0x81, 0xd1, 0x3f, 0xb2, 0x74, 0x36, 0xe4, 0x52,
-- 0x6a, 0x8a, 0xa0, 0x86, 0xfa, 0x8d, 0x55, 0x2c, 0xd4, 0x2d, 0xa5, 0xa6,
-- 0x73, 0xbf, 0x09, 0x90, 0xdb, 0x0a, 0x95, 0x92, 0x6e, 0x38, 0xff, 0x30,
-- 0x6c, 0xbe, 0xcb, 0xfd, 0x88, 0xd7, 0x5d, 0xae, 0xb9, 0x6a, 0xbe, 0x56,
-- 0xfe, 0x5c, 0x50, 0x5e, 0xa4, 0x09, 0x07, 0x4d, 0xcd, 0xd0, 0x60, 0xd7,
-- 0xcb, 0xf9, 0x0d, 0x0d, 0x21, 0x8e, 0xcd, 0x34, 0x1b, 0x75, 0xce, 0x67,
-- 0x9b, 0x08, 0x44, 0x41, 0x8b, 0x5c, 0xa5, 0x72, 0xb4, 0xc0, 0x00, 0x33,
-- 0xb7, 0x10, 0x4b, 0x22, 0xa8, 0xff, 0xae, 0xd1, 0xe9, 0x75, 0x27, 0xa3,
-- 0x72, 0x0b, 0xd8, 0x9d, 0x04, 0xa5, 0x06, 0x19, 0x8f, 0x83, 0x3e, 0xcf,
-- 0xae, 0x10, 0x25, 0x12, 0xa4, 0x43, 0x7a, 0x24, 0x08, 0x28, 0x0a, 0x56,
-- 0x16, 0x27, 0x3a, 0xb2, 0xcb, 0x4a, 0x6a, 0x13, 0xe9, 0xb6, 0x26, 0x28,
-- 0xb6, 0xed, 0x51, 0xbe, 0x3a, 0x46, 0xa2, 0x7c, 0x78, 0xd0, 0x51, 0x25,
-- 0xeb, 0xa2, 0x8d, 0x66, 0x56, 0x85, 0x38, 0x8f, 0x78, 0xad, 0xdf, 0x40,
-- 0x7a, 0x14, 0xc4, 0x30, 0x89, 0x1f, 0x5e, 0x51, 0x64, 0x7d, 0x83, 0x74,
-- 0x8c, 0x62, 0xba, 0x94, 0xf2, 0x2c, 0x6c, 0x14, 0xe3, 0x58, 0xf2, 0x4d,
-- 0x3b, 0x4d, 0x72, 0xfe, 0x9c, 0xdb, 0xd9, 0x98, 0x58, 0x27, 0xf8, 0x1e,
-- 0xdc, 0xac, 0x61, 0x85, 0x20, 0x09, 0x58, 0x33, 0xed, 0x9d, 0x95, 0x80,
-- 0xa0, 0xb9, 0x05, 0xa2, 0xe1, 0x6e, 0x0b, 0x63, 0xb3, 0x91, 0x05, 0xc9,
-- 0x94, 0x89, 0x70, 0x3d, 0x2c, 0x0e, 0x1d, 0xa2, 0x81, 0xaf, 0x7d, 0x12,
-- 0xc2, 0x7f, 0x43, 0xe1, 0xe0, 0xce, 0x1e, 0x74, 0x43, 0x3f, 0x10, 0x9f,
-- 0xd4, 0xb9, 0xd6, 0xbe, 0xd8, 0x2d, 0x7c, 0xfe, 0x2a, 0xf6, 0xeb, 0xd0,
-- 0x54, 0x5a, 0xbf, 0xc7, 0xa8, 0x66, 0x4b, 0xb6, 0x13, 0x47, 0xa1, 0x98,
-- 0xb4, 0x2b, 0xd3, 0xa5, 0xa0, 0xe8, 0xb2, 0xcf, 0xd1, 0x8b, 0xe8, 0xe9,
-- 0x88, 0x37, 0x67, 0x74, 0xef, 0xe6, 0x69, 0x29, 0xb6, 0xc8, 0x85, 0x35,
-- 0x7d, 0x3a, 0x26, 0x0f, 0x7b, 0xac, 0xd5, 0xcf, 0x77, 0xca, 0x5b, 0x23,
-- 0xb2, 0x10, 0x3b, 0x76, 0x08, 0x08, 0x70, 0xa3, 0xec, 0xc4, 0x98, 0xec,
-- 0xb2, 0xc3, 0x66, 0xea, 0x06, 0x63, 0xe2, 0x3a, 0xdb, 0x04, 0x52, 0x2b,
-- 0x9a, 0x2b, 0x96, 0x68, 0x79, 0xdd, 0xc2, 0xe2, 0x8b, 0x66, 0x16, 0xc6,
-- 0xdc, 0x02, 0x6d, 0x57, 0x61, 0xd2, 0x69, 0x61, 0xbb, 0xa4, 0x11, 0x95,
-- 0x1b, 0x5d, 0xc2, 0x7c, 0x41, 0x35, 0x9e, 0x88, 0x94, 0x0a, 0x20, 0xe4,
-- 0x71, 0xfc, 0x08, 0x6d, 0x12, 0xc9, 0x80, 0x82, 0x41, 0xf9, 0x36, 0x1f,
-- 0x97, 0x45, 0x55, 0x5c, 0x8a, 0xd9, 0xd0, 0x2e, 0x31, 0x91, 0x4c, 0xf2,
-- 0x12, 0x48, 0x77, 0x29, 0xe7, 0x51, 0xc5, 0x72, 0x85, 0xea, 0xcc, 0xbc,
-- 0x57, 0x88, 0x73, 0x5d, 0x94, 0xf9, 0x4c, 0x39, 0x12, 0xfb, 0x8b, 0x6b,
-- 0x71, 0x97, 0xa7, 0xae, 0xa0, 0x3d, 0xe4, 0x01, 0x0b, 0xdc, 0x7e, 0xf6,
-- 0x70, 0x28, 0x15, 0x6f, 0x85, 0x54, 0xad, 0x77, 0x3e, 0xde, 0x89, 0x96,
-- 0x0c, 0x96, 0x38, 0x34, 0xb5, 0x47, 0xdb, 0x6b, 0xdd, 0xa3, 0xb3, 0x08,
-- 0x16, 0x14, 0xca, 0x80, 0x6b, 0x39, 0xac, 0x0b, 0xcf, 0x41, 0x8e, 0x47,
-- 0x87, 0x17, 0x6f, 0x92, 0x49, 0x49, 0x8a, 0x9e, 0xfc, 0x1c, 0x90, 0x28,
-- 0xfb, 0xf7, 0x34, 0xc2, 0xa4, 0xab, 0x16, 0xbc, 0x49, 0x03, 0x56, 0x89,
-- 0x06, 0xdb, 0x4f, 0x87, 0xf5, 0xc7, 0xce, 0x78, 0x65, 0x17, 0x55, 0x01,
-- 0x0e, 0x06, 0x5e, 0xea, 0xb7, 0x4b, 0x01, 0xbb, 0x4a, 0x44, 0xee, 0x7f,
-- 0xbc, 0x8f, 0x60, 0x7b, 0xbb, 0xc0, 0xe9, 0x85, 0x2d, 0xe2, 0x79, 0x4f,
-- 0x25, 0x9f, 0x1a, 0xfc, 0xdd, 0x19, 0xfb, 0x2d, 0xe1, 0xde, 0xcd, 0x80,
-- 0xee, 0xb8, 0x8e, 0xe9, 0xc3, 0xe1, 0xdd, 0x16, 0xce, 0x8d, 0x05, 0x84,
-- 0x86, 0x22, 0xf3, 0xd2, 0xaf, 0x3a, 0x6a, 0xdf, 0x22, 0x24, 0xb1, 0x41,
-- 0x9b, 0xdd, 0x91, 0x5c, 0x71, 0x0d, 0x05, 0x41, 0x62, 0x43, 0x08, 0x3f,
-- 0xe8, 0xc0, 0x38, 0x75, 0x4a, 0x92, 0x3e, 0xbb, 0x4a, 0x97, 0x06, 0x70,
-- 0xb6, 0xb2, 0x3e, 0x33, 0xf0, 0xa0, 0x0d, 0xa4, 0xba, 0x45, 0x65, 0xb0,
-- 0x84, 0xbb, 0xda, 0xcd, 0x6c, 0x04, 0x53, 0xbf, 0x6a, 0xdb, 0x8c, 0xba,
-- 0x3e, 0x20, 0x86, 0xbd, 0xb7, 0x2e, 0x74, 0x9e, 0xcd, 0xb9, 0xe2, 0xa7,
-- 0x50, 0xb7, 0x8f, 0xe1, 0x8e, 0xc4, 0x72, 0x8f, 0x6a, 0x32, 0x58, 0x76,
-- 0x8f, 0x8e, 0x78, 0x21, 0xcb, 0xb1, 0xe2, 0x36, 0xd3, 0xf2, 0xe8, 0xc3,
-- 0x7f, 0x46, 0x75, 0x87, 0x90, 0xf9, 0x04, 0x49, 0x44, 0x0f, 0x09, 0x54,
-- 0xca, 0xce, 0x7d, 0xc2, 0x91, 0x3a, 0x90, 0x5c, 0xdc, 0xef, 0xc5, 0xc1,
-- 0x69, 0xe0, 0x2f, 0xef, 0xc7, 0xf6, 0xa5, 0xd1, 0xbd, 0xcf, 0xc5, 0x45,
-- 0x12, 0xe4, 0xdc, 0xb5, 0x3e, 0xfb, 0x27, 0x0a, 0x19, 0x7e, 0x06, 0x81,
-- 0x9c, 0xe1, 0x3e, 0x6c, 0x2d, 0x8d, 0x62, 0xf6, 0xe4, 0x93, 0xee, 0xda,
-- 0xda, 0xba, 0x42, 0x56, 0x97, 0x41, 0xd7, 0x88, 0xf1, 0x56, 0x0c, 0x1b,
-- 0xe9, 0xe8, 0x35, 0x8d, 0x86, 0x45, 0x5e, 0xd6, 0xf5, 0xbd, 0x7d, 0x32,
-- 0x16, 0xd5, 0xbd, 0xfb, 0x01, 0x57, 0x24, 0x4a, 0x08, 0x07, 0xf5, 0xa5,
-- 0x19, 0x58, 0x2d, 0x44, 0x0c, 0x95, 0x48, 0x22, 0x03, 0xe6, 0xea, 0xc6,
-- 0x4d, 0x65, 0xc7, 0x4a, 0xa9, 0x05, 0x37, 0xaf, 0x97, 0xa5, 0xa4, 0x8e,
-- 0x2b, 0xf0, 0x8b, 0x82, 0xfe, 0x96, 0x19, 0x8f, 0xb9, 0x39, 0xe0, 0xaa,
-- 0x83, 0x15, 0x21, 0x5d, 0x2f, 0x9b, 0x69, 0xe8, 0xf9, 0xa8, 0x2c, 0x6e,
-- 0xe8, 0xb4, 0xf2, 0x6b, 0xd0, 0x50, 0x78, 0xf5, 0xe5, 0x36, 0x30, 0x2d,
-- 0x9e, 0xee, 0x6e, 0xc1, 0x4a, 0xec, 0xc0, 0x46, 0x75, 0xf5, 0x0f, 0x34,
-- 0x79, 0xcb, 0x8b, 0x9d, 0x82, 0x50, 0x8d, 0xfc, 0x6a, 0x63, 0x97, 0x70,
-- 0x56, 0x70, 0x29, 0x5e, 0x1f, 0x18, 0x17, 0xbb, 0x82, 0x15, 0x59, 0xfc,
-- 0x9f, 0x47, 0x43, 0x8e, 0x2c, 0x42, 0x1a, 0xea, 0xd8, 0xf2, 0x06, 0x31,
-- 0x09, 0xdb, 0x7f, 0x49, 0x54, 0x25, 0x0c, 0x9d, 0x8d, 0xa0, 0x6d, 0x2b,
-- 0x3c, 0x40, 0xfa, 0x07, 0x01, 0x34, 0x09, 0x3c, 0x02, 0xa2, 0xf9, 0x71,
-- 0x00, 0x87, 0xc4, 0x3b, 0x4c, 0x7c, 0x55, 0x91, 0x54, 0x6e, 0x13, 0x58,
-- 0x34, 0x62, 0x81, 0x8e, 0xc5, 0x5f, 0x27, 0x1e, 0x89, 0x0a, 0x0b, 0x3e,
-- 0xc1, 0xdb, 0x03, 0x50, 0xaa, 0x3c, 0x28, 0x4c, 0xf5, 0xaf, 0x21, 0xec,
-- 0x83, 0xf4, 0x14, 0x29, 0x6f, 0x82, 0xb4, 0xed, 0x02, 0x4a, 0x24, 0x9f,
-- 0xcc, 0xa5, 0x57, 0x32, 0x32, 0x6b, 0xc8, 0x33, 0x30, 0xb4, 0x61, 0x72,
-- 0xc8, 0xd1, 0x21, 0x1d, 0x1a, 0xa5, 0x25, 0xe3, 0x61, 0x8e, 0xb9, 0xe2,
-- 0x1d, 0x8a, 0xef, 0x47, 0xf5, 0xf3, 0xd4, 0xfc, 0x3a, 0x06, 0x3c, 0xe3,
-- 0x0a, 0x50, 0x76, 0x6a, 0xd7, 0x55, 0xad, 0x00, 0x6c, 0x9a, 0x53, 0xef,
-- 0x3e, 0x72, 0x18, 0xdb, 0x6f, 0x7c, 0x7c, 0x6f, 0x5f, 0xac, 0x75, 0xa2,
-- 0xf8, 0x76, 0x88, 0xea, 0x18, 0x4d, 0xe2, 0x1f, 0xea, 0x07, 0xbf, 0xef,
-- 0x7d, 0xbe, 0x6d, 0x71, 0xab, 0x6c, 0x1e, 0x0d, 0x9f, 0x41, 0xb0, 0x4e,
-- 0x87, 0xc2, 0x06, 0x84, 0xb6, 0xa2, 0x76, 0x8f, 0xb6, 0xa1, 0xf1, 0x5f,
-- 0x0c, 0x9f, 0x6e, 0x36, 0xe8, 0xa5, 0x9e, 0xce, 0x62, 0x09, 0xf0, 0xdd,
-- 0xc5, 0xf1, 0xdb, 0x24, 0x92, 0xfc, 0xc4, 0x36, 0x81, 0xef, 0x9a, 0x5f,
-- 0xfd, 0x57, 0x24, 0x40, 0xfa, 0xe2, 0xe8, 0xe8, 0x1c, 0xf2, 0x9f, 0xa6,
-- 0xd8, 0x44, 0x31, 0x78, 0x22, 0xf7, 0x81, 0x04, 0x49, 0xf6, 0xcb, 0x6a,
-- 0x96, 0x35, 0xcc, 0x7e, 0xca, 0x89, 0xae, 0xfc, 0x52, 0x36, 0xc8, 0xe6,
-- 0xa4, 0xda, 0x67, 0xd0, 0x92, 0x19, 0xf2, 0x7c, 0x0a, 0xae, 0xb4, 0xc8,
-- 0x8a, 0x0e, 0x1b, 0xba, 0x0c, 0xc0, 0x58, 0x8a, 0xc2, 0x63, 0xf3, 0x5d,
-- 0x31, 0x4a, 0x2b, 0x07, 0xf2, 0x93, 0xa3, 0x5c, 0x01, 0x8b, 0x14, 0x6a,
-- 0xf8, 0xba, 0xc9, 0x91, 0x4d, 0x1d, 0x65, 0x19, 0x5b, 0x25, 0xbc, 0x10,
-- 0x24, 0x18, 0xe8, 0xe7, 0x93, 0xa2, 0x84, 0x43, 0x2a, 0x00, 0x79, 0x65,
-- 0x64, 0xf1, 0x25, 0x02, 0x25, 0x79, 0x78, 0xf7, 0x1d, 0xba, 0xd1, 0x75,
-- 0x21, 0x41, 0x8a, 0x58, 0x66, 0xe6, 0x4a, 0x92, 0x0d, 0x86, 0x50, 0x7c,
-- 0x05, 0x01, 0x05, 0x41, 0x78, 0x56, 0x12, 0x6e, 0x54, 0x57, 0x30, 0xbd,
-- 0xab, 0x56, 0xee, 0x72, 0x52, 0xd4, 0xad, 0xf1, 0x3a, 0xbf, 0x5a, 0x05,
-- 0xd6, 0x8d, 0x00, 0xaa, 0xb6, 0x8c, 0xc9, 0x23, 0x72, 0xe2, 0xa5, 0xb0,
-- 0x99, 0x76, 0x4d, 0x88, 0x0e, 0xd4, 0x85, 0x86, 0x70, 0x49, 0xd4, 0xf6,
-- 0x60, 0xc1, 0xcf, 0x87, 0xa5, 0x4a, 0x5c, 0x20, 0x26, 0x52, 0x42, 0x58,
-- 0x64, 0x69, 0x31, 0xb2, 0x43, 0x07, 0xb2, 0xe3, 0xea, 0x54, 0x40, 0x9e,
-- 0xcd, 0x3f, 0x05, 0xa7, 0xdc, 0x1f, 0xb6, 0x82, 0x85, 0x48, 0x35, 0xbf,
-- 0x74, 0x46, 0xb6, 0x7f, 0x2f, 0xf0, 0x35, 0x6a, 0xa0, 0x29, 0xf4, 0xa1,
-- 0x30, 0xf1, 0xaa, 0xaa, 0x27, 0x05, 0x43, 0x88, 0x5a, 0x5c, 0x6a, 0x69,
-- 0xb7, 0xf7, 0xbf, 0xff, 0x67, 0x9c, 0x85, 0xf2, 0xd3, 0x2f, 0x62, 0xc4,
-- 0x13, 0xa0, 0x02, 0x9f, 0xb5, 0x6f, 0xa4, 0x53, 0xf9, 0x2a, 0x04, 0xbc,
-- 0x49, 0x8c, 0xc8, 0x23, 0x0e, 0x50, 0x39, 0x42, 0x6d, 0xe1, 0x54, 0xdd,
-- 0xb5, 0x7a, 0xf5, 0xea, 0xd8, 0x8c, 0xef, 0x03, 0xd4, 0x35, 0x0d, 0xac,
-- 0x95, 0x1e, 0xca, 0x5b, 0x01, 0x7b, 0x27, 0xab, 0xe0, 0x91, 0x0d, 0xd6,
-- 0x43, 0x11, 0x73, 0x0d, 0x9e, 0x83, 0x01, 0x15, 0xc4, 0xc3, 0x86, 0xf1,
-- 0xf3, 0xcd, 0x82, 0xb0, 0xc5, 0x7c, 0x1e, 0xc3, 0x56, 0xca, 0xde, 0xaa,
-- 0x27, 0xe9, 0xdf, 0x69, 0x2f, 0xfa, 0xf5, 0x5d, 0xf1, 0x9f, 0x43, 0x0e,
-- 0xfd, 0x03, 0xe3, 0x1d, 0x14, 0x52, 0xed, 0xf7, 0xc3, 0x1f, 0x77, 0x58,
-- 0xa9, 0xea, 0xc5, 0x55, 0x7c, 0xb1, 0x02, 0xb6, 0xc5, 0x0e, 0xed, 0x64,
-- 0x05, 0x4a, 0x66, 0xb3, 0x3b, 0xee, 0xa5, 0xcf, 0x57, 0xc0, 0x7f, 0x0e,
-- 0xf9, 0xe7, 0x4f, 0x3b, 0x83, 0x67, 0xbf, 0xb8, 0x5e, 0xff, 0xb8, 0xf3,
-- 0xe1, 0x8f, 0xbb, 0xbd, 0xce, 0xd2, 0xcd, 0x9a, 0x0e, 0xd6, 0x0c, 0x7d,
-- 0xab, 0x50, 0x47, 0x51, 0x63, 0x4d, 0x55, 0xaf, 0xf7, 0x7e, 0x72, 0x14,
-- 0x89, 0x88, 0x53, 0x18, 0xd8, 0xde, 0xf7, 0x08, 0x42, 0x73, 0x58, 0x4e,
-- 0x34, 0xd0, 0x5a, 0xb4, 0xba, 0xa6, 0x98, 0x6b, 0xe0, 0x55, 0x32, 0xc3,
-- 0x71, 0x64, 0xa3, 0xe6, 0xd4, 0xc4, 0x64, 0x72, 0x4f, 0xf7, 0x9c, 0x20,
-- 0x5a, 0x0e, 0x5d, 0xa0, 0x92, 0x49, 0x8f, 0x4a, 0xb8, 0x8a, 0x85, 0xb4,
-- 0xe1, 0x6e, 0x7c, 0x46, 0xee, 0xda, 0xec, 0xb2, 0x01, 0x79, 0xe3, 0x9b,
-- 0xa7, 0xf9, 0x91, 0x0a, 0xa5, 0x7c, 0x78, 0x85, 0xd8, 0xfd, 0x01, 0x6a,
-- 0xa3, 0x4a, 0x3e, 0x72, 0x7c, 0xd2, 0xd0, 0x0d, 0x28, 0xf5, 0x53, 0xb4,
-- 0x92, 0xb5, 0xc3, 0x5a, 0xc6, 0x57, 0x77, 0x19, 0xa4, 0xd7, 0xf6, 0xbd,
-- 0xb3, 0x71, 0xe2, 0x74, 0x1d, 0x31, 0x93, 0x05, 0xd8, 0xdb, 0xe1, 0xeb,
-- 0x41, 0xe0, 0x41, 0x96, 0x58, 0x61, 0xe6, 0xf1, 0xb2, 0x8e, 0x01, 0x1f,
-- 0x86, 0x9b, 0x5d, 0xc1, 0xf4, 0x61, 0x5b, 0x06, 0x2e, 0xa5, 0x51, 0xcf,
-- 0x49, 0x25, 0xa5, 0x3d, 0x44, 0x1f, 0x14, 0x4c, 0x4b, 0xe6, 0x45, 0x50,
-- 0xf9, 0x3a, 0x64, 0x13, 0x57, 0xb3, 0xb3, 0xef, 0xb0, 0x74, 0xb3, 0x69,
-- 0x15, 0xd3, 0xc6, 0x01, 0x3b, 0xd5, 0x18, 0x33, 0xac, 0x46, 0xbe, 0x70,
-- 0x3f, 0x0c, 0x12, 0x73, 0xe9, 0x68, 0xe9, 0xad, 0x77, 0x97, 0xd9, 0x19,
-- 0xd5, 0x70, 0xf2, 0x55, 0xf9, 0xbe, 0xc3, 0xa6, 0x79, 0xc2, 0x85, 0x78,
-- 0xa5, 0xae, 0xae, 0x8e, 0xcf, 0x26, 0x0b, 0xf2, 0x9e, 0xbb, 0x52, 0x18,
-- 0x81, 0xbe, 0x0e, 0xf6, 0x24, 0x79, 0x5f, 0xad, 0x11, 0x04, 0x2e, 0x2b,
-- 0xc5, 0xf9, 0xe0, 0x67, 0x05, 0xf8, 0xa9, 0x1b, 0xd6, 0x5d, 0xb9, 0x4d,
-- 0x0c, 0x4d, 0x7a, 0x39, 0x4d, 0xaf, 0xfe, 0xd0, 0x89, 0x06, 0xaa, 0x9e,
-- 0x58, 0xe6, 0x44, 0xc0, 0x01, 0x45, 0xbf, 0x48, 0xdd, 0x0f, 0x9c, 0x88,
-- 0x02, 0x14, 0x41, 0xf3, 0xce, 0xa5, 0x50, 0xc2, 0x9f, 0x76, 0xb7, 0x63,
-- 0x56, 0xac, 0x39, 0x54, 0x00, 0xcb, 0xb2, 0xb2, 0x28, 0x4c, 0x4f, 0x95,
-- 0x11, 0x94, 0x48, 0x94, 0x1e, 0x8b, 0x9d, 0x03, 0xa7, 0xb8, 0xd4, 0x5a,
-- 0x35, 0x00, 0x1e, 0xc2, 0x2a, 0x34, 0xd0, 0x61, 0x17, 0x67, 0xf9, 0xad,
-- 0x8c, 0xe5, 0x51, 0xce, 0x42, 0xb7, 0x17, 0x5f, 0xf8, 0xbb, 0x83, 0x51,
-- 0x46, 0x37, 0x4f, 0x7b, 0x8e, 0x1b, 0x47, 0x6f, 0xf7, 0x4f, 0xfb, 0x9a,
-- 0x6c, 0xdc, 0x8c, 0x56, 0xe3, 0xce, 0xbe, 0xc2, 0x3b, 0xc9, 0x05, 0x74,
-- 0x3a, 0xa6, 0xed, 0x13, 0xae, 0xad, 0x9c, 0xec, 0x0e, 0xb7, 0x55, 0xf0,
-- 0x7b, 0xd0, 0x52, 0x27, 0x76, 0xc7, 0x46, 0x1b, 0x81, 0x0d, 0x91, 0xe4,
-- 0xf5, 0xbf, 0x2e, 0xe7, 0x4d, 0xf4, 0xf3, 0x2e, 0x87, 0xa2, 0xaa, 0x61,
-- 0x26, 0xe5, 0x2b, 0xda, 0x7c, 0x23, 0x1c, 0x2c, 0x3c, 0xe5, 0x8a, 0x8d,
-- 0x56, 0xb2, 0xfd, 0x27, 0x92, 0x32, 0xd0, 0xe0, 0x6a, 0x58, 0xfb, 0xd6,
-- 0x60, 0x15, 0x30, 0xc2, 0xec, 0x37, 0x65, 0xa6, 0xce, 0x48, 0x91, 0xdf,
-- 0x5c, 0x81, 0x1c, 0xdc, 0xd7, 0x67, 0x6f, 0x0e, 0x5a, 0xcd, 0x3d, 0xff,
-- 0xec, 0xd9, 0xf6, 0xef, 0x18, 0xf9, 0xb3, 0xe8, 0x9b, 0x84, 0x56, 0x73,
-- 0x5a, 0xc2, 0xb4, 0xcb, 0x66, 0x46, 0x6b, 0x85, 0xf0, 0x45, 0x91, 0xfb,
-- 0xac, 0xb3, 0x8d, 0xc1, 0x47, 0xf7, 0x6e, 0x57, 0xe2, 0x2d, 0xfc, 0xfd,
-- 0x51, 0xdc, 0xc1, 0x7c, 0x60, 0x4d, 0x41, 0x86, 0xd7, 0x44, 0x55, 0x43,
-- 0xdd, 0x95, 0xac, 0x55, 0x0c, 0x84, 0xf9, 0x52, 0x29, 0x56, 0x30, 0xc3,
-- 0xda, 0xfd, 0x78, 0xbf, 0xa2, 0x2c, 0x08, 0x6f, 0xda, 0x8c, 0x0e, 0xed,
-- 0xd4, 0x92, 0x3b, 0xf3, 0x5a, 0x8b, 0xbe, 0x01, 0xa1, 0x1c, 0x9c, 0xdf,
-- 0xc5, 0xc9, 0x57, 0x42, 0x4f, 0xd4, 0xcb, 0x20, 0xf2, 0x78, 0x4d, 0xd9,
-- 0x10, 0x5d, 0x16, 0xa9, 0x44, 0xfc, 0x03, 0xa3, 0xd6, 0x71, 0x0f, 0x8c,
-- 0xdb, 0x2c, 0xab, 0x07, 0x27, 0xef, 0xde, 0x1d, 0x1e, 0x04, 0xe5, 0x7f,
-- 0x3a, 0x02, 0x06, 0x9d, 0x40, 0xeb, 0x42, 0x8b, 0x55, 0x70, 0x96, 0x34,
-- 0x52, 0xcd, 0x8a, 0x50, 0x83, 0x96, 0xb9, 0x7a, 0xf4, 0x46, 0x60, 0x41,
-- 0xb5, 0x5b, 0x06, 0x13, 0x96, 0x66, 0x59, 0xf4, 0xba, 0x56, 0xb6, 0x54,
-- 0x75, 0x11, 0x6c, 0x6d, 0xb3, 0xde, 0xe9, 0xca, 0xe0, 0x52, 0xad, 0x1c,
-- 0x07, 0x4d, 0xaa, 0x59, 0x59, 0x59, 0x6b, 0xdb, 0x15, 0xe5, 0x16, 0xa2,
-- 0xa9, 0xe6, 0xc8, 0xed, 0x2b, 0xa0, 0x25, 0xde, 0x59, 0xa5, 0xf6, 0x78,
-- 0x0d, 0xb5, 0x72, 0xbb, 0xe0, 0x78, 0x52, 0xe3, 0x2e, 0x4c, 0x56, 0xd5,
-- 0x99, 0x99, 0x4f, 0x32, 0x86, 0x79, 0xc1, 0x17, 0xd3, 0x63, 0x9f, 0x69,
-- 0x5b, 0x63, 0x03, 0x94, 0xf3, 0xd8, 0x32, 0x4f, 0x05, 0xa5, 0xce, 0x61,
-- 0x4d, 0x5b, 0xb1, 0x38, 0xa6, 0x1a, 0x5b, 0x47, 0x20, 0x59, 0xae, 0x4a,
-- 0x7f, 0x96, 0x02, 0xf0, 0xeb, 0x55, 0x78, 0xee, 0x35, 0xc0, 0x14, 0x76,
-- 0x55, 0x5a, 0x28, 0x4b, 0xa1, 0x6b, 0x14, 0xf4, 0x4d, 0xab, 0x9b, 0x6a,
-- 0x35, 0x9c, 0x04, 0x94, 0x8d, 0x1a, 0xd5, 0x31, 0x43, 0x60, 0x76, 0x6b,
-- 0x51, 0x00, 0xf8, 0xf2, 0xba, 0x35, 0x4e, 0xde, 0xab, 0x66, 0x73, 0x6e,
-- 0x8b, 0x22, 0xb4, 0x98, 0x48, 0x0e, 0x75, 0x28, 0xed, 0xdd, 0x55, 0x90,
-- 0xf3, 0x21, 0x9d, 0x98, 0x1e, 0x03, 0xb8, 0xf7, 0xd4, 0x99, 0xdf, 0x40,
-- 0xfa, 0x71, 0x6f, 0xd3, 0x4a, 0x04, 0x03, 0x8e, 0xef, 0x00, 0x93, 0xd8,
-- 0x54, 0x1b, 0xe4, 0xfd, 0xda, 0x78, 0x3f, 0xcf, 0x3f, 0x42, 0x05, 0x8a,
-- 0x61, 0x9f, 0x5c, 0x53, 0xab, 0x47, 0xd5, 0xdb, 0x79, 0xb1, 0x3b, 0xdc,
-- 0x79, 0xfe, 0xf9, 0x70, 0x67, 0x7b, 0xb8, 0xd3, 0x0b, 0xa1, 0x29, 0xe1,
-- 0xb4, 0x66, 0x37, 0x73, 0xd8, 0x4e, 0x87, 0x01, 0xa6, 0xcb, 0xce, 0x13,
-- 0x76, 0x30, 0xbb, 0x1f, 0x06, 0xae, 0xff, 0xa8, 0x0b, 0x0d, 0x0f, 0x68,
-- 0xb7, 0x3c, 0x08, 0xe4, 0x0f, 0x90, 0xda, 0x82, 0xe3, 0x24, 0xba, 0x8a,
-- 0xd4, 0x5a, 0x02, 0x83, 0x2b, 0x4e, 0xdb, 0x85, 0x5b, 0x12, 0x04, 0xa8,
-- 0x77, 0x97, 0xac, 0x75, 0xfd, 0x47, 0x7a, 0xe7, 0xaf, 0x66, 0xe6, 0x6c,
-- 0x23, 0x76, 0xc7, 0x50, 0xed, 0x9c, 0xce, 0x9a, 0xce, 0xa5, 0x6d, 0x15,
-- 0xb7, 0xc0, 0x15, 0xb1, 0x1e, 0x3a, 0xab, 0x32, 0x1c, 0x16, 0x21, 0xef,
-- 0xb5, 0xd2, 0xbc, 0xd6, 0x1c, 0x6a, 0xe2, 0xfa, 0x74, 0xea, 0x90, 0xe1,
-- 0xa2, 0x65, 0x97, 0x4e, 0x1f, 0xd6, 0x35, 0x66, 0x15, 0x1d, 0x2f, 0x72,
-- 0x8e, 0x5c, 0x16, 0xba, 0x61, 0xf9, 0x9d, 0x3f, 0xff, 0xd9, 0xf3, 0xa8,
-- 0x73, 0x4e, 0x26, 0xd0, 0xaa, 0x83, 0xb0, 0x50, 0x3d, 0xf3, 0x7a, 0xa9,
-- 0xe4, 0xcf, 0x26, 0xbd, 0xbd, 0x9f, 0x90, 0x72, 0xf0, 0xcb, 0xe0, 0x27,
-- 0xfa, 0xf3, 0x97, 0x9e, 0x63, 0x94, 0x88, 0xc1, 0x91, 0xdb, 0xda, 0x4d,
-- 0xde, 0x02, 0xe2, 0xf1, 0x90, 0x8b, 0x55, 0x45, 0x02, 0x36, 0x3b, 0x0f,
-- 0x70, 0x1a, 0x25, 0xe9, 0xd0, 0x27, 0x24, 0xa7, 0x96, 0x7b, 0x0a, 0x5b,
-- 0x0d, 0x51, 0x8a, 0x5b, 0x4b, 0x09, 0xb6, 0xf7, 0x2f, 0xf5, 0xad, 0x90,
-- 0x00, 0xeb, 0xc9, 0xa5, 0xa8, 0x19, 0x96, 0x9d, 0xaa, 0xec, 0x99, 0xc3,
-- 0xed, 0x5c, 0xb6, 0x8d, 0x7e, 0xb6, 0xe6, 0xc0, 0x12, 0x38, 0x43, 0xca,
-- 0x0a, 0xea, 0x8a, 0x2f, 0x58, 0xec, 0xac, 0x99, 0x0b, 0xd3, 0x70, 0xd9,
-- 0x48, 0x3a, 0xc7, 0xea, 0x86, 0xa7, 0xa8, 0x59, 0x80, 0x82, 0xbd, 0xb3,
-- 0x16, 0x04, 0x22, 0x61, 0x6c, 0x96, 0x39, 0x37, 0x0a, 0xf0, 0x7f, 0x43,
-- 0xc1, 0x8d, 0x39, 0x59, 0xf2, 0x72, 0x71, 0x5d, 0x52, 0xbb, 0x0f, 0xa0,
-- 0xa0, 0xd1, 0x53, 0xf2, 0x8c, 0xa3, 0xda, 0x85, 0x47, 0x0d, 0xfb, 0x1d,
-- 0x43, 0x8f, 0x17, 0x74, 0x58, 0x9f, 0x6c, 0xef, 0xac, 0xa8, 0x31, 0x00,
-- 0x5e, 0x6f, 0x01, 0x46, 0x25, 0x70, 0x8e, 0x6a, 0x96, 0x92, 0x92, 0x64,
-- 0xf7, 0xf9, 0xce, 0xf3, 0x2d, 0xe2, 0x22, 0x4f, 0x86, 0xbb, 0x21, 0x76,
-- 0x2d, 0x1d, 0x31, 0x1a, 0x43, 0xfb, 0xf2, 0x04, 0xd2, 0x82, 0x5d, 0xd6,
-- 0x88, 0x39, 0xa4, 0xe6, 0x18, 0x3a, 0xc1, 0x7d, 0x84, 0x1b, 0xcd, 0x07,
-- 0x81, 0xa7, 0x8c, 0x9d, 0xe0, 0x42, 0xb7, 0xa3, 0x98, 0x7b, 0x93, 0x4a,
-- 0x59, 0xa0, 0xe1, 0xd1, 0xa8, 0x29, 0x70, 0x09, 0x80, 0xe4, 0xe5, 0x28,
-- 0xa7, 0x9b, 0xbf, 0xe6, 0x72, 0xeb, 0x40, 0x08, 0x62, 0x03, 0xa7, 0x2b,
-- 0xdb, 0xc0, 0xb8, 0xe0, 0x45, 0x97, 0x9a, 0x22, 0xf0, 0x01, 0x2e, 0xbd,
-- 0xd5, 0x2c, 0x59, 0xa1, 0x53, 0x0b, 0x51, 0xe2, 0xb9, 0xc0, 0x4f, 0x03,
-- 0xcc, 0x9e, 0x6f, 0xe5, 0xf1, 0x7d, 0xfb, 0x1e, 0xf9, 0x86, 0xc8, 0xf3,
-- 0x96, 0x4d, 0xec, 0xa9, 0xdd, 0x50, 0x92, 0x87, 0x29, 0x4e, 0x91, 0x54,
-- 0x16, 0xc3, 0xe3, 0x27, 0xea, 0x07, 0x12, 0x89, 0xcc, 0x06, 0xc2, 0xb8,
-- 0x34, 0x5c, 0x10, 0xc2, 0x3e, 0xec, 0x08, 0x80, 0x51, 0x00, 0x42, 0xce,
-- 0x2d, 0x14, 0xe3, 0xbf, 0x78, 0x96, 0xc1, 0x17, 0x1e, 0x8a, 0xdb, 0x7f,
-- 0xa8, 0xee, 0x90, 0x90, 0xc5, 0xee, 0x7f, 0x43, 0xb2, 0xd8, 0xfd, 0xff,
-- 0xc9, 0xe2, 0x9f, 0x48, 0x16, 0x2f, 0xba, 0xc8, 0xe2, 0xc9, 0x7f, 0x43,
-- 0xb2, 0x78, 0xf2, 0xff, 0x93, 0xc5, 0x3f, 0x8f, 0x2c, 0x76, 0x9f, 0x37,
-- 0x53, 0x8f, 0xa0, 0x4f, 0xd2, 0x25, 0x67, 0x6a, 0x65, 0x84, 0x2f, 0x0b,
-- 0xca, 0xd0, 0xa5, 0x0b, 0x05, 0x9d, 0xc4, 0x32, 0x45, 0x42, 0x95, 0x54,
-- 0x05, 0xf6, 0xca, 0x03, 0x26, 0xc5, 0x15, 0xf4, 0x18, 0x76, 0x2d, 0x9d,
-- 0x0e, 0x93, 0x53, 0xf7, 0x1a, 0x6b, 0xf6, 0xfc, 0xd9, 0x12, 0x7e, 0xd5,
-- 0x69, 0x76, 0x89, 0x2d, 0x80, 0x9c, 0xd2, 0xc7, 0x97, 0x10, 0xa3, 0x18,
-- 0x18, 0x74, 0x10, 0x65, 0x9e, 0xf0, 0x2b, 0xe2, 0xea, 0x44, 0x2b, 0xac,
-- 0x80, 0xa6, 0x3e, 0x51, 0xc0, 0xd2, 0xd3, 0xd6, 0x49, 0x96, 0x5a, 0xef,
-- 0x27, 0x61, 0xfd, 0x07, 0xce, 0x6b, 0x8a, 0x2b, 0x51, 0x7c, 0x14, 0x33,
-- 0xfe, 0xdf, 0xb3, 0xb2, 0x48, 0x2c, 0x2e, 0x49, 0x31, 0x77, 0x50, 0xb2,
-- 0xc5, 0xc4, 0x04, 0xff, 0x21, 0xf7, 0x1b, 0x69, 0x19, 0x7f, 0x46, 0x25,
-- 0x2b, 0x81, 0x59, 0xe2, 0x0c, 0x78, 0x97, 0xb8, 0x80, 0x14, 0xe0, 0xdc,
-- 0x2c, 0xc9, 0x7e, 0xe5, 0x4c, 0x24, 0x46, 0x68, 0x74, 0x74, 0x0e, 0x58,
-- 0x68, 0x61, 0xc3, 0x41, 0xe8, 0x2b, 0x77, 0xba, 0xe6, 0xa5, 0x60, 0x73,
-- 0xc8, 0x70, 0x1c, 0x50, 0xfb, 0xb0, 0x43, 0x4e, 0x7f, 0x9d, 0xb1, 0x31,
-- 0x2b, 0x1c, 0x50, 0x5f, 0x0a, 0x78, 0xab, 0xe6, 0xef, 0x82, 0x62, 0xbc,
-- 0x6b, 0xdb, 0x0f, 0x31, 0x1e, 0x52, 0x73, 0xcc, 0x75, 0x47, 0x7c, 0xcc,
-- 0x2b, 0xb7, 0x0c, 0xe6, 0xfa, 0x09, 0x17, 0x63, 0x03, 0xb9, 0x0e, 0x66,
-- 0x08, 0x47, 0x97, 0x9f, 0xb2, 0x0c, 0x30, 0x99, 0x40, 0x69, 0xaf, 0x96,
-- 0xa3, 0xbf, 0xaa, 0x46, 0xc8, 0x81, 0x93, 0xc8, 0x07, 0x6a, 0x54, 0x20,
-- 0x13, 0x3c, 0xfe, 0xe5, 0x48, 0xed, 0xb6, 0x71, 0x73, 0xf4, 0x21, 0x6c,
-- 0xf4, 0xae, 0x26, 0x80, 0xd2, 0x99, 0xba, 0xf8, 0x79, 0x4c, 0xd1, 0xa4,
-- 0x02, 0x3f, 0x75, 0xb4, 0xef, 0x76, 0x9e, 0x58, 0x63, 0xa8, 0x14, 0xf5,
-- 0x3e, 0xdc, 0x2c, 0xb7, 0x9a, 0x2a, 0xc4, 0x9a, 0x47, 0x9e, 0x1f, 0x5f,
-- 0xd9, 0x16, 0x91, 0x6b, 0x9f, 0xfd, 0x26, 0x55, 0xff, 0xcf, 0xfc, 0x4f,
-- 0xb7, 0xc2, 0xd4, 0x00, 0xb9, 0xb4, 0xf0, 0x1d, 0x7e, 0x1c, 0x67, 0x03,
-- 0xaf, 0xaf, 0xea, 0xe0, 0x15, 0x7f, 0x2b, 0x3d, 0x3c, 0xdc, 0x36, 0x3c,
-- 0x23, 0xbf, 0xa2, 0x83, 0xf7, 0x73, 0x49, 0x4a, 0x0e, 0x39, 0xc4, 0x42,
-- 0x31, 0x2a, 0x98, 0xdd, 0xdd, 0xa5, 0xe5, 0x5c, 0xa2, 0x6f, 0xc2, 0x4a,
-- 0xb4, 0x9c, 0x5e, 0xb2, 0x80, 0x91, 0x26, 0xc2, 0x34, 0xbc, 0x64, 0x43,
-- 0x15, 0xac, 0x55, 0x1c, 0x86, 0x28, 0x99, 0x64, 0x8a, 0x9f, 0x66, 0x91,
-- 0x2a, 0x8b, 0xa2, 0x36, 0x0b, 0x7d, 0x32, 0x61, 0xdd, 0xa3, 0xc4, 0xfd,
-- 0xd0, 0x81, 0xc8, 0x6b, 0x1b, 0xe1, 0x6b, 0xbb, 0x70, 0xcb, 0x30, 0xc1,
-- 0x2c, 0x17, 0x00, 0xd3, 0x0e, 0x42, 0x23, 0xa1, 0x66, 0x38, 0xca, 0x45,
-- 0xd7, 0x6d, 0x9f, 0x36, 0x5c, 0xae, 0xb8, 0xf0, 0x1c, 0x0e, 0xdc, 0x6d,
-- 0x91, 0x03, 0xe6, 0x10, 0xb9, 0x71, 0xc3, 0xdf, 0x86, 0x20, 0xde, 0x0f,
-- 0x0a, 0x03, 0xa5, 0x55, 0x18, 0xa2, 0x1e, 0x07, 0x94, 0x78, 0xb5, 0x3b,
-- 0x45, 0xd1, 0x26, 0x06, 0x07, 0x9c, 0xa7, 0xb5, 0x1d, 0x31, 0xbf, 0x0d,
-- 0x18, 0xa6, 0xc0, 0xe0, 0x73, 0xbc, 0xfc, 0x38, 0x8b, 0x7d, 0xf4, 0x1e,
-- 0x2b, 0xfa, 0xb1, 0x54, 0xfd, 0xdd, 0xe8, 0x3e, 0x91, 0x64, 0xd6, 0x47,
-- 0x6f, 0x95, 0x00, 0xe0, 0xca, 0xb1, 0x80, 0x6c, 0x12, 0x52, 0x8b, 0x26,
-- 0xf9, 0x05, 0x57, 0xa3, 0x20, 0x49, 0xac, 0xa0, 0x64, 0xc1, 0xd8, 0xb8,
-- 0x0b, 0xf9, 0x6a, 0xc9, 0x96, 0x41, 0x62, 0xf5, 0x95, 0x44, 0x10, 0xfd,
-- 0xca, 0xa9, 0x7c, 0xbc, 0x1f, 0xa4, 0xf3, 0x7b, 0xb6, 0xaa, 0x3f, 0x70,
-- 0x2d, 0x32, 0x23, 0x47, 0x6e, 0x08, 0x51, 0x4c, 0x2e, 0x95, 0x03, 0x5a,
-- 0xb1, 0x8c, 0x16, 0xdc, 0xa1, 0x68, 0x9a, 0xb3, 0x65, 0x64, 0xfc, 0xc3,
-- 0x93, 0x16, 0x40, 0x2b, 0x3c, 0x58, 0x13, 0x42, 0x35, 0x50, 0xc7, 0x0a,
-- 0x74, 0x49, 0xe1, 0x61, 0x49, 0x09, 0x43, 0x9e, 0x37, 0x3c, 0x5c, 0xdd,
-- 0xf0, 0x71, 0x5b, 0x2e, 0x15, 0xac, 0xe4, 0x9a, 0x1b, 0x03, 0xe2, 0x75,
-- 0x8b, 0x16, 0x1e, 0xce, 0x93, 0xae, 0x29, 0xa3, 0x00, 0xdf, 0x23, 0x72,
-- 0x00, 0xf7, 0xbf, 0x12, 0xbf, 0x25, 0x98, 0xa9, 0xcd, 0x6c, 0x95, 0x23,
-- 0x5b, 0x66, 0xa9, 0x93, 0x7c, 0x2f, 0xa9, 0x06, 0x68, 0x11, 0x70, 0x7f,
-- 0xcc, 0x66, 0x78, 0x59, 0x82, 0x9e, 0x24, 0xc4, 0x38, 0x9a, 0x30, 0x8c,
-- 0xbf, 0x06, 0xce, 0x28, 0x4f, 0xba, 0x13, 0x61, 0xdc, 0xb7, 0x7b, 0x57,
-- 0x78, 0x4a, 0xb1, 0xdf, 0xa3, 0x92, 0x8e, 0x78, 0x60, 0x79, 0x33, 0x24,
-- 0x5c, 0xd6, 0x68, 0x82, 0x38, 0x90, 0x47, 0xc9, 0x1a, 0x03, 0x97, 0x98,
-- 0x91, 0xce, 0x35, 0xfa, 0xcd, 0x8b, 0x24, 0xfd, 0x77, 0xac, 0x92, 0x76,
-- 0xd6, 0x09, 0x79, 0x18, 0x14, 0xcb, 0x8d, 0x67, 0xb4, 0x2a, 0xd4, 0x7d,
-- 0xc5, 0xa4, 0x56, 0x05, 0xbb, 0xb7, 0xf7, 0xbe, 0x0b, 0x0b, 0xe7, 0x01,
-- 0x32, 0x97, 0xd9, 0xcd, 0x1b, 0xa1, 0xd9, 0x8d, 0x09, 0xb6, 0x03, 0x09,
-- 0xdd, 0x93, 0x8a, 0x81, 0x1a, 0xce, 0xf1, 0x61, 0x3d, 0xd9, 0x45, 0xd7,
-- 0x7c, 0xe2, 0x84, 0x3b, 0xe2, 0xbb, 0x92, 0xff, 0xe2, 0x2e, 0x22, 0x92,
-- 0xac, 0x31, 0x45, 0xf4, 0xd2, 0x98, 0x4a, 0x87, 0x25, 0x37, 0xda, 0xbc,
-- 0x9d, 0xe1, 0x36, 0xb8, 0xed, 0xc7, 0x7b, 0x44, 0x53, 0xec, 0xf1, 0xbd,
-- 0xf5, 0x4b, 0x9b, 0xe9, 0xbe, 0x57, 0x36, 0xeb, 0x4d, 0xf8, 0x98, 0x17,
-- 0xbf, 0xab, 0x83, 0x72, 0xf5, 0xc6, 0x42, 0x20, 0x30, 0x87, 0x8b, 0xbe,
-- 0x1a, 0x82, 0x1e, 0x10, 0xc2, 0x86, 0x40, 0xcf, 0x59, 0xb5, 0x78, 0x7f,
-- 0x67, 0xfb, 0xf3, 0xed, 0x6e, 0xac, 0x40, 0xc8, 0x10, 0xe6, 0xd5, 0x1e,
-- 0x67, 0x41, 0x95, 0xb1, 0xdc, 0x97, 0x98, 0x08, 0x3c, 0x67, 0x7a, 0x49,
-- 0xb2, 0xe3, 0xac, 0x8b, 0xf3, 0xc3, 0x8d, 0x96, 0xab, 0x81, 0x59, 0xad,
-- 0xb2, 0x0e, 0x07, 0xcd, 0x1c, 0x4e, 0xce, 0xd3, 0xe3, 0xdc, 0x49, 0x1d,
-- 0x29, 0xaa, 0x0e, 0xaa, 0x63, 0xde, 0x58, 0x1b, 0x13, 0xde, 0x5d, 0x48,
-- 0x51, 0xc8, 0x55, 0xf4, 0xc1, 0x9d, 0xc6, 0xa6, 0x2c, 0x47, 0x0f, 0x94,
-- 0x4f, 0xf8, 0x66, 0x93, 0xe4, 0x62, 0x09, 0x4b, 0x93, 0x3a, 0x00, 0x9f,
-- 0x58, 0x3c, 0x01, 0xaf, 0x44, 0x15, 0x36, 0xfe, 0xf9, 0x95, 0x13, 0xfe,
-- 0x66, 0xed, 0x59, 0xcd, 0x3a, 0x1f, 0xd2, 0xe5, 0x6b, 0xb9, 0x15, 0xf3,
-- 0x46, 0x09, 0x63, 0xc5, 0x13, 0x15, 0xb5, 0x1b, 0xa5, 0x70, 0xa2, 0x64,
-- 0xf2, 0xa0, 0x68, 0x94, 0xcb, 0x32, 0x1d, 0x65, 0x52, 0x60, 0x51, 0x5d,
-- 0xc1, 0x8a, 0x85, 0x0b, 0x3f, 0x73, 0x58, 0x4a, 0x2c, 0x06, 0xbb, 0xb3,
-- 0xdc, 0x56, 0x1d, 0x46, 0xb3, 0xd2, 0x94, 0x46, 0x58, 0x64, 0x69, 0x49,
-- 0x52, 0x15, 0x47, 0x9f, 0x04, 0x93, 0xfb, 0x9f, 0xdc, 0x2c, 0xea, 0xc8,
-- 0x79, 0x6c, 0xeb, 0x0e, 0xcf, 0x9f, 0x56, 0x3d, 0x3f, 0x57, 0x20, 0xeb,
-- 0xb4, 0x1c, 0xe5, 0x75, 0x99, 0x6a, 0x5a, 0x86, 0x22, 0x81, 0x07, 0x6e,
-- 0x49, 0xce, 0xf0, 0x44, 0xe8, 0x2b, 0xbf, 0xd6, 0xe9, 0x0c, 0x23, 0xde,
-- 0xf7, 0x3f, 0xd1, 0xab, 0x36, 0x20, 0xb2, 0x0b, 0xf0, 0x92, 0xbe, 0x3a,
-- 0x7c, 0x73, 0x72, 0x76, 0xd8, 0x04, 0x19, 0x12, 0xc4, 0x61, 0x04, 0x89,
-- 0xb5, 0x47, 0xf7, 0x57, 0x64, 0x64, 0x40, 0x72, 0x0a, 0xab, 0x15, 0x9e,
-- 0x7e, 0xff, 0x3a, 0x80, 0xda, 0x36, 0x7c, 0xfa, 0x00, 0xbc, 0x46, 0xcb,
-- 0xa6, 0x45, 0x99, 0x5f, 0xe9, 0xb8, 0xe6, 0xf2, 0x27, 0x0a, 0xb4, 0xe1,
-- 0x86, 0x27, 0xb8, 0x8c, 0x3c, 0x00, 0xed, 0x2c, 0x95, 0x68, 0xf0, 0xaa,
-- 0x62, 0x03, 0x85, 0x6b, 0x36, 0xf2, 0x4b, 0x66, 0x0c, 0xfa, 0xc9, 0x89,
-- 0x05, 0xc6, 0xe6, 0x38, 0xd4, 0x89, 0xa3, 0x9f, 0x86, 0x89, 0xeb, 0xc4,
-- 0xf7, 0x22, 0xb8, 0x2c, 0x88, 0x7d, 0x41, 0x2f, 0x5d, 0x26, 0x1d, 0x8e,
-- 0x20, 0x91, 0x88, 0x17, 0xe1, 0x1c, 0x51, 0xb8, 0x4b, 0x3f, 0xf9, 0xab,
-- 0x54, 0x16, 0xbc, 0x14, 0x08, 0x4b, 0xbf, 0x8e, 0x11, 0x11, 0xa2, 0xdb,
-- 0x8d, 0x8a, 0x18, 0x8a, 0x1f, 0xa9, 0x5b, 0x36, 0x1d, 0xf0, 0xfa, 0x9f,
-- 0xd7, 0x13, 0x55, 0xc6, 0xc1, 0x1b, 0x35, 0x51, 0x30, 0xce, 0x51, 0x16,
-- 0xf4, 0x8d, 0xc4, 0x72, 0xbb, 0x37, 0x87, 0x2e, 0xd4, 0xc4, 0x33, 0x9a,
-- 0xfb, 0x20, 0xa2, 0xc4, 0x66, 0x6d, 0x68, 0xc3, 0xdd, 0x5e, 0x53, 0xab,
-- 0x00, 0x66, 0xce, 0x0d, 0x2b, 0x69, 0xa5, 0x7c, 0xc9, 0x1a, 0x91, 0xb3,
-- 0xac, 0xe0, 0xad, 0xec, 0xc4, 0x8f, 0x8c, 0x27, 0x61, 0xd5, 0x66, 0x40,
-- 0x51, 0x6b, 0xc5, 0x91, 0x1f, 0x2d, 0xad, 0x07, 0x50, 0x44, 0xd5, 0xfd,
-- 0xbc, 0x86, 0x2f, 0x19, 0x3a, 0xd5, 0xb8, 0x28, 0xe1, 0x7d, 0x8f, 0xc9,
-- 0xd8, 0xd3, 0x6d, 0x05, 0xcb, 0xe1, 0x8b, 0x67, 0x2f, 0xf8, 0xd8, 0xd1,
-- 0xb9, 0xaf, 0x2c, 0xc7, 0x59, 0x83, 0x95, 0x01, 0xaa, 0xac, 0x23, 0x36,
-- 0x43, 0x5c, 0x04, 0xdb, 0xa1, 0xdb, 0x6f, 0x46, 0xa6, 0x51, 0x36, 0xb5,
-- 0xfc, 0xea, 0xf3, 0xa0, 0xa9, 0xe1, 0x4a, 0x35, 0xaa, 0xdd, 0x5c, 0x43,
-- 0xa9, 0xd2, 0xc2, 0x09, 0xb4, 0x0b, 0xe9, 0x8d, 0xa6, 0x5b, 0xe8, 0x79,
-- 0x90, 0x76, 0x1b, 0xbb, 0xbf, 0x6a, 0x74, 0x96, 0xed, 0x46, 0x13, 0x26,
-- 0xc2, 0x64, 0x8f, 0xd3, 0xc6, 0xbf, 0x6e, 0x3a, 0x40, 0x1a, 0x85, 0x53,
-- 0x66, 0xa4, 0xc0, 0x65, 0xd6, 0xc0, 0xd1, 0x5a, 0xd5, 0xdc, 0x25, 0x18,
-- 0x16, 0xad, 0x5e, 0x3b, 0x1b, 0x47, 0x6a, 0x8a, 0xd5, 0xc5, 0x22, 0x49,
-- 0xad, 0x46, 0x9d, 0xee, 0x7d, 0x1c, 0xc0, 0xc8, 0x73, 0x40, 0xe0, 0xf7,
-- 0x48, 0x50, 0x9d, 0xed, 0xf6, 0x22, 0x89, 0x63, 0x8e, 0x70, 0x0e, 0xa5,
-- 0x45, 0x8d, 0x0b, 0x80, 0x43, 0x9b, 0xe6, 0xca, 0x26, 0xbb, 0x0e, 0xd6,
-- 0x24, 0x7c, 0x30, 0x38, 0x8d, 0x8a, 0x98, 0xd2, 0x2a, 0x13, 0x85, 0xd3,
-- 0xac, 0x0c, 0xcf, 0x71, 0xb3, 0x37, 0x71, 0x02, 0xb0, 0x14, 0x62, 0xd5,
-- 0xdc, 0x41, 0xb4, 0xcd, 0xf5, 0x5d, 0x48, 0xdc, 0x1a, 0x54, 0xf5, 0xbd,
-- 0xe8, 0xf1, 0xd9, 0x8c, 0xa1, 0x25, 0x50, 0x1d, 0x14, 0xa0, 0x88, 0x5a,
-- 0x9f, 0x03, 0xf9, 0x0f, 0x83, 0xb8, 0x56, 0xad, 0x90, 0x40, 0xf2, 0xc6,
-- 0x19, 0x94, 0xd5, 0x3a, 0x26, 0x15, 0x27, 0x2e, 0x91, 0x0e, 0xe1, 0x60,
-- 0x70, 0x64, 0x75, 0xfe, 0x66, 0x5c, 0xb6, 0x93, 0xe2, 0x62, 0x18, 0x93,
-- 0xeb, 0xab, 0x72, 0x21, 0x10, 0x04, 0x49, 0x47, 0x4e, 0x73, 0x20, 0xd6,
-- 0xc8, 0x93, 0xc6, 0x2b, 0x50, 0x8a, 0x0b, 0x62, 0x1f, 0x5e, 0x3d, 0x7a,
-- 0xdd, 0x40, 0xaf, 0x91, 0xc8, 0x4a, 0xda, 0xe9, 0xee, 0xe6, 0x7c, 0x64,
-- 0xa1, 0x84, 0xdf, 0xf8, 0xfb, 0xc4, 0xb5, 0xe6, 0xa5, 0xb8, 0xd1, 0xbd,
-- 0xff, 0xa6, 0xbb, 0x39, 0x6d, 0x43, 0x6c, 0xe9, 0xd2, 0x82, 0x35, 0x0b,
-- 0x5a, 0x31, 0xbc, 0x46, 0xa6, 0x06, 0x86, 0x6d, 0xb3, 0x4e, 0x86, 0xf1,
-- 0x62, 0xcc, 0x8a, 0x89, 0x44, 0x76, 0x3c, 0xb6, 0x16, 0xfc, 0xa0, 0xad,
-- 0x85, 0x5a, 0x27, 0xab, 0x70, 0x5e, 0x68, 0x84, 0xa8, 0x94, 0x29, 0x4f,
-- 0xf9, 0x40, 0x77, 0x73, 0x7e, 0xa2, 0x10, 0x6b, 0xd0, 0x3c, 0x5e, 0x0e,
-- 0xa7, 0x30, 0x4f, 0x8a, 0x71, 0x1d, 0xcc, 0x80, 0x1f, 0xe8, 0x6e, 0x4e,
-- 0xdd, 0xcd, 0xf1, 0xcc, 0xd8, 0x52, 0x85, 0x68, 0xb3, 0xc7, 0x66, 0xc6,
-- 0x0f, 0x46, 0xbb, 0x4c, 0x1f, 0x0a, 0x0f, 0x6f, 0x6d, 0xb1, 0x6c, 0xce,
-- 0x8a, 0x20, 0x87, 0xc6, 0x06, 0xdb, 0x0e, 0x63, 0x0c, 0x5d, 0x1b, 0xac,
-- 0xc1, 0x73, 0x31, 0x23, 0xf7, 0xa8, 0x4e, 0xb2, 0x3a, 0xee, 0xc1, 0x95,
-- 0x1b, 0xac, 0x7d, 0x44, 0xab, 0x30, 0x9d, 0x2b, 0x7c, 0xfb, 0x07, 0xc9,
-- 0x99, 0x67, 0x14, 0xbf, 0xfa, 0xc3, 0xc3, 0x0b, 0x32, 0x9d, 0x5b, 0xf5,
-- 0x15, 0xa0, 0xb3, 0x38, 0x5e, 0xa1, 0x61, 0xd2, 0x69, 0xb3, 0x2e, 0x8b,
-- 0x62, 0xee, 0xac, 0x20, 0x7b, 0xdf, 0x5f, 0xe2, 0xeb, 0x5c, 0xd0, 0x35,
-- 0x9a, 0xcf, 0x6b, 0x8b, 0xf4, 0x03, 0x8f, 0x09, 0xc6, 0xd8, 0x55, 0x0e,
-- 0x21, 0x48, 0xe4, 0x88, 0xa6, 0x38, 0xbb, 0x61, 0xd3, 0x94, 0x13, 0x0d,
-- 0x3e, 0xac, 0x0e, 0x8a, 0x01, 0xa1, 0xe1, 0x69, 0xdb, 0x6d, 0x99, 0x92,
-- 0x79, 0x8f, 0x7c, 0x34, 0xad, 0x3f, 0xce, 0x0f, 0xd0, 0x71, 0xb3, 0x4b,
-- 0x77, 0x26, 0xdb, 0xe3, 0x5b, 0xdc, 0x4d, 0xac, 0x73, 0xfe, 0xd5, 0xba,
-- 0x0e, 0xcb, 0x7e, 0x3a, 0xc8, 0x03, 0x16, 0x5d, 0xa5, 0xb1, 0x4b, 0x8b,
-- 0x38, 0x5e, 0xb1, 0x14, 0xdd, 0x61, 0xc0, 0x51, 0xe7, 0xa5, 0x54, 0xea,
-- 0x35, 0x44, 0x67, 0x6c, 0xc7, 0xea, 0xc5, 0xd1, 0xa7, 0xfd, 0x10, 0x85,
-- 0xbf, 0x87, 0xc8, 0x5f, 0x7e, 0x8d, 0xec, 0x38, 0x3c, 0xc0, 0xf0, 0xac,
-- 0xe8, 0x7b, 0x8b, 0xe5, 0x4d, 0x32, 0x2e, 0xfd, 0x24, 0xb4, 0x80, 0x50,
-- 0xf1, 0xc7, 0x4f, 0x96, 0x8c, 0x7c, 0xe5, 0x1a, 0x97, 0xb3, 0x47, 0x0e,
-- 0x39, 0x3d, 0xe0, 0x67, 0xc5, 0x55, 0x58, 0x82, 0x59, 0x45, 0xe7, 0x52,
-- 0x91, 0x1d, 0x56, 0xac, 0xfc, 0xaa, 0x11, 0x34, 0xa8, 0x70, 0xf5, 0x48,
-- 0xf4, 0xc9, 0xce, 0xe1, 0xf8, 0xc5, 0x65, 0x3f, 0xc6, 0xbd, 0x1f, 0x59,
-- 0x77, 0x73, 0x3a, 0x5c, 0xff, 0x96, 0x2e, 0x4f, 0xdf, 0x41, 0x51, 0xa8,
-- 0x22, 0xcf, 0xfa, 0x73, 0x4c, 0x1b, 0x76, 0xc0, 0x7f, 0x15, 0x83, 0x60,
-- 0x6d, 0x6d, 0x1a, 0x1c, 0xc2, 0x41, 0x89, 0x48, 0x72, 0x44, 0x12, 0xbd,
-- 0xc4, 0x3f, 0x5f, 0x74, 0x62, 0x6e, 0x9b, 0x86, 0xb5, 0xc5, 0xc0, 0x5f,
-- 0x1c, 0x65, 0x09, 0xb7, 0x21, 0x73, 0x13, 0xc6, 0x72, 0xd5, 0x50, 0xa4,
-- 0x0d, 0x0e, 0x5b, 0x4b, 0xa5, 0x74, 0x12, 0xb2, 0x30, 0x8a, 0x71, 0x64,
-- 0x59, 0xe5, 0x9c, 0x9d, 0x4d, 0x0b, 0xfe, 0x4f, 0x13, 0x68, 0xeb, 0x5b,
-- 0xa4, 0xad, 0xf7, 0x93, 0xa6, 0x4e, 0x66, 0xc2, 0x35, 0x97, 0xb3, 0xd5,
-- 0x14, 0x08, 0xee, 0xba, 0xed, 0xf3, 0x3d, 0xe3, 0x8e, 0x5d, 0xcd, 0x76,
-- 0x4f, 0x0a, 0xf0, 0xef, 0x7a, 0x41, 0x9e, 0x11, 0x59, 0xa3, 0x05, 0xdc,
-- 0x1e, 0x3c, 0x7d, 0xf1, 0xa2, 0x71, 0xa5, 0x85, 0x9a, 0xf3, 0xb3, 0xed,
-- 0x6d, 0xc1, 0xa9, 0x6d, 0xbf, 0x46, 0x5f, 0x0c, 0x5e, 0xe0, 0xc5, 0xe6,
-- 0x6b, 0x02, 0x71, 0xbd, 0xfa, 0xbd, 0x01, 0x7f, 0xd3, 0xd1, 0x1d, 0xb4,
-- 0xfb, 0x95, 0x6f, 0xbd, 0xe0, 0xee, 0x3a, 0xde, 0xc2, 0xc3, 0xb2, 0x8c,
-- 0xc5, 0xe5, 0x25, 0x83, 0x34, 0xf2, 0x93, 0x52, 0xd3, 0xb5, 0x28, 0xef,
-- 0xd2, 0x72, 0x12, 0x4f, 0x77, 0xbb, 0x3f, 0xd8, 0x59, 0x35, 0x5d, 0xd8,
-- 0x04, 0x78, 0x24, 0xd8, 0x4f, 0xd6, 0xa0, 0x48, 0x78, 0xde, 0xf8, 0x66,
-- 0xb3, 0x6b, 0xf6, 0x9f, 0x6d, 0x6f, 0xf7, 0x9f, 0xf3, 0xbf, 0x2f, 0x5e,
-- 0xac, 0x74, 0x50, 0xf9, 0x3e, 0x9e, 0xd8, 0xd4, 0x1a, 0xa3, 0xa5, 0x76,
-- 0x3a, 0x5a, 0xdf, 0xa1, 0x56, 0x77, 0x5e, 0xbc, 0xe8, 0x73, 0x2f, 0xcf,
-- 0x3e, 0xa9, 0xf5, 0xfa, 0xae, 0xf0, 0x76, 0x16, 0x7e, 0xdd, 0xd3, 0x63,
-- 0xd5, 0x9a, 0x01, 0x6b, 0x03, 0xaf, 0x80, 0xdc, 0x1b, 0x64, 0x3a, 0xfb,
-- 0x08, 0xef, 0x30, 0x10, 0x17, 0x51, 0x02, 0x0b, 0xc0, 0x04, 0xc1, 0x32,
-- 0x9a, 0x9a, 0xc2, 0x92, 0xfa, 0x10, 0x0b, 0x33, 0xe6, 0xfb, 0xb4, 0x0b,
-- 0xc9, 0xb5, 0x99, 0xe4, 0x57, 0x0c, 0x1c, 0x6c, 0xf9, 0xc1, 0x55, 0xb2,
-- 0x41, 0xf4, 0x22, 0x00, 0x90, 0x82, 0x30, 0xab, 0xce, 0xcd, 0x75, 0x44,
-- 0x03, 0x0a, 0x46, 0xd4, 0x3a, 0x6b, 0x13, 0xeb, 0xb4, 0x15, 0xd9, 0x74,
-- 0xe2, 0x9c, 0x7e, 0x7a, 0x89, 0xc8, 0x73, 0x03, 0x79, 0x42, 0x0e, 0x1a,
-- 0x54, 0xc0, 0x8f, 0x43, 0x29, 0x7a, 0xc4, 0xb1, 0x18, 0xad, 0x3e, 0x13,
-- 0x0f, 0xf0, 0xeb, 0x31, 0xe9, 0x04, 0x8c, 0x4e, 0xc2, 0xff, 0xfc, 0x54,
-- 0xd7, 0xab, 0xa0, 0xd0, 0x8e, 0x99, 0x97, 0xc2, 0x1a, 0xa5, 0x93, 0xcc,
-- 0x4a, 0x7e, 0x14, 0x0d, 0x04, 0x36, 0xf7, 0xba, 0x98, 0x70, 0x96, 0x12,
-- 0x93, 0xee, 0x0f, 0xd9, 0x8f, 0x3e, 0x61, 0x14, 0x7e, 0x4a, 0x56, 0x68,
-- 0xef, 0xd2, 0x32, 0xb3, 0x54, 0x77, 0x52, 0xb4, 0xed, 0xec, 0xbb, 0xba,
-- 0x74, 0x93, 0x42, 0xa3, 0x59, 0x00, 0xfe, 0x84, 0x0d, 0xb2, 0xe6, 0xac,
-- 0xb8, 0x8a, 0xba, 0x3a, 0x27, 0x88, 0x27, 0x31, 0xe4, 0x3f, 0x31, 0xfa,
-- 0x22, 0xdf, 0x33, 0x0c, 0x02, 0x95, 0x7a, 0x38, 0x3a, 0x65, 0x81, 0xcc,
-- 0x5f, 0x6b, 0x05, 0xdc, 0x5f, 0x65, 0x12, 0xd0, 0x2e, 0x18, 0xf4, 0x96,
-- 0x54, 0xe8, 0x67, 0x61, 0xa8, 0xc7, 0x60, 0x49, 0xb2, 0xf8, 0x06, 0x4d,
-- 0x59, 0x69, 0xd5, 0x2a, 0xf5, 0x4a, 0x0a, 0x9e, 0x3f, 0xc0, 0xc7, 0x1a,
-- 0x3b, 0xc6, 0x9b, 0xe5, 0x98, 0x20, 0xed, 0x1a, 0xd1, 0x61, 0x18, 0xf5,
-- 0x20, 0xf4, 0x15, 0x98, 0x0b, 0xac, 0xda, 0x43, 0x21, 0x3e, 0xfc, 0xcd,
-- 0x21, 0xc6, 0xc0, 0xf4, 0x29, 0x3b, 0xc1, 0xdd, 0x86, 0x5b, 0x9a, 0x7d,
-- 0xac, 0x51, 0x9d, 0x05, 0x8f, 0xd9, 0xad, 0x74, 0x7e, 0xf4, 0xbf, 0x0e,
-- 0x87, 0x61, 0x64, 0xee, 0x3f, 0xc8, 0xd2, 0x78, 0x16, 0xe4, 0x1d, 0xf1,
-- 0x6b, 0x5d, 0x49, 0x16, 0x01, 0x80, 0x6d, 0xab, 0x6e, 0x99, 0xed, 0x0d,
-- 0x50, 0xdf, 0xae, 0x78, 0x37, 0xe1, 0xe6, 0x75, 0xe5, 0x91, 0x23, 0x24,
-- 0x99, 0x3a, 0x9d, 0x2d, 0x12, 0x6f, 0x95, 0x30, 0xaf, 0x92, 0x80, 0x1b,
-- 0x7a, 0xcc, 0x44, 0x09, 0x63, 0x4e, 0x7d, 0x2c, 0x88, 0x96, 0x8f, 0x6b,
-- 0x0b, 0xd3, 0x3e, 0x91, 0x4e, 0xb6, 0x9d, 0x2b, 0xee, 0x21, 0x57, 0x8d,
-- 0x17, 0x80, 0xfb, 0x0a, 0x4d, 0xc6, 0x7c, 0x13, 0x93, 0x4e, 0x8a, 0xc7,
-- 0x3b, 0x13, 0x5d, 0x05, 0xd7, 0x22, 0xcc, 0x0e, 0x72, 0xc2, 0x90, 0xcc,
-- 0x70, 0x9a, 0x59, 0x0e, 0x3e, 0x3c, 0x89, 0x61, 0x39, 0x8e, 0x8e, 0x7c,
-- 0x83, 0x8a, 0x2e, 0xfc, 0x12, 0x89, 0x34, 0x15, 0x8e, 0xe9, 0x84, 0x2f,
-- 0x48, 0x86, 0x26, 0xb3, 0x9c, 0x75, 0x01, 0x3a, 0xab, 0x82, 0x9a, 0x7d,
-- 0x6a, 0x5e, 0x93, 0x87, 0xa3, 0x92, 0xad, 0x9c, 0x49, 0x0e, 0xeb, 0x02,
-- 0x67, 0x1c, 0xfb, 0x78, 0xed, 0x2a, 0xc6, 0xfe, 0xcf, 0xae, 0x26, 0x21,
-- 0x1c, 0x56, 0x73, 0x15, 0xee, 0x5c, 0x50, 0x5a, 0xb0, 0xbb, 0x79, 0x10,
-- 0x2b, 0x91, 0x4e, 0xd5, 0x6c, 0xc1, 0xb8, 0x4e, 0x30, 0xbe, 0xbb, 0x3c,
-- 0x33, 0x98, 0xd0, 0xa2, 0x99, 0xd6, 0xb0, 0x1e, 0x02, 0x77, 0xc0, 0x55,
-- 0x5a, 0x42, 0x3e, 0x99, 0xc2, 0x25, 0x87, 0xf1, 0xd9, 0x0e, 0x56, 0x6a,
-- 0x86, 0x3c, 0x06, 0x24, 0xb6, 0xb7, 0x9d, 0x83, 0xd4, 0x2f, 0xca, 0xd3,
-- 0xf6, 0x69, 0x25, 0xee, 0xa2, 0x92, 0x50, 0x0d, 0x7f, 0x6a, 0x90, 0x32,
-- 0xc7, 0x61, 0x1c, 0x0f, 0x05, 0x00, 0x5c, 0x8b, 0x64, 0xd1, 0xf0, 0x57,
-- 0x4a, 0x72, 0x16, 0xaf, 0x29, 0x4f, 0xda, 0x25, 0x2a, 0x56, 0xdd, 0x96,
-- 0xda, 0x49, 0x96, 0x5a, 0xd2, 0x37, 0xed, 0x29, 0x97, 0xa1, 0x8e, 0xd2,
-- 0xf6, 0xee, 0xb2, 0x32, 0xf3, 0x70, 0x93, 0x88, 0x96, 0xa2, 0xd3, 0x37,
-- 0x4c, 0xce, 0x0b, 0x7a, 0xbe, 0xa3, 0x1e, 0x88, 0xe5, 0x2f, 0x34, 0xe0,
-- 0xe7, 0x30, 0x1e, 0x5f, 0x7d, 0x92, 0xf3, 0xf3, 0xc4, 0x00, 0xdc, 0x9c,
-- 0x6f, 0x07, 0x8e, 0x0a, 0x2c, 0xb5, 0x34, 0x70, 0xab, 0x59, 0xda, 0x57,
-- 0x26, 0x0a, 0x63, 0x23, 0xb3, 0x9c, 0xde, 0xa0, 0x48, 0x06, 0x00, 0xd0,
-- 0x06, 0xc4, 0x4b, 0xd0, 0xdc, 0xf0, 0x01, 0xc7, 0xfd, 0xce, 0x8b, 0x66,
-- 0x4c, 0x1b, 0x97, 0xa4, 0x99, 0x12, 0x43, 0x7f, 0xc9, 0xce, 0x30, 0xf8,
-- 0xc2, 0xf6, 0x56, 0xe4, 0xf0, 0x9c, 0x3a, 0xc8, 0xa2, 0x31, 0x0d, 0x81,
-- 0x43, 0xd4, 0x35, 0x57, 0x41, 0xe6, 0xe8, 0x27, 0x29, 0x09, 0x14, 0x42,
-- 0x2b, 0xe2, 0x1c, 0x5b, 0xa4, 0x79, 0x39, 0x8c, 0x3c, 0x6c, 0x5a, 0xf9,
-- 0x05, 0x55, 0x57, 0xef, 0x0d, 0x49, 0xce, 0x95, 0x97, 0xd4, 0x6a, 0x8a,
-- 0x12, 0x0a, 0xb9, 0x51, 0x6d, 0x1a, 0x64, 0xe1, 0x0a, 0xb9, 0xbd, 0x91,
-- 0x0f, 0xa3, 0x28, 0xdc, 0xb0, 0x35, 0x70, 0x62, 0xe4, 0x5d, 0x5e, 0x59,
-- 0x25, 0x59, 0x04, 0xc5, 0x60, 0xca, 0x93, 0x00, 0xf7, 0x3d, 0x8a, 0x9f,
-- 0x19, 0x29, 0x1c, 0xed, 0x50, 0x72, 0x59, 0xf9, 0xfc, 0xf3, 0xc1, 0xa2,
-- 0xfe, 0x0b, 0x49, 0xdf, 0xdb, 0xca, 0xea, 0xf1, 0x96, 0x80, 0x99, 0x80,
-- 0xc4, 0xe7, 0x00, 0xd3, 0x73, 0xda, 0x41, 0x54, 0x4e, 0x37, 0x72, 0xf0,
-- 0x88, 0xf9, 0x21, 0xa8, 0x46, 0x14, 0xe4, 0xe3, 0x80, 0xa3, 0x9a, 0x47,
-- 0xb1, 0xc3, 0x40, 0x7b, 0x69, 0xc0, 0x20, 0xc1, 0xa2, 0x3b, 0xd7, 0x9b,
-- 0x01, 0x86, 0x34, 0x2b, 0x6f, 0xd0, 0x2b, 0xbe, 0x02, 0x56, 0x07, 0xf5,
-- 0x72, 0xbd, 0x7b, 0x77, 0xeb, 0xb8, 0x50, 0xaf, 0x26, 0x16, 0x98, 0x03,
-- 0xad, 0x0a, 0x36, 0xbe, 0xcb, 0xf4, 0xce, 0xa7, 0x07, 0x23, 0x90, 0xb8,
-- 0x2d, 0x4b, 0xc8, 0x05, 0x2e, 0xc2, 0x23, 0xa8, 0x5f, 0x96, 0x32, 0xa9,
-- 0xd1, 0x3d, 0x3e, 0xa3, 0x94, 0xad, 0xce, 0x13, 0xfd, 0xc4, 0x25, 0xe8,
-- 0x74, 0x04, 0x3e, 0xe9, 0xe6, 0x3e, 0x1c, 0xbc, 0xb2, 0x33, 0x7c, 0xd2,
-- 0x3c, 0x03, 0xac, 0x11, 0x76, 0xa1, 0xc9, 0x43, 0x88, 0x03, 0x27, 0x04,
-- 0x00, 0x3e, 0x62, 0x93, 0x24, 0xe1, 0x84, 0x2d, 0x0c, 0x99, 0x85, 0xa9,
-- 0xc0, 0xfd, 0x2d, 0x09, 0xec, 0xcc, 0x6d, 0x14, 0x76, 0x3f, 0x86, 0xdf,
-- 0x0a, 0xfc, 0x47, 0xb9, 0xd5, 0x42, 0x92, 0xce, 0x71, 0x25, 0x7b, 0x9d,
-- 0x48, 0xe6, 0xac, 0x96, 0x63, 0xe2, 0x65, 0x7c, 0x54, 0x96, 0x8b, 0x61,
-- 0x8c, 0x75, 0xef, 0xe2, 0x95, 0xf4, 0x5d, 0xea, 0x7e, 0x3b, 0x4c, 0x7e,
-- 0x43, 0xea, 0x87, 0x46, 0x92, 0x56, 0x56, 0x67, 0xc8, 0x82, 0x3d, 0x22,
-- 0x9e, 0x08, 0x56, 0x0a, 0x90, 0x58, 0x37, 0x65, 0x9d, 0xb3, 0x66, 0xaf,
-- 0x08, 0x9e, 0xcd, 0x1e, 0x2f, 0x8a, 0xd4, 0xa2, 0xe9, 0x9b, 0x2f, 0xe0,
-- 0xe9, 0xc7, 0x8f, 0xf1, 0x4e, 0xf8, 0xa2, 0xa9, 0xd0, 0x15, 0xd5, 0x51,
-- 0xfc, 0xec, 0xe3, 0xc7, 0xe6, 0x97, 0x0f, 0x94, 0xc3, 0x64, 0xd9, 0x61,
-- 0x54, 0x48, 0xba, 0xbd, 0xac, 0x54, 0x1a, 0xac, 0xa2, 0x41, 0x8e, 0x2a,
-- 0x52, 0xd8, 0x5d, 0x9a, 0x77, 0xe2, 0x41, 0xaa, 0xf6, 0x27, 0x1c, 0xa9,
-- 0xbe, 0xce, 0xfc, 0x35, 0xc1, 0xf0, 0x2b, 0xd7, 0x74, 0x2a, 0x05, 0x91,
-- 0x5f, 0x89, 0xde, 0x55, 0xc8, 0x5c, 0x6a, 0xf6, 0x52, 0x3b, 0x48, 0x21,
-- 0x95, 0xc2, 0x69, 0x80, 0xc2, 0x5e, 0xce, 0xeb, 0x7c, 0xca, 0xef, 0xa0,
-- 0x78, 0x14, 0xbd, 0xbe, 0x43, 0xeb, 0x9f, 0xcf, 0x97, 0xac, 0x53, 0x69,
-- 0xc5, 0x7b, 0xee, 0xd0, 0xce, 0x62, 0xe7, 0xb2, 0x4f, 0xd3, 0xfb, 0xc4,
-- 0xf9, 0xf5, 0xad, 0x72, 0x66, 0x00, 0x05, 0x80, 0x71, 0x09, 0xee, 0x96,
-- 0xe5, 0x41, 0x61, 0x2d, 0x06, 0x78, 0xb5, 0xab, 0x34, 0x95, 0xdd, 0x41,
-- 0x9a, 0xf4, 0x95, 0x7d, 0xa4, 0xc5, 0x96, 0x50, 0x3f, 0x49, 0x5d, 0x24,
-- 0x45, 0x8f, 0x6f, 0x99, 0xab, 0xa2, 0xa4, 0x0d, 0x9d, 0xa9, 0xd4, 0x21,
-- 0x41, 0x8b, 0x51, 0xd0, 0x80, 0x74, 0xe5, 0xaa, 0x4a, 0x49, 0x00, 0xa9,
-- 0x14, 0x24, 0x80, 0x77, 0xb0, 0xa8, 0x55, 0x4e, 0xb5, 0x62, 0x0a, 0x58,
-- 0x5d, 0x1b, 0xf5, 0x43, 0x57, 0xd1, 0x6e, 0x78, 0x0c, 0xff, 0xf1, 0x39,
-- 0x3f, 0xc1, 0x1a, 0x3d, 0x50, 0x0b, 0xcb, 0x04, 0xe0, 0x6a, 0x9a, 0x65,
-- 0x0b, 0x8d, 0xaa, 0xb0, 0x52, 0xaf, 0x32, 0x2d, 0x3d, 0x86, 0x22, 0x02,
-- 0x28, 0x15, 0xaa, 0x5a, 0xb3, 0xea, 0x80, 0xeb, 0xed, 0xcd, 0x9e, 0x27,
-- 0xbe, 0x67, 0x9c, 0xa2, 0x5a, 0xb7, 0xcf, 0xd5, 0x86, 0xa8, 0x86, 0x26,
-- 0xce, 0x74, 0x9f, 0x48, 0xb7, 0x65, 0xba, 0xca, 0xba, 0x6d, 0x8e, 0x64,
-- 0x74, 0xad, 0x37, 0x87, 0x0d, 0x29, 0x29, 0x86, 0x8b, 0x11, 0xdf, 0x2b,
-- 0xe4, 0xc1, 0x4c, 0x2a, 0xc4, 0xb3, 0xe0, 0xa3, 0xec, 0x0f, 0x41, 0xa5,
-- 0x8a, 0x50, 0x39, 0x0c, 0x58, 0x0b, 0xe3, 0xc7, 0x63, 0x09, 0x23, 0x56,
-- 0x8b, 0xc0, 0xef, 0x96, 0x1a, 0x61, 0xba, 0xba, 0x8d, 0xdc, 0x53, 0x1b,
-- 0x8f, 0x7d, 0xe8, 0x29, 0x20, 0x06, 0x64, 0xff, 0x67, 0x11, 0xc4, 0xa3,
-- 0xf5, 0xd1, 0xc4, 0x94, 0x28, 0xdb, 0xcc, 0x0f, 0x6a, 0x54, 0x0f, 0xc7,
-- 0x45, 0xf2, 0x84, 0xbc, 0x63, 0x5c, 0xd8, 0x8e, 0xdb, 0x73, 0x55, 0xa1,
-- 0x22, 0x33, 0x98, 0xf2, 0x15, 0x1b, 0x15, 0x00, 0x1e, 0x52, 0x9e, 0x06,
-- 0x17, 0x19, 0xdb, 0x60, 0x04, 0x21, 0x1d, 0xda, 0x26, 0x7f, 0x0c, 0x6c,
-- 0x50, 0x8d, 0x13, 0x41, 0xef, 0x11, 0x62, 0x02, 0x40, 0xc3, 0x85, 0xdd,
-- 0x4c, 0xc2, 0x82, 0x41, 0x5a, 0x2f, 0xe8, 0x5d, 0xc1, 0xb9, 0xcc, 0xae,
-- 0x1a, 0x80, 0x6b, 0x47, 0xdf, 0x8c, 0xa1, 0xc1, 0xb5, 0x9d, 0x4c, 0x1a,
-- 0xe8, 0x37, 0x6a, 0x0d, 0xdb, 0xa0, 0x91, 0xa5, 0x2e, 0x40, 0x61, 0x82,
-- 0xd8, 0xa7, 0x77, 0x5c, 0x47, 0xc4, 0x9a, 0x5c, 0x6e, 0xec, 0xb8, 0x44,
-- 0xd4, 0x03, 0xcf, 0xa7, 0xa3, 0xba, 0x11, 0x76, 0x80, 0x1a, 0xc9, 0x19,
-- 0xd6, 0xf4, 0xa2, 0x50, 0x8e, 0x12, 0xd5, 0x4d, 0x94, 0x1c, 0x47, 0x1d,
-- 0xcd, 0x7a, 0xe5, 0x4a, 0xbb, 0xf0, 0xeb, 0x52, 0x72, 0x01, 0x55, 0xef,
-- 0x82, 0xb2, 0x77, 0x43, 0xb9, 0x18, 0x9b, 0x16, 0x8a, 0x08, 0x4d, 0x13,
-- 0xb4, 0x5b, 0x0b, 0xfe, 0x9c, 0x95, 0x55, 0x73, 0x8c, 0xf6, 0x9f, 0xc8,
-- 0xa4, 0x2a, 0x94, 0xfa, 0xcc, 0xa7, 0x71, 0xc4, 0xfd, 0x39, 0x3e, 0x14,
-- 0x5d, 0xec, 0x6f, 0xcb, 0x9c, 0x67, 0x24, 0xe9, 0xeb, 0xaf, 0x51, 0x0e,
-- 0xbb, 0xd2, 0xd8, 0xdd, 0x2b, 0x48, 0x62, 0x1a, 0x46, 0x54, 0x2a, 0x57,
-- 0x59, 0x51, 0xe4, 0x9e, 0xef, 0x10, 0x01, 0xf9, 0x07, 0xb4, 0xf3, 0x8c,
-- 0x2e, 0xa9, 0xa1, 0x43, 0x28, 0x26, 0x86, 0xd0, 0x01, 0xde, 0xad, 0x86,
-- 0x9b, 0xea, 0x26, 0x96, 0x40, 0xfb, 0x8d, 0xf8, 0x71, 0x38, 0xed, 0xd5,
-- 0x09, 0x51, 0x73, 0x46, 0x02, 0x69, 0x7e, 0x5b, 0x02, 0xb0, 0x63, 0x55,
-- 0x6c, 0xb9, 0x29, 0x0b, 0x4d, 0x6e, 0x93, 0x4d, 0x23, 0x4c, 0xaf, 0x4a,
-- 0xab, 0xe9, 0x20, 0x6f, 0x13, 0xbe, 0x80, 0xc7, 0xf9, 0xe2, 0xe2, 0xbe,
-- 0x76, 0x03, 0x27, 0x34, 0x9d, 0xef, 0x93, 0x26, 0x1d, 0x23, 0xca, 0x3d,
-- 0xc4, 0x6e, 0x9e, 0xec, 0x34, 0x54, 0xa1, 0x73, 0x6c, 0x05, 0x2d, 0xeb,
-- 0x00, 0x8b, 0xb8, 0x02, 0xd7, 0xd5, 0xb3, 0xf3, 0x41, 0x25, 0x52, 0x5c,
-- 0x20, 0x6d, 0x61, 0x53, 0x2c, 0x86, 0xdd, 0x90, 0x45, 0xf9, 0x10, 0x46,
-- 0x95, 0x71, 0x11, 0xbf, 0xd0, 0x98, 0x73, 0x35, 0x95, 0x60, 0x29, 0x03,
-- 0x38, 0x11, 0xb0, 0x13, 0x81, 0x39, 0xb9, 0x60, 0x09, 0x51, 0x42, 0xf4,
-- 0x38, 0x95, 0xf6, 0xe2, 0xf8, 0x3c, 0x50, 0x01, 0xbc, 0xf9, 0x20, 0xe6,
-- 0x3c, 0x9c, 0x76, 0x26, 0xb2, 0x33, 0x4c, 0x91, 0x28, 0x75, 0x99, 0x85,
-- 0xe5, 0x40, 0xad, 0xd8, 0xa5, 0x98, 0x56, 0xad, 0x22, 0x81, 0xda, 0xcd,
-- 0xda, 0x14, 0x29, 0x5d, 0x87, 0x36, 0x0a, 0x49, 0xf7, 0xa6, 0xb1, 0x0f,
-- 0x2c, 0xf9, 0x9c, 0x79, 0x04, 0x66, 0x43, 0x2c, 0xed, 0x6f, 0x22, 0x0a,
-- 0xa8, 0x0a, 0x30, 0x88, 0xac, 0x20, 0x75, 0xc2, 0x20, 0x7a, 0x53, 0x60,
-- 0xd4, 0x64, 0xf3, 0x71, 0x79, 0xdf, 0xc0, 0x68, 0x9b, 0x7c, 0x42, 0x31,
-- 0xaf, 0xa6, 0xf2, 0xc0, 0x80, 0x80, 0xcc, 0x94, 0x18, 0x05, 0x57, 0x6b,
-- 0xbc, 0xd1, 0x27, 0x6e, 0x8c, 0xcd, 0x73, 0xcd, 0x9b, 0x3f, 0x8c, 0x9a,
-- 0x4b, 0xeb, 0x06, 0xa0, 0x26, 0xab, 0x23, 0x72, 0x30, 0x4c, 0x8f, 0x0a,
-- 0x8a, 0x98, 0x8e, 0xd4, 0xec, 0x75, 0x2b, 0xf4, 0x15, 0x4b, 0x03, 0x97,
-- 0x4b, 0x98, 0x45, 0x35, 0x6d, 0xae, 0xb5, 0xdb, 0x58, 0x9f, 0x8e, 0x60,
-- 0xb9, 0x7e, 0xa2, 0x04, 0xa0, 0x14, 0xa0, 0x24, 0x40, 0x9b, 0xa9, 0x70,
-- 0xa3, 0x21, 0x05, 0x68, 0xda, 0xff, 0x8a, 0xfd, 0xbf, 0x90, 0x73, 0x58,
-- 0xab, 0xa9, 0xe4, 0x53, 0xb7, 0xdd, 0x6d, 0xf4, 0x27, 0x57, 0x1d, 0x5c,
-- 0xb9, 0x1b, 0x7e, 0x3b, 0x74, 0x3f, 0x60, 0x41, 0xf3, 0x54, 0x03, 0x1a,
-- 0xd9, 0x48, 0xb5, 0xdd, 0x58, 0x20, 0x78, 0x36, 0x7c, 0xb6, 0x39, 0xfc,
-- 0xd4, 0x6d, 0x71, 0x32, 0xb6, 0x6e, 0x4a, 0x0c, 0xd3, 0x99, 0x3e, 0xb2,
-- 0x25, 0x10, 0x60, 0x19, 0x7c, 0x28, 0x8a, 0x56, 0x57, 0xa0, 0xdc, 0x50,
-- 0xbe, 0xaa, 0x1b, 0xa1, 0xcf, 0x7c, 0x91, 0xa0, 0x04, 0x43, 0x8a, 0xfc,
-- 0x81, 0xb0, 0xae, 0xec, 0xe5, 0x34, 0xbd, 0xeb, 0x82, 0x0c, 0xc5, 0x61,
-- 0x96, 0x72, 0x54, 0xb4, 0xda, 0x61, 0xf8, 0x6c, 0xe5, 0xa9, 0xf7, 0xab,
-- 0xc3, 0xfd, 0xf3, 0x8b, 0x61, 0xfb, 0xca, 0x89, 0xd2, 0x59, 0x78, 0xfb,
-- 0xcc, 0x4c, 0x04, 0xae, 0xc0, 0x86, 0xc5, 0x84, 0xcb, 0x5e, 0x96, 0x0e,
-- 0xae, 0x89, 0x87, 0x27, 0xa3, 0xb3, 0xf6, 0x39, 0xff, 0xa6, 0x03, 0x40,
-- 0x07, 0x12, 0x22, 0x1c, 0x9e, 0xa3, 0x7c, 0xca, 0x33, 0xa0, 0x71, 0x11,
-- 0xeb, 0x9d, 0x69, 0x9c, 0x3f, 0x97, 0x1e, 0x4e, 0x8a, 0x29, 0x9b, 0x44,
-- 0xa4, 0x9b, 0x16, 0x78, 0x6e, 0x54, 0x0a, 0x70, 0xff, 0xec, 0xdd, 0xd1,
-- 0xbb, 0xaf, 0xf7, 0x1a, 0x77, 0xe6, 0xb4, 0x28, 0xaa, 0x4c, 0x7d, 0xf4,
-- 0x82, 0xdb, 0x2b, 0xab, 0x25, 0xf9, 0x89, 0x0e, 0xf1, 0xa1, 0xe3, 0x12,
-- 0x67, 0x38, 0x2d, 0x01, 0x27, 0xac, 0x6e, 0xc4, 0x34, 0xa7, 0x65, 0x23,
-- 0x58, 0xe2, 0x19, 0x3e, 0x5c, 0xc3, 0xb3, 0x2a, 0xc6, 0x37, 0xd5, 0x53,
-- 0x31, 0x76, 0x7d, 0x72, 0xe4, 0xf7, 0xf9, 0xc9, 0xc1, 0xb7, 0xe7, 0x4f,
-- 0x83, 0xb8, 0xef, 0xba, 0x65, 0xb8, 0x51, 0xa4, 0x71, 0xbc, 0x11, 0xa7,
-- 0x49, 0x3e, 0x12, 0xf4, 0xfd, 0x40, 0xcd, 0xe5, 0xce, 0x63, 0xe5, 0xcb,
-- 0x13, 0xb0, 0x29, 0x84, 0x4d, 0x5d, 0x79, 0xb1, 0x74, 0x98, 0xcd, 0x01,
-- 0x5c, 0x52, 0xdf, 0x6a, 0x15, 0x74, 0x54, 0x20, 0xb3, 0xca, 0x05, 0x41,
-- 0xad, 0x82, 0x28, 0x3a, 0x8e, 0x61, 0x20, 0xc4, 0x58, 0xf2, 0x59, 0xbf,
-- 0x2d, 0xee, 0x10, 0xa7, 0x20, 0xf9, 0x6f, 0xba, 0xe4, 0x9e, 0x81, 0x17,
-- 0xe1, 0x00, 0x35, 0x56, 0x15, 0x70, 0xd4, 0x95, 0xb7, 0x68, 0x72, 0x86,
-- 0x0a, 0xf1, 0x43, 0xd5, 0xcd, 0x4e, 0xf5, 0xa9, 0xbd, 0xad, 0x2d, 0x6f,
-- 0xce, 0x92, 0xe0, 0xc2, 0xe1, 0xef, 0xa7, 0x15, 0x48, 0x9f, 0xe9, 0x6f,
-- 0x22, 0x8a, 0xf4, 0xd3, 0xa8, 0x22, 0x92, 0x92, 0x7f, 0x25, 0x55, 0x7c,
-- 0xbe, 0x8a, 0xd9, 0xea, 0xf4, 0x7f, 0x05, 0x4d, 0x18, 0xda, 0xfb, 0x7f,
-- 0x27, 0xaa, 0x48, 0x3f, 0x8d, 0x2c, 0xd2, 0x06, 0x5d, 0xac, 0xc8, 0x49,
-- 0xfe, 0x3d, 0xeb, 0x17, 0x62, 0x18, 0xcf, 0x06, 0x0e, 0x8d, 0xf9, 0x31,
-- 0x8a, 0x69, 0x98, 0x68, 0x59, 0x48, 0x00, 0xd1, 0x3c, 0xd3, 0xd9, 0x6e,
-- 0xc0, 0x12, 0x9c, 0x85, 0xa0, 0x5d, 0x66, 0x8c, 0xef, 0x06, 0x85, 0xc6,
-- 0xdd, 0xb7, 0xf9, 0x28, 0x07, 0x72, 0xb4, 0x25, 0xf8, 0x41, 0x42, 0x5d,
-- 0x51, 0x38, 0xf3, 0xaf, 0xa7, 0xb5, 0xff, 0x23, 0x38, 0xd0, 0x33, 0x8f,
-- 0xa5, 0xfd, 0x29, 0x34, 0xf7, 0xec, 0xda, 0xd1, 0x5c, 0x57, 0x41, 0x3f,
-- 0xe3, 0x4d, 0xff, 0x68, 0x92, 0x6b, 0xc9, 0x1e, 0x1d, 0x72, 0x95, 0xad,
-- 0x3a, 0xdc, 0xd4, 0x25, 0xa9, 0xd8, 0x88, 0x6e, 0x08, 0x21, 0x9b, 0x35,
-- 0x09, 0x24, 0xc6, 0x76, 0x54, 0x3a, 0x76, 0xa9, 0xbc, 0x81, 0xf5, 0x58,
-- 0xd0, 0x90, 0x68, 0x04, 0xd1, 0x9d, 0xf9, 0xec, 0xb7, 0xb0, 0x47, 0xa3,
-- 0x74, 0xce, 0xa7, 0x1f, 0x49, 0xd2, 0xb0, 0xd0, 0xb7, 0x1c, 0x0c, 0x71,
-- 0x13, 0x75, 0xc4, 0x14, 0xc2, 0x19, 0x0c, 0x00, 0x58, 0x4b, 0xb2, 0x7a,
-- 0x94, 0xd6, 0x1b, 0x7c, 0xb4, 0x23, 0xb3, 0x60, 0x55, 0x82, 0xd5, 0xff,
-- 0x29, 0x3c, 0xf4, 0xd9, 0xa7, 0x91, 0xf3, 0x3f, 0xe3, 0x66, 0xfd, 0x6f,
-- 0x44, 0xbc, 0x1d, 0xdb, 0xbc, 0xa1, 0xc8, 0x58, 0xa2, 0x19, 0xca, 0xc5,
-- 0xb2, 0x29, 0x38, 0x27, 0x4e, 0x84, 0xc7, 0x22, 0x1e, 0x9d, 0x7e, 0xf7,
-- 0x5c, 0x02, 0xdf, 0xce, 0x63, 0x30, 0xe7, 0xe3, 0xd7, 0xfb, 0xa7, 0x1d,
-- 0x37, 0xc3, 0x15, 0x29, 0xfc, 0x8b, 0x7c, 0xc0, 0x6a, 0x15, 0x9b, 0xe0,
-- 0x5e, 0xea, 0x2f, 0x4c, 0xe2, 0x5d, 0x46, 0x46, 0x33, 0x92, 0xda, 0xf3,
-- 0x82, 0x16, 0x2b, 0x1e, 0x63, 0xcc, 0x52, 0xf5, 0x33, 0x76, 0x38, 0x8d,
-- 0x67, 0x93, 0x2d, 0xf9, 0x73, 0x70, 0xf9, 0xb7, 0x49, 0xac, 0xea, 0x85,
-- 0x50, 0xac, 0x8d, 0xb4, 0x38, 0x85, 0xb7, 0xcd, 0xeb, 0x55, 0xe5, 0x55,
-- 0xab, 0xbd, 0xe0, 0x94, 0x27, 0x9a, 0xe9, 0x09, 0x18, 0xd3, 0x55, 0xf3,
-- 0x12, 0x9a, 0x8b, 0xf0, 0xb6, 0x05, 0x9d, 0x1e, 0x38, 0xd7, 0xfc, 0xf5,
-- 0x56, 0xd0, 0x94, 0x6b, 0xbf, 0xe3, 0x33, 0x6b, 0xbd, 0x23, 0x81, 0x87,
-- 0x3b, 0x93, 0xb6, 0x18, 0xe1, 0x4d, 0x47, 0x15, 0xf4, 0x13, 0x7f, 0x09,
-- 0x7b, 0x03, 0xe7, 0xfe, 0x57, 0x11, 0xee, 0x3d, 0xbb, 0xf3, 0xfd, 0x5d,
-- 0x2b, 0xcf, 0xbb, 0x7d, 0x97, 0x2a, 0x09, 0x8a, 0x47, 0x36, 0x1f, 0xe7,
-- 0x8b, 0x74, 0xaa, 0x49, 0x86, 0x0f, 0x55, 0xeb, 0x68, 0x17, 0x3b, 0x68,
-- 0x4e, 0x88, 0x94, 0xed, 0x76, 0x65, 0xc4, 0x26, 0xfc, 0xab, 0x3c, 0x97,
-- 0x58, 0x02, 0x2f, 0xf6, 0x0e, 0xc7, 0x53, 0xb5, 0x74, 0x09, 0xfb, 0x47,
-- 0x46, 0x29, 0x1e, 0x89, 0x93, 0x92, 0xe0, 0xa0, 0x06, 0xf4, 0xd0, 0xce,
-- 0x8b, 0xe7, 0x3b, 0x49, 0xc5, 0xc5, 0xed, 0x73, 0xae, 0x08, 0x25, 0x0d,
-- 0x3c, 0x1d, 0x3e, 0xd9, 0x7a, 0x3a, 0x7c, 0x9a, 0xf8, 0xba, 0x91, 0xa3,
-- 0xcc, 0x3a, 0x20, 0xc6, 0x19, 0xa1, 0x32, 0xc8, 0x79, 0x7a, 0x77, 0x78,
-- 0xc0, 0xac, 0xda, 0x12, 0x4e, 0x5b, 0xea, 0x9d, 0x81, 0x02, 0xd1, 0xaa,
-- 0x0d, 0x5d, 0x8e, 0x6a, 0x97, 0x52, 0xda, 0xb1, 0x1c, 0x89, 0xd1, 0x26,
-- 0x42, 0xf4, 0xe7, 0x6e, 0x24, 0xcc, 0x2c, 0x85, 0x4c, 0x75, 0x65, 0xba,
-- 0x20, 0x28, 0xc2, 0x45, 0x09, 0x96, 0x6c, 0xf8, 0x70, 0xfd, 0x89, 0xaa,
-- 0x26, 0x3d, 0xb5, 0xec, 0x8e, 0x12, 0x3a, 0x53, 0x63, 0x24, 0x5c, 0x81,
-- 0x5c, 0xca, 0x56, 0xfc, 0xcc, 0xfa, 0x8a, 0xc5, 0xcf, 0x37, 0x52, 0x2a,
-- 0x2c, 0xf8, 0x05, 0x77, 0x53, 0x07, 0x0a, 0x84, 0x07, 0xd9, 0x96, 0x8a,
-- 0x12, 0xa8, 0xfa, 0xb9, 0x3e, 0x58, 0xb7, 0x4b, 0xca, 0x62, 0x67, 0xb8,
-- 0xb7, 0x5a, 0x2c, 0xa6, 0x6d, 0x14, 0xf2, 0x7f, 0xb8, 0xdc, 0x5a, 0xf3,
-- 0x6d, 0x50, 0x67, 0xd3, 0x79, 0x56, 0x6b, 0x29, 0xb9, 0xe4, 0xe5, 0xc9,
-- 0xe9, 0xc5, 0xab, 0xdb, 0x74, 0x1a, 0xc5, 0x78, 0x30, 0x8a, 0x9f, 0x15,
-- 0xde, 0x73, 0xd6, 0x5c, 0x7e, 0x33, 0x48, 0x8e, 0x3a, 0x77, 0x39, 0x42,
-- 0x41, 0x89, 0xbe, 0x28, 0x17, 0xe8, 0xe2, 0xe2, 0xc7, 0xd3, 0xc3, 0x57,
-- 0x2f, 0xd9, 0x16, 0xfc, 0x05, 0x1b, 0xe4, 0xab, 0x86, 0x69, 0x98, 0x4b,
-- 0xbc, 0xc6, 0x37, 0xe3, 0x0f, 0xaf, 0x8f, 0xce, 0x4f, 0x8f, 0x4f, 0x0e,
-- 0x5e, 0xbd, 0xfc, 0x81, 0x5d, 0x98, 0xb4, 0x7a, 0xf7, 0xc1, 0xbb, 0xee,
-- 0x33, 0x97, 0xee, 0x10, 0x97, 0x5b, 0x3a, 0xfc, 0xfe, 0xc3, 0xe1, 0xbb,
-- 0xef, 0x5e, 0xbd, 0xbc, 0x4d, 0xcb, 0x3e, 0xcf, 0x4f, 0xde, 0x66, 0x93,
-- 0x6c, 0x47, 0xc5, 0xd3, 0x60, 0x8d, 0x2e, 0x50, 0x7f, 0x6b, 0xc1, 0xb1,
-- 0x83, 0x0f, 0x84, 0x95, 0xc9, 0x5d, 0xe6, 0x2b, 0x1c, 0xb5, 0x05, 0xfc,
-- 0x20, 0x8a, 0xad, 0x99, 0xd2, 0xfa, 0xfe, 0xec, 0x78, 0xd8, 0x49, 0x30,
-- 0x0e, 0x03, 0xdc, 0x23, 0xc0, 0xab, 0x6d, 0xc8, 0xb7, 0x0a, 0xb8, 0xf5,
-- 0x03, 0x97, 0xdc, 0xa6, 0x90, 0x95, 0x0f, 0xc6, 0xd0, 0x09, 0xeb, 0xf2,
-- 0xe1, 0xb4, 0xae, 0xf8, 0x98, 0x04, 0xd1, 0xd0, 0x0c, 0x72, 0x64, 0xd0,
-- 0x6f, 0x59, 0x64, 0xca, 0x34, 0x36, 0x79, 0xf9, 0xd8, 0x77, 0xf8, 0xde,
-- 0x21, 0xd4, 0x70, 0x04, 0x08, 0xe6, 0x76, 0x20, 0x40, 0xb9, 0x92, 0xa0,
-- 0xd2, 0x9c, 0x84, 0x30, 0xe2, 0xa2, 0xec, 0x46, 0x49, 0xe7, 0x0a, 0x51,
-- 0xd7, 0x1c, 0x1a, 0x6f, 0xe3, 0x2a, 0x85, 0x7e, 0x9b, 0xc9, 0x0f, 0x96,
-- 0x9a, 0x16, 0x40, 0xd7, 0x77, 0xa4, 0xc7, 0x35, 0xf1, 0x35, 0xc5, 0x13,
-- 0xc9, 0x32, 0x25, 0xe7, 0xee, 0x71, 0xfa, 0xa5, 0x8b, 0x1c, 0x96, 0x8d,
-- 0xf5, 0xe8, 0xcc, 0xb1, 0x2f, 0x13, 0xf5, 0x96, 0xdd, 0x99, 0xb3, 0xc3,
-- 0x56, 0x38, 0x58, 0xea, 0x8d, 0xf3, 0x4d, 0x97, 0xee, 0xc8, 0x2d, 0x9e,
-- 0xbe, 0xbf, 0x08, 0x32, 0x5d, 0xa3, 0x68, 0xb5, 0xe8, 0x10, 0xb6, 0x04,
-- 0x65, 0xbf, 0x50, 0xbd, 0x41, 0xaf, 0x5d, 0xc9, 0xc0, 0x4c, 0xfd, 0xc4,
-- 0x18, 0xb8, 0x64, 0xb0, 0xcf, 0xa4, 0x8f, 0x44, 0x3f, 0x8d, 0x23, 0x96,
-- 0x5c, 0x2f, 0xae, 0xc1, 0x2d, 0x81, 0x48, 0x99, 0x43, 0xdc, 0x0f, 0xfa,
-- 0x19, 0x86, 0xfd, 0x88, 0xe3, 0x6d, 0x33, 0x4a, 0xea, 0xbb, 0x6f, 0x47,
-- 0xea, 0xbb, 0xbe, 0x79, 0x9c, 0x0e, 0xd2, 0x4c, 0x46, 0x06, 0x9b, 0x37,
-- 0xbb, 0x15, 0x46, 0x44, 0x79, 0x1d, 0xa8, 0xfd, 0x72, 0x7d, 0x01, 0x79,
-- 0x5b, 0x4a, 0xf8, 0x72, 0x76, 0x3a, 0x82, 0xbe, 0x0c, 0x52, 0x59, 0xbd,
-- 0x4d, 0xe6, 0x53, 0xb4, 0x66, 0xab, 0x4e, 0xd0, 0x20, 0xd9, 0xc4, 0x8e,
-- 0x45, 0xfd, 0xb1, 0x25, 0x20, 0x33, 0x2b, 0x1c, 0x5c, 0xf8, 0xa8, 0x3d,
-- 0x0e, 0xba, 0xeb, 0x0c, 0xc0, 0x42, 0x41, 0xa7, 0xc1, 0x45, 0x84, 0x47,
-- 0xc6, 0x2f, 0x70, 0xc8, 0x5a, 0x10, 0xca, 0x8e, 0x08, 0x51, 0xde, 0x17,
-- 0xa1, 0x24, 0xcd, 0xb8, 0x81, 0x50, 0x31, 0xd4, 0x00, 0x5a, 0xf6, 0x87,
-- 0xac, 0xc8, 0x6b, 0xae, 0x92, 0xde, 0xd5, 0xb4, 0x18, 0x8d, 0x68, 0x52,
-- 0x3d, 0x87, 0xfd, 0x7e, 0x41, 0x6c, 0xf3, 0x0a, 0x22, 0x6f, 0xdf, 0xd0,
-- 0xea, 0xfc, 0x61, 0x45, 0xcd, 0x14, 0xf4, 0xb5, 0x2a, 0x37, 0x17, 0x7b,
-- 0x6b, 0xc8, 0xe6, 0xb6, 0xaf, 0xa8, 0x69, 0x72, 0x1f, 0x14, 0x5c, 0x43,
-- 0x2c, 0x16, 0x7f, 0x6a, 0xfd, 0x47, 0x61, 0xbc, 0x9c, 0x4b, 0xea, 0xb3,
-- 0x3e, 0x95, 0xf9, 0x80, 0xe5, 0x68, 0x2d, 0x8b, 0xbc, 0x5a, 0x51, 0xae,
-- 0xfe, 0x22, 0xe9, 0xfd, 0x3b, 0x0f, 0x62, 0xa7, 0xcf, 0x3f, 0x77, 0xff,
-- 0xb3, 0x67, 0x15, 0x4b, 0xb8, 0x46, 0x94, 0x0c, 0xbe, 0xe6, 0x22, 0x11,
-- 0x95, 0x95, 0x49, 0xe9, 0xa8, 0x8a, 0xc2, 0x6e, 0xc3, 0x95, 0xad, 0xe7,
-- 0xb3, 0xab, 0x9f, 0x76, 0x06, 0x3b, 0xdb, 0xdb, 0xdb, 0xbf, 0x0c, 0x17,
-- 0xbc, 0x74, 0x97, 0x68, 0x9e, 0x7e, 0x0e, 0x17, 0xf9, 0x98, 0x0d, 0xf9,
-- 0xb4, 0x99, 0x79, 0xca, 0x4d, 0x6f, 0x49, 0x7f, 0x5b, 0xc1, 0xcd, 0x5f,
-- 0x8f, 0x17, 0x83, 0x79, 0xd1, 0x15, 0x22, 0x73, 0xb1, 0x2c, 0xe7, 0x41,
-- 0xb9, 0xbf, 0x0f, 0xef, 0x4e, 0x5e, 0x1f, 0x1e, 0xef, 0xff, 0x68, 0x21,
-- 0xb6, 0x0e, 0x36, 0x81, 0x07, 0xf2, 0x21, 0x4b, 0xab, 0xfb, 0x0f, 0x55,
-- 0x56, 0xd3, 0x97, 0x1b, 0x4f, 0x36, 0x91, 0xf9, 0x1a, 0xd5, 0xd6, 0xbd,
-- 0xca, 0x1a, 0x35, 0xc2, 0x35, 0x62, 0xc9, 0xdf, 0xde, 0xc3, 0xb6, 0xeb,
-- 0xa9, 0x11, 0xf8, 0x5a, 0xb3, 0x37, 0x64, 0x34, 0xbd, 0xa9, 0xf2, 0xbf,
-- 0xd3, 0xbd, 0xc3, 0xd8, 0x7e, 0x71, 0x3c, 0xf3, 0x85, 0x22, 0x28, 0xd4,
-- 0x09, 0xff, 0x96, 0x7c, 0x75, 0xfc, 0x2d, 0x87, 0x91, 0x3b, 0xa5, 0x66,
-- 0x26, 0x29, 0xfb, 0xc9, 0x17, 0xcf, 0x76, 0x76, 0x37, 0x83, 0x3a, 0xea,
-- 0x9c, 0x8c, 0xc2, 0x87, 0x33, 0x72, 0xab, 0xff, 0x5d, 0x03, 0x04, 0x02,
-- 0xae, 0xec, 0x7d, 0x8c, 0x88, 0x6d, 0xb1, 0x5b, 0x0e, 0xa0, 0x73, 0xf0,
-- 0x05, 0xd7, 0x80, 0xf9, 0xe3, 0x44, 0x91, 0x08, 0x2c, 0xe7, 0xc2, 0x67,
-- 0x05, 0x0d, 0x83, 0xf2, 0x80, 0x09, 0x0d, 0x47, 0xf3, 0x4b, 0xba, 0x65,
-- 0x93, 0x7f, 0xb4, 0xac, 0xf3, 0xa8, 0xa7, 0x8a, 0x56, 0x7b, 0x5a, 0xb1,
-- 0x97, 0x98, 0xe5, 0x8f, 0xe4, 0xa5, 0xfd, 0xf6, 0x45, 0x1c, 0x59, 0x97,
-- 0xb0, 0x53, 0x26, 0xc6, 0xb0, 0x81, 0xdc, 0x82, 0xda, 0xc8, 0x1c, 0xd3,
-- 0xe8, 0x4b, 0x9b, 0x84, 0xf9, 0x06, 0x71, 0xf8, 0xa7, 0x9b, 0x57, 0xef,
-- 0xfc, 0xec, 0xb4, 0xd7, 0x57, 0x3d, 0x85, 0x3a, 0x18, 0xd0, 0xdf, 0x34,
-- 0x5e, 0x88, 0xf0, 0xcf, 0xb6, 0x9f, 0x3d, 0xdd, 0x54, 0xa3, 0x07, 0xc6,
-- 0x29, 0x25, 0x25, 0x62, 0xcc, 0x7f, 0x7c, 0xe9, 0xca, 0x73, 0x0a, 0xf6,
-- 0x85, 0x4f, 0xb4, 0x23, 0xd2, 0x6b, 0xce, 0x52, 0x0c, 0x26, 0x7d, 0xc5,
-- 0xb5, 0x5f, 0x19, 0x15, 0xa1, 0x7b, 0x06, 0xb9, 0x0f, 0xc3, 0x8c, 0x4b,
-- 0x27, 0x3f, 0x6d, 0x2d, 0xa4, 0x1b, 0xc3, 0x4b, 0xfb, 0xad, 0x6b, 0x21,
-- 0x7d, 0x21, 0x51, 0x2d, 0x83, 0xe4, 0x50, 0x7e, 0x78, 0x85, 0xdb, 0x0b,
-- 0xac, 0x48, 0x53, 0xab, 0xbd, 0x29, 0xce, 0xff, 0x1e, 0x4e, 0x72, 0xe8,
-- 0x1c, 0xa4, 0x0a, 0x6d, 0xe3, 0x17, 0xd0, 0x32, 0x5c, 0xaa, 0x8e, 0x0a,
-- 0x3c, 0x0f, 0x4f, 0x0f, 0xaf, 0xbf, 0xe4, 0x9f, 0x5d, 0xd3, 0xe2, 0xcf,
-- 0x9d, 0xc6, 0xfe, 0x4f, 0x98, 0x56, 0x30, 0x2f, 0xb7, 0xa2, 0x3a, 0xb7,
-- 0x48, 0x75, 0xae, 0x1f, 0xdf, 0xbb, 0xdb, 0x9d, 0xe1, 0x76, 0xa7, 0x93,
-- 0xf3, 0x0d, 0x17, 0x4d, 0x6a, 0x62, 0x3a, 0xf1, 0x84, 0x0c, 0xfc, 0x95,
-- 0xfd, 0x94, 0x60, 0x10, 0x4e, 0x07, 0x73, 0xb5, 0x8c, 0xbb, 0x81, 0xc6,
-- 0xf8, 0x65, 0x07, 0x74, 0x10, 0x0e, 0xea, 0xc9, 0xd3, 0xe8, 0x64, 0xd2,
-- 0xa0, 0x76, 0x7e, 0xdb, 0xa0, 0x76, 0x7e, 0xd7, 0x41, 0xed, 0xfe, 0xb6,
-- 0x41, 0xed, 0xfe, 0x5e, 0x83, 0x2a, 0x07, 0x96, 0x94, 0xd1, 0x8d, 0x51,
-- 0x7c, 0xa6, 0xe1, 0x5b, 0x29, 0x4b, 0x3c, 0x8c, 0xe8, 0xc7, 0xec, 0xf4,
-- 0x42, 0x39, 0xfa, 0xe0, 0x50, 0xdf, 0xf5, 0x21, 0x34, 0x22, 0x30, 0xc4,
-- 0x91, 0xb3, 0x2a, 0xab, 0xb8, 0x90, 0xc3, 0xaa, 0x59, 0xe4, 0x4e, 0x9c,
-- 0xb5, 0xcb, 0xb9, 0x75, 0xa2, 0xb9, 0xde, 0x08, 0x1c, 0x82, 0x4c, 0x17,
-- 0xcd, 0x73, 0x9c, 0xe5, 0x8a, 0xa0, 0xfa, 0x58, 0x84, 0xf6, 0xf3, 0xe6,
-- 0x84, 0x19, 0x3a, 0xa7, 0x53, 0x27, 0x73, 0x35, 0x25, 0x53, 0x0e, 0xb8,
-- 0xe0, 0xb8, 0x0c, 0x79, 0x38, 0x99, 0x2c, 0x67, 0x0b, 0x83, 0xb5, 0xc8,
-- 0xe7, 0x1a, 0xe4, 0xcb, 0xe3, 0xa5, 0xcb, 0xf9, 0xaa, 0xb0, 0x5b, 0xad,
-- 0x1f, 0x19, 0x76, 0xc6, 0xd3, 0xa5, 0x14, 0x62, 0xca, 0x04, 0x5d, 0x93,
-- 0xc3, 0xfa, 0x83, 0x72, 0xdb, 0x7d, 0x87, 0x2e, 0x01, 0xe1, 0x5b, 0x45,
-- 0x58, 0x11, 0xc1, 0xdf, 0x47, 0xae, 0x74, 0x16, 0x9b, 0x39, 0x2a, 0x85,
-- 0x83, 0xb9, 0x54, 0x63, 0x41, 0xfe, 0x5c, 0x50, 0x93, 0x0c, 0x80, 0x3d,
-- 0xab, 0xed, 0x00, 0xdd, 0x36, 0xea, 0xd0, 0x3e, 0x8d, 0xf8, 0x99, 0xc1,
-- 0xad, 0x56, 0xb5, 0x1e, 0x15, 0x55, 0x26, 0x49, 0x21, 0x58, 0x87, 0xc8,
-- 0x66, 0x54, 0x8d, 0xf3, 0xfc, 0xf7, 0x74, 0x92, 0x49, 0xaf, 0xe8, 0xe6,
-- 0xe1, 0x0d, 0x4b, 0x65, 0xbb, 0x64, 0xb7, 0xc2, 0xcd, 0xf2, 0xbb, 0x25,
-- 0x11, 0x87, 0x6e, 0xbf, 0xfe, 0x5f, 0xb4, 0x61, 0xf4, 0xff, 0x28, 0x3c,
-- 0x5e, 0xe5, 0xb3, 0x7c, 0x9a, 0xc2, 0x98, 0xa4, 0x4b, 0x23, 0x68, 0xb6,
-- 0xd3, 0x2c, 0xe5, 0xcc, 0x74, 0x33, 0x61, 0x5f, 0x67, 0x1f, 0x45, 0xf9,
-- 0x8f, 0x2f, 0x7b, 0x05, 0x4c, 0xba, 0x66, 0xb3, 0x19, 0x9e, 0xdd, 0x3f,
-- 0x3f, 0x38, 0x3a, 0x6a, 0xd8, 0x11, 0x79, 0xf1, 0x24, 0xb9, 0x03, 0xa1,
-- 0x68, 0x15, 0xa7, 0xb9, 0x70, 0x38, 0x20, 0x86, 0x1b, 0xd9, 0x1c, 0x38,
-- 0xc3, 0x13, 0xc8, 0x98, 0x5c, 0x43, 0x34, 0xad, 0x72, 0x4b, 0xa9, 0x4d,
-- 0xf5, 0x82, 0x9e, 0xb3, 0x75, 0x80, 0x73, 0x1b, 0xae, 0x97, 0x24, 0xeb,
-- 0x56, 0xff, 0x68, 0x82, 0x1c, 0xfe, 0xde, 0xa4, 0xd7, 0x91, 0xfb, 0x78,
-- 0x5a, 0x6a, 0x7a, 0xa6, 0xe4, 0x2d, 0x68, 0xf2, 0x22, 0x23, 0xe8, 0xb0,
-- 0x06, 0x28, 0x14, 0x48, 0x23, 0xb4, 0xc1, 0x42, 0x3d, 0xb4, 0xfc, 0xd5,
-- 0x0e, 0xc8, 0x4b, 0x35, 0x43, 0x55, 0xed, 0xda, 0xb7, 0x4d, 0x2e, 0xed,
-- 0x4a, 0xba, 0x8b, 0x08, 0xb1, 0x67, 0x97, 0xf6, 0x5f, 0xd4, 0x6a, 0x16,
-- 0xc9, 0x14, 0xaa, 0xbe, 0x06, 0xb5, 0xd8, 0xb5, 0x6a, 0x9b, 0xbf, 0xee,
-- 0xe7, 0x13, 0x07, 0xcb, 0x9d, 0x4c, 0x8b, 0x2b, 0xae, 0x32, 0xed, 0x8c,
-- 0x75, 0x1d, 0x65, 0x51, 0x45, 0xcc, 0x34, 0x6d, 0x3b, 0x0a, 0x8e, 0x3c,
-- 0x71, 0xbb, 0x97, 0x0c, 0xe6, 0x08, 0xa2, 0x9d, 0x67, 0x75, 0x39, 0x4e,
-- 0xba, 0x65, 0x4e, 0x7c, 0x37, 0xb0, 0xee, 0x57, 0x57, 0x75, 0x45, 0xa2,
-- 0xed, 0x7d, 0xa3, 0x1c, 0x8e, 0x2b, 0x4c, 0xd6, 0x97, 0xfb, 0x8f, 0x46,
-- 0x15, 0x3a, 0x70, 0x30, 0x93, 0x4e, 0xa1, 0xb4, 0xea, 0x07, 0x1a, 0xca,
-- 0x82, 0x34, 0x8f, 0x85, 0xa5, 0xd4, 0xd9, 0x9a, 0x74, 0x8d, 0x83, 0x87,
-- 0x01, 0x43, 0x17, 0xd7, 0xf6, 0x3e, 0x3d, 0x1a, 0x68, 0x5a, 0xb2, 0x96,
-- 0xe0, 0x15, 0xac, 0x27, 0xe4, 0x89, 0x69, 0x9e, 0x4e, 0x88, 0x56, 0x19,
-- 0x17, 0xb8, 0xb5, 0xd2, 0xb3, 0x3e, 0x47, 0x4d, 0xca, 0x4a, 0xda, 0xb5,
-- 0x5f, 0x65, 0x53, 0x94, 0xd6, 0x0a, 0xe7, 0x29, 0xcd, 0xd3, 0x10, 0x07,
-- 0x91, 0x93, 0x84, 0xe5, 0x60, 0xce, 0xb5, 0x87, 0xe9, 0x2b, 0xb4, 0x4a,
-- 0x8e, 0xee, 0x5b, 0x4b, 0x27, 0x8e, 0x3b, 0x57, 0xe7, 0x65, 0x5c, 0x4c,
-- 0x23, 0x1b, 0xbb, 0x61, 0x83, 0x7a, 0x17, 0xdb, 0x1e, 0x71, 0xb0, 0x65,
-- 0xb2, 0x87, 0xbc, 0xc0, 0x51, 0xa3, 0x29, 0xb7, 0xd2, 0x8e, 0x66, 0x8a,
-- 0xb8, 0x34, 0x38, 0x57, 0x25, 0x2e, 0xee, 0x68, 0xb6, 0x97, 0x1e, 0xb9,
-- 0x1b, 0x2d, 0xfe, 0x85, 0x97, 0xe7, 0x15, 0xaf, 0x54, 0x6f, 0xa5, 0x01,
-- 0xc6, 0xcc, 0x6d, 0x2b, 0x48, 0x14, 0x2c, 0x2b, 0x28, 0x94, 0xe4, 0x4c,
-- 0xca, 0xdd, 0x60, 0x99, 0x63, 0x47, 0x04, 0x76, 0x14, 0x67, 0x92, 0x27,
-- 0xa3, 0x61, 0xb8, 0x93, 0x25, 0x54, 0xd3, 0x36, 0x55, 0xef, 0xd7, 0x31,
-- 0x8a, 0x1e, 0x38, 0x36, 0x18, 0xa9, 0x2f, 0x21, 0x28, 0xa9, 0xe3, 0x6f,
-- 0x59, 0x6f, 0xd5, 0xb0, 0xc7, 0xe6, 0x68, 0xe1, 0xe4, 0x0d, 0x31, 0x05,
-- 0xbc, 0x48, 0x14, 0x9e, 0x50, 0x79, 0x29, 0xb8, 0x6e, 0xa4, 0x38, 0x37,
-- 0xc0, 0xf0, 0x83, 0x4f, 0x9d, 0x4d, 0x20, 0x36, 0xda, 0x36, 0x96, 0x68,
-- 0xca, 0x75, 0x79, 0x50, 0x55, 0x58, 0x0a, 0x4a, 0x3c, 0xf9, 0xfc, 0x69,
-- 0x5f, 0x3d, 0x3c, 0xcf, 0xb6, 0x5f, 0x58, 0x55, 0x89, 0xa3, 0xc3, 0x8b,
-- 0x37, 0xc4, 0x86, 0xca, 0xf4, 0x32, 0x32, 0xda, 0xf2, 0x67, 0x83, 0x2c,
-- 0x2d, 0xaf, 0x39, 0xcb, 0x9d, 0x28, 0x74, 0x50, 0xcd, 0xea, 0xc5, 0x60,
-- 0x7b, 0x9b, 0xcb, 0xd2, 0x36, 0x65, 0x4a, 0x09, 0x80, 0xfd, 0xdd, 0xb8,
-- 0xf1, 0x7b, 0xe7, 0x83, 0xee, 0x62, 0x82, 0x0f, 0x32, 0xbf, 0xf8, 0x18,
-- 0xe1, 0xd8, 0x04, 0x65, 0x4b, 0xdb, 0xc5, 0xa1, 0xbb, 0xca, 0x52, 0xff,
-- 0x57, 0x38, 0x03, 0x83, 0x1d, 0xb4, 0x31, 0x6c, 0xbb, 0xfa, 0x58, 0xcd,
-- 0x15, 0x80, 0x72, 0xbd, 0x5c, 0x3c, 0x30, 0x9f, 0xb6, 0x0e, 0xf8, 0x6b,
-- 0x98, 0x42, 0x83, 0x27, 0x24, 0x5d, 0x00, 0xc6, 0xc1, 0x2e, 0x32, 0x4b,
-- 0x78, 0x4f, 0x2c, 0xe1, 0xf7, 0x94, 0xfa, 0x78, 0xd6, 0x2f, 0xdf, 0x9f,
-- 0x1d, 0xaf, 0xdc, 0xd7, 0x54, 0x8b, 0x93, 0xba, 0x7a, 0xd1, 0xcd, 0x64,
-- 0x25, 0xae, 0xd8, 0x51, 0x54, 0x1c, 0xc5, 0x79, 0x4d, 0x6b, 0xa4, 0xe5,
-- 0x3a, 0xe2, 0x52, 0x71, 0x96, 0x89, 0x6a, 0x2c, 0x84, 0x9a, 0xe4, 0xd4,
-- 0x60, 0x84, 0xf6, 0x06, 0x70, 0xa5, 0x0f, 0xca, 0x2c, 0x6a, 0xe5, 0x96,
-- 0xf8, 0x82, 0x06, 0xa4, 0xa4, 0xc2, 0x1d, 0x72, 0x3a, 0x8a, 0x2b, 0xa6,
-- 0x26, 0x36, 0xde, 0xae, 0xc5, 0x95, 0xf9, 0x30, 0x92, 0x82, 0xf8, 0xf2,
-- 0xfa, 0x8e, 0xff, 0x35, 0x0a, 0x71, 0x6b, 0x94, 0x76, 0x23, 0xbf, 0xbc,
-- 0xcb, 0x97, 0xe1, 0x2a, 0x7d, 0xda, 0x9a, 0x86, 0xf2, 0x53, 0x47, 0xd6,
-- 0x9a, 0x02, 0xc4, 0xf0, 0x52, 0x32, 0x4d, 0x80, 0xe1, 0x98, 0x04, 0xb3,
-- 0x55, 0xa7, 0xd3, 0x1b, 0x24, 0x24, 0x73, 0xc6, 0x87, 0xac, 0x2b, 0x8f,
-- 0x8e, 0xc1, 0x46, 0x3b, 0xf1, 0x5f, 0x47, 0xcb, 0xab, 0x2b, 0xa9, 0x2e,
-- 0xb0, 0x2f, 0xc2, 0x4f, 0x65, 0x35, 0xd3, 0x70, 0xc3, 0xac, 0x7f, 0xb1,
-- 0xae, 0x09, 0xa0, 0xbd, 0x6b, 0x92, 0x13, 0x39, 0x64, 0x9c, 0x24, 0xf1,
-- 0x9e, 0x48, 0xc2, 0x11, 0x4c, 0x15, 0x1f, 0x81, 0x7e, 0xb2, 0xfe, 0xb2,
-- 0xfb, 0x1d, 0xd1, 0x01, 0x05, 0x11, 0x6a, 0xec, 0xbc, 0x48, 0xb4, 0x8c,
-- 0xd7, 0x39, 0x31, 0xa7, 0x79, 0x1c, 0x06, 0x2e, 0x79, 0xdb, 0xe2, 0xd4,
-- 0xd7, 0xea, 0x25, 0x9d, 0x63, 0xfc, 0x57, 0xeb, 0xcf, 0xaa, 0x86, 0x00,
-- 0xc3, 0xed, 0xb2, 0x88, 0xae, 0x03, 0xc5, 0x6f, 0xd2, 0xfe, 0x63, 0x1f,
-- 0xa2, 0x2f, 0x95, 0x26, 0x0c, 0x43, 0xea, 0xc7, 0x30, 0xe5, 0x69, 0x79,
-- 0x4e, 0x99, 0x8f, 0x56, 0xd2, 0x11, 0xeb, 0x1f, 0xf6, 0x9a, 0x45, 0xa8,
-- 0x3c, 0x46, 0x5d, 0x16, 0x0d, 0x25, 0xf3, 0x52, 0xb7, 0xbf, 0x23, 0x81,
-- 0x7c, 0x52, 0xf2, 0xbd, 0x5c, 0xdc, 0x68, 0x6d, 0xf2, 0x95, 0x82, 0x95,
-- 0xb9, 0xcd, 0x3c, 0x25, 0x4b, 0x08, 0xbc, 0x45, 0xef, 0xb3, 0x7a, 0x83,
-- 0x07, 0xb3, 0x39, 0xc0, 0x9b, 0xd5, 0x1a, 0xdd, 0x8f, 0xb1, 0x83, 0x25,
-- 0x9d, 0xdd, 0x52, 0x49, 0x9d, 0xf8, 0xdb, 0xd4, 0xdd, 0xcc, 0xd1, 0xfd,
-- 0x5b, 0xc5, 0xff, 0x46, 0x63, 0xa1, 0xf8, 0xdf, 0xe1, 0x12, 0x0b, 0xd3,
-- 0xa0, 0x9a, 0xa0, 0xa0, 0xc8, 0x7c, 0x0a, 0x18, 0xcd, 0x1d, 0x3f, 0x08,
-- 0x57, 0x3d, 0x9f, 0x2f, 0x52, 0x30, 0x71, 0xc1, 0xb6, 0xb9, 0xce, 0x6b,
-- 0x85, 0x52, 0x35, 0xaf, 0x8d, 0xf9, 0x8d, 0xb1, 0x66, 0x48, 0x49, 0x32,
-- 0x14, 0x5e, 0xb6, 0x5c, 0x4c, 0xb3, 0x3a, 0x13, 0xd9, 0x5a, 0x31, 0x79,
-- 0x23, 0xf3, 0x1c, 0x1f, 0x1b, 0xe7, 0x3c, 0x34, 0xcc, 0x0f, 0xe9, 0x3a,
-- 0x11, 0x47, 0xbf, 0xd6, 0x96, 0x57, 0xfc, 0x9c, 0x7b, 0x03, 0x17, 0x91,
-- 0x00, 0x80, 0x28, 0x92, 0xe1, 0x23, 0xab, 0x60, 0x5c, 0x3e, 0x47, 0x51,
-- 0x51, 0x43, 0x26, 0xe4, 0x6a, 0xc3, 0x0b, 0x40, 0x80, 0x36, 0x1c, 0x80,
-- 0x68, 0x75, 0x06, 0x13, 0x43, 0x5c, 0xe9, 0xc9, 0xc3, 0xbd, 0xbe, 0x01,
-- 0xec, 0x88, 0x52, 0x27, 0xe5, 0x04, 0x81, 0xfc, 0x35, 0x5e, 0xb2, 0x32,
-- 0x0a, 0xaf, 0x60, 0x54, 0x88, 0xd0, 0x35, 0x77, 0xcf, 0xb1, 0x0a, 0xbd,
-- 0x2f, 0x4d, 0x05, 0xee, 0x99, 0xb7, 0xcb, 0xd7, 0x3a, 0x04, 0x17, 0x47,
-- 0xe3, 0x8a, 0x52, 0xa9, 0x4b, 0xd1, 0xe1, 0x1b, 0x10, 0x9f, 0x1e, 0x50,
-- 0x04, 0x50, 0x3d, 0xbd, 0xf7, 0xe5, 0xa0, 0xd7, 0x0d, 0x74, 0xee, 0x26,
-- 0xee, 0x45, 0x36, 0xf5, 0x46, 0x99, 0xca, 0x2e, 0xbd, 0xb8, 0xfa, 0xe1,
-- 0xcb, 0x11, 0x1d, 0x80, 0x7a, 0x19, 0x9b, 0xdb, 0x15, 0xbc, 0x0d, 0x9e,
-- 0x14, 0xf0, 0x5f, 0x5e, 0x70, 0xef, 0xee, 0xc0, 0x41, 0x62, 0x15, 0xbf,
-- 0x46, 0x80, 0xaa, 0xda, 0x0d, 0x46, 0x0e, 0x39, 0xb7, 0xad, 0xa1, 0xee,
-- 0xb3, 0x4d, 0xc2, 0x8f, 0xae, 0x69, 0x6e, 0xe7, 0x82, 0xdc, 0xff, 0x6e,
-- 0x5f, 0x02, 0xad, 0xf0, 0x3f, 0x6d, 0xbd, 0xac, 0x5c, 0x7d, 0x37, 0x3f,
-- 0xfb, 0x13, 0x16, 0x05, 0x58, 0xcb, 0xb2, 0x32, 0x00, 0x52, 0xe1, 0xe6,
-- 0xfe, 0x34, 0x74, 0x12, 0xb5, 0x35, 0x91, 0xcc, 0xb3, 0x3b, 0x51, 0x4a,
-- 0x23, 0x6e, 0x2b, 0xc7, 0xf8, 0xe7, 0x39, 0x97, 0xd6, 0x1a, 0xa7, 0x74,
-- 0x1c, 0xd9, 0x1b, 0x25, 0xf8, 0x04, 0x42, 0x5e, 0x3f, 0x97, 0xca, 0x34,
-- 0xeb, 0x74, 0x24, 0x60, 0xb1, 0xfa, 0x79, 0x6c, 0xba, 0xe0, 0x80, 0x81,
-- 0x3d, 0xec, 0xc6, 0x9f, 0x06, 0x82, 0x44, 0xa9, 0xd4, 0xad, 0xc0, 0xb2,
-- 0xf6, 0x99, 0x6c, 0xcb, 0x5d, 0x3e, 0x7f, 0xb2, 0x3b, 0x08, 0xa4, 0x95,
-- 0x7e, 0x67, 0xcc, 0x15, 0x9b, 0x74, 0x8a, 0xb1, 0x94, 0x57, 0x1f, 0x0b,
-- 0x73, 0xf8, 0x93, 0xc2, 0x98, 0x40, 0x98, 0x97, 0x3c, 0xfb, 0x89, 0xa5,
-- 0x54, 0x2f, 0x3d, 0x2e, 0x48, 0xa7, 0x4a, 0xd8, 0x49, 0x3c, 0xc1, 0xee,
-- 0x38, 0xa4, 0xa1, 0xae, 0xa0, 0x14, 0x3e, 0x96, 0x34, 0xd0, 0x0f, 0xf0,
-- 0x8b, 0x28, 0xdd, 0x1d, 0xc8, 0x67, 0x83, 0x0b, 0x7c, 0x66, 0xe2, 0xbd,
-- 0xa6, 0x9c, 0xb2, 0x9e, 0xa1, 0x81, 0x89, 0xfd, 0x18, 0xf6, 0x25, 0xe9,
-- 0x8a, 0xe7, 0xe0, 0x10, 0x47, 0x3a, 0xd2, 0xd1, 0x38, 0xed, 0x3c, 0x7d,
-- 0x90, 0x8a, 0x34, 0xc4, 0xad, 0x1f, 0x6e, 0x0d, 0xe8, 0xa4, 0x53, 0x92,
-- 0x49, 0x0c, 0xa5, 0x5e, 0xec, 0x51, 0x8e, 0x8c, 0x2d, 0x62, 0x49, 0x81,
-- 0x9a, 0xa2, 0x42, 0xbf, 0x49, 0x57, 0xec, 0x4a, 0xae, 0xc8, 0x58, 0x41,
-- 0x79, 0x34, 0xba, 0xe5, 0x0c, 0x6a, 0xa1, 0x2e, 0xa6, 0xe2, 0xd7, 0xe6,
-- 0x96, 0x1f, 0x99, 0x2b, 0xe7, 0x14, 0x0a, 0xf8, 0x68, 0x50, 0xa0, 0xa2,
-- 0x89, 0xa0, 0x83, 0xdc, 0x55, 0x13, 0x84, 0x1e, 0x29, 0xc5, 0xa4, 0x7e,
-- 0xd2, 0xe4, 0x08, 0x59, 0xbe, 0x85, 0x84, 0xaa, 0x60, 0x78, 0x00, 0x90,
-- 0x1d, 0x19, 0xa8, 0xe5, 0x8a, 0xea, 0xeb, 0x49, 0x8c, 0x5a, 0x80, 0x71,
-- 0xc8, 0x55, 0x3d, 0x08, 0x24, 0xac, 0x61, 0x3b, 0x41, 0x68, 0x27, 0x8a,
-- 0x17, 0xbd, 0xac, 0x17, 0x1f, 0x80, 0x12, 0xf9, 0x01, 0xa8, 0x51, 0x17,
-- 0x01, 0x30, 0x3c, 0x3e, 0xc0, 0x72, 0x09, 0xb0, 0x17, 0x49, 0xf8, 0xb9,
-- 0x96, 0xf1, 0x20, 0x4d, 0xee, 0x4a, 0xac, 0xe8, 0x8f, 0xae, 0x5c, 0x0b,
-- 0xec, 0xde, 0x6c, 0xfe, 0xad, 0x4c, 0xa0, 0xa7, 0xd1, 0xc0, 0xd8, 0xbf,
-- 0xfe, 0x01, 0x70, 0x1a, 0x8e, 0x42, 0xe8, 0xe2, 0xc8, 0x4a, 0xc6, 0x1b,
-- 0x6f, 0xe1, 0x6d, 0x80, 0x4e, 0x24, 0x21, 0x72, 0x39, 0x37, 0xbf, 0xfe,
-- 0xc3, 0x03, 0x83, 0x90, 0xaf, 0x45, 0xe7, 0xb4, 0xe0, 0x05, 0x87, 0xbd,
-- 0x60, 0x17, 0x69, 0x98, 0x2c, 0x68, 0x3b, 0xaf, 0x30, 0xef, 0xd4, 0x23,
-- 0xf3, 0x44, 0x2e, 0xc1, 0x6e, 0xa2, 0x0e, 0x84, 0x3c, 0xf5, 0x60, 0x76,
-- 0x32, 0x05, 0x9c, 0x13, 0x4c, 0x98, 0x05, 0xfa, 0xeb, 0xe2, 0xee, 0xd1,
-- 0xc3, 0x25, 0xd1, 0x0c, 0x2c, 0xd3, 0x0d, 0x57, 0xac, 0x8c, 0x56, 0xbd,
-- 0x6e, 0xad, 0x4c, 0x73, 0x41, 0x74, 0x45, 0xbc, 0xf0, 0xd6, 0x11, 0xfb,
-- 0x94, 0xac, 0x80, 0x32, 0x49, 0x92, 0x0d, 0x87, 0x8e, 0x29, 0xc5, 0x34,
-- 0x2c, 0x00, 0x43, 0xcf, 0xa4, 0x56, 0xd0, 0x78, 0xac, 0x39, 0xf0, 0x96,
-- 0x28, 0xd1, 0x3c, 0xde, 0x70, 0x84, 0x74, 0x7d, 0xc8, 0x17, 0x01, 0x4b,
-- 0x08, 0x8a, 0x44, 0x3b, 0x53, 0x84, 0x44, 0x7e, 0x31, 0x49, 0x06, 0xf6,
-- 0x09, 0x3e, 0x44, 0x8f, 0x8d, 0x63, 0x0c, 0x1f, 0x76, 0x22, 0x98, 0x04,
-- 0x41, 0x7e, 0xe8, 0xc0, 0x04, 0x0e, 0x01, 0x7c, 0xa1, 0x4e, 0x6f, 0x9f,
-- 0xc6, 0x21, 0x5d, 0xad, 0xff, 0xe8, 0xa1, 0xe7, 0xcd, 0xc3, 0xf5, 0xa2,
-- 0x23, 0x97, 0x44, 0xa6, 0x24, 0xb8, 0x50, 0x3a, 0x25, 0x19, 0x7e, 0x18,
-- 0xe3, 0xaf, 0x86, 0x6d, 0xf0, 0x81, 0xd6, 0x30, 0x1f, 0x1e, 0x43, 0x30,
-- 0x87, 0x47, 0x47, 0x42, 0x7d, 0x19, 0xc9, 0x70, 0x11, 0xc6, 0x77, 0x8a,
-- 0xb7, 0x44, 0x7d, 0xd3, 0x6d, 0x9b, 0xb8, 0x6f, 0x00, 0x7d, 0xa0, 0x57,
-- 0x9e, 0x0c, 0x45, 0x4e, 0xc1, 0xe0, 0xe1, 0x91, 0x5c, 0x46, 0x27, 0xba,
-- 0x0b, 0x49, 0x80, 0xc7, 0x60, 0x39, 0xf1, 0x95, 0x1b, 0x03, 0x0d, 0xc1,
-- 0x7f, 0xa8, 0x30, 0x8a, 0x08, 0x5f, 0x96, 0x62, 0xa0, 0x99, 0xa7, 0xde,
-- 0xdf, 0x46, 0x68, 0xf1, 0x38, 0xac, 0xbb, 0x0f, 0xa0, 0x62, 0xcd, 0x76,
-- 0x37, 0xc0, 0x1e, 0x07, 0x06, 0x91, 0xea, 0x6a, 0x98, 0xf1, 0x76, 0x70,
-- 0x0c, 0x34, 0xbd, 0x62, 0xfa, 0xc8, 0x5a, 0x70, 0xf4, 0x97, 0x9b, 0x90,
-- 0xa6, 0x3c, 0xd8, 0x95, 0xad, 0xe8, 0x03, 0x9c, 0x39, 0x0f, 0x4e, 0x31,
-- 0xe6, 0xfc, 0x89, 0x87, 0x9b, 0x83, 0xe2, 0x1d, 0xd4, 0x39, 0x73, 0x31,
-- 0xe1, 0x00, 0x9c, 0x10, 0x8b, 0x0c, 0xdd, 0x87, 0x7e, 0xd6, 0x9f, 0xc2,
-- 0xa8, 0x3a, 0x96, 0x84, 0x19, 0xb4, 0x3b, 0x7c, 0x17, 0x9e, 0x67, 0x37,
-- 0x8f, 0xe0, 0x7f, 0x99, 0x50, 0x57, 0x1c, 0xb6, 0xd6, 0x79, 0x7a, 0x6c,
-- 0x0e, 0x9d, 0x24, 0xae, 0x73, 0xb0, 0xd3, 0x16, 0xcc, 0x61, 0xd5, 0x69,
-- 0xfb, 0xbd, 0x0e, 0x1b, 0x87, 0x1c, 0x7d, 0x30, 0x78, 0x4e, 0x19, 0x89,
-- 0x20, 0x07, 0x79, 0xb0, 0x1d, 0x09, 0x14, 0x12, 0x3e, 0xcd, 0xd4, 0x6e,
-- 0x4f, 0x77, 0x04, 0xf8, 0xa0, 0x35, 0x35, 0x2b, 0x24, 0x0f, 0xb5, 0x66,
-- 0x1e, 0x32, 0xd7, 0x14, 0x94, 0xf7, 0x47, 0xc8, 0x95, 0x0b, 0x25, 0x74,
-- 0xf6, 0x68, 0x07, 0xe1, 0xd3, 0xc6, 0x2f, 0x95, 0x58, 0x3e, 0xe9, 0xa0,
-- 0x86, 0xc7, 0xac, 0xbb, 0x6b, 0x0d, 0x3c, 0xfc, 0xc4, 0xae, 0x57, 0xc6,
-- 0x4a, 0x92, 0x24, 0x9f, 0x4d, 0xfc, 0x3e, 0x70, 0x5b, 0x29, 0x5b, 0xfb,
-- 0x02, 0xec, 0x54, 0x79, 0x26, 0x10, 0x34, 0x49, 0x56, 0xac, 0x96, 0xa5,
-- 0xe0, 0x3a, 0x3d, 0x7e, 0x47, 0x9b, 0x46, 0xed, 0xda, 0xe3, 0x80, 0x30,
-- 0x1e, 0xdd, 0x82, 0x21, 0xee, 0x80, 0xb8, 0xb3, 0x62, 0x54, 0x6e, 0x8a,
-- 0xe1, 0xa8, 0xf4, 0xc3, 0xf6, 0x98, 0xfc, 0xa0, 0x7e, 0xe5, 0xa8, 0xa4,
-- 0xbd, 0x4f, 0x19, 0x53, 0x35, 0xfd, 0x40, 0x63, 0x20, 0x75, 0x98, 0xb6,
-- 0xbd, 0x22, 0x41, 0xfc, 0x71, 0x69, 0x3d, 0x91, 0x07, 0x8d, 0xe8, 0x38,
-- 0xad, 0x9d, 0x86, 0x5d, 0x26, 0xe3, 0x8c, 0x54, 0x6f, 0x14, 0x5a, 0x05,
-- 0xf2, 0x00, 0x7e, 0x7d, 0x84, 0x04, 0x25, 0x4a, 0xd9, 0x44, 0x16, 0xa7,
-- 0x8c, 0x0c, 0x19, 0xdd, 0x0d, 0x46, 0x2e, 0x28, 0xb8, 0xda, 0x56, 0x47,
-- 0xf2, 0x45, 0xd2, 0xb6, 0x9b, 0x56, 0x41, 0xc1, 0xa1, 0xe1, 0x03, 0x88,
-- 0x90, 0xae, 0x7f, 0x52, 0x54, 0xd2, 0xc5, 0x42, 0x8f, 0xf8, 0x27, 0xcc,
-- 0x5d, 0x10, 0x79, 0x40, 0xee, 0x8a, 0xab, 0xa4, 0x28, 0x77, 0x75, 0x51,
-- 0xdc, 0xf8, 0x72, 0xb9, 0x30, 0xda, 0x3d, 0xdc, 0x9c, 0x40, 0xaa, 0xe9,
-- 0x0a, 0x6e, 0x9d, 0x9f, 0x7f, 0xc3, 0x58, 0x8b, 0x8e, 0xdb, 0x6c, 0xb1,
-- 0x81, 0xb8, 0xba, 0x06, 0xa7, 0xaf, 0x8b, 0x4f, 0xba, 0x04, 0x5d, 0x91,
-- 0x3b, 0xac, 0x83, 0x33, 0xf9, 0x7c, 0xea, 0x32, 0x34, 0xc5, 0xca, 0xdf,
-- 0x65, 0xa2, 0x17, 0x07, 0xa7, 0x89, 0xeb, 0x46, 0x67, 0xd5, 0xac, 0xd4,
-- 0xc8, 0xd0, 0xc4, 0x8f, 0xd0, 0xb9, 0x0a, 0xa4, 0xcd, 0x39, 0x76, 0xce,
-- 0x88, 0xd5, 0x21, 0x36, 0x39, 0x2e, 0x17, 0xff, 0x0f, 0x6d, 0x2c, 0xf4,
-- 0x31, 0xc9, 0x06, 0x85, 0x01, 0xf7, 0xf1, 0x21, 0x73, 0xdd, 0x9d, 0xee,
-- 0x3a, 0x54, 0x1d, 0x63, 0x96, 0x21, 0x4b, 0x22, 0x54, 0x7b, 0xc0, 0x0a,
-- 0x6f, 0x2f, 0x99, 0x1b, 0x9f, 0x3a, 0x66, 0x1f, 0x4c, 0xef, 0xd0, 0xbe,
-- 0x78, 0xcc, 0x52, 0x3d, 0xcc, 0xf0, 0x09, 0x47, 0x19, 0xe9, 0x7f, 0x9f,
-- 0xa2, 0x85, 0xab, 0x41, 0x58, 0xe0, 0x79, 0x39, 0x8d, 0xdd, 0x35, 0xea,
-- 0xeb, 0x42, 0x91, 0x28, 0xcf, 0x61, 0x63, 0x8f, 0xb2, 0x89, 0x54, 0xdd,
-- 0xff, 0x28, 0xe7, 0xe7, 0x2d, 0x53, 0x63, 0x53, 0x33, 0x03, 0xb3, 0x5f,
-- 0x47, 0x52, 0x55, 0xa4, 0x9a, 0x8e, 0x8b, 0xa9, 0x38, 0x54, 0x6e, 0x01,
-- 0x91, 0xda, 0xbd, 0x17, 0x5e, 0xee, 0xea, 0x5e, 0x6c, 0x2e, 0xe5, 0x0d,
-- 0xda, 0x50, 0x94, 0xc5, 0xa0, 0x54, 0xfb, 0xc3, 0xfd, 0x13, 0x8b, 0x5b,
-- 0x54, 0x16, 0xd2, 0x93, 0xa9, 0x63, 0x44, 0x08, 0xb5, 0x6f, 0xe7, 0x03,
-- 0xe5, 0xa6, 0x3e, 0x8d, 0x14, 0x60, 0x87, 0xb3, 0xa5, 0x35, 0x14, 0x3f,
-- 0x2d, 0xab, 0xc3, 0xde, 0x01, 0xf9, 0x52, 0x91, 0x83, 0x79, 0x43, 0x1f,
-- 0x1b, 0x5d, 0x2a, 0x35, 0xbf, 0x5a, 0xab, 0x20, 0xb1, 0x39, 0x8d, 0x5b,
-- 0x26, 0xfb, 0x98, 0xc5, 0xe5, 0x15, 0x3a, 0x59, 0x7c, 0xae, 0x01, 0xa4,
-- 0x3e, 0xae, 0x3f, 0x58, 0xad, 0x20, 0xc2, 0xe4, 0x53, 0xa4, 0xd8, 0x2e,
-- 0xc1, 0x1e, 0x43, 0xc5, 0xc8, 0x3f, 0xfd, 0xf8, 0xfc, 0x2e, 0x47, 0x5e,
-- 0xc0, 0xf2, 0x50, 0x01, 0xa0, 0xeb, 0xe8, 0x24, 0x9f, 0xaa, 0x54, 0x01,
-- 0x18, 0xca, 0xac, 0x59, 0x76, 0x90, 0xda, 0x2c, 0x42, 0x2c, 0x9e, 0x31,
-- 0x9a, 0x65, 0x87, 0x64, 0xa0, 0xa0, 0x96, 0x60, 0x07, 0x1a, 0x28, 0xc3,
-- 0x58, 0xb8, 0x99, 0x14, 0x19, 0x22, 0xd1, 0x7c, 0xca, 0xa7, 0xa7, 0xce,
-- 0x3e, 0xe9, 0xa6, 0xe1, 0xeb, 0xbf, 0xfb, 0xcc, 0x88, 0xc4, 0xe6, 0x57,
-- 0xd8, 0xa1, 0x66, 0x36, 0x8f, 0x8e, 0xa5, 0x54, 0x49, 0x6c, 0x1c, 0x7c,
-- 0x0e, 0x9f, 0x42, 0x46, 0x6c, 0xc2, 0xc8, 0xb4, 0xa2, 0x11, 0x26, 0xe4,
-- 0xc0, 0x06, 0xc5, 0xf3, 0x61, 0xae, 0x86, 0x59, 0xfe, 0xa8, 0xaa, 0x96,
-- 0x2b, 0x5a, 0x2a, 0xb8, 0xf3, 0xb2, 0xd3, 0xe2, 0x8a, 0xb4, 0x08, 0x33,
-- 0x62, 0xca, 0x84, 0x58, 0x25, 0xf3, 0x26, 0x27, 0x76, 0x4a, 0x66, 0x52,
-- 0xb3, 0xc2, 0x27, 0x23, 0x40, 0xbd, 0x60, 0xe1, 0xe5, 0x91, 0x11, 0x78,
-- 0xb3, 0x24, 0x3b, 0xc7, 0x90, 0x6e, 0x36, 0x9d, 0x04, 0x7e, 0x07, 0xd1,
-- 0x81, 0x7d, 0xcd, 0xa3, 0xbd, 0x87, 0x9b, 0x53, 0x67, 0xdd, 0xef, 0x81,
-- 0xb8, 0x1f, 0xa4, 0xd9, 0xbf, 0xfc, 0xc9, 0x82, 0x59, 0xf6, 0xb6, 0xb6,
-- 0x7e, 0xf9, 0xa9, 0x11, 0xeb, 0xf0, 0xe5, 0x2f, 0xbf, 0xbe, 0xda, 0xac,
-- 0xc0, 0xca, 0x74, 0xfa, 0x49, 0x14, 0x53, 0x21, 0x76, 0x0c, 0xc9, 0x9b,
-- 0x5a, 0x77, 0x31, 0x18, 0x8e, 0xab, 0xcf, 0x57, 0xac, 0xaa, 0xe0, 0xda,
-- 0x04, 0xb0, 0xfe, 0xe8, 0x2b, 0xe1, 0x55, 0x52, 0x7c, 0xd7, 0xc1, 0xf2,
-- 0xf4, 0x93, 0x00, 0x8b, 0xa5, 0xdf, 0x09, 0x44, 0xc0, 0x1d, 0x72, 0x2d,
-- 0x3a, 0x0f, 0x9f, 0x81, 0xe8, 0x42, 0x51, 0x9c, 0x82, 0x49, 0x8e, 0x05,
-- 0x23, 0xc2, 0x45, 0x4b, 0x77, 0x41, 0x70, 0x0b, 0x16, 0xe9, 0xbb, 0xc2,
-- 0x63, 0x16, 0x04, 0xa8, 0x0f, 0x9a, 0x6c, 0xa4, 0x47, 0x7d, 0x2a, 0x48,
-- 0xdf, 0x95, 0x07, 0x67, 0x8b, 0xa0, 0x59, 0xb9, 0x1e, 0x15, 0x1c, 0x36,
-- 0xae, 0x5a, 0xae, 0xa0, 0x3d, 0x5e, 0x04, 0xe5, 0xde, 0x5d, 0x30, 0x90,
-- 0xb7, 0x4e, 0xe6, 0xf3, 0xae, 0x18, 0x40, 0x81, 0x6f, 0xe8, 0x46, 0x86,
-- 0x7c, 0x18, 0xaf, 0xc2, 0x6c, 0x49, 0xb2, 0xd2, 0xb2, 0x8d, 0xca, 0x5e,
-- 0x23, 0x97, 0x87, 0x61, 0x5a, 0x08, 0x8b, 0x5c, 0x8d, 0x61, 0xd1, 0x81,
-- 0xcd, 0x42, 0x77, 0x50, 0x2e, 0x20, 0xaf, 0x5d, 0xa9, 0xaf, 0x2a, 0x31,
-- 0x54, 0x59, 0xdd, 0x91, 0xc4, 0x2c, 0x23, 0xb3, 0xe4, 0x4a, 0x99, 0x52,
-- 0x99, 0xad, 0xaf, 0xcc, 0xa3, 0x45, 0xc6, 0x81, 0x14, 0x1d, 0x4b, 0xd7,
-- 0x3a, 0x64, 0xd2, 0xbe, 0xc7, 0xb0, 0x90, 0x44, 0x62, 0x69, 0xbd, 0x87,
-- 0x8c, 0x42, 0x1b, 0x71, 0x57, 0x48, 0xf8, 0xbe, 0xf1, 0xc0, 0x96, 0x90,
-- 0xa3, 0x81, 0x7b, 0x9c, 0xa1, 0x79, 0x9b, 0x79, 0x60, 0x69, 0x5f, 0xaa,
-- 0xb8, 0xfb, 0x32, 0x21, 0x59, 0x48, 0x6c, 0x1b, 0x52, 0xe5, 0x81, 0xc1,
-- 0x11, 0x65, 0x6d, 0xf9, 0x6d, 0x8f, 0x8e, 0xee, 0x22, 0x3f, 0xe9, 0x7b,
-- 0xf6, 0xe1, 0x3e, 0x1a, 0xa7, 0x16, 0x0c, 0x51, 0x7c, 0xfc, 0x5a, 0x8d,
-- 0xd7, 0xf9, 0xa2, 0x3c, 0x13, 0x04, 0xde, 0x28, 0x4b, 0x0a, 0x69, 0x8c,
-- 0xba, 0x76, 0xe9, 0x96, 0xa9, 0x5e, 0x92, 0xa8, 0x33, 0x8d, 0xcb, 0x30,
-- 0xc3, 0x5f, 0x29, 0x0c, 0x49, 0x53, 0x4d, 0x06, 0x0b, 0xe3, 0x41, 0xed,
-- 0xc9, 0xde, 0x6b, 0x23, 0x2b, 0xbc, 0x66, 0xef, 0x2b, 0xbd, 0x25, 0x7d,
-- 0x78, 0x55, 0x23, 0x32, 0xd8, 0x97, 0xb9, 0x8a, 0xa9, 0x95, 0xf7, 0x60,
-- 0x2d, 0x36, 0xc9, 0xa1, 0xb4, 0x44, 0x10, 0x58, 0x21, 0x93, 0x6e, 0xa2,
-- 0x51, 0x70, 0x6f, 0xb8, 0xf0, 0xd4, 0xa3, 0xa8, 0x75, 0x71, 0xe2, 0x64,
-- 0xff, 0x12, 0x0a, 0x2b, 0xaa, 0x33, 0x7c, 0xe9, 0x53, 0x1a, 0xff, 0xf4,
-- 0x74, 0x9b, 0x99, 0x8b, 0xb5, 0x92, 0x6a, 0x00, 0x14, 0x96, 0xe3, 0x4f,
-- 0x4f, 0xd2, 0x87, 0x18, 0x26, 0x94, 0xa8, 0x88, 0x5b, 0x4a, 0x95, 0x96,
-- 0x74, 0xac, 0xd5, 0x46, 0xee, 0xd2, 0x7b, 0xc3, 0xde, 0xc5, 0x5b, 0x11,
-- 0x64, 0x65, 0xc7, 0x49, 0xea, 0x07, 0x21, 0xe8, 0x75, 0xc8, 0x4a, 0x8c,
-- 0xef, 0x26, 0x1b, 0xca, 0xaa, 0xda, 0xf9, 0xb6, 0x56, 0xbd, 0x1b, 0x75,
-- 0x3c, 0xe1, 0x4d, 0xe2, 0x4d, 0xf9, 0xf3, 0x83, 0xb1, 0xad, 0xff, 0xa0,
-- 0xab, 0xeb, 0x07, 0x89, 0x46, 0x12, 0xae, 0xbc, 0xb2, 0x76, 0xb3, 0x24,
-- 0x93, 0x9c, 0xbb, 0x2c, 0x58, 0x57, 0xfa, 0xc1, 0xde, 0xd4, 0xac, 0xa6,
-- 0x30, 0x6f, 0xf0, 0xe1, 0x6a, 0xf6, 0x8e, 0x70, 0x71, 0x60, 0x5d, 0xb2,
-- 0xcb, 0x45, 0xe3, 0xf2, 0x73, 0x66, 0x36, 0x8f, 0xb3, 0xd9, 0x51, 0x04,
-- 0xc1, 0x92, 0x93, 0x03, 0x8f, 0x87, 0x8c, 0xc6, 0x97, 0x7c, 0xc0, 0xea,
-- 0x28, 0xe8, 0x7d, 0x98, 0xde, 0xf6, 0xf5, 0xe1, 0xc5, 0x66, 0x0c, 0x96,
-- 0x9a, 0x06, 0xb5, 0xd4, 0x51, 0xf9, 0x48, 0xcf, 0x77, 0xea, 0x2a, 0x8b,
-- 0xb8, 0x0c, 0x4f, 0x09, 0xc3, 0xcc, 0x3e, 0x92, 0x6c, 0x35, 0xef, 0x06,
-- 0x3d, 0x3c, 0xa0, 0x65, 0x60, 0x86, 0x1c, 0x04, 0x23, 0x69, 0xf4, 0x90,
-- 0xd5, 0xb4, 0x08, 0xf4, 0x1c, 0xce, 0x26, 0xe7, 0x16, 0x5f, 0x1f, 0x1e,
-- 0x1f, 0x5e, 0x1c, 0x22, 0x43, 0x20, 0x32, 0xe4, 0x4e, 0x71, 0x7b, 0xd5,
-- 0xd9, 0xf8, 0x7a, 0x5e, 0x70, 0xd0, 0x28, 0x6d, 0x07, 0x12, 0x74, 0xbf,
-- 0xcf, 0x46, 0xaf, 0xf7, 0xbf, 0xe3, 0xd2, 0x5d, 0x7c, 0x66, 0x4e, 0xcf,
-- 0x4e, 0x4e, 0xdf, 0x1c, 0xbd, 0x7b, 0xdd, 0x4f, 0x0e, 0x4e, 0x4e, 0x7f,
-- 0xec, 0x27, 0x6f, 0x4f, 0xbe, 0x3b, 0xec, 0x88, 0xe6, 0xe6, 0x68, 0xb1,
-- 0x8e, 0xc0, 0x27, 0x2d, 0x90, 0xa1, 0x18, 0xf2, 0xc0, 0x19, 0x96, 0xc2,
-- 0x10, 0xcd, 0x64, 0x56, 0x66, 0xcb, 0x15, 0xd2, 0x9a, 0x69, 0xe9, 0x69,
-- 0x2d, 0xfb, 0xc9, 0x37, 0x87, 0xfb, 0xaf, 0xdb, 0xe2, 0xc0, 0xe9, 0xc9,
-- 0xb9, 0xcc, 0x8a, 0x67, 0xe7, 0x26, 0xcd, 0xec, 0x9b, 0x98, 0x25, 0xdb,
-- 0xb9, 0x59, 0xc9, 0xbc, 0xc9, 0x02, 0xb0, 0x47, 0x3a, 0x02, 0x30, 0x92,
-- 0x4d, 0x56, 0x96, 0xfd, 0x45, 0x0c, 0x84, 0x8b, 0x94, 0x7b, 0xf8, 0x26,
-- 0x44, 0xde, 0x84, 0x61, 0xab, 0x0b, 0x81, 0x88, 0x73, 0x41, 0xa3, 0xb0,
-- 0x85, 0x3a, 0x94, 0xbd, 0xf1, 0xd6, 0xac, 0x75, 0x3a, 0x4f, 0xa4, 0xa0,
-- 0x8e, 0xe1, 0xc4, 0x40, 0x54, 0x92, 0xe8, 0x87, 0x54, 0xe3, 0xd7, 0x46,
-- 0x19, 0x27, 0x88, 0x54, 0x28, 0x0c, 0x03, 0x22, 0xd1, 0xb0, 0xe9, 0x98,
-- 0xbd, 0xcb, 0xba, 0x4a, 0x24, 0x99, 0x45, 0x39, 0x41, 0x52, 0x63, 0x33,
-- 0x24, 0x2f, 0xa1, 0xef, 0x53, 0x83, 0xb3, 0x7e, 0x90, 0x8f, 0x3b, 0x10,
-- 0x06, 0x20, 0x52, 0x2c, 0x2f, 0x89, 0x3c, 0x33, 0x09, 0x17, 0xc1, 0x3e,
-- 0xe9, 0x41, 0xc4, 0xcd, 0x70, 0xc4, 0x47, 0xfc, 0x1a, 0xe9, 0xfb, 0xdd,
-- 0x57, 0xc0, 0xc6, 0x9b, 0x15, 0xa7, 0x3b, 0xac, 0x56, 0xa5, 0x2d, 0x06,
-- 0x48, 0x00, 0xc7, 0x47, 0xb4, 0xaf, 0x7c, 0xd4, 0xdb, 0x51, 0x84, 0xc8,
-- 0xd1, 0x91, 0x3a, 0xa3, 0x39, 0x6f, 0x35, 0xce, 0x3a, 0xb5, 0x15, 0x77,
-- 0xcc, 0xf1, 0xd7, 0x9d, 0x3d, 0x23, 0x30, 0xfb, 0x91, 0xae, 0x23, 0x33,
-- 0xd8, 0xd9, 0xe1, 0xc5, 0x59, 0xcb, 0xab, 0xff, 0xbc, 0xc3, 0x96, 0xb7,
-- 0xc1, 0xb1, 0xdf, 0x9d, 0xbd, 0xf2, 0x17, 0xab, 0x7a, 0x05, 0x77, 0xe1,
-- 0x7e, 0x1f, 0xca, 0x1d, 0x7d, 0xd2, 0x85, 0x86, 0xbb, 0x21, 0xc0, 0xbd,
-- 0x1d, 0xfd, 0x21, 0xea, 0x7c, 0xf5, 0x2c, 0xbf, 0x39, 0x3c, 0x3e, 0x8d,
-- 0x67, 0xf9, 0xdd, 0xd9, 0x9b, 0x1f, 0x87, 0x0f, 0x64, 0x05, 0xfe, 0xe3,
-- 0x63, 0x7a, 0x3f, 0xa6, 0x75, 0xdd, 0x09, 0x83, 0x5d, 0xa5, 0xb0, 0xda,
-- 0x19, 0x56, 0xb8, 0x45, 0x82, 0x34, 0xb1, 0xcc, 0x04, 0x1e, 0x37, 0xd0,
-- 0xdb, 0x68, 0xea, 0x91, 0xd8, 0xe0, 0x44, 0x2c, 0xad, 0x73, 0x4c, 0xec,
-- 0x55, 0xb2, 0x07, 0xe9, 0x33, 0x57, 0x3c, 0x0d, 0xdf, 0xf1, 0x58, 0xf2,
-- 0x11, 0x97, 0xd5, 0x18, 0x06, 0xc9, 0xd7, 0x1d, 0xc2, 0x2b, 0x4b, 0x22,
-- 0x8c, 0xa3, 0xc6, 0xbd, 0xb9, 0xe3, 0xfd, 0x71, 0x72, 0x35, 0x2c, 0xca,
-- 0x9c, 0xed, 0x73, 0x5a, 0xec, 0x4c, 0x1a, 0x4b, 0x50, 0xd2, 0x93, 0x4f,
-- 0x2d, 0x33, 0x80, 0xae, 0xe6, 0x2c, 0x64, 0x48, 0x32, 0xbf, 0x93, 0xb8,
-- 0xe9, 0x19, 0xb4, 0x7b, 0xfe, 0xce, 0xb5, 0xba, 0xa2, 0x24, 0xbd, 0x54,
-- 0x44, 0xbd, 0xa7, 0x7d, 0x9e, 0x79, 0x86, 0x62, 0xfa, 0x86, 0x9b, 0xad,
-- 0x9f, 0x28, 0x47, 0x74, 0x11, 0xb7, 0x28, 0x81, 0x0c, 0x11, 0xeb, 0x06,
-- 0x39, 0xe9, 0x06, 0x8d, 0x0d, 0xbb, 0x47, 0x10, 0x25, 0x3b, 0x4a, 0xb4,
-- 0xbe, 0x01, 0xff, 0xec, 0xac, 0x68, 0xe3, 0x5c, 0x3d, 0x3c, 0x1b, 0x76,
-- 0x28, 0x2b, 0x3e, 0xbf, 0xbc, 0x2c, 0x50, 0xfc, 0xa3, 0x96, 0x83, 0x44,
-- 0xf3, 0x2d, 0xa2, 0xd4, 0xff, 0xa0, 0x43, 0x41, 0x15, 0xe9, 0x37, 0x3c,
-- 0x6e, 0x1c, 0x87, 0x08, 0x44, 0x04, 0x31, 0x9d, 0x51, 0xf7, 0xc1, 0x0b,
-- 0xd1, 0x9c, 0xac, 0x3e, 0x5d, 0x80, 0x8d, 0x16, 0x0c, 0xc9, 0x08, 0x75,
-- 0xc7, 0x10, 0xe5, 0x59, 0x9d, 0x10, 0xc4, 0xbb, 0x1f, 0x1f, 0xab, 0x2b,
-- 0x24, 0xe1, 0xdc, 0x4d, 0xf4, 0x1e, 0x91, 0xbf, 0x96, 0x0a, 0x4e, 0x00,
-- 0xf6, 0x0e, 0xab, 0x06, 0xd6, 0x64, 0xad, 0xd3, 0xd7, 0x59, 0x25, 0x59,
-- 0x3d, 0x6e, 0x00, 0xc5, 0x20, 0xf0, 0x9c, 0xe8, 0x58, 0x24, 0x04, 0xe2,
-- 0xf0, 0xfd, 0x44, 0x2a, 0x47, 0x48, 0x3c, 0x94, 0xbe, 0x37, 0xe8, 0xb0,
-- 0x09, 0xb1, 0xed, 0x6b, 0x05, 0x6b, 0xfe, 0xc7, 0x9d, 0xe2, 0x1f, 0x3d,
-- 0x51, 0xc8, 0x22, 0xbe, 0xc4, 0x1f, 0xbf, 0x8a, 0x2c, 0x82, 0xb2, 0x0d,
-- 0xe2, 0x87, 0xdb, 0x20, 0xda, 0x6f, 0xd0, 0xc7, 0x20, 0x4a, 0x5a, 0x9c,
-- 0x6c, 0x62, 0x3d, 0x82, 0xcd, 0x56, 0x1b, 0x17, 0x5f, 0xa7, 0x4d, 0x9a,
-- 0x08, 0x9e, 0x01, 0xd8, 0x59, 0xac, 0x94, 0xca, 0x1e, 0x4b, 0x6a, 0x46,
-- 0xce, 0x55, 0x4b, 0xf9, 0x36, 0xc5, 0xe9, 0xc9, 0x7e, 0x4f, 0xe0, 0xac,
-- 0xbf, 0x03, 0x38, 0x8b, 0x8b, 0x1f, 0xe2, 0x00, 0xbc, 0x9c, 0xa4, 0x30,
-- 0xed, 0x22, 0xd5, 0x99, 0x9a, 0xfe, 0xe2, 0x3f, 0xba, 0x6b, 0x0f, 0x5a,
-- 0x51, 0x5e, 0x05, 0x6d, 0x97, 0x3c, 0x6c, 0x71, 0x1e, 0xb0, 0x8a, 0xc5,
-- 0x95, 0x61, 0x50, 0xd6, 0x4d, 0x2b, 0xbd, 0xb3, 0x9d, 0xac, 0xf6, 0x4b,
-- 0x9d, 0x75, 0x62, 0xfc, 0x48, 0xe5, 0x17, 0x3e, 0x85, 0xf4, 0x6c, 0x9f,
-- 0x75, 0x20, 0x1e, 0xf7, 0x8a, 0xf6, 0x02, 0x5b, 0x77, 0x04, 0x86, 0xa9,
-- 0x25, 0x32, 0x58, 0xe0, 0x8e, 0xe6, 0x63, 0xea, 0x51, 0x1a, 0xca, 0x77,
-- 0x78, 0x48, 0xf4, 0xbe, 0x2a, 0xbe, 0x95, 0x50, 0xdb, 0xc0, 0x85, 0xa0,
-- 0x0b, 0x8a, 0x1e, 0xc7, 0x33, 0xbb, 0xa2, 0x83, 0x34, 0xcc, 0xca, 0xc0,
-- 0xcf, 0x38, 0x3c, 0x03, 0xa0, 0xe6, 0xa9, 0x8b, 0x67, 0xec, 0xd0, 0x88,
-- 0xc2, 0x4a, 0x5a, 0x57, 0x59, 0xed, 0xa2, 0x99, 0x26, 0x5e, 0x16, 0x97,
-- 0x41, 0x6d, 0xcc, 0x78, 0x32, 0x9b, 0x62, 0x8f, 0xee, 0xdc, 0x0a, 0x07,
-- 0xd6, 0xd6, 0x40, 0x74, 0xa1, 0x46, 0xf9, 0x7d, 0x46, 0x73, 0xa1, 0x1b,
-- 0x18, 0xf0, 0x2d, 0x5a, 0xcb, 0x0c, 0xcd, 0x06, 0x2b, 0x12, 0xe5, 0x49,
-- 0xd4, 0xcd, 0xb2, 0x0d, 0x96, 0xe4, 0x52, 0xa7, 0xa5, 0xab, 0x99, 0x11,
-- 0xae, 0xa8, 0x19, 0xe3, 0x18, 0xd6, 0x29, 0xd9, 0x18, 0x6c, 0x3a, 0xa9,
-- 0x0f, 0xf5, 0xa2, 0x84, 0x34, 0x62, 0xf7, 0x75, 0xea, 0x42, 0x4e, 0x5d,
-- 0x6e, 0x84, 0xa0, 0xad, 0x1b, 0x85, 0x28, 0x4d, 0x70, 0x67, 0x5b, 0x62,
-- 0x42, 0x36, 0x6e, 0x09, 0xc4, 0xdf, 0x48, 0x2e, 0x6b, 0x35, 0x36, 0xcf,
-- 0xee, 0xc2, 0xc6, 0xbc, 0xde, 0xe5, 0x1a, 0xfc, 0x1d, 0xcf, 0xd4, 0xb5,
-- 0x48, 0xa5, 0xd3, 0x45, 0x64, 0x8f, 0x60, 0x6f, 0x3f, 0x7f, 0x11, 0x3c,
-- 0xfc, 0xb6, 0x8f, 0xc2, 0x2e, 0xf3, 0x38, 0x22, 0xe8, 0x2d, 0x3e, 0x1c,
-- 0x26, 0xaf, 0x35, 0xb2, 0x1f, 0x49, 0xd4, 0x4b, 0x6d, 0x01, 0x01, 0xdf,
-- 0x41, 0x33, 0xdf, 0x69, 0x26, 0x4d, 0xc7, 0x96, 0xea, 0xfb, 0x55, 0x47,
-- 0xae, 0x9e, 0xa0, 0x3a, 0xcd, 0xad, 0x34, 0xce, 0x08, 0x7f, 0x9b, 0xb5,
-- 0x32, 0x47, 0x7c, 0x6a, 0x35, 0xec, 0xb2, 0x37, 0x68, 0x35, 0x32, 0x89,
-- 0xd7, 0xf6, 0x2e, 0x0a, 0x33, 0xea, 0x5b, 0x13, 0xc5, 0xa5, 0x66, 0xca,
-- 0x58, 0xdb, 0x1d, 0xb9, 0xdf, 0xd0, 0x93, 0x9e, 0x94, 0x13, 0xb8, 0xf1,
-- 0xee, 0xf9, 0xc9, 0x32, 0x2d, 0x45, 0xf5, 0x9b, 0xdf, 0x98, 0xb1, 0x57,
-- 0x6c, 0x18, 0xd9, 0x78, 0x59, 0x37, 0x41, 0xed, 0x82, 0x31, 0xe9, 0x15,
-- 0x8e, 0x21, 0x6d, 0xc0, 0x6d, 0xa3, 0xe2, 0x79, 0xef, 0xd4, 0x2c, 0xbd,
-- 0x7b, 0xbd, 0x4d, 0xcb, 0x32, 0x47, 0x12, 0xbe, 0x33, 0x01, 0x77, 0x25,
-- 0x90, 0xdb, 0x90, 0xcb, 0x4c, 0xe0, 0xad, 0xea, 0xc2, 0x04, 0x99, 0xce,
-- 0xee, 0x89, 0x76, 0xca, 0xce, 0xde, 0xdf, 0x48, 0xe5, 0xe0, 0xa0, 0x73,
-- 0x67, 0x54, 0xd3, 0xa2, 0xc2, 0xed, 0xee, 0x3b, 0x7a, 0x86, 0xea, 0x4b,
-- 0x5a, 0xa9, 0x8b, 0xfc, 0xb6, 0x57, 0x6d, 0xf1, 0xa3, 0x30, 0x70, 0x44,
-- 0x56, 0x35, 0xf3, 0x56, 0xf1, 0x91, 0x2e, 0x67, 0x1e, 0x1f, 0xf1, 0x9b,
-- 0x72, 0xf4, 0x94, 0xfe, 0xf9, 0x96, 0xff, 0x61, 0x56, 0xc1, 0x2a, 0x92,
-- 0xa0, 0xf5, 0x0a, 0xe0, 0x4f, 0xcc, 0x13, 0xb8, 0x30, 0x82, 0xa8, 0xfc,
-- 0xe7, 0xa0, 0xa2, 0x37, 0xf8, 0xa5, 0xcc, 0x1e, 0x78, 0x87, 0xe6, 0xf6,
-- 0x77, 0xb6, 0x7a, 0x2e, 0x49, 0x49, 0x20, 0x4a, 0x1c, 0xc3, 0xa2, 0x36,
-- 0x73, 0xcc, 0x04, 0x15, 0x5b, 0x1d, 0x9a, 0x87, 0xc0, 0x7f, 0xc1, 0xfe,
-- 0x29, 0x76, 0x85, 0x7c, 0x85, 0xfb, 0x72, 0x75, 0x7f, 0x92, 0xe1, 0x28,
-- 0xff, 0xb4, 0xf0, 0x6a, 0x1e, 0x9c, 0xdb, 0xd7, 0xe7, 0xe7, 0x83, 0x77,
-- 0x8a, 0x69, 0xb2, 0xc2, 0x25, 0xe6, 0xbe, 0x6e, 0x37, 0xcc, 0x4b, 0x41,
-- 0x8b, 0xf9, 0xec, 0xd3, 0x56, 0xf1, 0x35, 0x67, 0xa6, 0x99, 0x2c, 0x27,
-- 0xaa, 0x04, 0x12, 0x8c, 0x52, 0x47, 0x07, 0xa3, 0x65, 0x6e, 0x85, 0x5c,
-- 0xf1, 0xb0, 0x5a, 0x1d, 0x25, 0xb1, 0x73, 0xc5, 0x8a, 0x20, 0x57, 0x0e,
-- 0x35, 0x7a, 0x90, 0x93, 0x74, 0x63, 0xc0, 0x20, 0xb3, 0x6c, 0xc6, 0x00,
-- 0x84, 0x2e, 0x1d, 0x4e, 0x64, 0x3d, 0xe4, 0xf3, 0xa2, 0xf3, 0x15, 0x8e,
-- 0xab, 0x09, 0x17, 0xb1, 0x61, 0x1d, 0x5e, 0x62, 0xeb, 0xff, 0x10, 0x59,
-- 0xb1, 0xab, 0xfb, 0xf9, 0xf8, 0xfa, 0xf5, 0xbb, 0xf3, 0xb5, 0xd5, 0x21,
-- 0x01, 0x56, 0x3c, 0x8d, 0x61, 0xac, 0xf9, 0xe9, 0xb2, 0x98, 0x73, 0x36,
-- 0x55, 0x10, 0x27, 0x91, 0x75, 0xdc, 0x3b, 0xa7, 0xef, 0x0e, 0xbf, 0x3e,
-- 0xb1, 0x7f, 0x56, 0x2e, 0xf9, 0x83, 0x2b, 0x7c, 0x9c, 0x96, 0x57, 0x59,
-- 0x07, 0xbe, 0x62, 0x34, 0x38, 0xc3, 0x7c, 0x09, 0x04, 0x68, 0x22, 0xc8,
-- 0x29, 0xbf, 0x2e, 0xb4, 0xd8, 0x57, 0x92, 0xc4, 0x47, 0x2b, 0xbc, 0xcc,
-- 0xb8, 0x74, 0x76, 0xbf, 0xfe, 0x2a, 0xbe, 0x60, 0x5e, 0xbf, 0x5b, 0xd1,
-- 0x1d, 0x7f, 0x33, 0x30, 0x79, 0x42, 0x2d, 0x69, 0x13, 0x3a, 0x1f, 0xb9,
-- 0xd4, 0x82, 0xe9, 0x58, 0x95, 0xf3, 0xd3, 0x23, 0xfb, 0xa7, 0x31, 0xf5,
-- 0x30, 0x01, 0x58, 0x68, 0x9e, 0x53, 0xbe, 0x50, 0x87, 0x3c, 0x19, 0x4d,
-- 0xd3, 0xf9, 0x8d, 0xe4, 0x74, 0x77, 0x8f, 0x5c, 0xd0, 0x0b, 0x2c, 0xf3,
-- 0x02, 0x38, 0x9c, 0x7e, 0x95, 0xd5, 0x20, 0x8f, 0xec, 0x5d, 0x49, 0x74,
-- 0x11, 0x78, 0xa8, 0x0e, 0x96, 0xee, 0x5c, 0x11, 0x2b, 0x4c, 0xbc, 0x8a,
-- 0x09, 0xd6, 0xfd, 0x16, 0x83, 0x85, 0x6d, 0x9c, 0x4b, 0x11, 0xa7, 0x33,
-- 0x09, 0x0e, 0x3a, 0xd5, 0x86, 0x36, 0x3b, 0x76, 0x7d, 0x25, 0x1e, 0x99,
-- 0x29, 0xa4, 0x44, 0xd8, 0x1d, 0x75, 0x7e, 0xde, 0x92, 0x98, 0xc3, 0xf7,
-- 0xcb, 0x03, 0x14, 0xa1, 0xeb, 0xe0, 0x36, 0xc9, 0xbd, 0x93, 0x6c, 0x8c,
-- 0xe8, 0xd2, 0x72, 0x77, 0x9c, 0x64, 0xd9, 0x3f, 0x05, 0xc0, 0x59, 0x77,
-- 0x73, 0xcf, 0x3e, 0x7f, 0xf6, 0x74, 0x73, 0xb3, 0x9f, 0x98, 0x91, 0x56,
-- 0x52, 0xb1, 0xd8, 0x91, 0xc2, 0xe7, 0x53, 0x02, 0x61, 0x58, 0xc4, 0xbd,
-- 0x46, 0x66, 0x6e, 0xb0, 0xfe, 0xdd, 0xcd, 0xf1, 0xde, 0xda, 0xab, 0x3c,
-- 0x3d, 0xc6, 0xf5, 0x04, 0x8f, 0xcc, 0xd5, 0x8b, 0x05, 0x16, 0x9c, 0xc9,
-- 0x03, 0x1b, 0xe6, 0x61, 0x58, 0xe9, 0xd9, 0x97, 0xca, 0xdb, 0xa5, 0x45,
-- 0x06, 0x88, 0x5f, 0x07, 0xec, 0xc2, 0x2e, 0x1b, 0x4e, 0xa1, 0x7f, 0x73,
-- 0x74, 0x7c, 0xe8, 0x0e, 0xf7, 0xff, 0xde, 0x1a, 0xf2, 0x20, 0xcb, 0x71,
-- 0x9c, 0x93, 0x08, 0x11, 0x2d, 0x48, 0x53, 0xee, 0x23, 0xd1, 0x7f, 0xf0,
-- 0x6d, 0x5f, 0xf4, 0x44, 0x7c, 0xec, 0x61, 0x04, 0xa9, 0xe1, 0xc3, 0x77,
-- 0xdf, 0x1d, 0x9d, 0x9d, 0xbc, 0x7b, 0x7b, 0xf8, 0xce, 0x65, 0x14, 0xf0,
-- 0x75, 0xda, 0xed, 0xd0, 0x8b, 0x7c, 0x1b, 0x39, 0xe7, 0xa4, 0xb0, 0xa8,
-- 0xc7, 0xce, 0x26, 0x9e, 0x05, 0xed, 0x96, 0xfe, 0x35, 0x0c, 0x9b, 0x0b,
-- 0x1e, 0xb2, 0x7d, 0x63, 0x9d, 0x62, 0xc1, 0xa1, 0xc0, 0x13, 0xce, 0xd9,
-- 0x1a, 0x4a, 0x7a, 0x85, 0xf8, 0x51, 0x72, 0x71, 0x03, 0x7e, 0x1c, 0x67,
-- 0x8a, 0x36, 0x5e, 0x05, 0xd5, 0xcd, 0x2c, 0xbd, 0xc8, 0x67, 0x61, 0x35,
-- 0x06, 0xe1, 0xa9, 0x5d, 0xaa, 0x3f, 0xaf, 0xf2, 0x27, 0x02, 0x55, 0x23,
-- 0x2c, 0x8c, 0x71, 0xad, 0x4e, 0x19, 0x38, 0x69, 0x12, 0x89, 0x3d, 0x48,
-- 0x02, 0x74, 0x78, 0x0f, 0x78, 0x69, 0x0e, 0xf9, 0xb6, 0x62, 0x1d, 0xcc,
-- 0xa0, 0xe1, 0xaa, 0x47, 0x59, 0x83, 0x2f, 0xd4, 0x2f, 0x1f, 0xa3, 0xbc,
-- 0x55, 0xa1, 0xf3, 0x4b, 0x88, 0x20, 0x80, 0x21, 0x80, 0xdf, 0x70, 0x2d,
-- 0x88, 0xe1, 0x3d, 0xff, 0x70, 0x7a, 0x76, 0xf2, 0xc3, 0x8f, 0xff, 0xe0,
-- 0x2e, 0xce, 0xfd, 0x34, 0x7e, 0xe2, 0x6b, 0xc8, 0x1a, 0xff, 0xe5, 0x37,
-- 0xf5, 0xf6, 0x60, 0x77, 0xcd, 0xf6, 0xfb, 0x9a, 0xc2, 0xb7, 0x0a, 0x92,
-- 0x1b, 0x6e, 0x2e, 0x01, 0xba, 0xf6, 0xd5, 0xa7, 0x2d, 0x44, 0xd7, 0x31,
-- 0x07, 0x1c, 0x61, 0x4e, 0xbc, 0x09, 0x2a, 0xa1, 0x74, 0x95, 0x4b, 0x03,
-- 0x48, 0x32, 0x2a, 0xa0, 0xb1, 0xac, 0x14, 0xd7, 0xc1, 0xeb, 0x03, 0x76,
-- 0x1f, 0x97, 0xb2, 0x5b, 0x8f, 0xfd, 0xe3, 0xe3, 0xdf, 0xbe, 0x08, 0x2e,
-- 0x94, 0xa2, 0xb1, 0x0c, 0x30, 0x2d, 0xb8, 0x09, 0x0d, 0x9c, 0x40, 0x6a,
-- 0xe4, 0xdf, 0x01, 0xb6, 0xe7, 0x86, 0xf3, 0xee, 0x44, 0x47, 0x23, 0x2e,
-- 0xb5, 0x41, 0x95, 0x91, 0xe0, 0x0e, 0x8f, 0x06, 0x9b, 0xc4, 0xf9, 0xc2,
-- 0x44, 0xc9, 0xf0, 0x2f, 0x22, 0xc1, 0xcf, 0x7f, 0x69, 0x85, 0xad, 0xe1,
-- 0x9e, 0x07, 0x68, 0x3b, 0x92, 0xbb, 0x0b, 0xe7, 0x0d, 0x96, 0xf2, 0x14,
-- 0xa8, 0x3a, 0x84, 0xdc, 0xf0, 0x0e, 0x1f, 0x3e, 0x5b, 0x64, 0x39, 0x22,
-- 0xa8, 0xcc, 0xab, 0x1b, 0x24, 0xc6, 0xf3, 0xa1, 0xec, 0x4b, 0x59, 0xce,
-- 0x1a, 0x55, 0x8a, 0x59, 0xc4, 0xc7, 0x50, 0x68, 0xec, 0x32, 0x62, 0xfa,
-- 0x79, 0x71, 0x72, 0x70, 0x72, 0x4c, 0xbf, 0x1c, 0xbe, 0x39, 0xfa, 0xc1,
-- 0x33, 0x34, 0x29, 0x57, 0xa1, 0x9c, 0xd7, 0x18, 0x84, 0x2b, 0x5f, 0x11,
-- 0x3b, 0x87, 0x23, 0x14, 0xe1, 0x26, 0xe4, 0x5d, 0x67, 0x60, 0xca, 0x27,
-- 0x85, 0xa2, 0x84, 0x11, 0x3c, 0xc1, 0x0e, 0xe1, 0x92, 0x0f, 0x99, 0x5e,
-- 0x73, 0x6f, 0x65, 0x50, 0x48, 0x62, 0xcb, 0x2f, 0x5d, 0xdc, 0x67, 0x68,
-- 0xca, 0x34, 0xeb, 0x85, 0x9a, 0x2f, 0x80, 0xb9, 0xe3, 0x00, 0x71, 0x59,
-- 0x97, 0xed, 0x07, 0x93, 0x34, 0xb5, 0x36, 0x08, 0x27, 0xd1, 0xf0, 0x83,
-- 0xb5, 0x30, 0xe4, 0xc1, 0x0f, 0x16, 0xea, 0x97, 0x6b, 0xae, 0x39, 0x27,
-- 0x5d, 0x00, 0x4d, 0x2a, 0x46, 0xb2, 0x1e, 0xbc, 0xe5, 0x5e, 0x61, 0x71,
-- 0x91, 0x37, 0x9d, 0x08, 0x10, 0xb9, 0xf0, 0x48, 0x46, 0x88, 0xbc, 0x4d,
-- 0x91, 0x3c, 0x8f, 0xcc, 0x7b, 0x79, 0xa9, 0xd5, 0x46, 0xfa, 0x9b, 0x1a,
-- 0x49, 0x9b, 0xad, 0x3c, 0xfb, 0x2d, 0x8d, 0x3c, 0x6b, 0xb5, 0x71, 0xfd,
-- 0x9b, 0x1a, 0x71, 0x65, 0x97, 0xe8, 0x5a, 0xfc, 0xe1, 0xe8, 0x22, 0x39,
-- 0x38, 0x79, 0xed, 0x69, 0xf4, 0xc2, 0x5d, 0xed, 0x29, 0x69, 0x04, 0x24,
-- 0x3f, 0xc3, 0x72, 0xe5, 0x2a, 0xcf, 0x5b, 0x11, 0x73, 0x8e, 0x4f, 0xa8,
-- 0x7c, 0x1d, 0xf0, 0x1c, 0x1f, 0x95, 0x92, 0xdd, 0x17, 0x82, 0x29, 0xba,
-- 0x9a, 0xe7, 0x28, 0xe0, 0xd9, 0xc0, 0x1f, 0x62, 0xf4, 0xf5, 0xb4, 0x34,
-- 0xf0, 0xa1, 0x51, 0xca, 0xbe, 0xca, 0xb9, 0xb8, 0x78, 0x2b, 0x06, 0x1f,
-- 0xf2, 0x31, 0x85, 0x85, 0xcb, 0x16, 0x86, 0xe9, 0x84, 0x73, 0x6a, 0x11,
-- 0xe9, 0x23, 0xea, 0x3a, 0xd7, 0x7d, 0xc6, 0x68, 0x1a, 0x69, 0xca, 0x3b,
-- 0xca, 0x09, 0xe7, 0x0d, 0x8a, 0x51, 0xdc, 0x7d, 0x48, 0x5e, 0xac, 0xef,
-- 0x4c, 0xcc, 0x76, 0x80, 0x7b, 0x71, 0xee, 0x74, 0x6f, 0x2d, 0x09, 0x19,
-- 0xb1, 0x28, 0xd7, 0x84, 0xeb, 0x67, 0x57, 0xfe, 0x79, 0x23, 0xf5, 0xa9,
-- 0xe9, 0xfc, 0x69, 0x7e, 0x6b, 0xfe, 0xf7, 0xe0, 0x8e, 0x7e, 0xe2, 0x43,
-- 0x3b, 0x66, 0xe9, 0x54, 0x02, 0x6e, 0x14, 0x94, 0xe0, 0x7e, 0x5e, 0xa7,
-- 0x1f, 0x11, 0x23, 0xc5, 0x22, 0x11, 0xd6, 0x70, 0x1c, 0xb0, 0xc1, 0xa7,
-- 0xca, 0x9c, 0x13, 0x53, 0xc5, 0xe5, 0xfc, 0x99, 0x31, 0x5e, 0x33, 0xda,
-- 0xd2, 0xca, 0x85, 0x5a, 0x72, 0x64, 0x88, 0x82, 0x71, 0x89, 0xf1, 0xbf,
-- 0xe2, 0x02, 0xa0, 0xdd, 0x0e, 0x59, 0xd7, 0xad, 0x81, 0xf7, 0x14, 0x12,
-- 0x8c, 0x0d, 0x77, 0x7c, 0x3e, 0xce, 0x25, 0x79, 0x49, 0x0a, 0xa0, 0x4f,
-- 0x50, 0xea, 0x4a, 0x16, 0x6d, 0xb0, 0xc2, 0x12, 0x5a, 0x48, 0x09, 0x57,
-- 0xe5, 0x70, 0x26, 0x7f, 0x4c, 0x0a, 0xac, 0xa4, 0x84, 0x2e, 0x71, 0xfd,
-- 0x43, 0xfa, 0xe2, 0x5e, 0x9c, 0xac, 0xe9, 0x1c, 0x76, 0x99, 0xa8, 0x7a,
-- 0x86, 0x6e, 0x8c, 0x6a, 0xa6, 0x5e, 0x0d, 0x7c, 0x66, 0x11, 0x01, 0xca,
-- 0xcb, 0xad, 0x0a, 0x92, 0x31, 0x71, 0x18, 0x8d, 0x14, 0xca, 0x5d, 0xb9,
-- 0x96, 0x44, 0xfc, 0x8f, 0x25, 0xab, 0x8d, 0xe7, 0x1a, 0xc7, 0xb3, 0x69,
-- 0x2b, 0x81, 0x06, 0xf1, 0x7c, 0x45, 0x3f, 0xdc, 0x98, 0xec, 0x9b, 0x74,
-- 0xd2, 0x4e, 0x88, 0xe0, 0xf6, 0xe3, 0xd6, 0x3e, 0x6b, 0x93, 0x88, 0xe5,
-- 0x27, 0x30, 0x22, 0x62, 0x11, 0xa6, 0x29, 0x7d, 0xae, 0x4f, 0xb2, 0x11,
-- 0xe2, 0x2e, 0x63, 0x4b, 0x8f, 0x8b, 0xa4, 0x2d, 0xb3, 0xc5, 0xd4, 0x4d,
-- 0xd1, 0x3e, 0x44, 0x5e, 0x14, 0xdc, 0x7c, 0x58, 0xf1, 0xb1, 0x8e, 0x37,
-- 0x0e, 0xd6, 0x0a, 0x05, 0xc6, 0x17, 0xbe, 0x93, 0x14, 0x79, 0x2c, 0x44,
-- 0x24, 0xf3, 0xdc, 0x11, 0xa4, 0x16, 0x32, 0xc5, 0x47, 0x86, 0xa9, 0xe5,
-- 0xfe, 0xb6, 0x37, 0xe2, 0x18, 0x43, 0xb9, 0x29, 0x7c, 0x88, 0x3c, 0xd6,
-- 0x61, 0x59, 0x0a, 0x1e, 0x8a, 0x2f, 0x49, 0x00, 0xf8, 0x8a, 0x74, 0xae,
-- 0xd1, 0x62, 0x28, 0x99, 0x3d, 0x04, 0xae, 0x4e, 0x84, 0x0d, 0x56, 0x0b,
-- 0x6c, 0x11, 0x6c, 0xd8, 0x93, 0xa0, 0xfc, 0x0e, 0xae, 0xe4, 0xa0, 0xa2,
-- 0x02, 0x9f, 0x00, 0x77, 0xef, 0x20, 0x52, 0x2f, 0xe9, 0x84, 0x63, 0xb3,
-- 0x10, 0x19, 0xcf, 0x21, 0x76, 0xda, 0x8b, 0x7d, 0xba, 0x7f, 0x7e, 0x6e,
-- 0x0b, 0x7d, 0x10, 0x2e, 0xa8, 0x2c, 0xa1, 0xe6, 0xad, 0x02, 0x42, 0x4a,
-- 0xe1, 0x55, 0x62, 0x75, 0x47, 0xdb, 0x68, 0xe5, 0x9f, 0xed, 0x3c, 0x71,
-- 0x7d, 0xb9, 0xae, 0xbe, 0x93, 0xb6, 0xfa, 0x9f, 0xd8, 0x55, 0x77, 0x5f,
-- 0xdf, 0x75, 0xf4, 0xf5, 0x34, 0x22, 0xa2, 0xdd, 0xdd, 0xcf, 0x0c, 0x5a,
-- 0x44, 0x10, 0xb7, 0xa7, 0x89, 0xef, 0x30, 0xe8, 0x91, 0x9e, 0x1b, 0xc0,
-- 0xb6, 0x18, 0xf7, 0xa5, 0x74, 0xc1, 0xa3, 0x09, 0xba, 0x7a, 0xe6, 0xba,
-- 0x22, 0x9d, 0x69, 0x1d, 0xee, 0x28, 0x3d, 0x24, 0xd1, 0xd9, 0x81, 0x5d,
-- 0x99, 0x0f, 0xca, 0x11, 0xaf, 0x01, 0x89, 0x61, 0x2b, 0x33, 0xfa, 0x6c,
-- 0x14, 0x41, 0x3f, 0x9f, 0xf9, 0x29, 0xf9, 0x71, 0x4b, 0x11, 0x79, 0x40,
-- 0x8d, 0x0d, 0x83, 0xc3, 0xea, 0x08, 0xc5, 0x22, 0xd8, 0x5d, 0x68, 0x55,
-- 0x9b, 0xcf, 0xc8, 0xab, 0xbe, 0x17, 0x39, 0x7e, 0xa7, 0x4c, 0xc4, 0x5a,
-- 0xfe, 0x63, 0x98, 0x9c, 0x40, 0x09, 0x6b, 0x80, 0x84, 0x42, 0x95, 0xe5,
-- 0xe3, 0xee, 0x80, 0xdd, 0xc3, 0xd3, 0xbe, 0xf3, 0xc2, 0xaf, 0x89, 0x0d,
-- 0xc9, 0xdc, 0x81, 0x5b, 0x7a, 0x7c, 0xbc, 0xe7, 0xc1, 0xbc, 0xfd, 0x19,
-- 0x62, 0x2f, 0x38, 0x33, 0x09, 0xb0, 0x8f, 0x11, 0xae, 0x35, 0x1d, 0xa9,
-- 0x4d, 0x17, 0xe8, 0x70, 0x09, 0x4e, 0x12, 0xdc, 0x41, 0x9e, 0x92, 0xff,
-- 0xb6, 0x64, 0x86, 0x84, 0x5b, 0x97, 0xee, 0x50, 0xfd, 0xd3, 0xde, 0x13,
-- 0x2c, 0x13, 0x2e, 0x12, 0x84, 0x5b, 0xd9, 0x67, 0x1f, 0xe8, 0xc9, 0x70,
-- 0xeb, 0xef, 0x33, 0x29, 0x05, 0x92, 0x5f, 0x18, 0xa7, 0x03, 0x34, 0x18,
-- 0xba, 0x24, 0x3d, 0x43, 0xf6, 0x00, 0xb2, 0xa4, 0x32, 0x40, 0x01, 0x05,
-- 0x88, 0x7c, 0x31, 0xae, 0x73, 0x65, 0xfa, 0x3a, 0x88, 0x66, 0x18, 0x5b,
-- 0x20, 0x5d, 0x24, 0x6a, 0x1f, 0x48, 0x9e, 0x6e, 0x6f, 0x77, 0x14, 0x41,
-- 0x49, 0x47, 0xc5, 0xad, 0x45, 0x83, 0x2a, 0x46, 0x0b, 0xde, 0x12, 0xa5,
-- 0x19, 0xa2, 0x45, 0xc5, 0x62, 0xea, 0xe0, 0x92, 0x6d, 0x02, 0xbc, 0x62,
-- 0xe6, 0x6b, 0x09, 0xd6, 0x4d, 0x4e, 0xe5, 0xf7, 0x00, 0x8d, 0xb1, 0x45,
-- 0x6b, 0x1d, 0x47, 0x41, 0x94, 0x31, 0xd4, 0xfe, 0x34, 0x28, 0x0d, 0xa3,
-- 0xf1, 0x07, 0xd1, 0xc8, 0x14, 0xa8, 0x36, 0xe8, 0xe6, 0x59, 0x4c, 0x11,
-- 0xe7, 0x17, 0x27, 0x67, 0x4a, 0x61, 0x31, 0xd7, 0xd5, 0xba, 0xc3, 0xfc,
-- 0x88, 0x8f, 0x88, 0xed, 0x77, 0x38, 0xf8, 0x9d, 0xe9, 0x57, 0x72, 0x31,
-- 0x19, 0x77, 0xcc, 0xf7, 0xfa, 0xdc, 0x07, 0xe3, 0xe9, 0xd4, 0xbe, 0x4b,
-- 0x4b, 0x20, 0x4b, 0x59, 0xf5, 0x10, 0x2b, 0x46, 0x1c, 0xbc, 0x24, 0x07,
-- 0xed, 0x64, 0x09, 0x62, 0x17, 0x2b, 0x2e, 0xd3, 0x91, 0xda, 0x73, 0x39,
-- 0x02, 0x55, 0x8d, 0x62, 0xce, 0xe9, 0xd6, 0xa6, 0x45, 0x39, 0x44, 0x27,
-- 0xae, 0x40, 0x8c, 0x39, 0xe8, 0xdd, 0xdd, 0xe5, 0x55, 0x57, 0x38, 0x84,
-- 0xd9, 0x41, 0x24, 0xe1, 0x0e, 0x9a, 0xa0, 0x99, 0x72, 0xc6, 0x43, 0x7b,
-- 0xb7, 0xc7, 0x24, 0x19, 0x49, 0x5c, 0x68, 0x61, 0x15, 0xb8, 0x4d, 0x54,
-- 0xf4, 0x52, 0xd6, 0xb6, 0x5b, 0xe7, 0xd3, 0x93, 0xb3, 0x0b, 0x1b, 0x1a,
-- 0xba, 0xc5, 0x07, 0xad, 0xf3, 0xc3, 0xf8, 0x64, 0xea, 0xa2, 0x01, 0x67,
-- 0x91, 0x4d, 0x88, 0xb4, 0x52, 0x95, 0x08, 0x65, 0x53, 0xd0, 0x8e, 0x35,
-- 0xc4, 0x3a, 0x5b, 0x79, 0x6f, 0xf1, 0x5a, 0xac, 0xed, 0x38, 0x9e, 0x23,
-- 0x66, 0x14, 0x66, 0xd0, 0xdd, 0x8e, 0x54, 0x2f, 0xd3, 0x3c, 0xd9, 0x89,
-- 0xa9, 0x83, 0x95, 0xe7, 0xb3, 0x43, 0xae, 0x56, 0x7d, 0x71, 0x2d, 0xbf,
-- 0x45, 0x63, 0x17, 0xfb, 0xae, 0x7e, 0xd8, 0x1d, 0xfe, 0x01, 0xea, 0xe0,
-- 0x4c, 0x1a, 0x0e, 0xef, 0xe6, 0xf6, 0x9d, 0xbd, 0x39, 0x58, 0xb3, 0x27,
-- 0x41, 0xd6, 0x34, 0xd8, 0xa6, 0xd2, 0x0a, 0x12, 0xdc, 0xf1, 0x41, 0x4f,
-- 0x7b, 0xe9, 0xd1, 0xad, 0x2b, 0x47, 0xa2, 0x28, 0x6f, 0x82, 0x16, 0x9e,
-- 0xfa, 0x16, 0x16, 0xcc, 0xdf, 0xb5, 0x81, 0x23, 0xf3, 0x5b, 0xf3, 0x87,
-- 0x2e, 0x40, 0xf6, 0x2a, 0x9b, 0x1b, 0x61, 0xc8, 0x73, 0xbe, 0x9d, 0x67,
-- 0xce, 0xdb, 0x63, 0xf2, 0x51, 0x30, 0x14, 0xfe, 0xd8, 0xd2, 0x55, 0x11,
-- 0x1c, 0xd7, 0x22, 0xbb, 0x27, 0xcf, 0xfd, 0x0d, 0xc1, 0xaa, 0x84, 0x8f,
-- 0xc0, 0xd0, 0x15, 0x08, 0x6e, 0x24, 0x8e, 0x60, 0xc9, 0xe7, 0x4b, 0x60,
-- 0x57, 0x12, 0x9b, 0x98, 0x32, 0x6e, 0xb3, 0x86, 0x50, 0x44, 0x0e, 0x5f,
-- 0x4d, 0xbc, 0xf6, 0xfd, 0xe8, 0x4d, 0x74, 0x74, 0x7c, 0xe8, 0xb7, 0x4b,
-- 0xc0, 0xc1, 0x70, 0x98, 0xbd, 0x90, 0x47, 0x07, 0x77, 0xee, 0xae, 0x8b,
-- 0x61, 0x72, 0xca, 0xe5, 0xba, 0xe0, 0x7d, 0xaa, 0xfe, 0xcd, 0xb7, 0x26,
-- 0x87, 0x05, 0xc6, 0x18, 0xba, 0x40, 0x61, 0x14, 0xcd, 0xe7, 0xb4, 0xbb,
-- 0xf8, 0x84, 0x7f, 0x0d, 0x2a, 0x2d, 0x45, 0x53, 0x7e, 0xe1, 0x5f, 0xae,
-- 0x68, 0x1e, 0xa4, 0xaa, 0xb5, 0x1f, 0x79, 0xaa, 0xb4, 0x45, 0x7a, 0x9c,
-- 0x94, 0x7c, 0x37, 0xf6, 0xcc, 0x67, 0xba, 0x94, 0x72, 0x08, 0x13, 0x69,
-- 0xe1, 0xd2, 0x9e, 0x69, 0xb0, 0xf1, 0xa0, 0x29, 0xb9, 0x14, 0xf6, 0x65,
-- 0x9d, 0x10, 0x99, 0x4e, 0x27, 0x67, 0x94, 0x8e, 0x6f, 0xa8, 0xad, 0x39,
-- 0x73, 0xdc, 0xa9, 0xd9, 0xcb, 0x7d, 0x96, 0x11, 0x73, 0x4c, 0x7e, 0x41,
-- 0x71, 0xfa, 0xb2, 0x32, 0xae, 0xbb, 0xd7, 0x30, 0x2d, 0x3e, 0x15, 0x6a,
-- 0x74, 0xa4, 0xe3, 0xee, 0xb1, 0xc6, 0xe8, 0xb8, 0x63, 0x9f, 0x9e, 0xc3,
-- 0xbb, 0xcd, 0xa6, 0x21, 0xba, 0xe5, 0x43, 0xe9, 0xee, 0xe9, 0x33, 0xdf,
-- 0xd4, 0x25, 0x50, 0xec, 0x8d, 0xbf, 0xef, 0x37, 0x78, 0x90, 0x83, 0x44,
-- 0xcf, 0xdd, 0x93, 0xa2, 0x2c, 0x88, 0x85, 0xba, 0xe3, 0x58, 0x05, 0x7d,
-- 0x08, 0x31, 0x5c, 0x14, 0x1c, 0x8b, 0x30, 0xbf, 0xf7, 0xc0, 0x1c, 0x43,
-- 0x89, 0xee, 0x13, 0x1b, 0x84, 0x94, 0x07, 0x70, 0x90, 0x1d, 0xa2, 0x6d,
-- 0xaa, 0x82, 0x3e, 0x4b, 0x3f, 0x46, 0x57, 0xfd, 0x6c, 0x39, 0x53, 0x3c,
-- 0x82, 0xa0, 0xa7, 0xcf, 0x55, 0x9b, 0x95, 0x6a, 0xf3, 0x4e, 0xff, 0x0b,
-- 0x99, 0x69, 0xe1, 0x5c, 0xba, 0x96, 0x24, 0x31, 0x97, 0x20, 0xe0, 0xca,
-- 0x15, 0x43, 0x5a, 0x8b, 0x5d, 0x27, 0x7c, 0x21, 0xab, 0x98, 0x68, 0xe1,
-- 0x86, 0x45, 0x80, 0x26, 0xc9, 0xeb, 0xad, 0x8f, 0xc9, 0x57, 0xe6, 0x2d,
-- 0xec, 0x70, 0xc8, 0x94, 0xd9, 0x5f, 0x51, 0x83, 0x70, 0x28, 0x97, 0x8e,
-- 0x00, 0x3a, 0xc9, 0x2c, 0x39, 0xc4, 0xc0, 0xb3, 0xbc, 0xa7, 0x2f, 0xd4,
-- 0x54, 0xa1, 0xaa, 0xb0, 0x15, 0xc6, 0x6b, 0x5b, 0x9a, 0x9f, 0xed, 0x38,
-- 0xbb, 0x0f, 0x67, 0xff, 0xaf, 0x57, 0xc2, 0x1d, 0x02, 0x0c, 0x00, 0x62,
-- 0x70, 0xe7, 0xe7, 0xdf, 0x24, 0x6f, 0x5f, 0x3f, 0xe3, 0x44, 0xd4, 0xab,
-- 0xac, 0xe4, 0x9a, 0x93, 0x5e, 0x17, 0x3b, 0xf9, 0x36, 0x68, 0x6c, 0xd7,
-- 0xc7, 0x15, 0x98, 0xfe, 0xa4, 0x0c, 0x4d, 0x25, 0x6d, 0xda, 0x42, 0x06,
-- 0xb4, 0xbb, 0x32, 0x17, 0x8a, 0x95, 0x63, 0x33, 0x9c, 0x47, 0xc8, 0x2e,
-- 0xed, 0x3c, 0x86, 0x26, 0x13, 0x7b, 0xf6, 0xc4, 0x33, 0xb1, 0xf2, 0x7e,
-- 0xc1, 0xb8, 0xe8, 0xf3, 0x2b, 0x16, 0xa8, 0x3b, 0x4e, 0xd4, 0x33, 0x61,
-- 0x9c, 0x07, 0x72, 0xee, 0x59, 0x98, 0x8d, 0x5f, 0x4b, 0x2b, 0x0b, 0x48,
-- 0x09, 0xde, 0x7b, 0x16, 0xaa, 0x93, 0x24, 0x90, 0xe3, 0x5e, 0xa4, 0xf5,
-- 0x43, 0xc5, 0x55, 0x96, 0x54, 0x82, 0x67, 0x9f, 0xbb, 0x67, 0x97, 0x80,
-- 0x51, 0x0e, 0x0a, 0x47, 0xac, 0x78, 0x43, 0x85, 0x60, 0x11, 0x0d, 0xbc,
-- 0x78, 0x26, 0x72, 0x4f, 0xb0, 0xf6, 0xc1, 0x2b, 0x2f, 0x9a, 0xda, 0x32,
-- 0x2a, 0xae, 0xf9, 0xfa, 0xc5, 0x3c, 0xa9, 0x7c, 0x71, 0x1d, 0x1e, 0xce,
-- 0xe7, 0x72, 0x53, 0x9f, 0xb6, 0x21, 0x1d, 0x8c, 0x07, 0x36, 0x1c, 0xaf,
-- 0x76, 0xd4, 0x85, 0xf4, 0x0f, 0xf6, 0x13, 0x7b, 0x25, 0xaa, 0x23, 0xcd,
-- 0xb4, 0x1e, 0x74, 0xb2, 0xa3, 0x67, 0x86, 0xa6, 0x5c, 0x5c, 0xcd, 0xf3,
-- 0xbf, 0x67, 0x41, 0x0e, 0xb3, 0x15, 0xfd, 0x08, 0x1e, 0xdf, 0x55, 0x86,
-- 0x71, 0x9b, 0x4e, 0x73, 0x65, 0x8a, 0x6c, 0x47, 0xf7, 0x0f, 0x3c, 0x51,
-- 0xaa, 0xfd, 0x98, 0xf3, 0x11, 0x95, 0x18, 0x54, 0x2e, 0xff, 0xc4, 0x1e,
-- 0x9c, 0xac, 0x01, 0x11, 0xf2, 0xfc, 0xa9, 0xca, 0x5e, 0x26, 0x1f, 0xf3,
-- 0xbd, 0xc4, 0x0b, 0x31, 0x65, 0x07, 0x77, 0xc4, 0xa6, 0x9f, 0xeb, 0xd5,
-- 0xa7, 0x5b, 0xa9, 0xe1, 0x4f, 0xa9, 0x71, 0x68, 0xf6, 0x0a, 0x94, 0xd9,
-- 0x5d, 0x3e, 0xd7, 0xcc, 0xa2, 0xe8, 0xf5, 0xe7, 0x2b, 0x4c, 0x50, 0x95,
-- 0xdc, 0x9b, 0x87, 0xa0, 0xa5, 0xe0, 0xf9, 0xcf, 0xfc, 0x49, 0x08, 0xc1,
-- 0xf1, 0x9d, 0x2b, 0x15, 0x51, 0x71, 0x56, 0x6f, 0xc1, 0xce, 0x12, 0xab,
-- 0x2e, 0x0b, 0x83, 0xf7, 0xec, 0x48, 0xe3, 0xbb, 0x74, 0xdd, 0x4f, 0x0b,
-- 0xe6, 0xa6, 0x41, 0x7f, 0x42, 0x52, 0x6f, 0x50, 0x41, 0xcf, 0x2b, 0x08,
-- 0xf3, 0x46, 0xad, 0x2b, 0xff, 0xf4, 0x0b, 0xa5, 0x0d, 0xbb, 0x2f, 0x4d,
-- 0x4c, 0x5d, 0xf9, 0xc6, 0x67, 0xdb, 0xa1, 0xd0, 0x3a, 0x61, 0x4b, 0xbd,
-- 0x80, 0x33, 0xae, 0x7c, 0x41, 0x28, 0xe3, 0x88, 0xae, 0x91, 0x2b, 0x22,
-- 0x6a, 0x3c, 0xe3, 0x41, 0x49, 0xfd, 0x63, 0xbb, 0x0d, 0xa6, 0x7b, 0x11,
-- 0x8a, 0x50, 0xc9, 0xd1, 0xeb, 0xe0, 0xc1, 0x27, 0x7e, 0x82, 0xe9, 0x94,
-- 0xa5, 0x81, 0x7b, 0xb1, 0x44, 0x54, 0x5a, 0x6e, 0x2c, 0x78, 0xf4, 0xa9,
-- 0x26, 0x88, 0x48, 0x4e, 0x16, 0x96, 0x3f, 0x7a, 0x46, 0xc8, 0xe1, 0x00,
-- 0xf9, 0x5c, 0x35, 0xb0, 0x0c, 0xe6, 0xe6, 0x2d, 0x68, 0xef, 0xfd, 0x67,
-- 0xcf, 0x1f, 0x78, 0x56, 0x2f, 0xcd, 0xca, 0x5d, 0xf5, 0xc1, 0x7b, 0x9f,
-- 0xc5, 0xc7, 0xdc, 0xd4, 0x02, 0x43, 0x5c, 0xa1, 0xa3, 0xc6, 0x27, 0x2d,
-- 0xd9, 0x60, 0xa8, 0xbe, 0x7f, 0x33, 0xd3, 0x4f, 0xc9, 0x79, 0x6d, 0xd5,
-- 0xbf, 0x85, 0xe3, 0xfd, 0x3c, 0x80, 0x75, 0x52, 0xa3, 0x8f, 0x2b, 0x7a,
-- 0x1b, 0x16, 0xc2, 0xf3, 0xb1, 0xda, 0x58, 0x9d, 0xa0, 0x05, 0xd9, 0x73,
-- 0x92, 0x23, 0x96, 0x73, 0xcf, 0x39, 0x44, 0x19, 0x54, 0xc0, 0x4b, 0x87,
-- 0x52, 0x2f, 0xa3, 0xfb, 0x86, 0x36, 0x15, 0xd4, 0x11, 0x18, 0xcf, 0xb6,
-- 0x5b, 0xc7, 0xa0, 0xba, 0x5e, 0x8a, 0xea, 0xed, 0x66, 0xe4, 0x61, 0x96,
-- 0x82, 0xd7, 0x76, 0x3d, 0xf7, 0xc2, 0xd8, 0x20, 0x35, 0x1e, 0xd0, 0x68,
-- 0x45, 0x37, 0x4f, 0x40, 0x86, 0xe6, 0xf8, 0x40, 0x91, 0x6d, 0x0f, 0xd3,
-- 0xba, 0x91, 0xae, 0x80, 0x14, 0x50, 0x14, 0x94, 0xa0, 0x1b, 0x15, 0x6d,
-- 0x38, 0xd4, 0x9c, 0x76, 0xe9, 0x3a, 0x1b, 0xdf, 0xd8, 0x91, 0xd9, 0x48,
-- 0x5b, 0xd8, 0x29, 0xc1, 0x5b, 0x4f, 0xdd, 0xd2, 0x42, 0xad, 0x39, 0x3b,
-- 0x6c, 0x6b, 0x02, 0xfe, 0x51, 0xa1, 0x9a, 0xb3, 0x8b, 0xf3, 0xd3, 0x3d,
-- 0x1e, 0xb3, 0xb8, 0x60, 0xe8, 0x40, 0x1c, 0x9c, 0x67, 0x7f, 0xd3, 0x0c,
-- 0xda, 0xca, 0x3f, 0xfd, 0x7c, 0xc5, 0xd3, 0xe7, 0x1a, 0x22, 0x75, 0x34,
-- 0x61, 0xf6, 0x4b, 0xfb, 0x10, 0xbe, 0xf4, 0x99, 0x22, 0x11, 0x98, 0x69,
-- 0x57, 0x2c, 0x47, 0x3c, 0x32, 0x97, 0xac, 0xe2, 0x1f, 0xfe, 0xdc, 0xeb,
-- 0x35, 0xd7, 0xcb, 0xf9, 0x8d, 0x93, 0x17, 0x35, 0xe0, 0xcc, 0x36, 0xd8,
-- 0xbf, 0xf0, 0xc2, 0x8e, 0x46, 0x80, 0x86, 0xe5, 0xdc, 0xdf, 0x7d, 0xb5,
-- 0x54, 0x58, 0x34, 0xa8, 0xf8, 0x8e, 0x88, 0xbf, 0x2e, 0x83, 0x35, 0xf8,
-- 0xe1, 0x07, 0x61, 0xd1, 0x2e, 0x2a, 0x49, 0x3d, 0x03, 0xae, 0xda, 0x2b,
-- 0xf1, 0x33, 0xb9, 0xd5, 0xf9, 0x74, 0xc0, 0x9c, 0x5e, 0x66, 0x28, 0x14,
-- 0xa0, 0x18, 0xc1, 0xa0, 0xcb, 0xae, 0x6c, 0x3b, 0x0e, 0xbe, 0x95, 0xaa,
-- 0xf4, 0x99, 0x02, 0xa7, 0xcf, 0x39, 0x62, 0x53, 0x6d, 0x4d, 0xb4, 0x61,
-- 0xfb, 0xef, 0x2f, 0xbe, 0x39, 0x39, 0x3b, 0x4f, 0xb6, 0x18, 0xb8, 0xf0,
-- 0xe2, 0xec, 0xe8, 0xab, 0xf7, 0xa4, 0xbe, 0x3b, 0xaf, 0xca, 0xeb, 0x94,
-- 0x14, 0xfb, 0x69, 0x72, 0x5e, 0x67, 0x73, 0xda, 0x86, 0x2b, 0xab, 0x28,
-- 0x88, 0xd8, 0x1b, 0xbe, 0xea, 0x8a, 0xb2, 0xef, 0x8a, 0x46, 0xdf, 0x5d,
-- 0x17, 0xba, 0x96, 0xc8, 0x98, 0x41, 0xbc, 0x3d, 0xa7, 0x31, 0x14, 0x5e,
-- 0x35, 0xcd, 0x9b, 0x60, 0x94, 0x89, 0x39, 0x47, 0x93, 0x8b, 0x6f, 0xf6,
-- 0xdf, 0x7d, 0x7b, 0x6e, 0xc8, 0xed, 0xdf, 0x7f, 0xff, 0x7d, 0xe8, 0xb4,
-- 0xdf, 0xdb, 0xda, 0x82, 0x74, 0x78, 0x9d, 0x7e, 0xfc, 0x38, 0xac, 0xb2,
-- 0xb5, 0xb5, 0x37, 0xde, 0xd5, 0xe6, 0xeb, 0x41, 0x56, 0x4b, 0x12, 0x0c,
-- 0xe8, 0xeb, 0xad, 0xc5, 0x72, 0xc4, 0xf5, 0x27, 0xb7, 0x96, 0x75, 0x3e,
-- 0xa5, 0xfb, 0x24, 0xab, 0xf0, 0xf6, 0xd6, 0xda, 0xda, 0xf9, 0xe1, 0x61,
-- 0xb2, 0x7f, 0x7c, 0x7e, 0x12, 0xbc, 0xbb, 0xb1, 0xc3, 0x81, 0x27, 0x57,
-- 0x59, 0xbd, 0xc1, 0x18, 0xa0, 0xc7, 0xfb, 0x17, 0xac, 0xb2, 0x7e, 0x77,
-- 0x78, 0x76, 0x7e, 0x74, 0xf2, 0x8e, 0x77, 0x87, 0xe3, 0x03, 0xd3, 0xe9,
-- 0x1d, 0x87, 0x87, 0x5e, 0xe6, 0x00, 0x64, 0xb9, 0xb3, 0xe2, 0x8e, 0x8c,
-- 0x2c, 0x4d, 0x92, 0x9d, 0x08, 0xe1, 0x12, 0x05, 0x61, 0x55, 0xe5, 0x25,
-- 0x0a, 0xb6, 0x66, 0xbd, 0x51, 0x79, 0x1a, 0xaf, 0x80, 0x33, 0x5b, 0x49,
-- 0x3d, 0x93, 0x6c, 0x24, 0x71, 0xc7, 0x7d, 0x81, 0x31, 0x40, 0xde, 0x47,
-- 0x10, 0xa6, 0xd8, 0x39, 0xf1, 0xf3, 0xa3, 0xb7, 0xa7, 0xa4, 0xc0, 0xbd,
-- 0x3f, 0xdf, 0xff, 0xfa, 0x90, 0x1f, 0xfd, 0x3a, 0xab, 0xfd, 0x7e, 0x48,
-- 0x11, 0x4a, 0xee, 0xe4, 0x5d, 0x56, 0x57, 0xe3, 0x74, 0xc1, 0xf9, 0xda,
-- 0xd4, 0xcd, 0x40, 0xae, 0x91, 0xa0, 0x6d, 0x11, 0xe5, 0x7d, 0xa5, 0xce,
-- 0xb9, 0x3e, 0x8f, 0x32, 0x9a, 0x61, 0xbb, 0x67, 0x87, 0xfb, 0xaf, 0xdf,
-- 0x1e, 0x5a, 0xe4, 0xba, 0x94, 0x31, 0xa0, 0x46, 0xaf, 0x0b, 0x2e, 0x9c,
-- 0xee, 0x4c, 0xd9, 0x7c, 0xb5, 0xf3, 0xe2, 0xd3, 0x37, 0x5c, 0xc7, 0xb2,
-- 0xbb, 0x3b, 0xbf, 0x51, 0x78, 0x76, 0x78, 0x99, 0x6f, 0x49, 0xeb, 0xd6,
-- 0x5f, 0xea, 0x96, 0xc4, 0xf0, 0xaa, 0x55, 0xda, 0x15, 0x93, 0x04, 0x6c,
-- 0x19, 0x9f, 0x6f, 0x6f, 0x6f, 0x3f, 0x30, 0x0f, 0xa8, 0x03, 0x7a, 0x69,
-- 0xd2, 0x54, 0xf6, 0xf8, 0xf1, 0x2d, 0xdf, 0xbe, 0x1f, 0xf1, 0x54, 0xf3,
-- 0xe2, 0xb9, 0xdc, 0xd4, 0x5c, 0x00, 0x58, 0xf3, 0x3a, 0xeb, 0x1e, 0xf2,
-- 0xb8, 0x28, 0xdc, 0x0e, 0x34, 0x16, 0x67, 0xc2, 0x10, 0xe3, 0x79, 0x1d,
-- 0x04, 0xf2, 0xda, 0xc0, 0x49, 0x7d, 0x41, 0x98, 0x5a, 0x79, 0xdf, 0x6e,
-- 0x92, 0xbf, 0xa1, 0x36, 0xf9, 0x9f, 0x61, 0x51, 0x5e, 0x6d, 0xcd, 0xf6,
-- 0x20, 0x91, 0xd0, 0x43, 0x6f, 0x32, 0x94, 0x9f, 0xbf, 0x2b, 0x5c, 0xb4,
-- 0x76, 0xc5, 0x0b, 0xcb, 0x89, 0x25, 0x9f, 0x30, 0xae, 0x5f, 0xb1, 0x0a,
-- 0x12, 0xd0, 0x74, 0x69, 0x33, 0xb7, 0x7a, 0x73, 0x1d, 0x9d, 0x54, 0xbc,
-- 0x61, 0x6c, 0x30, 0x1c, 0x12, 0x03, 0xa1, 0x5e, 0x38, 0xe8, 0x0c, 0x24,
-- 0x42, 0xbf, 0x96, 0x44, 0x32, 0x5c, 0x50, 0x84, 0xdf, 0xd2, 0xe2, 0x87,
-- 0x02, 0x20, 0xc8, 0x0e, 0xd8, 0x05, 0x27, 0x34, 0x96, 0x08, 0x44, 0x44,
-- 0x0f, 0x9c, 0x28, 0xa9, 0x78, 0xe4, 0x2e, 0x84, 0x87, 0x1b, 0x6e, 0xf7,
-- 0x39, 0x18, 0x80, 0x7e, 0x2a, 0x47, 0x2d, 0x9f, 0xd0, 0x79, 0x30, 0x29,
-- 0x59, 0xfd, 0xb9, 0xde, 0xb2, 0x01, 0xed, 0x9c, 0xd3, 0x28, 0xa2, 0xbe,
-- 0x96, 0xbe, 0x7c, 0x63, 0x25, 0xdd, 0x55, 0xd7, 0x74, 0x7e, 0x87, 0x9a,
-- 0xbb, 0x89, 0xbe, 0x68, 0x4f, 0xb6, 0x90, 0x64, 0xf5, 0xc9, 0x3d, 0x1d,
-- 0x9c, 0xea, 0x6f, 0x1c, 0x10, 0x93, 0xdf, 0xf2, 0x12, 0xdc, 0x64, 0x98,
-- 0x7d, 0xa8, 0x19, 0x3c, 0x30, 0x98, 0x3d, 0x5a, 0x05, 0x7e, 0xe3, 0x7f,
-- 0x6f, 0x0d, 0xab, 0xea, 0x7a, 0x2b, 0x9f, 0x7c, 0x98, 0x54, 0x29, 0xc7,
-- 0x34, 0x2d, 0x47, 0xd1, 0xc7, 0x43, 0xfa, 0x30, 0xf9, 0xb9, 0xc1, 0xf5,
-- 0xab, 0x71, 0xf7, 0x4c, 0xfe, 0xf7, 0x16, 0x47, 0xa7, 0xa2, 0x6c, 0x53,
-- 0xb0, 0x70, 0x1d, 0xbc, 0x83, 0x66, 0x25, 0x81, 0xd0, 0x74, 0x18, 0xbb,
-- 0x29, 0x63, 0x70, 0x95, 0xf4, 0x94, 0xdc, 0x7e, 0xda, 0xdd, 0xde, 0xde,
-- 0xd9, 0xdb, 0xf9, 0xfc, 0xc5, 0xf6, 0xde, 0xce, 0xce, 0xce, 0xee, 0xde,
-- 0xce, 0xde, 0xde, 0xee, 0xf6, 0x2f, 0x5b, 0xbd, 0xb5, 0xb5, 0xd7, 0x27,
-- 0xdf, 0xbf, 0x3b, 0x3e, 0xd9, 0x7f, 0x9d, 0x5c, 0x9c, 0x24, 0xfb, 0x30,
-- 0x3b, 0x75, 0x9c, 0x73, 0x44, 0x5f, 0xd6, 0x52, 0x27, 0xa7, 0x61, 0xa2,
-- 0x36, 0x1b, 0x89, 0x8b, 0xbc, 0xc1, 0xca, 0xb4, 0xc7, 0x51, 0x40, 0xad,
-- 0xe0, 0x96, 0x86, 0xd7, 0xf5, 0xec, 0x71, 0x8e, 0xf6, 0x29, 0x3d, 0xf7,
-- 0xc5, 0x13, 0xec, 0x35, 0x47, 0x0c, 0xc7, 0x28, 0x57, 0xf3, 0x55, 0xd4,
-- 0x9f, 0xa2, 0x5e, 0x54, 0x97, 0x5d, 0xb1, 0x21, 0x71, 0x43, 0xbe, 0xe2,
-- 0xb6, 0x14, 0x73, 0xaf, 0x62, 0xe0, 0x0f, 0x14, 0x57, 0x56, 0x37, 0x3d,
-- 0xee, 0x78, 0x96, 0x89, 0x36, 0xa3, 0x09, 0x9e, 0xac, 0x9c, 0x12, 0xdd,
-- 0x45, 0xd9, 0x47, 0xcc, 0xba, 0xc9, 0x3b, 0x24, 0xfe, 0xd6, 0xcf, 0x0e,
-- 0x88, 0xf2, 0xa6, 0x0b, 0xe7, 0xa5, 0x0d, 0x19, 0x01, 0x46, 0x1d, 0xdd,
-- 0x71, 0x3f, 0xc6, 0x52, 0x7c, 0x17, 0xfc, 0x4d, 0x78, 0x0f, 0x6d, 0x39,
-- 0xf3, 0xa2, 0x0c, 0xe0, 0xfd, 0xf9, 0xd1, 0xbb, 0xaf, 0xe1, 0x40, 0xfc,
-- 0xfe, 0xe4, 0xec, 0xf5, 0x39, 0x35, 0xcb, 0x17, 0xf4, 0x1a, 0x2c, 0x4c,
-- 0x7c, 0x92, 0x75, 0x54, 0x72, 0x2e, 0xb8, 0xeb, 0x3f, 0x43, 0x61, 0x9b,
-- 0xf4, 0x5d, 0xfa, 0x3b, 0x86, 0x19, 0xc8, 0xdb, 0x9c, 0xd6, 0xde, 0xcd,
-- 0xf5, 0x40, 0x08, 0xf2, 0xfa, 0x97, 0xb3, 0x94, 0x0b, 0x9f, 0x64, 0x43,
-- 0x89, 0x05, 0x46, 0xa4, 0xd7, 0x16, 0xe7, 0x57, 0x6c, 0xb1, 0xdc, 0xbf,
-- 0x55, 0x17, 0xe0, 0x1f, 0x68, 0xa5, 0x28, 0xc3, 0x62, 0x64, 0x81, 0x75,
-- 0x80, 0x0e, 0xde, 0xe5, 0x34, 0xbd, 0x42, 0x87, 0xf1, 0x99, 0x0c, 0x3a,
-- 0xd3, 0xee, 0x3f, 0xb5, 0x4b, 0x66, 0x7b, 0x68, 0xef, 0x08, 0x04, 0x00,
-- 0xa8, 0x2b, 0xe4, 0xea, 0xab, 0xe3, 0x43, 0xa4, 0x26, 0x76, 0x13, 0x23,
-- 0xa2, 0x84, 0x6b, 0xb8, 0xb6, 0x0b, 0xdb, 0xa0, 0xae, 0xa6, 0x40, 0x84,
-- 0x90, 0x0a, 0x30, 0x08, 0xa0, 0x46, 0x44, 0x37, 0xe2, 0x96, 0x02, 0x1b,
-- 0x44, 0xe5, 0xa3, 0xe2, 0x7c, 0xf9, 0x12, 0x59, 0x72, 0x1e, 0x0c, 0x60,
-- 0x72, 0x2a, 0x0b, 0xb7, 0x52, 0x31, 0xae, 0xc7, 0x75, 0x85, 0x38, 0x5e,
-- 0xa2, 0x67, 0xb0, 0x17, 0xbe, 0x10, 0x82, 0x87, 0x0b, 0xaf, 0x6a, 0x1a,
-- 0x4a, 0x4a, 0x57, 0x8a, 0x16, 0x69, 0x57, 0x14, 0x64, 0x92, 0xe6, 0x25,
-- 0x5d, 0xb5, 0x67, 0x51, 0x17, 0xd2, 0x0a, 0xb5, 0x0d, 0x2c, 0x69, 0x97,
-- 0xd3, 0xcf, 0xcc, 0x57, 0x40, 0x7a, 0xd6, 0xd4, 0xa3, 0xed, 0xf9, 0xbc,
-- 0xb7, 0x9c, 0x31, 0x8f, 0x26, 0x21, 0x94, 0x18, 0xa8, 0x50, 0x8e, 0xe6,
-- 0x56, 0x06, 0xd5, 0x13, 0x1b, 0xcb, 0x16, 0x56, 0x7b, 0x8f, 0x58, 0x6d,
-- 0x33, 0x9b, 0x7a, 0x0d, 0x09, 0x55, 0x2e, 0xdc, 0x3a, 0x58, 0x1e, 0x89,
-- 0xe9, 0xf2, 0xaf, 0xf2, 0x5e, 0xe4, 0x75, 0x95, 0x4d, 0x2f, 0x15, 0xff,
-- 0xa4, 0x86, 0x5d, 0x90, 0xa7, 0x92, 0x36, 0x8a, 0x36, 0x59, 0x1e, 0xd5,
-- 0x72, 0xee, 0x50, 0x19, 0x8a, 0xa0, 0xba, 0x9a, 0x03, 0x54, 0x69, 0x32,
-- 0x0a, 0x71, 0xbc, 0x0d, 0xad, 0x0c, 0xd5, 0x5a, 0xe2, 0x4a, 0xd1, 0xb4,
-- 0xa6, 0xe0, 0xaa, 0x73, 0xa0, 0x44, 0x02, 0xa8, 0x23, 0x78, 0x70, 0x39,
-- 0xa2, 0xd5, 0x76, 0xcf, 0xf1, 0xda, 0x21, 0xf6, 0x8c, 0x9b, 0x3b, 0x08,
-- 0xcb, 0xd0, 0x4b, 0xe8, 0xe5, 0x32, 0x42, 0x79, 0xc9, 0x15, 0x2b, 0x87,
-- 0x0e, 0x1a, 0x32, 0xb6, 0x96, 0x95, 0x5b, 0x51, 0x94, 0xac, 0x92, 0x3b,
-- 0x6e, 0x0d, 0x41, 0x89, 0xf1, 0x31, 0x54, 0x8e, 0xb4, 0xfa, 0x1c, 0x3e,
-- 0x7e, 0x04, 0xe3, 0x21, 0x99, 0x1e, 0x30, 0xbd, 0x97, 0x53, 0x92, 0xcf,
-- 0x1f, 0x3e, 0x8c, 0x3a, 0x88, 0x4f, 0xea, 0x18, 0x73, 0x55, 0x6c, 0x0c,
-- 0x58, 0xbb, 0x7d, 0x50, 0x98, 0x38, 0xd8, 0x91, 0xc5, 0xd0, 0x91, 0xa3,
-- 0xd2, 0x08, 0x61, 0xc5, 0x41, 0x90, 0x5c, 0xb7, 0xbd, 0xe4, 0xab, 0xb4,
-- 0xca, 0xc7, 0xfd, 0xe4, 0x75, 0x7e, 0x05, 0xa4, 0x06, 0x97, 0x49, 0xe0,
-- 0xf2, 0x2f, 0x86, 0xc9, 0xf7, 0x56, 0xdc, 0x90, 0x2e, 0x62, 0xa0, 0x9e,
-- 0xc0, 0x32, 0xdb, 0xf0, 0xe8, 0xd3, 0x32, 0xa8, 0x55, 0x3d, 0x04, 0x26,
-- 0x41, 0xdb, 0xbe, 0xfc, 0x07, 0x36, 0x33, 0xad, 0x6e, 0x9a, 0x55, 0xc5,
-- 0x1c, 0x56, 0xb3, 0xc8, 0x45, 0x58, 0xdf, 0xb9, 0x16, 0x13, 0x55, 0x9a,
-- 0xc3, 0xdf, 0x8e, 0xca, 0x55, 0x48, 0x11, 0x5b, 0x58, 0xa5, 0x51, 0x62,
-- 0xe6, 0xcb, 0xc7, 0x6d, 0x64, 0xc7, 0x75, 0x0d, 0x89, 0xff, 0xb4, 0x4e,
-- 0xbc, 0x22, 0xca, 0x4f, 0x4e, 0x2e, 0x0e, 0xff, 0x90, 0xec, 0xb7, 0x5d,
-- 0x99, 0xcc, 0xa8, 0x1b, 0x00, 0x29, 0x7d, 0x4f, 0x57, 0x18, 0xbb, 0x04,
-- 0x86, 0x49, 0x15, 0x9c, 0xd4, 0x25, 0x56, 0x84, 0x1b, 0xdf, 0x4f, 0xaa,
-- 0x42, 0xe3, 0x5c, 0xeb, 0x7b, 0x03, 0x02, 0xe7, 0xd7, 0x60, 0xe0, 0x05,
-- 0x98, 0x8c, 0xf0, 0x10, 0xc9, 0xbc, 0xcb, 0x53, 0x89, 0x33, 0x66, 0x18,
-- 0x24, 0xda, 0x8b, 0xb9, 0x1c, 0x45, 0x84, 0xc4, 0x4a, 0xe4, 0x96, 0x00,
-- 0x0d, 0xe5, 0x35, 0x24, 0x67, 0x38, 0xeb, 0xb5, 0xa0, 0xd7, 0xf7, 0xbe,
-- 0xa9, 0x34, 0x44, 0xa4, 0xfa, 0xc0, 0x27, 0xec, 0x83, 0xf1, 0x59, 0xbd,
-- 0x11, 0x64, 0x2c, 0x5a, 0xd3, 0xbb, 0x49, 0xa9, 0x76, 0xda, 0x84, 0xb9,
-- 0x9f, 0x5a, 0x50, 0x18, 0xf6, 0x62, 0x0c, 0xbc, 0x97, 0xe9, 0xbd, 0xf8,
-- 0x30, 0x71, 0xc5, 0xd8, 0xa1, 0x0e, 0xf9, 0x34, 0x10, 0x9c, 0x80, 0x1b,
-- 0x83, 0x12, 0xab, 0x5a, 0x6f, 0x46, 0x42, 0x70, 0xa9, 0xd5, 0x66, 0xe0,
-- 0x34, 0x52, 0x29, 0xb0, 0xaa, 0xa8, 0x55, 0x08, 0xb8, 0xb4, 0x30, 0x70,
-- 0xbb, 0xb2, 0x72, 0x9a, 0x56, 0x6f, 0xb1, 0x55, 0x0b, 0x71, 0x8d, 0x2f,
-- 0x20, 0x67, 0xbd, 0x42, 0x19, 0x5b, 0x57, 0xc9, 0x25, 0x88, 0x18, 0x7c,
-- 0xe3, 0xa0, 0xb3, 0xb4, 0x59, 0x2e, 0x2f, 0x37, 0xce, 0x82, 0x7c, 0x89,
-- 0x39, 0x91, 0xac, 0xbf, 0x08, 0x84, 0x7e, 0x8a, 0x4a, 0x4b, 0xd9, 0xe6,
-- 0x02, 0xab, 0x24, 0xc5, 0xa8, 0x46, 0x99, 0x20, 0xc4, 0x73, 0x11, 0x11,
-- 0xec, 0x22, 0x50, 0x07, 0xf9, 0xe0, 0x09, 0x65, 0xce, 0x40, 0xdc, 0x6b,
-- 0x9e, 0xba, 0x99, 0x5b, 0xaf, 0x9a, 0x27, 0x27, 0x3a, 0x32, 0xb9, 0x99,
-- 0xf5, 0x52, 0x24, 0x09, 0x96, 0xa6, 0xe7, 0x5a, 0xd6, 0x08, 0xb6, 0x00,
-- 0x1d, 0x35, 0xef, 0x0e, 0x04, 0xbd, 0xb9, 0x13, 0x3b, 0x6c, 0xd3, 0x1b,
-- 0xf8, 0x60, 0xcc, 0x4a, 0x26, 0xc9, 0xec, 0x5e, 0x13, 0x05, 0xf4, 0xaa,
-- 0xe4, 0x5c, 0x76, 0x28, 0x99, 0x9f, 0x7f, 0x1e, 0x89, 0x46, 0x1f, 0xdd,
-- 0xd3, 0x7b, 0xf4, 0x75, 0xa0, 0xcc, 0x4e, 0xd9, 0xed, 0xcf, 0xca, 0x23,
-- 0xc4, 0x32, 0xa7, 0xd1, 0x76, 0xe8, 0x0a, 0x01, 0xdc, 0x91, 0xf4, 0xe8,
-- 0xac, 0xe4, 0x11, 0x95, 0xf5, 0x7d, 0x36, 0xc3, 0x9a, 0x68, 0x4b, 0x5a,
-- 0xed, 0xb0, 0x92, 0xf0, 0x91, 0x15, 0xea, 0x83, 0x71, 0xc7, 0xf6, 0x68,
-- 0x03, 0x21, 0x92, 0x04, 0xd9, 0x21, 0xcb, 0x9d, 0x2c, 0x13, 0x9f, 0x17,
-- 0xda, 0x30, 0x2f, 0xb2, 0x0e, 0xc6, 0x51, 0x47, 0xbb, 0xa6, 0xa6, 0x55,
-- 0xf1, 0x73, 0xb7, 0xfa, 0xe0, 0xfd, 0xea, 0xe1, 0xbc, 0xff, 0x2d, 0xc3,
-- 0xd9, 0x4f, 0x1e, 0x0c, 0x98, 0xd7, 0xa2, 0x8c, 0xcc, 0xe8, 0x2b, 0x4b,
-- 0x15, 0x2a, 0x40, 0xd5, 0xa6, 0x7b, 0xca, 0x1a, 0x8d, 0xd9, 0xd5, 0x35,
-- 0x6a, 0xd6, 0x67, 0x8a, 0xf5, 0xcc, 0x79, 0x21, 0x4f, 0x43, 0xc6, 0xe7,
-- 0xf6, 0xfb, 0x36, 0x94, 0x4f, 0x1d, 0xae, 0xc1, 0xfc, 0x59, 0x46, 0x4c,
-- 0x2b, 0xd8, 0x5d, 0x93, 0x50, 0x76, 0x86, 0xdb, 0x21, 0xae, 0x8b, 0x4b,
-- 0x4d, 0x29, 0x01, 0x1d, 0x59, 0x03, 0x42, 0xc7, 0x97, 0xb7, 0xe5, 0x99,
-- 0x00, 0x3a, 0xa0, 0xf5, 0x9a, 0x7e, 0xb6, 0x23, 0x70, 0xba, 0x74, 0x92,
-- 0xb4, 0xc6, 0x08, 0x23, 0x85, 0x64, 0xb3, 0x05, 0x42, 0xf8, 0x8d, 0x03,
-- 0x86, 0x77, 0x3f, 0xce, 0xd1, 0x53, 0x7f, 0xa4, 0x9e, 0xb9, 0xed, 0xd6,
-- 0x31, 0x4a, 0x84, 0x37, 0x1e, 0xb0, 0x20, 0x6b, 0xc8, 0x62, 0x59, 0x26,
-- 0x2d, 0xd5, 0x2b, 0x53, 0x8d, 0x0e, 0x9a, 0x09, 0x81, 0x4c, 0xcf, 0xb8,
-- 0x63, 0x93, 0xcb, 0x65, 0x09, 0xc6, 0xab, 0xe0, 0x69, 0x8a, 0xba, 0xc1,
-- 0xad, 0x72, 0xb4, 0x64, 0x07, 0xa7, 0x41, 0x42, 0x2c, 0x1d, 0x97, 0x25,
-- 0xca, 0x31, 0xab, 0xb1, 0x13, 0x08, 0x01, 0x5a, 0x26, 0xcb, 0x7b, 0x42,
-- 0x9c, 0x09, 0x8d, 0xda, 0x9d, 0xe6, 0x34, 0xa0, 0x75, 0xc0, 0x4f, 0xf0,
-- 0xd2, 0x73, 0xba, 0x80, 0xf2, 0x42, 0x23, 0x61, 0x87, 0xa4, 0xdc, 0xac,
-- 0xd0, 0x1b, 0x57, 0xdd, 0x69, 0x33, 0x5d, 0xb9, 0x06, 0xfa, 0xc9, 0xe0,
-- 0x7f, 0xea, 0xca, 0xb0, 0xb4, 0xca, 0x91, 0x3c, 0x80, 0xda, 0x5f, 0x04,
-- 0x48, 0x84, 0x9a, 0x70, 0x05, 0x86, 0xcf, 0x97, 0xba, 0xcd, 0xc3, 0xe5,
-- 0x47, 0x5a, 0xc6, 0x06, 0xf8, 0xdf, 0x9b, 0x10, 0x73, 0xf2, 0x8d, 0xaf,
-- 0xae, 0xdb, 0x37, 0x56, 0x21, 0xcd, 0xad, 0x39, 0xec, 0x7e, 0x89, 0xdc,
-- 0x8a, 0x06, 0xec, 0x2e, 0xb2, 0xaf, 0xb8, 0xba, 0xd9, 0x41, 0x91, 0x86,
-- 0xcb, 0xea, 0xab, 0x23, 0xe9, 0x48, 0x85, 0xf8, 0x8d, 0x4f, 0xf4, 0x24,
-- 0x69, 0x70, 0x40, 0x2f, 0x0c, 0xde, 0xab, 0xc9, 0xe1, 0x4b, 0xe9, 0x61,
-- 0x08, 0x2b, 0xaa, 0xf4, 0x70, 0x8a, 0xaa, 0xad, 0xf6, 0xc0, 0x9e, 0xbe,
-- 0xc4, 0x99, 0x86, 0x3d, 0x35, 0x38, 0x34, 0x57, 0x45, 0x9e, 0xb7, 0x4c,
-- 0x44, 0xae, 0x06, 0x8a, 0x29, 0x0c, 0xc4, 0xbc, 0xce, 0x87, 0x4c, 0x7e,
-- 0x95, 0x77, 0x55, 0x97, 0xba, 0xe7, 0x26, 0x86, 0x12, 0x03, 0xad, 0xa6,
-- 0x86, 0xdd, 0x9d, 0x2d, 0x19, 0xcc, 0x96, 0x34, 0x20, 0xe2, 0x9c, 0x92,
-- 0xa4, 0x77, 0xc9, 0x1b, 0xd0, 0x4a, 0x78, 0x73, 0x71, 0xc4, 0x36, 0x87,
-- 0x52, 0xcc, 0x34, 0x0e, 0x14, 0xbe, 0x0e, 0xbe, 0x9a, 0xe8, 0xae, 0x95,
-- 0x2a, 0x2a, 0x85, 0xee, 0xcf, 0x9a, 0xdf, 0xa0, 0xbe, 0x93, 0xf4, 0x88,
-- 0x94, 0x06, 0xb7, 0x41, 0x28, 0x01, 0xe7, 0xe5, 0x01, 0x16, 0x90, 0x2b,
-- 0x3f, 0xba, 0x8c, 0x26, 0x3e, 0xe8, 0xe2, 0xed, 0x24, 0x8a, 0x3e, 0xdb,
-- 0x7f, 0xf7, 0xf5, 0x21, 0x24, 0x01, 0x07, 0x18, 0x97, 0x33, 0xb5, 0x4f,
-- 0x96, 0x63, 0x28, 0x0d, 0xb4, 0x62, 0x88, 0x44, 0x02, 0x84, 0xaa, 0xf0,
-- 0xf3, 0x1c, 0x90, 0x3e, 0x42, 0xbc, 0xd8, 0x6e, 0x8d, 0x2f, 0x5a, 0x4b,
-- 0xcc, 0x40, 0x06, 0x09, 0x82, 0xf5, 0x27, 0x2b, 0x21, 0x5c, 0x2d, 0x47,
-- 0x8b, 0x54, 0x91, 0x38, 0xd2, 0x10, 0xaa, 0x41, 0xcd, 0x0e, 0xc3, 0xe6,
-- 0x59, 0x5c, 0xb3, 0x64, 0x03, 0xa7, 0xe2, 0x96, 0x50, 0x71, 0x87, 0xa1,
-- 0xcd, 0x47, 0xf0, 0x09, 0x76, 0xb6, 0xb7, 0x7d, 0x8d, 0x0c, 0x0f, 0x39,
-- 0x11, 0x71, 0xcb, 0x32, 0xd9, 0x1e, 0xbc, 0x78, 0xb1, 0x8a, 0x11, 0xba,
-- 0x46, 0x81, 0xfb, 0xf0, 0xec, 0x93, 0xdb, 0x1c, 0xf0, 0xa3, 0xab, 0xda,
-- 0xec, 0x50, 0x64, 0x50, 0x04, 0x57, 0x63, 0xbb, 0x2a, 0x27, 0xb5, 0xa8,
-- 0xc1, 0x43, 0x6c, 0xef, 0xf0, 0x85, 0xcc, 0x9d, 0x36, 0xc3, 0x4b, 0xb9,
-- 0xe6, 0x31, 0x6e, 0x01, 0x3b, 0x60, 0xb6, 0x91, 0x05, 0x87, 0x77, 0xe5,
-- 0xce, 0xa3, 0xf6, 0x49, 0x0b, 0x13, 0xe8, 0xb3, 0x2b, 0x96, 0xe8, 0x32,
-- 0x9e, 0x8d, 0x89, 0x04, 0xef, 0x4f, 0xd9, 0x1c, 0x76, 0xf4, 0xee, 0x6b,
-- 0xb1, 0x0e, 0x90, 0xaa, 0x0b, 0xd3, 0xe8, 0x56, 0x4b, 0xf1, 0x7d, 0x2f,
-- 0xc5, 0x2e, 0x38, 0xb8, 0x0f, 0xae, 0x74, 0xa9, 0x57, 0x99, 0xcf, 0x85,
-- 0x15, 0xf8, 0xdd, 0x5f, 0x61, 0x9a, 0xbb, 0x48, 0x06, 0x81, 0x70, 0xa2,
-- 0x95, 0x2e, 0x58, 0x32, 0x99, 0xdd, 0x9b, 0x42, 0xa4, 0x3d, 0xa0, 0x75,
-- 0x33, 0xb4, 0xbb, 0x66, 0xc5, 0x04, 0x26, 0x5a, 0x2c, 0x28, 0x28, 0x92,
-- 0x4d, 0x3a, 0xba, 0x94, 0x6e, 0x70, 0xbe, 0x5b, 0x92, 0xc8, 0xa7, 0x0d,
-- 0xa5, 0x61, 0xf9, 0x6b, 0xd6, 0x46, 0x63, 0xc9, 0xaa, 0x6f, 0xa6, 0x90,
-- 0xb6, 0x55, 0x4e, 0xea, 0x29, 0x87, 0x5c, 0x9d, 0x77, 0x1b, 0x85, 0x14,
-- 0x8b, 0xe2, 0xbf, 0x3e, 0xce, 0x07, 0x46, 0xc8, 0x07, 0x95, 0x6f, 0xaa,
-- 0xf9, 0xc4, 0xab, 0xfe, 0x3a, 0xe2, 0x4e, 0xbb, 0xf6, 0x85, 0xbc, 0x2f,
-- 0x5d, 0xa7, 0xdd, 0xdd, 0xc9, 0xfb, 0xb6, 0x34, 0x1d, 0x07, 0x80, 0x45,
-- 0x5a, 0xad, 0x85, 0xe2, 0x12, 0x01, 0x4d, 0x97, 0x61, 0x29, 0x1c, 0x9c,
-- 0x23, 0x6f, 0x8a, 0x25, 0x6b, 0x89, 0x66, 0x1b, 0xa3, 0x50, 0x0a, 0xd3,
-- 0x10, 0x90, 0xb3, 0x71, 0x79, 0xdd, 0x20, 0x4c, 0xef, 0x52, 0xa1, 0x66,
-- 0x51, 0xfb, 0xf7, 0xc8, 0x61, 0xf9, 0x78, 0xc0, 0xde, 0x72, 0x39, 0x57,
-- 0xde, 0xc7, 0xfa, 0x16, 0x0d, 0x3e, 0xad, 0xae, 0x51, 0x7a, 0xd6, 0x59,
-- 0x66, 0x62, 0xf1, 0x0a, 0xdd, 0x2b, 0xfa, 0x2c, 0xc9, 0x53, 0x22, 0x4c,
-- 0x41, 0xb8, 0x6e, 0x2c, 0x45, 0x73, 0x05, 0x02, 0x43, 0xc6, 0xa7, 0x9e,
-- 0x02, 0x91, 0xa9, 0x3b, 0x5c, 0x37, 0x38, 0x08, 0x01, 0x73, 0xe9, 0x24,
-- 0xbf, 0xa6, 0x21, 0x28, 0x94, 0xcf, 0x61, 0x77, 0x81, 0xb6, 0x04, 0x58,
-- 0xa5, 0xd6, 0x12, 0x42, 0x89, 0x06, 0xa6, 0xa5, 0xa0, 0x2c, 0x19, 0xcb,
-- 0x55, 0x69, 0x00, 0xd6, 0x2f, 0x5f, 0x6a, 0x65, 0x2a, 0x91, 0xfa, 0x7c,
-- 0xdf, 0x8b, 0x4a, 0x0a, 0x6f, 0xa2, 0xe4, 0x17, 0xa1, 0x4f, 0xcc, 0x50,
-- 0x06, 0x28, 0xe9, 0xe0, 0x35, 0xe2, 0x7e, 0xcf, 0x2f, 0x58, 0xbb, 0xc7,
-- 0x75, 0x64, 0x3a, 0xe2, 0x77, 0x87, 0x67, 0x5f, 0x9d, 0x9c, 0x1f, 0x12,
-- 0xb7, 0x78, 0x7d, 0xf8, 0xd5, 0x7b, 0xe6, 0x24, 0xbc, 0x63, 0x62, 0x1d,
-- 0x05, 0x28, 0xa9, 0xe4, 0xea, 0x02, 0x6a, 0x89, 0x03, 0x9a, 0x40, 0x3a,
-- 0x22, 0x9b, 0xf4, 0x8d, 0x32, 0x4c, 0xec, 0x12, 0x6c, 0xcf, 0x69, 0x26,
-- 0xe6, 0xb4, 0x1c, 0x61, 0xda, 0x1e, 0x7f, 0x98, 0xa3, 0xa1, 0xe6, 0x0c,
-- 0x9a, 0x5e, 0x1b, 0xfc, 0x8d, 0x15, 0xc0, 0xab, 0xf6, 0x3c, 0xbe, 0xe4,
-- 0xad, 0x18, 0x4f, 0xf5, 0x40, 0xf8, 0x42, 0xd5, 0x56, 0x92, 0x5a, 0xaf,
-- 0x26, 0xc8, 0xb6, 0x0a, 0x15, 0x38, 0x2d, 0xe4, 0x26, 0x63, 0xb0, 0x1d,
-- 0x9c, 0x6b, 0xdc, 0xad, 0x79, 0x8d, 0x6b, 0x55, 0x84, 0x7c, 0x2d, 0x0f,
-- 0x5d, 0x09, 0xc1, 0x11, 0xcb, 0x91, 0xc4, 0xdc, 0xa9, 0xb2, 0x68, 0x70,
-- 0xa4, 0x2a, 0x13, 0x8c, 0x2a, 0xb9, 0x49, 0xd5, 0xe5, 0x28, 0xa1, 0x90,
-- 0x5a, 0xcc, 0x61, 0x43, 0x15, 0xd3, 0x3b, 0xcc, 0x53, 0x8b, 0x0b, 0x4a,
-- 0x11, 0x65, 0x2b, 0x31, 0x86, 0x95, 0x0f, 0x82, 0x16, 0x94, 0x74, 0x6e,
-- 0x57, 0xb3, 0x83, 0x0b, 0x99, 0x29, 0xdb, 0x1e, 0xe4, 0x72, 0x36, 0x34,
-- 0x58, 0xc0, 0x92, 0x05, 0xf8, 0x41, 0xec, 0xea, 0x77, 0x42, 0x83, 0x9c,
-- 0x27, 0x8e, 0xb8, 0x0e, 0xd4, 0xba, 0xd5, 0x65, 0x97, 0x4d, 0xc2, 0x54,
-- 0x1f, 0x88, 0xcf, 0xb7, 0x10, 0x86, 0xa7, 0x81, 0x4a, 0xbc, 0xa5, 0xb0,
-- 0x5a, 0x0b, 0xf1, 0xc5, 0x67, 0x50, 0x5a, 0x97, 0x8a, 0xcb, 0xf5, 0xc7,
-- 0x3a, 0xb4, 0xed, 0xaf, 0xad, 0xad, 0xbd, 0x3e, 0xbc, 0xd8, 0x3f, 0x3a,
-- 0x3e, 0x7c, 0x9d, 0x1c, 0xbd, 0x7b, 0x73, 0x72, 0xf6, 0x76, 0xff, 0x42,
-- 0x1d, 0xde, 0xaf, 0x9d, 0x71, 0xcc, 0x65, 0xdd, 0x3a, 0xdb, 0xa3, 0x37,
-- 0x9c, 0x81, 0x84, 0x69, 0x17, 0xaf, 0x14, 0xf4, 0x5b, 0x96, 0x21, 0x6b,
-- 0xac, 0xc1, 0x5a, 0xa2, 0x8e, 0x72, 0x8f, 0xe7, 0xc3, 0x77, 0xf5, 0x96,
-- 0x73, 0x6f, 0x0e, 0x6d, 0x39, 0xcd, 0xb4, 0x85, 0x0a, 0x70, 0x0f, 0x36,
-- 0xe5, 0xca, 0xde, 0xcb, 0x3d, 0x85, 0x02, 0xc6, 0x48, 0x90, 0x06, 0x4d,
-- 0x0e, 0x8e, 0xb6, 0x9a, 0x70, 0xa7, 0x30, 0x7e, 0x18, 0xbc, 0x53, 0x0a,
-- 0xc0, 0x88, 0x10, 0x96, 0x80, 0x28, 0x90, 0x4d, 0x7d, 0x61, 0x9b, 0x2e,
-- 0xe1, 0xde, 0x00, 0x7b, 0x24, 0xbc, 0x02, 0x9f, 0x84, 0xfb, 0xcb, 0x19,
-- 0xef, 0x6b, 0x5c, 0x80, 0xa0, 0x56, 0x28, 0x19, 0xc6, 0x6e, 0xac, 0xb8,
-- 0xda, 0xba, 0x9d, 0x75, 0xa0, 0x49, 0x3a, 0x26, 0x6a, 0x0e, 0x24, 0x2d,
-- 0x58, 0x16, 0x36, 0xb5, 0xe1, 0x5c, 0xa2, 0x24, 0xc5, 0x0c, 0x8e, 0xb4,
-- 0x90, 0x1d, 0xaf, 0x05, 0x83, 0x45, 0xf3, 0xbf, 0x73, 0x43, 0x73, 0x73,
-- 0x01, 0x76, 0x5e, 0x0b, 0xcf, 0xb7, 0x5c, 0x75, 0x71, 0x3d, 0x6d, 0xfe,
-- 0xdc, 0x1a, 0xaa, 0xc5, 0xe0, 0x35, 0x3d, 0x34, 0x59, 0xce, 0x16, 0x5a,
-- 0x0b, 0xd5, 0xa4, 0x5c, 0xd8, 0xd7, 0x6c, 0x0b, 0x45, 0x90, 0x82, 0x40,
-- 0x00, 0x63, 0xcc, 0x1b, 0x5d, 0x03, 0x99, 0x07, 0xe8, 0xbb, 0x36, 0x6f,
-- 0x55, 0x0d, 0x08, 0x50, 0x73, 0x30, 0xb9, 0x62, 0xe8, 0x79, 0x1b, 0x4d,
-- 0xcc, 0xec, 0xd3, 0xc9, 0xb9, 0x7b, 0x16, 0x2b, 0x19, 0xbc, 0x90, 0xfa,
-- 0x18, 0x10, 0xac, 0xff, 0x86, 0x15, 0x6b, 0x60, 0x92, 0xd5, 0x06, 0x55,
-- 0x4d, 0x8a, 0xfd, 0x63, 0x8d, 0x49, 0x85, 0x2f, 0x36, 0xa3, 0x26, 0x42,
-- 0x4e, 0x6f, 0x5d, 0x7b, 0x04, 0xcf, 0xf6, 0x08, 0x94, 0x8b, 0x13, 0x3f,
-- 0xb9, 0xb7, 0x02, 0xb4, 0x8c, 0x39, 0x2f, 0x10, 0x7d, 0x6b, 0x92, 0xfc,
-- 0x61, 0x9c, 0x12, 0x3e, 0x1b, 0x23, 0xdf, 0x25, 0x0a, 0xaf, 0x16, 0x37,
-- 0xac, 0x5f, 0x23, 0xf9, 0x4d, 0x8b, 0x50, 0x1b, 0xc4, 0x35, 0xa2, 0x7b,
-- 0xb4, 0xde, 0x09, 0x98, 0xde, 0x7c, 0xcd, 0x2a, 0x93, 0xd9, 0x4b, 0x16,
-- 0xe2, 0x05, 0xee, 0x2f, 0xd8, 0xdb, 0x60, 0xf2, 0xac, 0xe8, 0x66, 0x69,
-- 0x05, 0x25, 0x07, 0xb9, 0x0a, 0x72, 0x67, 0x38, 0xd3, 0xa8, 0x47, 0x97,
-- 0xc7, 0xe5, 0x13, 0x60, 0x61, 0x08, 0x66, 0x61, 0xca, 0x70, 0x03, 0xae,
-- 0xc0, 0x2e, 0xe2, 0x92, 0x5d, 0x2b, 0xb8, 0xeb, 0x58, 0x89, 0x2d, 0xa7,
-- 0x08, 0x2e, 0xd5, 0x68, 0xbb, 0xd3, 0xa2, 0x92, 0xf3, 0x06, 0xa9, 0xbb,
-- 0xe7, 0xcb, 0x80, 0xf7, 0x16, 0xd7, 0xd4, 0x47, 0x2f, 0xb9, 0x62, 0xbd,
-- 0x65, 0x44, 0x43, 0x8f, 0x18, 0xe8, 0x44, 0x1e, 0x7f, 0x75, 0x96, 0x5e,
-- 0xa6, 0xd9, 0xf4, 0x4f, 0xbb, 0xdb, 0xe7, 0xe9, 0xd5, 0x72, 0x9a, 0xfe,
-- 0x0b, 0x5e, 0x7c, 0xf5, 0xe4, 0xc9, 0xee, 0xf6, 0x67, 0x9f, 0x6f, 0xf7,
-- 0x5a, 0x8e, 0xeb, 0x20, 0xe6, 0x05, 0x41, 0x0c, 0x7c, 0x93, 0x81, 0xef,
-- 0xa2, 0x9f, 0xe1, 0xf8, 0x2a, 0x87, 0xa2, 0xc5, 0xc2, 0x8b, 0xae, 0x41,
-- 0x2a, 0x1a, 0x1e, 0xd8, 0xa4, 0xc2, 0xa8, 0xd1, 0x8d, 0x4b, 0x74, 0xfd,
-- 0xc7, 0x9d, 0x3d, 0x61, 0x65, 0x00, 0xa8, 0xc5, 0x3d, 0xc1, 0x6b, 0xf1,
-- 0x32, 0x9f, 0xd3, 0x0d, 0xf4, 0x45, 0x52, 0xa7, 0x57, 0x8e, 0x56, 0x35,
-- 0xdf, 0x58, 0xa2, 0xcc, 0x9d, 0x0b, 0xee, 0x92, 0x89, 0x3c, 0x9f, 0x4b,
-- 0x61, 0x08, 0x2e, 0x7b, 0x00, 0xc1, 0x67, 0x91, 0x95, 0x9c, 0xae, 0x5f,
-- 0x5c, 0x95, 0xe9, 0xcc, 0x62, 0xf9, 0xf9, 0x7d, 0x0e, 0x0c, 0x1a, 0x2e,
-- 0xa6, 0x88, 0x33, 0xb7, 0xe8, 0x1e, 0x91, 0x42, 0x85, 0xe0, 0xa6, 0x8b,
-- 0xca, 0xc3, 0x8a, 0xc9, 0x75, 0x13, 0x16, 0x54, 0xa0, 0xc5, 0x82, 0x9d,
-- 0xa3, 0x87, 0x59, 0xf5, 0x1d, 0x3e, 0xd1, 0x60, 0x62, 0x33, 0x1d, 0xe2,
-- 0x77, 0xe4, 0xc7, 0xa7, 0x02, 0x20, 0xd7, 0x5b, 0x48, 0xe6, 0xa9, 0xab,
-- 0xf6, 0x2e, 0x06, 0xb1, 0xbc, 0x31, 0xaf, 0xd4, 0xc7, 0xb4, 0x25, 0x2f,
-- 0xcd, 0x72, 0xb3, 0xf3, 0xc5, 0x2b, 0x10, 0xc4, 0xce, 0x17, 0xff, 0xe2,
-- 0x3e, 0xdb, 0xd5, 0xcf, 0x76, 0xbf, 0xf8, 0x97, 0xe1, 0x10, 0xe3, 0x63,
-- 0x0a, 0x59, 0xb7, 0xaf, 0xd7, 0x15, 0x8f, 0x22, 0xd5, 0x23, 0x2c, 0x7f,
-- 0x39, 0xe0, 0x55, 0xd9, 0xeb, 0x9e, 0xf5, 0x1c, 0xae, 0x72, 0x5f, 0x9d,
-- 0x7e, 0x8e, 0x6f, 0xe5, 0x56, 0x24, 0x09, 0x80, 0xba, 0x55, 0xd7, 0xa2,
-- 0x3b, 0xdf, 0x04, 0xda, 0xd1, 0xf0, 0x36, 0xbc, 0xfc, 0xaf, 0x4c, 0xa9,
-- 0xff, 0xba, 0x96, 0xa8, 0x6f, 0x8e, 0xb7, 0xe3, 0x1e, 0x4e, 0x08, 0x23,
-- 0x5b, 0x7a, 0x34, 0xb5, 0x02, 0x0e, 0xdc, 0x32, 0x47, 0xc7, 0xf3, 0x1d,
-- 0x18, 0x54, 0x3c, 0xff, 0xb3, 0xc2, 0xf9, 0xb9, 0xb4, 0x02, 0x7b, 0x46,
-- 0x32, 0x09, 0x48, 0xc6, 0x40, 0xdd, 0x01, 0xa9, 0x26, 0xf0, 0xc3, 0x0f,
-- 0x2a, 0x50, 0xd1, 0x2f, 0x3a, 0xf2, 0x6b, 0xe2, 0x45, 0x13, 0x62, 0x6f,
-- 0x33, 0x54, 0x5b, 0xd6, 0x22, 0xf5, 0x7a, 0xe5, 0x5f, 0xea, 0x4c, 0xa5,
-- 0x11, 0xda, 0xda, 0xfd, 0xf3, 0x83, 0xa3, 0x23, 0x44, 0xf2, 0x61, 0x51,
-- 0x0f, 0x85, 0x8d, 0x81, 0x36, 0x37, 0x10, 0x85, 0xe0, 0x03, 0xbf, 0x42,
-- 0xd2, 0xe7, 0xbd, 0xc3, 0xb6, 0x83, 0xfa, 0xa9, 0x31, 0x53, 0x8a, 0x75,
-- 0x2b, 0x41, 0xb3, 0x22, 0xe5, 0xbc, 0xea, 0xc9, 0x83, 0x57, 0x79, 0x4f,
-- 0x7d, 0x4b, 0xf2, 0x49, 0xcf, 0xc3, 0x8b, 0xc8, 0x7e, 0x60, 0xd3, 0x5e,
-- 0x89, 0xe8, 0x94, 0xff, 0x3d, 0x7b, 0xb5, 0xb3, 0xdd, 0xfd, 0x04, 0xca,
-- 0x2a, 0x30, 0x94, 0xf1, 0x2b, 0xef, 0x9b, 0x7b, 0xe8, 0xf9, 0x7c, 0x22,
-- 0x4f, 0x5f, 0xe7, 0x93, 0x09, 0xdd, 0x09, 0xb7, 0xe9, 0x74, 0x49, 0xb4,
-- 0x30, 0xe2, 0x1b, 0x96, 0xff, 0x7f, 0xc5, 0x38, 0xe0, 0x45, 0xd2, 0x67,
-- 0xab, 0xe5, 0x68, 0x96, 0x37, 0x06, 0xbc, 0xc5, 0x13, 0xfc, 0x82, 0x27,
-- 0xfc, 0x7d, 0xe6, 0xa8, 0x23, 0x63, 0xd1, 0x4e, 0x64, 0xbf, 0xf5, 0xcb,
-- 0xa2, 0x18, 0xa5, 0xe5, 0xba, 0xba, 0x58, 0x6c, 0x9c, 0xeb, 0x3b, 0xbb,
-- 0x4f, 0x9e, 0x3e, 0x5b, 0x1f, 0xaa, 0x9c, 0x06, 0x16, 0x51, 0x87, 0x29,
-- 0xfc, 0xd2, 0x84, 0x4b, 0x39, 0x9f, 0x79, 0x38, 0xf9, 0x2e, 0x3f, 0x27,
-- 0x73, 0x31, 0xee, 0xee, 0x95, 0xf4, 0xf6, 0x2f, 0xdc, 0xcf, 0x2b, 0x74,
-- 0xf1, 0x2f, 0xf9, 0xe4, 0x95, 0x9b, 0xe1, 0xbf, 0xf0, 0x5c, 0x5e, 0xe9,
-- 0x24, 0x68, 0x5f, 0x2d, 0x47, 0xab, 0x0a, 0x2b, 0x3d, 0x3c, 0xb6, 0xb9,
-- 0xb6, 0x89, 0x6b, 0x98, 0x34, 0x9c, 0xec, 0x83, 0x89, 0x78, 0x24, 0x20,
-- 0xad, 0xfa, 0x1c, 0xa5, 0xad, 0x8f, 0x03, 0x6a, 0x65, 0xc0, 0xad, 0x0c,
-- 0x3c, 0xc3, 0x06, 0x02, 0xf5, 0x80, 0x37, 0xa2, 0xaf, 0x89, 0x6a, 0x53,
-- 0x58, 0x3e, 0x54, 0x14, 0x28, 0x0a, 0xb8, 0xb0, 0x0f, 0xbe, 0x3e, 0x5a,
-- 0xd7, 0xd8, 0x10, 0x51, 0xdd, 0xfa, 0x5d, 0x36, 0x63, 0x17, 0xc5, 0x35,
-- 0x4e, 0x17, 0x7c, 0xfa, 0xd7, 0x12, 0x2d, 0x4c, 0x96, 0x72, 0xa8, 0x03,
-- 0xf7, 0x2b, 0x39, 0xa5, 0xd4, 0x99, 0xde, 0x3a, 0x53, 0xb6, 0x42, 0x97,
-- 0x02, 0x8e, 0x1d, 0x34, 0x03, 0xb4, 0x58, 0x89, 0x79, 0x80, 0x1f, 0x66,
-- 0xe1, 0x12, 0xd2, 0x06, 0x6f, 0x9c, 0x23, 0xd2, 0x25, 0x40, 0xe9, 0xa3,
-- 0xf4, 0x95, 0xf0, 0x13, 0x63, 0x11, 0x3d, 0x87, 0xd9, 0x26, 0x94, 0x10,
-- 0x72, 0x0f, 0xb8, 0x51, 0x47, 0x99, 0xa6, 0xb1, 0x89, 0x29, 0x43, 0x04,
-- 0x43, 0xe6, 0x9f, 0x2f, 0xbf, 0x34, 0x84, 0xd9, 0x2f, 0x12, 0x14, 0x17,
-- 0x94, 0xb7, 0xd4, 0x17, 0xa8, 0x46, 0x21, 0xb1, 0xa3, 0xe2, 0x25, 0x55,
-- 0x0f, 0x9c, 0x5b, 0x2a, 0x08, 0x18, 0x51, 0xc1, 0x40, 0x61, 0xc0, 0x31,
-- 0xd1, 0xd1, 0xbd, 0x1a, 0x00, 0xb8, 0x85, 0xf5, 0xbf, 0xe0, 0x10, 0xbc,
-- 0xe4, 0x6d, 0xc0, 0xd7, 0x5f, 0xac, 0xaf, 0xb9, 0x2a, 0xef, 0x4e, 0x72,
-- 0x6f, 0x39, 0x75, 0x85, 0x40, 0xc3, 0xf9, 0x90, 0x40, 0x6d, 0x70, 0xaa,
-- 0x22, 0x8d, 0x31, 0x84, 0x01, 0x2a, 0xf0, 0x92, 0x34, 0x35, 0x9d, 0x28,
-- 0x0e, 0xa1, 0x33, 0x1a, 0x4b, 0xe3, 0x19, 0x47, 0x7f, 0xb3, 0xf4, 0xb8,
-- 0xce, 0x01, 0x81, 0x78, 0x6f, 0xdd, 0xa1, 0xb3, 0xc2, 0x8e, 0x09, 0x86,
-- 0x57, 0x66, 0x86, 0xd1, 0xb7, 0xa6, 0x60, 0xca, 0x5e, 0x9a, 0x0f, 0x27,
-- 0x56, 0x05, 0xc2, 0x83, 0x4f, 0x03, 0x13, 0xb4, 0x8f, 0xe8, 0x88, 0xbc,
-- 0xe1, 0x1c, 0x4b, 0xed, 0xf4, 0x15, 0x2f, 0xf7, 0xce, 0xf0, 0x2a, 0xbf,
-- 0x94, 0xc5, 0x20, 0x16, 0x79, 0x95, 0x6d, 0xd1, 0x9f, 0x7d, 0xfa, 0x7c,
-- 0x97, 0xa5, 0x32, 0xfe, 0xe5, 0x09, 0x42, 0x86, 0xc2, 0xbb, 0x3f, 0x38,
-- 0x1b, 0xee, 0x5c, 0xf0, 0x2f, 0xb9, 0xbb, 0xf3, 0xd5, 0xd3, 0xa2, 0xa3,
-- 0x04, 0x99, 0x47, 0x15, 0x95, 0xfa, 0x81, 0x17, 0x85, 0x15, 0x2d, 0x56,
-- 0x49, 0x97, 0x1c, 0xf5, 0xef, 0x82, 0x6e, 0x35, 0xa6, 0x41, 0x05, 0x75,
-- 0x96, 0xbb, 0x73, 0x35, 0x99, 0x70, 0x96, 0x04, 0x6e, 0xd6, 0xec, 0x6e,
-- 0xb3, 0x1f, 0x06, 0x33, 0x12, 0x7b, 0xbf, 0xe5, 0xbc, 0x63, 0x06, 0x33,
-- 0xf0, 0xe5, 0x62, 0xb8, 0x7b, 0x94, 0x80, 0x5f, 0x4b, 0xc2, 0x44, 0x4c,
-- 0x6c, 0x73, 0xde, 0xde, 0xc1, 0xa0, 0x1e, 0xa3, 0x49, 0x9b, 0xec, 0xd5,
-- 0xda, 0xe4, 0x6e, 0xb2, 0x69, 0x05, 0x5d, 0x5d, 0xa1, 0xec, 0xac, 0x57,
-- 0x03, 0xf2, 0x45, 0x47, 0xeb, 0xe1, 0xd9, 0x2f, 0xc6, 0x75, 0x46, 0xba,
-- 0x2e, 0xe3, 0x0e, 0xcd, 0x84, 0xcf, 0x1d, 0xce, 0xa4, 0x30, 0x1d, 0x48,
-- 0x78, 0x3a, 0x90, 0xdb, 0x53, 0x45, 0xa2, 0xc1, 0x9b, 0x61, 0x72, 0x8c,
-- 0xa0, 0xdc, 0x2a, 0x15, 0xfc, 0x0a, 0xbb, 0x61, 0x8d, 0x1a, 0x88, 0x74,
-- 0x44, 0x06, 0x5f, 0x93, 0xc4, 0x00, 0x06, 0x0d, 0x30, 0x92, 0xca, 0x0d,
-- 0xa2, 0x59, 0x88, 0x4b, 0xe4, 0x0b, 0x95, 0x47, 0xfa, 0xb0, 0x4f, 0xbb,
-- 0xe7, 0x60, 0x87, 0x17, 0x5b, 0x1c, 0xd2, 0x63, 0x1c, 0xc1, 0x06, 0x8d,
-- 0x48, 0x5c, 0x91, 0x0a, 0xa0, 0x01, 0x5b, 0x77, 0x87, 0x40, 0xa2, 0xfe,
-- 0x32, 0x31, 0xba, 0x70, 0xee, 0x3a, 0xc3, 0x68, 0xc0, 0x4f, 0x4b, 0xad,
-- 0x81, 0xca, 0x80, 0xe8, 0x4b, 0x64, 0xd4, 0x83, 0xde, 0x38, 0xcd, 0x9c,
-- 0x72, 0xad, 0xe5, 0xb6, 0x5c, 0x44, 0x2f, 0x6c, 0x31, 0x22, 0x6e, 0x78,
-- 0x17, 0x1a, 0x0f, 0x92, 0xc7, 0x95, 0xde, 0xd2, 0x2f, 0x2c, 0x9c, 0x8d,
-- 0x4a, 0xda, 0xf5, 0xac, 0x94, 0xab, 0x01, 0xbd, 0x0a, 0xae, 0x87, 0x55,
-- 0x80, 0x79, 0x7b, 0x9c, 0x18, 0x0e, 0xc8, 0xa5, 0x17, 0x15, 0x2d, 0x78,
-- 0x10, 0x53, 0x54, 0xcb, 0x88, 0xc8, 0x43, 0xfa, 0x94, 0xdc, 0x72, 0xb2,
-- 0xb6, 0x9c, 0x4b, 0x9c, 0xf0, 0xe2, 0x34, 0x8e, 0x6c, 0xf0, 0x84, 0xbc,
-- 0xca, 0x74, 0x44, 0x64, 0xb2, 0xce, 0x4b, 0xb0, 0xde, 0x4f, 0xd6, 0x79,
-- 0xa8, 0xfc, 0xc5, 0x3a, 0xd6, 0x13, 0x1f, 0x07, 0xcb, 0xb7, 0x3e, 0xec,
-- 0x38, 0x85, 0xfc, 0xcc, 0xab, 0x2f, 0x1b, 0xab, 0x84, 0xcf, 0xad, 0xa9,
-- 0x57, 0x12, 0xc7, 0x1f, 0xc9, 0xdc, 0xf6, 0x6e, 0xd0, 0xfe, 0xab, 0x83,
-- 0x82, 0x31, 0xdc, 0xa8, 0x99, 0x20, 0x12, 0x73, 0xec, 0x3e, 0xcb, 0x91,
-- 0x52, 0x18, 0x35, 0xf4, 0xf8, 0x29, 0xbe, 0x30, 0x56, 0xe4, 0xa2, 0x14,
-- 0x85, 0xbb, 0x09, 0x09, 0x18, 0xe7, 0xa5, 0xdd, 0xcc, 0x45, 0xef, 0xbb,
-- 0x2b, 0x60, 0x65, 0x00, 0xcf, 0xd9, 0x19, 0x22, 0xc7, 0xcc, 0x57, 0xc8,
-- 0x74, 0x0d, 0x38, 0xe5, 0xbd, 0x87, 0x05, 0xed, 0xb9, 0xc0, 0x51, 0x53,
-- 0xe9, 0x6d, 0x95, 0xbb, 0x78, 0xd7, 0x22, 0x1f, 0x03, 0x24, 0xf8, 0xd5,
-- 0x97, 0x93, 0xe2, 0x8a, 0x39, 0x57, 0x9f, 0x0e, 0x1a, 0xff, 0xdb, 0xe3,
-- 0x87, 0x77, 0xb5, 0x53, 0x19, 0x30, 0xce, 0x8a, 0x48, 0xf1, 0xf6, 0xf7,
-- 0x8a, 0x28, 0x4a, 0x6a, 0x78, 0x52, 0x8c, 0xb5, 0x6d, 0xd7, 0xb4, 0xec,
-- 0x07, 0xb5, 0xef, 0xbe, 0x08, 0xfb, 0xb2, 0xc5, 0x49, 0xb5, 0x65, 0xc8,
-- 0x46, 0xc4, 0x29, 0x6a, 0xb9, 0xca, 0xd1, 0x31, 0xab, 0x32, 0x30, 0x70,
-- 0x71, 0x91, 0x4b, 0xb9, 0xb7, 0xa6, 0x9a, 0xf8, 0xb4, 0xfe, 0xe5, 0xba,
-- 0x84, 0x61, 0xaf, 0xbf, 0x5c, 0x07, 0x07, 0x63, 0xbe, 0x64, 0x15, 0xa5,
-- 0xf4, 0x72, 0x5a, 0x97, 0x5b, 0x71, 0x20, 0xb2, 0x83, 0x62, 0xa2, 0x35,
-- 0x82, 0xe4, 0x98, 0x61, 0x98, 0x1a, 0x19, 0xc6, 0xf7, 0xc1, 0x4c, 0x80,
-- 0x62, 0xd3, 0x18, 0x15, 0x03, 0x3c, 0x8e, 0x6a, 0x09, 0x5e, 0xd1, 0x4b,
-- 0x17, 0x62, 0x19, 0xf0, 0x24, 0x2a, 0x8e, 0x29, 0x10, 0x33, 0xe7, 0x72,
-- 0xbe, 0xe0, 0xec, 0xe1, 0x31, 0x20, 0xa9, 0xf5, 0x2c, 0x0d, 0x93, 0xf7,
-- 0x73, 0x81, 0x31, 0xcf, 0x58, 0x59, 0xce, 0xcb, 0xf1, 0x72, 0xc6, 0xa6,
-- 0x8a, 0x31, 0x1b, 0xc8, 0x2c, 0xfc, 0x88, 0x16, 0xaa, 0xe1, 0x32, 0x0f,
-- 0x07, 0x2c, 0xc6, 0x11, 0x31, 0x62, 0x6b, 0xbf, 0x08, 0x0f, 0xe1, 0xa0,
-- 0x28, 0x35, 0x52, 0x43, 0x2a, 0x70, 0xb8, 0x12, 0xca, 0x80, 0xd8, 0x5b,
-- 0x77, 0xf8, 0xe6, 0xf0, 0xec, 0xec, 0xf0, 0x8c, 0xd7, 0x7b, 0x7f, 0xde,
-- 0xa8, 0xb7, 0xee, 0xc0, 0x25, 0xbd, 0xfb, 0xcf, 0x22, 0x53, 0x63, 0x50,
-- 0x70, 0x61, 0x85, 0xe9, 0x64, 0xc2, 0x28, 0xcc, 0xd0, 0x20, 0x04, 0x49,
-- 0x45, 0x6a, 0xde, 0x86, 0xe6, 0x45, 0x44, 0x26, 0x3b, 0x53, 0x7e, 0x58,
-- 0x03, 0x2d, 0x90, 0x2d, 0x7c, 0x0b, 0xa5, 0xd6, 0xf8, 0x5b, 0x5a, 0xd2,
-- 0xf2, 0x75, 0xd6, 0x10, 0x53, 0x87, 0x1a, 0x4c, 0x9a, 0xa9, 0x83, 0x7b,
-- 0xea, 0xec, 0x13, 0x98, 0xf2, 0x25, 0x9f, 0x51, 0xd6, 0x9d, 0xb0, 0x18,
-- 0x55, 0xbd, 0x5c, 0xe4, 0x13, 0x67, 0xed, 0xa5, 0xcf, 0x49, 0xfc, 0x4b,
-- 0xe4, 0x94, 0x57, 0x16, 0x7f, 0x02, 0x4f, 0xa3, 0x19, 0x23, 0x42, 0x6b,
-- 0x5b, 0x0b, 0xe1, 0x34, 0x41, 0x42, 0x92, 0x04, 0x72, 0x59, 0xbd, 0x96,
-- 0x66, 0xf6, 0xad, 0xd2, 0x7e, 0x06, 0x2b, 0x23, 0x73, 0x0b, 0x0b, 0x89,
-- 0x09, 0x39, 0x03, 0xdb, 0xb2, 0x66, 0x3e, 0x24, 0x9b, 0xc3, 0xca, 0xf6,
-- 0x04, 0x28, 0x02, 0x49, 0x77, 0xe5, 0x5e, 0xf2, 0x53, 0x95, 0x8f, 0x7f,
-- 0xf1, 0x97, 0x07, 0x32, 0x2c, 0x9a, 0x15, 0x9a, 0xb0, 0x74, 0xba, 0x50,
-- 0xaa, 0x0c, 0x4b, 0xb2, 0xeb, 0xfb, 0xf3, 0xc3, 0xb3, 0x64, 0xff, 0x6b,
-- 0xc6, 0x49, 0xfd, 0x2f, 0x6e, 0x30, 0x3f, 0xa7, 0xb7, 0xc3, 0x9a, 0x86,
-- 0x7a, 0x2a, 0xfa, 0x43, 0x66, 0xa6, 0x70, 0x41, 0x2e, 0x6a, 0xec, 0x6c,
-- 0x6e, 0x55, 0x6c, 0xfd, 0x75, 0xdf, 0xdc, 0xc3, 0xb5, 0xe4, 0xd1, 0x5d,
-- 0xfc, 0x94, 0x3d, 0xe4, 0x43, 0x16, 0xee, 0xa2, 0xe0, 0xc6, 0x88, 0x4b,
-- 0xc2, 0xf6, 0x46, 0x47, 0x5f, 0x45, 0x6a, 0xa7, 0xec, 0xd2, 0x7e, 0xb2,
-- 0xfe, 0xb6, 0xf8, 0x3b, 0x09, 0x03, 0xe9, 0xd6, 0x93, 0xe1, 0x76, 0xb2,
-- 0xf1, 0x7d, 0x3e, 0x7f, 0xf1, 0xec, 0x2f, 0xc9, 0xd1, 0xe6, 0x7a, 0x23,
-- 0xde, 0x5c, 0xaa, 0x9a, 0x8d, 0xd2, 0xf9, 0x8d, 0xdb, 0xb2, 0x13, 0x9c,
-- 0x6c, 0x09, 0x74, 0xb3, 0x8a, 0x10, 0x52, 0x7c, 0x75, 0x65, 0x8b, 0x02,
-- 0x05, 0x2e, 0xa1, 0xeb, 0xc9, 0x77, 0x0e, 0x14, 0x98, 0xb5, 0x7c, 0x7a,
-- 0x6a, 0xc2, 0x4b, 0xf7, 0xe2, 0x59, 0xd4, 0xc4, 0x53, 0xd7, 0xc6, 0x7b,
-- 0x69, 0xe3, 0x57, 0x36, 0xb1, 0x3b, 0xdc, 0xde, 0x4d, 0x36, 0x4e, 0xce,
-- 0xb7, 0x76, 0x5d, 0x0b, 0x71, 0x13, 0xbb, 0x68, 0x82, 0x1f, 0x6a, 0xbe,
-- 0xfc, 0x94, 0xfb, 0xff, 0x29, 0x9b, 0xff, 0x92, 0x6c, 0xfc, 0xb0, 0xb3,
-- 0x43, 0x0d, 0xfc, 0x25, 0xd9, 0x3f, 0xfa, 0x21, 0x79, 0x3a, 0xa4, 0xc6,
-- 0xde, 0xa5, 0xb7, 0xda, 0x9c, 0xc2, 0x7d, 0x9e, 0xa3, 0x11, 0xfa, 0x3e,
-- 0x6a, 0xe3, 0x59, 0xab, 0x8d, 0x63, 0xd2, 0x0b, 0x3f, 0xd2, 0xb5, 0xb2,
-- 0x3d, 0x7c, 0xb2, 0x9b, 0xe4, 0xcf, 0x3e, 0x7f, 0x6e, 0x0d, 0x69, 0x1b,
-- 0xf8, 0xbe, 0x69, 0xad, 0x14, 0x40, 0x09, 0x12, 0x75, 0x0e, 0x3f, 0x12,
-- 0x43, 0x03, 0x8b, 0x00, 0xf6, 0xff, 0x75, 0x5a, 0x5a, 0x45, 0x50, 0xc6,
-- 0x83, 0xa7, 0x9d, 0x52, 0xa0, 0xdd, 0x0c, 0x66, 0x4b, 0xba, 0x38, 0xf7,
-- 0xa2, 0xe1, 0xb0, 0x6e, 0x6a, 0x8f, 0xfe, 0x25, 0x79, 0x7b, 0x7e, 0x74,
-- 0x48, 0x33, 0xda, 0xa6, 0xa1, 0xf9, 0x35, 0x94, 0x01, 0xe1, 0x2b, 0x2c,
-- 0xee, 0x0b, 0xe0, 0x36, 0x6a, 0x1b, 0x61, 0xed, 0x4a, 0x10, 0x1d, 0x5d,
-- 0xdc, 0x15, 0xfa, 0xe5, 0x30, 0x91, 0xc1, 0xfe, 0x15, 0xab, 0x10, 0x72,
-- 0xd5, 0xa2, 0xeb, 0x6f, 0x8b, 0x39, 0x1d, 0x93, 0xb2, 0x28, 0x39, 0x9a,
-- 0x69, 0xbd, 0x21, 0x2d, 0x7c, 0xfb, 0xfa, 0x50, 0x92, 0x8e, 0xdf, 0xa6,
-- 0x73, 0xe2, 0x91, 0x8c, 0x1f, 0x54, 0xdd, 0xb0, 0x4f, 0x5e, 0xdc, 0x39,
-- 0xf2, 0xfe, 0xf1, 0xfd, 0xfc, 0x23, 0xed, 0xe3, 0x67, 0xc3, 0x1d, 0xc6,
-- 0x6e, 0x60, 0xad, 0xf7, 0xcd, 0x5b, 0xfa, 0x7b, 0xe7, 0xe9, 0x7a, 0xc2,
-- 0x5f, 0x35, 0x35, 0x78, 0x3b, 0xaf, 0x6b, 0x07, 0x27, 0x27, 0xdf, 0x1e,
-- 0x49, 0x50, 0xc6, 0x81, 0x9a, 0x55, 0x59, 0xb8, 0x72, 0x5a, 0xb1, 0x70,
-- 0x57, 0xd2, 0xde, 0x7c, 0x7e, 0x0b, 0x9c, 0x71, 0x37, 0x59, 0xb6, 0xe0,
-- 0x08, 0x81, 0xba, 0xc5, 0x11, 0x6a, 0xe5, 0xd1, 0x2e, 0xde, 0x88, 0xc5,
-- 0x9f, 0x06, 0xf6, 0x51, 0xc5, 0x60, 0xb2, 0x66, 0xc2, 0x1d, 0xdd, 0x3b,
-- 0x60, 0x83, 0xd4, 0xb9, 0xcc, 0x64, 0x88, 0x2e, 0xa0, 0xde, 0x4c, 0xd0,
-- 0x52, 0x46, 0x81, 0x5e, 0x54, 0xdd, 0x77, 0xfd, 0x9c, 0xa4, 0x7b, 0x19,
-- 0xf4, 0x9e, 0x5a, 0x6d, 0xd7, 0x03, 0xf4, 0x5d, 0x48, 0xb4, 0x0b, 0x2d,
-- 0x33, 0x02, 0xd3, 0xf1, 0x3d, 0xc9, 0x12, 0x98, 0x93, 0xf2, 0xe6, 0x0a,
-- 0xb6, 0x6c, 0x84, 0xcc, 0xbd, 0xdb, 0x7f, 0x7b, 0xf8, 0xea, 0xbb, 0xfd,
-- 0xe3, 0xf7, 0x87, 0xf4, 0x4a, 0x0e, 0xa0, 0x6b, 0x17, 0x56, 0x87, 0x31,
-- 0xce, 0x72, 0xd4, 0xcd, 0xac, 0x48, 0x3c, 0x58, 0x5f, 0x93, 0x48, 0xef,
-- 0xa4, 0xc7, 0x6f, 0xed, 0xc8, 0x6b, 0x44, 0x17, 0xfc, 0xd7, 0xae, 0xfc,
-- 0xb5, 0xfb, 0x97, 0xde, 0x66, 0x63, 0xd2, 0x91, 0x96, 0xcc, 0xf4, 0x72,
-- 0x27, 0xb5, 0x66, 0x38, 0x64, 0x47, 0xd2, 0x0b, 0x64, 0x55, 0x7a, 0xe6,
-- 0xa3, 0xb1, 0xbb, 0x8d, 0x9f, 0xdd, 0x18, 0xdd, 0x87, 0x3a, 0x78, 0x8f,
-- 0x5f, 0x7a, 0x05, 0x01, 0xa3, 0x07, 0x28, 0xf0, 0xcc, 0x56, 0x4b, 0xda,
-- 0xb0, 0x26, 0xb2, 0x8f, 0x0b, 0x8e, 0x52, 0xdc, 0xe8, 0xc9, 0x2f, 0xaf,
-- 0x5e, 0xef, 0x5f, 0x1c, 0xf2, 0x0b, 0xd6, 0xbd, 0xe1, 0xc2, 0x5b, 0x12,
-- 0x00, 0x8f, 0x67, 0xa3, 0x27, 0x1f, 0xbe, 0xe2, 0x09, 0xf5, 0x36, 0xc5,
-- 0x97, 0x01, 0x47, 0x77, 0x6b, 0x5c, 0xc5, 0x5c, 0xe3, 0xa9, 0x83, 0x44,
-- 0xde, 0xca, 0xa2, 0x48, 0x36, 0x7a, 0xf2, 0x5d, 0xcf, 0x59, 0x70, 0xb5,
-- 0x36, 0xb5, 0xba, 0x2b, 0x27, 0x48, 0x11, 0x88, 0x92, 0x17, 0x25, 0x4c,
-- 0xcc, 0xef, 0x8f, 0x3a, 0x2b, 0xc4, 0xe2, 0x14, 0xe0, 0x11, 0xbb, 0x8d,
-- 0xd7, 0x4c, 0x61, 0xb6, 0x31, 0x15, 0xc5, 0xce, 0xee, 0x93, 0xbf, 0x60,
-- 0x3d, 0x5f, 0xf5, 0xb6, 0xe8, 0x6e, 0xe8, 0xfd, 0x85, 0xbb, 0xce, 0xcd,
-- 0xc6, 0x19, 0x04, 0x76, 0xb3, 0x3e, 0xa5, 0x14, 0x25, 0x21, 0x2c, 0xbc,
-- 0xeb, 0x01, 0x00, 0x0a, 0x16, 0xf4, 0x4e, 0x12, 0x99, 0x0c, 0x2e, 0xc4,
-- 0x1c, 0xfa, 0xd8, 0xaf, 0x51, 0x76, 0x95, 0xcf, 0xe7, 0xae, 0x3e, 0xa7,
-- 0x74, 0x17, 0xde, 0x1f, 0x7d, 0x79, 0x57, 0xe6, 0xa8, 0x10, 0x2b, 0xdc,
-- 0xe7, 0xec, 0xde, 0x72, 0x9d, 0xaa, 0xca, 0x54, 0x5c, 0xd9, 0xb3, 0x48,
-- 0x32, 0x1e, 0xa9, 0x6d, 0xc7, 0x94, 0x11, 0xc8, 0x04, 0xc4, 0x5a, 0xee,
-- 0x21, 0x28, 0x49, 0x04, 0x40, 0x10, 0xf8, 0x60, 0x77, 0x76, 0x3a, 0xe2,
-- 0x3c, 0x5e, 0x97, 0xd8, 0x11, 0x68, 0xe5, 0x6e, 0xe9, 0xed, 0xf8, 0xe5,
-- 0x01, 0x76, 0x0d, 0x5f, 0x94, 0xb2, 0x96, 0x95, 0xb3, 0x21, 0xc1, 0xdb,
-- 0xa8, 0xcf, 0x36, 0xf7, 0xa9, 0x95, 0x32, 0x85, 0x69, 0x88, 0x4a, 0x2f,
-- 0xfa, 0x31, 0xb1, 0x9a, 0x79, 0x56, 0x3e, 0x18, 0xf4, 0xd0, 0xe1, 0x8c,
-- 0xc2, 0x14, 0x83, 0x34, 0x3c, 0x7e, 0x67, 0x38, 0x1c, 0xfa, 0x2a, 0xbf,
-- 0xbc, 0x2d, 0xea, 0x83, 0x42, 0x79, 0x96, 0x00, 0x61, 0x13, 0x6b, 0xbc,
-- 0x01, 0x61, 0x1e, 0x02, 0xf5, 0xa6, 0x06, 0xc3, 0xa8, 0x9d, 0xc0, 0x1d,
-- 0x8d, 0xc0, 0xc6, 0xb1, 0xae, 0xdd, 0xae, 0x5b, 0x5a, 0xfb, 0x4d, 0xd7,
-- 0x26, 0x3c, 0x30, 0x36, 0xb1, 0x3d, 0x6a, 0x71, 0x3f, 0xc7, 0xa7, 0x0a,
-- 0xb7, 0x16, 0x4c, 0xc1, 0x1c, 0xd4, 0x0d, 0x3a, 0x91, 0xa4, 0x4e, 0x59,
-- 0x34, 0x1d, 0x8a, 0x96, 0x79, 0x62, 0x26, 0x57, 0xdc, 0x21, 0xcf, 0x5c,
-- 0x6a, 0x6c, 0x2c, 0x4a, 0xd6, 0xf4, 0x78, 0x8d, 0xed, 0x06, 0x59, 0x38,
-- 0xb1, 0x59, 0xdb, 0x51, 0xb4, 0x55, 0xd6, 0x99, 0x21, 0xfb, 0x6b, 0x22,
-- 0x9e, 0x02, 0x76, 0x54, 0xa9, 0x22, 0x31, 0x92, 0xd8, 0x56, 0xcc, 0xe0,
-- 0xf6, 0xd2, 0xc9, 0x7b, 0x73, 0x15, 0x47, 0x80, 0x0d, 0x04, 0xf2, 0xc2,
-- 0x72, 0xe5, 0x8c, 0x7b, 0x28, 0xec, 0xc1, 0x43, 0xfe, 0xf2, 0xb1, 0xb5,
-- 0xe8, 0x9c, 0xe5, 0xad, 0xb5, 0xf1, 0xb7, 0x72, 0x93, 0x75, 0xd1, 0x8a,
-- 0x8a, 0x75, 0x59, 0xc0, 0x05, 0x3c, 0xdf, 0x4b, 0xd2, 0x3b, 0xae, 0x36,
-- 0x9d, 0x71, 0xcc, 0x24, 0x22, 0x1d, 0x60, 0x95, 0x39, 0x0e, 0xec, 0x8c,
-- 0x6e, 0x86, 0x56, 0xd1, 0x3e, 0xf5, 0x25, 0xed, 0xad, 0x68, 0xad, 0x00,
-- 0x8a, 0x9a, 0x41, 0x2f, 0x47, 0x75, 0x5d, 0x06, 0x80, 0x54, 0x49, 0xdd,
-- 0xd4, 0x73, 0x1e, 0xf9, 0x26, 0x0a, 0x90, 0x8a, 0x38, 0x8f, 0x58, 0x41,
-- 0xb6, 0x73, 0x48, 0x5c, 0x85, 0xad, 0x16, 0x2a, 0xa5, 0xbb, 0x4e, 0x9c,
-- 0x7f, 0x5a, 0xcd, 0x4f, 0x1c, 0x72, 0x3b, 0x1f, 0xb8, 0xaa, 0xe1, 0x2e,
-- 0x1e, 0xab, 0xcc, 0xaf, 0xae, 0xb4, 0xe6, 0x69, 0x7b, 0x6a, 0xdd, 0x44,
-- 0x76, 0xcc, 0xab, 0xc2, 0x91, 0xc9, 0xf7, 0xab, 0x56, 0xf3, 0xc2, 0x6c,
-- 0x3e, 0x66, 0x75, 0x69, 0x10, 0xb3, 0xf9, 0x24, 0x65, 0xdf, 0x00, 0xd4,
-- 0x28, 0x49, 0xe0, 0x9c, 0x34, 0xd1, 0xf4, 0x21, 0x9f, 0x9c, 0xad, 0x01,
-- 0x5a, 0x7e, 0xee, 0x73, 0xde, 0x6d, 0xd3, 0x81, 0x5f, 0xe6, 0x23, 0x50,
-- 0x7c, 0x74, 0xe8, 0x9d, 0x0b, 0x7f, 0x92, 0xaa, 0x64, 0xa3, 0xd4, 0xab,
-- 0x5c, 0x6b, 0x49, 0xc3, 0xda, 0xcb, 0x25, 0x27, 0x8e, 0xe6, 0xca, 0x87,
-- 0x8a, 0xdb, 0xcc, 0x43, 0xe8, 0x79, 0x83, 0xa3, 0xc7, 0x21, 0xd5, 0xd3,
-- 0xef, 0x98, 0x49, 0xcb, 0xc1, 0xeb, 0xf8, 0x15, 0x26, 0xd9, 0x5a, 0x95,
-- 0x61, 0x12, 0x34, 0x29, 0xa6, 0x92, 0x22, 0x64, 0xf1, 0x32, 0x36, 0xf5,
-- 0x5b, 0x5b, 0x8b, 0x9a, 0x56, 0x04, 0x10, 0x8c, 0x40, 0x35, 0x91, 0x92,
-- 0x0c, 0x86, 0x25, 0xee, 0xe2, 0xe6, 0xbc, 0xff, 0xd7, 0x66, 0xd9, 0x73,
-- 0x9b, 0xd4, 0x33, 0xd4, 0x76, 0x10, 0x01, 0x68, 0x80, 0x05, 0x3a, 0xe7,
-- 0xc2, 0xdf, 0x9f, 0xa6, 0x1c, 0xc4, 0x52, 0x48, 0x74, 0x00, 0xb6, 0x0c,
-- 0x44, 0x0d, 0x63, 0x5a, 0x8b, 0xa7, 0x46, 0xc7, 0xcf, 0x45, 0x6b, 0x08,
-- 0xad, 0xb1, 0x90, 0x82, 0x66, 0x88, 0x4a, 0x10, 0x61, 0x3d, 0x0e, 0xcb,
-- 0xd6, 0xae, 0x4e, 0x0f, 0x1f, 0x35, 0xce, 0xe8, 0x63, 0x47, 0xf6, 0xf4,
-- 0xec, 0xe4, 0xeb, 0xb3, 0xc3, 0xf3, 0xf3, 0xe4, 0xed, 0xe1, 0x85, 0xa8,
-- 0xfd, 0x17, 0x12, 0x19, 0x77, 0xc5, 0x9a, 0x7b, 0x02, 0xb7, 0x83, 0xc1,
-- 0xdd, 0x58, 0xf4, 0x89, 0xd9, 0x14, 0x90, 0x92, 0x54, 0xb0, 0x4b, 0x0d,
-- 0xa2, 0x1c, 0xf4, 0xf9, 0xa9, 0x06, 0xd4, 0x5d, 0xc3, 0xf0, 0x8f, 0xf0,
-- 0x26, 0xf8, 0x26, 0x9d, 0x1d, 0xdd, 0x5b, 0x54, 0x21, 0x23, 0x4b, 0xc0,
-- 0xd3, 0xb5, 0x71, 0x2e, 0x6f, 0x4d, 0xe7, 0xdb, 0x9b, 0xfe, 0xc5, 0xf4,
-- 0xfe, 0x94, 0x5c, 0x14, 0x35, 0x17, 0x24, 0xe6, 0x5f, 0xcf, 0x8c, 0x3e,
-- 0xfe, 0x94, 0xfc, 0x40, 0x6d, 0x4e, 0x68, 0xd5, 0xd9, 0x98, 0x4c, 0x17,
-- 0xee, 0x39, 0x8a, 0x2e, 0xfa, 0x0a, 0x2c, 0xa8, 0x94, 0x18, 0xd6, 0x9a,
-- 0x5e, 0x96, 0xe5, 0xb0, 0xbb, 0x80, 0x49, 0xa3, 0x02, 0x89, 0x20, 0x0b,
-- 0x6a, 0x78, 0x9d, 0xeb, 0x59, 0xab, 0xa9, 0x26, 0xc9, 0x71, 0x76, 0x59,
-- 0x43, 0x20, 0xe1, 0xee, 0xa8, 0xb9, 0x6d, 0x86, 0xca, 0xdd, 0xe1, 0x0a,
-- 0x51, 0xf4, 0xeb, 0x93, 0xcf, 0x9f, 0x6f, 0x7f, 0x2e, 0xbf, 0xda, 0xcf,
-- 0x17, 0x4f, 0xb7, 0x15, 0x72, 0x9a, 0xfe, 0x7a, 0xba, 0xf7, 0x74, 0x67,
-- 0x8f, 0x91, 0xf0, 0xb6, 0xf7, 0xb6, 0xe9, 0xff, 0x9f, 0xea, 0x27, 0x0c,
-- 0xf7, 0xf7, 0x62, 0xf7, 0xf3, 0xcf, 0x10, 0x18, 0xc3, 0xf4, 0x31, 0xa5,
-- 0x4e, 0x06, 0x75, 0x31, 0x00, 0x20, 0x0f, 0x84, 0xa0, 0x3f, 0x35, 0x8d,
-- 0x92, 0xec, 0x69, 0x1f, 0xb3, 0x5f, 0xf5, 0x4a, 0xd4, 0x9b, 0x69, 0xc6,
-- 0x1c, 0x40, 0x0d, 0xac, 0x82, 0x32, 0x62, 0x01, 0xdc, 0x92, 0x64, 0xac,
-- 0xd3, 0xd0, 0xb7, 0x6b, 0xfc, 0x0d, 0x84, 0xab, 0xc6, 0x3b, 0x12, 0x07,
-- 0x1e, 0x80, 0x69, 0xfd, 0xda, 0xae, 0x2d, 0xed, 0x79, 0x0d, 0x10, 0x59,
-- 0xba, 0x55, 0xfa, 0xde, 0xd8, 0x0a, 0xd2, 0xba, 0xa7, 0x58, 0x22, 0x9c,
-- 0x49, 0xca, 0xc0, 0xa5, 0x44, 0x13, 0xff, 0xda, 0xfe, 0xc4, 0x88, 0xc5,
-- 0x6f, 0x29, 0x35, 0x24, 0x71, 0x6f, 0x2e, 0x55, 0xa0, 0xa3, 0xaf, 0x06,
-- 0xf1, 0xac, 0xf9, 0xed, 0xf7, 0x2b, 0xc5, 0x5c, 0x4d, 0x1f, 0x72, 0x29,
-- 0x56, 0x52, 0xdf, 0xb3, 0x63, 0xca, 0x51, 0x73, 0x4a, 0x46, 0xbf, 0xa2,
-- 0x39, 0x3f, 0x23, 0x50, 0xb0, 0xdb, 0xb9, 0x41, 0xb0, 0x39, 0xb9, 0xc4,
-- 0xb8, 0xd9, 0x6a, 0x38, 0x08, 0x46, 0xbb, 0xf1, 0xe4, 0x55, 0x47, 0xb2,
-- 0x03, 0x79, 0x43, 0xc5, 0x4f, 0x97, 0xb6, 0xa6, 0xa5, 0xc5, 0xdd, 0xf3,
-- 0x46, 0xd9, 0x51, 0x57, 0x4c, 0x8d, 0x41, 0x7f, 0xda, 0x07, 0xce, 0x93,
-- 0x3b, 0x74, 0x0f, 0x4e, 0xcd, 0x87, 0xbe, 0xbb, 0xfa, 0xa6, 0x1b, 0x2e,
-- 0x94, 0xbc, 0xeb, 0x48, 0xfa, 0xe7, 0x10, 0x5d, 0xee, 0x9a, 0x0b, 0x2f,
-- 0x22, 0xd4, 0xb6, 0xd5, 0x1a, 0x02, 0x8c, 0xeb, 0xc8, 0x40, 0xe8, 0x9b,
-- 0xc6, 0xc2, 0x06, 0x7f, 0x74, 0x11, 0x5c, 0xb8, 0xd7, 0xb4, 0x00, 0x62,
-- 0x2a, 0x94, 0x3f, 0x0d, 0x33, 0x5c, 0x1d, 0xb7, 0x1b, 0xa5, 0x65, 0x03,
-- 0x72, 0x7c, 0x4d, 0xcb, 0xba, 0xcf, 0x18, 0xcd, 0x2b, 0xa8, 0x62, 0xff,
-- 0x87, 0xb5, 0xb5, 0xf3, 0xd3, 0xc3, 0xc3, 0xd7, 0xc9, 0xf1, 0xd1, 0xdb,
-- 0xa3, 0x8b, 0x40, 0x20, 0x77, 0x17, 0x89, 0x19, 0x5d, 0xad, 0x3c, 0x4f,
-- 0x6b, 0x39, 0x3c, 0xc0, 0xad, 0xf4, 0x67, 0x57, 0xf9, 0x2c, 0xd3, 0x24,
-- 0x87, 0x69, 0xfb, 0x3d, 0xa8, 0xde, 0x80, 0xd1, 0x19, 0x26, 0x5f, 0x05,
-- 0x31, 0x92, 0x49, 0x45, 0xc2, 0xcd, 0xd8, 0x55, 0x7d, 0x1d, 0xfc, 0xa8,
-- 0x21, 0x1b, 0x4d, 0xc9, 0x49, 0x71, 0x3a, 0x5d, 0xc6, 0x8d, 0x86, 0xb9,
-- 0xb6, 0x46, 0xc5, 0x6b, 0x9b, 0x49, 0xe4, 0x73, 0x60, 0xa1, 0x43, 0x04,
-- 0xdf, 0x5d, 0x86, 0xdc, 0xfc, 0x59, 0x2e, 0xa9, 0x90, 0x61, 0x78, 0xb1,
-- 0x2b, 0x84, 0x79, 0x51, 0x08, 0x1f, 0x0f, 0x7b, 0x0c, 0x2b, 0x1c, 0x5b,
-- 0x6c, 0xad, 0xf5, 0x15, 0x96, 0xce, 0x7d, 0xb2, 0xed, 0xb2, 0x09, 0x16,
-- 0xe0, 0x39, 0x2a, 0xea, 0x73, 0x67, 0x3b, 0x09, 0xc9, 0x23, 0x4b, 0x96,
-- 0xea, 0xcb, 0xe5, 0x3c, 0xba, 0xee, 0x7e, 0x94, 0x77, 0x69, 0xfe, 0xcf,
-- 0xb7, 0x71, 0xbd, 0x5d, 0xa6, 0xe5, 0x80, 0x24, 0xaf, 0xfb, 0x81, 0x59,
-- 0x57, 0x85, 0x22, 0x34, 0xf4, 0x58, 0x4c, 0x3f, 0x99, 0xaf, 0xb9, 0xd9,
-- 0x92, 0x16, 0x7d, 0x4a, 0x48, 0x01, 0x17, 0xe5, 0x54, 0x0f, 0x00, 0x4f,
-- 0x9d, 0x13, 0x71, 0xcd, 0xd8, 0xe9, 0x65, 0x1d, 0x8f, 0xe1, 0x6a, 0xbb,
-- 0xe8, 0x79, 0x14, 0x27, 0x08, 0x80, 0xad, 0x72, 0xab, 0x39, 0x4f, 0x53,
-- 0xe7, 0x12, 0x8b, 0xd6, 0xb3, 0x64, 0xe7, 0x73, 0x9e, 0xc7, 0xa7, 0xcd,
-- 0xe7, 0x4d, 0x51, 0x8e, 0x5d, 0xca, 0x2f, 0xd4, 0x85, 0x20, 0xff, 0x53,
-- 0xb2, 0x16, 0x50, 0xd8, 0x46, 0x56, 0xd7, 0xe2, 0x63, 0x11, 0xbf, 0xc7,
-- 0xfa, 0x89, 0xba, 0xd6, 0x61, 0x99, 0x82, 0xaf, 0x5b, 0x24, 0x24, 0xbe,
-- 0x6b, 0x74, 0x5d, 0xd8, 0xd6, 0x2a, 0xf1, 0x7b, 0xeb, 0xa5, 0xcb, 0x0f,
-- 0x95, 0x65, 0x60, 0xeb, 0x08, 0xd1, 0xda, 0x5d, 0x3e, 0x81, 0x54, 0xed,
-- 0xd1, 0xbc, 0x68, 0xbf, 0x84, 0xf8, 0x24, 0x6c, 0x1a, 0xee, 0x4b, 0xf8,
-- 0x3d, 0xdd, 0xc8, 0x54, 0x80, 0xe1, 0x65, 0x2d, 0x60, 0x5c, 0xd8, 0x80,
-- 0xfc, 0xc0, 0xe9, 0xc7, 0xde, 0x45, 0xc0, 0xaa, 0x14, 0xb3, 0xe6, 0x9e,
-- 0xef, 0x85, 0x43, 0xf9, 0xeb, 0x7a, 0x6a, 0x76, 0x85, 0xb7, 0x8e, 0xb0,
-- 0x9b, 0x73, 0x66, 0x5c, 0x91, 0x60, 0xda, 0x3b, 0xdb, 0x24, 0xbf, 0x4e,
-- 0x8b, 0x76, 0x85, 0xee, 0x58, 0x29, 0xc5, 0xb4, 0x06, 0x58, 0x9d, 0x9d,
-- 0xed, 0x6f, 0x57, 0xaf, 0x3a, 0x90, 0xca, 0x1f, 0x7c, 0x79, 0xf7, 0xe9,
-- 0x03, 0x9b, 0x76, 0x52, 0x42, 0x2f, 0xcf, 0x2c, 0x1c, 0x12, 0x82, 0xa0,
-- 0x77, 0xc2, 0x44, 0xdb, 0x46, 0x84, 0x9f, 0x5d, 0xa5, 0x3c, 0xfc, 0x87,
-- 0x46, 0x6f, 0x29, 0x1b, 0xad, 0xa1, 0xbc, 0xd5, 0x00, 0x6d, 0xf9, 0xb2,
-- 0x62, 0x0b, 0xd9, 0x02, 0x60, 0x68, 0x5e, 0x8d, 0x75, 0xd9, 0xde, 0x02,
-- 0x37, 0x11, 0xbc, 0x2d, 0x9c, 0xb3, 0xdf, 0x64, 0x12, 0x46, 0x3d, 0x65,
-- 0x76, 0xb5, 0x14, 0x3c, 0x87, 0x42, 0xd4, 0x7e, 0x86, 0xfe, 0xd5, 0xf3,
-- 0x4a, 0xbc, 0x99, 0x23, 0x89, 0x84, 0x9e, 0xc0, 0x78, 0xc7, 0xa9, 0x89,
-- 0xac, 0x22, 0x72, 0xb4, 0x2f, 0x06, 0xb6, 0xcf, 0x8e, 0xd9, 0x21, 0x06,
-- 0x6e, 0xb0, 0x96, 0xb4, 0xab, 0xf7, 0x0a, 0xb6, 0xdd, 0x10, 0x89, 0xb8,
-- 0x42, 0x28, 0x8e, 0xd9, 0x73, 0xd6, 0x17, 0x3b, 0xc6, 0x6a, 0xf1, 0x10,
-- 0xa0, 0x81, 0xbe, 0x52, 0x2d, 0x5a, 0x72, 0x5d, 0x31, 0xc7, 0xaf, 0x0c,
-- 0x63, 0x50, 0xf0, 0xc8, 0xd9, 0xee, 0x7f, 0x70, 0xf2, 0xee, 0xcd, 0xd1,
-- 0xd7, 0x0e, 0x78, 0x47, 0x98, 0xb8, 0x55, 0x15, 0x45, 0x9b, 0x62, 0x49,
-- 0x0e, 0x9d, 0xde, 0x5a, 0xb5, 0x4e, 0x03, 0x71, 0x89, 0x3d, 0x7d, 0x08,
-- 0x3f, 0x00, 0x03, 0x99, 0x3f, 0x61, 0x5b, 0xb9, 0x00, 0x59, 0x54, 0x9b,
-- 0xde, 0xf2, 0xd0, 0x02, 0x06, 0x93, 0x84, 0x8d, 0xb4, 0xac, 0x97, 0x0b,
-- 0x17, 0x4f, 0x18, 0x54, 0xbd, 0x53, 0xa4, 0x62, 0xcb, 0x14, 0x5f, 0x2e,
-- 0x84, 0x35, 0x69, 0xbe, 0x67, 0xc3, 0xb0, 0x2b, 0x77, 0x00, 0x5b, 0x16,
-- 0x14, 0xf9, 0x43, 0x2f, 0x80, 0x28, 0x44, 0x67, 0xca, 0xf8, 0x86, 0x61,
-- 0xe8, 0xbc, 0xb9, 0x72, 0x26, 0xa8, 0x1c, 0x18, 0xd6, 0x5d, 0x9e, 0x89,
-- 0x66, 0xc6, 0xf3, 0x46, 0xb9, 0x5c, 0x17, 0x97, 0xe3, 0x02, 0x81, 0xbd,
-- 0xab, 0xa8, 0x72, 0xf5, 0x7f, 0x5d, 0xa8, 0x92, 0x65, 0x99, 0xa6, 0xf0,
-- 0x5a, 0xc2, 0xed, 0x89, 0x4f, 0x5e, 0xb1, 0x87, 0x66, 0x8f, 0xf1, 0xba,
-- 0x67, 0x02, 0xdf, 0x15, 0x66, 0x87, 0x2a, 0x97, 0xf4, 0xb8, 0xda, 0x47,
-- 0x97, 0x41, 0xc2, 0x99, 0x84, 0x0c, 0x1a, 0xd1, 0x89, 0xb9, 0x98, 0x6d,
-- 0x2d, 0xeb, 0x7f, 0x5c, 0x1f, 0x54, 0xf7, 0xb3, 0x51, 0x31, 0xb5, 0x1c,
-- 0x0c, 0x87, 0xef, 0x60, 0x0f, 0x85, 0x55, 0xa8, 0x12, 0x71, 0xda, 0xd6,
-- 0x81, 0x85, 0xd2, 0x87, 0x4d, 0xf9, 0xf1, 0x4b, 0x25, 0x17, 0x78, 0x8a,
-- 0x6c, 0x16, 0x0e, 0x6c, 0x24, 0x9b, 0x8f, 0xa7, 0x85, 0x52, 0x35, 0xe7,
-- 0x7f, 0x63, 0xa5, 0x9a, 0x53, 0x67, 0xe7, 0x5f, 0xb1, 0x64, 0x63, 0x07,
-- 0xaa, 0x34, 0x90, 0xb8, 0xc3, 0xc6, 0xe1, 0xef, 0x6d, 0x82, 0xfc, 0xb6,
-- 0x7c, 0xa1, 0x01, 0xfa, 0x86, 0xd2, 0x42, 0x0d, 0x49, 0x59, 0x07, 0x1a,
-- 0xea, 0xcf, 0x62, 0x5b, 0x14, 0x17, 0xe0, 0x8f, 0xd6, 0xb9, 0x3d, 0xda,
-- 0x5a, 0x7a, 0xa2, 0xa7, 0xb4, 0xbc, 0x52, 0x4c, 0x34, 0x75, 0xaa, 0x41,
-- 0x49, 0x74, 0xc5, 0x36, 0x9c, 0x8d, 0x92, 0x85, 0x12, 0x17, 0x40, 0x03,
-- 0xf1, 0x69, 0x29, 0x29, 0x7f, 0x9a, 0x10, 0x25, 0xd6, 0x49, 0x47, 0x88,
-- 0x01, 0xc7, 0xf9, 0xa3, 0x0b, 0x4b, 0x49, 0xfd, 0x5d, 0x66, 0x35, 0x00,
-- 0xbc, 0xa9, 0x56, 0x2f, 0xb3, 0xe0, 0x35, 0xb6, 0xe7, 0x41, 0x13, 0xce,
-- 0xd4, 0x86, 0x22, 0x5d, 0x41, 0x96, 0x60, 0x38, 0x40, 0xe4, 0x01, 0x65,
-- 0x95, 0x6f, 0x42, 0xbe, 0x7f, 0xa5, 0xc5, 0x7f, 0xe8, 0x3c, 0x2b, 0x7e,
-- 0x89, 0x82, 0xb5, 0x7d, 0xbe, 0xad, 0x96, 0xb8, 0x5a, 0x23, 0x57, 0xab,
-- 0x64, 0xff, 0xec, 0x90, 0x24, 0xdb, 0xab, 0x39, 0x20, 0x24, 0xe6, 0xb5,
-- 0xe5, 0xbc, 0x65, 0x73, 0xad, 0x36, 0x34, 0xb7, 0xf3, 0xc1, 0x1d, 0xde,
-- 0x05, 0x6f, 0x32, 0x31, 0x69, 0x8c, 0x80, 0xa4, 0x57, 0x7b, 0x92, 0x1b,
-- 0x1b, 0xf2, 0x2a, 0xb8, 0x0e, 0xa3, 0x18, 0x08, 0x49, 0xb1, 0xb7, 0x84,
-- 0xba, 0x2a, 0x0c, 0x75, 0xf5, 0x34, 0x62, 0xeb, 0x21, 0xdc, 0xaa, 0xad,
-- 0x35, 0x4e, 0xb5, 0xcf, 0x4a, 0xf8, 0x9b, 0xa1, 0x20, 0x6a, 0x5f, 0x0d,
-- 0x0f, 0xa8, 0x27, 0xa7, 0x7e, 0xb7, 0xf5, 0xe8, 0x6f, 0xb8, 0x67, 0x58,
-- 0x16, 0x69, 0xcb, 0x05, 0x99, 0x0b, 0xb6, 0x17, 0x43, 0xf6, 0x24, 0x10,
-- 0x7e, 0x25, 0x43, 0x0f, 0xc5, 0xbf, 0x61, 0xa3, 0x66, 0xe1, 0x27, 0xad,
-- 0x34, 0x1b, 0x4a, 0xd5, 0x81, 0x89, 0x9e, 0x55, 0xa6, 0x0a, 0x8e, 0x1c,
-- 0x1e, 0x31, 0xe6, 0x8f, 0x14, 0xff, 0x6d, 0xf0, 0xa7, 0x4e, 0x33, 0xef,
-- 0x1f, 0xdd, 0x6c, 0xfd, 0x18, 0xdc, 0x97, 0xfc, 0xd1, 0x2b, 0x87, 0x8b,
-- 0x86, 0x22, 0xe6, 0xdc, 0x11, 0x58, 0x2a, 0xdc, 0xa7, 0xfc, 0x0b, 0x3e,
-- 0x46, 0x00, 0x9c, 0x61, 0x4b, 0x36, 0x60, 0x8c, 0xb4, 0xbe, 0x48, 0x38,
-- 0x10, 0xf1, 0xf1, 0x81, 0x43, 0x8f, 0x42, 0xd1, 0x78, 0xf0, 0xed, 0x96,
-- 0x15, 0x0c, 0x65, 0x53, 0x0e, 0xe7, 0xf7, 0xda, 0x81, 0xaf, 0xb2, 0x46,
-- 0x85, 0x51, 0x97, 0x34, 0xd4, 0x1b, 0xf4, 0x68, 0x2d, 0xd6, 0xa7, 0x53,
-- 0xcf, 0xf0, 0xed, 0x31, 0xde, 0x55, 0xe4, 0xd7, 0x79, 0x81, 0x49, 0x79,
-- 0x17, 0x97, 0x2e, 0xb8, 0x6f, 0x64, 0x3b, 0x70, 0xed, 0x27, 0x4e, 0x06,
-- 0x72, 0x30, 0x54, 0xc8, 0x18, 0x41, 0xbc, 0xc0, 0x6d, 0x5e, 0x99, 0x1f,
-- 0x92, 0x68, 0x7b, 0x2c, 0xe1, 0x11, 0xb5, 0xe0, 0x05, 0x64, 0xf5, 0x38,
-- 0x58, 0xca, 0x6c, 0x7c, 0x5d, 0x48, 0x78, 0x2d, 0x2d, 0x5a, 0x90, 0x88,
-- 0xd9, 0x4b, 0xfe, 0x43, 0x69, 0xe0, 0x5b, 0x9f, 0xbf, 0xc7, 0x84, 0x30,
-- 0x14, 0xd4, 0xbf, 0xa1, 0x27, 0x88, 0xc3, 0x1f, 0x2e, 0xce, 0xf6, 0x93,
-- 0x6f, 0x0e, 0xf7, 0x5f, 0x1f, 0x9e, 0x9d, 0xb7, 0x2e, 0x7d, 0x8d, 0x04,
-- 0x11, 0x09, 0x8d, 0xed, 0xc1, 0x10, 0x8d, 0x0d, 0x17, 0x40, 0x43, 0xf8,
-- 0x8d, 0xeb, 0x11, 0xf1, 0xf0, 0x41, 0xa2, 0xf3, 0xc1, 0x0a, 0x91, 0x38,
-- 0x0e, 0x00, 0x11, 0x5b, 0x81, 0xd9, 0xb8, 0x36, 0xc6, 0xc4, 0xa1, 0x38,
-- 0x9e, 0xc1, 0xac, 0xe7, 0x61, 0xf2, 0x8c, 0x47, 0x96, 0xf3, 0x97, 0xc9,
-- 0xa4, 0xb0, 0xbc, 0xc0, 0xe6, 0xce, 0x7d, 0xe3, 0xd3, 0xb1, 0x03, 0xb6,
-- 0xa5, 0x97, 0x8c, 0x1a, 0x10, 0x7b, 0x3f, 0x0c, 0xa8, 0xdf, 0x01, 0x2d,
-- 0xfe, 0x80, 0x11, 0x01, 0xef, 0xb3, 0xaa, 0xd7, 0xb2, 0x06, 0x36, 0xbb,
-- 0x5f, 0x93, 0x7a, 0x37, 0xd1, 0x49, 0xfa, 0xa6, 0xb3, 0x25, 0x3e, 0x5d,
-- 0x5c, 0x12, 0x37, 0xd2, 0x20, 0x70, 0xa9, 0x06, 0x42, 0xb2, 0x9e, 0xa0,
-- 0x28, 0xd3, 0x45, 0x63, 0x95, 0xbc, 0x9a, 0xa9, 0xa1, 0x61, 0x18, 0x88,
-- 0x4e, 0x01, 0xb2, 0x0e, 0x9d, 0x3d, 0xb9, 0xd4, 0x61, 0x17, 0x31, 0xb0,
-- 0x5a, 0x1a, 0x96, 0x3e, 0x14, 0xde, 0x0f, 0xf0, 0x85, 0x68, 0x38, 0x7e,
-- 0xd5, 0x70, 0x95, 0xaa, 0x5d, 0x54, 0x81, 0x8e, 0xb5, 0x39, 0x1e, 0x83,
-- 0xa3, 0x79, 0x8b, 0xe2, 0xe7, 0x2e, 0xad, 0x06, 0x83, 0xbe, 0x2b, 0x01,
-- 0x61, 0xac, 0xd4, 0xc3, 0xd4, 0x29, 0xc5, 0x1c, 0xa5, 0xa2, 0x9b, 0x30,
-- 0xb6, 0x20, 0x2d, 0x28, 0x24, 0x66, 0x14, 0x8c, 0x42, 0x20, 0xb9, 0x7b,
-- 0x2e, 0x4b, 0xbe, 0x29, 0x2a, 0xdc, 0x05, 0xf1, 0xe3, 0x7c, 0xc9, 0x77,
-- 0x2d, 0x3f, 0xde, 0x50, 0x57, 0x97, 0x83, 0xe4, 0x04, 0x82, 0x2d, 0xd8,
-- 0xd7, 0xe9, 0xfe, 0xc5, 0x37, 0x70, 0xb4, 0x82, 0x84, 0x5f, 0x03, 0xd0,
-- 0xc4, 0xdc, 0x6b, 0x71, 0x76, 0x96, 0x53, 0xe0, 0x44, 0xfe, 0x35, 0x18,
-- 0x41, 0x93, 0x27, 0xe1, 0xc8, 0xcb, 0x25, 0x26, 0x69, 0x2a, 0x05, 0x34,
-- 0xc1, 0xa3, 0x1b, 0x45, 0xcc, 0x10, 0x05, 0xef, 0x52, 0xef, 0x5c, 0xe8,
-- 0xe5, 0xba, 0xe4, 0xa9, 0xaf, 0xcb, 0x9c, 0x40, 0xf4, 0x2c, 0xcc, 0xb1,
-- 0xc6, 0x13, 0xe2, 0xbc, 0xe2, 0x0b, 0x4e, 0x44, 0x16, 0x5f, 0xd4, 0xa4,
-- 0xe8, 0x46, 0xe9, 0x0b, 0x8e, 0xf4, 0x97, 0xb3, 0xfb, 0x61, 0x8c, 0x8f,
-- 0x93, 0x7c, 0xb5, 0xac, 0x9b, 0x6c, 0xa5, 0x85, 0x36, 0xeb, 0x24, 0xcb,
-- 0xb2, 0x28, 0xea, 0x60, 0x0c, 0x90, 0x7e, 0xd2, 0x5a, 0x4f, 0xb4, 0xc0,
-- 0x31, 0xca, 0x58, 0xb8, 0xa9, 0xb9, 0xca, 0xdd, 0xa1, 0x60, 0x98, 0x8e,
-- 0xaa, 0x62, 0xba, 0xac, 0x83, 0x40, 0xec, 0x5f, 0x37, 0xe6, 0x60, 0xd0,
-- 0x1b, 0x47, 0x43, 0x83, 0xa6, 0xe4, 0xfa, 0xc7, 0x24, 0x84, 0x93, 0xa6,
-- 0x4f, 0xe2, 0x25, 0xfc, 0x8e, 0x65, 0x31, 0x6f, 0x56, 0xda, 0x42, 0xcc,
-- 0xf7, 0xe6, 0xda, 0xda, 0xb9, 0x6d, 0x36, 0x83, 0x83, 0xc6, 0x9b, 0xfe,
-- 0x3d, 0xa4, 0x49, 0x1e, 0x83, 0xf8, 0x0d, 0xc6, 0xf4, 0x8b, 0x41, 0xb3,
-- 0x65, 0xb2, 0xa7, 0x60, 0xe1, 0xb2, 0xc7, 0x79, 0xd5, 0x9c, 0x14, 0xbe,
-- 0x72, 0x9e, 0x0b, 0x4b, 0x35, 0xbb, 0x28, 0x0c, 0xf5, 0x5c, 0x3d, 0x77,
-- 0x9e, 0x20, 0x1a, 0xc9, 0xea, 0x9d, 0x78, 0xbe, 0x7c, 0x09, 0x58, 0x59,
-- 0x56, 0x17, 0x99, 0xcb, 0x83, 0xdc, 0xfa, 0xdf, 0x5b, 0x49, 0x3f, 0xd1,
-- 0x8a, 0xd9, 0x1d, 0x18, 0x44, 0xff, 0x17, 0x62, 0xb0, 0x14, 0x4c, 0x95,
-- 0xdb, 0x6c, 0x21, 0x90, 0x0e, 0x49, 0x85, 0xba, 0x2e, 0xc7, 0x9e, 0xfa,
-- 0x49, 0x3a, 0xc8, 0xee, 0x58, 0x7f, 0x31, 0x1d, 0x41, 0xd1, 0x3c, 0xa4,
-- 0x32, 0xaa, 0xc3, 0x47, 0x02, 0x1a, 0xc6, 0xa5, 0xb3, 0xea, 0x71, 0x91,
-- 0x42, 0xa9, 0xd8, 0x27, 0x62, 0x3d, 0x0a, 0xd6, 0x98, 0x07, 0x55, 0x12,
-- 0xde, 0x9d, 0xde, 0x5e, 0x25, 0x55, 0x21, 0xff, 0x5a, 0xfe, 0x91, 0xc6,
-- 0x78, 0x29, 0xf9, 0x07, 0x85, 0xd0, 0x82, 0x0a, 0xa2, 0x16, 0x7c, 0x2a,
-- 0x81, 0x75, 0xe6, 0x99, 0xb4, 0x41, 0x9a, 0x14, 0xc0, 0x8e, 0x4b, 0x80,
-- 0x30, 0x2a, 0x30, 0x08, 0x07, 0x95, 0x31, 0x56, 0xac, 0xe4, 0x6f, 0x73,
-- 0x89, 0x3b, 0xd3, 0x64, 0xec, 0x4a, 0xb5, 0x8c, 0x8e, 0xb5, 0xb0, 0xe0,
-- 0xb0, 0x0c, 0x5f, 0xef, 0x7e, 0xe4, 0xc8, 0xc3, 0x49, 0x77, 0x97, 0x32,
-- 0x8c, 0x99, 0x17, 0x09, 0x6c, 0x4a, 0x5a, 0x24, 0x53, 0xe2, 0x38, 0xc2,
-- 0xd8, 0x14, 0x1f, 0xbc, 0x79, 0xc5, 0x09, 0x1f, 0x6a, 0x92, 0x52, 0xa8,
-- 0x11, 0xd8, 0xbf, 0xae, 0x73, 0x0d, 0x31, 0x95, 0x55, 0x6f, 0x96, 0x20,
-- 0x84, 0x85, 0x8f, 0xa3, 0x0b, 0xbc, 0x83, 0xd5, 0xc5, 0x40, 0x0c, 0xe3,
-- 0x03, 0x33, 0x74, 0x18, 0xa0, 0x7a, 0x89, 0x1c, 0x85, 0xe9, 0xe5, 0x12,
-- 0x90, 0xe1, 0xc2, 0x9e, 0x3f, 0xb1, 0xf7, 0xb0, 0x4b, 0x8e, 0x67, 0x9d,
-- 0x27, 0x92, 0x4b, 0xa2, 0x48, 0x6e, 0x7c, 0xa1, 0xec, 0xee, 0x40, 0x31,
-- 0x95, 0xf0, 0x0d, 0xa0, 0x6a, 0x5a, 0x0b, 0x06, 0x67, 0xd6, 0x5e, 0xfc,
-- 0xcd, 0xbe, 0xae, 0x92, 0x4b, 0xbe, 0x57, 0x6f, 0xb3, 0xc8, 0x85, 0x81,
-- 0xdf, 0xa9, 0x51, 0x6a, 0x4b, 0x12, 0xba, 0xab, 0xba, 0x5c, 0x8e, 0x1b,
-- 0x08, 0x7a, 0xa0, 0x88, 0x86, 0x97, 0xde, 0xad, 0x71, 0x11, 0xea, 0xf6,
-- 0x47, 0xa7, 0xaa, 0xde, 0x8b, 0xf6, 0xc1, 0x23, 0xdb, 0x48, 0x1b, 0xf9,
-- 0x2e, 0xae, 0x0a, 0x63, 0xd8, 0xef, 0xa6, 0xa3, 0xb2, 0xc1, 0xa9, 0x4b,
-- 0xae, 0x6f, 0xd5, 0xd2, 0xe6, 0x44, 0x85, 0xe0, 0xee, 0x55, 0x41, 0x0c,
-- 0x82, 0x47, 0x99, 0x28, 0x24, 0x22, 0xc4, 0x1a, 0x36, 0x59, 0xae, 0x39,
-- 0xd8, 0x42, 0x1a, 0xd2, 0x40, 0xa3, 0x56, 0xc5, 0x11, 0xbc, 0x45, 0x0b,
-- 0x69, 0xb5, 0x54, 0x5c, 0x11, 0xa1, 0xca, 0x43, 0x1f, 0xb6, 0x42, 0x56,
-- 0x81, 0xa0, 0xe4, 0xe4, 0x43, 0xc5, 0x72, 0xd3, 0xf5, 0x1b, 0xba, 0xda,
-- 0xf6, 0xda, 0x43, 0x5b, 0x9c, 0x88, 0xef, 0xc6, 0x53, 0x41, 0x2a, 0x89,
-- 0xe8, 0xe8, 0xb5, 0xd9, 0x54, 0xc1, 0x72, 0xb0, 0x36, 0xac, 0xd9, 0xd8,
-- 0x26, 0xd1, 0xba, 0x5a, 0x17, 0x34, 0x04, 0x9e, 0xf1, 0xfa, 0x34, 0xdb,
-- 0x5e, 0x0f, 0xaa, 0x20, 0x6d, 0x48, 0xfc, 0x7f, 0x01, 0xed, 0xc7, 0x61,
-- 0x09, 0x8a, 0xf5, 0x82, 0xe3, 0xdc, 0x36, 0x3b, 0x86, 0x42, 0x4d, 0xfc,
-- 0xda, 0xc1, 0xec, 0xbc, 0xd8, 0x1d, 0xee, 0x3c, 0xff, 0x7c, 0xb8, 0x3d,
-- 0xdc, 0xd9, 0x66, 0xfe, 0xc2, 0x43, 0x09, 0x06, 0x27, 0xeb, 0xd2, 0xd1,
-- 0x55, 0xe3, 0xbd, 0xb8, 0xcf, 0x77, 0x87, 0x17, 0xdf, 0x9f, 0x9c, 0x7d,
-- 0x9b, 0x1c, 0xbd, 0xbb, 0x38, 0x3c, 0x7b, 0xb3, 0x7f, 0xf0, 0xa9, 0xf0,
-- 0xe8, 0xa1, 0xd9, 0x3a, 0x28, 0x04, 0x9c, 0xf9, 0x85, 0x89, 0x6d, 0x83,
-- 0x7e, 0xcd, 0xb2, 0xfa, 0x7a, 0x7b, 0x6f, 0xe7, 0x41, 0x00, 0xe5, 0x0e,
-- 0xf3, 0xa0, 0x7f, 0xdf, 0x26, 0xb5, 0xc3, 0x93, 0x5a, 0xdd, 0x8a, 0x43,
-- 0x4e, 0x3c, 0x97, 0x30, 0x2b, 0x17, 0xa2, 0x0b, 0x36, 0x8f, 0x3a, 0x33,
-- 0xf9, 0xa8, 0x4c, 0xcd, 0x30, 0x35, 0x12, 0x14, 0x57, 0xc9, 0xb4, 0x55,
-- 0x0c, 0x18, 0x0d, 0x47, 0x57, 0x9e, 0xbb, 0x26, 0x45, 0x77, 0x6b, 0x35,
-- 0xa7, 0x08, 0x28, 0xeb, 0x04, 0x22, 0x9e, 0x71, 0x65, 0x4d, 0x63, 0x63,
-- 0x6a, 0xd1, 0x3a, 0x90, 0x82, 0x07, 0x38, 0x71, 0x29, 0x23, 0x0e, 0x90,
-- 0x00, 0x51, 0x10, 0x26, 0xa7, 0x63, 0xac, 0xcd, 0xba, 0xc9, 0x61, 0x24,
-- 0x6d, 0x0b, 0x11, 0xb5, 0xb2, 0x10, 0x67, 0x4c, 0xac, 0x61, 0x1a, 0x3d,
-- 0xd0, 0x81, 0xe0, 0x34, 0x04, 0xa3, 0x91, 0xae, 0x20, 0x50, 0x19, 0x34,
-- 0x77, 0x13, 0xcf, 0x57, 0xee, 0x28, 0xa4, 0x51, 0x88, 0xfc, 0x67, 0x35,
-- 0x04, 0xb8, 0xf5, 0xaa, 0x81, 0x21, 0x98, 0x48, 0xed, 0x9f, 0xf0, 0x75,
-- 0x11, 0xb5, 0x11, 0xa8, 0x39, 0x29, 0xd3, 0x3b, 0x14, 0xb0, 0xc8, 0x3d,
-- 0x22, 0xe8, 0x5a, 0xd2, 0x28, 0x60, 0xc4, 0x82, 0x93, 0x5f, 0xf3, 0xe4,
-- 0xf4, 0xf0, 0xed, 0xc0, 0xca, 0xae, 0xd2, 0xef, 0x62, 0x8c, 0x32, 0xf8,
-- 0x47, 0x49, 0xf3, 0x59, 0x64, 0x73, 0x0b, 0xab, 0x01, 0x4f, 0xd4, 0x38,
-- 0xa0, 0x70, 0x02, 0x7c, 0x68, 0x1c, 0x40, 0xa4, 0x46, 0x8f, 0x5a, 0xf8,
-- 0xa5, 0x43, 0x30, 0x6d, 0xa0, 0x66, 0xf2, 0x7e, 0x6a, 0xec, 0x72, 0xb2,
-- 0xe1, 0xe2, 0x75, 0xb9, 0x3f, 0x04, 0xa5, 0x22, 0x66, 0xc0, 0x85, 0x09,
-- 0x14, 0x96, 0x84, 0x7d, 0xfa, 0xed, 0xc1, 0xf9, 0x1f, 0x77, 0x76, 0x75,
-- 0x38, 0x9b, 0x43, 0x8f, 0xaf, 0x1b, 0xe5, 0xe7, 0x83, 0x5d, 0x87, 0x63,
-- 0xb4, 0x6c, 0x6b, 0x1c, 0x70, 0x6c, 0xc6, 0x86, 0xcb, 0x11, 0xda, 0x6c,
-- 0x24, 0x09, 0xad, 0x49, 0xf5, 0x6f, 0x13, 0x31, 0x5d, 0x69, 0x54, 0x76,
-- 0x89, 0xa0, 0x80, 0x8e, 0x96, 0xb0, 0xa9, 0x5d, 0xd4, 0x5f, 0x3a, 0xb7,
-- 0x8f, 0xa4, 0x65, 0x6d, 0x0d, 0xe9, 0xe4, 0x3e, 0xb2, 0xa5, 0xbd, 0xe7,
-- 0xbc, 0xde, 0xfe, 0x5b, 0x86, 0x71, 0xd5, 0x9b, 0xdd, 0xf0, 0x7a, 0x7c,
-- 0x37, 0x38, 0x00, 0x1a, 0xc8, 0x3e, 0xb1, 0x22, 0x59, 0x73, 0x5f, 0x74,
-- 0x82, 0x9f, 0x3e, 0xa1, 0x8d, 0xa2, 0x93, 0x25, 0x10, 0x0e, 0xcc, 0x14,
-- 0x8a, 0x29, 0xab, 0x2e, 0xee, 0x91, 0xd7, 0x25, 0x57, 0xf7, 0x58, 0x48,
-- 0x48, 0xe9, 0xbb, 0x61, 0xf2, 0x4d, 0x36, 0xe7, 0x1c, 0x7a, 0x0e, 0xbe,
-- 0xb3, 0x34, 0x2c, 0x84, 0x08, 0x72, 0x95, 0x3e, 0x54, 0x2d, 0x3b, 0xce,
-- 0x52, 0x85, 0xcc, 0x24, 0x5e, 0x57, 0x89, 0x86, 0x6b, 0x15, 0x7b, 0x52,
-- 0x0e, 0xd4, 0x53, 0x7c, 0x4f, 0x87, 0x7b, 0xc1, 0x0f, 0x48, 0x03, 0x1b,
-- 0x4d, 0xdc, 0x4b, 0x00, 0xe8, 0xa3, 0x39, 0x3d, 0xe6, 0xf0, 0x35, 0xa9,
-- 0x55, 0xf9, 0x1a, 0xe0, 0xcf, 0x6c, 0x2d, 0x14, 0x8d, 0xcb, 0x33, 0x95,
-- 0x49, 0x79, 0xcd, 0xa6, 0x8f, 0x8a, 0xae, 0x9b, 0x74, 0x3e, 0xbe, 0x1f,
-- 0x4e, 0x48, 0x96, 0x65, 0xe3, 0xd9, 0x70, 0x79, 0xb3, 0x15, 0x1c, 0x53,
-- 0x66, 0xf9, 0xd7, 0x02, 0x17, 0xd0, 0x34, 0x7c, 0x5b, 0x39, 0xd8, 0x18,
-- 0xd9, 0x2b, 0x6d, 0x9c, 0x09, 0x26, 0x09, 0x4b, 0xfc, 0x97, 0xe3, 0xb9,
-- 0x12, 0x03, 0xeb, 0x30, 0x71, 0xb8, 0xc3, 0xdc, 0xc2, 0x70, 0x91, 0xcd,
-- 0xf6, 0x5c, 0x62, 0xb2, 0xf1, 0x07, 0xad, 0x61, 0xe0, 0x14, 0x8b, 0xc0,
-- 0x48, 0x3b, 0xcf, 0xae, 0xa6, 0x2a, 0x50, 0x84, 0xaa, 0x8b, 0xc7, 0x91,
-- 0x8e, 0xb3, 0x41, 0x44, 0xe1, 0xd1, 0x7a, 0x32, 0x90, 0xd8, 0x89, 0x0e,
-- 0x6b, 0x8d, 0xae, 0x95, 0x87, 0x51, 0x92, 0xdd, 0x37, 0xa2, 0x20, 0x22,
-- 0x80, 0x40, 0x46, 0xe9, 0x6d, 0x31, 0xf1, 0x58, 0x50, 0x92, 0xba, 0x9f,
-- 0x18, 0xa7, 0x15, 0x14, 0x02, 0xd0, 0x71, 0x0d, 0x90, 0x86, 0xf3, 0xd3,
-- 0xaa, 0xae, 0xca, 0x59, 0xa1, 0xaf, 0x6f, 0x9f, 0xb0, 0xc5, 0xfb, 0xe2,
-- 0xf8, 0xdc, 0xbc, 0x22, 0xf3, 0xec, 0x2e, 0x20, 0x2d, 0x01, 0xca, 0x57,
-- 0xfa, 0x63, 0x03, 0x90, 0x20, 0x1e, 0x03, 0xf8, 0x00, 0x23, 0x11, 0xae,
-- 0xe0, 0xdd, 0x64, 0x3e, 0x0f, 0xc2, 0x16, 0x41, 0x23, 0x8a, 0x79, 0x28,
-- 0x56, 0x1c, 0x4a, 0x84, 0x21, 0x07, 0xfa, 0xc2, 0xd0, 0x7a, 0x24, 0x2c,
-- 0x3d, 0xe9, 0x27, 0x83, 0x5d, 0x40, 0xe9, 0xec, 0x34, 0x17, 0x31, 0xad,
-- 0x05, 0xc5, 0x8f, 0xdb, 0xa0, 0x96, 0xac, 0x15, 0x65, 0x07, 0x1b, 0x4a,
-- 0xd2, 0xb7, 0xf4, 0x3e, 0xff, 0xb3, 0xab, 0x13, 0xba, 0xdd, 0x41, 0xf0,
-- 0xb6, 0xc0, 0x4a, 0x4e, 0xef, 0x63, 0x91, 0x61, 0xf7, 0xc1, 0x5d, 0x45,
-- 0x9a, 0xc4, 0x5d, 0xee, 0xf0, 0x9d, 0x05, 0xe2, 0x1f, 0xa6, 0x50, 0x45,
-- 0xec, 0xb4, 0x01, 0xd0, 0x12, 0xaa, 0x91, 0x7b, 0x9e, 0xdc, 0xee, 0x9a,
-- 0xaf, 0x99, 0xbf, 0xb1, 0x75, 0x13, 0x63, 0xbd, 0x67, 0x22, 0x51, 0x06,
-- 0x23, 0x07, 0xbc, 0x05, 0x54, 0xcb, 0x09, 0x50, 0x44, 0xb3, 0xc4, 0x45,
-- 0x1a, 0x5c, 0xa6, 0x98, 0xab, 0x59, 0x41, 0xb2, 0xdf, 0xd3, 0xb9, 0x6c,
-- 0x06, 0xc9, 0xc1, 0x3e, 0xcc, 0x09, 0x41, 0xe0, 0x41, 0x70, 0xe4, 0xd1,
-- 0xdc, 0xe5, 0x4c, 0xa8, 0x29, 0x1f, 0x08, 0x7a, 0xd8, 0xfe, 0xeb, 0x5c,
-- 0x0c, 0x13, 0x08, 0x3b, 0xc5, 0x75, 0x4e, 0x27, 0x7f, 0x3d, 0xa1, 0xc3,
-- 0xb4, 0x64, 0x8e, 0x5f, 0xbb, 0x4a, 0x55, 0xe7, 0x82, 0xbc, 0xb9, 0x1e,
-- 0xb2, 0xb9, 0xc1, 0x17, 0x3c, 0x95, 0x6a, 0xdd, 0xcf, 0x5d, 0x81, 0xc7,
-- 0x9b, 0x13, 0x51, 0x3f, 0x87, 0xd5, 0x66, 0x3a, 0x2d, 0xad, 0x04, 0xf5,
-- 0xfa, 0xe1, 0x47, 0x96, 0x71, 0xd6, 0xb5, 0x27, 0xf9, 0x5a, 0xd2, 0xfb,
-- 0xb1, 0x46, 0xa7, 0x47, 0xef, 0xa4, 0xa8, 0xb2, 0x3b, 0x0b, 0x19, 0x23,
-- 0x23, 0xae, 0x49, 0x3d, 0x70, 0x8c, 0x27, 0x55, 0x08, 0x89, 0x44, 0x0c,
-- 0x47, 0x4c, 0x33, 0x4c, 0xe3, 0xb9, 0xf6, 0x75, 0xb6, 0x94, 0xde, 0xd7,
-- 0xf9, 0x9e, 0xab, 0xaa, 0xe9, 0x7a, 0xab, 0x50, 0xa8, 0xdb, 0x93, 0xd6,
-- 0x85, 0xe2, 0x2c, 0x52, 0xe3, 0x49, 0x58, 0x66, 0x5d, 0x5b, 0x69, 0xf0,
-- 0xb9, 0x7e, 0x2b, 0xe9, 0x31, 0x34, 0x85, 0xff, 0x31, 0x19, 0x6e, 0x51,
-- 0x87, 0xd5, 0x96, 0xbd, 0xb8, 0xb8, 0x19, 0x57, 0x74, 0xc3, 0x71, 0x86,
-- 0xef, 0x4f, 0x0e, 0x1d, 0x9e, 0x47, 0x3c, 0xf9, 0x25, 0x19, 0x8c, 0xa7,
-- 0x98, 0x5f, 0x82, 0x92, 0xc4, 0x3f, 0xd1, 0xce, 0xf3, 0x13, 0xbf, 0xb8,
-- 0x3d, 0x7c, 0x93, 0xf3, 0x79, 0xfb, 0xd8, 0xb7, 0xa9, 0x9f, 0x88, 0xc2,
-- 0x20, 0xf0, 0xb3, 0xc9, 0xfe, 0xe4, 0x96, 0xf3, 0xef, 0x26, 0xfa, 0x27,
-- 0xcf, 0xe7, 0x70, 0x8e, 0x62, 0x8e, 0x98, 0x69, 0x3a, 0x92, 0xfa, 0xcd,
-- 0xdf, 0xe5, 0xa4, 0x74, 0x1c, 0xb4, 0xe4, 0x0b, 0x4e, 0x05, 0xe4, 0x01,
-- 0xe2, 0xad, 0xe0, 0x4b, 0xcb, 0xeb, 0xe8, 0x6b, 0xfa, 0x82, 0x8f, 0xfc,
-- 0x63, 0xee, 0xcc, 0x5b, 0x37, 0x4c, 0xbe, 0x62, 0x1f, 0x67, 0x99, 0x05,
-- 0xe0, 0xac, 0x7a, 0xf1, 0x49, 0xd1, 0x33, 0xde, 0x8c, 0x54, 0xa0, 0x28,
-- 0x86, 0x6e, 0x26, 0x51, 0x3a, 0x8c, 0x9b, 0x93, 0xfb, 0xa6, 0x39, 0x39,
-- 0x8c, 0xcb, 0xb2, 0xdb, 0x69, 0x2a, 0x96, 0x3a, 0x91, 0x44, 0x53, 0x09,
-- 0x60, 0x23, 0x65, 0x84, 0x72, 0x61, 0x4e, 0x32, 0xcb, 0xf1, 0x2f, 0x42,
-- 0x60, 0x15, 0xb3, 0x1c, 0xa3, 0x29, 0x93, 0x08, 0x1c, 0x49, 0xe0, 0x0e,
-- 0xf7, 0xa3, 0x3e, 0xb8, 0x26, 0xd6, 0x9c, 0xb9, 0xa1, 0x9e, 0x8b, 0x49,
-- 0xcf, 0x86, 0x78, 0xce, 0x77, 0x94, 0x6d, 0x82, 0xfb, 0xd2, 0x12, 0x25,
-- 0x21, 0x85, 0x6e, 0x09, 0xef, 0x72, 0xb4, 0x2b, 0xab, 0xdb, 0x9c, 0x02,
-- 0xe7, 0x37, 0x9e, 0xbf, 0x7f, 0xcb, 0x85, 0x38, 0x50, 0xe3, 0xf7, 0xe2,
-- 0x6c, 0xff, 0xdd, 0xf9, 0x1b, 0x31, 0x8d, 0x5f, 0x14, 0x41, 0xe9, 0x60,
-- 0xf5, 0x2b, 0x98, 0xff, 0xd8, 0x21, 0xc6, 0xdd, 0x49, 0x75, 0x08, 0x0b,
-- 0xad, 0xd7, 0xba, 0xc2, 0xfd, 0x36, 0x0a, 0xbe, 0x14, 0x25, 0xe6, 0xd5,
-- 0xe0, 0xa1, 0x6d, 0x9c, 0x6f, 0x3a, 0x41, 0xa8, 0x0a, 0x2b, 0x60, 0xf9,
-- 0xda, 0xde, 0x06, 0xdc, 0xac, 0x0f, 0xf1, 0xb2, 0x1c, 0xd8, 0x60, 0xec,
-- 0x53, 0xb9, 0x7b, 0x57, 0x62, 0x85, 0x1e, 0x90, 0xaa, 0x38, 0xd0, 0xba,
-- 0x2a, 0x41, 0xbd, 0x2f, 0x67, 0x4e, 0x95, 0xbb, 0x57, 0x51, 0xfd, 0x5c,
-- 0xe3, 0x61, 0x0a, 0xa8, 0x35, 0xbd, 0xf1, 0xaf, 0x3b, 0x9b, 0xdd, 0xcd,
-- 0x5f, 0xfc, 0xda, 0xe6, 0xbb, 0xc7, 0x6e, 0xba, 0x99, 0xcf, 0x2e, 0xda,
-- 0xf8, 0xd7, 0xdd, 0xcd, 0x07, 0x67, 0x14, 0x26, 0x48, 0xfa, 0x3e, 0xe9,
-- 0x0d, 0x1e, 0x6c, 0xf2, 0xca, 0x2a, 0xc5, 0xab, 0xcc, 0xe4, 0x22, 0x74,
-- 0x02, 0x38, 0xe0, 0x06, 0x76, 0x07, 0x47, 0x70, 0x3b, 0x49, 0xdd, 0x3b,
-- 0xde, 0x34, 0xd1, 0xe4, 0xe8, 0x7f, 0x1d, 0x86, 0x28, 0x8f, 0xf3, 0xf5,
-- 0x3a, 0xbc, 0xa2, 0x18, 0x28, 0xa0, 0x2a, 0x86, 0xe8, 0x7b, 0xf7, 0x81,
-- 0xbe, 0xfd, 0xec, 0x02, 0xb3, 0x04, 0x7b, 0xb1, 0x39, 0x0c, 0xce, 0xc0,
-- 0xaa, 0xb5, 0x9f, 0x35, 0x5f, 0x93, 0x7a, 0x75, 0x7f, 0x17, 0x47, 0x6f,
-- 0x0f, 0x19, 0xd4, 0xfa, 0xf5, 0x11, 0xe3, 0xd0, 0x9d, 0x2b, 0x12, 0xa4,
-- 0x59, 0x20, 0x1c, 0x60, 0x6e, 0x58, 0x1d, 0x45, 0xdc, 0xbb, 0x2e, 0xda,
-- 0xcc, 0x71, 0x0e, 0xb7, 0x13, 0xdc, 0xb5, 0x86, 0x43, 0x57, 0x96, 0x74,
-- 0x79, 0x74, 0x39, 0x78, 0x5b, 0x4c, 0xa0, 0x25, 0x0f, 0xce, 0x11, 0x2a,
-- 0x48, 0x6f, 0xd1, 0x87, 0xef, 0xe7, 0xb3, 0xc6, 0xc7, 0xc3, 0x8e, 0xa4,
-- 0xdd, 0xb5, 0x55, 0x25, 0x64, 0xfe, 0xbe, 0x35, 0x18, 0xa0, 0x22, 0xbc,
-- 0x84, 0x75, 0xa9, 0x73, 0xa7, 0x01, 0xd5, 0x61, 0xac, 0x85, 0x16, 0x28,
-- 0x9f, 0xde, 0x4b, 0x20, 0x42, 0xea, 0xc3, 0xc7, 0x7c, 0x22, 0xe7, 0x15,
-- 0x27, 0x93, 0x79, 0x13, 0x9f, 0x18, 0xf1, 0xd6, 0x42, 0x6c, 0x51, 0x28,
-- 0x52, 0xd9, 0x9d, 0x8f, 0x7f, 0xd2, 0x02, 0xb7, 0xc5, 0xe2, 0x1e, 0xb3,
-- 0xbc, 0x6b, 0x84, 0x56, 0x74, 0xfa, 0x57, 0xff, 0x2e, 0xef, 0x34, 0x8a,
-- 0x26, 0x29, 0x04, 0x74, 0x40, 0x81, 0xfa, 0x89, 0xd6, 0x18, 0x3a, 0x29,
-- 0x83, 0xeb, 0x4a, 0x87, 0x6d, 0xb5, 0xc4, 0x02, 0xdc, 0xd1, 0x00, 0x26,
-- 0xb5, 0x39, 0xce, 0x10, 0xa3, 0xb5, 0xe0, 0x2c, 0xd8, 0xd7, 0x85, 0x73,
-- 0x8e, 0x11, 0xdb, 0x59, 0x34, 0x4b, 0xc8, 0x66, 0x89, 0xe5, 0x7b, 0x4b,
-- 0x3a, 0xff, 0xfa, 0x60, 0x1d, 0x65, 0x13, 0xf2, 0x79, 0xc7, 0x64, 0x06,
-- 0xbf, 0x7e, 0x36, 0x91, 0xeb, 0x35, 0xe9, 0x5d, 0x32, 0x26, 0x06, 0xfb,
-- 0xb1, 0x7a, 0x32, 0x00, 0x81, 0x8c, 0x11, 0xe2, 0xa2, 0x0b, 0x82, 0xf9,
-- 0x9a, 0x29, 0x92, 0xa2, 0x54, 0xbb, 0xc8, 0x58, 0x67, 0x24, 0x17, 0xab,
-- 0x24, 0x33, 0xd2, 0xe5, 0x62, 0x82, 0xa0, 0x0c, 0x09, 0x47, 0xfd, 0x1f,
-- 0x8c, 0x59, 0x5d, 0xde, 0x27, 0x3b, 0xbb, 0xfd, 0x64, 0x77, 0x7b, 0x67,
-- 0xb7, 0x63, 0x0e, 0xbd, 0xff, 0xc1, 0x41, 0x51, 0xbb, 0xf8, 0xba, 0xf7,
-- 0xa9, 0xb3, 0xf0, 0xa9, 0x0d, 0xb8, 0x49, 0x34, 0x09, 0x98, 0x98, 0x0f,
-- 0xfb, 0x67, 0x81, 0x93, 0x8c, 0xba, 0xb2, 0x40, 0xb6, 0xc3, 0xb5, 0x25,
-- 0x46, 0x42, 0x2b, 0x68, 0xe8, 0x0a, 0x5d, 0xf1, 0x13, 0x6b, 0x5a, 0xda,
-- 0x13, 0x91, 0x2f, 0xce, 0x52, 0x9a, 0x96, 0xa8, 0xd6, 0xd8, 0xdc, 0xa3,
-- 0xbc, 0xb6, 0x6d, 0xe1, 0xd0, 0x1a, 0xde, 0x1b, 0xa2, 0xf7, 0xd7, 0x47,
-- 0x07, 0x17, 0x06, 0x7d, 0x78, 0xc9, 0xc2, 0x53, 0x79, 0xff, 0x69, 0xa5,
-- 0xef, 0x1e, 0x7c, 0x66, 0xb2, 0x77, 0x9d, 0x91, 0x18, 0x3d, 0x1f, 0x2d,
-- 0xaf, 0xf6, 0xfe, 0x9a, 0x96, 0x57, 0xc5, 0xfc, 0xb1, 0xe7, 0x27, 0xc8,
-- 0x2d, 0xdb, 0x23, 0x0e, 0xb5, 0xf3, 0x62, 0xe7, 0x89, 0x24, 0x2e, 0xe4,
-- 0x5c, 0x27, 0x13, 0x0c, 0x62, 0x7d, 0xb6, 0x2e, 0x58, 0x1b, 0xc8, 0x98,
-- 0x70, 0x00, 0x1b, 0xf3, 0xc9, 0xba, 0x5c, 0xf7, 0x69, 0xf8, 0xec, 0x44,
-- 0x9f, 0x95, 0x2c, 0xf4, 0xf5, 0x35, 0x29, 0x5d, 0xb2, 0xce, 0x19, 0x9b,
-- 0xcb, 0xc5, 0x7a, 0x13, 0xc1, 0xfd, 0x91, 0xb9, 0x72, 0x17, 0xae, 0xd2,
-- 0xdf, 0x81, 0xc3, 0xa5, 0x47, 0x32, 0x51, 0x99, 0xa5, 0x37, 0xbe, 0xd0,
-- 0xac, 0x07, 0xe2, 0x30, 0x97, 0xc7, 0xd9, 0x9b, 0x03, 0x01, 0x33, 0xb5,
-- 0xd4, 0x29, 0x2c, 0x75, 0xe2, 0x4c, 0x53, 0x9b, 0x3c, 0xca, 0x47, 0xfa,
-- 0xe7, 0xdc, 0x86, 0xbd, 0xc9, 0xe8, 0x13, 0x1e, 0xa2, 0x73, 0x27, 0xb8,
-- 0x71, 0xfb, 0xcd, 0x82, 0x38, 0xac, 0xa8, 0xa1, 0xbc, 0x87, 0x55, 0x95,
-- 0xdd, 0x90, 0xb2, 0x9f, 0xe2, 0x71, 0xe0, 0xa1, 0x59, 0xad, 0x5e, 0xb3,
-- 0xee, 0xd0, 0xb8, 0xb9, 0xa4, 0xe6, 0xeb, 0xfd, 0xd3, 0x40, 0xd1, 0x85,
-- 0x22, 0xe9, 0x8d, 0x7a, 0xfc, 0x1c, 0x2b, 0x3a, 0x28, 0x5a, 0x2d, 0xb6,
-- 0xbf, 0xfb, 0xbe, 0x57, 0x51, 0x6a, 0xf0, 0x49, 0x96, 0x8d, 0x10, 0x20,
-- 0x5f, 0xe8, 0x7d, 0x02, 0xfb, 0x13, 0x8a, 0x0d, 0x4c, 0x27, 0x29, 0x1c,
-- 0xa1, 0x7a, 0x0b, 0x41, 0xe6, 0x42, 0x5b, 0xb9, 0x46, 0x43, 0xd1, 0xde,
-- 0x7c, 0x4c, 0x34, 0x89, 0x43, 0xb3, 0x55, 0xb4, 0x1c, 0x08, 0x1e, 0xe3,
-- 0x04, 0xe5, 0x7b, 0x9b, 0x80, 0xf0, 0x67, 0x1a, 0x7c, 0x5a, 0xdd, 0x10,
-- 0x2b, 0x15, 0x07, 0x3e, 0xf5, 0x9e, 0xab, 0x0b, 0x9c, 0x8d, 0x3e, 0xb9,
-- 0x04, 0xd2, 0xb0, 0xf9, 0x09, 0x90, 0x48, 0x8d, 0x0d, 0x93, 0x2b, 0x88,
-- 0x35, 0xce, 0x69, 0x95, 0x09, 0x80, 0x61, 0x72, 0x71, 0x57, 0x88, 0x8a,
-- 0x51, 0x59, 0x78, 0xad, 0x84, 0xa2, 0x56, 0xcb, 0x5c, 0xa4, 0x48, 0xda,
-- 0x3c, 0xf0, 0x83, 0xa0, 0x66, 0x67, 0xcf, 0x59, 0xbe, 0x5e, 0x3b, 0xbf,
-- 0xe7, 0xf9, 0xeb, 0x6f, 0x13, 0x4e, 0xad, 0xe7, 0x3e, 0x0e, 0x18, 0x6e,
-- 0x9f, 0x43, 0x18, 0x66, 0xd0, 0xfe, 0xbe, 0x5e, 0xf2, 0x79, 0x3f, 0xb8,
-- 0x4e, 0x17, 0xac, 0x00, 0xed, 0x6c, 0xb3, 0xb9, 0xe4, 0x7b, 0x4b, 0xd2,
-- 0xe3, 0x83, 0x6a, 0x25, 0xc1, 0xab, 0x5e, 0x60, 0x49, 0x99, 0x70, 0x45,
-- 0x6f, 0xd6, 0x80, 0x9a, 0x46, 0x5a, 0xba, 0x3e, 0xab, 0x2d, 0x01, 0xd9,
-- 0xaf, 0x88, 0x34, 0xca, 0x6a, 0x72, 0xb3, 0x35, 0xa6, 0x1f, 0x4f, 0xb6,
-- 0xb7, 0x80, 0xa9, 0x59, 0xc3, 0xa6, 0xc9, 0x34, 0xb9, 0xbb, 0xfb, 0xec,
-- 0x59, 0x3f, 0xe9, 0xb1, 0x95, 0xd1, 0x3a, 0xe0, 0x23, 0x41, 0x27, 0xab,
-- 0xd7, 0x55, 0xbc, 0x74, 0xab, 0xbc, 0x1c, 0xf3, 0xff, 0xf8, 0x35, 0x2b,
-- 0x41, 0x78, 0xa1, 0x59, 0x37, 0x58, 0x87, 0x79, 0x08, 0x93, 0x23, 0x64,
-- 0xc5, 0xdf, 0x1d, 0x39, 0x3b, 0x12, 0x3b, 0x8d, 0x16, 0x59, 0xb1, 0x30,
-- 0xef, 0xf0, 0x4c, 0xcb, 0x77, 0xa0, 0xfb, 0xc0, 0xa5, 0x06, 0x7f, 0xbe,
-- 0x84, 0xc3, 0x29, 0x1e, 0x42, 0xb5, 0x1c, 0x0d, 0x34, 0x31, 0x58, 0xb4,
-- 0xca, 0x9c, 0x4e, 0x2e, 0xfd, 0x39, 0x35, 0x73, 0x7d, 0xc4, 0x91, 0xbf,
-- 0x4a, 0x7a, 0x4a, 0x5b, 0xfc, 0xcf, 0x10, 0xce, 0xdd, 0x6c, 0xcc, 0xd3,
-- 0x28, 0x5e, 0xe9, 0x1f, 0xff, 0xf6, 0x6f, 0xd4, 0xec, 0xbf, 0x71, 0x2b,
-- 0xaf, 0xfe, 0xb5, 0xaa, 0xaf, 0x83, 0x67, 0x7a, 0x4a, 0xf0, 0x47, 0xde,
-- 0xb5, 0x8d, 0x70, 0x35, 0x20, 0xce, 0x22, 0x7f, 0xed, 0xed, 0xb1, 0x72,
-- 0xe4, 0x7e, 0x30, 0xbf, 0x1c, 0x99, 0x85, 0x62, 0x24, 0x75, 0xd1, 0x22,
-- 0x5f, 0xb1, 0xdb, 0x39, 0xe3, 0x8c, 0x74, 0xba, 0x48, 0x00, 0x28, 0xb8,
-- 0x69, 0x22, 0xc6, 0xe1, 0xbb, 0xef, 0x8e, 0xce, 0x4e, 0xde, 0xbd, 0x3d,
-- 0x7c, 0x77, 0x91, 0x7c, 0xb7, 0x7f, 0x76, 0xb4, 0xff, 0xd5, 0xb1, 0x26,
-- 0xbe, 0xf3, 0x14, 0x38, 0xc8, 0x47, 0x64, 0xef, 0x16, 0x20, 0x6c, 0x90,
-- 0x88, 0xd4, 0x59, 0xda, 0xa3, 0x55, 0x83, 0xf6, 0x83, 0x22, 0x8c, 0x43,
-- 0x13, 0xf9, 0x80, 0x2a, 0x45, 0x7d, 0x16, 0x3e, 0x3f, 0x58, 0xc1, 0x22,
-- 0x56, 0x9e, 0xee, 0x83, 0x54, 0x6a, 0x8e, 0x3f, 0x62, 0x2a, 0x35, 0xfe,
-- 0xe4, 0x2b, 0xd7, 0xb9, 0xda, 0x17, 0x5f, 0x4b, 0x36, 0xbe, 0x15, 0x02,
-- 0xb1, 0x57, 0x35, 0x33, 0x0c, 0x76, 0x37, 0x37, 0x86, 0xfd, 0xe3, 0x63,
-- 0xdf, 0xd5, 0xc3, 0x35, 0x62, 0x14, 0x89, 0x49, 0x92, 0xb7, 0xd0, 0x28,
-- 0x3b, 0x06, 0xaf, 0x0a, 0x0f, 0x97, 0x3e, 0xbf, 0x0f, 0x91, 0xd1, 0xb9,
-- 0x33, 0xda, 0x8e, 0x0d, 0x81, 0xd0, 0x60, 0x2f, 0x31, 0x1d, 0xa0, 0xbc,
-- 0xba, 0xe9, 0x27, 0xeb, 0xff, 0xba, 0x2e, 0x49, 0x75, 0x19, 0x70, 0x83,
-- 0xa5, 0x02, 0xcd, 0xa6, 0x1f, 0xd4, 0xbb, 0x13, 0x3f, 0x26, 0x75, 0x7c,
-- 0xba, 0x01, 0xb8, 0x17, 0xbd, 0xdb, 0xba, 0x32, 0x79, 0x06, 0xf1, 0xa2,
-- 0xfe, 0x71, 0x2d, 0xd3, 0xe0, 0x90, 0x01, 0x94, 0x46, 0xd9, 0xb1, 0xd5,
-- 0xf9, 0x2e, 0xb4, 0xb6, 0x74, 0x1c, 0xc0, 0x43, 0x63, 0xae, 0x73, 0x36,
-- 0x75, 0xb8, 0xd2, 0x59, 0x66, 0x0d, 0xa4, 0xa5, 0x66, 0x9b, 0x9e, 0xba,
-- 0x13, 0x97, 0x95, 0x72, 0x50, 0x50, 0xd5, 0xc7, 0x2d, 0xab, 0x44, 0x03,
-- 0x1f, 0x23, 0xe7, 0x03, 0x94, 0xf9, 0x44, 0xe1, 0x06, 0x3b, 0xa9, 0x62,
-- 0x08, 0xd7, 0xd4, 0xd9, 0x01, 0xd0, 0xd9, 0xe7, 0x5c, 0x42, 0xd0, 0x57,
-- 0xba, 0x40, 0xec, 0x30, 0x71, 0x91, 0x92, 0x13, 0xf2, 0xe6, 0x2a, 0x84,
-- 0x20, 0x1e, 0x17, 0x32, 0x7a, 0x7a, 0x55, 0x98, 0xfc, 0x9d, 0x3a, 0xa7,
-- 0xb9, 0xab, 0x07, 0x16, 0xc8, 0xf4, 0x0e, 0x43, 0xcc, 0x99, 0x2c, 0xe1,
-- 0x5e, 0x37, 0x07, 0x01, 0x87, 0x97, 0xf1, 0x96, 0x5b, 0xb9, 0xde, 0x2a,
-- 0xc8, 0xd2, 0xf6, 0xd9, 0x0b, 0xcc, 0x4b, 0x24, 0x48, 0xdf, 0x40, 0xbd,
-- 0x00, 0xa4, 0x66, 0x59, 0xdd, 0x08, 0x74, 0xc4, 0xb0, 0xf8, 0x41, 0x34,
-- 0xa9, 0x31, 0xab, 0x68, 0xd2, 0x6c, 0xd7, 0x74, 0x7a, 0xa6, 0x9c, 0x40,
-- 0x66, 0x9c, 0x28, 0x4d, 0x46, 0xf9, 0x95, 0xa0, 0x03, 0x70, 0x2a, 0x3a,
-- 0x53, 0x09, 0xc0, 0xde, 0x48, 0xb1, 0xe7, 0xad, 0x02, 0x94, 0x1b, 0x64,
-- 0xf7, 0xeb, 0x62, 0x1a, 0xe2, 0x8d, 0xd9, 0x4c, 0x2a, 0xad, 0x74, 0x66,
-- 0xa6, 0x4f, 0xb8, 0x3e, 0x96, 0xbc, 0x8e, 0x16, 0x8d, 0xa6, 0x40, 0xe5,
-- 0x1a, 0x9b, 0xc7, 0x36, 0x75, 0xa0, 0x26, 0xce, 0x91, 0x09, 0x64, 0x59,
-- 0xd5, 0x58, 0x07, 0x8b, 0x5b, 0x66, 0x6e, 0x01, 0x3b, 0x1a, 0xd7, 0x2b,
-- 0xdc, 0x70, 0x48, 0xe3, 0xdc, 0xca, 0x58, 0xb0, 0x5a, 0x99, 0xe8, 0xc5,
-- 0xa3, 0xdc, 0x2c, 0xd7, 0xa3, 0x9b, 0xa5, 0x28, 0x5a, 0x44, 0x13, 0x3c,
-- 0x68, 0x5a, 0xa9, 0x8d, 0x80, 0xf1, 0xcc, 0x89, 0x44, 0xe4, 0x31, 0x51,
-- 0x20, 0xf5, 0xaf, 0x81, 0xab, 0x34, 0xa6, 0x7e, 0xe7, 0x4d, 0x1f, 0x77,
-- 0x20, 0x52, 0x00, 0x53, 0xeb, 0x58, 0x4b, 0x22, 0xc2, 0x43, 0xcf, 0x75,
-- 0x1b, 0x01, 0x0d, 0xd5, 0xb0, 0x3d, 0x26, 0x96, 0x6f, 0x33, 0x9d, 0x06,
-- 0x50, 0xe3, 0x62, 0x8e, 0x48, 0x23, 0xd9, 0x83, 0x9d, 0x43, 0x92, 0x86,
-- 0xaa, 0x91, 0x3f, 0x02, 0x4b, 0x1c, 0x4c, 0x44, 0x63, 0xca, 0x59, 0x3a,
-- 0x6b, 0x99, 0x34, 0x03, 0x86, 0x66, 0xde, 0xf1, 0xf0, 0x62, 0xd2, 0x6a,
-- 0x17, 0x79, 0x3a, 0x13, 0xd9, 0xd1, 0x53, 0xdf, 0xec, 0x5e, 0xa2, 0x0e,
-- 0xd7, 0xd6, 0x0e, 0xde, 0x9f, 0x5f, 0x9c, 0xbc, 0x4d, 0x4e, 0xde, 0x5f,
-- 0x9c, 0xbe, 0xbf, 0xd0, 0x9b, 0x6b, 0x24, 0x31, 0xdb, 0x12, 0xb9, 0x20,
-- 0x42, 0x80, 0x6d, 0xe6, 0x4c, 0xfd, 0xfb, 0x08, 0x31, 0x29, 0x00, 0x30,
-- 0x18, 0x60, 0x0b, 0xb9, 0x9c, 0x2c, 0xa0, 0x6e, 0x09, 0x72, 0x31, 0x96,
-- 0xfc, 0x8e, 0x96, 0x1c, 0xf9, 0xb4, 0x30, 0xe4, 0x59, 0x8a, 0x17, 0xd4,
-- 0x1e, 0x3b, 0x6b, 0xcd, 0x4a, 0x32, 0xad, 0x42, 0x98, 0x70, 0xce, 0x37,
-- 0xb1, 0x9c, 0x7c, 0x1c, 0x95, 0xd9, 0x76, 0xbc, 0xe9, 0x27, 0x0c, 0xe9,
-- 0x44, 0x30, 0xd3, 0xb8, 0x36, 0x03, 0xb4, 0x45, 0xd5, 0x22, 0xd4, 0xa8,
-- 0x99, 0x58, 0x18, 0xe6, 0x37, 0xd6, 0x05, 0xcd, 0xf0, 0xda, 0x45, 0xc4,
-- 0x73, 0x14, 0x11, 0x22, 0x01, 0x25, 0x80, 0x82, 0x43, 0xee, 0x44, 0x63,
-- 0x20, 0x3d, 0x90, 0x5d, 0x16, 0xd1, 0x2d, 0x7b, 0x97, 0xac, 0x7f, 0x9f,
-- 0x85, 0x0d, 0xfe, 0xe9, 0xdf, 0x39, 0x6d, 0xf3, 0x83, 0x7d, 0xf2, 0x9f,
-- 0xd2, 0xe5, 0xcf, 0xf3, 0x75, 0x04, 0xd0, 0x35, 0x3d, 0xe5, 0xdf, 0x1e,
-- 0x9e, 0x7d, 0x75, 0x78, 0x76, 0x72, 0x0e, 0x7e, 0x60, 0xe6, 0xae, 0x98,
-- 0xd6, 0x6f, 0xb2, 0x72, 0x94, 0x95, 0x85, 0x56, 0xb9, 0xb2, 0xbf, 0x9e,
-- 0x6d, 0x7d, 0x7d, 0x7e, 0xbe, 0x7f, 0x7a, 0xe4, 0xea, 0xc8, 0xb8, 0x04,
-- 0x32, 0x51, 0x91, 0xe6, 0x92, 0xe2, 0xc8, 0xf3, 0xb7, 0x57, 0x88, 0x2e,
-- 0xc6, 0x37, 0x12, 0x58, 0x1c, 0xf9, 0xa4, 0xcd, 0xae, 0xce, 0xce, 0x68,
-- 0xcd, 0x2b, 0xe4, 0x86, 0x0d, 0x13, 0x2a, 0xc4, 0x9d, 0x17, 0x80, 0x78,
-- 0xf6, 0x05, 0xf4, 0x5d, 0x04, 0xde, 0x4d, 0x39, 0x1a, 0x10, 0xb5, 0xdf,
-- 0x58, 0x95, 0x61, 0xc9, 0x83, 0x20, 0x56, 0x29, 0x01, 0xd2, 0xde, 0xd6,
-- 0x70, 0xc3, 0x05, 0xc7, 0xb7, 0x6e, 0xf8, 0x7c, 0x70, 0x8d, 0x93, 0xe9,
-- 0x50, 0xb8, 0xbb, 0x1c, 0x28, 0x8b, 0x7a, 0x65, 0x16, 0xfb, 0x10, 0x4e,
-- 0x05, 0xf5, 0xe6, 0x0a, 0x13, 0x8a, 0xbd, 0x8b, 0x3e, 0x79, 0xea, 0x00,
-- 0xbb, 0xc2, 0x5a, 0xd4, 0x97, 0x24, 0x80, 0x2f, 0xee, 0x26, 0x7a, 0x89,
-- 0x00, 0xaf, 0x7a, 0x2e, 0xee, 0x09, 0xe1, 0xe1, 0x6d, 0x07, 0x15, 0x17,
-- 0x4f, 0x44, 0xc2, 0x86, 0x86, 0xa3, 0x27, 0xa3, 0x69, 0x3a, 0xbf, 0xc1,
-- 0x6d, 0x86, 0xfb, 0x89, 0x55, 0x4e, 0x83, 0xa1, 0xe2, 0xa2, 0x96, 0xf0,
-- 0x47, 0x2a, 0x32, 0x04, 0x84, 0xc0, 0x29, 0x33, 0xb7, 0x7b, 0xb1, 0xe5,
-- 0x3b, 0xb4, 0xad, 0xc0, 0xf3, 0x86, 0xe3, 0xe4, 0x17, 0x81, 0x4d, 0x47,
-- 0x87, 0xc7, 0x74, 0x31, 0xb9, 0x24, 0x13, 0xa8, 0xe8, 0xd9, 0x94, 0x4d,
-- 0xc1, 0x16, 0x11, 0x24, 0x79, 0x95, 0x39, 0x18, 0x99, 0x70, 0x0f, 0x83,
-- 0x52, 0x87, 0xff, 0x08, 0xe4, 0x82, 0xf4, 0xd1, 0xca, 0x15, 0x1c, 0x51,
-- 0xce, 0x2d, 0x4c, 0x0c, 0x38, 0xa1, 0xbe, 0xfe, 0x48, 0x58, 0x9d, 0x46,
-- 0xc3, 0xed, 0x0e, 0x7c, 0x3c, 0x90, 0x2b, 0xd7, 0x25, 0x83, 0xf0, 0x62,
-- 0xa9, 0xf3, 0x30, 0x36, 0xb2, 0x5b, 0x56, 0x6e, 0x93, 0xbc, 0xde, 0x65,
-- 0x04, 0x10, 0x78, 0xb3, 0x89, 0xfa, 0x3b, 0x1c, 0x32, 0x90, 0x85, 0x2c,
-- 0x37, 0xc3, 0x84, 0x6d, 0xe0, 0x12, 0x0d, 0xc0, 0xc6, 0xdb, 0x69, 0x6d,
-- 0x4e, 0x43, 0x84, 0xb8, 0xea, 0x0d, 0x5c, 0x4f, 0xc0, 0x72, 0xca, 0x06,
-- 0x68, 0x6d, 0x18, 0x9d, 0x2b, 0xe0, 0x15, 0xb0, 0x0d, 0x4a, 0xbe, 0x06,
-- 0xb4, 0x18, 0x27, 0xdf, 0x0e, 0xde, 0xf1, 0x75, 0x51, 0x0c, 0x46, 0x4b,
-- 0xe8, 0x65, 0x41, 0x19, 0x2d, 0xc9, 0xe1, 0xe4, 0x7a, 0xf3, 0xc0, 0x55,
-- 0xc3, 0xf7, 0xec, 0x8f, 0x42, 0x76, 0xbc, 0xb8, 0xa8, 0x90, 0x2e, 0xd9,
-- 0xc4, 0xdc, 0x71, 0x48, 0x2b, 0x92, 0x83, 0x80, 0x58, 0x6c, 0x2b, 0xbc,
-- 0x26, 0x23, 0xd4, 0x4d, 0x76, 0xd1, 0x82, 0x73, 0xad, 0xbd, 0x0a, 0xcf,
-- 0x4a, 0x33, 0xe2, 0xba, 0x76, 0xd0, 0xf7, 0x17, 0x10, 0x13, 0x32, 0x05,
-- 0x84, 0xb7, 0x50, 0x6a, 0x4b, 0xdc, 0xb8, 0xad, 0xb9, 0xf0, 0x93, 0x80,
-- 0x44, 0xa4, 0x53, 0xa9, 0xd8, 0xb1, 0xf2, 0x2a, 0x91, 0xc3, 0x54, 0x5f,
-- 0x5c, 0xfc, 0x78, 0x7a, 0xf8, 0xca, 0xde, 0x7c, 0x68, 0xcf, 0x04, 0x3b,
-- 0x0d, 0x31, 0x33, 0x99, 0x62, 0x95, 0x06, 0x95, 0x9c, 0x89, 0xc8, 0x06,
-- 0xb5, 0xf9, 0xf2, 0xa5, 0x9b, 0x41, 0xf2, 0xc3, 0xeb, 0xa3, 0xf3, 0xd3,
-- 0xe3, 0x93, 0x83, 0x57, 0x2f, 0x7f, 0x30, 0x96, 0xfc, 0x05, 0xbb, 0x08,
-- 0x44, 0x4e, 0x73, 0x9f, 0x79, 0x6c, 0x07, 0x7d, 0xef, 0xdd, 0xe1, 0xf7,
-- 0x1f, 0x48, 0x3b, 0x78, 0xc5, 0x08, 0xef, 0xfd, 0xdb, 0x74, 0xaa, 0x2f,
-- 0xb1, 0x8a, 0xd5, 0x21, 0xdb, 0x0d, 0x9b, 0x60, 0x7c, 0xed, 0x85, 0x75,
-- 0xd5, 0x43, 0x7d, 0x9e, 0xc2, 0xbd, 0x85, 0xd1, 0x05, 0x85, 0xa2, 0xd2,
-- 0x46, 0x5a, 0x6d, 0x47, 0x89, 0x5f, 0x7f, 0xfd, 0xaf, 0xd7, 0x12, 0x53,
-- 0xc9, 0x21, 0x04, 0xa1, 0x67, 0x1e, 0x71, 0xab, 0xfa, 0x8d, 0x8f, 0xe7,
-- 0x55, 0x24, 0xe5, 0x92, 0x03, 0x58, 0x1c, 0x14, 0xa5, 0xd6, 0x59, 0x86,
-- 0xcf, 0x5b, 0xf1, 0x2a, 0x15, 0x84, 0x89, 0x43, 0x68, 0x2d, 0x9a, 0xde,
-- 0xf8, 0x98, 0x8a, 0x30, 0x6e, 0x2c, 0xa9, 0x95, 0xb2, 0x45, 0x6d, 0x9e,
-- 0xd3, 0xc3, 0xb3, 0xf3, 0xa3, 0xf3, 0x0b, 0x56, 0xa3, 0xb4, 0xae, 0xa2,
-- 0xda, 0xa0, 0xad, 0xe8, 0x25, 0x30, 0x1b, 0x9a, 0xd0, 0xa3, 0x61, 0xdd,
-- 0x90, 0xc6, 0x89, 0x76, 0x6c, 0xae, 0x99, 0xc4, 0xc9, 0x37, 0x80, 0x64,
-- 0x86, 0xb2, 0x20, 0x2a, 0x00, 0xba, 0xe9, 0xa5, 0x1d, 0xe0, 0x42, 0x49,
-- 0xa3, 0x55, 0x3e, 0x03, 0xa5, 0x6f, 0xb0, 0x3b, 0xd3, 0x7c, 0xe4, 0xad,
-- 0xe6, 0x2d, 0x17, 0x32, 0x47, 0x27, 0x28, 0x58, 0x47, 0x78, 0x84, 0xcc,
-- 0x1e, 0xee, 0x33, 0xa3, 0xb5, 0xd4, 0xae, 0x5e, 0x6b, 0x9a, 0xd5, 0x18,
-- 0xe6, 0xaf, 0x3a, 0x45, 0x15, 0xca, 0x89, 0xc9, 0x69, 0xee, 0xd3, 0x20,
-- 0x08, 0x55, 0xf1, 0x9f, 0x00, 0x5d, 0xab, 0x2c, 0x9b, 0x99, 0x72, 0x2e,
-- 0x99, 0x68, 0x6c, 0x68, 0x21, 0xa9, 0x05, 0x99, 0xf5, 0x88, 0x13, 0xd2,
-- 0x99, 0x45, 0x22, 0x88, 0x8a, 0x8e, 0x57, 0x9c, 0xc2, 0x06, 0x90, 0xad,
-- 0x09, 0xcb, 0x5b, 0xb0, 0xc0, 0x85, 0x9d, 0xd9, 0x75, 0xca, 0x2b, 0x38,
-- 0x5a, 0x86, 0x85, 0xda, 0xdc, 0xe8, 0xa5, 0x3e, 0x09, 0x16, 0x1e, 0x11,
-- 0x92, 0x69, 0x09, 0x14, 0xcb, 0x5a, 0x41, 0xe3, 0x4d, 0xf1, 0xd1, 0x70,
-- 0xc7, 0x61, 0x13, 0xcf, 0xc7, 0xe8, 0xd2, 0x8a, 0x89, 0x3e, 0xb4, 0xa2,
-- 0x41, 0x65, 0x47, 0x26, 0xdf, 0x32, 0xb3, 0xb8, 0x25, 0x31, 0x33, 0x54,
-- 0xec, 0x70, 0x98, 0x8f, 0xdd, 0x65, 0xcc, 0x49, 0x47, 0xec, 0x5f, 0x2c,
-- 0x15, 0x2b, 0x89, 0xd8, 0x1f, 0x5b, 0x96, 0x51, 0x0e, 0x12, 0x75, 0x92,
-- 0xd9, 0xeb, 0x66, 0x38, 0x7a, 0x3e, 0x8c, 0x5b, 0x96, 0x3b, 0x20, 0x2b,
-- 0x31, 0xaf, 0xdf, 0x6b, 0x87, 0x2e, 0x41, 0xde, 0x36, 0xab, 0x2f, 0xf9,
-- 0x56, 0x29, 0xd2, 0x7b, 0xcc, 0xae, 0x1b, 0xa4, 0x89, 0x56, 0x9a, 0x7c,
-- 0xeb, 0xdc, 0xd3, 0x60, 0x78, 0x8d, 0x9a, 0xb8, 0x3c, 0xbb, 0x86, 0x6b,
-- 0x90, 0xe4, 0xcb, 0x05, 0x8a, 0x29, 0x8d, 0x15, 0x4d, 0x1e, 0x41, 0xbb,
-- 0xae, 0x41, 0xbb, 0x44, 0xfc, 0x62, 0xd1, 0xaa, 0xbe, 0x7d, 0x7f, 0x7c,
-- 0x71, 0x74, 0x1a, 0xba, 0x1f, 0x93, 0xef, 0x8f, 0x2e, 0xbe, 0x21, 0xa9,
-- 0xfd, 0xfc, 0xe8, 0xdd, 0xd7, 0xc7, 0xec, 0xe3, 0x79, 0xfb, 0x76, 0xff,
-- 0x1d, 0xa3, 0x0b, 0xbc, 0x43, 0x64, 0xe3, 0x3e, 0x14, 0x07, 0x66, 0x47,
-- 0xb4, 0xc4, 0x4c, 0x3b, 0x9c, 0x77, 0xde, 0x8f, 0x5d, 0x0d, 0xad, 0xe3,
-- 0x27, 0x35, 0x8f, 0xe7, 0xcd, 0x45, 0xe2, 0x1d, 0x57, 0xcd, 0xe0, 0x9e,
-- 0x0d, 0x3b, 0x38, 0xb6, 0xac, 0x6c, 0xf1, 0x42, 0xb7, 0x61, 0xe4, 0x91,
-- 0xe3, 0x28, 0x12, 0x3a, 0xdc, 0xe8, 0x72, 0x77, 0x7b, 0xf7, 0x05, 0x76,
-- 0xd4, 0x81, 0xd0, 0x42, 0x8f, 0x21, 0x99, 0x69, 0xae, 0x7a, 0x8d, 0xdc,
-- 0x97, 0xcd, 0x9c, 0x03, 0xea, 0x11, 0x43, 0x42, 0x1c, 0x41, 0xe1, 0x2d,
-- 0x82, 0xac, 0x71, 0xb2, 0xd2, 0x7c, 0x76, 0x1c, 0x5e, 0xa8, 0xcd, 0x32,
-- 0xf4, 0x16, 0x1e, 0x78, 0x55, 0x64, 0xfe, 0xe4, 0x0e, 0x4e, 0xac, 0x19,
-- 0x33, 0xff, 0x42, 0x0d, 0x93, 0xcb, 0x65, 0xc0, 0x7c, 0x6d, 0x40, 0x5b,
-- 0xb2, 0xe9, 0x2a, 0x0e, 0xa9, 0xf9, 0x6c, 0x4f, 0xc4, 0x4a, 0x07, 0xb3,
-- 0x6c, 0xc5, 0xf3, 0xa8, 0x39, 0x6b, 0x59, 0x43, 0x51, 0x10, 0x8f, 0xad,
-- 0x69, 0x4d, 0x3a, 0x67, 0x70, 0x4b, 0x7b, 0xac, 0x91, 0x95, 0x2d, 0xf7,
-- 0xdd, 0x89, 0x99, 0xf6, 0x2c, 0xad, 0x0d, 0xc9, 0xac, 0x0c, 0xbf, 0xe3,
-- 0x3d, 0xa7, 0x28, 0xb2, 0x56, 0x14, 0xc3, 0xec, 0x63, 0xc6, 0x4e, 0x4e,
-- 0xfe, 0xf5, 0xaf, 0x8b, 0xab, 0x30, 0xe3, 0x4d, 0xca, 0x3e, 0x2f, 0xba,
-- 0x76, 0x56, 0x31, 0x9d, 0x45, 0x2c, 0xd2, 0x52, 0x73, 0x8d, 0x11, 0x68,
-- 0xfd, 0xb8, 0x9d, 0x55, 0x1d, 0xea, 0xf7, 0xbb, 0xf1, 0xf7, 0xbb, 0x62,
-- 0x76, 0x3c, 0x3a, 0xbd, 0x7d, 0xee, 0xb0, 0x50, 0x25, 0x8f, 0x3b, 0x14,
-- 0xdf, 0x4c, 0x28, 0x60, 0x0a, 0xe3, 0x47, 0xe5, 0xce, 0x49, 0x85, 0x27,
-- 0x8a, 0xed, 0x9f, 0x23, 0xc8, 0x96, 0x25, 0xf2, 0x53, 0xf1, 0x08, 0xcc,
-- 0xc4, 0x12, 0xf6, 0x8b, 0x20, 0x3b, 0xf0, 0x29, 0xbe, 0xae, 0xa8, 0x41,
-- 0xfa, 0xfe, 0xa9, 0x8b, 0xc5, 0xf7, 0x3c, 0x0d, 0xe5, 0xda, 0x34, 0x1b,
-- 0x6a, 0x90, 0x2f, 0x6e, 0xad, 0x06, 0x2f, 0xfd, 0xfa, 0xdc, 0x95, 0xea,
-- 0xa9, 0x1a, 0x3e, 0xaa, 0x06, 0xee, 0xb0, 0x31, 0x7f, 0x0c, 0x0e, 0x61,
-- 0x91, 0xcc, 0x19, 0xbc, 0x92, 0xd1, 0x1a, 0x57, 0xd6, 0x0c, 0xc8, 0x0e,
-- 0x8a, 0x88, 0xc2, 0xc0, 0x3c, 0x45, 0x66, 0x2c, 0xf8, 0x51, 0xc0, 0x5c,
-- 0x42, 0xcc, 0x7f, 0xdd, 0xf5, 0x9f, 0x76, 0xb7, 0xb7, 0x77, 0xf6, 0x76,
-- 0x3e, 0x7f, 0xb1, 0xbd, 0xb7, 0xb3, 0xb3, 0xb3, 0xbb, 0xb7, 0xb3, 0xb7,
-- 0xb7, 0xbb, 0xfd, 0xcb, 0x16, 0xdb, 0x8f, 0x6e, 0xf3, 0xec, 0xce, 0x1c,
-- 0x53, 0x92, 0x8b, 0x07, 0xb2, 0x96, 0x5a, 0xea, 0xaa, 0xc1, 0xab, 0x9e,
-- 0x6b, 0x92, 0x8f, 0x43, 0x95, 0x90, 0x90, 0x79, 0x01, 0x93, 0x5b, 0xf8,
-- 0x4c, 0x53, 0x9c, 0xc1, 0x00, 0xf0, 0x1a, 0xa3, 0xfa, 0xdb, 0x92, 0x67,
-- 0x3a, 0x62, 0x71, 0x00, 0x32, 0x4d, 0xe5, 0xf2, 0xfa, 0xae, 0xa6, 0xc5,
-- 0x68, 0x84, 0xcc, 0x05, 0x97, 0xda, 0x3a, 0x4c, 0x18, 0x55, 0xf5, 0x46,
-- 0x48, 0x42, 0x3d, 0x07, 0x08, 0x2a, 0x94, 0x83, 0xee, 0x57, 0x47, 0x04,
-- 0x2f, 0x0d, 0xa4, 0x1e, 0x17, 0x5c, 0x61, 0x60, 0xc2, 0x4c, 0x89, 0x16,
-- 0xa9, 0x74, 0x29, 0x2f, 0xc9, 0x65, 0xf6, 0xf9, 0xf6, 0xde, 0x1e, 0x17,
-- 0x01, 0xf9, 0xd3, 0x4e, 0x5f, 0xe3, 0x41, 0xc3, 0x20, 0xf7, 0xbe, 0xbb,
-- 0x9e, 0xa4, 0x0d, 0x56, 0x3f, 0xc2, 0x79, 0xce, 0x97, 0xb3, 0xac, 0x54,
-- 0x45, 0x04, 0x17, 0xa2, 0x80, 0xff, 0x30, 0x31, 0xda, 0x90, 0xdd, 0xb3,
-- 0x28, 0x6c, 0x03, 0xbb, 0xbc, 0xa4, 0xa6, 0xf8, 0xdb, 0x53, 0xcf, 0x39,
-- 0x8e, 0xca, 0x5c, 0xca, 0x87, 0xf2, 0xc3, 0x90, 0xc8, 0x81, 0x68, 0x52,
-- 0xdc, 0x84, 0xc2, 0xaa, 0xe6, 0xe3, 0xfc, 0x14, 0x0c, 0x7e, 0xf7, 0xd9,
-- 0xce, 0x2f, 0x12, 0x7e, 0xc8, 0x04, 0xee, 0x57, 0x41, 0x0b, 0xbd, 0x4d,
-- 0xc2, 0x8c, 0x0b, 0x23, 0x8c, 0x8d, 0x6c, 0x78, 0x35, 0x34, 0x29, 0x41,
-- 0xad, 0x87, 0xfd, 0x30, 0x08, 0x5c, 0x10, 0xc8, 0xa5, 0x2c, 0x30, 0xf4,
-- 0x2e, 0x33, 0x10, 0x99, 0x81, 0x57, 0x8c, 0x93, 0x8d, 0x8a, 0x3d, 0x74,
-- 0x63, 0x1c, 0x5e, 0xec, 0xd3, 0x65, 0xf0, 0x6d, 0xac, 0xb8, 0xbf, 0xcd,
-- 0x48, 0xcb, 0xe6, 0xcd, 0xdb, 0x00, 0x7d, 0xdf, 0x3a, 0xdc, 0x5f, 0x5e,
-- 0xbd, 0xa7, 0xc9, 0x06, 0xfb, 0x20, 0x9e, 0x7d, 0xfe, 0xec, 0xe9, 0xa6,
-- 0x14, 0x59, 0x90, 0xd7, 0x32, 0xce, 0xf7, 0x80, 0x95, 0x51, 0xc1, 0x66,
-- 0xd8, 0x3c, 0xec, 0x58, 0xcc, 0xfb, 0xb3, 0x23, 0x39, 0xa2, 0xd7, 0x82,
-- 0x09, 0x20, 0x4a, 0x6c, 0x1b, 0x27, 0x0e, 0xf7, 0x67, 0x20, 0x34, 0xcc,
-- 0x72, 0xc6, 0x30, 0x44, 0x2e, 0x35, 0x5f, 0x74, 0x2e, 0x97, 0x1f, 0x37,
-- 0x26, 0x1d, 0xb8, 0x02, 0xa5, 0x07, 0xb5, 0xa2, 0x13, 0x06, 0x03, 0xd0,
-- 0x43, 0xc6, 0x5c, 0x55, 0xba, 0x71, 0x1a, 0x15, 0xeb, 0x35, 0xc2, 0x5f,
-- 0x84, 0x9b, 0xb7, 0x70, 0xb6, 0x37, 0xc5, 0x83, 0x0f, 0x21, 0x8f, 0xc9,
-- 0x8a, 0x1e, 0xb4, 0x50, 0x50, 0x1e, 0x71, 0x23, 0xbb, 0xcc, 0x4b, 0x8f,
-- 0x01, 0x46, 0x93, 0xc1, 0xb3, 0x28, 0x6b, 0x71, 0x4b, 0x28, 0xee, 0xe9,
-- 0x1a, 0x96, 0xc2, 0xbc, 0x61, 0xc2, 0xd1, 0xdc, 0x78, 0xe4, 0xa8, 0x23,
-- 0x84, 0x78, 0x46, 0xd7, 0x4b, 0x79, 0xaf, 0x12, 0x33, 0xc4, 0x7e, 0x57,
-- 0x29, 0xad, 0xe5, 0xe0, 0x17, 0x14, 0x88, 0x30, 0x32, 0xde, 0x81, 0xa0,
-- 0x98, 0x12, 0xdc, 0x18, 0x40, 0x83, 0x8d, 0x0f, 0x66, 0xf6, 0x55, 0x10,
-- 0xff, 0x12, 0xa6, 0x8b, 0xd9, 0xef, 0xf6, 0x5c, 0x10, 0x1a, 0x99, 0xb6,
-- 0x27, 0xb6, 0x62, 0x68, 0x82, 0x95, 0x89, 0x70, 0x28, 0xa7, 0xcd, 0x6c,
-- 0x60, 0x24, 0x5b, 0x5b, 0x9b, 0x2b, 0x46, 0xa3, 0x5f, 0x77, 0xf5, 0x7e,
-- 0x0a, 0x8c, 0x91, 0x20, 0x43, 0x93, 0xf6, 0xbc, 0xd9, 0x38, 0x2f, 0x6d,
-- 0x5e, 0xf1, 0x4e, 0x4e, 0x34, 0xce, 0x55, 0xcc, 0xa2, 0xa6, 0x2e, 0xc9,
-- 0xe0, 0x8d, 0x19, 0x35, 0x27, 0xa1, 0xa1, 0x35, 0x86, 0xf9, 0x24, 0x35,
-- 0x9c, 0xc5, 0x5d, 0x39, 0x4c, 0xf6, 0x99, 0x1a, 0x1a, 0x1d, 0x07, 0x43,
-- 0x36, 0xfb, 0xac, 0x21, 0x9a, 0x9b, 0x50, 0xea, 0xcc, 0x73, 0xfd, 0xe0,
-- 0x4b, 0x13, 0xdb, 0x2c, 0xc5, 0xdf, 0x19, 0x6f, 0x47, 0x99, 0xc0, 0x99,
-- 0x38, 0x4e, 0x18, 0x20, 0x15, 0xe7, 0xf3, 0x46, 0x09, 0x50, 0x6d, 0x04,
-- 0x8e, 0x6b, 0x37, 0x09, 0x80, 0x20, 0x96, 0x06, 0xae, 0x1b, 0x96, 0x05,
-- 0x04, 0xa2, 0x80, 0x06, 0xa9, 0x8b, 0xa0, 0xec, 0x88, 0x58, 0xbc, 0xa7,
-- 0x23, 0x21, 0xaf, 0xc6, 0x7a, 0xf4, 0x85, 0xe2, 0x25, 0x28, 0x41, 0xe2,
-- 0x67, 0xe9, 0x90, 0x30, 0xc3, 0xd8, 0x3f, 0x3a, 0xe6, 0x28, 0xb7, 0x63,
-- 0x52, 0xd9, 0xce, 0x4d, 0xf4, 0x41, 0xd4, 0x27, 0xe2, 0xef, 0xe6, 0x39,
-- 0x8b, 0xdf, 0x7d, 0x57, 0x4a, 0xc4, 0x92, 0x9f, 0xa0, 0x87, 0xb0, 0xb3,
-- 0x4e, 0x54, 0x79, 0xc5, 0xfc, 0xa3, 0xdd, 0x22, 0xf9, 0xa7, 0x12, 0x23,
-- 0x2c, 0xa0, 0x75, 0x19, 0x74, 0x1e, 0x8e, 0x51, 0xa8, 0xc8, 0xc2, 0xa8,
-- 0x51, 0xc9, 0xa8, 0xcc, 0xa6, 0xd9, 0xad, 0x5a, 0x4b, 0x05, 0xa8, 0xf4,
-- 0x6b, 0xf5, 0x49, 0x4a, 0x29, 0xd3, 0xda, 0xbb, 0x56, 0x1b, 0x6e, 0x4f,
-- 0xee, 0x73, 0x4b, 0x30, 0x5e, 0x3c, 0x74, 0x07, 0x77, 0xef, 0xd1, 0xf5,
-- 0xcd, 0x05, 0xcc, 0xef, 0x0d, 0x58, 0x67, 0xd5, 0x50, 0xd5, 0xf7, 0x95,
-- 0xa2, 0x33, 0xb4, 0x63, 0xbf, 0xc5, 0xf6, 0x67, 0xc5, 0xf0, 0xc4, 0x98,
-- 0xde, 0x37, 0xfc, 0x63, 0xf1, 0x00, 0xb0, 0x9a, 0xd3, 0x67, 0xc3, 0xab,
-- 0x14, 0x5c, 0x27, 0x05, 0x8b, 0x2b, 0x5d, 0xf4, 0x25, 0x11, 0x14, 0xb4,
-- 0x51, 0x4c, 0xe9, 0x4f, 0x84, 0x47, 0x49, 0xc0, 0x24, 0x3d, 0xcb, 0xf8,
-- 0xad, 0x41, 0x84, 0x2a, 0xfd, 0x29, 0xc9, 0x0d, 0xfa, 0x17, 0x9a, 0x2a,
-- 0x97, 0x80, 0x09, 0xee, 0xcb, 0xe5, 0xc6, 0x4e, 0xc4, 0x7a, 0x3c, 0x74,
-- 0xa3, 0x57, 0x1f, 0xbe, 0x8c, 0xff, 0xb5, 0xb9, 0x98, 0x4d, 0xac, 0x28,
-- 0x4a, 0x5b, 0x5d, 0xd9, 0x85, 0x91, 0xd4, 0x2e, 0xfc, 0x6a, 0xc9, 0xce,
-- 0x2d, 0x57, 0x99, 0x87, 0x47, 0x31, 0xe3, 0xab, 0x28, 0x93, 0x32, 0xa1,
-- 0xae, 0x71, 0xd6, 0xd0, 0x96, 0xb4, 0xbb, 0xd2, 0xfa, 0x71, 0x71, 0xc7,
-- 0x35, 0x4e, 0x2f, 0x2f, 0xf3, 0x31, 0x17, 0xae, 0xf1, 0x70, 0xc0, 0xcc,
-- 0xe2, 0xe5, 0xc1, 0x99, 0x95, 0x55, 0xa2, 0xb9, 0x25, 0x8b, 0xe5, 0x68,
-- 0x4a, 0x77, 0xaf, 0x45, 0xa7, 0xd3, 0xa1, 0xc2, 0x2a, 0x91, 0xf2, 0x84,
-- 0xe6, 0xc4, 0x37, 0x0f, 0xfd, 0xb1, 0x15, 0x11, 0xad, 0xc5, 0xd8, 0x59,
-- 0xa2, 0x9e, 0xa1, 0xd8, 0x2b, 0x87, 0x0d, 0xcf, 0x8a, 0xb9, 0x25, 0xb7,
-- 0x2c, 0x2b, 0x01, 0x87, 0xb4, 0xca, 0xed, 0x6b, 0xe2, 0x69, 0xc8, 0xa7,
-- 0x8a, 0xc6, 0xae, 0x9a, 0x36, 0xde, 0x08, 0x27, 0x33, 0x19, 0x2c, 0xae,
-- 0x17, 0xb6, 0xd3, 0x26, 0xdf, 0x88, 0xf0, 0xa3, 0xe9, 0x14, 0x38, 0x79,
-- 0xa7, 0xdf, 0x9c, 0x0e, 0x93, 0x43, 0x6e, 0x49, 0xc6, 0xa4, 0x72, 0x2b,
-- 0x4c, 0x2e, 0xf4, 0x1d, 0x4d, 0xf6, 0x8a, 0xef, 0xaf, 0x93, 0x92, 0xff,
-- 0x42, 0x6b, 0xfa, 0xa5, 0x58, 0x59, 0xf1, 0x6d, 0xb3, 0x57, 0x6a, 0xc8,
-- 0x82, 0xa6, 0x4f, 0xf1, 0x3b, 0x1d, 0x15, 0x92, 0xa6, 0xdc, 0x36, 0xf9,
-- 0x1e, 0x8a, 0xb2, 0x01, 0xa5, 0x23, 0x6f, 0x26, 0x24, 0x64, 0x41, 0x54,
-- 0x5a, 0xdc, 0x63, 0xff, 0x02, 0xde, 0x28, 0xe2, 0xa4, 0x34, 0x10, 0x90,
-- 0x96, 0x92, 0x9f, 0x0b, 0xc7, 0x93, 0x73, 0x55, 0x0a, 0x88, 0x4c, 0x99,
-- 0x69, 0xf0, 0x62, 0xa1, 0x5e, 0x4f, 0x31, 0x50, 0x54, 0x59, 0xeb, 0xb8,
-- 0x06, 0xea, 0x98, 0x7d, 0xc1, 0x5a, 0x34, 0x8f, 0x85, 0x84, 0x16, 0xda,
-- 0x82, 0xe1, 0xda, 0xff, 0x0d, 0xe7, 0xf9, 0xe0, 0x85, 0x2c, 0x65, 0x02,
-- 0x00,
--};
--#define BUF_SIZE 0x10000
--static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
--{
-- (void) opaque;
-- /* not a typo, keep it calloc() */
-- return (voidpf) calloc(items, size);
--}
--static void zfree_func(voidpf opaque, voidpf ptr)
--{
-- (void) opaque;
-- free(ptr);
--}
--/* Decompress and send to stdout a gzip-compressed buffer */
--void hugehelp(void)
--{
-- unsigned char* buf;
-- int status,headerlen;
-- z_stream z;
--
-- /* Make sure no gzip options are set */
-- if (hugehelpgz[3] & 0xfe)
-- return;
--
-- headerlen = 10;
-- memset(&z, 0, sizeof(z_stream));
-- z.zalloc = (alloc_func)zalloc_func;
-- z.zfree = (free_func)zfree_func;
-- z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
-- z.next_in = (unsigned char *)hugehelpgz + headerlen;
--
-- if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
-- return;
--
-- buf = malloc(BUF_SIZE);
-- if (buf) {
-- while(1) {
-- z.avail_out = BUF_SIZE;
-- z.next_out = buf;
-- status = inflate(&z, Z_SYNC_FLUSH);
-- if (status == Z_OK || status == Z_STREAM_END) {
-- fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
-- if (status == Z_STREAM_END)
-- break;
-- }
-- else
-- break; /* Error */
-- }
-- free(buf);
-- }
-- inflateEnd(&z);
--}
--#endif /* USE_MANUAL */
--#endif /* HAVE_LIBZ */
diff --git a/meta/recipes-support/curl/curl_7.37.0.bb b/meta/recipes-support/curl/curl_7.40.0.bb
index f6b05a7787..d4b4ee3506 100644
--- a/meta/recipes-support/curl/curl_7.37.0.bb
+++ b/meta/recipes-support/curl/curl_7.40.0.bb
@@ -5,44 +5,38 @@ SECTION = "console/network"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
-DEPENDS = "zlib gnutls"
-DEPENDS_class-native = "zlib-native openssl-native"
-DEPENDS_class-nativesdk = "nativesdk-zlib"
-
SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://pkgconfig_fix.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] = "7dda0cc2e4136f78d5801ac347be696b"
-SRC_URI[sha256sum] = "24502492de3168b0556d8e1a06f14f7589e57b204917d602a572e14239b3e09e"
+SRC_URI[md5sum] = "8d30594212e65657a5c32030f0998fa9"
+SRC_URI[sha256sum] = "899109eb3900fa6b8a2f995df7f449964292776a04763e94fae640700f883fba"
inherit autotools pkgconfig binconfig multilib_header
-PACKAGECONFIG ??= "gnutls ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
-PACKAGECONFIG_class-native = "ipv6 ssl"
-PACKAGECONFIG_class-nativesdk = "ipv6"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ssl] = "--with-ssl, --without-ssl, ,"
-PACKAGECONFIG[gnutls] = "--with-gnutls=${STAGING_LIBDIR}/../, --without-gnutls, gnutls,"
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls zlib"
+PACKAGECONFIG_class-native = "ipv6 ssl zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 ssl zlib"
-EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
- --without-libssh2 \
- --with-random=/dev/urandom \
- --without-libidn \
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,samba"
+
+EXTRA_OECONF = "--without-libidn \
--enable-crypto-auth \
--disable-ldap \
--disable-ldaps \
--with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
- "
-
-do_configure_prepend() {
- sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g ${S}/configure.ac
-}
+"
do_install_append() {
oe_multilib_header curl/curlbuild.h
diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb
index 057c9d8425..e8b814e06b 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -42,6 +42,7 @@ PROVIDES += "${VIRTUAL_NAME}"
# persuades bitbake to go to the right place
S = "${WORKDIR}/db-${PV}/dist"
B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
diff --git a/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb
index 9fc4a30a88..47fb296daa 100644
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -42,6 +42,7 @@ PROVIDES += "${VIRTUAL_NAME}"
# persuades bitbake to go to the right place
S = "${WORKDIR}/db-${PV}/dist"
B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
diff --git a/meta/recipes-support/debianutils/debianutils_4.4.bb b/meta/recipes-support/debianutils/debianutils_4.4.bb
new file mode 100644
index 0000000000..346eaf16eb
--- /dev/null
+++ b/meta/recipes-support/debianutils/debianutils_4.4.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.gz"
+SRC_URI[md5sum] = "c0cb076754d7f4eb1e3397d00916647f"
+SRC_URI[sha256sum] = "190850cdd6b5302e0a1ba1aaed1bc7074d67d3bd8d04c613f242f7145afa53a6"
+
+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
+}
+
+ALTERNATIVE_PRIORITY="100"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell run-parts savelog tempfile which"
+
+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/gdbm/gdbm-1.8.3/ldflags.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
new file mode 100644
index 0000000000..770d8f66b9
--- /dev/null
+++ b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
@@ -0,0 +1,22 @@
+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.bb b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
index aecf47afb9..2331d1df3a 100644
--- a/meta/recipes-support/gdbm/gdbm_1.8.3.bb
+++ b/meta/recipes-support/gdbm/gdbm_1.8.3.bb
@@ -8,7 +8,8 @@ PR = "r4"
SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
file://makefile.patch \
- file://libtool-mode.patch"
+ file://libtool-mode.patch \
+ file://ldflags.patch"
SRC_URI[md5sum] = "1d1b1d5c0245b1c00aff92da751e9aa1"
SRC_URI[sha256sum] = "cc340338a2e28b40058ab9eb5354a21d53f88a1582ea21ba0bb185c37a281dc9"
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/configure.patch b/meta/recipes-support/gmp/gmp-4.2.1/configure.patch
deleted file mode 100644
index 7597a935a2..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/configure.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-Upstream-Status: Pending
-
- acinclude.m4 | 26 ++++++++++++++------------
- configure.in | 24 +++++++++---------------
- 2 files changed, 23 insertions(+), 27 deletions(-)
-
-Index: gmp-5.0.3/acinclude.m4
-===================================================================
---- gmp-5.0.3.orig/acinclude.m4
-+++ gmp-5.0.3/acinclude.m4
-@@ -30,29 +30,29 @@ dnl a_out.exe - OpenVMS DEC C called
- dnl conftest.exe - various DOS compilers
-
-
--define(IA64_PATTERN,
-+define([IA64_PATTERN],
- [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
-
- dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
- dnl of which config.sub accepts. (Though none of which are likely to work
- dnl with GMP.)
- dnl
--define(M68K_PATTERN,
-+define([M68K_PATTERN],
- [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
-
--define(POWERPC64_PATTERN,
-+define([POWERPC64_PATTERN],
- [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
-
--define(S390_PATTERN,
-+define([S390_PATTERN],
- [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
-
--define(S390X_PATTERN,
-+define([S390X_PATTERN],
- [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
-
--define(X86_PATTERN,
-+define([X86_PATTERN],
- [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
-
--define(X86_64_PATTERN,
-+define([X86_64_PATTERN],
- [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
-
- dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
-@@ -70,7 +70,7 @@ dnl x86 -> x86
- dnl x86/k6 -> k6
- dnl x86/k6/mmx -> k6_mmx
-
--define(GMP_FAT_SUFFIX,
-+define([GMP_FAT_SUFFIX],
- [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
-
-
-@@ -79,7 +79,7 @@ dnl ----------------------------------
- dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
- dnl shell expression like $foo if desired.
-
--define(GMP_REMOVE_FROM_LIST,
-+define([GMP_REMOVE_FROM_LIST],
- [remove_from_list_tmp=
- for remove_from_list_i in $[][$1]; do
- if test $remove_from_list_i = [$2]; then :;
-@@ -95,12 +95,12 @@ dnl GMP_STRIP_PATH(subdir)
- dnl ----------------------
- dnl Strip entries */subdir from $path and $fat_path.
-
--define(GMP_STRIP_PATH,
-+define([GMP_STRIP_PATH],
- [GMP_STRIP_PATH_VAR(path, [$1])
- GMP_STRIP_PATH_VAR(fat_path, [$1])
- ])
-
--define(GMP_STRIP_PATH_VAR,
-+define([GMP_STRIP_PATH_VAR],
- [tmp_path=
- for i in $[][$1]; do
- case $i in
-@@ -121,7 +121,7 @@ dnl
- dnl Dummy value for GMP_LIMB_BITS is enough
- dnl for all current configure-time uses of gmp.h.
-
--define(GMP_INCLUDE_GMP_H,
-+define([GMP_INCLUDE_GMP_H],
- [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
- #define GMP_NAIL_BITS $GMP_NAIL_BITS
- #define GMP_LIMB_BITS 123
-@@ -136,7 +136,7 @@ dnl Expand at autoconf time to the valu
- dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
- dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
-
--define(GMP_HEADER_GETVAL,
-+define([GMP_HEADER_GETVAL],
- [patsubst(patsubst(
- esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
- [^.*$1[ ]+],[]),
-@@ -150,7 +150,7 @@ dnl The gmp version number, extracted f
- dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
- dnl like 3.0.1 if patchlevel > 0.
-
--define(GMP_VERSION,
-+define([GMP_VERSION],
- [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
-@@ -1512,7 +1512,9 @@ esac
- echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
-
- # All CPUs use asm-defs.m4
--echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
-+echo -n ["include("] >>$gmp_tmpconfigm4i
-+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
-+echo [")"] >>$gmp_tmpconfigm4i
- ])
-
-
-Index: gmp-5.0.3/configure.in
-===================================================================
---- gmp-5.0.3.orig/configure.in
-+++ gmp-5.0.3/configure.in
-@@ -29,12 +29,6 @@ AC_REVISION($Revision$)
- AC_PREREQ(2.59)
- AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
- AC_CONFIG_SRCDIR(gmp-impl.h)
--m4_pattern_forbid([^[ \t]*GMP_])
--m4_pattern_allow(GMP_LDFLAGS)
--m4_pattern_allow(GMP_LIMB_BITS)
--m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
--m4_pattern_allow(GMP_NAIL_BITS)
--m4_pattern_allow(GMP_NUMB_BITS)
-
- # If --target is not used then $target_alias is empty, but if say
- # "./configure athlon-pc-freebsd3.5" is used, then all three of
-@@ -311,7 +305,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
- # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
- # called. User selections of CC etc are respected.
- #
--# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
-+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
- # pre-testing, since they of course depend on AC_PROG_CC, and also some of
- # them cache their results, which is not wanted.
- #
-@@ -403,7 +397,7 @@ abilist="standard"
- # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
- # c89 over cc here. But note that on HP-UX c89 provides a castrated
- # environment, and would want to be excluded somehow. Maybe
--# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
-+# already does enough to stick cc into ANSI mode and
- # we don't need to worry.
- #
- cclist="gcc cc"
-@@ -1666,7 +1660,7 @@ esac
- CFLAGS_or_unset=${CFLAGS-'(unset)'}
- CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
-
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- User:
- ABI=$ABI
- CC=$CC
-@@ -2073,7 +2067,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
-
- # The C compiler and preprocessor, put into ANSI mode if possible.
- AC_PROG_CC
--AC_PROG_CC_STDC
- AC_PROG_CPP
- GMP_H_ANSI
-
-@@ -2096,11 +2089,11 @@ AC_SUBST(CCAS)
-
- # The C++ compiler, if desired.
- want_cxx=no
-+AC_PROG_CXX
- if test $enable_cxx != no; then
- test_CXXFLAGS=${CXXFLAGS+set}
-- AC_PROG_CXX
-
-- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
-+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
- cxxflags_ac_prog_cxx=$CXXFLAGS
- cxxflags_list=ac_prog_cxx
-
-@@ -2206,7 +2199,7 @@ case $host in
- esac
-
-
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- Decided:
- ABI=$ABI
- CC=$CC
-@@ -3465,7 +3458,7 @@ GMP_FINISH
- # FIXME: Upcoming version of autoconf/automake may not like broken lines.
- # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
-
--AC_OUTPUT(Makefile \
-+AC_CONFIG_FILES([Makefile \
- mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
- mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
- tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
-@@ -3474,4 +3467,5 @@ AC_OUTPUT(Makefile \
- tests/cxx/Makefile \
- doc/Makefile tune/Makefile \
- demos/Makefile demos/calc/Makefile demos/expr/Makefile \
-- gmp.h:gmp-h.in mp.h:mp-h.in)
-+ gmp.h:gmp-h.in mp.h:mp-h.in])
-+AC_OUTPUT
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch b/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
deleted file mode 100644
index aaffaf14c5..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-# "extern inline" in traditional gcc means that the function should be
-# inlined wherever it's seen, while in C99, "extern inline" means that i
-# the function should only be inlined where the inline definition is
-# seen while in other places it's not inlined:
-# http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
-#
-# gmp checks "--std=gnu99" to use C99 convention however it internally
-# defines some "extern inline" functions in gmp.h, which is included
-# by mainly .c files and finally lead a flood of redefinition function
-# errors when linking objects together.
-#
-# So disable C99/ANSI detection to stick to tranditional gcc behavior
-#
-# by Kevin Tian <kevin.tian@intel.com>, 2010-08-13
-#
-# (this patch is licensed under GPLv2+)
-
-diff --git a/configure.in b/configure.in
-index 450cc92..aab0b59 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
-
- # The C compiler and preprocessor, put into ANSI mode if possible.
- AC_PROG_CC
--AC_PROG_CC_STDC
- AC_PROG_CPP
--GMP_H_ANSI
-
-
- # The C compiler on the build system, and associated tests.
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 fbd8a39d01..0000000000
--- a/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Upstream-Status: Pending
-
-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
-
-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.inc b/meta/recipes-support/gmp/gmp.inc
index d025e07256..558ee06799 100644
--- a/meta/recipes-support/gmp/gmp.inc
+++ b/meta/recipes-support/gmp/gmp.inc
@@ -4,9 +4,9 @@ DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operati
HOMEPAGE = "http://gmplib.org/"
LICENSE = "GPLv3 LGPLv3"
-REVISION = ""
+REVISION ?= ""
-SRC_URI = "ftp://ftp.gmplib.org/pub/gmp-${PV}/gmp-${PV}${REVISION}.tar.bz2 \
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
file://configure.patch \
file://amd64.patch "
@@ -18,6 +18,9 @@ acpaths = ""
BBCLASSEXTEND = "native nativesdk"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
+
EXTRA_OECONF += " --enable-cxx=detect"
PACKAGES =+ "libgmpxx"
diff --git a/meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
index ae1386c4c1..ae1386c4c1 100644
--- a/meta/recipes-support/gmp/gmp-5.1.1/append_user_provided_flags.patch
+++ b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch
diff --git a/meta/recipes-support/gmp/gmp-5.1.1/configure.patch b/meta/recipes-support/gmp/gmp/configure.patch
index 591ea79051..349da3c6b0 100644
--- a/meta/recipes-support/gmp/gmp-5.1.1/configure.patch
+++ b/meta/recipes-support/gmp/gmp/configure.patch
@@ -4,17 +4,23 @@ Updated to apply to gmp-5.1.0
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gmp-5.1.0/acinclude.m4 gmp-5.1.0/acinclude.m4
---- gmp-5.1.0/acinclude.m4 2012-12-18 21:05:09.000000000 +0200
-+++ gmp-5.1.0/acinclude.m4 2013-01-02 05:19:26.977013073 +0200
-@@ -30,29 +30,29 @@
+---
+ acinclude.m4 | 32 +++++++++++++++++---------------
+ configure.ac | 26 +++++++++-----------------
+ 2 files changed, 26 insertions(+), 32 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 227712a..199aa6f 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -40,29 +40,29 @@ dnl a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
dnl conftest.exe - various DOS compilers
-
-
+
+
-define(IA64_PATTERN,
+define([IA64_PATTERN],
[[ia64*-*-* | itanium-*-* | itanium2-*-*]])
-
+
dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
dnl of which config.sub accepts. (Though none of which are likely to work
dnl with GMP.)
@@ -22,105 +28,106 @@ diff -Nurd gmp-5.1.0/acinclude.m4 gmp-5.1.0/acinclude.m4
-define(M68K_PATTERN,
+define([M68K_PATTERN],
[[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
-
+
-define(POWERPC64_PATTERN,
+define([POWERPC64_PATTERN],
[[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
-
+
-define(S390_PATTERN,
+define([S390_PATTERN],
[[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
-
+
-define(S390X_PATTERN,
+define([S390X_PATTERN],
[[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
-
+
-define(X86_PATTERN,
+define([X86_PATTERN],
[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
-
+
-define(X86_64_PATTERN,
+define([X86_64_PATTERN],
- [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
-
+ [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
+
dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
-@@ -70,7 +70,7 @@
+@@ -80,7 +80,7 @@ dnl x86 -> x86
dnl x86/k6 -> k6
dnl x86/k6/mmx -> k6_mmx
-
+
-define(GMP_FAT_SUFFIX,
+define([GMP_FAT_SUFFIX],
[[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
-
-
-@@ -79,7 +79,7 @@
+
+
+@@ -89,7 +89,7 @@ dnl ----------------------------------
dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
dnl shell expression like $foo if desired.
-
+
-define(GMP_REMOVE_FROM_LIST,
+define([GMP_REMOVE_FROM_LIST],
[remove_from_list_tmp=
for remove_from_list_i in $[][$1]; do
if test $remove_from_list_i = [$2]; then :;
-@@ -95,12 +95,12 @@
+@@ -105,12 +105,12 @@ dnl GMP_STRIP_PATH(subdir)
dnl ----------------------
dnl Strip entries */subdir from $path and $fat_path.
-
+
-define(GMP_STRIP_PATH,
+define([GMP_STRIP_PATH],
[GMP_STRIP_PATH_VAR(path, [$1])
GMP_STRIP_PATH_VAR(fat_path, [$1])
])
-
+
-define(GMP_STRIP_PATH_VAR,
+define([GMP_STRIP_PATH_VAR],
[tmp_path=
for i in $[][$1]; do
case $i in
-@@ -121,7 +121,7 @@
+@@ -131,7 +131,7 @@ dnl
dnl Dummy value for GMP_LIMB_BITS is enough
dnl for all current configure-time uses of gmp.h.
-
+
-define(GMP_INCLUDE_GMP_H,
+define([GMP_INCLUDE_GMP_H],
[[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
#define GMP_NAIL_BITS $GMP_NAIL_BITS
#define GMP_LIMB_BITS 123
-@@ -136,7 +136,7 @@
+@@ -146,7 +146,7 @@ dnl Expand at autoconf time to the value of a "#define NAME" from the given
dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
-
+
-define(GMP_HEADER_GETVAL,
+define([GMP_HEADER_GETVAL],
[patsubst(patsubst(
esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
[^.*$1[ ]+],[]),
-@@ -150,7 +150,7 @@
+@@ -160,7 +160,7 @@ dnl The gmp version number, extracted from the #defines in gmp-h.in at
dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
dnl like 3.0.1 if patchlevel > 0.
-
+
-define(GMP_VERSION,
+define([GMP_VERSION],
[GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
.GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
.GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
-@@ -1512,7 +1512,9 @@
+@@ -1524,7 +1524,9 @@ esac
echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
-
+
# All CPUs use asm-defs.m4
-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
+echo -n ["include("] >>$gmp_tmpconfigm4i
+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
+echo [")"] >>$gmp_tmpconfigm4i
])
-
-
-diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
---- gmp-5.1.0/configure.ac 2012-12-18 21:05:09.000000000 +0200
-+++ gmp-5.1.0/configure.ac 2013-01-02 05:19:26.977013073 +0200
-@@ -29,13 +29,6 @@
+
+
+diff --git a/configure.ac b/configure.ac
+index 64b2c50..f07b821 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
AC_PREREQ(2.59)
- AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
+ AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
AC_CONFIG_SRCDIR(gmp-impl.h)
-m4_pattern_forbid([^[ \t]*GMP_])
-m4_pattern_allow(GMP_LDFLAGS)
@@ -129,10 +136,11 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
-m4_pattern_allow(GMP_NAIL_BITS)
-m4_pattern_allow(GMP_NUMB_BITS)
-m4_pattern_allow(GMP_NONSTD_ABI)
-
+-m4_pattern_allow(GMP_CPU_TYPE)
+
# If --target is not used then $target_alias is empty, but if say
# "./configure athlon-pc-freebsd3.5" is used, then all three of
-@@ -314,7 +307,7 @@
+@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
# called. User selections of CC etc are respected.
#
@@ -141,7 +149,7 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
# pre-testing, since they of course depend on AC_PROG_CC, and also some of
# them cache their results, which is not wanted.
#
-@@ -406,7 +399,7 @@
+@@ -440,7 +432,7 @@ abilist="standard"
# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
# c89 over cc here. But note that on HP-UX c89 provides a castrated
# environment, and would want to be excluded somehow. Maybe
@@ -150,61 +158,65 @@ diff -Nurd gmp-5.1.0/configure.ac gmp-5.1.0/configure.ac
# we don't need to worry.
#
cclist="gcc cc"
-@@ -1727,7 +1720,7 @@
+@@ -1843,7 +1835,7 @@ esac
CFLAGS_or_unset=${CFLAGS-'(unset)'}
CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
-
+
-cat >&AC_FD_CC <<EOF
+cat >&AS_MESSAGE_LOG_FD() <<EOF
User:
ABI=$ABI
CC=$CC
-@@ -2147,7 +2140,6 @@
-
+@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
# The C compiler and preprocessor, put into ANSI mode if possible.
AC_PROG_CC
-AC_PROG_CC_STDC
AC_PROG_CPP
-
-
-@@ -2169,11 +2161,11 @@
-
+
+
+@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
+
# The C++ compiler, if desired.
want_cxx=no
+AC_PROG_CXX
if test $enable_cxx != no; then
test_CXXFLAGS=${CXXFLAGS+set}
- AC_PROG_CXX
-
+
- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
cxxflags_ac_prog_cxx=$CXXFLAGS
cxxflags_list=ac_prog_cxx
-
-@@ -2289,7 +2281,7 @@
+
+@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
fi
-
-
+
+
-cat >&AC_FD_CC <<EOF
+cat >&AS_MESSAGE_LOG_FD() <<EOF
Decided:
ABI=$ABI
CC=$CC
-@@ -3638,7 +3630,7 @@
+@@ -3781,7 +3772,7 @@ GMP_FINISH
# FIXME: Upcoming version of autoconf/automake may not like broken lines.
# Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
-
+
-AC_OUTPUT(Makefile \
+AC_CONFIG_FILES([Makefile \
mpf/Makefile mpn/Makefile mpq/Makefile \
mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
tests/Makefile tests/devel/Makefile \
-@@ -3647,7 +3639,8 @@
+@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile \
tests/cxx/Makefile \
doc/Makefile tune/Makefile \
demos/Makefile demos/calc/Makefile demos/expr/Makefile \
- gmp.h:gmp-h.in)
+ gmp.h:gmp-h.in])
+AC_OUTPUT
-
+
AC_MSG_NOTICE([summary of build options:
+
+--
+1.9.1
+
diff --git a/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
new file mode 100644
index 0000000000..1113b41ecd
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch
@@ -0,0 +1,26 @@
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+This patch with pulled from gmp.
+https://gmplib.org/repo/gmp/rev/4a6d258b467f
+Upstream-Status: Backport
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1395835068 -3600
+# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
+# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a
+Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
+
+diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
+--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100
++++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100
+@@ -43,6 +43,9 @@
+ define(`n', `r4')
+ define(`v0', `r5')
+
++ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
++ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
++
+ EXTERN_FUNC(mpn_mod_1)
+ EXTERN_FUNC(mpn_modexact_1c_odd)
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 5c93925daa..0000000000
--- a/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "GNU multiprecision arithmetic library"
-DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
-HOMEPAGE = "http://gmplib.org/"
-BUGTRACKER = "http://gmplib.org/mailman/listinfo/gmp-bugs"
-# demo is licensed under GPLv2+, which however we don't package at all
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
- file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
- file://gmp-h.in;beginline=6;endline=21;md5=e056f74a12c3277d730dbcfb85d2ca34"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/gmp/${BP}.tar.bz2 \
- file://disable-stdc.patch \
- file://gmp_fix_for_automake-1.12.patch \
- "
-
-SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
-SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
-
-inherit autotools texinfo
diff --git a/meta/recipes-support/gmp/gmp_5.1.1.bb b/meta/recipes-support/gmp/gmp_5.1.1.bb
deleted file mode 100644
index 602061096a..0000000000
--- a/meta/recipes-support/gmp/gmp_5.1.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require gmp.inc
-LICENSE="LGPLv3&GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://version.c;endline=18;md5=d8c56b52b9092346b9f93b4da65ef790"
-
-SRC_URI_append = " file://use-includedir.patch \
- file://append_user_provided_flags.patch \
- "
-
-SRC_URI[md5sum] = "2fa018a7cd193c78494525f236d02dd6"
-SRC_URI[sha256sum] = "a0d4779f48b36519dfaceb5f987a7c76fcac223258bebea3bb2244310970afad"
diff --git a/meta/recipes-support/gmp/gmp_6.0.0.bb b/meta/recipes-support/gmp/gmp_6.0.0.bb
new file mode 100644
index 0000000000..6218491142
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp_6.0.0.bb
@@ -0,0 +1,14 @@
+require gmp.inc
+LICENSE="GPLv2 | LGPLv3"
+REVISION="a"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+SRC_URI_append = " file://use-includedir.patch \
+ file://append_user_provided_flags.patch \
+ file://gmp-6.0.0-ppc64.patch \
+"
+
+SRC_URI[md5sum] = "b7ff2d88cae7f8085bd5006096eed470"
+SRC_URI[sha256sum] = "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
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
new file mode 100644
index 0000000000..840666f302
--- /dev/null
+++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
@@ -0,0 +1,35 @@
+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_2014.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
index 146a02ac7d..482de99d4d 100644
--- 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
@@ -2,7 +2,9 @@ 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"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
+ file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
+ "
SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
@@ -11,7 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
DEPENDS = "glib-2.0"
-inherit autotools-brokensep pkgconfig
+inherit autotools pkgconfig
+
+PR = "r1"
PACKAGECONFIG ??= ""
PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,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
new file mode 100644
index 0000000000..c9addca28e
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
@@ -0,0 +1,62 @@
+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
+
+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/dirmngr-uses-libgpg-error.patch b/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
new file mode 100644
index 0000000000..3dc506c2f2
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
@@ -0,0 +1,16 @@
+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
+@@ -71,7 +71,8 @@ endif
+ dirmngr_LDADD = $(libcommontlsnpth) $(libcommonpth) \
+ ../gl/libgnu.a $(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_LDAPWRAPPER
+ dirmngr_LDADD += $(ldaplibs)
+ endif
diff --git a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
index ae92392dae..5e036bac90 100644
--- a/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
+++ b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
@@ -5,11 +5,11 @@ Upstream-Status: Rejected
RP 2014/5/22
-Index: gnupg-2.0.22/m4/gnupg-pth.m4
+Index: gnupg-2.1.0/m4/gnupg-pth.m4
===================================================================
---- gnupg-2.0.22.orig/m4/gnupg-pth.m4 2013-10-04 12:32:53.000000000 +0000
-+++ gnupg-2.0.22/m4/gnupg-pth.m4 2014-05-13 21:33:21.000000000 +0000
-@@ -17,33 +17,9 @@
+--- 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],
[
@@ -44,7 +44,7 @@ Index: gnupg-2.0.22/m4/gnupg-pth.m4
if test $have_pth = yes; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([whether PTH installation is sane])
-@@ -51,9 +29,9 @@
+@@ -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
@@ -57,30 +57,34 @@ Index: gnupg-2.0.22/m4/gnupg-pth.m4
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
],
[[ pth_init ();]])],
-@@ -81,23 +59,11 @@
+@@ -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]),
+- [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
+- 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,
++ 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/use-pkgconfig-instead-of-npth-config.patch b/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
new file mode 100644
index 0000000000..c6dbf1b75a
--- /dev/null
+++ b/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
@@ -0,0 +1,72 @@
+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
index 031eaf3cab..aef515d534 100644
--- a/meta/recipes-support/gnupg/gnupg_1.4.7.bb
+++ b/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -17,6 +17,7 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \
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"
@@ -95,3 +96,7 @@ FILES_gpgv = "${bindir}/gpgv"
# Exclude debug files from the main packages
FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
FILES_${PN}-dbg += "${libexecdir}/${BPN}/.debug"
+
+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.0.23.bb b/meta/recipes-support/gnupg/gnupg_2.1.1.bb
index 30414f943c..a7c42545bd 100644
--- a/meta/recipes-support/gnupg/gnupg_2.0.23.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.1.1.bb
@@ -4,25 +4,26 @@ LICENSE = "GPLv3 & LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "${PTH} libassuan libksba zlib bzip2 readline libgcrypt"
-PTH = "pth"
-PTH_libc-uclibc = "npth"
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
inherit autotools gettext texinfo pkgconfig
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://pkgconfig.patch"
+ file://pkgconfig.patch \
+ file://use-pkgconfig-instead-of-npth-config.patch \
+ file://dirmngr-uses-libgpg-error.patch \
+ "
-SRC_URI[md5sum] = "1c30b3aa1f99f17b4988e1ab616355d4"
-SRC_URI[sha256sum] = "cf196b8056eafb4236f000a3e12543e0022a1fec4d6edff1b91b48936c109841"
+SRC_URI[md5sum] = "9a314c3dcef0a091de90b6aa4d467db5"
+SRC_URI[sha256sum] = "70ecd01d2875db62624c911c2fd815742f50aef5492698eb3bfc09a08690ce49"
EXTRA_OECONF = "--disable-ldap \
--disable-ccid-driver \
- --without-libcurl \
--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
@@ -36,3 +37,5 @@ do_install_append() {
ln -sf gpg2 ${D}${bindir}/gpg
ln -sf gpgv2 ${D}${bindir}/gpgv
}
+
+RDEPENDS_${PN} = "gnutls"
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
index 8820b0ef39..45fb529fa1 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -17,7 +17,7 @@ SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
-inherit autotools-brokensep texinfo binconfig pkgconfig gettext lib_package
+inherit autotools texinfo binconfig pkgconfig gettext lib_package
EXTRA_OECONF="--disable-rpath \
--with-included-libtasn1 \
@@ -25,6 +25,7 @@ EXTRA_OECONF="--disable-rpath \
--with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
--with-libz-prefix=${STAGING_DIR_HOST}${prefix} \
--disable-guile \
+ --disable-crywrap \
--without-p11-kit \
"
@@ -34,6 +35,9 @@ do_configure_prepend() {
done
}
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers"
+
PACKAGES =+ "${PN}-openssl ${PN}-xx"
FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
@@ -42,4 +46,4 @@ FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
LDFLAGS_append_libc-uclibc += " -pthread"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch b/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
new file mode 100644
index 0000000000..44a9934b5d
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
@@ -0,0 +1,31 @@
+From eb93aa7b986c84da60a3db40afb29d1a70c50223 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 17 Jan 2015 17:02:15 +0000
+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>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c6818a0..1c4582d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -466,7 +466,7 @@ if test "$NEED_LIBOPTS_DIR" = "true";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.0.1
+
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.12.bb b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
new file mode 100644
index 0000000000..0d6ec756e6
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
@@ -0,0 +1,7 @@
+require gnutls.inc
+
+SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
+ file://configure.ac-fix-sed-command.patch \
+ "
+SRC_URI[md5sum] = "a37b20b4352a5f542367ded904729c90"
+SRC_URI[sha256sum] = "67ab3e92c5d48f3323b897d7c1aa0bb2af6f3a84f5bd9931cda163a7ff32299b"
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.5.bb b/meta/recipes-support/gnutls/gnutls_3.3.5.bb
deleted file mode 100644
index b3daa49249..0000000000
--- a/meta/recipes-support/gnutls/gnutls_3.3.5.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
- "
-
-SRC_URI[md5sum] = "1f396dcf3c14ea67de7243821006d1a2"
-SRC_URI[sha256sum] = "48f34ae032692c498e782e9f1369506572be40ecf7f3f3604b0b00bad1b10477"
diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
new file mode 100644
index 0000000000..30a4d56d6e
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc
@@ -0,0 +1,10 @@
+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_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
index ef08d4f2f4..ca1e5f9344 100644
--- a/meta/recipes-support/gpgme/gpgme_1.4.3.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
- file://disable_gpgconf_check.patch"
+ file://disable_gpgconf_check.patch \
+ file://gpgme.pc"
SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"
@@ -32,3 +33,8 @@ do_configure_prepend () {
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 77321076d5..26994bb901 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -7,6 +7,7 @@ DEPENDS = "icu-native"
DEPENDS_class-native = ""
S = "${WORKDIR}/icu/source"
+SPDX_S = "${WORKDIR}/icu"
STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
PARALLEL_MAKE = ""
@@ -24,7 +25,7 @@ EXTRA_OECONF_class-native = ""
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
# ICU puts custom m4 autoconf functions in aclocal.m4.
-# However, this file is deleted in our build system.
+# However, this file is deleted in our build system.
# To make it work, we copy aclocal.m4 to acinclude.m4.
# This is a bug of ICU. See bug reference:
# http://bugs.icu-project.org/trac/ticket/9790
diff --git a/meta/recipes-support/icu/icu_53.1.bb b/meta/recipes-support/icu/icu_54.1.bb
index d93af68438..45b5cb6001 100644
--- a/meta/recipes-support/icu/icu_53.1.bb
+++ b/meta/recipes-support/icu/icu_54.1.bb
@@ -1,6 +1,6 @@
require icu.inc
-LIC_FILES_CHKSUM = "file://../license.html;md5=8b139ac5b93769623bd343318048238c"
+LIC_FILES_CHKSUM = "file://../license.html;md5=9890f5ff4ed056a0c2fa84848b9b6066"
def icu_download_version(d):
pvsplit = d.getVar('PV', True).split('.')
@@ -16,6 +16,6 @@ SRC_URI = "${BASE_SRC_URI} \
SRC_URI_append_class-target = "\
file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
"
+SRC_URI[md5sum] = "e844caed8f2ca24c088505b0d6271bc0"
+SRC_URI[sha256sum] = "d42bc9a8ca6a91c55eb0925c279f49e5b508d51ef26ac9850d9be55de5bb8ab3"
-SRC_URI[md5sum] = "b73baa6fbdfef197608d1f69300919b9"
-SRC_URI[sha256sum] = "6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28"
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 4f968812c9..f130d85652 100644
--- a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
+++ b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -6,18 +6,18 @@ Upstream-Status: Rejected
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: libassuan-2.1.1/Makefile.am
+Index: libassuan-2.1.2/Makefile.am
===================================================================
---- libassuan-2.1.1.orig/Makefile.am 2014-05-13 20:57:37.794398357 +0000
-+++ libassuan-2.1.1/Makefile.am 2014-05-13 20:57:37.790398357 +0000
-@@ -24,10 +24,13 @@
+--- 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 = config.rpath autogen.sh README.GIT \
+ 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
@@ -25,10 +25,10 @@ Index: libassuan-2.1.1/Makefile.am
SUBDIRS = m4 src doc tests
-Index: libassuan-2.1.1/libassuan.pc.in
+Index: libassuan-2.1.2/libassuan.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libassuan-2.1.1/libassuan.pc.in 2014-05-13 20:57:37.790398357 +0000
+--- /dev/null
++++ libassuan-2.1.2/libassuan.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -44,11 +44,11 @@ Index: libassuan-2.1.1/libassuan.pc.in
+Libs: -L${libdir} -lassuan
+Libs.private: -lgpg-error
+Cflags: -I${includedir}
-Index: libassuan-2.1.1/configure.ac
+Index: libassuan-2.1.2/configure.ac
===================================================================
---- libassuan-2.1.1.orig/configure.ac 2014-05-13 20:57:37.794398357 +0000
-+++ libassuan-2.1.1/configure.ac 2014-05-13 20:57:37.790398357 +0000
-@@ -434,7 +434,7 @@
+--- 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])
@@ -57,11 +57,11 @@ Index: libassuan-2.1.1/configure.ac
AC_OUTPUT
echo "
-Index: libassuan-2.1.1/src/libassuan.m4
+Index: libassuan-2.1.2/src/libassuan.m4
===================================================================
---- libassuan-2.1.1.orig/src/libassuan.m4 2011-04-06 15:37:26.000000000 +0000
-+++ libassuan-2.1.1/src/libassuan.m4 2014-05-13 21:06:53.402395537 +0000
-@@ -15,18 +15,6 @@
+--- 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.
dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -80,7 +80,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
tmp=ifelse([$1], ,1:0.9.2,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-@@ -37,51 +25,12 @@
+@@ -37,51 +25,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
min_libassuan_version="$tmp"
fi
@@ -134,7 +134,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBASSUAN API version])
if test "$req_libassuan_api" -eq "$tmp" ; then
-@@ -96,7 +45,7 @@
+@@ -96,7 +45,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
if test $ok = yes; then
if test x"$host" != x ; then
@@ -143,7 +143,7 @@ Index: libassuan-2.1.1/src/libassuan.m4
if test x"$libassuan_config_host" != xnone ; then
if test x"$libassuan_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -137,12 +86,8 @@
+@@ -137,12 +86,8 @@ dnl
AC_DEFUN([AM_PATH_LIBASSUAN],
[ _AM_PATH_LIBASSUAN_COMMON($1)
if test $ok = yes; then
diff --git a/meta/recipes-support/libassuan/libassuan_2.1.1.bb b/meta/recipes-support/libassuan/libassuan_2.2.0.bb
index d66023320d..5fc8b8c92f 100644
--- a/meta/recipes-support/libassuan/libassuan_2.1.1.bb
+++ b/meta/recipes-support/libassuan/libassuan_2.2.0.bb
@@ -13,8 +13,8 @@ DEPENDS = "libgpg-error"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
file://libassuan-add-pkgconfig-support.patch"
-SRC_URI[md5sum] = "757243cc4a71b30ed8d8dbe784035d36"
-SRC_URI[sha256sum] = "23e2d67779b88e90d29fe1df6b157109f1c2a647d0f1b2a0f4295bb3c0b2039d"
+SRC_URI[md5sum] = "a104faed3e97b9c302c5d67cc22b1d60"
+SRC_URI[sha256sum] = "7df58ed70be4b694f77efd1f3b3f103c6311b6b71e04a370382f9fe8204f6ec6"
BINCONFIG = "${bindir}/libassuan-config"
@@ -22,5 +22,5 @@ inherit autotools texinfo binconfig-disabled pkgconfig
do_configure_prepend () {
# Else these could be used in prefernce to those in aclocal-copy
- rm ${S}/m4/*.m4
+ rm -f ${S}/m4/*.m4
}
diff --git a/meta/recipes-support/libbsd/libbsd_0.6.0.bb b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
index 70926bf742..902666da7f 100644
--- a/meta/recipes-support/libbsd/libbsd_0.6.0.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.7.0.bb
@@ -9,12 +9,13 @@ DESCRIPTION = "This library provides useful functions commonly found on BSD syst
HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
LICENSE = "BSD-4-Clause & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=98a015f07e71239b058398054f506f07"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f1530ea92aeaa1c5e2547cfd43905d8c"
SECTION = "libs"
DEPENDS = ""
SRC_URI = "http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "f6c75f0a9818e323a589bcbd560a0eb4"
-SRC_URI[sha256sum] = "9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62"
+
+SRC_URI[md5sum] = "fcceb4e66fd448ca4ed42ba22a8babb0"
+SRC_URI[sha256sum] = "0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb"
inherit autotools pkgconfig
diff --git a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
deleted file mode 100644
index a5571883d3..0000000000
--- a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-fix CAP_LAST_CAP
-
-Upstream-Status: pending
-
-Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into
-kernel, but libcap did not update them.
-Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and
-application always use capability.h from kernel, that will make cap_get_flag
-return wrong value.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- libcap/include/linux/capability.h | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h
-index 4924f2a..57026be 100644
---- a/libcap/include/linux/capability.h
-+++ b/libcap/include/linux/capability.h
-@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data {
- CAP_SYS_ADMIN is not acceptable anymore. */
- #define CAP_SYSLOG 34
-
--#define CAP_LAST_CAP CAP_SYSLOG
-+/* Allow triggering something that will wake the system */
-+
-+#define CAP_WAKE_ALARM 35
-+
-+/* Allow preventing system suspends */
-+
-+#define CAP_BLOCK_SUSPEND 36
-+
-+#define CAP_LAST_CAP CAP_BLOCK_SUSPEND
-
- #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
-
---
-1.7.10.4
-
diff --git a/meta/recipes-support/libcap/libcap_2.22.bb b/meta/recipes-support/libcap/libcap_2.22.bb
deleted file mode 100644
index a989bb6a6b..0000000000
--- a/meta/recipes-support/libcap/libcap_2.22.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require libcap.inc
-
-PR = "r6"
-
-SRC_URI[md5sum] = "b4896816b626bea445f0b3849bdd4077"
-SRC_URI[sha256sum] = "e1cae65d8febf2579be37c255d2e058715785ead481a4e6a4357a06aff84721f"
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap_2.24.bb
index a21420fd9b..75cf5d415d 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap_2.24.bb
@@ -7,10 +7,10 @@ LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
DEPENDS = "perl-native-runtime"
-SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
- file://fix-CAP_LAST_CAP.patch"
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
-PR = "r1"
+SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80"
+SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65"
inherit lib_package
@@ -56,8 +56,10 @@ 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}/* ${D}${base_libdir}
- rmdir ${D}${libdir}
+ mv ${D}${libdir}/libcap* ${D}${base_libdir}
+ if [ -d ${D}${libdir}/security ]; then
+ mv ${D}${libdir}/security ${D}${base_libdir}
+ fi
fi
}
@@ -67,4 +69,4 @@ FILES_${PN}-dev += "${base_libdir}/*.so"
FILES_${PN} += "${base_libdir}/security/*.so"
FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcheck/libcheck_0.9.13.bb b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
index 8c063d4696..2a69ff7733 100644
--- a/meta/recipes-support/libcheck/libcheck_0.9.13.bb
+++ b/meta/recipes-support/libcheck/libcheck_0.9.14.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
"
-SRC_URI[md5sum] = "95530868f81a9496b2518fd2b713008a"
-SRC_URI[sha256sum] = "ca6589c34f9c60ffd4c3e198ce581e944a9f040ca9352ed54068dd61bebb5cb7"
+SRC_URI[md5sum] = "38263d115d784c17aa3b959ce94be8b8"
+SRC_URI[sha256sum] = "c272624645b1b738cf57fd5d81a3e4d9b722b99d6133ee3f3c4007d4d279840a"
S = "${WORKDIR}/check-${PV}"
diff --git a/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
index 278934e68d..88696a4f47 100644
--- a/meta/recipes-support/libcroco/libcroco_0.6.8.bb
+++ b/meta/recipes-support/libcroco/libcroco_0.6.8.bb
@@ -11,11 +11,11 @@ SECTION = "x11/utils"
DEPENDS = "glib-2.0 libxml2 zlib"
BBCLASSEXTEND = "native"
EXTRA_OECONF += "--enable-Bsymbolic=auto"
-PR = "r1"
+PR = "r2"
BINCONFIG = "${bindir}/croco-0.6-config"
-inherit autotools-brokensep pkgconfig gnomebase gtk-doc binconfig-disabled
+inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
GNOME_COMPRESS_TYPE = "xz"
diff --git a/meta/recipes-support/libevdev/libevdev_1.3.bb b/meta/recipes-support/libevdev/libevdev_1.3.bb
new file mode 100644
index 0000000000..7206b307e0
--- /dev/null
+++ b/meta/recipes-support/libevdev/libevdev_1.3.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] = "ab67de8f949e84ae2abb48af09eda423"
+SRC_URI[sha256sum] = "265411ce79a592b3074e9d07fb97d462745d0c7ef178254a6f720245ed253446"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
deleted file mode 100644
index 5d39d1954d..0000000000
--- a/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix make parallelism issue
-
-- remove pkginclude_HEADERS ( LIBFM_INCLUDES and LIBFM_GTK_INCLUDES
-variables are empty)
-- if we don't remove it then we will have a race condition between the code
-that tries to symlink ${includedir}/libfm-1.0 to ${includedir}/libfm and the
-am autogenerated code from the pkginclude_HEADERS definition which
-tries to create pkgincludedir (${includedir}/libfm);
-- if pkgincludedir is created before the symlink the symlink will be created
-in the ${includedir}/libfm dir and it will have libfm-1.0 as name which is
-wrong (we need the ${includedir}/libfm symlink for pcmanfm)
-
-Upstream-Status: Pending
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: libfm-1.1.0/src/Makefile.am
-===================================================================
---- libfm-1.1.0.orig/src/Makefile.am
-+++ libfm-1.1.0/src/Makefile.am
-@@ -211,11 +211,6 @@ libfmgtkinclude_HEADERS = \
- gtk/fm-gtk-marshal.h \
- $(NULL)
-
--pkginclude_HEADERS = \
-- $(LIBFM_INCLUDES) \
-- $(LIBFM_GTK_INCLUDES) \
-- $(NULL)
--
- EXTRA_LTLIBRARIES = libfm-gtk.la libfm-gtk3.la
-
- lib_LTLIBRARIES = libfm.la @LIBFM_GTK_LTLIBRARIES@
diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
deleted file mode 100644
index 58a2f09d66..0000000000
--- a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libfm-1.1.2.2/configure.ac libfm-1.1.2.2/configure.ac
---- libfm-1.1.2.2/configure.ac 2013-08-22 23:16:09.000000000 +0300
-+++ libfm-1.1.2.2/configure.ac 2013-10-25 01:35:18.110323079 +0300
-@@ -3,7 +3,7 @@
-
- AC_PREREQ([2.63])
- AC_INIT([libfm], [1.1.2.2], [http://pcmanfm.sourceforge.net/])
--AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-+AM_INIT_AUTOMAKE([-Wall foreign])
- AC_CONFIG_MACRO_DIR(m4)
- AC_CONFIG_HEADERS([config.h])
diff --git a/meta/recipes-support/libfm/libfm-extra_1.2.3.bb b/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
new file mode 100644
index 0000000000..85bcc3c0c3
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm-extra_1.2.3.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 intltool-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/meta/recipes-support/libfm/libfm_1.1.2.2.bb b/meta/recipes-support/libfm/libfm_1.1.2.2.bb
deleted file mode 100644
index 10f31d9911..0000000000
--- a/meta/recipes-support/libfm/libfm_1.1.2.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://src/fm.h;endline=22;md5=e64555171770a551e3b51cc06fc62f1a \
- file://src/base/fm-config.h;endline=23;md5=ad0fc418c3cf041eea35ddb3daf37f17"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.gz \
- file://fix-make-parallelism-issue.patch \
- file://ignore_automake_warnings.patch \
- "
-
-SRC_URI[md5sum] = "ea3d09b23ef4c37cb84ae57ea16b8f08"
-SRC_URI[sha256sum] = "158e2b6974350d2dab15932b496bb4d448553e60bbf7cdfe4d6e9bd99d19d682"
-
-inherit autotools-brokensep pkgconfig gtk-doc
-
-do_configure[dirs] =+ "${S}/m4"
-
-PACKAGES += "${PN}-mime"
-FILES_${PN}-mime = "${datadir}/mime/"
diff --git a/meta/recipes-support/libfm/libfm_1.2.3.bb b/meta/recipes-support/libfm/libfm_1.2.3.bb
new file mode 100644
index 0000000000..629502f68f
--- /dev/null
+++ b/meta/recipes-support/libfm/libfm_1.2.3.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ 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+ menu-cache intltool-native libexif libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES += "${PN}-mime"
+FILES_${PN}-mime = "${datadir}/mime/"
+FILES_${PN}-dbg += "${libdir}/libfm/modules/.debug"
+
+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/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
index fa2bc38284..eea67aa58d 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -18,13 +18,15 @@ SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
BINCONFIG = "${bindir}/libgcrypt-config"
-inherit autotools-brokensep texinfo binconfig-disabled pkgconfig
+PR = "r1"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
EXTRA_OECONF = "--disable-asm --with-capabilities"
do_configure_prepend () {
- # Else these could be used in prefernce to those in aclocal-copy
- rm -f ${S}/m4/*.m4
+ # 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
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
deleted file mode 100644
index 1657ea4de4..0000000000
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require libgcrypt.inc
-
-SRC_URI[md5sum] = "d155aa1b06fa879175922ba28f6a6509"
-SRC_URI[sha256sum] = "7c1007197bef49c3b8740cf6af8b4eb4eb74c7a69796ebcf555d928c287255de"
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb
new file mode 100644
index 0000000000..c49c0e7c17
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.6.2.bb
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "d19adc062edff0ebc7e887212733ef1f"
+SRC_URI[sha256sum] = "936921644b9c81e2395e18a554a9a5f9252aae3976f8afc3e4229ee9d785e627"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
index 2a2c1e9c21..96476badaa 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch
+++ b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
@@ -5,11 +5,11 @@
Upstream-Status: Pending
-Index: libgpg-error-1.12/configure.ac
+Index: libgpg-error-1.17/configure.ac
===================================================================
---- libgpg-error-1.12.orig/configure.ac 2014-05-13 21:14:26.846393236 +0000
-+++ libgpg-error-1.12/configure.ac 2014-05-13 21:14:26.926393236 +0000
-@@ -217,6 +217,7 @@
+--- libgpg-error-1.17.orig/configure.ac
++++ libgpg-error-1.17/configure.ac
+@@ -521,6 +521,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])
AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
@@ -17,11 +17,11 @@ Index: libgpg-error-1.12/configure.ac
AC_OUTPUT
-Index: libgpg-error-1.12/src/Makefile.am
+Index: libgpg-error-1.17/src/Makefile.am
===================================================================
---- libgpg-error-1.12.orig/src/Makefile.am 2014-05-13 21:14:26.846393236 +0000
-+++ libgpg-error-1.12/src/Makefile.am 2014-05-13 21:14:26.934393236 +0000
-@@ -37,13 +37,15 @@
+--- libgpg-error-1.17.orig/src/Makefile.am
++++ libgpg-error-1.17/src/Makefile.am
+@@ -74,13 +74,15 @@ nodist_include_HEADERS = gpg-error.h
bin_SCRIPTS = gpg-error-config
m4datadir = $(datadir)/aclocal
m4data_DATA = gpg-error.m4
@@ -31,17 +31,17 @@ Index: libgpg-error-1.12/src/Makefile.am
EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
mkerrnos.awk errnos.in README \
mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
- mkheader.awk gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
+ 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.def.in versioninfo.rc.in
-+ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in
+- gpg-error.vers gpg-error.def.in versioninfo.rc.in \
++ gpg-error.vers gpg-error.def.in versioninfo.rc.in gpg-error.pc \
+ $(lock_obj_pub)
BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
- err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
-Index: libgpg-error-1.12/src/gpg-error.pc.in
+Index: libgpg-error-1.17/src/gpg-error.pc.in
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libgpg-error-1.12/src/gpg-error.pc.in 2014-05-13 21:48:20.266382916 +0000
+--- /dev/null
++++ libgpg-error-1.17/src/gpg-error.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -52,13 +52,13 @@ Index: libgpg-error-1.12/src/gpg-error.pc.in
+Name: gpg-error
+Description: a library that defines common error values for all GnuPG components
+Version: @VERSION@
-+Libs: -L{libdir} -lgpg-error
++Libs: -L${libdir} -lgpg-error
+Cflags: -I${includedir}
-Index: libgpg-error-1.12/src/gpg-error.m4
+Index: libgpg-error-1.17/src/gpg-error.m4
===================================================================
---- libgpg-error-1.12.orig/src/gpg-error.m4 2014-05-13 21:45:02.038383922 +0000
-+++ libgpg-error-1.12/src/gpg-error.m4 2014-05-13 21:47:08.362383281 +0000
-@@ -15,58 +15,14 @@
+--- 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
dnl
AC_DEFUN([AM_PATH_GPG_ERROR],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -70,7 +70,7 @@ Index: libgpg-error-1.12/src/gpg-error.m4
- 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.
@@ -78,14 +78,27 @@ Index: libgpg-error-1.12/src/gpg-error.m4
- [gpg_error_config_prefix="$withval"])
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
-- if test x$gpg_error_config_prefix != x ; then
-- if test x${GPG_ERROR_CONFIG+set} != xset ; then
-- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+- 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
+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
-- AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, 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)
- ok=no
@@ -113,6 +126,8 @@ Index: libgpg-error-1.12/src/gpg-error.m4
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`
@@ -120,12 +135,14 @@ Index: libgpg-error-1.12/src/gpg-error.m4
if test x"$gpg_error_config_host" != xnone ; then
if test x"$gpg_error_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -80,9 +36,6 @@
+@@ -107,11 +47,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/libgpg-error/libgpg-error_1.12.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
deleted file mode 100644
index af9574d8fd..0000000000
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb
+++ /dev/null
@@ -1,31 +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=6ac0378874589a44d53512b3786b4bc0 \
- file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c"
-
-
-SECTION = "libs"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
- file://pkgconfig.patch"
-
-SRC_URI[md5sum] = "8f0eb41a344d19ac2aa9bd101dfb9ce6"
-SRC_URI[sha256sum] = "cafc9ed6a87c53a35175d5a1220a96ca386696eef2fa059cc0306211f246e55f"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-
-do_install_append() {
- # we don't have common lisp in OE
- rm -rf "${D}${datadir}/common-lisp/"
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb
new file mode 100644
index 0000000000..c905bd1eb1
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.17.bb
@@ -0,0 +1,56 @@
+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=5dfe776dc8b62af093ddc859de6f494c \
+ file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
+
+
+SECTION = "libs"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch"
+
+SRC_URI[md5sum] = "b4f8d8b9ff14aed41f279aa844563539"
+SRC_URI[sha256sum] = "3ff4e5a71116eb862cd14185fcd282850927b8608e3b4186834fd940fbef57b5"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext
+
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${TARGET_OS} != "linux" ]; then
+ TARGET_FILE=${TARGET_OS}
+ fi
+
+ case ${TARGET_ARCH} in
+ aarch64) TUPLE=aarch64-unknown-linux-gnu ;;
+ arm) TUPLE=arm-unknown-linux-gnueabi ;;
+ armeb) TUPLE=arm-unknown-linux-gnueabi ;;
+ i586) TUPLE=i486-pc-linux-gnu ;;
+ mipsel) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips64el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips64) TUPLE=mips-unknown-linux-gnu ;;
+ mips) TUPLE=mips-unknown-linux-gnu ;;
+ powerpc64) TUPLE=powerpc64-unknown-linux-gnu ;;
+ powerpc) TUPLE=powerpc-unknown-linux-gnu ;;
+ sh4) TUPLE=sh4-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-pc-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/libical/files/pthread-fix.patch b/meta/recipes-support/libical/files/pthread-fix.patch
deleted file mode 100644
index 877b808fc0..0000000000
--- a/meta/recipes-support/libical/files/pthread-fix.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-New added pthread feature leads to some deadlock with some unlock code missing.
-This patch fix it.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Pending
-
-Index: libical-0.47/src/libical/icaltimezone.c
-===================================================================
---- libical-0.47.orig/src/libical/icaltimezone.c 2011-12-16 13:42:25.000000000 +0800
-+++ libical-0.47/src/libical/icaltimezone.c 2011-12-16 14:16:25.000000000 +0800
-@@ -1773,7 +1773,7 @@
- filename = (char*) malloc (filename_len);
- if (!filename) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
-- return;
-+ goto out;
- }
-
- snprintf (filename, filename_len, "%s/%s.ics", get_zone_directory(),
-@@ -1783,7 +1783,7 @@
- free (filename);
- if (!fp) {
- icalerror_set_errno(ICAL_FILE_ERROR);
-- return;
-+ goto out;
- }
-
-
-@@ -1807,7 +1807,7 @@
-
- if (!subcomp) {
- icalerror_set_errno(ICAL_PARSE_ERROR);
-- return;
-+ goto out;
- }
-
- icaltimezone_get_vtimezone_properties (zone, subcomp);
-@@ -1817,10 +1817,12 @@
- icalcomponent_free(comp);
- }
- #endif
--#ifdef HAVE_PTHREAD
-+
- out:
-+#ifdef HAVE_PTHREAD
- pthread_mutex_unlock(&builtin_mutex);
- #endif
-+ return;
- }
-
-
diff --git a/meta/recipes-support/libical/libical_0.48.bb b/meta/recipes-support/libical/libical_0.48.bb
deleted file mode 100644
index f464026f8c..0000000000
--- a/meta/recipes-support/libical/libical_0.48.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
-HOMEPAGE = "http://sourceforge.net/projects/freeassociation/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16077&atid=116077"
-LICENSE = "LGPLv2.1 | MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
- file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
-SECTION = "libs"
-
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/freeassociation/${BPN}/${P}/${BPN}-${PV}.tar.gz\
- file://pthread-fix.patch"
-
-SRC_URI[md5sum] = "e549f434d5fbf9cd156c60ed4943618f"
-SRC_URI[sha256sum] = "2ae78b0757f0dd13431acf42a9a8d038339fd4767fd5134e650bf60ee0b4dff0"
-
-inherit autotools
diff --git a/meta/recipes-support/libical/libical_1.0.0.bb b/meta/recipes-support/libical/libical_1.0.0.bb
new file mode 100644
index 0000000000..be6b635caf
--- /dev/null
+++ b/meta/recipes-support/libical/libical_1.0.0.bb
@@ -0,0 +1,13 @@
+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}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36"
+SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2"
+
+inherit autotools
diff --git a/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
index c52564a42c..abf739bfa1 100644
--- a/meta/recipes-support/libiconv/libiconv_1.11.1.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.11.1.bb
@@ -21,8 +21,8 @@ S = "${WORKDIR}/libiconv-${PV}"
inherit autotools pkgconfig gettext
python __anonymous() {
- if d.getVar("TCLIBC", True) == "eglibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - eglibc already provides iconv")
+ 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"
diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
index d5f47b4e34..1b6fe09bb7 100644
--- a/meta/recipes-support/libiconv/libiconv_1.14.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -25,8 +25,8 @@ inherit autotools pkgconfig gettext
python __anonymous() {
if d.getVar("TARGET_OS", True) != "linux":
return
- if d.getVar("TCLIBC", True) == "eglibc":
- raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - eglibc already provides iconv")
+ 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"
diff --git a/meta/recipes-support/libksba/libksba_1.3.0.bb b/meta/recipes-support/libksba/libksba_1.3.2.bb
index 13ad437629..cce08c302c 100644
--- a/meta/recipes-support/libksba/libksba_1.3.0.bb
+++ b/meta/recipes-support/libksba/libksba_1.3.2.bb
@@ -6,7 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
"
-PR = "r1"
DEPENDS = "libgpg-error"
@@ -17,8 +16,8 @@ inherit autotools binconfig-disabled pkgconfig texinfo
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
file://ksba-add-pkgconfig-support.patch"
-SRC_URI[md5sum] = "cd86fad9c9d360b2cf80449f8a4a4075"
-SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971"
+SRC_URI[md5sum] = "c3c9a66e22d87fe3ae59865250b8a09c"
+SRC_URI[sha256sum] = "eb95537955dfc2845690a4cc3836074fa6d0a2c2ca2cbf1759364d3bd9868406"
do_configure_prepend () {
# Else these could be used in preference to those in aclocal-copy
diff --git a/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch b/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
deleted file mode 100644
index 22b0d88428..0000000000
--- a/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 82fdf49c185fd5f3810781af9ef52aa6a52bf2df Mon Sep 17 00:00:00 2001
-From: "Song.Li" <Song.Li@windriver.com>
-Date: Thu, 28 Jun 2012 20:03:17 +0800
-Subject: [PATCH] fix lib/cache_mngr.c two parentheses bugs
-
-there are two parentheses bugs in libnl /lib/cache_mngr.c file.
-The parentheses doesn't make any sense,
-This will cause the variable err get a bool value,
-the correct value of variable err should be the return value
-of the function which can be any integer value.
-
----
- lib/cache_mngr.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Upstream-Status: Pending
-
-diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
-index dae8768..57cc1f9 100644
---- a/lib/cache_mngr.c
-+++ b/lib/cache_mngr.c
-@@ -150,10 +150,10 @@ int nl_cache_mngr_alloc(struct nl_sock *sk, int protocol, int flags,
- /* Required to receive async event notifications */
- nl_socket_disable_seq_check(mngr->cm_sock);
-
-- if ((err = nl_connect(mngr->cm_sock, protocol) < 0))
-+ if ((err = nl_connect(mngr->cm_sock, protocol)) < 0)
- goto errout;
-
-- if ((err = nl_socket_set_nonblocking(mngr->cm_sock) < 0))
-+ if ((err = nl_socket_set_nonblocking(mngr->cm_sock)) < 0)
- goto errout;
-
- NL_DBG(1, "Allocated cache manager %p, protocol %d, %d caches\n",
---
-1.7.9.5
-
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
index b93d97b1b7..79aa0bdf11 100644
--- a/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
+++ b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
@@ -6,24 +6,24 @@ newer version so we can assume this issue is fixed upstream
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-Index: libnl-3.2.14/lib/Makefile.am
+Index: libnl-3.2.25/lib/Makefile.am
===================================================================
---- libnl-3.2.14.orig/lib/Makefile.am
-+++ libnl-3.2.14/lib/Makefile.am
-@@ -39,9 +39,12 @@ CLEANFILES = \
+--- 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) $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
+ $(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) $(YACC) -d $(YFLAGS) -o $@ $^
+ $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
-@@ -89,7 +92,9 @@ BUILT_SOURCES = \
+@@ -102,7 +105,9 @@ BUILT_SOURCES = \
route/cls/ematch_grammar.c \
route/cls/ematch_syntax.c \
route/pktloc_grammar.c \
diff --git a/meta/recipes-support/libnl/libnl_3.2.24.bb b/meta/recipes-support/libnl/libnl_3.2.25.bb
index d34ab74eac..97814fb134 100644
--- a/meta/recipes-support/libnl/libnl_3.2.24.bb
+++ b/meta/recipes-support/libnl/libnl_3.2.25.bb
@@ -3,6 +3,7 @@ HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
SECTION = "libs/network"
PE = "1"
+PR = "r1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
@@ -12,12 +13,12 @@ DEPENDS = "flex-native bison-native"
SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
file://fix-pktloc_syntax_h-race.patch \
file://fix-pc-file.patch \
- file://fix-lib-cache_mngr.c-two-parentheses-bugs.patch \
"
-SRC_URI[md5sum] = "6e0e7bad0674749d930dd9f285343d55"
-SRC_URI[sha256sum] = "fb8d6e5dc8af5b85bc6d00a71582a68a01e6a3f7d1664d4a646e289a99dd6816"
-inherit autotools-brokensep pkgconfig
+SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c"
+SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5"
+
+inherit autotools pkgconfig
FILES_${PN} = "${libdir}/libnl-3.so.* \
${libdir}/libnl.so.* \
diff --git a/meta/recipes-support/libpcre/libpcre/Makefile b/meta/recipes-support/libpcre/libpcre/Makefile
index 5419d71f7f..708d807d08 100644
--- a/meta/recipes-support/libpcre/libpcre/Makefile
+++ b/meta/recipes-support/libpcre/libpcre/Makefile
@@ -65,7 +65,7 @@ am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
MKDIR_P = /bin/mkdir -p
-PACKAGE_STRING = PCRE 8.34
+PACKAGE_STRING = PCRE 8.36
SHELL = /bin/sh
srcdir = .
top_srcdir = .
diff --git a/meta/recipes-support/libpcre/libpcre_8.35.bb b/meta/recipes-support/libpcre/libpcre_8.36.bb
index 92098c8c51..6aa0237aa4 100644
--- a/meta/recipes-support/libpcre/libpcre_8.35.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.36.bb
@@ -14,8 +14,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \
file://Makefile \
"
-SRC_URI[md5sum] = "6aacb23986adccd9b3bc626c00979958"
-SRC_URI[sha256sum] = "a961c1c78befef263cc130756eeca7b674b4e73a81533293df44e4265236865b"
+SRC_URI[md5sum] = "b767bc9af0c20bc9c1fe403b0d41ad97"
+SRC_URI[sha256sum] = "ef833457de0c40e82f573e34528f43a751ff20257ad0e86d272ed5637eb845bb"
S = "${WORKDIR}/pcre-${PV}"
diff --git a/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
index a53a197615..3367c85156 100644
--- a/meta/recipes-support/libproxy/libproxy_0.4.11.bb
+++ b/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -29,7 +29,7 @@ do_configure_prepend() {
}
python() {
- if bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
+ if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE").replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS").split() if i != "gconf"))
}
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
index f062b2eefa..81da911926 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb
@@ -23,7 +23,7 @@ SRC_URI[sha256sum] = "fa3d5574c1a2df521242e2ca624a2b3057121798cab9f8f40525aa186a
S = "${WORKDIR}/libsoup-${PV}"
-inherit autotools pkgconfig
+inherit autotools gettext pkgconfig
# glib-networking is needed for SSL, proxies, etc.
RRECOMMENDS_${PN} = "glib-networking"
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 a330c73412..d4489165bf 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
@@ -16,11 +16,11 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
gnulib-m4/iconv.m4 | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
-diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
-index f46ff14..de0a5e9 100644
---- a/gnulib-m4/iconv.m4
-+++ b/gnulib-m4/iconv.m4
-@@ -126,17 +126,6 @@ int main ()
+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 @@
}
}
#endif
@@ -34,9 +34,7 @@ index f46ff14..de0a5e9 100644
- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
- /* Try HP-UX names. */
- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-- return 1;
- return 0;
- }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
- [case "$host_os" in
---
-1.7.4
+- result |= 16;
+ return result;
+ }]])],
+ [am_cv_func_iconv_works=yes],
diff --git a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
deleted file mode 100644
index 5d831d5491..0000000000
--- a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Pending
-
-automake 1.12 has deprecated use of mkdir_p, and it recommends
-use of MKDIR_P instead. Changed the code to avoid these kind
-of warning-errors.
-
-| make[2]: /build/tmp/work/x86_64-linux/libunistring-native-0.9.3-r2/image/srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/doc/libunistring: Command not found
-| make[2]: *** [install-html-split] Error 127
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/10
-
-Index: libunistring-0.9.3/doc/Makefile.am
-===================================================================
---- libunistring-0.9.3.orig/doc/Makefile.am
-+++ libunistring-0.9.3/doc/Makefile.am
-@@ -87,7 +87,7 @@ TEXI2DVI = @TEXI2DVI@ $(TEXINCLUDES)
- # The install-dvi target is already defined by automake.
-
- installdirs-dvi:
-- $(mkdir_p) $(DESTDIR)$(dvidir)
-+ $(MKDIR_P) $(DESTDIR)$(dvidir)
-
- uninstall-dvi:
- $(RM) $(DESTDIR)$(dvidir)/libunistring.dvi
-@@ -105,7 +105,7 @@ libunistring.ps: libunistring.dvi
- # The install-ps target is already defined by automake.
-
- installdirs-ps:
-- $(mkdir_p) $(DESTDIR)$(psdir)
-+ $(MKDIR_P) $(DESTDIR)$(psdir)
-
- uninstall-ps:
- $(RM) $(DESTDIR)$(psdir)/libunistring.ps
-@@ -120,7 +120,7 @@ TEXI2PDF = @TEXI2DVI@ --pdf $(TEXINCLUDE
- # The install-pdf target is already defined by automake.
-
- installdirs-pdf:
-- $(mkdir_p) $(DESTDIR)$(pdfdir)
-+ $(MKDIR_P) $(DESTDIR)$(pdfdir)
-
- uninstall-pdf:
- $(RM) $(DESTDIR)$(pdfdir)/libunistring.pdf
-@@ -151,17 +151,17 @@ libunistring_toc.html: libunistring.texi
- }
-
- install-html-monolithic: libunistring.html
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
- $(INSTALL_DATA) `if test -f libunistring.html; then echo .; else echo $(srcdir); fi`/libunistring.html $(DESTDIR)$(htmldir)/libunistring.html
-
- install-html-split: libunistring_toc.html
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
- for file in `if test -f libunistring_toc.html; then echo .; else echo $(srcdir); fi`/libunistring_*.html; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \
- done
-
- installdirs-html:
-- $(mkdir_p) $(DESTDIR)$(htmldir)
-+ $(MKDIR_P) $(DESTDIR)$(htmldir)
-
- uninstall-html-monolithic:
- $(RM) $(DESTDIR)$(htmldir)/libunistring.html
-@@ -170,14 +170,14 @@ uninstall-html-split:
- $(RM) $(DESTDIR)$(htmldir)/libunistring_*.html
-
- dist-html-monolithic:
-- $(mkdir_p) $(distdir)/
-+ $(MKDIR_P) $(distdir)/
- file=libunistring.html; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- cp -p $$d/$$file $(distdir)/$$file || exit 1
-
- # We would like to put libunistring_*.html into EXTRA_DIST, but it doesn't work.
- dist-html-split: libunistring_toc.html
-- $(mkdir_p) $(distdir)/
-+ $(MKDIR_P) $(distdir)/
- file=libunistring_toc.html; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for file in `cd $$d && echo libunistring_*.html`; do \
diff --git a/meta/recipes-support/libunistring/libunistring/parallelmake.patch b/meta/recipes-support/libunistring/libunistring/parallelmake.patch
deleted file mode 100644
index 21025b8e9d..0000000000
--- a/meta/recipes-support/libunistring/libunistring/parallelmake.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Fix a parallel make race where cdefs.h uses the unused-parameter.h header file
-but has no dependency listed. This can result in an empty cdefs.h file which
-results in a build failure like:
-
-| In file included from striconveh.c:30:0:
-| unistr.h:193:48: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
-| In file included from striconveh.c:30:0:
-| unistr.h:263:54: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER'
-
-Upstream-Status: Pending
-
-RP 2012/4/12
-
-Index: libunistring-0.9.3/lib/Makefile.am
-===================================================================
---- libunistring-0.9.3.orig/lib/Makefile.am 2012-04-12 07:45:41.450059820 +0000
-+++ libunistring-0.9.3/lib/Makefile.am 2012-04-12 07:48:45.434055559 +0000
-@@ -157,7 +157,7 @@
-
- # unistring/cdefs.h is not public, but is included by other header files.
- nobase_nodist_include_HEADERS += unistring/cdefs.h
--unistring/cdefs.h : unistring/cdefs.in.h
-+unistring/cdefs.h : unistring/cdefs.in.h $(UNUSED_PARAMETER_H)
- @MKDIR_P@ unistring
- rm -f $@-t $@
- sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
diff --git a/meta/recipes-support/libunistring/libunistring_0.9.3.bb b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
index db1651b2a6..89b1dc26f1 100644
--- a/meta/recipes-support/libunistring/libunistring_0.9.3.bb
+++ b/meta/recipes-support/libunistring/libunistring_0.9.4.bb
@@ -18,15 +18,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
- file://parallelmake.patch \
- file://libunistring_fix_for_automake_1.12.patch \
file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
"
-SRC_URI[md5sum] = "db8eca3b64163abadf8c40e5cecc261f"
-SRC_URI[sha256sum] = "610d3ec724fbdaa654afe3cff20b9f4d504be3fd296fded2e0f7f764041006a3"
-
-PR = "r3"
+SRC_URI[md5sum] = "c24a6a3838d9ad4a41a62549312c4226"
+SRC_URI[sha256sum] = "f5246d63286a42902dc096d6d44541fbe4204b6c02d6d5d28b457c9882ddd8a6"
inherit autotools texinfo
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
new file mode 100644
index 0000000000..228ec322d5
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
@@ -0,0 +1,2529 @@
+From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Sat, 11 May 2013 09:18:23 -0600
+Subject: [PATCH] AArch64 port.
+
+Upstream-Status: Backport
+
+---
+ Makefile.am | 6
+ README | 1
+ configure.ac | 6
+ include/libunwind-aarch64.h | 187 ++++++++++++++++++++++
+ include/libunwind.h.in | 4
+ include/tdep-aarch64/dwarf-config.h | 52 ++++++
+ include/tdep-aarch64/jmpbuf.h | 33 +++
+ include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++
+ include/tdep/dwarf-config.h | 4
+ include/tdep/jmpbuf.h | 2
+ include/tdep/libunwind_i.h.in | 4
+ src/Makefile.am | 39 ++++
+ src/aarch64/Gcreate_addr_space.c | 60 +++++++
+ src/aarch64/Gget_proc_info.c | 39 ++++
+ src/aarch64/Gget_save_loc.c | 100 +++++++++++
+ src/aarch64/Gglobal.c | 57 ++++++
+ src/aarch64/Ginit.c | 187 ++++++++++++++++++++++
+ src/aarch64/Ginit_local.c | 55 ++++++
+ src/aarch64/Ginit_remote.c | 45 +++++
+ src/aarch64/Gis_signal_frame.c | 64 +++++++
+ src/aarch64/Gregs.c | 113 +++++++++++++
+ src/aarch64/Gresume.c | 177 +++++++++++++++++++++
+ src/aarch64/Gstep.c | 129 +++++++++++++++
+ src/aarch64/Lcreate_addr_space.c | 5
+ src/aarch64/Lget_proc_info.c | 5
+ src/aarch64/Lget_save_loc.c | 5
+ src/aarch64/Lglobal.c | 5
+ src/aarch64/Linit.c | 5
+ src/aarch64/Linit_local.c | 5
+ src/aarch64/Linit_remote.c | 5
+ src/aarch64/Lis_signal_frame.c | 5
+ src/aarch64/Lregs.c | 5
+ src/aarch64/Lresume.c | 5
+ src/aarch64/Lstep.c | 5
+ src/aarch64/gen-offsets.c | 68 ++++++++
+ src/aarch64/init.h | 127 +++++++++++++++
+ src/aarch64/is_fpreg.c | 32 +++
+ src/aarch64/offsets.h | 49 +++++
+ src/aarch64/regname.c | 106 ++++++++++++
+ src/aarch64/siglongjmp.S | 12 +
+ src/aarch64/unwind_i.h | 43 +++++
+ src/coredump/_UCD_access_reg_linux.c | 5
+ src/ptrace/_UPT_reg_offset.c | 36 ++++
+ 43 files changed, 2184 insertions(+), 7 deletions(-)
+ create mode 100644 include/libunwind-aarch64.h
+ create mode 100644 include/tdep-aarch64/dwarf-config.h
+ create mode 100644 include/tdep-aarch64/jmpbuf.h
+ create mode 100644 include/tdep-aarch64/libunwind_i.h
+ create mode 100644 src/aarch64/Gcreate_addr_space.c
+ create mode 100644 src/aarch64/Gget_proc_info.c
+ create mode 100644 src/aarch64/Gget_save_loc.c
+ create mode 100644 src/aarch64/Gglobal.c
+ create mode 100644 src/aarch64/Ginit.c
+ create mode 100644 src/aarch64/Ginit_local.c
+ create mode 100644 src/aarch64/Ginit_remote.c
+ create mode 100644 src/aarch64/Gis_signal_frame.c
+ create mode 100644 src/aarch64/Gregs.c
+ create mode 100644 src/aarch64/Gresume.c
+ create mode 100644 src/aarch64/Gstep.c
+ create mode 100644 src/aarch64/Lcreate_addr_space.c
+ create mode 100644 src/aarch64/Lget_proc_info.c
+ create mode 100644 src/aarch64/Lget_save_loc.c
+ create mode 100644 src/aarch64/Lglobal.c
+ create mode 100644 src/aarch64/Linit.c
+ create mode 100644 src/aarch64/Linit_local.c
+ create mode 100644 src/aarch64/Linit_remote.c
+ create mode 100644 src/aarch64/Lis_signal_frame.c
+ create mode 100644 src/aarch64/Lregs.c
+ create mode 100644 src/aarch64/Lresume.c
+ create mode 100644 src/aarch64/Lstep.c
+ create mode 100644 src/aarch64/gen-offsets.c
+ create mode 100644 src/aarch64/init.h
+ create mode 100644 src/aarch64/is_fpreg.c
+ create mode 100644 src/aarch64/offsets.h
+ create mode 100644 src/aarch64/regname.c
+ create mode 100644 src/aarch64/siglongjmp.S
+ create mode 100644 src/aarch64/unwind_i.h
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna
+ include/libunwind-ptrace.h \
+ include/libunwind-coredump.h
+
++if ARCH_AARCH64
++include_HEADERS += include/libunwind-aarch64.h
++endif
+ if ARCH_ARM
+ include_HEADERS += include/libunwind-arm.h
+ endif
+@@ -41,6 +44,9 @@ SUBDIRS = src tests doc
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+ include/compiler.h include/libunwind_i.h include/mempool.h \
+ include/remote.h \
++ include/tdep-aarch64/dwarf-config.h \
++ include/tdep-aarch64/jmpbuf.h \
++ include/tdep-aarch64/libunwind_i.h \
+ include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \
+ include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \
+ include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \
+--- a/README
++++ b/README
+@@ -9,6 +9,7 @@ several architecture/operating-system co
+ Linux/IA-64: Fully tested and supported.
+ Linux/PARISC: Works well, but C library missing unwind-info.
+ HP-UX/IA-64: Mostly works but known to have some serious limitations.
++ Linux/AArch64: Newly added.
+ Linux/PPC64: Newly added.
+ Linux/SuperH: Newly added.
+ FreeBSD/i386: Newly added.
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch])
+
+ AC_ARG_ENABLE(coredump,
+ AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
+- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
++ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
+ )
+
+ AC_MSG_CHECKING([if we should build libunwind-coredump])
+@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os])
+
+ AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
+ AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
++AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
+ AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
+ AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
+ AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
+@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target
+ AC_MSG_CHECKING([for ELF helper width])
+ case "${target_arch}" in
+ (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
+-(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
++(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
+ (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
+ *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
+ esac
+@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions]
+ # C++ exception handling doesn't work too well on x86
+ case $target_arch in
+ x86*) enable_cxx_exceptions=no;;
++ aarch64*) enable_cxx_exceptions=no;;
+ arm*) enable_cxx_exceptions=no;;
+ mips*) enable_cxx_exceptions=no;;
+ *) enable_cxx_exceptions=yes;;
+--- /dev/null
++++ b/include/libunwind-aarch64.h
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2004 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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. */
++
++#ifndef LIBUNWIND_H
++#define LIBUNWIND_H
++
++#if defined(__cplusplus) || defined(c_plusplus)
++extern "C" {
++#endif
++
++#include <inttypes.h>
++#include <stddef.h>
++#include <ucontext.h>
++
++#define UNW_TARGET aarch64
++#define UNW_TARGET_AARCH64 1
++
++#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
++
++/* This needs to be big enough to accommodate "struct cursor", while
++ leaving some slack for future expansion. Changing this value will
++ require recompiling all users of this library. Stack allocation is
++ relatively cheap and unwind-state copying is relatively rare, so we
++ want to err on making it rather too big than too small. */
++
++#define UNW_TDEP_CURSOR_LEN 4096
++
++typedef uint64_t unw_word_t;
++typedef int64_t unw_sword_t;
++
++typedef long double unw_tdep_fpreg_t;
++
++typedef struct
++ {
++ /* no aarch64-specific auxiliary proc-info */
++ }
++unw_tdep_proc_info_t;
++
++typedef enum
++ {
++ /* 64-bit general registers. */
++ UNW_AARCH64_X0,
++ UNW_AARCH64_X1,
++ UNW_AARCH64_X2,
++ UNW_AARCH64_X3,
++ UNW_AARCH64_X4,
++ UNW_AARCH64_X5,
++ UNW_AARCH64_X6,
++ UNW_AARCH64_X7,
++ UNW_AARCH64_X8,
++
++ /* Temporary registers. */
++ UNW_AARCH64_X9,
++ UNW_AARCH64_X10,
++ UNW_AARCH64_X11,
++ UNW_AARCH64_X12,
++ UNW_AARCH64_X13,
++ UNW_AARCH64_X14,
++ UNW_AARCH64_X15,
++
++ /* Intra-procedure-call temporary registers. */
++ UNW_AARCH64_X16,
++ UNW_AARCH64_X17,
++
++ /* Callee-saved registers. */
++ UNW_AARCH64_X18,
++ UNW_AARCH64_X19,
++ UNW_AARCH64_X20,
++ UNW_AARCH64_X21,
++ UNW_AARCH64_X22,
++ UNW_AARCH64_X23,
++ UNW_AARCH64_X24,
++ UNW_AARCH64_X25,
++ UNW_AARCH64_X26,
++ UNW_AARCH64_X27,
++ UNW_AARCH64_X28,
++
++ /* 64-bit frame pointer. */
++ UNW_AARCH64_X29,
++
++ /* 64-bit link register. */
++ UNW_AARCH64_X30,
++
++ /* 64-bit stack pointer. */
++ UNW_AARCH64_SP = 31,
++ UNW_AARCH64_PC,
++ UNW_AARCH64_PSTATE,
++
++ /* 128-bit FP/Advanced SIMD registers. */
++ UNW_AARCH64_V0 = 64,
++ UNW_AARCH64_V1,
++ UNW_AARCH64_V2,
++ UNW_AARCH64_V3,
++ UNW_AARCH64_V4,
++ UNW_AARCH64_V5,
++ UNW_AARCH64_V6,
++ UNW_AARCH64_V7,
++ UNW_AARCH64_V8,
++ UNW_AARCH64_V9,
++ UNW_AARCH64_V10,
++ UNW_AARCH64_V11,
++ UNW_AARCH64_V12,
++ UNW_AARCH64_V13,
++ UNW_AARCH64_V14,
++ UNW_AARCH64_V15,
++ UNW_AARCH64_V16,
++ UNW_AARCH64_V17,
++ UNW_AARCH64_V18,
++ UNW_AARCH64_V19,
++ UNW_AARCH64_V20,
++ UNW_AARCH64_V21,
++ UNW_AARCH64_V22,
++ UNW_AARCH64_V23,
++ UNW_AARCH64_V24,
++ UNW_AARCH64_V25,
++ UNW_AARCH64_V26,
++ UNW_AARCH64_V27,
++ UNW_AARCH64_V28,
++ UNW_AARCH64_V29,
++ UNW_AARCH64_V30,
++ UNW_AARCH64_V31,
++
++ UNW_AARCH64_FPSR,
++ UNW_AARCH64_FPCR,
++
++ /* For AArch64, the CFA is the value of SP (x31) at the call site of the
++ previous frame. */
++ UNW_AARCH64_CFA = UNW_AARCH64_SP,
++
++ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
++
++ UNW_TDEP_IP = UNW_AARCH64_X30,
++ UNW_TDEP_SP = UNW_AARCH64_SP,
++ UNW_TDEP_EH = UNW_AARCH64_X0,
++
++ }
++aarch64_regnum_t;
++
++/* Use R0 through R3 to pass exception handling information. */
++#define UNW_TDEP_NUM_EH_REGS 4
++
++typedef struct unw_tdep_save_loc
++ {
++ /* Additional target-dependent info on a save location. */
++ }
++unw_tdep_save_loc_t;
++
++
++/* On AArch64, we can directly use ucontext_t as the unwind context. */
++typedef ucontext_t unw_tdep_context_t;
++
++#include "libunwind-common.h"
++#include "libunwind-dynamic.h"
++
++#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
++#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
++
++extern int unw_tdep_is_fpreg (int);
++
++#if defined(__cplusplus) || defined(c_plusplus)
++}
++#endif
++
++#endif /* LIBUNWIND_H */
+--- a/include/libunwind.h.in
++++ b/include/libunwind.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++#include "libunwind-aarch64.h"
++#elif defined __arm__
+ # include "libunwind-arm.h"
+ #elif defined __hppa__
+ # include "libunwind-hppa.h"
+--- /dev/null
++++ b/include/tdep-aarch64/dwarf-config.h
+@@ -0,0 +1,52 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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. */
++
++#ifndef dwarf_config_h
++#define dwarf_config_h
++
++/* This matches the value udes by GCC (see
++ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */
++#define DWARF_NUM_PRESERVED_REGS 97
++
++/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
++#define dwarf_is_big_endian(addr_space) 0
++
++#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0)
++
++/* Convert a pointer to a dwarf_cursor structure to a pointer to
++ unw_cursor_t. */
++#define dwarf_to_cursor(c) ((unw_cursor_t *) (c))
++
++typedef struct dwarf_loc
++ {
++ unw_word_t val;
++#ifndef UNW_LOCAL_ONLY
++ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */
++#endif
++ }
++dwarf_loc_t;
++
++#endif /* dwarf_config_h */
+--- /dev/null
++++ b/include/tdep-aarch64/jmpbuf.h
+@@ -0,0 +1,33 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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. */
++
++/* Use glibc's jump-buffer indices; NPTL peeks at SP: */
++
++/* FIXME for AArch64 */
++
++#define JB_SP 13
++#define JB_RP 14
++#define JB_MASK_SAVED 15
++#define JB_MASK 16
+--- /dev/null
++++ b/include/tdep-aarch64/libunwind_i.h
+@@ -0,0 +1,294 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2005 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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. */
++
++#ifndef AARCH64_LIBUNWIND_I_H
++#define AARCH64_LIBUNWIND_I_H
++
++/* Target-dependent definitions that are internal to libunwind but need
++ to be shared with target-independent code. */
++
++#include <stdlib.h>
++#include <libunwind.h>
++
++#include "elf64.h"
++#include "mempool.h"
++#include "dwarf.h"
++
++typedef struct
++ {
++ /* no aarch64-specific fast trace */
++ }
++unw_tdep_frame_t;
++
++#ifdef UNW_LOCAL_ONLY
++
++typedef unw_word_t aarch64_loc_t;
++
++#else /* !UNW_LOCAL_ONLY */
++
++typedef struct aarch64_loc
++ {
++ unw_word_t w0, w1;
++ }
++aarch64_loc_t;
++
++#endif /* !UNW_LOCAL_ONLY */
++
++struct unw_addr_space
++ {
++ struct unw_accessors acc;
++ int big_endian;
++ unw_caching_policy_t caching_policy;
++#ifdef HAVE_ATOMIC_OPS_H
++ AO_t cache_generation;
++#else
++ uint32_t cache_generation;
++#endif
++ unw_word_t dyn_generation; /* see dyn-common.h */
++ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */
++ struct dwarf_rs_cache global_cache;
++ struct unw_debug_frame_list *debug_frames;
++ };
++
++struct cursor
++ {
++ struct dwarf_cursor dwarf; /* must be first */
++ enum
++ {
++ AARCH64_SCF_NONE,
++ AARCH64_SCF_LINUX_RT_SIGFRAME,
++ }
++ sigcontext_format;
++ unw_word_t sigcontext_addr;
++ unw_word_t sigcontext_sp;
++ unw_word_t sigcontext_pc;
++ };
++
++#define DWARF_GET_LOC(l) ((l).val)
++
++#ifdef UNW_LOCAL_ONLY
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0)
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) })
++# define DWARF_IS_REG_LOC(l) 0
++# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_word_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_word_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++#else /* !UNW_LOCAL_ONLY */
++# define DWARF_LOC_TYPE_FP (1 << 0)
++# define DWARF_LOC_TYPE_REG (1 << 1)
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) \
++ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
++# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0)
++# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0)
++# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG)
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \
++ | DWARF_LOC_TYPE_FP))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ val, 0, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 0, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0,
++ c->as_arg);
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ &val, 1, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 1, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1,
++ 1, c->as_arg);
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++}
++
++#endif /* !UNW_LOCAL_ONLY */
++
++
++
++#define tdep_getcontext_trace unw_getcontext
++#define tdep_init_done UNW_OBJ(init_done)
++#define tdep_init UNW_OBJ(init)
++/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
++ tdep_search_unwind_table. */
++#define tdep_search_unwind_table dwarf_search_unwind_table
++#define tdep_find_unwind_table dwarf_find_unwind_table
++#define tdep_uc_addr UNW_OBJ(uc_addr)
++#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
++#define tdep_access_reg UNW_OBJ(access_reg)
++#define tdep_access_fpreg UNW_OBJ(access_fpreg)
++#define tdep_fetch_frame(c,ip,n) do {} while(0)
++#define tdep_cache_frame(c,rs) do {} while(0)
++#define tdep_reuse_frame(c,rs) do {} while(0)
++#define tdep_stash_frame(c,rs) do {} while(0)
++#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
++
++#ifdef UNW_LOCAL_ONLY
++# define tdep_find_proc_info(c,ip,n) \
++ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ dwarf_put_unwind_info((as), (pi), (arg))
++#else
++# define tdep_find_proc_info(c,ip,n) \
++ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ (*(as)->acc.put_unwind_info)((as), (pi), (arg))
++#endif
++
++#define tdep_get_as(c) ((c)->dwarf.as)
++#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
++#define tdep_get_ip(c) ((c)->dwarf.ip)
++#define tdep_big_endian(as) ((as)->big_endian)
++
++extern int tdep_init_done;
++
++extern void tdep_init (void);
++extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
++ unw_dyn_info_t *di, unw_proc_info_t *pi,
++ int need_unwind_info, void *arg);
++extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg);
++extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
++ unsigned long *segbase, unsigned long *mapoff,
++ char *path, size_t pathlen);
++extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
++ unw_word_t *valp, int write);
++extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
++ unw_fpreg_t *valp, int write);
++
++#endif /* AARCH64_LIBUNWIND_I_H */
+--- a/include/tdep/dwarf-config.h
++++ b/include/tdep/dwarf-config.h
+@@ -1,7 +1,9 @@
+ /* Provide a real file - not a symlink - as it would cause multiarch conflicts
+ when multiple different arch releases are installed simultaneously. */
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/dwarf-config.h"
++#elif defined __arm__
+ # include "tdep-arm/dwarf-config.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/dwarf-config.h"
+--- a/include/tdep/jmpbuf.h
++++ b/include/tdep/jmpbuf.h
+@@ -3,6 +3,8 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
++#if defined __aarch64__
++# include "tdep-aarch64/jmpbuf.h"
+ #if defined __arm__
+ # include "tdep-arm/jmpbuf.h"
+ #elif defined __hppa__
+--- a/include/tdep/libunwind_i.h.in
++++ b/include/tdep/libunwind_i.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/libunwind_i.h"
++#elif defined __arm__
+ # include "tdep-arm/libunwind_i.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/libunwind_i.h"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c
+ noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
+ libunwind_la_LIBADD += $(LIBUNWIND_ELF)
+
++# The list of files that go into libunwind and libunwind-aarch64:
++noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h
++libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \
++ aarch64/is_fpreg.c aarch64/regname.c
++
++# The list of files that go into libunwind:
++libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_local) \
++ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \
++ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \
++ aarch64/Linit_local.c aarch64/Linit_remote.c \
++ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \
++ aarch64/Lstep.c
++
++libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_generic) \
++ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \
++ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \
++ aarch64/Ginit_local.c aarch64/Ginit_remote.c \
++ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \
++ aarch64/Gstep.c
++
+ # The list of files that go into libunwind and libunwind-arm:
+ noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
+ libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
+@@ -418,6 +440,18 @@ if OS_FREEBSD
+ libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
+ endif
+
++if ARCH_AARCH64
++ lib_LTLIBRARIES += libunwind-aarch64.la
++ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
++ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64)
++ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
++ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la
++ libunwind_aarch64_la_LIBADD += libunwind-elf64.la
++if !REMOTE_ONLY
++ libunwind_aarch64_la_LIBADD += libunwind.la -lc
++endif
++ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S
++else
+ if ARCH_ARM
+ lib_LTLIBRARIES += libunwind-arm.la
+ libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
+@@ -545,6 +579,7 @@ endif # ARCH_MIPS
+ endif # ARCH_HPPA
+ endif # ARCH_IA64
+ endif # ARCH_ARM
++endif # ARCH_AARCH64
+
+ # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
+ # at the end.
+@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+ noinst_HEADERS += unwind/unwind-internal.h
+
+-EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
++EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \
++ $(libunwind_la_SOURCES_arm) \
+ $(libunwind_la_SOURCES_hppa) \
+ $(libunwind_la_SOURCES_ia64) \
+ $(libunwind_la_SOURCES_mips) \
+@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm)
+ $(libunwind_la_SOURCES_common) \
+ $(libunwind_la_SOURCES_local) \
+ $(libunwind_la_SOURCES_generic) \
++ $(libunwind_aarch64_la_SOURCES_aarch64) \
+ $(libunwind_arm_la_SOURCES_arm) \
+ $(libunwind_hppa_la_SOURCES_hppa) \
+ $(libunwind_ia64_la_SOURCES_ia64) \
+--- /dev/null
++++ b/src/aarch64/Gcreate_addr_space.c
+@@ -0,0 +1,60 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 <string.h>
++#include <stdlib.h>
++
++#include "unwind_i.h"
++
++PROTECTED unw_addr_space_t
++unw_create_addr_space (unw_accessors_t *a, int byte_order)
++{
++#ifdef UNW_LOCAL_ONLY
++ return NULL;
++#else
++ unw_addr_space_t as;
++
++ /* AArch64 supports little-endian and big-endian. */
++ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN
++ && byte_order != __BIG_ENDIAN)
++ return NULL;
++
++ as = malloc (sizeof (*as));
++ if (!as)
++ return NULL;
++
++ memset (as, 0, sizeof (*as));
++
++ as->acc = *a;
++
++ /* Default to little-endian for AArch64. */
++ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN)
++ as->big_endian = 0;
++ else
++ as->big_endian = 1;
++
++ return as;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gget_proc_info.c
+@@ -0,0 +1,39 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++PROTECTED int
++unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ ret = dwarf_make_proc_info (&c->dwarf);
++ if (ret < 0)
++ return ret;
++
++ *pi = c->dwarf.pi;
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gget_save_loc.c
+@@ -0,0 +1,100 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++PROTECTED int
++unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ dwarf_loc_t loc;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_SP:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ default:
++ loc = DWARF_NULL_LOC; /* default to "not saved" */
++ break;
++ }
++
++ memset (sloc, 0, sizeof (*sloc));
++
++ if (DWARF_IS_NULL_LOC (loc))
++ {
++ sloc->type = UNW_SLT_NONE;
++ return 0;
++ }
++
++#if !defined(UNW_LOCAL_ONLY)
++ if (DWARF_IS_REG_LOC (loc))
++ {
++ sloc->type = UNW_SLT_REG;
++ sloc->u.regnum = DWARF_GET_LOC (loc);
++ }
++ else
++#endif
++ {
++ sloc->type = UNW_SLT_MEMORY;
++ sloc->u.addr = DWARF_GET_LOC (loc);
++ }
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gglobal.c
+@@ -0,0 +1,57 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++#include "dwarf_i.h"
++
++HIDDEN define_lock (aarch64_lock);
++HIDDEN int tdep_init_done;
++
++HIDDEN void
++tdep_init (void)
++{
++ intrmask_t saved_mask;
++
++ sigfillset (&unwi_full_mask);
++
++ lock_acquire (&aarch64_lock, saved_mask);
++ {
++ if (tdep_init_done)
++ /* another thread else beat us to it... */
++ goto out;
++
++ mi_init ();
++
++ dwarf_init ();
++
++#ifndef UNW_REMOTE_ONLY
++ aarch64_local_addr_space_init ();
++#endif
++ tdep_init_done = 1; /* signal that we're initialized... */
++ }
++ out:
++ lock_release (&aarch64_lock, saved_mask);
++}
+--- /dev/null
++++ b/src/aarch64/Ginit.c
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 <stdlib.h>
++#include <string.h>
++
++#include "unwind_i.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++/* unw_local_addr_space is a NULL pointer in this case. */
++PROTECTED unw_addr_space_t unw_local_addr_space;
++
++#else /* !UNW_REMOTE_ONLY */
++
++static struct unw_addr_space local_addr_space;
++
++PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space;
++
++static inline void *
++uc_addr (ucontext_t *uc, int reg)
++{
++ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
++ return &uc->uc_mcontext.regs[reg];
++ else
++ return NULL;
++}
++
++# ifdef UNW_LOCAL_ONLY
++
++HIDDEN void *
++tdep_uc_addr (ucontext_t *uc, int reg)
++{
++ return uc_addr (uc, reg);
++}
++
++# endif /* UNW_LOCAL_ONLY */
++
++HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
++
++/* XXX fix me: there is currently no way to locate the dyn-info list
++ by a remote unwinder. On ia64, this is done via a special
++ unwind-table entry. Perhaps something similar can be done with
++ DWARF2 unwind info. */
++
++static void
++put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
++{
++ /* it's a no-op */
++}
++
++static int
++get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
++ void *arg)
++{
++ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++ return 0;
++}
++
++static int
++access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
++ void *arg)
++{
++ if (write)
++ {
++ Debug (16, "mem[%lx] <- %lx\n", addr, *val);
++ *(unw_word_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (16, "mem[%lx] -> %lx\n", addr, *val);
++ }
++ return 0;
++}
++
++static int
++access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
++ void *arg)
++{
++ unw_word_t *addr;
++ ucontext_t *uc = arg;
++
++ if (unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ *(unw_word_t *) addr = *val;
++ Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
++
++static int
++access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
++ int write, void *arg)
++{
++ ucontext_t *uc = arg;
++ unw_fpreg_t *addr;
++
++ if (!unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ *(unw_fpreg_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_fpreg_t *) addr;
++ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ /* attempt to access a non-preserved register */
++ return -UNW_EBADREG;
++}
++
++static int
++get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
++ char *buf, size_t buf_len, unw_word_t *offp,
++ void *arg)
++{
++ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
++}
++
++HIDDEN void
++aarch64_local_addr_space_init (void)
++{
++ memset (&local_addr_space, 0, sizeof (local_addr_space));
++ local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
++ local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
++ local_addr_space.acc.put_unwind_info = put_unwind_info;
++ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
++ local_addr_space.acc.access_mem = access_mem;
++ local_addr_space.acc.access_reg = access_reg;
++ local_addr_space.acc.access_fpreg = access_fpreg;
++ local_addr_space.acc.resume = aarch64_local_resume;
++ local_addr_space.acc.get_proc_name = get_static_proc_name;
++ unw_flush_cache (&local_addr_space, 0, 0);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_local.c
+@@ -0,0 +1,55 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++#include "init.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ return -UNW_EINVAL;
++}
++
++#else /* !UNW_REMOTE_ONLY */
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = unw_local_addr_space;
++ c->dwarf.as_arg = uc;
++
++ return common_init (c, 1);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_remote.c
+@@ -0,0 +1,45 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++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 "init.h"
++#include "unwind_i.h"
++
++PROTECTED int
++unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
++{
++#ifdef UNW_LOCAL_ONLY
++ return -UNW_EINVAL;
++#else /* !UNW_LOCAL_ONLY */
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = as;
++ c->dwarf.as_arg = as_arg;
++ return common_init (c, 0);
++#endif /* !UNW_LOCAL_ONLY */
++}
+--- /dev/null
++++ b/src/aarch64/Gis_signal_frame.c
+@@ -0,0 +1,64 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++/* The restorer stub will always have the form:
++
++ d2801168 movz x8, #0x8b
++ d4000001 svc #0x0
++*/
++
++PROTECTED int
++unw_is_signal_frame (unw_cursor_t *cursor)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_word_t w0, ip;
++ unw_addr_space_t as;
++ unw_accessors_t *a;
++ void *arg;
++ int ret;
++
++ as = c->dwarf.as;
++ a = unw_get_accessors (as);
++ arg = c->dwarf.as_arg;
++
++ ip = c->dwarf.ip;
++
++ ret = (*a->access_mem) (as, ip, &w0, 0, arg);
++ if (ret < 0)
++ return ret;
++
++ /* FIXME: distinguish 32bit insn vs 64bit registers. */
++ if (w0 != 0xd4000001d2801168)
++ return 0;
++
++ return 1;
++
++#else
++ return -UNW_ENOINFO;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gregs.c
+@@ -0,0 +1,113 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++HIDDEN int
++tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
++ int write)
++{
++ dwarf_loc_t loc = DWARF_NULL_LOC;
++ unsigned int mask;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ mask = 1 << reg;
++ if (write)
++ {
++ c->dwarf.eh_args[reg] = *valp;
++ c->dwarf.eh_valid_mask |= mask;
++ return 0;
++ }
++ else if ((c->dwarf.eh_valid_mask & mask) != 0)
++ {
++ *valp = c->dwarf.eh_args[reg];
++ return 0;
++ }
++ else
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_SP:
++ if (write)
++ return -UNW_EREADONLYREG;
++ *valp = c->dwarf.cfa;
++ return 0;
++
++ default:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++ }
++
++ if (write)
++ return dwarf_put (&c->dwarf, loc, *valp);
++ else
++ return dwarf_get (&c->dwarf, loc, valp);
++}
++
++HIDDEN int
++tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp,
++ int write)
++{
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
+--- /dev/null
++++ b/src/aarch64/Gresume.c
+@@ -0,0 +1,177 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++#include "offsets.h"
++
++#ifndef UNW_REMOTE_ONLY
++
++HIDDEN inline int
++aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_tdep_context_t *uc = c->dwarf.as_arg;
++
++ if (c->sigcontext_format == AARCH64_SCF_NONE)
++ {
++ /* Since there are no signals involved here we restore the non scratch
++ registers only. */
++ unsigned long regs[11];
++ regs[0] = uc->uc_mcontext.regs[19];
++ regs[1] = uc->uc_mcontext.regs[20];
++ regs[2] = uc->uc_mcontext.regs[21];
++ regs[3] = uc->uc_mcontext.regs[22];
++ regs[4] = uc->uc_mcontext.regs[23];
++ regs[5] = uc->uc_mcontext.regs[24];
++ regs[6] = uc->uc_mcontext.regs[25];
++ regs[7] = uc->uc_mcontext.regs[26];
++ regs[8] = uc->uc_mcontext.regs[27];
++ regs[9] = uc->uc_mcontext.regs[28];
++ regs[10] = uc->uc_mcontext.regs[30]; /* LR */
++ unsigned long sp = uc->uc_mcontext.sp;
++
++ struct regs_overlay {
++ char x[sizeof(regs)];
++ };
++
++ asm volatile (
++ "ldp x19, x20, [%0]\n"
++ "ldp x21, x22, [%0,16]\n"
++ "ldp x23, x24, [%0,32]\n"
++ "ldp x25, x26, [%0,48]\n"
++ "ldp x27, x28, [%0,64]\n"
++ "ldr x30, [%0,80]\n"
++ "mov sp, %1\n"
++ "ret \n"
++ :
++ : "r" (regs),
++ "r" (sp),
++ "m" (*(struct regs_overlay *)regs)
++ );
++ }
++ else
++ {
++ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
++
++ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0];
++ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1];
++ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2];
++ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3];
++
++ sc->regs[4] = uc->uc_mcontext.regs[4];
++ sc->regs[5] = uc->uc_mcontext.regs[5];
++ sc->regs[6] = uc->uc_mcontext.regs[6];
++ sc->regs[7] = uc->uc_mcontext.regs[7];
++ sc->regs[8] = uc->uc_mcontext.regs[8];
++ sc->regs[9] = uc->uc_mcontext.regs[9];
++ sc->regs[10] = uc->uc_mcontext.regs[10];
++ sc->regs[11] = uc->uc_mcontext.regs[11];
++ sc->regs[12] = uc->uc_mcontext.regs[12];
++ sc->regs[13] = uc->uc_mcontext.regs[13];
++ sc->regs[14] = uc->uc_mcontext.regs[14];
++ sc->regs[15] = uc->uc_mcontext.regs[15];
++ sc->regs[16] = uc->uc_mcontext.regs[16];
++ sc->regs[17] = uc->uc_mcontext.regs[17];
++ sc->regs[18] = uc->uc_mcontext.regs[18];
++ sc->regs[19] = uc->uc_mcontext.regs[19];
++ sc->regs[20] = uc->uc_mcontext.regs[20];
++ sc->regs[21] = uc->uc_mcontext.regs[21];
++ sc->regs[22] = uc->uc_mcontext.regs[22];
++ sc->regs[23] = uc->uc_mcontext.regs[23];
++ sc->regs[24] = uc->uc_mcontext.regs[24];
++ sc->regs[25] = uc->uc_mcontext.regs[25];
++ sc->regs[26] = uc->uc_mcontext.regs[26];
++ sc->regs[27] = uc->uc_mcontext.regs[27];
++ sc->regs[28] = uc->uc_mcontext.regs[28];
++ sc->regs[29] = uc->uc_mcontext.regs[29];
++ sc->regs[30] = uc->uc_mcontext.regs[30];
++ sc->sp = uc->uc_mcontext.sp;
++ sc->pc = uc->uc_mcontext.pc;
++ sc->pstate = uc->uc_mcontext.pstate;
++
++ asm volatile (
++ "mov sp, %0\n"
++ "ret %1\n"
++ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
++ );
++ }
++ unreachable();
++#else
++ printf ("%s: implement me\n", __FUNCTION__);
++#endif
++ return -UNW_EINVAL;
++}
++
++#endif /* !UNW_REMOTE_ONLY */
++
++static inline void
++establish_machine_state (struct cursor *c)
++{
++ unw_addr_space_t as = c->dwarf.as;
++ void *arg = c->dwarf.as_arg;
++ unw_fpreg_t fpval;
++ unw_word_t val;
++ int reg;
++
++ Debug (8, "copying out cursor state\n");
++
++ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg)
++ {
++ Debug (16, "copying %s %d\n", unw_regname (reg), reg);
++ if (unw_is_fpreg (reg))
++ {
++ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
++ as->acc.access_fpreg (as, reg, &fpval, 1, arg);
++ }
++ else
++ {
++ if (tdep_access_reg (c, reg, &val, 0) >= 0)
++ as->acc.access_reg (as, reg, &val, 1, arg);
++ }
++ }
++}
++
++PROTECTED int
++unw_resume (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ if (!c->dwarf.ip)
++ {
++ /* This can happen easily when the frame-chain gets truncated
++ due to bad or missing unwind-info. */
++ Debug (1, "refusing to resume execution at address 0\n");
++ return -UNW_EINVAL;
++ }
++
++ establish_machine_state (c);
++
++ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c,
++ c->dwarf.as_arg);
++}
+--- /dev/null
++++ b/src/aarch64/Gstep.c
+@@ -0,0 +1,129 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++#include "offsets.h"
++
++PROTECTED int
++unw_handle_signal_frame (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa;
++ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0);
++
++ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0)
++ return -UNW_EUNSPEC;
++
++ ret = unw_is_signal_frame (cursor);
++ Debug(1, "unw_is_signal_frame()=%d\n", ret);
++
++ /* Save the SP and PC to be able to return execution at this point
++ later in time (unw_resume). */
++ c->sigcontext_sp = c->dwarf.cfa;
++ c->sigcontext_pc = c->dwarf.ip;
++
++ if (ret)
++ {
++ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME;
++ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
++ }
++ else
++ return -UNW_EUNSPEC;
++
++ c->sigcontext_addr = sc_addr;
++
++ /* Update the dwarf cursor.
++ Set the location of the registers to the corresponding addresses of the
++ uc_mcontext / sigcontext structure contents. */
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0);
++
++ /* Set SP/CFA and PC/IP. */
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++
++ c->dwarf.pi_valid = 0;
++
++ return 1;
++}
++
++PROTECTED int
++unw_step (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n",
++ c, c->dwarf.ip, c->dwarf.cfa);
++
++ /* Check if this is a signal frame. */
++ if (unw_is_signal_frame (cursor))
++ return unw_handle_signal_frame (cursor);
++
++ ret = dwarf_step (&c->dwarf);
++ Debug(1, "dwarf_step()=%d\n", ret);
++
++ if (unlikely (ret == -UNW_ESTOPUNWIND))
++ return ret;
++
++ if (unlikely (ret < 0))
++ return 0;
++
++ return (c->dwarf.ip == 0) ? 0 : 1;
++}
+--- /dev/null
++++ b/src/aarch64/Lcreate_addr_space.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gcreate_addr_space.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_proc_info.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_proc_info.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_save_loc.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_save_loc.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lglobal.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gglobal.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_local.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_local.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_remote.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_remote.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lis_signal_frame.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gis_signal_frame.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lregs.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gregs.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lresume.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gresume.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lstep.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gstep.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/gen-offsets.c
+@@ -0,0 +1,68 @@
++#include <stdio.h>
++#include <stddef.h>
++#include <ucontext.h>
++#include <asm/sigcontext.h>
++
++#define UC(N,X) \
++ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
++
++#define SC(N,X) \
++ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
++
++int
++main (void)
++{
++ printf (
++"/* Linux-specific definitions: */\n\n"
++
++"/* Define various structure offsets to simplify cross-compilation. */\n\n"
++
++"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n");
++
++ UC ("FLAGS", uc_flags);
++ UC ("LINK", uc_link);
++ UC ("STACK", uc_stack);
++ UC ("MCONTEXT", uc_mcontext);
++ UC ("SIGMASK", uc_sigmask);
++
++ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n");
++
++ SC ("R0", regs[0]);
++ SC ("R1", regs[1]);
++ SC ("R2", regs[2]);
++ SC ("R3", regs[3]);
++ SC ("R4", regs[4]);
++ SC ("R5", regs[5]);
++ SC ("R6", regs[6]);
++ SC ("R7", regs[7]);
++ SC ("R8", regs[8]);
++ SC ("R9", regs[9]);
++ SC ("R10", regs[10]);
++ SC ("R11", regs[11]);
++ SC ("R12", regs[12]);
++ SC ("R13", regs[13]);
++ SC ("R14", regs[14]);
++ SC ("R15", regs[15]);
++ SC ("R16", regs[16]);
++ SC ("R17", regs[17]);
++ SC ("R18", regs[18]);
++ SC ("R19", regs[19]);
++ SC ("R20", regs[20]);
++ SC ("R21", regs[21]);
++ SC ("R22", regs[22]);
++ SC ("R23", regs[23]);
++ SC ("R24", regs[24]);
++ SC ("R25", regs[25]);
++ SC ("R26", regs[26]);
++ SC ("R27", regs[27]);
++ SC ("R28", regs[28]);
++ SC ("R29", regs[29]);
++ SC ("R30", regs[30]);
++ SC ("R31", regs[31]);
++
++ SC ("PC", pc);
++ SC ("SP", sp);
++ SC ("Fault", fault_address);
++ SC ("state", pstate);
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/init.h
+@@ -0,0 +1,127 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++static inline int
++common_init (struct cursor *c, unsigned use_prev_instr)
++{
++ int ret, i;
++
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf,
++ UNW_AARCH64_PSTATE);
++ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0);
++ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1);
++ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2);
++ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3);
++ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4);
++ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5);
++ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6);
++ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7);
++ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8);
++ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9);
++ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10);
++ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11);
++ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12);
++ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13);
++ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14);
++ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15);
++ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16);
++ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17);
++ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18);
++ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19);
++ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20);
++ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21);
++ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22);
++ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23);
++ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24);
++ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25);
++ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26);
++ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27);
++ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28);
++ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29);
++ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30);
++ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31);
++
++ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i)
++ c->dwarf.loc[i] = DWARF_NULL_LOC;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++ if (ret < 0)
++ return ret;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ if (ret < 0)
++ return ret;
++
++ c->sigcontext_format = AARCH64_SCF_NONE;
++ c->sigcontext_addr = 0;
++ c->sigcontext_sp = 0;
++ c->sigcontext_pc = 0;
++
++ c->dwarf.args_size = 0;
++ c->dwarf.ret_addr_column = 0;
++ c->dwarf.stash_frames = 0;
++ c->dwarf.use_prev_instr = use_prev_instr;
++ c->dwarf.pi_valid = 0;
++ c->dwarf.pi_is_dynamic = 0;
++ c->dwarf.hint = 0;
++ c->dwarf.prev_rs = 0;
++
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/is_fpreg.c
+@@ -0,0 +1,32 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "libunwind_i.h"
++
++PROTECTED int
++unw_is_fpreg (int regnum)
++{
++ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
++}
+--- /dev/null
++++ b/src/aarch64/offsets.h
+@@ -0,0 +1,49 @@
++/* Linux-specific definitions: */
++
++/* Define various structure offsets to simplify cross-compilation. */
++
++/* Offsets for AArch64 Linux "ucontext_t": */
++
++#define LINUX_UC_FLAGS_OFF 0x0
++#define LINUX_UC_LINK_OFF 0x8
++#define LINUX_UC_STACK_OFF 0x10
++#define LINUX_UC_SIGMASK_OFF 0x28
++#define LINUX_UC_MCONTEXT_OFF 0xb0
++
++/* Offsets for AArch64 Linux "struct sigcontext": */
++
++#define LINUX_SC_FAULTADDRESS_OFF 0x00
++#define LINUX_SC_X0_OFF 0x008
++#define LINUX_SC_X1_OFF 0x010
++#define LINUX_SC_X2_OFF 0x018
++#define LINUX_SC_X3_OFF 0x020
++#define LINUX_SC_X4_OFF 0x028
++#define LINUX_SC_X5_OFF 0x030
++#define LINUX_SC_X6_OFF 0x038
++#define LINUX_SC_X7_OFF 0x040
++#define LINUX_SC_X8_OFF 0x048
++#define LINUX_SC_X9_OFF 0x050
++#define LINUX_SC_X10_OFF 0x058
++#define LINUX_SC_X11_OFF 0x060
++#define LINUX_SC_X12_OFF 0x068
++#define LINUX_SC_X13_OFF 0x070
++#define LINUX_SC_X14_OFF 0x078
++#define LINUX_SC_X15_OFF 0x080
++#define LINUX_SC_X16_OFF 0x088
++#define LINUX_SC_X17_OFF 0x090
++#define LINUX_SC_X18_OFF 0x098
++#define LINUX_SC_X19_OFF 0x0a0
++#define LINUX_SC_X20_OFF 0x0a8
++#define LINUX_SC_X21_OFF 0x0b0
++#define LINUX_SC_X22_OFF 0x0b8
++#define LINUX_SC_X23_OFF 0x0c0
++#define LINUX_SC_X24_OFF 0x0c8
++#define LINUX_SC_X25_OFF 0x0d0
++#define LINUX_SC_X26_OFF 0x0d8
++#define LINUX_SC_X27_OFF 0x0e0
++#define LINUX_SC_X28_OFF 0x0e8
++#define LINUX_SC_X29_OFF 0x0f0
++#define LINUX_SC_X30_OFF 0x0f8
++#define LINUX_SC_SP_OFF 0x100
++#define LINUX_SC_PC_OFF 0x108
++#define LINUX_SC_PSTATE_OFF 0x110
+--- /dev/null
++++ b/src/aarch64/regname.c
+@@ -0,0 +1,106 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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 "unwind_i.h"
++
++static const char *const regname[] =
++ {
++ [UNW_AARCH64_X0] = "x0",
++ [UNW_AARCH64_X1] = "x1",
++ [UNW_AARCH64_X2] = "x2",
++ [UNW_AARCH64_X3] = "x3",
++ [UNW_AARCH64_X4] = "x4",
++ [UNW_AARCH64_X5] = "x5",
++ [UNW_AARCH64_X6] = "x6",
++ [UNW_AARCH64_X7] = "x7",
++ [UNW_AARCH64_X8] = "x8",
++ [UNW_AARCH64_X9] = "x9",
++ [UNW_AARCH64_X10] = "x10",
++ [UNW_AARCH64_X11] = "x11",
++ [UNW_AARCH64_X12] = "x12",
++ [UNW_AARCH64_X13] = "x13",
++ [UNW_AARCH64_X14] = "x14",
++ [UNW_AARCH64_X15] = "x15",
++ [UNW_AARCH64_X16] = "ip0",
++ [UNW_AARCH64_X17] = "ip1",
++ [UNW_AARCH64_X18] = "x18",
++ [UNW_AARCH64_X19] = "x19",
++ [UNW_AARCH64_X20] = "x20",
++ [UNW_AARCH64_X21] = "x21",
++ [UNW_AARCH64_X22] = "x22",
++ [UNW_AARCH64_X23] = "x23",
++ [UNW_AARCH64_X24] = "x24",
++ [UNW_AARCH64_X25] = "x25",
++ [UNW_AARCH64_X26] = "x26",
++ [UNW_AARCH64_X27] = "x27",
++ [UNW_AARCH64_X28] = "x28",
++ [UNW_AARCH64_X29] = "fp",
++ [UNW_AARCH64_X30] = "lr",
++ [UNW_AARCH64_SP] = "sp",
++ [UNW_AARCH64_PC] = "pc",
++ [UNW_AARCH64_V0] = "v0",
++ [UNW_AARCH64_V1] = "v1",
++ [UNW_AARCH64_V2] = "v2",
++ [UNW_AARCH64_V3] = "v3",
++ [UNW_AARCH64_V4] = "v4",
++ [UNW_AARCH64_V5] = "v5",
++ [UNW_AARCH64_V6] = "v6",
++ [UNW_AARCH64_V7] = "v7",
++ [UNW_AARCH64_V8] = "v8",
++ [UNW_AARCH64_V9] = "v9",
++ [UNW_AARCH64_V10] = "v10",
++ [UNW_AARCH64_V11] = "v11",
++ [UNW_AARCH64_V12] = "v12",
++ [UNW_AARCH64_V13] = "v13",
++ [UNW_AARCH64_V14] = "v14",
++ [UNW_AARCH64_V15] = "v15",
++ [UNW_AARCH64_V16] = "v16",
++ [UNW_AARCH64_V17] = "v17",
++ [UNW_AARCH64_V18] = "v18",
++ [UNW_AARCH64_V19] = "v19",
++ [UNW_AARCH64_V20] = "v20",
++ [UNW_AARCH64_V21] = "v21",
++ [UNW_AARCH64_V22] = "v22",
++ [UNW_AARCH64_V23] = "v23",
++ [UNW_AARCH64_V24] = "v24",
++ [UNW_AARCH64_V25] = "v25",
++ [UNW_AARCH64_V26] = "v26",
++ [UNW_AARCH64_V27] = "v27",
++ [UNW_AARCH64_V28] = "v28",
++ [UNW_AARCH64_V29] = "v29",
++ [UNW_AARCH64_V30] = "v30",
++ [UNW_AARCH64_V31] = "v31",
++ [UNW_AARCH64_FPSR] = "fpsr",
++ [UNW_AARCH64_FPCR] = "fpcr",
++ };
++
++PROTECTED const char *
++unw_regname (unw_regnum_t reg)
++{
++ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL)
++ return regname[reg];
++ else
++ return "???";
++}
+--- /dev/null
++++ b/src/aarch64/siglongjmp.S
+@@ -0,0 +1,12 @@
++ /* Dummy implementation for now. */
++
++ .global _UI_siglongjmp_cont
++ .global _UI_longjmp_cont
++
++_UI_siglongjmp_cont:
++_UI_longjmp_cont:
++ ret
++#ifdef __linux__
++ /* We do not need executable stack. */
++ .section .note.GNU-stack,"",%progbits
++#endif
+--- /dev/null
++++ b/src/aarch64/unwind_i.h
+@@ -0,0 +1,43 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++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. */
++
++#ifndef unwind_i_h
++#define unwind_i_h
++
++#include <stdint.h>
++
++#include <libunwind-aarch64.h>
++
++#include "libunwind_i.h"
++
++#define aarch64_lock UNW_OBJ(lock)
++#define aarch64_local_resume UNW_OBJ(local_resume)
++#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init)
++
++extern void aarch64_local_addr_space_init (void);
++extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
++ void *arg);
++
++#endif /* unwind_i_h */
+--- a/src/coredump/_UCD_access_reg_linux.c
++++ b/src/coredump/_UCD_access_reg_linux.c
+@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as,
+ return -UNW_EINVAL;
+ }
+
+-#if defined(UNW_TARGET_ARM)
++#if defined(UNW_TARGET_AARCH64)
++ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
++ goto badreg;
++#elif defined(UNW_TARGET_ARM)
+ if (regnum < 0 || regnum >= 16)
+ goto badreg;
+ #elif defined(UNW_TARGET_SH)
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -1,6 +1,7 @@
+ /* libunwind - a platform-independent unwind library
+ Copyright (C) 2003-2004 Hewlett-Packard Co
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
+
+ This file is part of libunwind.
+
+@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST +
+ [UNW_ARM_R15] = 0x3c,
+ #elif defined(UNW_TARGET_MIPS)
+ #elif defined(UNW_TARGET_SH)
++#elif defined(UNW_TARGET_AARCH64)
++ [UNW_AARCH64_X0] = 0x00,
++ [UNW_AARCH64_X1] = 0x08,
++ [UNW_AARCH64_X2] = 0x10,
++ [UNW_AARCH64_X3] = 0x18,
++ [UNW_AARCH64_X4] = 0x20,
++ [UNW_AARCH64_X5] = 0x28,
++ [UNW_AARCH64_X6] = 0x30,
++ [UNW_AARCH64_X7] = 0x38,
++ [UNW_AARCH64_X8] = 0x40,
++ [UNW_AARCH64_X9] = 0x48,
++ [UNW_AARCH64_X10] = 0x50,
++ [UNW_AARCH64_X11] = 0x58,
++ [UNW_AARCH64_X12] = 0x60,
++ [UNW_AARCH64_X13] = 0x68,
++ [UNW_AARCH64_X14] = 0x70,
++ [UNW_AARCH64_X15] = 0x78,
++ [UNW_AARCH64_X16] = 0x80,
++ [UNW_AARCH64_X17] = 0x88,
++ [UNW_AARCH64_X18] = 0x90,
++ [UNW_AARCH64_X19] = 0x98,
++ [UNW_AARCH64_X20] = 0xa0,
++ [UNW_AARCH64_X21] = 0xa8,
++ [UNW_AARCH64_X22] = 0xb0,
++ [UNW_AARCH64_X23] = 0xb8,
++ [UNW_AARCH64_X24] = 0xc0,
++ [UNW_AARCH64_X25] = 0xc8,
++ [UNW_AARCH64_X26] = 0xd0,
++ [UNW_AARCH64_X27] = 0xd8,
++ [UNW_AARCH64_X28] = 0xe0,
++ [UNW_AARCH64_X29] = 0xe8,
++ [UNW_AARCH64_X30] = 0xf0,
++ [UNW_AARCH64_SP] = 0xf8,
++ [UNW_AARCH64_PC] = 0x100,
++ [UNW_AARCH64_PSTATE] = 0x108
+ #else
+ # error Fix me.
+ #endif
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
new file mode 100644
index 0000000000..dc0f5c1b47
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
@@ -0,0 +1,28 @@
+Fix test case link failure on PowerPC systems with Altivec
+
+Upstream-Status:backport
+
+On systems where the system compiler supports Altivec by default,
+the libunwind Makefile will attempt to build an extra test case
+ppc64-test-altivec. Unfortunately, the link step will fail since
+the Makefile does not actually link against the libunwind library.
+
+Fixed by adding the appropriate LDADD macro.
+
+Signed-off-by: Ulrich Weigand <address@hidden>
+---
+ tests/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 0e30536..9c76628 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
+ Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
+ ia64_test_dyn1_LDADD = $(LIBUNWIND)
+ ia64_test_sig_LDADD = $(LIBUNWIND)
++ppc64_test_altivec_LDADD = $(LIBUNWIND)
+--
+1.8.5
+
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
new file mode 100644
index 0000000000..268b702dcb
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
@@ -0,0 +1,72 @@
+From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
+From: Ladislav Michl <ladis@linux-mips.org>
+Date: Tue, 13 Nov 2012 11:19:47 +0100
+Subject: [PATCH] Support building with older compilers.
+
+Add a check for __builtin_unreachable.
+
+Upstream-Status: Pending
+---
+ configure.ac | 11 +++++++++++
+ include/libunwind_i.h | 6 ++++++
+ src/arm/Gresume.c | 2 +-
+ src/sh/Gresume.c | 2 +-
+ 4 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
+ fi
+ AC_MSG_RESULT([$have__builtin___clear_cache])
+
++AC_MSG_CHECKING([for __builtin_unreachable])
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
++ [have__builtin_unreachable=yes],
++ [have__builtin_unreachable=no])
++if test x$have__builtin_unreachable = xyes; then
++ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
++ [Defined if __builtin_unreachable() is available])
++fi
++AC_MSG_RESULT([$have__builtin_unreachable])
++
+ AC_MSG_CHECKING([for __sync atomics])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[
+--- a/include/libunwind_i.h
++++ b/include/libunwind_i.h
+@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ # endif
+ #endif
+
++#if defined(HAVE__BUILTIN_UNREACHABLE)
++# define unreachable() __builtin_unreachable()
++#else
++# define unreachable() do { } while (1)
++#endif
++
+ #ifdef DEBUG
+ # define UNW_DEBUG 1
+ #else
+--- a/src/arm/Gresume.c
++++ b/src/arm/Gresume.c
+@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
+ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #else
+ printf ("%s: implement me\n", __FUNCTION__);
+ #endif
+--- a/src/sh/Gresume.c
++++ b/src/sh/Gresume.c
+@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
+ "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #endif
+ return -UNW_EINVAL;
+ }
diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc
new file mode 100644
index 0000000000..6743b21fcf
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind.inc
@@ -0,0 +1,31 @@
+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"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+inherit autotools
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,lzma"
+
+EXTRA_OECONF_arm = "--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 ?= ""
+
+LDFLAGS += "${LIBATOMICS}"
+LIBATOMICS_armv5 = "-latomic_ops"
+LIBATOMICS_armv4 = "-latomic_ops"
+LIBATOMICS ?= ""
+
+DEPENDS += "${DEPLIBATOMICS}"
+DEPLIBATOMICS_armv5 = "libatomics-ops"
+DEPLIBATOMICS_armv4 = "libatomics-ops"
+DEPLIBATOMICS ?= ""
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb
new file mode 100644
index 0000000000..5b54dcbb21
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -0,0 +1,10 @@
+require libunwind.inc
+
+SRC_URI += "\
+ file://Support-building-with-older-compilers.patch \
+ file://AArch64-port.patch \
+ file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
+"
+
+SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
+SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
diff --git a/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
new file mode 100644
index 0000000000..535a7384cb
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
@@ -0,0 +1,47 @@
+From 7b3df100346128d780f218b881d563d1fd12e310 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 20 Oct 2014 13:46:10 +1100
+Subject: [PATCH] Revert "Blacklist ARM gcc 4.8.0, 4.8.1, 4.8.2"
+
+This reverts commit 4b79310aa3d408ba30fee02cc497a68072d38a99.
+OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
+properly.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ urcu/compiler.h | 19 -------------------
+ 1 file changed, 19 deletions(-)
+
+diff --git a/urcu/compiler.h b/urcu/compiler.h
+index 1e30903..19534f0 100644
+--- a/urcu/compiler.h
++++ b/urcu/compiler.h
+@@ -108,23 +108,4 @@
+
+ #define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+-/*
+- * Don't allow compiling with buggy compiler.
+- */
+-
+-#ifdef __GNUC__
+-# define URCU_GCC_VERSION (__GNUC__ * 10000 \
+- + __GNUC_MINOR__ * 100 \
+- + __GNUC_PATCHLEVEL__)
+-
+-/*
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
+- */
+-# ifdef __ARMEL__
+-# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
+-# error Your gcc version produces clobbered frame accesses
+-# endif
+-# endif
+-#endif
+-
+ #endif /* _URCU_COMPILER_H */
+--
+2.1.2
+
diff --git a/meta/recipes-support/liburcu/liburcu/aarch64.patch b/meta/recipes-support/liburcu/liburcu/aarch64.patch
new file mode 100644
index 0000000000..c6cc8c2fd3
--- /dev/null
+++ b/meta/recipes-support/liburcu/liburcu/aarch64.patch
@@ -0,0 +1,19 @@
+libucru: recognize aarch64
+
+Make the same as "arm" internally.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,6 +77,7 @@ AS_CASE([$host_cpu],
+ [alpha*], [ARCHTYPE="alpha"],
+ [ia64], [ARCHTYPE="gcc"],
+ [arm*], [ARCHTYPE="arm"],
++ [aarch64], [ARCHTYPE="arm"],
+ [mips*], [ARCHTYPE="mips"],
+ [tile*], [ARCHTYPE="gcc"],
+ [ARCHTYPE="unknown"]
diff --git a/meta/recipes-support/liburcu/liburcu_0.8.4.bb b/meta/recipes-support/liburcu/liburcu_0.8.6.bb
index cd7af24baa..263b77e995 100644
--- a/meta/recipes-support/liburcu/liburcu_0.8.4.bb
+++ b/meta/recipes-support/liburcu/liburcu_0.8.6.bb
@@ -8,10 +8,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \
+ file://aarch64.patch \
"
-SRC_URI[md5sum] = "2ca6671b20a550aa0e8020a1a9a96fd4"
-SRC_URI[sha256sum] = "96c0a157e94a15b1506efe9aedd98145e6eb41a3fbcf5b0d118b7a783b22fe12"
+SRC_URI[md5sum] = "834d91d939dd55108a05763be9879856"
+SRC_URI[sha256sum] = "b1a5d3bce014ba7a702759bc60b692c1cd46ff0e8a5b53f0d0a95e22db74ab21"
S = "${WORKDIR}/userspace-rcu-${PV}"
CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
index 0b2526dbee..ded883e457 100644
--- a/meta/recipes-support/libxslt/libxslt_1.1.28.bb
+++ b/meta/recipes-support/libxslt/libxslt_1.1.28.bb
@@ -35,6 +35,11 @@ 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"
diff --git a/meta/recipes-support/lz4/lz4_svn.bb b/meta/recipes-support/lz4/lz4_svn.bb
index 38e36d8256..363e439eea 100644
--- a/meta/recipes-support/lz4/lz4_svn.bb
+++ b/meta/recipes-support/lz4/lz4_svn.bb
@@ -2,10 +2,10 @@ 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://LICENSE;md5=2008d2325e11691e17fcaa3a6046f850"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0b0d063f37a4477b54af2459477dcafd"
# Upstream names releases after SVN revs
-SRCREV = "112"
+SRCREV = "127"
PV = "r${SRCREV}"
SRC_URI = "svn://lz4.googlecode.com/svn/;module=trunk;protocol=http"
diff --git a/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 0000000000..db3a70e803
--- /dev/null
+++ b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
@@ -0,0 +1,70 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 23 Nov 2014 22:50:33 +0000
+Subject: Use memcpy() instead of reinventing it
+
+gcc inlines memcpy() with results as fast as handwritten code (at
+least in my brief testing with lzop), and knows the alignment
+constraints for our architectures.
+
+Change suggested by Julian Taylor.
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ minilzo/minilzo.c | 14 ++++++++++++++
+ src/lzo_func.h | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+
+diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
+index ab2be5f..6913c2f 100644
+--- a/minilzo/minilzo.c
++++ b/minilzo/minilzo.c
+@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
+diff --git a/src/lzo_func.h b/src/lzo_func.h
+index dfaa676..1cc1b53 100644
+--- a/src/lzo_func.h
++++ b/src/lzo_func.h
+@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
diff --git a/meta/recipes-support/lzo/lzo-2.06/acinclude.m4 b/meta/recipes-support/lzo/lzo/acinclude.m4
index c4d2ccd5b5..c4d2ccd5b5 100644
--- a/meta/recipes-support/lzo/lzo-2.06/acinclude.m4
+++ b/meta/recipes-support/lzo/lzo/acinclude.m4
diff --git a/meta/recipes-support/lzo/lzo_2.06.bb b/meta/recipes-support/lzo/lzo_2.08.bb
index 23f54edd80..af06e29a6f 100644
--- a/meta/recipes-support/lzo/lzo_2.06.bb
+++ b/meta/recipes-support/lzo/lzo_2.08.bb
@@ -3,15 +3,15 @@ HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
SECTION = "libs"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://src/lzo_init.c;beginline=23;endline=40;md5=924a0f71f5394f6d404be3b458474769"
-PR = "r1"
+ file://src/lzo_init.c;beginline=5;endline=25;md5=a6e25df9a83b24629e847846ccdd8054"
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 \
"
-SRC_URI[md5sum] = "95380bd4081f85ef08c5209f4107e9f8"
-SRC_URI[sha256sum] = "ff79e6f836d62d3f86ef6ce893ed65d07e638ef4d3cb952963471b4234d43e73"
+SRC_URI[md5sum] = "fcec64c26a0f4f4901468f360029678f"
+SRC_URI[sha256sum] = "ac1b3e4dee46febe9fd28737eb7f5692d3232ef1a01da10444394c3d47536614"
inherit autotools
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb b/meta/recipes-support/nettle/nettle_2.7.1.bb
index 8aa5351896..f53afcc5d4 100644
--- a/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -23,4 +23,4 @@ do_configure_prepend() {
inherit autotools
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/npth/npth/pkgconfig.patch b/meta/recipes-support/npth/npth/pkgconfig.patch
new file mode 100644
index 0000000000..178ed54c22
--- /dev/null
+++ b/meta/recipes-support/npth/npth/pkgconfig.patch
@@ -0,0 +1,49 @@
+Added npth pkgconfig file
+
+Upstream-Status: Incompatible [oe-core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: npth-1.1/src/npth.pc.in
+===================================================================
+--- /dev/null
++++ npth-1.1/src/npth.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: npth
++Description: a new portable posix threading library
++Version: @VERSION@
++Libs: -L${libdir} -lnpth -lpthread
++Cflags: -I${includedir}
+Index: npth-1.1/src/Makefile.am
+===================================================================
+--- npth-1.1.orig/src/Makefile.am
++++ npth-1.1/src/Makefile.am
+@@ -27,8 +27,10 @@
+ # License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ ## Process this file with automake to produce Makefile.in
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = npth.pc
+
+-EXTRA_DIST = libnpth.vers
++EXTRA_DIST = libnpth.vers npth.pc
+ # versioninfo.rc.in
+ nodist_include_HEADERS = npth.h
+
+Index: npth-1.1/configure.ac
+===================================================================
+--- npth-1.1.orig/configure.ac
++++ npth-1.1/configure.ac
+@@ -337,6 +337,7 @@ src/Makefile
+ w32/Makefile
+ tests/Makefile])
+ AC_CONFIG_FILES(npth-config, chmod +x npth-config)
++AC_CONFIG_FILES([src/npth.pc])
+ AC_OUTPUT
+
+ echo "
diff --git a/meta/recipes-support/npth/npth_0.91.bb b/meta/recipes-support/npth/npth_1.1.bb
index 7105b94e3d..72a194e784 100644
--- a/meta/recipes-support/npth/npth_0.91.bb
+++ b/meta/recipes-support/npth/npth_1.1.bb
@@ -7,9 +7,11 @@ LIC_FILES_CHKSUM = "\
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
"
SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
"
-SRC_URI[md5sum] = "87712f0cee656c390b49773923e26e7f"
-SRC_URI[sha256sum] = "caef86ced4a331e162897818a5b924860c8d6003e52da5bdf76da00e8e0dfae1"
+
+SRC_URI[md5sum] = "aaffc8ef3e955ab50a1905809f268a23"
+SRC_URI[sha256sum] = "896c561eb2ec8da35f11828fb04a3fbff12d41ff657c799056d7dc4a66e5df7f"
BINCONFIG = "${bindir}/npth-config"
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 a6fa1ea607..c2b7258e50 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
@@ -11,23 +11,27 @@ Upstream-Status: Pending
configure.in | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
-diff --git a/configure.in b/configure.in
-index 39c96a3..99a03ac 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1778,24 +1778,24 @@ tools are selected during the Xcode/Developer Tools installation.])
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
- if test -n "$USE_64"; then
- PR_MD_ASFILES=os_Linux_x86_64.s
-- else
-+ if test -n "$USE_N32"; then
- AC_DEFINE(i386)
- PR_MD_ASFILES=os_Linux_x86.s
- CC="$CC -m32"
- CXX="$CXX -m32"
-+ else
+- elif test -n "$USE_X32"; then
++ if test -n "$USE_X32"; then
++ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ CC="$CC -mx32"
+ CXX="$CXX -mx32"
+ else
+- AC_DEFINE(i386)
+- PR_MD_ASFILES=os_Linux_x86.s
+- CC="$CC -m32"
+- CXX="$CXX -m32"
+ PR_MD_ASFILES=os_Linux_x86_64.s
fi
;;
@@ -46,6 +50,3 @@ index 39c96a3..99a03ac 100644
fi
;;
m68k)
---
-1.7.1
-
diff --git a/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
new file mode 100644
index 0000000000..565ff168e0
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch
@@ -0,0 +1,67 @@
+Fix for CVE-2014-1545
+
+Upstream-Status: Backport
+
+Backported from nspr-4.10.6.tar.gz.
+---
+--- a/pr/src/io/prprf.c
++++ b/pr/src/io/prprf.c
+@@ -50,6 +50,10 @@
+ #include "prlog.h"
+ #include "prmem.h"
+
++#ifdef _MSC_VER
++#define snprintf _snprintf
++#endif
++
+ /*
+ ** WARNING: This code may *NOT* call PR_LOG (because PR_LOG calls it)
+ */
+@@ -330,7 +334,7 @@
+ ** Convert a double precision floating point number into its printable
+ ** form.
+ **
+-** XXX stop using sprintf to convert floating point
++** XXX stop using snprintf to convert floating point
+ */
+ static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1)
+ {
+@@ -338,15 +342,14 @@
+ char fout[300];
+ int amount = fmt1 - fmt0;
+
+- PR_ASSERT((amount > 0) && (amount < sizeof(fin)));
+- if (amount >= sizeof(fin)) {
+- /* Totally bogus % command to sprintf. Just ignore it */
++ if (amount <= 0 || amount >= sizeof(fin)) {
++ /* Totally bogus % command to snprintf. Just ignore it */
+ return 0;
+ }
+ memcpy(fin, fmt0, amount);
+ fin[amount] = 0;
+
+- /* Convert floating point using the native sprintf code */
++ /* Convert floating point using the native snprintf code */
+ #ifdef DEBUG
+ {
+ const char *p = fin;
+@@ -356,14 +359,11 @@
+ }
+ }
+ #endif
+- sprintf(fout, fin, d);
+-
+- /*
+- ** This assert will catch overflow's of fout, when building with
+- ** debugging on. At least this way we can track down the evil piece
+- ** of calling code and fix it!
+- */
+- PR_ASSERT(strlen(fout) < sizeof(fout));
++ memset(fout, 0, sizeof(fout));
++ snprintf(fout, sizeof(fout), fin, d);
++ /* Explicitly null-terminate fout because on Windows snprintf doesn't
++ * append a null-terminator if the buffer is too small. */
++ fout[sizeof(fout) - 1] = '\0';
+
+ return (*ss->stuff)(ss, fout, strlen(fout));
+ }
diff --git a/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
new file mode 100644
index 0000000000..bde715c5dc
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
@@ -0,0 +1,19 @@
+the $srcdir is not defined at the time of gnu-configurize.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
+ AC_INIT
+ AC_CONFIG_SRCDIR([pr/include/nspr.h])
+
+-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
++AC_CONFIG_AUX_DIR(build/autoconf)
+ AC_CANONICAL_TARGET
+
+ dnl ========================================================
diff --git a/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch
deleted file mode 100644
index 8ca51e4d1f..0000000000
--- a/meta/recipes-support/nspr/nspr/trickly-fix-build-on-x86_64.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-trickily fix build failure on x86_64
-
-It seems that we can not run the 'autoreconf -f -i' for the nspr, I met
-several strange problems while trying to do that, and the previous
-author seemed had noticed this, so he wrote:
-
-do_configure() {
- oe_runconf
-}
-
-to avoid running the "autoreconf". But we must modify configure.in to
-fix the build failure on x86_64, so both modify configure and
-configure.in, once the "autoreconf" can work correctly, we can remove
-this patch.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- configure | 12 ++++++------
- 1 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -4366,9 +4366,7 @@ EOF
- PR_MD_ASFILES=os_Linux_ia64.s
- ;;
- x86_64)
-- if test -n "$USE_64"; then
-- PR_MD_ASFILES=os_Linux_x86_64.s
-- else
-+ if test -n "$USE_N32"; then
- cat >> confdefs.h <<\EOF
- #define i386 1
- EOF
-@@ -4376,17 +4374,19 @@ EOF
- PR_MD_ASFILES=os_Linux_x86.s
- CC="$CC -m32"
- CXX="$CXX -m32"
-+ else
-+ PR_MD_ASFILES=os_Linux_x86_64.s
- fi
- ;;
- ppc|powerpc)
- PR_MD_ASFILES=os_Linux_ppc.s
- ;;
- powerpc64)
-- if test -n "$USE_64"; then
-+ if test -n "$USE_N32"; then
-+ PR_MD_ASFILES=os_Linux_ppc.s
-+ else
- CC="$CC -m64"
- CXX="$CXX -m64"
-- else
-- PR_MD_ASFILES=os_Linux_ppc.s
- fi
- ;;
- m68k)
---
-1.7.1
-
diff --git a/meta/recipes-support/nspr/nspr_4.10.3.bb b/meta/recipes-support/nspr/nspr_4.10.7.bb
index 0adfe3b3a3..de281974c5 100644
--- a/meta/recipes-support/nspr/nspr_4.10.3.bb
+++ b/meta/recipes-support/nspr/nspr_4.10.7.bb
@@ -8,21 +8,20 @@ SECTION = "libs/network"
SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
file://remove-rpath-from-tests.patch \
file://fix-build-on-x86_64.patch \
- file://trickly-fix-build-on-x86_64.patch \
+ file://remove-srcdir-from-configure-in.patch \
"
SRC_URI += "file://nspr.pc.in"
-SRC_URI[md5sum] = "bf298e874cf454a3c2f8fe7e671c5d2e"
-SRC_URI[sha256sum] = "f25779b1a665dab0090b9c977dc6c29a63320f442956ed78629b66b405cb01e5"
+SRC_URI[md5sum] = "6e06919e4b56efed501e05d8b45ec10e"
+SRC_URI[sha256sum] = "389af5cfa863ea9bc6de7b30c15f8a4f9bddd8002f8c6fdc8b33caef43893938"
S = "${WORKDIR}/nspr-${PV}/nspr"
RDEPENDS_${PN}-dev += "perl"
TARGET_CC_ARCH += "${LDFLAGS}"
-TESTS = "runtests.pl \
- runtests.sh \
+TESTS = " \
accept \
acceptread \
acceptreademu \
@@ -138,13 +137,9 @@ TESTS = "runtests.pl \
xnotify \
zerolen"
-inherit autotools-brokensep
+PR = "r1"
-do_configure() {
- gnu-configize --force
- mv config.sub config.guess build/autoconf
- oe_runconf
-}
+inherit autotools
do_compile_prepend() {
oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
@@ -160,8 +155,11 @@ do_install_append() {
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
- cd ${S}/pr/tests
+
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
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 540f22330a..bbce9e9af0 100644
--- a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -11,16 +11,19 @@ SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${P
SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
-inherit autotools
+inherit autotools distro_features_check
+
+# The systemd has its own copy of nss-myhostname
+CONFLICT_DISTRO_FEATURES = "systemd"
pkg_postinst_${PN} () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
pkg_prerm_${PN} () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e '/^hosts:/s/\s*myhostname//' \
- -i $D/etc/nsswitch.conf
+ -i $D${sysconfdir}/nsswitch.conf
}
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
deleted file mode 100644
index 1a159c3934..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
-
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -10509,7 +10509,7 @@ ssl_RemoveSSLv3CBCPadding(sslBuffer *pla
- /* SSLv3 padding bytes are random and cannot be checked. */
- t = plaintext->len;
- t -= paddingLength+overhead;
-- /* If len >= padding_length+overhead then the MSB of t is zero. */
-+ /* If len >= paddingLength+overhead then the MSB of t is zero. */
- good = DUPLICATE_MSB_TO_ALL(~t);
- /* SSLv3 requires that the padding is minimal. */
- t = blockSize - (paddingLength+1);
-@@ -10742,7 +10742,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- }
- }
-
-- good = (unsigned)-1;
-+ good = ~0U;
- minLength = crSpec->mac_size;
- if (cipher_def->type == type_block) {
- /* CBC records have a padding length byte at the end. */
-@@ -10756,14 +10756,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- /* We can perform this test in variable time because the record's total
- * length and the ciphersuite are both public knowledge. */
- if (cText->buf->len < minLength) {
-- SSL_DBG(("%d: SSL3[%d]: HandleRecord, record too small.",
-- SSL_GETPID(), ss->fd));
-- /* must not hold spec lock when calling SSL3_SendAlert. */
-- ssl_ReleaseSpecReadLock(ss);
-- SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
-- /* always log mac error, in case attacker can read server logs. */
-- PORT_SetError(SSL_ERROR_BAD_MAC_READ);
-- return SECFailure;
-+ goto decrypt_loser;
- }
-
- if (cipher_def->type == type_block &&
-@@ -10831,11 +10824,18 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- return SECFailure;
- }
-
-+ if (cipher_def->type == type_block &&
-+ ((cText->buf->len - ivLen) % cipher_def->block_size) != 0) {
-+ goto decrypt_loser;
-+ }
-+
- /* decrypt from cText buf to plaintext. */
- rv = crSpec->decode(
- crSpec->decodeContext, plaintext->buf, (int *)&plaintext->len,
- plaintext->space, cText->buf->buf + ivLen, cText->buf->len - ivLen);
-- good &= SECStatusToMask(rv);
-+ if (rv != SECSuccess) {
-+ goto decrypt_loser;
-+ }
-
- PRINT_BUF(80, (ss, "cleartext:", plaintext->buf, plaintext->len));
-
-@@ -10843,7 +10843,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
-
- /* If it's a block cipher, check and strip the padding. */
- if (cipher_def->type == type_block) {
-- const unsigned int blockSize = cipher_def->iv_size;
-+ const unsigned int blockSize = cipher_def->block_size;
- const unsigned int macSize = crSpec->mac_size;
-
- if (crSpec->version <= SSL_LIBRARY_VERSION_3_0) {
-@@ -10899,10 +10899,11 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip
- }
-
- if (good == 0) {
-+decrypt_loser:
- /* must not hold spec lock when calling SSL3_SendAlert. */
- ssl_ReleaseSpecReadLock(ss);
-
-- SSL_DBG(("%d: SSL3[%d]: mac check failed", SSL_GETPID(), ss->fd));
-+ SSL_DBG(("%d: SSL3[%d]: decryption failed", SSL_GETPID(), ss->fd));
-
- if (!IS_DTLS(ss)) {
- SSL3_SendAlert(ss, alert_fatal, bad_record_mac);
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
deleted file mode 100644
index 21da0c03b5..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Upstream-Status: backport
-yanjun.zhu <yanjun.zhu@windriver.com>
---- a/nss/lib/util/secport.c
-+++ b/nss/lib/util/secport.c
-@@ -69,13 +69,22 @@ PORTCharConversionFunc ucs4Utf8ConvertFu
- PORTCharConversionFunc ucs2Utf8ConvertFunc;
- PORTCharConversionWSwapFunc ucs2AsciiConvertFunc;
-
-+/* NSPR memory allocation functions (PR_Malloc, PR_Calloc, and PR_Realloc)
-+ * use the PRUint32 type for the size parameter. Before we pass a size_t or
-+ * unsigned long size to these functions, we need to ensure it is <= half of
-+ * the maximum PRUint32 value to avoid truncation and catch a negative size.
-+ */
-+#define MAX_SIZE (PR_UINT32_MAX >> 1)
-+
- void *
- PORT_Alloc(size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- /* Always allocate a non-zero amount of bytes */
-- rv = (void *)PR_Malloc(bytes ? bytes : 1);
-+ if (bytes <= MAX_SIZE) {
-+ /* Always allocate a non-zero amount of bytes */
-+ rv = PR_Malloc(bytes ? bytes : 1);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -86,9 +95,11 @@ PORT_Alloc(size_t bytes)
- void *
- PORT_Realloc(void *oldptr, size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- rv = (void *)PR_Realloc(oldptr, bytes);
-+ if (bytes <= MAX_SIZE) {
-+ rv = PR_Realloc(oldptr, bytes);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -99,10 +110,12 @@ PORT_Realloc(void *oldptr, size_t bytes)
- void *
- PORT_ZAlloc(size_t bytes)
- {
-- void *rv;
-+ void *rv = NULL;
-
-- /* Always allocate a non-zero amount of bytes */
-- rv = (void *)PR_Calloc(1, bytes ? bytes : 1);
-+ if (bytes <= MAX_SIZE) {
-+ /* Always allocate a non-zero amount of bytes */
-+ rv = PR_Calloc(1, bytes ? bytes : 1);
-+ }
- if (!rv) {
- ++port_allocFailures;
- PORT_SetError(SEC_ERROR_NO_MEMORY);
-@@ -209,6 +222,10 @@ PORT_NewArena(unsigned long chunksize)
- {
- PORTArenaPool *pool;
-
-+ if (chunksize > MAX_SIZE) {
-+ PORT_SetError(SEC_ERROR_NO_MEMORY);
-+ return NULL;
-+ }
- pool = PORT_ZNew(PORTArenaPool);
- if (!pool) {
- return NULL;
-@@ -224,8 +241,6 @@ PORT_NewArena(unsigned long chunksize)
- return(&pool->arena);
- }
-
--#define MAX_SIZE 0x7fffffffUL
--
- void *
- PORT_ArenaAlloc(PLArenaPool *arena, size_t size)
- {
-@@ -330,6 +345,11 @@ PORT_ArenaGrow(PLArenaPool *arena, void
- PORTArenaPool *pool = (PORTArenaPool *)arena;
- PORT_Assert(newsize >= oldsize);
-
-+ if (newsize > MAX_SIZE) {
-+ PORT_SetError(SEC_ERROR_NO_MEMORY);
-+ return NULL;
-+ }
-+
- if (ARENAPOOL_MAGIC == pool->magic ) {
- PZ_Lock(pool->lock);
- /* Do we do a THREADMARK check here? */
diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
deleted file mode 100644
index 7203d02c78..0000000000
--- a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-signed-off-by: Ryan Sleevi <ryan.sleevi@gmail.com>
-Upstream-Status: Backport
-reference:https://hg.mozilla.org/projects/nss/rev/e79a09364b5e
-
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -781,6 +781,11 @@ static SECStatus
- Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen,
- const unsigned char *input, int inputLen)
- {
-+ if (inputLen > maxOutputLen) {
-+ *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */
-+ PORT_SetError(SEC_ERROR_OUTPUT_LEN);
-+ return SECFailure;
-+ }
- *outputLen = inputLen;
- if (input != output)
- PORT_Memcpy(output, input, inputLen);
diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
deleted file mode 100644
index db3d6f9103..0000000000
--- a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch
+++ /dev/null
@@ -1,916 +0,0 @@
-nss: CVE-2013-1740
-
-Upstream-Status: Backport
-
-the patch comes from:
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1740
-https://bugzilla.mozilla.org/show_bug.cgi?id=919877
-https://bugzilla.mozilla.org/show_bug.cgi?id=713933
-
-changeset: 10946:f28426e944ae
-user: Wan-Teh Chang <wtc@google.com>
-date: Tue Nov 26 16:44:39 2013 -0800
-summary: Bug 713933: Handle the return value of both ssl3_HandleRecord calls
-
-changeset: 10945:774c7dec7565
-user: Wan-Teh Chang <wtc@google.com>
-date: Mon Nov 25 19:16:23 2013 -0800
-summary: Bug 713933: Declare the |falseStart| local variable in the smallest
-
-changeset: 10848:141fae8fb2e8
-user: Wan-Teh Chang <wtc@google.com>
-date: Mon Sep 23 11:25:41 2013 -0700
-summary: Bug 681839: Allow SSL_HandshakeNegotiatedExtension to be called before the handshake is finished, r=brian@briansmith.org
-
-changeset: 10898:1b9c43d28713
-user: Brian Smith <brian@briansmith.org>
-date: Thu Oct 31 15:40:42 2013 -0700
-summary: Bug 713933: Make SSL False Start work with asynchronous certificate validation, r=wtc
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- nss/lib/ssl/ssl.def | 7 ++
- nss/lib/ssl/ssl.h | 54 +++++++++++---
- nss/lib/ssl/ssl3con.c | 188 +++++++++++++++++++++++++++++++++++------------
- nss/lib/ssl/ssl3gthr.c | 63 ++++++++++++----
- nss/lib/ssl/sslauth.c | 10 +--
- nss/lib/ssl/sslimpl.h | 22 +++++-
- nss/lib/ssl/sslinfo.c | 10 +--
- nss/lib/ssl/sslreveal.c | 9 +--
- nss/lib/ssl/sslsecur.c | 139 ++++++++++++++++++++++++++++-------
- nss/lib/ssl/sslsock.c | 12 ++-
- 10 files changed, 386 insertions(+), 128 deletions(-)
-
-diff --git a/nss/lib/ssl/ssl.def b/nss/lib/ssl/ssl.def
-index fbf7fc5..e937bd4 100644
---- a/nss/lib/ssl/ssl.def
-+++ b/nss/lib/ssl/ssl.def
-@@ -163,3 +163,10 @@ SSL_SetStapledOCSPResponses;
- ;+ local:
- ;+*;
- ;+};
-+;+NSS_3.15.3 { # NSS 3.15.3 release
-+;+ global:
-+SSL_RecommendedCanFalseStart;
-+SSL_SetCanFalseStartCallback;
-+;+ local:
-+;+*;
-+;+};
-diff --git a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h
-index 6db0e34..ddeaaef 100644
---- a/nss/lib/ssl/ssl.h
-+++ b/nss/lib/ssl/ssl.h
-@@ -121,14 +121,17 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd);
- #define SSL_ENABLE_FALSE_START 22 /* Enable SSL false start (off by */
- /* default, applies only to */
- /* clients). False start is a */
--/* mode where an SSL client will start sending application data before */
--/* verifying the server's Finished message. This means that we could end up */
--/* sending data to an imposter. However, the data will be encrypted and */
--/* only the true server can derive the session key. Thus, so long as the */
--/* cipher isn't broken this is safe. Because of this, False Start will only */
--/* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */
--/* bits. The advantage of False Start is that it saves a round trip for */
--/* client-speaks-first protocols when performing a full handshake. */
-+/* mode where an SSL client will start sending application data before
-+ * verifying the server's Finished message. This means that we could end up
-+ * sending data to an imposter. However, the data will be encrypted and
-+ * only the true server can derive the session key. Thus, so long as the
-+ * cipher isn't broken this is safe. The advantage of false start is that
-+ * it saves a round trip for client-speaks-first protocols when performing a
-+ * full handshake.
-+ *
-+ * In addition to enabling this option, the application must register a
-+ * callback using the SSL_SetCanFalseStartCallback function.
-+ */
-
- /* For SSL 3.0 and TLS 1.0, by default we prevent chosen plaintext attacks
- * on SSL CBC mode cipher suites (see RFC 4346 Section F.3) by splitting
-@@ -653,14 +656,45 @@ SSL_IMPORT SECStatus SSL_SetMaxServerCacheLocks(PRUint32 maxLocks);
- SSL_IMPORT SECStatus SSL_InheritMPServerSIDCache(const char * envString);
-
- /*
--** Set the callback on a particular socket that gets called when we finish
--** performing a handshake.
-+** Set the callback that gets called when a TLS handshake is complete. The
-+** handshake callback is called after verifying the peer's Finished message and
-+** before processing incoming application data.
-+**
-+** For the initial handshake: If the handshake false started (see
-+** SSL_ENABLE_FALSE_START), then application data may already have been sent
-+** before the handshake callback is called. If we did not false start then the
-+** callback will get called before any application data is sent.
- */
- typedef void (PR_CALLBACK *SSLHandshakeCallback)(PRFileDesc *fd,
- void *client_data);
- SSL_IMPORT SECStatus SSL_HandshakeCallback(PRFileDesc *fd,
- SSLHandshakeCallback cb, void *client_data);
-
-+/* Applications that wish to enable TLS false start must set this callback
-+** function. NSS will invoke the functon to determine if a particular
-+** connection should use false start or not. SECSuccess indicates that the
-+** callback completed successfully, and if so *canFalseStart indicates if false
-+** start can be used. If the callback does not return SECSuccess then the
-+** handshake will be canceled. NSS's recommended criteria can be evaluated by
-+** calling SSL_RecommendedCanFalseStart.
-+**
-+** If no false start callback is registered then false start will never be
-+** done, even if the SSL_ENABLE_FALSE_START option is enabled.
-+**/
-+typedef SECStatus (PR_CALLBACK *SSLCanFalseStartCallback)(
-+ PRFileDesc *fd, void *arg, PRBool *canFalseStart);
-+
-+SSL_IMPORT SECStatus SSL_SetCanFalseStartCallback(
-+ PRFileDesc *fd, SSLCanFalseStartCallback callback, void *arg);
-+
-+/* This function sets *canFalseStart according to the recommended criteria for
-+** false start. These criteria may change from release to release and may depend
-+** on which handshake features have been negotiated and/or properties of the
-+** certifciates/keys used on the connection.
-+*/
-+SSL_IMPORT SECStatus SSL_RecommendedCanFalseStart(PRFileDesc *fd,
-+ PRBool *canFalseStart);
-+
- /*
- ** For the server, request a new handshake. For the client, begin a new
- ** handshake. If flushCache is non-zero, the SSL3 cache entry will be
-diff --git a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
-index 61d24d9..f39ba09 100644
---- a/nss/lib/ssl/ssl3con.c
-+++ b/nss/lib/ssl/ssl3con.c
-@@ -2535,7 +2535,7 @@ ssl3_SendRecord( sslSocket * ss,
- SSL_TRC(3, ("%d: SSL3[%d] SendRecord type: %s nIn=%d",
- SSL_GETPID(), ss->fd, ssl3_DecodeContentType(type),
- nIn));
-- PRINT_BUF(3, (ss, "Send record (plain text)", pIn, nIn));
-+ PRINT_BUF(50, (ss, "Send record (plain text)", pIn, nIn));
-
- PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) );
-
-@@ -6674,36 +6674,73 @@ done:
- return rv;
- }
-
-+static SECStatus
-+ssl3_CheckFalseStart(sslSocket *ss)
-+{
-+ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
-+ PORT_Assert( !ss->ssl3.hs.authCertificatePending );
-+ PORT_Assert( !ss->ssl3.hs.canFalseStart );
-+
-+ if (!ss->canFalseStartCallback) {
-+ SSL_TRC(3, ("%d: SSL[%d]: no false start callback so no false start",
-+ SSL_GETPID(), ss->fd));
-+ } else {
-+ PRBool maybeFalseStart;
-+ SECStatus rv;
-+
-+ /* An attacker can control the selected ciphersuite so we only wish to
-+ * do False Start in the case that the selected ciphersuite is
-+ * sufficiently strong that the attack can gain no advantage.
-+ * Therefore we always require an 80-bit cipher. */
-+ ssl_GetSpecReadLock(ss);
-+ maybeFalseStart = ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10;
-+ ssl_ReleaseSpecReadLock(ss);
-+
-+ if (!maybeFalseStart) {
-+ SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher",
-+ SSL_GETPID(), ss->fd));
-+ } else {
-+ rv = (ss->canFalseStartCallback)(ss->fd,
-+ ss->canFalseStartCallbackData,
-+ &ss->ssl3.hs.canFalseStart);
-+ if (rv == SECSuccess) {
-+ SSL_TRC(3, ("%d: SSL[%d]: false start callback returned %s",
-+ SSL_GETPID(), ss->fd,
-+ ss->ssl3.hs.canFalseStart ? "TRUE" : "FALSE"));
-+ } else {
-+ SSL_TRC(3, ("%d: SSL[%d]: false start callback failed (%s)",
-+ SSL_GETPID(), ss->fd,
-+ PR_ErrorToName(PR_GetError())));
-+ }
-+ return rv;
-+ }
-+ }
-+
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ return SECSuccess;
-+}
-+
- PRBool
--ssl3_CanFalseStart(sslSocket *ss) {
-- PRBool rv;
-+ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss)
-+{
-+ PRBool result = PR_FALSE;
-
- PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
-
-- /* XXX: does not take into account whether we are waiting for
-- * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when
-- * that is done, this function could return different results each time it
-- * would be called.
-- */
-+ switch (ss->ssl3.hs.ws) {
-+ case wait_new_session_ticket:
-+ result = PR_TRUE;
-+ break;
-+ case wait_change_cipher:
-+ result = !ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn);
-+ break;
-+ case wait_finished:
-+ break;
-+ default:
-+ PR_NOT_REACHED("ssl3_WaitingForStartOfServerSecondRound");
-+ }
-
-- ssl_GetSpecReadLock(ss);
-- rv = ss->opt.enableFalseStart &&
-- !ss->sec.isServer &&
-- !ss->ssl3.hs.isResuming &&
-- ss->ssl3.cwSpec &&
--
-- /* An attacker can control the selected ciphersuite so we only wish to
-- * do False Start in the case that the selected ciphersuite is
-- * sufficiently strong that the attack can gain no advantage.
-- * Therefore we require an 80-bit cipher and a forward-secret key
-- * exchange. */
-- ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 &&
-- (ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
-- ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
-- ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
-- ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa);
-- ssl_ReleaseSpecReadLock(ss);
-- return rv;
-+ return result;
- }
-
- static SECStatus ssl3_SendClientSecondRound(sslSocket *ss);
-@@ -6785,6 +6822,9 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- }
- if (ss->ssl3.hs.authCertificatePending &&
- (sendClientCert || ss->ssl3.sendEmptyCert || ss->firstHsDone)) {
-+ SSL_TRC(3, ("%d: SSL3[%p]: deferring ssl3_SendClientSecondRound because"
-+ " certificate authentication is still pending.",
-+ SSL_GETPID(), ss->fd));
- ss->ssl3.hs.restartTarget = ssl3_SendClientSecondRound;
- return SECWouldBlock;
- }
-@@ -6822,14 +6862,50 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- goto loser; /* err code was set. */
- }
-
-- /* XXX: If the server's certificate hasn't been authenticated by this
-- * point, then we may be leaking this NPN message to an attacker.
-+ /* This must be done after we've set ss->ssl3.cwSpec in
-+ * ssl3_SendChangeCipherSpecs because SSL_GetChannelInfo uses information
-+ * from cwSpec. This must be done before we call ssl3_CheckFalseStart
-+ * because the false start callback (if any) may need the information from
-+ * the functions that depend on this being set.
- */
-+ ss->enoughFirstHsDone = PR_TRUE;
-+
- if (!ss->firstHsDone) {
-+ /* XXX: If the server's certificate hasn't been authenticated by this
-+ * point, then we may be leaking this NPN message to an attacker.
-+ */
- rv = ssl3_SendNextProto(ss);
- if (rv != SECSuccess) {
- goto loser; /* err code was set. */
- }
-+
-+ if (ss->opt.enableFalseStart) {
-+ if (!ss->ssl3.hs.authCertificatePending) {
-+ /* When we fix bug 589047, we will need to know whether we are
-+ * false starting before we try to flush the client second
-+ * round to the network. With that in mind, we purposefully
-+ * call ssl3_CheckFalseStart before calling ssl3_SendFinished,
-+ * which includes a call to ssl3_FlushHandshake, so that
-+ * no application develops a reliance on such flushing being
-+ * done before its false start callback is called.
-+ */
-+ ssl_ReleaseXmitBufLock(ss);
-+ rv = ssl3_CheckFalseStart(ss);
-+ ssl_GetXmitBufLock(ss);
-+ if (rv != SECSuccess) {
-+ goto loser;
-+ }
-+ } else {
-+ /* The certificate authentication and the server's Finished
-+ * message are racing each other. If the certificate
-+ * authentication wins, then we will try to false start in
-+ * ssl3_AuthCertificateComplete.
-+ */
-+ SSL_TRC(3, ("%d: SSL3[%p]: deferring false start check because"
-+ " certificate authentication is still pending.",
-+ SSL_GETPID(), ss->fd));
-+ }
-+ }
- }
-
- rv = ssl3_SendFinished(ss, 0);
-@@ -6844,10 +6920,7 @@ ssl3_SendClientSecondRound(sslSocket *ss)
- else
- ss->ssl3.hs.ws = wait_change_cipher;
-
-- /* Do the handshake callback for sslv3 here, if we can false start. */
-- if (ss->handshakeCallback != NULL && ssl3_CanFalseStart(ss)) {
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-- }
-+ PORT_Assert(ssl3_WaitingForStartOfServerSecondRound(ss));
-
- return SECSuccess;
-
-@@ -9421,13 +9494,6 @@ ssl3_AuthCertificate(sslSocket *ss)
-
- ss->ssl3.hs.authCertificatePending = PR_TRUE;
- rv = SECSuccess;
--
-- /* XXX: Async cert validation and False Start don't work together
-- * safely yet; if we leave False Start enabled, we may end up false
-- * starting (sending application data) before we
-- * SSL_AuthCertificateComplete has been called.
-- */
-- ss->opt.enableFalseStart = PR_FALSE;
- }
-
- if (rv != SECSuccess) {
-@@ -9551,6 +9617,12 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
- } else if (ss->ssl3.hs.restartTarget != NULL) {
- sslRestartTarget target = ss->ssl3.hs.restartTarget;
- ss->ssl3.hs.restartTarget = NULL;
-+
-+ if (target == ssl3_FinishHandshake) {
-+ SSL_TRC(3,("%d: SSL3[%p]: certificate authentication lost the race"
-+ " with peer's finished message", SSL_GETPID(), ss->fd));
-+ }
-+
- rv = target(ss);
- /* Even if we blocked here, we have accomplished enough to claim
- * success. Any remaining work will be taken care of by subsequent
-@@ -9560,7 +9632,29 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error)
- rv = SECSuccess;
- }
- } else {
-- rv = SECSuccess;
-+ SSL_TRC(3, ("%d: SSL3[%p]: certificate authentication won the race with"
-+ " peer's finished message", SSL_GETPID(), ss->fd));
-+
-+ PORT_Assert(!ss->firstHsDone);
-+ PORT_Assert(!ss->sec.isServer);
-+ PORT_Assert(!ss->ssl3.hs.isResuming);
-+ PORT_Assert(ss->ssl3.hs.ws == wait_new_session_ticket ||
-+ ss->ssl3.hs.ws == wait_change_cipher ||
-+ ss->ssl3.hs.ws == wait_finished);
-+
-+ /* ssl3_SendClientSecondRound deferred the false start check because
-+ * certificate authentication was pending, so we do it now if we still
-+ * haven't received any of the server's second round yet.
-+ */
-+ if (ss->opt.enableFalseStart &&
-+ !ss->firstHsDone &&
-+ !ss->sec.isServer &&
-+ !ss->ssl3.hs.isResuming &&
-+ ssl3_WaitingForStartOfServerSecondRound(ss)) {
-+ rv = ssl3_CheckFalseStart(ss);
-+ } else {
-+ rv = SECSuccess;
-+ }
- }
-
- done:
-@@ -10023,9 +10117,6 @@ xmit_loser:
- return rv;
- }
-
-- ss->gs.writeOffset = 0;
-- ss->gs.readOffset = 0;
--
- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) {
- effectiveExchKeyType = kt_rsa;
- } else {
-@@ -10090,6 +10181,9 @@ xmit_loser:
- return rv;
- }
-
-+/* The return type is SECStatus instead of void because this function needs
-+ * to have type sslRestartTarget.
-+ */
- SECStatus
- ssl3_FinishHandshake(sslSocket * ss)
- {
-@@ -10099,19 +10193,16 @@ ssl3_FinishHandshake(sslSocket * ss)
-
- /* The first handshake is now completed. */
- ss->handshake = NULL;
-- ss->firstHsDone = PR_TRUE;
-
- if (ss->ssl3.hs.cacheSID) {
- (*ss->sec.cache)(ss->sec.ci.sid);
- ss->ssl3.hs.cacheSID = PR_FALSE;
- }
-
-+ ss->ssl3.hs.canFalseStart = PR_FALSE; /* False Start phase is complete */
- ss->ssl3.hs.ws = idle_handshake;
-
-- /* Do the handshake callback for sslv3 here, if we cannot false start. */
-- if (ss->handshakeCallback != NULL && !ssl3_CanFalseStart(ss)) {
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-- }
-+ ssl_FinishHandshake(ss);
-
- return SECSuccess;
- }
-@@ -11045,7 +11136,6 @@ process_it:
-
- ssl_ReleaseSSL3HandshakeLock(ss);
- return rv;
--
- }
-
- /*
-diff --git a/nss/lib/ssl/ssl3gthr.c b/nss/lib/ssl/ssl3gthr.c
-index 6d62515..03e369d 100644
---- a/nss/lib/ssl/ssl3gthr.c
-+++ b/nss/lib/ssl/ssl3gthr.c
-@@ -275,11 +275,17 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
- {
- SSL3Ciphertext cText;
- int rv;
-- PRBool canFalseStart = PR_FALSE;
-+ PRBool keepGoing = PR_TRUE;
-
- SSL_TRC(30, ("ssl3_GatherCompleteHandshake"));
-
-+ /* ssl3_HandleRecord may end up eventually calling ssl_FinishHandshake,
-+ * which requires the 1stHandshakeLock, which must be acquired before the
-+ * RecvBufLock.
-+ */
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
- PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
- do {
- PRBool handleRecordNow = PR_FALSE;
-
-@@ -368,20 +374,48 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags)
- if (rv < 0) {
- return ss->recvdCloseNotify ? 0 : rv;
- }
-+ if (rv == (int) SECSuccess && ss->gs.buf.len > 0) {
-+ /* We have application data to return to the application. This
-+ * prioritizes returning application data to the application over
-+ * completing any renegotiation handshake we may be doing.
-+ */
-+ PORT_Assert(ss->firstHsDone);
-+ PORT_Assert(cText.type == content_application_data);
-+ break;
-+ }
-
-- /* If we kicked off a false start in ssl3_HandleServerHelloDone, break
-- * out of this loop early without finishing the handshake.
-- */
-- if (ss->opt.enableFalseStart) {
-- ssl_GetSSL3HandshakeLock(ss);
-- canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher ||
-- ss->ssl3.hs.ws == wait_new_session_ticket) &&
-- ssl3_CanFalseStart(ss);
-- ssl_ReleaseSSL3HandshakeLock(ss);
-+ PORT_Assert(keepGoing);
-+ ssl_GetSSL3HandshakeLock(ss);
-+ if (ss->ssl3.hs.ws == idle_handshake) {
-+ /* We are done with the current handshake so stop trying to
-+ * handshake. Note that it would be safe to test ss->firstHsDone
-+ * instead of ss->ssl3.hs.ws. By testing ss->ssl3.hs.ws instead,
-+ * we prioritize completing a renegotiation handshake over sending
-+ * application data.
-+ */
-+ PORT_Assert(ss->firstHsDone);
-+ PORT_Assert(!ss->ssl3.hs.canFalseStart);
-+ keepGoing = PR_FALSE;
-+ } else if (ss->ssl3.hs.canFalseStart) {
-+ /* Prioritize sending application data over trying to complete
-+ * the handshake if we're false starting.
-+ *
-+ * If we were to do this check at the beginning of the loop instead
-+ * of here, then this function would become be a no-op after
-+ * receiving the ServerHelloDone in the false start case, and we
-+ * would never complete the handshake.
-+ */
-+ PORT_Assert(!ss->firstHsDone);
-+
-+ if (ssl3_WaitingForStartOfServerSecondRound(ss)) {
-+ keepGoing = PR_FALSE;
-+ } else {
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ }
- }
-- } while (ss->ssl3.hs.ws != idle_handshake &&
-- !canFalseStart &&
-- ss->gs.buf.len == 0);
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+ } while (keepGoing);
-+
-
- ss->gs.readOffset = 0;
- ss->gs.writeOffset = ss->gs.buf.len;
-@@ -404,7 +438,10 @@ ssl3_GatherAppDataRecord(sslSocket *ss, int flags)
- {
- int rv;
-
-+ /* ssl3_GatherCompleteHandshake requires both of these locks. */
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
- PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
- do {
- rv = ssl3_GatherCompleteHandshake(ss, flags);
- } while (rv > 0 && ss->gs.buf.len == 0);
-diff --git a/nss/lib/ssl/sslauth.c b/nss/lib/ssl/sslauth.c
-index d2f57bf..cb956d4 100644
---- a/nss/lib/ssl/sslauth.c
-+++ b/nss/lib/ssl/sslauth.c
-@@ -60,7 +60,6 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
- sslSocket *ss;
- const char *cipherName;
- PRBool isDes = PR_FALSE;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- ss = ssl_FindSocket(fd);
- if (!ss) {
-@@ -78,14 +77,7 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1,
- *op = SSL_SECURITY_STATUS_OFF;
- }
-
-- if (ss->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-- ssl3_CanFalseStart(ss)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
-- if (ss->opt.useSecurity && enoughFirstHsDone) {
-+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
- if (ss->version < SSL_LIBRARY_VERSION_3_0) {
- cipherName = ssl_cipherName[ss->sec.cipherType];
- } else {
-diff --git a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h
-index 90e9567..bf0d67f 100644
---- a/nss/lib/ssl/sslimpl.h
-+++ b/nss/lib/ssl/sslimpl.h
-@@ -842,6 +842,8 @@ const ssl3CipherSuiteDef *suite_def;
- /* Shared state between ssl3_HandleFinished and ssl3_FinishHandshake */
- PRBool cacheSID;
-
-+ PRBool canFalseStart; /* Can/did we False Start */
-+
- /* clientSigAndHash contains the contents of the signature_algorithms
- * extension (if any) from the client. This is only valid for TLS 1.2
- * or later. */
-@@ -1116,6 +1118,10 @@ struct sslSocketStr {
- unsigned long clientAuthRequested;
- unsigned long delayDisabled; /* Nagle delay disabled */
- unsigned long firstHsDone; /* first handshake is complete. */
-+ unsigned long enoughFirstHsDone; /* enough of the first handshake is
-+ * done for callbacks to be able to
-+ * retrieve channel security
-+ * parameters from the SSL socket. */
- unsigned long handshakeBegun;
- unsigned long lastWriteBlocked;
- unsigned long recvdCloseNotify; /* received SSL EOF. */
-@@ -1156,6 +1162,8 @@ const unsigned char * preferredCipher;
- void *badCertArg;
- SSLHandshakeCallback handshakeCallback;
- void *handshakeCallbackData;
-+ SSLCanFalseStartCallback canFalseStartCallback;
-+ void *canFalseStartCallbackData;
- void *pkcs11PinArg;
- SSLNextProtoCallback nextProtoCallback;
- void *nextProtoArg;
-@@ -1358,7 +1366,19 @@ extern void ssl3_SetAlwaysBlock(sslSocket *ss);
-
- extern SECStatus ssl_EnableNagleDelay(sslSocket *ss, PRBool enabled);
-
--extern PRBool ssl3_CanFalseStart(sslSocket *ss);
-+extern void ssl_FinishHandshake(sslSocket *ss);
-+
-+/* Returns PR_TRUE if we are still waiting for the server to respond to our
-+ * client second round. Once we've received any part of the server's second
-+ * round then we don't bother trying to false start since it is almost always
-+ * the case that the NewSessionTicket, ChangeCipherSoec, and Finished messages
-+ * were sent in the same packet and we want to process them all at the same
-+ * time. If we were to try to false start in the middle of the server's second
-+ * round, then we would increase the number of I/O operations
-+ * (SSL_ForceHandshake/PR_Recv/PR_Send/etc.) needed to finish the handshake.
-+ */
-+extern PRBool ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss);
-+
- extern SECStatus
- ssl3_CompressMACEncryptRecord(ssl3CipherSpec * cwSpec,
- PRBool isServer,
-diff --git a/nss/lib/ssl/sslinfo.c b/nss/lib/ssl/sslinfo.c
-index 9f2597e..d0c23b7 100644
---- a/nss/lib/ssl/sslinfo.c
-+++ b/nss/lib/ssl/sslinfo.c
-@@ -26,7 +26,6 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
- sslSocket * ss;
- SSLChannelInfo inf;
- sslSessionID * sid;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- if (!info || len < sizeof inf.length) {
- PORT_SetError(SEC_ERROR_INVALID_ARGS);
-@@ -43,14 +42,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len)
- memset(&inf, 0, sizeof inf);
- inf.length = PR_MIN(sizeof inf, len);
-
-- if (ss->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-- ssl3_CanFalseStart(ss)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
-- if (ss->opt.useSecurity && enoughFirstHsDone) {
-+ if (ss->opt.useSecurity && ss->enoughFirstHsDone) {
- sid = ss->sec.ci.sid;
- inf.protocolVersion = ss->version;
- inf.authKeyBits = ss->sec.authKeyBits;
-diff --git a/nss/lib/ssl/sslreveal.c b/nss/lib/ssl/sslreveal.c
-index dc14794..d972998 100644
---- a/nss/lib/ssl/sslreveal.c
-+++ b/nss/lib/ssl/sslreveal.c
-@@ -77,7 +77,6 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
- {
- /* some decisions derived from SSL_GetChannelInfo */
- sslSocket * sslsocket = NULL;
-- PRBool enoughFirstHsDone = PR_FALSE;
-
- if (!pYes) {
- PORT_SetError(SEC_ERROR_INVALID_ARGS);
-@@ -93,14 +92,8 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket,
-
- *pYes = PR_FALSE;
-
-- if (sslsocket->firstHsDone) {
-- enoughFirstHsDone = PR_TRUE;
-- } else if (sslsocket->ssl3.initialized && ssl3_CanFalseStart(sslsocket)) {
-- enoughFirstHsDone = PR_TRUE;
-- }
--
- /* according to public API SSL_GetChannelInfo, this doesn't need a lock */
-- if (sslsocket->opt.useSecurity && enoughFirstHsDone) {
-+ if (sslsocket->opt.useSecurity) {
- if (sslsocket->ssl3.initialized) { /* SSL3 and TLS */
- /* now we know this socket went through ssl3_InitState() and
- * ss->xtnData got initialized, which is the only member accessed by
-diff --git a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c
-index 49bb42b..d0df442 100644
---- a/nss/lib/ssl/sslsecur.c
-+++ b/nss/lib/ssl/sslsecur.c
-@@ -97,23 +97,13 @@ ssl_Do1stHandshake(sslSocket *ss)
- ss->securityHandshake = 0;
- }
- if (ss->handshake == 0) {
-- ssl_GetRecvBufLock(ss);
-- ss->gs.recordLen = 0;
-- ssl_ReleaseRecvBufLock(ss);
--
-- SSL_TRC(3, ("%d: SSL[%d]: handshake is completed",
-- SSL_GETPID(), ss->fd));
-- /* call handshake callback for ssl v2 */
-- /* for v3 this is done in ssl3_HandleFinished() */
-- if ((ss->handshakeCallback != NULL) && /* has callback */
-- (!ss->firstHsDone) && /* only first time */
-- (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */
-- ss->firstHsDone = PR_TRUE;
-- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-+ /* for v3 this is done in ssl3_FinishHandshake */
-+ if (!ss->firstHsDone && ss->version < SSL_LIBRARY_VERSION_3_0) {
-+ ssl_GetRecvBufLock(ss);
-+ ss->gs.recordLen = 0;
-+ ssl_FinishHandshake(ss);
-+ ssl_ReleaseRecvBufLock(ss);
- }
-- ss->firstHsDone = PR_TRUE;
-- ss->gs.writeOffset = 0;
-- ss->gs.readOffset = 0;
- break;
- }
- rv = (*ss->handshake)(ss);
-@@ -134,6 +124,24 @@ ssl_Do1stHandshake(sslSocket *ss)
- return rv;
- }
-
-+void
-+ssl_FinishHandshake(sslSocket *ss)
-+{
-+ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
-+ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) );
-+
-+ SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", SSL_GETPID(), ss->fd));
-+
-+ ss->firstHsDone = PR_TRUE;
-+ ss->enoughFirstHsDone = PR_TRUE;
-+ ss->gs.writeOffset = 0;
-+ ss->gs.readOffset = 0;
-+
-+ if (ss->handshakeCallback) {
-+ (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData);
-+ }
-+}
-+
- /*
- * Handshake function that blocks. Used to force a
- * retry on a connection on the next read/write.
-@@ -206,6 +214,7 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
- ssl_Get1stHandshakeLock(ss);
-
- ss->firstHsDone = PR_FALSE;
-+ ss->enoughFirstHsDone = PR_FALSE;
- if ( asServer ) {
- ss->handshake = ssl2_BeginServerHandshake;
- ss->handshaking = sslHandshakingAsServer;
-@@ -221,6 +230,8 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer)
- ssl_ReleaseRecvBufLock(ss);
-
- ssl_GetSSL3HandshakeLock(ss);
-+ ss->ssl3.hs.canFalseStart = PR_FALSE;
-+ ss->ssl3.hs.restartTarget = NULL;
-
- /*
- ** Blow away old security state and get a fresh setup.
-@@ -331,6 +342,71 @@ SSL_HandshakeCallback(PRFileDesc *fd, SSLHandshakeCallback cb,
- return SECSuccess;
- }
-
-+/* Register an application callback to be called when false start may happen.
-+** Acquires and releases HandshakeLock.
-+*/
-+SECStatus
-+SSL_SetCanFalseStartCallback(PRFileDesc *fd, SSLCanFalseStartCallback cb,
-+ void *arg)
-+{
-+ sslSocket *ss;
-+
-+ ss = ssl_FindSocket(fd);
-+ if (!ss) {
-+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetCanFalseStartCallback",
-+ SSL_GETPID(), fd));
-+ return SECFailure;
-+ }
-+
-+ if (!ss->opt.useSecurity) {
-+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
-+ return SECFailure;
-+ }
-+
-+ ssl_Get1stHandshakeLock(ss);
-+ ssl_GetSSL3HandshakeLock(ss);
-+
-+ ss->canFalseStartCallback = cb;
-+ ss->canFalseStartCallbackData = arg;
-+
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+ ssl_Release1stHandshakeLock(ss);
-+
-+ return SECSuccess;
-+}
-+
-+SECStatus
-+SSL_RecommendedCanFalseStart(PRFileDesc *fd, PRBool *canFalseStart)
-+{
-+ sslSocket *ss;
-+
-+ *canFalseStart = PR_FALSE;
-+ ss = ssl_FindSocket(fd);
-+ if (!ss) {
-+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_RecommendedCanFalseStart",
-+ SSL_GETPID(), fd));
-+ return SECFailure;
-+ }
-+
-+ if (!ss->ssl3.initialized) {
-+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
-+ return SECFailure;
-+ }
-+
-+ if (ss->version < SSL_LIBRARY_VERSION_3_0) {
-+ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2);
-+ return SECFailure;
-+ }
-+
-+ /* Require a forward-secret key exchange. */
-+ *canFalseStart = ss->ssl3.hs.kea_def->kea == kea_dhe_dss ||
-+ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa ||
-+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa ||
-+ ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa;
-+
-+ return SECSuccess;
-+}
-+
- /* Try to make progress on an SSL handshake by attempting to read the
- ** next handshake from the peer, and sending any responses.
- ** For non-blocking sockets, returns PR_ERROR_WOULD_BLOCK if it cannot
-@@ -524,6 +600,9 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
- int amount;
- int available;
-
-+ /* ssl3_GatherAppDataRecord may call ssl_FinishHandshake, which needs the
-+ * 1stHandshakeLock. */
-+ ssl_Get1stHandshakeLock(ss);
- ssl_GetRecvBufLock(ss);
-
- available = ss->gs.writeOffset - ss->gs.readOffset;
-@@ -590,6 +669,7 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags)
-
- done:
- ssl_ReleaseRecvBufLock(ss);
-+ ssl_Release1stHandshakeLock(ss);
- return rv;
- }
-
-@@ -1156,7 +1236,7 @@ ssl_SecureRead(sslSocket *ss, unsigned char *buf, int len)
- int
- ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- {
-- int rv = 0;
-+ int rv = 0;
-
- SSL_TRC(2, ("%d: SSL[%d]: SecureSend: sending %d bytes",
- SSL_GETPID(), ss->fd, len));
-@@ -1191,19 +1271,15 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- ss->writerThread = PR_GetCurrentThread();
- /* If any of these is non-zero, the initial handshake is not done. */
- if (!ss->firstHsDone) {
-- PRBool canFalseStart = PR_FALSE;
-+ PRBool falseStart = PR_FALSE;
- ssl_Get1stHandshakeLock(ss);
-- if (ss->version >= SSL_LIBRARY_VERSION_3_0) {
-+ if (ss->opt.enableFalseStart &&
-+ ss->version >= SSL_LIBRARY_VERSION_3_0) {
- ssl_GetSSL3HandshakeLock(ss);
-- if ((ss->ssl3.hs.ws == wait_change_cipher ||
-- ss->ssl3.hs.ws == wait_finished ||
-- ss->ssl3.hs.ws == wait_new_session_ticket) &&
-- ssl3_CanFalseStart(ss)) {
-- canFalseStart = PR_TRUE;
-- }
-+ falseStart = ss->ssl3.hs.canFalseStart;
- ssl_ReleaseSSL3HandshakeLock(ss);
- }
-- if (!canFalseStart &&
-+ if (!falseStart &&
- (ss->handshake || ss->nextHandshake || ss->securityHandshake)) {
- rv = ssl_Do1stHandshake(ss);
- }
-@@ -1228,6 +1304,17 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags)
- goto done;
- }
-
-+ if (!ss->firstHsDone) {
-+ PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_3_0);
-+#ifdef DEBUG
-+ ssl_GetSSL3HandshakeLock(ss);
-+ PORT_Assert(ss->ssl3.hs.canFalseStart);
-+ ssl_ReleaseSSL3HandshakeLock(ss);
-+#endif
-+ SSL_TRC(3, ("%d: SSL[%d]: SecureSend: sending data due to false start",
-+ SSL_GETPID(), ss->fd));
-+ }
-+
- /* Send out the data using one of these functions:
- * ssl2_SendClear, ssl2_SendStream, ssl2_SendBlock,
- * ssl3_SendApplicationData
-diff --git a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c
-index cd4a7a7..73e069b 100644
---- a/nss/lib/ssl/sslsock.c
-+++ b/nss/lib/ssl/sslsock.c
-@@ -349,6 +349,8 @@ ssl_DupSocket(sslSocket *os)
- ss->badCertArg = os->badCertArg;
- ss->handshakeCallback = os->handshakeCallback;
- ss->handshakeCallbackData = os->handshakeCallbackData;
-+ ss->canFalseStartCallback = os->canFalseStartCallback;
-+ ss->canFalseStartCallbackData = os->canFalseStartCallbackData;
- ss->pkcs11PinArg = os->pkcs11PinArg;
-
- /* Create security data */
-@@ -2341,10 +2343,14 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *p_out_flags)
- } else if (new_flags & PR_POLL_WRITE) {
- /* The caller is trying to write, but the handshake is
- ** blocked waiting for data to read, and the first
-- ** handshake has been sent. so do NOT to poll on write.
-+ ** handshake has been sent. So do NOT to poll on write
-+ ** unless we did false start.
- */
-- new_flags ^= PR_POLL_WRITE; /* don't select on write. */
-- new_flags |= PR_POLL_READ; /* do select on read. */
-+ if (!(ss->version >= SSL_LIBRARY_VERSION_3_0 &&
-+ ss->ssl3.hs.canFalseStart)) {
-+ new_flags ^= PR_POLL_WRITE; /* don't select on write. */
-+ }
-+ new_flags |= PR_POLL_READ; /* do select on read. */
- }
- }
- } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) {
---
-1.7.9.5
-
diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
deleted file mode 100644
index 1be8a17870..0000000000
--- a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-nss: CVE-2014-1492
-
-Upstream-Status: Backport
-
-the patch comes from:
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1492
-https://bugzilla.mozilla.org/show_bug.cgi?id=903885
-
-changeset: 11063:709d4e597979
-user: Kai Engert <kaie@kuix.de>
-date: Wed Mar 05 18:38:55 2014 +0100
-summary: Bug 903885, address requests to clarify comments from wtc
-
-changeset: 11046:2ffa40a3ff55
-tag: tip
-user: Wan-Teh Chang <wtc@google.com>
-date: Tue Feb 25 18:17:08 2014 +0100
-summary: Bug 903885, fix IDNA wildcard handling v4, r=kaie
-
-changeset: 11045:15ea62260c21
-user: Christian Heimes <sites@cheimes.de>
-date: Mon Feb 24 17:50:25 2014 +0100
-summary: Bug 903885, fix IDNA wildcard handling, r=kaie
-
-Signed-off-by: Li Wang <li.wang@windriver.com>
----
- nss/lib/certdb/certdb.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/nss/lib/certdb/certdb.c b/nss/lib/certdb/certdb.c
-index b7d22bd..91877b7 100644
---- a/nss/lib/certdb/certdb.c
-+++ b/nss/lib/certdb/certdb.c
-@@ -1381,7 +1381,7 @@ cert_TestHostName(char * cn, const char * hn)
- return rv;
- }
- } else {
-- /* New approach conforms to RFC 2818. */
-+ /* New approach conforms to RFC 6125. */
- char *wildcard = PORT_Strchr(cn, '*');
- char *firstcndot = PORT_Strchr(cn, '.');
- char *secondcndot = firstcndot ? PORT_Strchr(firstcndot+1, '.') : NULL;
-@@ -1390,14 +1390,17 @@ cert_TestHostName(char * cn, const char * hn)
- /* For a cn pattern to be considered valid, the wildcard character...
- * - may occur only in a DNS name with at least 3 components, and
- * - may occur only as last character in the first component, and
-- * - may be preceded by additional characters
-+ * - may be preceded by additional characters, and
-+ * - must not be preceded by an IDNA ACE prefix (xn--)
- */
- if (wildcard && secondcndot && secondcndot[1] && firsthndot
-- && firstcndot - wildcard == 1
-- && secondcndot - firstcndot > 1
-- && PORT_Strrchr(cn, '*') == wildcard
-+ && firstcndot - wildcard == 1 /* wildcard is last char in first component */
-+ && secondcndot - firstcndot > 1 /* second component is non-empty */
-+ && PORT_Strrchr(cn, '*') == wildcard /* only one wildcard in cn */
- && !PORT_Strncasecmp(cn, hn, wildcard - cn)
-- && !PORT_Strcasecmp(firstcndot, firsthndot)) {
-+ && !PORT_Strcasecmp(firstcndot, firsthndot)
-+ /* If hn starts with xn--, then cn must start with wildcard */
-+ && (PORT_Strncasecmp(hn, "xn--", 4) || wildcard == cn)) {
- /* valid wildcard pattern match */
- return SECSuccess;
- }
---
-1.7.9.5
-
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index cc9e7b9cd2..6330f4e0a1 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -8,7 +8,7 @@ v3 certificates, and other security standards."
HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
SECTION = "libs"
-LICENSE = "MPL-1.1 GPL-2.0 LGPL-2.1"
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859"
@@ -16,18 +16,14 @@ SRC_URI = "\
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-3.15.1-fix-CVE-2013-1741.patch \
- file://nss-3.15.1-fix-CVE-2013-5605.patch \
- file://nss-CVE-2014-1492.patch \
- file://nss-CVE-2013-1740.patch \
- file://nss-3.15.1-fix-CVE-2013-1739.patch \
+ file://nss-fix-nsinstall-build.patch \
"
-SRC_URI_append_class-target = "\
+SRC_URI_append = "\
file://nss.pc.in \
file://signlibs.sh \
"
inherit siteinfo
-PR = "r0"
+
DEPENDS = "sqlite3 nspr zlib nss-native"
DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
RDEPENDS_${PN} = "perl"
@@ -151,7 +147,7 @@ do_install() {
done
}
-do_install_append_class-target() {
+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
@@ -166,12 +162,14 @@ do_install_append_class-target() {
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}/etc/pki/nssdb/
+ mkdir -p ${D}${sysconfdir}/pki/nssdb/
touch ./empty_password
- certutil -N -d ${D}/etc/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}/etc/pki/nssdb/*.db
+ certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+ chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
rm ./empty_password
}
diff --git a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
index 547594d5b6..547594d5b6 100644
--- a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch
+++ b/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
diff --git a/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
new file mode 100644
index 0000000000..866de07ea8
--- /dev/null
+++ b/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -0,0 +1,35 @@
+Fix nss multilib build on openSUSE 11.x 32bit
+
+While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
+fail with error:
+
+* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
+
+It caused by the '-m64' option which passed to host gcc.
+
+The nsinstall was built first while nss starting to build, it only runs
+on host to install built files, it doesn't need any cross-compling or
+multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
+error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+===================================================
+diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile
+index 1850bcb..5aee84f 100644
+--- a/nss/coreconf/nsinstall/Makefile
++++ b/nss/coreconf/nsinstall/Makefile
+@@ -18,6 +18,12 @@ INTERNAL_TOOLS = 1
+
+ include $(DEPTH)/coreconf/config.mk
+
++# nsinstall is unfit for cross-compiling/multilib-build since it was
++# always run on local host to install built files. This change intends
++# to clean the '-m64' from ARCHFLAG and LDFLAGS.
++ARCHFLAG =
++LDFLAGS =
++
+ ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
+ PROGRAM =
+ else
diff --git a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
index f0b3550bff..f0b3550bff 100644
--- a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch
+++ b/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
diff --git a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
index 7661dc93a0..7661dc93a0 100644
--- a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch
+++ b/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
diff --git a/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/nss/nss.pc.in
index 200f635c65..200f635c65 100644
--- a/meta/recipes-support/nss/files/nss.pc.in
+++ b/meta/recipes-support/nss/nss/nss.pc.in
diff --git a/meta/recipes-support/nss/files/signlibs.sh b/meta/recipes-support/nss/nss/signlibs.sh
index 1ec79f4576..1ec79f4576 100644
--- a/meta/recipes-support/nss/files/signlibs.sh
+++ b/meta/recipes-support/nss/nss/signlibs.sh
diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb
deleted file mode 100644
index 7b06f00cde..0000000000
--- a/meta/recipes-support/nss/nss_3.15.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require nss.inc
-
-SRC_URI += "\
- http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb"
-SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284"
-
diff --git a/meta/recipes-support/nss/nss_3.17.3.bb b/meta/recipes-support/nss/nss_3.17.3.bb
new file mode 100644
index 0000000000..e7d0780fb8
--- /dev/null
+++ b/meta/recipes-support/nss/nss_3.17.3.bb
@@ -0,0 +1,7 @@
+require nss.inc
+
+SRC_URI += "\
+ http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_3_RTM/src/${BP}.tar.gz \
+"
+SRC_URI[md5sum] = "fba7489e1b26f2a0bfe5527430fd61e1"
+SRC_URI[sha256sum] = "f4d5e9035a2f84f25f35c283de3b0ff60d72e918748de25eaf017ed201fa21d5"
diff --git a/meta/recipes-support/pinentry/pinentry_0.9.0.bb b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
new file mode 100644
index 0000000000..10b329b15e
--- /dev/null
+++ b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
@@ -0,0 +1,29 @@
+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"
+
+PR = "r1"
+
+inherit autotools
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "40a05856cb3accf6679987b7899b0f5a"
+SRC_URI[sha256sum] = "90045a07ab8e1a8e1ecf5d19b51691f195525e579fa5d71d7e92c120b05490ab"
+
+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[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index 33424134c5..c618f1148d 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,5 +1,5 @@
#!/bin/sh
-
+ANYFAILED=no
echo "START: $0"
for libdir in /usr/lib*
@@ -15,9 +15,13 @@ do
date "+%Y-%m-%dT%H:%M"
echo "BEGIN: $x"
cd "$x"
- ./run-ptest
+ ./run-ptest || ANYFAILED=yes
echo "END: $x"
date "+%Y-%m-%dT%H:%M"
done
done
echo "STOP: $0"
+if [ "$ANYFAILED" = "yes" ]; then
+ exit 1
+fi
+exit 0
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
index 7443811d8c..bc1b0a4d46 100644
--- a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
+++ b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
INHIBIT_DEFAULT_DEPS = "1"
+S = "${WORKDIR}"
+
do_install () {
mkdir -p ${D}${bindir}
install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 0000000000..9d073e9abf
--- /dev/null
+++ b/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
+'scons' cleans the environment which breaks ccache builds because
+CCACHEDIR can point to an unexpected location:
+
+| ccache arm-linux-gnueabi-gcc ... context.c
+| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
+
+Issue is described in
+
+ http://www.scons.org/wiki/ImportingEnvironmentSettings
+
+and because 'bitbake' cleans environment we can pass it completely
+instead of trying to enumerate needed env.
+
+Upstream-Status: Inappropriate
+
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct
++++ serf-1.3.6/SConstruct
+@@ -149,6 +149,7 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+ tools=('default', 'textfile',),
+ CPPPATH=['.', ],
++ ENV = os.environ,
+ )
+
+ env.Append(BUILDERS = {
diff --git a/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch
new file mode 100644
index 0000000000..380f5d00d2
--- /dev/null
+++ b/meta/recipes-support/serf/serf/norpath.patch
@@ -0,0 +1,42 @@
+The RPATH handling in serf is all wrong for us and we don't need it
+anyway so hack around it by removing this for now.
+
+Upstream-Status: Inappropriate
+
+RP 2014/7/17
+
+Index: serf-1.3.6/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 @@
+ else:
+ LIBNAMESTATIC = 'serf-${MAJOR}'
+
+-env.Append(RPATH=libdir,
+- 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 == 'win32':
+ env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
+
+-# On some systems, the -R values that APR describes never make it into actual
+-# RPATH flags. We'll manually map all directories in LIBPATH into new
+-# flags to set RPATH values.
+-for d in env['LIBPATH']:
+- env.Append(RPATH=':'+d)
+-
+ # 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']}))
+
+ # Find the (dynamic) library in this directory
+-tenv.Replace(RPATH=thisdir)
+ tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
+ LIBPATH=[thisdir, ])
+
diff --git a/meta/recipes-support/serf/serf_1.3.8.bb b/meta/recipes-support/serf/serf_1.3.8.bb
new file mode 100644
index 0000000000..aa7918b5c3
--- /dev/null
+++ b/meta/recipes-support/serf/serf_1.3.8.bb
@@ -0,0 +1,26 @@
+
+SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-${PV}.tar.bz2 \
+ file://norpath.patch \
+ file://env.patch"
+
+SRC_URI[md5sum] = "2e4efe57ff28cb3202a112e90f0c2889"
+SRC_URI[sha256sum] = "e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590"
+
+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/shared-mime-info/shared-mime-info_1.2.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb
deleted file mode 100644
index 11fd6ded64..0000000000
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_1.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI[md5sum] = "8f90f3f2b8478fa47e70678d34013f99"
-SRC_URI[sha256sum] = "a5516ae241b95a948a6749b1cbf65dc20c3bb563a73cc7bedb7065933788bb78"
-
-SRC_URI =+ "file://parallelmake.patch \
- file://install-data-hook.patch"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
new file mode 100644
index 0000000000..4bd81cd831
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI[md5sum] = "743720bc4803dd69f55449013d350f31"
+SRC_URI[sha256sum] = "4fd49c8c7ca9ecb10c59845094a18dbb73b69c72b4bad3db5e864f2111cb323a"
+
+SRC_URI =+ "file://parallelmake.patch \
+ file://install-data-hook.patch"
diff --git a/meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb b/meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb
index 244816bb9b..4c73d304da 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.8.5.0.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.8.7.4.bb
@@ -10,10 +10,10 @@ PE = "3"
SQLITE_PV = "${@sqlite_download_version(d)}"
SRC_URI = "http://www.sqlite.org/2014/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+SRC_URI[md5sum] = "33bb8db0038317ce1b0480ca1185c7ba"
+SRC_URI[sha256sum] = "86370f139405fdfe03334fd618171a74e50f589f17ccbe5933361ed1f58359ec"
-SRC_URI[md5sum] = "0544ef6d7afd8ca797935ccc2685a9ed"
-SRC_URI[sha256sum] = "98c33abe4106e508e73fda648b2657ac9e969fe24695f543dcde68cc71f3091b"
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
# Provide column meta-data API
BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
diff --git a/meta/site/arm-32 b/meta/site/arm-32
new file mode 100644
index 0000000000..81fd8d3103
--- /dev/null
+++ b/meta/site/arm-32
@@ -0,0 +1,47 @@
+# definitions assuming 32-bit arm architecture
+
+# apache
+ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
+
+# glib
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+
+# glib-2.0
+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}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=4
+
+# jikes
+ac_cv_sizeof_wchar_t=4
+
+# ORBit2
+ac_cv_alignof_CORBA_boolean=1
+ac_cv_alignof_CORBA_char=1
+ac_cv_alignof_CORBA_double=8
+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=4
+ac_cv_alignof_CORBA_short=2
+ac_cv_alignof_CORBA_struct=1
+ac_cv_alignof_CORBA_wchar=2
+
+# at-spi2-core
+ac_cv_alignof_char=1
+ac_cv_alignof_dbind_pointer=4
+ac_cv_alignof_dbind_struct=1
+ac_cv_alignof_dbus_bool_t=4
+ac_cv_alignof_dbus_int16_t=2
+ac_cv_alignof_dbus_int32_t=4
+ac_cv_alignof_dbus_int64_t=8
+ac_cv_alignof_double=8
diff --git a/meta/site/arm-64 b/meta/site/arm-64
new file mode 100644
index 0000000000..90c09b2d54
--- /dev/null
+++ b/meta/site/arm-64
@@ -0,0 +1,46 @@
+# definitions assuming 64-bit arm architecture
+
+# general
+ac_cv_sizeof_wchar_t=4
+ac_cv_sizeof_size_t=8
+ac_cv_sizeof_ssize_t=8
+ac_cv_alignof_char=1
+ac_cv_alignof_double=8
+
+# glib
+#glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+#glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+#glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+
+# glib-2.0
+#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}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+
+# ORBit2 (should be in meta-gnome/site/arm-64)
+#ac_cv_alignof_CORBA_boolean=1
+#ac_cv_alignof_CORBA_char=1
+#ac_cv_alignof_CORBA_double=8
+#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=4
+#ac_cv_alignof_CORBA_short=2
+#ac_cv_alignof_CORBA_struct=1
+#ac_cv_alignof_CORBA_wchar=2
+
+# at-spi2-core
+ac_cv_alignof_dbind_pointer=8
+ac_cv_alignof_dbind_struct=1
+ac_cv_alignof_dbus_bool_t=4
+ac_cv_alignof_dbus_int16_t=2
+ac_cv_alignof_dbus_int32_t=4
+ac_cv_alignof_dbus_int64_t=8
+
diff --git a/meta/site/arm-common b/meta/site/arm-common
index 1893dc0ab8..12e5d4592a 100644
--- a/meta/site/arm-common
+++ b/meta/site/arm-common
@@ -11,7 +11,6 @@ ac_cv_sctp=${ac_cv_sctp=no}
# apache
ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
-ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
# bash
@@ -51,8 +50,6 @@ ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
am_cv_func_working_getline=${am_cv_func_working_getline=yes}
# glib
-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_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
@@ -60,7 +57,6 @@ 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_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
glib_cv_uscore=${glib_cv_uscore=no}
glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
@@ -70,15 +66,7 @@ glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_po
# glib-2.0
glib_cv_long_long_format=${glib_cv_long_long_format=ll}
-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}
-ac_cv_alignof_guint32=4
-ac_cv_alignof_guint64=8
-ac_cv_alignof_unsigned_long=4
#gstreamer
as_cv_unaligned_access=${as_cv_unaligned_access=no}
@@ -86,9 +74,6 @@ as_cv_unaligned_access=${as_cv_unaligned_access=no}
# httppc
ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no}
-# jikes
-ac_cv_sizeof_wchar_t=4
-
# lftp
ac_cv_need_trio=${ac_cv_need_trio=no}
lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes}
@@ -119,20 +104,6 @@ mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no}
ac_cv_regexec_segfault_emptystr=${ac_cv_regexec_segfault_emptystr=no}
nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no}
-# ORBit2
-ac_cv_alignof_CORBA_boolean=1
-ac_cv_alignof_CORBA_char=1
-ac_cv_alignof_CORBA_double=8
-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=4
-ac_cv_alignof_CORBA_short=2
-ac_cv_alignof_CORBA_struct=1
-ac_cv_alignof_CORBA_wchar=2
-
# php
ac_cv_pread=${ac_cv_pread=no}
ac_cv_pwrite=${ac_cv_pwrite=no}
@@ -186,12 +157,3 @@ jm_cv_func_working_readdir=yes
# evolution-data-server
ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
-# at-spi2-core
-ac_cv_alignof_char=1
-ac_cv_alignof_dbind_pointer=4
-ac_cv_alignof_dbind_struct=1
-ac_cv_alignof_dbus_bool_t=4
-ac_cv_alignof_dbus_int16_t=2
-ac_cv_alignof_dbus_int32_t=4
-ac_cv_alignof_dbus_int64_t=8
-ac_cv_alignof_double=8
diff --git a/meta/site/common-darwin b/meta/site/common-darwin
new file mode 100644
index 0000000000..7d2d898749
--- /dev/null
+++ b/meta/site/common-darwin
@@ -0,0 +1,2 @@
+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}
diff --git a/meta/site/common-mingw b/meta/site/common-mingw
new file mode 100644
index 0000000000..f337c36e75
--- /dev/null
+++ b/meta/site/common-mingw
@@ -0,0 +1,2 @@
+# expat
+ac_cv_func_mmap_fixed_mapped=no