From 797a54d2d9d5ba0b7ce4e07839f3eb41ac0a9a55 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Thu, 3 Jul 2025 19:28:44 +0200 Subject: [PATCH] cleanup + use latest diya-session-manager --- conf/layer.conf | 2 +- recipes-core/images/base-image.inc | 1 + recipes-core/images/core-image-base.bbappend | 4 ++-- recipes-diya/diya-overlay/diya-overlay.bb | 10 ++++++++-- recipes-diya/diya-overlay/files/diya.pam | 5 +++++ recipes-diya/diya-session-manager/files/daemon.conf | 5 ++++- 6 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 recipes-diya/diya-overlay/files/diya.pam diff --git a/conf/layer.conf b/conf/layer.conf index 2fb6dc4..80a0994 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -20,7 +20,7 @@ INITRAMFS_MAXSIZE="200000" INHERIT += "rm_work" EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs " -DISTRO_FEATURES:append := " opengl " +DISTRO_FEATURES:append := " opengl pam " DISTRO_FEATURES:remove = " x11 vulkan ptest " TOOLCHAIN_TARGET_TASK:append = " libgles3-mesa-dev " # DISTRO_FEATURES:append := " vc4-gfx opengl directfb " diff --git a/recipes-core/images/base-image.inc b/recipes-core/images/base-image.inc index ab5ce3c..a87b4ae 100644 --- a/recipes-core/images/base-image.inc +++ b/recipes-core/images/base-image.inc @@ -20,6 +20,7 @@ IMAGE_INSTALL:append = "kernel-modules \ libglapi \ libudev \ libinput \ + libpam \ diya-overlay \ seatd \ libxkbcommon \ diff --git a/recipes-core/images/core-image-base.bbappend b/recipes-core/images/core-image-base.bbappend index f4d0663..6569707 100644 --- a/recipes-core/images/core-image-base.bbappend +++ b/recipes-core/images/core-image-base.bbappend @@ -20,9 +20,9 @@ IMAGE_INSTALL:append = "pango \ gdk-pixbuf \ gtk4 \ gtk4-layer-shell \ - libadwaita libpam \ + libadwaita \ gobject-introspection \ - wayland wayland-protocols \ + wayland wayland-protocols wlroots \ foot \ mc \ gdbserver gdb \ diff --git a/recipes-diya/diya-overlay/diya-overlay.bb b/recipes-diya/diya-overlay/diya-overlay.bb index 75fd38b..5c4d1ea 100644 --- a/recipes-diya/diya-overlay/diya-overlay.bb +++ b/recipes-diya/diya-overlay/diya-overlay.bb @@ -1,5 +1,6 @@ DESCRIPTION = "Auto configuration deployment from media" DEPENDS = "" +RDEPENDS:${PN} = "bash" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" @@ -7,7 +8,9 @@ SRC_URI += "file://confd \ file://expandfs.sh \ file://80_diya \ file://fs_resize \ - file://boot-to-recovery" + file://boot-to-recovery \ + file://diya.pam \ + file://xdg-terminal-exec" inherit update-rc.d useradd @@ -30,7 +33,10 @@ do_install() { install -m 0755 ${WORKDIR}/expandfs.sh ${D}/sbin/expandfs.sh install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/ - + install -d ${D}/etc/pam.d + install -m 0644 ${WORKDIR}/diya.pam ${D}${sysconfdir}/pam.d/diya + install -d ${D}/usr/bin + install -m 0755 ${WORKDIR}/xdg-terminal-exec ${D}/usr/bin cat << EOF > ${DEPLOY_DIR_IMAGE}/diya-config.txt recovery=false recovery_image=recovery-${MACHINE}.cpio.gz diff --git a/recipes-diya/diya-overlay/files/diya.pam b/recipes-diya/diya-overlay/files/diya.pam new file mode 100644 index 0000000..f4476c8 --- /dev/null +++ b/recipes-diya/diya-overlay/files/diya.pam @@ -0,0 +1,5 @@ +#%PAM-1.0 + +auth include common-auth +account include common-account +session include common-session \ No newline at end of file diff --git a/recipes-diya/diya-session-manager/files/daemon.conf b/recipes-diya/diya-session-manager/files/daemon.conf index 824aa4c..d27f942 100644 --- a/recipes-diya/diya-session-manager/files/daemon.conf +++ b/recipes-diya/diya-session-manager/files/daemon.conf @@ -21,4 +21,7 @@ login_session_user = xdg # login session is successful # the logged in user will own this session -user_session_command = diya-session-launch diyac -x diya-shell \ No newline at end of file +user_session_command = diya-session-launch diyac -x diya-shell + +# PAM service used by the daemon for authentication +pam_service = diya \ No newline at end of file