[buildd-tools-devel] sbuild: retrieving schroot mount point

Roger Leigh rleigh at codelibre.net
Tue Jun 3 21:58:05 UTC 2014


On Tue, Jun 03, 2014 at 06:10:27PM +0200, Johannes Schauer wrote:
> Hi,
> 
> I'm trying to run a tracer like strace, inotify, audit or fatrace during an
> sbuild run so that I can gather which files are accessed and which programs
> executed when building a source package. That info can then be used to find
> potential cruft in a source package's build dependencies.
> 
> Is there a sbuild hook which is started just after schroot created and
> populated its tmpfs but is not run from within the schroot environment?
> Something like chroot-setup-commands but run from outside the schroot
> environment? It seems that pre-build-commands is run before the schroot is
> mounted.

Not at the moment.  However, fixing this has been desired for some time--
the existing hooks could be expanded in scope fairly easily; they do need
defining a bit more clearly though so it's clear what privileges each
hook has, and if they are accessible to end users or not (i.e. if they
run as root or as the sbuild user, and if they are run inside or outside
the chroot).

> If this doesnt exist yet, would you accept a patch implementing it?

Absolutely, that would be really appreciated.

However, there may be issues tracing since we won't necessarily have
root on the host, only in the chroot.  And since schroot is setuid
that will prevent ptracing in the chroot.  It might be possible to
do entirely inside the chroot though?  Non-ptrace mechanisms might
be fine though.


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20140603/2cb850a4/attachment.sig>


More information about the Buildd-tools-devel mailing list