https://github.com/losuler/zypper-automatic
Automatically install and notify of updates in openSUSE.
https://github.com/losuler/zypper-automatic
automatic notifications opensuse rpm systemd updates zypper
Last synced: 26 days ago
JSON representation
Automatically install and notify of updates in openSUSE.
- Host: GitHub
- URL: https://github.com/losuler/zypper-automatic
- Owner: losuler
- License: gpl-3.0
- Created: 2019-12-05T08:36:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T10:33:58.000Z (over 1 year ago)
- Last Synced: 2025-05-02T18:27:47.903Z (29 days ago)
- Topics: automatic, notifications, opensuse, rpm, systemd, updates, zypper
- Language: Python
- Homepage:
- Size: 73.2 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## About
The benefits this has over [`yast2-online-update-configuration`](https://github.com/yast/yast-online-update-configuration) is the integration with systemd services/timers and email notifications similar to what's provided in [`dnf-automatic`](https://dnf.readthedocs.io/en/latest/automatic.html) or [`unattended-upgrades`](https://wiki.debian.org/UnattendedUpgrades).
## Builds
Builds are available on OBS at https://build.opensuse.org/package/show/home:losuler/zypper-automatic.
This repo can be added on supported systems by:
```bash
# openSUSE Tumbleweed
zypper addrepo https://download.opensuse.org/repositories/home:losuler/openSUSE_Tumbleweed/home:losuler.repo
# openSUSE Leap 15.2
zypper addrepo https://download.opensuse.org/repositories/home:losuler/openSUSE_Leap_15.2/home:losuler.repo
``````bash
zypper refresh
zypper install zypper-automatic
```## Config
The configuration file located at `/etc/zypper-automatic.conf` has three main sections. The already filled in values in the examples below are the defaults.
### Zypper
```toml
[zypper]
patch_categories =
with_interactive = false
list_only = false
````patch_categories` is a list delimited by commas `,` of patches you'd like to install. Categories include `security`, `recommended`, `optional`, `feature`, `document` and `yast`.[1]
`with_interactive` when set to `true` will install "interactive patches, that is, those that need reboot, contain a message, or update a package whose license needs to be confirmed."[2]
`list_only` when set to `true` will only send a list of the patches waiting to be installed and will not install them.
[1]: https://en.opensuse.org/SDB:Zypper_manual#CONCEPTS
[2]: https://en.opensuse.org/SDB:Zypper_manual#COMMANDS### Emitters
```toml
[emitters]
emitter =
```The `emitter` refers to one of the message services listed in the subsections below.
```toml
[email]
email_to =
````email_to` is the email in which to send the notification to. It requires a Sendmail compatible MTA (Mail Transfer Agent) to be setup.
#### Telegram
```toml
[telegram]
token =
chat_id =
````token` is the token for the Telegram bot, which is provided by creating a bot by following the steps provided in the [Telegram bot API documentation](https://core.telegram.org/bots#3-how-do-i-create-a-bot).
`chat_id` is the unique identifier for the target chat. It can be obtained by messaging the bot and executing the following command (replace `$BOT_TOKEN`). The ID may be found at `"chat": {"id": 12345678},`:
```sh
curl https://api.telegram.org/bot$BOT_TOKEN/getUpdates | python -m json.tool
```