Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377133 - sys-kernel/genkernel-3.4.16 to 3.4.18 dolvm needs busybox printf / printf truncates first character
Summary: sys-kernel/genkernel-3.4.16 to 3.4.18 dolvm needs busybox printf / printf tru...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-31 01:11 UTC by Eduardo Tongson
Modified: 2011-07-31 03:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Eduardo's patch proposal (pastie-2293085.diff,1.06 KB, patch)
2011-07-31 02:01 UTC, Sebastian Pipping
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Tongson 2011-07-31 01:11:23 UTC
See patch for genkernel:
http://pastie.org/2293085

printf is called here:
$ grep -n printf genkernel-3.4.18/defaults/initrd.scripts
662:                  printf "%b\n" "${lvm_commands}" | /bin/lvm /proc/self/fd/0

printf behaves correctly in busybox-1.18.4 but both busybox 1.7.4 and 1.18.4 behaves the same when adding the space in front of \n 

Reproducible: Always

Steps to Reproduce:
1. create initrd
2. boot
Actual Results:  
1. printf: not found
2. No such command.  Try 'help'.

Expected Results:  
boot
Comment 1 Sebastian Pipping gentoo-dev 2011-07-31 02:01:39 UTC
Created attachment 281633 [details, diff]
Eduardo's patch proposal

A paste site is no good place to point to from a bug tracker as it may go away anytime.  So I'm re-adding your patch as an attachment.
Comment 2 Sebastian Pipping gentoo-dev 2011-07-31 02:04:50 UTC
An alternative to the workaround (adding a space) we could also deny working with any broken version from genkernel.  If this

http://git.busybox.net/busybox/commit/coreutils/printf.c?id=a48656b441224a53d2bb3face920ba5487eaae09

is the fixing commit that would probably be anything before busybox 1.12.0.
I don't really like either approach as of the moment.


Any other routes we could take?  Xake/Peter?
Comment 3 Sebastian Pipping gentoo-dev 2011-07-31 02:05:41 UTC
@genkernel team
Please check comment #2.
Comment 4 Eduardo Tongson 2011-07-31 02:32:45 UTC
I was using the genkernel.conf from 3.4.16 which was pulling in busybox-1.7.4. The printf bug shouldn't be an issue anymore on busybox-1.18.1. It looks like newer genkernel still use the 1.7.4 busybox-config.

I can't reboot anytime soon to check if 1.18.1 really needs CONFIG_PRINTF=y
Sorry for the trouble.
Comment 5 Eduardo Tongson 2011-07-31 02:35:44 UTC
Ah yes genkernel-3.4.16 is currently stable. Might need to bump that to a newer version that picks up a newer busybox version.
Comment 6 Eduardo Tongson 2011-07-31 02:37:58 UTC
my bad ignore comment #5 

genkernel-3.4.10.908 was the last version to use 1.7.4
Comment 7 Eduardo Tongson 2011-07-31 02:49:16 UTC
Argh sorry guys. Looks like a non-issue:

...
bin # ./busybox ash

BusyBox v1.18.1 (2011-07-31 10:44:48 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# printf
ash: usage: printf FORMAT [ARGUMENT...]
...
Comment 8 Sebastian Pipping gentoo-dev 2011-07-31 03:49:14 UTC
I took the occasion to end support for busybox 1.7.4 in genkernel:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=7296be47b869ef3d86b1a1b6622092a925ae0faf

Without the patches, busybox 1.7.4 will not compile anyway.