Imports CentOS (from http://cefs.steve-meier.de/) errata into pulp
This script imports CentOS Errata into Katello It relies on preformatted information since parsing email is the road to madness...
To run this script on CentOS you need:
This script was modified from Steve Meier's script for spacewalk
which can be found at http://cefs.steve-meier.de/
pulp-admin must authenticate to pulp. This authentication information can be provided to pulp-admin in three ways.
sudo cat /etc/pki/katello/certs/pulp-client.crt /etc/pki/katello/private/pulp-client.key > ~/.pulp/user-cert.pem
chmod 400 ~/.pulp/user-cert.pem
[auth]
username: admin
password: <password>
Make sure the permissions on this file are restrictive.
chmod 400 ~/.pulp/admin.conf
./errata_import.pl --errata=<errata_file> --user=admin --password=<password>
For methods 1 and 2, it is probably advisable to not store these credentials in a normal user's home directory. You might consider using the root user for pulp-admin tasks. Then non-privileged users can be given rights explicitly through sudo.
[Required]
--errata - Path to the errata XML file.
[Optional]
--user - Pulp user (Usually admin, unless you are creating a pulp user specifically for this script).
--password - Pulp password (Found under /etc/pulp/server.conf, unless you are creating a pulp user specifically for this script).
--rhsa-oval - Path to the OVAL XML file from Red Hat (recommended)
--include-repo - Only consider packages and errata in the provided repositories. Can be provided multiple times.
[Logging]
--quiet - Only print warnings and errors
--debug - Set verbosity to debug (use this when reporting issues!)
Please feel free to make pull requests for any issues or errors in the script you may find.