[cowbuilder-dist] fails if /home is on different partition than /var

Bug #340495 reported by Laurent Bigonville
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: ubuntu-dev-tools

by default cowbuilder create chroot in the home directory of the user.
If I try to update the chroot, I get "invalid cross-device link" as /home is a separate partition.

cowbuilder-dist should maybe not create the chroot there by default

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 340495] [NEW] cowbuilder-dist fails if /home is on different partition than /var

You can override the directory using the PBUILDFOLDER variable.

For example, add export PBUILDFOLDER="/opt/builder/" to your
.bashrc for cowbuilder-dist to use /opt/builder as folder for
everything.

Benjamin Drung (bdrung)
summary: - cowbuilder-dist fails if /home is on different partition than /var
+ [cowbuilder-dist] fails if /home is on different partition than /var
Changed in ubuntu-dev-tools (Ubuntu):
importance: Undecided → Low
Revision history for this message
Juhapekka Piiroinen (juhapekka-piiroinen) wrote :

A workaround exists.

Define following in ~/.pbuilderrc
APTCACHEHARDLINK=no

Revision history for this message
Juhapekka Piiroinen (juhapekka-piiroinen) wrote :

the suggested workaround worked only for create command. Still produces following error messages with build.

cp: cannot create hard link `/var/cache/pbuilder/build//cow.32008/usr/share/man/man1/bzexe.1.gz' to `/home/juhapekka/pbuilder/quantal-base.cow/usr/share/man/man1/bzexe.1.gz': Invalid cross-device link

Revision history for this message
Juhapekka Piiroinen (juhapekka-piiroinen) wrote :

IMO, the bug is in the buildplace config value (/usr/share/pbuilder/pbuilderrc), which does not point under ~/pbuilder/[dist]_build

$ cowbuilder-dist quantal build [somepackage].dsc --dumpconfig
dump config
  mountproc: 0
  mountdev: 0
  mountdevpts: 0
  save_after_login: 0
  debug: 0
  buildplace: /var/cache/pbuilder/build//cow.3020
  buildresult: /home/juhapekka/pbuilder/quantal_result/
  basepath: /home/juhapekka/pbuilder/quantal-base.cow
  mirror: http://archive.ubuntu.com/ubuntu
  distribution: quantal
  components: main restricted universe multiverse
  othermirror: (null)
  debbuildopts:
  binary_arch: 0
  http_proxy: (null)
  no_cowdancer_update: 0
  kernel_image: (null)
  initrd: (null)
  memory_megs: 128
  arch: i386

As a working solution is to define both APTCACHEHARDLINK and BUILDPLACE in ~/.pbuilderrc
APTCACHEHARDLINK=no
BUILDPLACE=~/pbuilder/buildplace

But a fix could be done in cowbuilder-dist file as it is missing the definition for buildplace under self.base like it is done for buildresult (see line 198 for buildresult).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
strk (strk) wrote :

I'm having the same problem upon cowbuilder --login --basepath=/home/strk/base-sid-i386.cow
The APTCACHEHARDLINK=no and BUILDPLACE=~/pbuilder/buildplace directives in ~/.pbuilderrc did not help

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.