pbuilder-apt-config
Osamu Aoki
osamu at debian.org
Mon Jan 25 15:04:58 UTC 2010
On Mon, Jan 25, 2010 at 01:21:33AM +0100, Loïc Minier wrote:
> Hey Osamu,
>
> Following various discussions we had, I tried drafting a
> pbuilder-apt-config command; I think it could be useful even outside of
> pbuilder since other tools / scripts need to be able to generate
> sources.list (I'm aware of e.g. vmbuilder, rootstock, etc. basically
> tools which create chroots/build envs/virtual machines).
>
> ./pbuilder-apt-config --profile experimental
--target
> deb http://ftp.us.debian.org/debian/ unstable main
> deb http://ftp.us.debian.org/debian/ experimental main
>
> ./pbuilder-apt-config --profile karmic-proposed
--target
> deb http://archive.ubuntu.com/ubuntu/ karmic main
> deb http://archive.ubuntu.com/ubuntu/ karmic-updates main
> deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main
>
> ./pbuilder-apt-config --profile etch-backports
> deb http://ftp.us.debian.org/debian/ etch main
> deb http://www.backports.org/backports.org/ etch-backports main
>
> ./pbuilder-apt-config --suite sid --mirror http://ftp.de.debian.org/debian/
> deb http://ftp.de.debian.org/debian/ sid main
>
> ./pbuilder-apt-config --suite jaunty --arch armel
> deb http://ports.ubuntu.com/ubuntu-ports/ jaunty main
>
> Now doing this I discovered a couple of things:
> - either you want the tool to help you generate one "deb" line,
> possibly guessing some values from your input (possibly no guesses at
> all)
> - or you want the tool to help you generate multiple "deb" lines,
> guessing most of the values from your input (possibly overriding some
> values)
What I did generated a set of deb line:
one for target and one for base distribution.
But since we have /etc/apt/sources.list.d/, making target and base apt
line in separate file is OK.
> In the first case, it's more of a technical interface "I know what I'm
> doing"; in the latter case, it's more about trying to be nice and guess
> the right thing, except some things might have to be customized such as
> the mirror.
The non-suit "targets" are for convienience for typical uses.
But this is place we need to gage merits and negatives. KISS is the
key.
> We could decide that we don't want to support the first mode because
> it's technically possible to implement it with --aptconfdir. I don't
> quite like this mechanism, but that would make it much simpler.
Yes.
> The tool is not complete because it doesn't allow overriding mirrors (I
> intend to add a mirror-map flag to list "vendor url" pairs which would
> override all mirrors. The single --mirror approach doens't work with
> Debian backports repos for instance. I'm not quite sure how to do a
> mirror-map which would allow overriding the mirror for a particular
> architecture, so I might have to do differently.
I agree this is something to think deep for extension.
> (There are probably plenty of bugs such as not handling commas in
> pockets or components.)
>
> Let me know whether you agree it makes sense to have a centralized
> wrapper for "give me the sources.list for this". It could be extended
> to output the debootstrap mirror / script.
Let me think...
More information about the Pbuilder-maint
mailing list