<div dir="ltr"><div>I have Spacewalk 2.2 and this does occur with it as well.  I have the issue with the Scientific Linux repository.<br><br><a href="http://ftp.scientificlinux.org/linux/scientific/7x/x86_64/os/repodata/">http://ftp.scientificlinux.org/linux/scientific/7x/x86_64/os/repodata/</a><br><br></div>Spacewalk delivers a compressed comps.xml file to my client systems with no .xz extension.<br><br>[root@swtest01 sl-7-x86_64-7x]# pwd<br>/var/cache/yum/x86_64/7/sl-7-x86_64-7x<br>[root@swtest01 sl-7-x86_64-7x]# file comps.xml<br>comps.xml: XZ compressed data<br><br>Yum complains:<br><br>[root@swtest01 sl-7-x86_64-7x]# yum group list<br>Loaded plugins: rhnplugin, versionlock<br>This system is receiving updates from RHN Classic or Red Hat Satellite.<br>There is no installed groups file.<br>Maybe run: yum groups mark convert (see man yum)<br>Failed to add groups file for repository: sl-7-x86_64-7x - comps file is empty/damaged<br>Available environment groups:<br>...<br><br><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 30, 2015 at 8:21 AM, Brian Buesker <span dir="ltr"><<a href="mailto:bbuesker@qti.qualcomm.com" target="_blank">bbuesker@qti.qualcomm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since I don't have Spacewalk 2.2 or one of the nightly versions<br>
installed here, I can't say for sure that the issue does not exist in<br>
them. Note though that I was able to sync the repository successfully<br>
even before I made the change. The problem is that spacewalk is still<br>
storing the compressed comps.xml but serves it to yum clients as if it<br>
was not compressed.<br>
<br>
Can you confirm that the comps.xml as stored in the satellite/rhn/comps<br>
directory for the channel is the uncompressed XML file? I found that it<br>
would always be the LZMA-compressed version and be named<br>
503597f15d6c693a96558f46fbd8ebb5853b92ef528de2a7d55a4dd021162873-comps-f21.xml.xz.<br>
However, the repomd.xml file indicates that the comps file is the<br>
uncompressed form. As best I can tell, spacewalk is serving the<br>
compressed comps.xml as if it were uncompressed (as far as yum is<br>
concerned). This causes yum to expect it to be an uncompressed XML<br>
document and it thus generates an error indicating it is malformed. You<br>
would only notice this if you actually subscribed a system to the<br>
channel and tried to do some sort of yum operation. From the perspective<br>
of Spacewalk itself, everything seems to work fine.<br>
<br>
The fix I found was to make sure spacewalk stores the uncompressed one,<br>
since that is what it seems to indicate is present in repomd.xml. This<br>
appears to be consistent with previous distros where the comps.xml is<br>
gzip compressed but is stored/served by spacewalk in uncompressed form.<br>
<br>
Brian<br>
<br>
On 01/30/2015 05:20 AM, Tomas Lestach wrote:<br>
> I was able to sync fc21 repo on Spacewalk nightly together with the comps file.<br>
> Feel free to check [1] for more information.<br>
><br>
> Even if  Brian installed pyliblzma, it's possible there were more changes done<br>
> since Spacewalk 2.1 that affect the issue.<br>
><br>
> Regards,<br>
> --<br>
> Tomas Lestach<br>
> Red Hat Satellite Engineering, Red Hat<br>
><br>
> [1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1144008" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1144008</a><br>
><br>
><br>
> ----- Original Message -----<br>
>> From: "Stephen Herr" <<a href="mailto:sherr@redhat.com">sherr@redhat.com</a>><br>
>> To: <a href="mailto:spacewalk-list@redhat.com">spacewalk-list@redhat.com</a><br>
>> Sent: Thursday, January 29, 2015 4:07:08 PM<br>
>> Subject: Re: [Spacewalk-list] Support for LZMA-compressed comps.xml<br>
>><br>
>> Here you go Tomas:<br>
>><br>
>> <a href="https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Everything/x86_64/os/repodata/" target="_blank">https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Everything/x86_64/os/repodata/</a><br>
>><br>
>> Take a look at *-comps-f21.xml.xz<br>
>><br>
>> -Stephen<br>
>><br>
>> On 01/29/2015 06:23 AM, Tomas Lestach wrote:<br>
>>> Would you share a public repo with lzma compressed comps?<br>
>>><br>
>>> Regards,<br>
>>> --<br>
>>> Tomas Lestach<br>
>>> Red Hat Satellite Engineering, Red Hat<br>
>>><br>
>>><br>
>>> ----- Original Message -----<br>
>>>> From: "Brian Buesker" <<a href="mailto:bbuesker@qti.qualcomm.com">bbuesker@qti.qualcomm.com</a>><br>
>>>> To: <a href="mailto:spacewalk-list@redhat.com">spacewalk-list@redhat.com</a><br>
>>>> Sent: Wednesday, January 28, 2015 9:53:48 PM<br>
>>>> Subject: [Spacewalk-list] Support for LZMA-compressed comps.xml<br>
>>>><br>
>>>><br>
>>>> I've started trying to bring online a Fedora 21 distro/kickstart<br>
>>>> profile against our Spacewalk 2.1 server. Unlike others who have<br>
>>>> had<br>
>>>> trouble getting the fedora installer generation to work, it mostly<br>
>>>> seems to be working for me. I'm not sure if that is because I am<br>
>>>> using 2.1 instead of 2.2 or if there is some other explanation.<br>
>>>><br>
>>>> However, one thing I ran into is that when I created a Fedora 21<br>
>>>> Everything channel, Spacewalk ended up not handling the comps.xml<br>
>>>> properly. In the upstream yum repo, the comps.xml is actually LZMA<br>
>>>> compressed. It does not look like Spacewalk decompresses this when<br>
>>>> staging the comps in the local file system. Thus, when a client<br>
>>>> fetches the repo metadata, it gets a file named comps.xml that is<br>
>>>> actually compressed and thus it complains about the XML not being<br>
>>>> well formed.<br>
>>>><br>
>>>> I looked at the Spacewalk git repo and I see that an RPM<br>
>>>> dependency<br>
>>>> was added for pyliblzma. I already have that installed on my<br>
>>>> system,<br>
>>>> but despite that, Spacewalk still does not handle the compressed<br>
>>>> comps properly. I dug further into this and found that two python<br>
>>>> modules need to be updated, namely reposync.py and fileutils.py.<br>
>>>><br>
>>>> I would provide a patch with the fixes, although I have to go<br>
>>>> through<br>
>>>> a somewhat lengthy procedure before I can get permission from my<br>
>>>> employer to release the patch. Therefore, I'll describe the<br>
>>>> necessary changes in case others want to make the same ones (or<br>
>>>> even<br>
>>>> better, get this updated in git).<br>
>>>><br>
>>>><br>
>>>>      1. In reposync.py, the list of suffixes in import_groups()<br>
>>>>      needs<br>
>>>>      to include '.xz'.<br>
>>>>      2. In fileutils.py, decompress_open() needs to be updated to<br>
>>>>      use<br>
>>>>      the lzma.LZMAFile() function on files ending in '.xz' (and of<br>
>>>>      course an import is needed as well).<br>
>>>><br>
>>>><br>
>>>> Let me know if you have any questions.<br>
>>>><br>
>>>><br>
>>>> Thanks,<br>
>>>> Brian Buesker<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Spacewalk-list mailing list<br>
>>>> <a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
>>>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
>>> _______________________________________________<br>
>>> Spacewalk-list mailing list<br>
>>> <a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
>>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
>>><br>
>> _______________________________________________<br>
>> Spacewalk-list mailing list<br>
>> <a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
>><br>
> _______________________________________________<br>
> Spacewalk-list mailing list<br>
> <a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
><br>
<br>
<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><br>Michael Guidero <br>Sococo IT <br>650-265-7013 Ext 1000 <br><br></div></div>
</div>