From 6c1324cfe3a76da70b999cabbe3a42db9bf80d5d Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Tue, 19 Nov 2024 00:43:14 +0100 Subject: [PATCH] document both F41+ and F40- --- ...oving-software-repositories-in-fedora.adoc | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/ROOT/pages/adding-or-removing-software-repositories-in-fedora.adoc b/modules/ROOT/pages/adding-or-removing-software-repositories-in-fedora.adoc index 8f69e23..409de86 100644 --- a/modules/ROOT/pages/adding-or-removing-software-repositories-in-fedora.adoc +++ b/modules/ROOT/pages/adding-or-removing-software-repositories-in-fedora.adoc @@ -15,6 +15,27 @@ This section describes how to add, enable, or disable a software repository with This section describes how to add software repositories with the `dnf config-manager` command. +=== For Fedora 40 or earlier (DNF 4) + +* To add a new repository, do the following as `*root*`. + +. Define a new repository by adding a new file with the `.repo` suffix to the [filename]`/etc/yum.repos.d/` directory. For details about various options to use in the `.repo` file, see the xref:f{MAJOROSVER}@fedora:system-administrators-guide:package-management/DNF.adoc#sec-Setting_repository_Options[Setting [repository\] Options] section in the System Administrator's Guide + +. Add the repository with `--add-repo`, where *_repository_* is the file path: ++ +[literal,subs="+quotes,attributes"] +---- +dnf config-manager --add-repo `*_repository_*` +---- ++ +For example: ++ +---- +dnf config-manager --add-repo /tmp/fedora_extras.repo +---- + +=== For Fedora 41 or later (DNF 5) + * To add a new repository, do the following as `*root*`. . Define a new repository by adding a new file with the `.repo` suffix to the [filename]`/etc/yum.repos.d/` directory. For details about various options to use in the `.repo` file, see the xref:f{MAJOROSVER}@fedora:system-administrators-guide:package-management/DNF.adoc#sec-Setting_repository_Options[Setting [repository\] Options] section in the System Administrator's Guide