Debian Bug report logs - #700522
sbuild: Support for locally-built build dependencies

version graph

Package: sbuild; Maintainer for sbuild is Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>; Source for sbuild is src:sbuild.

Reported by: Geoffrey Thomas <gthomas@mokafive.com>

Date: Wed, 13 Feb 2013 21:12:02 UTC

Severity: wishlist

Tags: patch

Merged with 714149

Found in versions sbuild/0.64.0-1, sbuild/0.63.2-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Wed, 13 Feb 2013 21:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Geoffrey Thomas <gthomas@mokafive.com>:
New Bug report received and forwarded. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Wed, 13 Feb 2013 21:12:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Geoffrey Thomas <gthomas@mokafive.com>
To: submit@bugs.debian.org
Subject: sbuild: Support for locally-built build dependencies
Date: Wed, 13 Feb 2013 13:01:57 -0800
Package: sbuild
Version: 0.63.2-1
Severity: wishlist
Tags: patch

Hi maintainers,

When I'm backporting packages locally with the help of sbuild, it's often 
the case that I need to backport a build-dependency too. Let's say that 
package foo version 2.0 depends on libbar1 (>= 2.0~). If I backport 
libbar1, I need to make it available to the build of foo.

One way to do this is to configure my local schroot to have e.g. ~/apt 
configured as a repository. This might work okay on a personal machine, 
provided I remember to be conscientious about cleaning out ~/apt between 
builds and pass --apt-update, but I'm running into a situation at work 
where I'm using the same build machine for two different products (one of 
which should not be built with a backported libbar1), and cleaning out a 
local apt repository would be painful and also enforce unnecessary 
serialization on builds.

One way to do this would be to have multiple schroots for building the two 
products, only one of which has the local apt repo. This seems like a 
waste of space.

Attached is a patch that provides the "--add-package" option to sbuild, 
which makes a .deb from the host system available to apt in the build 
chroot for use when resolving build dependencies. Concretely, this means I 
can do something like

sbuild -d stable libbar1_2.0-1.dsc
sbuild -d stable --add-package=libbar1_2.0-1_amd64.deb foo_2.0-1.dsc

with non-hacked-up schroots, and have things work the way I expect.

The implementation of this patch simply copies the .deb into the directory 
for the local archive (for build-dependency resolution). This makes it a 
very small patch, and works out fine because it specifically is needed for 
build-dependency resolution. I'm not positive this is the right approach, 
though, and would be willing to write a longer patch.

Another feature along related lines would be "--add-repository", e.g.

sbuild -d stable --add-repository="file:/home/geofft/apt ./" foo_2.0-1.dsc
or
sbuild -d stable --add-repository="http://local-archive/apt stable myrepo" foo_2.0-1.dsc

I have a naive implementation of this, which doesn't actually work because 
`apt-get update` is not run after the local archive is created (which the 
manpage mentions). One approach would be to instead implement this 
somewhere before --apt-update executes, and have this imply --apt-update. 
Another would be to add functionality to apt to update only a single repo, 
which the manpage mentions would be useful (and I think I'd like that 
functionality for its own sake, anyway). Do you have thoughts on which 
approach would be better?

Both patches are available on my github "add-package" branch, although 
this is more intended for feedback than merge:
https://github.com/geofft/sbuild/commits/add-package

Thanks,
-- 
Geoffrey Thomas
gthomas@mokafive.com



Information forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Wed, 03 Jul 2013 20:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Geoffrey Thomas <gthomas@mokafive.com>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Wed, 03 Jul 2013 20:42:04 GMT) Full text and rfc822 format available.

Message #10 received at 700522@bugs.debian.org (full text, mbox):

From: Geoffrey Thomas <gthomas@mokafive.com>
To: Emanuele Aina <emanuele.aina@collabora.com>
Cc: 714149@bugs.debian.org, 700522@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#714149: sbuild: Let users push additional s to the build dependencies dummy archive
Date: Wed, 3 Jul 2013 13:33:30 -0700
clone 700522 -1
retitle -1 sbuild: Support --add-repository to add an apt source for just one build
block -1 by 714877
merge 700522 714149
kthxbye

On Wed, 3 Jul 2013, Emanuele Aina wrote:

> merge 700522 714149
> thanks

Cc control@bugs.debian.org :)

> I'm open to suggestions for the command line option name: you used
> --add-package, I used --add-extra-package but I'd also consider
> --inject-package to differentiate it more from the current --add-*
> options which operate on the control file.

Yeah, I'm not picky about the name. Though, I'm a fan of shorter names, 
especially since this is something that's very likely to be primarily used 
interactively instead of by scripts/cronjobs/etc. driving sbuild.

>> Also want to take a crack at --add-repository? :-) [...]
>
> It would a really nice thing to do but I'm not sure I will have the time
> to look into that. :(
>
> Is there an already open bug report for apt-get mentioning our use case
> or would you care to open it? They seems two different issues and it
> would be unfortunate to lose track of it once this bug gets closed.

I just reported #714877 to apt, with the partial work I did. I'm also 
cloning my original bug to a separate report for --add-repository, since 
that's a separate request from --add-(extra)-package.

-- 
Geoffrey Thomas
gthomas@mokafive.com



Bug 700522 cloned as bug 714883 Request was from Geoffrey Thomas <gthomas@mokafive.com> to control@bugs.debian.org. (Wed, 03 Jul 2013 20:42:07 GMT) Full text and rfc822 format available.

Marked as found in versions sbuild/0.64.0-1. Request was from Geoffrey Thomas <gthomas@mokafive.com> to control@bugs.debian.org. (Wed, 03 Jul 2013 20:42:10 GMT) Full text and rfc822 format available.

Merged 700522 714149 Request was from Geoffrey Thomas <gthomas@mokafive.com> to control@bugs.debian.org. (Wed, 03 Jul 2013 20:42:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Fri, 16 Aug 2013 23:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Geoffrey Thomas <gthomas@mokafive.com>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Fri, 16 Aug 2013 23:30:04 GMT) Full text and rfc822 format available.

Message #21 received at 700522@bugs.debian.org (full text, mbox):

From: Geoffrey Thomas <gthomas@mokafive.com>
To: 700522@bugs.debian.org, 714883@bugs.debian.org
Cc: Emanuele Aina <emanuele.aina@collabora.com>
Subject: [PULL] sbuild --extra-package (#700522) and --extra-repository (#714883)
Date: Fri, 16 Aug 2013 16:21:14 -0700
OK, I think the extra-package branch of https://github.com/geofft/sbuild 
is ready to be pulled. This adds functionality to make both locally-built 
.debs and additional apt repositories available to the build-dependency 
resolution process, without having to do any additional setup or 
customization of the chroot. The functionality should be compatible with 
any apt version inside the chroot that sbuild currently works with.

Thanks to Emanuele Aina and David Kalnischkies for extensive review on 
GitHub (mostly on the older add-package branch).

---

The following changes since commit d7f31eddcec5db5f5d0419daf520f9f19b857b5e:

  debian: Remove buildd preinst and correct init script dependencies (2013-05-17 23:31:10 +0100)

are available in the git repository at:

  https://github.com/geofft/sbuild extra-package

for you to fetch changes up to b22397d5e73f05a2ea08b993f4952d4dbda90b49:

  changelog for branch (2013-08-16 16:13:40 -0700)

----------------------------------------------------------------
Geoffrey Thomas (4):
      Sbuild::ResolverBase: Implement update_archive using apt-get update
      Implement --extra-package=package.deb
      Implement --extra-repository="deb scheme://..."
      changelog for branch

 debian/changelog           |    9 +++++++++
 lib/Sbuild/Conf.pm         |   12 ++++++++++++
 lib/Sbuild/Options.pm      |    8 +++++++-
 lib/Sbuild/ResolverBase.pm |   73 +++++++++++++++++++++++++++++++++++++------------------------------------
 man/sbuild.1.in            |   24 ++++++++++++++++++++++++
 5 files changed, 89 insertions(+), 37 deletions(-)

-- 
Geoffrey Thomas
gthomas@mokafive.com



Information forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Fri, 15 Nov 2013 13:09:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Emanuele Aina <emanuele.aina@collabora.com>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Fri, 15 Nov 2013 13:09:07 GMT) Full text and rfc822 format available.

Message #26 received at 700522@bugs.debian.org (full text, mbox):

From: Emanuele Aina <emanuele.aina@collabora.com>
To: 700522@bugs.debian.org
Subject: Re: Bug#700522: sbuild: Support for locally-built build dependencies
Date: Fri, 15 Nov 2013 13:54:46 +0100
Geoffrey Thomas <gthomas@mokafive.com> wrote:

> OK, I think the extra-package branch of https://github.com/geofft/sbuild 
> is ready to be pulled.

Any news on this?

It's been some months that the patches have been proposed, improved and
reviewed but no feedback from the maintainer has been received.

With Alioth being down I can't check if the branch can be easily rebased
on top of current git master, but I'd really like to see this work
finally pushed the official repository.

FWIW Geoffrey's patches have been extensively reviewed on GitHub by me
and by APT developer David Kalnischkies (in the old add-package branch).

Even some quick feedback on IRC would be appreciated in case the
maintainer does not feel confident enough to blindly pull and rebase the
changes.

Thanks!




Information forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Mon, 30 Dec 2013 20:27:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to Emanuele Aina <emanuele.aina@collabora.com>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Mon, 30 Dec 2013 20:27:15 GMT) Full text and rfc822 format available.

Message #31 received at 700522@bugs.debian.org (full text, mbox):

From: Emanuele Aina <emanuele.aina@collabora.com>
To: 700522@bugs.debian.org
Subject: Re: Bug#700522: sbuild: Support for locally-built build dependencies
Date: Mon, 30 Dec 2013 21:16:48 +0100
I've rebased Geoffrey's work on top of current master:

https://github.com/em-/sbuild/commits/extra-package

On my local system the patches have been working fine for some months
now and they applied cleanly on the latest master, with the small
exception of the one updating debian/changelog which only required some
formatting adjustments.

Again, hearing back from the maintainer would be very much appreciated.

Thanks!




Information forwarded to debian-bugs-dist@lists.debian.org, Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>:
Bug#700522; Package sbuild. (Thu, 02 Jan 2014 17:45:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roger Leigh <rleigh@codelibre.net>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>. (Thu, 02 Jan 2014 17:45:09 GMT) Full text and rfc822 format available.

Message #36 received at 700522@bugs.debian.org (full text, mbox):

From: Roger Leigh <rleigh@codelibre.net>
To: Emanuele Aina <emanuele.aina@collabora.com>, 700522@bugs.debian.org
Subject: Re: [buildd-tools-devel] Bug#700522: sbuild: Support for locally-built build dependencies
Date: Thu, 2 Jan 2014 17:41:00 +0000
[Message part 1 (text/plain, inline)]
On Mon, Dec 30, 2013 at 09:16:48PM +0100, Emanuele Aina wrote:
> I've rebased Geoffrey's work on top of current master:
> 
> https://github.com/em-/sbuild/commits/extra-package
> 
> On my local system the patches have been working fine for some months
> now and they applied cleanly on the latest master, with the small
> exception of the one updating debian/changelog which only required some
> formatting adjustments.
> 
> Again, hearing back from the maintainer would be very much appreciated.

Many thanks, I'll try to take a look tomorrow.

Happy New Year!

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 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 11:19:25 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.