New repository configuration ponderings
Gary L. Greene Jr.
greeneg at phoenuxos.com
Sun May 28 08:17:13 PDT 2006
On Sunday 28 May 2006 10:33 am, Panu Matilainen wrote:
> I've been thinking about improving the repository configuration and
> related things for a while now. Just yesterday I realized we could
> easily use the existing main configuration system for this, instead of
> inventing yet-another-file-format and parser for it.
>
> The repository configuration would look somewhat like this:
>
> ---
> Repositories {
> fedora-core {
> type "repomd";
> baseuri "http://download.fedora.redhat.com/pub/";
> dist "fedora/linux/core/$(VERSION)/$(ARCH)/os/";
> label "Fedora Core $(VERSION) - $(ARCH)";
> enabled "true";
> gpg-key "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora";
> gpg-check "true";
> };
> fedora-updates-testing {
> type "repomd";
> baseuri "http://download.fedora.redhat.com/pub/";
> dist "fedora/linux/core/updates/testing/$(VERSION)/$(ARCH)";
> label "Fedora Core $(VERSION) Test Updates - $(ARCH)";
> enabled "false";
> gpg-key "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora";
> gpg-check "true";
> };
> freshrpms {
> type "rpm";
> baseuri "http://ayo.freshrpms.net/";
> dist "fedora/linux/$(VERSION)/$(ARCH)";
> components "freshrpms";
> label "Freshrpms for Fedora Core $(VERSION) - $(ARCH)";
> enabled "true";
> gpg-key "http://freshrpms.net/RPM-GPG-KEY-freshrpms";
> gpg-check "true";
> };
> };
> ---
>
> This format allows arbitrary amount of information about the
> repositories stored, is reasonably readable and the info is very
> conveniently available globally in apt. It would allow yum-style
> --enablerepo=foo with "-o
> repositories::fedora-updates-testing::enabled=true" (of course
> additional shortcuts for such common operation could be added).
>
> Should be easy to implement as well I think. Synaptic of course will
> require some extra work but that's the case no matter what kind of new
> repo config is used, at least with apt's native config system it should
> be a whole lot less work than with any other way.
>
> These things could be just stuffed into /etc/apt/apt.conf or
> apt.conf.d/foo.conf but I think it might make sense to have a separate
> repo.conf and repo.conf.d from which the entries would be automatically
> entered into Repositories:: config "namespace" so the repo config files
> would simply look like
>
> ---
> fedora-core {
> type "repomd";
> baseuri "http://download.fedora.redhat.com/pub/";
> dist "fedora/linux/core/$(VERSION)/$(ARCH)/os/";
> ...
> };
>
> fedora-updates-testing {
> type "repomd";
> baseuri "http://download.fedora.redhat.com/pub/";
> dist "fedora/linux/core/updates/testing/$(VERSION)/$(ARCH)";
> ...
> };
> ---
>
> Thoughts?
>
> - Panu -
Very slick! URPMI does a similar thing with it's repo config files, so those
of us coming from MDK have no issue with this. :) Small request: if you add
the repo --enablerepo=/--disablerepo= can you also add for this next release
a short cut for setting the root path too? (think --root=/foo/bar like RPM).
Thanks, and keep up the awesome work Panu. :)
More information about the Apt-Rpm
mailing list