[SRU] sbuild fails because of incorrect free space check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sbuild (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Karmic |
Fix Released
|
Undecided
|
Marc Deslauriers |
Bug Description
Binary package hint: sbuild
This is a request for a sbuild SRU for karmic.
sbuild in karmic has a df subroutine in lib/Sbuild.pm to check for free disk space. Unfortunately, the code checks for used space, and not free space. This was fixed in upstream sbuild 0.60.0, and I've backported the patch to lucid.
This is a hard bug to test, as disk usage needs to be just right for sbuild to fail with a insufficient disk space error when there is ample disk space left.
The bug has been addressed by the simple fix in the attached debdiff.
TEST CASE:
1. Create a filesystem on a file and mount it
1.1 dd if=/dev/zero of=./fakefs bs=1M count=2000
1.2. mke2fs ./fakefs
1.3. mkdir mnt
1.4. mount -t ext2 ./fakefs ./mnt/ -o loop
2. Setup a build environment with a chroot on this newly created device
3. Build a large package (build size need to be twice the used space on the device in order to trigger the bug) A randomly chosen package is ... linux
sbuild -d karmic linux_2.
VERIFICATION FAILED:
- build fail with the following error:
===
Check disc space
────────────────
Disc space is propably not enough for building.
(Source needs 426276 KB, free are 802060 KB.)
===
Which is approximately what is used on the loop device
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 2015824 779644 1133780 41% /home/karmic/
VERIFICATION DONE:
- The package builds with success (or at least the disk space check is ok)
REGRESSION:
None, Sbuild:df is called once in Sbuild.pm and another time in Daemon.pm and in both cases to check free space.
Related branches
tags: | added: testcase |
Accepted sbuild into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you in advance!