Skip to content

Commit 9084339

Browse files
GiteaBotyshyuk
andauthored
fix: add dnf5 command for Fedora in RPM package instructions (#36527) (#36572)
Backport #36527 by @yshyuk ## Summary Add support for Fedora 41+ which uses dnf5 with different command syntax for adding repositories. ## Changes - Added new locale key `packages.rpm.distros.fedora` for Fedora (dnf5) - Added dnf5 command in RPM package template: `dnf config-manager addrepo --from-repofile=<URL>` - Kept existing dnf4 command (`--add-repo`) for RHEL/Rocky Linux compatibility ## Background Fedora 41+ uses dnf5 which has different syntax: - **dnf4 (RHEL/Rocky):** `dnf config-manager --add-repo <URL>` - **dnf5 (Fedora 41+):** `dnf config-manager addrepo --from-repofile=<URL>` Closes #35330 Co-authored-by: yshyuk <43194469+yshyuk@users.noreply.github.com>
1 parent 9b3a952 commit 9084339

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

templates/package/content/rpm.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
dnf config-manager --add-repo <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
1515
{{- end}}
1616

17+
# Fedora 41+ (DNF5)
18+
{{- range $group := .Groups}}
19+
{{- if $group}}{{$group = print "/" $group}}{{end}}
20+
dnf config-manager addrepo --from-repofile=<origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
21+
{{- end}}
22+
1723
# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
1824
{{- range $group := .Groups}}
1925
{{- if $group}}{{$group = print "/" $group}}{{end}}

0 commit comments

Comments
 (0)