Bug 1192608 - Support for LXMA-compressed comps.xml
Summary: Support for LXMA-compressed comps.xml
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space23
TreeView+ depends on / blocked
 
Reported: 2015-02-13 20:18 UTC by Stephen Herr
Modified: 2015-05-05 11:01 UTC (History)
1 user (show)

Fixed In Version: spacewalk-backend-2.3.42-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-14 19:03:57 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1144008 0 unspecified CLOSED spacewalk-repo-sync: default support xz compression 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1218343 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1144008 1218343

Description Stephen Herr 2015-02-13 20:18:54 UTC
Description of problem:
See Brian Buesker's email to Spacewalk list:
https://www.redhat.com/archives/spacewalk-list/2015-January/msg00180.html

Copying:
-------

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).

    In reposync.py, the list of suffixes in import_groups() needs to include '.xz'.
    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

Comment 1 Stephen Herr 2015-02-13 21:12:51 UTC
Committing to Spacewalk master:
76883065ff72449726adc82d081ae681f2a5bb59

Comment 2 Stephen Herr 2015-02-13 21:29:05 UTC
And:
bf099ca2668fd55841f870fb44d82de4cd4d8a55

Comment 3 Grant Gainey 2015-03-23 16:59:30 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 4 Grant Gainey 2015-04-14 19:03:57 UTC
Spacewalk 2.3 has been released. See

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23


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