Michael DeHaan wrote:
> Michael DeHaan wrote:
>
>
>> Michael DeHaan wrote:
>>
>>
>>
>>> Garrett Holmstrom wrote:
>>>
>>>
>>>
>>>
>>>> This proposed patch for cobbler makes the reposync action search for
>>>> repo metadata using the repo's main metadata file so we don't
rely on
>>>> metadata files' having certain names like I describe in
>>>>
https://fedorahosted.org/cobbler/ticket/454. After finding metadata
>>>> files the createrepo call can use it adds them using the appropriate
>>>> command line switches. Turn it off with "discover_repodata: 0"
in
>>>> /etc/cobbler/settings if you don't want this behavior.
>>>>
>>>> (This patch is based on commit
>>>> b9380c592148eaa1af4531663b1f02e87a2f3321 on
>>>>
git://github.com/gholms/cobbler.git)
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> cobbler-devel mailing list
>>>> cobbler-devel(a)lists.fedorahosted.org
>>>>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>>>>
>>>>
>>>>
>>>>
>>> I'll test this shortly, thanks!
>>>
>>> On first glance, we want to avoid adding things to settings when things
>>> can "do the right thing" by default. So I will probably remove
the
>>> setting to control this behavior if this works consistently on say, EPEL
>>> 5, and F-11 updates.
>>>
>>> The other glitch is that folks on EL 4 may not have yum installed by
>>> default, so that will require that the cobbler server have yum
>>> installed. We can't do that (Satellite server usage anyway might be a
>>> problem), so we need to do a conditional try/import ... just so the rest
>>> of the app will work.
>>>
>>> --Michael
>>>
>>>
>>>
>>> _______________________________________________
>>> cobbler-devel mailing list
>>> cobbler-devel(a)lists.fedorahosted.org
>>>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>>>
>>>
>>>
>>>
>> I've applied this to master (the development branch) after removing the
>> setting and writing some code to conditionally import yum.
>>
>> Garrett has agreed to spot check this on EL 5 so we can be sure it works
>> on older yum and omits the newer flags.
>>
>> (comps from F11 and later might possibly not be preserved when mirroring
>> from those platforms? If we can make that work we should try, I think)
>>
>> --Michael
>>
>>
>>
>> _______________________________________________
>> cobbler-devel mailing list
>> cobbler-devel(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>>
>>
>>
> My test on F11 updates completed with some problems:
>
> [f11up: 1375 of 1375 ] Downloading zynjacku-4-2.fc11.i586.rpm
> zynjacku-4-2.fc11.i586.rpm | 107 kB 00:00
> - /usr/bin/wget -q
>
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386//repod...
> -O /var/www/cobbler/repo_mirror/f11up/repodata/repomd.xml
> - /usr/bin/wget -q
>
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386//repod...
> -O
>
/var/www/cobbler/repo_mirror/f11up/repodata/b6d622999177c48f5f361d706a5547405daf7787ad39b30bcb99f1bd53949444-comps-f11.xml
> - /usr/bin/wget -q
>
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386//repod...
> -O /var/www/cobbler/repo_mirror/f11up/repodata/updateinfo.xml.gz
> - /usr/bin/wget -q
>
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386//repod...
> -O
>
/var/www/cobbler/repo_mirror/f11up/repodata/75bec71327861c80f9a0a46499638246b828c86d4760138a577b29cf146eca63-prestodelta.xml.gz
> - /usr/bin/wget -q
>
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386//repod...
> -O
>
/var/www/cobbler/repo_mirror/f11up/repodata/a8488e26c7b3119ccc86c9e36075ea994a9f59c9413616b1d97b347ec1f5f79e-comps-f11.xml.gz
> - createrepo -g
>
repodata/b6d622999177c48f5f361d706a5547405daf7787ad39b30bcb99f1bd53949444-comps-f11.xml
> <<inherit>> /var/www/cobbler/repo_mirror/f11up
> /bin/sh: /var/www/cobbler/repo_mirror/f11up: Is a directory
> - creating: /var/www/cobbler/repo_mirror/f11up/config.repo
>
> # sudo cobbler repo report
>
> Name : f11up
> Arch : i386
> Breed : yum
> Comment :
> Createrepo Flags : <<inherit>>
> Environment Variables : {}
> Keep Updated : True
> Mirror :
http://download.fedora.redhat.com/pub/fedora/linux/updates/11/i386/
> Mirror locally : True
> Owners : ['admin']
> Priority : 99
> RPM List : []
> Yum Options : {}
>
> Looking at the above, the problem is that createrepo flags are not
> blended with the settings file.
>
> I will fix this.
>
> --Michael
>
>
>
>
> _______________________________________________
> cobbler-devel mailing list
> cobbler-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>
>
Upon fixing this, I'm seeing the following from yum/createrepo on F10:
- createrepo -g
repodata/b6d622999177c48f5f361d706a5547405daf7787ad39b30bcb99f1bd53949444-comps-f11.xml
-c cache /var/www/cobbler/repo_mirror/f11up
Traceback (most recent call last):
File "/usr/share/createrepo/genpkgmetadata.py", line 211, in <module>
main(sys.argv[1:])
File "/usr/share/createrepo/genpkgmetadata.py", line 185, in main
mdgen.doPkgMetadata()
File "/usr/lib/python2.5/site-packages/createrepo/__init__.py", line
332, in doPkgMetadata
self.writeMetadataDocs(packages)
File "/usr/lib/python2.5/site-packages/createrepo/__init__.py", line
472, in writeMetadataDocs
self.primaryfile.write(po.xml_dump_primary_metadata())
File "/usr/lib/python2.5/site-packages/yum/packages.py", line 1014, in
xml_dump_primary_metadata
msg += misc.to_unicode(self._dump_base_items())
File "/usr/lib/python2.5/site-packages/yum/packages.py", line 847, in
_dump_base_items
(csum_type, csum, csumid) = self.checksums[0]
IndexError: list index out of range
... interesting ...
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel
This is fixed in the version of createrepo in updates-testing.
What I'm going to do is detect that the remote repo has presto metadata
and then if it does, refuse to sync the repo until yum is upgraded
beyond 0.9.7.
This should esssentially fix the problem -- while it does require user
invention, I think this is a better solution than just disgarding comps
during the normal execution.
--Michael