diff options
Diffstat (limited to 'meta-agl-core/dynamic-layers')
20 files changed, 210 insertions, 49 deletions
diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend new file mode 100644 index 000000000..4b6deffdf --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'agl-compositor-init_aglcore.inc', '', d)} diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc new file mode 100644 index 000000000..b7d346d39 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-compositor-init_aglcore.inc @@ -0,0 +1 @@ +require common-init.inc diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb new file mode 100644 index 000000000..38725c1bd --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/agl-shell-activator_git.bb @@ -0,0 +1,22 @@ +SUMMARY = " Application that switches/activates other application's windows " +DESCRIPTION = " A wayland client and a script that talks with the agl-compositor \ +an tells it to display a specific application. Relies on the appid being \ +started (already) by afm-util or the client shell (homescreen/WAM)" + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-shell-activator" +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=e978448a0d41d826d73890d9c22caf75" + +DEPENDS = "wayland wayland-protocols wayland-native agl-compositor grpc grpc-native" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-shell-activator.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "027d6f814f3d1f2e6b4b4071365b28dadec34109" + +PV = "0.0.10+git${SRCPV}" +S = "${WORKDIR}/git" + + +inherit meson pkgconfig python3native + +FILES:${PN} = " ${bindir}/agl-shell-activator" diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc new file mode 100644 index 000000000..47f7d8b1d --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/common-init.inc @@ -0,0 +1,6 @@ +# If weston's PACKAGECONFIG contains systemd + pam + polkit, polkit +# ends up a hard requirement for start up due to the pam + systemd +# configuration that is being installed. For now, keep things simple +# and assume that polkit should be a dependency if it is in +# DISTRO_FEATURES. +RDEPENDS:${PN} += "${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)}" diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 000000000..c09d7ccd3 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston-init_aglcore.inc', '', d)} diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc new file mode 100644 index 000000000..b7d346d39 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-graphics/wayland/weston-init_aglcore.inc @@ -0,0 +1 @@ +require common-init.inc diff --git a/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend b/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend new file mode 100644 index 000000000..1e0e66f01 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-oe/recipes-platform/images/agl-image-compositor.bbappend @@ -0,0 +1,3 @@ +IMAGE_INSTALL += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'agl-shell-activator', '', d)} \ +" diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc index 54a6311fb..581f5de99 100644 --- a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc +++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtbase_aglcore.inc @@ -1,3 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/qtbase:" + PACKAGECONFIG_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" PACKAGECONFIG_GL = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch new file mode 100644 index 000000000..ba8a991ed --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation/0001-mapbox-update-API-url-to-match-new-schema.patch @@ -0,0 +1,47 @@ +From 58197439eade86e7efc6fe98116c0092ea429d29 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay <matt.ranostay@konsulko.com> +Date: Tue, 10 Mar 2020 13:59:58 -0700 +Subject: [PATCH] mapbox: update API url to match new schema + +--- + src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp | 7 ++++--- + src/plugins/geoservices/mapbox/qmapboxcommon.h | 2 +- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp b/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp +index 0b128556..bd2be6b6 100644 +--- a/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp ++++ b/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp +@@ -88,12 +88,13 @@ QGeoTiledMapReply *QGeoTileFetcherMapbox::getTileImage(const QGeoTileSpec &spec) + request.setRawHeader("User-Agent", m_userAgent); + + request.setUrl(QUrl(mapboxTilesApiPath + +- ((spec.mapId() >= m_mapIds.size()) ? QStringLiteral("mapbox.streets") : m_mapIds[spec.mapId() - 1]) + QLatin1Char('/') + ++ m_mapIds[m_mapIds.size() - 1] + ++ QStringLiteral("/tiles/256/") + + QString::number(spec.zoom()) + QLatin1Char('/') + + QString::number(spec.x()) + QLatin1Char('/') + + QString::number(spec.y()) + +- ((m_scaleFactor > 1) ? (QLatin1Char('@') + QString::number(m_scaleFactor) + QLatin1String("x.")) : QLatin1String(".")) + +- m_format + QLatin1Char('?') + ++ ((m_scaleFactor > 1) ? (QLatin1Char('@') + QString::number(m_scaleFactor) + QLatin1String("x")) : QLatin1String("")) + ++ QLatin1Char('?') + + QStringLiteral("access_token=") + m_accessToken)); + + QNetworkReply *reply = m_networkManager->get(request); +diff --git a/src/plugins/geoservices/mapbox/qmapboxcommon.h b/src/plugins/geoservices/mapbox/qmapboxcommon.h +index e60c4e83..4b2ea98d 100644 +--- a/src/plugins/geoservices/mapbox/qmapboxcommon.h ++++ b/src/plugins/geoservices/mapbox/qmapboxcommon.h +@@ -46,7 +46,7 @@ + + QT_BEGIN_NAMESPACE + +-static const QString mapboxTilesApiPath = QStringLiteral("http://api.tiles.mapbox.com/v4/"); ++static const QString mapboxTilesApiPath = QStringLiteral("https://api.mapbox.com/"); + + // https://www.mapbox.com/api-documentation/#geocoding + static const QString mapboxGeocodingApiPath = QStringLiteral("https://api.mapbox.com/geocoding/v5/mapbox.places/"); +-- +2.25.0 + diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend new file mode 100644 index 000000000..a0d80075a --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'qtlocation_aglcore.inc', '', d)} diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc new file mode 100644 index 000000000..60867aef0 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtlocation_aglcore.inc @@ -0,0 +1,14 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/qtlocation:" + +SRC_URI += "\ + file://0001-mapbox-update-API-url-to-match-new-schema.patch \ + " + +# Need to explicitly enable the various plugins +PACKAGECONFIG += " \ + geoservices_osm \ + geoservices_here \ + geoservices_itemsoverlay \ + geoservices_mapbox \ + geoservices_mapboxgl \ +" diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland/0001-Fix-timer-leak-and-a-potential-race.patch b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland/0001-Fix-timer-leak-and-a-potential-race.patch deleted file mode 100644 index 642eabc4b..000000000 --- a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland/0001-Fix-timer-leak-and-a-potential-race.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f4d3297e6705cc524729d629bf94db11841dbb24 Mon Sep 17 00:00:00 2001 -From: Simon Yuan <simon.yuan@navico.com> -Date: Thu, 7 Nov 2019 09:22:37 +1300 -Subject: [PATCH] Fix timer leak and a potential race - -The callback timer is now killed immediately before starting a new timer, this -makes sure there is always a single active callback timer. It's unclear why -killing the timer in a separate lambda doesn't always kill the timer in time, -the hypothesis is that if killing the timer comes after starting a new one, then -the previous timer is now left dangling. Whatever the reason is, it makes even -more sense to kill the timer in the same lamda and immediately before starting a -new timer anyway. ---- - src/client/qwaylandwindow.cpp | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index 0df99d9f..93b46bf1 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -1136,13 +1136,12 @@ void QWaylandWindow::handleUpdate() - mWaitingForFrameCallback = true; - mWaitingForUpdate = false; - -- // Stop current frame timer if any, can't use killTimer directly, see comment above. -- int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); -- if (fcbId != -1) -- QMetaObject::invokeMethod(this, [this, fcbId] { killTimer(fcbId); }, Qt::QueuedConnection); -- - // Start a timer for handling the case when the compositor stops sending frame callbacks. -- QMetaObject::invokeMethod(this, [this] { // Again; can't do it directly -+ // Can't use killTimer directly, see comment above. -+ QMetaObject::invokeMethod(this, [this] { -+ int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1); -+ if (fcbId != -1) -+ killTimer(fcbId); - if (mWaitingForFrameCallback) - mFrameCallbackTimerId = startTimer(100); - }, Qt::QueuedConnection); --- -2.25.1 - diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_%.bbappend b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_%.bbappend deleted file mode 100644 index aa55c3a0c..000000000 --- a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'qtwayland_aglcore.inc', '', d)} diff --git a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_aglcore.inc b/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_aglcore.inc deleted file mode 100644 index 08837ce26..000000000 --- a/meta-agl-core/dynamic-layers/meta-qt5/recipes-qt/qt5/qtwayland_aglcore.inc +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/qtwayland:" - -# Patch reported in https://bugreports.qt.io/browse/QTBUG-79838, not upstreamed -SRC_URI += " \ - file://0001-Fix-timer-leak-and-a-potential-race.patch \ - " diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service new file mode 100644 index 000000000..b8d394068 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.service @@ -0,0 +1,12 @@ +[Unit] +Description=Generated file SELinux relabeling +DefaultDependencies=no +After=local-fs.target systemd-machine-id-commit.service +Before=sysinit.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/systemd-selinux-relabel.sh + +[Install] +WantedBy=sysinit.target diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh new file mode 100644 index 000000000..b2557a8d6 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/files/systemd-selinux-relabel.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Update labels on files generated on first boot. +/usr/sbin/restorecon -FRi /etc/systemd /etc/machine-id +if [ $? -eq 0 ]; then + # Disable parent service + # NOTE: The service does not use the first boot functionality + # in systemd as /etc/machine-id is not writeable until + # after it is complete. + systemctl disable systemd-selinux-relabel.service +fi +exit 0 diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb new file mode 100644 index 000000000..7e4f9783c --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-core/systemd/systemd-selinux-relabel_1.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "System unit to relabel systemd generated files" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://systemd-selinux-relabel.service \ + file://systemd-selinux-relabel.sh \ +" + +inherit systemd allarch features_check + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +REQUIRED_DISTRO_FEATURES = "systemd" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/systemd-selinux-relabel.service ${D}${systemd_system_unitdir}/ + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/systemd-selinux-relabel.sh ${D}${sbindir}/ +} + +FILES:${PN} += "${systemd_system_unitdir}" diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb b/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb new file mode 100644 index 000000000..493a46f25 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-platform/packagegroups/packagegroup-agl-core-selinux.bb @@ -0,0 +1,57 @@ +SUMMARY = "SELinux packages" +DESCRIPTION = "SELinux packages required for AGL" +LICENSE = "MIT" + +inherit packagegroup features_check + +REQUIRED_DISTRO_FEATURES = "selinux" + +PACKAGES = " \ + packagegroup-agl-core-selinux \ + packagegroup-agl-core-selinux-devel \ +" + +# +# meta-selinux's packagegroup-core-selinux includes a lot of +# policy development tools with its inclusion of the layer's +# packagegroup-selinux-policycoreutils, which is not really +# desirable for a production image. Create our own base +# packagegroup and an accompanying devel packagegroup that +# agl-devel can trigger pulling in. +# +# NOTES: +# - It seems likely we will always want auditd, so include +# it in the base packagegroup. +# - selinux-autorelabel seems required to handle both the +# edge case of builds done on non-xattr capable filesystems, +# and to allow driving relabeling after potential package +# installation during runtime. +# - packagegroup-selinux-policycoreutils includes a lot of +# things that seem not useful in a lot of systems (e.g. +# the gtk dependent selinux-gui), so for now the devel +# packagegroup aims to include a more minimal set of tools +# aimed at enabling checkpolicy and audit2allow use. +# - Some thought needs to go into whether the relabeling +# fixup packages should be handled separately, as they +# ideally should not go into images using read-only or +# stateless rootfs, but those are image features so we +# cannot check for them here. +# + +RDEPENDS:${PN} = " \ + packagegroup-selinux-minimal \ + auditd \ + selinux-autorelabel \ + systemd-selinux-relabel \ +" + +RDEPENDS:${PN}-devel = " \ + ${BPN} \ + libsepol-bin \ + checkpolicy \ + policycoreutils-loadpolicy \ + policycoreutils-setsebool \ + policycoreutils-hll \ + semodule-utils-semodule-package \ + selinux-python-audit2allow \ +" diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend new file mode 100644 index 000000000..793b049e5 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_0.1.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'selinux-autorelabel_aglcore.inc', '', d)} diff --git a/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc new file mode 100644 index 000000000..67d3843f4 --- /dev/null +++ b/meta-agl-core/dynamic-layers/meta-selinux/recipes-security/selinux-scripts/selinux-autorelabel_aglcore.inc @@ -0,0 +1,4 @@ +do_install:append() { + # Do not force auto relabeling just from the package getting installed + rm -f ${D}/.autorelabel +} |