[Buildd-tools-devel] Nearly ready for a new sbuild release.

Roger Leigh rleigh at whinlatter.ukfsn.org
Mon Apr 9 23:16:29 UTC 2007


Hi folks,

I think we're nearly ready for a new sbuild release.  Over the last
weeks, I have made quite a few changes, hopefully for the better.  The
main changes are the removal of global source dependencies and removal
of support for sudo in favour of schroot.  There are also a number of
other changes as well.  I have also redone the config files, which are
now comprehensive with every option documented.

The major changes are documented in NEWS.Debian:

  * Support for manual source dependencies has been removed.  Packages
    must now supply all their build dependencies in the debian/control
    file in the source package.  This should now be the case for all
    packages in the archive.

  * Support for sudo has been removed.  schroot is now required to access
    build chroots.  This change has been effected in order to improve the
    safety and security of sbuild, which no longer requires unrestricted
    sudo access to the host system.  Guidance for migrating to a schroot
    setup is provided in error messages and in sbuild-setup(7).  Also see
    schroot(1) and schroot.conf(5) for help configuring schroot.

  * Support for building outside a chroot on the host system has been
    removed, as has the corresponding $chroot_only option.  Building on
    the host system was rather dangerous, and also made the code far more
    complex than needed.  All building must now take place inside a chroot
    managed by schroot.

  * Support for building an unpacked source directory has been removed,
    because the .dsc needs to be available in the current working
    directory and copied into the chroot, or downloaded inside the chroot.

  * Several configuration options have been removed.  sbuild will print a
    diagnostic error message and exit with an error when obsolete options
    are used.

  * The default for $build_mode has been changed from "buildd" to "user".
    The means that sbuild will return a nonzero exit status on build
    failure.

And all the changes are in the changelog:

  * debian/control:
    - Remove sudo from Depends.
    - Add schroot to Depends.
    - Remove schroot from Recommends.
    - Depend on dctrl-tools rather than the transitional grep-dctrl package.
      Thanks to Jonh Wendell (Closes: #417573).
  * debian/rules:
    - Don't install sbuild.conf.local.
    - Install sbuild.conf into /etc/sbuild.
  * debian/NEWS.Debian:
    - New file.
    - Document removal of manual source dependencies and sudo.
    - Document removal of support for building from a directory.
    - Document removal of building on the host system.
    - Document sudo->schroot migration.
    - Document change in $sbuild_mode default.
  * debian/README.Debian:
    - Document removal of manual src-deps.
    - Remove requirements for chroot symlinks in working directory.
  * sbuild:
    - Remove read_deps, so manual src-deps are no longer read.  The
      remainder of the manual src-deps support remains to be removed.
    - Quote all arguments to system commands such as "rm -rf", to prevent
      potential disasters.
    - Update copyrights, and encode in UTF-8.
    - Use "du -k -s" instead of "du -s" to increase portability.  Thanks to
      Martin Koeppe (Closes: #418061).
    - Compute package, version, directory and whether to download sources
      before calling fetch_source_files, because all the needed information
      is available at this point.
    - cleanup_packages:
      + Remove check for schroot when removing build dependencies, since
        schroot is the default.
      + Remove undo_specials().
    - build:
      + Remove do_apply_patches.
      + Replace "822-date" with "date -R".  Thanks to Guillem Jover for
        this patch (Closes: #415798).
      + Remove support for building from a directory.
      + Run dpkg-source from within the chroot.
      + Don't chdir before running dpkg-source.
      + Don't chdir before running dpkg-parsechangelog (do it in the
        schroot child process).
      + Remove obsolete code for running dpkg-buildpackage outside a chroot.
    - fetch_source_files:
      + Remove support for building from a directory.
      + Download sources directly into the chroot build directory.  For
        sources already existing outside the chroot, copy them into the
        chroot build directory.
      + Add extra directory, package, version and download arguments.
      + Only call dsc_md5sums once, rather than twice.
    - apply_patches: Remove.
    - get_special: Remove use of @main::global_patches.
    - Remove SVN Id:.
    - install_deps: Remove @special use.
    - unpack_special_source: Remove.
    - undo_specials: Remove.
    - filter_dependencies: Remove @special use.
    - run_script: Remove.
    - parse_one_srcdep: Remove @special use.
    - get_special: Remove.
    - write_srcdep_lock_file: Remove @special use.
    - check_srcdep_conflicts: Remove @special use.
    - dump_main_state: New function to dump the program state using
      Data::Dumper.  Use to dump the state after each build.
    - Add / separators to all users of $main::chroot_build_dir in paths.
    - Replace all users of regular expressions to strip the chroot dir
      from paths with strip_chroot_path.
    - get_dpkg_status: Print debugging messages with defined variables
      only, to avoid Perl warning.
    - verify_md5sums: Remove obsolete comment regarding chroots.
    - check_group_membership: New function to check the user is a member
      of the sbuild group (Closes: #414064).
    - Added new command-line argument --arch to specify the architecture,
      and pass this to begin_session (Closes: 410576).
  * Sbuild/Chroot.pm:
    - Remove all special casing for sudo and schroot.  schroot is now the
      only supported method of accessing chroots.
    - end_session: Only attempt to end a session when $schroot_session is
      non-empty.
    - _setup_options:
      + Remove use of $chroot_only.
      + Remove trailing / from 'Build Location'.
    - init: Add newline to debugging message.
    - strip_chroot_path: New function to strip the chroot location from a
      path.
    - log_command: Correctly log commands when no APT Options stripping is
      needed.
    - get_command_internal: Set the working directory inside the chroot to
      the build location.
    - begin_session: take the architecture as a second argument, and check
      if a chroot specific for the architecture exists.
  * Sbuild/Conf.pm:
    - Don't export $source_dependencies.
    - Don't define $source_dependencies.
    - Abort with an error if $source_dependencies is defined.
    - Don't export $sudo or $chroot_mode.
    - Don't define $sudo or $chroot_mode.
    - Remove sudo sanity checks.
    - Abort with an error if $sudo or $chroot_mode are defined.
    - Don't export $chroot_only.
    - Don't define $chroot_only.
    - Abort with an error if $chroot_only is defined.
    - Define and export %alternatives.  Thanks to Martin Koeppe
      (Closes: #418060).
    - Define and export @no_auto_upgrade and %watches.
    - Remove the requirement for /usr/share/sbuild/sbuild.conf.
    - Mark deprecated/obsolete variables for removal post-Lenny.
    - Set defaults from global sbuild.conf.
  * sbuild.conf:
    - Remove $source_dependencies.
    - Remove $sudo.
    - Remove $chroot_only.
    - Add and document all options from Sbuild/Conf.pm.
    - Reorder into sections.
    - Merge with sbuild.conf.local, and install into /etc/sbuild.
  * sbuild.conf.local:
    - Remove $source_dependencies.
    - Remove.
  * example.sbuildrc:
    - Replace all options with documented options from sbuild.conf.
    - Add additional user-centric options from sbuild.conf.
    - Reorder into sections.
  * sbuild.1.in: Document --arch and chroot search order.
  * sbuild-setup.7.in:
    - Remove sudo setup.
    - Update user section to document sbuild group membership and
      add_sbuild_user.  Remove chroot setup, which is now handled by
      schroot (Closes: #413524).
  * bin/README.bins: Remove sudo from extra package list.
  * bin/updatechroot, bin/upgradechroot, bin/chrapt: Remove chroot_mode.
  * chroot/add_sbuild_user:
    - Remove sudo setup instructions and copying of /etc/sudoers to the
      chroot.
    - Rewrite in perl.  Only call adduser; all other chroot setup is
      taken care of by the 50sbuild schroot chroot setup script
      (Closes: #413908).
  * TODO: New file.  Document needed changes.


I would greatly appreciate it if anyone could find the time to install
the new version and test it see if it still works for you.  You might
get prompted to remove obsolete configuration file options and change
your configuration.  I'm particularly interested in the ease of
upgrading.  I'm also interested in any issues present after the
upgrade.

I've done a lot of testing on my system, so I'm pretty confident it
should work for you, but I'd like to see if there are any situations
which need work that my testing hasn't uncovered.


Thanks,
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070410/c5b8d7a1/attachment.pgp


More information about the Buildd-tools-devel mailing list