[SRU] sbuild fails because of incorrect free space check

Bug #570669 reported by Marc Deslauriers
12
This bug affects 1 person
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.6.31-22.60.dsc

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/SRU/570669/mnt

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.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Changed in sbuild (Ubuntu):
status: New → Fix Released
Changed in sbuild (Ubuntu Karmic):
assignee: nobody → Marc Deslauriers (mdeslaur)
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

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!

Changed in sbuild (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Karmic:
I have reproduced the problem with sbuild 0.59.0-1ubuntu1 in karmic and have verified that the version of sbuild 0.59.0-1ubuntu1.1 in -proposed fixes the issue. I have verified that a package builds successfully (linux_2.6.31-22.60)

Marking as verification-done

description: updated
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sbuild - 0.59.0-1ubuntu1.1

---------------
sbuild (0.59.0-1ubuntu1.1) karmic-proposed; urgency=low

  * lib/Sbuild.pm: correctly calculate free space, and not used space. Fix
    backported from 0.60.0. (LP: #570669)
 -- Marc Deslauriers <email address hidden> Tue, 27 Apr 2010 08:04:17 -0400

Changed in sbuild (Ubuntu Karmic):
status: Fix Committed → Fix Released
tags: added: testcase
Revision history for this message
fprimex (brent-fprimex) wrote : Gold Watches

Hello Customer

We are adding new items weekly.
Status accessories and attributes are very important for successful and popular people. Now you don't have to spend ridiculous money to impress partners with expensive watch. Purchase watches of high quality that look identical to the ones you will find at the jewelry store.

**********************************************************************************************
I ordered a ca-26 watch from you last week it already arrived. Let me say the watch is awesome, I couldn't believe my eyes it looks exactly like the real thing. Let me tell you many thanks and I would buy a lot more watches from you from now on.
Thankee!
                     Marcelo Hogan
**********************************************************************************************

Click here ---> http://penio.ru

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.