Re: Proper metadata format
Duncan Mac-Vicar Prett <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
Joshua Bahnsen wrote: > All, > > I recently undertook the task of creating a perl script to perform a > task similar to createrepo. My goal was to create something that could > be used in Windows and did not require the rpm library. I found > RPM::Header::PurePerl > <http://search.cpan.org/%7Etlbdk/RPM-Header-PurePerl-1.0.2/lib/RPM/Header/PurePerl.pm> > and for the most part it provided me with the proper information, > however, I did need to extend it slightly. The output I created is > based on the output of createrepo against a particular collection of rpms. > > My question is: Is there a proper standard for the metadata files? I > have noticed the files distributed by RedHat do not necessarily match > the files created by SuSE. I have also noticed that if I use > createrepo against the RedHat Enterprise rpms, I am presented with > files in a slightly different format. Basically what I am looking for > is if there is a baseline of required items (for example, do all > requires need an epoch?). I probably went about this backwards, but I > want to make sure my resulting xml documents are legit. In my testing > they work fine, I see the same results with the vendor provided files > as I do with my own. I would appreciate any direction you can provide. The standard is not very good documented. There are ongoing efforts on leverage rpm-md more as a documented standard. SUSE createrepo only adds a few things on the "core" metadata: enhances, suggests, etc, dependencies. All other extensions are done as non-core extensions, which are safe to other tools that support rpmmd but don't know the extensions. http://en.opensuse.org/Standards/Rpm_Metadata I suggest you to look here: http://en.opensuse.org/Standards/Rpm_Metadata#How_to_extend_rpm-md_metadata_with_non_standard_data I have been developing a tool meant to be run on top of createrepo's output, which adds some of the extension data we use: http://en.opensuse.org/Enhancerepo For epoch for example, I assume the tag is required, but SUSE ignores epochs for example when reading the data and feeding the solver. Duncan