Bug#551311: [buildd-tools-devel] Bug#551311: Bug#551311: Please provide debuild like functionality for sbuild

2009-10-19 Thread Roger Leigh
On Sun, Oct 18, 2009 at 11:57:24PM -0400, Andres Mejia wrote:
 tags 551311 patch
 thanks
 
 Here's a preliminary patch to provide an sbulid-debuild script that provides 
 debuild like functionality for sbuild. I thought it may be better to seperate 
 this functionality from a run of sbuild. Also, instead of actual patches, 
 I've 
Many thanks.  I've committed the three files as they stand, but they
are not yet tied into the build scripts or packaged, since they do
need some further work.

Some initial comments:

1) Command-line options.
   I think it would be appropriate to mimic the exact options that
   debuild does, and then add sbuild-specific options with e.g.
   --sbuild-option which can then be passed through to sbuild as
   --option (or set via Sbuild::Conf).

2) dpkg-buildpackage invocation.
   Can't we just clean the tree and run dpkg-source directly?  I'm
   not sure I see the need to do a full build of a package just
   to generate a source package

3) sbuild invocation.
   Why?  The module Sbuild::Build is there to be used for this purpose.
   If you are implementing an alterative interface to sbuild, then
   just include and use the module like bin/sbuild does.

4) Features useful for sbuild:
   - building in source tree (dpkg-source package generation)
   - running commands before build
   - running commands after build (lintian)
   While implemented in sbuild-debuild, these features would also be
   useful in the regular sbuild as well, IMO.  I've long wanted to
   create pre- and post-build hook scripts to be run before and after
   a build.

5) Use of chdir.
   I'm not sure I'm too keen on 'chdir($build_input)'.  Does this
   mirror debuild's tree walk to find debian/changelog?
   In general, I think we should mimic the dpkg-buildpackage/debuild
   behaviour here.  If no .dsc or source is specified, then find
   debian/changelog and run dpkg-source.  Do any existing tools allow
   the build directory as an argument?

So in principle I'm not against the idea, but I do think a number of
the features would do better in the core library code than as a
separate program, and if we are calling it sbuild-debuild, I think
we should emulate debuild behaviour exactly, including options.


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#551311: [buildd-tools-devel] Bug#551311: Bug#551311: Please provide debuild like functionality for sbuild

2009-10-19 Thread Andres Mejia
On Monday 19 October 2009 19:10:21 Roger Leigh wrote:
 On Sun, Oct 18, 2009 at 11:57:24PM -0400, Andres Mejia wrote:
  tags 551311 patch
  thanks
 
  Here's a preliminary patch to provide an sbulid-debuild script that
  provides debuild like functionality for sbuild. I thought it may be
  better to seperate this functionality from a run of sbuild. Also, instead
  of actual patches, I've
 
 Many thanks.  I've committed the three files as they stand, but they
 are not yet tied into the build scripts or packaged, since they do
 need some further work.
 
 Some initial comments:
 
 1) Command-line options.
I think it would be appropriate to mimic the exact options that
debuild does, and then add sbuild-specific options with e.g.
--sbuild-option which can then be passed through to sbuild as
--option (or set via Sbuild::Conf).
 
 2) dpkg-buildpackage invocation.
Can't we just clean the tree and run dpkg-source directly?  I'm
not sure I see the need to do a full build of a package just
to generate a source package
 
 3) sbuild invocation.
Why?  The module Sbuild::Build is there to be used for this purpose.
If you are implementing an alterative interface to sbuild, then
just include and use the module like bin/sbuild does.
 
 4) Features useful for sbuild:
- building in source tree (dpkg-source package generation)
- running commands before build
- running commands after build (lintian)
While implemented in sbuild-debuild, these features would also be
useful in the regular sbuild as well, IMO.  I've long wanted to
create pre- and post-build hook scripts to be run before and after
a build.
 
 5) Use of chdir.
I'm not sure I'm too keen on 'chdir($build_input)'.  Does this
mirror debuild's tree walk to find debian/changelog?
In general, I think we should mimic the dpkg-buildpackage/debuild
behaviour here.  If no .dsc or source is specified, then find
debian/changelog and run dpkg-source.  Do any existing tools allow
the build directory as an argument?
 
 So in principle I'm not against the idea, but I do think a number of
 the features would do better in the core library code than as a
 separate program, and if we are calling it sbuild-debuild, I think
 we should emulate debuild behaviour exactly, including options.
 
 
 Regards,
 Roger
 

Well, with this, I now think it's better to extend sbuild and the library code 
instead of creating a seperate program. I suppose this would have the benefit 
of providing more features for sbuild (as noted by comment 4), and would allow 
taking advantage of getting everything logged by sbuild directly (comment 3). 
With this I could also avoid having to mimic every option of debuild (comment 
1), use dpkg-source directly (comment 2), and supply a directory to dpkg-
source directly (comment 5).

-- 
Regards,
Andres



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



Bug#551311: [buildd-tools-devel] Bug#551311: Please provide debuild like functionality for sbuild

2009-10-18 Thread Andres Mejia
tags 551311 patch
thanks

Here's a preliminary patch to provide an sbulid-debuild script that provides 
debuild like functionality for sbuild. I thought it may be better to seperate 
this functionality from a run of sbuild. Also, instead of actual patches, I've 
supplied the script, man page, and an example configuration file instead.

The functionality that this script provides is best explained through the man 
page I've attached. To summarize, this script gives similar functionality as 
debuild. You can run it from a debianized package source directory to build a 
package using sbuild. The resulting package's .changes file is then processed 
through lintian. sbuild-debuild also allows for supplying debianized source 
package directories directly and for supply a .dsc file. Also, sbuild-debuild 
allows for running external commands in a similar fashion as you would run 
hooks.

There's one thing left to do that I think is crucial. That is figuring out how 
to log everything that's output from this script to a log file. Perhaps it's 
best to run sbuild with the --nolog option to not interfere with a potential 
logging operation from sbuild-debuild. I would like log files to be written to 
package_version_arch.build

On Saturday 17 October 2009 01:52:10 Andres Mejia wrote:
 Package: sbuild
 Version: 0.59.1~rc1
 Severity: wishlist
 
 
 It would be great if it were possible to build packages in a similar
  fashion as you would via debuild, whether it be via sbuild or some new
  script, perhaps one named sdebuild.
 
 What I mean is, let's say an sdebuild script is written. You would run
  sdebuild in the source tree of a debianized program and it will create the
  source packages to be run via sbuild and after a build, it could
  optionally run lintian, run piuparts, sign your packages, etc.
 
 -- System Information:
 Debian Release: squeeze/sid
   APT prefers unstable
   APT policy: (500, 'unstable'), (1, 'experimental')
 Architecture: i386 (i686)
 
 Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
 Shell: /bin/sh linked to /bin/dash
 
 Versions of packages sbuild depends on:
 ii  adduser   3.111  add and remove users and
  groups ii  libsbuild-perl0.59.1~rc1 Tool for building
  Debian binary pa ii  perl  5.10.1-5   Larry Wall's
  Practical Extraction ii  perl-modules  5.10.1-5   Core
  Perl modules
 
 Versions of packages sbuild recommends:
 ii  debootstrap   1.0.20 Bootstrap a basic Debian
  system ii  fakeroot  1.14   Gives a fake root
  environment
 
 Versions of packages sbuild suggests:
 pn  deborphan none (no description available)
 ii  wget  1.12-1 retrieves files from the web
 
 -- no debconf information
 
 
 
 ___
 Buildd-tools-devel mailing list
 buildd-tools-de...@lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/buildd-tools-devel
 

-- 
Regards,
Andres


sbuild-debuild
Description: Perl program
.\ Copyright © 2005-2009  Roger Leigh rle...@debian.org
.\ Copyright © 2009   Andres Mejia mcita...@gmail.com
.\
.\ This program is free software: you can redistribute it and/or modify
.\ it under the terms of the GNU General Public License as published by
.\ the Free Software Foundation, either version 2 of the License, or
.\ (at your option) any later version.
.\
.\ This program is distributed in the hope that it will be useful, but
.\ WITHOUT ANY WARRANTY; without even the implied warranty of
.\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
.\ General Public License for more details.
.\
.\ You should have received a copy of the GNU General Public License
.\ along with this program.  If not, see
.\ http://www.gnu.org/licenses/.
.TH SBUILD-DEBUILD 1 @RELEASE_DATE@ Version @VERSION@ Debian sbuild
.SH NAME
sbuild\-debuild \- build debian packages from source in debuild\-like manner
.SH SYNOPSIS
.B sbuild\-debuild
.RB [ \-h \[or] \-\-help  \[or]  \-V \[or] \-\-version ]
.RB [ \-\-dpkg\-buildpackage\-opts   \fIstring\fP ]
.RB [ \-\-dpkg\-buildpackage\-extra\-opts   \fIstring\fP ]
.RB [ \-\-sbuild\-opts   \fIstring\fP ]
.RB [ \-\-sbuild\-extra\-opts   \fIstring\fP ]
.RB [ \-\-lintian\-opts   \fIstring\fP ]
.RB [ \-\-lintian\-extra\-opts   \fIstring\fP ]
.RB [ \-\-no\-lintian ]
.RB [ \-\-pre\-dpkg\-buildpackage\-commands   \fIstring\fP ]
.RB [ \-\-pre\-sbuild\-commands   \fIstring\fP ]
.RB [ \-\-pre\-lintian\-commands   \fIstring\fP ]
.RB [ \-\-pre\-exit\-commands   \fIstring\fP ]
.BR [PACKAGE1[.dsc]  [ PACKAGE2[.dsc]  [ PACKAGE\f[BI]n\fP[.dsc] ]]]
.SH DESCRIPTION
\fBsbuild\-debuild\fR rebuilds Debian binary packages from the corresponding
Debian source in a manner similar to debuild.
.PP
sbuild\-debuild is given a list of packages to process as the arguments

Bug#551311: Please provide debuild like functionality for sbuild

2009-10-17 Thread Andres Mejia
Package: sbuild
Version: 0.59.1~rc1
Severity: wishlist


It would be great if it were possible to build packages in a similar fashion as
you would via debuild, whether it be via sbuild or some new script, perhaps one
named sdebuild.

What I mean is, let's say an sdebuild script is written. You would run sdebuild
in the source tree of a debianized program and it will create the source
packages to be run via sbuild and after a build, it could optionally run
lintian, run piuparts, sign your packages, etc.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

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

Versions of packages sbuild depends on:
ii  adduser   3.111  add and remove users and groups
ii  libsbuild-perl0.59.1~rc1 Tool for building Debian binary pa
ii  perl  5.10.1-5   Larry Wall's Practical Extraction 
ii  perl-modules  5.10.1-5   Core Perl modules

Versions of packages sbuild recommends:
ii  debootstrap   1.0.20 Bootstrap a basic Debian system
ii  fakeroot  1.14   Gives a fake root environment

Versions of packages sbuild suggests:
pn  deborphan none (no description available)
ii  wget  1.12-1 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