Bug 1213123 - too many repo files
Summary: too many repo files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 2.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space28
TreeView+ depends on / blocked
 
Reported: 2015-04-19 03:55 UTC by Mohammed Arafa
Modified: 2018-04-20 12:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-20 12:31:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Mohammed Arafa 2015-04-19 03:55:20 UTC
Description of problem:
this page 
https://fedorahosted.org/spacewalk/wiki/RegisteringClients

gives 3 different repo files depending on the release version of the OS. 
however the OS itself has a variable for the yum repo file called $releasever
this means if the variable is used in the repo file. the same repo file can be used for centos5 or centos6 or centos7. 
thereby 
a) reducing documentation
b) scripting logic
c) time!

pls modify the repo file to use the $releasever variable instaled of hardcoding the release version into the repo file


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Mohammed Arafa 2015-04-19 04:03:02 UTC
/etc/yum.repos.d/spacewalk-client.repo is supposed to look like this

[spacewalk-client]
name=Spacewalk Client Tools
baseurl=http://yum.spacewalkproject.org/2.2-client/RHEL/$releasever/$basearch/
gpgkey=http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
enabled=1
gpgcheck=1

Comment 2 Jan Pazdziora 2015-04-20 08:09:43 UTC
(In reply to Mohammed Arafa from comment #0)
> Description of problem:
> this page 
> https://fedorahosted.org/spacewalk/wiki/RegisteringClients
> 
> gives 3 different repo files depending on the release version of the OS. 
> however the OS itself has a variable for the yum repo file called $releasever
> this means if the variable is used in the repo file. the same repo file can
> be used for centos5 or centos6 or centos7. 

I think you confuse repo file and an rpm command to install rpm package to get you the repo file.

> thereby 
> a) reducing documentation
> b) scripting logic
> c) time!
> 
> pls modify the repo file to use the $releasever variable instaled of

It does.

> hardcoding the release version into the repo file

It does not.

Comment 3 Jan Pazdziora 2015-04-20 08:18:03 UTC
(In reply to Mohammed Arafa from comment #1)
> /etc/yum.repos.d/spacewalk-client.repo is supposed to look like this
> 
> [spacewalk-client]
> name=Spacewalk Client Tools
> baseurl=http://yum.spacewalkproject.org/2.2-client/RHEL/$releasever/
> $basearch/
> gpgkey=http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
> enabled=1
> gpgcheck=1

This is exactly what is shipped in http://yum.spacewalkproject.org/2.2-client/Fedora/20/x86_64/spacewalk-client-repo-2.2-1.fc20.noarch.rpm.

Comment 4 Mohammed Arafa 2015-04-20 11:23:16 UTC
i do not use fedora clients only centos

i verified for this bug report that $releasever is _missing_ and instead "7" was hardcoded into the repo.

i followed instructions from https://fedorahosted.org/spacewalk/wiki/RegisteringClients

which specifically states there is an rpm file and therefore a repo file for each os release:

<excerpt>

    RHEL 5 / CentOS 5

    # rpm -Uvh http://yum.spacewalkproject.org/2.3-client/RHEL/5/x86_64/spacewalk-client-repo-2.3-2.el5.noarch.rpm
    # BASEARCH=$(uname -i)
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

    RHEL 6 / SL 6 / CentOS 6

    # rpm -Uvh http://yum.spacewalkproject.org/2.3-client/RHEL/6/x86_64/spacewalk-client-repo-2.3-2.el6.noarch.rpm
    # BASEARCH=$(uname -i)
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

    RHEL 7 / SL 7 / CentOS 7

    # rpm -Uvh http://yum.spacewalkproject.org/2.3-client/RHEL/7/x86_64/spacewalk-client-repo-2.3-2.el7.noarch.rpm
    # BASEARCH=$(uname -i)
    # rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Comment 5 Jan Pazdziora 2015-04-20 11:55:54 UTC
(In reply to Mohammed Arafa from comment #4)
> i do not use fedora clients only centos

Ah, sorry about that, I missed the RHEL in your post.

> i verified for this bug report that $releasever is _missing_ and instead "7"
> was hardcoded into the repo.

The problem is, this will not work for RHEL/CentOS. The $releasever is not set to 7 on RHEL, it's set to 7<Variant> there. The $releasever on RHEL and on CentOS differ.

Comment 6 Jan Pazdziora 2017-10-18 08:26:31 UTC
Unless the team is willing to maintain separate locations for various $releasever values on CentOS vs. different variants of RHEL, I propose closing as WONTFIX.

Comment 7 Jan Dobes 2017-10-27 09:44:24 UTC
As from Spacewalk nightly/upcoming 2.8 version client registration instructions change (https://github.com/spacewalkproject/spacewalk/wiki/RegisteringClientsNightly) - RPM with repo files download required only on EL/CentOS 6, newer clients can enable repo with yum/dnf copr plugin, switching whis to MODIFIED.

Comment 8 Jiří Dostál 2018-03-26 12:12:13 UTC
Moving ON_QA

Comment 9 Jiří Dostál 2018-04-20 12:31:17 UTC
Spacewalk 2.8 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes28


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