Skip to contentSkip to conversation

poky-tiny.conf: add extra libc features

PATCH In review [email protected] 4 participants 7 messages Jul 10, 2013 – Jul 11, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/2 poky-tiny.conf: add extra libc features

From: Chen Qi <[email protected]>

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

---
 meta-yocto/conf/distro/poky-tiny.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-yocto/conf/distro/poky-tiny.conf +1 -1
index 755667f..9d9ea3c 100644
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
 # Reconfigure eglibc for a smaller installation
 # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
 DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
 # Required for "who"
Signature · 1 line
1.7.9.5
#2 lore raw

Hi Qi / Darren,

Quoted 18 lines · On Wednesday 10 July 2013 14:37:12 [email protected] wrote:

From: Chen Qi <[email protected]>

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

---
 meta-yocto/conf/distro/poky-tiny.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-yocto/conf/distro/poky-tiny.conf index 755667f..9d9ea3c 100644

meta-yocto/conf/distro/poky-tiny.conf ASSUME_PROVIDED += "pkgconfig$" · line 68

Quoted 8 lines
meta-yocto/conf/distro/poky-tiny.conf +1 -1
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
 # Reconfigure eglibc for a smaller installation
 # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
 DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
 # Required for "who"

Is this really appropriate for poky-tiny? It seems to me it might be orthogonal to the point of poky-tiny which is to be pretty much as light as possible.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#3 lore raw
Quoted 28 lines · Paul Eggleton

Hi Qi / Darren,

Quoted 25 lines · On Wednesday 10 July 2013 14:37:12 [email protected] wrote:

From: Chen Qi <[email protected]>

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

---
  meta-yocto/conf/distro/poky-tiny.conf |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-yocto/conf/distro/poky-tiny.conf index 755667f..9d9ea3c 100644

meta-yocto/conf/distro/poky-tiny.conf +1 -1
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
  # Reconfigure eglibc for a smaller installation
  # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
  DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
Quoted 8 lines

meta-yocto/conf/distro/poky-tiny.conf ASSUME_PROVIDED += "pkgconfig$" · line 68

Quoted 1 line
meta-yocto/conf/distro/poky-tiny.conf +0 -0
  # Required for "who"

Is this really appropriate for poky-tiny? It seems to me it might be orthogonal to the point of poky-tiny which is to be pretty much as light as possible.

Cheers,
Paul

I added these two extra libc features because I wanted USER_GROUP_SETTINGS to have effect for poky-tiny.

For now, because of lack of libc features, adding packages to poky-tiny is likely to fail.
So the question here is, are we deciding that poky-tiny equals to 'limited-featured libc + tiny init + busybox"? If so, maybe we need to a mechanism to warn user when they try to add packages to poky-tiny.

Besides, removing the libc features doesn't seem to have significant effects on the size of the image.

chenqi@pek-qchen1-d1:~/poky$ ls -lh build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so 

-rwxr-xr-x 1 chenqi chenqi 1.1M Jul 10 13:49 build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

chenqi@pek-qchen1-d1:~/poky$ ls -lh build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so 

-rwxr-xr-x 1 chenqi chenqi 1.5M Jul 3 11:23 build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

Best Regards,
Chen Qi

#4 lore raw
Quoted 6 lines · ChenQi
Quoted 5 lines · Paul Eggleton

Hi Qi / Darren,

Quoted 2 lines · On Wednesday 10 July 2013 14:37:12 [email protected] wrote:

From: Chen Qi <[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

I maintain poky-tiny, please Cc me on patches:

Cc Darren Hart <[email protected]>
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
  meta-yocto/conf/distro/poky-tiny.conf |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-yocto/conf/distro/poky-tiny.conf index 755667f..9d9ea3c 100644

meta-yocto/conf/distro/poky-tiny.conf +1 -1
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
  # Reconfigure eglibc for a smaller installation
  # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
  DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
Quoted 5 lines
Quoted 5 lines

meta-yocto/conf/distro/poky-tiny.conf ASSUME_PROVIDED += "pkgconfig$" · line 68

Quoted 1 line
meta-yocto/conf/distro/poky-tiny.conf +0 -0
  # Required for "who"

Is this really appropriate for poky-tiny? It seems to me it might be orthogonal to the point of poky-tiny which is to be pretty much as light as possible.

All such changes should include size delta...

Quoted 11 lines
Quoted 3 lines

Cheers,
Paul

I added these two extra libc features because I wanted USER_GROUP_SETTINGS to have effect for poky-tiny.

For now, because of lack of libc features, adding packages to poky-tiny is likely to fail.
So the question here is, are we deciding that poky-tiny equals to 'limited-featured libc + tiny init + busybox"? If so, maybe we need to a mechanism to warn user when they try to add packages to poky-tiny.

poky-tiny is meant to be a starting point, typically the approach is to create your own distro either derived from or copied and modified from poky-tiny. poky-tiny should remain a bare minimum, in fact, it should probably be made smaller, not larger.

Quoted 7 lines

Besides, removing the libc features doesn't seem to have significant effects on the size of the image.

chenqi@pek-qchen1-d1:~/poky$ ls -lh 
build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so 
Quoted 8 lines

-rwxr-xr-x 1 chenqi chenqi 1.1M Jul 10 13:49 build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

chenqi@pek-qchen1-d1:~/poky$ ls -lh 
build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so 

-rwxr-xr-x 1 chenqi chenqi 1.5M Jul 3 11:23 build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

Am I reading that right? 400k? That's *very* significant when we're building sub 5MB images (including the kernel).

Please use "size" instead of "ls -lh" to get a more accurate representation of the space usage. From my Fedora laptop by way of example:

$ size libc-2.17.so
   text	   data	    bss	    dec	    hex	filename
1788428	  20840	  18944	1828212	 1be574	libc-2.17.so

Thanks,

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#5 lore raw
Quoted 79 lines · Darren Hart
Quoted 6 lines · ChenQi
Quoted 5 lines · Paul Eggleton

Hi Qi / Darren,

Quoted 2 lines · On Wednesday 10 July 2013 14:37:12 [email protected] wrote:

From: Chen Qi <[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

I maintain poky-tiny, please Cc me on patches:

Cc Darren Hart <[email protected]>
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
   meta-yocto/conf/distro/poky-tiny.conf |    2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-yocto/conf/distro/poky-tiny.conf index 755667f..9d9ea3c 100644

meta-yocto/conf/distro/poky-tiny.conf +1 -1
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
   # Reconfigure eglibc for a smaller installation
   # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
   DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
Quoted 5 lines
Quoted 5 lines

meta-yocto/conf/distro/poky-tiny.conf ASSUME_PROVIDED += "pkgconfig$" · line 68

Quoted 1 line
meta-yocto/conf/distro/poky-tiny.conf +0 -0
   # Required for "who"

Is this really appropriate for poky-tiny? It seems to me it might be orthogonal to the point of poky-tiny which is to be pretty much as light as possible.

All such changes should include size delta...

Quoted 11 lines
Quoted 3 lines

Cheers,
Paul

I added these two extra libc features because I wanted USER_GROUP_SETTINGS to have effect for poky-tiny.

For now, because of lack of libc features, adding packages to poky-tiny is likely to fail.
So the question here is, are we deciding that poky-tiny equals to 'limited-featured libc + tiny init + busybox"? If so, maybe we need to a mechanism to warn user when they try to add packages to poky-tiny.

poky-tiny is meant to be a starting point, typically the approach is to create your own distro either derived from or copied and modified from poky-tiny. poky-tiny should remain a bare minimum, in fact, it should probably be made smaller, not larger.

Quoted 7 lines

Besides, removing the libc features doesn't seem to have significant effects on the size of the image.

chenqi@pek-qchen1-d1:~/poky$ ls -lh
build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so
Quoted 8 lines

-rwxr-xr-x 1 chenqi chenqi 1.1M Jul 10 13:49 build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

chenqi@pek-qchen1-d1:~/poky$ ls -lh
build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

-rwxr-xr-x 1 chenqi chenqi 1.5M Jul 3 11:23 build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

Am I reading that right? 400k? That's *very* significant when we're building sub 5MB images (including the kernel).

Quoted 8 lines

Please use "size" instead of "ls -lh" to get a more accurate representation of the space usage. From my Fedora laptop by way of example:

$ size libc-2.17.so
    text	   data	    bss	    dec	    hex	filename
1788428	  20840	  18944	1828212	 1be574	libc-2.17.so

I am going to NAK this change regardless of the size, I don't think this is the right direction.

Sau!

Quoted 3 lines

Thanks,

author
#6 lore raw
In reply to Darren Hart

Got it.

Thanks for your detailed explanation.

Regards,
Chen Qi

Quoted 85 lines · Darren Hart
Quoted 6 lines · ChenQi
Quoted 5 lines · Paul Eggleton

Hi Qi / Darren,

Quoted 2 lines · On Wednesday 10 July 2013 14:37:12 [email protected] wrote:

From: Chen Qi <[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Add two extra libc features, libc-spawn and libc-rcmd, as they are needed to successfully compile the shadow package which is needed if we set USER_GROUP_SETTIGNS in some configuration file.

[YOCTO #4074]

I maintain poky-tiny, please Cc me on patches:

Cc Darren Hart <[email protected]>
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
   meta-yocto/conf/distro/poky-tiny.conf |    2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-yocto/conf/distro/poky-tiny.conf index 755667f..9d9ea3c 100644

meta-yocto/conf/distro/poky-tiny.conf +1 -1
@@ -62,7 +62,7 @@ ASSUME_PROVIDED += "pkgconfig$"
 
   # Reconfigure eglibc for a smaller installation
   # Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt libc-spawn libc-rcmd"
   DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
Quoted 5 lines
Quoted 5 lines

meta-yocto/conf/distro/poky-tiny.conf ASSUME_PROVIDED += "pkgconfig$" · line 68

Quoted 1 line
meta-yocto/conf/distro/poky-tiny.conf +0 -0
   # Required for "who"

Is this really appropriate for poky-tiny? It seems to me it might be orthogonal to the point of poky-tiny which is to be pretty much as light as possible.

All such changes should include size delta...

Quoted 11 lines
Quoted 3 lines

Cheers,
Paul

I added these two extra libc features because I wanted USER_GROUP_SETTINGS to have effect for poky-tiny.

For now, because of lack of libc features, adding packages to poky-tiny is likely to fail.
So the question here is, are we deciding that poky-tiny equals to 'limited-featured libc + tiny init + busybox"? If so, maybe we need to a mechanism to warn user when they try to add packages to poky-tiny.

poky-tiny is meant to be a starting point, typically the approach is to create your own distro either derived from or copied and modified from poky-tiny. poky-tiny should remain a bare minimum, in fact, it should probably be made smaller, not larger.

Quoted 6 lines

Besides, removing the libc features doesn't seem to have significant effects on the size of the image.

chenqi@pek-qchen1-d1:~/poky$ ls -lh
build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so
Quoted 8 lines

-rwxr-xr-x 1 chenqi chenqi 1.1M Jul 10 13:49 build-tiny/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

chenqi@pek-qchen1-d1:~/poky$ ls -lh
build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

-rwxr-xr-x 1 chenqi chenqi 1.5M Jul 3 11:23 build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc-2.17.so

Am I reading that right? 400k? That's *very* significant when we're building sub 5MB images (including the kernel).

Please use "size" instead of "ls -lh" to get a more accurate representation of the space usage. From my Fedora laptop by way of example:

$ size libc-2.17.so
    text	   data	    bss	    dec	    hex	filename
1788428	  20840	  18944	1828212	 1be574	libc-2.17.so

Thanks,

#7 lore raw

PATCH 2/2 local.conf.sample.extended: add USER_GROUP_SETTINGS

In reply to a message not in the archive

From: Chen Qi <[email protected]>

Add detailed explanation of USER_GROUP_SETTINGS which is used for image level user/group configuration.

[YOCTO #4074]

---
 meta-yocto/conf/local.conf.sample.extended |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
meta-yocto/conf/local.conf.sample.extended +16 -0
index 07e5cf5..15cbf5e 100644
@@ -214,3 +214,19 @@
 
 # Remove the old image before the new one generated to save disk space
 #RM_OLD_IMAGE = "1"
+
+# Image level user/group settings
+# The settings are sperated by ;
+# Each setting has three fields.
+# <USER/GROUP>: this setting applies for user or group, possible values are USER and GROUP.
+# <ACTION>: possible values are ADD, DELELE and MODIFY
+# <OPT>: options for useradd/groupadd, userdel/groupdel or usermod/groupmod.
+# e.g.
+# USER_GROUP_SETTINGS = "\
+# USER,ADD,-p '' tester; \
+# GROUP,ADD,testers; \
+# USER,DEL,nobody; \
+# GROUP,DEL,-g video; \
+# GROUP,MOD,-g 1020 testers; \
+# USER,MOD,-s /bin/sh tester; \
+# "
Signature · 1 line
1.7.9.5