[cowbuilder-dist] doesn't find dependencies when building in sid chroot

Bug #409696 reported by Laurent Bigonville
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: ubuntu-dev-tools

Looks like cowbuilder-dist fails at installing build-dependencies when building in a sid chroot

if I use cowbuilder directly "cowbuilder --build --basepath /some/path file.dsc it's working corretly

Revision history for this message
Laurent Bigonville (bigon) wrote :

It's working correctly with karmic and jaunty chroot

I'm running karmic, and it was working with jaunty version

Revision history for this message
Laurent Bigonville (bigon) wrote :

Still happening, using cowbuilder works

Revision history for this message
Laurent Bigonville (bigon) wrote :

Still happening on lucid

Benjamin Drung (bdrung)
summary: - cowbuilder-dist doesn't find dependencies when building in sid chroot
+ [cowbuilder-dist] doesn't find dependencies when building in sid chroot
Changed in ubuntu-dev-tools (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Stefano Rivera (stefanor) wrote :

I wonder if this is a duplicate of bug #423609? Can you please test the current version in trunk? (It'll be in Ubuntu in a day or two, versioned 0.139)

Revision history for this message
John S. Gruber (jsjgruber) wrote :
Download full text (3.4 KiB)

I can confirm that this continues in Precise with version 0.139.

Using --debug-echo, I found that running login or build generates a cowbuilder call with --override-config and --distribution specified. --override-config only seems to be sensible for the update function and --distribution for create or update function. Experimenting, I found that running the generated cowbuilder call, but leaving --override-config off, functioned correctly.

What is happening is that the cowbuilder command of the cowdancer source package doesn't copy the --distribution parameter when building the pbuilder command it forks, although it does copy --override-config. When pbuilder gets the parameters it replaces the chief distribution deb source line with one for the distribution on which the command is running. Since this doesn't match the package index built when the create function was run, packages can't be found to fill build dependencies. See below.

/etc/apt/sources.list in chroot during login (and presumably build) function:

deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse <------***
#deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse <------

Perhaps the best approach would be for cowbuilder-dist to drop --override-config, --distribution, and --architecture for the build, login, and exec functions.

cowbuilder-dist cowbuilder command built:
sudo HOME=/home/gruber ARCH=i386 DISTRIBUTION=lucid DIST=lucid ARCHITECTURE=i386 DEB_BUILD_OPTIONS= pbuilder --login --override-config --distribution lucid --aptcache /var/cache/apt/archives --basetgz /home/gruber/pbuilder/lucid-base.tgz --mirror http://archive.ubuntu.com/ubuntu --othermirror 'deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse|deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse|deb http://archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse' --components 'main restricted universe multiverse '

cowbuilder built pbuilder command:
-> Invoking pbuilder
  forking: pbuilder login --aptcache /var/cache/apt/archives/ --override-config --othermirror deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse|deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse|deb http://archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse --components main restricted universe multiverse --buildplace /var/cache/pbuilder/build//cow.21699 --no-targz --internal-chrootexec chroot /var/cache/pbuilder/build//cow.21699 cow-shell

From pbuilder man page:
--override-config
              Specify to use different apt set up inside the chroot than it
              was used for creating the base.tgz. Specify this when you want
              to do pbuilder --update with a different distribution target set
              u...

Read more...

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Circumvention:
a .pbuilderrc file with the following characteristics--
DISTRIBUTION="$DIST"
MIRRORSITE="http://archive.ubuntu.com/ubuntu/"

where the MIRRORSITE needs to match that used in the ubuntu-dev-tools config file,
if specified.

--

I've proposed a bzr merge with a candidate patch.

A copy of the built patch is available in ppa:jsjgruber/ppa as version 0.140~jsg1ppa1.

Its i386 build log is at https://launchpadlibrarian.net/98099696/buildlog_ubuntu-precise-i386.ubuntu-dev-tools_0.140~jsg1ppa1_BUILDING.txt.gz

To test (while not running on lucid):

Move any .pbuilderrc aside.

pbuilder-dist lucid create
pbuilder-dist lucid login
cat /etc/apt/sources.list

Sources should all refer to lucid repositories at the same website (should match the
/etc/apt/sources.list in the lucid-base.cow directory tree.) Without the fix this file
will list the current build distribution among the correct ones.

Attempt to install python with apt-get install python

It should offer to download and install python rather than declaring that there is no
candidate.

Changed in ubuntu-dev-tools (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → John S. Gruber (jsjgruber)
Changed in ubuntu-dev-tools (Ubuntu):
assignee: John S. Gruber (jsjgruber) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.140

---------------
ubuntu-dev-tools (0.140) unstable; urgency=low

  [ Stefano Rivera ]
  * Bump Standards-Version to 3.9.3, no changes needed.
  * Update machine-readable copyright Format to 1.0.
  * pbuilder-dist: Use the same chroot, whether the system-architecture was
    the supplied architecture or was chosen by default (LP: #943435)
  * backportpackage
    - Prompt to delete existing workdirs (LP: #885514)
    - Support a BACKPORTPACKAGE_UPLOAD configuration/enviornment variable
      (LP: #693217)
  * requestsync:
    - New packages from non-free or contrib go into multiverse (LP: #935643)
    - Catch SeriesNotFoundException and display a friendly error (LP: #963888)

  [ Daniel Hahler ]
  * ubuntutools/archive.py: use ProxyHandler in _download_file.
    This makes use of the system proxy (e.g. http_proxy).
  * pbuilder-dist: Do not force default value for `--aptcache` argument
    (LP: #956903)

  [ John S Gruber ]
  * Don't use --override-config with operations other than update.
    (LP: #409696)

 -- Stefano Rivera <email address hidden> Thu, 29 Mar 2012 00:01:40 +0200

Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Onkar Shinde (onkarshinde) wrote :

Any chance to push fix to oneiric as well?

Revision history for this message
Benjamin Drung (bdrung) wrote :

Yes, but someone needs to do the SRU.

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.