Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1213123

Summary: too many repo files
Product: [Community] Spacewalk Reporter: Mohammed Arafa <bugzilla>
Component: InstallationAssignee: Jan Dobes <jdobes>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.7CC: jdobes, jdostal, jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-20 12:31:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1564160    

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 (Red Hat) 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 (Red Hat) 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 (Red Hat) 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 (Red Hat) 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