Description of problem: cobbler reposync executes with an error due to typos in reposync.py. Version-Release number of selected component (if applicable): cobbler-3.1.2-1.fc32.noarch How reproducible: cobbler reposync Actual results: # cobbler reposync --only=OEL-7-Latest --tries=1 task started: 2020-07-17_090517_reposync task started (id=Reposync, time=Fri Jul 17 09:05:17 2020) running python triggers from /var/lib/cobbler/triggers/task/reposync/pre/* running shell triggers from /var/lib/cobbler/triggers/task/reposync/pre/* shell triggers finished successfully hello, reposync run, reposync, run! creating: /var/www/cobbler/repo_mirror/OEL-7-Latest/config.repo creating: /var/www/cobbler/repo_mirror/OEL-7-Latest/.origin/OEL-7-Latest.repo running: /usr/bin/dnf reposync --newest-only --delete --config=/var/www/cobbler/repo_mirror/OEL-7-Latest/.origin/OEL-7-Latest.repo --repoid=OEL-7-Latest --download_path=/var/www/cobbler/repo_mirror -a x86_64 received on stdout: received on stderr: usage: dnf reposync [-c [config file]] [-q] [-v] [--version] [--installroot [path]] [--nodocs] [--noplugins] [--enableplugin [plugin]] [--disableplugin [plugin]] [--releasever RELEASEVER] [--setopt SETOPTS] --nobest] [-C] [-R [minutes]] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--obsoletes] [--rpmverbosity [debug level name]] [-y] [--assumeno] --repo --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] [-a [arch]] [--delete] [-m] [--download-metadata] [-n] [-p DOWNLOAD_PATH] [--norepopath] [--metadata-path METADATA_PATH] [--source] [--remote-time] [-u] dnf reposync: error: unrecognized arguments: --download_path=/var/www/cobbler/repo_mirror Solution: --- reposync.py.orig 2020-07-06 20:58:12.496673490 +0300 +++ reposync.py 2020-07-17 09:21:23.236349282 +0300 @@ -378,7 +378,7 @@ if has_rpm_list: self.logger.warning("warning: --rpm-list is not supported for RHN content") rest = repo.mirror[6:] # everything after rhn:// - cmd = "%s %s --repo=%s --download_path=%s" % (cmd, self.rflags, pipes.quote(rest), pipes.quote(self.settings.webdir + "/repo_mirror")) + cmd = "%s %s --repo=%s --download-path=%s" % (cmd, self.rflags, pipes.quote(rest), pipes.quote(self.settings.webdir + "/repo_mirror")) if repo.name != rest: args = {"name": repo.name, "rest": rest} utils.die(self.logger, "ERROR: repository %(name)s needs to be renamed %(rest)s as the name of the cobbler repository must match the name of the RHN channel" % args)
Unfortunately, seems the correct fix is not that easy. reposync (as in yum for el7) correctly uses --download_path whereas dnf reposync (as in dnf in fedora or el8) uses --download-path So a correct fix would set this option as appropriate depend ending on the case. (unless we don't care anymore about yum/dnf support). I wonder if there are others differences in behaviour ?
Can you report this issue to cobbler upstream ?
OK, I will send a report to cobbler upstream.
*** Bug 1858204 has been marked as a duplicate of this bug. ***
The upstream of the cobbler accepted the patches I proposed: --download_path -> -p yum -> librepo other bug fixes https://github.com/cobbler/cobbler/pull/2384 https://github.com/cobbler/cobbler/pull/2380 https://github.com/tpw56j/cobbler/commit/31fa87ddd6f848793870da7dee2b10d3756aa7d4
FEDORA-2020-d834c6e46d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d834c6e46d
FEDORA-2020-d834c6e46d has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-d834c6e46d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d834c6e46d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-d834c6e46d has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.