* [RFC - PATCH 1/2] passwd-initial: add recipe to populate sysroot early
@ 2013-12-24 23:47 Saul Wold
2013-12-24 23:47 ` [RFC PATCH 2/2] linux-libc-headers: add passwd-initial to ensure the sysroot get populated early Saul Wold
0 siblings, 1 reply; 2+ messages in thread
From: Saul Wold @ 2013-12-24 23:47 UTC (permalink / raw)
To: openembedded-core
By providing a basic password and group entry with only root, this will
ensure that we have a consistent root user and not read the host's password
and group files.
[YOCTO #5612]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/recipes-core/base-passwd/passwd-initial.bb | 35 +++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 meta/recipes-core/base-passwd/passwd-initial.bb
diff --git a/meta/recipes-core/base-passwd/passwd-initial.bb b/meta/recipes-core/base-passwd/passwd-initial.bb
new file mode 100644
index 0000000..8d4d5bb
--- /dev/null
+++ b/meta/recipes-core/base-passwd/passwd-initial.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Base system master password/group files for initial sysroot"
+DESCRIPTION = "Initialize the sysroot with a password and group file for pseudo to use"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit allarch
+
+PACKAGES = ""
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_package[noexec] = "1"
+do_packagedata[noexec] = "1"
+do_package_write[noexec] = "1"
+do_package_write_ipk[noexec] = "1"
+do_package_write_rpm[noexec] = "1"
+do_package_write_deb[noexec] = "1"
+
+do_install() {
+ install -d ${D}/${sysconfdir}
+ echo "root:*:0:0:root:/root:/bin/sh" > ${D}${sysconfdir}/passwd
+ echo "root:*:0:" > ${D}${sysconfdir}/group
+}
+
+
+SYSROOT_PREPROCESS_FUNCS = "fake_passwd_stage_dir"
+fake_passwd_stage_dir() {
+ sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir}
+}
+
+BBCLASSEXTEND = "nativesdk"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [RFC PATCH 2/2] linux-libc-headers: add passwd-initial to ensure the sysroot get populated early
2013-12-24 23:47 [RFC - PATCH 1/2] passwd-initial: add recipe to populate sysroot early Saul Wold
@ 2013-12-24 23:47 ` Saul Wold
0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2013-12-24 23:47 UTC (permalink / raw)
To: openembedded-core
The headers are the first thing that get populated into sysroot, so add the
dependency on passwd-initial here.
[YOCTO #5612]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index f44b61c..a5a14a1 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -68,4 +68,4 @@ RDEPENDS_${PN}-dev = ""
RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS += "unifdef-native"
+DEPENDS += "unifdef-native passwd-initial"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-24 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-24 23:47 [RFC - PATCH 1/2] passwd-initial: add recipe to populate sysroot early Saul Wold
2013-12-24 23:47 ` [RFC PATCH 2/2] linux-libc-headers: add passwd-initial to ensure the sysroot get populated early Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox