Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v4] coreutils: Move stdbuf into an own package coreutils-stdbuf
@ 2019-10-28 22:13 Adrian Bunk
  2019-10-30 20:36 ` Randy MacLeod
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2019-10-28 22:13 UTC (permalink / raw)
  To: openembedded-core

This LD_PRELOAD trick is not really suitable for busybox,
so can be the only part of coreutils needed.

coreutils depends on the new package,
so nothing changes when installing coreutils.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
 meta/recipes-core/coreutils/coreutils_8.31.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/coreutils/coreutils_8.31.bb b/meta/recipes-core/coreutils/coreutils_8.31.bb
index 4a74f619af..57b2c1bdba 100644
--- a/meta/recipes-core/coreutils/coreutils_8.31.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.31.bb
@@ -49,7 +49,7 @@ bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname
                 env expand expr factor fmt fold groups head hostid id install \
                 join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
                 pinky pr printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
-                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout \
+                sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \
                 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
 
 # hostname gets a special treatment and is not included in this
@@ -58,6 +58,10 @@ base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill l
 
 sbindir_progs= "chroot"
 
+PACKAGE_BEFORE_PN_class-target += "coreutils-stdbuf"
+FILES_coreutils-stdbuf = "${bindir}/stdbuf ${libdir}/coreutils/libstdbuf.so"
+RDEPENDS_coreutils_class-target += "coreutils-stdbuf"
+
 # Let aclocal use the relative path for the m4 file rather than the
 # absolute since coreutils has a lot of m4 files, otherwise there might
 # be an "Argument list too long" error when it is built in a long/deep
-- 
2.17.1



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

* Re: [PATCH v4] coreutils: Move stdbuf into an own package coreutils-stdbuf
  2019-10-28 22:13 [PATCH v4] coreutils: Move stdbuf into an own package coreutils-stdbuf Adrian Bunk
@ 2019-10-30 20:36 ` Randy MacLeod
  2019-10-31 12:28   ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Randy MacLeod @ 2019-10-30 20:36 UTC (permalink / raw)
  To: Adrian Bunk, openembedded-core

On 10/28/19 6:13 PM, Adrian Bunk wrote:
> This LD_PRELOAD trick is not really suitable for busybox,
> so can be the only part of coreutils needed.

Which LD_PRELOAD trick?

Ah, I think you mean:

    The coreutils implementation of stdbuf uses LD_PRELOAD [1]
    to dynamically load libstdbuf which calls setvbuf().
    This can't be implemented simply in busybox since it produces
    one or two statically linked executables. Therefore, stdbuf
    should be packaged separately.

[1]  ?? 
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/stdbuf.c;h=7eaadb45fef8c01783eeb5c27853fafbcef34f1c;hb=HEAD#l188

Could you send a v5 for plebs like me?

../Randy

> 
> coreutils depends on the new package,
> so nothing changes when installing coreutils.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> ---
>   meta/recipes-core/coreutils/coreutils_8.31.bb | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/coreutils/coreutils_8.31.bb b/meta/recipes-core/coreutils/coreutils_8.31.bb
> index 4a74f619af..57b2c1bdba 100644
> --- a/meta/recipes-core/coreutils/coreutils_8.31.bb
> +++ b/meta/recipes-core/coreutils/coreutils_8.31.bb
> @@ -49,7 +49,7 @@ bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname
>                   env expand expr factor fmt fold groups head hostid id install \
>                   join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
>                   pinky pr printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
> -                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout \
> +                sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \
>                   tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
>   
>   # hostname gets a special treatment and is not included in this
> @@ -58,6 +58,10 @@ base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill l
>   
>   sbindir_progs= "chroot"
>   
> +PACKAGE_BEFORE_PN_class-target += "coreutils-stdbuf"
> +FILES_coreutils-stdbuf = "${bindir}/stdbuf ${libdir}/coreutils/libstdbuf.so"
> +RDEPENDS_coreutils_class-target += "coreutils-stdbuf"
> +
>   # Let aclocal use the relative path for the m4 file rather than the
>   # absolute since coreutils has a lot of m4 files, otherwise there might
>   # be an "Argument list too long" error when it is built in a long/deep
> 


-- 
# Randy MacLeod
# Wind River Linux


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

* Re: [PATCH v4] coreutils: Move stdbuf into an own package coreutils-stdbuf
  2019-10-30 20:36 ` Randy MacLeod
@ 2019-10-31 12:28   ` Adrian Bunk
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2019-10-31 12:28 UTC (permalink / raw)
  To: Randy MacLeod; +Cc: openembedded-core

On Wed, Oct 30, 2019 at 04:36:58PM -0400, Randy MacLeod wrote:
> On 10/28/19 6:13 PM, Adrian Bunk wrote:
> > This LD_PRELOAD trick is not really suitable for busybox,
> > so can be the only part of coreutils needed.
> 
> Which LD_PRELOAD trick?
> 
> Ah, I think you mean:
> 
>    The coreutils implementation of stdbuf uses LD_PRELOAD [1]
>    to dynamically load libstdbuf which calls setvbuf().
>    This can't be implemented simply in busybox since it produces
>    one or two statically linked executables. Therefore, stdbuf
>    should be packaged separately.
> 
> [1]  ?? http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/stdbuf.c;h=7eaadb45fef8c01783eeb5c27853fafbcef34f1c;hb=HEAD#l188
> 
> Could you send a v5 for plebs like me?

Done.

> ../Randy

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

end of thread, other threads:[~2019-10-31 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-28 22:13 [PATCH v4] coreutils: Move stdbuf into an own package coreutils-stdbuf Adrian Bunk
2019-10-30 20:36 ` Randy MacLeod
2019-10-31 12:28   ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox