[buildd-tools-devel] schroot variables

Roger Leigh rleigh at codelibre.net
Thu Oct 10 20:02:14 UTC 2013


On Thu, Oct 10, 2013 at 03:31:26PM -0400, shawn wilson wrote:
> I want to change the path where schroot looks for what to copy.
> However, I'm getting a strange error:
>  % schroot -c test -- ls /
> E: 19basefs: error: copyfiles file '/etc/schroot/copy/test' does not exist
> E: test-eb5cb9ea-cee1-49f5-a82d-9a334ad61b69: Chroot setup failed:
> stage=setup-start
>  % ls -l /etc/schroot/copy/test
> -rw-r--r-- 1 root root 8 Oct 10 05:26 /etc/schroot/copy/test
> 
> # schroot.conf
> [test]
> type=directory
> description=Test
> users=swilson
> directory=/opt/schroot/test
> profile=default
> setup.basefs=base/test
> setup.copyfiles=copy/test
> 
> I see setup.d/20copyfile tests -n and -f - both should be true:
> swlap1 /etc/schroot # cat copy/test
> /bin/ls
> swlap1 /etc/schroot # ls -l copy/test
> -rw-r--r-- 1 root root 8 Oct 10 05:26 copy/test
> 
> I'm guessing I'm not doing something or setup.copyfiles is incorrect?

This all looks fine on the face of it.

Does "schroot -v -c test" show SETUP_COPYFILES correctly set to the
value you expect in the setup script environment?

The -n and -f are just extra paranoid checking; so long as SETUP_COPYFILES
is set, it should be fine.  Doesn't look like there's a problem with
the file or its permissions.

I would suggest running ls and cat on the file in your script to see
if it's accessible when running the script.  If it's not, is something
masking the file for some reason?  Is there anything else complicating
things like per-process namespaces, lxc, etc.?

By the way, also note that the sourced common-config script adds a
prefix to the value:

if [ -n "$COPYFILES" ]; then
    SETUP_COPYFILES="$COPYFILES"
fi

You might also want to add a similar bit of logic for SETUP_BASEFS.

> The goal is to have the profile be the same and just modify the
> copyfiles and basefs. basefs, which I created 19basefs for but isn't
> getting to that branch because I don't have a base/test yet. However,
> as soon as I touch base/test, and try to start, I get:
> E: 19basefs: error: copyfiles file '/etc/schroot/copy/test' does not exist
> E: test-e8d69f6a-a158-41e9-bff7-8831eb258c34: Chroot setup failed:
> stage=setup-start

I'm afraid I can't think of anything else of the top of my head; but
hopefully the reason it's not working will become apparent with some
extra logging added to the scripts.  I'd start by just echoing out
what the values are, running ls+cat and just make sure it's giving
you sensible results.  I'm my experience, it's usually something
really simple (and so doubly annoying once you find it!).


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



More information about the Buildd-tools-devel mailing list