salt icon indicating copy to clipboard operation
salt copied to clipboard

[TECH DEBT] [3006.x] download function in yumpkg relies on yum-utils which is not available on Fedora and some later Redhat platforms

Open dmurphy18 opened this issue 9 months ago • 1 comments

Description of the tech debt to be addressed, include links and screenshots

The current implementation of yumpkg function download relies on yumdownloader from yum-utils which is not available on current versions of Fedora and expect it to be removed from later versions of RedHat platforms. , for example: RedHat 9 / Rocky Linux 9, /usr/bin/yum -> dnf-3 and

[root@david-XPS-15-9570 /]# dnf download --help
usage: dnf download [-c [config file]] [-q] [-v] [--version] [--installroot [path]] [--nodocs] [--noplugins] [--enableplugin [plugin]] [--disableplugin [plugin]] [--releasever RELEASEVER] [--setopt SETOPTS] [--skip-broken] [-h]
                    [--allowerasing] [-b | --nobest] [-C] [-R [minutes]] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--obsoletes] [--rpmverbosity [debug level name]] [-y] [--assumeno] [--enablerepo [repo]]
                    [--disablerepo [repo] | --repo [repo]] [--enable | --disable] [-x [package]] [--disableexcludes [repo]] [--repofrompath [repo,path]] [--noautoremove] [--nogpgcheck] [--color COLOR] [--refresh] [-4] [-6]
                    [--destdir DESTDIR] [--downloadonly] [--comment COMMENT] [--bugfix] [--enhancement] [--newpackage] [--security] [--advisory ADVISORY] [--bz BUGZILLA] [--cve CVES] [--sec-severity {Critical,Important,Moderate,Low}]
                    [--forcearch ARCH] [--source] [--debuginfo] [--debugsource] [--arch [arch]] [--resolve] [--alldeps] [--url] [--urlprotocols {http,https,rsync,ftp}]
                    packages [packages ...]

See https://github.com/saltstack/salt/blob/685d330cc0e6bcedf77ed834ee0812ef330850c9/salt/modules/yumpkg.py#L3331-L3351

dnf and dnf5 provides a download capability which needs to be implemented

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

dmurphy18 avatar Mar 03 '25 23:03 dmurphy18

Note yum-utils is available on RedHat 9 / Rocky Linux 9, however it is not available on Fedora 40, however dnf-utils is available and it contains /usr/bin/yumdownloader in the dnf-utils package, hence this is not urgent but does need to be addressed and leverage dnf[5] download

dmurphy18 avatar Mar 03 '25 23:03 dmurphy18