Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic check for packages #78

Merged
merged 17 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

* Allow to also watch other packages which could make a reboot or restart of
the session necessary.
([#78](https://github.com/rnestler/reboot-arch-btw/pull/78))

## [v0.4.0] - 2022-08-30

* Update dependencies
Expand Down
141 changes: 103 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ edition = "2018"
alpm = "2.1.0"
clap = { version = "3.2.19", features = ["std", "derive"], default-features = false }
notify-rust = "4.5"
utmp-rs = "0.3.0"
time = "0.3.14"
43 changes: 37 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ This is a small utility which shows the installed and running Linux kernel on
the kernel got updated and suddenly your USB drive won't mount because the
needed kernel module can't get loaded.

It can also detect if critical packages like systemd got updated which may also
make a reboot necessary.

To get the version of the installed kernel it uses libalpm (shipped with
pacman) to query the local pacman database. To get the version of the running
kernel it uses `uname -r`.
Expand Down Expand Up @@ -44,14 +47,42 @@ Usage
```Shell
$ reboot-arch-btw
Kernel
installed: 5.12.8.arch1.1 (since 2 minutes ago)
running: 5.12.6.arch1.1
You should reboot arch btw!
Xorg server
installed: 1.20.11.1 (since 51 days ago)
running: 1.20.11
installed: 5.19.13.arch1.1 (since 4 minutes ago)
running: 5.19.12.arch1.1
systemd updated 4 minutes ago
Reboot arch btw
```

It will also show a [desktop
notification](https://wiki.archlinux.org/title/Desktop_notifications)
indicating that you probably want to reboot your system.

One can use `--reboot-packages` or `--reboot-packages` to set the list of
packages which should also trigger a notification if they are updated.

```
$ reboot-arch-btw --help
reboot-arch-btw 0.4.0
Check the currently installed kernel against the currently running one.

USAGE:
reboot-arch-btw [OPTIONS]

OPTIONS:
--disable-notification
Disable desktop notification

-h, --help
Print help information

--reboot-packages <REBOOT_PACKAGES>
Comma separated list of packages were we should reboot after an upgrade [default:
systemd,linux-firmware]

--session-restart-packages <SESSION_RESTART_PACKAGES>
Comma separated list of packages were we should restart our session after an upgrade
[default: xorg-server,xorg-xwayland]

-V, --version
Print version information
```
Loading