diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-10-12 23:10:07 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-11-30 13:15:19 +0000 |
commit | 97b29fd1c5339ea1590051fb1216d57fe52d345a (patch) | |
tree | 6af1e993c84ab24d42737c73bef0a9a6c1f47504 /meta-agl | |
parent | 5fccb1081844131fcc9065cf13d1b28a80e26c2d (diff) |
af-main: Handle users from the system scope
To simplify the management of users while keeping
systemd as launcher, this evolution anchors the
framework in the system level.
This also introduce a new version of afm-system-daemon
that is 100% a binding of the binder and that
consequently offers natively a websocket API.
Change-Id: I1bbb48d0c01d0f6fd3c8dfca90febbe8147cf204
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/12139
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl')
4 files changed, 7 insertions, 37 deletions
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 44a4fd36a..22f52c4ec 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 @@ -8,18 +8,14 @@ inherit agl-graphical SRC_URI += " \ file://user-config.service \ file://user-config.path \ - file://agl-user-session.pamd \ - file://agl-user-session@.service \ " LOGIN_USER ??="1001 1002" -do_install_append() { +RDEPENDS_${PN} += "af-main" - install -d ${D}${sysconfdir}/pam.d/ - install -m 0644 ${WORKDIR}/agl-user-session.pamd ${D}${sysconfdir}/pam.d/agl-user-session +do_install_append() { - install -d ${D}${systemd_user_unitdir} 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} @@ -29,19 +25,13 @@ do_install_append() { sed -e 's,@DISPLAY_XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \ -i ${D}${systemd_user_unitdir}/user-config.path - ln -sf ${systemd_user_unitdir}/user-config.path ${D}${systemd_user_unitdir}/default.target.wants + ln -s ../user-config.path ${D}${systemd_user_unitdir}/default.target.wants/user-config.path - install -d ${D}${systemd_unitdir}/system/ - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ - install -m 0644 ${WORKDIR}/agl-user-session@.service ${D}${systemd_unitdir}/system/ + install -d ${D}${systemd_system_unitdir}/multi-user.target.wants/ for AGL_USER in ${LOGIN_USER};do - ln -sf ${systemd_system_unitdir}/agl-user-session@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/agl-user-session@${AGL_USER}.service; + ln -s ../afm-user-session@.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-user-session@${AGL_USER}.service done } -FILES_${PN} += "${sysconfdir}/pam.d/agl-user-session" -FILES_${PN} += "${systemd_user_unitdir}/*" -FILES_${PN} += "${libdir}/systemd/user/default.target.wants/*" -FILES_${PN} += "${systemd_unitdir}/system/agl-user-session@.service" -FILES_${PN} += "${systemd_unitdir}/system/multi-user.target.wants/*" +FILES_${PN} += "${systemd_user_unitdir} ${systemd_system_unitdir}" diff --git a/meta-agl/recipes-config/agl-login-manager/files/agl-user-session.pamd b/meta-agl/recipes-config/agl-login-manager/files/agl-user-session.pamd deleted file mode 100644 index 462c3648b..000000000 --- a/meta-agl/recipes-config/agl-login-manager/files/agl-user-session.pamd +++ /dev/null @@ -1,3 +0,0 @@ -account include common-account -session required pam_loginuid.so -session include common-session diff --git a/meta-agl/recipes-config/agl-login-manager/files/agl-user-session@.service b/meta-agl/recipes-config/agl-login-manager/files/agl-user-session@.service deleted file mode 100644 index b128a40c8..000000000 --- a/meta-agl/recipes-config/agl-login-manager/files/agl-user-session@.service +++ /dev/null @@ -1,18 +0,0 @@ -# This file is part of systemd. -# -# systemd 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; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=User Manager for UID %i -After=systemd-user-sessions.service - -[Service] -User=%i -PAMName=agl-user-session -ExecStart=-/bin/sleep 2147483648 -KillMode=mixed -Delegate=yes -TasksMax=infinity diff --git a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts index 87ec0e13b..1d1a5a059 100755 --- a/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts +++ b/meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts @@ -40,6 +40,7 @@ exec_postinst_scriptlets() { remove_agl_pi_dir=1 exec_postinst_scriptlets +systemctl daemon-reload # since all postinstalls executed successfully, remove the postinstalls directory if [ $remove_agl_pi_dir = 1 ]; then |