Bug#622735: [buildd-tools-devel] Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-05-29 Thread Roger Leigh
tags 622735 + fixed-upstream pending
thanks

On Thu, Apr 14, 2011 at 11:58:11AM +0200, Raphaël Hertzog wrote:
> I was only running:
> $ sbuild-createchroot wheezy wheezy-i386-sbuild http://ftp.debian.org/debian
> [...]
> I: Please rename and modify this file as required.
> I: sudo chroot configuration linked as
> /etc/sbuild/chroot/wheezy-i386-sbuild.
> chown: invalid user: `sbuild:sbuild'
> E: Failed to set sbuild:sbuild ownership on /build
> Failed to set up chroot
> E: Error creating chroot session: skipping apt update
> I: Successfully set up wheezy chroot.
> I: Run "sbuild-adduser" to add new sbuild users.
> 
> It looks like the chown is tried while the NSS files have not yet been
> copied over.

Yes, this was due to the Chroot class calling ChrootSetup::basesetup()
when the session is created to do the apt update/upgrade.  basesetup()
depended upon the sbuild user and group existing in the chroot to
chown various bits.

I've updated sbuild-createchroot to explicitly copy the sbuild user and
group into the chroot so that this can't fail.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?   http://gutenprint.sourceforge.net/
   `-GPG Public Key: 0x25BFB848   Please GPG sign your mail.


signature.asc
Description: Digital signature


Bug#622735: [buildd-tools-devel] Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-04-26 Thread Roger Leigh
On Tue, Apr 26, 2011 at 03:13:58PM +0200, Marc Dequènes (Duck) wrote:
> Coin,
> 
> Quoting Roger Leigh :
> 
> >After completing the chroot creation, it's attempting to run
> >'apt-get update' and 'apt-get dist-upgrade' inside the chroot.
> >While this fails, the chroot was created successfully, and you
> >should be able to just run 'sbuild-update -ud wheezy' to update
> >the chroot.
> 
> How would i know by myself? I had a very quick look at the code, and
> it didn't seem this trivial. When a tool outputs errors and says
> "Successfully set up" later, i really wonder if it can be trusted. I
> personally wouldn't upload anything generated in this chroot without
> rebuilding it or being sure the build environment is not screwed up.

You are certainly correct to question the correctness after seeing
the error.  I will certainly look into fixing this as time allows.

> I made a test build and it seems to work well, thanks.

That's good to know.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?   http://gutenprint.sourceforge.net/
   `-GPG Public Key: 0x25BFB848   Please GPG sign your mail.


signature.asc
Description: Digital signature


Bug#622735: [buildd-tools-devel] Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-04-26 Thread Marc Dequènes (Duck)

Coin,

Quoting Roger Leigh :


After completing the chroot creation, it's attempting to run
'apt-get update' and 'apt-get dist-upgrade' inside the chroot.
While this fails, the chroot was created successfully, and you
should be able to just run 'sbuild-update -ud wheezy' to update
the chroot.


How would i know by myself? I had a very quick look at the code, and  
it didn't seem this trivial. When a tool outputs errors and says  
"Successfully set up" later, i really wonder if it can be trusted. I  
personally wouldn't upload anything generated in this chroot without  
rebuilding it or being sure the build environment is not screwed up.


I made a test build and it seems to work well, thanks.

Regards.

--
Marc Dequènes (Duck)


pgpn9MjZFtj2t.pgp
Description: PGP Digital Signature


Bug#622735: [buildd-tools-devel] Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-04-22 Thread Roger Leigh
On Fri, Apr 22, 2011 at 10:19:56PM +0200, Marc Dequènes (Duck) wrote:
> Please do something quickly! Several other DDs need this fixed to work.

What's actually breaking here?

After completing the chroot creation, it's attempting to run
'apt-get update' and 'apt-get dist-upgrade' inside the chroot.
While this fails, the chroot was created successfully, and you
should be able to just run 'sbuild-update -ud wheezy' to update
the chroot.

This is not to say that there's not a bug here, just that it's
not, at least from what I saw reported, a major problem that
doesn't have a simple workaround.  I'll certainly look into why
this is failing; I think the explanation is fairly straightforward:
the NSS file copying is done by schroot, but at this point schroot
is not yet set up (or even required), so we use sudo instead, and
this doesn't involve any file copying.  We should probably skip
the chown of /build if the sbuild user/group doesn't yet exist.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?   http://gutenprint.sourceforge.net/
   `-GPG Public Key: 0x25BFB848   Please GPG sign your mail.


signature.asc
Description: Digital signature


Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-04-22 Thread Marc Dequènes (Duck)

severity 622735 important
thanks


Coin,

Please do something quickly! Several other DDs need this fixed to work.

--
Marc Dequènes (Duck)


pgpYIbG43Yrld.pgp
Description: PGP Digital Signature


Bug#622735: sbuild-createchroot fails to chown /build due to non-existing user & group

2011-04-14 Thread Raphaël Hertzog
Package: sbuild
Version: 0.62.2-1
Severity: normal

I was only running:
$ sbuild-createchroot wheezy wheezy-i386-sbuild http://ftp.debian.org/debian
[...]
I: Please rename and modify this file as required.
I: sudo chroot configuration linked as
/etc/sbuild/chroot/wheezy-i386-sbuild.
chown: invalid user: `sbuild:sbuild'
E: Failed to set sbuild:sbuild ownership on /build
Failed to set up chroot
E: Error creating chroot session: skipping apt update
I: Successfully set up wheezy chroot.
I: Run "sbuild-adduser" to add new sbuild users.

It looks like the chown is tried while the NSS files have not yet been
copied over.

Cheers,

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 
'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sbuild depends on:
ii  adduser   3.112+nmu2 add and remove users and groups
ii  libc6 2.11.2-11  Embedded GNU C Library: Shared lib
ii  libgcc1   1:4.6.0-2  GCC support library
ii  libsbuild-perl0.62.2-1   Tool for building Debian binary pa
ii  libstdc++64.6.0-2The GNU Standard C++ Library v3
ii  perl  5.10.1-19  Larry Wall's Practical Extraction 
ii  perl-modules  5.10.1-19  Core Perl modules

Versions of packages sbuild recommends:
ii  debootstrap   1.0.29 Bootstrap a basic Debian system
ii  fakeroot  1.15.1-1   tool for simulating superuser priv

Versions of packages sbuild suggests:
ii  deborphan 1.7.28.5   program that can find unused packa
ii  wget  1.12-3 retrieves files from the web

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org