Trying to build a package of format 3.0 (quilt) with the
upstream tarball missing, I get errors:
$ debuild -I -i -b
dpkg-buildpackage -rfakeroot -D -us -uc -I -i -b
[...]
dpkg-source -I -i --before-build csound
dpkg-buildpackage: host architecture i386
dpkg-source: error: can't build with source format '3.0 (quilt)': no orig.tar file found
As I understand it, the problem is this:
- before building, people want dpkg-buildpackage to make sure
all patches are applied for them
- this requires looking at the source package
- there is no source package
Personally, I am not sure about that first step: shouldn’t
dpkg-buildpackage just build whatever it is presented with, leaving
the unpack and build processes entirely independent? In other words,
I wish the facility to call --before-build were optional.
But I am open to other solutions, too. Thoughts?
Jonathan
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20100520035...@progeny.tock
> Hi Raphaël,
>
> Trying to build a package of format 3.0 (quilt) with the
> upstream tarball missing, I get errors:
>
> $ debuild -I -i -b
> dpkg-buildpackage -rfakeroot -D -us -uc -I -i -b
> [...]
> dpkg-source -I -i --before-build csound
mrvn@frosties:/tmp/mdadm/mdadm-3.1.1% dpkg-source -I -i --before-build mdadm
dpkg-source: need -x or -b
What version of dpkg-dev is that? My 1.15.7.2 doesn't have that option.
> dpkg-buildpackage: host architecture i386
> dpkg-source: error: can't build with source format '3.0 (quilt)': no orig.tar file found
>
> As I understand it, the problem is this:
>
> - before building, people want dpkg-buildpackage to make sure
> all patches are applied for them
>
> - this requires looking at the source package
>
> - there is no source package
>
> Personally, I am not sure about that first step: shouldn’t
> dpkg-buildpackage just build whatever it is presented with, leaving
> the unpack and build processes entirely independent? In other words,
> I wish the facility to call --before-build were optional.
Definetly not. It is too easy to quilt pop a patch and forget to push it
again. And then you build the package without the patch.
I don't see why you need the orig.tar.gz for this though. Look at the
.pc dir and debian/patches/series and figure it out from there without
this error. All patches need to be applied except the last one if it is
debian-changes (unversioned case) or debian-changes-<current version>.
I think the debian-changes patch should be optional as a source build
would recreate it from the current working dir. Building with and
without source building should behave the same in regards to applying
patches.
> But I am open to other solutions, too. Thoughts?
> Jonathan
Fix dpkg-source --before-build to work without orig.tar.gz and maybe add
an option to build an unpatched working dir for when you really want to
do that.
MfG
Goswin
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/87r5l7m...@frosties.localdomain
Without this change, attempts to build a package of format 3.0 (quilt)
with the upstream tarball missing result in errors.
$ dpkg-buildpackage -b
[...]
dpkg-source -I -i --before-build csound
dpkg-buildpackage: host architecture i386
dpkg-source: error: can't build with source format '3.0 (quilt)': no orig.tar file found
Signed-off-by: Jonathan Nieder <jrni...@gmail.com>
---
Goswin von Brederlow wrote:
> What version of dpkg-dev is that?
A merge of master and sid. --before-build and --after-build are from
commit 8c1fc3 (2010-04-28), targetted at 1.15.8, I think.
No changelog entry needed, since the feature is not released yet:
we can pretend it always worked this way. :)
> I don't see why you need the orig.tar.gz for this though.
True. Maybe something like this will do.
scripts/dpkg-source.pl | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index a5e29af..b671884 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -322,10 +322,6 @@ if ($options{'opmode'} =~ /^(-b|--print-format|--(before|after)-build)$/) {
exit(0);
}
- # Verify pre-requesites are met
- my ($res, $msg) = $srcpkg->can_build($dir);
- error(_g("can't build with source format '%s': %s"), $build_format, $msg) unless $res;
-
if ($options{'opmode'} eq "--before-build") {
$srcpkg->before_build($dir);
exit(0);
@@ -334,6 +330,10 @@ if ($options{'opmode'} =~ /^(-b|--print-format|--(before|after)-build)$/) {
exit(0);
}
+ # Verify pre-requisites are met
+ my ($res, $msg) = $srcpkg->can_build($dir);
+ error(_g("can't build with source format '%s': %s"), $build_format, $msg) unless $res;
+
# Only -b left
info(_g("using source format `%s'"), $fields->{'Format'});
run_vendor_hook("before-source-build", $srcpkg);
--
1.7.1
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20100520055...@progeny.tock
On Thu, 20 May 2010, Jonathan Nieder wrote:
> It is perfectly reasonable to use the before_build and after_build
> hooks before the complete source package is ready to be built.
Pushed a slightly modified patch, thanks.
> No changelog entry needed, since the feature is not released yet:
> we can pretend it always worked this way. :)
There's a changelog entry though:
* Add new commands --before-build and --after-build to dpkg-source
and modify dpkg-buildpackage to call them automatically at the
start and at the end of the process. With "3.0 (quilt)" source packages
this ensures patches are applied even in case of binary-only builds.
Closes: #572526
Cheers,
--
Raphaᅵl Hertzog
Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20100520061401.GC3204@rivendell
> Pushed a slightly modified patch, thanks.
Looks good. Thank you.
> There's a changelog entry though:
Yes, sorry for the lack of clarity. No additional changelog entry
needed is what I meant.
Good night,
Jonathan
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
> Raphael Hertzog wrote:
>
>> Pushed a slightly modified patch, thanks.
>
> Looks good. Thank you.
>
>> There's a changelog entry though:
>
> Yes, sorry for the lack of clarity. No additional changelog entry
> needed is what I meant.
>
> Good night,
> Jonathan
Thanks Raphael for writing this and thanks Jonathan for testing. I
eagerly await this featurein sid. A glas of milk for you both.
MfG
Goswin
--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/87bpcao...@frosties.localdomain