Bug 20933 - mageia-repos(&-cauldron) commented out examples of mirror definitions are often wrong
Summary: mageia-repos(&-cauldron) commented out examples of mirror definitions are oft...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-25 11:06 CEST by Morgan Leijström
Modified: 2017-05-30 00:33 CEST (History)
0 users

See Also:
Source RPM: mageia-repos-6-0.0.11.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Morgan Leijström 2017-05-25 11:06:22 CEST
Description of problem:  The commented out example definitions are often wrong, definitely nonfree and tainted repos, and all(?) source too.

It works OK by default as mirrorlist definitions seem OK (I have not checked all operation though).  But when user like me simply comment out mirrorlist, and uncomment the line with kernel.org and replace kernel.org with a mirror of choice, like described at "If you wish to override the mirror selection" in
https://wiki.mageia.org/en/Using_DNF#Install_and_Setup, 
 - that does not work!

Result when following the wiki: i.e updates in tainted and nonfree are missed, the command distro-sync downgrades the system, etc

Examples:
    File /etc/yum.repos.d/mageia-x86_64.repo, line 3, is correct:
#baseurl=https://mirrors.kernel.org/mageia/distrib/$releasever/x86_64/media/core/release/

    File /etc/yum.repos.d/mageia-tainted-x86_64.repo, line 3, is wrong:
#baseurl=https://mirrors.kernel.org/mageia/distrib/$releasever/x86_64/media/core/release/

    File /etc/yum.repos.d/mageia-nonfree-x86_64.repo, line 3, is wrong:
#baseurl=https://mirrors.kernel.org/mageia/distrib/$releasever/x86_64/media/core/release/

Above seem like copy-paste error; all three are same.

    File /etc/yum.repos.d/mageia-x86_64-source.repo, line 3, is wrong:
#baseurl=https://mirrors.kernel.org/mageia/distrib/$releasever/x86_64/media/debug/core/release/
   ( Should point to ...mageia/distrib/$releasever/SRPMS/core/release/ ! )

These are just examples, and just one of several sections in each file that have similar error, and there are more files with such errors.

I have not fiddled with it much and this is my first time with it... i just see it does not work, and i see some obvious problems like above.
Someone who knows how it is supposed to be need check *all* files (or whatever generates them) in packages mageia-repos and mageia-repos-cauldron, both in x86_64 and i586.

And BTW as the files in mageia-repos and mageia-repos-cauldron use %releasever instead of "6" or "cauldron" i believe mageia-repos-cauldron is redundant at best, Bug 20932.

Version-Release number of selected component (if applicable): 6-0.0.11.mga6
Comment 1 Morgan Leijström 2017-05-25 14:36:57 CEST
BTW, it is very tedious to edit all instances in all files in order to point to a specific mirror, i.e my urpmi-proxy...

Idea: could the part now spelled

  baseurl=https://mirrors.kernel.org/mageia/distrib/

be a variable, defined maybe in ... dnf.conf? so we only need to change that to point at the mirror we want.

Even better if we also somehow would not need to uncommment and comment many lines as per https://wiki.mageia.org/en/Using_DNF#Install_and_Setup

We = who want a specific good mirror or local mirror or urpmi-proxy
Rémi Verschelde 2017-05-25 18:02:08 CEST

Assignee: bugsquad => ngompa13

Comment 2 Neal Gompa 2017-05-25 19:27:01 CEST
Unfortunately, at the moment, there's no supported variable for that. That being said, I do need to fix the errors in the examples.

Status: NEW => ASSIGNED

Comment 3 Neal Gompa 2017-05-28 18:50:17 CEST
You shouldn't need to comment out the mirrorlist directive, as the baseurl should supersede it.

That said, I've fixed the commented out URLs in mageia-repos-6-0.1.1.mga6.

The custom variable that could be used to define a urlbase (e.g. urlbase=https://mirrors.kernel.org/mageia/distrib/) is a known upstream issue.

I'm marking this as fixed as I've resolved the key issue, but added a link to the upstream issue for custom vars support for the other thing.

Feel free to comment in the upstream issue in regards to that.

Status: ASSIGNED => RESOLVED
See Also: (none) => https://github.com/rpm-software-management/libdnf/issues/170
Resolution: (none) => FIXED

Comment 4 Morgan Leijström 2017-05-28 19:21:30 CEST
Thanks
I will try them later.
Comment 5 Morgan Leijström 2017-05-30 00:33:17 CEST
Thanks for fixing :)

Tested using "dnf makechache": I *do* need to comment out the mirrorlist= lines or else it do not use my urpmi-proxy i defined in the baseurl= lines.

Editing that and the baseurl is pretty easy using a multifile editor capeable of multi replace, like kate (if not a wizard on scripting)

Note You need to log in before you can comment on or make changes to this bug.