Re: pbuilder/chroot problems

2008-11-09 Thread Sven Joachim
On 2008-11-09 01:06 +0100, Boyd Stephen Smith Jr. wrote:

 I'm trying to set up a pbuilder environment on my laptop, and it's failing 
 with this error:
 W: Failure trying to run: chroot /home/bss/debootstrap-test 
 dpkg --force-depends --install var/cache/apt/archives/libc6_2.7-16_amd64.deb

 I tried etch instead of sid, thinking it might be some unstable breakage, and 
 got an error that only differed in the version of libc6.

 The error looked to be coming for debootstrap, so I tried debootstrapping 
 manually (variant=buildd) and got the same error.

 Then, I attempted to to the chroot command directly, and got a bit more 
 verbose output ending in:
 Setting up libc6 (2.7-16) ...
 sh: /dev/null: Permission denied
 sh: /dev/null: Permission denied

My crystal ball tells me that /home is mounted with the `nodev' option.
Correct?

Sven


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: pbuilder/chroot problems

2008-11-09 Thread Boyd Stephen Smith Jr.
On Sunday 09 November 2008 03:05, Sven Joachim wrote:
 On 2008-11-09 01:06 +0100, Boyd Stephen Smith Jr. wrote:
  I attempted to to the chroot command directly, and got a bit more
  verbose output ending in:
  Setting up libc6 (2.7-16) ...
  sh: /dev/null: Permission denied
  sh: /dev/null: Permission denied

 My crystal ball tells me that /home is mounted with the `nodev' option.
 Correct?

Brilliant!

Yeah, that's my problem. I guess I was expecting 'nodev' to cause some other 
error, perhaps on device creation.  I was initially creating my pbuilder 
chroots on in /var/cache and that's also mounted 'nodev'.

I know chroots will need special attention but, are there any guidelines as to 
what filesystems are generally safe to mount 'nodev' (and 'nosuid')?
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
[EMAIL PROTECTED]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     


pgpRhfzlhiLHU.pgp
Description: PGP signature


pbuilder/chroot problems

2008-11-08 Thread Boyd Stephen Smith Jr.
I'm trying to set up a pbuilder environment on my laptop, and it's failing 
with this error:
W: Failure trying to run: chroot /home/bss/debootstrap-test 
dpkg --force-depends --install var/cache/apt/archives/libc6_2.7-16_amd64.deb

I tried etch instead of sid, thinking it might be some unstable breakage, and 
got an error that only differed in the version of libc6.

The error looked to be coming for debootstrap, so I tried debootstrapping 
manually (variant=buildd) and got the same error.

Then, I attempted to to the chroot command directly, and got a bit more 
verbose output ending in:
Setting up libc6 (2.7-16) ...
sh: /dev/null: Permission denied
sh: /dev/null: Permission denied
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based 
frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 
75.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC 
contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 
/usr/local/lib/site_perl .) 
at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
sh: /dev/null: Permission denied
sh: /dev/null: Permission denied
/var/lib/dpkg/info/libc6.postinst: line 29: /dev/null: Permission denied
dpkg: error processing libc6 (--install):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 libc6

I checked the permissions of /dev/null inside the chroot and they are 
identical to the permissions outside the chroot:
crw-rw-rw- 1 root root 1, 3 2007-05-21 10:31 debootstrap-test/dev/null
crw-rw-rw- 1 root root 1, 3 2008-11-08 03:35 /dev/null

Outside the chroot, I can write to either device as any user.  Once I've 
chrooted, writing fails:
sh-3.2# id
uid=0(root) gid=0(root) groups=0(root)
sh-3.2# echo foo  /dev/null
sh: /dev/null: Permission denied

I can only assume that the issue is introduced by the chroot command.  The 
chroot I'm using comes from coreutils-5.97-5.3.  However, my VPS has the same 
version of coreutils, and it does not show similar behavior:
[EMAIL PROTECTED]:~$ sudo cowbuilder --login --basepath 
/var/cache/pbuilder/sid.cow
Password:
 - Copying COW directory
 - Invoking pbuilder
 - Running in no-targz mode
 - copying local configuration
 - mounting /proc filesystem
 - mounting /dev/pts filesystem
 - policy-rc.d already exists
Obtaining the cached apt archive contents
 - entering the shell
[EMAIL PROTECTED]:/# echo foo  /dev/null
[EMAIL PROTECTED]:/# echo $?
0

(I use cowbuilder there, but error occurs with both cowbuilder and pbuilder.)

Since the chroot command delegates most of the heavy lifting to the chroot 
system call, I thought that this change in behavior might be due to differing 
kernel versions.  The VPS (working) is 2.6.24-19-xen (uname -r).  The 
laptop (broken) is 2.6.24-etchnhalf.1-amd64.

Moving back to 2.6.18-[456] on this laptop would be a little annoying -- it 
has Intel 3945 wireless built-in, and I prefer the iwl3945 module in 2.6.24 
over the ipw3945 module in 2.6.18 -- among other things, it suspends better.

I don't see a bug about this, perhaps I should file one?
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
[EMAIL PROTECTED]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     


pgpqkWbbmDHRj.pgp
Description: PGP signature