Created a month ago
Maintained by jcpunk
Python objects for manipulating updateinfo.xml
Members 1
Pat Riehecky committed 2 months ago

UpdateInfo provides useful objects for creating the updateinfo.xml
for use with yum's security plugin.

This isn't really fancy, but I've included the xsd this validates against.
The xsd should also validate against Fedora or Suse.

Quick start

1. import updateinfo
2. u = updateinfo.Updateinfo()
3. fd = open('/path/to/sample/in/doc/dir/example.xml', 'r')
4. u.xml =
5. print(u.xml)

The resulting xml file should be added to the yum repo metadata.

    modifyrepo updateinfo.xml /path/to/repodata/

I've included an example program that should help get you started.

If you are curious the objects log intersting actions at logger.DEBUG

There are a lot of options and ways of using these objects, so make sure
to read the help that comes with each module.

There is also a helper directory you can use which will allow you to very
simply build and update your updateinfo.xml if you wish.

Odds are you will need to build your own helper object for your data store,
but these should at least get you started with the basics.

Django App
1. Add "updateinfo.django" to your INSTALLED_APPS setting like this::


2. Include the updateinfo.django URLconf in your project like this::

      url(r'^updateinfo/', include('updateinfo.updateinfo_for_django.urls', namespace='updateinfo')),

3. Run `python syncdb` to create the updateinfo models.

4. Start the development server and visit
   to create an updateinfo entry (you'll need the Admin app enabled).

5. Visit to see the data.

   NOTE: The app uses django.contrib.auth with defined permissions of:
         - add
         - change
         - delete
         - view


If you wish to run the provided unit tests, simply run:

    python updateinfo/tests/

For try:

    coverage run --include=updateinfo* --branch updateinfo/tests/
    coverage html