Skip to content

AlmaLinux/errata-email-notifications

Repository files navigation

AlmaLinux Errata Email Notifications

The AlmaLinux Errata Email Notifications script checks the public errata json files for AlmaLinux distributions and sends notification emails with every new update.

Requirements

Dependencies

  • requests = 2.28.1

We used Python 3.8 when creating the script but should work with any Python 3.x version.

The recommended workflow to install dependencies is:

pip3 install -r requirements.txt

If you want to use a Python virtual environment you can create it by running:

python3 -m venv venv && source venv/bin/activate

Gmail Application Password

In order for the script to run, you have to provide a Gmail Application Password. This password needs to be put in a file called app-passwd, and needs to be placed in the same folder as the script.

There are other options to send emails:

For now we wanted to keep it simple, we can change the approach if we decide is worth doing it.

Usage

The script needs to be called with 3 arguments:

  • The distribution(s) we want to use to generate the errata notifications. Supported distributions are almalinux-8 and almalinux-9
  • The email we want to use when sending the email notifications. For now it only supports Gmail accounts.
  • The email we want to send the notifications to

The script has also optional arguments to:

  • Indicate the logfile you want the script to use to log its output. By default the logs will go into errata-email-notifications.log
  • Indicate whether you want to enable the verbose mode and get the logging output to console. When enabled, the script won't log into a logfile, this is useful when you're working on the script or debugging it.

If you want to send errata notifications for AlmaLinux 8, you can run: errata-email-notifications -d almalinux-8 -s [email protected] -r [email protected]

If you want to send errata notifications for both AlmaLinux 8 and 9, and also enabling the verbose mode, you can run: errata-email-notifications -d almalinux-8 almalinux-9 -s [email protected] -r [email protected] -v

Note: To avoid the unfortunate situation of sending notifications for every errata in a distribution, the first run will only save the last errata's timestamp. The next run the script will send the email notifications if there are any of them.

Contributing

Any question? Found a bug? File an issue. Do you want to contribute with source code?

  1. Fork the repository on Github
  2. Create a new feature branch
  3. Write your change
  4. Submit a pull request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages