Bug#850478: git-pbuilder deliberately deletes source.changes
James Clarke
jrtc27 at debian.org
Sat Jan 7 00:10:51 UTC 2017
Package: git-buildpackage
Version: 0.8.9
Severity: important
X-Debbugs-Cc: Debian pbuilder maintenance team <pbuilder-maint at lists.alioth.debian.org>
Disclaimer: These views are my own and not necessarily shared with
Mattia; he has the final say with regards to pbuilder :)
Hi,
Currently, straight after git-pbuilder invokes pdebuild, it deletes
../*_source.changes, provided there is at least one such file, and the
build was not done with -S. This causes two problems:
1. It ignores version numbers and package names, causing potential data
loss, which I feel is justification enough for the Severity: important.
While it's a data loss bug, I don't think it's major enough to be RC.
(Please clone this if you want to separate this bug from the point
below...)
2. I like being able to perform source-only uploads. While you can get
pbuilder to generate a source-only changes file for a source+binary
build with --changes-option=-S, this has the unfortunate side-effect
of not copying back the .deb files, since they aren't referenced by
the .changes. Also, the changes file is _arch.changes, which is
misleading, and having the real _arch.changes is useful. Thus, I
would like to have a --source-only-changes option which functions
like sbuild (the main dpkg-buildpackage invocation generates
_arch.changes, and then a manual dpkg-genchanges --build=source is
performed) so that users can get both from one build.
In looking into this, I discovered that pdebuild itself actually
ends up producing a _source.changes, since it calls
dpkg-buildpackage -S to generate the dsc to copy into the chroot. I
presume that the original intention of the deletion performed by
git-pbuilder was to delete *this* changes file, since the dsc
subsequently produced by the build inside the chroot will not be
identical, but is copied back as part of the build, making the
original _source.changes invalid.
Now, I'm of the view that dpkg-source -b should be used instead,
which is what sbuild uses to create the dsc. This also has the
advantage of not generating .buildinfo files (no annoying
debian/files lingering after the build, either). Then the only
_source.changes generated by pbuilder would be if the user requested
it, and therefore having it deleted by git-pbuilder would be wrong.
I should think changes like this are too late for Stretch, but
perhaps for Buster (or experimental?) we could coordinate our
efforts to get this to work?
This is not just hypothetical, either; I actually have patched
git-pbuilder[1] and pbuilder to implement this, but the implications
of the switch to dpkg-source -b would need to be discussed
I appreciate this is a lot of irrelevant details, but I hope by
explaining where we are and where I'd like to get to makes the issues
clear. A lot of this will end up going into a bug report against
pbuilder blocked by this tomorrow.
Regards,
James
[1] Commented out the 3-line if statement that deletes _source.changes
More information about the Pbuilder-maint
mailing list