feat: release v2.0.0 with tab completion, package filtering, db health checks, flatpak and logrotate
Build and Publish Release / Build Packages and Publish (push) Successful in 27s

This commit is contained in:
soda64 committed 2026-10-03 08:31:00 +02:00
1 parent 8d4157b42d
commit 8bec4ed932
27 files changed
+1053 -69

No files matched your search

+39 -5
View File
@@ -71,7 +71,11 @@ The default configuration file `/etc/linux-updater.json` governs health check th
"auto_remediate": true,
"non_interactive": false,
"check_ac_power": true,
"clean_after_update": false
"clean_after_update": false,
"auto_reboot": false,
"exclude_packages": [],
"security_only": false,
"update_flatpak": false
},
"logging": {
"log_dir": "/var/log/linux-updater",
@@ -88,10 +92,14 @@ The default configuration file `/etc/linux-updater.json` governs health check th
- `min_ram_mb`: Available RAM threshold in `/proc/meminfo`. Protects against OOM killer crashing package scripts. Defaults to 300 MB.
### Behavior Parameters
- `auto_remediate`: When `true`, automatically clears package cache if `/var` is low and unlinks stale locks if the holder PID is dead.
- `auto_remediate`: When `true`, automatically clears package cache if `/var` is low, unlinks stale locks if the holder PID is dead, and repairs interrupted package transactions (`dpkg --configure -a`, `apt-get install -f`, `dnf clean all`).
- `non_interactive`: Default non-interactive state. (Overridden by CLI `-y`).
- `check_ac_power`: Inspects `/sys/class/power_supply` and warns/halts if running on battery power.
- `clean_after_update`: If `true`, runs `autoremove` automatically after successful updates.
- `auto_reboot`: When `true`, automatically triggers reboot if a kernel or core system component was upgraded.
- `exclude_packages`: List of package names or glob patterns to skip during update transactions.
- `security_only`: When `true`, restricts all update operations strictly to security patches.
- `update_flatpak`: When `true`, executes `flatpak update -y` after OS packages update if flatpak is installed.
---
@@ -136,6 +144,13 @@ linux-updater health --json
"message": "No pending system reboot detected.",
"can_remediate": false,
"remediation_id": null
},
{
"name": "package_db",
"status": "PASS",
"message": "Package database is consistent.",
"can_remediate": false,
"remediation_id": null
}
],
"remediations_performed": []
@@ -174,19 +189,38 @@ esac
## 4. Log Management & Logrotate
By default, logs are written to `/var/log/linux-updater/` with:
By default, logs are written to `/var/log/linux-updater/` conforming to Linux FHS:
- Timestamped files: `linux-updater-YYYYMMDD-HHMMSS.log`
- Symlink to latest run: `/var/log/linux-updater/latest.log`
To manage historical logs and compress older runs, configure `/etc/logrotate.d/linux-updater`:
The package installation automatically provides `/etc/logrotate.d/linux-updater`:
```text
/var/log/linux-updater/*.log {
weekly
rotate 12
rotate 4
compress
missingok
notifempty
create 0640 root root
}
```
---
## 5. Shell Tab Autocompletion Deployment
For administrative workstations and fleet servers, shell completions can be automatically deployed:
- **System-wide Bash:** `/usr/share/bash-completion/completions/linux-updater`
- **System-wide Zsh:** `/usr/share/zsh/site-functions/_linux-updater` (or `/usr/share/zsh/vendor-completions/_linux-updater`)
Both files are automatically placed when installing via `.deb`, `.rpm`, or `install.sh`. Administrators can also dynamically output and evaluate them:
```bash
# Bash:
linux-updater completion bash > /etc/bash_completion.d/linux-updater
# Zsh:
linux-updater completion zsh > /usr/local/share/zsh/site-functions/_linux-updater
```