How to add a repository on Fedora?

  • With one repository I did it like this (as root):

    # cd /etc/yum.repos
    # wget
    # grep enabled foo_bar.repo

    Is this the recommended way to add a package repository under Fedora (>= 14)?

    Is there some policy/standard which specifies that each proper Fedora package repository should (or must) contain such a config file (i.e. such a .repo file)?

    (basically just for the reason that a user or some tool can copy it to the local /etc/yum.repos directory?)

    @Tshepang: I don't understand. Have you mixed up question mark and full stop in your comment? And what typo are you referring to? Just point out the typo or edit my question and fix it since you have already spotted it. I fix the last question - but I don't know if this is the typo you mean ...

    I made those prompts `#` because you said you ran the commands as root. That's the convention, and that's what root prompt looks like.

    @Tshepang, fair enough - changed the prompt to the common `#` convention.

  • I googled a bit around with 'fedora add repository' and got some outdated and not very helpful links. Because of the noise I missed this link:

    Which is kind of outdated as well, but it gives me the hint to look for an updated version of the software management guide:

    Add New Repositories

    (which also mentions the wget method I used to add a .repo file)

    I am a bit surprised that the official and as it seems quite extensive fedora documentation is not higher scored in the google results.

    The first link is to the Fedora Core 3 documentation, which is 5-6 years out of date.

    @James Antill: Yeah - *kind of outdated* was used as an euphemism. ;) Anyways, when I googled the query, the 5-6 year old fedora link is what I got on the first result page (position > 20). Don't know if the fedora project pages do some stuff to annoy the google bot?

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM