Bug 6503 - 1.5.3 populate-extfs quoting issues
Summary: 1.5.3 populate-extfs quoting issues
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 1.5.3
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-07-03 14:26 UTC by Richard Purdie
Modified: 2014-07-09 02:40 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2014-07-03 14:26:31 UTC
https://autobuilder.yoctoproject.org/main/builders/build-appliance/builds/157/steps/BuildImages_1/logs/stdio

Build Appliance image fails to build for 1.5.3 with:

 mke2fs 1.42.8 (20-Jun-2013)
| Discarding device blocks:     4096/11798464                 done
| Filesystem label=
| OS type: Linux
| Block size=4096 (log=2)
| Fragment size=4096 (log=2)
| Stride=0 blocks, Stripe width=0 blocks
| 11800368 inodes, 11798464 blocks
| 589823 blocks (5.00%) reserved for the super user
| First data block=0
| Maximum filesystem blocks=4298112000
| 361 block groups
| 32760 blocks per group, 32760 fragments per group
| 32688 inodes per group
| Superblock backups stored on blocks:
| 	32760, 98280, 163800, 229320, 294840, 819000, 884520, 1605240, 2653560,
| 	4095000, 7960680, 11236680
| 
| Allocating group tables:   0/361       done
| Writing inode tables:   0/361 92/361288/361       done
| Creating journal (32768 blocks): done
| Writing superblocks and filesystem accounting information:   0/361       done
| 
| /home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/qemux86_64-poky-linux/build-appliance-image/8.0-r0/rootfs/home/builder/poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/{{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: No such file or directory
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| {{ if kernel_choice == linux-yocto_3.10: }} linux-yocto_3.10.bbappend: File not found by ext2_lookup
| mkdir: Usage: mkdir <filename>

and following issues. This appears to be a problem with the populate-extfs.sh script and quoting of the strange filenames in the yocto-bsp scripts files.
Comment 2 Richard Purdie 2014-07-03 23:06:13 UTC
Further tests show the same issue is present after that patch so we have a release blocker for 1.5.3 with this bug
Comment 3 Chen Qi 2014-07-04 13:03:02 UTC
There are actually two problems.
1. The quotation mark is special for debugfs. If the file name contains " in it, then we have to replace " with "" so that debugfs could correctly recognize it.

2. We should quote the filenames in the debugfs commands.
e.g.
Instead of writing:
echo "mkdir $TGT"
We should write:
echo "mkdir \"$TGT\""

//Chen Qi
Comment 4 Chen Qi 2014-07-09 02:40:37 UTC
Module: openembedded-core.git
Branch: dora
Commit: 24f17607e996c499c8f86eda0588d02af1e960b9
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=24f17607e996c499c8f86eda0588d02af1e960b9

Author: Chen Qi <Qi.Chen@windriver.com>
Date:   Tue Jul  8 18:38:15 2014 +0800

populate-extfs.sh: fix to handle special file names correctly

`debugfs' treats spaces and "" specially. So when we are dealing with
file names, great care should be taken to make sure that `debugfs'
recognizes file names correctly.

The basic solution here is:
1. Use quotation marks to handle spaces correctly.
2. Replace "xxx" with ""xxx"" so that debugfs knows that the quotation
   marks are parts of the file name.

[YOCTO #6503]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>