[Spacewalk-list] Support for LZMA-compressed comps.xml

Brian Buesker bbuesker at qti.qualcomm.com
Wed Jan 28 20:53:48 UTC 2015


I've started trying to bring online a Fedora 21 distro/kickstart profile
against our Spacewalk 2.1 server. Unlike others who have had trouble
getting the fedora installer generation to work, it mostly seems to be
working for me. I'm not sure if that is because I am using 2.1 instead
of 2.2 or if there is some other explanation.

However, one thing I ran into is that when I created a Fedora 21
Everything channel, Spacewalk ended up not handling the comps.xml
properly. In the upstream yum repo, the comps.xml is actually LZMA
compressed. It does not look like Spacewalk decompresses this when
staging the comps in the local file system. Thus, when a client fetches
the repo metadata, it gets a file named comps.xml that is actually
compressed and thus it complains about the XML not being well formed.

I looked at the Spacewalk git repo and I see that an RPM dependency was
added for pyliblzma. I already have that installed on my system, but
despite that, Spacewalk still does not handle the compressed comps
properly. I dug further into this and found that two python modules need
to be updated, namely reposync.py and fileutils.py.

I would provide a patch with the fixes, although I have to go through a
somewhat lengthy procedure before I can get permission from my employer
to release the patch. Therefore, I'll describe the necessary changes in
case others want to make the same ones (or even better, get this updated
in git).

 1. In reposync.py, the list of suffixes in import_groups() needs to
    include '.xz'.
 2. In fileutils.py, decompress_open() needs to be updated to use the
    lzma.LZMAFile() function on files ending in '.xz' (and of course an
    import is needed as well). 

Let me know if you have any questions.

Thanks,
Brian Buesker

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150128/a7b9f290/attachment.htm>


More information about the Spacewalk-list mailing list