All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-arago][scarthgap][PATCH 0/2] Add display manager and required configs
@ 2025-03-12 23:26 rs
  2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0 rs
  2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 2/2] weston-init: weston-init -> weston-init-arago rs
  0 siblings, 2 replies; 4+ messages in thread
From: rs @ 2025-03-12 23:26 UTC (permalink / raw)
  To: reatmon, denys; +Cc: meta-arago, afd, detheridge, vijayp

From: Randolph Sapp <rs@ti.com>

Add emptty and relevant configs to replace weston-init. This is a modified
version of the proposal I made to oe-core to get around a sequencing bug that's
been around for a while, but has recently become an issue for us.

As it stands weston-init has no idea what drm devices it should wait on or bind
to. We could introduce a udev rule to track tidss and pvrsrvkm registered
devices and introduce systemd dependencies around those new .device units, or we
could add a proper display manager that's already capable of waiting for drm
devices and has the potential to handle hotplug events in the future.

I'm preferable to the second option instead of making rules and modifications to
the service file for multiple platform configs.

This series adds emptty as a display manager and converts our bbappend for
weston-init to a stand alone version of weston-init named weston-init-arago.
This package has the required config files for emptty to automatically login the
weston user like weston-init does.

This does remove the weston systemd unit and global weston socket. This was
probably for the best as it was not really standard behavior. It just made it
"easy" to run arbitrary GUI applications as root, which is never advised.

Randolph Sapp (2):
  emptty: add version 0.13.0
  weston-init: weston-init -> weston-init-arago

 meta-arago-distro/conf/distro/arago.conf      |  3 +-
 meta-arago-distro/conf/layer.conf             |  4 +-
 .../packagegroup-arago-tisdk-graphics.bb      |  2 +-
 .../recipes-graphics/emptty/emptty/init       | 26 +++++++
 .../recipes-graphics/emptty/emptty/pamconf    | 10 +++
 .../recipes-graphics/emptty/emptty_0.13.0.bb  | 78 +++++++++++++++++++
 .../wayland/weston-init-arago.bb              | 72 +++++++++++++++++
 .../beaglebone/weston.ini                     |  0
 .../wayland/weston-init-arago/emptty.conf     | 77 ++++++++++++++++++
 .../weston-launch-calibrator.sh               |  0
 .../weston.ini                                |  0
 .../wayland/weston-init.bbappend              | 14 ----
 12 files changed, 268 insertions(+), 18 deletions(-)
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/init
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/beaglebone/weston.ini (100%)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston-launch-calibrator.sh (100%)
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston.ini (100%)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend

-- 
2.48.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0
  2025-03-12 23:26 [meta-arago][scarthgap][PATCH 0/2] Add display manager and required configs rs
@ 2025-03-12 23:26 ` rs
  2025-03-18 16:33   ` Denys Dmytriyenko
  2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 2/2] weston-init: weston-init -> weston-init-arago rs
  1 sibling, 1 reply; 4+ messages in thread
From: rs @ 2025-03-12 23:26 UTC (permalink / raw)
  To: reatmon, denys; +Cc: meta-arago, afd, detheridge, vijayp

From: Randolph Sapp <rs@ti.com>

Add emptty, a "Dead simple CLI Display Manager on TTY". This is a
relatively lightweight display manager that supports x11 as well as
wayland though both a CLI and automatic login mechanism.

This can effetely replace the custom init scripts for both x11
(xserver-nodm-init) and wayland (weston-init) with a single tool with
more verbose logging capabilities.

This also addresses the current issue of with weston occasionally
starting before all the required devices are registered with the drm
subsystem.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../recipes-graphics/emptty/emptty/init       | 26 +++++++
 .../recipes-graphics/emptty/emptty/pamconf    | 10 +++
 .../recipes-graphics/emptty/emptty_0.13.0.bb  | 78 +++++++++++++++++++
 3 files changed, 114 insertions(+)
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/init
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
 create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb

diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty/init b/meta-arago-distro/recipes-graphics/emptty/emptty/init
new file mode 100644
index 00000000..52493142
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/emptty/emptty/init
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+PIDFILE=/var/run/emptty.pid
+
+# source function library
+. /etc/init.d/functions
+
+case "$1" in
+	start)
+		echo "Starting display manager: emptty"
+		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
+		;;
+	stop)
+		echo "Stopping display manager: emptty"
+		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
+		;;
+	restart)
+		start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/bin/emptty
+		sleep 2
+		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
+		;;
+	*)
+		echo "usage: $0 { start | stop | restart }"
+		;;
+esac
+
diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf b/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
new file mode 100644
index 00000000..9cbfd6c4
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth            sufficient      pam_succeed_if.so user ingroup nopasswdlogin
+auth            include         common-auth
+-auth           optional        pam_gnome_keyring.so
+-auth           optional        pam_kwallet5.so
+account         include         common-account
+session         include         common-session
+-session        optional        pam_gnome_keyring.so auto_start
+-session        optional        pam_kwallet5.so auto_start force_run
+password        include         common-password
diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb b/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
new file mode 100644
index 00000000..7129426d
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
@@ -0,0 +1,78 @@
+SUMMARY = "Dead simple CLI Display Manager on TTY"
+HOMEPAGE = "https://github.com/tvrzna/emptty"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d1e4d12c7d1d17367ba5668706a405ba"
+
+GO_IMPORT = "github.com/tvrzna/emptty"
+GO_IMPORT_pam = "github.com/msteinert/pam"
+SRC_URI = "\
+    git://${GO_IMPORT}.git;protocol=https;branch=master \
+    git://${GO_IMPORT_pam}.git;protocol=https;branch=master;name=pam;destsuffix=${S}/src/${GO_IMPORT_pam} \
+    file://pamconf \
+    "
+SRCREV = "4046552b6f5cc1cf76ce8bf333e04e16c59febca"
+SRCREV_pam = "50ded1b0e7864b9bf75005eb945a8ec826bcf69d"
+
+SRCREV_FORMAT .= "_pam"
+
+PACKAGES:append = " ${PN}-conf"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam x11', d)}"
+PACKAGECONFIG[pam] = ",,libpam"
+PACKAGECONFIG[x11] = ",,virtual/libx11"
+
+GO_TAGS = ""
+GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pam', '', ',nopam', d)}"
+GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ',noxlib', d)}"
+
+GOBUILDFLAGS:append = " -tags=${GO_TAGS}"
+
+export GO111MODULE="off"
+
+inherit go systemd
+
+DEPENDS:append = " gzip"
+
+do_install () {
+    # general collateral
+    install -Dm755 ${B}/${GO_BUILD_BINDIR}/emptty ${D}${bindir}/emptty
+    oe_runmake -C ${S}/src/${GO_IMPORT} DESTDIR=${D} install-config
+    install -d ${D}${mandir}/man1
+    gzip -cn ${S}/src/${GO_IMPORT}/res/emptty.1 > ${D}${mandir}/man1/emptty.1.gz
+
+    # pam config
+    if "${@bb.utils.contains('PACKAGECONFIG','pam','true','false',d)}"
+    then
+        install -Dm644 ${WORKDIR}/pamconf ${D}${sysconfdir}/pam.d/emptty
+    fi
+
+    # init services
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}
+    then
+        oe_runmake -C ${S}/src/${GO_IMPORT} DESTDIR=${D} install-systemd
+    else
+        install -Dm755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/emptty
+    fi
+}
+
+FILES:${PN} = "\
+    ${systemd_system_unitdir}/emptty.service \
+    ${sysconfdir}/init.d/emptty \
+    ${bindir}/emptty \
+    ${mandir}/man1/emptty.1.gz \
+    ${sysconfdir}/pam.d/emptty \
+"
+
+FILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf"
+CONFFILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf"
+RPROVIDES:${PN}-conf:append = " virtual-emptty-conf"
+
+RDEPENDS:${PN}:append = " virtual-emptty-conf pam-plugin-succeed-if"
+
+SYSTEMD_SERVICE:${PN} = "emptty.service"
+
+INITSCRIPT_NAME = "emptty"
+INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"
+
+inherit update-rc.d systemd
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-arago][scarthgap][PATCH 2/2] weston-init: weston-init -> weston-init-arago
  2025-03-12 23:26 [meta-arago][scarthgap][PATCH 0/2] Add display manager and required configs rs
  2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0 rs
@ 2025-03-12 23:26 ` rs
  1 sibling, 0 replies; 4+ messages in thread
From: rs @ 2025-03-12 23:26 UTC (permalink / raw)
  To: reatmon, denys; +Cc: meta-arago, afd, detheridge, vijayp

From: Randolph Sapp <rs@ti.com>

Make a weston-init-arago package to replace weston-init and use the
emptty display manager. This is based around my initial RFC to oe-core.
This should only be necessary on scarthgap as I doubt any of the changes
proposed on that thread would be approved for a backport.

This also addresses the current issue of with weston occasionally
starting before all the required devices are registered with the drm
subsystem.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-arago-distro/conf/distro/arago.conf      |  3 +-
 meta-arago-distro/conf/layer.conf             |  4 +-
 .../packagegroup-arago-tisdk-graphics.bb      |  2 +-
 .../wayland/weston-init-arago.bb              | 72 +++++++++++++++++
 .../beaglebone/weston.ini                     |  0
 .../wayland/weston-init-arago/emptty.conf     | 77 +++++++++++++++++++
 .../weston-launch-calibrator.sh               |  0
 .../weston.ini                                |  0
 .../wayland/weston-init.bbappend              | 14 ----
 9 files changed, 154 insertions(+), 18 deletions(-)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/beaglebone/weston.ini (100%)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston-launch-calibrator.sh (100%)
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston.ini (100%)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend

diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
index 24d8b005..b536e5b1 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -69,7 +69,8 @@ PACKAGECONFIG:pn-curl = "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6",
 PACKAGECONFIG:pn-glmark2 = "drm-gles2 wayland-gles2"
 
 # Set this to empty string to prevent xwayland config from being added
-PACKAGECONFIG:pn-weston-init = ""
+PACKAGECONFIG:pn-weston-init-arago = ""
+PREFERRED_RPROVIDER_virtual-emptty-conf = "weston-init-arago"
 
 # Enable testing for opencl and vulkan with piglit
 PACKAGECONFIG:append:pn-piglit = " \
diff --git a/meta-arago-distro/conf/layer.conf b/meta-arago-distro/conf/layer.conf
index 4a0e424d..8eb59e61 100644
--- a/meta-arago-distro/conf/layer.conf
+++ b/meta-arago-distro/conf/layer.conf
@@ -36,8 +36,8 @@ BBFILES_DYNAMIC += " \
 BB_DANGLINGAPPENDS_WARNONLY = "true"
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
-    weston-init->weston \
-    weston-init->kbd \
+    weston-init-arago->weston \
+    weston-init-arago->kbd \
 "
 
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
index a82db154..4f2f00b9 100644
--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
@@ -7,7 +7,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit packagegroup
 
 GFX_WAYLAND = "\
-    weston-init \
+    weston-init-arago \
     weston-examples \
 "
 
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
new file mode 100644
index 00000000..033c32f1
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Configuration files for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI:append = " \
+    file://weston.ini \
+    file://weston-launch-calibrator.sh \
+    file://emptty.conf \
+"
+
+S = "${WORKDIR}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)}"
+PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
+PACKAGECONFIG:append:qemuppc64 = " use-pixman"
+
+PACKAGECONFIG[xwayland] = ",,"
+PACKAGECONFIG[no-idle-timeout] = ",,"
+PACKAGECONFIG[use-pixman] = ",,"
+
+DEFAULTBACKEND ??= ""
+DEFAULTBACKEND:qemuall ?= "drm"
+
+do_install() {
+	install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
+	install -D -p -m0644 ${WORKDIR}/emptty.conf ${D}${sysconfdir}/emptty/conf
+
+	if [ -n "${DEFAULTBACKEND}" ]; then
+		sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	install -dm 755 -o weston -g weston ${D}/home/weston
+	install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator
+}
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+
+# rdepends on weston which depends on virtual/egl
+#
+require ${COREBASE}/meta/recipes-graphics/wayland/required-distro-features.inc
+
+RDEPENDS:${PN} = "weston kbd ${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'weston-xwayland', '', d)} emptty"
+
+FILES:${PN} += "\
+    ${sysconfdir}/xdg/weston/weston.ini \
+    ${sysconfdir}/emptty/conf \
+    /home/weston \
+    ${bindir}/weston-launch-calibrator \
+    "
+
+CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/emptty/conf"
+RPROVIDES:${PN}:append = " virtual-emptty-conf"
+RCONFLICTS:${PN} += "weston-init"
+
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,nopasswdlogin weston"
+GROUPADD_PARAM:${PN} = "-r wayland; -r render; -r nopasswdlogin"
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/beaglebone/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/beaglebone/weston.ini
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/beaglebone/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/beaglebone/weston.ini
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
new file mode 100644
index 00000000..7520bc0b
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
@@ -0,0 +1,77 @@
+# TTY, where emptty will start.
+TTY_NUMBER=7
+
+# Enables switching to defined TTY number.
+SWITCH_TTY=true
+
+# Enables printing of /etc/issue in daemon mode.
+PRINT_ISSUE=true
+
+# Enables printing of default motd, /etc/emptty/motd or /etc/emptty/motd-gen.sh.
+PRINT_MOTD=true
+
+# Preselected user, if AUTOLOGIN is enabled, this user is logged in.
+DEFAULT_USER=weston
+
+# Enables Autologin, if DEFAULT_USER is defined and part of nopasswdlogin group. Possible values are "true" or "false".
+AUTOLOGIN=true
+
+# The default session used, if Autologin is enabled. If session is not found in list of session, it proceeds to manual selection.
+AUTOLOGIN_SESSION=Weston
+
+# If Autologin is enabled and session does not start correctly, the number of retries in short period is kept to eventually stop the infinite loop of restarts. -1 is for infinite retries, 0 is for no retry.
+AUTOLOGIN_MAX_RETRY=0
+
+# Default LANG, if user does not have set own in init script.
+#LANG=en_US.UTF-8
+
+# Starts desktop with calling "dbus-launch".
+DBUS_LAUNCH=true
+
+# Starts Xorg desktop with calling "~/.xinitrc" script, if is true, file exists and selected WM/DE is Xorg session, it overrides DBUS_LAUNCH.
+XINITRC_LAUNCH=false
+
+# Prints available WM/DE each on new line instead of printing on single line.
+VERTICAL_SELECTION=false
+
+# Defines the way, how is logging handled. Possible values are "rotate", "appending" or "disabled".
+#LOGGING=rotate
+
+# Overrides path of log file
+#LOGGING_FILE=/var/log/emptty/[TTY_NUMBER].log
+
+# Arguments passed to Xorg server.
+#XORG_ARGS=
+
+# Allows to use dynamic motd script to generate custom MOTD.
+#DYNAMIC_MOTD=false
+
+# Allows to override default path to dynamic motd.
+#DYNAMIC_MOTD_PATH=/etc/emptty/motd-gen.sh
+
+# Allows to override default path to static motd.
+#MOTD_PATH=/etc/emptty/motd
+
+# Foreground color, available only in daemon mode.
+#FG_COLOR=LIGHT_BLACK
+
+# Background color, available only in daemon mode.
+#BG_COLOR=BLACK
+
+# Enables numlock in daemon mode. Possible values are "true" or "false".
+#ENABLE_NUMLOCK=false
+
+# Defines the way, how is logging of session errors handled. Possible values are "rotate", "appending" or "disabled".
+SESSION_ERROR_LOGGING=rotate
+
+# Overrides path of session errors log file
+#SESSION_ERROR_LOGGING_FILE=/var/log/emptty/session-errors.[TTY_NUMBER].log
+
+# If set true, it will not use `.emptty-xauth` file, but the standard `~/.Xauthority` file. This allows to handle xauth issues.
+#DEFAULT_XAUTHORITY=false
+
+#If set true, Xorg will be started as rootless, if system allows and emptty is running in daemon mode.
+#ROOTLESS_XORG=false
+
+#If set true, environmental groups are printed to differ Xorg/Wayland/Custom/UserCustom desktops.
+IDENTIFY_ENVS=false
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston-launch-calibrator.sh
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston-launch-calibrator.sh
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston.ini
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston.ini
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
deleted file mode 100644
index 4d5db58c..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
+++ /dev/null
@@ -1,14 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-PR:append = ".arago12"
-
-SRC_URI:append = " \
-    file://weston.ini \
-    file://weston-launch-calibrator.sh \
-"
-
-do_install:append() {
-    install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator
-}
-
-FILES:${PN}:append = "${bindir}/weston-launch-calibrator"
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0
  2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0 rs
@ 2025-03-18 16:33   ` Denys Dmytriyenko
  0 siblings, 0 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2025-03-18 16:33 UTC (permalink / raw)
  To: rs; +Cc: reatmon, denys, meta-arago, afd, detheridge, vijayp

On Wed, Mar 12, 2025 at 06:26:28PM -0500, Randolph Sapp via lists.yoctoproject.org wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> Add emptty, a "Dead simple CLI Display Manager on TTY". This is a
> relatively lightweight display manager that supports x11 as well as
> wayland though both a CLI and automatic login mechanism.
> 
> This can effetely replace the custom init scripts for both x11
> (xserver-nodm-init) and wayland (weston-init) with a single tool with
> more verbose logging capabilities.
> 
> This also addresses the current issue of with weston occasionally
> starting before all the required devices are registered with the drm
> subsystem.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>  .../recipes-graphics/emptty/emptty/init       | 26 +++++++
>  .../recipes-graphics/emptty/emptty/pamconf    | 10 +++
>  .../recipes-graphics/emptty/emptty_0.13.0.bb  | 78 +++++++++++++++++++
>  3 files changed, 114 insertions(+)
>  create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/init
>  create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
>  create mode 100644 meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
> 
> diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty/init b/meta-arago-distro/recipes-graphics/emptty/emptty/init
> new file mode 100644
> index 00000000..52493142
> --- /dev/null
> +++ b/meta-arago-distro/recipes-graphics/emptty/emptty/init
> @@ -0,0 +1,26 @@
> +#!/bin/sh
> +
> +PIDFILE=/var/run/emptty.pid
> +
> +# source function library
> +. /etc/init.d/functions
> +
> +case "$1" in
> +	start)
> +		echo "Starting display manager: emptty"
> +		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
> +		;;
> +	stop)
> +		echo "Stopping display manager: emptty"
> +		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
> +		;;
> +	restart)
> +		start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/bin/emptty
> +		sleep 2
> +		start-stop-daemon -S -p $PIDFILE -x /usr/bin/emptty
> +		;;
> +	*)
> +		echo "usage: $0 { start | stop | restart }"
> +		;;
> +esac
> +
> diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf b/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
> new file mode 100644
> index 00000000..9cbfd6c4
> --- /dev/null
> +++ b/meta-arago-distro/recipes-graphics/emptty/emptty/pamconf
> @@ -0,0 +1,10 @@
> +#%PAM-1.0
> +auth            sufficient      pam_succeed_if.so user ingroup nopasswdlogin
> +auth            include         common-auth
> +-auth           optional        pam_gnome_keyring.so
> +-auth           optional        pam_kwallet5.so
> +account         include         common-account
> +session         include         common-session
> +-session        optional        pam_gnome_keyring.so auto_start
> +-session        optional        pam_kwallet5.so auto_start force_run
> +password        include         common-password
> diff --git a/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb b/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
> new file mode 100644
> index 00000000..7129426d
> --- /dev/null
> +++ b/meta-arago-distro/recipes-graphics/emptty/emptty_0.13.0.bb
> @@ -0,0 +1,78 @@
> +SUMMARY = "Dead simple CLI Display Manager on TTY"
> +HOMEPAGE = "https://github.com/tvrzna/emptty"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=d1e4d12c7d1d17367ba5668706a405ba"
> +
> +GO_IMPORT = "github.com/tvrzna/emptty"
> +GO_IMPORT_pam = "github.com/msteinert/pam"
> +SRC_URI = "\
> +    git://${GO_IMPORT}.git;protocol=https;branch=master \
> +    git://${GO_IMPORT_pam}.git;protocol=https;branch=master;name=pam;destsuffix=${S}/src/${GO_IMPORT_pam} \
> +    file://pamconf \
> +    "
> +SRCREV = "4046552b6f5cc1cf76ce8bf333e04e16c59febca"
> +SRCREV_pam = "50ded1b0e7864b9bf75005eb945a8ec826bcf69d"
> +
> +SRCREV_FORMAT .= "_pam"
> 
> +PACKAGES:append = " ${PN}-conf"

Better use += here.


> +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam x11', d)}"
> +PACKAGECONFIG[pam] = ",,libpam"
> +PACKAGECONFIG[x11] = ",,virtual/libx11"
> +
> +GO_TAGS = ""
> +GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pam', '', ',nopam', d)}"
> +GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ',noxlib', d)}"
> +
> +GOBUILDFLAGS:append = " -tags=${GO_TAGS}"
> +
> +export GO111MODULE="off"
> +
> +inherit go systemd
> +
> +DEPENDS:append = " gzip"

Better use += here. Also, you probably want gzip-native instead.


> +do_install () {
> +    # general collateral
> +    install -Dm755 ${B}/${GO_BUILD_BINDIR}/emptty ${D}${bindir}/emptty
> +    oe_runmake -C ${S}/src/${GO_IMPORT} DESTDIR=${D} install-config
> +    install -d ${D}${mandir}/man1
> +    gzip -cn ${S}/src/${GO_IMPORT}/res/emptty.1 > ${D}${mandir}/man1/emptty.1.gz
> +
> +    # pam config
> +    if "${@bb.utils.contains('PACKAGECONFIG','pam','true','false',d)}"
> +    then
> +        install -Dm644 ${WORKDIR}/pamconf ${D}${sysconfdir}/pam.d/emptty
> +    fi
> +
> +    # init services
> +    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}
> +    then
> +        oe_runmake -C ${S}/src/${GO_IMPORT} DESTDIR=${D} install-systemd
> +    else
> +        install -Dm755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/emptty
> +    fi
> +}
> +
> +FILES:${PN} = "\
> +    ${systemd_system_unitdir}/emptty.service \
> +    ${sysconfdir}/init.d/emptty \
> +    ${bindir}/emptty \
> +    ${mandir}/man1/emptty.1.gz \
> +    ${sysconfdir}/pam.d/emptty \
> +"
> +
> +FILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf"

Better use += here.


> +CONFFILES:${PN}-conf:append = " ${sysconfdir}/emptty/conf"

Same


> +RPROVIDES:${PN}-conf:append = " virtual-emptty-conf"

Same


> +RDEPENDS:${PN}:append = " virtual-emptty-conf pam-plugin-succeed-if"

Same


> +SYSTEMD_SERVICE:${PN} = "emptty.service"
> +
> +INITSCRIPT_NAME = "emptty"
> +INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
> +INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"
> +
> +inherit update-rc.d systemd

systemd is inherited twice - better have inherit lines together to avoid 
issues like that.

-- 
Denys


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-18 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 23:26 [meta-arago][scarthgap][PATCH 0/2] Add display manager and required configs rs
2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0 rs
2025-03-18 16:33   ` Denys Dmytriyenko
2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 2/2] weston-init: weston-init -> weston-init-arago rs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.