From 54c1b51066ac7e38a6eb2e05d6579e6c0aed9304 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Wed, 28 Feb 2018 20:22:25 +0100 Subject: af-main: Refactor of user session management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changes how user session are started and handled within systemd. This evolution add a tiny program to start and handle user sessions: afm-user-session. This is the first step of a serie because, actually, due to platform restrictions, the common users if started this way will not be able to run correctly (issues with wayland/weston and with handling of CGROUP2 with Smack LSM) Also fixes memory leaks and improves build process. Bug-AGL: SPEC-545 Bug-AGL: SPEC-1016 Change-Id: Icaf7c575633fc663a3df0ffee683b22cc087bb16 Signed-off-by: José Bollo --- .../agl-login-manager/agl-login-manager_0.1.bb | 18 +----------------- .../agl-login-manager/files/user-config.path | 8 -------- .../agl-login-manager/files/user-config.service | 9 --------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 meta-agl/recipes-config/agl-login-manager/files/user-config.path delete mode 100644 meta-agl/recipes-config/agl-login-manager/files/user-config.service (limited to 'meta-agl') diff --git a/meta-agl/recipes-config/agl-login-manager/agl-login-manager_0.1.bb b/meta-agl/recipes-config/agl-login-manager/agl-login-manager_0.1.bb index 22f52c4ec..cd6dc6792 100644 --- a/meta-agl/recipes-config/agl-login-manager/agl-login-manager_0.1.bb +++ b/meta-agl/recipes-config/agl-login-manager/agl-login-manager_0.1.bb @@ -5,28 +5,12 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 inherit agl-graphical -SRC_URI += " \ - file://user-config.service \ - file://user-config.path \ -" - LOGIN_USER ??="1001 1002" RDEPENDS_${PN} += "af-main" do_install_append() { - install -d ${D}${systemd_user_unitdir}/default.target.wants - install -m 0644 ${WORKDIR}/user-config.service ${D}${systemd_user_unitdir} - install -m 0644 ${WORKDIR}/user-config.path ${D}${systemd_user_unitdir} - - sed -e 's,@DISPLAY_XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \ - -i ${D}${systemd_user_unitdir}/user-config.service - sed -e 's,@DISPLAY_XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \ - -i ${D}${systemd_user_unitdir}/user-config.path - - ln -s ../user-config.path ${D}${systemd_user_unitdir}/default.target.wants/user-config.path - install -d ${D}${systemd_system_unitdir}/multi-user.target.wants/ for AGL_USER in ${LOGIN_USER};do @@ -34,4 +18,4 @@ do_install_append() { done } -FILES_${PN} += "${systemd_user_unitdir} ${systemd_system_unitdir}" +FILES_${PN} += "${systemd_system_unitdir}" diff --git a/meta-agl/recipes-config/agl-login-manager/files/user-config.path b/meta-agl/recipes-config/agl-login-manager/files/user-config.path deleted file mode 100644 index 07f61f646..000000000 --- a/meta-agl/recipes-config/agl-login-manager/files/user-config.path +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=AGL user config unit path - -[Path] -PathExists=@DISPLAY_XDG_RUNTIME_DIR@/wayland-0 - -[Install] -WantedBy=default.target diff --git a/meta-agl/recipes-config/agl-login-manager/files/user-config.service b/meta-agl/recipes-config/agl-login-manager/files/user-config.service deleted file mode 100644 index a66ba5327..000000000 --- a/meta-agl/recipes-config/agl-login-manager/files/user-config.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=AGL user config - -[Service] -ExecStart=/bin/ln -sf @DISPLAY_XDG_RUNTIME_DIR@/wayland-0 %t/ -RemainAfterExit=yes - -[Install] -WantedBy=default.target -- cgit 1.2.3-korg