On 06/03/07 at 21:07 +0000, Roger Leigh wrote: > Lucas Nussbaum <[EMAIL PROTECTED]> writes: > > > I use sbuild in "schroot" chroot_mode. I can't find out how to run > > builds as a normal user (instead of root). This causes some packages to > > fail to build (for example: petsc, bazaar, subversion).
What I'm trying to achieve is to run the build rule (debian/rules build) as a normal user. I usually run sbuild as root, and that's fine with me, but if I have to do something such as 'su - user -c "sbuild [...]"', that's fine as well for me. So what I was originally looking for was a '-u user' option, that would mean "use that username to run parts that can be run as user". The other way around (running everything as user except what needs root privileges) is more logical, indeed :-) > The user needs to be in root-users or root-groups to allow > build-dependency installation and removal in the chroot. Do you have > this? Yes > If you could attach your sbuild.conf/.sbuildrc and schroot.conf, that > would be useful. Attached > If this only occurs for specific packages, the build > logs of those packages would also be useful. I have two different failures: - one when running sbuild as root, with some packages that fail to build as root. A good example is petsc, because it fails at the start of the build. See http://people.debian.org/~lucas/logs/2007/02/01/debian-rebuild/petsc_2.3.2-1_etch32.buildlog - one when running sbuild as user: [EMAIL PROTECTED]:~$ sbuild -A -s -d etch32 -v petsc_2.3.2-1 Automatic build of petsc_2.3.2-1 on gdx0247.orsay.grid5000.fr by sbuild/amd64 0.53 Build started at 20070307-1058 ****************************************************************************** Error in tempfile() using /var/lib/schroot/mount/etch32-6bb5e78b-951f-4885-9931-1bc8fcd3c1d9//var/lib/sbuild/apt.conf.XXXXXX: Parent directory (/var/lib/schroot/mount/etch32-6bb5e78b-951f-4885-9931-1bc8fcd3c1d9//var/lib/sbuild/) is not writable at /usr/share/perl5/Sbuild/Chroot.pm line 161 > > If it is possible, could you please document how to build as normal user ? > > It is certainly possible. If the documentation is missing anything, > I'll add it as soon as we have figured out the problem. One problem I had with documentation is the /usr/share/sbuild/add_sbuild_user script, which didn't work for me since I use schroot mode with "file" type chroots. -- | Lucas Nussbaum | [EMAIL PROTECTED] http://www.lucas-nussbaum.net/ | | jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |
# # sbuild.conf: global sbuild settings that will survive an upgrade. # This makes it easier to drop this sbuild version into a buildd # setting. (Also see example.sbuildrc) Note: these are common buildd # settings, not defaults for this package # File with the source dependencies (also used by update-sourcedeps) # Note that source dependencies are obsolete, and support will be removed # in Lenny. #$source_dependencies = "/var/lib/sbuild/source-dependencies"; # Name of a database for logging package build times (optional, no database # is written if empty) #$avg_time_db = "/var/lib/sbuild/avg-build-times"; # Name of a database for logging package space requirement (optional) #$avg_space_db = "/var/lib/sbuild/avg-build-space"; # Name for dir for source dependency lock files #$srcdep_lock_dir = "/var/lib/sbuild/srcdep-lock"; # PGP-related option to pass to dpkg-buildpackage. Usually neither .dsc # nor .changes files shall be signed automatically. #$pgp_options = "-us -uc"; # sbuild behaviour; possible values are "user" (exit status reports # build failures) and "buildd" (exit status does not report build # failures). $sbuild_mode = "user"; # Chroot behaviour; possible values are "split" (apt and dpkg are run # from the host system) and "schroot" (all package operations are done in # the chroot with schroot, but the chroot must allow networking) $chroot_mode = "schroot"; # Require chrooted building? $chroot_only = 1; # APT policy. 1 to enable additional checking of package versions # available in the APT cache, or 0 to disable. 0 is the traditional # sbuild behaviour; 1 is needed to build from additional repositories # such as sarge-backports or experimental, and has a small performance # cost. #$apt_policy = 1; # Check watched packages to discover missing build dependencies. This # can be disabled to increase the speed of builds #$check_watches = 1; # don't remove this, Perl needs it: 1;
# # example for ~/.sbuildrc # commented out stuff are defaults # # $Id: example.sbuildrc 512 2006-03-29 13:26:59Z rleigh $ # # Directory for chroot symlinks and sbuild logs. Defaults to the # current directory if unspecified. #$build_dir="/tmp/build"; # Directory for writing build logs to #$log_dir = "/tmp/build"; # Mail address where logs are sent to (mandatory, no default!) #$mailto = "roman"; $mailto = "null"; # Name to use as override in .changes files for the Maintainer: field # (mandatory, no default!). $maintainer_name='Lucas Nussbaum <[EMAIL PROTECTED]>'; # Name to use as override in .changes file for the Changed-By: field. #$uploader_name='Francesco Paolo Lovergine <[EMAIL PROTECTED]>'; # Keyid to use in .changes for the current upload. # It overrides both $maintainer_name and $uploader_name #$key_id='Francesco Paolo Lovergine <[EMAIL PROTECTED]>'; # When to purge the build directory afterwards; possible values are "never", # "successful", and "always" $purge_build_directory="always"; # After that time (in minutes) of inactivity a build is terminated. Activity # is measured by output to the log file. $stalled_pkg_timeout = 240; # Some packages may exceed the general timeout (e.g. redirecting output to # a file) and need a different timeout. Below are some examples. #%individual_stalled_pkg_timeout = ( # chess => 600, # cint => 300 #); # By default, the -s option only includes the .orig.tar.gz when needed # (i.e. when the Debian revision is 0 or 1). By setting this option # to 1, the .orig.tar.gz will always be included when -s is used. # This is equivalent to --force-orig-source. #$force_orig_source = 0; # don't remove this, Perl needs it: 1;
signature.asc
Description: Digital signature

