Debian/sid and oneiric based builds fail

Bug #791134 reported by James Page
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
sbuild (Debian)
Fix Released
Unknown
sbuild (Ubuntu)
Fix Released
Medium
Barry Warsaw
Natty
Fix Released
Medium
Loïc Minier
Oneiric
Fix Released
Medium
Barry Warsaw

Bug Description

Setup:
mk-sbuild --vg=<name> --distro=debian sid

Issue:
schroot into the sbuild environment is fine; however when I try to complete builds with this schroot sbuild fails to create locks in /var/lock - this is a symbolic link to /run/lock and is absolute rather than relative which I suspect may be the issue:

>>> Excerpt from log <<<
Package: args4j
Version: 2.0.16-1
Source Version: 2.0.16-1
Architecture: amd64
E: Can't create lock file /var/lib/schroot/mount/sid-amd64-57ec6e08-578a-4956-a800-310c3d31dc6b/var/lock/sbuild: No such file or directory

Workaround:
I fixed this locally by making /var/lock and /var/run directories within the schroot. Builds then complete OK.

Impact: need special setup to use chroots of recent suites like oneiric or current Debian sid with sbuild

Bug was addressed by moving locks to a different directory within the chroot, one which belongs to sbuild.

Regression potential: limited, can't really see what could regress here outside of introducing new bugs of course

Revision history for this message
James Page (james-page) wrote :
Changed in sbuild (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I've also noticed this with Oneiric.

Changed in sbuild (Ubuntu):
importance: Undecided → Medium
summary: - Debian/sid based builds fail
+ Debian/sid and oneiric based builds fail
Revision history for this message
Steve Langasek (vorlon) wrote :

because /var/lock is now a symlink to /run/lock, including in chroots (per Debian policy on symlinks between top-level directories), sbuild needs to cope. The fix for this is in the Debian package in unstable, so it looks like this just needs a merge/cherry-pick for oneiric.

Changed in sbuild (Ubuntu Oneiric):
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Barry Warsaw (barry) wrote :

<slangasek> barry: ideally we would SRU this as well, for the benefit of
            anyone who might actually want to use sbuild for building in
            chroots for a different release than the one they're running :)

Changed in sbuild (Ubuntu Oneiric):
milestone: none → oneiric-alpha-3
Revision history for this message
Barry Warsaw (barry) wrote :

unstable has 0.62.4-1 now and that has been merged to Oneiric with some remaining changes (0.62.4-1ubuntu1). So this *should* be fixed in Oneiric now. I'm testing this to double check.

It may still make sense to SRU the change, but I think I'll let someone request that first. :)

Changed in sbuild (Ubuntu Oneiric):
status: Confirmed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

I second the SRU idea :-)

Loïc Minier (lool)
Changed in sbuild (Ubuntu Natty):
status: New → In Progress
assignee: nobody → Loïc Minier (lool)
importance: Undecided → Medium
status: In Progress → Confirmed
status: Confirmed → Triaged
description: updated
Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted sbuild into natty-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 Natty):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Daniel Manrique (roadmr) wrote :

These tests were done on a Natty (11.04) host trying to build packages for an Oneiric build environment.

With the previous version: 0.60.9-1ubuntu3 I get this when trying to build a package:

E: Can't create lock file /var/lib/schroot/mount/oneiric-i386-e7023eb5-9377-4c7b-a91a-5514310563f3/var/lock/sbuild: No such file or directory

With the new version: 0.60.9-1ubuntu3.1

My package builds successfully, the only extraneous message I see is this:

Purging /var/lib/schroot/mount/oneiric-i386-da4725cc-0b05-41a2-9f0f-1818eb230de7/build/root-checkbox_0.12.4-i386-6XTBrR
Not cleaning session: cloned chroot in use

I also tested creating a natty build environment and building packages on that (this is Natty hosted on Natty, to be clear). It also works fine that way, my package built successfully.

Thanks for this fix!

Revision history for this message
Loïc Minier (lool) wrote : Re: [Bug 791134] Re: Debian/sid and oneiric based builds fail

On Mon, Jul 25, 2011, Daniel Manrique wrote:
> My package builds successfully, the only extraneous message I see is
> this:
> Purging /var/lib/schroot/mount/oneiric-i386-da4725cc-0b05-41a2-9f0f-1818eb230de7/build/root-checkbox_0.12.4-i386-6XTBrR
> Not cleaning session: cloned chroot in use

 As I understand it, this is a message informing you that the build-deps
 wont be uninstalled since this session was based of a cloned chroot
 which will be destroyed after use. I don't think this message was
 introduced by the backported patches.

 Does this cause any issue for you? Is the chroot destroyed properly as
 you would expect?

 Thanks for testing!

--
Loïc Minier

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi Loïc:

Things work fine, despite the message which I interpret as being just a warning. I also did repeated build attempts and they all worked fine.

I'm a newbie while using sbuild so I hadn't really paid attention to behavior with chroot directories, but I did notice this:

Purging /var/lib/schroot/mount/oneiric-i386-4aaf61c2-5943-4b3e-92a0-8b2576538915/build/roadmr-checkbox_0.12.4-i386-Jjin2A
Not cleaning session: cloned chroot in use

The directory shown in the message exists during the build process, but disappears when it's finished. If I understand correctly, this means that the build-deps were created in that directory and then the whole directory gets nuked and the build-deps don't need to be uninstalled.

This is apparently default behavior as I haven't configured anything in sbuild, beyond what mk-sbuild took care of for me.

Anyway, to answer your questions, everything appears to be in working order and packages get built nicely for both Oneric and Natty, with temporary directories being deleted as expected.

Thanks!

Revision history for this message
Loïc Minier (lool) wrote :

Cool, thanks!

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.60.9-1ubuntu3.1

---------------
sbuild (0.60.9-1ubuntu3.1) natty-proposed; urgency=low

  * Cherry-pick a couple of commits from tip; fixes locks in chroots of
    recents suites like oneiric or current Debian sid; LP: #791134.
    - d1e199f2c2b666c477be01ebed872f2bdb298704: Sbuild::Chroot: Use
      /var/lib/sbuild/chroot-lock.
    - b293b44bc97e4d9c5e72d544b0d7d839634c8e02: Sbuild::Chroot: Create chroot
      lock inside chroot.
 -- Loic Minier <email address hidden> Fri, 22 Jul 2011 16:05:55 +0200

Changed in sbuild (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in sbuild (Debian):
status: Unknown → Fix Released
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.