5

We're building our package for Debian Jessie with sbuild, and so far it's working great.

There's just one detail though: we'd like to take one of the build dependencies from the Jessie backports archive.

I can't figure out how to configure the chroot to pull that package (and only that package) from backports, though.

I know how to configure the apt sources.list and pinning preferences on a Debian system but I couldn't find anything related to adding repositories and pinning packages from them in the sbuild(1) and sbuild.conf(5) manual pages.

3

I found a way, thanks to @bigon on IRC.

At runtime, I now pass the following options to the sbuild command in addition to the ones I already had:

$ sbuild ... --build-dep-resolver=aptitude --extra-repository="deb http://deb.debian.org/debian jessie-backports main" ...

The --extra-repository will add the Jessie backports as a valid archive to use in the chroot.

But unfortunately, that's not enough because the Release file for the backports archive has "NotAutomatic: yes". As a result, even though the backports contain the dependency I need (and declared properly in debian/control), it doesn't get taken from there automatically.

That's where the --build-dep-resolver=aptitude comes into play: aptitude also stumbles on the missing dependency like apt, but then it finds it in the backports archive and automatically decides to take it (and only it) from there.

It's a bit too « automagic » for my taste, and I would prefer a way to setup some explicit pinning, but so far it's the only way I found.

Thanks @bigon!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.