From 0d1f86c398c90a7abe5222b8984674ddb8acd521 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 11 Sep 2020 22:09:36 +0200 Subject: [PATCH] sys-apps/baselayout: Initialize the user/group database earlier systemd-tmpfiles in systemd v246 requires the user/group databases in the custom root if it gets passed with --root flag. This requires a new version of baselayout to be pulled, so do so. --- ...layout-3.6.7.ebuild => baselayout-3.6.8.ebuild} | 0 .../sys-apps/baselayout/baselayout-9999.ebuild | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) rename sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/{baselayout-3.6.7.ebuild => baselayout-3.6.8.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.6.7.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.6.8.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.6.7.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.6.8.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild index 69c609204a..9f8077bb4d 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild @@ -9,7 +9,7 @@ CROS_WORKON_REPO="git://github.com" if [[ "${PV}" == 9999 ]]; then KEYWORDS="~amd64 ~arm ~arm64 ~x86" else - CROS_WORKON_COMMIT="b67c163348c69b7c02dac1bb087b1a15cf21afa7" # flatcar-master + CROS_WORKON_COMMIT="df037edbeab79c38caed61f48dec7a00e764e20e" # flatcar-master KEYWORDS="amd64 arm arm64 x86" fi @@ -113,6 +113,17 @@ src_install() { for sym in "${!LIB_SYMS[@]}" ; do dosym "${LIB_SYMS[$sym]}" "${sym}" done + + if use cros_host; then + # We assume that SDK already has the user and group database. + : + else + # Initialize /etc/passwd, group, and friends now, so + # systemd-tmpfiles can resolve user information in ${D} + # rootfs. + bash "scripts/flatcar-tmpfiles" "${D}" "${S}/baselayout" || die + fi + if use symlink-usr; then systemd_dotmpfilesd "${T}/baselayout-usr.conf" systemd-tmpfiles --root="${D}" --create @@ -181,7 +192,6 @@ src_install() { "${D}"/usr/lib/tmpfiles.d/baselayout-etc.conf || die # Initialize /etc/passwd, group, and friends on boot. - bash "scripts/flatcar-tmpfiles" "${D}" || die dosbin "scripts/flatcar-tmpfiles" systemd_dounit "scripts/flatcar-tmpfiles.service" systemd_enable_service sysinit.target flatcar-tmpfiles.service