From af2c7fb49674005e33a783e59c7604466acb72a9 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Sat, 3 Mar 2018 21:37:48 -0500 Subject: [PATCH] fixed the systemd-initrd warnings, and tightened up initrd image --- .../citadel-initramfs/citadel-initramfs.bb | 15 +++++++++++---- .../files/citadel-rootfs-mount.service | 8 ++++++++ .../images/citadel-initramfs-image.bb | 7 +++---- .../systemd-initrd/systemd-initrd_234.bb | 19 ++++++++++++++++++- 4 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service diff --git a/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb b/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb index 79caf38..f35e2a9 100644 --- a/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb +++ b/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb @@ -4,11 +4,20 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384 SECTION = "" DEPENDS = "" -SRC_URI = "file://initrd-release file://crypttab file://11-dm.rules" +SRC_URI = "file://initrd-release file://crypttab file://11-dm.rules file://citadel-rootfs-mount.service" S = "${WORKDIR}" +dirs755="/boot /dev /usr /usr/bin /usr/sbin /usr/lib /usr/share /etc /proc /run /var /sys /tmp" + + do_install() { + for d in ${dirs755}; do + install -m 0755 -d ${D}$d + done + + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/citadel-rootfs-mount.service ${D}${systemd_system_unitdir} install -d ${D}${sysconfdir} install -m 644 ${WORKDIR}/initrd-release ${D}${sysconfdir} install -m 644 ${WORKDIR}/crypttab ${D}${sysconfdir} @@ -18,13 +27,11 @@ do_install() { mknod -m 622 ${D}/dev/console c 5 1 } -FILES_${PN} += "/dev/console" +FILES_${PN} += "/dev/console /boot /dev /usr /etc /proc /run /sys /tmp" pkg_postinst_${PN}() { ln -sf initrd-release $D${sysconfdir}/os-release - #ln -s ${systemd_unitdir}/systemd $D/init ln -sf ${systemd_system_unitdir}/initrd.target $D${systemd_system_unitdir}/default.target - rm -f $D${sysconfdir}/fstab > $D${sysconfdir}/fstab } diff --git a/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service new file mode 100644 index 0000000..c41c506 --- /dev/null +++ b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service @@ -0,0 +1,8 @@ +[Unit] +Description=Mount citadel rootfs + +[Service] +Type=oneshot +RemainAfterExit=yes + +ExecStart=/bin/sh -c 'echo "hello world"' diff --git a/meta-citadel/recipes-initrd/images/citadel-initramfs-image.bb b/meta-citadel/recipes-initrd/images/citadel-initramfs-image.bb index f0a9236..1774589 100644 --- a/meta-citadel/recipes-initrd/images/citadel-initramfs-image.bb +++ b/meta-citadel/recipes-initrd/images/citadel-initramfs-image.bb @@ -1,14 +1,14 @@ DESCRIPTION = "Image for rootfs" +NO_RECOMMENDATIONS = "1" + PACKAGE_INSTALL = "\ - base-files \ + citadel-initramfs \ base-passwd \ busybox \ kbd \ keymaps \ systemd-initrd \ - systemd-initrd-analyze \ - util-linux \ linux-firmware-i915 \ kernel-module-arc4 \ kernel-module-ansi-cprng \ @@ -86,7 +86,6 @@ PACKAGE_INSTALL = "\ kernel-module-soundcore \ kernel-module-wmi \ kernel-module-xhci-plat-hcd \ - citadel-initramfs \ liberation-fonts \ plymouth \ " diff --git a/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_234.bb b/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_234.bb index 606e65b..265c7d9 100644 --- a/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_234.bb +++ b/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_234.bb @@ -10,6 +10,9 @@ DEPENDS = "intltool-native gperf-native libcap libcgroup util-linux kmod cryptse inherit useradd pkgconfig autotools SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395" +# Added by useradd class +DEPENDS_remove = "base-files" + SRC_URI = "git://github.com/systemd/systemd.git;protocol=git" S = "${WORKDIR}/git" @@ -182,7 +185,21 @@ FILES_${PN}-not-used = "\ ${bindir}/systemd-* \ ${bindir}/busctl \ ${bindir}/hostnamectl \ + ${bindir}/loginctl \ ${bindir}/kernel-install \ + ${systemd_unitdir}/systemd/systemd-hostnamed \ + ${systemd_unitdir}/systemd/systemd-backlight \ + ${systemd_unitdir}/systemd/systemd-logind \ + ${systemd_unitdir}/systemd/systemd-socket-proxyd \ + ${systemd_unitdir}/systemd/systemd-sleep \ + ${systemd_unitdir}/systemd/systemd-volatile-root \ + ${systemd_unitdir}/systemd/systemd-dissect \ + ${systemd_unitdir}/systemd/systemd-remount-fs \ + ${systemd_unitdir}/systemd/systemd-ac-power \ + ${systemd_unitdir}/systemd/systemd-update-done \ + ${systemd_unitdir}/systemd/systemd-initctl \ + ${systemd_unitdir}/systemd \ + ${localstatedir}/lib/systemd \ " INSANE_SKIP_${PN} += "dev-so" @@ -203,6 +220,7 @@ FILES_${PN} = "\ ${systemd_unitdir}/systemd/systemd-journald \ ${systemd_unitdir}/systemd/systemd-sysctl \ ${systemd_unitdir}/systemd/systemd-modules-load \ + ${systemd_unitdir}/systemd/systemd-veritysetup \ ${systemd_unitdir}/systemd/systemd-vconsole-setup \ ${systemd_unitdir}/systemd/system-generators/systemd-fstab-generator \ ${systemd_unitdir}/systemd/system-generators/systemd-gpt-auto-generator \ @@ -274,7 +292,6 @@ FILES_${PN} = "\ ${systemd_system_unitdir}/sockets.target.wants/systemd-udevd-kernel.socket \ ${systemd_system_unitdir}/sockets.target.wants/systemd-journald.socket \ ${systemd_system_unitdir}/sockets.target.wants/systemd-journald-audit.socket \ - ${systemd_system_unitdir}/sockets.target.wants/systemd-journald-dev-log.socket \ ${systemd_system_unitdir}/sysinit.target.wants/systemd-udevd.service \ ${systemd_system_unitdir}/sysinit.target.wants/systemd-udev-trigger.service \ ${systemd_system_unitdir}/sysinit.target.wants/kmod-static-nodes.service \