The attached patch is a slightly modified and tested version of Matt's patch from 2005-07-13. This adds a "--force-orig-source" option.
Is this OK, or are there any further changes needed?
Regards,
Roger
--
Roger Leigh
Printing on GNU/Linux? http://gutenprint.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
Index: sbuild
===================================================================
RCS file: /cvsroot/buildd-tools/sbuild/sbuild,v
retrieving revision 1.110
diff -u -r1.110 sbuild
--- sbuild 28 Mar 2006 17:55:45 -0000 1.110
+++ sbuild 28 Mar 2006 19:44:51 -0000
@@ -115,6 +115,7 @@
$main::auto_giveback = 0;
$main::build_arch_all = 0;
$main::build_source = 0;
+$main::force_build_source = 0;
$main::jobs_file = "build-progress";
$main::max_lock_trys = 120;
$main::lock_interval = 5;
@@ -191,6 +192,9 @@
elsif (/^-s$/ || /^--source$/) {
$main::build_source++;
}
+ elsif (/^--force-orig-source$/) {
+ $main::force_build_source++;
+ }
elsif (/^-d/ || /^--dist/) {
if (/^-d(.)/ || /^--dist=(.)/) {
$main::distribution = $1.$';
@@ -838,8 +842,10 @@
if ($main::sub_pid == 0) {
open( STDIN, "</dev/null" );
setsid;
- my $binopt = $main::build_source ? "" :
- $main::build_arch_all ? "-b" : "-B";
+ my $binopt = $main::build_source ?
+ $main::force_build_source ? "-sa" : "" :
+ $main::build_arch_all ? "-b" : "-B";
+
if ($main::chroot_dir) {
my $bdir = $dir;
$bdir =~ s/^\Q$main::chroot_dir\E//;
Index: sbuild.1
===================================================================
RCS file: /cvsroot/buildd-tools/sbuild/sbuild.1,v
retrieving revision 1.9
diff -u -r1.9 sbuild.1
--- sbuild.1 14 Mar 2006 18:55:33 -0000 1.9
+++ sbuild.1 28 Mar 2006 19:44:51 -0000
@@ -26,7 +26,8 @@
[ \-m/\-\-maintainer=<maintainer> ]
[ \-e/\-\-uploader=<uploader> ]
[ \-k/\-\-keyid=<key> ]
-[ \-\-purge=<mode>] [\-s/\-\-source ] [ \-v/\-\-verbose ] [ \-q/\-\-quiet ]
+[ \-\-purge=<mode>] [\-s/\-\-source ] [\-\-force\-orig\-source ]
+[ \-v/\-\-verbose ] [ \-q/\-\-quiet ]
[ \-\-make\-binNMU=<entry> ]
[ \-\-nolog ]
package-to-build_x.y-z(.dsc) [ ... ]
@@ -55,88 +56,94 @@
will \fBnot\fP run without a valid \fI~/.sbuildrc\fP.
.PP
Optionally, source dependencies are read from
-\fI/var/lib/sbuild/source-dependencies-*\fP; see that file for more
+\fI/var/lib/sbuild/source\-dependencies\-*\fP; see that file for more
information on source-dependencies. Also see README.Debian.
.PP
You can build either using a local package with its .dsc file or a
remote one by specifying an explicit dpkg version.
.PP
Note: \fBsbuild\fR must be run in the directory (\fI~/build\fP by default) with
-the chroot-{stable,testing,unstable} symlink to the chroot or it will do the
+the chroot\-{stable,testing,unstable} symlink to the chroot or it will do the
build in the base install which is not what you want. When using schroot,
these requirements do not apply; the chroot having the name (or alias) of the
specified distribution will be used; schroot uses a chroot named
-\fI$distribution-sbuild\fP, or \fI$distribution\fP, in that order of
+\fI$distribution\-sbuild\fP, or \fI$distribution\fP, in that order of
preference.
.SH OPTIONS
.TP
-.IR \-a , "--add-depends=<dependency-line>"
-This option adds some source dependency information for a package. It
-can be given more than one time with accumulating effect. The argument
-is a line of source dependencies in the same format as in
-\fI/var/lib/sbuild/source-dependencies\fR. The given dependencies are appended to
-the src-deps from source-dependencies-* files or package src-deps, resp.
-.TP
-.IR \-A , "--arch-all"
-Also build Architecture: all packages, i.e. use dpkg-buildpackage -b
-instead of -B.
+.IR \-a , "\-\-add\-depends=<dependency-line>"
+This option adds some source dependency information for a package. It can be
+given more than one time with accumulating effect. The argument is a line of
+source dependencies in the same format as in
+\fI/var/lib/sbuild/source\-dependencies\fR. The given dependencies are appended
+to the src-deps from source\-dependencies\-* files or package src-deps, resp.
+.TP
+.IR \-A , "\-\-arch\-all"
+Also build Architecture: all packages, i.e. use dpkg\-buildpackage \-b
+instead of \-B.
.TP
-.IR \-b , "--batch"
+.IR \-b , "\-\-batch"
Operate in batchmode, i.e. write a build-progress file during execution
and files on shutdown to facilitate a clean restart.
.TP
-.IR \-d , "--distribution=<distribution>"
+.IR \-d , "\-\-distribution=<distribution>"
Fetch source packages from specified distribution.
.TP
-.IR \-f , "--force-depends=<dependency-line>"
+.IR \-f , "\-\-force\-depends=<dependency-line>"
This option overrides source dependency information for a package. It
can be given more than one time with accumulating effect. The argument
is a line of source dependencies in the same format as in
-\fI/var/lib/sbuild/source-dependencies\fR.
+\fI/var/lib/sbuild/source\-dependencies\fR.
.TP
-.IR \-D , "--debug"
+.IR \-D , "\-\-debug"
Enable debug output.
.TP
-.IR \-m , "--maintainer=<maintainer>"
-Passed to dpkg-genchanges and is used to set the Maintainer: field in the .changes file(s).
+.IR \-m , "\-\-maintainer=<maintainer>"
+Passed to dpkg\-genchanges and is used to set the Maintainer: field in the
+.changes file(s).
+.TP
+.IR \-e , "\-\-uploader=<maintainer>"
+Passed to dpkg\-genchanges and is used to set the Changed\-by: field in the
+.changes file(s).
+.TP
+.IR \-k , "\-\-keyid=<maintainer>"
+Passed to dpkg\-genchanges and is used to set the key to sign the .changes
+file(s). Default is not using any key.
.TP
-.IR \-e , "--uploader=<maintainer>"
-Passed to dpkg-genchanges and is used to set the Changed-by: field in the .changes file(s).
-.TP
-.IR \-k , "--keyid=<maintainer>"
-Passed to dpkg-genchanges and is used to set the key to sign the .changes file(s).
-Default is not using any key.
-.TP
-.IR \-n , "--nolog"
+.IR \-n , "\-\-nolog"
Do not create a package log file in the $log_dir directory and no
build log file, but print everything to stdout. Also do not send any
log mails.
.TP
-.IR \-p , "--purge=<mode>"
+.IR \-p , "\-\-purge=<mode>"
\fImode\fR decides if to delete the build directory. Possible values
are \fBalways\fR, \fBnever\fR, and \fBsuccessful\fR.
.TP
-.IR \-s , "--source"
-Also build source package, i.e. use dpkg-buildpackage without -B. This
-also switches on --purge=never.
+.IR \-s , "\-\-source"
+Also build source package, i.e. use dpkg\-buildpackage without \-B.
+.TP
+.IR \-s , "\-\-force\-orig\-source"
+When used with in conjunction with \-s this option forces the inclusion of the
+orig.tar.gz file in the generated .changes file even in cases where it would
+not normally be included, i.e. use dpkg\-buildpackage \-sa
.TP
-.IR \-v , "--verbose"
+.IR \-v , "\-\-verbose"
Be verbose, i.e. all information goes to stdout as well as to the log files.
.TP
-.IR \-q , "--quiet"
-Be quiet. This is the opposite of --verbose.
+.IR \-q , "\-\-quiet"
+Be quiet. This is the opposite of \-\-verbose.
.TP
-.IR "--make-binNMU=<entry>"
+.IR "\-\-make\-binNMU=<entry>"
With this option, \fBsbuild\fR will create a new changelog entry in
-debian/changelog of every package built. The version number will be in
-the format for binary-only NMUs (three dotted parts in the Debian
-revision); the maintainer is set to the maintainer name configured for
-\fBsbuild\fR. The \fIentry\fR parameter will be used as a changelog
-entry after a fixed one "Binary-only non-maintainer upload for ARCH --
-no source changes". Please note that the versions in the
-\fIpackage-to-build\fR arguments still have to be the unmodified
-(non-NMU ones) so that sources can be found. The version number in log
-files and mails will be modified by \fBsbuild\fR automatically.
+debian/changelog of every package built. The version number will be in the
+format for binary-only NMUs (three dotted parts in the Debian revision); the
+maintainer is set to the maintainer name configured for \fBsbuild\fR. The
+\fIentry\fR parameter will be used as a changelog entry after a fixed one
+\[lq]Binary-only non-maintainer upload for ARCH -- no source
+changes\[rq]. Please note that the versions in the \fIpackage-to-build\fR
+arguments still have to be the unmodified (non-NMU ones) so that sources can be
+found. The version number in log files and mails will be modified by
+\fBsbuild\fR automatically.
.SH ENVIRONMENT VARIABLES
The following environment variables are used by \fBsbuild\fR:
.IP "HOME"
@@ -144,9 +151,11 @@
.IP "LOGNAME"
Used in lockfiles.
.IP "sourcebase"
-A URL for a Debian source distribution; generated by sbuild for scripts in source-dependencies.
+A URL for a Debian source distribution; generated by sbuild for scripts in
+source-dependencies.
.IP "binarybase"
-A URL for a Debian binary distribution; generated by sbuild for scripts in source-dependencies.
+A URL for a Debian binary distribution; generated by sbuild for scripts in
+source-dependencies.
.SH FILES
.TP
.I /etc/sbuild.conf
@@ -162,7 +171,7 @@
.I /var/lib/sbuild
Build statistics, source dependencies and lock files.
.SH AUTHORS
-Roman Hodek <[EMAIL PROTECTED]>.
+Roman Hodek <[EMAIL PROTECTED]>.
.PP
\fBsbuild\fR is based on debbuild, written by James Troup
<[EMAIL PROTECTED]> and has been modified by
@@ -174,10 +183,10 @@
Roger Leigh <[EMAIL PROTECTED]>
.fi
.SH "SEE ALSO"
-.BR update-sourcedeps (1),
-.BR avg-pkg-build-time (1),
+.BR update\-sourcedeps (1),
+.BR avg\-pkg\-build\-time (1),
.BR schroot (1),
-.BR sbuild-setup(7).
+.BR sbuild\-setup(7).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
Index: debian/changelog
===================================================================
RCS file: /cvsroot/buildd-tools/sbuild/debian/changelog,v
retrieving revision 1.141
diff -u -r1.141 changelog
--- debian/changelog 28 Mar 2006 17:55:45 -0000 1.141
+++ debian/changelog 28 Mar 2006 19:44:52 -0000
@@ -37,7 +37,12 @@
shouldn't (merge from upstream SVN cset 98).
- Strip "./" from $pkg, so the name used for source dependencies is
correct (Closes: #359747).
- * sbuild.1: Document schroot chroot naming.
+ - Add --force-orig-source option to force the inclusion of the
+ .orig.tar.gz (Closes: #318030).
+ * sbuild.1:
+ + Document schroot chroot naming.
+ + Document --force-orig-source option.
+ + Correctly escape hyphens in option and file names.
* sbuild-setup.7: Use debootstrap rather than cdebootstrap.
* bin/common_functions: Allow any chroot name to be specified
(Closes: #356785).
pgp8UieXkef0w.pgp
Description: PGP signature

