New repository configuration ponderings

Panu Matilainen pmatilai at laiskiainen.org
Sun May 28 07:33:11 PDT 2006


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 -




More information about the Apt-Rpm mailing list