aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-agl-bsp/ROCKO.FIXMEs18
-rw-r--r--meta-agl-bsp/conf/include/agl_dra7xx-evm.inc11
-rw-r--r--meta-agl-bsp/conf/include/agl_intel-corei7-64.inc6
-rw-r--r--meta-agl-bsp/conf/include/agl_joule.inc2
-rw-r--r--meta-agl-bsp/conf/include/agl_raspberrypi3.inc2
-rw-r--r--meta-agl-bsp/conf/layer.conf2
-rw-r--r--meta-agl-bsp/conf/machine/qemuarm.conf2
-rw-r--r--meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend4
-rw-r--r--meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch145
-rwxr-xr-xmeta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend3
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/files/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch145
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend (renamed from meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14%.bbappend)3
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch43
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch197
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb35
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend4
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb18
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay.inc26
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay/make_install.patch26
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay_1.4.7.bb10
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend5
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg1
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend9
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend2
-rw-r--r--meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf3
-rw-r--r--meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend (renamed from meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.0.bbappend)0
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ducati_git.bb15
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ti.inc23
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe/ti-video.conf1
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe_git.bb18
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-Enable-mouse-movement-for-videos-on-waylandsink.patch404
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstdrmallocator-Add-DRM-allocator-support.patch482
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch408
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch89
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch96
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-parsers-Pick-previos-bug-fixes-on-different-parsers.patch146
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-gstkmssink-Add-support-for-KMS-based-sink.patch1592
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch81
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0004-gstwaylandsink-Add-DRM-support-on-waylandsink.patch1728
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0005-gstwaylandsink-Implement-callbacks-for-version-5-of-.patch65
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad_%.bbappend31
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/ipumm-fw/ipumm-fw_3.00.13.00.bb33
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch12
-rw-r--r--meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch12
-rw-r--r--meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend3
-rw-r--r--meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch6
-rw-r--r--meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend (renamed from meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_2.%.bbappend)0
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch16
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/files/fix_dcan_addresses.patch22
-rw-r--r--meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend4
-rw-r--r--meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend (renamed from meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend)0
-rw-r--r--meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg2
-rw-r--r--meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg1
-rw-r--r--meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch34
-rw-r--r--meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend6
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0001-utils.c-Prefer-monotonic-clock-to-calculate-elapsed-.patch72
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0002-Makefile-libcheck-now-requires-to-link-subunit.patch29
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0003-Add-support-to-avoid-load-run-twice-a-run_ptest-scri.patch137
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0004-README.md-Update-to-my-current-email.patch29
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0005-main.c-Use-realpath-to-get-the-actual-directory-of-p.patch42
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0006-main.c-Add-option-e-to-exclude-certain-tests-for-exe.patch123
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.1.bbappend4
-rw-r--r--meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend4
-rw-r--r--meta-agl-distro/conf/distro/poky-agl.conf43
-rw-r--r--meta-agl-distro/conf/layer.conf2
-rw-r--r--meta-agl-profile-cluster-qt5/conf/layer.conf2
-rw-r--r--meta-agl-profile-cluster/conf/layer.conf2
-rw-r--r--meta-agl-profile-core/conf/layer.conf2
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb3
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch7
-rw-r--r--meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch14
-rw-r--r--meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend1
-rw-r--r--meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch45
-rw-r--r--meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb1
-rw-r--r--meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch140
-rw-r--r--meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch102
-rw-r--r--meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch55
-rw-r--r--meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend7
-rw-r--r--meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf2
-rw-r--r--meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend9
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch51
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch108
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch32
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch30
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch31
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch39
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch47
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch32
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch35
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch45
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch68
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch189
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch37
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch252
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch30
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch32
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch96
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch33
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch78
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch27
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch87
-rwxr-xr-xmeta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest25
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch44
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch45
-rw-r--r--meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb158
-rw-r--r--meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch35
-rw-r--r--meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch18
-rw-r--r--meta-agl-profile-core/recipes-kernel/most/most.bbappend3
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch)20
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch)28
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch)0
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch)0
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch)0
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch)0
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch)0
-rw-r--r--meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend (renamed from meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend)2
-rw-r--r--meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend (renamed from meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend)0
-rw-r--r--meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch12
-rw-r--r--meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend (renamed from meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend)4
-rw-r--r--meta-agl-profile-graphical-html5/conf/layer.conf2
-rwxr-xr-xmeta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb1
-rw-r--r--meta-agl-profile-graphical-qt5/conf/layer.conf2
-rwxr-xr-xmeta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb1
-rw-r--r--meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch2
-rw-r--r--meta-agl-profile-graphical/conf/layer.conf2
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch31
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch20
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch19
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch7
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb (renamed from meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb)18
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch19
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch41
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch6
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch14
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch34
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch19
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-ivi-shell_add_screen_remove_layer_api.patch82
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch91
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch11
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend2
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend (renamed from meta-agl-profile-graphical/recipes-graphics/wayland/weston_2.0.0.bbappend)9
-rw-r--r--meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb3
-rw-r--r--meta-agl-profile-hud/conf/layer.conf2
-rw-r--r--meta-agl-profile-telematics/conf/layer.conf2
-rw-r--r--meta-agl/conf/layer.conf2
-rw-r--r--meta-app-framework/classes/aglwgt.bbclass3
-rw-r--r--meta-app-framework/conf/layer.conf1
-rw-r--r--meta-app-framework/recipes-core/af-main/af-main_git.bb4
-rw-r--r--meta-app-framework/recipes-support/libcap/libcap_%.bbappend3
-rw-r--r--meta-netboot/conf/layer.conf2
-rw-r--r--meta-security/conf/layer.conf2
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch389
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch104
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch117
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch305
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch22
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus-cynara_1.12.10.bb (renamed from meta-security/recipes-core/dbus-cynara/dbus-cynara_1.10.20.bb)2
-rw-r--r--meta-security/recipes-core/dbus-cynara/dbus_%.bbappend1
-rw-r--r--meta-security/recipes-core/systemd/systemd_239.bbappend (renamed from meta-security/recipes-core/systemd/systemd_234.bbappend)11
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs.inc27
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4135
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch18
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch67
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch19
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch44
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest11
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend14
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/e2fsprogs_git.bb106
-rw-r--r--meta-security/recipes-devtools/e2fsprogs/files/ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch51
-rw-r--r--meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch8
-rw-r--r--meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch35
-rw-r--r--meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch8
-rw-r--r--meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch8
-rw-r--r--meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch8
-rw-r--r--meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch228
-rw-r--r--meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch8
-rw-r--r--meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch14
-rw-r--r--meta-security/recipes-security/cynara/cynara_0.14.10.bb20
-rw-r--r--meta-security/recipes-security/libcap-ng/libcap-ng/CVE-2014-3215.patch79
-rw-r--r--meta-security/recipes-security/libcap-ng/libcap-ng/python.patch39
-rw-r--r--meta-security/recipes-security/libcap-ng/libcap-ng_0.7.3.bb39
-rw-r--r--meta-security/recipes-security/security-manager/security-manager.inc8
-rw-r--r--meta-security/recipes-security/security-manager/security-manager/0001-Avoid-casting-from-const-T-to-void.patch127
-rw-r--r--meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch32
-rw-r--r--meta-security/recipes-security/security-manager/security-manager_git.bb4
-rw-r--r--meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend3
186 files changed, 1134 insertions, 10136 deletions
diff --git a/meta-agl-bsp/ROCKO.FIXMEs b/meta-agl-bsp/ROCKO.FIXMEs
deleted file mode 100644
index c21e2ec3d..000000000
--- a/meta-agl-bsp/ROCKO.FIXMEs
+++ /dev/null
@@ -1,18 +0,0 @@
-FIXME:
-
-- ti:
- - gst and ducati:
- modified: conf/include/agl_dra7xx-evm.inc
- modified: meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
-
-- i.mx:
- Thus remove old bsp adaptations.
- deleted: meta-boundary/recipes-kernel/linux/linux-boundary_4.1.15.bbappend
-
-- meta-oe:
- - change is upstream
- deleted: meta-openembedded-layer/recipes-devtools/lua/lua_%.bbappend
-
-- meta-intel:
- - move libva patch to parent folder (generalize)
-
diff --git a/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc b/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc
index 876d6e9a6..12c0a2797 100644
--- a/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc
+++ b/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc
@@ -24,22 +24,11 @@ PREFERRED_VERSION_libgbm = "10.0.0"
## Multimedia section ##
#-------------------------------------------------
-# FIXME
-GSTREAMER_PLUGINS = ""
-DISABLED_ROCKO_GSTREAMER_PLUGINS = " \
- gstreamer1.0-plugins-bad-meta \
- gstreamer1.0-plugins-ducati \
- gstreamer1.0-plugins-vpe \
-"
-
PACKAGES_MULTIMEDIA = " \
ipumm-fw \
pulseaudio-misc \
- ${GSTREAMER_PLUGINS} \
"
-PREFERRED_VERSION_ipumm-fw = "3.00.13.00"
-
PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging"
PREFERRED_VERSION_virtual/kernel = "4.9"
diff --git a/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc b/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc
index 534d36475..4fab6923e 100644
--- a/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc
+++ b/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc
@@ -2,7 +2,7 @@
#
IMAGE_INSTALL_append = " \
libva \
- va-intel \
+ intel-vaapi-driver \
gstreamer1.0-vaapi"
AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum"
@@ -12,5 +12,5 @@ INITRD_LIVE = "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.ext4.gz"
# kernel command line, including to change the screen resolution.
WKS_FILE = "systemd-intel-corei7-64-bootdisk.wks"
-PREFERRED_VERSION_linux-intel ?= "4.14%"
-PREFERRED_VERSION_linux-intel-rt ?= "4.14%"
+PREFERRED_VERSION_linux-intel ?= "4.19%"
+PREFERRED_VERSION_linux-intel-rt ?= "4.19%"
diff --git a/meta-agl-bsp/conf/include/agl_joule.inc b/meta-agl-bsp/conf/include/agl_joule.inc
index a7773b2e9..642fe423c 100644
--- a/meta-agl-bsp/conf/include/agl_joule.inc
+++ b/meta-agl-bsp/conf/include/agl_joule.inc
@@ -3,7 +3,7 @@ INTEL_MACHINE_SUBTYPE = "broxton-m"
IMAGE_INSTALL_append = " linux-firmware-iwlwifi-8000c linux-firmware-ibt"
IMAGE_INSTALL_append = " \
libva \
- va-intel \
+ intel-vaapi-driver \
gstreamer1.0-vaapi"
OSTREE_BOOTLOADER ?= "u-boot"
diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc b/meta-agl-bsp/conf/include/agl_raspberrypi3.inc
index 23a37c2da..298cacd56 100644
--- a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc
+++ b/meta-agl-bsp/conf/include/agl_raspberrypi3.inc
@@ -17,7 +17,7 @@ MACHINE_FEATURES += "vc4graphics"
# For libomxil
#LICENSE_FLAGS_WHITELIST = "commercial"
-IMAGE_INSTALL_append = " kernel-modules linux-firmware-raspbian-bcm43430 linux-firmware-raspbian-bcm43455 create-combined-dtb "
+IMAGE_INSTALL_append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb "
# Psplash causes crash on first boot on RPi
IMAGE_FEATURES_remove = "splash"
diff --git a/meta-agl-bsp/conf/layer.conf b/meta-agl-bsp/conf/layer.conf
index 7c996cafe..35bf81123 100644
--- a/meta-agl-bsp/conf/layer.conf
+++ b/meta-agl-bsp/conf/layer.conf
@@ -22,3 +22,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "aglbsp"
BBFILE_PATTERN_aglbsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglbsp = "60"
+
+LAYERSERIES_COMPAT_aglbsp = "thud"
diff --git a/meta-agl-bsp/conf/machine/qemuarm.conf b/meta-agl-bsp/conf/machine/qemuarm.conf
index d47c05208..8d41d6927 100644
--- a/meta-agl-bsp/conf/machine/qemuarm.conf
+++ b/meta-agl-bsp/conf/machine/qemuarm.conf
@@ -15,4 +15,4 @@ QB_MACHINE = "-machine virt"
# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
QB_OPT_APPEND = "-show-cursor -usb -device virtio-rng-pci"
-PREFERRED_VERSION_linux-yocto ??= "4.12%"
+PREFERRED_VERSION_linux-yocto ??= "4.18%"
diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend
deleted file mode 100644
index db50df5d9..000000000
--- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/harfbuzz/harfbuzz_1.4.8.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-# 2017-09-13 hotfix for harfbuzz build
-# Reference https://www.mail-archive.com/yocto@yoctoproject.org/msg36472.html
-
-acpaths = "-I ${STAGING_DATADIR_NATIVE}/aclocal/"
diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch
deleted file mode 100644
index b64cc16cf..000000000
--- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From dbafc28955fa6779dc23d1607a0fee5e509a278b Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Sun, 20 May 2018 15:19:46 +0200
-Subject: [PATCH] NFC: pn533: don't send USB data off of the stack
-
-It's amazing that this driver ever worked, but now that x86 doesn't
-allow USB data to be sent off of the stack, it really does not work at
-all. Fix this up by properly allocating the data for the small
-"commands" that get sent to the device off of the stack.
-
-We do this for one command by having a whole urb just for ack messages,
-as they can be submitted in interrupt context, so we can not use
-usb_bulk_msg(). But the poweron command can sleep (and does), so use
-usb_bulk_msg() for that transfer.
-
-Reported-by: Carlos Manuel Santos <cmmpsantos@gmail.com>
-Cc: Samuel Ortiz <sameo@linux.intel.com>
-Cc: Stephen Hemminger <stephen@networkplumber.org>
-Cc: stable <stable@vger.kernel.org>
-Reviewed-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/nfc/pn533/usb.c | 42 +++++++++++++++++++++++++++++------------
- 1 file changed, 30 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c
-index e153e8b64bb8..d5553c47014f 100644
---- a/drivers/nfc/pn533/usb.c
-+++ b/drivers/nfc/pn533/usb.c
-@@ -62,6 +62,9 @@ struct pn533_usb_phy {
- struct urb *out_urb;
- struct urb *in_urb;
-
-+ struct urb *ack_urb;
-+ u8 *ack_buffer;
-+
- struct pn533 *priv;
- };
-
-@@ -150,13 +153,16 @@ static int pn533_usb_send_ack(struct pn533 *dev, gfp_t flags)
- struct pn533_usb_phy *phy = dev->phy;
- static const u8 ack[6] = {0x00, 0x00, 0xff, 0x00, 0xff, 0x00};
- /* spec 7.1.1.3: Preamble, SoPC (2), ACK Code (2), Postamble */
-- int rc;
-
-- phy->out_urb->transfer_buffer = (u8 *)ack;
-- phy->out_urb->transfer_buffer_length = sizeof(ack);
-- rc = usb_submit_urb(phy->out_urb, flags);
-+ if (!phy->ack_buffer) {
-+ phy->ack_buffer = kmemdup(ack, sizeof(ack), flags);
-+ if (!phy->ack_buffer)
-+ return -ENOMEM;
-+ }
-
-- return rc;
-+ phy->ack_urb->transfer_buffer = phy->ack_buffer;
-+ phy->ack_urb->transfer_buffer_length = sizeof(ack);
-+ return usb_submit_urb(phy->ack_urb, flags);
- }
-
- static int pn533_usb_send_frame(struct pn533 *dev,
-@@ -375,26 +381,31 @@ static int pn533_acr122_poweron_rdr(struct pn533_usb_phy *phy)
- /* Power on th reader (CCID cmd) */
- u8 cmd[10] = {PN533_ACR122_PC_TO_RDR_ICCPOWERON,
- 0, 0, 0, 0, 0, 0, 3, 0, 0};
-+ char *buffer;
-+ int transferred;
- int rc;
- void *cntx;
- struct pn533_acr122_poweron_rdr_arg arg;
-
- dev_dbg(&phy->udev->dev, "%s\n", __func__);
-
-+ buffer = kmemdup(cmd, sizeof(cmd), GFP_KERNEL);
-+ if (!buffer)
-+ return -ENOMEM;
-+
- init_completion(&arg.done);
- cntx = phy->in_urb->context; /* backup context */
-
- phy->in_urb->complete = pn533_acr122_poweron_rdr_resp;
- phy->in_urb->context = &arg;
-
-- phy->out_urb->transfer_buffer = cmd;
-- phy->out_urb->transfer_buffer_length = sizeof(cmd);
--
- print_hex_dump_debug("ACR122 TX: ", DUMP_PREFIX_NONE, 16, 1,
- cmd, sizeof(cmd), false);
-
-- rc = usb_submit_urb(phy->out_urb, GFP_KERNEL);
-- if (rc) {
-+ rc = usb_bulk_msg(phy->udev, phy->out_urb->pipe, buffer, sizeof(cmd),
-+ &transferred, 0);
-+ kfree(buffer);
-+ if (rc || (transferred != sizeof(cmd))) {
- nfc_err(&phy->udev->dev,
- "Reader power on cmd error %d\n", rc);
- return rc;
-@@ -490,8 +501,9 @@ static int pn533_usb_probe(struct usb_interface *interface,
-
- phy->in_urb = usb_alloc_urb(0, GFP_KERNEL);
- phy->out_urb = usb_alloc_urb(0, GFP_KERNEL);
-+ phy->ack_urb = usb_alloc_urb(0, GFP_KERNEL);
-
-- if (!phy->in_urb || !phy->out_urb)
-+ if (!phy->in_urb || !phy->out_urb || !phy->ack_urb)
- goto error;
-
- usb_fill_bulk_urb(phy->in_urb, phy->udev,
-@@ -501,7 +513,9 @@ static int pn533_usb_probe(struct usb_interface *interface,
- usb_fill_bulk_urb(phy->out_urb, phy->udev,
- usb_sndbulkpipe(phy->udev, out_endpoint),
- NULL, 0, pn533_send_complete, phy);
--
-+ usb_fill_bulk_urb(phy->ack_urb, phy->udev,
-+ usb_sndbulkpipe(phy->udev, out_endpoint),
-+ NULL, 0, pn533_send_complete, phy);
-
- switch (id->driver_info) {
- case PN533_DEVICE_STD:
-@@ -554,6 +568,7 @@ static int pn533_usb_probe(struct usb_interface *interface,
- error:
- usb_free_urb(phy->in_urb);
- usb_free_urb(phy->out_urb);
-+ usb_free_urb(phy->ack_urb);
- usb_put_dev(phy->udev);
- kfree(in_buf);
-
-@@ -573,10 +588,13 @@ static void pn533_usb_disconnect(struct usb_interface *interface)
-
- usb_kill_urb(phy->in_urb);
- usb_kill_urb(phy->out_urb);
-+ usb_kill_urb(phy->ack_urb);
-
- kfree(phy->in_urb->transfer_buffer);
- usb_free_urb(phy->in_urb);
- usb_free_urb(phy->out_urb);
-+ usb_free_urb(phy->ack_urb);
-+ kfree(phy->ack_buffer);
-
- nfc_info(&interface->dev, "NXP PN533 NFC device disconnected\n");
- }
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100755
index 124a1f43b..000000000
--- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
-
-SRC_URI_append = " file://0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch"
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch
deleted file mode 100644
index b64cc16cf..000000000
--- a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From dbafc28955fa6779dc23d1607a0fee5e509a278b Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Sun, 20 May 2018 15:19:46 +0200
-Subject: [PATCH] NFC: pn533: don't send USB data off of the stack
-
-It's amazing that this driver ever worked, but now that x86 doesn't
-allow USB data to be sent off of the stack, it really does not work at
-all. Fix this up by properly allocating the data for the small
-"commands" that get sent to the device off of the stack.
-
-We do this for one command by having a whole urb just for ack messages,
-as they can be submitted in interrupt context, so we can not use
-usb_bulk_msg(). But the poweron command can sleep (and does), so use
-usb_bulk_msg() for that transfer.
-
-Reported-by: Carlos Manuel Santos <cmmpsantos@gmail.com>
-Cc: Samuel Ortiz <sameo@linux.intel.com>
-Cc: Stephen Hemminger <stephen@networkplumber.org>
-Cc: stable <stable@vger.kernel.org>
-Reviewed-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/nfc/pn533/usb.c | 42 +++++++++++++++++++++++++++++------------
- 1 file changed, 30 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c
-index e153e8b64bb8..d5553c47014f 100644
---- a/drivers/nfc/pn533/usb.c
-+++ b/drivers/nfc/pn533/usb.c
-@@ -62,6 +62,9 @@ struct pn533_usb_phy {
- struct urb *out_urb;
- struct urb *in_urb;
-
-+ struct urb *ack_urb;
-+ u8 *ack_buffer;
-+
- struct pn533 *priv;
- };
-
-@@ -150,13 +153,16 @@ static int pn533_usb_send_ack(struct pn533 *dev, gfp_t flags)
- struct pn533_usb_phy *phy = dev->phy;
- static const u8 ack[6] = {0x00, 0x00, 0xff, 0x00, 0xff, 0x00};
- /* spec 7.1.1.3: Preamble, SoPC (2), ACK Code (2), Postamble */
-- int rc;
-
-- phy->out_urb->transfer_buffer = (u8 *)ack;
-- phy->out_urb->transfer_buffer_length = sizeof(ack);
-- rc = usb_submit_urb(phy->out_urb, flags);
-+ if (!phy->ack_buffer) {
-+ phy->ack_buffer = kmemdup(ack, sizeof(ack), flags);
-+ if (!phy->ack_buffer)
-+ return -ENOMEM;
-+ }
-
-- return rc;
-+ phy->ack_urb->transfer_buffer = phy->ack_buffer;
-+ phy->ack_urb->transfer_buffer_length = sizeof(ack);
-+ return usb_submit_urb(phy->ack_urb, flags);
- }
-
- static int pn533_usb_send_frame(struct pn533 *dev,
-@@ -375,26 +381,31 @@ static int pn533_acr122_poweron_rdr(struct pn533_usb_phy *phy)
- /* Power on th reader (CCID cmd) */
- u8 cmd[10] = {PN533_ACR122_PC_TO_RDR_ICCPOWERON,
- 0, 0, 0, 0, 0, 0, 3, 0, 0};
-+ char *buffer;
-+ int transferred;
- int rc;
- void *cntx;
- struct pn533_acr122_poweron_rdr_arg arg;
-
- dev_dbg(&phy->udev->dev, "%s\n", __func__);
-
-+ buffer = kmemdup(cmd, sizeof(cmd), GFP_KERNEL);
-+ if (!buffer)
-+ return -ENOMEM;
-+
- init_completion(&arg.done);
- cntx = phy->in_urb->context; /* backup context */
-
- phy->in_urb->complete = pn533_acr122_poweron_rdr_resp;
- phy->in_urb->context = &arg;
-
-- phy->out_urb->transfer_buffer = cmd;
-- phy->out_urb->transfer_buffer_length = sizeof(cmd);
--
- print_hex_dump_debug("ACR122 TX: ", DUMP_PREFIX_NONE, 16, 1,
- cmd, sizeof(cmd), false);
-
-- rc = usb_submit_urb(phy->out_urb, GFP_KERNEL);
-- if (rc) {
-+ rc = usb_bulk_msg(phy->udev, phy->out_urb->pipe, buffer, sizeof(cmd),
-+ &transferred, 0);
-+ kfree(buffer);
-+ if (rc || (transferred != sizeof(cmd))) {
- nfc_err(&phy->udev->dev,
- "Reader power on cmd error %d\n", rc);
- return rc;
-@@ -490,8 +501,9 @@ static int pn533_usb_probe(struct usb_interface *interface,
-
- phy->in_urb = usb_alloc_urb(0, GFP_KERNEL);
- phy->out_urb = usb_alloc_urb(0, GFP_KERNEL);
-+ phy->ack_urb = usb_alloc_urb(0, GFP_KERNEL);
-
-- if (!phy->in_urb || !phy->out_urb)
-+ if (!phy->in_urb || !phy->out_urb || !phy->ack_urb)
- goto error;
-
- usb_fill_bulk_urb(phy->in_urb, phy->udev,
-@@ -501,7 +513,9 @@ static int pn533_usb_probe(struct usb_interface *interface,
- usb_fill_bulk_urb(phy->out_urb, phy->udev,
- usb_sndbulkpipe(phy->udev, out_endpoint),
- NULL, 0, pn533_send_complete, phy);
--
-+ usb_fill_bulk_urb(phy->ack_urb, phy->udev,
-+ usb_sndbulkpipe(phy->udev, out_endpoint),
-+ NULL, 0, pn533_send_complete, phy);
-
- switch (id->driver_info) {
- case PN533_DEVICE_STD:
-@@ -554,6 +568,7 @@ static int pn533_usb_probe(struct usb_interface *interface,
- error:
- usb_free_urb(phy->in_urb);
- usb_free_urb(phy->out_urb);
-+ usb_free_urb(phy->ack_urb);
- usb_put_dev(phy->udev);
- kfree(in_buf);
-
-@@ -573,10 +588,13 @@ static void pn533_usb_disconnect(struct usb_interface *interface)
-
- usb_kill_urb(phy->in_urb);
- usb_kill_urb(phy->out_urb);
-+ usb_kill_urb(phy->ack_urb);
-
- kfree(phy->in_urb->transfer_buffer);
- usb_free_urb(phy->in_urb);
- usb_free_urb(phy->out_urb);
-+ usb_free_urb(phy->ack_urb);
-+ kfree(phy->ack_buffer);
-
- nfc_info(&interface->dev, "NXP PN533 NFC device disconnected\n");
- }
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14%.bbappend b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend
index 62c264d12..c49b8ecb0 100644
--- a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14%.bbappend
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend
@@ -15,9 +15,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/net-devices.cfg"
# Ensure we have a startup.nsh file
SRC_URI_append = " file://startup.nsh"
-# SPEC-1553 fix for pn333_usb devices not being functional
-SRC_URI_append = " file://0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch"
-
do_deploy_append() {
install -m 0755 ${WORKDIR}/startup.nsh ${DEPLOYDIR}/
}
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
deleted file mode 100644
index 76063607a..000000000
--- a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
-From: Nathan Lynch <nathan_lynch@mentor.com>
-Date: Tue, 25 Apr 2017 16:26:57 -0500
-Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
-
-Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
-into a similar problem as Linux experienced with ilog2.
-
-See:
-https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
-
-Upstream-Status: Pending
-Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
----
- lib/align.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/align.h b/lib/align.h
-index 5b91ae87410b..5e134cd485fe 100644
---- a/lib/align.h
-+++ b/lib/align.h
-@@ -48,7 +48,7 @@
- */
- #define offset_align(align_drift, alignment) \
- ({ \
-- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
-+ BUG_ON((alignment) == 0 \
- || ((alignment) & ((alignment) - 1))); \
- (((alignment) - (align_drift)) & ((alignment) - 1)); \
- })
-@@ -63,7 +63,7 @@
- */
- #define offset_align_floor(align_drift, alignment) \
- ({ \
-- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
-+ BUG_ON((alignment) == 0 \
- || ((alignment) & ((alignment) - 1))); \
- (((align_drift) - (alignment)) & ((alignment) - 1)); \
- })
---
-2.9.3
-
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
deleted file mode 100644
index aa165ba53..000000000
--- a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
-<head>
-<title>poky - Poky Build Tool and Metadata</title>
-<meta name='generator' content='cgit v0.10.2'/>
-<meta name='robots' content='index, nofollow'/>
-<link rel='stylesheet' type='text/css' href='/cgit/cgit.css'/>
-<link rel='shortcut icon' href='/favicon.ico'/>
-<link rel='alternate' title='Atom feed' href='http://git.yoctoproject.org/cgit/cgit.cgi/poky/atom/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?h=master' type='application/atom+xml'/>
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
-<script type="text/javascript">
-$(document).ready(function() {
-fragment = '';
-if (window.location.href.lastIndexOf('?') > -1) {
- fragment = window.location.href.substring(window.location.href.lastIndexOf('?'));
-}
-$('.logo').append('<a href="http://git.yoctoproject.org/clean/cgit.cgi/' + window.location.pathname.substring(window.location.pathname.lastIndexOf("cgit.cgi")+9) + fragment + '">light theme</a>');
-});
-</script>
-</head>
-<body>
-<div id='cgit'><table id='header'>
-<tr>
-<td class='logo' rowspan='2'><a href='/cgit/cgit.cgi/'><img src='/cgit/yocto-project-transp.png' alt='cgit logo'/></a></td>
-<td class='main'><a href='/cgit/cgit.cgi/'>index</a> : <a title='poky' href='/cgit/cgit.cgi/poky/'>poky</a></td><td class='form'><form method='get' action=''>
-<input type='hidden' name='id' value='1a97243bf86468a9dfd44f60c9f7563aff54b284'/><select name='h' onchange='this.form.submit();'>
-<option value='1.1_M1'>1.1_M1</option>
-<option value='1.1_M2'>1.1_M2</option>
-<option value='1.1_M3'>1.1_M3</option>
-<option value='1.1_M4'>1.1_M4</option>
-<option value='1.2_M1'>1.2_M1</option>
-<option value='1.2_M2'>1.2_M2</option>
-<option value='1.2_M3'>1.2_M3</option>
-<option value='1.2_M4'>1.2_M4</option>
-<option value='1.3_M1'>1.3_M1</option>
-<option value='1.3_M2'>1.3_M2</option>
-<option value='1.3_M3'>1.3_M3</option>
-<option value='1.3_M4'>1.3_M4</option>
-<option value='1.3_M5'>1.3_M5</option>
-<option value='1.3_beta'>1.3_beta</option>
-<option value='1.4_M1'>1.4_M1</option>
-<option value='1.4_M3'>1.4_M3</option>
-<option value='1.4_M4'>1.4_M4</option>
-<option value='1.4_M5'>1.4_M5</option>
-<option value='1.6_M5'>1.6_M5</option>
-<option value='bernard'>bernard</option>
-<option value='blinky'>blinky</option>
-<option value='clyde'>clyde</option>
-<option value='daisy'>daisy</option>
-<option value='danny'>danny</option>
-<option value='danny-next'>danny-next</option>
-<option value='denzil'>denzil</option>
-<option value='dizzy'>dizzy</option>
-<option value='dora'>dora</option>
-<option value='dora-toaster'>dora-toaster</option>
-<option value='dylan'>dylan</option>
-<option value='edison'>edison</option>
-<option value='elroy'>elroy</option>
-<option value='fido'>fido</option>
-<option value='green'>green</option>
-<option value='jethro'>jethro</option>
-<option value='krogoth'>krogoth</option>
-<option value='krogoth-next'>krogoth-next</option>
-<option value='laverne'>laverne</option>
-<option value='master' selected='selected'>master</option>
-<option value='master-next'>master-next</option>
-<option value='master-next2'>master-next2</option>
-<option value='morty'>morty</option>
-<option value='morty-next'>morty-next</option>
-<option value='pinky'>pinky</option>
-<option value='purple'>purple</option>
-<option value='pyro'>pyro</option>
-<option value='pyro-next'>pyro-next</option>
-<option value='rocko'>rocko</option>
-<option value='rocko-next'>rocko-next</option>
-</select> <input type='submit' name='' value='switch'/></form></td></tr>
-<tr><td class='sub'>Poky Build Tool and Metadata</td><td class='sub right'>git repository hosting</td></tr></table>
-<table class='tabs'><tr><td>
-<a href='/cgit/cgit.cgi/poky/'>summary</a><a href='/cgit/cgit.cgi/poky/refs/?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>refs</a><a href='/cgit/cgit.cgi/poky/log/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch'>log</a><a class='active' href='/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>tree</a><a href='/cgit/cgit.cgi/poky/commit/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>commit</a><a href='/cgit/cgit.cgi/poky/diff/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>diff</a><a href='/cgit/cgit.cgi/poky/stats/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/cgit.cgi/poky/log/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch'>
-<input type='hidden' name='id' value='1a97243bf86468a9dfd44f60c9f7563aff54b284'/><select name='qt'>
-<option value='grep'>log msg</option>
-<option value='author'>author</option>
-<option value='committer'>committer</option>
-<option value='range'>range</option>
-</select>
-<input class='txt' type='text' size='10' name='q' value=''/>
-<input type='submit' value='search'/>
-</form>
-</td></tr></table>
-<div class='path'>path: <a href='/cgit/cgit.cgi/poky/tree/?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>root</a>/<a href='/cgit/cgit.cgi/poky/tree/meta?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>meta</a>/<a href='/cgit/cgit.cgi/poky/tree/meta/recipes-kernel?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>recipes-kernel</a>/<a href='/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/lttng?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>lttng</a>/<a href='/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/lttng/lttng-modules?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>lttng-modules</a>/<a href='/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch</a></div><div class='content'>blob: e41124227201a9d7bb53cd6a7a5ef6aa733328e2 (<a href='/cgit/cgit.cgi/poky/plain/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch?id=1a97243bf86468a9dfd44f60c9f7563aff54b284'>plain</a>)
-<table summary='blob content' class='blob'>
-<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
-<a id='n2' href='#n2'>2</a>
-<a id='n3' href='#n3'>3</a>
-<a id='n4' href='#n4'>4</a>
-<a id='n5' href='#n5'>5</a>
-<a id='n6' href='#n6'>6</a>
-<a id='n7' href='#n7'>7</a>
-<a id='n8' href='#n8'>8</a>
-<a id='n9' href='#n9'>9</a>
-<a id='n10' href='#n10'>10</a>
-<a id='n11' href='#n11'>11</a>
-<a id='n12' href='#n12'>12</a>
-<a id='n13' href='#n13'>13</a>
-<a id='n14' href='#n14'>14</a>
-<a id='n15' href='#n15'>15</a>
-<a id='n16' href='#n16'>16</a>
-<a id='n17' href='#n17'>17</a>
-<a id='n18' href='#n18'>18</a>
-<a id='n19' href='#n19'>19</a>
-<a id='n20' href='#n20'>20</a>
-<a id='n21' href='#n21'>21</a>
-<a id='n22' href='#n22'>22</a>
-<a id='n23' href='#n23'>23</a>
-<a id='n24' href='#n24'>24</a>
-<a id='n25' href='#n25'>25</a>
-<a id='n26' href='#n26'>26</a>
-<a id='n27' href='#n27'>27</a>
-<a id='n28' href='#n28'>28</a>
-<a id='n29' href='#n29'>29</a>
-<a id='n30' href='#n30'>30</a>
-<a id='n31' href='#n31'>31</a>
-<a id='n32' href='#n32'>32</a>
-<a id='n33' href='#n33'>33</a>
-<a id='n34' href='#n34'>34</a>
-<a id='n35' href='#n35'>35</a>
-<a id='n36' href='#n36'>36</a>
-<a id='n37' href='#n37'>37</a>
-<a id='n38' href='#n38'>38</a>
-<a id='n39' href='#n39'>39</a>
-<a id='n40' href='#n40'>40</a>
-<a id='n41' href='#n41'>41</a>
-<a id='n42' href='#n42'>42</a>
-<a id='n43' href='#n43'>43</a>
-<a id='n44' href='#n44'>44</a>
-<a id='n45' href='#n45'>45</a>
-<a id='n46' href='#n46'>46</a>
-<a id='n47' href='#n47'>47</a>
-<a id='n48' href='#n48'>48</a>
-<a id='n49' href='#n49'>49</a>
-</pre></td>
-<td class='lines'><pre><code>From 1b0e574d680101105a6c1e8931c78824f5a97a42 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador &lt;otavio@ossystems.com.br&gt;
-Date: Mon, 5 Sep 2016 17:08:56 +0000
-Subject: [PATCH] Makefile: Do not fail if CONFIG_TRACEPOINTS is not enabled
-Organization: O.S. Systems Software LTDA.
-
-The lttng-modules are being pulled by the tools-profile image feature,
-however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
-
-This change makes the build do not fail when CONFIG_TRACEPOINTS is not
-available, allowing it to be kept being pulled by default.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Otavio Salvador &lt;otavio@ossystems.com.br&gt;
----
- Makefile | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 8602649..75550cc 100644
---- a/Makefile
-+++ b/Makefile
-@@ -8,10 +8,7 @@ ifneq ($(KERNELRELEASE),)
- # and defines the modules to be built.
-
- ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
-- ifeq ($(CONFIG_TRACEPOINTS),)
-- $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
-- endif # CONFIG_TRACEPOINTS
-- endif # ifdef CONFIG_LOCALVERSION
-+ ifneq ($(CONFIG_TRACEPOINTS),)
-
- TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
-
-@@ -94,6 +91,10 @@ ifneq ($(KERNELRELEASE),)
- obj-$(CONFIG_LTTNG) += lib/
- obj-$(CONFIG_LTTNG) += tests/
-
-+ else
-+ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
-+ endif # CONFIG_TRACEPOINTS
-+ endif # ifdef CONFIG_LOCALVERSION
- else # KERNELRELEASE
-
- # This part of the Makefile is used when the 'make' command is runned in the
---
-2.1.4
-
-</code></pre></td></tr></table>
-</div> <!-- class=content -->
-<div class='footer'>generated by cgit v0.10.2 at 2018-02-19 12:16:57 (GMT)</div>
-</div> <!-- id=cgit -->
-</body>
-</html>
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb
deleted file mode 100644
index 370b78aae..000000000
--- a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
-DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
-LICENSE = "LGPLv2.1 & GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \
- file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
- file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \
- "
-
-inherit module
-
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
-
-SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
- file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
-"
-
-SRC_URI[md5sum] = "4aaabaafd15d9455c83972e26ccfbca7"
-SRC_URI[sha256sum] = "b8dbbbee45a673c381f51b99c555e36655c3c2c7a5477aab927591cc7f003a1f"
-
-export INSTALL_MOD_DIR="kernel/lttng-modules"
-
-EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
-
-do_install_append() {
- # Delete empty directories to avoid QA failures if no modules were built
- find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
-}
-
-python do_package_prepend() {
- if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
- bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
-}
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend
new file mode 100644
index 000000000..d4c74ef48
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend
@@ -0,0 +1,4 @@
+# FIXME: Temporary fix that can be removed once commit 752db52 gets backported
+# from master to thud branch of meta-raspberrypi
+RDEPENDS_${PN}_remove = "libegl1"
+RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
index 44f90272e..7cc76c06e 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
@@ -5,7 +5,7 @@ PR = "r1"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-DEPENDS = "fdtoverlay-native"
+DEPENDS = "dtc-native"
ALLOW_EMPTY_${PN} = "1"
FILES_${PN} = ""
@@ -16,20 +16,20 @@ do_compile[depends] += "virtual/kernel:do_deploy"
do_compile () {
# Official touchscreen setup (rpi3b/rpi3b dtb, vc4-kms-v3d and ft5406)
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/uImage-bcm2710-rpi-3-b-plus.dtb -o uImage-bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/uImage-vc4-kms-v3d.dtbo
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/uImage-bcm2710-rpi-3-b.dtb -o uImage-bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/uImage-vc4-kms-v3d.dtbo
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo
# HDMI screen setup (rpi3b/rpi3b dtb and vc4-kms-v3d)
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/uImage-bcm2710-rpi-3-b-plus.dtb -o uImage-bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/uImage-vc4-kms-v3d.dtbo
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/uImage-bcm2710-rpi-3-b.dtb -o uImage-bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}/uImage-vc4-kms-v3d.dtbo
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo
}
do_deploy () {
install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 ${S}/uImage-bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
- install -m 0644 ${S}/uImage-bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
- install -m 0644 ${S}/uImage-bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}
- install -m 0644 ${S}/uImage-bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}
+ install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
+ install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
+ install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}
+ install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}
}
addtask deploy after do_install
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay.inc b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay.inc
deleted file mode 100644
index e769a1864..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "fdtoverlay from the device tree compiler"
-HOMEPAGE = "https://devicetree.org/"
-DESCRIPTION = "fdtoverlay is a tool to apply a number of overlays to a base blob."
-SECTION = "bootloader"
-LICENSE = "GPLv2 | BSD"
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
- file://make_install.patch \
- "
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
-
-EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
-
-S = "${WORKDIR}/git"
-
-do_compile () {
- oe_runmake fdtoverlay
-}
-
-do_install () {
- install -d ${D}/${bindir}
- install -m 0755 ${S}/fdtoverlay ${D}/${bindir}/fdtoverlay
-}
-
-FILES_${PN} = "${bindir}/fdtoverlay"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay/make_install.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay/make_install.patch
deleted file mode 100644
index ea9359e81..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay/make_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001
-From: Saul Wold <sgw@linux.intel.com>
-Date: Thu, 3 Nov 2011 08:35:47 -0700
-Subject: [PATCH] dtc: Add patch to correctly install shared libraries and
-
-Upstream-Status: Inappropriate [configuration]
-
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d8ebc4f..f5e01be 100644
---- a/Makefile
-+++ b/Makefile
-@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS)
- install-lib: all
- @$(VECHO) INSTALL-LIB
- $(INSTALL) -d $(DESTDIR)$(LIBDIR)
-- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
-- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
-+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
-+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
- ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
- $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay_1.4.7.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay_1.4.7.bb
deleted file mode 100644
index 91981987d..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/fdtoverlay/fdtoverlay_1.4.7.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require fdtoverlay.inc
-
-LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-
-SRCREV = "88f18909db731a627456f26d779445f84e449536"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
deleted file mode 100644
index 9df797fab..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-# In releases based on Rocko firmware files for bcm43430 and
-# bcm43455 are provided by linux-firmware-raspbian. The lines
-# below fix eventual duplication of these files.
-FILES_${PN}-bcm43455 = ""
-FILES_${PN}-bcm43430 = ""
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg
new file mode 100644
index 000000000..4a67a7e6b
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg
@@ -0,0 +1 @@
+CONFIG_KPROBES=n
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
index 855a86257..92dd6e7d2 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -1,17 +1,20 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
require recipes-kernel/linux/linux-agl.inc
-require recipes-kernel/linux/linux-agl-4.9.inc
+require recipes-kernel/linux/linux-agl-4.14.inc
+# NOTE: Kprobes need to be disabled until linux-raspberrypi gets updated
+# to newer than 4.14.104 to avoid lttng-modules failing to build.
SRC_URI_append = "\
- ${@base_conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \
+ ${@oe.utils.conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \
+ file://disable_kprobes.cfg \
"
CMDLINE_DEBUG = ""
CMDLINE_append = " usbhid.mousepoll=0"
# Add options to allow CMA to operate
-CMDLINE_append = ' ${@base_conditional("ENABLE_CMA", "1", "coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}'
+CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_CMA", "1", "coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}'
KERNEL_MODULE_AUTOLOAD += "snd-bcm2835"
KERNEL_MODULE_AUTOLOAD += "hid-multitouch"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
new file mode 100644
index 000000000..e48a380a3
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
@@ -0,0 +1,2 @@
+# Disable faad by default to avoid licensing issues
+PACKAGECONFIG_remove_rpi = "faad"
diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf
index 2b1ac5a7e..277186f29 100644
--- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf
+++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf
@@ -13,6 +13,8 @@ BBFILE_COLLECTIONS += "rcar-gen3-cogent"
BBFILE_PATTERN_rcar-gen3-cogent := "^${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/"
BBFILE_PRIORITY_rcar-gen3-cogent = "7"
+LAYERSERIES_COMPAT_rcar-gen3-cogent = "thud"
+
# Custom packages
IMAGE_INSTALL_append_rcar-gen3 = " \
can-utils \
@@ -39,7 +41,6 @@ IMAGE_INSTALL_append_rcar-gen3 = " \
IMAGE_INSTALL_append_rcar-gen3 += " \
si-tools \
linux-firmware-wl18xx \
- wireless-tools \
ti-bt \
ti-bt-firmware \
bluez5 \
diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.0.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend
index e77b58e01..e77b58e01 100644
--- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.0.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ducati_git.bb b/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ducati_git.bb
deleted file mode 100644
index 3f806eb8a..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ducati_git.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-DESCRIPTION = "GStreamer elements to use the multimedia accelerators available on some TI parts"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-require gstreamer1.0-plugins-ti.inc
-
-PR = "${INC_PR}.24"
-SRCREV = "e797c1d832cc8ee1dd66d1683991cb6d7316ed63"
-
-BRANCH ?= "master"
-
-SRC_URI = "git://git.ti.com/glsdk/gst-plugin-ducati.git;protocol=git;branch=${BRANCH} \
- "
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ti.inc b/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ti.inc
deleted file mode 100644
index 529306bf8..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-ti.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-# Include file for common build settings for TI GStreamer plugins
-DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad libdrm libdce"
-
-inherit autotools-brokensep pkgconfig gettext
-
-INC_PR = "r2"
-
-S = "${WORKDIR}/git"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-do_configure() {
- cd ${S}
- chmod +x autogen.sh
- ./autogen.sh --host=arm-linux --with-libtool-sysroot=${STAGING_DIR_TARGET} --prefix=/usr
-}
-
-EXTRA_OECONF += "--enable-maintainer-mode"
-EXTRA_OEMAKE += "'ERROR_CFLAGS=-Wno-deprecated-declarations'"
-
-FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
-FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe/ti-video.conf b/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe/ti-video.conf
deleted file mode 100644
index 339a0c196..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe/ti-video.conf
+++ /dev/null
@@ -1 +0,0 @@
-install ti-vip /sbin/modprobe ti-vpe; /sbin/modprobe --ignore-install ti-vip
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe_git.bb b/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe_git.bb
deleted file mode 100644
index e0fb640e3..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gst-plugins-ti/gstreamer1.0-plugins-vpe_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-DESCRIPTION = "GStreamer elements to use the Video Processing Engine (VPE) found on some TI devices"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-require gstreamer1.0-plugins-ti.inc
-
-PR = "${INC_PR}.14"
-SRCREV = "6ec1a9c9fc17e0cae781aed067a2a6f2c1f92d68"
-
-SRC_URI = "git://git.ti.com/glsdk/gst-plugin-vpe.git;protocol=git \
- file://ti-video.conf \
-"
-
-do_install_append() {
- install -d ${D}/etc/modprobe.d
- install -m 644 ${WORKDIR}/ti-video.conf ${D}/etc/modprobe.d
-}
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-Enable-mouse-movement-for-videos-on-waylandsink.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-Enable-mouse-movement-for-videos-on-waylandsink.patch
deleted file mode 100644
index 06d28bc82..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-Enable-mouse-movement-for-videos-on-waylandsink.patch
+++ /dev/null
@@ -1,404 +0,0 @@
-From 90fafb6ea39940161f3bf86ab7f557197ff389ff Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Fri, 26 Feb 2016 16:46:39 -0500
-Subject: [PATCH] Enable mouse movement for videos on waylandsink
-
-This patch enables grab, drag and ungrab of videos
-that are being played on waylandsink.
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- ext/wayland/gstwaylandsink.c | 283 +++++++++++++++++++++++++++++++++++++++++++
- ext/wayland/gstwaylandsink.h | 26 ++++
- 2 files changed, 309 insertions(+)
-
-diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
-index cabf310..7394a2b 100644
---- a/ext/wayland/gstwaylandsink.c
-+++ b/ext/wayland/gstwaylandsink.c
-@@ -41,6 +41,7 @@
- #endif
-
- #include "gstwaylandsink.h"
-+#include <linux/input.h>
-
- /* signals */
- enum
-@@ -100,6 +101,9 @@ static void create_window (GstWaylandSink * sink, struct display *display,
- int width, int height);
- static void shm_pool_destroy (struct shm_pool *pool);
-
-+static void input_grab (struct input *input, struct window *window);
-+static void input_ungrab (struct input *input);
-+
- typedef struct
- {
- uint32_t wl_format;
-@@ -225,6 +229,54 @@ gst_wayland_sink_set_property (GObject * object,
- }
-
- static void
-+input_grab (struct input *input, struct window *window)
-+{
-+ input->grab = window;
-+}
-+
-+static void
-+input_ungrab (struct input *input)
-+{
-+ input->grab = NULL;
-+}
-+
-+static void
-+input_remove_pointer_focus (struct input *input)
-+{
-+ struct window *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ input->pointer_focus = NULL;
-+}
-+
-+static void
-+input_destroy (struct input *input)
-+{
-+ input_remove_pointer_focus (input);
-+
-+ if (input->display->seat_version >= 3) {
-+ if (input->pointer)
-+ wl_pointer_release (input->pointer);
-+ }
-+
-+ wl_list_remove (&input->link);
-+ wl_seat_destroy (input->seat);
-+ free (input);
-+}
-+
-+static void
-+display_destroy_inputs (struct display *display)
-+{
-+ struct input *tmp;
-+ struct input *input;
-+
-+ wl_list_for_each_safe (input, tmp, &display->input_list, link)
-+ input_destroy (input);
-+}
-+
-+static void
- destroy_display (struct display *display)
- {
- if (display->shm)
-@@ -236,6 +288,7 @@ destroy_display (struct display *display)
- if (display->compositor)
- wl_compositor_destroy (display->compositor);
-
-+ display_destroy_inputs (display);
- wl_display_flush (display->display);
- wl_display_disconnect (display->display);
- free (display);
-@@ -318,6 +371,229 @@ struct wl_shm_listener shm_listenter = {
- shm_format
- };
-
-+
-+static void
-+pointer_handle_enter (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface,
-+ wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+
-+ if (!surface) {
-+ /* enter event for a window we've just destroyed */
-+ return;
-+ }
-+
-+ input->display->serial = serial;
-+ input->pointer_focus = wl_surface_get_user_data (surface);
-+}
-+
-+static void
-+pointer_handle_leave (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface)
-+{
-+ struct input *input = data;
-+
-+ input_remove_pointer_focus (input);
-+}
-+
-+static void
-+pointer_handle_motion (void *data, struct wl_pointer *pointer,
-+ uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+ struct window *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+
-+}
-+
-+static void
-+pointer_handle_button (void *data, struct wl_pointer *pointer, uint32_t serial,
-+ uint32_t time, uint32_t button, uint32_t state_w)
-+{
-+ struct input *input = data;
-+ enum wl_pointer_button_state state = state_w;
-+ input->display->serial = serial;
-+
-+ if (button == BTN_LEFT) {
-+ if (state == WL_POINTER_BUTTON_STATE_PRESSED)
-+ input_grab (input, input->pointer_focus);
-+
-+ if (input->grab && state == WL_POINTER_BUTTON_STATE_RELEASED)
-+ input_ungrab (input);
-+ }
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+}
-+
-+static void
-+pointer_handle_axis (void *data, struct wl_pointer *pointer,
-+ uint32_t time, uint32_t axis, wl_fixed_t value)
-+{
-+}
-+
-+static const struct wl_pointer_listener pointer_listener = {
-+ pointer_handle_enter,
-+ pointer_handle_leave,
-+ pointer_handle_motion,
-+ pointer_handle_button,
-+ pointer_handle_axis,
-+};
-+
-+static void
-+touch_handle_down (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, struct wl_surface *surface,
-+ int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+ input->display->serial = serial;
-+ input->touch_focus = wl_surface_get_user_data (surface);
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ tp = malloc (sizeof *tp);
-+ if (tp) {
-+ tp->id = id;
-+ wl_list_insert (&input->touch_point_list, &tp->link);
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ serial);
-+ }
-+}
-+
-+static void
-+touch_handle_motion (void *data, struct wl_touch *wl_touch,
-+ uint32_t time, int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+ wl_list_for_each (tp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ input->display->serial);
-+
-+ return;
-+ }
-+}
-+
-+static void
-+touch_handle_frame (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_cancel (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_up (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, int32_t id)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp, *tmp;
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ wl_list_for_each_safe (tp, tmp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_list_remove (&tp->link);
-+ free (tp);
-+
-+ return;
-+ }
-+}
-+
-+static const struct wl_touch_listener touch_listener = {
-+ touch_handle_down,
-+ touch_handle_up,
-+ touch_handle_motion,
-+ touch_handle_frame,
-+ touch_handle_cancel,
-+};
-+
-+
-+
-+static void
-+seat_handle_capabilities (void *data, struct wl_seat *seat,
-+ enum wl_seat_capability caps)
-+{
-+ struct input *input = data;
-+
-+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) {
-+ input->pointer = wl_seat_get_pointer (seat);
-+ wl_pointer_set_user_data (input->pointer, input);
-+ wl_pointer_add_listener (input->pointer, &pointer_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && input->pointer) {
-+ wl_pointer_destroy (input->pointer);
-+ input->pointer = NULL;
-+ }
-+
-+ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) {
-+ input->touch = wl_seat_get_touch (seat);
-+ wl_touch_set_user_data (input->touch, input);
-+ wl_touch_add_listener (input->touch, &touch_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) {
-+ wl_touch_destroy (input->touch);
-+ input->touch = NULL;
-+ }
-+}
-+
-+static void
-+seat_handle_name (void *data, struct wl_seat *seat, const char *name)
-+{
-+
-+}
-+
-+static const struct wl_seat_listener seat_listener = {
-+ seat_handle_capabilities,
-+ seat_handle_name
-+};
-+
-+static void
-+display_add_input (struct display *d, uint32_t id)
-+{
-+ struct input *input;
-+
-+ input = calloc (1, sizeof (*input));
-+ if (input == NULL) {
-+ fprintf (stderr, "%s: out of memory\n", "gst-wayland-sink");
-+ exit (EXIT_FAILURE);
-+ }
-+ input->display = d;
-+ input->seat = wl_registry_bind (d->registry, id, &wl_seat_interface,
-+ MAX (d->seat_version, 3));
-+ input->touch_focus = NULL;
-+ input->pointer_focus = NULL;
-+ wl_list_init (&input->touch_point_list);
-+ wl_list_insert (d->input_list.prev, &input->link);
-+
-+ wl_seat_add_listener (input->seat, &seat_listener, input);
-+ wl_seat_set_user_data (input->seat, input);
-+
-+}
-+
- static void
- registry_handle_global (void *data, struct wl_registry *registry,
- uint32_t id, const char *interface, uint32_t version)
-@@ -332,6 +608,9 @@ registry_handle_global (void *data, struct wl_registry *registry,
- } else if (strcmp (interface, "wl_shm") == 0) {
- d->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);
- wl_shm_add_listener (d->shm, &shm_listenter, d);
-+ } else if (strcmp (interface, "wl_seat") == 0) {
-+ d->seat_version = version;
-+ display_add_input (d, id);
- }
- }
-
-@@ -352,6 +631,8 @@ create_display (void)
- return NULL;
- }
-
-+ wl_list_init (&display->input_list);
-+
- display->registry = wl_display_get_registry (display->display);
- wl_registry_add_listener (display->registry, &registry_listener, display);
-
-@@ -491,6 +772,8 @@ create_window (GstWaylandSink * sink, struct display *display, int width,
-
- window->surface = wl_compositor_create_surface (display->compositor);
-
-+ wl_surface_set_user_data (window->surface, window);
-+
- window->shell_surface = wl_shell_get_shell_surface (display->shell,
- window->surface);
-
-diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h
-index cb3383e..f7d30dc 100644
---- a/ext/wayland/gstwaylandsink.h
-+++ b/ext/wayland/gstwaylandsink.h
-@@ -55,6 +55,27 @@
- #define GST_WAYLAND_SINK_GET_CLASS(inst) \
- (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass))
-
-+struct touch_point
-+{
-+ int32_t id;
-+ struct wl_list link;
-+};
-+
-+struct input
-+{
-+ struct display *display;
-+ struct wl_seat *seat;
-+ struct wl_pointer *pointer;
-+ struct wl_touch *touch;
-+ struct wl_list touch_point_list;
-+ struct window *pointer_focus;
-+ struct window *touch_focus;
-+ struct wl_list link;
-+ struct window *grab;
-+
-+};
-+
-+
- struct display
- {
- struct wl_display *display;
-@@ -63,6 +84,11 @@ struct display
- struct wl_shell *shell;
- struct wl_shm *shm;
- uint32_t formats;
-+
-+ struct wl_list input_list;
-+ int seat_version;
-+ uint32_t serial;
-+
- };
-
- struct window
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstdrmallocator-Add-DRM-allocator-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstdrmallocator-Add-DRM-allocator-support.patch
deleted file mode 100644
index 38eb5a124..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstdrmallocator-Add-DRM-allocator-support.patch
+++ /dev/null
@@ -1,482 +0,0 @@
-From c5d115bf88f0d2fb64f58b21b72a3195eae98d0a Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Fri, 20 Jan 2017 14:41:45 +0530
-Subject: [PATCH 1/5] gstdrmallocator: Add DRM allocator support
-
-Add DRM based allocator support.
-
-The following changes are included :
-1. Use DRM dumb buffers and associated APIs for
-dmabuf allocation.
-2. Have DRM device fd a member of allocator object
-3. Allocate GstMemory objects with mem_type as 'dmabuf'
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- configure.ac | 5 +
- gst-libs/gst/Makefile.am | 4 +-
- gst-libs/gst/drm/Makefile.am | 33 +++++
- gst-libs/gst/drm/gstdrmallocator.c | 206 ++++++++++++++++++++++++++++++
- gst-libs/gst/drm/gstdrmallocator.h | 77 +++++++++++
- pkgconfig/Makefile.am | 3 +
- pkgconfig/gstreamer-drm-uninstalled.pc.in | 11 ++
- pkgconfig/gstreamer-drm.pc.in | 12 ++
- 8 files changed, 349 insertions(+), 2 deletions(-)
- create mode 100644 gst-libs/gst/drm/Makefile.am
- create mode 100644 gst-libs/gst/drm/gstdrmallocator.c
- create mode 100644 gst-libs/gst/drm/gstdrmallocator.h
- create mode 100644 pkgconfig/gstreamer-drm-uninstalled.pc.in
- create mode 100644 pkgconfig/gstreamer-drm.pc.in
-
-diff --git a/configure.ac b/configure.ac
-index 5e85e56..e254605 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -621,6 +621,8 @@ if test x$with_egl_module_name != x; then
- AC_DEFINE_UNQUOTED(GST_GL_LIBEGL_MODULE_NAME, "$with_egl_module_name", [EGL module name])
- fi
-
-+PKG_CHECK_MODULES([DRM], [libdrm libdrm_omap], HAVE_KMS=yes, HAVE_KMS=no)
-+
- AC_ARG_ENABLE([wgl],
- [ --enable-wgl Enable WGL support @<:@default=auto@:>@],
- [case "${enableval}" in
-@@ -3590,6 +3592,7 @@ gst-libs/Makefile
- gst-libs/gst/Makefile
- gst-libs/gst/adaptivedemux/Makefile
- gst-libs/gst/basecamerabinsrc/Makefile
-+gst-libs/gst/drm/Makefile
- gst-libs/gst/gl/Makefile
- gst-libs/gst/gl/android/Makefile
- gst-libs/gst/gl/cocoa/Makefile
-@@ -3749,6 +3752,8 @@ pkgconfig/gstreamer-plugins-bad.pc
- pkgconfig/gstreamer-plugins-bad-uninstalled.pc
- pkgconfig/gstreamer-codecparsers.pc
- pkgconfig/gstreamer-codecparsers-uninstalled.pc
-+pkgconfig/gstreamer-drm.pc
-+pkgconfig/gstreamer-drm-uninstalled.pc
- pkgconfig/gstreamer-insertbin.pc
- pkgconfig/gstreamer-insertbin-uninstalled.pc
- pkgconfig/gstreamer-gl.pc
-diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am
-index 7d0b309..5ec3967 100644
---- a/gst-libs/gst/Makefile.am
-+++ b/gst-libs/gst/Makefile.am
-@@ -11,7 +11,7 @@ WAYLAND_DIR=wayland
- endif
-
- SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \
-- insertbin mpegts base video audio player $(GL_DIR) $(WAYLAND_DIR)
-+ insertbin mpegts base video audio player drm $(GL_DIR) $(WAYLAND_DIR)
-
- noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
- DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \
-@@ -24,7 +24,7 @@ adaptivedemux: uridownloader
-
- INDEPENDENT_SUBDIRS = \
- interfaces basecamerabinsrc codecparsers insertbin uridownloader \
-- mpegts base player $(GL_DIR) $(WAYLAND_DIR)
-+ mpegts base player drm $(GL_DIR) $(WAYLAND_DIR)
-
- .PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
-
-diff --git a/gst-libs/gst/drm/Makefile.am b/gst-libs/gst/drm/Makefile.am
-new file mode 100644
-index 0000000..9a45dfb
---- /dev/null
-+++ b/gst-libs/gst/drm/Makefile.am
-@@ -0,0 +1,33 @@
-+lib_LTLIBRARIES = libgstdrm-@GST_API_VERSION@.la
-+
-+CLEANFILES = $(BUILT_SOURCES)
-+
-+libgstdrm_@GST_API_VERSION@_la_SOURCES = \
-+ gstdrmallocator.c
-+
-+libgstdrm_@GST_API_VERSION@includedir = \
-+ $(includedir)/gstreamer-@GST_API_VERSION@/gst/drm
-+
-+libgstdrm_@GST_API_VERSION@include_HEADERS = \
-+ gstdrmallocator.h
-+
-+libgstdrm_@GST_API_VERSION@_la_CFLAGS = \
-+ $(DRM_CFLAGS) \
-+ $(OMAPDRM_CFLAGS) \
-+ $(GST_PLUGINS_BAD_CFLAGS) \
-+ $(GST_PLUGINS_BASE_CFLAGS) \
-+ -DGST_USE_UNSTABLE_API \
-+ $(GST_CFLAGS)
-+
-+libgstdrm_@GST_API_VERSION@_la_LIBADD = \
-+ $(DRM_LIBS) \
-+ $(GST_PLUGINS_BASE_LIBS) \
-+ $(GST_BASE_LIBS) \
-+ -lgstallocators-$(GST_API_VERSION) \
-+ $(GST_LIBS)
-+
-+libgstdrm_@GST_API_VERSION@_la_LDFLAGS = \
-+ $(DRM_LDFLAGS) \
-+ $(GST_LIB_LDFLAGS) \
-+ $(GST_ALL_LDFLAGS) \
-+ $(GST_LT_LDFLAGS)
-diff --git a/gst-libs/gst/drm/gstdrmallocator.c b/gst-libs/gst/drm/gstdrmallocator.c
-new file mode 100644
-index 0000000..b557ad2
---- /dev/null
-+++ b/gst-libs/gst/drm/gstdrmallocator.c
-@@ -0,0 +1,206 @@
-+/*
-+ * GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ *
-+ * Authors:
-+ * Pooja Prajod <poojaprajod@ti.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation
-+ * version 2.1 of the License.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * SECTION:GstDRMAllocator
-+ * @short_description: GStreamer DRM allocator support
-+ *
-+ * Since: 1.6.3
-+ */
-+
-+
-+#include "gstdrmallocator.h"
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <sys/mman.h>
-+#include <sys/types.h>
-+
-+#define INVALID_DRM_FD (-1)
-+
-+GST_DEBUG_CATEGORY (drmallocator_debug);
-+#define GST_CAT_DEFAULT drmallocator_debug
-+
-+#define gst_drm_allocator_parent_class parent_class
-+G_DEFINE_TYPE (GstDRMAllocator, gst_drm_allocator, GST_TYPE_FD_ALLOCATOR);
-+
-+static GstMemory *
-+gst_drm_allocator_alloc (GstAllocator * allocator, gsize size,
-+ GstAllocationParams * params)
-+{
-+ GstDRMAllocator *self = GST_DRM_ALLOCATOR (allocator);
-+ int fd = -1;
-+ int DrmDeviceFD = self->DrmDeviceFD;
-+ GstMemory *mem;
-+ /* Variable for DRM Dumb Buffers */
-+
-+ struct drm_mode_create_dumb creq;
-+ struct drm_mode_destroy_dumb dreq;
-+ int ret ;
-+
-+ GST_LOG_OBJECT (self, "DRM Memory alloc");
-+
-+ memset(&creq, 0, sizeof(struct drm_mode_create_dumb));
-+ /*
-+ We have only total size as argument to _allocator_alloc.
-+ Since the DDR storage is linear, it is as good as saying
-+ the buffer is of width = size and height = 1
-+ */
-+ creq.width = size;
-+ creq.height = 1;
-+ creq.bpp = 8;
-+
-+ /* Create a DRM dumb buffer */
-+ ret = drmIoctl (DrmDeviceFD, DRM_IOCTL_MODE_CREATE_DUMB, &creq);
-+ if (ret < 0) {
-+ GST_ERROR_OBJECT (self, "Create DRM dumb buffer failed");
-+ return NULL;
-+ }
-+ /* Get a dmabuf fd from the dumb buffer handle */
-+ drmPrimeHandleToFD (DrmDeviceFD, creq.handle, DRM_CLOEXEC | O_RDWR, &fd);
-+
-+ if (fd < 0) {
-+ GST_ERROR_OBJECT (self, "Invalid fd returned: %d", fd);
-+ goto fail;
-+ }
-+
-+ /* Get a dmabuf gstmemory with the fd */
-+ mem = gst_fd_allocator_alloc (allocator, fd, size, 0);
-+
-+ if (G_UNLIKELY (!mem)) {
-+ GST_ERROR_OBJECT (self, "GstDmaBufMemory allocation failed");
-+ close (fd);
-+ goto fail;
-+ }
-+
-+ return mem;
-+
-+ fail:
-+ memset(&dreq, 0, sizeof(struct drm_mode_destroy_dumb));
-+ dreq.handle = creq.handle;
-+ drmIoctl (DrmDeviceFD, DRM_IOCTL_MODE_DESTROY_DUMB, &dreq);
-+ return NULL;
-+}
-+
-+static void
-+gst_drm_allocator_free (GstAllocator * allocator, GstMemory * mem)
-+{
-+ GstDRMAllocator *self = GST_DRM_ALLOCATOR (allocator);
-+ uint32_t handle = 0;
-+ int DrmDeviceFD = self->DrmDeviceFD;
-+ int fd = -1;
-+
-+ GST_LOG_OBJECT (self, "DRM Memory free");
-+
-+ g_return_if_fail (GST_IS_ALLOCATOR (allocator));
-+ g_return_if_fail (mem != NULL);
-+ g_return_if_fail (gst_is_drm_memory (mem));
-+
-+ fd = gst_fd_memory_get_fd (mem);
-+ drmPrimeFDToHandle(DrmDeviceFD, fd, &handle);
-+
-+ /* Incase there are some mapped memory, we unmap and ready it to be cleaned*/
-+ GST_ALLOCATOR_CLASS (parent_class)->free (allocator, mem);
-+
-+ if (handle) {
-+ struct drm_mode_destroy_dumb dreq;
-+ memset(&dreq, 0, sizeof(struct drm_mode_destroy_dumb));
-+ dreq.handle = handle;
-+ drmIoctl (DrmDeviceFD, DRM_IOCTL_MODE_DESTROY_DUMB, &dreq);
-+ }
-+
-+ close (fd);
-+}
-+
-+static void
-+gst_drm_allocator_finalize (GObject * obj)
-+{
-+ GstDRMAllocator *self = GST_DRM_ALLOCATOR (obj);
-+ GST_LOG_OBJECT (obj, "DRM Allocator finalize");
-+
-+ close (self->DrmDeviceFD);
-+ self->DrmDeviceFD = INVALID_DRM_FD;
-+
-+ G_OBJECT_CLASS (parent_class)->finalize (obj);
-+}
-+
-+static void
-+gst_drm_allocator_class_init (GstDRMAllocatorClass * klass)
-+{
-+ GstAllocatorClass *drm_alloc = (GstAllocatorClass *) klass;
-+
-+ drm_alloc->alloc = GST_DEBUG_FUNCPTR (gst_drm_allocator_alloc);
-+ drm_alloc->free = GST_DEBUG_FUNCPTR (gst_drm_allocator_free);
-+ GST_DEBUG_CATEGORY_INIT (drmallocator_debug, "drmallocator", 0,
-+ "GstDRMAllocator debug");
-+
-+}
-+
-+static void
-+gst_drm_allocator_init (GstDRMAllocator * self)
-+{
-+ GstAllocator *alloc = GST_ALLOCATOR_CAST (self);
-+ GObjectClass *object_class = G_OBJECT_CLASS (GST_DRM_ALLOCATOR_GET_CLASS(self));
-+
-+ if (self->DrmDeviceFD <= 0) {
-+ self->DrmDeviceFD = open("/dev/dri/card0", O_RDWR | O_CLOEXEC);
-+ if (self->DrmDeviceFD < 0) {
-+ GST_ERROR_OBJECT (self, "Failed to open DRM device");
-+ } else {
-+ drmDropMaster (self->DrmDeviceFD);
-+ }
-+ }
-+
-+ alloc->mem_type = GST_ALLOCATOR_DMABUF;
-+
-+ object_class->finalize = gst_drm_allocator_finalize;
-+
-+ GST_OBJECT_FLAG_UNSET (self, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
-+}
-+
-+void
-+gst_drm_allocator_register (void)
-+{
-+ gst_allocator_register (GST_ALLOCATOR_DRM,
-+ g_object_new (GST_TYPE_DRM_ALLOCATOR, NULL));
-+}
-+
-+GstAllocator *
-+gst_drm_allocator_get (void)
-+{
-+ GstAllocator *alloc;
-+ alloc = gst_allocator_find (GST_ALLOCATOR_DRM);
-+ if (!alloc) {
-+ gst_drm_allocator_register();
-+ alloc = gst_allocator_find (GST_ALLOCATOR_DRM);
-+ }
-+ return alloc;
-+}
-+
-+gboolean
-+gst_is_drm_memory (GstMemory * mem)
-+{
-+ return gst_memory_is_type (mem, GST_ALLOCATOR_DMABUF);
-+}
-diff --git a/gst-libs/gst/drm/gstdrmallocator.h b/gst-libs/gst/drm/gstdrmallocator.h
-new file mode 100644
-index 0000000..1ca93ba
---- /dev/null
-+++ b/gst-libs/gst/drm/gstdrmallocator.h
-@@ -0,0 +1,77 @@
-+/*
-+ * GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ *
-+ * Authors:
-+ * Pooja Prajod <poojaprajod@ti.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation
-+ * version 2.1 of the License.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * SECTION:GstDRMAllocator
-+ * @short_description: GStreamer DRM allocator support
-+ *
-+ * Since: 1.6.3
-+ */
-+
-+#ifndef __GSTDRMALLOCATOR_H__
-+#define __GSTDRMALLOCATOR_H__
-+
-+#include <gst/gst.h>
-+#include <gst/video/video.h>
-+#include <gst/allocators/allocators.h>
-+#include <stdint.h>
-+
-+#include <xf86drm.h>
-+#include <xf86drmMode.h>
-+#include <fcntl.h>
-+
-+G_BEGIN_DECLS
-+
-+#define GST_TYPE_DRM_ALLOCATOR (gst_drm_allocator_get_type ())
-+#define GST_DRM_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DRM_ALLOCATOR, GstDRMAllocator))
-+#define GST_IS_DRM_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DRM_ALLOCATOR))
-+#define GST_DRM_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DRM_ALLOCATOR, GstDRMAllocatorClass))
-+#define GST_IS_DRM_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DRM_ALLOCATOR))
-+#define GST_DRM_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DRM_ALLOCATOR, GstDRMAllocatorClass))
-+
-+#define GST_ALLOCATOR_DRM "DRM"
-+
-+typedef struct _GstDRMAllocator GstDRMAllocator;
-+typedef struct _GstDRMAllocatorClass GstDRMAllocatorClass;
-+
-+struct _GstDRMAllocator
-+{
-+ GstFdAllocator parent;
-+ int DrmDeviceFD;
-+};
-+
-+struct _GstDRMAllocatorClass
-+{
-+ GstFdAllocatorClass parent_class;
-+};
-+
-+void gst_drm_allocator_register (void);
-+GstAllocator * gst_drm_allocator_get (void);
-+
-+gboolean gst_is_drm_memory (GstMemory * mem);
-+
-+GType gst_drm_allocator_get_type (void);
-+
-+G_END_DECLS
-+
-+#endif /* __GSTDRMALLOCATOR_H__ */
-diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am
-index 88c7e52..5fdccbf 100644
---- a/pkgconfig/Makefile.am
-+++ b/pkgconfig/Makefile.am
-@@ -2,6 +2,7 @@
- ### all of the standard pc files we need to generate
- pcverfiles = \
- gstreamer-plugins-bad-@GST_API_VERSION@.pc \
-+ gstreamer-drm-@GST_API_VERSION@.pc \
- gstreamer-codecparsers-@GST_API_VERSION@.pc \
- gstreamer-insertbin-@GST_API_VERSION@.pc \
- gstreamer-mpegts-@GST_API_VERSION@.pc \
-@@ -12,6 +13,7 @@ pcverfiles = \
-
- pcverfiles_uninstalled = \
- gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \
-+ gstreamer-drm-@GST_API_VERSION@-uninstalled.pc \
- gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \
- gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \
- gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc \
-@@ -43,6 +45,7 @@ pkgconfig_DATA = $(pcverfiles)
- CLEANFILES = $(pcverfiles) $(pcverfiles_uninstalled)
- pcinfiles = \
- gstreamer-plugins-bad.pc.in gstreamer-plugins-bad-uninstalled.pc.in \
-+ gstreamer-drm.pc.in gstreamer-drm-uninstalled.pc.in \
- gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \
- gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
- gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \
-diff --git a/pkgconfig/gstreamer-drm-uninstalled.pc.in b/pkgconfig/gstreamer-drm-uninstalled.pc.in
-new file mode 100644
-index 0000000..9dcf978
---- /dev/null
-+++ b/pkgconfig/gstreamer-drm-uninstalled.pc.in
-@@ -0,0 +1,11 @@
-+prefix=
-+exec_prefix=
-+libdir=${pcfiledir}/../gst-libs/gst/drm
-+includedir=${pcfiledir}/../gst-libs
-+
-+Name: GStreamer DRM Allocator, Uninstalled
-+Description: DRM Allocator for GStreamer elements, uninstalled
-+Requires: gstreamer-@GST_MAJORMINOR@ gstreamer-base-@GST_MAJORMINOR@
-+Version: @VERSION@
-+Libs: -L${libdir} ${libdir}/libgstdrm-@GST_MAJORMINOR@.la
-+Cflags: -I${includedir}
-diff --git a/pkgconfig/gstreamer-drm.pc.in b/pkgconfig/gstreamer-drm.pc.in
-new file mode 100644
-index 0000000..d155e80
---- /dev/null
-+++ b/pkgconfig/gstreamer-drm.pc.in
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@/gstreamer-@GST_MAJORMINOR@
-+
-+Name: GStreamer DRM Allocator
-+Description: DRM Allocator for GStreamer elements
-+Requires: gstreamer-@GST_MAJORMINOR@ gstreamer-base-@GST_MAJORMINOR@
-+Version: @VERSION@
-+Libs: -L${libdir} -lgstdrm-@GST_MAJORMINOR@
-+Cflags: -I${includedir}
-+
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch
deleted file mode 100644
index 696202637..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-Add-mouse-drag-and-drop-support.patch
+++ /dev/null
@@ -1,408 +0,0 @@
-From 79db7e4cab226515f0e4d40afdb5a5b478755396 Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Wed, 14 Sep 2016 16:03:17 -0400
-Subject: [PATCH] gstwaylandsink: Add mouse drag and drop support
-
-This patch adds mouse input listeners to WlDisplay instance.
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
----
- ext/wayland/wldisplay.c | 305 +++++++++++++++++++++++++++++++++++++++++++++++-
- ext/wayland/wldisplay.h | 4 +
- ext/wayland/wlwindow.c | 2 +
- 3 files changed, 310 insertions(+), 1 deletion(-)
-
-diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
-index 8c5eeaf..c647f34 100644
---- a/ext/wayland/wldisplay.c
-+++ b/ext/wayland/wldisplay.c
-@@ -21,18 +21,45 @@
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
--
-+#include <stdlib.h>
-+#include <stdio.h>
- #include "wldisplay.h"
- #include "wlbuffer.h"
-+#include "wlwindow.h"
-+
-+#include <wayland-client-protocol.h>
-
-+#include <unistd.h>
- #include <errno.h>
-+#include <linux/input.h>
-
- GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
- #define GST_CAT_DEFAULT gstwayland_debug
-
- G_DEFINE_TYPE (GstWlDisplay, gst_wl_display, G_TYPE_OBJECT);
-
-+struct touch_point
-+{
-+ int32_t id;
-+ struct wl_list link;
-+};
-+
-+struct input
-+{
-+ GstWlDisplay *display;
-+ struct wl_seat *seat;
-+ struct wl_pointer *pointer;
-+ struct wl_touch *touch;
-+ struct wl_list touch_point_list;
-+ GstWlWindow *pointer_focus;
-+ GstWlWindow *touch_focus;
-+ struct wl_list link;
-+ GstWlWindow *grab;
-+};
-+
- static void gst_wl_display_finalize (GObject * gobject);
-+static void input_grab (struct input *input, GstWlWindow *window);
-+static void input_ungrab (struct input *input);
-
- static void
- gst_wl_display_class_init (GstWlDisplayClass * klass)
-@@ -51,6 +78,54 @@ gst_wl_display_init (GstWlDisplay * self)
- }
-
- static void
-+input_grab (struct input *input, GstWlWindow *window)
-+{
-+ input->grab = window;
-+}
-+
-+static void
-+input_ungrab (struct input *input)
-+{
-+ input->grab = NULL;
-+}
-+
-+static void
-+input_remove_pointer_focus (struct input *input)
-+{
-+ GstWlWindow *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ input->pointer_focus = NULL;
-+}
-+
-+static void
-+input_destroy (struct input *input)
-+{
-+ input_remove_pointer_focus (input);
-+
-+ if (input->display->seat_version >= 3) {
-+ if (input->pointer)
-+ wl_pointer_release (input->pointer);
-+ }
-+
-+ wl_list_remove (&input->link);
-+ wl_seat_destroy (input->seat);
-+ free (input);
-+}
-+
-+static void
-+display_destroy_inputs (GstWlDisplay *display)
-+{
-+ struct input *tmp;
-+ struct input *input;
-+
-+ wl_list_for_each_safe (input, tmp, &display->input_list, link)
-+ input_destroy (input);
-+}
-+
-+static void
- gst_wl_display_finalize (GObject * gobject)
- {
- GstWlDisplay *self = GST_WL_DISPLAY (gobject);
-@@ -74,6 +149,8 @@ gst_wl_display_finalize (GObject * gobject)
- g_hash_table_unref (self->buffers);
- g_mutex_clear (&self->buffers_mutex);
-
-+ display_destroy_inputs (self);
-+
- if (self->shm)
- wl_shm_destroy (self->shm);
-
-@@ -143,6 +220,228 @@ static const struct wl_shm_listener shm_listener = {
- shm_format
- };
-
-+
-+static void
-+pointer_handle_enter (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface,
-+ wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+
-+ if (!surface) {
-+ /* enter event for a window we've just destroyed */
-+ return;
-+ }
-+
-+ input->display->serial = serial;
-+ input->pointer_focus = wl_surface_get_user_data (surface);
-+}
-+
-+static void
-+pointer_handle_leave (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface)
-+{
-+ struct input *input = data;
-+
-+ input_remove_pointer_focus (input);
-+}
-+
-+static void
-+pointer_handle_motion (void *data, struct wl_pointer *pointer,
-+ uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+ GstWlWindow *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+
-+}
-+
-+static void
-+pointer_handle_button (void *data, struct wl_pointer *pointer, uint32_t serial,
-+ uint32_t time, uint32_t button, uint32_t state_w)
-+{
-+ struct input *input = data;
-+ enum wl_pointer_button_state state = state_w;
-+ input->display->serial = serial;
-+
-+ if (button == BTN_LEFT) {
-+ if (state == WL_POINTER_BUTTON_STATE_PRESSED)
-+ input_grab (input, input->pointer_focus);
-+
-+ if (input->grab && state == WL_POINTER_BUTTON_STATE_RELEASED)
-+ input_ungrab (input);
-+ }
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+}
-+
-+static void
-+pointer_handle_axis (void *data, struct wl_pointer *pointer,
-+ uint32_t time, uint32_t axis, wl_fixed_t value)
-+{
-+}
-+
-+static const struct wl_pointer_listener pointer_listener = {
-+ pointer_handle_enter,
-+ pointer_handle_leave,
-+ pointer_handle_motion,
-+ pointer_handle_button,
-+ pointer_handle_axis,
-+};
-+
-+static void
-+touch_handle_down (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, struct wl_surface *surface,
-+ int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+ input->display->serial = serial;
-+ input->touch_focus = wl_surface_get_user_data (surface);
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ tp = malloc (sizeof *tp);
-+ if (tp) {
-+ tp->id = id;
-+ wl_list_insert (&input->touch_point_list, &tp->link);
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ serial);
-+ }
-+}
-+
-+static void
-+touch_handle_motion (void *data, struct wl_touch *wl_touch,
-+ uint32_t time, int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+ wl_list_for_each (tp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ input->display->serial);
-+
-+ return;
-+ }
-+}
-+
-+static void
-+touch_handle_frame (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_cancel (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_up (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, int32_t id)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp, *tmp;
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ wl_list_for_each_safe (tp, tmp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_list_remove (&tp->link);
-+ free (tp);
-+
-+ return;
-+ }
-+}
-+
-+static const struct wl_touch_listener touch_listener = {
-+ touch_handle_down,
-+ touch_handle_up,
-+ touch_handle_motion,
-+ touch_handle_frame,
-+ touch_handle_cancel,
-+};
-+
-+
-+static void
-+seat_handle_capabilities (void *data, struct wl_seat *seat,
-+ enum wl_seat_capability caps)
-+{
-+ struct input *input = data;
-+
-+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) {
-+ input->pointer = wl_seat_get_pointer (seat);
-+ wl_pointer_set_user_data (input->pointer, input);
-+ wl_pointer_add_listener (input->pointer, &pointer_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && input->pointer) {
-+ wl_pointer_destroy (input->pointer);
-+ input->pointer = NULL;
-+ }
-+
-+ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) {
-+ input->touch = wl_seat_get_touch (seat);
-+ wl_touch_set_user_data (input->touch, input);
-+ wl_touch_add_listener (input->touch, &touch_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) {
-+ wl_touch_destroy (input->touch);
-+ input->touch = NULL;
-+ }
-+}
-+
-+static void
-+seat_handle_name (void *data, struct wl_seat *seat, const char *name)
-+{
-+
-+}
-+
-+static const struct wl_seat_listener seat_listener = {
-+ seat_handle_capabilities,
-+ seat_handle_name
-+};
-+
-+static void
-+display_add_input (GstWlDisplay *d, uint32_t id)
-+{
-+ struct input *input;
-+
-+ input = calloc (1, sizeof (*input));
-+ if (input == NULL) {
-+ fprintf (stderr, "%s: out of memory\n", "gst-wayland-sink");
-+ exit (EXIT_FAILURE);
-+ }
-+ input->display = d;
-+ input->seat = wl_registry_bind (d->registry, id, &wl_seat_interface,
-+ MAX (d->seat_version, 3));
-+ input->touch_focus = NULL;
-+ input->pointer_focus = NULL;
-+ wl_list_init (&input->touch_point_list);
-+ wl_list_insert (d->input_list.prev, &input->link);
-+
-+ wl_seat_add_listener (input->seat, &seat_listener, input);
-+ wl_seat_set_user_data (input->seat, input);
-+
-+}
-+
- static void
- registry_handle_global (void *data, struct wl_registry *registry,
- uint32_t id, const char *interface, uint32_t version)
-@@ -160,6 +459,9 @@ registry_handle_global (void *data, struct wl_registry *registry,
- } else if (g_strcmp0 (interface, "wl_shm") == 0) {
- self->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);
- wl_shm_add_listener (self->shm, &shm_listener, self);
-+ } else if (g_strcmp0 (interface, "wl_seat") == 0) {
-+ self->seat_version = version;
-+ display_add_input (self, id);
- } else if (g_strcmp0 (interface, "wl_scaler") == 0) {
- self->scaler = wl_registry_bind (registry, id, &wl_scaler_interface, 2);
- }
-@@ -237,6 +539,7 @@ gst_wl_display_new_existing (struct wl_display * display,
- self->own_display = take_ownership;
-
- self->queue = wl_display_create_queue (self->display);
-+ wl_list_init (&self->input_list);
- self->registry = wl_display_get_registry (self->display);
- wl_proxy_set_queue ((struct wl_proxy *) self->registry, self->queue);
- wl_registry_add_listener (self->registry, &registry_listener, self);
-diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h
-index 5505d60..d8c2cef 100644
---- a/ext/wayland/wldisplay.h
-+++ b/ext/wayland/wldisplay.h
-@@ -62,6 +62,10 @@ struct _GstWlDisplay
- GMutex buffers_mutex;
- GHashTable *buffers;
- gboolean shutting_down;
-+
-+ struct wl_list input_list;
-+ int seat_version;
-+ uint32_t serial;
- };
-
- struct _GstWlDisplayClass
-diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
-index a964335..34ae385 100644
---- a/ext/wayland/wlwindow.c
-+++ b/ext/wayland/wlwindow.c
-@@ -111,6 +111,8 @@ gst_wl_window_new_internal (GstWlDisplay * display)
-
- window->area_surface = wl_compositor_create_surface (display->compositor);
- window->video_surface = wl_compositor_create_surface (display->compositor);
-+ wl_surface_set_user_data (window->area_surface, window);
-+ wl_surface_set_user_data (window->video_surface, window);
-
- wl_proxy_set_queue ((struct wl_proxy *) window->area_surface, display->queue);
- wl_proxy_set_queue ((struct wl_proxy *) window->video_surface,
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
deleted file mode 100644
index 507f57b92..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 1364ee6e60eb09a3fe3b072fe4671c5d645e523a Mon Sep 17 00:00:00 2001
-From: Eric Ruei <e-ruei1@ti.com>
-Date: Wed, 22 Feb 2017 10:49:01 -0500
-Subject: [PATCH 1/3] gstwaylandsink: add input format I420 support
-
-The software-based video decoder produces the output in I420 format. To display
-the output without additional ARM MHz consumed in video format conversion,
-the function gst_wl_memory_construct_wl_buffer is enhanced to support I420 format.
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
----
- ext/wayland/wldrm.c | 41 ++++++++++++++++++++++++++++++++++-------
- 1 file changed, 34 insertions(+), 7 deletions(-)
-
-diff --git a/ext/wayland/wldrm.c b/ext/wayland/wldrm.c
-index 3dc9c21..ecbdc88 100644
---- a/ext/wayland/wldrm.c
-+++ b/ext/wayland/wldrm.c
-@@ -5,33 +5,60 @@
- #include <omap_drmif.h>
- #include <wayland-client.h>
-
-+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-+#define GST_CAT_DEFAULT gstwayland_debug
-+
-+
- struct wl_buffer *
- gst_wl_drm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
- const GstVideoInfo * info)
- {
- gint video_width = GST_VIDEO_INFO_WIDTH (info);
- gint video_height = GST_VIDEO_INFO_HEIGHT (info);
-+ GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
- int fd = -1;
- struct omap_bo *bo;
- struct wl_buffer *buffer;
--
-- /* TODO get format, etc from caps.. and query device for
-- * supported formats, and make this all more flexible to
-- * cope with various formats:
-- */
-- uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+ uint32_t fourcc;
- uint32_t name;
- /* note: wayland and mesa use the terminology:
- * stride - rowstride in bytes
- * pitch - rowstride in pixels
- */
- uint32_t strides[3] = {
-- GST_ROUND_UP_4 (video_width), GST_ROUND_UP_4 (video_width), 0,
-+ GST_ROUND_UP_4 (video_width), 0, 0,
- };
- uint32_t offsets[3] = {
- 0, strides[0] * video_height, 0
- };
-
-+ if (format == GST_VIDEO_FORMAT_NV12)
-+ {
-+ /* NV12 */
-+ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+ strides[1] = GST_ROUND_UP_4 (video_width);
-+ }
-+ else if(format == GST_VIDEO_FORMAT_I420)
-+ {
-+ /* YUV420 */
-+ fourcc = GST_MAKE_FOURCC ('Y', 'U', '1', '2');
-+ strides[1] = strides[2] = GST_ROUND_UP_4 (video_width/2);
-+ offsets[2] = offsets[1] + strides[1] * video_height/2;
-+ }
-+ else
-+ {
-+
-+ GST_DEBUG ("Unsupported video format: %d", format);
-+ /*
-+ * There are two xRGB frames with width and height = 1 required in the begining of a video stream.
-+ * If we consider them as errot, then it will case libwayland-clent.so crashes
-+ * due to invalid error handling.
-+ * Consider them as NV12 until we can figure out a better solution
-+ */
-+ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+ strides[1] = GST_ROUND_UP_4 (video_width);
-+ }
-+
- fd = gst_fd_memory_get_fd (mem);
-
- if (fd < 0 ) {
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
deleted file mode 100644
index 308a84959..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-remove-DCE-dependencies.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 68936c7fb864440bb4d2ab737a651888ac7c253a Mon Sep 17 00:00:00 2001
-From: Eric Ruei <e-ruei1@ti.com>
-Date: Fri, 17 Mar 2017 10:42:32 -0400
-Subject: [PATCH 2/3] kmssink: remove DCE dependencies
-
-Replace DCE related API calls to libdrm and omapdrm API calls
-to decouple DCE from kmssink
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
----
- configure.ac | 1 -
- sys/kms/Makefile.am | 2 --
- sys/kms/gstkmssink.c | 17 +++++++++++++----
- 3 files changed, 13 insertions(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f93d52d..a6f93a5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2321,7 +2321,6 @@ dnl *** kms ***
- translit(dnm, m, l) AM_CONDITIONAL(USE_KMS, true)
- AG_GST_CHECK_FEATURE(KMS, [kmssink], kms, [
- PKG_CHECK_MODULES([DRM], [libdrm libdrm_omap], HAVE_KMS=yes, HAVE_KMS=no)
--PKG_CHECK_MODULES(LIBDCE, [libdce >= 1.0.0], HAVE_KMS=yes, HAVE_KMS=no)
- AC_SUBST(DRM_CFLAGS)
- AC_SUBST(DRM_LIBS)
- ])
-diff --git a/sys/kms/Makefile.am b/sys/kms/Makefile.am
-index 6d56073..cc7353e 100644
---- a/sys/kms/Makefile.am
-+++ b/sys/kms/Makefile.am
-@@ -9,7 +9,6 @@ libgstkmssink_la_CFLAGS = \
- $(GST_PLUGINS_BAD_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS) \
- $(GST_BASE_CFLAGS) \
-- $(LIBDCE_CFLAGS) \
- $(GST_CFLAGS) \
- $(DRM_CFLAGS)
-
-@@ -17,7 +16,6 @@ libgstkmssink_la_LIBADD = \
- $(GST_PLUGINS_BASE_LIBS) \
- $(GST_BASE_LIBS) \
- $(GST_LIBS) \
-- $(LIBDCE_LIBS) \
- $(DRM_LIBS) \
- -lgstvideo-$(GST_API_VERSION) \
- $(top_builddir)/gst-libs/gst/drm/libgstdrm-$(GST_API_VERSION).la
-diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
-index 17e6407..9795bdf 100644
---- a/sys/kms/gstkmssink.c
-+++ b/sys/kms/gstkmssink.c
-@@ -31,7 +31,6 @@
- #include "gstkmssink.h"
- #include "gstkmsbufferpriv.h"
-
--#include <libdce.h>
- #include <omap_drm.h>
- #include <omap_drmif.h>
- #include <xf86drmMode.h>
-@@ -516,13 +515,18 @@ gst_kms_sink_start (GstBaseSink * bsink)
-
- sink = GST_KMS_SINK (bsink);
-
-- drm_dev = dce_init ();
-+ drm_fd = open("/dev/dri/card0", O_RDWR | O_CLOEXEC);
-+ if(drm_fd == NULL)
-+ goto drm_failed;
-+ else {
-+ drm_dev = omap_device_new(drm_fd);
-+ }
-+
- if (drm_dev == NULL)
- goto device_failed;
- else {
-+ sink->fd = drm_fd;
- sink->dev = drm_dev;
-- sink->fd = dce_get_fd ();
-- drm_fd = dce_get_fd ();
- }
-
- sink->resources = drmModeGetResources (sink->fd);
-@@ -539,6 +543,11 @@ fail:
- gst_kms_sink_reset (sink);
- return FALSE;
-
-+drm_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("drmOpen failed"));
-+ goto fail;
-+
- device_failed:
- GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
- (NULL), ("omap_device_new failed"));
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-parsers-Pick-previos-bug-fixes-on-different-parsers.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-parsers-Pick-previos-bug-fixes-on-different-parsers.patch
deleted file mode 100644
index 707cfc2b7..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0002-parsers-Pick-previos-bug-fixes-on-different-parsers.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From c748e947ff35c4137178aef9bf229e0c67952982 Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Fri, 20 Jan 2017 14:57:29 +0530
-Subject: [PATCH 2/5] parsers: Pick previos bug fixes on different parsers
-
-The following bug fixes which were previously identified are picked :
-1. Increase rank for vc1parse and jpegparse
-2. Modify h264 and mpeg4 parsers to interpolate pts
-3. Fix create() width and height calculation on h264parse
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- gst/jpegformat/gstjpegformat.c | 2 +-
- gst/jpegformat/gstjpegparse.c | 2 +-
- gst/videoparsers/gsth264parse.c | 22 +++++++---------------
- gst/videoparsers/gstmpeg4videoparse.c | 2 +-
- gst/videoparsers/gstmpegvideoparse.c | 2 +-
- gst/videoparsers/plugin.c | 2 +-
- 6 files changed, 12 insertions(+), 20 deletions(-)
-
-diff --git a/gst/jpegformat/gstjpegformat.c b/gst/jpegformat/gstjpegformat.c
-index b410466..ecb9311 100644
---- a/gst/jpegformat/gstjpegformat.c
-+++ b/gst/jpegformat/gstjpegformat.c
-@@ -30,7 +30,7 @@
- static gboolean
- plugin_init (GstPlugin * plugin)
- {
-- if (!gst_element_register (plugin, "jpegparse", GST_RANK_NONE,
-+ if (!gst_element_register (plugin, "jpegparse", GST_RANK_PRIMARY + 2,
- GST_TYPE_JPEG_PARSE))
- return FALSE;
- if (!gst_element_register (plugin, "jifmux", GST_RANK_SECONDARY,
-diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c
-index 77e53a6..5bfba7b 100644
---- a/gst/jpegformat/gstjpegparse.c
-+++ b/gst/jpegformat/gstjpegparse.c
-@@ -151,7 +151,7 @@ gst_jpeg_parse_class_init (GstJpegParseClass * klass)
-
- gst_element_class_set_static_metadata (gstelement_class,
- "JPEG stream parser",
-- "Video/Parser",
-+ "Codec/Parser/Video",
- "Parse JPEG images into single-frame buffers",
- "Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>");
-
-diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
-index 05b6b75..6fe2914 100644
---- a/gst/videoparsers/gsth264parse.c
-+++ b/gst/videoparsers/gsth264parse.c
-@@ -162,7 +162,7 @@ static void
- gst_h264_parse_init (GstH264Parse * h264parse)
- {
- h264parse->frame_out = gst_adapter_new ();
-- gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h264parse), FALSE);
-+ gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h264parse), TRUE);
- GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h264parse));
- GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h264parse));
- }
-@@ -1722,13 +1722,8 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
- gint fps_num, fps_den;
- gint par_n, par_d;
-
-- if (sps->frame_cropping_flag) {
-- crop_width = sps->crop_rect_width;
-- crop_height = sps->crop_rect_height;
-- } else {
-- crop_width = sps->width;
-- crop_height = sps->height;
-- }
-+ crop_width = (sps->crop_rect_width > sps->width)? sps->crop_rect_width: sps->width;
-+ crop_height = (sps->crop_rect_height > sps->height)? sps->crop_rect_height: sps->height;
-
- if (G_UNLIKELY (h264parse->width != crop_width ||
- h264parse->height != crop_height)) {
-@@ -1762,7 +1757,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
- }
-
- if (G_UNLIKELY (modified || h264parse->update_caps)) {
-- gint width, height;
-+ gint width=0, height=0;
- GstClockTime latency;
-
- const gchar *caps_mview_mode = NULL;
-@@ -1774,16 +1769,13 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
-
- caps = gst_caps_copy (sink_caps);
-
-- /* sps should give this but upstream overrides */
- if (s && gst_structure_has_field (s, "width"))
- gst_structure_get_int (s, "width", &width);
-- else
-- width = h264parse->width;
--
-+ width = (width > h264parse->width)? width: h264parse->width;
-+
- if (s && gst_structure_has_field (s, "height"))
- gst_structure_get_int (s, "height", &height);
-- else
-- height = h264parse->height;
-+ height = (height > h264parse->height)? height: h264parse->height;
-
- if (s == NULL ||
- !gst_structure_get_fraction (s, "pixel-aspect-ratio", &par_n,
-diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c
-index a1fd3b2..7912254 100644
---- a/gst/videoparsers/gstmpeg4videoparse.c
-+++ b/gst/videoparsers/gstmpeg4videoparse.c
-@@ -185,7 +185,7 @@ gst_mpeg4vparse_init (GstMpeg4VParse * parse)
- parse->interval = DEFAULT_CONFIG_INTERVAL;
- parse->last_report = GST_CLOCK_TIME_NONE;
-
-- gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE);
-+ gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), TRUE);
- GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse));
- GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (parse));
- }
-diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c
-index bf71a3e..f203cca 100644
---- a/gst/videoparsers/gstmpegvideoparse.c
-+++ b/gst/videoparsers/gstmpegvideoparse.c
-@@ -175,7 +175,7 @@ gst_mpegv_parse_init (GstMpegvParse * parse)
- {
- parse->config_flags = FLAG_NONE;
-
-- gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE);
-+ gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), TRUE);
- GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse));
- GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (parse));
- }
-diff --git a/gst/videoparsers/plugin.c b/gst/videoparsers/plugin.c
-index 79d1df6..fb866b5 100644
---- a/gst/videoparsers/plugin.c
-+++ b/gst/videoparsers/plugin.c
-@@ -51,7 +51,7 @@ plugin_init (GstPlugin * plugin)
- ret |= gst_element_register (plugin, "h265parse",
- GST_RANK_SECONDARY, GST_TYPE_H265_PARSE);
- ret |= gst_element_register (plugin, "vc1parse",
-- GST_RANK_NONE, GST_TYPE_VC1_PARSE);
-+ GST_RANK_PRIMARY + 2, GST_TYPE_VC1_PARSE);
-
- return ret;
- }
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-gstkmssink-Add-support-for-KMS-based-sink.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-gstkmssink-Add-support-for-KMS-based-sink.patch
deleted file mode 100644
index 1068fda2c..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-gstkmssink-Add-support-for-KMS-based-sink.patch
+++ /dev/null
@@ -1,1592 +0,0 @@
-From 44ba6f9839a410e981c9c941f099316ebfac2659 Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Fri, 20 Jan 2017 16:18:22 +0530
-Subject: [PATCH 3/5] gstkmssink: Add support for KMS based sink
-
-The following features are enabled:
-1. Add support for kmssink
-2. Fix memory leak by using API's that do not hold
- reference to GstMemory
-3. Restrict the number of buffers that will be allocated
- by kmssink bufferpool
-4. Use Atomic mode setting instead of SetPlane
-5. Store encoder and plane data as static data to enable
- same process looping usecase
-6. Handle usecase where display is disabled by default
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- configure.ac | 14 +
- sys/Makefile.am | 10 +-
- sys/kms/Makefile.am | 28 ++
- sys/kms/gstdrmutils.c | 347 +++++++++++++++++++++
- sys/kms/gstdrmutils.h | 50 +++
- sys/kms/gstkmsbufferpriv.c | 121 ++++++++
- sys/kms/gstkmsbufferpriv.h | 64 ++++
- sys/kms/gstkmssink.c | 740 +++++++++++++++++++++++++++++++++++++++++++++
- sys/kms/gstkmssink.h | 92 ++++++
- 9 files changed, 1464 insertions(+), 2 deletions(-)
- create mode 100644 sys/kms/Makefile.am
- create mode 100644 sys/kms/gstdrmutils.c
- create mode 100644 sys/kms/gstdrmutils.h
- create mode 100644 sys/kms/gstkmsbufferpriv.c
- create mode 100644 sys/kms/gstkmsbufferpriv.h
- create mode 100644 sys/kms/gstkmssink.c
- create mode 100644 sys/kms/gstkmssink.h
-
-diff --git a/configure.ac b/configure.ac
-index e254605..9fdfbc7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2324,6 +2324,18 @@ AG_GST_CHECK_FEATURE(KATE, [Kate], kate, [
- AC_SUBST(TIGER_LIBS)
- ],,,[AM_CONDITIONAL(USE_TIGER, false)])
-
-+
-+
-+dnl *** kms ***
-+translit(dnm, m, l) AM_CONDITIONAL(USE_KMS, true)
-+AG_GST_CHECK_FEATURE(KMS, [kmssink], kms, [
-+PKG_CHECK_MODULES([DRM], [libdrm libdrm_omap], HAVE_KMS=yes, HAVE_KMS=no)
-+PKG_CHECK_MODULES(LIBDCE, [libdce >= 1.0.0], HAVE_KMS=yes, HAVE_KMS=no)
-+AC_SUBST(DRM_CFLAGS)
-+AC_SUBST(DRM_LIBS)
-+])
-+
-+
- dnl *** ladspa ***
- translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true)
- AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
-@@ -3383,6 +3395,7 @@ AM_CONDITIONAL(USE_GTK3_GL, false)
- AM_CONDITIONAL(USE_HLS, false)
- AM_CONDITIONAL(USE_KATE, false)
- AM_CONDITIONAL(USE_TIGER, false)
-+AM_CONDITIONAL(USE_KMS, false)
- AM_CONDITIONAL(USE_LADSPA, false)
- AM_CONDITIONAL(USE_LV2, false)
- AM_CONDITIONAL(USE_LIBDE265, false)
-@@ -3632,6 +3645,7 @@ sys/fbdev/Makefile
- sys/linsys/Makefile
- sys/nvenc/Makefile
- sys/opensles/Makefile
-+sys/kms/Makefile
- sys/shm/Makefile
- sys/tinyalsa/Makefile
- sys/uvch264/Makefile
-diff --git a/sys/Makefile.am b/sys/Makefile.am
-index 32f79fb..325b4af 100644
---- a/sys/Makefile.am
-+++ b/sys/Makefile.am
-@@ -87,6 +87,12 @@ PVR_DIR=pvr2d
- else
- PVR_DIR=
- endif
-+
-+if USE_KMS
-+KMS_DIR=kms
-+else
-+KMS_DIR=
-+endif
-
- if USE_SHM
- SHM_DIR=shm
-@@ -148,10 +154,10 @@ else
- TINYALSA_DIR=
- endif
-
--SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(NVENC_DIR) $(TINYALSA_DIR)
-+SUBDIRS = $(ACM_DIR) $(ANDROID_MEDIA_DIR) $(APPLE_MEDIA_DIR) $(AVC_DIR) $(BLUEZ_DIR) $(D3DVIDEOSINK_DIR) $(DECKLINK_DIR) $(DIRECTSOUND_DIR) $(WINKS_DIR) $(DVB_DIR) $(FBDEV_DIR) $(LINSYS_DIR) $(OPENSLES_DIR) $(PVR_DIR) $(KMS_DIR) $(SHM_DIR) $(UVCH264_DIR) $(VCD_DIR) $(VDPAU_DIR) $(WININET_DIR) $(WINSCREENCAP_DIR) $(WASAPI_DIR) $(NVENC_DIR) $(TINYALSA_DIR)
-
- DIST_SUBDIRS = acmenc acmmp3dec androidmedia applemedia applemedia-nonpublic avc bluez d3dvideosink decklink directsound dvb linsys fbdev dshowdecwrapper dshowsrcwrapper dshowvideosink \
-- opensles pvr2d shm uvch264 vcd vdpau wasapi wininet winks winscreencap \
-+ opensles pvr2d kms shm uvch264 vcd vdpau wasapi wininet winks winscreencap \
- nvenc tinyalsa
-
- include $(top_srcdir)/common/parallel-subdirs.mak
-diff --git a/sys/kms/Makefile.am b/sys/kms/Makefile.am
-new file mode 100644
-index 0000000..6d56073
---- /dev/null
-+++ b/sys/kms/Makefile.am
-@@ -0,0 +1,28 @@
-+plugin_LTLIBRARIES = libgstkmssink.la
-+
-+libgstkmssink_la_SOURCES = \
-+ gstkmssink.c \
-+ gstkmsbufferpriv.c \
-+ gstdrmutils.c
-+
-+libgstkmssink_la_CFLAGS = \
-+ $(GST_PLUGINS_BAD_CFLAGS) \
-+ $(GST_PLUGINS_BASE_CFLAGS) \
-+ $(GST_BASE_CFLAGS) \
-+ $(LIBDCE_CFLAGS) \
-+ $(GST_CFLAGS) \
-+ $(DRM_CFLAGS)
-+
-+libgstkmssink_la_LIBADD = \
-+ $(GST_PLUGINS_BASE_LIBS) \
-+ $(GST_BASE_LIBS) \
-+ $(GST_LIBS) \
-+ $(LIBDCE_LIBS) \
-+ $(DRM_LIBS) \
-+ -lgstvideo-$(GST_API_VERSION) \
-+ $(top_builddir)/gst-libs/gst/drm/libgstdrm-$(GST_API_VERSION).la
-+
-+libgstkmssink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-+libgstkmssink_la_LIBTOOLFLAGS = --tag=disable-static
-+
-+noinst_HEADERS = gstkmssink.h gstdrmutils.h gstkmsbufferpriv.h
-diff --git a/sys/kms/gstdrmutils.c b/sys/kms/gstdrmutils.c
-new file mode 100644
-index 0000000..0e67a48
---- /dev/null
-+++ b/sys/kms/gstdrmutils.c
-@@ -0,0 +1,347 @@
-+/* GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ * Copyright (C) 2012 Collabora Ltd
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ *
-+ * 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.
-+ */
-+
-+#include <gst/gst.h>
-+#include "gstdrmutils.h"
-+
-+static int stored_enc = 0;
-+static drmModeEncoder *enc;
-+static struct plane_data *stored_plane;
-+
-+GST_DEBUG_CATEGORY_EXTERN (gst_debug_kms_sink);
-+#define GST_CAT_DEFAULT gst_debug_kms_sink
-+
-+void
-+gst_drm_connector_cleanup (int fd, struct connector *c)
-+{
-+ if (c->connector) {
-+ drmModeFreeConnector (c->connector);
-+ c->connector = NULL;
-+ }
-+
-+ if (c->fb_id) {
-+ drmModeRmFB (fd, c->fb_id);
-+ c->fb_id = 0;
-+ }
-+ if (c->fb_bo) {
-+ omap_bo_del (c->fb_bo);
-+ c->fb_bo = NULL;
-+ }
-+}
-+
-+
-+static gboolean
-+gst_drm_connector_find_mode_and_plane_helper (int fd,
-+ struct omap_device *dev, int width, int height,
-+ drmModeRes * resources, drmModePlaneRes * plane_resources,
-+ struct connector *c)
-+{
-+ int i, best_area = 0, ret;
-+ struct drm_set_client_cap req;
-+ unsigned int j;
-+ int32_t crtc;
-+
-+ gst_drm_connector_cleanup (fd, c);
-+
-+ req.capability = DRM_CLIENT_CAP_ATOMIC;
-+ req.value = 1;
-+ ret = ioctl(fd, DRM_IOCTL_SET_CLIENT_CAP, &req);
-+ if(ret < 0) {
-+ GST_DEBUG("drm set atomic cap failed");
-+ goto fail;
-+ }
-+
-+ /* First, find the connector & mode */
-+ c->connector = drmModeGetConnector (fd, c->id);
-+ if (!c->connector)
-+ goto error_no_connector;
-+
-+ if (!c->connector->count_modes)
-+ goto error_no_mode;
-+
-+ /* just look for the highest resolution: */
-+ for (i = 0; i < c->connector->count_modes; i++) {
-+ drmModeModeInfo *mode = &c->connector->modes[i];
-+ int area = mode->hdisplay * mode->vdisplay;
-+
-+ if (area > best_area) {
-+ c->mode = mode;
-+ best_area = area;
-+ }
-+ }
-+
-+ if (c->mode == NULL) {
-+ /* XXX: just pick the first available mode. Not sure this is correct... */
-+ c->mode = &c->connector->modes[0];
-+#if 0
-+ goto error_no_mode;
-+#endif
-+ }
-+
-+ /* Now get the encoder */
-+
-+ if (stored_enc) {
-+ c->encoder = enc;
-+ c->connector->encoder_id = stored_enc;
-+ } else {
-+ c->encoder = drmModeGetEncoder (fd, c->connector->encoder_id);
-+ enc = c->encoder;
-+ stored_enc = c->connector->encoder_id;
-+ }
-+
-+ if (!c->encoder) {
-+ for (i = 0; i < c->connector->count_encoders; ++i) {
-+ c->encoder = drmModeGetEncoder(fd, c->connector->encoders[i]);
-+ if (!c->encoder) {
-+ GST_DEBUG ("Cannot retrieve encoder %u:%u (%d): %m\n",
-+ i, c->connector->encoders[i], errno);
-+ continue;
-+ }
-+ /* iterate all global CRTCs */
-+ for (j = 0; j < resources->count_crtcs; ++j) {
-+ /* check whether this CRTC works with the encoder */
-+ if (!(c->encoder->possible_crtcs & (1 << j)))
-+ continue;
-+ crtc = resources->crtcs[j];
-+ break;
-+ }
-+ if (crtc >= 0) {
-+ enc = c->encoder;
-+ stored_enc = c->connector->encoder_id;
-+ c->crtc = crtc;
-+ goto found_encoder;
-+ }
-+ }
-+ }
-+
-+found_encoder:
-+
-+ if (!c->encoder)
-+ goto error_no_encoder;
-+
-+ if (c->crtc == -1)
-+ c->crtc = c->encoder->crtc_id;
-+
-+ /* and figure out which crtc index it is: */
-+ c->pipe = -1;
-+ for (i = 0; i < resources->count_crtcs; i++) {
-+ if (c->crtc == (int) resources->crtcs[i]) {
-+ c->pipe = i;
-+ break;
-+ }
-+ }
-+
-+ if (c->pipe == -1)
-+ goto error_no_crtc;
-+
-+ if (stored_plane) {
-+ c->pdata = stored_plane;
-+ } else {
-+
-+ c->pdata = calloc(sizeof(struct plane_data), 1);
-+ for (i = 0; i < plane_resources->count_planes; i++) {
-+ drmModePlane *plane = drmModeGetPlane (fd, plane_resources->planes[i]);
-+ int propc;
-+ if (plane->possible_crtcs & (1 << c->pipe)) {
-+ drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(fd, plane_resources->planes[i], DRM_MODE_OBJECT_PLANE);
-+ for(propc = 0; propc < props->count_props; propc++) {
-+ drmModePropertyPtr prop = drmModeGetProperty(fd, props->props[propc]);
-+ if(strcmp(prop->name, "FB_ID") == 0)
-+ c->pdata[0].fb_id_property = props->props[propc];
-+ }
-+ c->pdata[0].plane = plane_resources->planes[i];
-+ stored_plane = c->pdata;
-+ break;
-+ }
-+ }
-+ if (stored_plane == NULL)
-+ goto error_no_plane;
-+ }
-+ c->fb_bo = omap_bo_new (dev, best_area * 2, OMAP_BO_WC);
-+ if (c->fb_bo) {
-+ uint32_t fourcc = DRM_FORMAT_RGB565;
-+ uint32_t handles[4] = { omap_bo_handle (c->fb_bo) };
-+ uint32_t pitches[4] = { c->mode->hdisplay * 2 };
-+ uint32_t offsets[4] = { 0 };
-+ ret = drmModeAddFB2 (fd, c->mode->hdisplay, c->mode->vdisplay,
-+ fourcc, handles, pitches, offsets, &c->fb_id, 0);
-+ if (ret) {
-+ GST_DEBUG ("RGB565 AddFb2 failed");
-+ }
-+ }
-+
-+ /* now set the desired mode: */
-+ ret = drmModeSetCrtc (fd, c->crtc, c->fb_id, 0, 0, &c->id, 1, c->mode);
-+ if (ret) {
-+ GST_DEBUG ("SetCrtc failed");
-+ }
-+
-+ return TRUE;
-+
-+fail:
-+ gst_drm_connector_cleanup (fd, c);
-+
-+ return FALSE;
-+
-+error_no_connector:
-+ GST_DEBUG ("could not get connector %s", strerror (errno));
-+ goto fail;
-+
-+error_no_mode:
-+ GST_DEBUG ("could not find mode %dx%d (count_modes %d)",
-+ width, height, c->connector->count_modes);
-+ goto fail;
-+
-+error_no_encoder:
-+ GST_DEBUG ("could not get encoder: %s", strerror (errno));
-+ goto fail;
-+
-+error_no_crtc:
-+ GST_DEBUG ("couldn't find a crtc");
-+ goto fail;
-+
-+error_no_plane:
-+ GST_DEBUG ("couldn't find a plane");
-+ goto fail;
-+}
-+
-+gboolean
-+gst_drm_connector_find_mode_and_plane (int fd,
-+ struct omap_device *dev, int width, int height,
-+ drmModeRes * resources, drmModePlaneRes * plane_resources,
-+ struct connector *c)
-+{
-+ int i;
-+ gboolean found = FALSE;
-+
-+ /* First, find the connector & mode */
-+ if (c->id == 0) {
-+ /* Any connector */
-+ GST_DEBUG ("Any connector, %d available", resources->count_connectors);
-+ for (i = 0; i < resources->count_connectors; i++) {
-+ GST_DEBUG (" %d", resources->connectors[i]);
-+ }
-+ for (i = 0; i < resources->count_connectors; i++) {
-+ GST_DEBUG ("Trying connector %d: %d", i, resources->connectors[i]);
-+ c->id = resources->connectors[i];
-+ if (gst_drm_connector_find_mode_and_plane_helper (fd, dev, width, height,
-+ resources, plane_resources, c)) {
-+ GST_DEBUG ("Found suitable connector");
-+ found = TRUE;
-+ break;
-+ }
-+ GST_DEBUG ("Connector not suitable");
-+ }
-+ } else {
-+ /* A specific connector */
-+ GST_DEBUG ("Connector %d", c->id);
-+ found =
-+ gst_drm_connector_find_mode_and_plane_helper (fd, dev, width, height,
-+ resources, plane_resources, c);
-+ }
-+
-+ return found;
-+}
-+
-+/* table nicked off libdrm's modetest.c */
-+/* *INDENT-OFF* */
-+static const struct {
-+ int type_id;
-+ const char *type_name;
-+} connector_type_names[] = {
-+ { DRM_MODE_CONNECTOR_Unknown, "unknown" },
-+ { DRM_MODE_CONNECTOR_VGA, "VGA" },
-+ { DRM_MODE_CONNECTOR_DVII, "DVI-I" },
-+ { DRM_MODE_CONNECTOR_DVID, "DVI-D" },
-+ { DRM_MODE_CONNECTOR_DVIA, "DVI-A" },
-+ { DRM_MODE_CONNECTOR_Composite, "composite" },
-+ { DRM_MODE_CONNECTOR_SVIDEO, "s-video" },
-+ { DRM_MODE_CONNECTOR_LVDS, "LVDS" },
-+ { DRM_MODE_CONNECTOR_Component, "component" },
-+ { DRM_MODE_CONNECTOR_9PinDIN, "9-pin-DIN" },
-+ { DRM_MODE_CONNECTOR_DisplayPort, "displayport" },
-+ { DRM_MODE_CONNECTOR_HDMIA, "HDMI-A" },
-+ { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B" },
-+ { DRM_MODE_CONNECTOR_TV, "TV" },
-+ { DRM_MODE_CONNECTOR_eDP, "embedded-displayport" },
-+};
-+/* *INDENT-ON* */
-+
-+gboolean
-+gst_drm_connector_find_mode_and_plane_by_name (int fd,
-+ struct omap_device * dev, int width, int height,
-+ drmModeRes * resources, drmModePlaneRes * plane_resources,
-+ struct connector * c, const char *name)
-+{
-+ int i, n;
-+ char tmp[64];
-+ const char *type_name;
-+ int found[G_N_ELEMENTS (connector_type_names)] = { 0 };
-+
-+ /* Find connector from name */
-+ for (i = 0; i < resources->count_connectors; i++) {
-+ GST_DEBUG ("Trying connector %d: %d", i, resources->connectors[i]);
-+ c->id = resources->connectors[i];
-+ c->connector = drmModeGetConnector (fd, c->id);
-+ if (!c->connector)
-+ continue;
-+
-+ /* Find type name from this connector */
-+ for (n = 0; n < G_N_ELEMENTS (connector_type_names); n++)
-+ if (connector_type_names[n].type_id == c->connector->connector_type)
-+ break;
-+ if (n == G_N_ELEMENTS (connector_type_names))
-+ continue;
-+
-+ type_name = connector_type_names[n].type_name;
-+ GST_DEBUG ("Connector %d has type %s", i, type_name);
-+ ++found[n];
-+
-+ drmModeFreeConnector (c->connector);
-+ c->connector = NULL;
-+
-+ /* Try a few different matches, such as modetest and xrandr
-+ output, and also a indexless one matching first found */
-+ snprintf (tmp, sizeof (tmp), "%s-%u", type_name, found[n]);
-+ if (!g_ascii_strcasecmp (tmp, name))
-+ goto found;
-+ snprintf (tmp, sizeof (tmp), "%s%u", type_name, found[n]);
-+ if (!g_ascii_strcasecmp (tmp, name))
-+ goto found;
-+ if (!g_ascii_strcasecmp (name, type_name))
-+ goto found;
-+
-+ continue;
-+
-+ found:
-+ if (gst_drm_connector_find_mode_and_plane_helper (fd, dev, width, height,
-+ resources, plane_resources, c)) {
-+ GST_DEBUG ("Found suitable connector");
-+ return TRUE;
-+ }
-+ GST_DEBUG ("Connector not suitable");
-+ }
-+
-+ return FALSE;
-+}
-diff --git a/sys/kms/gstdrmutils.h b/sys/kms/gstdrmutils.h
-new file mode 100644
-index 0000000..ebc5fc6
---- /dev/null
-+++ b/sys/kms/gstdrmutils.h
-@@ -0,0 +1,50 @@
-+#ifndef __GST_DRMUTILS_H__
-+#define __GST_DRMUTILS_H__
-+
-+#include <fcntl.h>
-+#include <xf86drm.h>
-+#include <stdio.h>
-+#include <stdint.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <assert.h>
-+#include <libdrm/drm.h>
-+#include <libdrm/drm_mode.h>
-+#include <xf86drmMode.h>
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <drm_fourcc.h>
-+#include <gst/gst.h>
-+#include <sys/ioctl.h>
-+
-+struct plane_data {
-+ int plane;
-+ int fb_id_property;
-+};
-+
-+struct connector {
-+ uint32_t id;
-+ char mode_str[64];
-+ drmModeConnector *connector;
-+ drmModeModeInfo *mode;
-+ drmModeEncoder *encoder;
-+ uint32_t fb_id;
-+ struct omap_bo *fb_bo;
-+ int crtc;
-+ int pipe;
-+ struct plane_data *pdata;
-+};
-+
-+void gst_drm_connector_cleanup (int fd, struct connector * c);
-+gboolean gst_drm_connector_find_mode_and_plane (int fd,
-+ struct omap_device * dev, int width, int height,
-+ drmModeRes * resources, drmModePlaneRes * plane_resources,
-+ struct connector *c);
-+gboolean gst_drm_connector_find_mode_and_plane_by_name (int fd,
-+ struct omap_device *dev, int width, int height,
-+ drmModeRes * resources, drmModePlaneRes * plane_resources,
-+ struct connector *c, const char *name);
-+
-+#endif /* __GST_DRMUTILS_H__ */
-diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
-new file mode 100644
-index 0000000..172a4c3
---- /dev/null
-+++ b/sys/kms/gstkmsbufferpriv.c
-@@ -0,0 +1,121 @@
-+/*
-+ * GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ * Copyright (C) 2012 Collabora Ltd
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ * Rob Clark <rob.clark@linaro.org>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation
-+ * version 2.1 of the License.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <stdint.h>
-+#include <gst/gst.h>
-+#include <gst/allocators/allocators.h>
-+
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <xf86drmMode.h>
-+
-+#include "gstkmssink.h"
-+#include "gstkmsbufferpriv.h"
-+
-+static int
-+create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
-+{
-+ /* TODO get format, etc from caps.. and query device for
-+ * supported formats, and make this all more flexible to
-+ * cope with various formats:
-+ */
-+ uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+
-+ uint32_t handles[4] = {
-+ omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
-+ };
-+ uint32_t pitches[4] = {
-+ GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
-+ };
-+ uint32_t offsets[4] = {
-+ 0, pitches[0] * sink->input_height
-+ };
-+
-+ return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
-+ fourcc, handles, pitches, offsets, &priv->fb_id, 0);
-+}
-+
-+/**
-+ * gst_kms_buffer_priv:
-+ * @sink: a #GstKMSSink
-+ * @buf: a pointer to #GstBuffer
-+ *
-+ * Checks if the @buf has a GstMetaDmaBuf metadata set. If it doesn't we return a NULL
-+ * indicating its not a dmabuf buffer. We maintain a hashtable with dmabuf fd as key and
-+ * the GstKMSBufferPriv structure as value
-+ *
-+ * Returns: the #GstKMSBufferPriv
-+ *
-+ * Since: 1.2.?
-+ */
-+GstKMSBufferPriv *
-+gst_kms_buffer_priv (GstKMSSink * sink, GstBuffer * buf)
-+{
-+ struct omap_bo *bo;
-+ int fd;
-+ int fd_copy;
-+ GstKMSBufferPriv * priv;
-+ GstMemory *mem;
-+
-+ /* if it isn't a dmabuf buffer that we can import, then there
-+ * is nothing we can do with it:
-+ */
-+ mem = gst_buffer_peek_memory (buf, 0);
-+ fd_copy = gst_fd_memory_get_fd (mem);
-+ if (fd_copy < 0) {
-+ GST_DEBUG_OBJECT (sink, "not importing non dmabuf buffer");
-+ return NULL;
-+ }
-+
-+ /* lookup the hashtable with fd as key. If present return bo & buffer structure */
-+ priv = g_hash_table_lookup (sink->kmsbufferpriv, (gpointer)fd_copy);
-+ if(priv) {
-+ return priv;
-+ }
-+
-+ priv = g_malloc0 (sizeof (GstKMSBufferPriv));
-+ bo = omap_bo_from_dmabuf (sink->dev, fd_copy);
-+ fd = sink->fd;
-+
-+ priv->bo = bo;
-+ priv->fd = fd;
-+
-+ if (create_fb (priv, sink)) {
-+ GST_WARNING_OBJECT (sink, "could not create framebuffer: %s",
-+ strerror (errno));
-+ g_free(priv);
-+ return NULL;
-+ }
-+
-+ /* if fd not present, write to hash table fd and the corresponding priv. */
-+ g_hash_table_insert(sink->kmsbufferpriv, (gpointer)fd_copy, priv);
-+
-+
-+ return priv;
-+}
-diff --git a/sys/kms/gstkmsbufferpriv.h b/sys/kms/gstkmsbufferpriv.h
-new file mode 100644
-index 0000000..a1070da
---- /dev/null
-+++ b/sys/kms/gstkmsbufferpriv.h
-@@ -0,0 +1,64 @@
-+/*
-+ * GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ * Copyright (C) 2012 Collabora Ltd
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ * Rob Clark <rob.clark@linaro.org>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation
-+ * version 2.1 of the License.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifndef __GSTKMSBUFFERPRIV_H__
-+#define __GSTKMSBUFFERPRIV_H__
-+
-+#include <stdint.h>
-+#include <gst/gst.h>
-+
-+G_BEGIN_DECLS
-+
-+/*
-+ * per-buffer private data so kmssink can attach a drm_framebuffer
-+ * handle (fb_id) to a buffer, which gets deleted when the buffer
-+ * is finalized
-+ */
-+
-+#define GST_TYPE_KMS_BUFFER_PRIV \
-+ (gst_kms_buffer_priv_get_type ())
-+#define GST_KMS_BUFFER_PRIV(obj) \
-+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KMS_BUFFER_PRIV, GstKMSBufferPriv))
-+#define GST_IS_KMS_BUFFER_PRIV(obj) \
-+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KMS_BUFFER_PRIV))
-+
-+
-+typedef struct
-+{
-+ struct omap_bo *bo;
-+ int fd;
-+ uint32_t fb_id;
-+}GstKMSBufferPriv;
-+
-+
-+GType gst_kms_buffer_priv_get_type (void);
-+
-+/* Returns a GstKMSBufferPriv, if it has a dmabuf fd metadata */
-+GstKMSBufferPriv * gst_kms_buffer_priv (GstKMSSink *sink, GstBuffer * buf);
-+
-+G_END_DECLS
-+
-+
-+#endif /* __GSTKMSBUFFERPRIV_H__ */
-diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
-new file mode 100644
-index 0000000..17e6407
---- /dev/null
-+++ b/sys/kms/gstkmssink.c
-@@ -0,0 +1,740 @@
-+/* GStreamer
-+ * Copyright (C) 2012 Texas Instruments
-+ * Copyright (C) 2012 Collabora Ltd
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ *
-+ * 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.
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include "gstkmssink.h"
-+#include "gstkmsbufferpriv.h"
-+
-+#include <libdce.h>
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <xf86drmMode.h>
-+
-+static int drm_fd = -1;
-+static struct omap_device *drm_dev;
-+static int once =1;
-+
-+GST_DEBUG_CATEGORY (gst_debug_kms_sink);
-+#define GST_CAT_DEFAULT gst_debug_kms_sink
-+
-+G_DEFINE_TYPE (GstKMSSink, gst_kms_sink, GST_TYPE_VIDEO_SINK);
-+
-+static void gst_kms_sink_reset (GstKMSSink * sink);
-+
-+static GstStaticPadTemplate gst_kms_sink_template_factory =
-+GST_STATIC_PAD_TEMPLATE ("sink",
-+ GST_PAD_SINK,
-+ GST_PAD_ALWAYS,
-+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
-+ );
-+
-+enum
-+{
-+ PROP_0,
-+ PROP_PIXEL_ASPECT_RATIO,
-+ PROP_FORCE_ASPECT_RATIO,
-+ PROP_SCALE,
-+ PROP_CONNECTOR,
-+ PROP_CONNECTOR_NAME,
-+};
-+
-+
-+static inline void
-+display_bufs_queue (GstKMSSink * sink, GstBuffer * buf)
-+{
-+ int i;
-+ for (i = 0; i < (NUM_DISPLAY_BUFS - 1); i++)
-+ gst_buffer_replace (&sink->display_bufs[i], sink->display_bufs[i + 1]);
-+ gst_buffer_replace (&sink->display_bufs[i], buf);
-+}
-+
-+static inline void
-+display_bufs_free (GstKMSSink * sink)
-+{
-+ int i;
-+ for (i = 0; i < NUM_DISPLAY_BUFS; i++)
-+ gst_buffer_replace (&sink->display_bufs[i], NULL);
-+}
-+
-+static gboolean
-+gst_kms_sink_calculate_aspect_ratio (GstKMSSink * sink, gint width,
-+ gint height, gint video_par_n, gint video_par_d)
-+{
-+ guint calculated_par_n;
-+ guint calculated_par_d;
-+
-+ if (!gst_video_calculate_display_ratio (&calculated_par_n, &calculated_par_d,
-+ width, height, video_par_n, video_par_d, 1, 1)) {
-+ GST_ELEMENT_ERROR (sink, CORE, NEGOTIATION, (NULL),
-+ ("Error calculating the output display ratio of the video."));
-+ return FALSE;
-+ }
-+ GST_DEBUG_OBJECT (sink,
-+ "video width/height: %dx%d, calculated display ratio: %d/%d",
-+ width, height, calculated_par_n, calculated_par_d);
-+
-+ /* now find a width x height that respects this display ratio.
-+ * prefer those that have one of w/h the same as the incoming video
-+ * using wd / hd = calculated_pad_n / calculated_par_d */
-+
-+ /* start with same height, because of interlaced video */
-+ /* check hd / calculated_par_d is an integer scale factor, and scale wd with the PAR */
-+ if (height % calculated_par_d == 0) {
-+ GST_DEBUG_OBJECT (sink, "keeping video height");
-+ GST_VIDEO_SINK_WIDTH (sink) = (guint)
-+ gst_util_uint64_scale_int (height, calculated_par_n, calculated_par_d);
-+ GST_VIDEO_SINK_HEIGHT (sink) = height;
-+ } else if (width % calculated_par_n == 0) {
-+ GST_DEBUG_OBJECT (sink, "keeping video width");
-+ GST_VIDEO_SINK_WIDTH (sink) = width;
-+ GST_VIDEO_SINK_HEIGHT (sink) = (guint)
-+ gst_util_uint64_scale_int (width, calculated_par_d, calculated_par_n);
-+ } else {
-+ GST_DEBUG_OBJECT (sink, "approximating while keeping video height");
-+ GST_VIDEO_SINK_WIDTH (sink) = (guint)
-+ gst_util_uint64_scale_int (height, calculated_par_n, calculated_par_d);
-+ GST_VIDEO_SINK_HEIGHT (sink) = height;
-+ }
-+ GST_DEBUG_OBJECT (sink, "scaling to %dx%d",
-+ GST_VIDEO_SINK_WIDTH (sink), GST_VIDEO_SINK_HEIGHT (sink));
-+
-+ return TRUE;
-+}
-+
-+static gboolean
-+gst_kms_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
-+{
-+ GstKMSSink *sink;
-+ gboolean ret = TRUE;
-+ gint width, height;
-+ gint fps_n, fps_d;
-+ gint par_n, par_d;
-+ GstVideoFormat format;
-+ GstVideoInfo info;
-+ GstStructure *conf;
-+ GstStructure *s;
-+ int size;
-+
-+ sink = GST_KMS_SINK (bsink);
-+
-+ ret = gst_video_info_from_caps (&info, caps);
-+ format = GST_VIDEO_INFO_FORMAT(&info);
-+ width = GST_VIDEO_INFO_WIDTH(&info);
-+ height = GST_VIDEO_INFO_HEIGHT(&info);
-+ fps_n = GST_VIDEO_INFO_FPS_N(&info);
-+ fps_d = GST_VIDEO_INFO_FPS_D(&info);
-+ par_n = GST_VIDEO_INFO_PAR_N(&info);
-+ par_d = GST_VIDEO_INFO_PAR_D(&info);
-+
-+ if (!ret)
-+ return FALSE;
-+
-+ if (width <= 0 || height <= 0) {
-+ GST_ELEMENT_ERROR (sink, CORE, NEGOTIATION, (NULL),
-+ ("Invalid image size."));
-+ return FALSE;
-+ }
-+
-+ sink->format = format;
-+ sink->par_n = par_n;
-+ sink->par_d = par_d;
-+ sink->src_rect.x = sink->src_rect.y = 0;
-+ sink->src_rect.w = width;
-+ sink->src_rect.h = height;
-+ sink->input_width = width;
-+ sink->input_height = height;
-+ size = info.size;
-+
-+ if (!sink->pool) {
-+ GstAllocator *allocator;
-+
-+ allocator = gst_drm_allocator_get ();
-+ sink->pool = gst_buffer_pool_new ();
-+ conf = gst_buffer_pool_get_config (GST_BUFFER_POOL(sink->pool));
-+ gst_buffer_pool_config_set_params (conf, caps, size, 0, 0);
-+ gst_buffer_pool_config_set_allocator (conf, allocator, NULL);
-+ gst_buffer_pool_set_config (GST_BUFFER_POOL(sink->pool), conf);
-+ if (allocator)
-+ gst_object_unref (allocator);
-+ }
-+
-+ sink->conn.crtc = -1;
-+ return TRUE;
-+}
-+
-+static void
-+gst_kms_sink_get_times (GstBaseSink * bsink, GstBuffer * buf,
-+ GstClockTime * start, GstClockTime * end)
-+{
-+ GstKMSSink *sink;
-+
-+ sink = GST_KMS_SINK (bsink);
-+
-+ if (GST_BUFFER_PTS_IS_VALID (buf)) {
-+ *start = GST_BUFFER_PTS (buf);
-+ if (GST_BUFFER_DURATION_IS_VALID (buf)) {
-+ *end = *start + GST_BUFFER_DURATION (buf);
-+ } else {
-+ if (sink->fps_n > 0) {
-+ *end = *start +
-+ gst_util_uint64_scale_int (GST_SECOND, sink->fps_d, sink->fps_n);
-+ }
-+ }
-+ }
-+}
-+
-+
-+static void page_flip_handler(int fd, unsigned int frame,
-+ unsigned int sec, unsigned int usec, void *data)
-+{
-+ int *waiting_for_flip = data;
-+ *waiting_for_flip = 0;
-+}
-+
-+
-+static GstFlowReturn
-+gst_kms_sink_show_frame (GstVideoSink * vsink, GstBuffer * inbuf)
-+{
-+ GstKMSSink *sink = GST_KMS_SINK (vsink);
-+ GstBuffer *buf = NULL;
-+ GstKMSBufferPriv *priv;
-+ GstFlowReturn flow_ret = GST_FLOW_OK;
-+ int ret = 0;
-+ gint width, height;
-+ GstVideoRectangle *c = &sink->src_rect;
-+ int waiting_for_flip = 1;
-+
-+ fd_set fds;
-+ drmEventContext evctx = {
-+ .version = DRM_EVENT_CONTEXT_VERSION,
-+ .vblank_handler = 0,
-+ .page_flip_handler = page_flip_handler,
-+ };
-+
-+ g_mutex_lock (&sink->render_lock);
-+ GstVideoCropMeta* crop = gst_buffer_get_video_crop_meta (inbuf);
-+ if (crop){
-+ c->y = crop->y;
-+ c->x = crop->x;
-+
-+ if (crop->width >= 0) {
-+ width = crop->width;
-+ } else {
-+ width = sink->input_width;
-+ }
-+ if (crop->height >= 0){
-+ height = crop->height;
-+ } else {
-+ height = sink->input_height;
-+ }
-+ } else {
-+ width = sink->input_width;
-+ height = sink->input_height;
-+ }
-+
-+ c->w = width;
-+ c->h = height;
-+
-+
-+ if (!gst_kms_sink_calculate_aspect_ratio (sink, width, height,
-+ sink->par_n, sink->par_d))
-+ GST_DEBUG_OBJECT (sink, "calculate aspect ratio failed");
-+
-+
-+ GST_INFO_OBJECT (sink, "enter");
-+
-+ if (sink->conn.crtc == -1) {
-+ if (sink->conn_name) {
-+ if (!gst_drm_connector_find_mode_and_plane_by_name (sink->fd,
-+ sink->dev, sink->src_rect.w, sink->src_rect.h,
-+ sink->resources, sink->plane_resources, &sink->conn,
-+ sink->conn_name))
-+ goto connector_not_found;
-+ } else {
-+ sink->conn.id = sink->conn_id;
-+ if (!gst_drm_connector_find_mode_and_plane (sink->fd,
-+ sink->dev, sink->src_rect.w, sink->src_rect.h,
-+ sink->resources, sink->plane_resources, &sink->conn))
-+ goto connector_not_found;
-+ }
-+ once = 1;
-+ }
-+
-+ priv = gst_kms_buffer_priv (sink, inbuf);
-+
-+ if (priv) {
-+ buf = inbuf;
-+ } else {
-+ GST_LOG_OBJECT (sink, "not a KMS buffer, slow-path!");
-+ gst_buffer_pool_acquire_buffer (sink->pool, &buf, NULL);
-+ if (buf) {
-+ GST_BUFFER_PTS (buf) = GST_BUFFER_PTS (inbuf);
-+ GST_BUFFER_DURATION (buf) = GST_BUFFER_DURATION (inbuf);
-+ gst_buffer_copy_into (buf, inbuf, GST_BUFFER_COPY_DEEP, 0 ,-1);
-+ priv = gst_kms_buffer_priv (sink, buf);
-+ }
-+ if (!priv)
-+ goto add_fb2_failed;
-+ }
-+
-+ if (once) {
-+ once = 0;
-+ static GstVideoRectangle dest = { 0 };
-+ dest.w = sink->conn.mode->hdisplay;
-+ dest.h = sink->conn.mode->vdisplay;
-+
-+ gst_video_sink_center_rect (sink->src_rect, dest, &sink->dst_rect,
-+ sink->scale);
-+ ret = drmModeSetPlane (sink->fd, sink->conn.pdata[0].plane,
-+ sink->conn.crtc, priv->fb_id, 0,
-+ sink->dst_rect.x, sink->dst_rect.y, sink->dst_rect.w, sink->dst_rect.h,
-+ sink->src_rect.x << 16, sink->src_rect.y << 16,
-+ sink->src_rect.w << 16, sink->src_rect.h << 16);
-+ if (ret)
-+ goto set_plane_failed;
-+ }
-+
-+ drmModeAtomicReqPtr m_req = drmModeAtomicAlloc();
-+
-+ drmModeAtomicAddProperty(m_req, sink->conn.pdata[0].plane,
-+ sink->conn.pdata[0].fb_id_property,
-+ priv->fb_id);
-+
-+ drmModeAtomicCommit(sink->fd, m_req, DRM_MODE_ATOMIC_TEST_ONLY, 0);
-+ drmModeAtomicCommit(sink->fd, m_req, DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_NONBLOCK, &waiting_for_flip);
-+ drmModeAtomicFree(m_req);
-+
-+ while (waiting_for_flip) {
-+ FD_ZERO(&fds);
-+ FD_SET(sink->fd, &fds);
-+ int err;
-+ err = select(sink->fd + 1, &fds, NULL, NULL, NULL);
-+ if (err < 0) {
-+ GST_ERROR_OBJECT (sink,"select err: %s\n", strerror(errno));
-+ flow_ret = GST_FLOW_ERROR;
-+ goto out;
-+ }
-+ if (FD_ISSET(sink->fd, &fds)) {
-+ drmHandleEvent(sink->fd, &evctx);
-+ }
-+ }
-+
-+ display_bufs_queue (sink, buf);
-+
-+out:
-+ GST_INFO_OBJECT (sink, "exit");
-+ if (buf != inbuf)
-+ gst_buffer_unref (buf);
-+ g_mutex_unlock (&sink->render_lock);
-+ return flow_ret;
-+
-+add_fb2_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("drmModeAddFB2 failed: %s (%d)", strerror (errno), errno));
-+ flow_ret = GST_FLOW_ERROR;
-+ goto out;
-+
-+set_plane_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("drmModeSetPlane failed: %s (%d)", strerror (errno), errno));
-+ flow_ret = GST_FLOW_ERROR;
-+ goto out;
-+
-+connector_not_found:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
-+ (NULL), ("connector not found", strerror (errno), errno));
-+ goto out;
-+}
-+
-+
-+static gboolean
-+gst_kms_sink_event (GstBaseSink * bsink, GstEvent * event)
-+{
-+ GstKMSSink *sink = GST_KMS_SINK (bsink);
-+
-+ switch (GST_EVENT_TYPE (event)) {
-+ default:
-+ break;
-+ }
-+ if (GST_BASE_SINK_CLASS (gst_kms_sink_parent_class)->event)
-+ return GST_BASE_SINK_CLASS (gst_kms_sink_parent_class)->event (bsink,
-+ event);
-+ else
-+ return TRUE;
-+}
-+
-+static void
-+gst_kms_sink_set_property (GObject * object, guint prop_id,
-+ const GValue * value, GParamSpec * pspec)
-+{
-+ GstKMSSink *sink;
-+
-+ g_return_if_fail (GST_IS_KMS_SINK (object));
-+
-+ sink = GST_KMS_SINK (object);
-+
-+ switch (prop_id) {
-+ case PROP_FORCE_ASPECT_RATIO:
-+ sink->keep_aspect = g_value_get_boolean (value);
-+ break;
-+ case PROP_SCALE:
-+ sink->scale = g_value_get_boolean (value);
-+ break;
-+ case PROP_CONNECTOR:
-+ sink->conn_id = g_value_get_uint (value);
-+ break;
-+ case PROP_CONNECTOR_NAME:
-+ g_free (sink->conn_name);
-+ sink->conn_name = g_strdup (g_value_get_string (value));
-+ break;
-+ case PROP_PIXEL_ASPECT_RATIO:
-+ {
-+ GValue *tmp;
-+
-+ tmp = g_new0 (GValue, 1);
-+ g_value_init (tmp, GST_TYPE_FRACTION);
-+
-+ if (!g_value_transform (value, tmp)) {
-+ GST_WARNING_OBJECT (sink, "Could not transform string to aspect ratio");
-+ } else {
-+ sink->par_n = gst_value_get_fraction_numerator (tmp);
-+ sink->par_d = gst_value_get_fraction_denominator (tmp);
-+ GST_DEBUG_OBJECT (sink, "set PAR to %d/%d", sink->par_n, sink->par_d);
-+ }
-+ g_free (tmp);
-+ }
-+ break;
-+ default:
-+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+ break;
-+ }
-+}
-+
-+static void
-+gst_kms_sink_get_property (GObject * object, guint prop_id,
-+ GValue * value, GParamSpec * pspec)
-+{
-+ GstKMSSink *sink;
-+
-+ g_return_if_fail (GST_IS_KMS_SINK (object));
-+
-+ sink = GST_KMS_SINK (object);
-+
-+ switch (prop_id) {
-+ case PROP_FORCE_ASPECT_RATIO:
-+ g_value_set_boolean (value, sink->keep_aspect);
-+ break;
-+ case PROP_SCALE:
-+ g_value_set_boolean (value, sink->scale);
-+ break;
-+ case PROP_CONNECTOR:
-+ g_value_set_uint (value, sink->conn.id);
-+ break;
-+ case PROP_PIXEL_ASPECT_RATIO:
-+ {
-+ char *v = g_strdup_printf ("%d/%d", sink->par_n, sink->par_d);
-+ g_value_take_string (value, v);
-+ break;
-+ }
-+ default:
-+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-+ break;
-+ }
-+}
-+
-+static void
-+gst_kms_sink_reset (GstKMSSink * sink)
-+{
-+ GST_DEBUG_OBJECT (sink, "reset");
-+
-+ if (sink->fd != -1) {
-+ gst_drm_connector_cleanup (sink->fd, &sink->conn);
-+ }
-+ memset (&sink->conn, 0, sizeof (struct connector));
-+
-+ display_bufs_free (sink);
-+
-+ if (sink->pool) {
-+ gst_buffer_pool_set_active (GST_BUFFER_POOL(sink->pool), FALSE);
-+ gst_object_unref(sink->pool);
-+ sink->pool = NULL;
-+ }
-+
-+ if (sink->plane_resources) {
-+ drmModeFreePlaneResources (sink->plane_resources);
-+ sink->plane_resources = NULL;
-+ }
-+
-+ if (sink->resources) {
-+ drmModeFreeResources (sink->resources);
-+ sink->resources = NULL;
-+ }
-+
-+ sink->par_n = sink->par_d = 1;
-+ sink->src_rect.x = 0;
-+ sink->src_rect.y = 0;
-+ sink->src_rect.w = 0;
-+ sink->src_rect.h = 0;
-+ sink->input_width = 0;
-+ sink->input_height = 0;
-+ sink->format = GST_VIDEO_FORMAT_UNKNOWN;
-+
-+ memset (&sink->src_rect, 0, sizeof (GstVideoRectangle));
-+ memset (&sink->dst_rect, 0, sizeof (GstVideoRectangle));
-+}
-+
-+static gboolean
-+gst_kms_sink_start (GstBaseSink * bsink)
-+{
-+ GstKMSSink *sink;
-+
-+ sink = GST_KMS_SINK (bsink);
-+
-+ drm_dev = dce_init ();
-+ if (drm_dev == NULL)
-+ goto device_failed;
-+ else {
-+ sink->dev = drm_dev;
-+ sink->fd = dce_get_fd ();
-+ drm_fd = dce_get_fd ();
-+ }
-+
-+ sink->resources = drmModeGetResources (sink->fd);
-+ if (sink->resources == NULL)
-+ goto resources_failed;
-+
-+ sink->plane_resources = drmModeGetPlaneResources (sink->fd);
-+ if (sink->plane_resources == NULL)
-+ goto plane_resources_failed;
-+
-+ return TRUE;
-+
-+fail:
-+ gst_kms_sink_reset (sink);
-+ return FALSE;
-+
-+device_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("omap_device_new failed"));
-+ goto fail;
-+
-+resources_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("drmModeGetResources failed: %s (%d)", strerror (errno), errno));
-+ goto fail;
-+
-+plane_resources_failed:
-+ GST_ELEMENT_ERROR (sink, RESOURCE, FAILED,
-+ (NULL), ("drmModeGetPlaneResources failed: %s (%d)",
-+ strerror (errno), errno));
-+ goto fail;
-+}
-+
-+static gboolean
-+gst_kms_sink_stop (GstBaseSink * bsink)
-+{
-+ GstKMSSink *sink;
-+
-+ sink = GST_KMS_SINK (bsink);
-+ gst_kms_sink_reset (sink);
-+
-+ return TRUE;
-+}
-+
-+
-+static gboolean
-+gst_kms_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
-+{
-+ GstKMSSink *sink;
-+ GstStructure *conf;
-+ GstCaps *caps;
-+ guint size;
-+ gboolean need_pool;
-+ GstStructure *s;
-+ int num_buffers = 0;
-+
-+
-+ sink = GST_KMS_SINK (bsink);
-+
-+ GST_DEBUG_OBJECT (sink, "begin");
-+
-+ gst_query_parse_allocation (query, &caps, &need_pool);
-+
-+ if (G_UNLIKELY (!caps)) {
-+ GST_WARNING_OBJECT (sink, "have no caps, doing fallback allocation");
-+ return FALSE;
-+ }
-+
-+ if (need_pool) {
-+ GstVideoInfo info;
-+
-+ if (!gst_video_info_from_caps (&info, caps))
-+ goto invalid_caps;
-+
-+ GST_LOG_OBJECT (sink,
-+ "a bufferpool was requested with caps %" GST_PTR_FORMAT, caps);
-+
-+ /* We already have a pool after set_caps */
-+ if (sink->pool) {
-+ GstStructure *config;
-+ int min,max;
-+ config = gst_buffer_pool_get_config (sink->pool);
-+ gst_buffer_pool_config_get_params (config, NULL, &size, &min, &max);
-+ gst_structure_free (config);
-+
-+ gst_query_add_allocation_pool (query, sink->pool, size, min, max);
-+ gst_query_add_allocation_param (query, gst_drm_allocator_get (), NULL);
-+ return TRUE;
-+ } else {
-+ GST_LOG_OBJECT (sink, "No bufferpool available");
-+ return FALSE;
-+ }
-+ }
-+
-+
-+invalid_caps:
-+ GST_DEBUG_OBJECT (sink, "invalid caps specified");
-+ return FALSE;
-+}
-+
-+static void
-+gst_kms_sink_finalize (GObject * object)
-+{
-+ GstKMSSink *sink;
-+
-+ sink = GST_KMS_SINK (object);
-+ g_mutex_clear (&sink->render_lock);
-+ g_free (sink->conn_name);
-+ if (sink->kmsbufferpriv){
-+ g_hash_table_destroy (sink->kmsbufferpriv);
-+ sink->kmsbufferpriv = NULL;
-+ gst_kms_sink_reset (sink);
-+}
-+
-+ G_OBJECT_CLASS (gst_kms_sink_parent_class)->finalize (object);
-+}
-+
-+static void
-+kmsbufferpriv_free_func (GstKMSBufferPriv *priv)
-+{
-+ drmModeRmFB (priv->fd, priv->fb_id);
-+ omap_bo_del (priv->bo);
-+ g_free(priv);
-+}
-+
-+
-+static void
-+gst_kms_sink_init (GstKMSSink * sink)
-+{
-+ sink->fd = -1;
-+ gst_kms_sink_reset (sink);
-+ sink->kmsbufferpriv = g_hash_table_new_full (g_direct_hash, g_direct_equal,
-+ NULL, (GDestroyNotify) kmsbufferpriv_free_func);
-+ g_mutex_init (&sink->render_lock);
-+}
-+
-+static void
-+gst_kms_sink_class_init (GstKMSSinkClass * klass)
-+{
-+ GObjectClass *gobject_class;
-+ GstElementClass *gstelement_class;
-+ GstBaseSinkClass *gstbasesink_class;
-+ GstVideoSinkClass *videosink_class;
-+
-+ gobject_class = (GObjectClass *) klass;
-+ gstelement_class = (GstElementClass *) klass;
-+ gstbasesink_class = (GstBaseSinkClass *) klass;
-+ videosink_class = (GstVideoSinkClass *) klass;
-+
-+ gobject_class->finalize = gst_kms_sink_finalize;
-+ gobject_class->set_property = gst_kms_sink_set_property;
-+ gobject_class->get_property = gst_kms_sink_get_property;
-+
-+ g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
-+ g_param_spec_boolean ("force-aspect-ratio", "Force aspect ratio",
-+ "When enabled, reverse caps negotiation (scaling) will respect "
-+ "original aspect ratio", FALSE,
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+ g_object_class_install_property (gobject_class, PROP_PIXEL_ASPECT_RATIO,
-+ g_param_spec_string ("pixel-aspect-ratio", "Pixel Aspect Ratio",
-+ "The pixel aspect ratio of the device", "1/1",
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+ g_object_class_install_property (gobject_class, PROP_SCALE,
-+ g_param_spec_boolean ("scale", "Scale",
-+ "When true, scale to render fullscreen", FALSE,
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+ g_object_class_install_property (gobject_class, PROP_CONNECTOR,
-+ g_param_spec_uint ("connector", "Connector",
-+ "DRM connector id (0 for automatic selection)", 0, G_MAXUINT32, 0,
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT));
-+ g_object_class_install_property (gobject_class, PROP_CONNECTOR_NAME,
-+ g_param_spec_string ("connector-name", "Connector name",
-+ "DRM connector name (alternative to the connector property, "
-+ "use $type$index, $type-$index, or $type)", "",
-+ G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-+
-+ gst_element_class_set_details_simple (gstelement_class,
-+ "Video sink", "Sink/Video",
-+ "A video sink using the linux kernel mode setting API",
-+ "Alessandro Decina <alessandro.d@gmail.com>");
-+
-+ gst_element_class_add_pad_template (gstelement_class,
-+ gst_static_pad_template_get (&gst_kms_sink_template_factory));
-+
-+ gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_kms_sink_setcaps);
-+ gstbasesink_class->get_times = GST_DEBUG_FUNCPTR (gst_kms_sink_get_times);
-+ gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_kms_sink_event);
-+ gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_kms_sink_start);
-+ gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_kms_sink_stop);
-+ gstbasesink_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_kms_sink_propose_allocation);
-+
-+ /* disable preroll as it's called before GST_CROP_EVENT has been received, so
-+ * we end up configuring the wrong mode... (based on padded caps)
-+ */
-+ gstbasesink_class->preroll = NULL;
-+ videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_kms_sink_show_frame);
-+}
-+
-+static gboolean
-+plugin_init (GstPlugin * plugin)
-+{
-+ if (!gst_element_register (plugin, "kmssink",
-+ GST_RANK_PRIMARY + 1, GST_TYPE_KMS_SINK))
-+ return FALSE;
-+
-+ GST_DEBUG_CATEGORY_INIT (gst_debug_kms_sink, "kmssink", 0, "kmssink element");
-+
-+ return TRUE;
-+}
-+
-+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
-+ GST_VERSION_MINOR,
-+ kms,
-+ "KMS video output element",
-+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
-diff --git a/sys/kms/gstkmssink.h b/sys/kms/gstkmssink.h
-new file mode 100644
-index 0000000..9f76839
---- /dev/null
-+++ b/sys/kms/gstkmssink.h
-@@ -0,0 +1,92 @@
-+/* GStreamer
-+ *
-+ * Copyright (C) 2012 Texas Instruments
-+ * Copyright (C) 2012 Collabora Ltd
-+ *
-+ * Authors:
-+ * Alessandro Decina <alessandro.decina@collabora.co.uk>
-+ *
-+ * 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_KMS_SINK_H__
-+#define __GST_KMS_SINK_H__
-+
-+#include <gst/video/video.h>
-+#include <gst/video/gstvideosink.h>
-+#include <gst/drm/gstdrmallocator.h>
-+
-+#include <stdio.h>
-+#include <stdint.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <assert.h>
-+
-+#include "gstdrmutils.h"
-+
-+G_BEGIN_DECLS
-+#define GST_TYPE_KMS_SINK \
-+ (gst_kms_sink_get_type())
-+#define GST_KMS_SINK(obj) \
-+ (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_KMS_SINK, GstKMSSink))
-+#define GST_KMS_SINK_CLASS(klass) \
-+ (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_KMS_SINK, GstKMSSinkClass))
-+#define GST_IS_KMS_SINK(obj) \
-+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_KMS_SINK))
-+#define GST_IS_KMS_SINK_CLASS(klass) \
-+ (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_KMS_SINK))
-+typedef struct _GstKMSSink GstKMSSink;
-+typedef struct _GstKMSSinkClass GstKMSSinkClass;
-+
-+#define NUM_DISPLAY_BUFS 1
-+
-+struct _GstKMSSink
-+{
-+ GstVideoSink videosink;
-+ gint input_width, input_height;
-+ GstVideoFormat format;
-+ gint par_n, par_d;
-+ gint fps_n, fps_d;
-+ gboolean keep_aspect;
-+ GstVideoRectangle src_rect;
-+ GstVideoRectangle dst_rect;
-+ int fd;
-+ struct omap_device *dev;
-+ drmModeRes *resources;
-+ drmModePlaneRes *plane_resources;
-+ struct connector conn;
-+ uint32_t conn_id;
-+ char *conn_name;
-+ drmModePlane *plane;
-+ GstBufferPool *pool;
-+ GHashTable *kmsbufferpriv;
-+ /* current displayed buffer and last displayed buffer: */
-+ GstBuffer *display_bufs[NUM_DISPLAY_BUFS];
-+ gboolean scale;
-+ GMutex render_lock;
-+};
-+
-+struct _GstKMSSinkClass
-+{
-+ GstVideoSinkClass parent_class;
-+};
-+
-+GType gst_kms_sink_get_type (void);
-+
-+G_END_DECLS
-+#endif /* __GST_KMS_SINK_H__ */
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch
deleted file mode 100644
index a57a0bbfa..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 11a3ff4b9451f12374006f853ef5736f5d098932 Mon Sep 17 00:00:00 2001
-From: Eric Ruei <e-ruei1@ti.com>
-Date: Tue, 14 Mar 2017 17:24:07 -0400
-Subject: [PATCH 3/3] kmssink: add YUYV support
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
----
- sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
- sys/kms/gstkmssink.c | 2 +-
- 2 files changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
-index 172a4c3..57c01f8 100644
---- a/sys/kms/gstkmsbufferpriv.c
-+++ b/sys/kms/gstkmsbufferpriv.c
-@@ -41,22 +41,44 @@
- static int
- create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
- {
-+
- /* TODO get format, etc from caps.. and query device for
- * supported formats, and make this all more flexible to
- * cope with various formats:
- */
-- uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
--
-+ GstVideoFormat format = sink->format;
-+ uint32_t fourcc;
- uint32_t handles[4] = {
-- omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
-+ omap_bo_handle (priv->bo),
- };
- uint32_t pitches[4] = {
-- GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
-+ GST_ROUND_UP_4 (sink->input_width),
- };
- uint32_t offsets[4] = {
-- 0, pitches[0] * sink->input_height
-+ 0,
- };
-
-+ /**
-+ * Only two formats are supported:
-+ * AM3/4: YUYV
-+ * AM5: NV12, YUYV
-+ */
-+ if(format == GST_VIDEO_FORMAT_YUY2)
-+ {
-+ /* YUYV */
-+ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
-+ pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
-+ }
-+ else
-+ {
-+ /* NV12 */
-+ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+ handles[1] = omap_bo_handle (priv->bo);
-+ pitches[1] = GST_ROUND_UP_4 (sink->input_width);
-+ offsets[1] = pitches[0] * sink->input_height;
-+ }
-+
-+
- return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
- fourcc, handles, pitches, offsets, &priv->fb_id, 0);
- }
-diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
-index 9795bdf..b36d88f 100644
---- a/sys/kms/gstkmssink.c
-+++ b/sys/kms/gstkmssink.c
-@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
- GST_STATIC_PAD_TEMPLATE ("sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
-- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
-+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))
- );
-
- enum
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0004-gstwaylandsink-Add-DRM-support-on-waylandsink.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0004-gstwaylandsink-Add-DRM-support-on-waylandsink.patch
deleted file mode 100644
index 2902bc3b2..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0004-gstwaylandsink-Add-DRM-support-on-waylandsink.patch
+++ /dev/null
@@ -1,1728 +0,0 @@
-From 78ddc83ebfe7cf69c62610e1f7d14e7f49bf65c9 Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Wed, 25 Jan 2017 17:09:35 +0530
-Subject: [gst-bad-1.8] gstwaylandsink: Add DRM support on waylandsink
-
-Add wl_drm interface on waylandsink.
-The following features are supported:
-1. Support for mouse drag and drop.
-2. Support for video cropping
-
-The following bug fixes identified earlier have been picked:
-1. Consolidate header files to avoid circular dependency
-2. Fix bug reported on waylandsink incase of same process looping
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- configure.ac | 4 +-
- ext/wayland/Makefile.am | 17 +-
- ext/wayland/gstwaylandsink.c | 82 ++++++-
- ext/wayland/gstwaylandsink.h | 4 +-
- ext/wayland/wayland-drm-client-protocol.h | 213 ++++++++++++++++++
- ext/wayland/wayland-drm-protocol.c | 74 +++++++
- ext/wayland/wlbuffer.c | 2 +-
- ext/wayland/wlbuffer.h | 67 ------
- ext/wayland/wldisplay-wlwindow-wlbuffer.h | 216 ++++++++++++++++++
- ext/wayland/wldisplay.c | 350 +++++++++++++++++++++++++++++-
- ext/wayland/wldisplay.h | 84 -------
- ext/wayland/wldrm.c | 69 ++++++
- ext/wayland/wldrm.h | 3 +
- ext/wayland/wlshmallocator.h | 2 +-
- ext/wayland/wlvideoformat.c | 8 +-
- ext/wayland/wlwindow.c | 47 +++-
- ext/wayland/wlwindow.h | 84 -------
- 17 files changed, 1056 insertions(+), 270 deletions(-)
- create mode 100644 ext/wayland/wayland-drm-client-protocol.h
- create mode 100644 ext/wayland/wayland-drm-protocol.c
- delete mode 100644 ext/wayland/wlbuffer.h
- create mode 100644 ext/wayland/wldisplay-wlwindow-wlbuffer.h
- delete mode 100644 ext/wayland/wldisplay.h
- create mode 100644 ext/wayland/wldrm.c
- create mode 100644 ext/wayland/wldrm.h
- delete mode 100644 ext/wayland/wlwindow.h
-
-diff --git a/configure.ac b/configure.ac
-index 9fdfbc7..76166cb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2172,8 +2172,10 @@ AG_GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
- dnl **** Wayland ****
- translit(dnm, m, l) AM_CONDITIONAL(USE_WAYLAND, true)
- AC_PATH_PROG([wayland_scanner], [wayland-scanner])
--AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
-+AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland libdrm libdrm_omap, [
- PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0, [
-+ AC_SUBST(DRM_CFLAGS)
-+ AC_SUBST(DRM_LIBS)
- if test "x$wayland_scanner" != "x"; then
- HAVE_WAYLAND="yes"
- else
-diff --git a/ext/wayland/Makefile.am b/ext/wayland/Makefile.am
-index c742bfc..eb6e326 100644
---- a/ext/wayland/Makefile.am
-+++ b/ext/wayland/Makefile.am
-@@ -3,31 +3,34 @@ plugin_LTLIBRARIES = libgstwaylandsink.la
- libgstwaylandsink_la_SOURCES = \
- gstwaylandsink.c \
- wlshmallocator.c \
-+ wldrm.c \
- wlbuffer.c \
- wldisplay.c \
- wlwindow.c \
- wlvideoformat.c \
-- scaler-protocol.c
-+ scaler-protocol.c \
-+ wayland-drm-protocol.c
-
- libgstwaylandsink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
-- $(WAYLAND_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS)
-+ $(WAYLAND_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(DRM_CFLAGS)
- libgstwaylandsink_la_LIBADD = \
- $(GST_PLUGINS_BASE_LIBS) \
- -lgstvideo-$(GST_API_VERSION) \
- -lgstallocators-$(GST_API_VERSION) \
- $(WAYLAND_LIBS) \
-- $(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la
-+ $(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la \
-+ $(top_builddir)/gst-libs/gst/drm/libgstdrm-$(GST_API_VERSION).la
- libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
- libgstwaylandsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
- noinst_HEADERS = \
- gstwaylandsink.h \
- wlshmallocator.h \
-- wlbuffer.h \
-- wldisplay.h \
-- wlwindow.h \
-+ wldisplay-wlwindow-wlbuffer.h \
-+ wldrm.h \
- wlvideoformat.h \
-- scaler-client-protocol.h
-+ scaler-client-protocol.h \
-+ wayland-drm-client-protocol.h
-
- EXTRA_DIST = scaler.xml
- CLEANFILES = scaler-protocol.c scaler-client-protocol.h
-diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
-index f4f34a8..3e8ff19 100644
---- a/ext/wayland/gstwaylandsink.c
-+++ b/ext/wayland/gstwaylandsink.c
-@@ -43,8 +43,14 @@
-
- #include "gstwaylandsink.h"
- #include "wlvideoformat.h"
--#include "wlbuffer.h"
- #include "wlshmallocator.h"
-+#include "wldrm.h"
-+
-+#include <gst/drm/gstdrmallocator.h>
-+#include "wayland-drm-client-protocol.h"
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <wayland-client.h>
-
- #include <gst/wayland/wayland.h>
- #include <gst/video/videooverlay.h>
-@@ -60,7 +66,8 @@ enum
- enum
- {
- PROP_0,
-- PROP_DISPLAY
-+ PROP_DISPLAY,
-+ PROP_ALLOCATION
- };
-
- GST_DEBUG_CATEGORY (gstwayland_debug);
-@@ -75,6 +82,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
- "YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }"))
- );
-
-+
- static void gst_wayland_sink_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec);
- static void gst_wayland_sink_set_property (GObject * object,
-@@ -158,6 +166,11 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
- g_param_spec_string ("display", "Wayland Display name", "Wayland "
- "display name to connect to, if not supplied via the GstContext",
- NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+ g_object_class_install_property (gobject_class, PROP_ALLOCATION,
-+ g_param_spec_boolean ("use-drm", "Wayland Allocation name", "Wayland "
-+ "Use DRM based memory for allocation",
-+ FALSE, G_PARAM_WRITABLE));
- }
-
- static void
-@@ -197,6 +210,11 @@ gst_wayland_sink_set_property (GObject * object,
- sink->display_name = g_value_dup_string (value);
- GST_OBJECT_UNLOCK (sink);
- break;
-+ case PROP_ALLOCATION:
-+ GST_OBJECT_LOCK (sink);
-+ sink->use_drm = g_value_get_boolean (value);
-+ GST_OBJECT_UNLOCK (sink);
-+ break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
-@@ -281,6 +299,7 @@ gst_wayland_sink_find_display (GstWaylandSink * sink)
- /* if the application didn't set a display, let's create it ourselves */
- GST_OBJECT_LOCK (sink);
- sink->display = gst_wl_display_new (sink->display_name, &error);
-+ sink->display->use_drm = sink->use_drm;
- GST_OBJECT_UNLOCK (sink);
-
- if (error) {
-@@ -408,7 +427,6 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
-
- caps = gst_caps_make_writable (caps);
- gst_structure_set_value (gst_caps_get_structure (caps, 0), "format", &list);
--
- GST_DEBUG_OBJECT (sink, "display caps: %" GST_PTR_FORMAT, caps);
- }
-
-@@ -426,6 +444,18 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
- return caps;
- }
-
-+static void
-+wait_authentication (GstWaylandSink * sink)
-+{
-+ GST_DEBUG_OBJECT (sink, "Before wait aunthenticated value is %d : \n", sink->display->authenticated );
-+ while (!sink->display->authenticated) {
-+ GST_DEBUG_OBJECT (sink, "waiting for authentication");
-+ wl_display_roundtrip (sink->display->display);
-+ }
-+ GST_DEBUG_OBJECT (sink, "After wait aunthenticated value is %d : \n", sink->display->authenticated );
-+}
-+
-+
- static gboolean
- gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
- {
-@@ -436,11 +466,20 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
- GArray *formats;
- gint i;
- GstStructure *structure;
-+ GstStructure *s;
-+ gboolean use_drm = 0;
-+ int num_buffers = 0;
-
- sink = GST_WAYLAND_SINK (bsink);
-
- GST_DEBUG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps);
-
-+ wait_authentication (sink);
-+
-+ while (!sink->display->authenticated) {
-+ GST_DEBUG_OBJECT (sink, "not authenticated yet");
-+ }
-+
- /* extract info from caps */
- if (!gst_video_info_from_caps (&info, caps))
- goto invalid_format;
-@@ -460,14 +499,27 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
- goto unsupported_format;
-
- /* create a new pool for the new configuration */
-- newpool = gst_video_buffer_pool_new ();
-+
-+ s = gst_caps_get_structure (caps, 0);
-+ gst_structure_get_boolean (s, "drm_mem", &use_drm);
-+ gst_structure_get_int (s, "max-ref-frames", &num_buffers);
-+ if (num_buffers )
-+ num_buffers = num_buffers + 2;
-+
-+ newpool = gst_buffer_pool_new ();
- if (!newpool)
- goto pool_failed;
-
- structure = gst_buffer_pool_get_config (newpool);
-- gst_buffer_pool_config_set_params (structure, caps, info.size, 2, 0);
-- gst_buffer_pool_config_set_allocator (structure, gst_wl_shm_allocator_get (),
-- NULL);
-+ gst_buffer_pool_config_set_params (structure, caps, info.size, 2, num_buffers);
-+ if ( use_drm ) {
-+ gst_buffer_pool_config_set_allocator (structure, gst_drm_allocator_get (),
-+ NULL);
-+ sink->display->use_drm = TRUE;
-+ } else {
-+ gst_buffer_pool_config_set_allocator (structure, gst_wl_shm_allocator_get (),
-+ NULL);
-+ }
- if (!gst_buffer_pool_set_config (newpool, structure))
- goto config_failed;
-
-@@ -518,8 +570,11 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
- /* we do have a pool for sure (created in set_caps),
- * so let's propose it anyway, but also propose the allocator on its own */
- gst_query_add_allocation_pool (query, sink->pool, size, min_bufs, max_bufs);
-- gst_query_add_allocation_param (query, gst_wl_shm_allocator_get (), NULL);
--
-+ if (sink->display->use_drm) {
-+ gst_query_add_allocation_param (query, gst_drm_allocator_get (), NULL);
-+ } else {
-+ gst_query_add_allocation_param (query, gst_wl_shm_allocator_get (), NULL);
-+ }
- gst_structure_free (config);
-
- return TRUE;
-@@ -582,6 +637,10 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
-
- GST_LOG_OBJECT (sink, "render buffer %p", buffer);
-
-+ if (sink->display) {
-+ sink->display->crop = gst_buffer_get_video_crop_meta (buffer);
-+ }
-+
- if (G_UNLIKELY (!sink->window)) {
- /* ask for window handle. Unlock render_lock while doing that because
- * set_window_handle & friends will lock it in this context */
-@@ -623,6 +682,11 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
- wbuf = gst_wl_shm_memory_construct_wl_buffer (mem, sink->display,
- &sink->video_info);
- }
-+
-+ if (gst_is_drm_memory (mem)) {
-+ wbuf = gst_wl_drm_memory_construct_wl_buffer (mem, sink->display,
-+ &sink->video_info);
-+ }
-
- if (wbuf) {
- gst_buffer_add_wl_buffer (buffer, wbuf, sink->display);
-diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h
-index afbed40..c1092ce 100644
---- a/ext/wayland/gstwaylandsink.h
-+++ b/ext/wayland/gstwaylandsink.h
-@@ -27,8 +27,7 @@
-
- #include <wayland-client.h>
-
--#include "wldisplay.h"
--#include "wlwindow.h"
-+#include "wldisplay-wlwindow-wlbuffer.h"
-
- G_BEGIN_DECLS
-
-@@ -61,6 +60,7 @@ struct _GstWaylandSink
- GstVideoInfo video_info;
-
- gchar *display_name;
-+ gboolean use_drm;
-
- gboolean redraw_pending;
- GMutex render_lock;
-diff --git a/ext/wayland/wayland-drm-client-protocol.h b/ext/wayland/wayland-drm-client-protocol.h
-new file mode 100644
-index 0000000..7ddb614
---- /dev/null
-+++ b/ext/wayland/wayland-drm-client-protocol.h
-@@ -0,0 +1,213 @@
-+/*
-+ * Copyright © 2008-2011 Kristian Høgsberg
-+ * Copyright © 2010-2011 Intel Corporation
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this
-+ * software and its documentation for any purpose is hereby granted
-+ * without fee, provided that\n the above copyright notice appear in
-+ * all copies and that both that copyright notice and this permission
-+ * notice appear in supporting documentation, and that the name of
-+ * the copyright holders not be used in advertising or publicity
-+ * pertaining to distribution of the software without specific,
-+ * written prior permission. The copyright holders make no
-+ * representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied
-+ * warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-+ * THIS SOFTWARE.
-+ */
-+
-+#ifndef DRM_CLIENT_PROTOCOL_H
-+#define DRM_CLIENT_PROTOCOL_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <stdint.h>
-+#include <stddef.h>
-+#include "wayland-util.h"
-+
-+struct wl_client;
-+struct wl_resource;
-+
-+struct wl_drm;
-+
-+extern const struct wl_interface wl_drm_interface;
-+
-+#ifndef WL_DRM_ERROR_ENUM
-+#define WL_DRM_ERROR_ENUM
-+enum wl_drm_error {
-+ WL_DRM_ERROR_AUTHENTICATE_FAIL = 0,
-+ WL_DRM_ERROR_INVALID_FORMAT = 1,
-+ WL_DRM_ERROR_INVALID_NAME = 2,
-+};
-+#endif /* WL_DRM_ERROR_ENUM */
-+
-+#ifndef WL_DRM_FORMAT_ENUM
-+#define WL_DRM_FORMAT_ENUM
-+enum wl_drm_format {
-+ WL_DRM_FORMAT_C8 = 0x20203843,
-+ WL_DRM_FORMAT_RGB332 = 0x38424752,
-+ WL_DRM_FORMAT_BGR233 = 0x38524742,
-+ WL_DRM_FORMAT_XRGB4444 = 0x32315258,
-+ WL_DRM_FORMAT_XBGR4444 = 0x32314258,
-+ WL_DRM_FORMAT_RGBX4444 = 0x32315852,
-+ WL_DRM_FORMAT_BGRX4444 = 0x32315842,
-+ WL_DRM_FORMAT_ARGB4444 = 0x32315241,
-+ WL_DRM_FORMAT_ABGR4444 = 0x32314241,
-+ WL_DRM_FORMAT_RGBA4444 = 0x32314152,
-+ WL_DRM_FORMAT_BGRA4444 = 0x32314142,
-+ WL_DRM_FORMAT_XRGB1555 = 0x35315258,
-+ WL_DRM_FORMAT_XBGR1555 = 0x35314258,
-+ WL_DRM_FORMAT_RGBX5551 = 0x35315852,
-+ WL_DRM_FORMAT_BGRX5551 = 0x35315842,
-+ WL_DRM_FORMAT_ARGB1555 = 0x35315241,
-+ WL_DRM_FORMAT_ABGR1555 = 0x35314241,
-+ WL_DRM_FORMAT_RGBA5551 = 0x35314152,
-+ WL_DRM_FORMAT_BGRA5551 = 0x35314142,
-+ WL_DRM_FORMAT_RGB565 = 0x36314752,
-+ WL_DRM_FORMAT_BGR565 = 0x36314742,
-+ WL_DRM_FORMAT_RGB888 = 0x34324752,
-+ WL_DRM_FORMAT_BGR888 = 0x34324742,
-+ WL_DRM_FORMAT_XRGB8888 = 0x34325258,
-+ WL_DRM_FORMAT_XBGR8888 = 0x34324258,
-+ WL_DRM_FORMAT_RGBX8888 = 0x34325852,
-+ WL_DRM_FORMAT_BGRX8888 = 0x34325842,
-+ WL_DRM_FORMAT_ARGB8888 = 0x34325241,
-+ WL_DRM_FORMAT_ABGR8888 = 0x34324241,
-+ WL_DRM_FORMAT_RGBA8888 = 0x34324152,
-+ WL_DRM_FORMAT_BGRA8888 = 0x34324142,
-+ WL_DRM_FORMAT_XRGB2101010 = 0x30335258,
-+ WL_DRM_FORMAT_XBGR2101010 = 0x30334258,
-+ WL_DRM_FORMAT_RGBX1010102 = 0x30335852,
-+ WL_DRM_FORMAT_BGRX1010102 = 0x30335842,
-+ WL_DRM_FORMAT_ARGB2101010 = 0x30335241,
-+ WL_DRM_FORMAT_ABGR2101010 = 0x30334241,
-+ WL_DRM_FORMAT_RGBA1010102 = 0x30334152,
-+ WL_DRM_FORMAT_BGRA1010102 = 0x30334142,
-+ WL_DRM_FORMAT_YUYV = 0x56595559,
-+ WL_DRM_FORMAT_YVYU = 0x55595659,
-+ WL_DRM_FORMAT_UYVY = 0x59565955,
-+ WL_DRM_FORMAT_VYUY = 0x59555956,
-+ WL_DRM_FORMAT_AYUV = 0x56555941,
-+ WL_DRM_FORMAT_NV12 = 0x3231564e,
-+ WL_DRM_FORMAT_NV21 = 0x3132564e,
-+ WL_DRM_FORMAT_NV16 = 0x3631564e,
-+ WL_DRM_FORMAT_NV61 = 0x3136564e,
-+ WL_DRM_FORMAT_YUV410 = 0x39565559,
-+ WL_DRM_FORMAT_YVU410 = 0x39555659,
-+ WL_DRM_FORMAT_YUV411 = 0x31315559,
-+ WL_DRM_FORMAT_YVU411 = 0x31315659,
-+ WL_DRM_FORMAT_YUV420 = 0x32315559,
-+ WL_DRM_FORMAT_YVU420 = 0x32315659,
-+ WL_DRM_FORMAT_YUV422 = 0x36315559,
-+ WL_DRM_FORMAT_YVU422 = 0x36315659,
-+ WL_DRM_FORMAT_YUV444 = 0x34325559,
-+ WL_DRM_FORMAT_YVU444 = 0x34325659,
-+};
-+#endif /* WL_DRM_FORMAT_ENUM */
-+
-+struct wl_drm_listener {
-+ /**
-+ * device - (none)
-+ * @name: (none)
-+ */
-+ void (*device)(void *data,
-+ struct wl_drm *wl_drm,
-+ const char *name);
-+ /**
-+ * format - (none)
-+ * @format: (none)
-+ */
-+ void (*format)(void *data,
-+ struct wl_drm *wl_drm,
-+ uint32_t format);
-+ /**
-+ * authenticated - (none)
-+ */
-+ void (*authenticated)(void *data,
-+ struct wl_drm *wl_drm);
-+};
-+
-+static inline int
-+wl_drm_add_listener(struct wl_drm *wl_drm,
-+ const struct wl_drm_listener *listener, void *data)
-+{
-+ return wl_proxy_add_listener((struct wl_proxy *) wl_drm,
-+ (void (**)(void)) listener, data);
-+}
-+
-+#define WL_DRM_AUTHENTICATE 0
-+#define WL_DRM_CREATE_BUFFER 1
-+#define WL_DRM_CREATE_PLANAR_BUFFER 2
-+
-+static inline void
-+wl_drm_set_user_data(struct wl_drm *wl_drm, void *user_data)
-+{
-+ wl_proxy_set_user_data((struct wl_proxy *) wl_drm, user_data);
-+}
-+
-+static inline void *
-+wl_drm_get_user_data(struct wl_drm *wl_drm)
-+{
-+ return wl_proxy_get_user_data((struct wl_proxy *) wl_drm);
-+}
-+
-+static inline void
-+wl_drm_destroy(struct wl_drm *wl_drm)
-+{
-+ wl_proxy_destroy((struct wl_proxy *) wl_drm);
-+}
-+
-+static inline void
-+wl_drm_authenticate(struct wl_drm *wl_drm, uint32_t id)
-+{
-+ wl_proxy_marshal((struct wl_proxy *) wl_drm,
-+ WL_DRM_AUTHENTICATE, id);
-+}
-+
-+static inline struct wl_buffer *
-+wl_drm_create_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t stride, uint32_t format)
-+{
-+ struct wl_proxy *id;
-+
-+ id = wl_proxy_create((struct wl_proxy *) wl_drm,
-+ &wl_buffer_interface);
-+ if (!id)
-+ return NULL;
-+
-+ wl_proxy_marshal((struct wl_proxy *) wl_drm,
-+ WL_DRM_CREATE_BUFFER, id, name, width, height, stride, format);
-+
-+ return (struct wl_buffer *) id;
-+}
-+
-+static inline struct wl_buffer *
-+wl_drm_create_planar_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
-+{
-+ struct wl_proxy *id;
-+
-+ id = wl_proxy_create((struct wl_proxy *) wl_drm,
-+ &wl_buffer_interface);
-+ if (!id)
-+ return NULL;
-+
-+ wl_proxy_marshal((struct wl_proxy *) wl_drm,
-+ WL_DRM_CREATE_PLANAR_BUFFER, id, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
-+
-+ return (struct wl_buffer *) id;
-+}
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/ext/wayland/wayland-drm-protocol.c b/ext/wayland/wayland-drm-protocol.c
-new file mode 100644
-index 0000000..939af53
---- /dev/null
-+++ b/ext/wayland/wayland-drm-protocol.c
-@@ -0,0 +1,74 @@
-+/*
-+ * Copyright © 2008-2011 Kristian Høgsberg
-+ * Copyright © 2010-2011 Intel Corporation
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this
-+ * software and its documentation for any purpose is hereby granted
-+ * without fee, provided that\n the above copyright notice appear in
-+ * all copies and that both that copyright notice and this permission
-+ * notice appear in supporting documentation, and that the name of
-+ * the copyright holders not be used in advertising or publicity
-+ * pertaining to distribution of the software without specific,
-+ * written prior permission. The copyright holders make no
-+ * representations about the suitability of this software for any
-+ * purpose. It is provided "as is" without express or implied
-+ * warranty.
-+ *
-+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-+ * THIS SOFTWARE.
-+ */
-+
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include "wayland-util.h"
-+
-+#define ARRAY_LENGTH(a) (sizeof (a) /sizeof (a)[0])
-+
-+extern const struct wl_interface wl_buffer_interface;
-+extern const struct wl_interface wl_buffer_interface;
-+
-+static const struct wl_interface *types[] = {
-+ NULL,
-+ &wl_buffer_interface,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ &wl_buffer_interface,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL,
-+};
-+
-+static const struct wl_message wl_drm_requests[] = {
-+ { "authenticate", "u", types + 0 },
-+ { "create_buffer", "nuiiuu", types + 1 },
-+ { "create_planar_buffer", "nuiiuiiiiii", types + 7 },
-+};
-+
-+static const struct wl_message wl_drm_events[] = {
-+ { "device", "s", types + 0 },
-+ { "format", "u", types + 0 },
-+ { "authenticated", "", types + 0 },
-+};
-+
-+WL_EXPORT const struct wl_interface wl_drm_interface = {
-+ "wl_drm", 1,
-+ ARRAY_LENGTH(wl_drm_requests), wl_drm_requests,
-+ ARRAY_LENGTH(wl_drm_events), wl_drm_events,
-+};
-+
-diff --git a/ext/wayland/wlbuffer.c b/ext/wayland/wlbuffer.c
-index 4ac99ef..0e38d2e 100644
---- a/ext/wayland/wlbuffer.c
-+++ b/ext/wayland/wlbuffer.c
-@@ -76,7 +76,7 @@
- * as soon as we remove the reference that GstWlDisplay holds.
- */
-
--#include "wlbuffer.h"
-+#include "wldisplay-wlwindow-wlbuffer.h"
-
- GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
- #define GST_CAT_DEFAULT gstwayland_debug
-diff --git a/ext/wayland/wlbuffer.h b/ext/wayland/wlbuffer.h
-deleted file mode 100644
-index cbb50f7..0000000
---- a/ext/wayland/wlbuffer.h
-+++ /dev/null
-@@ -1,67 +0,0 @@
--/* GStreamer Wayland video sink
-- *
-- * Copyright (C) 2014 Collabora Ltd.
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the Free
-- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- * Boston, MA 02110-1301 USA.
-- */
--
--#ifndef __GST_WL_BUFFER_H__
--#define __GST_WL_BUFFER_H__
--
--#include "wldisplay.h"
--
--G_BEGIN_DECLS
--
--#define GST_TYPE_WL_BUFFER (gst_wl_buffer_get_type ())
--#define GST_WL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_BUFFER, GstWlBuffer))
--#define GST_IS_WL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_BUFFER))
--#define GST_WL_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_BUFFER, GstWlBufferClass))
--#define GST_IS_WL_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_BUFFER))
--#define GST_WL_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_BUFFER, GstWlBufferClass))
--
--typedef struct _GstWlBuffer GstWlBuffer;
--typedef struct _GstWlBufferClass GstWlBufferClass;
--
--struct _GstWlBuffer
--{
-- GObject parent_instance;
--
-- struct wl_buffer * wlbuffer;
-- GstBuffer *gstbuffer;
--
-- GstWlDisplay *display;
--
-- gboolean used_by_compositor;
--};
--
--struct _GstWlBufferClass
--{
-- GObjectClass parent_class;
--};
--
--GType gst_wl_buffer_get_type (void);
--
--GstWlBuffer * gst_buffer_add_wl_buffer (GstBuffer * gstbuffer,
-- struct wl_buffer * wlbuffer, GstWlDisplay * display);
--GstWlBuffer * gst_buffer_get_wl_buffer (GstBuffer * gstbuffer);
--
--void gst_wl_buffer_force_release_and_unref (GstWlBuffer * self);
--
--void gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface);
--
--G_END_DECLS
--
--#endif /* __GST_WL_BUFFER_H__ */
-diff --git a/ext/wayland/wldisplay-wlwindow-wlbuffer.h b/ext/wayland/wldisplay-wlwindow-wlbuffer.h
-new file mode 100644
-index 0000000..684d145
---- /dev/null
-+++ b/ext/wayland/wldisplay-wlwindow-wlbuffer.h
-@@ -0,0 +1,216 @@
-+/* GStreamer Wayland video sink
-+ *
-+ * Copyright (C) 2014 Collabora Ltd.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the Free
-+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-+ * Boston, MA 02110-1301 USA.
-+ */
-+
-+#ifndef __GST_WL_DISPLAY_WL_WINDOW_H__
-+#define __GST_WL_DISPLAY_WL_WINDOW_H__
-+
-+#include <gst/gst.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <wayland-client.h>
-+#include "scaler-client-protocol.h"
-+#include <gst/video/video.h>
-+#include <gst/video/gstvideometa.h>
-+
-+G_BEGIN_DECLS
-+
-+#define GST_TYPE_WL_DISPLAY (gst_wl_display_get_type ())
-+#define GST_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplay))
-+#define GST_IS_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_DISPLAY))
-+#define GST_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
-+#define GST_IS_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_DISPLAY))
-+#define GST_WL_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
-+
-+#define GST_TYPE_WL_WINDOW (gst_wl_window_get_type ())
-+#define GST_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_WINDOW, GstWlWindow))
-+#define GST_IS_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_WINDOW))
-+#define GST_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_WINDOW, GstWlWindowClass))
-+#define GST_IS_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_WINDOW))
-+#define GST_WL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_WINDOW, GstWlWindowClass))
-+
-+#define GST_TYPE_WL_BUFFER (gst_wl_buffer_get_type ())
-+#define GST_WL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_BUFFER, GstWlBuffer))
-+#define GST_IS_WL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_BUFFER))
-+#define GST_WL_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_BUFFER, GstWlBufferClass))
-+#define GST_IS_WL_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_BUFFER))
-+#define GST_WL_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_BUFFER, GstWlBufferClass))
-+
-+typedef struct _GstWlBuffer GstWlBuffer;
-+typedef struct _GstWlBufferClass GstWlBufferClass;
-+
-+typedef struct _GstWlWindow GstWlWindow;
-+typedef struct _GstWlWindowClass GstWlWindowClass;
-+
-+typedef struct _GstWlDisplay GstWlDisplay;
-+typedef struct _GstWlDisplayClass GstWlDisplayClass;
-+
-+struct _GstWlBuffer
-+{
-+ GObject parent_instance;
-+
-+ struct wl_buffer * wlbuffer;
-+ GstBuffer *gstbuffer;
-+
-+ GstWlDisplay *display;
-+
-+ gboolean used_by_compositor;
-+};
-+
-+struct _GstWlBufferClass
-+{
-+ GObjectClass parent_class;
-+};
-+
-+GType gst_wl_buffer_get_type (void);
-+
-+GstWlBuffer * gst_buffer_add_wl_buffer (GstBuffer * gstbuffer,
-+ struct wl_buffer * wlbuffer, GstWlDisplay * display);
-+GstWlBuffer * gst_buffer_get_wl_buffer (GstBuffer * gstbuffer);
-+
-+void gst_wl_buffer_force_release_and_unref (GstWlBuffer * self);
-+
-+void gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface);
-+
-+
-+struct touch_point
-+{
-+ int32_t id;
-+ struct wl_list link;
-+};
-+
-+struct input
-+{
-+ GstWlDisplay *display;
-+ struct wl_seat *seat;
-+ struct wl_pointer *pointer;
-+ struct wl_touch *touch;
-+ struct wl_list touch_point_list;
-+ GstWlWindow *pointer_focus;
-+ GstWlWindow *touch_focus;
-+ struct wl_list link;
-+ GstWlWindow *grab;
-+};
-+
-+
-+struct _GstWlWindow
-+{
-+ GObject parent_instance;
-+
-+ GstWlDisplay *display;
-+ struct wl_surface *area_surface;
-+ struct wl_subsurface *area_subsurface;
-+ struct wl_viewport *area_viewport;
-+ struct wl_surface *video_surface;
-+ struct wl_subsurface *video_subsurface;
-+ struct wl_viewport *video_viewport;
-+ struct wl_shell_surface *shell_surface;
-+
-+ /* the size and position of the area_(sub)surface */
-+ GstVideoRectangle render_rectangle;
-+ /* the size of the video in the buffers */
-+ gint video_width, video_height;
-+ /* the size of the video_(sub)surface */
-+ gint surface_width, surface_height;
-+};
-+
-+struct _GstWlWindowClass
-+{
-+ GObjectClass parent_class;
-+};
-+
-+GType gst_wl_window_get_type (void);
-+
-+GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
-+ const GstVideoInfo * info);
-+GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
-+ struct wl_surface * parent);
-+
-+GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
-+struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);
-+gboolean gst_wl_window_is_toplevel (GstWlWindow *window);
-+
-+void gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer,
-+ const GstVideoInfo * info);
-+void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
-+ gint w, gint h);
-+
-+
-+struct _GstWlDisplay
-+{
-+ GObject parent_instance;
-+
-+ /* public objects */
-+ struct wl_display *display;
-+ struct wl_event_queue *queue;
-+
-+ /* globals */
-+ struct wl_registry *registry;
-+ struct wl_compositor *compositor;
-+ struct wl_subcompositor *subcompositor;
-+ struct wl_shell *shell;
-+ struct wl_shm *shm;
-+ struct wl_drm *drm;
-+ struct wl_scaler *scaler;
-+ GArray *shm_formats;
-+
-+ /* private */
-+ gboolean own_display;
-+ GThread *thread;
-+ GstPoll *wl_fd_poll;
-+
-+ GMutex buffers_mutex;
-+ GHashTable *buffers;
-+ gboolean shutting_down;
-+
-+ /* the drm device.. needed for sharing direct-render buffers..
-+ * TODO nothing about this should really be omapdrm specific. But some
-+ * of the code, like hashtable of imported buffers in libdrm_omap should
-+ * be refactored out into some generic libdrm code..
-+ */
-+ struct omap_device *dev;
-+ int fd;
-+ int authenticated;
-+ gboolean use_drm;
-+
-+ struct wl_list input_list;
-+ int seat_version;
-+ uint32_t serial;
-+
-+ GstVideoCropMeta *crop;
-+};
-+
-+struct _GstWlDisplayClass
-+{
-+ GObjectClass parent_class;
-+};
-+
-+GType gst_wl_display_get_type (void);
-+
-+GstWlDisplay *gst_wl_display_new (const gchar * name, GError ** error);
-+GstWlDisplay *gst_wl_display_new_existing (struct wl_display * display,
-+ gboolean take_ownership, GError ** error);
-+
-+/* see wlbuffer.c for explanation */
-+void gst_wl_display_register_buffer (GstWlDisplay * self, gpointer buf);
-+void gst_wl_display_unregister_buffer (GstWlDisplay * self, gpointer buf);
-+
-+G_END_DECLS
-+
-+#endif /* __GST_WL_DISPLAY_WL_WINDOW_H__ */
-diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
-index 3318095..2f58fd2 100644
---- a/ext/wayland/wldisplay.c
-+++ b/ext/wayland/wldisplay.c
-@@ -22,9 +22,15 @@
- #include <config.h>
- #endif
-
--#include "wldisplay.h"
--#include "wlbuffer.h"
--
-+#include "wldisplay-wlwindow-wlbuffer.h"
-+
-+#include <wayland-client-protocol.h>
-+#include "wayland-drm-client-protocol.h"
-+#include <linux/input.h>
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <fcntl.h>
-+#include <unistd.h>
- #include <errno.h>
-
- GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
-@@ -33,6 +39,8 @@ GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
- G_DEFINE_TYPE (GstWlDisplay, gst_wl_display, G_TYPE_OBJECT);
-
- static void gst_wl_display_finalize (GObject * gobject);
-+static void input_grab (struct input *input, GstWlWindow *window);
-+static void input_ungrab (struct input *input);
-
- static void
- gst_wl_display_class_init (GstWlDisplayClass * klass)
-@@ -45,12 +53,62 @@ static void
- gst_wl_display_init (GstWlDisplay * self)
- {
- self->shm_formats = g_array_new (FALSE, FALSE, sizeof (uint32_t));
-+ self->fd = -1;
-+ self->use_drm = FALSE;
- self->wl_fd_poll = gst_poll_new (TRUE);
- self->buffers = g_hash_table_new (g_direct_hash, g_direct_equal);
- g_mutex_init (&self->buffers_mutex);
- }
-
- static void
-+input_grab (struct input *input, GstWlWindow *window)
-+{
-+ input->grab = window;
-+}
-+
-+static void
-+input_ungrab (struct input *input)
-+{
-+ input->grab = NULL;
-+}
-+
-+static void
-+input_remove_pointer_focus (struct input *input)
-+{
-+ GstWlWindow *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ input->pointer_focus = NULL;
-+}
-+
-+static void
-+input_destroy (struct input *input)
-+{
-+ input_remove_pointer_focus (input);
-+
-+ if (input->display->seat_version >= 3) {
-+ if (input->pointer)
-+ wl_pointer_release (input->pointer);
-+ }
-+
-+ wl_list_remove (&input->link);
-+ wl_seat_destroy (input->seat);
-+ free (input);
-+}
-+
-+static void
-+display_destroy_inputs (GstWlDisplay *display)
-+{
-+ struct input *tmp;
-+ struct input *input;
-+
-+ wl_list_for_each_safe (input, tmp, &display->input_list, link)
-+ input_destroy (input);
-+}
-+
-+static void
- gst_wl_display_finalize (GObject * gobject)
- {
- GstWlDisplay *self = GST_WL_DISPLAY (gobject);
-@@ -71,13 +129,26 @@ gst_wl_display_finalize (GObject * gobject)
- g_hash_table_remove_all (self->buffers);
-
- g_array_unref (self->shm_formats);
-+
-+ if (self->dev) {
-+ omap_device_del (self->dev);
-+ self->dev = NULL;
-+ }
-+ if (self->fd !=-1)
-+ close (self->fd);
-+
- gst_poll_free (self->wl_fd_poll);
- g_hash_table_unref (self->buffers);
- g_mutex_clear (&self->buffers_mutex);
-
-+ display_destroy_inputs (self);
-+
- if (self->shm)
- wl_shm_destroy (self->shm);
-
-+ if (self->drm)
-+ wl_drm_destroy (self->drm);
-+
- if (self->shell)
- wl_shell_destroy (self->shell);
-
-@@ -138,12 +209,277 @@ shm_format (void *data, struct wl_shm *wl_shm, uint32_t format)
- GstWlDisplay *self = data;
-
- g_array_append_val (self->shm_formats, format);
-+ GST_DEBUG ("shm got format: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format));
- }
-
- static const struct wl_shm_listener shm_listener = {
- shm_format
- };
-
-+/* For wl_drm_listener */
-+
-+static void
-+drm_handle_device (void *data, struct wl_drm *drm, const char *device)
-+{
-+ GstWlDisplay *d = data;
-+ drm_magic_t magic;
-+ d->fd = open (device, O_RDWR | O_CLOEXEC);
-+ if (d->fd == -1) {
-+ GST_ERROR ("could not open %s: %m", device);
-+ return;
-+ }
-+ drmGetMagic (d->fd, &magic);
-+ wl_drm_authenticate (d->drm, magic);
-+}
-+
-+static void
-+drm_handle_format (void *data, struct wl_drm *drm, uint32_t format)
-+{
-+ GstWlDisplay *self = data;
-+ g_array_append_val (self->shm_formats, format);
-+ GST_DEBUG ("drm got format: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format));
-+}
-+
-+static void
-+drm_handle_authenticated (void *data, struct wl_drm *drm)
-+{
-+ GstWlDisplay *d = data;
-+ GST_DEBUG ("authenticated");
-+ d->dev = omap_device_new (d->fd);
-+ d->authenticated = 1;
-+ GST_DEBUG ("drm_handle_authenticated: dev: %p, d->authenticated: %d\n",
-+ d->dev, d->authenticated);
-+}
-+
-+static const struct wl_drm_listener drm_listener = {
-+ drm_handle_device,
-+ drm_handle_format,
-+ drm_handle_authenticated
-+};
-+
-+
-+static void
-+pointer_handle_enter (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface,
-+ wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+
-+ if (!surface) {
-+ /* enter event for a window we've just destroyed */
-+ return;
-+ }
-+
-+ input->display->serial = serial;
-+ input->pointer_focus = wl_surface_get_user_data (surface);
-+}
-+
-+static void
-+pointer_handle_leave (void *data, struct wl_pointer *pointer,
-+ uint32_t serial, struct wl_surface *surface)
-+{
-+ struct input *input = data;
-+
-+ input_remove_pointer_focus (input);
-+}
-+
-+static void
-+pointer_handle_motion (void *data, struct wl_pointer *pointer,
-+ uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w)
-+{
-+ struct input *input = data;
-+ GstWlWindow *window = input->pointer_focus;
-+
-+ if (!window)
-+ return;
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+
-+}
-+
-+static void
-+pointer_handle_button (void *data, struct wl_pointer *pointer, uint32_t serial,
-+ uint32_t time, uint32_t button, uint32_t state_w)
-+{
-+ struct input *input = data;
-+ enum wl_pointer_button_state state = state_w;
-+ input->display->serial = serial;
-+
-+ if (button == BTN_LEFT) {
-+ if (state == WL_POINTER_BUTTON_STATE_PRESSED)
-+ input_grab (input, input->pointer_focus);
-+
-+ if (input->grab && state == WL_POINTER_BUTTON_STATE_RELEASED)
-+ input_ungrab (input);
-+ }
-+
-+ if (input->grab)
-+ wl_shell_surface_move (input->grab->shell_surface, input->seat,
-+ input->display->serial);
-+}
-+
-+static void
-+pointer_handle_axis (void *data, struct wl_pointer *pointer,
-+ uint32_t time, uint32_t axis, wl_fixed_t value)
-+{
-+}
-+
-+static const struct wl_pointer_listener pointer_listener = {
-+ pointer_handle_enter,
-+ pointer_handle_leave,
-+ pointer_handle_motion,
-+ pointer_handle_button,
-+ pointer_handle_axis,
-+};
-+
-+static void
-+touch_handle_down (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, struct wl_surface *surface,
-+ int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+ input->display->serial = serial;
-+ input->touch_focus = wl_surface_get_user_data (surface);
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ tp = malloc (sizeof *tp);
-+ if (tp) {
-+ tp->id = id;
-+ wl_list_insert (&input->touch_point_list, &tp->link);
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ serial);
-+ }
-+}
-+
-+static void
-+touch_handle_motion (void *data, struct wl_touch *wl_touch,
-+ uint32_t time, int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp;
-+
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+ wl_list_for_each (tp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_shell_surface_move (input->touch_focus->shell_surface, input->seat,
-+ input->display->serial);
-+
-+ return;
-+ }
-+}
-+
-+static void
-+touch_handle_frame (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_cancel (void *data, struct wl_touch *wl_touch)
-+{
-+}
-+
-+static void
-+touch_handle_up (void *data, struct wl_touch *wl_touch,
-+ uint32_t serial, uint32_t time, int32_t id)
-+{
-+ struct input *input = data;
-+ struct touch_point *tp, *tmp;
-+
-+ if (!input->touch_focus) {
-+ return;
-+ }
-+
-+ wl_list_for_each_safe (tp, tmp, &input->touch_point_list, link) {
-+ if (tp->id != id)
-+ continue;
-+
-+ wl_list_remove (&tp->link);
-+ free (tp);
-+
-+ return;
-+ }
-+}
-+
-+static const struct wl_touch_listener touch_listener = {
-+ touch_handle_down,
-+ touch_handle_up,
-+ touch_handle_motion,
-+ touch_handle_frame,
-+ touch_handle_cancel,
-+};
-+
-+
-+static void
-+seat_handle_capabilities (void *data, struct wl_seat *seat,
-+ enum wl_seat_capability caps)
-+{
-+ struct input *input = data;
-+
-+ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) {
-+ input->pointer = wl_seat_get_pointer (seat);
-+ wl_pointer_set_user_data (input->pointer, input);
-+ wl_pointer_add_listener (input->pointer, &pointer_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && input->pointer) {
-+ wl_pointer_destroy (input->pointer);
-+ input->pointer = NULL;
-+ }
-+
-+ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) {
-+ input->touch = wl_seat_get_touch (seat);
-+ wl_touch_set_user_data (input->touch, input);
-+ wl_touch_add_listener (input->touch, &touch_listener, input);
-+ } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) {
-+ wl_touch_destroy (input->touch);
-+ input->touch = NULL;
-+ }
-+}
-+
-+static void
-+seat_handle_name (void *data, struct wl_seat *seat, const char *name)
-+{
-+
-+}
-+
-+static const struct wl_seat_listener seat_listener = {
-+ seat_handle_capabilities,
-+ seat_handle_name
-+};
-+
-+static void
-+display_add_input (GstWlDisplay *d, uint32_t id)
-+{
-+ struct input *input;
-+
-+ input = calloc (1, sizeof (*input));
-+ if (input == NULL) {
-+ fprintf (stderr, "%s: out of memory\n", "gst-wayland-sink");
-+ exit (EXIT_FAILURE);
-+ }
-+ input->display = d;
-+ input->seat = wl_registry_bind (d->registry, id, &wl_seat_interface,
-+ MAX (d->seat_version, 3));
-+ input->touch_focus = NULL;
-+ input->pointer_focus = NULL;
-+ wl_list_init (&input->touch_point_list);
-+ wl_list_insert (d->input_list.prev, &input->link);
-+
-+ wl_seat_add_listener (input->seat, &seat_listener, input);
-+ wl_seat_set_user_data (input->seat, input);
-+
-+}
-+
-+
- static void
- registry_handle_global (void *data, struct wl_registry *registry,
- uint32_t id, const char *interface, uint32_t version)
-@@ -161,6 +497,12 @@ registry_handle_global (void *data, struct wl_registry *registry,
- } else if (g_strcmp0 (interface, "wl_shm") == 0) {
- self->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);
- wl_shm_add_listener (self->shm, &shm_listener, self);
-+ } else if (g_strcmp0 (interface, "wl_drm") == 0) {
-+ self->drm = wl_registry_bind (registry, id, &wl_drm_interface, 1);
-+ wl_drm_add_listener (self->drm, &drm_listener, self);
-+ } else if (g_strcmp0 (interface, "wl_seat") == 0) {
-+ self->seat_version = version;
-+ display_add_input (self, id);
- } else if (g_strcmp0 (interface, "wl_scaler") == 0) {
- self->scaler = wl_registry_bind (registry, id, &wl_scaler_interface, 2);
- }
-@@ -238,6 +580,7 @@ gst_wl_display_new_existing (struct wl_display * display,
- self->own_display = take_ownership;
-
- self->queue = wl_display_create_queue (self->display);
-+ wl_list_init (&self->input_list);
- self->registry = wl_display_get_registry (self->display);
- wl_proxy_set_queue ((struct wl_proxy *) self->registry, self->queue);
- wl_registry_add_listener (self->registry, &registry_listener, self);
-@@ -266,6 +609,7 @@ gst_wl_display_new_existing (struct wl_display * display,
- VERIFY_INTERFACE_EXISTS (subcompositor, "wl_subcompositor");
- VERIFY_INTERFACE_EXISTS (shell, "wl_shell");
- VERIFY_INTERFACE_EXISTS (shm, "wl_shm");
-+ VERIFY_INTERFACE_EXISTS (drm, "wl_drm");
- VERIFY_INTERFACE_EXISTS (scaler, "wl_scaler");
-
- #undef VERIFY_INTERFACE_EXISTS
-diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h
-deleted file mode 100644
-index e9df749..0000000
---- a/ext/wayland/wldisplay.h
-+++ /dev/null
-@@ -1,84 +0,0 @@
--/* GStreamer Wayland video sink
-- *
-- * Copyright (C) 2014 Collabora Ltd.
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the Free
-- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- * Boston, MA 02110-1301 USA.
-- */
--
--#ifndef __GST_WL_DISPLAY_H__
--#define __GST_WL_DISPLAY_H__
--
--#include <gst/gst.h>
--#include <wayland-client.h>
--#include "scaler-client-protocol.h"
--
--G_BEGIN_DECLS
--
--#define GST_TYPE_WL_DISPLAY (gst_wl_display_get_type ())
--#define GST_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplay))
--#define GST_IS_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_DISPLAY))
--#define GST_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
--#define GST_IS_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_DISPLAY))
--#define GST_WL_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
--
--typedef struct _GstWlDisplay GstWlDisplay;
--typedef struct _GstWlDisplayClass GstWlDisplayClass;
--
--struct _GstWlDisplay
--{
-- GObject parent_instance;
--
-- /* public objects */
-- struct wl_display *display;
-- struct wl_event_queue *queue;
--
-- /* globals */
-- struct wl_registry *registry;
-- struct wl_compositor *compositor;
-- struct wl_subcompositor *subcompositor;
-- struct wl_shell *shell;
-- struct wl_shm *shm;
-- struct wl_scaler *scaler;
-- GArray *shm_formats;
--
-- /* private */
-- gboolean own_display;
-- GThread *thread;
-- GstPoll *wl_fd_poll;
--
-- GMutex buffers_mutex;
-- GHashTable *buffers;
-- gboolean shutting_down;
--};
--
--struct _GstWlDisplayClass
--{
-- GObjectClass parent_class;
--};
--
--GType gst_wl_display_get_type (void);
--
--GstWlDisplay *gst_wl_display_new (const gchar * name, GError ** error);
--GstWlDisplay *gst_wl_display_new_existing (struct wl_display * display,
-- gboolean take_ownership, GError ** error);
--
--/* see wlbuffer.c for explanation */
--void gst_wl_display_register_buffer (GstWlDisplay * self, gpointer buf);
--void gst_wl_display_unregister_buffer (GstWlDisplay * self, gpointer buf);
--
--G_END_DECLS
--
--#endif /* __GST_WL_DISPLAY_H__ */
-diff --git a/ext/wayland/wldrm.c b/ext/wayland/wldrm.c
-new file mode 100644
-index 0000000..3dc9c21
---- /dev/null
-+++ b/ext/wayland/wldrm.c
-@@ -0,0 +1,69 @@
-+#include "wldisplay-wlwindow-wlbuffer.h"
-+#include <gst/drm/gstdrmallocator.h>
-+#include "wayland-drm-client-protocol.h"
-+#include <omap_drm.h>
-+#include <omap_drmif.h>
-+#include <wayland-client.h>
-+
-+struct wl_buffer *
-+gst_wl_drm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
-+ const GstVideoInfo * info)
-+{
-+ gint video_width = GST_VIDEO_INFO_WIDTH (info);
-+ gint video_height = GST_VIDEO_INFO_HEIGHT (info);
-+ int fd = -1;
-+ struct omap_bo *bo;
-+ struct wl_buffer *buffer;
-+
-+ /* TODO get format, etc from caps.. and query device for
-+ * supported formats, and make this all more flexible to
-+ * cope with various formats:
-+ */
-+ uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
-+ uint32_t name;
-+ /* note: wayland and mesa use the terminology:
-+ * stride - rowstride in bytes
-+ * pitch - rowstride in pixels
-+ */
-+ uint32_t strides[3] = {
-+ GST_ROUND_UP_4 (video_width), GST_ROUND_UP_4 (video_width), 0,
-+ };
-+ uint32_t offsets[3] = {
-+ 0, strides[0] * video_height, 0
-+ };
-+
-+ fd = gst_fd_memory_get_fd (mem);
-+
-+ if (fd < 0 ) {
-+ GST_DEBUG ("Invalid fd");
-+ return NULL;
-+ }
-+
-+ bo = omap_bo_from_dmabuf (display->dev, fd);
-+
-+ struct drm_gem_flink req = {
-+ .handle = omap_bo_handle(bo),
-+ };
-+
-+ int ret;
-+ ret = drmIoctl(display->fd, DRM_IOCTL_GEM_FLINK, &req);
-+ if (ret) {
-+ GST_DEBUG ("could not get name, DRM_IOCTL_GEM_FLINK returned %d", ret);
-+ return NULL;
-+ }
-+
-+ name = req.name;
-+
-+ GST_LOG ("width = %d , height = %d , fourcc = %d ", video_width, video_height, fourcc );
-+ buffer = wl_drm_create_planar_buffer (display->drm, name,
-+ video_width, video_height, fourcc,
-+ offsets[0], strides[0],
-+ offsets[1], strides[1],
-+ offsets[2], strides[2]);
-+
-+ GST_DEBUG ("create planar buffer: %p (name=%d)",
-+ buffer, name);
-+
-+ return buffer;
-+}
-+
-diff --git a/ext/wayland/wldrm.h b/ext/wayland/wldrm.h
-new file mode 100644
-index 0000000..9751029
---- /dev/null
-+++ b/ext/wayland/wldrm.h
-@@ -0,0 +1,3 @@
-+struct wl_buffer *
-+gst_wl_drm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
-+ const GstVideoInfo * info);
-diff --git a/ext/wayland/wlshmallocator.h b/ext/wayland/wlshmallocator.h
-index 07ae17f..2860fc3 100644
---- a/ext/wayland/wlshmallocator.h
-+++ b/ext/wayland/wlshmallocator.h
-@@ -26,7 +26,7 @@
- #include <gst/video/video.h>
- #include <gst/allocators/allocators.h>
- #include <wayland-client-protocol.h>
--#include "wldisplay.h"
-+#include "wldisplay-wlwindow-wlbuffer.h"
-
- G_BEGIN_DECLS
-
-diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c
-index 1302da6..aa336aa 100644
---- a/ext/wayland/wlvideoformat.c
-+++ b/ext/wayland/wlvideoformat.c
-@@ -106,6 +106,10 @@ gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format)
- const gchar *
- gst_wl_shm_format_to_string (enum wl_shm_format wl_format)
- {
-- return gst_video_format_to_string
-- (gst_wl_shm_format_to_video_format (wl_format));
-+ GstVideoFormat fmt = gst_wl_shm_format_to_video_format (wl_format);
-+ if (fmt != GST_VIDEO_FORMAT_UNKNOWN) {
-+ return gst_video_format_to_string (fmt);
-+ } else {
-+ return NULL;
-+ }
- }
-diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
-index 79000ae..f7e3324 100644
---- a/ext/wayland/wlwindow.c
-+++ b/ext/wayland/wlwindow.c
-@@ -24,9 +24,10 @@
- #include <config.h>
- #endif
-
--#include "wlwindow.h"
-+#include "wldisplay-wlwindow-wlbuffer.h"
- #include "wlshmallocator.h"
--#include "wlbuffer.h"
-+#include "wldrm.h"
-+#include <gst/drm/gstdrmallocator.h>
-
- GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
- #define GST_CAT_DEFAULT gstwayland_debug
-@@ -111,6 +112,8 @@ gst_wl_window_new_internal (GstWlDisplay * display)
-
- window->area_surface = wl_compositor_create_surface (display->compositor);
- window->video_surface = wl_compositor_create_surface (display->compositor);
-+ wl_surface_set_user_data (window->area_surface, window);
-+ wl_surface_set_user_data (window->video_surface, window);
-
- wl_proxy_set_queue ((struct wl_proxy *) window->area_surface, display->queue);
- wl_proxy_set_queue ((struct wl_proxy *) window->video_surface,
-@@ -126,6 +129,21 @@ gst_wl_window_new_internal (GstWlDisplay * display)
- window->area_surface);
- window->video_viewport = wl_scaler_get_viewport (display->scaler,
- window->video_surface);
-+ if (display->crop) {
-+ GST_DEBUG ("Setting source crop : %d %d %d %d",display->crop->x, display->crop->y,
-+ display->crop->width, display->crop->height);
-+ wl_viewport_set_source (window->area_viewport,
-+ wl_fixed_from_int(display->crop->x),
-+ wl_fixed_from_int(display->crop->y),
-+ wl_fixed_from_int(display->crop->width),
-+ wl_fixed_from_int(display->crop->height));
-+ wl_viewport_set_source (window->video_viewport,
-+ wl_fixed_from_int(display->crop->x),
-+ wl_fixed_from_int(display->crop->y),
-+ wl_fixed_from_int(display->crop->width),
-+ wl_fixed_from_int(display->crop->height));
-+
-+ }
-
- /* draw the area_subsurface */
- gst_video_info_set_format (&info,
-@@ -136,14 +154,25 @@ gst_wl_window_new_internal (GstWlDisplay * display)
- GST_VIDEO_FORMAT_BGRx,
- #endif
- 1, 1);
--
-- buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info.size, NULL);
-+ if (display->use_drm) {
-+ buf = gst_buffer_new_allocate (gst_drm_allocator_get (), info.size, NULL);
-+ } else {
-+ buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info.size, NULL);
-+ }
- gst_buffer_map (buf, &mapinfo, GST_MAP_WRITE);
-- *((guint32 *) mapinfo.data) = 0; /* paint it black */
-- gst_buffer_unmap (buf, &mapinfo);
-- wlbuf =
-- gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
-- display, &info);
-+ *((guint32 *) mapinfo.data) = 0; /* paint it black */
-+ gst_buffer_unmap (buf, &mapinfo);
-+
-+ if (display->use_drm) {
-+ wlbuf =
-+ gst_wl_drm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
-+ display, &info);
-+ } else {
-+ wlbuf =
-+ gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
-+ display, &info);
-+ }
-+
- gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, display);
- gst_wl_buffer_attach (gwlbuf, window->area_surface);
-
-diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h
-deleted file mode 100644
-index e22cb26..0000000
---- a/ext/wayland/wlwindow.h
-+++ /dev/null
-@@ -1,84 +0,0 @@
--/* GStreamer Wayland video sink
-- *
-- * Copyright (C) 2014 Collabora Ltd.
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the Free
-- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- * Boston, MA 02110-1301 USA.
-- */
--
--#ifndef __GST_WL_WINDOW_H__
--#define __GST_WL_WINDOW_H__
--
--#include "wldisplay.h"
--#include "wlbuffer.h"
--#include <gst/video/video.h>
--
--G_BEGIN_DECLS
--
--#define GST_TYPE_WL_WINDOW (gst_wl_window_get_type ())
--#define GST_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_WINDOW, GstWlWindow))
--#define GST_IS_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_WINDOW))
--#define GST_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_WINDOW, GstWlWindowClass))
--#define GST_IS_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_WINDOW))
--#define GST_WL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_WINDOW, GstWlWindowClass))
--
--typedef struct _GstWlWindow GstWlWindow;
--typedef struct _GstWlWindowClass GstWlWindowClass;
--
--struct _GstWlWindow
--{
-- GObject parent_instance;
--
-- GstWlDisplay *display;
-- struct wl_surface *area_surface;
-- struct wl_subsurface *area_subsurface;
-- struct wl_viewport *area_viewport;
-- struct wl_surface *video_surface;
-- struct wl_subsurface *video_subsurface;
-- struct wl_viewport *video_viewport;
-- struct wl_shell_surface *shell_surface;
--
-- /* the size and position of the area_(sub)surface */
-- GstVideoRectangle render_rectangle;
-- /* the size of the video in the buffers */
-- gint video_width, video_height;
-- /* the size of the video_(sub)surface */
-- gint surface_width, surface_height;
--};
--
--struct _GstWlWindowClass
--{
-- GObjectClass parent_class;
--};
--
--GType gst_wl_window_get_type (void);
--
--GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
-- const GstVideoInfo * info);
--GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
-- struct wl_surface * parent);
--
--GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
--struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);
--gboolean gst_wl_window_is_toplevel (GstWlWindow *window);
--
--void gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer,
-- const GstVideoInfo * info);
--void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
-- gint w, gint h);
--
--G_END_DECLS
--
--#endif /* __GST_WL_WINDOW_H__ */
---
-2.7.4
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0005-gstwaylandsink-Implement-callbacks-for-version-5-of-.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0005-gstwaylandsink-Implement-callbacks-for-version-5-of-.patch
deleted file mode 100644
index bcb66c816..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0005-gstwaylandsink-Implement-callbacks-for-version-5-of-.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From adfc38273882a102d25fc420adc82b3f225588f9 Mon Sep 17 00:00:00 2001
-From: Pooja Prajod <a0132412@ti.com>
-Date: Mon, 27 Mar 2017 18:27:06 +0530
-Subject: [PATCH] gstwaylandsink: Implement callbacks for version 5 of
- wl_pointer
-
-Few extra callbacks are required for wl_pointer listener
-with the newer weston. Without the extra dummy callbacks
-the pipelines results in segfault.
-
-Signed-off-by: Pooja Prajod <a0132412@ti.com>
----
- ext/wayland/wldisplay.c | 22 +++++++++++++++++++++-
- 1 file changed, 21 insertions(+), 1 deletion(-)
-
-diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
-index 2f58fd2..54acfdb 100644
---- a/ext/wayland/wldisplay.c
-+++ b/ext/wayland/wldisplay.c
-@@ -326,12 +326,25 @@ pointer_handle_axis (void *data, struct wl_pointer *pointer,
- {
- }
-
-+static void pointer_frame(void *data, struct wl_pointer *wl_pointer)
-+{
-+}
-+static void pointer_axis_source(void *data, struct wl_pointer *wl_pointer, uint32_t axis_source)
-+{
-+}
-+void pointer_axis_stop(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis)
-+{
-+}
-+
- static const struct wl_pointer_listener pointer_listener = {
- pointer_handle_enter,
- pointer_handle_leave,
- pointer_handle_motion,
- pointer_handle_button,
- pointer_handle_axis,
-+ pointer_frame,
-+ pointer_axis_source,
-+ pointer_axis_stop
- };
-
- static void
-@@ -508,8 +521,15 @@ registry_handle_global (void *data, struct wl_registry *registry,
- }
- }
-
-+static void
-+registry_handle_global_remove(void *data, struct wl_registry *registry,
-+ uint32_t name)
-+{
-+}
-+
- static const struct wl_registry_listener registry_listener = {
-- registry_handle_global
-+ registry_handle_global,
-+ registry_handle_global_remove
- };
-
- static gpointer
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
deleted file mode 100644
index 8d3e6c7a7..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
+++ /dev/null
@@ -1,31 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PACKAGECONFIG = "faad"
-
-# gstreamer is now also included on Keystone, be mindful of any Graphics dependencies
-PACKAGECONFIG_append_omap-a15 = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-PACKAGECONFIG_append_ti43x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-PACKAGECONFIG_append_ti33x = " ${@bb.utils.contains('DISTRO_FEATURES','wayland','wayland','',d)}"
-
-DEPENDS_append_omap-a15 = " \
- libdrm \
-"
-
-DEPENDS_append_ti43x = " \
- libdrm \
-"
-
-DEPENDS_append_ti33x = " \
- libdrm \
-"
-
-############## F I X M E #####################
-# FIXME rocko
-DISABLED_ROCKO_SRC_URI_append = " \
- file://0001-gstdrmallocator-Add-DRM-allocator-support.patch \
-"
-################ F I X M E ####################
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-PR = "r4"
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/ipumm-fw/ipumm-fw_3.00.13.00.bb b/meta-agl-bsp/meta-ti/recipes-arago/ipumm-fw/ipumm-fw_3.00.13.00.bb
deleted file mode 100644
index a9653f4d3..000000000
--- a/meta-agl-bsp/meta-ti/recipes-arago/ipumm-fw/ipumm-fw_3.00.13.00.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-python __anonymous() {
- features = d.getVar("MACHINE_FEATURES", 1)
- if not features:
- return
- if "mmip" not in features:
- raise bb.parse.SkipPackage('ipumm-fw does not apply to systems without the "mmip" flag in MACHINE_FEATURES')
-}
-
-DESCRIPTION = "Firmware for IPU for supporting Accelerated MM decode and encode"
-LICENSE = "TI-TSPA"
-
-LIC_FILES_CHKSUM = "file://MMIP-${PV}-Manifest.doc;md5=255f135205844dcbeab09b481ff9fb3a"
-
-COMPATIBLE_MACHINE = "dra7xx"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-RDEPENDS_${PN} = " libdce"
-
-SRC_URI = "http://downloads.ti.com/infotainment/esd/jacinto6/processor-sdk-linux-automotive/03_02_00_03/exports/ipumm-dra7xx-evm-${PV}.tar.gz;protocol=http"
-
-SRC_URI[md5sum] = "d5cf8c3be28f22cd94e97ab2b781a4df"
-SRC_URI[sha256sum] = "b003a981cc97d834c81ec653dca9888c0e6c99500ee695a24f3221898f6afed4"
-
-S = "${WORKDIR}/ipumm-dra7xx-evm-${PV}"
-
-TARGET = "dra7-ipu2-fw.xem4"
-
-do_install() {
- mkdir -p ${D}${base_libdir}/firmware
- cp ${S}/firmware/${TARGET} ${D}${base_libdir}/firmware/${TARGET}
-}
-
-FILES_${PN} += "${base_libdir}/firmware/${TARGET}"
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
index 806f4900e..126d4ed33 100644
--- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
+++ b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
@@ -17,23 +17,23 @@ cannot be hidden.
It is required to set the current_panel to the text_input when the input_panel
becomes visible at the first time.
+Updated for weston 5.0.0 by Scott Murray <scott.murray@konsulko.com>.
+
Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
compositor/text-backend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/compositor/text-backend.c b/compositor/text-backend.c
-index ab4667f..36c70a5 100644
+index 664c36f7..b610dfb1 100644
--- a/compositor/text-backend.c
+++ b/compositor/text-backend.c
-@@ -337,6 +337,7 @@ text_input_show_input_panel(struct wl_client *client,
+@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client,
text_input->surface);
wl_signal_emit(&ec->update_input_panel_signal,
&text_input->cursor_rectangle);
-+ text_input->manager->current_panel = text_input;
++ text_input->manager->current_text_input = text_input;
}
}
---
-1.9.1
-
diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch
new file mode 100644
index 000000000..9fdd95b4c
--- /dev/null
+++ b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch
@@ -0,0 +1,12 @@
+diff --git a/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk
+new file mode 100644
+index 0000000..2abaa9f
+--- /dev/null
++++ b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk
+@@ -0,0 +1,6 @@
++# 32-bit ARM hard float compiler
++ifeq ($(MULTIARCH),1)
++ TARGET_SECONDARY_ARCH := target_armhf
++else
++ TARGET_PRIMARY_ARCH := target_armhf
++endif
diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend
new file mode 100644
index 000000000..fd3c6ad8d
--- /dev/null
+++ b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://add-AGL-toolchain-config.patch"
diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch
index a72aeedf6..7256abb56 100644
--- a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch
+++ b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension/force-type-conversion.patch
@@ -1,13 +1,13 @@
diff --git a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
-index 2e65864..e14dbc0 100644
+index 50c3e38..2f4910e 100644
--- a/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
+++ b/ivi-layermanagement-examples/EGLWLMockNavigation/src/OpenGLES2App.cpp
-@@ -244,7 +247,7 @@ bool OpenGLES2App::createEGLContext()
+@@ -248,7 +248,7 @@ bool OpenGLES2App::createEGLContext(SurfaceConfiguration* config)
m_eglContextStruct.eglSurface = NULL;
m_eglContextStruct.eglContext = NULL;
- m_eglContextStruct.eglDisplay = eglGetDisplay(m_wlContextStruct.wlDisplay);
+ m_eglContextStruct.eglDisplay = eglGetDisplay((EGLNativeDisplayType)m_wlContextStruct.wlDisplay);
- eglstatus = eglGetError();
if (!m_eglContextStruct.eglDisplay)
{
+ cout << "Error: eglGetDisplay() failed.\n";
diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_2.%.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend
index e9a57d324..e9a57d324 100644
--- a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_2.%.bbappend
+++ b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch
index 22f467599..6c54c5ee1 100644
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch
+++ b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch
@@ -1,9 +1,9 @@
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
-index 02dc1ae..ec0acfe 100644
+index 35424da..08fca09 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
-@@ -166,6 +166,20 @@
- DRA7XX_CORE_IOPAD(0x3818, MUX_MODE15 | PULL_UP) /* wakeup0.off */
+@@ -243,6 +243,20 @@
+ DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */
>;
};
+ dcan2_pins_default: dcan2_pins_default {
@@ -21,12 +21,12 @@ index 02dc1ae..ec0acfe 100644
+ };
+
};
-
+
&i2c1 {
-@@ -652,6 +666,13 @@
- pinctrl-2 = <&dcan1_pins_default>;
+@@ -703,6 +717,13 @@
+ memory-region = <&ipu1_memory_region>;
};
-
+
+&dcan2 {
+ status = "ok";
+ pinctrl-names = "default", "sleep";
@@ -36,4 +36,4 @@ index 02dc1ae..ec0acfe 100644
+
&dsp1 {
status = "okay";
- memory-region = <&dsp1_cma_pool>;
+ memory-region = <&dsp1_memory_region>;
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/fix_dcan_addresses.patch b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/fix_dcan_addresses.patch
deleted file mode 100644
index e4b116f5b..000000000
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/fix_dcan_addresses.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
-index 9be07c5..9ecc1f5 100644
---- a/arch/arm/boot/dts/dra7.dtsi
-+++ b/arch/arm/boot/dts/dra7.dtsi
-@@ -2032,7 +2032,7 @@
- };
- };
-
-- dcan1: can@481cc000 {
-+ dcan1: can@4ae3c000 {
- compatible = "ti,dra7-d_can";
- ti,hwmods = "dcan1";
- reg = <0x4ae3c000 0x2000>;
-@@ -2042,7 +2042,7 @@
- status = "disabled";
- };
-
-- dcan2: can@481d0000 {
-+ dcan2: can@48480000 {
- compatible = "ti,dra7-d_can";
- ti,hwmods = "dcan2";
- reg = <0x48480000 0x2000>;
diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
index 356f24fa3..2f6c449bc 100644
--- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
+++ b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend
@@ -1,5 +1,4 @@
require recipes-kernel/linux/linux-agl.inc
-require recipes-kernel/linux/linux-agl-4.9.inc
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
@@ -8,6 +7,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
file://dcan2_pinmux_enable.patch \
- file://fix_dcan_addresses.patch \
- "
+"
diff --git a/meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend b/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend
index 8a68b0641..8a68b0641 100644
--- a/meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend
+++ b/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend
diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg
index 8d809a6a0..eb5d470ed 100644
--- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg
+++ b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg
@@ -2,4 +2,4 @@
shell=ivi-shell.so
backend=drm-backend.so
require-input=false
-modules=systemd-notify.so
+modules=systemd-notify.so,ivi-controller.so
diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg
index 6789d8819..d0bcb833f 100644
--- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg
+++ b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg
@@ -1,4 +1,3 @@
[ivi-shell]
ivi-input-module=ivi-input-controller.so
-ivi-module=ivi-controller.so
ivi-id-agent-module=ivi-id-agent.so
diff --git a/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch b/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch
deleted file mode 100644
index 350f9d4bf..000000000
--- a/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 8d12bbfc6179d7e9777e4663e10f1795de158b57 Mon Sep 17 00:00:00 2001
-From: Stephane Desneux <stephane.desneux@iot.bzh>
-Date: Tue, 5 Jun 2018 10:53:24 +0200
-Subject: [PATCH] tools/merge_config.sh: add CR after each fragment
-
-If a fragment file doesn't contain a CR at the end, two config options
-may be merged on the same line in the result file, leading to misconfiguration.
-
-This patch adds a CR after each fragment to ensure that config options
-are well separated in the result file.
-
-Bug-AGL: SPEC-1475
-
-Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
----
- tools/merge_config.sh | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tools/merge_config.sh b/tools/merge_config.sh
-index 67d1314..296e759 100755
---- a/tools/merge_config.sh
-+++ b/tools/merge_config.sh
-@@ -129,6 +129,8 @@ for MERGE_FILE in $MERGE_LIST ; do
- sed -i "/$CFG[ =]/d" $TMP_FILE
- done
- cat $MERGE_FILE >> $TMP_FILE
-+ # workaround for fragments not ending with carriage return
-+ echo >> $TMP_FILE
- done
-
- if [ "$RUNMAKE" = "false" ]; then
---
-2.1.4
-
diff --git a/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend b/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend
deleted file mode 100644
index 814278302..000000000
--- a/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend
+++ /dev/null
@@ -1,6 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += "\
- file://0001-merge_config.sh-add-CR-after-fragment.patch;patchdir=git \
- "
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0001-utils.c-Prefer-monotonic-clock-to-calculate-elapsed-.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0001-utils.c-Prefer-monotonic-clock-to-calculate-elapsed-.patch
deleted file mode 100644
index 6ca593be5..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0001-utils.c-Prefer-monotonic-clock-to-calculate-elapsed-.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 41b7f4814d39c1930b1fcf0be2e247a73546fb80 Mon Sep 17 00:00:00 2001
-From: Jeffrey Pautler <jeffrey.pautler@ni.com>
-Date: Tue, 31 Oct 2017 14:38:39 -0500
-Subject: [PATCH 1/7] utils.c: Prefer monotonic clock to calculate elapsed time
-
-The current implementation uses the system clock to calculate how long
-a ptest has been running with no output. If a ptest changes the system
-clock as part of the test, that can cause the current implementation
-to falsely trigger a timeout or miss an actual timeout. It is
-preferrable to use a monotonic clock for calculating elapsed time in
-order to avoid these issues.
-
-This change tries to use the monotonic clock first and falls back to
-the realtime clock if the monotonic clock is not supported.
-
-Signed-off-by: Jeffrey Pautler <jeffrey.pautler@ni.com>
----
- utils.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/utils.c b/utils.c
-index 6d653887e9e4..933ecedf57e8 100644
---- a/utils.c
-+++ b/utils.c
-@@ -257,7 +257,8 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid,
- int timeout, int *fds, FILE **fps)
- {
- struct pollfd pfds[2];
-- time_t sentinel;
-+ struct timespec sentinel;
-+ clockid_t clock = CLOCK_MONOTONIC;
- int r;
-
- int timeouted = 0;
-@@ -269,7 +270,11 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid,
- pfds[1].fd = fds[1];
- pfds[1].events = POLLIN;
-
-- sentinel = time(NULL);
-+ if (clock_gettime(clock, &sentinel) == -1) {
-+ clock = CLOCK_REALTIME;
-+ clock_gettime(clock, &sentinel);
-+ }
-+
- while (1) {
- waitflags = WNOHANG;
-
-@@ -288,11 +293,16 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid,
- fwrite(buf, n, 1, fps[1]);
- }
-
-- sentinel = time(NULL);
-- } else if (timeout >= 0 && ((time(NULL) - sentinel) > timeout)) {
-- timeouted = 1;
-- kill(pid, SIGKILL);
-- waitflags = 0;
-+ clock_gettime(clock, &sentinel);
-+ } else if (timeout >= 0) {
-+ struct timespec time;
-+
-+ clock_gettime(clock, &time);
-+ if ((time.tv_sec - sentinel.tv_sec) > timeout) {
-+ timeouted = 1;
-+ kill(pid, SIGKILL);
-+ waitflags = 0;
-+ }
- }
-
- if (waitpid(pid, &status, waitflags) == pid)
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0002-Makefile-libcheck-now-requires-to-link-subunit.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0002-Makefile-libcheck-now-requires-to-link-subunit.patch
deleted file mode 100644
index 4ada99422..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0002-Makefile-libcheck-now-requires-to-link-subunit.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4f6d6c5e3f2f181e3cc380a76e635e7c34d3c5d1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
-Date: Thu, 7 Dec 2017 17:42:44 -0600
-Subject: [PATCH 2/7] Makefile: libcheck now requires to link subunit
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 434b89f34688..1bde7beff9d1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -22,7 +22,7 @@ TEST_SOURCES=tests/main.c tests/ptest_list.c tests/utils.c $(BASE_SOURCES)
- TEST_OBJECTS=$(TEST_SOURCES:.c=.o)
- TEST_EXECUTABLE=ptest-runner-test
- TEST_LDFLAGS=-lm -lrt -lpthread
--TEST_LIBSTATIC=-lcheck
-+TEST_LIBSTATIC=-lcheck -lsubunit
-
- TEST_DATA=$(shell echo `pwd`/tests/data)
-
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0003-Add-support-to-avoid-load-run-twice-a-run_ptest-scri.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0003-Add-support-to-avoid-load-run-twice-a-run_ptest-scri.patch
deleted file mode 100644
index 47957333d..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0003-Add-support-to-avoid-load-run-twice-a-run_ptest-scri.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 0e566f65fa31eaa5208d4a17413c7a4aad7eade5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
-Date: Thu, 7 Dec 2017 17:42:45 -0600
-Subject: [PATCH 3/7] Add support to avoid load/run twice a run_ptest script
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In some ptest packages exists symlink in the ptest directory causing
-to load/run twice the same ptest,
-
-For example in perl5:
-
-/usr/lib/perl -> /usr/lib/perl5
-
-Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
----
- ptest_list.c | 40 ++++++++++++++++++++++++++++++++++++++++
- ptest_list.h | 3 +++
- tests/data/python3 | 1 +
- tests/utils.c | 1 +
- utils.c | 6 ++++++
- 5 files changed, 51 insertions(+)
- create mode 120000 tests/data/python3
-
-diff --git a/ptest_list.c b/ptest_list.c
-index 2e1aa305752d..3e393d5fabe2 100644
---- a/ptest_list.c
-+++ b/ptest_list.c
-@@ -110,6 +110,46 @@ ptest_list_search(struct ptest_list *head, char *ptest)
- return q;
- }
-
-+
-+struct ptest_list *
-+ptest_list_search_by_file(struct ptest_list *head, char *run_ptest, struct stat st_buf)
-+{
-+ struct ptest_list *q = NULL;
-+ struct ptest_list *p;
-+ struct stat st_buf_p;
-+
-+ VALIDATE_PTR_RNULL(head);
-+ VALIDATE_PTR_RNULL(run_ptest);
-+
-+ for (p = head; p != NULL; p = p->next) {
-+ if (p->ptest == NULL)
-+ continue;
-+
-+ if (stat(p->run_ptest, &st_buf_p) == -1)
-+ continue;
-+
-+ if (strcmp(p->run_ptest, run_ptest) == 0) {
-+ q = p;
-+ break;
-+ }
-+
-+ /* *
-+ * In some ptest packages exists symlink in the ptest directory
-+ * causing to load/run twice the same ptest,
-+ *
-+ * For example in perl5:
-+ * /usr/lib/perl -> /usr/lib/perl5
-+ * */
-+ if (st_buf.st_dev == st_buf_p.st_dev &&
-+ st_buf.st_ino == st_buf_p.st_ino) {
-+ q = p;
-+ break;
-+ }
-+ }
-+
-+ return q;
-+}
-+
- struct ptest_list *
- ptest_list_add(struct ptest_list *head, char *ptest, char *run_ptest)
- {
-diff --git a/ptest_list.h b/ptest_list.h
-index 8b394853c25b..03d75390a51d 100644
---- a/ptest_list.h
-+++ b/ptest_list.h
-@@ -28,6 +28,8 @@
- #define PTEST_LIST_ITERATE_START(head, p) for (p = head->next; p != NULL; p = p->next) {
- #define PTEST_LIST_ITERATE_END }
-
-+#include <sys/stat.h>
-+
- struct ptest_list {
- char *ptest;
- char *run_ptest;
-@@ -42,6 +44,7 @@ extern int ptest_list_free_all(struct ptest_list *);
-
- extern int ptest_list_length(struct ptest_list *);
- extern struct ptest_list *ptest_list_search(struct ptest_list *, char *);
-+extern struct ptest_list *ptest_list_search_by_file(struct ptest_list *, char *, struct stat);
- extern struct ptest_list *ptest_list_add(struct ptest_list *, char *, char *);
- extern struct ptest_list *ptest_list_remove(struct ptest_list *, char *, int);
-
-diff --git a/tests/data/python3 b/tests/data/python3
-new file mode 120000
-index 000000000000..d8654aa0e2f2
---- /dev/null
-+++ b/tests/data/python3
-@@ -0,0 +1 @@
-+python
-\ No newline at end of file
-diff --git a/tests/utils.c b/tests/utils.c
-index ecf3e8af9a81..cf093793c4f2 100644
---- a/tests/utils.c
-+++ b/tests/utils.c
-@@ -48,6 +48,7 @@ static int ptests_found_length = 6;
- static char *ptests_not_found[] = {
- "busybox",
- "perl",
-+ "python3",
- NULL,
- };
-
-diff --git a/utils.c b/utils.c
-index 933ecedf57e8..ed2eff7900c1 100644
---- a/utils.c
-+++ b/utils.c
-@@ -143,6 +143,12 @@ get_available_ptests(const char *dir)
- continue;
- }
-
-+ if (ptest_list_search_by_file(head, run_ptest, st_buf)) {
-+ free(run_ptest);
-+ free(d_name);
-+ continue;
-+ }
-+
- struct ptest_list *p = ptest_list_add(head,
- d_name, run_ptest);
- CHECK_ALLOCATION(p, sizeof(struct ptest_list *), 0);
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0004-README.md-Update-to-my-current-email.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0004-README.md-Update-to-my-current-email.patch
deleted file mode 100644
index dbfe648cf..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0004-README.md-Update-to-my-current-email.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 16413d71cc06b02a6d859c35a017cc49b88283f7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
-Date: Thu, 7 Dec 2017 17:42:46 -0600
-Subject: [PATCH 4/7] README.md: Update to my current email
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
----
- README.md | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/README.md b/README.md
-index fedab04b7f00..22b36a4b7bed 100644
---- a/README.md
-+++ b/README.md
-@@ -50,7 +50,7 @@ $ mtrace ./ptest-runner $(MALLOC_TRACE)
-
- For contribute please send a patch with subject prefix "[ptest-runner]" to
- yocto@yoctoproject.org and cc the current maintainer that is Aníbal Limón
--<anibal.limon@linux.intel.com>.
-+<anibal.limon@linaro.org>.
-
- ## Links
-
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0005-main.c-Use-realpath-to-get-the-actual-directory-of-p.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0005-main.c-Use-realpath-to-get-the-actual-directory-of-p.patch
deleted file mode 100644
index cb9e20a32..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0005-main.c-Use-realpath-to-get-the-actual-directory-of-p.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 5bd94a93c89978c5e729db86b86b49919cd3b523 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
-Date: Wed, 25 Apr 2018 12:05:29 -0500
-Subject: [PATCH 5/7] main.c: Use realpath to get the actual directory of
- ptests
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix usage of relative paths in -d argument.
-
-$ ./ptest-runner -d ./tests/data
-
-Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
----
- main.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/main.c b/main.c
-index 505829cdad58..593aff1a1956 100644
---- a/main.c
-+++ b/main.c
-@@ -19,6 +19,7 @@
- * Aníbal Limón <anibal.limon@intel.com>
- */
-
-+#include <limits.h>
- #include <unistd.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -70,7 +71,7 @@ main(int argc, char *argv[])
- switch (opt) {
- case 'd':
- free(opts.directory);
-- opts.directory = strdup(optarg);
-+ opts.directory = realpath(optarg, NULL);
- CHECK_ALLOCATION(opts.directory, 1, 1);
- break;
- case 'l':
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0006-main.c-Add-option-e-to-exclude-certain-tests-for-exe.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0006-main.c-Add-option-e-to-exclude-certain-tests-for-exe.patch
deleted file mode 100644
index 7a4de868c..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0006-main.c-Add-option-e-to-exclude-certain-tests-for-exe.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 49956f65bb53ea2a2c1b394e5e59ffdfcdcc490f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org>
-Date: Wed, 25 Apr 2018 11:55:03 -0500
-Subject: [PATCH 6/7] main.c: Add option (-e) to exclude certain tests for
- execution
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-You can specify a set of ptests to be excluded, it will not fail
-if some ptest excluded isn't found in the list of execution.
-
-$ ./ptest-runner -e "hang glibc" -d tests/data
-
-Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
----
- main.c | 38 +++++++++++++++++++++++++++++++++++---
- utils.h | 1 +
- 2 files changed, 36 insertions(+), 3 deletions(-)
-
-diff --git a/main.c b/main.c
-index 593aff1a1956..83600b7d1b31 100644
---- a/main.c
-+++ b/main.c
-@@ -19,6 +19,7 @@
- * Aníbal Limón <anibal.limon@intel.com>
- */
-
-+#include <ctype.h>
- #include <limits.h>
- #include <unistd.h>
- #include <string.h>
-@@ -42,8 +43,8 @@
- static inline void
- print_usage(FILE *stream, char *progname)
- {
-- fprintf(stream, "Usage: %s [-d directory] [-l list] [-t timeout] [-x xml-filename]"
-- " [-h] [ptest1 ptest2 ...]\n", progname);
-+ fprintf(stream, "Usage: %s [-d directory] [-e exclude] [-l list] [-t timeout]"
-+ " [-x xml-filename] [-h] [ptest1 ptest2 ...]\n", progname);
- }
-
- int
-@@ -53,6 +54,8 @@ main(int argc, char *argv[])
- int ptest_num = 0;
- int i;
- int rc;
-+ int ptest_exclude_num = 0;
-+ char *c, *tok;
-
- #ifdef MEMCHECK
- mtrace();
-@@ -62,18 +65,44 @@ main(int argc, char *argv[])
- struct ptest_options opts;
-
- opts.directory = strdup(DEFAULT_DIRECTORY);
-+ opts.exclude = NULL;
- opts.list = 0;
- opts.timeout = DEFAULT_TIMEOUT;
- opts.ptests = NULL;
- opts.xml_filename = NULL;
-
-- while ((opt = getopt(argc, argv, "d:lt:x:h")) != -1) {
-+ while ((opt = getopt(argc, argv, "d:e:lt:x:h")) != -1) {
- switch (opt) {
- case 'd':
- free(opts.directory);
- opts.directory = realpath(optarg, NULL);
- CHECK_ALLOCATION(opts.directory, 1, 1);
- break;
-+ case 'e':
-+ c = optarg;
-+ ptest_exclude_num = 1;
-+
-+ while (*c) {
-+ if (isspace(*c))
-+ ptest_exclude_num++;
-+ c++;
-+ }
-+
-+
-+ opts.exclude = malloc(ptest_exclude_num * sizeof(char));
-+ CHECK_ALLOCATION(opts.exclude, 1, 1);
-+
-+ i = 0;
-+ tok = strtok_r(optarg, " ", &c);
-+ opts.exclude[i] = strdup(tok);
-+ CHECK_ALLOCATION(opts.exclude[i], 1, 1);
-+ i++;
-+ while ((tok = strtok_r(NULL, " ", &c)) != NULL) {
-+ opts.exclude[i] = strdup(tok);
-+ CHECK_ALLOCATION(opts.exclude[i], 1, 1);
-+ i++;
-+ }
-+ break;
- case 'l':
- opts.list = 1;
- break;
-@@ -134,6 +163,9 @@ main(int argc, char *argv[])
- ptest_list_free_all(head);
- }
-
-+ for (i = 0; i < ptest_exclude_num; i++)
-+ ptest_list_remove(run, opts.exclude[i], 1);
-+
- rc = run_ptests(run, opts, argv[0], stdout, stderr);
-
- ptest_list_free_all(run);
-diff --git a/utils.h b/utils.h
-index 8fa20a8bf621..ee85163ddfff 100644
---- a/utils.h
-+++ b/utils.h
-@@ -32,6 +32,7 @@
-
- struct ptest_options {
- char *directory;
-+ char **exclude;
- int list;
- int timeout;
- char **ptests;
---
-2.11.0
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.1.bbappend b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.1.bbappend
deleted file mode 100644
index 000ab3d53..000000000
--- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.1.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0004-README.md-Update-to-my-current-email.patch file://0001-utils.c-Prefer-monotonic-clock-to-calculate-elapsed-.patch file://0002-Makefile-libcheck-now-requires-to-link-subunit.patch file://0003-Add-support-to-avoid-load-run-twice-a-run_ptest-scri.patch file://0005-main.c-Use-realpath-to-get-the-actual-directory-of-p.patch file://0006-main.c-Add-option-e-to-exclude-certain-tests-for-exe.patch file://0007-WIP-Initial-LAVA-support.patch"
-
diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend
new file mode 100644
index 000000000..7a1d2a8f8
--- /dev/null
+++ b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0007-WIP-Initial-LAVA-support.patch"
+
diff --git a/meta-agl-distro/conf/distro/poky-agl.conf b/meta-agl-distro/conf/distro/poky-agl.conf
index 2d0383644..601d447f6 100644
--- a/meta-agl-distro/conf/distro/poky-agl.conf
+++ b/meta-agl-distro/conf/distro/poky-agl.conf
@@ -83,16 +83,14 @@ DISTRO_FEATURES_APPEND = " "
DISTRO_FEATURES_remove = "x11"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit pulseaudio"
-PREFERRED_VERSION_wayland-ivi-extension ?= "2.0.%"
-
-# Prefer GStreamer 1.10.x by default
-PREFERRED_VERSION_gstreamer1.0 ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-plugins-bad ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-plugins-base ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-plugins-good ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-plugins-ugly ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-libav ?= "1.12.%"
-PREFERRED_VERSION_gstreamer1.0-omx ?= "1.12.%"
+# Prefer GStreamer 1.14.x by default
+PREFERRED_VERSION_gstreamer1.0 ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-bad ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-base ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-good ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-plugins-ugly ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-libav ?= "1.14.%"
+PREFERRED_VERSION_gstreamer1.0-omx ?= "1.14.%"
# Prefer libjpeg-turbo
PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
@@ -101,26 +99,6 @@ PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
# turn it into a warning
#BB_DANGLINGAPPENDS_WARNONLY = "1"
-# enforce security-related compiler flags by default
-require conf/distro/include/security_flags.inc
-# required overrides, upstreamed but not merged yet:
-# http://lists.openembedded.org/pipermail/openembedded-devel/2016-June/107727.html
-SECURITY_CFLAGS_pn-llvm3.3 = ""
-SECURITY_LDFLAGS_remove_pn-llvm3.3 = "-fstack-protector-strong"
-SECURITY_STRINGFORMAT_pn-gpm = ""
-SECURITY_CFLAGS_pn-libdbus-c++ = ""
-SECURITY_LDFLAGS_pn-libdbus-c++ = ""
-
-# more than 2 targets fail to compile these with the SECURITY compiler flags:
-# Bug tracked as SPEC-593
-SECURITY_CFLAGS_pn-mozjs = ""
-SECURITY_LDFLAGS_pn-mozjs = ""
-SECURITY_CFLAGS_pn-gpm = ""
-SECURITY_LDFLAGS_pn-gpm = ""
-SECURITY_CFLAGS_pn-libatasmart = ""
-SECURITY_LDFLAGS_pn-libatasmart = ""
-SECURITY_CFLAGS_pn-optee-client = ""
-
# Not yet upstreamed; should be submitted.
SECURITY_CFLAGS_pn-qtwebengine = "${SECURITY_NO_PIE_CFLAGS}"
@@ -180,8 +158,3 @@ DIRFILES_pn-nativesdk-cmake = "1"
# We exclude the conflicting vars from the sstate task hash.
# This needs to be verified.
do_package_write_rpm[vardepsexclude] += "ARCHIVER_TOPDIR PF"
-
-# For https://jira.automotivelinux.org/browse/SPEC-1677
-# Some issues appear, with the yocto version of valgrind, on aarch64.
-# (valgrind exits due to an unhandled instruction')
-PREFERRED_VERSION_valgrind ?= "git"
diff --git a/meta-agl-distro/conf/layer.conf b/meta-agl-distro/conf/layer.conf
index 9810f4a3e..3c60fd4c7 100644
--- a/meta-agl-distro/conf/layer.conf
+++ b/meta-agl-distro/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "agl-distro"
BBFILE_PATTERN_agl-distro = "^${LAYERDIR}/"
BBFILE_PRIORITY_agl-distro = "70"
+
+LAYERSERIES_COMPAT_agl-distro = "thud"
diff --git a/meta-agl-profile-cluster-qt5/conf/layer.conf b/meta-agl-profile-cluster-qt5/conf/layer.conf
index 30a222971..aa11e32de 100644
--- a/meta-agl-profile-cluster-qt5/conf/layer.conf
+++ b/meta-agl-profile-cluster-qt5/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofileclusterqt5"
BBFILE_PATTERN_aglprofileclusterqt5 = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofileclusterqt5 = "70"
+
+LAYERSERIES_COMPAT_aglprofileclusterqt5 = "thud"
diff --git a/meta-agl-profile-cluster/conf/layer.conf b/meta-agl-profile-cluster/conf/layer.conf
index 4ac5d96a0..e15c3be4a 100644
--- a/meta-agl-profile-cluster/conf/layer.conf
+++ b/meta-agl-profile-cluster/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilecluster"
BBFILE_PATTERN_aglprofilecluster = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilecluster = "70"
+
+LAYERSERIES_COMPAT_aglprofilecluster = "thud"
diff --git a/meta-agl-profile-core/conf/layer.conf b/meta-agl-profile-core/conf/layer.conf
index 83c5555bc..641b22867 100644
--- a/meta-agl-profile-core/conf/layer.conf
+++ b/meta-agl-profile-core/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilecore"
BBFILE_PATTERN_aglprofilecore = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilecore = "80"
+
+LAYERSERIES_COMPAT_aglprofilecore = "thud"
diff --git a/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb b/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
index 02afef75f..61086dfe7 100644
--- a/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
+++ b/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb
@@ -9,7 +9,8 @@ DEPENDS = "dbus ncurses connman json-c"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381"
-SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https;rev=ad4261a2f87c914667b1f6841c913f6b08d373e2"
+SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https"
+SRCREV = "2b0f93ec9518c978c04807fe52e95315d6d80e6b"
inherit autotools pkgconfig
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch b/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch
index 95fc0a905..f129a6580 100644
--- a/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch
+++ b/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch
@@ -1,7 +1,6 @@
---- a/src/connman.service.in 2016-08-15 13:51:03.479478140 +0200
-+++ b/src/connman.service.in 2016-08-15 13:51:33.469478267 +0200
-@@ -7,6 +7,7 @@ RequiresMountsFor=@localstatedir@/lib/co
- After=dbus.service network-pre.target systemd-sysusers.service
+--- connman-1.36.orig/src/connman.service.in 2019-02-18 18:02:07.034947373 -0500
++++ connman-1.36/src/connman.service.in 2019-02-18 18:07:24.689959219 -0500
+@@ -7,6 +7,7 @@
Before=network.target multi-user.target shutdown.target
Wants=network.target
Conflicts=systemd-resolved.service
diff --git a/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch b/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
index 8e45e1ca2..596fe0579 100644
--- a/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
+++ b/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
@@ -1,4 +1,4 @@
-From 0f33143d13d9224ffa8b648e2d9cf11c62ba234d Mon Sep 17 00:00:00 2001
+From 795308b2452ee617da4096914b53ba3a1142e3db Mon Sep 17 00:00:00 2001
From: Matt Ranostay <matt.ranostay@konsulko.com>
Date: Fri, 6 Jul 2018 17:19:09 -0700
Subject: [PATCH] neardal: ncl: fix segfault on help page being displayed
@@ -7,23 +7,21 @@ LISTCMD_NAME is declared as a const char due to being defined in a
macro so g_strdup it to stop proceeding operations from segfaulting.
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+
---
ncl/ncl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ncl/ncl.c b/ncl/ncl.c
-index ef42862..c26e757 100644
+index 590d13b..f4165b7 100644
--- a/ncl/ncl.c
+++ b/ncl/ncl.c
-@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
+@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
g_io_channel_unref(gNclCtx.channel);
if (show_help)
- ncl_exec(LISTCMD_NAME);
+ ncl_exec(g_strdup(LISTCMD_NAME));
- g_main_loop_run(gNclCtx.main_loop);
- }
---
-2.17.1
-
+ rl_callback_handler_install(NCL_PROMPT, ncl_parse_line);
+
diff --git a/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend b/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend
index 22f8163fe..2de1e6836 100644
--- a/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend
+++ b/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend
@@ -1,7 +1,6 @@
FILESEXTRAPATHS_append := ":${THISDIR}/files"
SRC_URI_append_class-nativesdk = " \
- file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
file://environment.d-cmake-agl.sh \
"
diff --git a/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
deleted file mode 100644
index a2332879c..000000000
--- a/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From a42cfebcd6c684cccf8ad33e5bd5130f7cdba135 Mon Sep 17 00:00:00 2001
-From: Cody P Schafer <dev@codyps.com>
-Date: Thu, 27 Apr 2017 11:35:05 -0400
-Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default
- toolchain file in sdk
-
-Passing the toolchain by:
-
- - shell aliases does not work if cmake is called by a script
- - unconditionally by a wrapper script causes cmake to believe it is
- configuring things when it is not (for example, `cmake --build` breaks).
-
-The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no
-toolchain is explicitly specified.
-
-Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached
-because '-D' options are cache entries themselves.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Cody P Schafer <dev@codyps.com>
----
- Modules/CMakeDetermineSystem.cmake | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
-index f34ec5d61..bcac3ef16 100644
---- a/Modules/CMakeDetermineSystem.cmake
-+++ b/Modules/CMakeDetermineSystem.cmake
-@@ -74,6 +74,13 @@ else()
- endif()
- endif()
-
-+if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
-+ if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE})
-+ set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "toolchain file")
-+ message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'")
-+ endif()
-+endif()
-+
- # if a toolchain file is used, the user wants to cross compile.
- # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
- # variables around so they can be used in CMakeLists.txt.
---
-2.12.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb b/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb
index 576f62c8e..09f652036 100644
--- a/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb
+++ b/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb
@@ -15,7 +15,6 @@ RDEPENDS_${PN} = "\
perf \
htop \
powertop \
- latencytop \
systemtap \
screen \
usbutils \
diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
deleted file mode 100644
index cfddec6da..000000000
--- a/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 0a66176074560303bf0870957464239e9757d891 Mon Sep 17 00:00:00 2001
-From: Kir Kolyshkin <kolyshkin@gmail.com>
-Date: Tue, 29 May 2018 17:37:05 -0700
-Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC
-
-Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from
-lua script is called") copied the code that sets CLOEXEC flag on all
-possible file descriptors from lib/rpmscript.c to luaext/lposix.c,
-essentially creating two copies of the same code (modulo comments
-and the unused assignment).
-
-This commit moves the functionality into its own function, without
-any code modifications, using the version from luaext/lposix.c.
-
-Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
-(cherry picked from commit 9c3e5de3240554c8ea1b29d52eeadee4840fefac)
----
- lib/rpmscript.c | 17 ++---------------
- luaext/lposix.c | 13 ++-----------
- rpmio/rpmio.c | 14 ++++++++++++++
- rpmio/rpmio_internal.h | 6 ++++++
- 4 files changed, 24 insertions(+), 26 deletions(-)
-
-diff --git a/lib/rpmscript.c b/lib/rpmscript.c
-index 98d3f42..61dff83 100644
---- a/lib/rpmscript.c
-+++ b/lib/rpmscript.c
-@@ -18,6 +18,7 @@
-
- #include "rpmio/rpmlua.h"
- #include "lib/rpmscript.h"
-+#include "rpmio/rpmio_internal.h"
-
- #include "lib/rpmplugins.h" /* rpm plugins hooks */
-
-@@ -161,25 +162,11 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr
- static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
- FD_t scriptFd, FD_t out)
- {
-- int flag;
-- int fdno;
- int xx;
-- int open_max;
-
- (void) signal(SIGPIPE, SIG_DFL);
-
-- /* XXX Force FD_CLOEXEC on all inherited fdno's. */
-- open_max = sysconf(_SC_OPEN_MAX);
-- if (open_max == -1) {
-- open_max = 1024;
-- }
-- for (fdno = 3; fdno < open_max; fdno++) {
-- flag = fcntl(fdno, F_GETFD);
-- if (flag == -1 || (flag & FD_CLOEXEC))
-- continue;
-- xx = fcntl(fdno, F_SETFD, FD_CLOEXEC);
-- /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */
-- }
-+ rpmSetCloseOnExec();
-
- if (scriptFd != NULL) {
- int sfdno = Fileno(scriptFd);
-diff --git a/luaext/lposix.c b/luaext/lposix.c
-index 0a7c26c..5d7ad3c 100644
---- a/luaext/lposix.c
-+++ b/luaext/lposix.c
-@@ -27,6 +27,7 @@
- #include <unistd.h>
- #include <utime.h>
- #include <rpm/rpmutil.h>
-+#include "rpmio/rpmio_internal.h"
-
- #define MYNAME "posix"
- #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003"
-@@ -335,21 +336,11 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */
- const char *path = luaL_checkstring(L, 1);
- int i,n=lua_gettop(L);
- char **argv;
-- int flag, fdno, open_max;
-
- if (!have_forked)
- return luaL_error(L, "exec not permitted in this context");
-
-- open_max = sysconf(_SC_OPEN_MAX);
-- if (open_max == -1) {
-- open_max = 1024;
-- }
-- for (fdno = 3; fdno < open_max; fdno++) {
-- flag = fcntl(fdno, F_GETFD);
-- if (flag == -1 || (flag & FD_CLOEXEC))
-- continue;
-- fcntl(fdno, F_SETFD, FD_CLOEXEC);
-- }
-+ rpmSetCloseOnExec();
-
- argv = malloc((n+1)*sizeof(char*));
- if (argv==NULL) return luaL_error(L,"not enough memory");
-diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
-index 0b90984..747bf3c 100644
---- a/rpmio/rpmio.c
-+++ b/rpmio/rpmio.c
-@@ -1477,4 +1477,18 @@ void fdFiniDigest(FD_t fd, int hashalgo,
- }
- }
-
-+void rpmSetCloseOnExec(void)
-+{
-+ int flag, fdno, open_max;
-
-+ open_max = sysconf(_SC_OPEN_MAX);
-+ if (open_max == -1) {
-+ open_max = 1024;
-+ }
-+ for (fdno = 3; fdno < open_max; fdno++) {
-+ flag = fcntl(fdno, F_GETFD);
-+ if (flag == -1 || (flag & FD_CLOEXEC))
-+ continue;
-+ fcntl(fdno, F_SETFD, FD_CLOEXEC);
-+ }
-+}
-diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
-index 8c9f1a8..da39250 100644
---- a/rpmio/rpmio_internal.h
-+++ b/rpmio/rpmio_internal.h
-@@ -37,6 +37,12 @@ void fdFiniDigest(FD_t fd, int hashalgo,
- int rpmioSlurp(const char * fn,
- uint8_t ** bp, ssize_t * blenp);
-
-+/**
-+ * Set close-on-exec flag for all opened file descriptors, except
-+ * stdin/stdout/stderr.
-+ */
-+void rpmSetCloseOnExec(void);
-+
- #ifdef __cplusplus
- }
- #endif
---
-2.7.4
-
diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
deleted file mode 100644
index 9354dd6e0..000000000
--- a/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 6f56aa01a357bbcf9401d79a378ae380f5f939d4 Mon Sep 17 00:00:00 2001
-From: Kir Kolyshkin <kolyshkin@gmail.com>
-Date: Tue, 29 May 2018 17:52:56 -0700
-Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec
-
-In case maximum number of open files limit is set too high, both
-luaext/Pexec() and lib/doScriptExec() spend way too much time
-trying to set FD_CLOEXEC flag for all those file descriptors,
-resulting in severe increase of time it takes to execute say
-rpm or dnf.
-
-This becomes increasingly noticeable when running with e.g. under
-Docker, the reason being:
-
-> $ docker run fedora ulimit -n
-> 1048576
-
-One obvious fix is to use procfs to get the actual list of opened fds
-and iterate over it. My quick-n-dirty benchmark shows the /proc approach
-is about 10x faster than iterating through a list of just 1024 fds,
-so it's an improvement even for default ulimit values.
-
-Note that the old method is still used in case /proc is not available.
-
-While at it,
-
- 1. fix the function by making sure we modify (rather than set)
- the existing flags. As the only known flag is FD_CLOEXEC,
- this change is currently purely aesthetical, but in case
- other flags will appear it will become a real bug fix.
-
- 2. get rid of magic number 3; use STDERR_FILENO
-
-Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
-
-Fixes #444
-
-(cherry picked from commit 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416)
----
- rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++---------
- 1 file changed, 34 insertions(+), 9 deletions(-)
-
-diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
-index 747bf3c..8148aa2 100644
---- a/rpmio/rpmio.c
-+++ b/rpmio/rpmio.c
-@@ -1477,18 +1477,43 @@ void fdFiniDigest(FD_t fd, int hashalgo,
- }
- }
-
-+static void set_cloexec(int fd)
-+{
-+ int flags = fcntl(fd, F_GETFD);
-+
-+ if (flags == -1 || (flags & FD_CLOEXEC))
-+ return;
-+
-+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
-+}
-+
- void rpmSetCloseOnExec(void)
- {
-- int flag, fdno, open_max;
-+ const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */
-+ int fd;
-+
-+ DIR *dir = opendir("/proc/self/fd");
-+ if (dir == NULL) { /* /proc not available */
-+ /* iterate over all possible fds, might be slow */
-+ int open_max = sysconf(_SC_OPEN_MAX);
-+ if (open_max == -1)
-+ open_max = 1024;
-
-- open_max = sysconf(_SC_OPEN_MAX);
-- if (open_max == -1) {
-- open_max = 1024;
-+ for (fd = min_fd + 1; fd < open_max; fd++)
-+ set_cloexec(fd);
-+
-+ return;
- }
-- for (fdno = 3; fdno < open_max; fdno++) {
-- flag = fcntl(fdno, F_GETFD);
-- if (flag == -1 || (flag & FD_CLOEXEC))
-- continue;
-- fcntl(fdno, F_SETFD, FD_CLOEXEC);
-+
-+ /* iterate over fds obtained from /proc */
-+ struct dirent *entry;
-+ while ((entry = readdir(dir)) != NULL) {
-+ fd = atoi(entry->d_name);
-+ if (fd > min_fd)
-+ set_cloexec(fd);
- }
-+
-+ closedir(dir);
-+
-+ return;
- }
---
-2.7.4
-
diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
deleted file mode 100644
index d9b813ece..000000000
--- a/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 1f5438d677dca330642158ec0b1c0366c6a65725 Mon Sep 17 00:00:00 2001
-From: Kir Kolyshkin <kolyshkin@gmail.com>
-Date: Tue, 29 May 2018 18:09:27 -0700
-Subject: [PATCH 3/3] rpmSetCloseOnExec: use getrlimit()
-
-In case /proc is not available to get the actual list of opened fds,
-we fall back to iterating through the list of all possible fds.
-
-It is possible that during the course of the program execution the limit
-on number of open file descriptors might be lowered, so using the
-current limit, as returned by sysconf(_SC_OPEN_MAX), might omit some
-fds. Therefore, it is better to use rlim_max from the structure
-filled in by gertlimit(RLIMIT_NOFILE) to make sure we're checking
-all fds.
-
-This slows down the function, but only in the case /proc is not
-available, which should be rare in practice.
-
-Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
-(cherry picked from commit 307e28b4cb08b05bc044482058eeebc9f59bb9a9)
----
- rpmio/rpmio.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
-index 8148aa2..0698e53 100644
---- a/rpmio/rpmio.c
-+++ b/rpmio/rpmio.c
-@@ -10,6 +10,7 @@
- #include <sys/personality.h>
- #endif
- #include <sys/utsname.h>
-+#include <sys/resource.h>
-
- #include <rpm/rpmlog.h>
- #include <rpm/rpmmacro.h>
-@@ -1495,7 +1496,14 @@ void rpmSetCloseOnExec(void)
- DIR *dir = opendir("/proc/self/fd");
- if (dir == NULL) { /* /proc not available */
- /* iterate over all possible fds, might be slow */
-- int open_max = sysconf(_SC_OPEN_MAX);
-+ struct rlimit rl;
-+ int open_max;
-+
-+ if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
-+ open_max = rl.rlim_max;
-+ else
-+ open_max = sysconf(_SC_OPEN_MAX);
-+
- if (open_max == -1)
- open_max = 1024;
-
---
-2.7.4
-
diff --git a/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend b/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend
deleted file mode 100644
index 1333a97c0..000000000
--- a/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_append := ":${THISDIR}/files"
-
-SRC_URI_append = "\
- file://0001-Factor-out-and-unify-setting-CLOEXEC.patch \
- file://0002-Optimize-rpmSetCloseOnExec.patch \
- file://0003-rpmSetCloseOnExec-use-getrlimit.patch \
-"
diff --git a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf
new file mode 100644
index 000000000..d706cc5f7
--- /dev/null
+++ b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf
@@ -0,0 +1,2 @@
+[Unit]
+After=ldconfig.service
diff --git a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
index fc327b6ef..4cc2edf86 100644
--- a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
+++ b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
@@ -1,5 +1,14 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://ldconfig-wait.conf"
+
do_configure_append() {
if ! grep -q StandardOutput= ${WORKDIR}/run-postinsts.service; then
sed -i '/ExecStart=/iStandardOutput=journal+console' ${WORKDIR}/run-postinsts.service
fi
}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/systemd/system/run-postinsts.service.d
+ install -m 0644 ${WORKDIR}/ldconfig-wait.conf ${D}${sysconfdir}/systemd/system/run-postinsts.service.d
+}
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
deleted file mode 100644
index a78e1953f..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 9762fd23e1f1db66d4b977c694a17d3bca3fe99a Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 8 Jan 2016 16:36:29 +0200
-Subject: [PATCH] Remove tests that fail to build on some PPC32 configurations
-
-Failures are documented here:
-http://errors.yoctoproject.org/Errors/Search/?items=10&query=862d702fbb99e484631315aa44b9e46f8fc567da&filter=valgrind&type=recipe
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Upstream-Status: Pending
----
- memcheck/tests/ppc32/Makefile.am | 2 +-
- none/tests/ppc32/Makefile.am | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
-index 26b95a2..8f05743 100644
---- a/memcheck/tests/ppc32/Makefile.am
-+++ b/memcheck/tests/ppc32/Makefile.am
-@@ -10,7 +10,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
- power_ISA2_07.stderr.exp power_ISA2_07.vgtest
-
- check_PROGRAMS = \
-- power_ISA2_05 power_ISA2_07
-+ power_ISA2_07
-
- 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 196239e..0fe3425 100644
---- a/none/tests/ppc32/Makefile.am
-+++ b/none/tests/ppc32/Makefile.am
-@@ -50,13 +50,13 @@ EXTRA_DIST = \
-
- check_PROGRAMS = \
- allexec \
-- lsw jm-insns round \
-+ lsw \
- test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \
- test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \
- test_isa_2_07_part1 test_isa_2_07_part2 \
- test_tm test_touch_tm ldst_multiple data-cache-instructions \
- test_fx test_gx \
-- testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \
-+ twi tw xlc_dbl_u32 power6_bcmp \
- bug129390-ppc32 bug139050-ppc32 \
- ldstrev mftocrf mcrfs
-
---
-2.6.4
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
deleted file mode 100644
index 9f1da7bac..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 20 Apr 2017 10:11:16 -0700
-Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm
- architecture
-
-We can not assume that all arches armv7+ are cortex-a8 only
-it fails to build for rpi which is armv7ve based (cortex-a8) cpu
-implementation.
-Fixes
-| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.all.am | 6 +++---
- helgrind/tests/Makefile.am | 6 +++---
- none/tests/arm/Makefile.am | 18 +++++++++---------
- 3 files changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/Makefile.all.am b/Makefile.all.am
-index 02059a3..c7c4700 100644
---- a/Makefile.all.am
-+++ b/Makefile.all.am
-@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g
-
- AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@
- AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \
-- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8
-+ $(AM_CFLAGS_BASE) -marm
- AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \
-- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE)
-+ -marm $(AM_CFLAGS_PSO_BASE)
- AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \
-- -marm -mcpu=cortex-a8 -g
-+ -marm -g
-
- AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@
- AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
-diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
-index df82169..07eb66a 100644
---- a/helgrind/tests/Makefile.am
-+++ b/helgrind/tests/Makefile.am
-@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
- endif
-
- if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
--annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
--tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
--tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
-+annotate_hbefore_CFLAGS = $(AM_CFLAGS)
-+tc07_hbl1_CFLAGS = $(AM_CFLAGS)
-+tc08_hbl2_CFLAGS = $(AM_CFLAGS)
- else
- annotate_hbefore_CFLAGS = $(AM_CFLAGS)
- tc07_hbl1_CFLAGS = $(AM_CFLAGS)
-diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
-index 024eb6d..ccecb90 100644
---- a/none/tests/arm/Makefile.am
-+++ b/none/tests/arm/Makefile.am
-@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
- # need special helping w.r.t -mfpu and -mfloat-abi, though.
- # Also force -O0 since -O takes hundreds of MB of memory
- # for v6intThumb.c.
--v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
--v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
-+v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm
-+v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
-
--v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
-+v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
-
- v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm
- v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb
-@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \
- v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \
- -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb
-
--vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
-+vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \
- -mfpu=neon \
- -mthumb
-
-
--neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
-+neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \
- -mfpu=neon \
- -mthumb
-
--neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
-+neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \
- -mfpu=neon \
- -mthumb
-
- intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
--ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
--ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
-+ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb
-+ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm
-
--vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
-+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3
-
- vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
---
-2.12.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
deleted file mode 100644
index a48d7db07..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:12:43 -0700
-Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined
-
-Helps compiling with musl where __THROW is not available
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- memcheck/tests/arm64-linux/scalar.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h
-index 9008816..8ef050f 100644
---- a/memcheck/tests/arm64-linux/scalar.h
-+++ b/memcheck/tests/arm64-linux/scalar.h
-@@ -12,6 +12,10 @@
- #include <sys/types.h>
- #include <sys/mman.h>
-
-+#ifndef __THROW
-+#define __THROW
-+#endif
-+
- // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
- // declare this ourselves.
- extern long int syscall (long int __sysno, ...) __THROW;
---
-2.13.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch
deleted file mode 100644
index bf16a1adf..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 629ac492b1d9bc709d17337eb9b1c28603eca250 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 28 Jun 2017 11:01:25 -0700
-Subject: [PATCH] memcheck/tests: Use ucontext_t instead of struct ucontext
-
-glibc 2.26 does not expose struct ucontext anymore
-
-Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=381769]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- memcheck/tests/linux/stack_changes.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
-index ffb49c6..acc4109 100644
---- a/memcheck/tests/linux/stack_changes.c
-+++ b/memcheck/tests/linux/stack_changes.c
-@@ -11,7 +11,7 @@
- // checks that Valgrind notices their stack changes properly.
-
- #ifdef __GLIBC__
--typedef struct ucontext mycontext;
-+typedef ucontext_t mycontext;
-
- mycontext ctx1, ctx2, oldc;
- int count;
---
-2.13.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
deleted file mode 100644
index 27366153f..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 00:46:39 -0700
-Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- memcheck/tests/linux/sigqueue.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c
-index d18bd72..acb7cba 100644
---- a/memcheck/tests/linux/sigqueue.c
-+++ b/memcheck/tests/linux/sigqueue.c
-@@ -8,6 +8,11 @@
- #include <syscall.h>
- #include <unistd.h>
-
-+/* musl libc defines siginfo_t __si_fields instead of _sifields */
-+#if defined(__linux__) && !defined(__GLIBC__)
-+#define _sifields __si_fields
-+#endif
-+
- int main(int argc, char **argv)
- {
- siginfo_t *si;
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
deleted file mode 100644
index 185b8f9e6..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 00:39:07 -0700
-Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc
-
-rawmemchr() is a GNU extention therefore mark it so
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- memcheck/tests/str_tester.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c
-index 9f7790a..47e4b4a 100644
---- a/memcheck/tests/str_tester.c
-+++ b/memcheck/tests/str_tester.c
-@@ -504,7 +504,7 @@ test_strchrnul (void)
- #endif
-
- // DDD: better done by testing for the function.
--#if !defined(__APPLE__) && !defined(__sun)
-+#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
- static void
- test_rawmemchr (void)
- {
-@@ -1442,7 +1442,7 @@ main (void)
- test_strchrnul ();
- # endif
-
--# if !defined(__APPLE__) && !defined(__sun)
-+# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
- /* rawmemchr. */
- test_rawmemchr ();
- # endif
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
deleted file mode 100644
index ccf404d0d..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 01:01:10 -0700
-Subject: [PATCH 2/6] context APIs are not available on musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- memcheck/tests/linux/stack_changes.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
-index a978fc2..ffb49c6 100644
---- a/memcheck/tests/linux/stack_changes.c
-+++ b/memcheck/tests/linux/stack_changes.c
-@@ -10,6 +10,7 @@
- // This test is checking the libc context calls (setcontext, etc.) and
- // checks that Valgrind notices their stack changes properly.
-
-+#ifdef __GLIBC__
- typedef ucontext_t mycontext;
-
- mycontext ctx1, ctx2, oldc;
-@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
-
- return ret;
- }
-+#endif
-
- int main(int argc, char **argv)
- {
-+#ifdef __GLIBC__
- int c1 = init_context(&ctx1);
- int c2 = init_context(&ctx2);
-
-@@ -66,6 +69,8 @@ int main(int argc, char **argv)
- //free(ctx1.uc_stack.ss_sp);
- VALGRIND_STACK_DEREGISTER(c2);
- //free(ctx2.uc_stack.ss_sp);
--
-+#else
-+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
-+#endif
- return 0;
- }
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
deleted file mode 100644
index 543347229..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:36:42 -0700
-Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined
-
-musl does not have __THROW, therefore make it null
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- memcheck/tests/x86-linux/scalar.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h
-index ef28b03..52f742e 100644
---- a/memcheck/tests/x86-linux/scalar.h
-+++ b/memcheck/tests/x86-linux/scalar.h
-@@ -11,6 +11,10 @@
- #include <sys/types.h>
- #include <sys/mman.h>
-
-+#ifndef __THROW
-+#define __THROW
-+#endif
-+
- // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
- // declare this ourselves.
- extern long int syscall (long int __sysno, ...) __THROW;
---
-2.13.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
deleted file mode 100644
index e9112da0c..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:01:34 +0200
-Subject: [PATCH 2/5] remove rpath
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- none/tests/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
-index 54f2a7e..25b0f49 100644
---- a/none/tests/Makefile.am
-+++ b/none/tests/Makefile.am
-@@ -326,7 +326,6 @@ threadederrno_CFLAGS += --std=c99
- endif
- tls_SOURCES = tls.c tls2.c
- tls_DEPENDENCIES = tls.so tls2.so
--tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
- tls_LDADD = tls.so tls2.so -lpthread
- tls_so_SOURCES = tls_so.c
- tls_so_DEPENDENCIES = tls2.so
-@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
- tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
- tls_so_LDADD = `pwd`/tls2.so
- else
-- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
-+ tls_so_LDFLAGS = -shared -fPIC
- tls_so_LDADD = tls2.so
- endif
- tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
---
-2.6.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
deleted file mode 100644
index c2965c40d..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 01:03:17 -0700
-Subject: [PATCH 3/6] correct include directive path for config.h
-
-when building out of source tree, it can not find
-the generated config.h otherwise
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- memcheck/tests/linux/syscalls-2007.c | 2 +-
- memcheck/tests/linux/syslog-syscall.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c
-index b61c6d5..cc3fd62 100644
---- a/memcheck/tests/linux/syscalls-2007.c
-+++ b/memcheck/tests/linux/syscalls-2007.c
-@@ -10,7 +10,7 @@
-
- #define _GNU_SOURCE
-
--#include "../../config.h"
-+#include "config.h"
- #include <fcntl.h>
- #include <signal.h>
- #include <stdint.h>
-diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c
-index 1143722..21e758b 100644
---- a/memcheck/tests/linux/syslog-syscall.c
-+++ b/memcheck/tests/linux/syslog-syscall.c
-@@ -6,7 +6,7 @@
- * klogctl().
- */
-
--#include "../../config.h"
-+#include "config.h"
- #include <stdio.h>
- #if defined(HAVE_SYS_KLOG_H)
- #include <sys/klog.h>
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
deleted file mode 100644
index fa1344c85..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 5 Jul 2017 17:37:56 -0700
-Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall()
-
-__modify_ldt() is specific to glibc, replacing it with syscall()
-makes it more portable.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- none/tests/x86-linux/seg_override.c | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
-index b7619c9..c89874b 100644
---- a/none/tests/x86-linux/seg_override.c
-+++ b/none/tests/x86-linux/seg_override.c
-@@ -2,6 +2,8 @@
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
-+#include <unistd.h>
-+#include <syscall.h>
-
- /* Stuff from Wine. */
-
-@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
- /* our copy of the ldt */
- LDT_ENTRY ldt_copy[8192];
-
--/* System call to set LDT entry. */
--//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
--extern int __modify_ldt (int, void *, size_t);
--
- void print_ldt ( void )
- {
- int res;
-- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
-+ /* System call to set LDT entry. */
-+ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
- printf("got %d bytes\n", res );
- perror("error is");
- }
-@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s
- unsigned int empty:25;
- };
-
--/* System call to set LDT entry. */
--//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
--
- void set_ldt1 ( void* base )
- {
- int stat;
-@@ -102,7 +98,8 @@ void set_ldt1 ( void* base )
- ldt_entry.read_exec_only = 0;
- ldt_entry.limit_in_pages = 0;
- ldt_entry.seg_not_present = 0;
-- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry));
-+ /* System call to set LDT entry. */
-+ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry));
- printf("stat = %d\n", stat);
- }
-
---
-2.13.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
deleted file mode 100644
index e3b03c95c..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From 739421e253e6eba3eb6438651822f80fa9c0502a Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:31:50 +0200
-Subject: [PATCH 1/2] Fix out of tree builds.
-
-The paths to these files need to be fully specified in
-the out of tree build case. glibc-2.X.supp is a generated file so the full path
-is deliberately not specified in that case.
-
-RP 2013/03/23
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- configure.ac | 68 ++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 34 insertions(+), 34 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3874296fde0b..7a5ba2c8557e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -373,50 +373,50 @@ case "${host_os}" in
- 9.*)
- AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
- ;;
- 10.*)
- AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 11.*)
- AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 12.*)
- AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 13.*)
- AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin13.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 14.*)
- AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin14.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 15.*)
- AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- 16.*)
- AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra])
- AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version])
-- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- ;;
- *)
- AC_MSG_RESULT([unsupported (${kernel})])
-@@ -457,10 +457,10 @@ case "${host_os}" in
- uname_v=$( uname -v )
- case "$uname_v" in
- 11.4.*)
-- DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}"
- ;;
- *)
-- DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}"
- ;;
- esac
- ;;
-@@ -468,7 +468,7 @@ case "${host_os}" in
- solaris2.12*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="solaris"
-- DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}"
- ;;
-
- *)
-@@ -982,29 +982,29 @@ AC_MSG_CHECKING([the glibc version])
- case "${GLIBC_VERSION}" in
- 2.2)
- AC_MSG_RESULT(${GLIBC_VERSION} family)
-- DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- ;;
- 2.[[3-6]])
- AC_MSG_RESULT(${GLIBC_VERSION} family)
-- DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.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.[[7-9]])
- AC_MSG_RESULT(${GLIBC_VERSION} family)
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.X-drd.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.10|2.11)
- AC_MSG_RESULT(${GLIBC_VERSION} family)
- AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
- [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.X-drd.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.*)
- AC_MSG_RESULT(${GLIBC_VERSION} family)
-@@ -1013,8 +1013,8 @@ case "${GLIBC_VERSION}" in
- AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
- [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="glibc-2.X-drd.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)
-@@ -1024,7 +1024,7 @@ case "${GLIBC_VERSION}" in
- bionic)
- AC_MSG_RESULT(Bionic)
- AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
-- DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}"
- ;;
- solaris)
- AC_MSG_RESULT(Solaris)
-@@ -1051,11 +1051,11 @@ if test "$VGCONF_OS" != "solaris"; then
- # attempt to detect whether such libraries are installed on the
- # build machine (or even if any X facilities are present); just
- # add the suppressions antidisirregardless.
-- DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
-- DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}"
-
- # Add glibc and X11 suppressions for exp-sgcheck
-- DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/exp-sgcheck.supp ${DEFAULT_SUPP}"
- fi
-
-
---
-2.13.2.3.g44cd85c14
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
deleted file mode 100644
index 1cb706254..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 01:06:11 -0700
-Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- none/tests/pth_atfork1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c
-index 34201ef..b7f5f2d 100644
---- a/none/tests/pth_atfork1.c
-+++ b/none/tests/pth_atfork1.c
-@@ -18,7 +18,7 @@
- Boston, MA 02111-1307, USA. */
-
- #include <errno.h>
--#if !defined(__APPLE__) && !defined(__sun)
-+#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
- # include <error.h>
- #endif
- #include <stdlib.h>
-@@ -27,7 +27,7 @@
- #include <sys/wait.h>
- #include <stdio.h>
-
--#if defined(__APPLE__) || defined(__sun)
-+#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__))
- #include <string.h> /* strerror */
- static void error (int status, int errnum, char* msg)
- {
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
deleted file mode 100644
index 7985308e4..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:50:44 +0200
-Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats
-
-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:
- "[PASS|SKIP|FAIL]: testname"
-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>
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 55 insertions(+), 20 deletions(-)
-
-diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index a441f42..cb05b52 100755
---- a/tests/vg_regtest.in
-+++ b/tests/vg_regtest.in
-@@ -47,6 +47,7 @@
- # --loop-till-fail: loops on the test(s) till one fail, then exit
- # This is useful to obtain detailed trace or --keep-unfiltered
- # output of a non deterministic test failure
-+# --yocto-ptest: output in yocto ptest format
- #
- # The easiest way is to run all tests in valgrind/ with (assuming you installed
- # in $PREFIX):
-@@ -139,7 +140,7 @@ my $usage="\n"
- . "Usage:\n"
- . " vg_regtest [--all, --valgrind, --valgrind-lib, --keep-unfiltered\n"
- . " --outer-valgrind, --outer-tool, --outer-args\n"
-- . " --loop-till-fail]\n"
-+ . " --loop-till-fail, --yocto-ptest]\n"
- . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n"
- . "\n";
-
-@@ -186,6 +187,7 @@ my $outer_args;
- my $valgrind_lib = "$tests_dir/.in_place";
- my $keepunfiltered = 0;
- my $looptillfail = 0;
-+my $yoctoptest = 0;
-
- # default filter is the one named "filter_stderr" in the test's directory
- my $default_stderr_filter = "filter_stderr";
-@@ -244,6 +246,8 @@ sub process_command_line()
- $keepunfiltered = 1;
- } elsif ($arg =~ /^--loop-till-fail$/) {
- $looptillfail = 1;
-+ } elsif ($arg =~ /^--yocto-ptest$/) {
-+ $yoctoptest = 1;
- } else {
- die $usage;
- }
-@@ -365,13 +369,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($$)
-@@ -419,23 +438,25 @@ sub do_diffs($$$$)
- # A match; remove .out and any previously created .diff files.
- unlink("$name.$mid.out");
- unlink(<$name.$mid.diff*>);
-- return;
-+ return 0;
- }
- }
- }
- # If we reach here, none of the .exp files matched.
-- print "*** $name failed ($mid) ***\n";
-+ print "*** $name failed ($mid) ***\n" if ($yoctoptest == 0) ;
- push(@failures, sprintf("%-40s ($mid)", "$fullname"));
- $num_failures{$mid}++;
- if ($looptillfail == 1) {
- print "Failure encountered, stopping to loop\n";
- exit 1
- }
-+ return 1;
- }
-
- sub do_one_test($$)
- {
- my ($dir, $vgtest) = @_;
-+ my $diffStatus = 0;
- $vgtest =~ /^(.*)\.vgtest/;
- my $name = $1;
- my $fullname = "$dir/$name";
-@@ -454,7 +475,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.
-- printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
-+ if ($yoctoptest == 0) {
-+ printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
-+ } else {
-+ printf("SKIP: $fullname\n");
-+ }
- return;
- } else {
- # Bad prereq; abort.
-@@ -472,7 +497,7 @@ sub do_one_test($$)
- }
- # If there is a progB, let's start it in background:
- printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
-- "$name:");
-+ "$name:") if ($yoctoptest == 0);
- # 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
-@@ -488,7 +513,8 @@ sub do_one_test($$)
- . "touch progB.done) &");
- }
- } else {
-- printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:");
-+ printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:")
-+ if ($yoctoptest == 0);
- }
-
- # Collect environment variables, if any.
-@@ -529,7 +555,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);
-- do_diffs($fullname, $name, "stdout", \@stdout_exps);
-+ $diffStatus |= do_diffs($fullname, $name, "stdout", \@stdout_exps);
-
- # Filter stderr
- $stderr_filter_args = $name if (! defined $stderr_filter_args);
-@@ -538,7 +564,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";
-- do_diffs($fullname, $name, "stderr", \@stderr_exps);
-+ $diffStatus |= do_diffs($fullname, $name, "stderr", \@stderr_exps);
-
- if (defined $progB) {
- # wait for the child to be finished
-@@ -562,7 +588,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);
-- do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps);
-+ $diffStatus |= do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps);
-
- # Filter stderr
- $stderrB_filter_args = $name if (! defined $stderrB_filter_args);
-@@ -571,7 +597,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";
-- do_diffs($fullname, $name, "stderrB", \@stderrB_exps);
-+ $diffStatus |= do_diffs($fullname, $name, "stderrB", \@stderrB_exps);
- }
-
- # Maybe do post-test check
-@@ -583,7 +609,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);
-- do_diffs($fullname, $name, "post", \@post_exps);
-+ $diffStatus |= do_diffs($fullname, $name, "post", \@post_exps);
- }
- }
-
-@@ -592,6 +618,13 @@ sub do_one_test($$)
- print("(cleanup operation failed: $cleanup)\n");
- }
-
-+ if ($yoctoptest == 1) {
-+ if ($diffStatus == 0) {
-+ print("PASS: $fullname\n");
-+ } else {
-+ print("FAIL: $fullname\n");
-+ }
-+ }
- $num_tests_done++;
- }
-
-@@ -631,7 +664,7 @@ sub test_one_dir($$)
- my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
-
- if ($found_tests) {
-- print "-- Running tests in $full_dir $dashes\n";
-+ print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0);
- }
- foreach my $f (@fs) {
- if (-d $f) {
-@@ -641,7 +674,7 @@ sub test_one_dir($$)
- }
- }
- if ($found_tests) {
-- print "-- Finished tests in $full_dir $dashes\n";
-+ print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0);
- }
-
- chdir("..");
-@@ -667,10 +700,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"}),
-- $num_failures{"post"}, plural($num_failures{"post"}));
-+ $num_failures{"post"}, plural($num_failures{"post"}))
-+ if ($yoctoptest == 0);
-
- foreach my $failure (@failures) {
-- print "$failure\n";
-+ print "$failure\n"
-+ if ($yoctoptest == 0);
- }
- print "\n";
- }
---
-2.6.2
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
deleted file mode 100644
index 6176640e4..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 01:07:59 -0700
-Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl
-
-similar to sun
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- helgrind/tests/tc20_verifywrap.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c
-index c110000..a311a49 100644
---- a/helgrind/tests/tc20_verifywrap.c
-+++ b/helgrind/tests/tc20_verifywrap.c
-@@ -20,7 +20,7 @@
-
- #if !defined(__APPLE__)
-
--#if defined(__sun__)
-+#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__))
- /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */
- # define __GLIBC_PREREQ
- #else
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
deleted file mode 100644
index 05886c743..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 10 Jun 2017 01:20:32 -0700
-Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
- offset to it
-
-Fixes
-error: invalid use of undefined type 'struct __pthread'
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- drd/tests/pth_detached3.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
-index c02eef1..35d43a6 100644
---- a/drd/tests/pth_detached3.c
-+++ b/drd/tests/pth_detached3.c
-@@ -21,7 +21,7 @@ int main(int argc, char** argv)
- pthread_detach(thread);
-
- /* Invoke pthread_detach() with an invalid thread ID. */
-- pthread_detach(thread + 8);
-+ pthread_detach((pthread_t*)(&thread + 8));
-
- fprintf(stderr, "Finished.\n");
-
---
-2.13.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch
deleted file mode 100644
index 07774f38a..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 0bf4b0ac18d1ea41b32ad781d214b295ca1998f3 Mon Sep 17 00:00:00 2001
-From: Aneesh Bansal <aneesh.bansal@freescale.com>
-Date: Mon, 21 Nov 2011 17:31:39 +0530
-Subject: [PATCH] Added support for PPC instructions mfatbu, mfatbl.
-
-Upstream-Status: Pending
-
-Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
----
-Currently Valgrind 3.7.0 does not have support for PPC instructions mfatbu and mfatbl. When we run a USDPAA application with VALGRIND, the following error is given by valgrind :
-dis_proc_ctl(ppc)(mfspr,SPR)(0x20F)
-disInstr(ppc): unhandled instruction: 0x7C0F82A6
-
-
- VEX/priv/guest_ppc_defs.h | 2 ++
- VEX/priv/guest_ppc_helpers.c | 18 ++++++++++++++++++
- VEX/priv/guest_ppc_toIR.c | 22 ++++++++++++++++++++++
- 3 files changed, 42 insertions(+), 0 deletions(-)
-
-diff --git a/VEX/priv/guest_ppc_defs.h b/VEX/priv/guest_ppc_defs.h
-index dd3c62e..11a34aa 100644
---- a/VEX/priv/guest_ppc_defs.h
-+++ b/VEX/priv/guest_ppc_defs.h
-@@ -146,6 +146,8 @@ extern UInt ppc32g_dirtyhelper_MFSPR_268_269 ( UInt );
-
- extern UInt ppc32g_dirtyhelper_MFSPR_287 ( void );
-
-+extern UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt );
-+
- extern void ppc32g_dirtyhelper_LVS ( VexGuestPPC32State* gst,
- UInt vD_idx, UInt sh,
- UInt shift_right );
-diff --git a/VEX/priv/guest_ppc_helpers.c b/VEX/priv/guest_ppc_helpers.c
-index 11aa428..b49ea3f 100644
---- a/VEX/priv/guest_ppc_helpers.c
-+++ b/VEX/priv/guest_ppc_helpers.c
-@@ -119,6 +119,24 @@ UInt ppc32g_dirtyhelper_MFSPR_287 ( void )
- # endif
- }
-
-+/* CALLED FROM GENERATED CODE */
-+/* DIRTY HELPER (non-referentially transparent) */
-+UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt r527 )
-+{
-+# if defined(__powerpc__) || defined(_AIX)
-+ UInt spr;
-+ if (r527) {
-+ __asm__ __volatile__("mfspr %0,527" : "=b"(spr));
-+ } else {
-+ __asm__ __volatile__("mfspr %0,526" : "=b"(spr));
-+ }
-+ return spr;
-+# else
-+ return 0;
-+# endif
-+}
-+
-+
-
- /* CALLED FROM GENERATED CODE */
- /* DIRTY HELPER (reads guest state, writes guest mem) */
-diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
-index f8d220d..37c8974 100644
---- a/VEX/priv/guest_ppc_toIR.c
-+++ b/VEX/priv/guest_ppc_toIR.c
-@@ -5657,6 +5657,28 @@ static Bool dis_proc_ctl ( VexAbiInfo* vbi, UInt theInstr )
- break;
- }
-
-+
-+ case 526 /* 0x20E */:
-+ case 527 /* 0x20F */: {
-+ UInt arg = SPR==526 ? 0 : 1;
-+ IRTemp val = newTemp(Ity_I32);
-+ IRExpr** args = mkIRExprVec_1( mkU32(arg) );
-+ IRDirty* d = unsafeIRDirty_1_N(
-+ val,
-+ 0/*regparms*/,
-+ "ppc32g_dirtyhelper_MFSPR_526_527",
-+ fnptr_to_fnentry
-+ (vbi, &ppc32g_dirtyhelper_MFSPR_526_527),
-+ args
-+ );
-+ /* execute the dirty call, dumping the result in val. */
-+ stmt( IRStmt_Dirty(d) );
-+ putIReg( rD_addr,
-+ mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) );
-+ DIP("mfspr r%u,%u", rD_addr, (UInt)SPR);
-+ break;
-+ }
-+
- default:
- vex_printf("dis_proc_ctl(ppc)(mfspr,SPR)(0x%x)\n", SPR);
- return False;
---
-1.7.0.4
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
deleted file mode 100644
index 5fcfec001..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 8facc29c3c56e6cf9cfef70986cf73876044a3fb Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 19 Jan 2016 16:42:36 -0800
-Subject: [PATCH] avoid neon for targets which don't support it
-
-The sh-mem-random.c test app tries to use neon loads and stores to
-test 64-bit float copies when building for ARM. Allow it to do so if
-possible, but fallback to C when building for ARM targets which don't
-support neon.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- memcheck/tests/sh-mem-random.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/memcheck/tests/sh-mem-random.c b/memcheck/tests/sh-mem-random.c
-index ae82248..816e139 100644
---- a/memcheck/tests/sh-mem-random.c
-+++ b/memcheck/tests/sh-mem-random.c
-@@ -191,7 +191,7 @@ void do_test_at ( U1* arr )
- "emms"
- : : "r"(arr+dst), "r"(arr+src) : "memory"
- );
--#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__)
-+#elif defined(__linux__) && defined(__arm__) && defined(__ARM_NEON__) && !defined(__aarch64__)
- /* On arm32, many compilers generate a 64-bit float move
- using two 32 bit integer registers, which completely
- defeats this test. Hence force a 64-bit NEON load and
---
-1.9.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
deleted file mode 100644
index b431d3356..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 67e7a690107efb16d6d5aebfe420b64a552accdf Mon Sep 17 00:00:00 2001
-From: Qing He <qing.he@intel.com>
-Date: Tue, 31 Aug 2010 22:51:58 +0800
-Subject: [PATCH] valgrind: fix perl scripts
-
-this is a temporary patch to workaround cross compilation.
-otherwise @PERL@ will be replaced to perl-native binary,
-this creates unusable scripts and fails FILERDEPENDS mechanism
-(esp. rpm)
-
-a better fix would need:
- 1. configure.ac should differentiate PERL and HOSTPERL
- 2. optionally remove ${STAGING_DIR} in #! line before do_install
-
-8/31/2010 - created by Qing He <qing.he@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- cachegrind/cg_annotate.in | 2 +-
- cachegrind/cg_diff.in | 2 +-
- massif/ms_print.in | 2 +-
- perf/vg_perf.in | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in
-index 69365e8..978265d 100644
---- a/cachegrind/cg_annotate.in
-+++ b/cachegrind/cg_annotate.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
-
- ##--------------------------------------------------------------------##
- ##--- Cachegrind's annotator. cg_annotate.in ---##
-diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in
-index 395460b..05873cc 100755
---- a/cachegrind/cg_diff.in
-+++ b/cachegrind/cg_diff.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
-
- ##--------------------------------------------------------------------##
- ##--- Cachegrind's differencer. cg_diff.in ---##
-diff --git a/massif/ms_print.in b/massif/ms_print.in
-index e6fae89..3b85b40 100755
---- a/massif/ms_print.in
-+++ b/massif/ms_print.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
-
- ##--------------------------------------------------------------------##
- ##--- Massif's results printer ms_print.in ---##
-diff --git a/perf/vg_perf.in b/perf/vg_perf.in
-index 7a80cb0..28f6156 100644
---- a/perf/vg_perf.in
-+++ b/perf/vg_perf.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
- ##--------------------------------------------------------------------##
- ##--- Valgrind performance testing script vg_perf ---##
- ##--------------------------------------------------------------------##
-diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index cb05b52..032e947 100755
---- a/tests/vg_regtest.in
-+++ b/tests/vg_regtest.in
-@@ -1,4 +1,4 @@
--#! @PERL@
-+#! /usr/bin/perl
- ##--------------------------------------------------------------------##
- ##--- Valgrind regression testing script vg_regtest ---##
- ##--------------------------------------------------------------------##
----
-2.4.0
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch
deleted file mode 100644
index db322398c..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-When checking if the compiler supports compressed debug sections we need to
-actually link instead of just compile. Otherwise the compiler thinks that
-they are supported, but gold does not support -gz=zlib.
-
-Upstream-Status: Backport (r16459)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---- a/configure.ac~ 2017-07-11 11:53:16.000000000 +0100
-+++ b/configure.ac 2017-07-11 18:16:13.674130483 +0100
-@@ -2119,7 +2119,7 @@
- safe_CFLAGS=$CFLAGS
- CFLAGS="-g -gz=zlib"
-
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
- return 0;
- ]])], [
- ac_have_gz_zlib=yes
-@@ -2139,7 +2139,7 @@
- safe_CFLAGS=$CFLAGS
- CFLAGS="-g -gz=zlib-gnu"
-
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
- return 0;
- ]])], [
- ac_have_gz_zlib_gnu=yes
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch
deleted file mode 100644
index 51259db00..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Backport a patch from upstream to fix test compilation for PPC where
-system headers don't get included.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines
-
-ppc64 doesn't compile test_isa_2_06_partx.c without VSX support
-
-The #ifdef HAS_VSX guard is wrongly placed. It makes the standard
-include headers not be used. Causing a build failure. Fix by moving
-the #ifdef HAS_VSX after the standard includes.
-
-Index: none/tests/ppc32/test_isa_2_06_part3.c
-===================================================================
---- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449)
-+++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450)
-@@ -20,17 +20,18 @@
- The GNU General Public License is contained in the file COPYING.
- */
-
--#ifdef HAS_VSX
--
- #include <stdio.h>
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <malloc.h>
--#include <altivec.h>
- #include <math.h>
- #include <unistd.h> // getopt
-
-+#ifdef HAS_VSX
-+
-+#include <altivec.h>
-+
- #ifndef __powerpc64__
- typedef uint32_t HWord_t;
- #else
-Index: none/tests/ppc32/test_isa_2_06_part1.c
-===================================================================
---- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449)
-+++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450)
-@@ -20,13 +20,14 @@
- The GNU General Public License is contained in the file COPYING.
- */
-
--#ifdef HAS_VSX
--
- #include <stdio.h>
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <malloc.h>
-+
-+#ifdef HAS_VSX
-+
- #include <altivec.h>
-
- #ifndef __powerpc64__
-Index: none/tests/ppc32/test_isa_2_06_part2.c
-===================================================================
---- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449)
-+++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450)
-@@ -20,17 +20,18 @@
- The GNU General Public License is contained in the file COPYING.
- */
-
--#ifdef HAS_VSX
--
- #include <stdio.h>
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #include <malloc.h>
--#include <altivec.h>
- #include <math.h>
- #include <unistd.h> // getopt
-
-+#ifdef HAS_VSX
-+
-+#include <altivec.h>
-+
- #ifndef __powerpc64__
- typedef uint32_t HWord_t;
- #else
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest
deleted file mode 100755
index 447d33c8c..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# run-ptest - 'ptest' test infrastructure shell script that
-# wraps the valgrind regression script vg_regtest.
-#
-# Dave Lerner <dave.lerner@windriver.com>
-###############################################################
-VALGRINDLIB=@libdir@/valgrind
-LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
-
-cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \
- --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
- --yocto-ptest 2>&1|tee ${LOG}
-
-passed=`grep PASS: ${LOG}|wc -l`
-failed=`grep FAIL: ${LOG}|wc -l`
-skipped=`grep SKIP: ${LOG}|wc -l`
-all=$((passed + failed + skipped))
-
-( echo "=== Test Summary ==="
- echo "TOTAL: ${all}"
- echo "PASSED: ${passed}"
- echo "FAILED: ${failed}"
- echo "SKIPPED: ${skipped}"
-) | tee -a /${LOG}
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch
deleted file mode 100644
index adea40521..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From d134dafc2f11e0d247420a0ba360bcdef77b4093 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 19 Jan 2016 16:00:00 -0800
-Subject: [PATCH] use appropriate -march/-mcpu/-mfpu for ARM test apps
-
-Ensure that test apps in none/tests/arm are compiled with appropriate
--march/-mcpu/-mfpu flags to support the instructions being tested.
-The aim is to build all tests, even ones which may not run correctly
-on all target CPUs.
-
-For tests requiring armv7ve instructions, ensure that we set both
--march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set
--march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to
-over-ride that).
-
-See similar cases in none/tests/arm/Makefile.am
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- none/tests/arm/Makefile.am | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
-index 4507a20..825290f 100644
---- a/none/tests/arm/Makefile.am
-+++ b/none/tests/arm/Makefile.am
-@@ -62,8 +62,10 @@ neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
- -mfpu=neon \
- -mthumb
-
--intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
-+intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
- ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
- ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
-
--vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
-+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
-+
-+vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
---
-1.9.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
deleted file mode 100644
index d04297dca..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 13 Dec 2016 11:29:55 +0800
-Subject: [PATCH] make ld-XXX.so strlen intercept optional
-
-Hack: Depending on how glibc was compiled (e.g. optimised for size or
-built with _FORTIFY_SOURCE enabled) the strlen symbol might not be
-found in ld-XXX.so. Therefore although we should still try to
-intercept it, don't make it mandatory to do so.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- coregrind/m_redir.c | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
-index ff35009..d7d6816 100644
---- a/coregrind/m_redir.c
-+++ b/coregrind/m_redir.c
-@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const HChar* sopatt, const HChar* fnpatt,
- spec->to_addr = to_addr;
- spec->isWrap = False;
- spec->isGlobal = False;
-- spec->mandatory = mandatory;
-+
-+ /* Hack: Depending on how glibc was compiled (e.g. optimised for size or
-+ built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found.
-+ Therefore although we should still try to intercept it, don't make it
-+ mandatory to do so. We over-ride "mandatory" here to avoid the need to
-+ patch the many different architecture specific callers to
-+ add_hardwired_spec(). */
-+ if (0==VG_(strcmp)("strlen", fnpatt))
-+ spec->mandatory = NULL;
-+ else
-+ spec->mandatory = mandatory;
-+
- /* VARIABLE PARTS */
- spec->mark = False; /* not significant */
- spec->done = False; /* not significant */
---
-1.9.1
-
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb
deleted file mode 100644
index 351499782..000000000
--- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb
+++ /dev/null
@@ -1,158 +0,0 @@
-SUMMARY = "Valgrind memory debugger and instrumentation framework"
-HOMEPAGE = "http://valgrind.org/"
-BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
-LICENSE = "GPLv2 & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \
- file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \
- file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
-
-X11DEPENDS = "virtual/libx11"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
- "
-SRC_URI = "git://sourceware.org/git/valgrind.git;protocol=git;branch=master"
-SRCREV = "2b0aa0a5b88f900e986a3360952fcb3d2513419d"
-S = "${WORKDIR}/git"
-
-#
-#
-
-SRC_URI += " \
- file://fixed-perl-path.patch \
- file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
- file://run-ptest \
- file://0002-remove-rpath.patch \
- file://0004-Fix-out-of-tree-builds.patch \
- file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
- file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
- file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
- file://avoid-neon-for-targets-which-don-t-support-it.patch \
- file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
- file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
- file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \
- file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
- file://0002-context-APIs-are-not-available-on-musl.patch \
- file://0003-correct-include-directive-path-for-config.h.patch \
- file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
- file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
- file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
- file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
- file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
- file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
- file://link-gz-tests.patch \
- "
-SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
-SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"
-UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
-
-COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
-
-# valgrind supports armv7 and above
-COMPATIBLE_HOST_armv4 = 'null'
-COMPATIBLE_HOST_armv5 = 'null'
-COMPATIBLE_HOST_armv6 = 'null'
-
-# X32 isn't supported by valgrind at this time
-COMPATIBLE_HOST_linux-gnux32 = 'null'
-COMPATIBLE_HOST_linux-muslx32 = 'null'
-
-# Disable for some MIPS variants
-COMPATIBLE_HOST_mipsarchn32 = 'null'
-COMPATIBLE_HOST_mipsarchr6 = 'null'
-
-inherit autotools ptest multilib_header
-
-EXTRA_OECONF = "--enable-tls --without-mpicc"
-EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}"
-
-# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
-EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
-TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}"
-
-EXTRA_OEMAKE = "-w"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
-
-# valgrind likes to control its own optimisation flags. It generally defaults
-# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
-# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
-# which fixes build path issue in DWARF.
-SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
-
-def get_mcpu(d):
- for arg in (d.getVar('TUNE_CCARGS') or '').split():
- if arg.startswith('-mcpu='):
- return arg
- else:
- continue
- return ""
-
-do_configure_prepend () {
- rm -rf ${S}/config.h
-}
-
-do_install_append () {
- install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
- oe_multilib_header valgrind/config.h
-}
-
-TUNE = "${@strip_mcpu(d)}"
-
-RDEPENDS_${PN} += "perl"
-
-# valgrind needs debug information for ld.so at runtime in order to
-# redirect functions like strlen.
-RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-
-RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
-
-# One of the tests contains a bogus interpreter path on purpose.
-# Skip file dependency check
-SKIP_FILEDEPS_${PN}-ptest = '1'
-
-do_compile_ptest() {
- oe_runmake check
-}
-
-do_install_ptest() {
- chmod +x ${B}/tests/vg_regtest
-
- # The test application binaries are not automatically installed.
- # Grab them from the build directory.
- #
- # The regression tests require scripts and data files that are not
- # copied to the build directory. They must be copied from the
- # source directory.
- saved_dir=$PWD
- for parent_dir in ${S} ${B} ; do
- cd $parent_dir
-
- # exclude shell or the package won't install
- rm -rf none/tests/shell* 2>/dev/null
-
- subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
-
- # Get the vg test scripts, filters, and expected files
- for dir in $subdirs ; do
- find $dir | cpio -pvdu ${D}${PTEST_PATH}
- done
- cd $saved_dir
- done
-
- # clean out build artifacts before building the rpm
- find ${D}${PTEST_PATH} \
- \( -name "Makefile*" \
- -o -name "*.o" \
- -o -name "*.c" \
- -o -name "*.S" \
- -o -name "*.h" \) \
- -exec rm {} \;
-
- # needed by massif tests
- cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
-
- # handle multilib
- sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
-}
diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch b/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch
new file mode 100644
index 000000000..ff21b2130
--- /dev/null
+++ b/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch
@@ -0,0 +1,35 @@
+From 8eaec876f732c7e4b238ada5f9304c6da2380eb1 Mon Sep 17 00:00:00 2001
+From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
+Date: Fri, 8 Feb 2019 22:44:32 +0000
+Subject: [PATCH] backport: usb: setup_timer
+
+---
+ driver/hdm-usb/hdm_usb.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c
+index 5b0af88..9896835 100644
+--- a/hdm-usb/hdm_usb.c
++++ b/hdm-usb/hdm_usb.c
+@@ -760,9 +760,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel,
+ * The handler runs in interrupt context. That's why we need to defer the
+ * tasks to a work queue.
+ */
+-static void link_stat_timer_handler(unsigned long data)
++static void link_stat_timer_handler(struct timer_list *t)
+ {
+- struct most_dev *mdev = (struct most_dev *)data;
++ struct most_dev *mdev = from_timer(mdev, t, link_stat_timer);
+
+ schedule_work(&mdev->poll_work_obj);
+ mdev->link_stat_timer.expires = jiffies + (2 * HZ);
+@@ -1154,8 +1154,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
+ num_endpoints = usb_iface_desc->desc.bNumEndpoints;
+ mutex_init(&mdev->io_mutex);
+ INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
+- setup_timer(&mdev->link_stat_timer, link_stat_timer_handler,
+- (unsigned long)mdev);
++ timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0);
+
+ mdev->usb_device = usb_dev;
+ mdev->link_stat_timer.expires = jiffies + (2 * HZ);
diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch
new file mode 100644
index 000000000..8f83dbab4
--- /dev/null
+++ b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch
@@ -0,0 +1,18 @@
+Handle snd_pcm_lib_mmap_vmalloc removal in 4.19
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/driver/aim-sound/sound.c b/driver/aim-sound/sound.c
+index 6a290ff..4b3329b 100644
+--- a/aim-sound/sound.c
++++ b/aim-sound/sound.c
+@@ -463,7 +463,6 @@ static const struct snd_pcm_ops pcm_ops = {
+ .trigger = pcm_trigger,
+ .pointer = pcm_pointer,
+ .page = snd_pcm_lib_get_vmalloc_page,
+- .mmap = snd_pcm_lib_mmap_vmalloc,
+ };
+
+ static int split_arg_list(char *buf, char **card_name, u16 *ch_num,
diff --git a/meta-agl-profile-core/recipes-kernel/most/most.bbappend b/meta-agl-profile-core/recipes-kernel/most/most.bbappend
index 8515d4cc8..a90210d8f 100644
--- a/meta-agl-profile-core/recipes-kernel/most/most.bbappend
+++ b/meta-agl-profile-core/recipes-kernel/most/most.bbappend
@@ -12,6 +12,7 @@ ORIG_KERN_VER = "${@prep_version(d)}"
VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}"
APPLY = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}"
+APPLY_419 = "${@str('no' if ${VANILLA_KERNEL_VERSION} < 419 else 'yes')}"
SRC_URI_append = " \
file://0001-most-aim-network-backport-Kernel-API.patch;apply=${APPLY} \
@@ -23,6 +24,8 @@ SRC_URI_append = " \
file://0007-dim2-use-device-tree.patch \
file://0008-dim2-read-clock-speed-from-the-device-tree.patch \
file://0009-dim2-use-device-for-coherent-memory-allocation.patch \
+ file://0010-backport-usb-setup-timer.patch \
+ file://0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch;apply=${APPLY_419} \
"
# Make sure we can expose KERNEL_VERSION ...
do_patch[depends] += "virtual/kernel:do_populate_sysroot"
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch
index 8c5f9efd4..f77249a23 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch
@@ -5,17 +5,12 @@ Subject: [PATCH 1/6] install files for a module development
Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
---
- Makefile.am | 14 +++++++++++++-
- configure.ac | 1 +
- pulseaudio-module-devel.pc.in | 12 ++++++++++++
- 3 files changed, 26 insertions(+), 1 deletion(-)
- create mode 100644 pulseaudio-module-devel.pc.in
diff --git a/Makefile.am b/Makefile.am
-index 13bc469..f0d68a2 100644
+index 275ceea..77dd7a5 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -53,7 +53,16 @@ dist_vapi_DATA = \
+@@ -54,7 +54,16 @@ dist_vapi_DATA = \
vala/libpulse-simple.deps vala/libpulse-simple.vapi
pkgconfigdir = $(libdir)/pkgconfig
@@ -33,7 +28,7 @@ index 13bc469..f0d68a2 100644
if HAVE_GLIB20
pkgconfig_DATA += \
-@@ -107,6 +116,9 @@ dist-hook:
+@@ -108,6 +117,9 @@ dist-hook:
check-daemon:
$(MAKE) -C src check-daemon
@@ -44,17 +39,17 @@ index 13bc469..f0d68a2 100644
# see git-version-gen
diff --git a/configure.ac b/configure.ac
-index 9250c05..f9201ee 100644
+index c9c414f..87aa9b1 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1502,6 +1502,7 @@ man/pulse-client.conf.5.xml
+@@ -1548,6 +1548,7 @@ man/pulse-client.conf.5.xml
man/default.pa.5.xml
man/pulse-cli-syntax.5.xml
man/start-pulseaudio-x11.1.xml
+pulseaudio-module-devel.pc
])
- AC_CONFIG_FILES([src/esdcompat:src/daemon/esdcompat.in], [chmod +x src/esdcompat])
+ AS_IF([test "x$HAVE_ESOUND" = "x1"],
diff --git a/pulseaudio-module-devel.pc.in b/pulseaudio-module-devel.pc.in
new file mode 100644
index 0000000..85aadbc
@@ -73,6 +68,3 @@ index 0000000..85aadbc
+Libs: -L${libdir} -L${libdir}/pulseaudio -L${modlibexecdir} -lpulsecommon-@PA_MAJORMINOR@ -lpulsecore-@PA_MAJORMINOR@ -lprotocol-native
+Libs.private:
+Cflags: -I${includedir}/pulsemodule -D_REENTRANT
---
-1.9.1
-
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch
index 9cee6f5de..5b2da69c9 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch
@@ -1,4 +1,4 @@
-From 7757059ffc6e63ea20ba9013682d72d619e7aefc Mon Sep 17 00:00:00 2001
+From c28b5faa6745b525c11d1f54d8bf52386a90fcc1 Mon Sep 17 00:00:00 2001
From: Sangchul Lee <sangchul1011@gmail.com>
Date: Sat, 27 Aug 2016 21:33:16 +0900
Subject: [PATCH 2/6] volume ramp: additions to the low level infra
@@ -8,6 +8,7 @@ The original patch is
- by Jaska Uimonen <jaska.uimonen <at> helsinki.fi>
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
+
---
src/map-file | 4 +
src/pulse/def.h | 13 ++-
@@ -18,7 +19,7 @@ Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
6 files changed, 459 insertions(+), 2 deletions(-)
diff --git a/src/map-file b/src/map-file
-index 93a62b8..ef9b57d 100644
+index 9b6cba2..946ab54 100644
--- a/src/map-file
+++ b/src/map-file
@@ -138,6 +138,10 @@ pa_cvolume_max_mask;
@@ -33,10 +34,10 @@ index 93a62b8..ef9b57d 100644
pa_cvolume_scale;
pa_cvolume_scale_mask;
diff --git a/src/pulse/def.h b/src/pulse/def.h
-index 680bdc9..bc3cedd 100644
+index 100df5b..b13eed7 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
-@@ -347,11 +347,15 @@ typedef enum pa_stream_flags {
+@@ -349,11 +349,15 @@ typedef enum pa_stream_flags {
* consider absolute when the sink is in flat volume mode,
* relative otherwise. \since 0.9.20 */
@@ -53,7 +54,7 @@ index 680bdc9..bc3cedd 100644
} pa_stream_flags_t;
/** \cond fulldocs */
-@@ -380,6 +384,7 @@ typedef enum pa_stream_flags {
+@@ -382,6 +386,7 @@ typedef enum pa_stream_flags {
#define PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND
#define PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME
#define PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH
@@ -61,7 +62,7 @@ index 680bdc9..bc3cedd 100644
/** \endcond */
-@@ -1047,6 +1052,12 @@ typedef enum pa_port_available {
+@@ -1070,6 +1075,12 @@ typedef enum pa_port_available {
/** \endcond */
#endif
@@ -75,10 +76,10 @@ index 680bdc9..bc3cedd 100644
#endif
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
-index 1667b94..85072c1 100644
+index ead5415..83a1e05 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
-@@ -445,7 +445,10 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) {
+@@ -457,7 +457,10 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) {
unsigned c;
pa_assert(a);
@@ -90,7 +91,7 @@ index 1667b94..85072c1 100644
pa_return_val_if_fail(PA_VOLUME_IS_VALID(v), 0);
for (c = 0; c < a->channels; c++)
-@@ -977,3 +980,72 @@ pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec) {
+@@ -989,3 +992,72 @@ pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec) {
return pa_cvolume_scale(v, m);
}
@@ -164,11 +165,11 @@ index 1667b94..85072c1 100644
+ return ramp;
+}
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
-index 8cf4fa4..2ae3451 100644
+index 2503c3f..0b74833 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
-@@ -431,6 +431,39 @@ pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc);
- * the channels are kept. \since 0.9.16 */
+@@ -437,6 +437,39 @@ pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc);
+ * the channels are kept. Returns \a v, or NULL on error. \since 0.9.16 */
pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec);
+/** Volume ramp type
@@ -561,6 +562,3 @@ index 8102bcd..0f86b6f 100644
+ pa_cvolume_ramp_int *ramp);
+
#endif
---
-1.9.1
-
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch
index eb485ca7c..eb485ca7c 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch
index 64d7b141d..64d7b141d 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch
index e371b7ec5..e371b7ec5 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch
index 50110bd14..50110bd14 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch
index 85b1ae03d..85b1ae03d 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch
diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend
index f59ee89d5..746100400 100644
--- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend
+++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/pulseaudio-10.0:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-${PV}:"
SRC_URI += " \
file://0001-install-files-for-a-module-development.patch \
diff --git a/meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend b/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend
index 8656abf09..8656abf09 100644
--- a/meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend
+++ b/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend
diff --git a/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch b/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch
index 1f3acf28e..4d0d09aea 100644
--- a/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch
+++ b/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch
@@ -1,7 +1,7 @@
-diff -urN /tmp/ft2demos-2.6.orig/Makefile /tmp/ft2demos-2.6/Makefile
---- ft2demos-2.6.orig/Makefile 2015-06-07 07:34:19.000000000 +0000
-+++ ft2demos-2.6/Makefile 2016-06-17 14:25:37.640456725 +0000
-@@ -153,7 +153,8 @@
+diff -ur ft2demos-2.9.1.orig/Makefile ft2demos-2.9.1/Makefile
+--- ft2demos-2.9.1.orig/Makefile 2018-04-22 05:41:50.000000000 -0400
++++ ft2demos-2.9.1/Makefile 2019-02-18 23:28:59.794678736 -0500
+@@ -163,7 +163,8 @@
ifeq ($(PLATFORM),unix)
CC = $(CCraw)
@@ -10,8 +10,8 @@ diff -urN /tmp/ft2demos-2.6.orig/Makefile /tmp/ft2demos-2.6/Makefile
+ LINK_CMD = $(subst /,$(SEP),$(LIBTOOL)) \
--mode=link $(CC) \
$(subst /,$(COMPILER_SEP),$(LDFLAGS))
- LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE))
-@@ -279,12 +280,12 @@
+ LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(LIB_CLOCK_GETTIME)
+@@ -289,12 +290,12 @@
ttdebug
# Comment out the next line if you don't have a graphics subsystem.
diff --git a/meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend b/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend
index 282ce784a..5d4b101a0 100644
--- a/meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend
+++ b/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend
@@ -4,8 +4,8 @@ SRC_URI =+ "${SOURCEFORGE_MIRROR}/freetype/ft2demos-${PV}.tar.bz2;name=ft2demos
file://0001-Makefile-dont-build-gfx-demos.patch;patchdir=../ft2demos-${PV} \
file://0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch;patchdir=../ft2demos-${PV} \
"
-SRC_URI[ft2demos.md5sum] = "61db5831e213acb843f0fc6d10186054"
-SRC_URI[ft2demos.sha256sum] = "2b6ce0d36bcb43fcc8aac07a0287982d855571ee271c3803c768e501f9c1a233"
+SRC_URI[ft2demos.md5sum] = "178827156d90e07bce8f354c9565d84b"
+SRC_URI[ft2demos.sha256sum] = "806eb6363ee5963174a6740f9b7893377912165899c2c1f6372c422aab818c6a"
PACKAGES =+ "${PN}-demos"
diff --git a/meta-agl-profile-graphical-html5/conf/layer.conf b/meta-agl-profile-graphical-html5/conf/layer.conf
index 4d84dba52..69967b03c 100644
--- a/meta-agl-profile-graphical-html5/conf/layer.conf
+++ b/meta-agl-profile-graphical-html5/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilegraphicalhtml5"
BBFILE_PATTERN_aglprofilegraphicalhtml5 = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilegraphicalhtml5 = "70"
+
+LAYERSERIES_COMPAT_aglprofilegraphicalhtml5 = "thud"
diff --git a/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb b/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb
index a278e0956..2d811205c 100755
--- a/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb
+++ b/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb
@@ -41,7 +41,6 @@ TOOLCHAIN_TARGET_TASK += " \
libexif-dev \
pango-dev \
libdrm-dev \
- libssp-dev \
lua-dev \
lua-staticdev \
${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \
diff --git a/meta-agl-profile-graphical-qt5/conf/layer.conf b/meta-agl-profile-graphical-qt5/conf/layer.conf
index eb47e5d14..d73b8aa64 100644
--- a/meta-agl-profile-graphical-qt5/conf/layer.conf
+++ b/meta-agl-profile-graphical-qt5/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilegraphicalqt5"
BBFILE_PATTERN_aglprofilegraphicalqt5 = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilegraphicalqt5 = "70"
+
+LAYERSERIES_COMPAT_aglprofilegraphicalqt5 = "thud"
diff --git a/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb b/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb
index 4ff779101..8477b394e 100755
--- a/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb
+++ b/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb
@@ -41,7 +41,6 @@ TOOLCHAIN_TARGET_TASK += " \
libexif-dev \
pango-dev \
libdrm-dev \
- libssp-dev \
lua-dev \
lua-staticdev \
${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \
diff --git a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch
index 99b519399..984ae8132 100644
--- a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch
+++ b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch
@@ -1,5 +1,5 @@
diff --git a/tests/auto/compositor/compositor/compositor.pro b/tests/auto/compositor/compositor/compositor.pro
-index f0cdaf32..64b60218 100644
+index 2919fa4..d9acac3 100644
--- a/tests/auto/compositor/compositor/compositor.pro
+++ b/tests/auto/compositor/compositor/compositor.pro
@@ -7,9 +7,6 @@ QT += core-private gui-private waylandcompositor waylandcompositor-private
diff --git a/meta-agl-profile-graphical/conf/layer.conf b/meta-agl-profile-graphical/conf/layer.conf
index 4b0b8cb9b..a857b0c33 100644
--- a/meta-agl-profile-graphical/conf/layer.conf
+++ b/meta-agl-profile-graphical/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilegraphical"
BBFILE_PATTERN_aglprofilegraphical = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilegraphical = "70"
+
+LAYERSERIES_COMPAT_aglprofilegraphical = "thud"
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch
index feeef0e22..7ea0b6e9b 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch
@@ -3,33 +3,20 @@ From: Michael Teyfel <mteyfel@de.adit-jv.com>
Date: Fri, 12 Oct 2018 17:12:24 +0200
Subject: [PATCH 1/3] Added ivi-id-agent to CMake
+Reworked for wayland-ivi-extension 2.2.0 by Scott Murray.
+
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
----
- CMakeLists.txt | 4 ++++
- 1 file changed, 4 insertions(+)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c82136e..33662b9 100644
+index 7d0044a..988fc89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -23,6 +23,9 @@ SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
-
- project(wayland-ivi-extension)
-
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(WESTON weston>=2.0.0 REQUIRED)
-+
- SET(IVI_EXTENSION_VERSION 2.0.2)
- SET(ILM_API_VERSION 2.0.2)
-
-@@ -35,6 +38,7 @@ add_subdirectory(ivi-layermanagement-api/ilmClient)
- add_subdirectory(ivi-layermanagement-api/ilmControl)
- add_subdirectory(ivi-layermanagement-api/test)
+@@ -40,6 +40,7 @@ add_subdirectory(ivi-layermanagement-api/test)
add_subdirectory(ivi-layermanagement-examples)
+ add_subdirectory(ivi-layermanagement-api/ilmInput)
+ add_subdirectory(ivi-input-modules/ivi-input-controller)
+add_subdirectory(ivi-id-agent-modules/ivi-id-agent)
- if(WITH_ILM_INPUT)
- add_subdirectory(ivi-input-api/ilmInput)
---
-2.7.4
-
+
+ #=============================================================================================
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
index 2b78357fe..c39c23982 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
@@ -35,19 +35,14 @@ weston: https://github.com/mtey/weston/tree/xdg_support_ivi_id_agent
Since libweston-desktop is used to introduce desktop-surface support,
xdg-protocol is supported.
+Reworked for wayland-ivi-extension 2.2.0 by Scott Murray.
+
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
----
- ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt | 69 ++++
- .../ivi-id-agent/src/ivi-id-agent.c | 381 +++++++++++++++++++++
- ivi-id-agent-modules/ivi-id-agent/weston.ini.in | 20 ++
- 3 files changed, 470 insertions(+)
- create mode 100644 ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
- create mode 100644 ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c
- create mode 100644 ivi-id-agent-modules/ivi-id-agent/weston.ini.in
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
new file mode 100644
-index 0000000..2def105
+index 0000000..7354a7e
--- /dev/null
+++ b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt
@@ -0,0 +1,69 @@
@@ -76,9 +71,9 @@ index 0000000..2def105
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
-+pkg_check_modules(WESTON weston>=2.0.0 REQUIRED)
++pkg_check_modules(WESTON weston>=5.0.0 REQUIRED)
+pkg_check_modules(PIXMAN pixman-1 REQUIRED)
-+pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-2 REQUIRED)
++pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-5 REQUIRED)
+
+find_package(Threads REQUIRED)
+
@@ -533,6 +528,3 @@ index 0000000..48a196c
+[desktop-app-default]
+default-surface-id=2000000
+default-surface-id-max=2001000
---
-2.7.4
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch
index 06fe7843a..8985879b0 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch
@@ -3,16 +3,16 @@ From: Michael Teyfel <mteyfel@de.adit-jv.com>
Date: Fri, 12 Oct 2018 16:57:24 +0200
Subject: [PATCH 3/3] ivi-controller: load id-agent module
+Reworked for wayland-ivi-extension 2.2.0 by Scott Murray.
+
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
----
- weston-ivi-shell/src/ivi-controller.c | 39 +++++++++++++++++++++++++++++++++++
- 1 file changed, 39 insertions(+)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
-index 6d95c88..f6ac174 100644
+index 8faec2a..8fa51f4 100644
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
-@@ -2164,6 +2164,41 @@ load_input_module(struct ivishell *shell)
+@@ -2154,6 +2154,41 @@ load_input_module(struct ivishell *shell)
return 0;
}
@@ -54,9 +54,9 @@ index 6d95c88..f6ac174 100644
static void
launch_client_process(void *data)
{
-@@ -2229,6 +2264,10 @@ controller_module_init(struct weston_compositor *compositor,
- return -1;
- }
+@@ -2221,6 +2256,10 @@ wet_module_init(struct weston_compositor *compositor,
+ shell->destroy_listener.notify = ivi_shell_destroy;
+ wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener);
+ if (load_id_agent_module(shell) < 0) {
+ weston_log("ivi-controller: id-agent module not loaded\n");
@@ -65,6 +65,3 @@ index 6d95c88..f6ac174 100644
if (shell->bkgnd_surface_id && shell->ivi_client_name) {
loop = wl_display_get_event_loop(compositor->wl_display);
wl_event_loop_add_idle(loop, launch_client_process, shell);
---
-2.7.4
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch
index a665c060f..05d1cc238 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch
@@ -11,10 +11,10 @@ index a88f2b0..12a2017 100644
} t_ilm_notification_mask;
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
-index 9b4762b..5104459 100644
+index a912e50..5166839 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
-@@ -779,6 +779,12 @@ input_listener_input_focus(void *data,
+@@ -819,6 +819,12 @@ input_listener_input_focus(void *data,
surf_ctx->prop.focus |= device;
else
surf_ctx->prop.focus &= ~device;
@@ -25,4 +25,5 @@ index 9b4762b..5104459 100644
+ ILM_NOTIFICATION_FOCUS);
+ }
}
- } \ No newline at end of file
+ }
+
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb
index de673a272..d507d2f7e 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb
@@ -5,25 +5,23 @@ BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Exten
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79"
-SRCREV = "ff067a640451de46836200624ece7ac777977c30"
-SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=2.0;protocol=http \
- file://0001-Added-ivi-id-agent-to-CMake.patch \
- file://0002-ivi-id-agent-added-ivi-id-agent.patch \
- file://0003-ivi-controller-load-id-agent-module.patch \
- file://0002-add-LayerManagerControl-error-status.patch \
- file://0004-ivi-ilmcontrol-added-focus-notification.patch \
+SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=http \
+ file://0001-Added-ivi-id-agent-to-CMake.patch \
+ file://0002-ivi-id-agent-added-ivi-id-agent.patch \
+ file://0003-ivi-controller-load-id-agent-module.patch \
+ file://0002-add-LayerManagerControl-error-status.patch \
+ file://0004-ivi-ilmcontrol-added-focus-notification.patch \
"
SRC_URI_append_wandboard = " file://wandboard_fix_build.patch"
+SRCREV = "736fb654ac81230cf4f9e51a5772d3a02d7639bf"
+PV = "2.2.0+git${SRCPV}"
S = "${WORKDIR}/git"
DEPENDS = "weston virtual/libgles2 pixman wayland-native"
FILESEXTRAPATHS_prepend := ":${THISDIR}/wayland-ivi-extension:"
-# workaround paralellism issue:
-PARALLEL_MAKE = ""
-
inherit cmake
EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1"
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch
index bd1a72b0f..3a59ba0c8 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch
@@ -4,18 +4,14 @@ Date: Wed, 31 May 2017 22:48:18 +0000
Subject: [PATCH] Allow regular users to launch Weston
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
----
- configure.ac | 6 ++++++
- libweston/launcher-direct.c | 2 ++
- 2 files changed, 8 insertions(+)
diff --git a/configure.ac b/configure.ac
-index 7e84c14..8b3e17e 100644
+index 50f8e013..2043b9b0 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -155,6 +155,12 @@ if test x$enable_xkbcommon = xyes; then
- true)
- fi
+@@ -156,6 +156,12 @@ PKG_CHECK_MODULES(XKBCOMMON_COMPOSE, [xkbcommon >= 0.5.0],
+ [AC_DEFINE(HAVE_XKBCOMMON_COMPOSE, 1,
+ [Define if xkbcommon is 0.5.0 or newer])],true)
+AC_ARG_ENABLE(sys-uid, [ --enable-sys-uid],,
+ enable_sys_uid=no)
@@ -27,10 +23,10 @@ index 7e84c14..8b3e17e 100644
enable_setuid_install=yes)
AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c
-index 4fc1c3c..8f16a69 100644
+index e0ce6d63..d0db9bb5 100644
--- a/libweston/launcher-direct.c
+++ b/libweston/launcher-direct.c
-@@ -275,8 +275,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor *
+@@ -283,8 +283,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor *
{
struct launcher_direct *launcher;
@@ -41,6 +37,3 @@ index 4fc1c3c..8f16a69 100644
launcher = zalloc(sizeof(*launcher));
if (launcher == NULL)
---
-2.7.4
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch
index 449b7a0fd..b1e0b8a59 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch
@@ -1,40 +1,40 @@
-index 67619b8f..e9ddf9a4 100644
+diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
+index 58f53bc5..34cdce27 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
-@@ -497,44 +497,53 @@ wet_shell_init(struct weston_compositor *compositor,
+@@ -484,13 +484,14 @@ wet_shell_init(struct weston_compositor *compositor,
+ int *argc, char *argv[])
{
struct ivi_shell *shell;
- struct ivi_shell_setting setting = { };
- int retval = -1;
shell = zalloc(sizeof *shell);
if (shell == NULL)
- return -1;
-
- if (ivi_shell_setting_create(&setting, compositor, argc, argv) != 0)
- return -1;
+ goto err_shell;
- init_ivi_shell(compositor, shell, &setting);
+ init_ivi_shell(compositor, shell);
+ /* TODO deinit_ivi_shell should be implemented, since init_ivi_shell is
+ * initializing multiple lists. */
shell->destroy_listener.notify = shell_destroy;
wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener);
+@@ -499,22 +500,29 @@ wet_shell_init(struct weston_compositor *compositor,
+ wl_signal_add(&compositor->wake_signal, &shell->wake_listener);
if (input_panel_setup(shell) < 0)
-- goto out_settings;
-+ goto err_settings;
+- goto out;
++ goto err_shell;
shell->text_backend = text_backend_init(compositor);
if (!shell->text_backend)
-- goto out_settings;
-+ goto err_settings;
+- goto out;
++ goto err_shell;
if (wl_global_create(compositor->wl_display,
&ivi_application_interface, 1,
shell, bind_ivi_application) == NULL)
-- goto out_settings;
+- goto out;
+ goto err_text_backend;
ivi_layout_init_with_compositor(compositor);
@@ -42,23 +42,14 @@ index 67619b8f..e9ddf9a4 100644
+ * and signals are initialized.*/
shell_add_bindings(compositor, shell);
- /* Call module_init of ivi-modules which are defined in weston.ini */
- if (load_controller_modules(compositor, setting.ivi_module,
- argc, argv) < 0)
-- goto out_settings;
-+ goto err_text_backend;
-+
+- retval = 0;
+ return IVI_SUCCEEDED;
-- retval = 0;
+-out:
+- return retval;
+err_text_backend:
+ text_backend_destroy(shell->text_backend);
-
--out_settings:
-+err_settings:
- free(setting.ivi_module);
-
-- return retval;
++
+err_shell:
+ free(shell);
+
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch
index 6f683ca92..9f696d8a2 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch
@@ -1,7 +1,8 @@
-index 2317d6e9..e1e897ed 100644
+diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
+index 016d8b5c..02bfb2cb 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
-@@ -56,12 +56,14 @@ extern "C" {
+@@ -56,6 +56,7 @@ extern "C" {
#endif /* __cplusplus */
#include <stdint.h>
@@ -9,6 +10,7 @@ index 2317d6e9..e1e897ed 100644
#include "stdbool.h"
#include "compositor.h"
+@@ -63,6 +64,7 @@ extern "C" {
#define IVI_SUCCEEDED (0)
#define IVI_FAILED (-1)
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch
index 551e449ad..f6256f782 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch
@@ -1,9 +1,10 @@
-index 5f64e72d..dc8e6f1d 100644
+diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
+index b0a2a2b9..a889afdb 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
-@@ -677,10 +677,14 @@ wet_shell_init(struct weston_compositor *compositor,
+@@ -664,10 +664,14 @@ wet_shell_init(struct weston_compositor *compositor,
if (!shell->text_backend)
- goto err_settings;
+ goto err_shell;
+ shell->desktop = weston_desktop_create(compositor, &shell_desktop_api, shell);
+ if (!shell->desktop)
@@ -17,12 +18,7 @@ index 5f64e72d..dc8e6f1d 100644
ivi_layout_init_with_compositor(compositor);
/* TODO ivi_layout_destroy should be implemented, since multiple lists
-@@ -690,10 +694,13 @@ wet_shell_init(struct weston_compositor *compositor,
- /* Call module_init of ivi-modules which are defined in weston.ini */
- if (load_controller_modules(compositor, setting.ivi_module,
- argc, argv) < 0)
-- goto err_text_backend;
-+ goto err_desktop;
+@@ -676,6 +680,9 @@ wet_shell_init(struct weston_compositor *compositor,
return IVI_SUCCEEDED;
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch
index c5d85bb17..447cff4f8 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch
@@ -1,4 +1,5 @@
-index d5403e06..7b2f2707 100644
+diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
+index a0e49ba0..340d1915 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -129,9 +129,9 @@ struct hmi_controller {
@@ -12,7 +13,7 @@ index d5403e06..7b2f2707 100644
struct wl_client *user_interface;
struct ui_setting ui_setting;
-@@ -581,28 +581,6 @@ create_layer(struct weston_output *output,
+@@ -576,28 +576,6 @@ create_layer(struct weston_output *output,
/**
* Internal set notification
*/
@@ -34,14 +35,14 @@ index d5403e06..7b2f2707 100644
- if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
- return;
-
-- ret = ivi_layout_interface->layer_add_surface(application_layer, ivisurf);
+- ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf);
- assert(!ret);
-}
-
static void
set_notification_remove_surface(struct wl_listener *listener, void *data)
{
-@@ -670,6 +648,42 @@ set_notification_configure_surface(struct wl_listener *listener, void *data)
+@@ -665,6 +643,42 @@ set_notification_configure_surface(struct wl_listener *listener, void *data)
switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
}
@@ -64,55 +65,54 @@ index d5403e06..7b2f2707 100644
+ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
+ return;
+
-+ ret = ivi_layout_interface->layer_add_surface(application_layer, ivisurf);
++ ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf);
+ assert(!ret);
+
+ /*
+ * if application changes size of wl_buffer. The source rectangle shall be
+ * fit to the size.
+ */
-+ surface = ivi_layout_interface->surface_get_weston_surface(ivisurf);
++ surface = hmi_ctrl->interface->surface_get_weston_surface(ivisurf);
+ if (surface) {
-+ ivi_layout_interface->surface_set_source_rectangle(ivisurf, 0,
++ hmi_ctrl->interface->surface_set_source_rectangle(ivisurf, 0,
+ 0, surface->width, surface->height);
+ }
+
-+ ivi_layout_interface->commit_changes();
++ hmi_ctrl->interface->commit_changes();
+ switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
+}
+
/**
* A hmi_controller used 4 ivi_layers to manage ivi_surfaces. The IDs of
* corresponding ivi_layer are defined in weston.ini. Default scene graph
-@@ -852,6 +866,9 @@ hmi_controller_create(struct weston_compositor *ec)
+@@ -868,6 +882,9 @@ hmi_controller_create(struct weston_compositor *ec)
hmi_ctrl->surface_configured.notify = set_notification_configure_surface;
- ivi_layout_interface->add_listener_configure_surface(&hmi_ctrl->surface_configured);
+ hmi_ctrl->interface->add_listener_configure_surface(&hmi_ctrl->surface_configured);
+ hmi_ctrl->desktop_surface_configured.notify = set_notification_configure_desktop_surface;
-+ ivi_layout_interface->add_listener_configure_desktop_surface(&hmi_ctrl->desktop_surface_configured);
++ hmi_ctrl->interface->add_listener_configure_desktop_surface(&hmi_ctrl->desktop_surface_configured);
+
hmi_ctrl->destroy_listener.notify = hmi_controller_destroy;
wl_signal_add(&hmi_ctrl->compositor->destroy_signal,
&hmi_ctrl->destroy_listener);
-@@ -1275,13 +1292,6 @@ ivi_hmi_controller_UI_ready(struct wl_client *client,
- ivi_layout_interface->commit_changes();
+@@ -1289,12 +1306,6 @@ ivi_hmi_controller_UI_ready(struct wl_client *client,
ivi_hmi_controller_add_launchers(hmi_ctrl, 256);
--
+
- /* Add surface_created listener after the initialization of launchers.
- * Otherwise, surfaces of the launchers will be added to application
- * layer too.*/
- hmi_ctrl->surface_created.notify = set_notification_create_surface;
-- ivi_layout_interface->add_listener_create_surface(&hmi_ctrl->surface_created);
+- hmi_ctrl->interface->add_listener_create_surface(&hmi_ctrl->surface_created);
-
hmi_ctrl->is_initialized = 1;
}
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
-index 6b854503..22d63708 100644
+index b06bf309..ef354d49 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
-@@ -787,9 +787,15 @@ commit_surface_list(struct ivi_layout *layout)
+@@ -715,9 +715,15 @@ commit_surface_list(struct ivi_layout *layout)
ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
if (configured && !is_surface_transition(ivisurf)) {
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch
index 8094f9b85..036b14cbc 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch
@@ -1,7 +1,8 @@
-index 23f79dfe..f9c8010b 100644
+diff --git a/Makefile.am b/Makefile.am
+index 17c053e6..e0d3cb78 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -616,9 +616,7 @@ demo_clients += weston-simple-egl
+@@ -609,9 +609,7 @@ demo_clients += weston-simple-egl
weston_simple_egl_SOURCES = clients/simple-egl.c
nodist_weston_simple_egl_SOURCES = \
protocol/xdg-shell-unstable-v6-protocol.c \
@@ -13,7 +14,7 @@ index 23f79dfe..f9c8010b 100644
weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
endif
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
-index dad0f09b..07e7e785 100644
+index a1e57aef..936e015e 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -45,8 +45,6 @@
@@ -40,8 +41,8 @@ index dad0f09b..07e7e785 100644
- struct ivi_surface *ivi_surface;
EGLSurface egl_surface;
struct wl_callback *callback;
- int fullscreen, opaque, buffer_size, frame_sync, delay;
-@@ -355,27 +351,22 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
+ int fullscreen, maximized, opaque, buffer_size, frame_sync, delay;
+@@ -359,27 +355,22 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
};
static void
@@ -81,7 +82,7 @@ index dad0f09b..07e7e785 100644
window->xdg_surface = zxdg_shell_v6_get_xdg_surface(display->shell,
window->surface);
zxdg_surface_v6_add_listener(window->xdg_surface,
-@@ -390,50 +381,6 @@ create_xdg_surface(struct window *window, struct display *display)
+@@ -394,50 +385,6 @@ create_xdg_surface(struct window *window, struct display *display)
window->wait_for_configure = true;
wl_surface_commit(window->surface);
@@ -132,7 +133,7 @@ index dad0f09b..07e7e785 100644
ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
window->egl_surface, window->display->egl.ctx);
-@@ -465,8 +412,6 @@ destroy_surface(struct window *window)
+@@ -469,8 +416,6 @@ destroy_surface(struct window *window)
zxdg_toplevel_v6_destroy(window->xdg_toplevel);
if (window->xdg_surface)
zxdg_surface_v6_destroy(window->xdg_surface);
@@ -141,7 +142,7 @@ index dad0f09b..07e7e785 100644
wl_surface_destroy(window->surface);
if (window->callback)
-@@ -821,10 +766,6 @@ registry_handle_global(void *data, struct wl_registry *registry,
+@@ -825,10 +770,6 @@ registry_handle_global(void *data, struct wl_registry *registry,
fprintf(stderr, "unable to load default left pointer\n");
// TODO: abort ?
}
@@ -152,7 +153,7 @@ index dad0f09b..07e7e785 100644
}
}
-@@ -939,9 +880,6 @@ main(int argc, char **argv)
+@@ -943,9 +884,6 @@ main(int argc, char **argv)
if (display.shell)
zxdg_shell_v6_destroy(display.shell);
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-ivi-shell_add_screen_remove_layer_api.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-ivi-shell_add_screen_remove_layer_api.patch
deleted file mode 100644
index 3e85e93f6..000000000
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-ivi-shell_add_screen_remove_layer_api.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From deee858b0b199d8cfa8033a46d7078f30b23725e Mon Sep 17 00:00:00 2001
-From: "Ucan, Emre (ADITG/SW1)" <eucan@de.adit-jv.com>
-Date: Thu, 2 Mar 2017 08:47:33 +0000
-Subject: ivi-shell: add_screen_remove_layer API
-
-It is analagous to layer_remove_surface API.
-The API removes a layer from the render order
-of the screen.
-
-v3:
-add the new vfunc at the end of
-the ivi_layout_interface struct.
-
-Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
-Reviewed-by: Eugen Friedrich <friedrix@gmail.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
-diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
-index 2317d6e..39ffde1 100644
---- a/ivi-shell/ivi-layout-export.h
-+++ b/ivi-shell/ivi-layout-export.h
-@@ -578,6 +578,16 @@ struct ivi_layout_interface {
- */
- struct ivi_layout_surface *
- (*get_surface)(struct weston_surface *surface);
-+
-+ /**
-+ * \brief Remove a ivi_layer to a weston_output which is currently managed
-+ * by the service
-+ *
-+ * \return IVI_SUCCEEDED if the method call was successful
-+ * \return IVI_FAILED if the method call was failed
-+ */
-+ int32_t (*screen_remove_layer)(struct weston_output *output,
-+ struct ivi_layout_layer *removelayer);
- };
-
- #ifdef __cplusplus
-diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
-index 298e18e..8e4280b 100644
---- a/ivi-shell/ivi-layout.c
-+++ b/ivi-shell/ivi-layout.c
-@@ -1664,6 +1664,27 @@ ivi_layout_screen_add_layer(struct weston_output *output,
- }
-
- static int32_t
-+ivi_layout_screen_remove_layer(struct weston_output *output,
-+ struct ivi_layout_layer *removelayer)
-+{
-+ struct ivi_layout_screen *iviscrn;
-+
-+ if (output == NULL || removelayer == NULL) {
-+ weston_log("ivi_layout_screen_remove_layer: invalid argument\n");
-+ return IVI_FAILED;
-+ }
-+
-+ iviscrn = get_screen_from_output(output);
-+
-+ wl_list_remove(&removelayer->pending.link);
-+ wl_list_init(&removelayer->pending.link);
-+
-+ iviscrn->order.dirty = 1;
-+
-+ return IVI_SUCCEEDED;
-+}
-+
-+static int32_t
- ivi_layout_screen_set_render_order(struct weston_output *output,
- struct ivi_layout_layer **pLayer,
- const int32_t number)
-@@ -2088,6 +2109,7 @@ static struct ivi_layout_interface ivi_layout_interface = {
- */
- .get_screens_under_layer = ivi_layout_get_screens_under_layer,
- .screen_add_layer = ivi_layout_screen_add_layer,
-+ .screen_remove_layer = ivi_layout_screen_remove_layer,
- .screen_set_render_order = ivi_layout_screen_set_render_order,
-
- /**
---
-cgit v0.10.2
-
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch
deleted file mode 100644
index 87d883c02..000000000
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 5b1d282c7a7d2badf74bb19f9ddc0d49d3d4562b Mon Sep 17 00:00:00 2001
-From: Emre Ucan <eucan@de.adit-jv.com>
-Date: Thu, 25 Jan 2018 14:36:10 +0100
-Subject: [PATCH] ivi-shell: register ivi_layout_interface
-
-Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
----
- ivi-shell/ivi-layout-export.h | 13 +++++++++++++
- ivi-shell/ivi-layout.c | 6 ++++++
- ivi-shell/ivi-shell.c | 2 --
- 3 files changed, 19 insertions(+), 2 deletions(-)
-
-diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
-index 2317d6e..9452691 100644
---- a/ivi-shell/ivi-layout-export.h
-+++ b/ivi-shell/ivi-layout-export.h
-@@ -59,6 +59,7 @@ extern "C" {
-
- #include "stdbool.h"
- #include "compositor.h"
-+#include "plugin-registry.h"
-
- #define IVI_SUCCEEDED (0)
- #define IVI_FAILED (-1)
-@@ -140,6 +141,8 @@ enum ivi_layout_transition_type{
- IVI_LAYOUT_TRANSITION_MAX,
- };
-
-+#define IVI_LAYOUT_API_NAME "ivi_layout_api_v1"
-+
- struct ivi_layout_interface {
-
- /**
-@@ -580,6 +583,16 @@ struct ivi_layout_interface {
- (*get_surface)(struct weston_surface *surface);
- };
-
-+static inline const struct ivi_layout_interface *
-+ivi_layout_get_api(struct weston_compositor *compositor)
-+{
-+ const void *api;
-+ api = weston_plugin_api_get(compositor, IVI_LAYOUT_API_NAME,
-+ sizeof(struct ivi_layout_interface));
-+
-+ return (const struct ivi_layout_interface *)api;
-+}
-+
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
-diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
-index 64e4ead..c2c1a35 100644
---- a/ivi-shell/ivi-layout.c
-+++ b/ivi-shell/ivi-layout.c
-@@ -2000,6 +2000,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
- return ivisurf;
- }
-
-+static struct ivi_layout_interface ivi_layout_interface;
-+
- void
- ivi_layout_init_with_compositor(struct weston_compositor *ec)
- {
-@@ -2028,6 +2030,10 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec)
-
- layout->transitions = ivi_layout_transition_set_create(ec);
- wl_list_init(&layout->pending_transition_list);
-+
-+ weston_plugin_api_register(ec, IVI_LAYOUT_API_NAME,
-+ &ivi_layout_interface,
-+ sizeof(struct ivi_layout_interface));
- }
-
- static struct ivi_layout_interface ivi_layout_interface = {
-diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
-index 67619b8..2dabdf9 100644
---- a/ivi-shell/ivi-shell.c
-+++ b/ivi-shell/ivi-shell.c
-@@ -425,8 +425,6 @@ ivi_shell_setting_create(struct ivi_shell_setting *dest,
- if (!dest->ivi_module &&
- weston_config_section_get_string(section, "ivi-module",
- &dest->ivi_module, NULL) < 0) {
-- weston_log("Error: ivi-shell: No ivi-module set\n");
-- result = -1;
- }
-
- weston_config_section_get_bool(section, "developermode",
---
-2.7.4
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch
index 91c2239cb..2f3b0108a 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch
@@ -29,15 +29,12 @@ remain maintained locally out of mainstream in the wait
of further investigations.
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- shared/os-compatibility.c | 1 +
- 1 file changed, 1 insertion(+)
diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
-index e19fb61b..7e93e818 100644
+index e19fb61b..826e48b8 100644
--- a/shared/os-compatibility.c
+++ b/shared/os-compatibility.c
-@@ -157,6 +157,8 @@ os_create_anonymous_file(off_t size)
+@@ -157,7 +157,9 @@ os_create_anonymous_file(off_t size)
int fd;
int ret;
@@ -47,6 +44,4 @@ index e19fb61b..7e93e818 100644
+ path = getenv("XDG_RUNTIME_DIR");
if (!path) {
errno = ENOENT;
---
-2.13.6
-
+ return -1;
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend
index 51e640e06..bcfe11b17 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend
@@ -1,2 +1,4 @@
PACKAGECONFIG[notify] = "--enable-systemd-notify,--disable-systemd-notify,systemd"
PACKAGECONFIG_append = " notify"
+
+RRECOMMENDS_${PN}_remove = "weston-conf"
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_2.0.0.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend
index c0a301ec1..579429b18 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_2.0.0.bbappend
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend
@@ -17,11 +17,12 @@ SRC_URI_append = "\
file://0013-simple-egl-remove-ivi-application-support.patch \
file://0014-simple-shm-remove-ivi-application-support.patch \
file://0015-window-client-remove-ivi-application-support.patch \
- file://0016-ivi-shell_add_screen_remove_layer_api.patch \
- file://0017-ivi-shell-register-ivi_layout_interface.patch \
- file://0018-compositor-add-output-type-to-weston_output.patch \
- file://0019-compositor-drm-introduce-drm_get_dmafd_from_view.patch \
file://use-XDG_RUNTIMESHARE_DIR.patch \
"
+# FIXME: The following patches need to be updated for weston 5.0.0:
+# file://0018-compositor-add-output-type-to-weston_output.patch
+# file://0019-compositor-drm-introduce-drm_get_dmafd_from_view.patch
+
+
EXTRA_OECONF_append = " --enable-sys-uid"
diff --git a/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb b/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
index ed790401d..ced2b53da 100644
--- a/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
+++ b/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
@@ -15,7 +15,8 @@ RDEPENDS_${PN} += "\
packagegroup-agl-image-minimal \
packagegroup-agl-graphical-weston \
packagegroup-agl-graphical-services \
- waltham-transmitter \
"
+# FIXME: Removed due to issues building against weston 5.0.0:
+# waltham-transmitter
RDEPENDS_profile-graphical = "${PN}"
diff --git a/meta-agl-profile-hud/conf/layer.conf b/meta-agl-profile-hud/conf/layer.conf
index 57fb70f0c..4f5d06fcb 100644
--- a/meta-agl-profile-hud/conf/layer.conf
+++ b/meta-agl-profile-hud/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofilehud"
BBFILE_PATTERN_aglprofilehud = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofilehud = "70"
+
+LAYERSERIES_COMPAT_aglprofilehud = "thud"
diff --git a/meta-agl-profile-telematics/conf/layer.conf b/meta-agl-profile-telematics/conf/layer.conf
index e563143b9..6d17746bc 100644
--- a/meta-agl-profile-telematics/conf/layer.conf
+++ b/meta-agl-profile-telematics/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "aglprofiletelematics"
BBFILE_PATTERN_aglprofiletelematics = "^${LAYERDIR}/"
BBFILE_PRIORITY_aglprofiletelematics = "70"
+
+LAYERSERIES_COMPAT_aglprofiletelematics = "thud"
diff --git a/meta-agl/conf/layer.conf b/meta-agl/conf/layer.conf
index dd0784a0a..c46ec8096 100644
--- a/meta-agl/conf/layer.conf
+++ b/meta-agl/conf/layer.conf
@@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "agl"
BBFILE_PATTERN_agl = "^${LAYERDIR}/"
BBFILE_PRIORITY_agl = "70"
+
+LAYERSERIES_COMPAT_agl = "thud"
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass
index ab3416a0d..717bd7b90 100644
--- a/meta-app-framework/classes/aglwgt.bbclass
+++ b/meta-app-framework/classes/aglwgt.bbclass
@@ -23,6 +23,9 @@ DEPENDS_append = " af-binder-devtools-native"
EXTRA_OECMAKE_append_agl-ptest = " -DBUILD_TEST_WGT=TRUE"
+# FIXME: Remove once CMake+ninja issues are resolved
+OECMAKE_GENERATOR = "Unix Makefiles"
+
do_aglwgt_package() {
cd ${B}
${S}/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B} VERBOSE=TRUE || \
diff --git a/meta-app-framework/conf/layer.conf b/meta-app-framework/conf/layer.conf
index 97ca5524a..4af5354a6 100644
--- a/meta-app-framework/conf/layer.conf
+++ b/meta-app-framework/conf/layer.conf
@@ -9,3 +9,4 @@ BBFILE_COLLECTIONS += "app-framework"
BBFILE_PATTERN_app-framework = "^${LAYERDIR}/"
BBFILE_PRIORITY_app-framework = "70"
+LAYERSERIES_COMPAT_app-framework = "thud"
diff --git a/meta-app-framework/recipes-core/af-main/af-main_git.bb b/meta-app-framework/recipes-core/af-main/af-main_git.bb
index 041816289..0b2153048 100644
--- a/meta-app-framework/recipes-core/af-main/af-main_git.bb
+++ b/meta-app-framework/recipes-core/af-main/af-main_git.bb
@@ -98,7 +98,7 @@ do_install_append_class-target() {
echo "QT_WAYLAND_SHELL_INTEGRATION=ivi-shell" > ${D}${afm_confdir}/unit.env.d/qt-for-ivi-shell
}
-pkg_postinst_${PN}() {
+pkg_postinst_ontarget_${PN}() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
chgrp ${afm_name} $D${systemd_units_root}/system
chgrp ${afm_name} $D${systemd_units_root}/system/afm-user-session@.target.wants
@@ -110,7 +110,7 @@ pkg_postinst_${PN}() {
chown ${afm_name}:${afm_name} $D${afm_datadir}/icons
}
-pkg_postinst_${PN}_append_with-lsm-smack() {
+pkg_postinst_ontarget_${PN}_append_with-lsm-smack() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
chsmack -a 'System::Shared' -t $D${systemd_units_root}/system
chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants
diff --git a/meta-app-framework/recipes-support/libcap/libcap_%.bbappend b/meta-app-framework/recipes-support/libcap/libcap_%.bbappend
index c4561db22..ac909a64c 100644
--- a/meta-app-framework/recipes-support/libcap/libcap_%.bbappend
+++ b/meta-app-framework/recipes-support/libcap/libcap_%.bbappend
@@ -1,2 +1,3 @@
FILESEXTRAPATHS_append_class-native := ":${THISDIR}/${PN}"
-SRC_URI_append_class-native = " file://removing-capability-enforcement.patch"
+# FIXME: It needs to be determined if this is still required
+#SRC_URI_append_class-native = " file://removing-capability-enforcement.patch"
diff --git a/meta-netboot/conf/layer.conf b/meta-netboot/conf/layer.conf
index 7ee6f6f0c..d22a86446 100644
--- a/meta-netboot/conf/layer.conf
+++ b/meta-netboot/conf/layer.conf
@@ -11,3 +11,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "meta-netboot"
BBFILE_PATTERN_meta-netboot = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-netboot = "60"
+
+LAYERSERIES_COMPAT_meta-netboot = "thud"
diff --git a/meta-security/conf/layer.conf b/meta-security/conf/layer.conf
index 2da233a76..16dae3989 100644
--- a/meta-security/conf/layer.conf
+++ b/meta-security/conf/layer.conf
@@ -10,3 +10,5 @@ BBFILES += " ${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "security-smack"
BBFILE_PATTERN_security-smack := "^${LAYERDIR}/"
BBFILE_PRIORITY_security-smack = "60"
+
+LAYERSERIES_COMPAT_security-smack = "thud"
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch
index 6a7e8a39d..d04c60cd9 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch
@@ -19,46 +19,17 @@ Currently such return value results in message denial.
Cherry picked from 4dcfb02f17247ff9de966b62182cd2e08f301238
by José Bollo.
+Updated for dbus 1.10.20 by Scott Murray.
+
Change-Id: I9bcbce34577e5dc2a3cecf6233a0a2b0e43e1108
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- bus/Makefile.am | 6 +
- bus/bus.c | 136 +++++---
- bus/bus.h | 32 +-
- bus/check.c | 217 ++++++++++++
- bus/check.h | 68 ++++
- bus/config-parser-common.c | 6 +
- bus/config-parser-common.h | 1 +
- bus/config-parser.c | 71 +++-
- bus/connection.c | 56 ++-
- bus/connection.h | 4 +
- bus/cynara.c | 374 +++++++++++++++++++++
- bus/cynara.h | 37 ++
- bus/dispatch.c | 44 ++-
- bus/policy.c | 193 +++++++----
- bus/policy.h | 51 ++-
- configure.ac | 12 +
- test/Makefile.am | 1 +
- test/data/invalid-config-files/badcheck-1.conf | 9 +
- test/data/invalid-config-files/badcheck-2.conf | 9 +
- test/data/valid-config-files/check-1.conf | 9 +
- .../valid-config-files/debug-check-some.conf.in | 18 +
- tools/dbus-send.c | 2 +-
- 22 files changed, 1193 insertions(+), 163 deletions(-)
- create mode 100644 bus/check.c
- create mode 100644 bus/check.h
- create mode 100644 bus/cynara.c
- create mode 100644 bus/cynara.h
- create mode 100644 test/data/invalid-config-files/badcheck-1.conf
- create mode 100644 test/data/invalid-config-files/badcheck-2.conf
- create mode 100644 test/data/valid-config-files/check-1.conf
- create mode 100644 test/data/valid-config-files/debug-check-some.conf.in
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/bus/Makefile.am b/bus/Makefile.am
-index 33af09b0..3f57cc48 100644
+index 9ae3071..46afb31 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
-@@ -9,6 +9,7 @@ DBUS_BUS_LIBS = \
+@@ -13,6 +13,7 @@ DBUS_BUS_LIBS = \
$(THREAD_LIBS) \
$(ADT_LIBS) \
$(NETWORK_libs) \
@@ -66,7 +37,7 @@ index 33af09b0..3f57cc48 100644
$(NULL)
DBUS_LAUNCHER_LIBS = \
-@@ -24,6 +25,7 @@ AM_CPPFLAGS = \
+@@ -30,6 +31,7 @@ AM_CPPFLAGS = \
$(APPARMOR_CFLAGS) \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
-DDBUS_COMPILATION \
@@ -74,15 +45,16 @@ index 33af09b0..3f57cc48 100644
$(NULL)
# if assertions are enabled, improve backtraces
-@@ -82,12 +84,16 @@ BUS_SOURCES= \
+@@ -90,6 +92,8 @@ BUS_SOURCES= \
audit.h \
bus.c \
bus.h \
+ check.c \
+ check.h \
+ config-loader-expat.c \
config-parser.c \
config-parser.h \
- config-parser-common.c \
+@@ -97,6 +101,8 @@ BUS_SOURCES= \
config-parser-common.h \
connection.c \
connection.h \
@@ -91,19 +63,33 @@ index 33af09b0..3f57cc48 100644
desktop-file.c \
desktop-file.h \
$(DIR_WATCH_SOURCE) \
+diff --git a/bus/activation.c b/bus/activation.c
+index 6f009f5..451179d 100644
+--- a/bus/activation.c
++++ b/bus/activation.c
+@@ -1795,7 +1795,8 @@ bus_activation_activate_service (BusActivation *activation,
+ NULL, /* proposed recipient */
+ activation_message,
+ entry,
+- error))
++ error,
++ NULL))
+ {
+ _DBUS_ASSERT_ERROR_IS_SET (error);
+ _dbus_verbose ("activation not authorized: %s: %s\n",
diff --git a/bus/bus.c b/bus/bus.c
-index fd4ab9e4..c4008505 100644
+index 30ce4e1..237efe3 100644
--- a/bus/bus.c
+++ b/bus/bus.c
-@@ -37,6 +37,7 @@
+@@ -38,6 +38,7 @@
#include "apparmor.h"
#include "audit.h"
#include "dir-watch.h"
+#include "check.h"
+ #include <dbus/dbus-auth.h>
#include <dbus/dbus-list.h>
#include <dbus/dbus-hash.h>
- #include <dbus/dbus-credentials.h>
-@@ -65,6 +66,7 @@ struct BusContext
+@@ -67,6 +68,7 @@ struct BusContext
BusRegistry *registry;
BusPolicy *policy;
BusMatchmaker *matchmaker;
@@ -111,7 +97,7 @@ index fd4ab9e4..c4008505 100644
BusLimits limits;
DBusRLimit *initial_fd_limit;
unsigned int fork : 1;
-@@ -988,6 +990,10 @@ bus_context_new (const DBusString *config_file,
+@@ -1003,6 +1005,10 @@ bus_context_new (const DBusString *config_file,
parser = NULL;
}
@@ -122,7 +108,7 @@ index fd4ab9e4..c4008505 100644
dbus_server_free_data_slot (&server_data_slot);
return context;
-@@ -1112,6 +1118,12 @@ bus_context_unref (BusContext *context)
+@@ -1127,6 +1133,12 @@ bus_context_unref (BusContext *context)
bus_context_shutdown (context);
@@ -135,7 +121,7 @@ index fd4ab9e4..c4008505 100644
if (context->connections)
{
bus_connections_unref (context->connections);
-@@ -1241,6 +1253,12 @@ bus_context_get_loop (BusContext *context)
+@@ -1256,6 +1268,12 @@ bus_context_get_loop (BusContext *context)
return context->loop;
}
@@ -148,7 +134,7 @@ index fd4ab9e4..c4008505 100644
dbus_bool_t
bus_context_allow_unix_user (BusContext *context,
unsigned long uid)
-@@ -1456,6 +1474,7 @@ complain_about_message (BusContext *context,
+@@ -1451,6 +1469,7 @@ complain_about_message (BusContext *context,
DBusConnection *proposed_recipient,
dbus_bool_t requested_reply,
dbus_bool_t log,
@@ -156,7 +142,7 @@ index fd4ab9e4..c4008505 100644
DBusError *error)
{
DBusError stack_error = DBUS_ERROR_INIT;
-@@ -1485,7 +1504,8 @@ complain_about_message (BusContext *context,
+@@ -1480,7 +1499,8 @@ complain_about_message (BusContext *context,
dbus_set_error (&stack_error, error_name,
"%s, %d matched rules; type=\"%s\", sender=\"%s\" (%s) "
"interface=\"%s\" member=\"%s\" error name=\"%s\" "
@@ -166,7 +152,7 @@ index fd4ab9e4..c4008505 100644
complaint,
matched_rules,
dbus_message_type_to_string (dbus_message_get_type (message)),
-@@ -1496,7 +1516,8 @@ complain_about_message (BusContext *context,
+@@ -1491,7 +1511,8 @@ complain_about_message (BusContext *context,
nonnull (dbus_message_get_error_name (message), "(unset)"),
requested_reply,
nonnull (dbus_message_get_destination (message), DBUS_SERVICE_DBUS),
@@ -176,26 +162,21 @@ index fd4ab9e4..c4008505 100644
/* If we hit OOM while setting the error, this will syslog "out of memory"
* which is itself an indication that something is seriously wrong */
-@@ -1520,14 +1541,15 @@ complain_about_message (BusContext *context,
+@@ -1519,7 +1540,7 @@ complain_about_message (BusContext *context,
* NULL for addressed_recipient may mean the bus driver, or may mean
* no destination was specified in the message (e.g. a signal).
*/
-dbus_bool_t
--bus_context_check_security_policy (BusContext *context,
-- BusTransaction *transaction,
-- DBusConnection *sender,
-- DBusConnection *addressed_recipient,
-- DBusConnection *proposed_recipient,
-- DBusMessage *message,
-- DBusError *error)
+BusResult
-+bus_context_check_security_policy (BusContext *context,
-+ BusTransaction *transaction,
-+ DBusConnection *sender,
-+ DBusConnection *addressed_recipient,
-+ DBusConnection *proposed_recipient,
-+ DBusMessage *message,
-+ DBusError *error,
+ bus_context_check_security_policy (BusContext *context,
+ BusTransaction *transaction,
+ DBusConnection *sender,
+@@ -1527,7 +1548,8 @@ bus_context_check_security_policy (BusContext *context,
+ DBusConnection *proposed_recipient,
+ DBusMessage *message,
+ BusActivationEntry *activation_entry,
+- DBusError *error)
++ DBusError *error,
+ BusDeferredMessage **deferred_message)
{
const char *src, *dest;
@@ -208,7 +189,7 @@ index fd4ab9e4..c4008505 100644
type = dbus_message_get_type (message);
src = dbus_message_get_sender (message);
-@@ -1564,7 +1587,7 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1565,7 +1588,7 @@ bus_context_check_security_policy (BusContext *context,
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"Message bus will not accept messages of unknown type\n");
@@ -217,7 +198,7 @@ index fd4ab9e4..c4008505 100644
}
requested_reply = FALSE;
-@@ -1594,7 +1617,7 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1595,7 +1618,7 @@ bus_context_check_security_policy (BusContext *context,
if (dbus_error_is_set (&error2))
{
dbus_move_error (&error2, error);
@@ -226,7 +207,7 @@ index fd4ab9e4..c4008505 100644
}
}
}
-@@ -1621,11 +1644,11 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1624,11 +1647,11 @@ bus_context_check_security_policy (BusContext *context,
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"An SELinux policy prevents this sender from sending this "
"message to this recipient",
@@ -240,16 +221,16 @@ index fd4ab9e4..c4008505 100644
}
/* next verify AppArmor access controls. If allowed then
-@@ -1642,7 +1665,7 @@ bus_context_check_security_policy (BusContext *context,
- dest ? dest : DBUS_SERVICE_DBUS,
+@@ -1646,7 +1669,7 @@ bus_context_check_security_policy (BusContext *context,
src ? src : DBUS_SERVICE_DBUS,
+ activation_entry,
error))
- return FALSE;
+ return BUS_RESULT_FALSE;
if (!bus_connection_is_active (sender))
{
-@@ -1656,7 +1679,7 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1660,7 +1683,7 @@ bus_context_check_security_policy (BusContext *context,
{
_dbus_verbose ("security check allowing %s message\n",
"Hello");
@@ -258,7 +239,7 @@ index fd4ab9e4..c4008505 100644
}
else
{
-@@ -1667,7 +1690,7 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1671,7 +1694,7 @@ bus_context_check_security_policy (BusContext *context,
"Client tried to send a message other than %s without being registered",
"Hello");
@@ -267,7 +248,7 @@ index fd4ab9e4..c4008505 100644
}
}
}
-@@ -1716,20 +1739,29 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1720,20 +1743,29 @@ bus_context_check_security_policy (BusContext *context,
(proposed_recipient == NULL && recipient_policy == NULL));
log = FALSE;
@@ -311,7 +292,7 @@ index fd4ab9e4..c4008505 100644
if (log)
{
-@@ -1738,23 +1770,29 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1742,23 +1774,29 @@ bus_context_check_security_policy (BusContext *context,
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"Would reject message", toggles,
message, sender, proposed_recipient, requested_reply,
@@ -355,7 +336,7 @@ index fd4ab9e4..c4008505 100644
}
/* See if limits on size have been exceeded */
-@@ -1764,10 +1802,10 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1768,10 +1806,10 @@ bus_context_check_security_policy (BusContext *context,
{
complain_about_message (context, DBUS_ERROR_LIMITS_EXCEEDED,
"Rejected: destination has a full message queue",
@@ -368,7 +349,7 @@ index fd4ab9e4..c4008505 100644
}
/* Record that we will allow a reply here in the future (don't
-@@ -1784,11 +1822,11 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1792,11 +1830,11 @@ bus_context_check_security_policy (BusContext *context,
message, error))
{
_dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n");
@@ -383,13 +364,13 @@ index fd4ab9e4..c4008505 100644
void
diff --git a/bus/bus.h b/bus/bus.h
-index 3fab59ff..dab7791f 100644
+index 2e0de82..82c32c8 100644
--- a/bus/bus.h
+++ b/bus/bus.h
-@@ -44,6 +44,22 @@ typedef struct BusOwner BusOwner;
- typedef struct BusTransaction BusTransaction;
+@@ -45,6 +45,22 @@ typedef struct BusTransaction BusTransaction;
typedef struct BusMatchmaker BusMatchmaker;
typedef struct BusMatchRule BusMatchRule;
+ typedef struct BusActivationEntry BusActivationEntry;
+typedef struct BusCheck BusCheck;
+typedef struct BusDeferredMessage BusDeferredMessage;
+typedef struct BusCynara BusCynara;
@@ -409,7 +390,7 @@ index 3fab59ff..dab7791f 100644
typedef struct
{
-@@ -97,6 +113,7 @@ BusConnections* bus_context_get_connections (BusContext
+@@ -101,6 +117,7 @@ BusConnections* bus_context_get_connections (BusContext
BusActivation* bus_context_get_activation (BusContext *context);
BusMatchmaker* bus_context_get_matchmaker (BusContext *context);
DBusLoop* bus_context_get_loop (BusContext *context);
@@ -417,31 +398,27 @@ index 3fab59ff..dab7791f 100644
dbus_bool_t bus_context_allow_unix_user (BusContext *context,
unsigned long uid);
dbus_bool_t bus_context_allow_windows_user (BusContext *context,
-@@ -131,13 +148,14 @@ void bus_context_log_and_set_error (BusContext
+@@ -136,14 +153,15 @@ void bus_context_log_and_set_error (BusContext
const char *name,
const char *msg,
...) _DBUS_GNUC_PRINTF (5, 6);
-dbus_bool_t bus_context_check_security_policy (BusContext *context,
-- BusTransaction *transaction,
-- DBusConnection *sender,
-- DBusConnection *addressed_recipient,
-- DBusConnection *proposed_recipient,
-- DBusMessage *message,
++BusResult bus_context_check_security_policy (BusContext *context,
+ BusTransaction *transaction,
+ DBusConnection *sender,
+ DBusConnection *addressed_recipient,
+ DBusConnection *proposed_recipient,
+ DBusMessage *message,
+ BusActivationEntry *activation_entry,
- DBusError *error);
-+BusResult bus_context_check_security_policy (BusContext *context,
-+ BusTransaction *transaction,
-+ DBusConnection *sender,
-+ DBusConnection *addressed_recipient,
-+ DBusConnection *proposed_recipient,
-+ DBusMessage *message,
-+ DBusError *error,
++ DBusError *error,
+ BusDeferredMessage **deferred_message);
void bus_context_check_all_watches (BusContext *context);
#endif /* BUS_BUS_H */
diff --git a/bus/check.c b/bus/check.c
new file mode 100644
-index 00000000..5b72d31c
+index 0000000..5b72d31
--- /dev/null
+++ b/bus/check.c
@@ -0,0 +1,217 @@
@@ -664,7 +641,7 @@ index 00000000..5b72d31c
+}
diff --git a/bus/check.h b/bus/check.h
new file mode 100644
-index 00000000..c3fcaf90
+index 0000000..c3fcaf9
--- /dev/null
+++ b/bus/check.h
@@ -0,0 +1,68 @@
@@ -737,7 +714,7 @@ index 00000000..c3fcaf90
+ BusResult result);
+#endif /* BUS_CHECK_H */
diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c
-index 5db6b289..ea25f5e6 100644
+index c1c4191..e2f253d 100644
--- a/bus/config-parser-common.c
+++ b/bus/config-parser-common.c
@@ -75,6 +75,10 @@ bus_config_parser_element_name_to_type (const char *name)
@@ -761,7 +738,7 @@ index 5db6b289..ea25f5e6 100644
return "fork";
case ELEMENT_PIDFILE:
diff --git a/bus/config-parser-common.h b/bus/config-parser-common.h
-index 382a0141..9e026d10 100644
+index 382a014..9e026d1 100644
--- a/bus/config-parser-common.h
+++ b/bus/config-parser-common.h
@@ -36,6 +36,7 @@ typedef enum
@@ -773,10 +750,10 @@ index 382a0141..9e026d10 100644
ELEMENT_PIDFILE,
ELEMENT_SERVICEDIR,
diff --git a/bus/config-parser.c b/bus/config-parser.c
-index d9f6042c..a8c4ca5d 100644
+index be27d38..b54b0e4 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
-@@ -1172,7 +1172,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1318,7 +1318,7 @@ append_rule_from_element (BusConfigParser *parser,
const char *element_name,
const char **attribute_names,
const char **attribute_values,
@@ -785,15 +762,15 @@ index d9f6042c..a8c4ca5d 100644
DBusError *error)
{
const char *log;
-@@ -1195,6 +1195,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1360,6 +1360,7 @@ append_rule_from_element (BusConfigParser *parser,
const char *own_prefix;
const char *user;
const char *group;
+ const char *privilege;
BusPolicyRule *rule;
-
-@@ -1222,6 +1223,7 @@ append_rule_from_element (BusConfigParser *parser,
+
+@@ -1390,6 +1391,7 @@ append_rule_from_element (BusConfigParser *parser,
"user", &user,
"group", &group,
"log", &log,
@@ -801,15 +778,15 @@ index d9f6042c..a8c4ca5d 100644
NULL))
return FALSE;
-@@ -1230,6 +1232,7 @@ append_rule_from_element (BusConfigParser *parser,
- receive_interface || receive_member || receive_error || receive_sender ||
- receive_type || receive_path || eavesdrop ||
- send_requested_reply || receive_requested_reply ||
+@@ -1422,6 +1424,7 @@ append_rule_from_element (BusConfigParser *parser,
+
+ if (!(any_send_attribute ||
+ any_receive_attribute ||
+ privilege ||
own || own_prefix || user || group))
{
dbus_set_error (error, DBUS_ERROR_FAILED,
-@@ -1246,7 +1249,30 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1438,7 +1441,30 @@ append_rule_from_element (BusConfigParser *parser,
element_name);
return FALSE;
}
@@ -841,25 +818,25 @@ index d9f6042c..a8c4ca5d 100644
/* Allowed combinations of elements are:
*
* base, must be all send or all receive:
-@@ -1420,7 +1446,7 @@ append_rule_from_element (BusConfigParser *parser,
- return FALSE;
- }
-
+@@ -1589,7 +1615,7 @@ append_rule_from_element (BusConfigParser *parser,
+ error))
+ return FALSE;
+
- rule = bus_policy_rule_new (BUS_POLICY_RULE_SEND, allow);
-+ rule = bus_policy_rule_new (BUS_POLICY_RULE_SEND, access);
++ rule = bus_policy_rule_new (BUS_POLICY_RULE_SEND, access);
if (rule == NULL)
goto nomem;
-@@ -1502,7 +1528,7 @@ append_rule_from_element (BusConfigParser *parser,
- return FALSE;
- }
-
+@@ -1694,7 +1720,7 @@ append_rule_from_element (BusConfigParser *parser,
+ error))
+ return FALSE;
+
- rule = bus_policy_rule_new (BUS_POLICY_RULE_RECEIVE, allow);
-+ rule = bus_policy_rule_new (BUS_POLICY_RULE_RECEIVE, access);
++ rule = bus_policy_rule_new (BUS_POLICY_RULE_RECEIVE, access);
if (rule == NULL)
goto nomem;
-@@ -1532,7 +1558,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1726,7 +1752,7 @@ append_rule_from_element (BusConfigParser *parser,
}
else if (own || own_prefix)
{
@@ -868,7 +845,7 @@ index d9f6042c..a8c4ca5d 100644
if (rule == NULL)
goto nomem;
-@@ -1558,7 +1584,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1752,7 +1778,7 @@ append_rule_from_element (BusConfigParser *parser,
{
if (IS_WILDCARD (user))
{
@@ -877,7 +854,7 @@ index d9f6042c..a8c4ca5d 100644
if (rule == NULL)
goto nomem;
-@@ -1573,7 +1599,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1767,7 +1793,7 @@ append_rule_from_element (BusConfigParser *parser,
if (_dbus_parse_unix_user_from_config (&username, &uid))
{
@@ -886,7 +863,7 @@ index d9f6042c..a8c4ca5d 100644
if (rule == NULL)
goto nomem;
-@@ -1590,7 +1616,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1784,7 +1810,7 @@ append_rule_from_element (BusConfigParser *parser,
{
if (IS_WILDCARD (group))
{
@@ -895,7 +872,7 @@ index d9f6042c..a8c4ca5d 100644
if (rule == NULL)
goto nomem;
-@@ -1605,7 +1631,7 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1799,7 +1825,7 @@ append_rule_from_element (BusConfigParser *parser,
if (_dbus_parse_unix_group_from_config (&groupname, &gid))
{
@@ -904,7 +881,7 @@ index d9f6042c..a8c4ca5d 100644
if (rule == NULL)
goto nomem;
-@@ -1629,6 +1655,10 @@ append_rule_from_element (BusConfigParser *parser,
+@@ -1823,6 +1849,10 @@ append_rule_from_element (BusConfigParser *parser,
_dbus_assert (pe != NULL);
_dbus_assert (pe->type == ELEMENT_POLICY);
@@ -915,7 +892,7 @@ index d9f6042c..a8c4ca5d 100644
switch (pe->d.policy.type)
{
case POLICY_IGNORED:
-@@ -1703,7 +1733,7 @@ start_policy_child (BusConfigParser *parser,
+@@ -1898,7 +1928,7 @@ start_policy_child (BusConfigParser *parser,
{
if (!append_rule_from_element (parser, element_name,
attribute_names, attribute_values,
@@ -924,7 +901,7 @@ index d9f6042c..a8c4ca5d 100644
return FALSE;
if (push_element (parser, ELEMENT_ALLOW) == NULL)
-@@ -1718,7 +1748,7 @@ start_policy_child (BusConfigParser *parser,
+@@ -1913,7 +1943,7 @@ start_policy_child (BusConfigParser *parser,
{
if (!append_rule_from_element (parser, element_name,
attribute_names, attribute_values,
@@ -933,7 +910,7 @@ index d9f6042c..a8c4ca5d 100644
return FALSE;
if (push_element (parser, ELEMENT_DENY) == NULL)
-@@ -1727,6 +1757,21 @@ start_policy_child (BusConfigParser *parser,
+@@ -1922,6 +1952,21 @@ start_policy_child (BusConfigParser *parser,
return FALSE;
}
@@ -955,7 +932,7 @@ index d9f6042c..a8c4ca5d 100644
return TRUE;
}
else
-@@ -2088,6 +2133,7 @@ bus_config_parser_end_element (BusConfigParser *parser,
+@@ -2284,6 +2329,7 @@ bus_config_parser_end_element (BusConfigParser *parser,
case ELEMENT_POLICY:
case ELEMENT_ALLOW:
case ELEMENT_DENY:
@@ -963,7 +940,7 @@ index d9f6042c..a8c4ca5d 100644
case ELEMENT_FORK:
case ELEMENT_SYSLOG:
case ELEMENT_KEEP_UMASK:
-@@ -2397,6 +2443,7 @@ bus_config_parser_content (BusConfigParser *parser,
+@@ -2600,6 +2646,7 @@ bus_config_parser_content (BusConfigParser *parser,
case ELEMENT_POLICY:
case ELEMENT_ALLOW:
case ELEMENT_DENY:
@@ -971,7 +948,7 @@ index d9f6042c..a8c4ca5d 100644
case ELEMENT_FORK:
case ELEMENT_SYSLOG:
case ELEMENT_KEEP_UMASK:
-@@ -2862,6 +2909,8 @@ do_load (const DBusString *full_path,
+@@ -3127,6 +3174,8 @@ do_load (const DBusString *full_path,
dbus_error_init (&error);
parser = bus_config_load (full_path, TRUE, NULL, &error);
@@ -981,7 +958,7 @@ index d9f6042c..a8c4ca5d 100644
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
diff --git a/bus/connection.c b/bus/connection.c
-index 02d6c220..eea50ecd 100644
+index 53605fa..deebde3 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -36,6 +36,10 @@
@@ -1061,7 +1038,7 @@ index 02d6c220..eea50ecd 100644
}
static void
-@@ -451,6 +458,10 @@ free_connection_data (void *data)
+@@ -448,6 +455,10 @@ free_connection_data (void *data)
dbus_free (d->name);
@@ -1072,7 +1049,7 @@ index 02d6c220..eea50ecd 100644
dbus_free (d);
}
-@@ -1063,6 +1074,22 @@ bus_connection_get_policy (DBusConnection *connection)
+@@ -1078,6 +1089,22 @@ bus_connection_get_policy (DBusConnection *connection)
return d->policy;
}
@@ -1095,7 +1072,7 @@ index 02d6c220..eea50ecd 100644
static dbus_bool_t
foreach_active (BusConnections *connections,
BusConnectionForeachFunction function,
-@@ -2289,6 +2316,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
+@@ -2333,6 +2360,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
DBusMessage *message)
{
DBusError error = DBUS_ERROR_INIT;
@@ -1103,22 +1080,24 @@ index 02d6c220..eea50ecd 100644
/* We have to set the sender to the driver, and have
* to check security policy since it was not done in
-@@ -2326,9 +2354,11 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
+@@ -2370,10 +2398,12 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
* if we're actively capturing messages, it's nice to log that we
* tried to send it and did not allow ourselves to do so.
*/
- if (!bus_context_check_security_policy (bus_transaction_get_context (transaction),
- transaction,
-- NULL, connection, connection, message, &error))
+- NULL, connection, connection,
+- message, NULL, &error))
+ res = bus_context_check_security_policy (bus_transaction_get_context (transaction),
+ transaction,
-+ NULL, connection, connection, message, &error,
++ NULL, connection, connection,
++ message, NULL, &error,
+ NULL);
+ if (res == BUS_RESULT_FALSE)
{
- if (!bus_transaction_capture_error_reply (transaction, &error, message))
- {
-@@ -2342,6 +2372,12 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
+ if (!bus_transaction_capture_error_reply (transaction, connection,
+ &error, message))
+@@ -2388,6 +2418,12 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
dbus_error_free (&error);
return TRUE;
}
@@ -1132,7 +1111,7 @@ index 02d6c220..eea50ecd 100644
return bus_transaction_send (transaction, connection, message);
}
diff --git a/bus/connection.h b/bus/connection.h
-index 8c68d0a0..a6e5dfde 100644
+index 9e253ae..71078ea 100644
--- a/bus/connection.h
+++ b/bus/connection.h
@@ -31,6 +31,7 @@
@@ -1143,7 +1122,7 @@ index 8c68d0a0..a6e5dfde 100644
BusConnections* bus_connections_new (BusContext *context);
BusConnections* bus_connections_ref (BusConnections *connections);
-@@ -122,6 +123,9 @@ dbus_bool_t bus_connection_be_monitor (DBusConnection *connection,
+@@ -124,6 +125,9 @@ dbus_bool_t bus_connection_be_monitor (DBusConnection *connection,
BusTransaction *transaction,
DBusList **rules,
DBusError *error);
@@ -1155,7 +1134,7 @@ index 8c68d0a0..a6e5dfde 100644
diff --git a/bus/cynara.c b/bus/cynara.c
new file mode 100644
-index 00000000..57a4c45c
+index 0000000..57a4c45
--- /dev/null
+++ b/bus/cynara.c
@@ -0,0 +1,374 @@
@@ -1535,7 +1514,7 @@ index 00000000..57a4c45c
+#endif /* DBUS_ENABLE_CYNARA */
diff --git a/bus/cynara.h b/bus/cynara.h
new file mode 100644
-index 00000000..c4728bb7
+index 0000000..c4728bb
--- /dev/null
+++ b/bus/cynara.h
@@ -0,0 +1,37 @@
@@ -1577,7 +1556,7 @@ index 00000000..c4728bb7
+ BusDeferredMessageStatus check_type,
+ BusDeferredMessage **deferred_message);
diff --git a/bus/dispatch.c b/bus/dispatch.c
-index edfa1b44..05be3bdf 100644
+index 19228be..7e51bc1 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -25,6 +25,7 @@
@@ -1588,7 +1567,7 @@ index edfa1b44..05be3bdf 100644
#include "connection.h"
#include "driver.h"
#include "services.h"
-@@ -64,13 +65,17 @@ send_one_message (DBusConnection *connection,
+@@ -64,14 +65,18 @@ send_one_message (DBusConnection *connection,
DBusError *error)
{
DBusError stack_error = DBUS_ERROR_INIT;
@@ -1601,14 +1580,15 @@ index edfa1b44..05be3bdf 100644
addressed_recipient,
connection,
message,
+ NULL,
- &stack_error))
+ &stack_error,
+ &deferred_message);
+ if (result != BUS_RESULT_TRUE)
{
- if (!bus_transaction_capture_error_reply (transaction, &stack_error,
- message))
-@@ -129,6 +134,7 @@ bus_dispatch_matches (BusTransaction *transaction,
+ if (!bus_transaction_capture_error_reply (transaction, sender,
+ &stack_error, message))
+@@ -130,6 +135,7 @@ bus_dispatch_matches (BusTransaction *transaction,
BusMatchmaker *matchmaker;
DBusList *link;
BusContext *context;
@@ -1616,19 +1596,19 @@ index edfa1b44..05be3bdf 100644
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -144,11 +150,21 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -145,11 +151,21 @@ bus_dispatch_matches (BusTransaction *transaction,
/* First, send the message to the addressed_recipient, if there is one. */
if (addressed_recipient != NULL)
{
- if (!bus_context_check_security_policy (context, transaction,
- sender, addressed_recipient,
- addressed_recipient,
-- message, error))
+- message, NULL, error))
+ BusResult res;
+ res = bus_context_check_security_policy (context, transaction,
+ sender, addressed_recipient,
+ addressed_recipient,
-+ message, error,
++ message, NULL, error,
+ &deferred_message);
+ if (res == BUS_RESULT_FALSE)
return FALSE;
@@ -1642,16 +1622,25 @@ index edfa1b44..05be3bdf 100644
if (dbus_message_contains_unix_fds (message) &&
!dbus_connection_can_send_type (addressed_recipient,
-@@ -379,12 +395,24 @@ bus_dispatch (DBusConnection *connection,
+@@ -374,19 +390,32 @@ bus_dispatch (DBusConnection *connection,
if (service_name &&
strcmp (service_name, DBUS_SERVICE_DBUS) == 0) /* to bus driver */
{
-- if (!bus_context_check_security_policy (context, transaction,
-- connection, NULL, NULL, message, &error))
+ BusDeferredMessage *deferred_message;
+ BusResult res;
++
+ if (!bus_transaction_capture (transaction, connection, NULL, message))
+ {
+ BUS_SET_OOM (&error);
+ goto out;
+ }
+
+- if (!bus_context_check_security_policy (context, transaction,
+- connection, NULL, NULL, message,
+- NULL, &error))
+ res = bus_context_check_security_policy (context, transaction,
-+ connection, NULL, NULL, message, &error,
++ connection, NULL, NULL, message,
++ NULL, &error,
+ &deferred_message);
+ if (res == BUS_RESULT_FALSE)
{
@@ -1670,7 +1659,7 @@ index edfa1b44..05be3bdf 100644
_dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS);
if (!bus_driver_handle_message (connection, transaction, message, &error))
diff --git a/bus/policy.c b/bus/policy.c
-index 082f3853..bcade176 100644
+index a37be80..7ee1ce5 100644
--- a/bus/policy.c
+++ b/bus/policy.c
@@ -22,6 +22,7 @@
@@ -1681,7 +1670,7 @@ index 082f3853..bcade176 100644
#include "policy.h"
#include "services.h"
#include "test.h"
-@@ -32,7 +33,7 @@
+@@ -33,7 +34,7 @@
BusPolicyRule*
bus_policy_rule_new (BusPolicyRuleType type,
@@ -1690,7 +1679,7 @@ index 082f3853..bcade176 100644
{
BusPolicyRule *rule;
-@@ -42,7 +43,7 @@ bus_policy_rule_new (BusPolicyRuleType type,
+@@ -43,7 +44,7 @@ bus_policy_rule_new (BusPolicyRuleType type,
rule->type = type;
rule->refcount = 1;
@@ -1699,7 +1688,7 @@ index 082f3853..bcade176 100644
switch (rule->type)
{
-@@ -54,18 +55,19 @@ bus_policy_rule_new (BusPolicyRuleType type,
+@@ -55,18 +56,19 @@ bus_policy_rule_new (BusPolicyRuleType type,
break;
case BUS_POLICY_RULE_SEND:
rule->d.send.message_type = DBUS_MESSAGE_TYPE_INVALID;
@@ -1722,9 +1711,9 @@ index 082f3853..bcade176 100644
break;
case BUS_POLICY_RULE_OWN:
break;
-@@ -117,7 +119,8 @@ bus_policy_rule_unref (BusPolicyRule *rule)
- case BUS_POLICY_RULE_GROUP:
- break;
+@@ -122,7 +124,8 @@ bus_policy_rule_unref (BusPolicyRule *rule)
+ default:
+ _dbus_assert_not_reached ("invalid rule");
}
-
+
@@ -1732,7 +1721,7 @@ index 082f3853..bcade176 100644
dbus_free (rule);
}
}
-@@ -427,7 +430,10 @@ list_allows_user (dbus_bool_t def,
+@@ -435,7 +438,10 @@ list_allows_user (dbus_bool_t def,
else
continue;
@@ -1744,7 +1733,7 @@ index 082f3853..bcade176 100644
}
return allowed;
-@@ -862,18 +868,23 @@ bus_client_policy_append_rule (BusClientPolicy *policy,
+@@ -873,18 +879,23 @@ bus_client_policy_append_rule (BusClientPolicy *policy,
return TRUE;
}
@@ -1778,7 +1767,7 @@ index 082f3853..bcade176 100644
/* policy->rules is in the order the rules appeared
* in the config file, i.e. last rule that applies wins
*/
-@@ -881,7 +892,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
+@@ -892,7 +903,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
_dbus_verbose (" (policy) checking send rules\n");
*toggles = 0;
@@ -1787,7 +1776,7 @@ index 082f3853..bcade176 100644
link = _dbus_list_get_first_link (&policy->rules);
while (link != NULL)
{
-@@ -912,13 +923,14 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
+@@ -923,13 +934,14 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
/* If it's a reply, the requested_reply flag kicks in */
if (dbus_message_get_reply_serial (message) != 0)
{
@@ -1807,7 +1796,7 @@ index 082f3853..bcade176 100644
continue;
}
-@@ -926,7 +938,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
+@@ -937,7 +949,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
* when the reply was not requested. requested_reply=true means the
* rule always applies.
*/
@@ -1816,7 +1805,7 @@ index 082f3853..bcade176 100644
{
_dbus_verbose (" (policy) skipping deny rule since it only applies to unrequested replies\n");
continue;
-@@ -949,13 +961,15 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
+@@ -960,13 +972,15 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
/* The interface is optional in messages. For allow rules, if the message
* has no interface we want to skip the rule (and thus not allow);
* for deny rules, if the message has no interface we want to use the
@@ -1834,7 +1823,7 @@ index 082f3853..bcade176 100644
(!no_interface &&
strcmp (dbus_message_get_interface (message),
rule->d.send.interface) != 0))
-@@ -1029,33 +1043,63 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
+@@ -1079,33 +1093,63 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
}
/* Use this rule */
@@ -1912,7 +1901,7 @@ index 082f3853..bcade176 100644
eavesdropping =
addressed_recipient != proposed_recipient &&
-@@ -1068,7 +1112,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1118,7 +1162,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
_dbus_verbose (" (policy) checking receive rules, eavesdropping = %d\n", eavesdropping);
*toggles = 0;
@@ -1921,7 +1910,7 @@ index 082f3853..bcade176 100644
link = _dbus_list_get_first_link (&policy->rules);
while (link != NULL)
{
-@@ -1091,19 +1135,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1141,19 +1185,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
}
}
@@ -1948,7 +1937,7 @@ index 082f3853..bcade176 100644
{
_dbus_verbose (" (policy) skipping deny rule since it only applies to eavesdropping\n");
continue;
-@@ -1112,13 +1158,14 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1162,13 +1208,14 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
/* If it's a reply, the requested_reply flag kicks in */
if (dbus_message_get_reply_serial (message) != 0)
{
@@ -1968,7 +1957,7 @@ index 082f3853..bcade176 100644
continue;
}
-@@ -1126,7 +1173,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1176,7 +1223,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
* when the reply was not requested. requested_reply=true means the
* rule always applies.
*/
@@ -1977,7 +1966,7 @@ index 082f3853..bcade176 100644
{
_dbus_verbose (" (policy) skipping deny rule since it only applies to unrequested replies\n");
continue;
-@@ -1149,13 +1196,13 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1199,13 +1246,13 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
/* The interface is optional in messages. For allow rules, if the message
* has no interface we want to skip the rule (and thus not allow);
* for deny rules, if the message has no interface we want to use the
@@ -1993,9 +1982,9 @@ index 082f3853..bcade176 100644
(!no_interface &&
strcmp (dbus_message_get_interface (message),
rule->d.receive.interface) != 0))
-@@ -1230,14 +1277,42 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1295,14 +1342,42 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
}
-
+
/* Use this rule */
- allowed = rule->allow;
+ switch (rule->access)
@@ -2040,7 +2029,7 @@ index 082f3853..bcade176 100644
}
-@@ -1289,7 +1364,7 @@ bus_rules_check_can_own (DBusList *rules,
+@@ -1354,7 +1429,7 @@ bus_rules_check_can_own (DBusList *rules,
}
/* Use this rule */
@@ -2050,12 +2039,12 @@ index 082f3853..bcade176 100644
return allowed;
diff --git a/bus/policy.h b/bus/policy.h
-index d1d3e72b..e9f193af 100644
+index ec43ffa..f306a3c 100644
--- a/bus/policy.h
+++ b/bus/policy.h
-@@ -39,6 +39,14 @@ typedef enum
- BUS_POLICY_RULE_GROUP
- } BusPolicyRuleType;
+@@ -46,6 +46,14 @@ typedef enum
+ BUS_POLICY_TRISTATE_TRUE
+ } BusPolicyTristate;
+typedef enum
+{
@@ -2068,7 +2057,7 @@ index d1d3e72b..e9f193af 100644
/** determines whether the rule affects a connection, or some global item */
#define BUS_POLICY_RULE_IS_PER_CLIENT(rule) (!((rule)->type == BUS_POLICY_RULE_USER || \
(rule)->type == BUS_POLICY_RULE_GROUP))
-@@ -49,8 +57,9 @@ struct BusPolicyRule
+@@ -56,8 +64,9 @@ struct BusPolicyRule
BusPolicyRuleType type;
@@ -2080,7 +2069,7 @@ index d1d3e72b..e9f193af 100644
union
{
struct
-@@ -106,7 +115,7 @@ struct BusPolicyRule
+@@ -118,7 +127,7 @@ struct BusPolicyRule
};
BusPolicyRule* bus_policy_rule_new (BusPolicyRuleType type,
@@ -2089,7 +2078,7 @@ index d1d3e72b..e9f193af 100644
BusPolicyRule* bus_policy_rule_ref (BusPolicyRule *rule);
void bus_policy_rule_unref (BusPolicyRule *rule);
-@@ -140,21 +149,27 @@ dbus_bool_t bus_policy_merge (BusPolicy *policy,
+@@ -152,21 +161,27 @@ dbus_bool_t bus_policy_merge (BusPolicy *policy,
BusClientPolicy* bus_client_policy_new (void);
BusClientPolicy* bus_client_policy_ref (BusClientPolicy *policy);
void bus_client_policy_unref (BusClientPolicy *policy);
@@ -2133,10 +2122,10 @@ index d1d3e72b..e9f193af 100644
const DBusString *service_name);
dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy,
diff --git a/configure.ac b/configure.ac
-index 71e3515c..f3a2ffc1 100644
+index 80671b2..d975b04 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1873,6 +1873,17 @@ AC_ARG_ENABLE([user-session],
+@@ -1761,6 +1761,17 @@ AC_ARG_ENABLE([user-session],
AM_CONDITIONAL([DBUS_ENABLE_USER_SESSION],
[test "x$enable_user_session" = xyes])
@@ -2154,7 +2143,7 @@ index 71e3515c..f3a2ffc1 100644
AC_CONFIG_FILES([
Doxyfile
dbus/Version
-@@ -1952,6 +1963,7 @@ echo "
+@@ -1843,6 +1854,7 @@ echo "
Building bus stats API: ${enable_stats}
Building SELinux support: ${have_selinux}
Building AppArmor support: ${have_apparmor}
@@ -2163,20 +2152,20 @@ index 71e3515c..f3a2ffc1 100644
Building kqueue support: ${have_kqueue}
Building systemd support: ${have_systemd}
diff --git a/test/Makefile.am b/test/Makefile.am
-index 914dd7f2..86882537 100644
+index 6a6e1a3..ce84dbc 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
-@@ -341,6 +341,7 @@ in_data = \
+@@ -439,6 +439,7 @@ in_data = \
data/valid-config-files/debug-allow-all.conf.in \
data/valid-config-files/finite-timeout.conf.in \
data/valid-config-files/forbidding.conf.in \
+ data/valid-config-files/debug-check-some.conf.in \
data/valid-config-files/incoming-limit.conf.in \
- data/valid-config-files/multi-user.conf.in \
- data/valid-config-files/systemd-activation.conf.in \
+ data/valid-config-files/max-completed-connections.conf.in \
+ data/valid-config-files/max-connections-per-user.conf.in \
diff --git a/test/data/invalid-config-files/badcheck-1.conf b/test/data/invalid-config-files/badcheck-1.conf
new file mode 100644
-index 00000000..fad9f502
+index 0000000..fad9f50
--- /dev/null
+++ b/test/data/invalid-config-files/badcheck-1.conf
@@ -0,0 +1,9 @@
@@ -2191,7 +2180,7 @@ index 00000000..fad9f502
+</busconfig>
diff --git a/test/data/invalid-config-files/badcheck-2.conf b/test/data/invalid-config-files/badcheck-2.conf
new file mode 100644
-index 00000000..63c7ef25
+index 0000000..63c7ef2
--- /dev/null
+++ b/test/data/invalid-config-files/badcheck-2.conf
@@ -0,0 +1,9 @@
@@ -2206,7 +2195,7 @@ index 00000000..63c7ef25
+</busconfig>
diff --git a/test/data/valid-config-files/check-1.conf b/test/data/valid-config-files/check-1.conf
new file mode 100644
-index 00000000..ad714733
+index 0000000..ad71473
--- /dev/null
+++ b/test/data/valid-config-files/check-1.conf
@@ -0,0 +1,9 @@
@@ -2221,7 +2210,7 @@ index 00000000..ad714733
+</busconfig>
diff --git a/test/data/valid-config-files/debug-check-some.conf.in b/test/data/valid-config-files/debug-check-some.conf.in
new file mode 100644
-index 00000000..47ee8548
+index 0000000..47ee854
--- /dev/null
+++ b/test/data/valid-config-files/debug-check-some.conf.in
@@ -0,0 +1,18 @@
@@ -2243,19 +2232,3 @@ index 00000000..47ee8548
+ <check privilege="foo" send_interface="org.freedesktop.TestSuite" send_member="Echo"/>
+ </policy>
+</busconfig>
-diff --git a/tools/dbus-send.c b/tools/dbus-send.c
-index 0dc1f5b3..76ddab3f 100644
---- a/tools/dbus-send.c
-+++ b/tools/dbus-send.c
-@@ -458,7 +458,7 @@ main (int argc, char *argv[])
- char *arg;
- char *c;
- int type;
-- int secondary_type;
-+ int secondary_type = 0;
- int container_type;
- DBusMessageIter *target_iter;
- DBusMessageIter container_iter;
---
-2.14.3
-
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch
index b1c3f3fdc..4fd75510e 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch
@@ -22,27 +22,16 @@ Change-Id: I57eccbf973525fd51369c7d4e58908292f44da80
Cherry-picked from b1b87ad9f20b2052c28431b48e81073078a745ce
by Jose Bollo.
+Updated for dbus 1.12.10 by Scott Murray.
+
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- bus/activation.c | 78 +++++++++++++++--
- bus/check.c | 109 ++++++++++++++++++++++--
- bus/check.h | 10 +++
- bus/cynara.c | 1 -
- bus/dispatch.c | 184 ++++++++++++++++++++++++++++++++++++----
- bus/dispatch.h | 2 +-
- bus/driver.c | 12 ++-
- dbus/dbus-connection-internal.h | 15 ++++
- dbus/dbus-connection.c | 125 +++++++++++++++++++++++++--
- dbus/dbus-list.c | 29 +++++++
- dbus/dbus-list.h | 3 +
- dbus/dbus-shared.h | 3 +-
- 12 files changed, 528 insertions(+), 43 deletions(-)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/bus/activation.c b/bus/activation.c
-index 1a98af6d..343d3f22 100644
+index 451179d..5f02153 100644
--- a/bus/activation.c
+++ b/bus/activation.c
-@@ -31,6 +31,7 @@
+@@ -32,6 +32,7 @@
#include "services.h"
#include "test.h"
#include "utils.h"
@@ -50,7 +39,7 @@ index 1a98af6d..343d3f22 100644
#include <dbus/dbus-internals.h>
#include <dbus/dbus-hash.h>
#include <dbus/dbus-list.h>
-@@ -91,6 +92,8 @@ struct BusPendingActivationEntry
+@@ -94,6 +95,8 @@ struct BusPendingActivationEntry
DBusConnection *connection;
dbus_bool_t auto_activation;
@@ -59,7 +48,7 @@ index 1a98af6d..343d3f22 100644
};
typedef struct
-@@ -1180,20 +1183,23 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
+@@ -1241,20 +1244,23 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
BusPendingActivationEntry *entry = link->data;
DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link);
@@ -88,7 +77,7 @@ index 1a98af6d..343d3f22 100644
{
/* If permission is denied, we just want to return the error
* to the original method invoker; in particular, we don't
-@@ -1205,9 +1211,40 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
+@@ -1266,9 +1272,40 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
bus_connection_send_oom_error (entry->connection,
entry->activation_message);
}
@@ -131,7 +120,7 @@ index 1a98af6d..343d3f22 100644
}
}
-@@ -1225,6 +1262,19 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
+@@ -1286,6 +1323,19 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
return TRUE;
error:
@@ -151,20 +140,22 @@ index 1a98af6d..343d3f22 100644
return FALSE;
}
-@@ -2028,13 +2078,23 @@ bus_activation_activate_service (BusActivation *activation,
+@@ -2078,6 +2128,7 @@ bus_activation_activate_service (BusActivation *activation,
if (service != NULL)
{
+ BusResult res;
bus_context_log (activation->context,
- DBUS_SYSTEM_LOG_INFO, "Activating via systemd: service name='%s' unit='%s'",
+ DBUS_SYSTEM_LOG_INFO, "Activating via systemd: service name='%s' unit='%s' requested by '%s' (%s)",
service_name,
- entry->systemd_service);
+@@ -2085,8 +2136,17 @@ bus_activation_activate_service (BusActivation *activation,
+ bus_connection_get_name (connection),
+ bus_connection_get_loginfo (connection));
/* Wonderful, systemd is connected, let's just send the msg */
-- retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
-- message, error);
-+ res = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
-+ message, error);
+- retval = bus_dispatch_matches (activation_transaction, NULL,
+- systemd, message, error);
++ res = bus_dispatch_matches (activation_transaction, NULL,
++ systemd, message, error);
+
+ if (res == BUS_RESULT_TRUE)
+ retval = TRUE;
@@ -178,7 +169,7 @@ index 1a98af6d..343d3f22 100644
else
{
diff --git a/bus/check.c b/bus/check.c
-index 5b72d31c..4b8a6994 100644
+index 5b72d31..4b8a699 100644
--- a/bus/check.c
+++ b/bus/check.c
@@ -55,6 +55,8 @@ typedef struct BusDeferredMessage
@@ -348,7 +339,7 @@ index 5b72d31c..4b8a6994 100644
bus_deferred_message_response_received (BusDeferredMessage *deferred_message,
BusResult result)
diff --git a/bus/check.h b/bus/check.h
-index c3fcaf90..d1775497 100644
+index c3fcaf9..d177549 100644
--- a/bus/check.h
+++ b/bus/check.h
@@ -55,6 +55,7 @@ BusResult bus_check_privilege (BusCheck *check,
@@ -374,7 +365,7 @@ index c3fcaf90..d1775497 100644
+
#endif /* BUS_CHECK_H */
diff --git a/bus/cynara.c b/bus/cynara.c
-index 57a4c45c..77aed623 100644
+index 57a4c45..77aed62 100644
--- a/bus/cynara.c
+++ b/bus/cynara.c
@@ -36,7 +36,6 @@
@@ -386,7 +377,7 @@ index 57a4c45c..77aed623 100644
typedef struct BusCynara
{
diff --git a/bus/dispatch.c b/bus/dispatch.c
-index 05be3bdf..7353501b 100644
+index 7e51bc1..0250b53 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -35,6 +35,7 @@
@@ -397,7 +388,7 @@ index 05be3bdf..7353501b 100644
#include <dbus/dbus-misc.h>
#include <string.h>
-@@ -121,7 +122,7 @@ send_one_message (DBusConnection *connection,
+@@ -122,7 +123,7 @@ send_one_message (DBusConnection *connection,
return TRUE;
}
@@ -406,8 +397,8 @@ index 05be3bdf..7353501b 100644
bus_dispatch_matches (BusTransaction *transaction,
DBusConnection *sender,
DBusConnection *addressed_recipient,
-@@ -157,13 +158,29 @@ bus_dispatch_matches (BusTransaction *transaction,
- message, error,
+@@ -158,13 +159,29 @@ bus_dispatch_matches (BusTransaction *transaction,
+ message, NULL, error,
&deferred_message);
if (res == BUS_RESULT_FALSE)
- return FALSE;
@@ -441,7 +432,7 @@ index 05be3bdf..7353501b 100644
}
if (dbus_message_contains_unix_fds (message) &&
-@@ -174,14 +191,14 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -175,14 +192,14 @@ bus_dispatch_matches (BusTransaction *transaction,
DBUS_ERROR_NOT_SUPPORTED,
"Tried to send message with Unix file descriptors"
"to a client that doesn't support that.");
@@ -459,7 +450,7 @@ index 05be3bdf..7353501b 100644
}
}
-@@ -196,7 +213,7 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -197,7 +214,7 @@ bus_dispatch_matches (BusTransaction *transaction,
&recipients))
{
BUS_SET_OOM (error);
@@ -468,7 +459,7 @@ index 05be3bdf..7353501b 100644
}
link = _dbus_list_get_first_link (&recipients);
-@@ -218,10 +235,10 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -219,10 +236,10 @@ bus_dispatch_matches (BusTransaction *transaction,
if (dbus_error_is_set (&tmp_error))
{
dbus_move_error (&tmp_error, error);
@@ -481,7 +472,7 @@ index 05be3bdf..7353501b 100644
}
static DBusHandlerResult
-@@ -407,10 +424,12 @@ bus_dispatch (DBusConnection *connection,
+@@ -410,10 +427,12 @@ bus_dispatch (DBusConnection *connection,
}
else if (res == BUS_RESULT_LATER)
{
@@ -498,7 +489,7 @@ index 05be3bdf..7353501b 100644
goto out;
}
-@@ -475,8 +494,14 @@ bus_dispatch (DBusConnection *connection,
+@@ -515,8 +534,14 @@ bus_dispatch (DBusConnection *connection,
* addressed_recipient == NULL), and match it against other connections'
* match rules.
*/
@@ -515,9 +506,9 @@ index 05be3bdf..7353501b 100644
out:
if (dbus_error_is_set (&error))
-@@ -5001,9 +5026,132 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
- return TRUE;
+@@ -5061,9 +5086,132 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
}
+ #endif
+typedef struct {
+ DBusTimeout *timeout;
@@ -649,7 +640,7 @@ index 05be3bdf..7353501b 100644
_dbus_verbose ("Normal activation tests\n");
if (!bus_dispatch_test_conf (test_data_dir,
diff --git a/bus/dispatch.h b/bus/dispatch.h
-index fb5ba7a5..afba6a24 100644
+index fb5ba7a..afba6a2 100644
--- a/bus/dispatch.h
+++ b/bus/dispatch.h
@@ -29,7 +29,7 @@
@@ -662,10 +653,10 @@ index fb5ba7a5..afba6a24 100644
DBusConnection *recipient,
DBusMessage *message,
diff --git a/bus/driver.c b/bus/driver.c
-index b7e1a0a0..a5823d4d 100644
+index cd0a714..f414f64 100644
--- a/bus/driver.c
+++ b/bus/driver.c
-@@ -225,6 +225,7 @@ bus_driver_send_service_owner_changed (const char *service_name,
+@@ -218,6 +218,7 @@ bus_driver_send_service_owner_changed (const char *service_name,
{
DBusMessage *message;
dbus_bool_t retval;
@@ -673,8 +664,8 @@ index b7e1a0a0..a5823d4d 100644
const char *null_service;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -260,7 +261,16 @@ bus_driver_send_service_owner_changed (const char *service_name,
- if (!bus_transaction_capture (transaction, NULL, message))
+@@ -253,7 +254,16 @@ bus_driver_send_service_owner_changed (const char *service_name,
+ if (!bus_transaction_capture (transaction, NULL, NULL, message))
goto oom;
- retval = bus_dispatch_matches (transaction, NULL, NULL, message, error);
@@ -692,7 +683,7 @@ index b7e1a0a0..a5823d4d 100644
return retval;
diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h
-index 48357321..94b1c951 100644
+index 4835732..94b1c95 100644
--- a/dbus/dbus-connection-internal.h
+++ b/dbus/dbus-connection-internal.h
@@ -118,6 +118,21 @@ DBUS_PRIVATE_EXPORT
@@ -718,7 +709,7 @@ index 48357321..94b1c951 100644
DBUS_PRIVATE_EXPORT
void _dbus_connection_get_stats (DBusConnection *connection,
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
-index 7f5b3292..ed0be70d 100644
+index c525b6d..f1b0ea0 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -311,7 +311,8 @@ struct DBusConnection
@@ -771,7 +762,7 @@ index 7f5b3292..ed0be70d 100644
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/**
* Gets the locks so we can examine them
-@@ -4070,6 +4104,82 @@ _dbus_connection_putback_message_link_unlocked (DBusConnection *connection,
+@@ -4069,6 +4103,82 @@ _dbus_connection_putback_message_link_unlocked (DBusConnection *connection,
"_dbus_connection_putback_message_link_unlocked");
}
@@ -854,7 +845,7 @@ index 7f5b3292..ed0be70d 100644
/**
* Returns the first-received message from the incoming message queue,
* removing it from the queue. The caller owns a reference to the
-@@ -4253,8 +4363,9 @@ static DBusDispatchStatus
+@@ -4252,8 +4362,9 @@ static DBusDispatchStatus
_dbus_connection_get_dispatch_status_unlocked (DBusConnection *connection)
{
HAVE_LOCK_CHECK (connection);
@@ -866,7 +857,7 @@ index 7f5b3292..ed0be70d 100644
return DBUS_DISPATCH_DATA_REMAINS;
else if (!_dbus_transport_queue_messages (connection->transport))
return DBUS_DISPATCH_NEED_MEMORY;
-@@ -4717,6 +4828,8 @@ dbus_connection_dispatch (DBusConnection *connection)
+@@ -4716,6 +4827,8 @@ dbus_connection_dispatch (DBusConnection *connection)
CONNECTION_LOCK (connection);
@@ -875,7 +866,7 @@ index 7f5b3292..ed0be70d 100644
if (result == DBUS_HANDLER_RESULT_NEED_MEMORY)
{
_dbus_verbose ("No memory\n");
-@@ -4839,9 +4952,11 @@ dbus_connection_dispatch (DBusConnection *connection)
+@@ -4838,9 +4951,11 @@ dbus_connection_dispatch (DBusConnection *connection)
connection);
out:
@@ -890,7 +881,7 @@ index 7f5b3292..ed0be70d 100644
/* Put message back, and we'll start over.
* Yes this means handlers must be idempotent if they
diff --git a/dbus/dbus-list.c b/dbus/dbus-list.c
-index c4c1856f..f84918b1 100644
+index 8e713c0..32ea871 100644
--- a/dbus/dbus-list.c
+++ b/dbus/dbus-list.c
@@ -458,6 +458,35 @@ _dbus_list_remove_last (DBusList **list,
@@ -930,7 +921,7 @@ index c4c1856f..f84918b1 100644
* Finds a value in the list. Returns the last link
* with value equal to the given data pointer.
diff --git a/dbus/dbus-list.h b/dbus/dbus-list.h
-index 9350a0da..fee9f1bc 100644
+index 9350a0d..fee9f1b 100644
--- a/dbus/dbus-list.h
+++ b/dbus/dbus-list.h
@@ -68,6 +68,9 @@ DBUS_PRIVATE_EXPORT
@@ -944,7 +935,7 @@ index 9350a0da..fee9f1bc 100644
void *data);
DBUS_PRIVATE_EXPORT
diff --git a/dbus/dbus-shared.h b/dbus/dbus-shared.h
-index 7ab91035..e5bfbed6 100644
+index 7ab9103..e5bfbed 100644
--- a/dbus/dbus-shared.h
+++ b/dbus/dbus-shared.h
@@ -67,7 +67,8 @@ typedef enum
@@ -957,6 +948,3 @@ index 7ab91035..e5bfbed6 100644
} DBusHandlerResult;
/* Bus names */
---
-2.14.3
-
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch
index b797064ec..7f17bd00a 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch
@@ -23,26 +23,16 @@ Change-Id: Iecd5395f75a4c7811fa97247a37d8fc4d42e8814
Cherry picked from 1e231194610892dd4360224998d91336097b05a1 by Jose Bollo
+Updated for dbus 1.12.10 by Scott Murray.
+
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- bus/activation.c | 4 +-
- bus/bus.c | 50 +++++++--
- bus/bus.h | 19 ++++
- bus/check.c | 307 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- bus/check.h | 25 +++++
- bus/connection.c | 169 ++++++++++++++++++++++++++++--
- bus/connection.h | 19 +++-
- bus/dispatch.c | 121 ++++++++++++++++++----
- bus/dispatch.h | 11 +-
- bus/driver.c | 2 +-
- bus/policy.c | 6 ++
- 11 files changed, 686 insertions(+), 47 deletions(-)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/bus/activation.c b/bus/activation.c
-index 343d3f22..11bd8386 100644
+index 5f02153..f2981e1 100644
--- a/bus/activation.c
+++ b/bus/activation.c
-@@ -1198,7 +1198,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
+@@ -1259,7 +1259,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation
res = bus_dispatch_matches (transaction,
entry->connection,
addressed_recipient,
@@ -51,20 +41,20 @@ index 343d3f22..11bd8386 100644
if (res == BUS_RESULT_FALSE)
{
/* If permission is denied, we just want to return the error
-@@ -2085,7 +2085,7 @@ bus_activation_activate_service (BusActivation *activation,
- entry->systemd_service);
+@@ -2137,7 +2137,7 @@ bus_activation_activate_service (BusActivation *activation,
+ bus_connection_get_loginfo (connection));
/* Wonderful, systemd is connected, let's just send the msg */
- res = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
-- message, error);
-+ message, NULL, error);
+ res = bus_dispatch_matches (activation_transaction, NULL,
+- systemd, message, error);
++ systemd, message, NULL, error);
if (res == BUS_RESULT_TRUE)
retval = TRUE;
diff --git a/bus/bus.c b/bus/bus.c
-index c4008505..911e2340 100644
+index 237efe3..5bb5637 100644
--- a/bus/bus.c
+++ b/bus/bus.c
-@@ -1796,17 +1796,9 @@ bus_context_check_security_policy (BusContext *context,
+@@ -1800,17 +1800,9 @@ bus_context_check_security_policy (BusContext *context,
}
/* See if limits on size have been exceeded */
@@ -84,7 +74,7 @@ index c4008505..911e2340 100644
/* Record that we will allow a reply here in the future (don't
* bother if the recipient is the bus or this is an eavesdropping
-@@ -1861,3 +1853,41 @@ bus_context_check_all_watches (BusContext *context)
+@@ -1869,3 +1861,41 @@ bus_context_check_all_watches (BusContext *context)
_dbus_server_toggle_all_watches (server, enabled);
}
}
@@ -127,10 +117,10 @@ index c4008505..911e2340 100644
+ return TRUE;
+}
diff --git a/bus/bus.h b/bus/bus.h
-index dab7791f..445165c9 100644
+index 82c32c8..1b08f7c 100644
--- a/bus/bus.h
+++ b/bus/bus.h
-@@ -158,4 +158,23 @@ BusResult bus_context_check_security_policy (BusContext
+@@ -164,4 +164,23 @@ BusResult bus_context_check_security_policy (BusContext
BusDeferredMessage **deferred_message);
void bus_context_check_all_watches (BusContext *context);
@@ -155,7 +145,7 @@ index dab7791f..445165c9 100644
+
#endif /* BUS_BUS_H */
diff --git a/bus/check.c b/bus/check.c
-index 4b8a6994..b8833349 100644
+index 4b8a699..f3d283f 100644
--- a/bus/check.c
+++ b/bus/check.c
@@ -49,6 +49,9 @@ typedef struct BusDeferredMessage
@@ -370,7 +360,7 @@ index 4b8a6994..b8833349 100644
+ deferred_message->sender,
+ deferred_message->addressed_recipient,
+ deferred_message->proposed_recipient,
-+ deferred_message->message, NULL,
++ deferred_message->message, NULL, NULL,
+ &deferred_message2);
+
+ if (result == BUS_RESULT_LATER)
@@ -511,7 +501,7 @@ index 4b8a6994..b8833349 100644
}
+
diff --git a/bus/check.h b/bus/check.h
-index d1775497..9c13c184 100644
+index d177549..9c13c18 100644
--- a/bus/check.h
+++ b/bus/check.h
@@ -64,12 +64,37 @@ BusDeferredMessage *bus_deferred_message_new (DBusMessage *messag
@@ -553,7 +543,7 @@ index d1775497..9c13c184 100644
extern BusResult (*bus_check_test_override) (DBusConnection *connection,
const char *privilege);
diff --git a/bus/connection.c b/bus/connection.c
-index eea50ecd..1c0bdffb 100644
+index deebde3..f9e563b 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -31,11 +31,13 @@
@@ -587,7 +577,7 @@ index eea50ecd..1c0bdffb 100644
bus_dispatch_remove_connection (connection);
/* no more watching */
-@@ -2264,7 +2269,7 @@ bus_transaction_capture (BusTransaction *transaction,
+@@ -2307,7 +2312,7 @@ bus_transaction_capture (BusTransaction *transaction,
{
DBusConnection *recipient = link->data;
@@ -596,7 +586,7 @@ index eea50ecd..1c0bdffb 100644
goto out;
}
-@@ -2317,6 +2322,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
+@@ -2361,6 +2366,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
{
DBusError error = DBUS_ERROR_INIT;
BusResult res;
@@ -604,17 +594,17 @@ index eea50ecd..1c0bdffb 100644
/* We have to set the sender to the driver, and have
* to check security policy since it was not done in
-@@ -2357,7 +2363,8 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
- res = bus_context_check_security_policy (bus_transaction_get_context (transaction),
+@@ -2402,7 +2408,8 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
transaction,
- NULL, connection, connection, message, &error,
+ NULL, connection, connection,
+ message, NULL, &error,
- NULL);
+ &deferred_message);
+
if (res == BUS_RESULT_FALSE)
{
- if (!bus_transaction_capture_error_reply (transaction, &error, message))
-@@ -2374,18 +2381,20 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
+ if (!bus_transaction_capture_error_reply (transaction, connection,
+@@ -2420,18 +2427,20 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
}
else if (res == BUS_RESULT_LATER)
{
@@ -639,7 +629,7 @@ index eea50ecd..1c0bdffb 100644
{
MessageToSend *to_send;
BusConnectionData *d;
-@@ -2411,7 +2420,28 @@ bus_transaction_send (BusTransaction *transaction,
+@@ -2457,7 +2466,28 @@ bus_transaction_send (BusTransaction *transaction,
d = BUS_CONNECTION_DATA (connection);
_dbus_assert (d != NULL);
@@ -669,7 +659,7 @@ index eea50ecd..1c0bdffb 100644
to_send = dbus_new (MessageToSend, 1);
if (to_send == NULL)
{
-@@ -2663,6 +2693,131 @@ bus_transaction_add_cancel_hook (BusTransaction *transaction,
+@@ -2709,6 +2739,131 @@ bus_transaction_add_cancel_hook (BusTransaction *transaction,
return TRUE;
}
@@ -802,10 +792,10 @@ index eea50ecd..1c0bdffb 100644
bus_connections_get_n_active (BusConnections *connections)
{
diff --git a/bus/connection.h b/bus/connection.h
-index a6e5dfde..46e883e6 100644
+index 71078ea..97dae96 100644
--- a/bus/connection.h
+++ b/bus/connection.h
-@@ -83,6 +83,22 @@ dbus_bool_t bus_connection_preallocate_oom_error (DBusConnection *connection);
+@@ -85,6 +85,22 @@ dbus_bool_t bus_connection_preallocate_oom_error (DBusConnection *connection);
void bus_connection_send_oom_error (DBusConnection *connection,
DBusMessage *in_reply_to);
@@ -828,7 +818,7 @@ index a6e5dfde..46e883e6 100644
/* called by signals.c */
dbus_bool_t bus_connection_add_match_rule (DBusConnection *connection,
BusMatchRule *rule);
-@@ -135,7 +151,8 @@ BusTransaction* bus_transaction_new (BusContext *
+@@ -137,7 +153,8 @@ BusTransaction* bus_transaction_new (BusContext *
BusContext* bus_transaction_get_context (BusTransaction *transaction);
dbus_bool_t bus_transaction_send (BusTransaction *transaction,
DBusConnection *connection,
@@ -837,9 +827,9 @@ index a6e5dfde..46e883e6 100644
+ dbus_bool_t deferred_dispatch);
dbus_bool_t bus_transaction_capture (BusTransaction *transaction,
DBusConnection *connection,
- DBusMessage *message);
+ DBusConnection *addressed_recipient,
diff --git a/bus/dispatch.c b/bus/dispatch.c
-index 7353501b..e32c9263 100644
+index 0250b53..1bdcbf0 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -33,6 +33,7 @@
@@ -850,16 +840,16 @@ index 7353501b..e32c9263 100644
#include "test.h"
#include <dbus/dbus-internals.h>
#include <dbus/dbus-connection-internal.h>
-@@ -76,7 +77,7 @@ send_one_message (DBusConnection *connection,
- message,
+@@ -77,7 +78,7 @@ send_one_message (DBusConnection *connection,
+ NULL,
&stack_error,
&deferred_message);
- if (result != BUS_RESULT_TRUE)
+ if (result == BUS_RESULT_FALSE)
{
- if (!bus_transaction_capture_error_reply (transaction, &stack_error,
- message))
-@@ -111,9 +112,19 @@ send_one_message (DBusConnection *connection,
+ if (!bus_transaction_capture_error_reply (transaction, sender,
+ &stack_error, message))
+@@ -112,9 +113,19 @@ send_one_message (DBusConnection *connection,
return TRUE; /* don't send it but don't return an error either */
}
@@ -880,7 +870,7 @@ index 7353501b..e32c9263 100644
{
BUS_SET_OOM (error);
return FALSE;
-@@ -123,11 +134,12 @@ send_one_message (DBusConnection *connection,
+@@ -124,11 +135,12 @@ send_one_message (DBusConnection *connection,
}
BusResult
@@ -898,7 +888,7 @@ index 7353501b..e32c9263 100644
{
DBusError tmp_error;
BusConnections *connections;
-@@ -151,17 +163,78 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -152,17 +164,78 @@ bus_dispatch_matches (BusTransaction *transaction,
/* First, send the message to the addressed_recipient, if there is one. */
if (addressed_recipient != NULL)
{
@@ -906,7 +896,7 @@ index 7353501b..e32c9263 100644
- res = bus_context_check_security_policy (context, transaction,
- sender, addressed_recipient,
- addressed_recipient,
-- message, error,
+- message, NULL, error,
- &deferred_message);
- if (res == BUS_RESULT_FALSE)
+ BusResult result;
@@ -961,7 +951,7 @@ index 7353501b..e32c9263 100644
+
+ if (result == BUS_RESULT_LATER)
+ result = bus_context_check_security_policy(context, transaction,
-+ sender, addressed_recipient, addressed_recipient, message, error,
++ sender, addressed_recipient, addressed_recipient, message, NULL, error,
+ &deferred_message);
+
+ if (result == BUS_RESULT_FALSE)
@@ -985,7 +975,7 @@ index 7353501b..e32c9263 100644
status = bus_deferred_message_get_status(deferred_message);
if (status & BUS_DEFERRED_MESSAGE_CHECK_SEND)
-@@ -172,13 +245,18 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -173,13 +246,18 @@ bus_dispatch_matches (BusTransaction *transaction,
}
else if (status & BUS_DEFERRED_MESSAGE_CHECK_RECEIVE)
{
@@ -1008,7 +998,7 @@ index 7353501b..e32c9263 100644
return BUS_RESULT_FALSE;
}
}
-@@ -195,7 +273,8 @@ bus_dispatch_matches (BusTransaction *transaction,
+@@ -196,7 +274,8 @@ bus_dispatch_matches (BusTransaction *transaction,
}
/* Dispatch the message */
@@ -1018,7 +1008,7 @@ index 7353501b..e32c9263 100644
{
BUS_SET_OOM (error);
return BUS_RESULT_FALSE;
-@@ -495,7 +574,7 @@ bus_dispatch (DBusConnection *connection,
+@@ -535,7 +614,7 @@ bus_dispatch (DBusConnection *connection,
* match rules.
*/
if (BUS_RESULT_LATER == bus_dispatch_matches (transaction, connection, addressed_recipient,
@@ -1028,7 +1018,7 @@ index 7353501b..e32c9263 100644
/* Roll back and dispatch the message once the policy result is available */
bus_transaction_cancel_and_free (transaction);
diff --git a/bus/dispatch.h b/bus/dispatch.h
-index afba6a24..f6102e80 100644
+index afba6a2..f6102e8 100644
--- a/bus/dispatch.h
+++ b/bus/dispatch.h
@@ -29,10 +29,11 @@
@@ -1049,11 +1039,11 @@ index afba6a24..f6102e80 100644
#endif /* BUS_DISPATCH_H */
diff --git a/bus/driver.c b/bus/driver.c
-index a5823d4d..5acdd62a 100644
+index f414f64..d89a658 100644
--- a/bus/driver.c
+++ b/bus/driver.c
-@@ -261,7 +261,7 @@ bus_driver_send_service_owner_changed (const char *service_name,
- if (!bus_transaction_capture (transaction, NULL, message))
+@@ -254,7 +254,7 @@ bus_driver_send_service_owner_changed (const char *service_name,
+ if (!bus_transaction_capture (transaction, NULL, NULL, message))
goto oom;
- res = bus_dispatch_matches (transaction, NULL, NULL, message, error);
@@ -1062,10 +1052,10 @@ index a5823d4d..5acdd62a 100644
retval = TRUE;
else
diff --git a/bus/policy.c b/bus/policy.c
-index bcade176..47bd1a24 100644
+index 7ee1ce5..b1fab0d 100644
--- a/bus/policy.c
+++ b/bus/policy.c
-@@ -1071,6 +1071,9 @@ bus_client_policy_check_can_send (DBusConnection *sender,
+@@ -1121,6 +1121,9 @@ bus_client_policy_check_can_send (DBusConnection *sender,
result = bus_check_privilege(check, message, sender, addressed_recipient, receiver,
privilege, BUS_DEFERRED_MESSAGE_CHECK_SEND, deferred_message);
@@ -1075,7 +1065,7 @@ index bcade176..47bd1a24 100644
}
else
privilege = NULL;
-@@ -1305,6 +1308,9 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1370,6 +1373,9 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
result = bus_check_privilege(check, message, sender, addressed_recipient, proposed_recipient,
privilege, BUS_DEFERRED_MESSAGE_CHECK_RECEIVE, deferred_message);
@@ -1085,6 +1075,3 @@ index bcade176..47bd1a24 100644
}
else
privilege = NULL;
---
-2.14.3
-
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch
index 1086f5b12..bde785241 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch
@@ -19,24 +19,16 @@ Change-Id: I4c2cbd4585e41fccd8a30f825a8f0d342ab56755
Cherry-picked from 35ef89cd6777ea2430077fc621d21bd01df92349 by Jose.bollo
+Updated for dbus 1.12.10 by Scott Murray.
+
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- bus/dispatch.c | 11 ++-
- bus/driver.c | 259 ++++++++++++++++++++++++++++++---------------------------
- bus/driver.h | 2 +-
- bus/policy.c | 51 +++++++++---
- bus/policy.h | 6 +-
- bus/services.c | 26 ++++--
- bus/services.h | 3 +-
- bus/stats.c | 28 +++----
- bus/stats.h | 6 +-
- 9 files changed, 229 insertions(+), 163 deletions(-)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/bus/dispatch.c b/bus/dispatch.c
-index e32c9263..4d57c556 100644
+index 1bdcbf0..625add5 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
-@@ -513,8 +513,17 @@ bus_dispatch (DBusConnection *connection,
+@@ -516,8 +516,17 @@ bus_dispatch (DBusConnection *connection,
}
_dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS);
@@ -56,10 +48,10 @@ index e32c9263..4d57c556 100644
else if (!bus_connection_is_active (connection)) /* clients must talk to bus driver first */
{
diff --git a/bus/driver.c b/bus/driver.c
-index 5acdd62a..bc4ce0b5 100644
+index d89a658..5ee60cb 100644
--- a/bus/driver.c
+++ b/bus/driver.c
-@@ -427,7 +427,7 @@ create_unique_client_name (BusRegistry *registry,
+@@ -420,7 +420,7 @@ create_unique_client_name (BusRegistry *registry,
return TRUE;
}
@@ -68,7 +60,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_hello (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -435,7 +435,7 @@ bus_driver_handle_hello (DBusConnection *connection,
+@@ -428,7 +428,7 @@ bus_driver_handle_hello (DBusConnection *connection,
{
DBusString unique_name;
BusService *service;
@@ -76,8 +68,8 @@ index 5acdd62a..bc4ce0b5 100644
+ BusResult retval;
BusRegistry *registry;
BusConnections *connections;
-
-@@ -446,7 +446,7 @@ bus_driver_handle_hello (DBusConnection *connection,
+ DBusError tmp_error;
+@@ -442,7 +442,7 @@ bus_driver_handle_hello (DBusConnection *connection,
/* We already handled an Hello message for this connection. */
dbus_set_error (error, DBUS_ERROR_FAILED,
"Already handled an Hello message");
@@ -86,10 +78,10 @@ index 5acdd62a..bc4ce0b5 100644
}
/* Note that when these limits are exceeded we don't disconnect the
-@@ -460,16 +460,16 @@ bus_driver_handle_hello (DBusConnection *connection,
- error))
- {
- _DBUS_ASSERT_ERROR_IS_SET (error);
+@@ -464,16 +464,16 @@ bus_driver_handle_hello (DBusConnection *connection,
+ bus_context_log (context, DBUS_SYSTEM_LOG_WARNING, "%s (%s=%d)",
+ tmp_error.message, limit_name, limit);
+ dbus_move_error (&tmp_error, error);
- return FALSE;
+ return BUS_RESULT_FALSE;
}
@@ -106,7 +98,7 @@ index 5acdd62a..bc4ce0b5 100644
registry = bus_connection_get_registry (connection);
-@@ -502,7 +502,7 @@ bus_driver_handle_hello (DBusConnection *connection,
+@@ -506,7 +506,7 @@ bus_driver_handle_hello (DBusConnection *connection,
goto out_0;
_dbus_assert (bus_connection_is_active (connection));
@@ -115,7 +107,7 @@ index 5acdd62a..bc4ce0b5 100644
out_0:
_dbus_string_free (&unique_name);
-@@ -554,7 +554,7 @@ bus_driver_send_welcome_message (DBusConnection *connection,
+@@ -558,7 +558,7 @@ bus_driver_send_welcome_message (DBusConnection *connection,
}
}
@@ -124,7 +116,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_list_services (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -576,14 +576,14 @@ bus_driver_handle_list_services (DBusConnection *connection,
+@@ -580,14 +580,14 @@ bus_driver_handle_list_services (DBusConnection *connection,
if (reply == NULL)
{
BUS_SET_OOM (error);
@@ -141,7 +133,7 @@ index 5acdd62a..bc4ce0b5 100644
}
dbus_message_iter_init_append (reply, &iter);
-@@ -595,7 +595,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
+@@ -599,7 +599,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -150,7 +142,7 @@ index 5acdd62a..bc4ce0b5 100644
}
{
-@@ -607,7 +607,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
+@@ -611,7 +611,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -159,7 +151,7 @@ index 5acdd62a..bc4ce0b5 100644
}
}
-@@ -620,7 +620,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
+@@ -624,7 +624,7 @@ bus_driver_handle_list_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -168,7 +160,7 @@ index 5acdd62a..bc4ce0b5 100644
}
++i;
}
-@@ -631,23 +631,23 @@ bus_driver_handle_list_services (DBusConnection *connection,
+@@ -635,23 +635,23 @@ bus_driver_handle_list_services (DBusConnection *connection,
{
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -196,7 +188,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_list_activatable_services (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -669,14 +669,14 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
+@@ -673,14 +673,14 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
if (reply == NULL)
{
BUS_SET_OOM (error);
@@ -213,7 +205,7 @@ index 5acdd62a..bc4ce0b5 100644
}
dbus_message_iter_init_append (reply, &iter);
-@@ -688,7 +688,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
+@@ -692,7 +692,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -222,7 +214,7 @@ index 5acdd62a..bc4ce0b5 100644
}
{
-@@ -700,7 +700,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
+@@ -704,7 +704,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -231,7 +223,7 @@ index 5acdd62a..bc4ce0b5 100644
}
}
-@@ -713,7 +713,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
+@@ -717,7 +717,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
dbus_free_string_array (services);
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -240,7 +232,7 @@ index 5acdd62a..bc4ce0b5 100644
}
++i;
}
-@@ -724,23 +724,23 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
+@@ -728,23 +728,23 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection,
{
dbus_message_unref (reply);
BUS_SET_OOM (error);
@@ -268,7 +260,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_acquire_service (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -751,7 +751,8 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
+@@ -755,7 +755,8 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
const char *name;
dbus_uint32_t service_reply;
dbus_uint32_t flags;
@@ -278,7 +270,7 @@ index 5acdd62a..bc4ce0b5 100644
BusRegistry *registry;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -762,20 +763,24 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
+@@ -766,20 +767,24 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_UINT32, &flags,
DBUS_TYPE_INVALID))
@@ -310,7 +302,7 @@ index 5acdd62a..bc4ce0b5 100644
reply = dbus_message_new_method_return (message);
if (reply == NULL)
-@@ -796,7 +801,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
+@@ -800,7 +805,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
goto out;
}
@@ -319,7 +311,7 @@ index 5acdd62a..bc4ce0b5 100644
out:
if (reply)
-@@ -804,7 +809,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
+@@ -808,7 +813,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection,
return retval;
}
@@ -328,7 +320,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_release_service (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -814,7 +819,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
+@@ -818,7 +823,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
DBusString service_name;
const char *name;
dbus_uint32_t service_reply;
@@ -337,7 +329,7 @@ index 5acdd62a..bc4ce0b5 100644
BusRegistry *registry;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -824,11 +829,11 @@ bus_driver_handle_release_service (DBusConnection *connection,
+@@ -828,11 +833,11 @@ bus_driver_handle_release_service (DBusConnection *connection,
if (!dbus_message_get_args (message, error,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID))
@@ -351,7 +343,7 @@ index 5acdd62a..bc4ce0b5 100644
reply = NULL;
_dbus_string_init_const (&service_name, name);
-@@ -857,7 +862,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
+@@ -861,7 +866,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
goto out;
}
@@ -360,7 +352,7 @@ index 5acdd62a..bc4ce0b5 100644
out:
if (reply)
-@@ -865,7 +870,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
+@@ -869,7 +874,7 @@ bus_driver_handle_release_service (DBusConnection *connection,
return retval;
}
@@ -369,7 +361,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_service_exists (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -876,7 +881,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
+@@ -880,7 +885,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
BusService *service;
dbus_bool_t service_exists;
const char *name;
@@ -378,7 +370,7 @@ index 5acdd62a..bc4ce0b5 100644
BusRegistry *registry;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -886,9 +891,9 @@ bus_driver_handle_service_exists (DBusConnection *connection,
+@@ -890,9 +895,9 @@ bus_driver_handle_service_exists (DBusConnection *connection,
if (!dbus_message_get_args (message, error,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID))
@@ -390,7 +382,7 @@ index 5acdd62a..bc4ce0b5 100644
if (strcmp (name, DBUS_SERVICE_DBUS) == 0)
{
-@@ -922,7 +927,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
+@@ -926,7 +931,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
goto out;
}
@@ -399,7 +391,7 @@ index 5acdd62a..bc4ce0b5 100644
out:
if (reply)
-@@ -931,7 +936,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
+@@ -935,7 +940,7 @@ bus_driver_handle_service_exists (DBusConnection *connection,
return retval;
}
@@ -408,7 +400,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_activate_service (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -939,7 +944,7 @@ bus_driver_handle_activate_service (DBusConnection *connection,
+@@ -943,7 +948,7 @@ bus_driver_handle_activate_service (DBusConnection *connection,
{
dbus_uint32_t flags;
const char *name;
@@ -417,7 +409,7 @@ index 5acdd62a..bc4ce0b5 100644
BusActivation *activation;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -953,10 +958,10 @@ bus_driver_handle_activate_service (DBusConnection *connection,
+@@ -957,10 +962,10 @@ bus_driver_handle_activate_service (DBusConnection *connection,
{
_DBUS_ASSERT_ERROR_IS_SET (error);
_dbus_verbose ("No memory to get arguments to StartServiceByName\n");
@@ -430,7 +422,7 @@ index 5acdd62a..bc4ce0b5 100644
if (!bus_activation_activate_service (activation, connection, transaction, FALSE,
message, name, error))
-@@ -966,7 +971,7 @@ bus_driver_handle_activate_service (DBusConnection *connection,
+@@ -970,7 +975,7 @@ bus_driver_handle_activate_service (DBusConnection *connection,
goto out;
}
@@ -439,7 +431,7 @@ index 5acdd62a..bc4ce0b5 100644
out:
return retval;
-@@ -1068,13 +1073,13 @@ bus_driver_send_or_activate (BusTransaction *transaction,
+@@ -1072,13 +1077,13 @@ bus_driver_send_or_activate (BusTransaction *transaction,
return TRUE;
}
@@ -455,25 +447,7 @@ index 5acdd62a..bc4ce0b5 100644
BusActivation *activation;
BusContext *context;
DBusMessageIter iter;
-@@ -1090,7 +1095,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
- if (!bus_driver_check_message_is_for_us (message, error))
-- return FALSE;
-+ return BUS_RESULT_FALSE;
-
- #ifdef DBUS_UNIX
- {
@@ -1100,7 +1105,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
- */
- if (!bus_driver_check_caller_is_privileged (connection, transaction,
- message, error))
-- return FALSE;
-+ return BUS_RESULT_FALSE;
- }
- #endif
-
-@@ -1111,7 +1116,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"Cannot change activation environment "
"on a system bus.");
@@ -482,7 +456,7 @@ index 5acdd62a..bc4ce0b5 100644
}
activation = bus_connection_get_activation (connection);
-@@ -1125,7 +1130,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
+@@ -1114,7 +1119,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
dbus_message_iter_recurse (&iter, &dict_iter);
@@ -491,8 +465,8 @@ index 5acdd62a..bc4ce0b5 100644
systemd_message = NULL;
/* Then loop through the sent dictionary, add the location of
-@@ -1291,7 +1296,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
- message, error))
+@@ -1279,7 +1284,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
+ if (!bus_driver_send_ack_reply (connection, transaction, message, error))
goto out;
- retval = TRUE;
@@ -500,7 +474,7 @@ index 5acdd62a..bc4ce0b5 100644
out:
if (systemd_message != NULL)
-@@ -1301,7 +1306,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
+@@ -1289,7 +1294,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
return retval;
}
@@ -509,7 +483,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_add_match (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1367,16 +1372,16 @@ bus_driver_handle_add_match (DBusConnection *connection,
+@@ -1371,16 +1376,16 @@ bus_driver_handle_add_match (DBusConnection *connection,
bus_match_rule_unref (rule);
@@ -529,7 +503,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_remove_match (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1420,16 +1425,16 @@ bus_driver_handle_remove_match (DBusConnection *connection,
+@@ -1423,16 +1428,16 @@ bus_driver_handle_remove_match (DBusConnection *connection,
bus_match_rule_unref (rule);
@@ -549,7 +523,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_service_owner (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1499,7 +1504,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection,
+@@ -1502,7 +1507,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection,
dbus_message_unref (reply);
@@ -558,7 +532,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1508,10 +1513,10 @@ bus_driver_handle_get_service_owner (DBusConnection *connection,
+@@ -1511,10 +1516,10 @@ bus_driver_handle_get_service_owner (DBusConnection *connection,
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -571,7 +545,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_list_queued_owners (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1602,7 +1607,7 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
+@@ -1606,7 +1611,7 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
dbus_message_unref (reply);
@@ -580,7 +554,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1615,10 +1620,10 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
+@@ -1619,10 +1624,10 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
if (base_names)
_dbus_list_clear (&base_names);
@@ -593,7 +567,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_connection_unix_user (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1673,7 +1678,7 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection,
+@@ -1679,7 +1684,7 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection,
dbus_message_unref (reply);
@@ -602,7 +576,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1682,10 +1687,10 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection,
+@@ -1688,10 +1693,10 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection,
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -615,7 +589,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1740,7 +1745,7 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection,
+@@ -1748,7 +1753,7 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection,
dbus_message_unref (reply);
@@ -624,7 +598,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1749,10 +1754,10 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection,
+@@ -1757,10 +1762,10 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection,
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -637,7 +611,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1803,7 +1808,7 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
+@@ -1811,7 +1816,7 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
dbus_message_unref (reply);
@@ -646,7 +620,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1812,10 +1817,10 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
+@@ -1820,10 +1825,10 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -659,7 +633,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_connection_selinux_security_context (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1863,7 +1868,7 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne
+@@ -1872,7 +1877,7 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne
dbus_message_unref (reply);
@@ -668,7 +642,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -1872,10 +1877,10 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne
+@@ -1881,10 +1886,10 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -681,7 +655,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_connection_credentials (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -1987,7 +1992,7 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection,
+@@ -1998,7 +2003,7 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection,
dbus_message_unref (reply);
@@ -690,7 +664,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -2001,10 +2006,10 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection,
+@@ -2012,10 +2017,10 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection,
dbus_message_unref (reply);
}
@@ -703,7 +677,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_reload_config (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2029,7 +2034,7 @@ bus_driver_handle_reload_config (DBusConnection *connection,
+@@ -2040,7 +2045,7 @@ bus_driver_handle_reload_config (DBusConnection *connection,
goto oom;
dbus_message_unref (reply);
@@ -712,7 +686,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -2038,11 +2043,11 @@ bus_driver_handle_reload_config (DBusConnection *connection,
+@@ -2049,11 +2054,11 @@ bus_driver_handle_reload_config (DBusConnection *connection,
_DBUS_ASSERT_ERROR_IS_SET (error);
if (reply)
dbus_message_unref (reply);
@@ -726,7 +700,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_enable_verbose (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2062,7 +2067,7 @@ bus_driver_handle_enable_verbose (DBusConnection *connection,
+@@ -2073,7 +2078,7 @@ bus_driver_handle_enable_verbose (DBusConnection *connection,
_dbus_set_verbose(TRUE);
dbus_message_unref (reply);
@@ -735,7 +709,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -2071,10 +2076,10 @@ bus_driver_handle_enable_verbose (DBusConnection *connection,
+@@ -2082,10 +2087,10 @@ bus_driver_handle_enable_verbose (DBusConnection *connection,
if (reply)
dbus_message_unref (reply);
@@ -748,7 +722,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_disable_verbose (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2094,7 +2099,7 @@ bus_driver_handle_disable_verbose (DBusConnection *connection,
+@@ -2105,7 +2110,7 @@ bus_driver_handle_disable_verbose (DBusConnection *connection,
_dbus_set_verbose(FALSE);
dbus_message_unref (reply);
@@ -757,7 +731,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -2103,11 +2108,11 @@ bus_driver_handle_disable_verbose (DBusConnection *connection,
+@@ -2114,11 +2119,11 @@ bus_driver_handle_disable_verbose (DBusConnection *connection,
if (reply)
dbus_message_unref (reply);
@@ -771,7 +745,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_get_id (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2123,7 +2128,7 @@ bus_driver_handle_get_id (DBusConnection *connection,
+@@ -2134,7 +2139,7 @@ bus_driver_handle_get_id (DBusConnection *connection,
if (!_dbus_string_init (&uuid))
{
BUS_SET_OOM (error);
@@ -780,7 +754,7 @@ index 5acdd62a..bc4ce0b5 100644
}
reply = NULL;
-@@ -2149,7 +2154,7 @@ bus_driver_handle_get_id (DBusConnection *connection,
+@@ -2160,7 +2165,7 @@ bus_driver_handle_get_id (DBusConnection *connection,
_dbus_string_free (&uuid);
dbus_message_unref (reply);
@@ -789,7 +763,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -2159,10 +2164,10 @@ bus_driver_handle_get_id (DBusConnection *connection,
+@@ -2170,10 +2175,10 @@ bus_driver_handle_get_id (DBusConnection *connection,
if (reply)
dbus_message_unref (reply);
_dbus_string_free (&uuid);
@@ -802,7 +776,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_become_monitor (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2178,7 +2183,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
+@@ -2189,7 +2194,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
int i;
int n_match_rules;
dbus_uint32_t flags;
@@ -811,7 +785,7 @@ index 5acdd62a..bc4ce0b5 100644
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -2258,10 +2263,10 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
+@@ -2262,10 +2267,10 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
if (!bus_connection_be_monitor (connection, transaction, &rules, error))
goto out;
@@ -824,7 +798,7 @@ index 5acdd62a..bc4ce0b5 100644
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
else
_DBUS_ASSERT_ERROR_IS_SET (error);
-@@ -2282,10 +2287,10 @@ typedef struct
+@@ -2389,10 +2394,10 @@ typedef struct
const char *name;
const char *in_args;
const char *out_args;
@@ -836,19 +810,19 @@ index 5acdd62a..bc4ce0b5 100644
+ BusTransaction *transaction,
+ DBusMessage *message,
+ DBusError *error);
+ MethodFlags flags;
} MessageHandler;
- /* For speed it might be useful to sort this in order of
-@@ -2370,7 +2375,7 @@ static const MessageHandler dbus_message_handlers[] = {
- { NULL, NULL, NULL, NULL }
+@@ -2511,7 +2516,7 @@ static const PropertyHandler dbus_property_handlers[] = {
+ { NULL, NULL, NULL }
};
-static dbus_bool_t bus_driver_handle_introspect (DBusConnection *,
+static BusResult bus_driver_handle_introspect (DBusConnection *,
BusTransaction *, DBusMessage *, DBusError *);
- static const MessageHandler introspectable_message_handlers[] = {
-@@ -2514,7 +2519,7 @@ bus_driver_generate_introspect_string (DBusString *xml)
+ static const MessageHandler properties_message_handlers[] = {
+@@ -2763,7 +2768,7 @@ bus_driver_generate_introspect_string (DBusString *xml,
return TRUE;
}
@@ -857,7 +831,7 @@ index 5acdd62a..bc4ce0b5 100644
bus_driver_handle_introspect (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2534,13 +2539,13 @@ bus_driver_handle_introspect (DBusConnection *connection,
+@@ -2784,13 +2789,13 @@ bus_driver_handle_introspect (DBusConnection *connection,
DBUS_TYPE_INVALID))
{
_DBUS_ASSERT_ERROR_IS_SET (error);
@@ -872,8 +846,8 @@ index 5acdd62a..bc4ce0b5 100644
+ return BUS_RESULT_FALSE;
}
- if (!bus_driver_generate_introspect_string (&xml))
-@@ -2563,7 +2568,7 @@ bus_driver_handle_introspect (DBusConnection *connection,
+ is_canonical_path = dbus_message_has_path (message, DBUS_PATH_DBUS);
+@@ -2815,7 +2820,7 @@ bus_driver_handle_introspect (DBusConnection *connection,
dbus_message_unref (reply);
_dbus_string_free (&xml);
@@ -882,7 +856,7 @@ index 5acdd62a..bc4ce0b5 100644
oom:
BUS_SET_OOM (error);
-@@ -2573,7 +2578,7 @@ bus_driver_handle_introspect (DBusConnection *connection,
+@@ -2825,10 +2830,10 @@ bus_driver_handle_introspect (DBusConnection *connection,
_dbus_string_free (&xml);
@@ -890,25 +864,20 @@ index 5acdd62a..bc4ce0b5 100644
+ return BUS_RESULT_FALSE;
}
- /*
-@@ -2608,7 +2613,7 @@ bus_driver_check_message_is_for_us (DBusMessage *message,
- return TRUE;
- }
-
-dbus_bool_t
+BusResult
bus_driver_handle_message (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -2618,6 +2623,7 @@ bus_driver_handle_message (DBusConnection *connection,
- const InterfaceHandler *ih;
+@@ -2839,6 +2844,7 @@ bus_driver_handle_message (DBusConnection *connection,
const MessageHandler *mh;
dbus_bool_t found_interface = FALSE;
+ dbus_bool_t is_canonical_path;
+ BusResult res;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
-@@ -2633,7 +2639,7 @@ bus_driver_handle_message (DBusConnection *connection,
+@@ -2854,7 +2860,7 @@ bus_driver_handle_message (DBusConnection *connection,
transaction,
message,
error))
@@ -917,7 +886,7 @@ index 5acdd62a..bc4ce0b5 100644
context = bus_connection_get_context (connection);
systemd = bus_driver_get_owner_of_name (connection,
-@@ -2650,7 +2656,7 @@ bus_driver_handle_message (DBusConnection *connection,
+@@ -2871,7 +2877,7 @@ bus_driver_handle_message (DBusConnection *connection,
attacker ? attacker : "(unauthenticated)",
bus_connection_get_loginfo (connection));
/* ignore it */
@@ -926,7 +895,7 @@ index 5acdd62a..bc4ce0b5 100644
}
if (!bus_context_get_systemd_activation (context))
-@@ -2658,16 +2664,16 @@ bus_driver_handle_message (DBusConnection *connection,
+@@ -2879,16 +2885,16 @@ bus_driver_handle_message (DBusConnection *connection,
bus_context_log (context, DBUS_SYSTEM_LOG_WARNING,
"Ignoring unexpected ActivationFailure message "
"while not using systemd activation");
@@ -946,7 +915,7 @@ index 5acdd62a..bc4ce0b5 100644
}
/* may be NULL, which means "any interface will do" */
-@@ -2709,20 +2715,27 @@ bus_driver_handle_message (DBusConnection *connection,
+@@ -2953,20 +2959,27 @@ bus_driver_handle_message (DBusConnection *connection,
name, dbus_message_get_signature (message),
mh->in_args);
_DBUS_ASSERT_ERROR_IS_SET (error);
@@ -979,7 +948,7 @@ index 5acdd62a..bc4ce0b5 100644
}
}
}
-@@ -2734,7 +2747,7 @@ bus_driver_handle_message (DBusConnection *connection,
+@@ -2978,7 +2991,7 @@ bus_driver_handle_message (DBusConnection *connection,
"%s does not understand message %s",
DBUS_SERVICE_DBUS, name);
@@ -989,11 +958,11 @@ index 5acdd62a..bc4ce0b5 100644
void
diff --git a/bus/driver.h b/bus/driver.h
-index 201709c4..3ff4ff15 100644
+index ac1289d..183c28b 100644
--- a/bus/driver.h
+++ b/bus/driver.h
-@@ -28,7 +28,7 @@
- #include "connection.h"
+@@ -35,7 +35,7 @@ typedef enum
+ } BusDriverFound;
void bus_driver_remove_connection (DBusConnection *connection);
-dbus_bool_t bus_driver_handle_message (DBusConnection *connection,
@@ -1002,10 +971,10 @@ index 201709c4..3ff4ff15 100644
DBusMessage *message,
DBusError *error);
diff --git a/bus/policy.c b/bus/policy.c
-index 47bd1a24..7244a46f 100644
+index b1fab0d..27b66d1 100644
--- a/bus/policy.c
+++ b/bus/policy.c
-@@ -1323,18 +1323,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
+@@ -1388,18 +1388,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
@@ -1031,7 +1000,7 @@ index 47bd1a24..7244a46f 100644
link = _dbus_list_get_first_link (&rules);
while (link != NULL)
{
-@@ -1370,17 +1373,45 @@ bus_rules_check_can_own (DBusList *rules,
+@@ -1435,17 +1438,45 @@ bus_rules_check_can_own (DBusList *rules,
}
/* Use this rule */
@@ -1082,7 +1051,7 @@ index 47bd1a24..7244a46f 100644
}
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
-@@ -1388,7 +1419,7 @@ dbus_bool_t
+@@ -1453,7 +1484,7 @@ dbus_bool_t
bus_policy_check_can_own (BusPolicy *policy,
const DBusString *service_name)
{
@@ -1092,10 +1061,10 @@ index 47bd1a24..7244a46f 100644
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
diff --git a/bus/policy.h b/bus/policy.h
-index e9f193af..1f234310 100644
+index f306a3c..39d7cc5 100644
--- a/bus/policy.h
+++ b/bus/policy.h
-@@ -170,8 +170,10 @@ BusResult bus_client_policy_check_can_receive (BusClientPolicy *polic
+@@ -182,8 +182,10 @@ BusResult bus_client_policy_check_can_receive (BusClientPolicy *polic
dbus_int32_t *toggles,
const char **privilege_param,
BusDeferredMessage **deferred_message);
@@ -1109,10 +1078,10 @@ index e9f193af..1f234310 100644
BusPolicyRule *rule);
void bus_client_policy_optimize (BusClientPolicy *policy);
diff --git a/bus/services.c b/bus/services.c
-index 6a4c8848..fcc2d261 100644
+index 127edda..586af18 100644
--- a/bus/services.c
+++ b/bus/services.c
-@@ -376,24 +376,26 @@ bus_registry_list_services (BusRegistry *registry,
+@@ -376,16 +376,17 @@ bus_registry_list_services (BusRegistry *registry,
return FALSE;
}
@@ -1132,17 +1101,18 @@ index 6a4c8848..fcc2d261 100644
DBusConnection *old_owner_conn;
BusClientPolicy *policy;
BusService *service;
- BusActivation *activation;
+@@ -393,8 +394,9 @@ bus_registry_acquire_service (BusRegistry *registry,
BusSELinuxID *sid;
BusOwner *primary_owner;
+ int limit;
+ BusResult res;
-
+
- retval = FALSE;
+ retval = BUS_RESULT_FALSE;
if (!_dbus_validate_bus_name (service_name, 0,
_dbus_string_get_length (service_name)))
-@@ -466,7 +468,8 @@ bus_registry_acquire_service (BusRegistry *registry,
+@@ -467,7 +469,8 @@ bus_registry_acquire_service (BusRegistry *registry,
_dbus_string_get_const_data (service_name), error))
goto out;
@@ -1152,7 +1122,7 @@ index 6a4c8848..fcc2d261 100644
{
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"Connection \"%s\" is not allowed to own the service \"%s\" due "
-@@ -477,6 +480,11 @@ bus_registry_acquire_service (BusRegistry *registry,
+@@ -478,6 +481,11 @@ bus_registry_acquire_service (BusRegistry *registry,
_dbus_string_get_const_data (service_name));
goto out;
}
@@ -1162,9 +1132,9 @@ index 6a4c8848..fcc2d261 100644
+ goto out;
+ }
- if (bus_connection_get_n_services_owned (connection) >=
- bus_context_get_max_services_per_connection (registry->context))
-@@ -593,11 +601,13 @@ bus_registry_acquire_service (BusRegistry *registry,
+ limit = bus_context_get_max_services_per_connection (registry->context);
+
+@@ -603,11 +611,13 @@ bus_registry_acquire_service (BusRegistry *registry,
}
activation = bus_context_get_activation (registry->context);
@@ -1183,7 +1153,7 @@ index 6a4c8848..fcc2d261 100644
out:
return retval;
diff --git a/bus/services.h b/bus/services.h
-index 056dd9fa..3df3dd7d 100644
+index 056dd9f..3df3dd7 100644
--- a/bus/services.h
+++ b/bus/services.h
@@ -50,8 +50,9 @@ void bus_registry_foreach (BusRegistry *registry
@@ -1198,7 +1168,7 @@ index 056dd9fa..3df3dd7d 100644
dbus_uint32_t flags,
dbus_uint32_t *result,
diff --git a/bus/stats.c b/bus/stats.c
-index dace0e29..aab0e5c9 100644
+index 1582255..4ba72d6 100644
--- a/bus/stats.c
+++ b/bus/stats.c
@@ -36,7 +36,7 @@
@@ -1210,16 +1180,7 @@ index dace0e29..aab0e5c9 100644
bus_stats_handle_get_stats (DBusConnection *connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -52,7 +52,7 @@ bus_stats_handle_get_stats (DBusConnection *connection,
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
- if (!bus_driver_check_message_is_for_us (message, error))
-- return FALSE;
-+ return BUS_RESULT_FALSE;
-
- context = bus_transaction_get_context (transaction);
- connections = bus_context_get_connections (context);
-@@ -107,17 +107,17 @@ bus_stats_handle_get_stats (DBusConnection *connection,
+@@ -104,17 +104,17 @@ bus_stats_handle_get_stats (DBusConnection *connection,
goto oom;
dbus_message_unref (reply);
@@ -1240,33 +1201,7 @@ index dace0e29..aab0e5c9 100644
bus_stats_handle_get_connection_stats (DBusConnection *caller_connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -137,14 +137,14 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection,
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
- if (!bus_driver_check_message_is_for_us (message, error))
-- return FALSE;
-+ return BUS_RESULT_FALSE;
-
- registry = bus_connection_get_registry (caller_connection);
-
- if (! dbus_message_get_args (message, error,
- DBUS_TYPE_STRING, &bus_name,
- DBUS_TYPE_INVALID))
-- return FALSE;
-+ return BUS_RESULT_FALSE;
-
- _dbus_string_init_const (&bus_name_str, bus_name);
- service = bus_registry_lookup (registry, &bus_name_str);
-@@ -153,7 +153,7 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection,
- {
- dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER,
- "Bus name '%s' has no owner", bus_name);
-- return FALSE;
-+ return BUS_RESULT_FALSE;
- }
-
- stats_connection = bus_service_get_primary_owners_connection (service);
-@@ -215,18 +215,18 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection,
+@@ -209,7 +209,7 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection,
goto oom;
dbus_message_unref (reply);
@@ -1274,10 +1209,11 @@ index dace0e29..aab0e5c9 100644
+ return BUS_RESULT_TRUE;
oom:
+ BUS_SET_OOM (error);
+@@ -218,11 +218,11 @@ failed:
if (reply != NULL)
dbus_message_unref (reply);
- BUS_SET_OOM (error);
- return FALSE;
+ return BUS_RESULT_FALSE;
}
@@ -1288,7 +1224,7 @@ index dace0e29..aab0e5c9 100644
bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection,
BusTransaction *transaction,
DBusMessage *message,
-@@ -250,7 +250,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection,
+@@ -246,7 +246,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection,
matchmaker = bus_context_get_matchmaker (context);
if (!bus_registry_list_services (registry, &services, &services_len))
@@ -1297,7 +1233,7 @@ index dace0e29..aab0e5c9 100644
reply = dbus_message_new_method_return (message);
if (reply == NULL)
-@@ -329,7 +329,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection,
+@@ -325,7 +325,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection,
dbus_message_unref (reply);
dbus_free_string_array (services);
@@ -1306,7 +1242,7 @@ index dace0e29..aab0e5c9 100644
oom:
if (reply != NULL)
-@@ -338,7 +338,7 @@ oom:
+@@ -334,7 +334,7 @@ oom:
dbus_free_string_array (services);
BUS_SET_OOM (error);
@@ -1316,7 +1252,7 @@ index dace0e29..aab0e5c9 100644
#endif
diff --git a/bus/stats.h b/bus/stats.h
-index dcb022c4..683fa175 100644
+index dcb022c..683fa17 100644
--- a/bus/stats.h
+++ b/bus/stats.h
@@ -25,17 +25,17 @@
@@ -1340,6 +1276,3 @@ index dcb022c4..683fa175 100644
BusTransaction *transaction,
DBusMessage *message,
DBusError *error);
---
-2.14.3
-
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch
index d30b2dbf8..6cc7c19c4 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch
@@ -26,14 +26,14 @@ Change-Id: Ifb4a160bf6e0638404e0295a2e4fa3077efd881c
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
Cherry picked from e8610297cf7031e94eb314a2e8c11246f4405403 by Jose Bollo
+
+Updated for dbus 1.12.10 by Scott Murray.
+
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
----
- bus/session.conf.in | 32 ++++++++++++++++++++++++++------
- bus/system.conf.in | 19 +++++++++++++++----
- 2 files changed, 41 insertions(+), 10 deletions(-)
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/bus/session.conf.in b/bus/session.conf.in
-index affa7f1d..157dfb4d 100644
+index affa7f1..157dfb4 100644
--- a/bus/session.conf.in
+++ b/bus/session.conf.in
@@ -27,12 +27,32 @@
@@ -76,10 +76,10 @@ index affa7f1d..157dfb4d 100644
<!-- Include legacy configuration location -->
diff --git a/bus/system.conf.in b/bus/system.conf.in
-index 014f67ee..ebbd468a 100644
+index f139b55..19d0c04 100644
--- a/bus/system.conf.in
+++ b/bus/system.conf.in
-@@ -50,23 +50,34 @@
+@@ -50,17 +50,20 @@
<deny own="*"/>
<deny send_type="method_call"/>
@@ -104,9 +104,10 @@ index 014f67ee..ebbd468a 100644
<!-- Allow anyone to talk to the message bus -->
<allow send_destination="org.freedesktop.DBus"
- send_interface="org.freedesktop.DBus" />
- <allow send_destination="org.freedesktop.DBus"
+@@ -69,6 +72,14 @@
send_interface="org.freedesktop.DBus.Introspectable"/>
+ <allow send_destination="org.freedesktop.DBus"
+ send_interface="org.freedesktop.DBus.Properties"/>
+ <!-- If there is a need specific bus services could be protected by Cynara as well.
+ However, this can lead to deadlock during the boot process when such check is made and
+ Cynara is not yet activated (systemd calls protected method synchronously,
@@ -118,6 +119,3 @@ index 014f67ee..ebbd468a 100644
<!-- But disallow some specific bus services -->
<deny send_destination="org.freedesktop.DBus"
send_interface="org.freedesktop.DBus"
---
-2.14.3
-
diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara_1.10.20.bb b/meta-security/recipes-core/dbus-cynara/dbus-cynara_1.12.10.bb
index a97148366..2b494becb 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus-cynara_1.10.20.bb
+++ b/meta-security/recipes-core/dbus-cynara/dbus-cynara_1.12.10.bb
@@ -1,4 +1,4 @@
-require ${COREBASE}/meta/recipes-core/dbus/dbus_1.10.20.bb
+require ${COREBASE}/meta/recipes-core/dbus/dbus_1.12.10.bb
FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-core/dbus/dbus:${THISDIR}/dbus-cynara:"
S = "${WORKDIR}/dbus-${PV}"
diff --git a/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend b/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend
index 78df8ec3c..2923c5c18 100644
--- a/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend
+++ b/meta-security/recipes-core/dbus-cynara/dbus_%.bbappend
@@ -1,4 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/dbus-cynara:"
+
SRC_URI_append = "\
file://0001-Integration-of-Cynara-asynchronous-security-checks.patch \
file://0002-Disable-message-dispatching-when-send-rule-result-is.patch \
diff --git a/meta-security/recipes-core/systemd/systemd_234.bbappend b/meta-security/recipes-core/systemd/systemd_239.bbappend
index 79753a2d6..789c05f83 100644
--- a/meta-security/recipes-core/systemd/systemd_234.bbappend
+++ b/meta-security/recipes-core/systemd/systemd_239.bbappend
@@ -1,16 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-##################################################################################
-# What follows is temporary.
-# This patch is still needed for systemd 234 but is normally upstreamed
-# and thus should be removed in later versions.
-##################################################################################
-SRC_URI_append_with-lsm-smack = "\
- file://0001-Switch-Smack-label-earlier.patch \
-"
-
# Ensures systemd runs with label "System"
-EXTRA_OECONF_append_with-lsm-smack = " --with-smack-run-label=System"
+EXTRA_OEMESON_append_with-lsm-smack = " -Dsmack-run-label=System"
##################################################################################
# Maintaining trivial, non-upstreamable configuration changes as patches
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs.inc b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs.inc
deleted file mode 100644
index 09e4ea5bb..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Ext2 Filesystem Utilities"
-DESCRIPTION = "The Ext2 Filesystem Utilities (e2fsprogs) contain all of the standard utilities for creating, \
-fixing, configuring , and debugging ext2 filesystems."
-HOMEPAGE = "http://e2fsprogs.sourceforge.net/"
-
-LICENSE = "GPLv2 & LGPLv2 & BSD & MIT"
-LICENSE_e2fsprogs-e2fsck = "GPLv2"
-LICENSE_e2fsprogs-mke2fs = "GPLv2"
-LICENSE_e2fsprogs-fsck = "GPLv2"
-LICENSE_e2fsprogs-tune2fs = "GPLv2"
-LICENSE_e2fsprogs-badblocks = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b48f21d765b875bd10400975d12c1ca2 \
- file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
- file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
- file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
- file://lib/uuid/COPYING;md5=58dcd8452651fc8b07d1f65ce07ca8af \
- file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
- file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
-SECTION = "base"
-DEPENDS = "util-linux"
-
-SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git"
-S = "${WORKDIR}/git"
-
-inherit autotools gettext texinfo pkgconfig multilib_header update-alternatives ptest
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
deleted file mode 100644
index c0bd7dbde..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ /dev/null
@@ -1,135 +0,0 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
-# acinclude.m4 so running aclocal doesn't blow them away.
-#
-# Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-# from http://autoconf-archive.cryp.to/ax_tls.html
-#
-# This was licensed under the GPL with the following exception:
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you make
-# and distribute a modified version of the Autoconf Macro, you may
-# extend this special exception to the GPL to apply to your modified
-# version as well.
-#
-AC_DEFUN([AX_TLS], [
- AC_MSG_CHECKING(for thread local storage (TLS) class)
- AC_CACHE_VAL(ac_cv_tls, [
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in
- none) ac_cv_tls=none ; break ;;
- *)
- AC_TRY_COMPILE(
- [#include <stdlib.h>
- static void
- foo(void) {
- static ] $ax_tls_keyword [ int bar;
- exit(1);
- }],
- [],
- [ac_cv_tls=$ax_tls_keyword ; break],
- ac_cv_tls=none
- )
- esac
- done
-])
-
- if test "$ac_cv_tls" != "none"; then
- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
- fi
- AC_MSG_RESULT($ac_cv_tls)
-])
-
-# ===========================================================================
-# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found, the
-# makefile variable `ifGNUmake' is set to the empty string, otherwise it
-# is set to "#". This is useful for including a special features in a
-# Makefile, which cannot be handled by other versions of make. The
-# variable _cv_gnu_make_command is set to the command to invoke GNU make
-# if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could do
-# something like this (note that GNU make always looks for GNUmakefile
-# first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make also
-# exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-#
-# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
-
-AC_DEFUN(
- [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- ifNotGNUmake='#' ;
- else
- ifGNUmake='#' ;
- ifNotGNUmake='' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
- AC_SUBST(ifNotGNUmake)
-] )
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
deleted file mode 100644
index 2a3aeff61..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index c1fe224..f5ac628 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
- INCLUDES="$INCLUDES -D_REENTRANT"
- fi
- AC_SUBST(INCLUDES)
--AM_MKINSTALLDIRS
-+MKINSTALLDIRS="mkdir -p"
-+AC_SUBST(MKINSTALLDIRS)
- dnl
- dnl Build CFLAGS
- dnl
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
deleted file mode 100644
index ef1ce5872..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff --git a/tests/Makefile.in b/tests/Makefile.in
-index 60cf655..ce220f1 100644
---- a/tests/Makefile.in
-+++ b/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
- @echo "#!/bin/sh" > test_one
- @echo "HTREE=y" >> test_one
- @echo "QUOTA=y" >> test_one
-- @echo "SRCDIR=@srcdir@" >> test_one
-+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_one
- @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
- @cat $(srcdir)/test_one.in >> test_one
- @chmod +x test_one
-@@ -26,7 +26,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
- test_script: test_one test_script.in Makefile mke2fs.conf
- @echo "Creating test_script..."
- @echo "#!/bin/sh" > test_script
-- @echo "SRCDIR=@srcdir@" >> test_script
-+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_script
- @cat $(srcdir)/test_script.in >> test_script
- @chmod +x test_script
-
-diff --git a/tests/test_config b/tests/test_config
-index 7f39157..c815a44 100644
---- a/tests/test_config
-+++ b/tests/test_config
-@@ -3,24 +3,24 @@
- #
-
- unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME PAGER
--FSCK="$USE_VALGRIND ../e2fsck/e2fsck"
--MKE2FS="$USE_VALGRIND ../misc/mke2fs"
--DUMPE2FS="$USE_VALGRIND ../misc/dumpe2fs"
--TUNE2FS="$USE_VALGRIND ../misc/tune2fs"
--CHATTR="$USE_VALGRIND../misc/chattr"
--LSATTR="$USE_VALGRIND ../misc/lsattr"
--E2IMAGE="$USE_VALGRIND ../misc/e2image"
--E2IMAGE_EXE="../misc/e2image"
--DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
--DEBUGFS_EXE="../debugfs/debugfs"
--TEST_BITS="../debugfs/debugfs"
--RESIZE2FS_EXE="../resize/resize2fs"
-+FSCK="$USE_VALGRIND e2fsck"
-+MKE2FS="$USE_VALGRIND mke2fs"
-+DUMPE2FS="$USE_VALGRIND dumpe2fs"
-+TUNE2FS="$USE_VALGRIND tune2fs"
-+CHATTR="$USE_VALGRIND chattr"
-+LSATTR="$USE_VALGRIND lsattr"
-+E2IMAGE="$USE_VALGRIND e2image"
-+E2IMAGE_EXE="/sbin/e2image"
-+DEBUGFS="$USE_VALGRIND debugfs"
-+DEBUGFS_EXE="/sbin/debugfs"
-+TEST_BITS="/sbin/debugfs"
-+RESIZE2FS_EXE="/sbin/resize2fs"
- RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
--E2UNDO_EXE="../misc/e2undo"
-+E2UNDO_EXE="/sbin/e2undo"
- E2UNDO="$USE_VALGRIND $E2UNDO_EXE"
--TEST_REL=../tests/progs/test_rel
--TEST_ICOUNT=../tests/progs/test_icount
--CRCSUM=../tests/progs/crcsum
-+TEST_REL=./progs/test_rel
-+TEST_ICOUNT=./progs/test_icount
-+CRCSUM=./progs/crcsum
- CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
- LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
- DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
deleted file mode 100644
index 830e9d57a..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When executing a script don't echo every command, as we do this for entire
-filesystems at rootfs time.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
-index 5590295..ac57292 100644
---- a/debugfs/debugfs.c
-+++ b/debugfs/debugfs.c
-@@ -2378,7 +2378,7 @@ static int source_file(const char *cmd_file, int ss_idx)
- cp = strchr(buf, '\r');
- if (cp)
- *cp = 0;
-- printf("debugfs: %s\n", buf);
-+ /*printf("debugfs: %s\n", buf);*/
- retval = ss_execute_line(ss_idx, buf);
- if (retval) {
- ss_perror(ss_idx, retval, buf);
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch
deleted file mode 100644
index f3e6eb778..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b139e03ac2f72e644e547c7ee9b1514383af4d97 Mon Sep 17 00:00:00 2001
-From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
-Date: Wed, 30 Jan 2013 15:22:04 +0200
-Subject: [PATCH] When /etc/ld.so.cache is writeable by user running bitbake
- then it creates invalid cache (in my case libstdc++.so
- cannot be found after building zlib(-native) and I have to
- call touch */libstdc++.so && /sbin/ldconfig to fix it.
-
-So remove ldconfig call from make install-libs
-
-Patch authored by Martin Jansa.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
----
- lib/Makefile.elf-lib | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
-index 78479d3..4a4a5ac 100644
---- a/lib/Makefile.elf-lib
-+++ b/lib/Makefile.elf-lib
-@@ -50,8 +50,6 @@ install-shlibs install:: $(ELF_LIB) installdirs-elf-lib $(DEP_INSTALL_SYMLINK)
- $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).so"
- $(Q) $(INSTALL_SYMLINK) $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
- $(libdir)/$(ELF_IMAGE).so $(DESTDIR)
-- $(E) " LDCONFIG"
-- $(Q) -$(LDCONFIG)
-
- install-strip: install
- $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
-@@ -67,7 +65,6 @@ uninstall-shlibs uninstall::
- $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
- $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
- $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
-- -$(LDCONFIG)
-
- clean::
- $(RM) -rf elfshared
---
-1.7.9.5
-
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
deleted file mode 100644
index 1ac251324..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-cd ./test
-./test_script &>../test.log
-if [ $? -eq 0 ]
-then
- echo "PASS: e2fsprogs"
- rm test.log
-else
- echo "FAIL: e2fsprogs"
-fi
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
deleted file mode 100644
index 35dd361d4..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
+++ /dev/null
@@ -1,14 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-# Applying this patch is optional. Only some versions
-# of e2fsprogs need it. So try to apply it, but if it fails,
-# continue and hope the patch wasn't needed. If it is needed
-# and got skipped, the oeqa Smack tests will catch the failure.
-SRC_URI += "file://ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch;apply=no"
-
-do_patch[postfuncs] += "patch_xattr_support"
-patch_xattr_support () {
- cd ${S}
- cp lib/ext2fs/ext_attr.c lib/ext2fs/ext_attr.c.orig
- patch lib/ext2fs/ext_attr.c <${WORKDIR}/ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch && rm lib/ext2fs/ext_attr.c.orig || mv lib/ext2fs/ext_attr.c.orig lib/ext2fs/ext_attr.c
-}
diff --git a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_git.bb b/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
deleted file mode 100644
index bc2d201a4..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
+++ /dev/null
@@ -1,106 +0,0 @@
-COREDIR = "${COREBASE}/meta/recipes-devtools/e2fsprogs"
-
-# This recipe is a copy of a e2fsprogs 1.42.99+1.43 from OE-core master and
-# only meant to be used when the current OE-core does not have that version yet.
-python () {
- import os
- upstream = os.path.join(d.getVar('COREDIR', True), 'e2fsprogs_1.42.9.bb')
- if not os.path.exists(upstream):
- raise bb.parse.SkipRecipe("This recipe replaces e2fsprogs 1.42.9 in OE-core. e2fsprogs from OE-core is something else and thus either recent enough to have xattr support or (less likely) something unexpected.")
-}
-
-
-require e2fsprogs.inc
-
-SRC_URI += "file://acinclude.m4 \
- file://remove.ldconfig.call.patch \
- file://quiet-debugfs.patch \
- file://run-ptest \
- file://ptest.patch \
- file://mkdir.patch \
-"
-
-SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544"
-PV = "1.42.99+1.43+git${SRCPV}"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
- --enable-elf-shlibs --disable-libuuid --disable-uuidd \
- --disable-libblkid --enable-verbose-makecmds"
-
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
- oe_runmake 'DESTDIR=${D}' install-libs
- # We use blkid from util-linux now so remove from here
- rm -f ${D}${base_libdir}/libblkid*
- rm -rf ${D}${includedir}/blkid
- rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
- rm -f ${D}${base_sbindir}/blkid
- rm -f ${D}${base_sbindir}/fsck
- rm -f ${D}${base_sbindir}/findfs
-
- # e2initrd_helper and the pkgconfig files belong in libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- install -d ${D}${libdir}
- mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-
- oe_multilib_header ext2fs/ext2_types.h
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
- install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-}
-
-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"
-
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
-PACKAGES =+ "libcomerr libss libe2p libext2fs"
-
-FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
-FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
-FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
-FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-FILES_libe2p = "${base_libdir}/libe2p.so.*"
-FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
-FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "fsck.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
-
-do_compile_ptest() {
- oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
- cp -a ${B}/tests ${D}${PTEST_PATH}/test
- cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
- sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-}
diff --git a/meta-security/recipes-devtools/e2fsprogs/files/ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch b/meta-security/recipes-devtools/e2fsprogs/files/ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch
deleted file mode 100644
index 67b8b68fb..000000000
--- a/meta-security/recipes-devtools/e2fsprogs/files/ext_attr.c-fix-adding-multiple-xattrs-during-image-c.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 3b2b0922e031628f313f5480c4f1f9413c6656bf Mon Sep 17 00:00:00 2001
-From: Richard Purdie <richard.purdie@linuxfoundation.org>
-Date: Wed, 10 Feb 2016 15:51:43 +0100
-Subject: [PATCH] ext_attr.c: fix adding multiple xattrs during image creation
-
-http://www.nongnu.org/ext2-doc/ext2.html#CONTRIB-EXTENDED-ATTRIBUTES
-contains the small snippet that "The entry descriptors are sorted by
-attribute name, so that two extended attribute blocks can be compared
-efficiently".
-
-The libext2fs code in e2fsprogs needs to be taught about this minor
-sorting detail. Otherwise creating an image with "mkfs.ext -d" from a
-filesystem that reports xattrs in listxattr() in an order that does
-not match the expected order will lead to an image where listxattr()
-reports all xattrs, but reading some values fails with ENODATA.
-
-[Patch from RP, commit message from Patrick and RP]
-
-Upstream-Status: Pending [https://bugzilla.yoctoproject.org/show_bug.cgi?id=8992]
----
- lib/ext2fs/ext_attr.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
-index 0a4f8c0..be8f9c3 100644
---- a/lib/ext2fs/ext_attr.c
-+++ b/lib/ext2fs/ext_attr.c
-@@ -258,6 +258,7 @@ static struct ea_name_index ea_names[] = {
- static int attr_compare(const void *a, const void *b)
- {
- const struct ext2_xattr *xa = a, *xb = b;
-+ size_t len;
-
- if (xa->name == NULL)
- return +1;
-@@ -267,7 +268,11 @@ static int attr_compare(const void *a, const void *b)
- return -1;
- else if (!strcmp(xb->name, "system.data"))
- return +1;
-- return 0;
-+ len = strlen(xa->name) - strlen(xb->name);
-+ if (len)
-+ return len;
-+
-+ return strcmp(xa->name, xb->name);
- }
-
- static const char *find_ea_prefix(int index)
---
-2.1.4
-
diff --git a/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch b/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch
index 11387b98b..e1d0cfac9 100644
--- a/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch
+++ b/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch
@@ -1,7 +1,7 @@
-From 3d387993b5a4283e8aebd8e777b2ccd45d233959 Mon Sep 17 00:00:00 2001
+From 8bf90bf3e7a821dbd3b7029d87aa592eec6f1754 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
Date: Thu, 25 Jan 2018 12:00:18 +0100
-Subject: [PATCH 1/6] Add fallthrough tags
+Subject: [PATCH] Add fallthrough tags
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -12,6 +12,7 @@ to the next after some processing.
Change-Id: I420e3788a4c0a6d910a1214964c5480bbd12708c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+
---
src/admin/api/admin-api.cpp | 1 +
src/client-async/logic/Logic.cpp | 1 +
@@ -54,6 +55,3 @@ index b1ca4f7..f4394e5 100644
default:
return true;
}
---
-2.14.3
-
diff --git a/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch b/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch
new file mode 100644
index 000000000..40e11ce5d
--- /dev/null
+++ b/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch
@@ -0,0 +1,35 @@
+From ca28ec4a0781a1ab9ec5f015387436beb51adfc3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= <jsmoeller@linuxfoundation.org>
+Date: Fri, 19 Oct 2018 08:09:28 +0000
+Subject: [PATCH] fix fallthrough in cmdlineparser
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
+
+---
+ src/service/main/CmdlineParser.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/service/main/CmdlineParser.cpp b/src/service/main/CmdlineParser.cpp
+index ca56e39..e07ea52 100644
+--- a/src/service/main/CmdlineParser.cpp
++++ b/src/service/main/CmdlineParser.cpp
+@@ -112,13 +112,16 @@ struct CmdLineOptions handleCmdlineOptions(int argc, char * const *argv) {
+ case ':': // Missing argument
+ ret.m_error = true;
+ ret.m_exit = true;
++ /*@fallthrough@*/
+ switch (optopt) {
+ case CmdlineOpt::Mask:
+ case CmdlineOpt::User:
+ case CmdlineOpt::Group:
+ printMissingArgument(execName, argv[optind - 1]);
+ return ret;
++ /*@fallthrough@*/
+ }
++ /*@fallthrough@*/
+ //intentional fall to Unknown option
+ case '?': // Unknown option
+ default:
diff --git a/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch b/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch
index 760a1c5b2..b8dbfac4d 100644
--- a/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch
+++ b/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch
@@ -1,9 +1,10 @@
-From b18e66ce7f81c56e3a97ed075cb60d5a43b2e57c Mon Sep 17 00:00:00 2001
+From e2d8414b0d1c6c59baf1bb73e856e93aaabaf955 Mon Sep 17 00:00:00 2001
From: Changhyeok Bae <changhyeok.bae@gmail.com>
Date: Sun, 17 Dec 2017 15:28:28 +0000
-Subject: [PATCH 2/6] gcc-7 requires include <functional> for std::function
+Subject: [PATCH] gcc-7 requires include <functional> for std::function
Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
+
---
src/common/types/PolicyBucket.h | 1 +
src/cyad/AdminPolicyParser.h | 1 +
@@ -33,6 +34,3 @@ index 53dde23..f38c194 100644
#include <cyad/CynaraAdminPolicies.h>
---
-2.14.3
-
diff --git a/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch b/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch
index 8c47c3b26..1b105a00c 100644
--- a/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch
+++ b/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch
@@ -1,7 +1,7 @@
-From 6ad54c5e732e7cf0a29f29f48fa757e3e56d6860 Mon Sep 17 00:00:00 2001
+From fdcf2a68a4bfec588b1c6c969caa0be20961b807 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
Date: Thu, 25 Jan 2018 11:38:16 +0100
-Subject: [PATCH 3/6] Avoid warning when compiling without smack
+Subject: [PATCH] Avoid warning when compiling without smack
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -14,6 +14,7 @@ with the following message:
Change-Id: Ie837cae81114d096f951ec0ee4ada4173fb60190
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+
---
src/admin/CMakeLists.txt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
@@ -40,6 +41,3 @@ index e4f354a..38b8669 100644
SET(CYNARA_LIB_CYNARA_ADMIN_PATH ${CYNARA_PATH}/admin)
---
-2.14.3
-
diff --git a/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch b/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch
index 164542899..f19cdfb50 100644
--- a/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch
+++ b/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch
@@ -1,7 +1,7 @@
-From 2bd62bca98a8a8cf194fb2b68aed68d982f58520 Mon Sep 17 00:00:00 2001
+From 233fb8a93343c3c9c04914e1148ef5ab87a808a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
Date: Thu, 25 Jan 2018 12:52:39 +0100
-Subject: [PATCH 4/6] Fix mode of sockets
+Subject: [PATCH] Fix mode of sockets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -10,6 +10,7 @@ Setting execution bit on the socket serves nothing.
Change-Id: I2ca1ea8e0c369ee5517878e92073ace0e50f9f10
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+
---
systemd/cynara-admin.socket | 2 +-
systemd/cynara.socket | 2 +-
@@ -39,6 +40,3 @@ index 9f2a870..fad2745 100644
SmackLabelIPIn=*
SmackLabelIPOut=@
---
-2.14.3
-
diff --git a/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch b/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch
index b4a2d74e8..e954c7f21 100644
--- a/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch
+++ b/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch
@@ -1,7 +1,7 @@
-From d919b110a2fbccdce084c651f4d7d7de66f2f869 Mon Sep 17 00:00:00 2001
+From ebde8e9fdba7bc1c8152f7e45c551030a36ece82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
Date: Thu, 25 Jan 2018 13:47:37 +0100
-Subject: [PATCH 5/6] Allow to tune sockets
+Subject: [PATCH] Allow to tune sockets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -17,17 +17,26 @@ through the newly defined variable CYNARA_ADMIN_SOCKET_GROUP
Change-Id: I7d58854c328e948e3d6d7fa3fc00569fd08f8aef
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+
---
- systemd/CMakeLists.txt | 19 +++++++++++++++----
- .../{cynara-admin.socket => cynara-admin.socket.in} | 2 +-
- .../{cynara-agent.socket => cynara-agent.socket.in} | 4 ++--
- ...onitor-get.socket => cynara-monitor-get.socket.in} | 4 ++--
- systemd/{cynara.socket => cynara.socket.in} | 2 +-
- 5 files changed, 21 insertions(+), 10 deletions(-)
- rename systemd/{cynara-admin.socket => cynara-admin.socket.in} (78%)
- rename systemd/{cynara-agent.socket => cynara-agent.socket.in} (66%)
- rename systemd/{cynara-monitor-get.socket => cynara-monitor-get.socket.in} (64%)
- rename systemd/{cynara.socket => cynara.socket.in} (80%)
+ systemd/CMakeLists.txt | 19 +++++++++++++++----
+ systemd/cynara-admin.socket | 14 --------------
+ systemd/cynara-admin.socket.in | 14 ++++++++++++++
+ systemd/cynara-agent.socket | 15 ---------------
+ systemd/cynara-agent.socket.in | 15 +++++++++++++++
+ systemd/cynara-monitor-get.socket | 15 ---------------
+ systemd/cynara-monitor-get.socket.in | 15 +++++++++++++++
+ systemd/cynara.socket | 14 --------------
+ systemd/cynara.socket.in | 14 ++++++++++++++
+ 9 files changed, 73 insertions(+), 62 deletions(-)
+ delete mode 100644 systemd/cynara-admin.socket
+ create mode 100644 systemd/cynara-admin.socket.in
+ delete mode 100644 systemd/cynara-agent.socket
+ create mode 100644 systemd/cynara-agent.socket.in
+ delete mode 100644 systemd/cynara-monitor-get.socket
+ create mode 100644 systemd/cynara-monitor-get.socket.in
+ delete mode 100644 systemd/cynara.socket
+ create mode 100644 systemd/cynara.socket.in
diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
index 20accf0..1b75c12 100644
@@ -62,66 +71,167 @@ index 20accf0..1b75c12 100644
DESTINATION
${SYSTEMD_UNIT_DIR}
)
-diff --git a/systemd/cynara-admin.socket b/systemd/cynara-admin.socket.in
-similarity index 78%
-rename from systemd/cynara-admin.socket
-rename to systemd/cynara-admin.socket.in
-index ed38386..2364c3e 100644
+diff --git a/systemd/cynara-admin.socket b/systemd/cynara-admin.socket
+deleted file mode 100644
+index ed38386..0000000
--- a/systemd/cynara-admin.socket
-+++ b/systemd/cynara-admin.socket.in
-@@ -1,5 +1,5 @@
- [Socket]
++++ /dev/null
+@@ -1,14 +0,0 @@
+-[Socket]
-ListenStream=/run/cynara/cynara-admin.socket
+-SocketMode=0600
+-SmackLabelIPIn=@
+-SmackLabelIPOut=@
+-
+-Service=cynara.service
+-
+-[Unit]
+-Wants=cynara.target
+-Before=cynara.target
+-
+-[Install]
+-WantedBy=sockets.target
+diff --git a/systemd/cynara-admin.socket.in b/systemd/cynara-admin.socket.in
+new file mode 100644
+index 0000000..2364c3e
+--- /dev/null
++++ b/systemd/cynara-admin.socket.in
+@@ -0,0 +1,14 @@
++[Socket]
+ListenStream=@SOCKET_DIR@/cynara-admin.socket
- SocketMode=0600
- SmackLabelIPIn=@
- SmackLabelIPOut=@
-diff --git a/systemd/cynara-agent.socket b/systemd/cynara-agent.socket.in
-similarity index 66%
-rename from systemd/cynara-agent.socket
-rename to systemd/cynara-agent.socket.in
-index 5a677e0..4f86c9d 100644
++SocketMode=0600
++SmackLabelIPIn=@
++SmackLabelIPOut=@
++
++Service=cynara.service
++
++[Unit]
++Wants=cynara.target
++Before=cynara.target
++
++[Install]
++WantedBy=sockets.target
+diff --git a/systemd/cynara-agent.socket b/systemd/cynara-agent.socket
+deleted file mode 100644
+index 5a677e0..0000000
--- a/systemd/cynara-agent.socket
-+++ b/systemd/cynara-agent.socket.in
-@@ -1,6 +1,6 @@
- [Socket]
++++ /dev/null
+@@ -1,15 +0,0 @@
+-[Socket]
-ListenStream=/run/cynara/cynara-agent.socket
-SocketGroup=security_fw
+-SocketMode=0060
+-SmackLabelIPIn=*
+-SmackLabelIPOut=@
+-
+-Service=cynara.service
+-
+-[Unit]
+-Wants=cynara.target
+-Before=cynara.target
+-
+-[Install]
+-WantedBy=sockets.target
+diff --git a/systemd/cynara-agent.socket.in b/systemd/cynara-agent.socket.in
+new file mode 100644
+index 0000000..4f86c9d
+--- /dev/null
++++ b/systemd/cynara-agent.socket.in
+@@ -0,0 +1,15 @@
++[Socket]
+ListenStream=@SOCKET_DIR@/cynara-agent.socket
+SocketGroup=@CYNARA_ADMIN_SOCKET_GROUP@
- SocketMode=0060
- SmackLabelIPIn=*
- SmackLabelIPOut=@
-diff --git a/systemd/cynara-monitor-get.socket b/systemd/cynara-monitor-get.socket.in
-similarity index 64%
-rename from systemd/cynara-monitor-get.socket
-rename to systemd/cynara-monitor-get.socket.in
-index a50feeb..b88dbf7 100644
++SocketMode=0060
++SmackLabelIPIn=*
++SmackLabelIPOut=@
++
++Service=cynara.service
++
++[Unit]
++Wants=cynara.target
++Before=cynara.target
++
++[Install]
++WantedBy=sockets.target
+diff --git a/systemd/cynara-monitor-get.socket b/systemd/cynara-monitor-get.socket
+deleted file mode 100644
+index a50feeb..0000000
--- a/systemd/cynara-monitor-get.socket
-+++ b/systemd/cynara-monitor-get.socket.in
-@@ -1,6 +1,6 @@
- [Socket]
++++ /dev/null
+@@ -1,15 +0,0 @@
+-[Socket]
-ListenStream=/run/cynara/cynara-monitor-get.socket
-SocketGroup=security_fw
+-SocketMode=0060
+-SmackLabelIPIn=@
+-SmackLabelIPOut=@
+-
+-Service=cynara.service
+-
+-[Unit]
+-Wants=cynara.target
+-Before=cynara.target
+-
+-[Install]
+-WantedBy=sockets.target
+diff --git a/systemd/cynara-monitor-get.socket.in b/systemd/cynara-monitor-get.socket.in
+new file mode 100644
+index 0000000..b88dbf7
+--- /dev/null
++++ b/systemd/cynara-monitor-get.socket.in
+@@ -0,0 +1,15 @@
++[Socket]
+ListenStream=@SOCKET_DIR@/cynara-monitor-get.socket
+SocketGroup=@CYNARA_ADMIN_SOCKET_GROUP@
- SocketMode=0060
- SmackLabelIPIn=@
- SmackLabelIPOut=@
-diff --git a/systemd/cynara.socket b/systemd/cynara.socket.in
-similarity index 80%
-rename from systemd/cynara.socket
-rename to systemd/cynara.socket.in
-index fad2745..ba76549 100644
++SocketMode=0060
++SmackLabelIPIn=@
++SmackLabelIPOut=@
++
++Service=cynara.service
++
++[Unit]
++Wants=cynara.target
++Before=cynara.target
++
++[Install]
++WantedBy=sockets.target
+diff --git a/systemd/cynara.socket b/systemd/cynara.socket
+deleted file mode 100644
+index fad2745..0000000
--- a/systemd/cynara.socket
-+++ b/systemd/cynara.socket.in
-@@ -1,5 +1,5 @@
- [Socket]
++++ /dev/null
+@@ -1,14 +0,0 @@
+-[Socket]
-ListenStream=/run/cynara/cynara.socket
+-SocketMode=0666
+-SmackLabelIPIn=*
+-SmackLabelIPOut=@
+-
+-Service=cynara.service
+-
+-[Unit]
+-Wants=cynara.target
+-Before=cynara.target
+-
+-[Install]
+-WantedBy=sockets.target
+diff --git a/systemd/cynara.socket.in b/systemd/cynara.socket.in
+new file mode 100644
+index 0000000..ba76549
+--- /dev/null
++++ b/systemd/cynara.socket.in
+@@ -0,0 +1,14 @@
++[Socket]
+ListenStream=@SOCKET_DIR@/cynara.socket
- SocketMode=0666
- SmackLabelIPIn=*
- SmackLabelIPOut=@
---
-2.14.3
-
++SocketMode=0666
++SmackLabelIPIn=*
++SmackLabelIPOut=@
++
++Service=cynara.service
++
++[Unit]
++Wants=cynara.target
++Before=cynara.target
++
++[Install]
++WantedBy=sockets.target
diff --git a/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch b/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch
index 0cfc785c1..68864f1ed 100644
--- a/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch
+++ b/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch
@@ -1,13 +1,14 @@
-From d54e425b0685c9e3e06f5b4efcbd206950d14f3c Mon Sep 17 00:00:00 2001
+From 23f1a7cb34dd4ef88bac5a43057feaf7f50559aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
Date: Thu, 25 Jan 2018 14:09:23 +0100
-Subject: [PATCH 6/6] Install socket activation by default
+Subject: [PATCH] Install socket activation by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: Ifd10c3800486689ed0ed6271df59760ccfbf6caf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+
---
packaging/cynara.spec | 5 -----
systemd/CMakeLists.txt | 7 +++++++
@@ -75,6 +76,3 @@ index 0000000..c0e5a5b
@@ -0,0 +1 @@
+../cynara.socket
\ No newline at end of file
---
-2.14.3
-
diff --git a/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch b/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch
index cbf372ad9..c14418923 100644
--- a/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch
+++ b/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch
@@ -1,7 +1,7 @@
-From 297774fa4d01156c0327d6e6380a7ecae30bf875 Mon Sep 17 00:00:00 2001
+From 3605e9f8a3ea1252d1cf221398431e0d7a3ea34d Mon Sep 17 00:00:00 2001
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Mon, 23 Mar 2015 15:01:39 -0700
-Subject: [PATCH 1/2] cynara-db-migration.in: abort on errors
+Subject: [PATCH] cynara-db-migration.in: abort on errors
"set -e" enables error checking for all commands invoked by the script.
Previously, errors were silently ignored.
@@ -9,12 +9,13 @@ Previously, errors were silently ignored.
Upstream-status: Submitted [https://github.com/Samsung/cynara/pull/8]
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+
---
- migration/cynara-db-migration | 2 ++
+ migration/cynara-db-migration.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/cynara-db-migration.in b/migration/cynara-db-migration.in
-index ff9bd61..f6e7f94 100644
+index 7b666d4..0682df6 100644
--- a/migration/cynara-db-migration.in
+++ b/migration/cynara-db-migration.in
@@ -19,6 +19,8 @@
@@ -25,7 +26,4 @@ index ff9bd61..f6e7f94 100644
+
##### Constants (these must not be modified by shell)
- STATE_PATH='@LOCAL_STATE_DIR@/@PROJECT_NAME@'
---
-1.8.4.5
-
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
diff --git a/meta-security/recipes-security/cynara/cynara_0.14.10.bb b/meta-security/recipes-security/cynara/cynara_0.14.10.bb
index 6c187fced..d2a09c693 100644
--- a/meta-security/recipes-security/cynara/cynara_0.14.10.bb
+++ b/meta-security/recipes-security/cynara/cynara_0.14.10.bb
@@ -15,6 +15,7 @@ SRC_URI += " \
file://0004-Fix-mode-of-sockets.patch \
file://0005-Allow-to-tune-sockets.patch \
file://0006-Install-socket-activation-by-default.patch \
+ file://0001-fix-fallthrough-in-cmdlineparser.patch \
"
DEPENDS = " \
@@ -84,6 +85,12 @@ USERADD_PARAM_${PN} = "\
# ln -s ../cynara-agent.socket ${D}${systemd_system_unitdir}/sockets.target.wants/cynara-agent.socket
#}
+# We want the post-install logic to create and label /var/cynara, so
+# it should not be in the package.
+do_install_append () {
+ rmdir ${D}${localstatedir}/cynara
+}
+
FILES_${PN} += "${systemd_system_unitdir}"
# Cynara itself has no dependency on Smack. Only its installation
@@ -101,18 +108,7 @@ DEPENDS_append_with-lsm-smack = " smack smack-native"
EXTRA_OECMAKE_append_with-lsm-smack = " -DDB_FILES_SMACK_LABEL=System"
CHSMACK_with-lsm-smack = "chsmack"
CHSMACK = "true"
-pkg_postinst_${PN} () {
- # Fail on error.
- set -e
-
- # It would be nice to run the code below while building an image,
- # but currently the calls to cynara-db-chsgen (a binary) in
- # cynara-db-migration (a script) prevent that. Rely instead
- # on OE's support for running failed postinst scripts at first boot.
- if [ x"$D" != "x" ]; then
- exit 1
- fi
-
+pkg_postinst_ontarget_${PN} () {
mkdir -p $D${sysconfdir}/cynara
${CHSMACK} -a System $D${sysconfdir}/cynara
diff --git a/meta-security/recipes-security/libcap-ng/libcap-ng/CVE-2014-3215.patch b/meta-security/recipes-security/libcap-ng/libcap-ng/CVE-2014-3215.patch
deleted file mode 100644
index d7a868d2c..000000000
--- a/meta-security/recipes-security/libcap-ng/libcap-ng/CVE-2014-3215.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Upstream-Status: Pending
-
-diff --git a/docs/capng_lock.3 b/docs/capng_lock.3
-index 7683119..a070c1e 100644
---- a/docs/capng_lock.3
-+++ b/docs/capng_lock.3
-@@ -8,12 +8,13 @@ int capng_lock(void);
-
- .SH "DESCRIPTION"
-
--capng_lock will take steps to prevent children of the current process to regain full privileges if the uid is 0. This should be called while possessing the CAP_SETPCAP capability in the kernel. This function will do the following if permitted by the kernel: Set the NOROOT option on for PR_SET_SECUREBITS, set the NOROOT_LOCKED option to on for PR_SET_SECUREBITS, set the PR_NO_SETUID_FIXUP option on for PR_SET_SECUREBITS, and set the PR_NO_SETUID_FIXUP_LOCKED option on for PR_SET_SECUREBITS.
-+capng_lock will take steps to prevent children of the current process from gaining privileges by executing setuid programs. This should be called while possessing the CAP_SETPCAP capability in the kernel.
-
-+This function will do the following if permitted by the kernel: If the kernel supports PR_SET_NO_NEW_PRIVS, it will use it. Otherwise it will set the NOROOT option on for PR_SET_SECUREBITS, set the NOROOT_LOCKED option to on for PR_SET_SECUREBITS, set the PR_NO_SETUID_FIXUP option on for PR_SET_SECUREBITS, and set the PR_NO_SETUID_FIXUP_LOCKED option on for PR_SET_SECUREBITS. If both fail, it will return an error.
-
- .SH "RETURN VALUE"
-
--This returns 0 on success and a negative number on failure. -1 means a failure setting any of the PR_SET_SECUREBITS options.
-+This returns 0 on success and a negative number on failure. -1 means a failure to use PR_SET_NO_NEW_PRIVS and a failure setting any of the PR_SET_SECUREBITS options.
-
- .SH "SEE ALSO"
-
-diff --git a/src/cap-ng.c b/src/cap-ng.c
-index bd105ba..422f2bc 100644
---- a/src/cap-ng.c
-+++ b/src/cap-ng.c
-@@ -45,6 +45,7 @@
- * 2.6.24 kernel XATTR_NAME_CAPS
- * 2.6.25 kernel PR_CAPBSET_DROP, CAPABILITY_VERSION_2
- * 2.6.26 kernel PR_SET_SECUREBITS, SECURE_*_LOCKED, VERSION_3
-+ * 3.5 kernel PR_SET_NO_NEW_PRIVS
- */
-
- /* External syscall prototypes */
-@@ -122,6 +123,14 @@ extern int capget(cap_user_header_t header, const cap_user_data_t data);
- #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */
- #endif
-
-+/* prctl values that we use */
-+#ifndef PR_SET_SECUREBITS
-+#define PR_SET_SECUREBITS 28
-+#endif
-+#ifndef PR_SET_NO_NEW_PRIVS
-+#define PR_SET_NO_NEW_PRIVS 38
-+#endif
-+
- // States: new, allocated, initted, updated, applied
- typedef enum { CAPNG_NEW, CAPNG_ERROR, CAPNG_ALLOCATED, CAPNG_INIT,
- CAPNG_UPDATED, CAPNG_APPLIED } capng_states_t;
-@@ -663,15 +672,22 @@ int capng_change_id(int uid, int gid, capng_flags_t flag)
-
- int capng_lock(void)
- {
--#ifdef PR_SET_SECUREBITS
-- int rc = prctl(PR_SET_SECUREBITS,
-- 1 << SECURE_NOROOT |
-- 1 << SECURE_NOROOT_LOCKED |
-- 1 << SECURE_NO_SETUID_FIXUP |
-- 1 << SECURE_NO_SETUID_FIXUP_LOCKED, 0, 0, 0);
-+ int rc;
-+
-+ // On Linux 3.5 and up, we can directly prevent ourselves and
-+ // our descendents from gaining privileges.
-+ if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == 0)
-+ return 0;
-+
-+ // This kernel is too old or otherwise doesn't support
-+ // PR_SET_NO_NEW_PRIVS. Fall back to using securebits.
-+ rc = prctl(PR_SET_SECUREBITS,
-+ 1 << SECURE_NOROOT |
-+ 1 << SECURE_NOROOT_LOCKED |
-+ 1 << SECURE_NO_SETUID_FIXUP |
-+ 1 << SECURE_NO_SETUID_FIXUP_LOCKED, 0, 0, 0);
- if (rc)
- return -1;
--#endif
-
- return 0;
- }
diff --git a/meta-security/recipes-security/libcap-ng/libcap-ng/python.patch b/meta-security/recipes-security/libcap-ng/libcap-ng/python.patch
deleted file mode 100644
index d82ceb454..000000000
--- a/meta-security/recipes-security/libcap-ng/libcap-ng/python.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-configure.ac - Avoid an incorrect check for python.
-Makefile.am - avoid hard coded host include paths.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- libcap-ng-0.6.5/configure.ac.orig 2012-01-17 13:59:03.645898989 -0600
-+++ libcap-ng-0.6.5/configure.ac 2012-01-17 13:59:46.353959252 -0600
-@@ -120,17 +120,8 @@
- else
- AC_MSG_RESULT(testing)
- AM_PATH_PYTHON
--if test -f /usr/include/python${am_cv_python_version}/Python.h ; then
-- python_found="yes"
-- AC_MSG_NOTICE(Python bindings will be built)
--else
-- python_found="no"
-- if test x$use_python = xyes ; then
-- AC_MSG_ERROR([Python explicitly required and python headers found])
-- else
-- AC_MSG_WARN("Python headers not found - python bindings will not be made")
-- fi
--fi
-+python_found="yes"
-+AC_MSG_NOTICE(Python bindings will be built)
- fi
- AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
-
---- libcap-ng-0.6.5/bindings/python/Makefile.am.orig 2010-11-03 12:31:59.000000000 -0500
-+++ libcap-ng-0.6.5/bindings/python/Makefile.am 2012-01-17 14:05:50.199834467 -0600
-@@ -24,7 +24,8 @@
- CONFIG_CLEAN_FILES = *.loT *.rej *.orig
- AM_CFLAGS = -fPIC -DPIC
- PYLIBVER ?= python$(PYTHON_VERSION)
--INCLUDES = -I. -I$(top_builddir) -I/usr/include/$(PYLIBVER)
-+PYINC ?= /usr/include/$(PYLIBVER)
-+INCLUDES = -I. -I$(top_builddir) -I$(PYINC)
- LIBS = $(top_builddir)/src/libcap-ng.la
- pyexec_PYTHON = capng.py
- pyexec_LTLIBRARIES = _capng.la
diff --git a/meta-security/recipes-security/libcap-ng/libcap-ng_0.7.3.bb b/meta-security/recipes-security/libcap-ng/libcap-ng_0.7.3.bb
deleted file mode 100644
index e729518e9..000000000
--- a/meta-security/recipes-security/libcap-ng/libcap-ng_0.7.3.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "An alternate posix capabilities library"
-DESCRIPTION = "The libcap-ng library is intended to make programming \
-with POSIX capabilities much easier than the traditional libcap library."
-HOMEPAGE = "http://freecode.com/projects/libcap-ng"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
- file://python.patch \
- file://CVE-2014-3215.patch \
- "
-
-inherit lib_package autotools pythonnative
-
-SRC_URI[md5sum] = "610afb774f80a8032b711281df126283"
-SRC_URI[sha256sum] = "5ca441c8d3a1e4cfe8a8151907977662679457311ccaa7eaac91447c33a35bb1"
-
-DEPENDS += "swig-native python"
-
-EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
-
-PACKAGES += "${PN}-python"
-
-FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
-FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
-
-BBCLASSEXTEND = "native"
-
-do_install_append() {
- # Moving libcap-ng to base_libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mkdir -p ${D}/${base_libdir}/
- mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
- relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
- ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
- fi
-}
diff --git a/meta-security/recipes-security/security-manager/security-manager.inc b/meta-security/recipes-security/security-manager/security-manager.inc
index 810106d75..ddd87a930 100644
--- a/meta-security/recipes-security/security-manager/security-manager.inc
+++ b/meta-security/recipes-security/security-manager/security-manager.inc
@@ -89,10 +89,6 @@ FILES_${PN}-policy = " \
${bindir}/security-manager-policy-reload \
"
RDEPENDS_${PN}-policy += "sqlite3 cynara"
-pkg_postinst_${PN}-policy () {
- if [ x"$D" = "x" ] && ${bindir}/security-manager-policy-reload; then
- exit 0
- else
- exit 1
- fi
+pkg_postinst_ontarget_${PN}-policy () {
+ ${bindir}/security-manager-policy-reload
}
diff --git a/meta-security/recipes-security/security-manager/security-manager/0001-Avoid-casting-from-const-T-to-void.patch b/meta-security/recipes-security/security-manager/security-manager/0001-Avoid-casting-from-const-T-to-void.patch
new file mode 100644
index 000000000..f598fdc82
--- /dev/null
+++ b/meta-security/recipes-security/security-manager/security-manager/0001-Avoid-casting-from-const-T-to-void.patch
@@ -0,0 +1,127 @@
+From 14c8842ed8a37fecbc70d46e27b49ae929b0c85f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
+Date: Fri, 1 Feb 2019 15:37:44 +0100
+Subject: [PATCH] Avoid casting from "const T&" to "void*"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Latest version of g++ refuse the cast
+
+ reinterpret_cast<void (Service::*)(void*)>(serviceFunction)
+
+I made no investigation to know if the problem
+is coming from the const or not.
+
+Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+---
+ src/server/main/include/service-thread.h | 43 ++++++++++--------------
+ 1 file changed, 18 insertions(+), 25 deletions(-)
+
+diff --git a/src/server/main/include/service-thread.h b/src/server/main/include/service-thread.h
+index 964d168..92b0ec8 100644
+--- a/src/server/main/include/service-thread.h
++++ b/src/server/main/include/service-thread.h
+@@ -9,78 +94,72 @@ public:
+ Join();
+ while (!m_eventQueue.empty()){
+ auto front = m_eventQueue.front();
+- delete front.eventPtr;
++ delete front;
+ m_eventQueue.pop();
+ }
+ }
+
+ template <class T>
+ void Event(const T &event,
+ Service *servicePtr,
+ void (Service::*serviceFunction)(const T &))
+ {
+- EventDescription description;
+- description.serviceFunctionPtr =
+- reinterpret_cast<void (Service::*)(void*)>(serviceFunction);
+- description.servicePtr = servicePtr;
+- description.eventFunctionPtr = &ServiceThread::EventCall<T>;
+- description.eventPtr = new T(event);
++ EventCallerBase *ec = new EventCaller<T>(event, servicePtr, serviceFunction);
+ {
+ std::lock_guard<std::mutex> lock(m_eventQueueMutex);
+- m_eventQueue.push(description);
++ m_eventQueue.push(ec);
+ }
+ m_waitCondition.notify_one();
+ }
+
+ protected:
+
+- struct EventDescription {
+- void (Service::*serviceFunctionPtr)(void *);
+- Service *servicePtr;
+- void (ServiceThread::*eventFunctionPtr)(const EventDescription &event);
+- GenericEvent* eventPtr;
+- };
+-
+- template <class T>
+- void EventCall(const EventDescription &desc) {
+- auto fun = reinterpret_cast<void (Service::*)(const T&)>(desc.serviceFunctionPtr);
+- const T& eventLocale = *(static_cast<T*>(desc.eventPtr));
+- (desc.servicePtr->*fun)(eventLocale);
+- }
++ struct EventCallerBase {
++ virtual void fire() = 0;
++ virtual ~EventCallerBase() {}
++ };
+
++ template <class T>
++ struct EventCaller : public EventCallerBase {
++ T *event; Service *target; void (Service::*function)(const T&);
++ EventCaller(const T &e, Service *c, void (Service::*f)(const T&)) : event(new T(e)), target(c), function(f) {}
++ ~EventCaller() { delete event; }
++ void fire() { (target->*function)(*event); }
++ };
++
+ static void ThreadLoopStatic(ServiceThread *ptr) {
+ ptr->ThreadLoop();
+ }
+
+ void ThreadLoop(){
+ for (;;) {
+- EventDescription description = {NULL, NULL, NULL, NULL};
++ EventCallerBase *ec = NULL;
+ {
+ std::unique_lock<std::mutex> ulock(m_eventQueueMutex);
+ if (m_quit)
+ return;
+ if (!m_eventQueue.empty()) {
+- description = m_eventQueue.front();
++ ec = m_eventQueue.front();
+ m_eventQueue.pop();
+ } else {
+ m_waitCondition.wait(ulock);
+ }
+ }
+
+- if (description.eventPtr != NULL) {
++ if (ec != NULL) {
+ UNHANDLED_EXCEPTION_HANDLER_BEGIN
+ {
+- (this->*description.eventFunctionPtr)(description);
+- delete description.eventPtr;
++ ec->fire();
+ }
+ UNHANDLED_EXCEPTION_HANDLER_END
++ delete ec;
+ }
+ }
+ }
+
+ std::thread m_thread;
+ std::mutex m_eventQueueMutex;
+- std::queue<EventDescription> m_eventQueue;
++ std::queue<EventCallerBase*> m_eventQueue;
+ std::condition_variable m_waitCondition;
+
+ State m_state;
+--
+2.17.2
+
diff --git a/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch b/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch
new file mode 100644
index 000000000..5a55a3128
--- /dev/null
+++ b/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch
@@ -0,0 +1,32 @@
+From 37c63c280eaec8cae3a321d45404d6c03a68c9d9 Mon Sep 17 00:00:00 2001
+From: Stephane Desneux <stephane.desneux@iot.bzh>
+Date: Fri, 1 Feb 2019 12:26:17 +0000
+Subject: [PATCH] Fix gcc8 warning/error [-Werror=catch-value=]
+
+Fixes the following warning/error during compile:
+
+src/dpl/core/src/assert.cpp:61:14: error: catching polymorphic type 'class SecurityManager::Exception' by value [-Werror=catch-value=]
+| } catch (Exception) {
+| ^~~~~~~~~
+
+Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
+---
+ src/dpl/core/src/assert.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/dpl/core/src/assert.cpp b/src/dpl/core/src/assert.cpp
+index 63538a2..fc60ce9 100644
+--- a/src/dpl/core/src/assert.cpp
++++ b/src/dpl/core/src/assert.cpp
+@@ -58,7 +58,7 @@ void AssertProc(const char *condition,
+ INTERNAL_LOG("### Function: " << function);
+ INTERNAL_LOG(
+ "################################################################################");
+- } catch (Exception) {
++ } catch (Exception const&) {
+ // Just ignore possible double errors
+ }
+
+--
+2.11.0
+
diff --git a/meta-security/recipes-security/security-manager/security-manager_git.bb b/meta-security/recipes-security/security-manager/security-manager_git.bb
index 65134d31a..3cbc3aea8 100644
--- a/meta-security/recipes-security/security-manager/security-manager_git.bb
+++ b/meta-security/recipes-security/security-manager/security-manager_git.bb
@@ -14,6 +14,8 @@ file://c-11-replace-depracated-auto_ptr.patch \
file://socket-manager-removes-tizen-specific-call.patch \
file://Removing-tizen-platform-config.patch \
file://removes-dependency-to-libslp-db-utils.patch \
+file://0001-Fix-gcc8-warning-error-Werror-catch-value.patch \
+file://0001-Avoid-casting-from-const-T-to-void.patch \
"
##########################################
@@ -32,3 +34,5 @@ SRC_URI += "\
file://include-linux-xattr.patch;apply=${APPLY} \
"
+# Use make with cmake and not ninja
+OECMAKE_GENERATOR = "Unix Makefiles"
diff --git a/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend b/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend
new file mode 100644
index 000000000..9c6080fcf
--- /dev/null
+++ b/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend
@@ -0,0 +1,3 @@
+# remove the EXTRA_OECONF from the recipe to
+# avoid an build error in >= YP SUMO
+EXTRA_OECONF = ""