From c3a6b339951ba4c0a2d466a4756aa11f0de7667a Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 25 Feb 2015 18:13:49 -0800 Subject: [PATCH] baselayout: create default passwd/group files in the SDK This has always been done in the past by scripts/sdk_lib/make_chroot.sh and is required to support adding new users and groups (the add commands will not create these files themselves). Most users ebuilds add on the fly are covered by our static group file here so this doesn't come up. However dnsmasq was just added to the SDK and its ebuild adds a dnsmasq user. We have no need for that user in production CoreOS images so no point in adding it to the static list. Without this `bootstrap_sdk` fails. Nothing else really changes. --- .../{baselayout-3.0.11.ebuild => baselayout-3.0.12.ebuild} | 0 .../sys-apps/baselayout/baselayout-9999.ebuild | 5 +++++ 2 files changed, 5 insertions(+) rename sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/{baselayout-3.0.11.ebuild => baselayout-3.0.12.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.11.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.12.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.11.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.12.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 7c62de8ab4..3c12b6eb88 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 @@ -181,4 +181,9 @@ pkg_postinst() { ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}" done fi + # The default passwd/group files must exist in the SDK for some ebuilds + if use cros_host; then + touch "${ROOT}/etc/"{group,gshadow,passwd,shadow} + chmod 640 "${ROOT}/etc/"{gshadow,shadow} + fi }