diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f39bcb9..ee78487 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,5 +26,11 @@ jobs: - name: Run pylint run: find . -name '*.py' -exec pylint -d E0611,E0401,C0103,C0301 --output-format=colorized {} + + - name: Run make clean + run: make clean + + - name: Run make + run: make + - name: Run make test run: make test diff --git a/CHANGELOG.md b/CHANGELOG.md index d57574e..9bbff06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. +## [v3.6.0](https://github.com/Antiz96/arch-update/releases/tag/v3.6.0) - 2025-01-21 + +### Features + +- Add the `NoNotification` option to `arch-update.conf` ([#302](https://github.com/Antiz96/arch-update/pull/302)) - ([39b0efc](https://github.com/Antiz96/arch-update/commit/39b0efc5dfb3aa3eea9f77104d27f00e384446ec)) by @Antiz96 + +### Documentation + +- General rework & simplification of the documentation ([#301](https://github.com/Antiz96/arch-update/pull/301)) - ([c6ed5d8](https://github.com/Antiz96/arch-update/commit/c6ed5d8f334fd7488e409fb61d3b9cb0414836e5)) by @Antiz96 +- Document the usage of `xdg-terminal-exec` to run Arch-Update in a specific terminal emulator ([#300](https://github.com/Antiz96/arch-update/pull/300)) - ([f568955](https://github.com/Antiz96/arch-update/commit/f5689558be3c44a7c39ac4434e7635c623a3ab7f)) by @Antiz96 +- Use `scdoc` to write and generate man pages ([#299](https://github.com/Antiz96/arch-update/pull/299)) - ([6749a94](https://github.com/Antiz96/arch-update/commit/6749a9400819330dbc11819c7d6bfad059cace8d)) by @Antiz96 + +### Miscellaneous + +- Use more specific names for 'notif' and 'flatpak' variables ([#303](https://github.com/Antiz96/arch-update/pull/303)) - ([d021523](https://github.com/Antiz96/arch-update/commit/d021523844d100a06a1f7d0b67163cb526ebd3ca)) by @Antiz96 + ## [v3.5.0](https://github.com/Antiz96/arch-update/releases/tag/v3.5.0) - 2025-01-18 ### Features diff --git a/Makefile b/Makefile index 1606628..6d29897 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,28 @@ _pkgname=Arch-Update PREFIX ?= /usr/local -.PHONY: all install test uninstall +.PHONY: build test install clean uninstall -all: +build: + # Generate man pages + scdoc < "doc/man/${pkgname}.1.scd" > "doc/man/${pkgname}.1" + scdoc < "doc/man/${pkgname}.conf.5.scd" > "doc/man/${pkgname}.conf.5" + scdoc < "doc/man/fr/${pkgname}.1.scd" > "doc/man/fr/${pkgname}.1" + scdoc < "doc/man/fr/${pkgname}.conf.5.scd" > "doc/man/fr/${pkgname}.conf.5" + + # Archive man pages + gzip -c "doc/man/${pkgname}.1" > "doc/man/${pkgname}.1.gz" + gzip -c "doc/man/${pkgname}.conf.5" > "doc/man/${pkgname}.conf.5.gz" + gzip -c "doc/man/fr/${pkgname}.1" > "doc/man/fr/${pkgname}.1.gz" + gzip -c "doc/man/fr/${pkgname}.conf.5" > "doc/man/fr/${pkgname}.conf.5.gz" + + # Generate translations files + msgfmt po/fr.po -o po/fr.mo + msgfmt po/sv.po -o po/sv.mo + +test: + # Run some simple unit tests on basic functions + bats test/case/basic_functions.bats install: # Install main script @@ -27,33 +46,21 @@ install: install -Dm 644 "res/systemd/${pkgname}.timer" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer" install -Dm 644 "res/systemd/${pkgname}-tray.service" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}-tray.service" - # Generate and install .mo files for translations - # .mo files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/) - msgfmt po/fr.po -o po/fr.mo - msgfmt po/sv.po -o po/sv.mo - install -Dm 644 po/fr.mo "${DESTDIR}${PREFIX}/share/locale/fr/LC_MESSAGES/${_pkgname}.mo" - install -Dm 644 po/sv.mo "${DESTDIR}${PREFIX}/share/locale/sv/LC_MESSAGES/${_pkgname}.mo" - rm -f po/fr.mo - rm -f po/sv.mo - # Install shell completions install -Dm 644 "res/completions/${pkgname}.bash" "${DESTDIR}${PREFIX}/share/bash-completion/completions/${pkgname}" install -Dm 644 "res/completions/${pkgname}.zsh" "${DESTDIR}${PREFIX}/share/zsh/site-functions/_${pkgname}" install -Dm 644 "res/completions/${pkgname}.fish" "${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/${pkgname}.fish" - # Archive and install man pages - gzip -c "doc/man/${pkgname}.1" > "doc/man/${pkgname}.1.gz" - gzip -c "doc/man/${pkgname}.conf.5" > "doc/man/${pkgname}.conf.5.gz" - gzip -c "doc/man/fr/${pkgname}.1" > "doc/man/fr/${pkgname}.1.gz" - gzip -c "doc/man/fr/${pkgname}.conf.5" > "doc/man/fr/${pkgname}.conf.5.gz" + # Install man pages install -Dm 644 "doc/man/${pkgname}.1.gz" "${DESTDIR}${PREFIX}/share/man/man1/${pkgname}.1.gz" install -Dm 644 "doc/man/${pkgname}.conf.5.gz" "${DESTDIR}${PREFIX}/share/man/man5/${pkgname}.conf.5.gz" install -Dm 644 "doc/man/fr/${pkgname}.1.gz" "${DESTDIR}${PREFIX}/share/man/fr/man1/${pkgname}.1.gz" install -Dm 644 "doc/man/fr/${pkgname}.conf.5.gz" "${DESTDIR}${PREFIX}/share/man/fr/man5/${pkgname}.conf.5.gz" - rm -f "doc/man/${pkgname}.1.gz" - rm -f "doc/man/${pkgname}.conf.5.gz" - rm -f "doc/man/fr/${pkgname}.1.gz" - rm -f "doc/man/fr/${pkgname}.conf.5.gz" + + # Install translations files + # Translations files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/) + install -Dm 644 po/fr.mo "${DESTDIR}${PREFIX}/share/locale/fr/LC_MESSAGES/${_pkgname}.mo" + install -Dm 644 po/sv.mo "${DESTDIR}${PREFIX}/share/locale/sv/LC_MESSAGES/${_pkgname}.mo" # Install documentation install -Dm 644 README.md "${DESTDIR}${PREFIX}/share/doc/${pkgname}/README.md" @@ -62,6 +69,17 @@ install: # Install example config install -Dm 644 "res/config/${pkgname}.conf.example" "${DESTDIR}${PREFIX}/share/${pkgname}/config/${pkgname}.conf.example" +clean: + # Delete generated and archived man pages + rm -f "doc/man/${pkgname}.1"{,.gz} + rm -f "doc/man/${pkgname}.conf.5"{,.gz} + rm -f "doc/man/fr/${pkgname}.1"{,.gz} + rm -f "doc/man/fr/${pkgname}.conf.5"{,.gz} + + # Delete generated translations files + rm -f po/fr.mo + rm -f po/sv.mo + uninstall: # Delete main script rm -f "${DESTDIR}${PREFIX}/bin/${pkgname}" @@ -98,7 +116,3 @@ uninstall: # Delete documentation folder rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/" - -test: - # Run some simple unit tests on basic functions - bats test/case/basic_functions.bats diff --git a/README-fr.md b/README-fr.md index a1c11d7..e64e07a 100644 --- a/README-fr.md +++ b/README-fr.md @@ -18,32 +18,33 @@ ## Description -Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour et qui inclut une applet systray cliquable pour une intégration facile avec n'importe quel panneau sur n'importe quel environnement de bureau / gestionnaire de fenêtres. -Prise en charge optionnelle des paquets AUR / Flatpak et des notifications de bureau. +Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour. +Inclut une applet systray dynamique & cliquable pour une intégration facile avec n'importe quel environnement de bureau / gestionnaire de fenêtres. Arch-Update est conçu pour suivre les étapes usuelles de maintenance du système, telles que décrites dans le [Arch Wiki](https://wiki.archlinux.org/title/System_maintenance). Fonctionnalités : -- Inclut une applet systray cliquable qui change dynamiquement pour agir comme un notificateur & applicateur de mise à jour. Facile à intégrer avec n'importe quel panneau sur n'importe quel environnement de bureau & gestionnaire de fenêtres. -- Vérification et listing automatiques de tous les paquets disponibles pour la mise à jour. -- Propose d'afficher les news récentes d'Arch Linux avant d'appliquer les mises à jour. -- Vérification et listing automatiques des paquets orphelins et propose de les supprimer. -- Vérification automatique de la présence d'anciens paquets et / ou paquets désinstallés dans le cache et propose de les supprimer. -- Listing et aide au traitement des fichiers pacnew / pacsave. -- Vérification automatique des mises à jour du noyau en attente nécessitant un redémarrage et propose de redémarrer s'il y en a une. -- Vérification automatique des services nécessitant un redémarrage après mise à jour et propose de les redémarrer s'il y en a. +- Vérification et listing automatiques des mises à jour disponibles. +- Vérification des Arch Linux news récentes (et propose de les afficher s'il y en a). +- Vérification des paquets orphelins (et propose de les supprimer s'il y en a). +- Vérification d'anciens paquets & paquets désinstallés dans le cache (et propose de les supprimer s'il y en a). +- Vérification des fichiers pacnew & pacsave (et propose de les traiters s'il y en a). +- Vérification des mises à jour du noyau en attente nécessitant un redémarrage (et propose de le faire s'il y en a une). +- Vérification des services nécessitant un redémarrage après mise à jour (et propose de le faire s'il y en a). - Support de `sudo`, `doas` et `run0`. -- Prise en charge optionnelle des paquets AUR (via `paru`, `yay` ou `pikaur`). -- Prise en charge optionnelle des paquets Flatpak. -- Prise en charge optionnelle des notifications de bureau lors de nouvelles mises à jour disponibles. + +Support optionnel pour : + +- Les paquets AUR (via `paru`, `yay` ou `pikaur`). +- Les paquets Flatpak (via `flatpak`). +- Les notifications de bureau (via `libnotify`). ## Installation ### AUR -Installez le paquet AUR [arch-update](https://aur.archlinux.org/packages/arch-update "arch-update AUR package"). -Consultez également la liste des dépendances optionnelles (disponible dans la section ["depuis la source"](#depuis-la-source) ci-dessous) dont vous pourriez avoir besoin. +Installez le paquet AUR [arch-update](https://aur.archlinux.org/packages/arch-update "arch-update AUR package") (consultez également la liste des dépendances optionnelles dont vous pourriez avoir envie ou besoin). ### Depuis la source @@ -53,7 +54,7 @@ Installez les dépendances requises : sudo pacman -S --needed pacman-contrib archlinux-contrib curl fakeroot htmlq diffutils hicolor-icon-theme python python-pyqt6 qt6-svg glib2 ``` -Dépendances optionnelles supplémentaires dont vous pourriez avoir besoin ou que vous pourriez souhaiter : +Dépendances optionnelles supplémentaires dont vous pourriez avoir envie ou besoin : - [paru](https://aur.archlinux.org/packages/paru) : Support des paquets AUR - [yay](https://aur.archlinux.org/packages/yay) : Support des paquets AUR @@ -63,18 +64,26 @@ Dépendances optionnelles supplémentaires dont vous pourriez avoir besoin ou qu - [vim](https://archlinux.org/packages/extra/x86_64/vim/) : Programme de fusion par défaut pour pacdiff - [qt6-wayland](https://archlinux.org/packages/extra/x86_64/qt6-wayland/) : Support de l'applet systray sur Wayland -Téléchargez l'archive de la [dernière version stable](https://github.com/Antiz96/arch-update/releases/latest) et extrayez la *(vous pouvez également cloner ce référentiel via `git clone`)*. +Installez les dépendances de compilation requises : + +```bash +sudo pacman -S --asdeps make scdoc bats +``` -Pour installer `arch-update`, allez dans le répertoire extrait / cloné et exécutez la commande suivante : +Téléchargez l'archive de la [dernière version stable](https://github.com/Antiz96/arch-update/releases/latest) et extrayez la (vous pouvez également cloner ce référentiel avec `git`). + +Pour installer `arch-update`, allez dans le répertoire extrait / cloné et exécutez les commandes suivantes : ```bash +sudo make +sudo make test sudo make install ``` -Si vous voulez exécuter des tests unitaires simples, vous pouvez exécuter la commande suivante (requiert [bats](https://archlinux.org/packages/extra/any/bats/)) : +Une fois l'installation terminée, vous pouvez optionnellement nettoyer le répertoire des fichiers générés durant l'installation en exécutant cette commande : ```bash -make test +sudo make clean ``` Pour désinstaller `arch-update`, allez dans le répertoire extrait / cloné et exécutez la commande suivante : @@ -105,34 +114,28 @@ arch-update --tray --enable systemctl --user enable --now arch-update-tray.service ``` -Si vous utilisez un gestionnaire de fenêtre ou un compositeur Wayland, vous pouvez plutôt ajouter la commande `arch-update --tray` à vos applications "auto-start" dans votre fichier de configuration. - -**Si l'applet systray ne démarre pas au démarrage du système malgré tout**, veuillez lire [ce chapitre](#lapplet-systray-ne-démarre-pas-au-démarrage-du-système). - -L'icône du systray changera automatiquement en fonction de l'état actuel de votre système ('à jour' ou 'mises à jour disponibles'). Lorsque vous cliquez dessus, elle lance `arch-update` via le fichier [arch-update.desktop](https://github.com/Antiz96/arch-update/blob/main/res/desktop/arch-update.desktop). +- Ajouter la commande suivante à vos applications "auto-start" / votre fichier de configuration (si vous utilisez un gestionnaire de fenêtre ou un compositeur Wayland) : -L'applet systray essaie de lire le fichier `arch-update.desktop` dans les chemins ci-dessous avec l'ordre suivant : +```bash +arch-update --tray +``` -- `$XDG_DATA_HOME/applications/arch-update.desktop` -- `$HOME/.local/share/applications/arch-update.desktop` -- `$XDG_DATA_DIRS/applications/arch-update.desktop` -- `/usr/local/share/applications/arch-update.desktop` <-- Chemin d'installation par défaut lorsque vous installez Arch-Update [depuis la source](#depuis-la-source) -- `/usr/share/applications/arch-update.desktop` <-- Chemin d'installation par défaut lorsque vous installez Arch-Update [depuis le AUR](#AUR) +**Si l'applet systray ne démarre pas au démarrage du système malgré tout**, veuillez lire [ce chapitre](#lapplet-systray-ne-démarre-pas-au-démarrage-du-système). -Dans le cas où vous avez envie (ou besoin) de personnaliser le fichier `arch-update.desktop`, copiez le dans un chemin qui a une priorité plus élevée que le chemin d'installation par défaut et modifier le ici (afin d'assurer que votre ficher `arch-update.desktop` personnalisé remplace celui par défaut et que vos modifications ne soient pas écrasées à chaque mise à jour). +L'icône du systray change dynamiquement pour indiquer l'état actuel de votre système ('à jour' ou 'mises à jour disponibles'). Lorsque vous cliquez dessus, elle lance `arch-update` dans une fenêtre de terminal via le fichier [arch-update.desktop](https://github.com/Antiz96/arch-update/blob/main/res/desktop/arch-update.desktop). -Cela peut être utile pour forcer `Arch-Update` à se lancer avec un émulateur de terminal spécifique lorsque l'on clique sur l'applet systray. -**Si cliquer sur l'applet systray ne fait rien**, veuillez lire [ce chapitre](#forcer-le-fichier-desktop-à-se-lancer-avec-un-émulateur-de-terminal-spécifique). +**Si cliquer sur l'applet systray ne fait rien**, veuillez lire [ce chapitre](#lancer-arch-update-dans-un-émulateur-de-terminal-spécifique). ### Le timer systemd -Il existe un service systemd (sous `/usr/lib/systemd/user/arch-update.service` ou `/usr/local/lib/systemd/user/arch-update.service` si vous avez installé `Arch-Update` [depuis la source](#depuis-la-source)) qui exécute la fonction `check` quand il est démarré (voir le chapitre [Documentation](#documentation)). -Pour le démarrer automatiquement **au démarrage du système puis une fois toutes les heures**, activez le timer systemd associé (vous pouvez modifier le cycle de vérification automatique à votre guise, voir les [Trucs et astuces - Modifier le cycle de vérification automatique](#modifier-le-cycle-de-vérification-automatique)) : +Pour effectuer des vérifications automatiques et périodiques des mises à jour disponibles, activez le timer systemd associé : ```bash systemctl --user enable --now arch-update.timer ``` +Par défaut, une vérification est effectuée **au démarrage du système puis une fois toutes les heures**. Le cycle de vérification peut être personnalisé, voir [ce chapitre](#modifier-le-cycle-de-vérification). + ### Captures d'écran Une fois démarrée, l'applet systray apparait dans la zone systray de votre panneau. @@ -140,11 +143,11 @@ C'est l'icône à droite de celle du wifi dans la capture d'écran ci-dessous: ![systray-icon](https://github.com/Antiz96/arch-update/assets/53110319/fe032e68-3582-470a-9e6d-b51a9ea8c1ba) -Avec [le systemd timer](#le-timer-systemd) activé, `Arch-Update` vérifie automatiquement les mises à jour au démarrage du système puis une fois chaque heure. La vérification peut être manuellement déclenchée en exécutant la commande `arch-update --check` ou en faisant un clic droit sur l'icône du systray puis en cliquant sur l'entrée `Vérifier les mises à jour` depuis le menu : +Avec [le timer systemd](#le-timer-systemd) activé, les vérifications des mises à jour sont effectuées automatiqument et périodiquement, mais vous pouvez en déclencher une manuellement depuise l'applet systray en faisant un clic droit dessus puis en cliquant sur l'entrée `Vérifier les mises à jour` depuis le menu : ![check_menu_fr](https://github.com/user-attachments/assets/b0b7730b-0196-4973-ac90-bceb8a74845e) -Si de nouvelles mises à jour sont disponibles, l'icône du systray affichera un cercle rouge et une notification de bureau indiquant le nombre de mises à jour disponibles sera envoyée (nécessite [libnotify](https://archlinux.org/packages/extra/x86_64/libnotify/ "paquet libnotify") et un serveur de notification en cours d'exécution) : +Si de nouvelles mises à jour sont disponibles, l'icône du systray affiche un cercle rouge et une notification de bureau indiquant le nombre de mises à jour disponibles est envoyée : ![notif_fr](https://github.com/user-attachments/assets/56d72147-bde4-492b-8ad1-20caed9f22a9) @@ -152,149 +155,69 @@ Vous pouvez alors voir la liste des mises à jour disponibles dans l'infobulle d ![tooltip_fr](https://github.com/user-attachments/assets/8bc3d339-f7ab-4c8b-aa3f-2b88ea68af42) -Alternativement, vous pouvez voir la liste des mises à jour disponible dans le menu déroulant en faisant un clic droit sur l'icône du systray : +Autrement, vous pouvez voir la liste des mises à jour disponible dans le menu déroulant en faisant un clic droit sur l'icône du systray : ![dropdown_menu_fr](https://github.com/user-attachments/assets/60c3c0d8-8091-4047-b8da-ce8f8bc72476) -Quand l'icône du systray est cliquée, elle affiche la liste des paquets disponibles pour la mise à jour dans une fenêtre de terminal et demande la confirmation de l'utilisateur pour procéder à l'installation (peut aussi être lancé en exécutant la commande `arch-update`, requiert [paru](https://aur.archlinux.org/packages/paru "paru"), [yay](https://aur.archlinux.org/packages/yay "yay") ou [pikaur](https://aur.archlinux.org/packages/pikaur "pikaur") pour le support des paquets AUR et [flatpak](https://archlinux.org/packages/extra/x86_64/flatpak/) pour le support des paquets Flatpak). +Quand l'icône du systray est cliquée, elle lance `arch-update` dans une fenêtre de terminal : ![listing_packages-FR](https://github.com/Antiz96/arch-update/assets/53110319/60547cde-f327-46f8-907c-61bf9bbee6c5) -Par défaut, si au moins une news Arch Linux a été publiée depuis la dernière exécution, `Arch-Update` vous proposera de lire les dernières news Arch Linux directement depuis votre fenêtre de terminal. -Les news publiées depuis la dernière exécution sont tagguées comme `[NOUVEAU]` : +Si au moins une news Arch Linux a été publiée depuis la dernière exécution, `Arch-Update` vous proposera de lire les dernières news Arch Linux directement depuis la fenêtre de terminal. +Les news publiées depuis la dernière exécution sont labellisées comme `[NOUVEAU]` : -![listing_news-FR](https://github.com/Antiz96/arch-update/assets/53110319/ec4032f3-835e-418c-b19a-b7bd089d6bd9) +![listing_news-FR](https://github.com/Antiz96/arch-update/assets/53110319/72819197-d4f7-4c50-af21-0aac1c60ba41) -Quand la liste des news récentes est affichée, vous pouvez sélectionner les news à lire (par exemple: 1 3 5), sélectionner 0 pour toutes les lire ou appuyer sur "entrée" pour procéder à la mise à jour. -Si aucune news n'a été publiée depuis la dernière exécution, `Arch-Update` procédera directement à la mise à jour après que vous ayez donné votre confirmation. +Si aucune news n'a été publiée depuis la dernière exécution, `Arch-Update` demande directement votre confirmation pour procéder à la mise à jour. -Dans les deux cas, à partir de là, vous avez simplement à laisser `Arch-Update` vous guider à travers les différentes étapes requises pour une mise à jour complète et appropriée de votre système ! :smile: +À partir de là, laissez simplement `Arch-Update` vous guider à travers les différentes étapes requises pour une mise à jour complète et appropriée de votre système ! :smile: -Certaines options peuvent être activées, désactivées ou modifiées via le fichier de configuration `arch-update.conf`. Voir le [chapitre de documentation arch-update.conf](#fichier-de-configuration-arch-update) pour plus de détails. +Certaines options peuvent être activées, désactivées ou modifiées via le fichier de configuration `arch-update.conf`. Voir la [page de manuel arch-update.conf(5)](https://github.com/Antiz96/arch-update/blob/main/doc/man/fr/arch-update.conf.5.scd) pour plus de détails. ## Documentation ### arch-update -```text -Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les -tâches importantes d'avant / après mise à jour. - -Lancez arch-update pour exécuter la fonction principale « update » : -Afficher la liste des paquets disponibles pour mise à jour, puis demander la confirmation de l'utilisateur -pour procéder à l'installation. -Avant d'effectuer la mise à jour, propose d'afficher les dernières Arch news. -Après la mise à jour, vérification de la présence de paquets orphelins & inutilisés, d'anciens paquets mis en cache, -de fichiers pacnew & pacsave, de mise à jour du noyau en attente ainsi que des services nécessitant un redémarrage après mise à jour -et, s'il y en a, propose de les traiter. - -Options : --c, --check Vérifier les mises à jour disponibles, changer l'icône du systray et envoyer une notification de bureau contenant le nombre de mises à jour disponibles (s'il y a des nouvelles mises à jour disponibles depuis le dernier check) --l, --list Afficher la liste des mises à jour en attente --d, --devel Inclure les mises à jour des paquets de développement AUR --n, --news [Num] Afficher les dernieres Arch News, vous pouvez optionellement spécifier le nombre de Arch news à afficher avec `--news [Num]` (e.g. `--news 10`) --D, --debug Afficher les traces de débogage ---gen-config Générer un fichier de configuration `arch-update.conf` par défaut / exemple (voir la page de manuel arch-update.conf(5) pour plus de détails), vous pouvez optionnellement passer l'argument `--force` pour écraser un fichier de configuration `arch-update.conf` existant ---show-config Afficher le fichier de configuration `arch-update.conf` actuellement utilisé (s'il existe) ---edit-config Editer le fichier de configuration `arch-update.conf` actuellement utilisé (s'il existe) ---tray Lancer l'applet systray d'Arch-Update, vous pouvez optionnellement ajouter l'argument `--enable` pour la démarrer automatiquement au démarrage du système. --h, --help Afficher ce message d'aide et quitter --V, --version Afficher les informations de version et quitter - -Codes de sortie : -0 OK -1 Option invalide -2 Aucune commande d'élévation de privilège (sudo, doas ou run0) n'est installée ou celle définie dans le fichier de configuration `arch-update.conf` n'est pas disponible -3 Erreur lors du lancement de l'applet systray d'Arch-Update -4 L'utilisateur n'a pas donné la confirmation de procéder -5 Erreur lors de la mise à jour des paquets -6 Erreur lors de l'appel de la commande reboot pour appliquer une mise à jour du noyau en attente -7 Aucune mise à jour en attente durant l'utilisation de l'option `-l / --list` -8 Erreur lors de la génération d'un fichier de configuration avec l'option `--gen-config` -9 Erreur lors de la lecture du fichier de configuration avec l'option `--show-config` -10 Erreur lors de la creation du fichier desktop autostart pour l'applet systray avec l'option `--tray --enable` -11 Erreur lors du redémarrage des services nécessitant un redémarrage après mise à jour -12 Erreur lors du traitement des fichiers pacnew -13 Erreur lors de l'édition du fichier de configuration avec l'option `--edit-config` -14 Le dossier de librairies n'a pas été trouvé -15 L'éditeur "diff prog" défini dans le fichier de configuration `arch-update.conf` n'est pas disponible -``` - -Pour plus d'informations, consultez la page de manuel arch-update(1). -Certaines options peuvent être activées, désactivées ou modifiées via le fichier de configuration arch-update.conf, voir la page de manuel arch-update.conf(5). +Voir `arch-update --help` et la [page de manuel arch-update(1)](https://github.com/Antiz96/arch-update/blob/main/doc/man/fr/arch-update.1.scd). ### Fichier de configuration arch-update -```text -Le fichier arch-update.conf est un fichier de configuration facultatif pour arch-update permettant -d'activer, désactiver ou modifier certaines options dans le script. - -Ce fichier de configuration doit se trouver dans "${XDG_CONFIG_HOME}/arch-update/arch-update.conf" -ou "${HOME}/.config/arch-update/arch-update.conf". -Un fichier de configuration par défaut / exemple peut être généré en exécutant : `arch-update --gen-config` - -Les options prises en charge sont : - -- NoColor # Ne pas coloriser la sortie. -- NoVersion # Ne pas afficher les modifications de versions des paquets lors du listing des mises à jour en attente (y compris lors de l'utilisation de l'option `-l / --list`). -- NewsNum=[Num] # Nombre de Arch news à affcher avant la mise à jour et avec l'option `-n / --news` (voir la page de manuel arch-update(1) pour plus de details). La valeur par défaut est 5. -- AURHelper=[AUR Helper] # AUR helper à utiliser pour la prise en charge des paquets AUR. Les valeurs valides sont `paru`, `yay` ou `pikaur`. Si cette option n'est pas spécifiée, Arch-Update utilisera le premier AUR helper disponible dans l'ordre suivant : `paru` puis `yay` puis `pikaur` (si aucun d'eux n'est installé, Arch-Update ne prendra pas en compte les paquets AUR). -- PrivilegeElevationCommand=[Cmd] # Commande à utiliser pour l'élévation de privilège. Les valeurs valides sont `sudo`, `doas` ou `run0`. Si cette option n'est pas spécifiée, Arch-Update utilisera la première commande disponible dans l'odre suivant : `sudo`, `doas` puis `run0`. -- KeepOldPackages=[Num] # Nombre d'anciennes versions de paquets à conserver dans le cache de pacman. La valeur par défaut est 3. -- KeepUninstalledPackages=[Num] # Nombre de versions de paquets désinstallés à conserver dans le cache de pacman. La valeur par défaut est 0. -- DiffProg=[Editeur] # Editeur à utiliser pour visualiser / editer les différences durant le traitement des fichiers pacnew. La valeur par défaut est la valeur de la variable d'environnement `$DIFFPROG` (ou `vimdiff` si `$DIFFPROG` n'est pas paramétrée). -- TrayIconStyle=[Style / Color] # Style à utiliser pour l'icône de l'applet systray. Les valeurs valides sont les variantes de style / couleur disponibles pour le set d'icône, listées ici : https://github.com/Antiz96/arch-update/tree/main/res/icons. La valeur par défaut est "light". - -Les options sont sensibles à la casse, les majuscules doivent donc être respectées. -``` - -Pour plus d'informations, consultez la page de manuel arch-update.conf(5). +Voir la [page de manuel arch-update.conf(5)](https://github.com/Antiz96/arch-update/blob/main/doc/man/fr/arch-update.conf.5.scd). ## Trucs et astuces -### Support du AUR - -Arch-Update prend en charge les paquets AUR si **paru**, **yay** ou **pikaur** est installé : -Voir et -Voir et -Voir et - -### Support de Flatpak - -Arch-Update prend en charge les paquets Flatpak si **flatpak** est installé : -Voir et - -### Support des notifications de bureau - -Arch-Update prend en charge les notifications de bureau lors de l'exécution de la fonction `--check` si **libnotify** est installé (et qu'un serveur de notification est en cours d'exécution) : -Voir - ### L'applet systray ne démarre pas au démarrage du système Assurez vous d'avoir suivi les instructions de [ce chapitre](#lapplet-systray). Si l'applet systray ne démarre pas malgré tout, cela peut être le résultat d'une [situation de compétition](https://fr.wikipedia.org/wiki/Situation_de_comp%C3%A9tition). -Dans ce cas, il peut être utile de légèrement retarder le démarrage de l'applet systray en utilisant une déclaration `sleep` au préalable : +Pour éviter ceci, vous pouvez ajouter un léger délai au démarrage de l'applet systray en utilisant la commande `sleep` : - Si vous avez utilisé `arch-update --tray --enable`, modifiez la ligne `Exec=` dans le fichier `arch-update-tray.desktop` (qui se trouve sous `~/.config/autostart/` par défaut), comme ceci : -> Exec=sh -c "sleep 3 && arch-update --tray" +```text +Exec=sh -c "sleep 3 && arch-update --tray" +``` - Si vous avez utilisé le service systemd `arch-update-tray.service`, exécutez `systemctl --user edit --full arch-update-tray.service` et modifiez la ligne `ExecStart=`, comme ceci : -> ExecStart=sh -c "sleep 3 && arch-update --tray" +```text +ExecStart=sh -c "sleep 3 && arch-update --tray" +``` -- Si vous utilisez un gestionnaire de fenêtres ou un compositeur Wayland, ajoutez une déclaration `sleep` avant la commande `arch-update --tray` dans vos applications "auto-start" dans votre fichier de configuration, comme ceci : +- Si vous utilisez un gestionnaire de fenêtres ou un compositeur Wayland, modifiez la commande dans vos applications "auto-start" / vôtre fichier de configuration, comme ceci : -> `sleep 3 && arch-update --tray` +```text +sleep 3 && arch-update --tray +``` -Si l'applet systray ne démarre toujours au démarrage du système, essayez de graduellement augmenter la valeur du `sleep`. +Si l'applet systray ne démarre toujours pas au démarrage du système, essayez de graduellement augmenter la valeur du `sleep`. -### Modifier le cycle de vérification automatique +### Modifier le cycle de vérification -Si vous avez activé le [timer systemd](#le-timer-systemd), l'option `--check` est automatiquement lancée au démarrage du système puis une fois par heure. +Si vous avez activé le [timer systemd](#le-timer-systemd), une vérification des mises à jour disponible est lancée au démarrage du système puis une fois par heure. -Si vous souhaitez modifier le cycle de vérification, exécutez la commande `systemctl --user edit --full arch-update.timer` et modifiez la valeur `OnUnitActiveSec` à votre convenance. +Si vous souhaitez personnaliser le cycle de vérification, exécutez la commande `systemctl --user edit --full arch-update.timer` et modifiez la valeur `OnUnitActiveSec` à votre convenance. Par exemple, si vous voulez qu'`Arch-Update` vérifie plutôt les nouvelles mises à jour toutes les 10 minutes : ```text @@ -310,24 +233,17 @@ Voir pour plus de détails. ## Contribuer -Veuillez lire le [guide de contribution](https://github.com/Antiz96/arch-update/blob/main/CONTRIBUTING.md). +Voir le [guide de contribution](https://github.com/Antiz96/arch-update/blob/main/CONTRIBUTING.md). ## Licence diff --git a/README.md b/README.md index 259215c..1bbc8e6 100644 --- a/README.md +++ b/README.md @@ -18,32 +18,33 @@ ## Description -An update notifier & applier for Arch Linux that assists you with important pre / post update tasks and that includes a clickeable systray applet for an easy integration with any panel on any Desktop Environment / Window Manager. -Optional support for AUR / Flatpak packages and desktop notifications. +An update notifier & applier for Arch Linux that assists you with important pre / post update tasks. +Includes a dynamic & clickeable systray applet for an easy integration with any Desktop Environment / Window Manager. Arch-Update is designed to follow usual system maintenance steps, as described in the [Arch Wiki](https://wiki.archlinux.org/title/System_maintenance). Features: -- Includes a clickeable systray applet that dynamically changes to act as an update notifier & applier. Easy to integrate with any panel on any Desktop Environment & Window Manager. -- Automatic check and listing of every packages available for update. -- Offers to display the latest Arch Linux news before applying updates. -- Automatic check and listing of orphan packages and offers to remove them. -- Automatic check for old and / or uninstalled cached packages and offers to remove them. -- Lists and helps you processing pacnew & pacsave files. -- Automatic check for pending kernel updates requiring a reboot to be applied and offers to do so if there's one. -- Automatic check for services requiring a post upgrade restart and offers to do so if there are. +- Automatic check and listing of available updates. +- Check for recent Arch Linux news (and offers to display them if there are). +- Check for orphan packages (and offers to remove them if there are). +- Check for old & uninstalled packages in cache (and offers to remove them if there are). +- Check for pacnew & pacsave files (and offers to process them if there are). +- Check for pending kernel update requiring a reboot (and offers to do so if there's one). +- Check for services requiring a post upgrade restart (and offers to do so if there are). - Support for `sudo`, `doas` & `run0`. -- Optional support for AUR packages (through `paru`, `yay` or `pikaur`). -- Optional support for Flatpak packages. -- Optional support for desktop notifications on new available updates. + +Optional support for: + +- AUR packages (via `paru`, `yay` or `pikaur`). +- Flatpak packages (via `flatpak`). +- Desktop notifications (via `libnotify`). ## Installation ### AUR -Install the [arch-update](https://aur.archlinux.org/packages/arch-update "arch-update AUR package") AUR package. -See also the list of optional dependencies (available in the ["from source"](#from-source) section below) you may need. +Install the [arch-update](https://aur.archlinux.org/packages/arch-update "arch-update AUR package") AUR package (also check the list of optional dependencies for anything you may want or need). ### From Source @@ -53,7 +54,7 @@ Install required dependencies: sudo pacman -S --needed pacman-contrib archlinux-contrib curl fakeroot htmlq diffutils hicolor-icon-theme python python-pyqt6 qt6-svg glib2 ``` -Additional optional dependencies you might need or want: +Additional optional dependencies you might want or need: - [paru](https://aur.archlinux.org/packages/paru): AUR Packages support - [yay](https://aur.archlinux.org/packages/yay): AUR Packages support @@ -63,18 +64,26 @@ Additional optional dependencies you might need or want: - [vim](https://archlinux.org/packages/extra/x86_64/vim/): Default merge program for pacdiff - [qt6-wayland](https://archlinux.org/packages/extra/x86_64/qt6-wayland/): Systray applet support on Wayland -Download the archive of the [latest stable release](https://github.com/Antiz96/arch-update/releases/latest) and extract it *(alternatively, you can clone this repository via `git clone`)*. +Install required build dependencies: + +```bash +sudo pacman -S --asdeps make scdoc bats +``` -To install `arch-update`, go into the extracted / cloned directory and run the following command: +Download the archive of the [latest stable release](https://github.com/Antiz96/arch-update/releases/latest) and extract it (alternatively, you can clone this repository with `git`). + +To install `arch-update`, go into the extracted / cloned directory and run the following commands: ```bash +sudo make +sudo make test sudo make install ``` -If you want to run simple unit tests, you can run the following command (requires [bats](https://archlinux.org/packages/extra/any/bats/)): +Once the installation is complete, you may optionally clean up the directory of files generated during installation by running the following command: ```bash -make test +sudo make clean ``` To uninstall `arch-update`, go into the extracted / cloned directory and run the following command: @@ -105,34 +114,28 @@ arch-update --tray --enable systemctl --user enable --now arch-update-tray.service ``` -If you use a Window Manager or a Wayland Compositor, you can add the `arch-update --tray` command to your "auto-start" apps in your configuration file instead. - -**If the systray applet doesn't start at boot regardless**, please read [this chapter](#the-systray-applet-does-not-start-at-boot). - -The systray icon will automatically change depending on the current state of your system ('up to date' or 'updates available'). When clicked, it launches `arch-update` via the [arch-update.desktop](https://github.com/Antiz96/arch-update/blob/main/res/desktop/arch-update.desktop) file. +- Add the following command to your "auto-start" apps / configuration file (in case you use a Window Manager or a Wayland Compositor): -The systray applet attempts to read the `arch-update.desktop` file at the below paths and in the following order: +```bash +arch-update --tray +``` -- `$XDG_DATA_HOME/applications/arch-update.desktop` -- `$HOME/.local/share/applications/arch-update.desktop` -- `$XDG_DATA_DIRS/applications/arch-update.desktop` -- `/usr/local/share/applications/arch-update.desktop` <-- Default installation path when installing Arch-Update [from source](#from-source) -- `/usr/share/applications/arch-update.desktop` <-- Default installation path when installing Arch-Update [from the AUR](#AUR) +**If the systray applet doesn't start at boot regardless**, please read [this chapter](#the-systray-applet-does-not-start-at-boot). -In case you want (or need) to customize the `arch-update.desktop` file, copy it in a path that has a higher priority than the default installation path and modify it there (to ensure that your custom `arch-update.desktop` file supersedes the default one and that your modifications are not being overwritten on updates). +The systray icon dynamically changes to indicate the current state of your system ('up to date' or 'updates available'). When clicked, it launches `arch-update` in a terminal window via the [arch-update.desktop](https://github.com/Antiz96/arch-update/blob/main/res/desktop/arch-update.desktop) file. -This can be useful to force `Arch-Update` to launch with a specific terminal emulator when clicking the systray applet for instance. -**If clicking the systray applet does nothing**, please read [this chapter](#force-the-desktop-file-to-run-with-a-specific-terminal-emulator). +**If clicking the systray applet does nothing**, please read [this chapter](#run-arch-update-in-a-specific-terminal-emulator). ### The systemd timer -There is a systemd service (in `/usr/lib/systemd/user/arch-update.service` or in `/usr/local/lib/systemd/user/arch-update.service` if you installed `Arch-Update` [from source](#from-source)) that executes the `check` function when started (see the [Documentation](#documentation) chapter). -To start it automatically **at boot and then once every hour**, enable the associated systemd timer (you can modify the auto-check cycle to your liking, see the [Tips and tricks - Modify the auto-check cycle](#modify-the-auto-check-cycle) chapter): +To perform automatic and periodic checks for available updates, enable the associated systemd timer: ```bash systemctl --user enable --now arch-update.timer ``` +By default, a check is performed **at boot and then once every hour**. The check cycle can be customized, see [this chapter](#modify-the-check-cycle). + ### Screenshots Once started, the systray applet appears in the systray area of your panel. @@ -140,11 +143,11 @@ It is the icon at the right of the 'wifi' one in the screenshot below: ![systray-icon](https://github.com/Antiz96/arch-update/assets/53110319/fe032e68-3582-470a-9e6d-b51a9ea8c1ba) -With [the system timer](#the-systemd-timer) enabled, `Arch-Update` automatically checks for updates at boot and then once every hour. The check can be manually triggered by running the `arch-update --check` command or by right-clicking the systray icon and then clicking on the `Check for updates` menu entry: +With [the systemd timer](#the-systemd-timer) enabled, checks for updates are automatically and periodically performed, but you can manually trigger one from the systray applet icon by right-clicking it and then clicking on the `Check for updates` menu entry: ![check_for_updates](https://github.com/user-attachments/assets/86c3107d-d7aa-4ced-b9aa-69668c2e3c2a) -If there are new available updates, the systray icon will show a red circle and a desktop notification indicating the number of available updates will be sent (requires [libnotify](https://archlinux.org/packages/extra/x86_64/libnotify/ "libnotify package") and a running notification server): +If there are new available updates, the systray icon shows a red circle and a desktop notification indicating the number of available updates is sent: ![notif](https://github.com/user-attachments/assets/55301470-fab6-463f-af2e-ebe4e3d65af7) @@ -156,145 +159,65 @@ Alternatively, you can see the list of available updates in the dropdown menu en ![dropdown_menu](https://github.com/user-attachments/assets/4621d7d2-a9e4-40c3-851f-ee1687e6cf1e) -When the systray icon is left-clicked, it prints the list of packages available for updates inside a terminal window and asks for the user's confirmation to proceed with the installation (it can also be launched by running the `arch-update` command, requires [paru](https://aur.archlinux.org/packages/paru "paru"), [yay](https://aur.archlinux.org/packages/yay "yay") or [pikaur](https://aur.archlinux.org/packages/pikaur "pikaur") for AUR packages support and [flatpak](https://archlinux.org/packages/extra/x86_64/flatpak/) for Flatpak packages support). +When the systray icon is left-clicked, it runs `arch-update` in a terminal window: ![listing_packages](https://github.com/Antiz96/arch-update/assets/53110319/ed552414-0dff-4cff-84d2-6ff13340259d) -By default, if at least one Arch Linux news has been published since the last run, `Arch-Update` will offer you to read the latest Arch Linux news directly from your terminal window. +If at least one Arch Linux news has been published since the last run, `Arch-Update` will offer you to read the latest Arch Linux news directly from the terminal window. The news published since the last run are tagged as `[NEW]`: ![listing_news](https://github.com/Antiz96/arch-update/assets/53110319/ec4032f3-835e-418c-b19a-b7bd089d6bd9) -When recent news get listed, you can select the news to read (e.g. 1 3 5), select 0 to read them all or press "enter" to proceed with update. -If no news has been published since the last run, `Arch-Update` will directly proceed to the update after you gave your confirmation. +If no news has been published since the last run, `Arch-Update` directly asks for your confirmation to proceed with update. -In both cases, from there, you just have to let `Arch-Update` guide you through the various steps required for a complete and proper update of your system! :smile: +From there, just let `Arch-Update` guide you through the various steps required for a complete and proper update of your system! :smile: -Certain options can be enabled, disabled or modified via the `arch-update.conf` configuration file. See the [arch-update.conf documentation chapter](#arch-update-configuration-file) for more details. +Certain options can be enabled, disabled or modified via the `arch-update.conf` configuration file. See the [arch-update.conf(5) man page](https://github.com/Antiz96/arch-update/blob/main/doc/man/arch-update.conf.5.scd) for more details. ## Documentation ### arch-update -```text -An update notifier & applier for Arch Linux that assists you with -important pre / post update tasks. - -Run arch-update to perform the main "update" function: -Display the list of packages available for update, then ask for the user's confirmation -to proceed with the installation. -Before performing the update, offer to display the latest Arch Linux news. -Post update, check for orphan & unused packages, old cached packages, pacnew & pacsave files, -pending kernel update, as well as services requiring a post upgrade restart and, if there are, -offers to process them. - -Options: --c, --check Check for available updates, change the systray icon and send a desktop notification containing the number of available updates (if there are new available updates compared to the last check) --l, --list Display the list of pending updates --d, --devel Include AUR development packages updates --n, --news [Num] Display latest Arch News, you can optionally specify the number of Arch news to display with `--news [Num]` (e.g. `--news 10`) --D, --debug Display debug traces ---gen-config Generate a default / example `arch-update.conf` configuration file (see the arch-update.conf(5) man page for more details), you can optionally pass the `--force` argument to overwrite any existing `arch-update.conf` configuration file ---show-config Display the `arch-update.conf` configuration file currently used (if it exists) ---edit-config Edit the `arch-update.conf` configuration file currently used (if it exists) ---tray Launch the Arch-Update systray applet, you can optionally add the `--enable` argument to start it automatically at boot. --h, --help Display this help message and exit --V, --version Display version information and exit - -Exit Codes: -0 OK -1 Invalid option -2 No privilege elevation command (sudo, doas or run0) is installed or the one set in the `arch-update.conf` configuration file isn't found -3 Error when launching the Arch-Update systray applet -4 User didn't gave the confirmation to proceed -5 Error when updating the packages -6 Error when calling the reboot command to apply a pending kernel update -7 No pending update when using the `-l / --list` option -8 Error when generating a configuration file with the `--gen-config` option -9 Error when reading the configuration file with the `--show-config` option -10 Error when creating the autostart desktop file for the systray applet with the `--tray --enable` option -11 Error when restarting services that require a post upgrade restart -12 Error during the pacnew files processing -13 Error when editing the configuration file with the `--edit-config` option -14 Libraries directory not found -15 The diff prog editor set in the `arch-update.conf` configuration file isn't found -``` - -For more information, see the arch-update(1) man page. -Certain options can be enabled, disabled or modified via the arch-update.conf configuration file, see the arch-update.conf(5) man page. +See `arch-update --help` and the [arch-update(1) man page](https://github.com/Antiz96/arch-update/blob/main/doc/man/arch-update.1.scd). ### arch-update configuration file -```text -The arch-update.conf file is an optional configuration file for arch-update to enable, disable -or modify certain options within the script. - -This configuration file has to be located in "${XDG_CONFIG_HOME}/arch-update/arch-update.conf" -or "${HOME}/.config/arch-update/arch-update.conf". -A default / example configuration file can be generated by running: `arch-update --gen-config` - -The supported options are: - -- NoColor # Do not colorize output. -- NoVersion # Do not show versions changes for packages when listing pending updates (including when using the `-l / --list` option). -- NewsNum=[Num] # Number of Arch news to display before updating and with the `-n / --news` option (see the arch-update(1) man page for more details). Defaults to 5. -- AURHelper=[AUR Helper] # AUR helper to be used for AUR packages support. Valid values are `paru`, `yay` or `pikaur`. If this option is not set, Arch-Update will use the first available AUR helper in the following order: `paru` then `yay` then `pikaur` (in case none of them is installed, Arch-Update will not take AUR packages into account). -- PrivilegeElevationCommand=[Cmd] # Command to be used for privilege elevation. Valid values are `sudo`, `doas` or `run0`. If this option is not set, Arch-Update will use the first available command in the following order: `sudo`, `doas` then `run0`. -- KeepOldPackages=[Num] # Number of old packages' versions to keep in pacman's cache. Defaults to 3. -- KeepUninstalledPackages=[Num] # Number of uninstalled packages' versions to keep in pacman's cache. Defaults to 0. -- DiffProg=[Editor] # Editor to use to visualize / edit differences during the pacnew files processing. Defaults to the `$DIFFPROG` environment variable's value (or `vimdiff` if `$DIFFPROG` isn't set). -- TrayIconStyle=[Style / Color] # Style to be used for the systray applet icon. Valid values are the available style / color variants for the icon set, listed in https://github.com/Antiz96/arch-update/tree/main/res/icons. Defaults to "light". - -Options are case sensitive, so capital letters have to be respected. -``` - -For more information, see the arch-update.conf(5) man page. +See the [arch-update.conf(5) man page](https://github.com/Antiz96/arch-update/blob/main/doc/man/arch-update.conf.5.scd). ## Tips and tricks -### AUR support - -Arch-Update supports AUR packages if **paru**, **yay** or **pikaur** is installed: -See and -See and -See and - -### Flatpak support - -Arch-Update supports Flatpak packages if **flatpak** is installed: -See and - -### Desktop notifications support - -Arch-Update supports desktop notifications when performing the `--check` function if **libnotify** is installed (and a notification server is running): -See - ### The systray applet does not start at boot Make sure you followed instructions of [this chapter](#the-systray-applet). If the systray applet doesn't start regardless, this could be the result of a [race condition](https://en.wikipedia.org/wiki/Race_condition#In_software). -In such case, it might be useful to slightly delay the startup of the systray applet by using a `sleep` statement beforehand: +To prevent that, you can add a small delay to the systray applet startup using the `sleep` command: - If you used `arch-update --tray --enable`, modify the `Exec=` line in the `arch-update-tray.desktop` file (which is under `~/.config/autostart/` by default), like so: -> Exec=sh -c "sleep 3 && arch-update --tray" +```text +Exec=sh -c "sleep 3 && arch-update --tray" +``` - If you used the `arch-update-tray.service` systemd service, run `systemctl --user edit --full arch-update-tray.service` and modify the `ExecStart=` line, like so: -> ExecStart=sh -c "sleep 3 && arch-update --tray" +```text +ExecStart=sh -c "sleep 3 && arch-update --tray" +``` -- If you're using a standalone Window Manager or a Wayland Compositor, add a `sleep` statement before the `arch-update --tray` command in your "auto-start" apps in your configuration file, like so: +- If you're using a standalone Window Manager or a Wayland Compositor, modify the command in your "auto-start" apps / your configuration file, like so: -> `sleep 3 && arch-update --tray` +```text +sleep 3 && arch-update --tray +``` -If the systray applet still does not start at boot, try to gradually increase the value of the `sleep`. +If the systray applet still does not start at boot, try to gradually increase the `sleep` value. -### Modify the auto-check cycle +### Modify the check cycle -If you enabled the [systemd.timer](#the-systemd-timer), the `--check` option is automatically launched at boot and then once per hour. +If you enabled the [systemd timer](#the-systemd-timer), a check for available updates is automatically launched at boot and then once per hour. -If you want to change the check cycle, run `systemctl --user edit --full arch-update.timer` and modify the `OnUnitActiveSec` value to your liking. +If you want to customize the check cycle, run `systemctl --user edit --full arch-update.timer` and modify the `OnUnitActiveSec` value to your liking. For instance, if you want `Arch-Update` to check for new updates every 10 minutes instead: ```text @@ -310,24 +233,17 @@ See for more details. ## Contributing -Please, read the [contributing guidelines](https://github.com/Antiz96/arch-update/blob/main/CONTRIBUTING.md). +See the [contributing guidelines](https://github.com/Antiz96/arch-update/blob/main/CONTRIBUTING.md). ## License diff --git a/doc/man/arch-update.1 b/doc/man/arch-update.1 deleted file mode 100644 index 2585570..0000000 --- a/doc/man/arch-update.1 +++ /dev/null @@ -1,306 +0,0 @@ -.TH "ARCH-UPDATE" "1" "November 2024" "Arch-Update 3.5.0" "Arch-Update Manual" - -.SH NAME -arch-update \- An update notifier & applier for Arch Linux that assists you with important pre / post update tasks. - -.SH SYNOPSIS -.B arch-update -[\fI\,OPTION\/\fR] - -.SH DESCRIPTION -An update notifier & applier for Arch Linux that assists you with important pre / post update tasks and that includes a clickeable systray applet for an easy integration with any panel on any Desktop Environment / Window Manager. -.br -.RB "Optional support for AUR packages update (through " "paru" ", " "yay " "or " "pikaur" "), Flatpak packages update (through " "flatpak" ") and desktop notifications (through " "libnotify" ")." -.br -Arch-Update is designed to follow usual system maintenance steps, as described in the Arch Wiki at https://wiki.archlinux.org/title/System_maintenance. - -.SH OPTIONS -.PP -If no option is passed, launch the relevant series of functions to perform a complete and proper update starting by displaying the list of packages available for update, then ask for the user's confirmation to proceed with the installation. -.br -.RB "It also supports AUR packages update (if " "paru" ", " "yay " "or " "pikaur " "is installed) and Flatpak packages update (if " "flatpak " "is installed)." -.br -Before performing the update, it offers to display the latest Arch Linux news to the user. By default, Arch news are only displayed if at least a new one has been published since the last run. Arch news published since the last run or at the same date are tagged as '[NEW]'. -.br -Arch-Update also checks for orphan packages, unused Flatpak packages, old and / or uninstalled cached packages in pacman's cache, pacnew & pacsave files, pending kernel update requiring a reboot to be applied as well as services requiring a post upgrade restart and, if there are, offers to process them. -.br -Those functions are launched when you click on the systray applet. - -.PP - -.TP -.B \-c, \-\-check -Check for available updates. -.br -It changes the systray icon and sends a desktop notification containing the number of available updates (if there are new available updates compared to the last check). -.br -.RB "It supports AUR packages update (if " "paru" ", " "yay " "or " "pikaur " "is installed) and Flatpak packages update (if " "flatpak " "is installed)." -.br -.RB "The " "\-\-check " "option is automatically launched at boot and then every hour if you enabled the associated " "systemd.timer " "with the following command:" -.br -.B systemctl \-\-user enable \-\-now arch-update.timer - -.TP -.B \-l, \-\-list -Display the list of pending updates. - -.TP -.B \-d, \-\-devel -Include AUR development packages updates. - -.TP -.B \-n, \-\-news -Display latest Arch news. -.br -.RB "You can optionally specify how much Arch news to display as an argument, like so: " "arch-update --news 10" ". Defaults to 5." - -.TP -.B \-D, \-\-debug -Display debug traces. - -.TP -.B \-\-gen\-config -.RB "Generate a default / example " "arch-update.conf " "configuration file (see the " "arch-update.conf(5) " "man page for more details)." -.br -.RB "You can optionally pass the " "--force " "argument to overwrite any existing " "arch-update.conf " "configuration file." - -.TP -.B \-\-show\-config -.RB "Display the " "arch-update.conf " "configuration file currently used (if it exists)." - -.TP -.B \-\-edit\-config -.RB "Edit the " "arch-update.conf " "configuration file currently used (if it exists)." - -.TP -.B \-\-tray -Start the Arch-Update systray applet. -.br -.RB "To start it automatically at boot, you can either run the " "arch-update --tray --enable " "command (preferred method for most Desktop Environments, uses XDG Autostart) or enable the associated systemd service (in case your Desktop Environment doesn't support XDG Autostart) by running " "systemctl \-\-user enable \-\-now arch-update-tray.service". -.br -.RB "If you use a window manager or a Wayland compositor, you can add the " "arch-update --tray " "command to your auto-start apps in your configuration file instead." - -.TP -.B \-v, \-\-version -Display version information. - -.TP -.B \-h, \-\-help -Display the help message. - -.TP -.RB "Certain options can be enabled, disabled or modified via the " "arch-update.conf " "configuration file, see the " "arch-update.conf(5) " "man page." - -.SH USAGE -.TP -.B The systray applet -.RB "To start the systray applet, launch the " "Arch-Update Systray Applet " "application from your app menu." - -To start it automatically at boot, you can either: - -.RB "- Run the following command (preferred method for most Desktop Environments, uses XDG Autostart): " "arch-update \-\-tray \-\-enable" -.br -.RB "- Enable the associated systemd service (in case your Desktop Environment doesn't support XDG Autostart): " "systemctl \-\-user enable \-\-now arch-update-tray.service" - -.RB "If you use a Window Manager or a Wayland Compositor, you can add the " "arch-update \-\-tray " "command to your auto-start apps in your configuration file instead." - -.BR "If the systray applet doesn't start at boot regardless" ", please read the " "'The systray applet does not start at boot' " "chapter in the " "Tips and Tricks " "section below." - -.RB "The systray icon will automatically change depending on the current state of your system ('up to date' or 'updates available'). When clicked, it launches " "arch-update " "via the " "arch-update.desktop " file. - -.RB "The systray applet attempts to read the " "arch-update.desktop " "file at the below paths and in the following order:" - -\- $XDG_DATA_HOME/applications/arch-update.desktop -.br -\- $HOME/.local/share/applications/arch-update.desktop -.br -\- $XDG_DATA_DIRS/applications/arch-update.desktop -.br -\- /usr/local/share/applications/arch-update.desktop <-- Default installation path when installing Arch-Update from source -.br -\- /usr/share/applications/arch-update.desktop <-- Default installation path when installing Arch-Update from the AUR - -.RB "In case you want (or need) to customize the " "arch-update.desktop " "file, copy it in a path that has a higher priority than the default installation path and modify it there (to ensure that your custom " "arch-update.desktop " "file supersedes the default one and that your modifications are not being overwritten on updates)." - -.br -.RB "This can be useful to force the " "arch-update.desktop " "file to launch " "Arch-Update " "within a specific terminal emulator for instance." -.br -.BR "If clicking the systray applet does nothing" ", please read the " "'Force the desktop file to run with a specific terminal emulator' " "chapter in the " "Tips and Tricks " "section below." - -.TP -.B The systemd timer -.RB "There is a systemd service in " "/usr/lib/systemd/user/arch-update.service " "(or in " "/etc/systemd/user/arch-update.service " "if you installed arch-update from source) that executes the " "\-\-check " "function when launched. To start it automatically " "at boot and then once every hour " "enable the associated systemd timer (the auto-check cycle can be modified to your liking. See the TIPS AND TRICKS chapter below):" -.br -.B systemctl \-\-user enable \-\-now arch-update.timer - -.SH TIPS AND TRICKS -.TP -.B AUR Support -.RB "Arch-Update supports AUR packages update when checking and installing updates if " "paru" ", " "yay " "or " "pikaur " "is installed." -.br -See https://github.com/morganamilo/paru and https://aur.archlinux.org/packages/paru -.br -See https://github.com/Jguer/yay and https://aur.archlinux.org/packages/yay -.br -See https://github.com/actionless/pikaur and https://aur.archlinux.org/packages/pikaur - -.TP -.B Flatpak Support -.RB "Arch-Update supports Flatpak packages update when checking and installing updates (as well as removing unused Flatpak packages) if " "flatpak " "is installed." -.br -See https://www.flatpak.org/ and https://archlinux.org/packages/extra/x86_64/flatpak/ - -.TP -.B Desktop notifications Support -.RB "Arch-Update supports desktop notifications when performing the " "--check " "function if " "libnotify (notify-send) " "is installed." -.br -See https://wiki.archlinux.org/title/Desktop_notifications - -.TP -.B The systray applet does not start at boot -.RB "Make sure you followed instructions of the " "'The systray applet' " "chapter in the " "Usage " "section above." - -.RB "If the systray applet doesn't start regardless, this could be the result of a " "race condition". -.RB "In such case, it might be useful to slightly delay the startup of the systray applet by using a " "sleep " "statement beforehand:" - -.RB "\- If you used " "arch-update --tray --enable" ", modify the " "Exec= " "line in the " "arch-update-tray.desktop " "file (which is under " "~/.config/autostart/ " "by default), like so:" -.br -Exec=sh -c "sleep 3 && arch-update --tray" - -.RB "\- If you used the " "arch-update-tray.service " "systemd service, run " "systemctl --user edit --full arch-update-tray.service " "and modify the " "ExecStart= " "line, like so:" -.br -ExecStart=sh -c "sleep 3 && arch-update --tray" - -.RB "\- If you're using a standalone Window Manager or a Wayland Compositor, add a " "sleep " "statement before the " "arch-update --tray " "command in your auto-start apps in your configuration file, like so:" -.br -sleep 3 && arch-update --tray - -.RB "If the systray applet still does not start at boot, try to gradually increase the value of the " "sleep". - -.TP -.B Modify the auto-check cycle -.RB "If you enabled the " "systemd.timer" ", the " "--check " "option is automatically launched at boot and then once per hour." -.br -.RB "If you want to change the check cycle, run " "systemctl --user edit --full arch-update.timer " "and modify the " "OnUnitActiveSec " "value to your liking." -.br -.RB "For instance, if you want " "Arch-Update " "to check for new updates every 10 minutes instead:" -.br - -[...] -.br -[Timer] -.br -OnStartupSec=15 -.br -.RB "OnUnitActiveSec=" "10m" -.br -[...] - -.br -.RB "Time units are " "s " "for seconds, " "m " "for minutes, " "h " "for hours, " "d " "for days..." -.br -See https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans for more details. -.br - -.RB "In case you want " "Arch-Update " "to check for new updates only once at boot, you can simple delete the " "OnUnitActiveSec " "line completely." - -.TP -.B Force the desktop file to run with a specific terminal emulator -.BR "gio " "(which is used to launch the " "arch-update.desktop " "file when the systray applet is clicked) currently supports a limited list of terminal emulators (see https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2701). -.br -.RB "If you don't have any of these terminal emulators installed on your system, you might face an issue where clicking the systray applet does nothing and reports the following error: " "[...] Unable to find terminal required for application". - -.br -.RB "While waiting for Gnome to implement a way to allow people using their terminal emulator of choice with " "gio" ", you can workaround this issue by copying the " "arch-update.desktop " "file to " "$HOME/.local/share/applications/arch-update.desktop " "(for instance, see " "'The systray applet' " "chapter for more details) and modifying the " "Exec " "line in it to 'force' " "arch-update " "to run with your terminal emulator of choice." -.br -.RB "For instance, with " "alacritty " "(check your terminal emulator's manual to find the correct option to use):" - -.br -[...] -.br -.RB "Exec=" "alacritty -e " "arch-update" - -.br -.RB "Alternatively, you can create a symlink for your terminal emulator that points to " "/usr/bin/xterm" ", which is the fallback option for " "gio " "(for instance, with " "alacritty" ": " "sudo ln -s /usr/bin/alacritty /usr/bin/xterm" ") or you can simply install one of the terminal emulators supported by " "gio " "(see https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2701)." - -.SH EXIT STATUS -.TP -.B 0 -OK - -.TP -.B 1 -Invalid option - -.TP -.B 2 -No privilege elevation command (sudo, doas or run0) is installed or the one set in the arch-update.conf configuration file isn't found - -.TP -.B 3 -Error when launching the Arch-Update systray applet - -.TP -.B 4 -User didn't gave the confirmation to proceed - -.TP -.B 5 -Error when updating the packages - -.TP -.B 6 -Error when calling the reboot command to apply a pending kernel update - -.TP -.B 7 -.RB "No pending update when using the " "-l / --list " "option" - -.TP -.B 8 -.RB "Error when generating a configuration file with the " "--gen-config " "option" - -.TP -.B 9 -.RB "Error when reading the configuration file with the " "--show-config " "option" - -.TP -.B 10 -.RB "Error when creating the autostart desktop file for the systray applet with the " "--tray --enable " "option" - -.TP -.B 11 -Error when restarting services that require a post upgrade restart - -.TP -.B 12 - Error during the pacnew files processing - -.TP -.B 13 -.RB "Error when editing the configuration file with the " "--edit-config " "option" - -.TP -.B 14 -Libraries directory not found - -.TP -.B 15 -The diff prog editor set in the arch-update.conf configuration file isn't found - -.SH SEE ALSO -.BR checkupdates (8), -.BR pacman (8), -.BR pacdiff (8), -.BR paccache (8), -.BR paru (8), -.BR yay (8), -.BR pikaur (1), -.BR flatpak (1), -.BR arch-update.conf (5) - -.SH BUGS -Please report bugs to the GitHub page: https://github.com/Antiz96/arch-update/issues - -.SH AUTHOR -Robin Candau diff --git a/doc/man/arch-update.1.scd b/doc/man/arch-update.1.scd new file mode 100644 index 0000000..729bdbf --- /dev/null +++ b/doc/man/arch-update.1.scd @@ -0,0 +1,254 @@ +arch-update(1) ["Arch-Update 3.6.0" ["Arch-Update Manual"]] + +# NAME + +Arch-Update - An update notifier & applier for Arch Linux that assists you with important pre / post update tasks. + +# SYNOPSIS + +*arch-update* [OPTION] + +# DESCRIPTION + +An update notifier & applier for Arch Linux that assists you with important pre / post update tasks. +Includes a dynamic & clickeable systray applet for an easy integration with any Desktop Environment / Window Manager. + +Arch-Update is designed to follow usual system maintenance steps, as described in the Arch Wiki at https://wiki.archlinux.org/title/System_maintenance. + +Features: + +- Automatic check and listing of available updates. +- Check for recent Arch Linux news (and offers to display them if there are). +- Check for orphan packages (and offers to remove them if there are). +- Check for old & uninstalled packages in cache (and offers to remove them if there are). +- Check for pacnew & pacsave files (and offers to process them if there are). +- Check for pending kernel update requiring a reboot (and offers to do so if there's one). +- Check for services requiring a post upgrade restart (and offers to do so if there are). +- Support for `sudo`, `doas` & `run0`. + +Optional support for: + +- AUR packages (via `paru`, `yay` or `pikaur`). +- Flatpak packages (via `flatpak`). +- Desktop notifications (via `libnotify`). + +# OPTIONS + +If no option is passed, launch the relevant series of functions to perform a complete and proper system update (can also be triggered by clicking the systray applet). + +*-c, --check* + Check for available updates. If there are, send a desktop notification and update the systray icon. + To run the `--check` option automatically and periodically, see the *"The systemd timer"* chapter in the *"USAGE"* section below. + +*-l, --list* + Display the list of pending updates. + +*d, --devel* + Include AUR development packages updates. + +*-n, --news* + Display latest Arch news. + You can optionally specify how much Arch news to display as an argument, like so: `arch-update --news 10`. Defaults to 5. + +*-D, --debug* + Display debug traces. + +*--gen-config* + Generate a default / example `arch-update.conf` configuration file (see the *arch-update.conf*(5) man page for more details). + You can optionally pass the `--force` argument to overwrite any existing `arch-update.conf` configuration file. + +*--show-config* + Display the content of the `arch-update.conf` configuration file (if it exists). + +*--edit-config* + Edit the `arch-update.conf` configuration file (if it exists). + +*--tray* + Start the Arch-Update systray applet. + To start it automatically at boot, see the *"The systray applet"* chapter in the *"USAGE"* section below. + +*-V, --version* + Display version information. + +*-h, --help* + Display the help message. + +Certain options can be enabled, disabled or modified via the `arch-update.conf` configuration file, see the *arch-update.conf*(5) man page for more details. + +# USAGE + +The usage consist of starting the systray applet and enabling the systemd timer. + +## The systray applet + +To start the systray applet, launch the *Arch-Update Systray Applet* application from your app menu. + +To start it automatically at boot, you can either: + +- Run the following command (preferred method for most Desktop Environments, uses XDG Autostart): + +``` +arch-update --tray --enable +``` + +- Enable the associated systemd service (in case your Desktop Environment doesn't support XDG Autostart): + +``` +systemctl --user enable --now arch-update-tray.service +``` + +- Add the following command to your "auto-start" apps / configuration file (in case you use a Window Manager or a Wayland Compositor): + +``` +arch-update --tray +``` + +*If the systray applet doesn't start at boot regardless*, please read the *"The systray applet does not start at boot"* chapter in the *"TIPS AND TRICKS"* section below. + +The systray icon dynamically changes to indicate the current state of your system ("up to date" or "updates available"). When clicked, it launches `arch-update` in a terminal window via the `arch-update.desktop` file. + +*If clicking the systray applet does nothing*, please read the *"Run Arch-Update in a specific terminal emulator"* chapter in the *"TIPS AND TRICKS"* section below. + +## The systemd timer + +To perform automatic and periodic checks for available updates, enable the associated systemd timer: + +``` +systemctl --user enable --now arch-update.timer +``` + +By default, a check is performed at *boot and then once every hour*. The check cycle can be customized, see the *"Modify the check cycle"* chapter in the *"TIPS AND TRICKS"* section below. + +# TIPS AND TRICKS + +## The systray applet does not start at boot + +Make sure you followed instructions of the *"The systray applet"* chapter in the *"USAGE"* section above. + +If the systray applet doesn't start regardless, this could be the result of a *race condition*. +To prevent that, you can add a small delay to the systray applet startup using the `sleep` command: + +- If you used `arch-update --tray --enable`, modify the `Exec=` line in the `arch-update-tray.desktop` file (which is under `~/.config/autostart/` by default), like so: + +``` +[...] +Exec=sh -c "sleep 3 && arch-update --tray" +[...] +``` + +- If you used the `arch-update-tray.service` systemd service, run `systemctl --user edit --full arch-update-tray.service` and modify the `ExecStart=` line, like so: + +``` +[...] +ExecStart=sh -c "sleep 3 && arch-update --tray" +[...] +``` + +- If you're using a standalone Window Manager or a Wayland Compositor, modify the command in your "auto-start" apps / your configuration file, like so: + +``` +[...] +sleep 3 && arch-update --tray +[...] +``` + +If the systray applet still does not start at boot, try to gradually increase the `sleep` value. + +## Modify the check cycle + +If you enabled the systemd timer, a check for available updates is automatically launched at boot and then once per hour. + +If you want to customize the check cycle, run `systemctl --user edit --full arch-update.timer` and modify the `OnUnitActiveSec` value to your liking. +For instance, if you want `Arch-Update` to check for new updates every 10 minutes instead: + +``` +[...] +[Timer] +OnStartupSec=15 +OnUnitActiveSec=10m +[...] +``` + +Time units are *s* for seconds, *m* for minutes, *h* for hours, *d* for days... +See https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans for more details. + +In case you want `Arch-Update` to check for new updates only once at boot, you can simply delete the `OnUnitActiveSec` line completely. + +## Run Arch-Update in a specific terminal emulator + +"gio" (used to launch the `arch-update` terminal application via the `arch-update.desktop` file when the systray applet is clicked) currently has a default limited list of known terminal emulators. +As such, if you don't have any of these "known" terminal emulators installed on your system, you might face an issue where clicking the systray applet does nothing (as `gio` couldn't find a terminal emulator from the said list). Incidentally, you might have multiple terminal emulators installed on your system. In both cases, you can specify which terminal emulator to use. + +To do so, install the `xdg-terminal-exec` AUR package (https://aur.archlinux.org/packages/xdg-terminal-exec), create the `~/.config/xdg-terminals.list` file and add the name of the `.desktop` file of your terminal emulator of choice in it (e.g. `Alacritty.desktop`). + +See https://github.com/Vladimir-csp/xdg-terminal-exec?tab=readme-ov-file#configuration for more details. + +# EXIT STATUS + +*0* + OK. + +*1* + Invalid option. + +*2* + No privilege elevation command (`sudo`, `doas` or `run0`) is installed or the one set in the `arch-update.conf` configuration file isn't found. + +*3* + Error when launching the Arch-Update systray applet. + +*4* + User didn't gave the confirmation to proceed. + +*5* + Error when updating packages. + +*6* + Error when calling the reboot command to apply a pending kernel update. + +*7* + No pending update when using the `-l / --list` option. + +*8* + Error when generating a configuration file with the `--gen-config` option. + +*9* + Error when reading the configuration file with the `--show-config` option. + +*10* + Error when creating the autostart desktop file for the systray applet with the `--tray --enable` option. + +*11* + Error when restarting services that require a post upgrade restart. + +*12* + Error during the pacnew files processing. + +*13* + Error when editing the configuration file with the `--edit-config` option. + +*14* + Libraries directory not found. + +*15* + The "diff prog" editor set in the `arch-update.conf` configuration file isn't found. + +# SEE ALSO + +*checkupdates*(8), +*pacman*(8), +*pacdiff*(8), +*paccache*(8), +*paru*(8), +*yay*(8), +*pikaur*(1), +*flatpak*(1), +*arch-update.conf*(5) + +# BUGS + +Please report bugs to the GitHub page: https://github.com/Antiz96/arch-update/issues + +# AUTHOR + +Robin Candau diff --git a/doc/man/arch-update.conf.5 b/doc/man/arch-update.conf.5 deleted file mode 100644 index c87a31d..0000000 --- a/doc/man/arch-update.conf.5 +++ /dev/null @@ -1,65 +0,0 @@ -.TH "ARCH-UPDATE.CONF" "5" "November 2024" "Arch-Update 3.5.0" "Arch-Update Manual" - -.SH NAME -arch-update.conf \- arch-update configuration file. - -.SH SYNOPSIS -$XDG_CONFIG_HOME/arch-update/arch-update.conf, $HOME/.config/arch-update/arch-update.conf - -.SH DESCRIPTION -.RI "Arch-Update's " "optional " "configuration file." - -.RB "Arch-Update first attempts to read the file at " "$XDG_CONFIG_HOME/arch-update/arch-update.conf " "then at " "$HOME/.config/arch-update/arch-update.conf " "if " "$XDG_CONFIG_HOME " "is not set, or the file doesn't exist." -.br -.RB "A default / example configuration file can be generated by running: " "arch-update --gen-config" - -.SH OPTIONS -.PP -Options are case sensitive, so capital letters have to be respected. - -.PP - -.TP -.B NoColor -Do not colorize output. - -.TP -.B NoVersion -.RB "Do not show versions changes for packages when listing pending updates (including when using the " "-l / --list " "option, see the " "arch-update(1) " "man page for more details)." - -.TP -.B NewsNum=[Num] -.RB "Number of Arch news to display before updating and with the " "-n / --news " "option (see the " "arch-update(1) " "man page for more details). Defaults to 5." - -.TP -.B AURHelper=[AUR Helper] -AUR helper to be used for AUR packages support. Valid values are paru, yay or pikaur. If this option is not set, Arch-Update will use the first installed AUR helper in the following order: paru then yay then pikaur (in case none of them is installed, Arch-Update will not take AUR packages into account). - -.TP -.B PrivilegeElevationCommand=[Cmd] -Command to be used for privilege elevation. Valid values are sudo, doas or run0. If this option is not set, Arch-Update will use the first available command in the following order: sudo, doas then run0. - -.TP -.B KeepOldPackages=[Num] -Number of old packages' versions to keep in pacman's cache. Defaults to 3. - -.TP -.B KeepUninstalledPackages=[Num] -Number of uninstalled packages' versions to keep in pacman's cache. Defaults to 0. - -.TP -.B DiffProg=[Editor] -.RB "Editor to use to visualize / edit differences during the pacnew files processing. Defaults to the " "$DIFFPROG " "environment variable's value (or " "vimdiff " "if " "$DIFFPROG " "isn't set)." - -.TP -.B TrayIconStyle=[Style / Color] -Style to be used for the systray applet icon. Valid values are the available style / color variants for the icon set, listed in https://github.com/Antiz96/arch-update/tree/main/res/icons. Defaults to "light". - -.SH SEE ALSO -.BR arch-update (1) - -.SH BUGS -Please report bugs to the GitHub page: https://github.com/Antiz96/arch-update/issues - -.SH AUTHOR -Robin Candau diff --git a/doc/man/arch-update.conf.5.scd b/doc/man/arch-update.conf.5.scd new file mode 100644 index 0000000..df2096e --- /dev/null +++ b/doc/man/arch-update.conf.5.scd @@ -0,0 +1,63 @@ +arch-update.conf(5) ["Arch-Update 3.6.0" ["Arch-Update Manual"]] + +# NAME + +arch-update.conf - Arch-Update configuration file. + +# SYNOPSIS + +*$XDG_CONFIG_HOME/arch-update/arch-update.conf*, *$HOME/.config/arch-update/arch-update.conf* + +# DESCRIPTION + +Arch-Update's _optional_ configuration file. + +Arch-Update first attempts to read the file at `$XDG_CONFIG_HOME/arch-update/arch-update.conf` then at `$HOME/.config/arch-update/arch-update.conf` if `$XDG_CONFIG_HOME` is not set, or the file doesn't exist. + +A default / example configuration file can be generated by running: `arch-update --gen-config` + +# OPTIONS + +Options are case sensitive, so capital letters have to be respected. + +*NoColor* + Do not colorize output. + +*NoVersion* + Do not show versions changes for packages when listing pending updates (including when using the `-l / --list` option, see the *arch-update*(1) man page for more details). + +*NoNotification* + Do not send desktop notifications. + +*NewsNum=[Num]* + Number of Arch news to display before updating and with the `-n / --news` option (see the *arch-update*(1) man page for more details). Defaults to 5. + +*AURHelper=[AUR Helper]* + AUR helper to be used for AUR packages support. Valid values are `paru`, `yay` or `pikaur`. If this option is not set, Arch-Update will use the first AUR helper available in the following order: `paru` then `yay` then `pikaur` (in case none of them is installed, Arch-Update will not take AUR packages into account). + +*PrivilegeElevationCommand=[Cmd]* + Command to be used for privilege elevation. Valid values are `sudo`, `doas` or `run0`. If this option is not set, Arch-Update will use the first command available in the following order: `sudo`, `doas` then `run0`. + +*KeepOldPackages=[Num]* + Number of old packages' versions to keep in pacman's cache. Defaults to 3. + +*KeepUninstalledPackages=[Num]* + Number of uninstalled packages' versions to keep in pacman's cache. Defaults to 0. + +*DiffProg=[Editor]* + Editor to use to visualize / edit differences during the pacnew files processing. Defaults to the `$DIFFPROG` environment variable's value (or `vimdiff` if `$DIFFPROG` isn't set). + +*TrayIconStyle=[Style / Color]* + Style to be used for the systray applet icon. Valid values are the available style / color variants for the icon set, listed in https://github.com/Antiz96/arch-update/blob/main/res/icons/README.md. Defaults to "light". + +# SEE ALSO + +*arch-update*(1) + +# BUGS + +Please report bugs to the GitHub page: https://github.com/Antiz96/arch-update/issues + +# AUTHOR + +Robin Candau diff --git a/doc/man/fr/arch-update.1 b/doc/man/fr/arch-update.1 deleted file mode 100644 index c0f39f0..0000000 --- a/doc/man/fr/arch-update.1 +++ /dev/null @@ -1,307 +0,0 @@ -.TH "ARCH-UPDATE" "1" "Novembre 2024" "Arch-Update 3.5.0" "Manuel de Arch-Update" - -.SH NAME -arch-update \- Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour. - -.SH SYNOPSIS -.B arch-update -[\fI\,OPTION\/\fR] - -.SH DESCRIPTION -Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour et qui inclut une applet systray cliquable pour une intégration facile avec n'importe quel panneau sur n'importe quel environnement de bureau ou gestionnaire de fenêtres. -.br -.RB "Prise en charge optionnelle des mises à jour des paquets AUR (via " "paru" ", " "yay " "ou " "pikaur" "), des mises à jour des paquets Flatpak (via " "flatpak" ") et des notifications de bureau (via " "libnotify" ")." -.br -Arch-Update est conçu pour suivre les étapes usuelles de maintenance du système, telles que décrites dans le Arch Wiki à https://wiki.archlinux.org/title/System_maintenance. - -.SH OPTIONS -.PP -Si aucune option n'est passée, lance la série de fonctions adéquates pour effectuer une mise à jour complète et correcte, en commençant par afficher la liste des paquets disponibles pour la mise à jour et en demandant la confirmation de l'utilisateur pour procéder à l'installation. -.br -.RB "Supporte les mises à jour des paquets AUR (si " "paru" ", " "yay " "ou " "pikaur " "est installé) et des paquets Flatpak (si " "flatpak " "est installé)." -.br -Avant d'effectuer la mise à jour, propose d'afficher les dernières Arch news à l'utilisateur. Par défaut, les Arch news sont seulement affichées si au moins une nouvelle news a été publiée depuis la dernière exécution. Les Arch news publiées depuis la dernière exécution ou à la même date sont étiquetées comme '[NOUVEAU]'. -.br -Arch-Update vérifie aussi la présence de paquets orphelins & inutilisés, d'anciens paquets mis en cache, de fichiers pacnew & pacsave, les mises à jour du noyau en attente ainsi que les services nécessitant un redémarrage après mise à jour et, s'il y en a, propose de les traiter. -.br -Ces fonctions sont lancées quand vous cliquez sur l'applet systray. - -.PP - -.TP -.B \-c, \-\-check -Vérifier les mises à jour disponibles. -.br -Change l'icône du systray et envoie une notification de bureau contenant le nombre de mises à jour disponibles (s'il y a des nouvelles mises à jour disponibles depuis le dernier check). -.br -.RB "Supporte les mises à jour des paquets AUR (si " "paru" ", " "yay " "ou " "pikaur " "est installé) et les mises à jour des paquets Flatpak (si " "flatpak " "est installé)." -.br -.RB "L'option " "\-\-check " "est automatiquement lancée au démarrage du système puis une fois chaque heure si vous avez activé le " "systemd.timer " "associé avec la commande suivante :" -.br -.B systemctl \-\-user enable \-\-now arch-update.timer - -.TP -.B \-l, \-\-list -Afficher la liste des mises à jour en attente. - -.TP -.B \-d, \-\-devel -Inclure les mises à jour des paquets de développement AUR. - -.TP -.B \-n, \-\-news -Afficher les dernières Arch news. -.br -.RB "Vous pouvez optionnellement spécifier combien de Arch news afficher en tant qu'argument, comme ceci : " "arch-update --news 10" ". La valeur par défaut est 5." - -.TP -.B \-D, \-\-debug -Afficher les traces de débogage. - -.TP -.B \-\-gen\-config -.RB "Générer un fichier de configuration " "arch-update.conf " "par défaut / exemple (voir la page de manuel " "arch-update.conf(5) " "pour plus de détails)." -.br -.RB "Vous pouvez optionnellement passer l'argument " "--force " "pour écraser un fichier de configuration " "arch-update.conf " "existant." - -.TP -.B \-\-show\-config -.RB "Afficher le fichier de configuration " "arch-update.conf " "actuellement utilisé (s'il existe)." - -.TP -.B \-\-edit\-config -.RB "Editer le fichier de configuration " "arch-update.conf " "actuellement utilisé (s'il existe)." - -.TP -.B \-\-tray -Démarrer l'applet systray d'Arch-Update. -.br -.RB "Pour la démarrer automatiquement au démarrage du système, vous pouvez soit exécuter la commande " "arch-update --tray --enable " "(méthode recommandée pour la plupart des environnements de bureau, utilise XDG Autostart) ou vous pouvez activer le service systemd associé (dans le cas où vôtre environnement de bureau ne supporte pas XDG Autostart) en exécutant " "systemctl \-\-user enable \-\-now arch-update-tray.service". -.br -.RB "Si vous utilisez un gestionnaire de fenêtres ou un compositeur Wayland, vous pouvez plutôt ajouter la commande " "arch-update --tray " "à vos applications auto-start dans votre fichier de configuration." - -.TP -.B \-v, \-\-version -Afficher les informations de version. - -.TP -.B \-h, \-\-help -Afficher le message d'aide. - -.TP -.RB "Certaines options peuvent être activées, désactivées ou modifiées via le fichier de configuration " "arch-update.conf " ", voir la page de manuel " "arch-update.conf(5)". - -.SH UTILISATION -.TP -.B L'applet systray -.RB "Pour démarrer l'applet systray, lancez l'application " "Arch-Update Systray Applet " "depuis votre menu d'application." - -Pour la démarrer automatiquement au démarrage du système, utilisez l'une des options suivantes : - -.RB "- Lancer la commande suivante (méthode recommandée pour la plupart des environnements de bureau, utilise XDG Autostart) : " "arch-update \-\-tray \-\-enable" -.br -.RB "- Activer le service systemd associé (dans le cas où votre environnement de bureau ne supporte pas XDG Autostart) : " "systemctl \-\-user enable \-\-now arch-update-tray.service" - -.RB "Si vous utilisez un gestionnaire de fenêtre ou un compositeur Wayland, vous pouvez plutôt ajouter la commande " "arch-update \-\-tray " "à vos applications auto-start dans votre fichier de configuration." - -.BR "Si l'applet systray ne démarre pas au démarrage du système malgré tout" ", veuillez lire le chapitre " "'l'applet systray ne démarre pas au démarrage du système' " "dans la section " "Trucs et Astuces " "ci-dessous." - -.RB "L'icône du systray changera automatiquement en fonction de l'état actuel de votre système ('à jour' ou 'mises à jour disponibles'). Lorsque vous cliquez dessus, elle lance " "arch-update " "via le fichier " "arch-update.desktop". - -.RB "L'applet systray essaie de lire le fichier " "arch-update.desktop " "dans les chemins ci-dessous avec l'ordre suivant :" - -\- $XDG_DATA_HOME/applications/arch-update.desktop -.br -\- $HOME/.local/share/applications/arch-update.desktop -.br -\- $XDG_DATA_DIRS/applications/arch-update.desktop -.br -\- /usr/local/share/applications/arch-update.desktop <-- Chemin d'installation par défaut lorsque vous installez Arch-Update depuis la source -.br -\- /usr/share/applications/arch-update.desktop <-- Chemin d'installation par défaut lorsque vous installez Arch-Update depuis le AUR - -.RB "Dans le cas où vous avez envie (ou besoin) de personnaliser le fichier " "arch-update.desktop" ", copiez le dans un chemin qui a une priorité plus élevée que le chemin d'installation par défaut et modifier le ici (afin d'assurer que votre ficher " "arch-update.desktop " "personnalisé remplace celui par défaut et que vos modifications ne soient pas écrasées à chaque mise à jour)." - -.br -.RB "Cela peut être utile pour forcer le fichier " "arch-update.desktop " "à lancer " "Arch-Update " "dans un émulateur de terminal spécifique par exemple." -.br -.BR "Si cliquer sur l'applet systray ne fait rien" ", veuillez lire le chapitre " "'Forcer le fichier desktop à se lancer avec un émulateur de terminal spécifique' " "dans la section " "Trucs et Astuces " "ci-dessous." - -.TP -.B Le timer systemd -.RB "Il existe un service systemd dans " "/usr/lib/systemd/user/arch-update.service " "(ou dans " "/etc/systemd/user/arch-update.service " "si vous avez installé arch-update depuis la source) qui exécute la fonction " "\-\-check " "quand il est démarré. Pour le démarrer automatiquement " "au démarrage du système puis une fois toutes les heures, " "activez le timer systemd associé (vous pouvez modifier le cycle de vérification automatique à votre guise, voir le chapitre TRUCS ET ASTUCES ci-dessous) :" -.br -.B systemctl \-\-user enable \-\-now arch-update.timer - -.SH TRUCS ET ASTUCES -.TP -.B Prise en charge du AUR -.RB "Arch-Update prend en charge la mise à jour des paquets AUR lors de la vérification et de l'installation des mises à jour si " "paru" ", " "yay " "ou " "pikaur " "est installé." -.br -Voir https://github.com/morganamilo/paru et https://aur.archlinux.org/packages/paru -.br -Voir https://github.com/Jguer/yay et https://aur.archlinux.org/packages/yay -.br -Voir https://github.com/actionless/pikaur et https://aur.archlinux.org/packages/pikaur - -.TP -.B Prise en charge de Flatpak -.RB "Arch-Update prend en charge la mise à jour des paquets Flatpak lors de la vérification et de l'installation des mises à jour (ainsi que de la suppression des paquets Flatpak inutilisés) si " "flatpak " "est installé." -.br -Voir https://www.flatpak.org/ et https://archlinux.org/packages/extra/x86_64/flatpak/ - -.TP -.B Notifications de bureau -.RB "Arch-Update prend en charge les notifications de bureau lors de l'exécution de la fonction " "--check " "si " "libnotify (notify-send) " "est installé." -.br -Voir https://wiki.archlinux.org/title/Desktop_notifications - -.TP -.B L'applet systray ne démarre pas au démarrage du système - -.RB "Assurez vous d'avoir suivi les instructions du chapitre " "l'applet systray " "dans la section " "Utilisation " "ci-dessus." - -.RB "Si l'applet systray ne démarre pas malgré tout, cela peut être le résultat d'une " "situation de compétition". -.RB "Dans ce cas, il peut être utile de légèrement retarder le démarrage de l'applet systray en utilisant une déclaration " "sleep " "au préalable :" - -.RB "\- Si vous avez utilisé " "arch-update --tray --enable" ", modifiez la ligne " "Exec= " "dans le fichier " "arch-update-tray.desktop " "(qui se trouve sous " "~/.config/autostart/ " "par défaut), comme ceci :" -.br -Exec=sh -c "sleep 3 && arch-update --tray" - -.RB "\- Si vous avez utilisé le service systemd " "arch-update-tray.service" ", exécutez " "systemctl --user edit --full arch-update-tray.service " "et modifiez la ligne " "ExecStart=" ", comme ceci :" -.br -ExecStart=sh -c "sleep 3 && arch-update --tray" - -.RB "\- Si vous utilisez un gestionnaire de fenêtres ou un compositeur Wayland, ajoutez une déclaration " "sleep " "avant la commande " "arch-update --tray " "à vos applications auto-start dans votre fichier de configuration, comme ceci :" -.br -"sleep 3 && arch-update --tray" - -.RB "Si l'applet systray ne démarre toujours au démarrage du système, essayez de graduellement augmenter la valeur du " "sleep". - -.TP -.B Modifier le cycle de vérification automatique -.RB "Si vous avez activé le " "systemd.timer" ", l'option " "--check " "est automatiquement lancée au démarrage du système puis une fois par heure." -.br -.RB "Si vous souhaitez modifier le cycle de vérification, exécutez la commande " "systemctl --user edit --full arch-update.timer " "et modifiez la valeur " "OnUnitActiveSec " "à votre convenance." -.br -.RB "Par exemple, si vous voulez qu'" "Arch-Update " "vérifie plutôt les mises à jour toutes les 10 minutes :" -.br - -[...] -.br -[Timer] -.br -OnStartupSec=15 -.br -.RB "OnUnitActiveSec=" "10m" -.br -[...] - -.br -.RB "Les unités de temps sont " "s " "pour secondes, " "m " "pour minutes, " "h " "pour heures, " "d " "pour jours..." -.br -Voir https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans pour plus de détails. -.br - -.RB "Dans le cas où vous voulez qu'" "Arch-Update " "ne vérifie les nouvelles mises à jour qu'une fois au démarrage du système, vous pouvez simplement supprimer la ligne " "OnUnitActiveSec " "complètement." - -.TP -.B Forcer le fichier desktop à se lancer avec un émulateur de terminal spécifique -.BR "gio " "(qui est utilisé pour lancer le fichier " "arch-update.desktop " "quand l'applet systray est cliquée) ne supporte actuellement qu'une liste limitée d'émulateurs de terminal (voir https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2701)." -.br -.RB "Si vous n'avez aucun de ces émulateurs de terminal installé sur votre système, il se peut que vous soyez confronté à un problème où cliquer sur l'applet systray ne fait rien et rapporte l'erreur suivante : " "[...] Unable to find terminal required for application". - -.br -.RB "En attendant que Gnome implémente une méthode permettant aux utilisateurs d'utiliser l'émulateur de terminal de leur choix avec " "gio" ",vous pouvez contourner le problème en copiant le fichier " "arch-update.desktop " "dans " "$HOME/.local/share/applications/arch-update.desktop " "(par exemple, voir le chapitre " "'L'applet systray' " "pour plus de détails) et en modifiant la ligne " "Exec " "pour 'forcer' " "arch-update " "à s'exécuter dans l'émulateur de terminal de votre choix." -.br -.RB "Par exemple, avec " "alacritty " "(vérifier le manuel de votre émulateur de terminal pour trouver la bonne option à utiliser) :" - -.br -[...] -.br -.RB "Exec=" "alacritty -e " "arch-update" - -.br -.RB "Alternativement, vous pouvez créer un lien symbolique de votre émulateur de terminal pointant vers " "/usr/bin/xterm" ", qui est l'option de 'secours' pour " "gio " "(par exemple, avec " "alacritty" ": " "sudo ln -s /usr/bin/alacritty /usr/bin/xterm" ") ou vous pouvez simplement installer un des émulateurs de terminal supportés par " "gio " "(voir https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2701)." - -.SH EXIT STATUS -.TP -.B 0 -OK - -.TP -.B 1 -Option invalide - -.TP -.B 2 -Aucune commande d'élévation de privilège (sudo, doas ou run0) n'est installée ou celle définie dans le fichier de configuration arch-update.conf n'est pas disponible - -.TP -.B 3 -Erreur lors du lancement de l'applet systray d'Arch-update - -.TP -.B 4 -L'utilisateur n'a pas donné la confirmation de procéder - -.TP -.B 5 -Erreur lors de la mise à jour des paquets - -.TP -.B 6 -Erreur lors de l'appel de la commande reboot pour appliquer une mise à jour du noyau en attente - -.TP -.B 7 -.RB "Aucune mise à jour en attente durant l'utilisation de l'option " "-l/--list" - -.TP -.B 8 -.RB "Erreur lors de la génération d'un fichier de configuration avec l'option " "--gen-config" - -.TP -.B 9 -.RB "Erreur lors de la lecture du fichier de configuration avec l'option " "--show-config" - -.TP -.B 10 -.RB "Erreur lors de la création du fichier desktop autostart pour l'applet systray avec l'option " "--tray --enable" - -.TP -.B 11 -Erreur lors du redémarrage des services nécessitant un redémarrage après mise à jour - -.TP -.B 12 -Erreur lors du traitement des fichiers pacnew - -.TP -.B 13 -.RB "Erreur lors de l'édition du fichier de configuration avec l'option " "--edit-config" - -.TP -.B 14 -Le dossier de librairies n'a pas été trouvé - -.TP -.B 15 -L'éditeur "diff prog" défini dans le fichier de configuration arch-update.conf n'est pas disponible - -.SH VOIR AUSSI -.BR checkupdates (8), -.BR pacman (8), -.BR pacdiff (8), -.BR paccache (8), -.BR yay (8), -.BR paru (8), -.BR pikaur (1), -.BR flatpak (1), -.BR arch-update.conf (5) - -.SH BUGS -Signalez les bugs sur la page GitHub : https://github.com/Antiz96/arch-update/issues - -.SH AUTHOR -Robin Candau diff --git a/doc/man/fr/arch-update.1.scd b/doc/man/fr/arch-update.1.scd new file mode 100644 index 0000000..0928aaf --- /dev/null +++ b/doc/man/fr/arch-update.1.scd @@ -0,0 +1,254 @@ +arch-update(1) ["Arch-Update 3.6.0" ["Manuel de Arch-Update"]] + +# NOM + +Arch-Update - Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour. + +# SYNOPSIS + +*arch-update* [OPTION] + +# DESCRIPTION + +Un notificateur & applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant / après mise à jour. +Inclut une applet systray dynamique & cliquable pour une intégration facile avec n'importe quel environnement de bureau / gestionnaire de fenêtres. + +Arch-Update est conçu pour suivre les étapes usuelles de maintenance du système, telles que décrites dans le Arch Wiki à https://wiki.archlinux.org/title/System_maintenance. + +Fonctionnalités : + +- Vérification et listing automatiques des mises à jour disponibles. +- Vérification des Arch Linux news récentes (et propose de les afficher s'il y en a). +- Vérification des paquets orphelins (et propose de les supprimer s'il y en a). +- Vérification d'anciens paquets & paquets désinstallés dans le cache (et propose de les supprimer s'il y en a). +- Vérification des fichiers pacnew & pacsave (et propose de les traiters s'il y en a). +- Vérification des mises à jour du noyau en attente nécessitant un redémarrage (et propose de le faire s'il y en a une). +- Vérification des services nécessitant un redémarrage après mise à jour (et propose de le faire s'il y en a). +- Support de `sudo`, `doas` et `run0`. + +Support optionnel pour : + +- Les paquets AUR (via `paru`, `yay` ou `pikaur`). +- Les paquets Flatpak (via `flatpak`). +- Les notifications de bureau (via `libnotify`). + +# OPTIONS + +Si aucune option n'est passée, lance la série de fonctions adéquates pour effectuer une mise à jour complète et appropriée du système (peut également être déclenché en cliquant sur l'applet systray). + +*-c, --check* + Vérifier les mises à jour disponibles. S'il y en a, envoie une notification de bureau et met à jour l'icône de l'applet systray. + Pour exécuter l'option `--check` automatiquement et périodiquement, voir le chapitre *"Le timer systemd"* dans la section *"UTILISATION"* ci-dessous. + +*-l, --list* + Afficher la liste des mises à jour en attente. + +*-d, --devel* + Inclure les mises à jour des paquets de développement AUR. + +*-n, --news* + Afficher les dernières Arch news. + Vous pouvez optionnellement spécifier le nombre d'Arch news a afficher en tant qu'argument, comme ceci : `arch-update --news 10`. La valeur par défaut est 5. + +*-D, --debug* + Afficher les traces de débogage. + +*--gen-config* + Générer un fichier de configurationi `arch-update.conf` par défaut / exemple (voir la page de manuel *arch-update.conf*(5) pour plus de détails). + Vous pouvez optionnellement passer l'argument `--force` pour écraser un fichier de configuration `arch-update.conf` existant. + +*--show-config* + Afficher le contenu du fichier de configuration `arch-update.conf` (s'il existe). + +*--edit-config* + Editer le fichier de configuration `arch-update.conf` (s'il existe). + +*--tray* + Démarrer l'applet systray d'Arch-Update. + Pour la démarrer automatiquement au démarrage du système, voir le chapitre *"L'applet systray"* dans la section *"UTILISATION"* ci dessous. + +*-V, --version* + Afficher les informations de version. + +*-h, --help* + Afficher le message d'aide. + +Certaines options peuvent être activées, désactivées ou modifiées via le fichier de configuration `arch-update.conf`, voir la page de manuel *arch-update.conf*(5) pour plus de détails. + +# UTILISATION + +L'utilisation consiste à démarrer l'applet systray et à activer le timer systemd. + +## L'applet systray + +Pour démarrer l'applet systray, lancez l'application *Arch-Update Systray Applet* depuis votre menu d'application. + +Pour la démarrer automatiquement au démarrage du système, utilisez l'une des options suivantes : + +- Lancer la commande suivante (méthode recommandée pour la plupart des environnements de bureau, utilise XDG Autostart) : + +``` +arch-update --tray --enable +``` + +- Activer le service systemd associé (dans le cas où votre environnement de bureau ne supporte pas XDG Autostart) : + +``` +systemctl --user enable --now arch-update-tray.service +``` + +- Ajouter la commande suivante à vos applications "auto-start" / votre fichier de configuration (si vous utilisez un gestionnaire de fenêtre ou un compositeur Wayland) : + +``` +arch-update --tray +``` + +*Si l'applet systray ne démarre pas au démarrage du système malgré tout*, veuillez lire le chapitre *"L'applet systray ne démarre pas au démarrage du système"* dans la section *"TRUCS ET ASTUCES"* ci-dessous. + +L'icône du systray change dynamiquement pour indiquer l'état actuel de votre système ("à jour" ou "mises à jour disponibles"). Lorsque vous cliquez dessus, elle lance `arch-update` dans une fenêtre de terminal via le fichier `arch-update.desktop`. + +*Si cliquer sur l'applet systray ne fait rien*, veuillez lire le chapitre *"Lancer Arch-Update dans un émulateur de terminal spécifique"* dans la section *"TRUCS ET ASTUCES"* ci-dessous. + +## Le timer systemd + +Pour effectuer des vérifications automatiques et périodiques des mises à jour disponibles, activez le timer systemd associé : + +``` +systemctl --user enable --now arch-update.timer +``` + +Par défaut, une vérification est effectuée *au démarrage du système puis une fois toutes les heures*. Le cycle de vérification peut être personnalisé, voir le chapitre *"Modifier le cycle de vérification automatique"* dans la section *"TRUC ET ASTUCES"* ci-dessous. + +# TRUCS ET ASTUCES + +## L'applet systray ne démarre pas au démarrage du système + +Assurez vous d'avoir suivi les instructions du chapitre *"L'applet systray"* dans la section *"UTILISATION"* ci-dessus. + +Si l'applet systray ne démarre pas malgré tout, cela peut être due à une *situation de compétition*. +Pour éviter ceci, vous pouvez ajouter un léger délai au démarrage de l'applet systray en utilisant la commande `sleep` : + +- Si vous avez utilisé `arch-update --tray --enable`, modifiez la ligne `Exec=` dans le fichier `arch-update-tray.desktop` (qui se trouve sous `~/.config/autostart/` par défaut), comme ceci : + +``` +[...] +Exec=sh -c "sleep 3 && arch-update --tray" +[...] +``` + +- Si vous avez utilisé le service systemd `arch-update-tray.service`, exécutez `systemctl --user edit --full arch-update-tray.service` et modifiez la ligne `ExecStart=`, comme ceci : + +``` +[...] +ExecStart=sh -c "sleep 3 && arch-update --tray" +[...] +``` + +- Si vous utilisez un gestionnaire de fenêtres ou un compositeur Wayland, modifiez la commande dans vos applications "auto-start" / vôtre fichier de configuration, comme ceci : + +``` +[...] +sleep 3 && arch-update --tray +[...] +``` + +Si l'applet systray ne démarre toujours pas au démarrage du système, essayez de graduellement augmenter la valeur du `sleep`. + +## Modifier le cycle de vérification automatique + +Si vous avez activé le timer systemd, une vérification des mises à jour disponible est lancée au démarrage du système puis une fois par heure. + +Si vous souhaitez personnaliser le cycle de vérification, exécutez la commande `systemctl --user edit --full arch-update.timer` et modifiez la valeur `OnUnitActiveSec` à votre convenance. +Par exemple, si vous voulez qu'`Arch-Update` vérifie plutôt les mises à jour toutes les 10 minutes :" + +``` +[...] +[Timer] +OnStartupSec=15 +OnUnitActiveSec=10m +[...] +``` + +Les unités de temps sont *s* pour secondes, *m* pour minutes, *h* pour heures, *d* pour jours... +Voir https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans pour plus de détails. + +Dans le cas où vous voulez qu'`Arch-Update` ne vérifie les nouvelles mises à jour qu'une fois au démarrage du système, vous pouvez simplement supprimer la ligne `OnUnitActiveSec` complètement. + +## Lancer Arch-Update dans un émulateur de terminal spécifique + +"gio" (utilisé pour lancer l'application `arch-update` dans un terminal via le fichier `arch-update.desktop` lorsque l'applet systray est cliquée) a actuellement une liste limitée d'émulateurs de terminal connus par défaut. +Ainsi, si aucun de ces émulateurs de terminal "connus" n'est installé sur votre système, vous pourriez être confronté à un problème où le fait de cliquer sur l'applet du systray ne fait rien (car `gio` n'a pas pu trouver un émulateur de terminal dans la liste en question). Par ailleurs, vous pouvez avoir plusieurs émulateurs de terminal installés sur votre système. Dans les deux cas, vous pouvez spécifier l'émulateur de terminal à utiliser. + +Pour ce faire, installez le paquet AUR `xdg-terminal-exec` (https://aur.archlinux.org/packages/xdg-terminal-exec), créez le fichier `~/.config/xdg-terminals.list` et ajoutez-y le nom du fichier `.desktop` de l'émulateur de terminal de votre choix (par exemple `Alacritty.desktop`). + +Voir https://github.com/Vladimir-csp/xdg-terminal-exec?tab=readme-ov-file#configuration pour plus de détails. + +# EXIT STATUS + +*0* + OK. + +*1* + Option invalide. + +*2* + Aucune commande d'élévation de privilège (`sudo`, `doas` ou `run0`) n'est installée ou celle définie dans le fichier de configuration `arch-update.conf` n'est pas disponible. + +*3* + Erreur lors du lancement de l'applet systray d'Arch-update. + +*4* + L'utilisateur n'a pas donné la confirmation de procéder. + +*5* + Erreur lors de la mise à jour des paquets. + +*6* + Erreur lors de l'appel de la commande reboot pour appliquer une mise à jour du noyau en attente. + +*7* + Aucune mise à jour en attente durant l'utilisation de l'option `-l/--list`. + +*6* + Erreur lors de la génération d'un fichier de configuration avec l'option `--gen-config`. + +*9* + Erreur lors de la lecture du fichier de configuration avec l'option `--show-config`. + +*10* + Erreur lors de la création du fichier desktop autostart pour l'applet systray avec l'option `--tray --enable`. + +*11* + Erreur lors du redémarrage des services nécessitant un redémarrage après mise à jour. + +*12* + Erreur lors du traitement des fichiers pacnew. + +*13* + Erreur lors de l'édition du fichier de configuration avec l'option `--edit-config`. + +*14* + Le dossier de librairies n'a pas été trouvé. + +*15* + L'éditeur "diff prog" défini dans le fichier de configuration `arch-update.conf` n'a pas été trouvé. + +# VOIR AUSSI + +*checkupdates*(8), +*pacman*(8), +*pacdiff*(8), +*paccache*(8), +*paru*(8), +*yay*(8), +*pikaur*(1), +*flatpak*(1), +*arch-update.conf*(5) + +# BUGS + +Signalez les bugs sur la page GitHub : https://github.com/Antiz96/arch-update/issues + +# AUTHOR + +Robin Candau diff --git a/doc/man/fr/arch-update.conf.5 b/doc/man/fr/arch-update.conf.5 deleted file mode 100644 index 6667608..0000000 --- a/doc/man/fr/arch-update.conf.5 +++ /dev/null @@ -1,65 +0,0 @@ -.TH "ARCH-UPDATE.CONF" "5" "Novembre 2024" "Arch-Update 3.5.0" "Manuel de Arch-Update" - -.SH NAME -arch-update.conf \- fichier de configuration pour arch-update. - -.SH SYNOPSIS -$XDG_CONFIG_HOME/arch-update/arch-update.conf, $HOME/.config/arch-update/arch-update.conf - -.SH DESCRIPTION -.RI "Fichier de configuration " "optionnel " "pour Arch-Update." - -.RB "Arch-Update tente d'abord de lire le fichier sous " "$XDG_CONFIG_HOME/arch-update/arch-update.conf " "puis sous " "$HOME/.config/arch-update/arch-update.conf " "si " "$XDG_CONFIG_HOME " "n'est pas paramétré, ou que le fichier n'existe pas." -.br -.RB "Un fichier de configuration par défaut / exemple peut être généré en exécutant : " "arch-update --gen-config" - -.SH OPTIONS -.PP -Les options sont sensibles à la casse, les majuscules doivent donc être respectées. - -.PP - -.TP -.B NoColor -Ne pas coloriser la sortie. - -.TP -.B NoVersion -.RB "Ne pas afficher les modifications de versions des paquets lors du listing des mises à jour en attente (y compris lors de l'utilisation de l'option " "-l / --list" ", voir la page de man " "arch-update(1) " "pour plus de détails)." - -.TP -.B NewsNum=[Num] -.RB "Nombre de Arch news à afficher avant la mise à jour et avec l'option " "-n / --news " "(voir la page de man " "arch-update(1) " "pour plus de détails). La valeur par défaut est 5." - -.TP -.B AURHelper=[AUR Helper] -AUR helper à utiliser pour la prise en charge des paquets AUR. Les valeurs valides sont paru, yay ou pikaur. Si cette option n'est pas spécifiée, Arch-Update utilisera le premier AUR helper disponible dans l'ordre suivant : paru puis yay puis pikaur (si aucun d'eux n'est installé, Arch-Update ne prendra pas en compte les paquets AUR). - -.TP -.B PrivilegeElevationCommand=[Cmd] -Commande à utiliser pour l'élévation de privilège. Les valeurs valides sont sudo, doas ou run0. Si cette option n'est pas spécifiée, Arch-Update utilisera la première commande disponible dans l'ordre suivant: sudo, doas puis run0. - -.TP -.B KeepOldPackages=[Num] -Nombre d'anciennes versions de paquets à conserver dans le cache de pacman. La valeur par défaut est 3. - -.TP -.B KeepUninstalledPackages=[Num] -Nombre de versions de paquets désinstallés à conserver dans le cache de pacman. La valeur par défaut est 0. - -.TP -.B DiffProg=[Editeur] -.RB "Editeur à utiliser pour visualiser / editer les différences durant le traitement des fichiers pacnew. La valeur par défaut est la valeur de la variable d'environnement " "$DIFFPROG " "(ou " "vimdiff " "si " "$DIFFPROG " "n'est pas paramétrée)." - -.TP -.B TrayIconStyle=[Style / Color] -Style à utiliser pour l'icône de l'applet systray. Les valeurs valides sont les variantes de style / couleur disponibles pour le set d'icône, listées ici : https://github.com/Antiz96/arch-update/tree/main/res/icons. La valeur par défaut est "light". - -.SH VOIR AUSSI -.BR arch-update (1) - -.SH BUGS -Signalez les bugs sur la page GitHub : https://github.com/Antiz96/arch-update/issues - -.SH AUTEUR -Robin Candau diff --git a/doc/man/fr/arch-update.conf.5.scd b/doc/man/fr/arch-update.conf.5.scd new file mode 100644 index 0000000..dc1c17a --- /dev/null +++ b/doc/man/fr/arch-update.conf.5.scd @@ -0,0 +1,63 @@ +arch-update.conf(5) ["Arch-Update 3.6.0" ["Manuel de Arch-Update"]] + +# NOM + +arch-update.conf - Fichier de configuration pour Arch-Update. + +# SYNOPSIS + +*$XDG_CONFIG_HOME/arch-update/arch-update.conf*, *$HOME/.config/arch-update/arch-update.conf* + +# DESCRIPTION + +Fichier de configuration _optionnel_ pour Arch-Update. + +Arch-Update tente d'abord de lire le fichier sous `$XDG_CONFIG_HOME/arch-update/arch-update.conf` puis sous `$HOME/.config/arch-update/arch-update.conf` si `$XDG_CONFIG_HOME` n'est pas paramétré, ou que le fichier n'existe pas. + +Un fichier de configuration par défaut / exemple peut être généré en exécutant : `arch-update --gen-config` + +# OPTIONS + +Les options sont sensibles à la casse, les majuscules doivent donc être respectées. + +*NoColor* + Ne pas coloriser la sortie. + +*NoVersion* + Ne pas afficher les modifications de versions des paquets lors du listing des mises à jour en attente (y compris lors de l'utilisation de l'option `-l / --list`, voir la page de manuel *arch-update*(1) pour plus de détails). + +*NoNotification* + Ne pas envoyer de notifications de bureau. + +*NewsNum=[Num]* + Nombre de Arch news à afficher avant la mise à jour et avec l'option `-n / --news` (voir la page de manuel *arch-update*(1) pour plus de détails). La valeur par défaut est 5. + +*AURHelper=[AUR Helper]* + AUR helper à utiliser pour la prise en charge des paquets AUR. Les valeurs valides sont `paru`, `yay` ou `pikaur`. Si cette option n'est pas spécifiée, Arch-Update utilisera le premier AUR helper disponible dans l'ordre suivant : `paru` puis `yay` puis `pikaur` (si aucun d'eux n'est installé, Arch-Update ne prendra pas en compte les paquets AUR). + +*PrivilegeElevationCommand=[Cmd]* + Commande à utiliser pour l'élévation de privilège. Les valeurs valides sont `sudo`, `doas` ou `run0`. Si cette option n'est pas spécifiée, Arch-Update utilisera la première commande disponible dans l'ordre suivant: `sudo`, `doas` puis `run0`. + +*KeepOldPackages=[Num]* + Nombre d'anciennes versions de paquets à conserver dans le cache de pacman. La valeur par défaut est 3. + +*KeepUninstalledPackages=[Num]* + Nombre de versions de paquets désinstallés à conserver dans le cache de pacman. La valeur par défaut est 0. + +*DiffProg=[Editeur]* + Editeur à utiliser pour visualiser / editer les différences durant le traitement des fichiers pacnew. La valeur par défaut est la valeur de la variable d'environnement `$DIFFPROG` (ou `vimdiff` si `$DIFFPROG` n'est pas paramétrée). + +*TrayIconStyle=[Style / Couleur]* + Style à utiliser pour l'icône de l'applet systray. Les valeurs valides sont les variantes de style / couleur disponibles pour le set d'icône, listées ici : https://github.com/Antiz96/arch-update/blob/main/res/icons/README.md. La valeur par défaut est "light". + +# VOIR AUSSI + +*arch-update*(1) + +# BUGS + +Signalez les bugs sur la page GitHub : https://github.com/Antiz96/arch-update/issues + +# AUTEUR + +Robin Candau diff --git a/po/arch-update.pot b/po/arch-update.pot index 15cfebc..30075e4 100644 --- a/po/arch-update.pot +++ b/po/arch-update.pot @@ -6,7 +6,7 @@ # AUTHOR , YEAR msgid "" msgstr "" -"Project-Id-Version: Arch-Update 3.5.0\n" +"Project-Id-Version: Arch-Update 3.6.0\n" "Report-Msgid-Bugs-To: https://github.com/Antiz96/arch-update/issues\n" "POT-Creation-Date: 2024-03-17 16:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/po/fr.po b/po/fr.po index a3a1e8f..1e25aec 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ # Robin Candau , 2024 msgid "" msgstr "" -"Project-Id-Version: Arch-Update 3.5.0\n" +"Project-Id-Version: Arch-Update 3.6.0\n" "Report-Msgid-Bugs-To: https://github.com/Antiz96/arch-update/issues\n" "POT-Creation-Date: 2024-03-17 16:22+0100\n" "PO-Revision-Date: 2024-05-09 09:30+0100\n" diff --git a/po/sv.po b/po/sv.po index 9bcbb8d..86ffa74 100644 --- a/po/sv.po +++ b/po/sv.po @@ -6,7 +6,7 @@ # Luna Jernberg , 2024 msgid "" msgstr "" -"Project-Id-Version: Arch-Update 3.5.0\n" +"Project-Id-Version: Arch-Update 3.6.0\n" "Report-Msgid-Bugs-To: https://github.com/Antiz96/arch-update/issues\n" "POT-Creation-Date: 2024-03-17 16:22+0100\n" "PO-Revision-Date: 2024-11-19 12:22+0100\n" @@ -16,7 +16,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.5.0\n" +"X-Generator: Poedit 3.6.0\n" #: src/lib/check.sh:39 src/lib/check.sh:42 #, sh-format diff --git a/res/config/arch-update.conf.example b/res/config/arch-update.conf.example index 6b0f530..95ea803 100644 --- a/res/config/arch-update.conf.example +++ b/res/config/arch-update.conf.example @@ -4,6 +4,7 @@ #NoColor #NoVersion +#NoNotification #NewsNum=5 #AURHelper=paru #PrivilegeElevationCommand=sudo diff --git a/res/icons/README.md b/res/icons/README.md new file mode 100644 index 0000000..6ff87ae --- /dev/null +++ b/res/icons/README.md @@ -0,0 +1,46 @@ +# Icon Style / Color + +Here is the list of available style / color for the systray icon. +You can select which style / color to use with the `TrayIconStyle` option in the `arch-update.conf` configuration file (see the [arch-update.conf(5) man page](https://github.com/Antiz96/arch-update/blob/main/doc/man/arch-update.conf.5.scd) for more details). + +## light + +- Up to date: + +

+ +

+ +- Updates available: + +

+ +

+ +## dark + +- Up to date: + +

+ +

+ +- Updates available: + +

+ +

+ +## blue + +- Up to date: + +

+ +

+ +- Updates available: + +

+ +

diff --git a/src/arch-update.sh b/src/arch-update.sh index cf38ffa..1de95d2 100755 --- a/src/arch-update.sh +++ b/src/arch-update.sh @@ -7,7 +7,7 @@ # General variables name="arch-update" _name="Arch-Update" -version="3.5.0" +version="3.6.0" option="${1}" # Define the directory containing libraries diff --git a/src/lib/check.sh b/src/lib/check.sh index aaebbef..75cb021 100755 --- a/src/lib/check.sh +++ b/src/lib/check.sh @@ -4,11 +4,11 @@ # https://github.com/Antiz96/arch-update # SPDX-License-Identifier: GPL-3.0-or-later -if [ -n "${aur_helper}" ] && [ -n "${flatpak}" ]; then +if [ -n "${aur_helper}" ] && [ -n "${flatpak_support}" ]; then update_available=$(checkupdates ; "${aur_helper}" -Qua 2> /dev/null | sed 's/^ *//' | sed 's/ \+/ /g' ; flatpak update | sed -n '/^ 1./,$p' | awk '{print $2}' | grep -v '^$' | sed '$d') -elif [ -n "${aur_helper}" ] && [ -z "${flatpak}" ]; then +elif [ -n "${aur_helper}" ] && [ -z "${flatpak_support}" ]; then update_available=$(checkupdates ; "${aur_helper}" -Qua 2> /dev/null | sed 's/^ *//' | sed 's/ \+/ /g') -elif [ -z "${aur_helper}" ] && [ -n "${flatpak}" ]; then +elif [ -z "${aur_helper}" ] && [ -n "${flatpak_support}" ]; then update_available=$(checkupdates ; flatpak update | sed -n '/^ 1./,$p' | awk '{print $2}' | grep -v '^$' | sed '$d') else update_available=$(checkupdates) @@ -18,17 +18,15 @@ if [ -n "${no_version}" ]; then update_available=$(echo "${update_available}" | awk '{print $1}') fi -if [ -n "${notif}" ]; then - # shellcheck disable=SC2154 - echo "${update_available}" > "${statedir}/current_updates_check" - sed -i '/^\s*$/d' "${statedir}/current_updates_check" - sed -ri 's/\x1B\[[0-9;]*m//g' "${statedir}/current_updates_check" -fi +# shellcheck disable=SC2154 +echo "${update_available}" > "${statedir}/current_updates_check" +sed -i '/^\s*$/d' "${statedir}/current_updates_check" +sed -ri 's/\x1B\[[0-9;]*m//g' "${statedir}/current_updates_check" if [ -n "${update_available}" ]; then icon_updates-available - if [ -n "${notif}" ]; then + if [ -n "${notification_support}" ] && [ -z "${no_notification}" ]; then if ! diff "${statedir}/current_updates_check" "${statedir}/last_updates_check" &> /dev/null; then update_number=$(wc -l "${statedir}/current_updates_check" | awk '{print $1}') # shellcheck disable=SC2154 diff --git a/src/lib/common.sh b/src/lib/common.sh index cbe21a0..cca196c 100755 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -130,11 +130,11 @@ fi # Check if flatpak is installed for the optional Flatpak support # shellcheck disable=SC2034 -flatpak=$(command -v flatpak) +flatpak_support=$(command -v flatpak) # Check if notify-send is installed for the optional desktop notification support # shellcheck disable=SC2034 -notif=$(command -v notify-send) +notification_support=$(command -v notify-send) # Definition of the elevation command to use (depending on which one is installed on the system and if it's not already defined in arch-update.conf) if [ -z "${su_cmd}" ]; then diff --git a/src/lib/config.sh b/src/lib/config.sh index 96f6cec..349e241 100755 --- a/src/lib/config.sh +++ b/src/lib/config.sh @@ -18,6 +18,10 @@ if [ -f "${config_file}" ]; then # shellcheck disable=SC2034 no_version=$(grep -Eq '^[[:space:]]*NoVersion[[:space:]]*$' "${config_file}" 2> /dev/null && echo "true") + # Check the "NoNotification" option in arch-update.conf + # shellcheck disable=SC2034 + no_notification=$(grep -Eq '^[[:space:]]*NoNotification[[:space:]]*$' "${config_file}" 2> /dev/null && echo "true") + # Check the "NewsNum" option in arch-update.conf # shellcheck disable=SC2034 news_num=$(grep -E '^[[:space:]]*NewsNum[[:space:]]*=[[:space:]]*[1-9][0-9]*[[:space:]]*$' "${config_file}" 2> /dev/null | awk -F '=' '{print $2}' | tr -d '[:space:]') diff --git a/src/lib/list_packages.sh b/src/lib/list_packages.sh index d75ac25..4ac5da2 100755 --- a/src/lib/list_packages.sh +++ b/src/lib/list_packages.sh @@ -24,7 +24,7 @@ if [ -n "${aur_helper}" ]; then fi fi -if [ -n "${flatpak}" ]; then +if [ -n "${flatpak_support}" ]; then flatpak_packages=$(flatpak update | sed -n '/^ 1./,$p' | awk '{print $2}' | grep -v '^$' | sed '$d') fi diff --git a/src/lib/orphan_packages.sh b/src/lib/orphan_packages.sh index 61af669..9c02ace 100755 --- a/src/lib/orphan_packages.sh +++ b/src/lib/orphan_packages.sh @@ -6,7 +6,7 @@ orphan_packages=$(pacman -Qtdq) -if [ -n "${flatpak}" ]; then +if [ -n "${flatpak_support}" ]; then flatpak_unused=$(flatpak uninstall --unused | sed -n '/^ 1./,$p' | awk '{print $2}' | grep -v '^$' | sed '$d') fi @@ -44,7 +44,7 @@ else info_msg "$(eval_gettext "No orphan package found\n")" fi -if [ -n "${flatpak}" ]; then +if [ -n "${flatpak_support}" ]; then if [ -n "${flatpak_unused}" ]; then main_msg "$(eval_gettext "Flatpak Unused Packages:")" echo -e "${flatpak_unused}\n"