From 01826e053d4ee9cc15a5eac673667222702f97c0 Mon Sep 17 00:00:00 2001 From: brl Date: Mon, 12 Feb 2018 22:09:48 -0500 Subject: [PATCH] user-rootfs called appimg now, pass it on --- .../default-user-rootfs.bb | 19 --------------- .../files/default-user-rootfs.service | 13 ---------- .../packagegroup-citadel-desktop.bb | 3 ++- .../files/primary-user-appimg.service | 14 +++++++++++ .../primary-user-appimg/files/primary.nspawn | 6 +++++ .../primary-user-appimg/files/run-in-image | 2 ++ .../primary-user-appimg.bb | 24 +++++++++++++++++++ 7 files changed, 48 insertions(+), 33 deletions(-) delete mode 100644 meta-citadel-distro/recipes-core/default-user-rootfs/default-user-rootfs.bb delete mode 100644 meta-citadel-distro/recipes-core/default-user-rootfs/files/default-user-rootfs.service create mode 100644 meta-citadel-distro/recipes-core/primary-user-appimg/files/primary-user-appimg.service create mode 100644 meta-citadel-distro/recipes-core/primary-user-appimg/files/primary.nspawn create mode 100644 meta-citadel-distro/recipes-core/primary-user-appimg/files/run-in-image create mode 100644 meta-citadel-distro/recipes-core/primary-user-appimg/primary-user-appimg.bb diff --git a/meta-citadel-distro/recipes-core/default-user-rootfs/default-user-rootfs.bb b/meta-citadel-distro/recipes-core/default-user-rootfs/default-user-rootfs.bb deleted file mode 100644 index ec44ff9..0000000 --- a/meta-citadel-distro/recipes-core/default-user-rootfs/default-user-rootfs.bb +++ /dev/null @@ -1,19 +0,0 @@ - -DESCRIPTION = "Install systemd unit file to automatically start default-user-rootfs container" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -SECTION = "" -DEPENDS = "" - -inherit systemd - -SRC_URI = "file://default-user-rootfs.service" - -S = "${WORKDIR}" - -SYSTEMD_SERVICE_${PN} = "default-user-rootfs.service" - -do_install() { - install -d ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/default-user-rootfs.service ${D}${systemd_system_unitdir} -} diff --git a/meta-citadel-distro/recipes-core/default-user-rootfs/files/default-user-rootfs.service b/meta-citadel-distro/recipes-core/default-user-rootfs/files/default-user-rootfs.service deleted file mode 100644 index df25021..0000000 --- a/meta-citadel-distro/recipes-core/default-user-rootfs/files/default-user-rootfs.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Default User Image -ConditionPathExists=/storage/machines/default-user-rootfs - -[Service] -ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/storage/machines/default-user-rootfs -KillMode=mixed -Type=notify -RestartForceExitStatus=133 -SuccessExitStatus=133 - -[Install] -WantedBy=multi-user.target diff --git a/meta-citadel-distro/recipes-core/packagegroups/packagegroup-citadel-desktop.bb b/meta-citadel-distro/recipes-core/packagegroups/packagegroup-citadel-desktop.bb index 977ad27..b4c0fa3 100644 --- a/meta-citadel-distro/recipes-core/packagegroups/packagegroup-citadel-desktop.bb +++ b/meta-citadel-distro/recipes-core/packagegroups/packagegroup-citadel-desktop.bb @@ -74,5 +74,6 @@ RDEPENDS_${PN} = "\ cryptsetup \ e2fsprogs \ dosfstools \ - default-user-rootfs \ + btrfs-tools \ + primary-user-appimg\ " diff --git a/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary-user-appimg.service b/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary-user-appimg.service new file mode 100644 index 0000000..a6347ae --- /dev/null +++ b/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary-user-appimg.service @@ -0,0 +1,14 @@ +[Unit] +Description=Default User appimg +ConditionPathExists=/storage/appimg/primary/rootfs + +[Service] +ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --machine=primary --link-journal=try-guest --directory=/storage/appimg/primary/rootfs + +KillMode=mixed +Type=notify +RestartForceExitStatus=133 +SuccessExitStatus=133 + +[Install] +WantedBy=multi-user.target diff --git a/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary.nspawn b/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary.nspawn new file mode 100644 index 0000000..961a37d --- /dev/null +++ b/meta-citadel-distro/recipes-core/primary-user-appimg/files/primary.nspawn @@ -0,0 +1,6 @@ +Boot=true +BindReadOnly=/usr/share/themes/Adapta +BindReadOnly=/usr/share/themes/Adapta-Eta +BindReadOnly=/usr/share/themes/Adapta-Nokto +BindReadOnly=/usr/share/themes/Adapta-Nokto-Eta +BindReadOnly=/usr/share/icons/Paper diff --git a/meta-citadel-distro/recipes-core/primary-user-appimg/files/run-in-image b/meta-citadel-distro/recipes-core/primary-user-appimg/files/run-in-image new file mode 100644 index 0000000..af965b4 --- /dev/null +++ b/meta-citadel-distro/recipes-core/primary-user-appimg/files/run-in-image @@ -0,0 +1,2 @@ +#!/bin/bash +machinectl -E DESKTOP_STARTUP_ID=${DESKTOP_STARTUP_ID} shell user@primary /usr/libexec/launch $@ diff --git a/meta-citadel-distro/recipes-core/primary-user-appimg/primary-user-appimg.bb b/meta-citadel-distro/recipes-core/primary-user-appimg/primary-user-appimg.bb new file mode 100644 index 0000000..c4edc52 --- /dev/null +++ b/meta-citadel-distro/recipes-core/primary-user-appimg/primary-user-appimg.bb @@ -0,0 +1,24 @@ + +DESCRIPTION = "Install systemd unit file to automatically start primary-user-appimg container" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SECTION = "" +DEPENDS = "" + +inherit systemd + +SRC_URI = "file://primary-user-appimg.service file://primary.nspawn file://run-in-image" + +S = "${WORKDIR}" + +SYSTEMD_SERVICE_${PN} = "primary-user-appimg.service" +RDEPENDS_${PN} = "bash" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/primary-user-appimg.service ${D}${systemd_system_unitdir} + install -d ${D}${sysconfdir}/systemd/nspawn + install -m 644 ${WORKDIR}/primary.nspawn ${D}${sysconfdir}/systemd/nspawn + install -d ${D}${libexecdir} + install -m 755 ${WORKDIR}/run-in-image ${D}${libexecdir} +}