Better link for the referenced post:

https://www.redhat.com/archives/spacewalk-list/2009-November/msg00066.html



-----Original Message-----
From: Pete Varga 
Sent: Wednesday, December 30, 2009 6:52 PM
To: [email protected]
Subject: RE: yum grouplist yum-rhn-plugin fails - Cliff pls help!

So, I've made some progress on getting the clients to see the groups data in 
comps.xml.

Turns out this was a really good post:
           http://www.mail-archive.com/[email protected]/msg03114.html

Couple items to note.

1.  The XMLRPC calls that respond to the rhn-plugin use a combination of SQL 
and Filesystem (cache) storage.
         The repodata for each configured channel is stored by the channel 
label name under /var/cache/rhn/LABEL/
2.  On the database table mentioned in Cliff's post (rhnchannelcomps), it 
doesn't matter what ID you give it.  as long as the Channel_Id is correct it 
should work.
         The relative_filename field was tricky.  The path is relative to the 
"mount_point" property in /etc/rhn/rhn.conf.
         for me that path is /var/satellite/channels   so I simply stuck a 
symlink /var/satellite/channels/repodata -> /var/cache/rhn/repodata/
         My Insert was :   insert into rhnchannelcomps (id, channel_id, 
relative_filename) values (181, 181, 'repodata/centos5-base-x86_64/comps.xml');
3.  I'm not clear whether simply changing the database magically makes it work. 
 I'm almost convinced it does not. 
         I had to manually add the <data> section to repomd.xml to include the 
groups information.
         inside there, it appears the href location is not used precisely.  As 
long as it is relative to that channel it should work fine i.e <location 
href="repodata/comps.xml"/>.
         Where that href is hit to be downloaded, the XMLRPC scripts don't 
simply go to that file location (same directory as say primary.xml.gz)....
         The XMLRPC scripts handle requests for "comps.xml" URIs in a 'special' 
manner.  It goes to the database table "rhnchannelcomps"... that's where that 
insert becomes useful, at least in my theory.
4.  Couple other gotchas with regard to repomd.xml.  make sure you confirm the 
checksums.  In particular the Type  use sha1 not sha.  
         It doesn't appear that the "type" attribute really matters as long as 
the checksum is valid...  YMMV


So, to recap: if the cache repomd.xml file is correct and the rhnchannelcomps 
record is inserted (don't forget to commit), it should work :)


Does anyone know who or how to get started on making a cleaner UI for this 
stuff? 
It would be great if we could manage the groups from within the spacewalk 
webapp... 
and if it were pre-loaded from the original comps.xml read at repo-syn time.
Thoughts?

-Pete



________________________________________
From: Pete Varga
Sent: Wednesday, December 30, 2009 12:40 PM
To: [email protected]
Subject: yum grouplist yum-rhn-plugin fails - Cliff pls help!

I have installed Spacewalk 0.7 on CentOS 5.3 and most everything looks great 
(still learning...)

I'm disappointed to [not] see the results of 'yum grouplist' on a spacewalk 
client system.

All other aspects of the yum-rhn-plugin appear to be functioning properly...


I get the following.

        Error: No group data available for the configured repositories


Running wireshark, I see the XMLRPC response only returns three repomd data 
sections.  (primary, filelists & other)...
I presume the yum client (rhn-plugin) would take the "group" data if it were 
returned.

Is there any way to load the spacewalk repository with the comps.xml data?

I see some references to this in server/repomd/repository.py  
(http://www.redhat.com/spacewalk/documentation/python-doc/server.repomd.repository-pysrc.html#Repository.get_comps_file)

But I don't know enough about python or backend to make any changes.

I also came across this link which suggested placing an entry in 
rhnchannelcomps table. 
(http://www.mail-archive.com/[email protected]/msg03114.html)

I think that one came from Cliff @ Red Hat.  I've had no luck with that 
approach.

Does anyone have any insight on how to manage the comps in spacewalk?

Thanks in advance!

-Pete

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to