All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86-base.inc: suggest the latest kernel
@ 2016-03-21 15:57 Maxin B. John
  2016-03-21 15:57 ` [PATCH 2/2] useradd.bbclass: remove user/group created by the package in cleanall task Maxin B. John
  0 siblings, 1 reply; 2+ messages in thread
From: Maxin B. John @ 2016-03-21 15:57 UTC (permalink / raw)
  To: openembedded-core

Use latest 4.x kernel instead of 3.x version

Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
 meta/conf/machine/include/x86-base.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/x86-base.inc b/meta/conf/machine/include/x86-base.inc
index f7c8a45..5663145 100644
--- a/meta/conf/machine/include/x86-base.inc
+++ b/meta/conf/machine/include/x86-base.inc
@@ -20,7 +20,7 @@ SERIAL_CONSOLE ?= "115200 ttyS0"
 # kernel-related variables
 #
 PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "3.0%"
+PREFERRED_VERSION_linux-yocto ??= "4.4%"
 
 #
 # XSERVER subcomponents, used to build the XSERVER variable
-- 
2.4.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] useradd.bbclass: remove user/group created by the package in cleanall task
  2016-03-21 15:57 [PATCH 1/2] x86-base.inc: suggest the latest kernel Maxin B. John
@ 2016-03-21 15:57 ` Maxin B. John
  0 siblings, 0 replies; 2+ messages in thread
From: Maxin B. John @ 2016-03-21 15:57 UTC (permalink / raw)
  To: openembedded-core

At present, if a recipe is built which creates users/groups via useradd.bbclass,
those users/groups are not removed (at least from sysroot) when the
recipe/package is cleaned using cleansstate/cleanall.

This "userdel_sysroot_sstate()" provides that functionality. Please note
that this function does not affect the users/groups created in the final
root filesystem.

[YOCTO #9262]

Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
 meta/classes/useradd.bbclass | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 0a6f2be..a8e4a50 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -127,6 +127,33 @@ useradd_sysroot_sstate () {
 	fi
 }
 
+userdel_sysroot_sstate () {
+if test "x${STAGING_DIR_TARGET}" != "x"; then
+    export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
+    OPT="--root ${STAGING_DIR_TARGET}"
+
+    # Remove groups and users defined for package
+    GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
+    USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
+
+    if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
+        user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+        perform_userdel "${STAGING_DIR_TARGET}" "$OPT $user"
+    fi
+
+    if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
+        group=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+        perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $group"
+    fi
+fi
+}
+
+do_cleansstate[prefuncs] += "${SYSROOTCLEANFUNC}"
+SYSROOTCLEANFUNC = "userdel_sysroot_sstate"
+SYSROOTCLEANFUNC_class-cross = ""
+SYSROOTCLEANFUNC_class-native = ""
+SYSROOTCLEANFUNC_class-nativesdk = ""
+
 do_install[prefuncs] += "${SYSROOTFUNC}"
 SYSROOTFUNC = "useradd_sysroot"
 SYSROOTFUNC_class-cross = ""
-- 
2.4.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-21 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 15:57 [PATCH 1/2] x86-base.inc: suggest the latest kernel Maxin B. John
2016-03-21 15:57 ` [PATCH 2/2] useradd.bbclass: remove user/group created by the package in cleanall task Maxin B. John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.