Skip to contentSkip to conversation

shadow: Add nativesdk to BBCLASSEXTEND

PATCH Superseded David Nyström 1 participant 2 messages Sep 25, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 shadow: Add nativesdk to BBCLASSEXTEND

This is a second in a series of patches to enable offline rootfs creation from a package repository.

Some postinstall cmds are Yocto specific and needed to create a rootfs with pre and post install hooks successfully run, using only the toolchain tarball + a package repo.

End goal is to create a sandbox where users of a Yocto based distribution can customize a rootfs from a package feed with their package manager of choice.

With this patch, I can successfully create packagegroup-core-boot with only the toolchain tarball(OPKG). More fixes for a few postinstall hooks outside of packagegroup-core-boot will come next.

---
 meta/recipes-extended/shadow/shadow.inc        | 10 ++++++++++
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
meta/recipes-extended/shadow/shadow.inc +10 -0
index 75b0afc..5ab978a 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
 
 DEPENDS = "shadow-native"
 DEPENDS_class-native = ""
+DEPENDS_class-nativesdk = ""
 
 SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
            file://shadow.automake-1.11.patch \
@@ -33,6 +34,12 @@ SRC_URI_append_class-native = " \
            file://useradd.patch \
            file://add_root_cmd_groupmems.patch \
            "
+SRC_URI_append_class-nativesdk = " \
+           file://add_root_cmd_options.patch \
+           file://disable-syslog.patch \
+           file://useradd.patch \
+           file://add_root_cmd_groupmems.patch \
+           "
 
 SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
 SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
@@ -57,6 +64,7 @@ EXTRA_OECONF += "--without-audit \
 
 NSCDOPT = ""
 NSCDOPT_class-native = "--without-nscd"
+NSCDOPT_class-nativesdk = "--without-nscd"
 NSCDOPT_libc-uclibc = " --without-nscd"
           
 PAM_PLUGINS = "libpam-runtime \
@@ -74,11 +82,13 @@ PAM_PLUGINS = "libpam-runtime \
 
 PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
 PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
 PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
 
 RDEPENDS_${PN} = "shadow-securetty \
                   base-passwd"
 RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
 
 do_install() {
 	oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
meta/recipes-extended/shadow/shadow_4.1.4.3.bb +1 -1
index 6f1723e..43e578f 100644
@@ -4,7 +4,7 @@ require shadow.inc
 # libcrypt. This breaks chsh.
 BUILD_LDFLAGS_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'pam', base_contains('DISTRO_FEATURES', 'libc-crypt',  '-lcrypt', '', d), '', d)}"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 
 
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 nativesdk-packagegroup-sdk-host: Add nativesdk-shadow

Add useradd, groupadd et.c. since all target packages which inherits useradd will have a postinstall hook dependecy against the yocto specific groupadd.

---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -0
index 84fb95d..95f98c8 100644
@@ -20,6 +20,7 @@ RDEPENDS_${PN} = "\
     nativesdk-libtool \
     nativesdk-autoconf \
     nativesdk-automake \
+    nativesdk-shadow \
     "
 
 RDEPENDS_${PN}_darwin = "\
Signature · 1 line
1.8.3.2