43 Commits
Author SHA1 Message Date
nocode 47fd8340a0 docs(readme): document the installer translations and the GRUB UEFI boot 2026-11-26 14:00:09 +01:00
nocode 7ad68dcdae feat(repo): enable the fws repository on the live and installed systems
The installed system is a copy of the live: with [fws] declared here, the
FWS packages are updated by pacman like any other. The repository is
unsigned, so it keeps the "Optional TrustAll" level of the build profiles.
2026-11-26 14:00:08 +01:00
nocode 63139444f6 chore(packages): drop podman from the releng image 2026-11-26 14:00:08 +01:00
nocode 0516cf705f chore(packages): drop podman from the baseline image 2026-11-26 14:00:08 +01:00
nocode 0e018acc4d perf(boot): recompress the BIOS menu splash without its metadata 2026-11-26 14:00:08 +01:00
nocode 45baf4d2f3 perf(iso): skip documentation and microcode images in releng 2026-11-26 14:00:08 +01:00
nocode 896ed22aad perf(iso): skip documentation and microcode images in baseline
Nothing reads the documentation at runtime, and the live never loads the
/boot microcode images; the installed system gets its microcode from
/usr/lib/firmware through mkinitcpio.
2026-11-26 14:00:08 +01:00
nocode 9d32263fa7 perf(iso): compress the live initramfs with xz
The image is built once and booted everywhere: xz over decompressed
modules shares one dictionary across the archive and saves about 9 MiB
over per-module zstd. The installer removes this file from the target.
2026-11-26 14:00:08 +01:00
nocode 9780a6ff28 chore(boot): remove the releng systemd-boot entries 2026-11-26 14:00:08 +01:00
nocode 8a21ce8ea3 chore(boot): remove the baseline systemd-boot entries 2026-11-26 14:00:08 +01:00
nocode b10251bf91 feat(boot): boot UEFI through GRUB instead of systemd-boot
systemd-boot needed its own copy of the kernel and initramfs in the EFI
partition; GRUB reads them straight from the ISO 9660 file system.
fws-i18n is also made executable in the image.
2026-11-26 14:00:08 +01:00
nocode 08a81f635b feat(boot): mirror the BIOS menu entries in the GRUB loopback menu 2026-11-26 14:00:08 +01:00
nocode 70cfa68743 feat(boot): mirror the BIOS menu entries in the UEFI GRUB menu 2026-11-26 14:00:07 +01:00
nocode 70b64754af feat(installer): show the end-of-install dialogs in the chosen language
The dialogs shown before a language is picked (low memory, waiting
screen) are in English, the fallback language of the translations.
2026-11-26 14:00:07 +01:00
nocode 79f32f94bc feat(installer): translate the disk support screen 2026-11-26 14:00:07 +01:00
nocode f25937f059 feat(installer): translate the summary screen 2026-11-26 14:00:07 +01:00
nocode 8482a3a7c0 feat(installer): translate the connection screen 2026-11-26 14:00:07 +01:00
nocode 2307a63d26 feat(installer): translate the desktop screen 2026-11-26 14:00:07 +01:00
nocode 50fef2d212 docs(installer): note that the desktop screen texts come from the translations 2026-11-26 14:00:07 +01:00
nocode 55be5f91e0 feat(installer): translate the wizard and ask for the desktop last
The language picked on the first screen is saved to /tmp/fws-lang, so
the live session's dialogs shown after the installer has closed speak it
too.
2026-11-26 14:00:07 +01:00
nocode b297c435d3 feat(installer): generate every UTF-8 locale in the live
A locale that is not generated makes Anaconda fall back to English on
every screen. /etc/locale.gen keeps its short list, so the installed
system only gets the chosen language.
2026-11-26 14:00:07 +01:00
nocode aab5ab03df feat(installer): translate the progress steps of the kickstart scripts
locale-gen now always runs: the live ships every UTF-8 locale, and only
locale-gen rebuilds the installed system's archive from its own
/etc/locale.gen instead of keeping about 190 MiB of locales.
2026-11-26 14:00:07 +01:00
nocode f01a49cc60 feat(installer): translate the progress messages and the log view 2026-11-26 14:00:06 +01:00
nocode 299039fe6f feat(installer): send the progress messages as translation keys
This module process cannot know the language picked on the first screen:
the progress spoke translates the keys at display time instead.
2026-11-26 14:00:06 +01:00
nocode baabd9568e feat(build): align build-offi.sh with build.sh on the fws repository
The official build still injected the local-repo, so it no longer built
the same image as build.sh. It now takes the FWS packages from [fws],
stops when the profile's repositories cannot be read, and checks the
installer translations first.
2026-11-26 14:00:06 +01:00
nocode 2a71f0e640 build: check the installer translations before building 2026-11-26 14:00:06 +01:00
nocode 2a2890302c test(installer): add a checker for the installer translations file
A broken translations file only shows once the ISO boots. The checker
makes sure every message has English, that each language keeps the same
placeholders, and that no key used by the code is missing.
2026-11-26 14:00:06 +01:00
nocode c79ef4e72f feat(installer): add fws-i18n for the live session's shell dialogs 2026-11-26 14:00:06 +01:00
nocode 9ea68ef441 feat(installer): add t() to look up the installer translations
t() reads $LANG on every call, where Anaconda stores the language picked
on the first screen: a screen that sets its texts each time it is shown
follows a language changed by going back. A missing key or a broken file
shows the key instead of taking the installer down.
2026-11-26 14:00:06 +01:00
nocode bc103f77b7 feat(installer): add the translations of the FWS installer texts
Anaconda translates its own screens through gettext, but the FWS screens,
progress steps and end-of-install dialogs are in none of its catalogs.
They now live in one TOML file, one table per message and one entry per
language, with English required as the fallback.
2026-11-26 13:59:22 +01:00
nocode 7b4d7ccae5 docs(environnement): list repo.laxacube.ch among the build hosts 2026-11-26 11:52:05 +01:00
nocode 1768568a86 docs(readme): describe the build from the remote fws repository 2026-11-26 11:52:05 +01:00
nocode a05b2fee0e build(pkgbuilds): remove the vendored PKGBUILDs
The build takes these packages from the [fws] repository and no longer
reads this tree. It also carried makepkg output (pkg/ directories,
__pycache__) that should never have been versioned.
2026-11-26 11:52:05 +01:00
nocode 884669720b docs(packages): note that python-crypt_r comes from [extra] in releng 2026-11-26 11:52:05 +01:00
nocode e8c95cf917 docs(packages): note that python-crypt_r comes from [extra] in baseline 2026-11-26 11:52:04 +01:00
nocode b9f50841da build(aur): stop building python-crypt_r, now provided by [extra] 2026-11-26 11:52:04 +01:00
nocode 413c14ea3b feat(build): take the FWS packages from the remote fws repository
A build no longer needs a prior setup-aur.sh run nor a local-repo
directory: mkarchiso resolves the FWS packages through the [fws]
repository declared in the profile, and the build stops early when its
database cannot be read.

The pre-flight check derives what [fws] must provide from what [core] and
[extra] do not, so it no longer depends on a packaging tree. The Broadcom
driver is checked against the SHA-256 of the database, the only integrity
check an unsigned repository gives.
2026-11-26 11:52:04 +01:00
nocode e38dc51da0 feat(build): add a script that prepares the remote fws repository
The [fws] repository is shared with other FWS projects (fws-deskmanager,
fws-kitty…): a database rebuilt from local-repo alone would drop their
packages once uploaded. The script starts from the online database, adds
our packages without downgrading a newer published version, and stops
when that database cannot be read. Uploading stays manual.
2026-11-26 11:52:04 +01:00
nocode 0cdde23a8f chore(gitignore): ignore the generated remote-repo directory 2026-11-26 11:51:52 +01:00
nocode e53374cba9 feat(build): add the remote fws package repository
FWS packages were only reachable through the [fws-local] repository that
build-offi.sh injects after a local setup-aur.sh run. Declaring
repo.laxacube.ch as [fws] in the baseline and releng profiles makes them
available to any build.

The packages are not signed, so [fws] keeps the "Optional TrustAll" level
already used by [fws-local], and RemoteFileSigLevel is lowered so that
"pacman -U <url>" accepts them as well.
2026-11-26 11:01:26 +01:00
BlackAngelTV d86cddbf24 chore(merge): merge feat/installer-live-log into Main
The installer progress screen can now tail the FWS logs live, so a
stalled progress bar can be told apart from a slow mirror without
switching to a console.
2026-11-18 18:46:09 +01:00
nocode d201402072 feat(installer): show the installation log live from the progress screen
The progress screen says what phase is running, but when the bar stops
the user cannot tell a slow mirror from a crash without switching to a
console. A "Afficher le journal" toggle under the bar now reveals a live
tail of the FWS logs: the %pre and %post --nochroot logs on the live, and
the chrooted %post log on the target, which is where the CRITIQUE lines
about the EFI partition and the initramfs are written.

The upstream spoke is overlaid like the runtime module already is, since
an airootfs file on a package path breaks the pacstrap.
2026-11-18 08:17:13 +01:00
BlackAngelTV 69c165e95c fix(build): survive filesystems that reject colons in package names
makepkg names epoch packages "<name>-<epoch>:<ver>-<rel>-<arch>", but
local-repo lives on an NTFS mount where ":" is refused: the first epoch
package (libxmlrpc) killed setup-aur.sh mid-run with EINVAL. Publish under
an epoch-less filename — pacman reads the epoch from the package and from
the repo database — probe the filesystem once at startup, and fail loudly
when a published file is not readable.

Ghost dirents left behind by those failed copies also matter: "ls <glob>"
then reports an error, and build.sh concluded the repo was empty, so the
ISO would have shipped without the FWS packages; repo-add died on them.
Detection now uses stat instead. The AUR package check was dead too, its
declaration having been parsed into a single word.
2026-11-13 11:17:14 +01:00
253 changed files with 2095 additions and 25095 deletions

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
out/
.freebuff
local-repo/
remote-repo/
configs/baseline/airootfs/etc/systemd/system/multi-user.target.wants/
configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/
+31 -14
View File
@@ -31,7 +31,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
- **Mémoire** : **4 Go recommandés** pour installer (2 Go minimum — swap **zram** intégré au live ET au système installé ; sous 2 Go le live avertit, à 1 Go sans zram l'installateur graphique gèle)
- **Bureaux installables** : GNOME, KDE Plasma, XFCE, **Hyprland** (Wayland — non compatible VR), **i3** (X11 — compatible VR/SteamVR), ou ligne de commande seule
- **Disques** : NVMe, SATA, et les disques **cachés derrière un contrôleur Intel VMD** (BIOS réglé sur « Intel RST », « Optane » ou « RAID » — le cas de la plupart des portables récents). Aucun réglage BIOS à changer, et rien à faire : le module est chargé avant que l'installateur ne liste les disques, et inscrit dans l'initramfs du système installé pour qu'il redémarre. **gparted** est dans le live pour les cas qui demandent un coup d'œil à la table
- **Boot** : UEFI (systemd-boot) + BIOS (syslinux, splash **FWS**, `DEFAULT fws`) — entrées *normale*, *safe graphics (nomodeset)*, *Réparer FWS (recovery)* et *speech*
- **Boot** : UEFI (GRUB, qui lit noyau et initramfs directement dans l'ISO — pas de seconde copie dans la partition EFI) + BIOS (syslinux, splash **FWS**, `DEFAULT fws`) — entrées *normale*, *safe graphics (nomodeset)*, *Réparer FWS (recovery)* et *speech*
- **Récupération** : accessible depuis le live (entrée de boot), depuis le **menu GRUB du système installé** (« Réparer FWS ») et depuis son **menu d'applications** (« Récupération FWS », élévation polkit)
- **Compression** : squashfs (xz)
@@ -40,7 +40,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
## Ce qu'il y a dans FWS
### À l'installation
- **Parcours linéaire** : Langue → Connexion à Internet → Date et heure → Destination → Bureau → Compte utilisateur → Mot de passe administrateur → Récapitulatif → Installation. Aucun menu où l'on peut oublier un écran : chaque étape est présentée, dans l'ordre
- **Parcours linéaire** : Langue → Connexion à Internet → Date et heure → Destination → Compte utilisateur → Mot de passe administrateur → Bureau → Récapitulatif → Installation. Aucun menu où l'on peut oublier un écran : chaque étape est présentée, dans l'ordre
- **Écran « Prise en charge du disque », uniquement s'il est nécessaire** : sur une machine dont le SSD est caché derrière un contrôleur Intel VMD et que rien n'a réussi à révéler, un écran l'explique sans jargon et propose un bouton. Sur toutes les autres machines il ne s'affiche jamais — Anaconda le saute sans même le construire. FWS ne demande **pas** de basculer le BIOS en AHCI : c'est souvent impossible, et ça empêche Windows de démarrer en dual-boot. Ce recours n'est proposé qu'en dernier, avec l'avertissement qui va avec
- **Retour arrière du dernier écran jusqu'au premier**, y compris pour revenir sur la langue — donc sur la disposition clavier — après avoir avancé. Revenir en arrière n'applique rien : aucune écriture disque n'est déclenchée
- **Clavier appliqué immédiatement** : la disposition déduite de la langue choisie au 1er écran est poussée dans l'installateur en cours. Les mots de passe Wi-Fi et de compte ne se tapent plus en QWERTY US
@@ -216,18 +216,16 @@ Détails utiles :
Depuis **Git Bash sur Windows** (à la racine du repo) :
```bash
# Étape 1 : compilation des paquets AUR + PKGBUILD locaux
# (PacManager, anaconda porté sur Arch + ses dépendances python)
# → crée local-repo/ avec les .pkg.tar.zst
./setup-aur.sh
# Étape 2 : build de l'ISO via mkarchiso
# → fusionne configs/releng + configs/baseline
# → injecte le repo local dans pacman.conf
# → sort l'ISO dans ./out/
# Build de l'ISO via mkarchiso
# → fusionne configs/releng + configs/baseline
# → paquets FWS (PacManager, anaconda porté sur Arch + ses dépendances python)
# tirés du dépôt distant [fws] (https://repo.laxacube.ch/x86_64)
# → sort l'ISO dans ./out/
./build.sh
```
`setup-aur.sh` n'est plus un préalable : les paquets FWS sont publiés sur le dépôt `[fws]`. Il ne sert plus qu'à (re)construire les paquets AUR, à publier ensuite sur ce dépôt (voir « Publier sur le dépôt distant `[fws]` »).
L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
---
@@ -248,6 +246,12 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
**Durée** : quelques minutes en incrémental ; le premier build complet (anaconda + deps) est plus long.
### Publier sur le dépôt distant `[fws]`
`./prepare-remote-repo.sh` (sans root, depuis Arch ou la WSL Arch, après `setup-aur.sh`) prépare `remote-repo/` : les paquets de `local-repo/` plus `fws.db`, `fws.db.tar.gz`, `fws.files` et `fws.files.tar.gz`, à téléverser tels quels dans `x86_64/` sur `https://repo.laxacube.ch` (les paquets d'abord, la base ensuite, sans rien supprimer sur le serveur). Rien n'est envoyé par le script.
Le dépôt distant est partagé avec d'autres projets (fws-deskmanager, fws-kitty…) : la base part de celle **en ligne** et y ajoute nos paquets, sans remplacer une version plus récente déjà publiée. Si la base en ligne est illisible, le script s'arrête sans rien produire. Le relancer juste avant d'envoyer. Autre serveur : `FWS_REMOTE_REPO_URL=<url>`.
---
## Ce que fait `build.sh` (étape par étape)
@@ -257,8 +261,8 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
3. **Install `archiso`**.
4. **Fusion configs** : `cp -ar configs/releng/* /tmp/fws-build/releng/` puis overlay `configs/baseline/*` par-dessus (baseline prioritaire).
5. **Activation NetworkManager** sur le live (symlink réel `multi-user.target.wants/`).
6. **Injection du repo local** : ajoute `[fws-local]` (`SigLevel = Optional TrustAll`) en tête de `pacman.conf`.
7. **Paquets embarqués dans l'image** : PacManager (installé sur la cible pendant le `%post`, jamais dans le live) et le pilote Wi-Fi Broadcom (posé seulement si une carte muette est détectée). Le build s'arrête d'emblée si un paquet que seul `local-repo/` peut fournir manque.
6. **Dépôt distant `[fws]`** : déclaré dans `pacman.conf` (`SigLevel = Optional TrustAll`), il fournit les paquets FWS — ni `local-repo/` ni `setup-aur.sh` ne sont nécessaires. Sa base est lue avant le build : s'il est injoignable, le build s'arrête tout de suite.
7. **Paquets embarqués dans l'image** : PacManager (installé sur la cible pendant le `%post`, jamais dans le live) et le pilote Wi-Fi Broadcom (posé seulement si une carte muette est détectée). Le pilote Broadcom est téléchargé depuis `[fws]` et vérifié contre la somme SHA-256 de la base. Le build s'arrête d'emblée si un paquet que seul `[fws]` peut fournir n'y est pas publié.
8. **`dos2unix`** sur l'arborescence (au cas où tu as édité depuis Windows).
9. **`mkarchiso -v -w /tmp/fws-build/work -o out/ /tmp/fws-build/releng`**.
10. **Cleanup** du workdir.
@@ -285,6 +289,8 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
| `configs/releng/` | Profil principal (base ArchISO releng) |
| `configs/baseline/` | Overlay FWS (surcharge le profil releng) — **prioritaire** sur releng |
| `local-repo/` | Repo pacman local (généré par `setup-aur.sh`) |
| `prepare-remote-repo.sh` | Prépare `remote-repo/` à téléverser sur le dépôt distant `[fws]` |
| `remote-repo/` | Paquets + base `fws.*` à téléverser (généré par `prepare-remote-repo.sh`) |
| `out/` | ISOs générées |
| `fws/mkarchiso` | Binaire `mkarchiso` embarqué (fork) |
| `scripts/run_archiso.sh` | Lanceur QEMU |
@@ -320,6 +326,16 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
- **Swap zram** (live + installé) : `configs/releng/airootfs/etc/systemd/zram-generator.conf` (paquet `zram-generator`)
- **Branding ISO** : `configs/releng/profiledef.sh` (`iso_name`, `iso_label`, `iso_publisher`) ; **visuel du menu BIOS** : `configs/releng/syslinux/splash.png` (PNG 8-bit) ; **nom/version affichés par l'installateur** : exports `ANACONDA_PRODUCTNAME`/`ANACONDA_PRODUCTVERSION` dans le `.xinitrc` (lus depuis l'os-release du live)
### Traductions de l'installateur
Anaconda traduit ses propres écrans. Tout ce que FWS ajoute (écrans Connexion, Prise en charge du disque, Bureau, Récapitulatif, boutons Précédent/Suivant, messages de progression, fenêtres de fin d'installation) vient d'**un seul fichier** : `configs/baseline/airootfs/usr/local/share/fws/installer-translations.toml`.
- **Une table par texte, une ligne par langue**, avec les codes de langue d'Anaconda (`fr`, `de`, `pt_BR`, `"sr@latin"`…). `en` est obligatoire : c'est le texte affiché pour toute langue absente. Un code de territoire (`fr_CH`) l'emporte sur la langue (`fr`) pour ce territoire.
- **Traduction dynamique** : le code demande `t("clé")` dans la langue choisie au premier écran, et chaque écran relit ses textes à chaque affichage. Revenir changer de langue retraduit donc tout le parcours.
- **Côté code** : `t()` vient de `pyanaconda/ui/gui/spokes/fws_i18n.py` ; le `%post` passe des clés (`fws-install-step 32 fws:progress.desktop`) que l'écran de progression traduit ; les scripts shell appellent `fws-i18n <clé> [champ=valeur]`.
- **Avant le choix de la langue** (alerte mémoire, écran d'attente du `.xinitrc`), les textes sont en anglais.
- **Contrôle** : `python3 scripts/check-installer-translations.py` vérifie le fichier (anglais présent, mêmes `{champs}` dans chaque langue, aucune clé utilisée par le code sans traduction) et affiche la couverture par langue. `build.sh` et `build-offi.sh` le lancent avant de construire.
> ⚠ **Règle d'or de la fusion** : au build, `configs/baseline/*` est copié **par-dessus** `configs/releng/*` — tout fichier homonyme de baseline **écrase** celui de releng. Ça concerne notamment `profiledef.sh`, `packages.x86_64`, `pacman.conf`, `efiboot/loader/entries/01-archiso-linux.conf` et `syslinux/syslinux.cfg` : **toute modification d'un de ces fichiers doit être reportée dans les deux profils** (des divergences ont déjà fait perdre silencieusement `firewalld` et le cap `udev.event_timeout` d'une ISO ; un `syslinux-linux.cfg` stock orphelin côté baseline définissait aussi un label `arch` sans le cap — supprimé, et le menu BIOS pointe désormais explicitement sur `DEFAULT fws`). Vérifier avec :
> ```bash
> comm -12 <(cd configs/baseline && find . -type f | sort) <(cd configs/releng && find . -type f | sort)
@@ -335,7 +351,8 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
| `WSL introuvable` | WSL n'est pas installé. PowerShell admin : `wsl --install`, puis installe une distro Arch. |
| `pacman: signature unknown trust` | Keyring périmé → `pacman -Sy --noconfirm archlinux-keyring` puis relancer. |
| `makepkg: conflicting files` | `pacman -Syu` incomplet avant le build. Relancer `setup-aur.sh`. |
| `mkarchiso` plante sur `[fws-local]` | Le repo local n'a pas été généré. Relancer `setup-aur.sh`. |
| `Base du dépôt [fws] illisible` | `repo.laxacube.ch` injoignable depuis la machine de build. Vérifier l'accès (`curl -I https://repo.laxacube.ch/x86_64/fws.db`) puis relancer. |
| `absents de [core], [extra] et [fws]` | Un paquet de `packages.x86_64` n'existe dans aucun dépôt : le publier sur `[fws]`, ou corriger son nom, puis relancer. |
| Écran bleu 1-2 min au boot du live | Normal en VM : un worker udev traîne (plafonné à 45 s) — le splash « Préparation de l'installateur » l'indique. Attendre. |
| L'installateur semble figé / fenêtre blanche | Rendu logiciel en VM : la fenêtre Anaconda se peint lentement. Patienter quelques secondes. |
| Session Hyprland/i3 : fenêtres au contenu noir en VM | Compositing sur GPU virtuel — picom est auto-désactivé en VM (config FWS) ; si tu l'as réactivé, `pkill picom`. |
+22 -27
View File
@@ -3,8 +3,8 @@
# FWS — Build OFFICIEL versionné de l'ISO (archiso)
#
# IDENTIQUE à build.sh (même bascule conteneur/WSL, --network=host, fusion
# baseline, MÊME injection local-repo → donc même paquet anaconda avec le champ
# Hostname), avec EN PLUS uniquement le RENOMMAGE :
# baseline, MÊMES paquets FWS tirés du dépôt distant [fws] → donc même paquet
# anaconda avec le champ Hostname), avec EN PLUS uniquement le RENOMMAGE :
# - demande la version (major.minor.build) + le nom de variante, le fichier
# VERSION servant de défaut,
# - nomme l'ISO fws-<version>-<nom>.iso (ex. fws-1.5.0-cli.iso),
@@ -202,7 +202,7 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then
# On les rend au propriétaire du dépôt pour confort côté hôte.
OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
if [ -n "$OWNER" ]; then
for d in out local-repo; do
for d in out; do
[ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true
done
fi
@@ -240,6 +240,16 @@ fi
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "==> Dossier de travail : $WORK_DIR"
# A broken translations file only shows once the ISO boots: check it now,
# before anything long. A bare Arch container may lack python3: skip then.
if command -v python3 >/dev/null 2>&1; then
echo "==> Vérification des traductions de l'installateur..."
python3 -I "$WORK_DIR/scripts/check-installer-translations.py" \
|| { echo -e "\e[31m[ERR] Traductions de l'installateur invalides (détail ci-dessus).\e[0m" >&2; exit 1; }
else
echo "==> python3 absent : vérification des traductions sautée."
fi
# ============================================================
# Version (major.minor.build) + nom de la variante.
# Déjà demandés sur l'hôte (FWS_ISO_VERSION/FWS_ISO_TAG passés via -e) ; sinon
@@ -341,26 +351,6 @@ echo "==> Vérification des services systemd..."
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/ 2>/dev/null || echo " (aucun service)"
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/ 2>/dev/null || echo " (aucun symlink)"
# Copie le repo local (fws-pacmanage + fws-dnd + deps Anaconda packagées)
if ls "$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then
echo "==> Copie du repo local fws-local..."
mkdir -p /tmp/fws-build/local-repo
cp -a "$WORK_DIR/local-repo/"* /tmp/fws-build/local-repo/
echo "==> Injection [fws-local] dans pacman.conf..."
sed -i '/^\[fws-local\]/,/^$/d' /tmp/fws-build/releng/pacman.conf
PACMAN_TMP=$(mktemp)
printf '[fws-local]\nSigLevel = Optional TrustAll\nServer = file:///tmp/fws-build/local-repo\n\n' \
> "$PACMAN_TMP"
cat /tmp/fws-build/releng/pacman.conf >> "$PACMAN_TMP"
mv "$PACMAN_TMP" /tmp/fws-build/releng/pacman.conf
echo "==> Vérification pacman.conf :"
head -5 /tmp/fws-build/releng/pacman.conf
else
echo "==> Aucun repo local détecté."
fi
echo "==> Correction des retours à la ligne Windows (dos2unix)..."
pacman -S --needed --noconfirm dos2unix
find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
@@ -368,11 +358,16 @@ find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
# ── Pré-vol : résolution de TOUS les paquets du profil ──
# « error: target not found » ne doit plus surgir en plein mkarchiso : on
# résout la liste complète (packages.x86_64 fusionné) contre le pacman.conf
# du profil (fws-local injecté inclus) dans une base temporaire. S'il manque
# du profil (dépôt distant [fws] inclus) dans une base temporaire. S'il manque
# un paquet, on échoue ICI avec la liste + le geste correctif.
echo "==> Pré-vol : résolution des paquets du profil..."
PREFLIGHT_DB="$(mktemp -d)"
pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null
if ! pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null; then
rm -rf "$PREFLIGHT_DB"
echo -e "\e[31mBases des dépôts du profil illisibles (miroir Arch ou dépôt [fws] injoignable ?).\e[0m" >&2
echo "Vérifie l'accès réseau (curl -I https://repo.laxacube.ch/x86_64/fws.db), puis relance." >&2
exit 1
fi
mapfile -t PROFILE_PKGS < <(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' \
/tmp/fws-build/releng/packages.x86_64)
# -Sp n'installe rien (affiche les URLs) ; LC_ALL=C fige le motif d'erreur.
@@ -384,8 +379,8 @@ rm -rf "$PREFLIGHT_DB"
if [ -n "$MISSING" ]; then
echo -e "\e[31mPaquets introuvables dans les dépôts du profil :\e[0m" >&2
printf ' \e[31m%s\e[0m\n' $MISSING >&2
echo -e "\e[33mDépôt fws-local absent/incomplet ? Lance ./setup-aur.sh (construit" >&2
echo -e "anaconda, fws-pacmanage, fws-dnd, …) puis relance ce script.\e[0m" >&2
echo -e "\e[33mPaquet FWS pas encore publié sur le dépôt [fws] (anaconda, fws-pacmanage," >&2
echo -e "fws-dnd, …) ? Publie-le, ou corrige son nom dans packages.x86_64, puis relance.\e[0m" >&2
exit 1
fi
echo "==> Pré-vol OK : ${#PROFILE_PKGS[@]} paquets résolus."
+86 -52
View File
@@ -162,7 +162,7 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then
# On les rend au propriétaire du dépôt pour confort côté hôte.
OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
if [ -n "$OWNER" ]; then
for d in out local-repo; do
for d in out; do
[ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true
done
fi
@@ -199,6 +199,16 @@ fi
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "==> Dossier de travail : $WORK_DIR"
# A broken translations file only shows once the ISO boots: check it now,
# before anything long. A bare Arch container may lack python3: skip then.
if command -v python3 >/dev/null 2>&1; then
echo "==> Vérification des traductions de l'installateur..."
python3 -I "$WORK_DIR/scripts/check-installer-translations.py" \
|| { echo -e "\e[31m[ERR] Traductions de l'installateur invalides (détail ci-dessus).\e[0m" >&2; exit 1; }
else
echo "==> python3 absent : vérification des traductions sautée."
fi
# pacman ≥ 7 sandboxe les ops FS via landlock, non supporté par le kernel
# WSL ni (selon le noyau) par le conteneur → désactivation. Idempotent,
# sans effet sur Arch natif.
@@ -305,60 +315,74 @@ echo "==> Vérification des services systemd..."
ls "$SDDIR" 2>/dev/null | head -25 || echo " (aucun service)"
ls "$SDDIR/multi-user.target.wants/" 2>/dev/null || echo " (aucun symlink)"
# Copie le repo local (fws-pacmanage + fws-dnd + deps Anaconda packagées)
if ls "$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then
echo "==> Copie du repo local fws-local..."
mkdir -p /tmp/fws-build/local-repo
cp -a "$WORK_DIR/local-repo/"* /tmp/fws-build/local-repo/
echo "==> Injection [fws-local] dans pacman.conf..."
sed -i '/^\[fws-local\]/,/^$/d' /tmp/fws-build/releng/pacman.conf
PACMAN_TMP=$(mktemp)
printf '[fws-local]\nSigLevel = Optional TrustAll\nServer = file:///tmp/fws-build/local-repo\n\n' \
> "$PACMAN_TMP"
cat /tmp/fws-build/releng/pacman.conf >> "$PACMAN_TMP"
mv "$PACMAN_TMP" /tmp/fws-build/releng/pacman.conf
echo "==> Vérification pacman.conf :"
head -5 /tmp/fws-build/releng/pacman.conf
else
echo "==> Aucun repo local détecté."
# ============================================================
# Dépôt distant [fws] : source des paquets FWS
#
# fws-pacmanage, fws-dnd, anaconda and its python deps come from the [fws]
# repo declared in the profile's pacman.conf, which mkarchiso uses as is:
# the build needs neither local-repo/ nor a prior setup-aur.sh run. Its
# database is read once here, for the check and the Broadcom driver below.
# ============================================================
_PROFILE_CONF=/tmp/fws-build/releng/pacman.conf
# dos2unix only runs further down: strip a possible CR from a Windows clone.
FWS_REPO_URL="$(awk '/^\[/{f=/^\[fws\]/} f && /^[[:space:]]*Server[[:space:]]*=/{
gsub(/\r/, ""); sub(/^[^=]*=[[:space:]]*/, ""); sub(/[[:space:]]+$/, ""); print; exit }' "$_PROFILE_CONF")"
FWS_REPO_URL="${FWS_REPO_URL//\$repo/fws}"
FWS_REPO_URL="${FWS_REPO_URL//\$arch/x86_64}"
if [ -z "$FWS_REPO_URL" ]; then
echo -e "\e[31m[ERR] Aucun dépôt [fws] (Server = …) dans le pacman.conf du profil.\e[0m" >&2
exit 1
fi
echo "==> Lecture du dépôt [fws] ($FWS_REPO_URL)..."
FWS_DB_DIR="$(mktemp -d)"
if ! curl -fsSL --retry 3 --connect-timeout 20 -o "$FWS_DB_DIR/fws.db" "$FWS_REPO_URL/fws.db" \
|| ! tar -xzf "$FWS_DB_DIR/fws.db" -C "$FWS_DB_DIR" 2>/dev/null; then
echo -e "\e[31m[ERR] Base du dépôt [fws] illisible : $FWS_REPO_URL/fws.db\e[0m" >&2
echo " Vérifie l'accès à ce serveur, puis relance." >&2
exit 1
fi
# One directory per package in the database: "<name>-<pkgver>-<pkgrel>".
mapfile -t _fws_pkgs < <(find "$FWS_DB_DIR" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' \
| sed -E 's/-[^-]+-[^-]+$//')
# ============================================================
# Garde-fou : les paquets FWS doivent EXISTER dans local-repo
# Garde-fou : les paquets FWS doivent EXISTER dans le dépôt [fws]
#
# packages.x86_64 liste des paquets que seul le dépôt local fournit (fws-*,
# anaconda, fws-pacmanage, deps python…). S'ils n'ont pas encore été construits,
# packages.x86_64 liste des paquets que seul le dépôt FWS fournit (fws-*,
# anaconda, fws-pacmanage, deps python…). S'ils n'y sont pas publiés,
# pacman ne le découvre qu'à la toute fin — après le -Syu, les miroirs et
# toute la préparation de mkarchiso — avec un « target not found » sec et
# plusieurs minutes de perdues. On vérifie donc AVANT de lancer quoi que ce
# soit de long, et on dit quoi faire.
# ============================================================
echo "==> Vérification des paquets fournis par local-repo..."
_missing=()
# Paquets construits depuis les PKGBUILD du dépôt (le nom du dossier est le
# pkgname), plus la liste AUR lue dans setup-aur.sh — sa seule source de vérité.
_local_pkgs=()
for _d in "$WORK_DIR"/pkgbuilds/*/; do
[ -f "$_d/PKGBUILD" ] || continue
_local_pkgs+=("$(basename "$_d")")
done
# shellcheck disable=SC2207
_local_pkgs+=($(sed -n 's/^AUR_PACKAGES=(\(.*\))[[:space:]]*$//p' "$WORK_DIR/setup-aur.sh" 2>/dev/null))
for _p in "${_local_pkgs[@]}"; do
grep -qx "$_p" /tmp/fws-build/releng/packages.x86_64 || continue
ls "$WORK_DIR/local-repo/$_p"-[0-9]*.pkg.tar.* >/dev/null 2>&1 || _missing+=("$_p")
done
if [ "${#_missing[@]}" -gt 0 ]; then
echo -e "\e[31m[ERR] Ces paquets sont demandés par packages.x86_64 mais absents de local-repo :\e[0m" >&2
printf ' - %s\n' "${_missing[@]}" >&2
echo "" >&2
echo " Construis-les d'abord : ./setup-aur.sh" >&2
echo " (incrémental : il saute ce qui est déjà à jour dans local-repo/)" >&2
echo "==> Vérification des paquets fournis par le dépôt [fws]..."
# What [core]/[extra] do not provide can only come from [fws]. Deriving that
# list here keeps the check free of any packaging tree. The host sync
# databases are fresh: the "pacman -Syu" above has just refreshed them.
mapfile -t _official < <(pacman -Slq core extra 2>/dev/null | sort -u)
if [ "${#_official[@]}" -eq 0 ]; then
echo -e "\e[31m[ERR] Bases pacman [core]/[extra] illisibles sur la machine de build.\e[0m" >&2
exit 1
fi
echo " ${#_local_pkgs[@]} paquets locaux attendus, tous présents ✔"
_expected=() _missing=()
# [[:space:]] also strips the CR of a Windows clone (dos2unix runs later).
for _p in $(comm -23 \
<(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/fws-build/releng/packages.x86_64 | sort -u) \
<(printf '%s\n' "${_official[@]}")); do
# An official group (xorg, …) is no package name, yet pacman resolves it.
if pacman -Sgq "$_p" >/dev/null 2>&1; then continue; fi
_expected+=("$_p")
printf '%s\n' "${_fws_pkgs[@]}" | grep -qxF -- "$_p" || _missing+=("$_p")
done
if [ "${#_missing[@]}" -gt 0 ]; then
echo -e "\e[31m[ERR] Ces paquets sont demandés par packages.x86_64 mais absents de [core], [extra] et [fws] :\e[0m" >&2
printf ' - %s\n' "${_missing[@]}" >&2
echo "" >&2
echo " Publie-les sur $FWS_REPO_URL (ou corrige leur nom dans packages.x86_64), puis relance." >&2
exit 1
fi
echo " Attendus de [fws] : ${_expected[*]:-aucun} — tous présents ✔"
# ============================================================
# Pilote Wi-Fi Broadcom : embarqué, installé seulement SI DÉTECTÉ
@@ -366,19 +390,29 @@ echo " ${#_local_pkgs[@]} paquets locaux attendus, tous présents ✔"
# Volontairement absent de packages.x86_64 : broadcom-wl-dkms blackliste b43,
# bcma, ssb et brcmsmac pour tout le système — l'imposer à chaque machine
# couperait le Wi-Fi de celles que ces modules font justement fonctionner.
# Il vient de l'AUR, donc aucun dépôt ne le fournira sur la cible : on le
# Une machine qui en a besoin n'a, par définition, pas de réseau : on le
# dépose dans l'airootfs et fws-setup-hardware fait « pacman -U » UNIQUEMENT
# s'il voit une Broadcom sans interface sans fil, puis supprime le fichier.
# ============================================================
_WL_PKG="$(ls "$WORK_DIR/local-repo"/broadcom-wl-dkms-[0-9]*.pkg.tar.* 2>/dev/null | head -1)"
if [ -n "$_WL_PKG" ]; then
install -Dm644 "$_WL_PKG" \
"/tmp/fws-build/releng/airootfs/usr/local/share/fws/drivers/$(basename "$_WL_PKG")"
echo "==> Pilote Wi-Fi Broadcom embarqué : $(basename "$_WL_PKG")"
# Taken from [fws] (our build) and checked against the database checksum:
# the repo is unsigned, so this is the only integrity check it gets.
_WL_FILE="" _WL_SHA=""
for _desc in "$FWS_DB_DIR"/broadcom-wl-dkms-[0-9]*/desc; do
[ -f "$_desc" ] || continue
_WL_FILE="$(awk '/^%FILENAME%$/{getline; print; exit}' "$_desc")"
_WL_SHA="$(awk '/^%SHA256SUM%$/{getline; print; exit}' "$_desc")"
done
_WL_DIR=/tmp/fws-build/releng/airootfs/usr/local/share/fws/drivers
if [ -n "$_WL_FILE" ] && mkdir -p "$_WL_DIR" \
&& curl -fsSL --retry 3 --connect-timeout 20 -o "$_WL_DIR/$_WL_FILE" "$FWS_REPO_URL/$_WL_FILE" \
&& echo "$_WL_SHA $_WL_DIR/$_WL_FILE" | sha256sum -c --status -; then
echo "==> Pilote Wi-Fi Broadcom embarqué : $_WL_FILE"
else
echo -e "\e[33m[!] broadcom-wl-dkms absent de local-repo — les portables Broadcom\e[0m" >&2
echo " resteront sans Wi-Fi. Lance ./setup-aur.sh pour le construire." >&2
if [ -n "$_WL_FILE" ]; then rm -f "$_WL_DIR/$_WL_FILE"; fi
echo -e "\e[33m[!] broadcom-wl-dkms introuvable ou corrompu dans [fws] — les portables Broadcom\e[0m" >&2
echo " resteront sans Wi-Fi. Publie-le sur $FWS_REPO_URL (./setup-aur.sh puis ./prepare-remote-repo.sh)." >&2
fi
rm -rf "$FWS_DB_DIR"
echo "==> Correction des retours à la ligne Windows (dos2unix)..."
pacman -S --needed --noconfirm dos2unix
@@ -1 +1,7 @@
HOOKS=(base udev modconf archiso block filesystems)
# The image is built once and booted on every machine: xz over decompressed
# modules lets the whole archive share one dictionary, ~9 MiB smaller than
# per-module zstd. Live only: the installer removes this file from the target.
COMPRESSION="xz"
COMPRESSION_OPTIONS=(-9e)
MODULES_DECOMPRESS="yes"
+5 -1
View File
@@ -11,4 +11,8 @@ LocalFileSigLevel = Optional
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
Include = /etc/pacman.d/mirrorlist
[fws]
Server = https://repo.laxacube.ch/x86_64
SigLevel = Optional TrustAll
+46 -31
View File
@@ -40,8 +40,9 @@ if command -v liveinst >/dev/null 2>&1; then
# laisser l'utilisateur croire à un bug.
_MEMKB=$(awk '/^MemTotal:/{print $2}' /proc/meminfo 2>/dev/null)
if [ -n "$_MEMKB" ] && [ "$_MEMKB" -lt 2000000 ] && command -v zenity >/dev/null 2>&1; then
zenity --warning --width=460 --title="FWS — mémoire insuffisante ?" \
--text="<b>Cette machine n'a que $(( _MEMKB / 1024 )) Mo de RAM.</b>\n\nL'installateur graphique peut geler en dessous de 2 Go.\nEn VM : augmente la mémoire (4 Go recommandés) puis redémarre.\n\nOK pour tenter quand même." 2>/dev/null
# Shown before the user picks a language: English, like the splash below.
zenity --warning --width=460 --title="FWS — not enough memory?" \
--text="<b>This machine only has $(( _MEMKB / 1024 )) MB of RAM.</b>\n\nThe graphical installer may freeze below 2 GB.\nIn a virtual machine: raise the memory (4 GB recommended), then restart.\n\nOK to try anyway." 2>/dev/null
fi
# ÉCRAN D'ATTENTE immédiat : le démarrage d'anaconda peut prendre 2 à
@@ -77,7 +78,7 @@ if command -v liveinst >/dev/null 2>&1; then
_el=$(( _el + 3 ))
_last=$(ls -t /tmp/storage.log /tmp/anaconda.log /tmp/program.log /tmp/dbus.log 2>/dev/null | head -n1)
if [ -z "$_last" ]; then
printf '# Démarrage d'"'"'Anaconda… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0
printf '# Starting the installer… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0
continue
fi
_stamp=$(stat -c %Y "$_last" 2>/dev/null)
@@ -93,24 +94,24 @@ if command -v liveinst >/dev/null 2>&1; then
| cut -c1-90)
if [ "$_quiet" -ge 240 ] && [ ! -f /tmp/fws-stall.txt ]; then
{
echo "=== FWS : préparation bloquée (aucune activité log depuis ${_quiet}s) ==="
echo "--- dernier log actif : $_last"; tail -n 25 "$_last" 2>/dev/null
echo "--- udev (workers bloqués ?)"; udevadm settle --timeout=0 2>&1
echo "--- journal (fin)"; journalctl -b --no-pager 2>/dev/null | tail -n 60
echo "--- dmesg (fin)"; dmesg 2>/dev/null | tail -n 40
echo "=== FWS: preparation stalled (no log activity for ${_quiet}s) ==="
echo "--- last active log: $_last"; tail -n 25 "$_last" 2>/dev/null
echo "--- udev (stuck workers?)"; udevadm settle --timeout=0 2>&1
echo "--- journal (end)"; journalctl -b --no-pager 2>/dev/null | tail -n 60
echo "--- dmesg (end)"; dmesg 2>/dev/null | tail -n 40
} > /tmp/fws-stall.txt 2>&1
zenity --text-info --title="FWS — préparation bloquée : diagnostic" \
zenity --text-info --title="FWS — preparation stalled: diagnostics" \
--filename=/tmp/fws-stall.txt --width=1000 --height=650 2>/dev/null &
fi
if [ "$_quiet" -ge 60 ]; then
printf '# ⚠ Aucune activité depuis %d s (%s) — dernier message : %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0
printf '# ⚠ No activity for %d s (%s) — last message: %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0
else
printf '# Préparation (%d min %02d s) — %s : %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0
printf '# Preparing (%d min %02d s) — %s: %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0
fi
done
) | zenity --progress --pulsate --no-cancel \
--title="FWS" \
--text="<b>Préparation de l'installateur FWS…</b>\n\nAnalyse du matériel et des disques en cours.\nEncore une à deux minutes, c'est normal." \
--text="<b>Preparing the FWS installer…</b>\n\nChecking the hardware and the disks.\nOne or two more minutes: this is normal." \
--width=560 2>/dev/null &
_SPLASH_PID=$!
fi
@@ -160,6 +161,13 @@ if command -v liveinst >/dev/null 2>&1; then
fi
pkill -f "fws-stall.txt" 2>/dev/null
# The installer has closed: the dialogs below speak the language picked on
# its first screen (saved by fws_wizard.py), not the live's default.
if [ -s /tmp/fws-lang ]; then
LANG="$(cat /tmp/fws-lang)"
export LANG
fi
# ATTENTION : liveinst NE propage PAS le code de sortie d'anaconda — il
# enchaîne son propre nettoyage et sort souvent 0 même quand anaconda a
# planté. On ne se fie donc PAS à $rc : en phase debug on regroupe TOUS les
@@ -191,33 +199,33 @@ if command -v liveinst >/dev/null 2>&1; then
DBG=/tmp/fws-debug.txt
{
echo "===== liveinst sorti (code $rc) — logs Anaconda ====="
echo "===== liveinst exited (code $rc) — Anaconda logs ====="
echo
echo "########## sortie liveinst (stdout+stderr) ##########"
echo "########## liveinst output (stdout+stderr) ##########"
cat "$LIVEINST_LOG" 2>/dev/null
echo
echo "########## %post chrooté = grub-install / mkinitcpio ##########"
echo "########## >>> C'EST CE BLOC QUI DIT SI LE DISQUE VA BOOTER <<< ##########"
cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log introuvable)"
echo "########## chroot %post = grub-install / mkinitcpio ##########"
echo "########## >>> THIS BLOCK TELLS WHETHER THE DISK WILL BOOT <<< ##########"
cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log not found)"
echo
echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########"
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(absent)"
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(missing)"
echo
echo "########## Récapitulatif (page GUI fws_recap, avant install) ##########"
cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(absent — page récap pas atteinte)"
echo "########## Summary (fws_recap screen, before installing) ##########"
cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(missing — summary screen not reached)"
# The crash dialog only shows the dasbus wrapper frames; the actual
# remote exception is at the end of this dump, and nowhere else.
for f in /tmp/anaconda-tb-*; do
[ -f "$f" ] || continue
echo
echo "########## $f (traceback Anaconda, fin) ##########"
echo "########## $f (Anaconda traceback, end) ##########"
tail -n 80 "$f"
done
for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \
/tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do
echo
echo "########## $f ##########"
tail -n 200 "$f" 2>/dev/null || echo "(absent)"
tail -n 200 "$f" 2>/dev/null || echo "(missing)"
done
} >"$DBG" 2>&1
@@ -231,8 +239,8 @@ if command -v liveinst >/dev/null 2>&1; then
if grep -q 'Initcpio image generation successful' /tmp/fws-post-chroot.log 2>/dev/null \
&& grep -q 'Installation finished. No error reported.' /tmp/fws-post-chroot.log 2>/dev/null; then
if command -v zenity >/dev/null 2>&1; then
zenity --info --width=480 --title="FWS — installation réussie ✅" \
--text="<b>FWS est installé sur le disque.</b>\n\n1. Clique OK pour <b>éteindre</b> la machine.\n2. <b>Retire l'ISO</b> (lecteur CD/DVD).\n3. Rallume → FWS démarre." \
zenity --info --width=480 --title="$(fws-i18n session.success_title)" \
--text="$(fws-i18n session.success_text)" \
2>/dev/null
fi
systemctl poweroff
@@ -252,15 +260,22 @@ if command -v liveinst >/dev/null 2>&1; then
# logs de la machine, ça ne part pas sans un clic.
if command -v zenity >/dev/null 2>&1; then
(
# zenity prints the clicked label: compare with the very same
# translated strings.
_close="$(fws-i18n session.close)"
_send="$(fws-i18n session.send_report)"
_reboot="$(fws-i18n session.reboot)"
while :; do
_btn="$(zenity --text-info \
--title="FWS — l'installation ne s'est pas terminée (sortie $rc)" \
--title="$(fws-i18n session.failure_title code="$rc")" \
--filename="$DBG" --width=1100 --height=720 \
--ok-label="Fermer" \
--extra-button="Envoyer le rapport aux développeurs" \
--extra-button="Redémarrer" 2>/dev/null)" || true
--ok-label="$_close" \
--extra-button="$_send" \
--extra-button="$_reboot" 2>/dev/null)" || true
case "$_btn" in
"Envoyer le rapport aux développeurs")
# Window closed (empty answer): never mistake it for a button.
"") break ;;
"$_send")
# fws-bugreport pré-charge le fichier de debug,
# montre le payload EXACT et n'envoie que sur
# confirmation — la télémétrie reste au choix de
@@ -272,10 +287,10 @@ if command -v liveinst >/dev/null 2>&1; then
fws-bugreport --file "$DBG" >/dev/null 2>&1 || true
else
zenity --error --width=440 \
--text="fws-bugreport est absent de cette image :\nle rapport ne peut pas être envoyé d'ici." 2>/dev/null || true
--text="$(fws-i18n session.bugreport_missing)" 2>/dev/null || true
fi
;;
"Redémarrer")
"$_reboot")
systemctl reboot
break
;;
@@ -12,9 +12,20 @@ set -euo pipefail
# Anaconda (ses modules DBus font setlocale(LC_ALL, "en_US.UTF-8") au démarrage,
# sinon « locale.Error: unsupported locale setting » → le module Boss plante).
# ~3 Mo générés, vs 222 Mo pour le paquet glibc-locales complet.
#
# The installer must also be able to switch to ANY of Anaconda's languages: a
# locale that is not generated makes Anaconda fall back to English on every
# screen (pyanaconda/localization.py, setup_locale). So the live gets every
# UTF-8 locale of glibc (~190 MiB in the image, ~10 MiB once compressed), while
# /etc/locale.gen keeps its short list: the installed system is a copy of the
# live, and its %post runs locale-gen from that file, which rebuilds the
# archive with the chosen language only.
cp /etc/locale.gen /etc/locale.gen.fws
grep -E '[[:space:]]UTF-8$' /usr/share/i18n/SUPPORTED > /etc/locale.gen
locale-gen
mv -f /etc/locale.gen.fws /etc/locale.gen
# --- Overlays pyanaconda (écran de progression FWS) ---------------------------
# --- Overlays pyanaconda (écran de progression FWS, journal en direct) ---------------------------
# mkarchiso copie l'airootfs AVANT le pacstrap (cf. fws/mkarchiso :
# _make_custom_airootfs puis _make_packages) : un fichier de l'airootfs qui
# remplace un fichier du paquet « anaconda » fait échouer pacman (« exists in
@@ -28,7 +39,8 @@ if [ -d /usr/local/share/fws/anaconda-overlay/pyanaconda ]; then
# Le build doit s'arrêter net si l'overlay n'a pas atterri : sans lui, plus
# d'écran de progression détaillé (mais l'installateur fonctionne quand même).
for _f in modules/runtime/scripts/runtime.py modules/boss/installation.py; do
for _f in modules/runtime/scripts/runtime.py modules/boss/installation.py \
ui/gui/spokes/installation_progress.py; do
if [ ! -f "/usr/lib/python3.14/site-packages/pyanaconda/${_f}" ]; then
echo "[FWS] overlay pyanaconda manquant : ${_f}" >&2
exit 1
@@ -16,21 +16,29 @@
# « pacman -S » du bureau + d'un navigateur (Firefox), et active le display
# manager. « cli » (défaut) = aucun bureau, rien à installer.
from pyanaconda.core.i18n import CN_, _
from pyanaconda.core.i18n import CN_
from pyanaconda.ui.categories.software import SoftwareCategory
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
__all__ = ["FWSDesktopSpoke"]
# clé interne (écrite dans /tmp/fws-desktop) → libellé affiché dans le statut.
_CHOICES = [
("cli", _("Command line only (no desktop)")),
("gnome", "GNOME"),
("kde", "KDE Plasma"),
("hyprland", "Hyprland — Wayland (non compatible VR)"),
("i3", "i3 — X11 (compatible VR : SteamVR)"),
("xfce", "XFCE"),
]
def _choices():
# A function, not a constant: the labels must follow the language picked
# on the first screen, which can change after this module is imported.
# Bare product names are the same in every language.
return [
("cli", t("desktop.choice_cli")),
("gnome", "GNOME"),
("kde", "KDE Plasma"),
("hyprland", t("desktop.choice_hyprland")),
("i3", t("desktop.choice_i3")),
("xfce", "XFCE"),
]
_DESKTOP_FILE = "/tmp/fws-desktop"
@@ -42,6 +50,10 @@ class FWSDesktopSpoke(NormalSpoke):
uiFile = "spokes/fws_desktop.glade"
category = SoftwareCategory
icon = "preferences-desktop-display-symbolic"
# Left to Anaconda: it only labels the hub tile (hidden by fws_wizard, shown
# only if the wizard falls back to the classic menu), sorts the tiles and
# names the spoke in logs. The header the user sees is "window-name",
# translated in refresh().
title = CN_("GUI|Spoke", "_Desktop Environment")
@staticmethod
@@ -63,7 +75,7 @@ class FWSDesktopSpoke(NormalSpoke):
def initialize(self):
NormalSpoke.initialize(self)
for key, _label in _CHOICES:
for key, _label in _choices():
self._radios[key] = self.builder.get_object("radio_" + key)
# Reprend un éventuel choix déjà écrit (revisite du spoke).
try:
@@ -75,6 +87,18 @@ class FWSDesktopSpoke(NormalSpoke):
pass
def refresh(self):
# The texts are set here rather than taken from the glade: refresh()
# runs each time the screen is shown, so they follow a language
# changed in the meantime on the first screen.
window_name = t("desktop.window_name")
self.window.set_property("window-name", window_name)
self.window.get_accessible().set_name(window_name)
self.builder.get_object("fws_desktop_desc").set_text(t("desktop.intro"))
for key, label in _choices():
radio = self._radios.get(key)
if radio is not None:
radio.set_label(label)
# Coche le bouton correspondant au choix courant.
rb = (self._radios.get(self._choice)
or self._radios.get(self._DEFAULT_CHOICE))
@@ -95,10 +119,10 @@ class FWSDesktopSpoke(NormalSpoke):
@property
def status(self):
for key, label in _CHOICES:
for key, label in _choices():
if key == self._choice:
return label
return _("Command line only (no desktop)")
return t("desktop.choice_cli")
@property
def completed(self):
@@ -0,0 +1,118 @@
# FWS — translations of the FWS parts of the installer.
#
# Anaconda translates its own screens through gettext; the FWS screens are not
# in its catalogs. Their texts live in ONE TOML file (one table per message,
# one entry per language) and are looked up with t("key").
#
# t() reads $LANG on every call: Anaconda stores the language picked on the
# first screen there (and clears LANGUAGE/LC_ALL/LC_MESSAGES). A screen that
# sets its texts each time it is shown therefore follows a language change made
# by going back to the first screen.
#
# Not a spoke: Anaconda imports every module of this folder while collecting
# spokes, and an empty __all__ keeps this one out of the collection.
import os
import tomllib
try:
from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)
except ImportError:
# Loaded by path from /usr/local/bin/fws-i18n, outside Anaconda.
import logging
log = logging.getLogger(__name__)
__all__ = []
TRANSLATIONS_FILE = "/usr/local/share/fws/installer-translations.toml"
FALLBACK_LANGUAGE = "en"
_cache = {"mtime": None, "messages": {}}
_reported = set()
def _flatten(table, prefix=""):
"""Yield (key, {language: text}) for every message of the TOML tree."""
texts = {name: value for name, value in table.items() if isinstance(value, str)}
if texts and prefix:
yield prefix, texts
for name, value in table.items():
if isinstance(value, dict):
yield from _flatten(value, f"{prefix}.{name}" if prefix else name)
def _messages():
try:
mtime = os.stat(TRANSLATIONS_FILE).st_mtime
except OSError:
return {}
if _cache["mtime"] != mtime:
try:
with open(TRANSLATIONS_FILE, "rb") as fh:
_cache["messages"] = dict(_flatten(tomllib.load(fh)))
except (OSError, tomllib.TOMLDecodeError) as exc:
# A broken file must not take the installer down: keys are shown
# instead of texts, which is visible but harmless.
log.error("FWS: unreadable translations file %s: %s", TRANSLATIONS_FILE, exc)
_cache["messages"] = {}
_cache["mtime"] = mtime
return _cache["messages"]
def language_candidates(locale_name=None):
"""Languages to try, most specific first, always ending with the fallback.
"sr_RS.UTF-8@latin" -> sr_RS@latin, sr@latin, sr_RS, sr, en
"fr_CH.UTF-8" -> fr_CH, fr, en
"""
if locale_name is None:
locale_name = os.environ.get("LANG", "")
base, _, modifier = locale_name.partition("@")
base = base.split(".", 1)[0]
language, _, territory = base.partition("_")
suffix = f"@{modifier}" if modifier else ""
candidates = []
if territory:
candidates.append(f"{language}_{territory}{suffix}")
candidates.append(f"{language}{suffix}")
if suffix:
if territory:
candidates.append(f"{language}_{territory}")
candidates.append(language)
candidates.append(FALLBACK_LANGUAGE)
return [c for c in dict.fromkeys(candidates) if c]
def t(key, **fields):
"""Text of `key` in the installer's current language.
Named `fields` fill the {placeholders} of the text. An unknown key is
returned as is, so a missing translation shows up on screen instead of
crashing the installer.
"""
texts = _messages().get(key)
text = None
if texts:
for language in language_candidates():
text = texts.get(language)
if text:
break
if not text:
if key not in _reported:
_reported.add(key)
log.warning("FWS: no translation for key %s", key)
return key
if not fields:
return text
try:
return text.format(**fields)
except (KeyError, IndexError, ValueError) as exc:
# A translation with a wrong placeholder: fall back to the reference
# text rather than showing nothing.
log.warning("FWS: bad placeholders in %s: %s", key, exc)
reference = texts.get(FALLBACK_LANGUAGE, key)
try:
return reference.format(**fields)
except (KeyError, IndexError, ValueError):
return reference
@@ -49,6 +49,7 @@ from gi.repository import GLib, Gtk
from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__)
@@ -95,9 +96,9 @@ def _split_escaped(line):
class FWSNetworkStandaloneSpoke(StandaloneSpoke):
"""Choix simple du réseau (Ethernet / Wi-Fi + mot de passe) avant le hub."""
builderObjects = ["fwsNetworkWindow", "netTitle", "netList", "netFeedback",
"pwPanel", "pwTitle", "pwEntry", "pwShow", "pwConnect",
"refreshButton"]
builderObjects = ["fwsNetworkWindow", "netTitle", "netHint", "listTitle",
"netList", "netFeedback", "pwPanel", "pwTitle", "pwEntry",
"pwShow", "pwConnect", "refreshButton"]
mainWidgetName = "fwsNetworkWindow"
uiFile = "spokes/fws_network.glade"
@@ -126,8 +127,6 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
def initialize(self):
StandaloneSpoke.initialize(self)
self._title = self.builder.get_object("netTitle")
self._title.set_markup(
'<span size="x-large"><b>Connexion à Internet</b></span>')
self._list = self.builder.get_object("netList")
self._list.connect("row-selected", self._on_row_selected)
self._feedback = self.builder.get_object("netFeedback")
@@ -163,7 +162,24 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
def _on_continue_clicked(self, *_args):
self.apply()
def _set_static_texts(self):
# Set here rather than in initialize(): the screen is built once, but
# the user can go back to the language screen and pick another one.
self.window.set_property("window-name", t("network.window_name"))
self._title.set_markup(
'<span size="x-large"><b>'
f'{GLib.markup_escape_text(t("network.title"))}</b></span>')
self.builder.get_object("netHint").set_text(t("network.hint"))
self.builder.get_object("listTitle").set_text(t("network.list_title"))
self.builder.get_object("refreshButton").set_label(
t("network.refresh_button"))
self.builder.get_object("pwShow").set_label(t("network.show_password"))
self.builder.get_object("pwConnect").set_label(
t("network.connect_button"))
self._entry.set_placeholder_text(t("network.password_placeholder"))
def refresh(self):
self._set_static_texts()
# À chaque entrée sur l'écran : liste à jour + état courant.
self._build_list(rescan=False)
# Cache Wi-Fi souvent vide au tout premier affichage (NM n'a pas
@@ -261,21 +277,23 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
for iface, state in eth:
if state == "connected":
had_conn = True
add_row("eth", "Ethernet (câble)", "Connecté ✓",
add_row("eth", t("network.row_ethernet"),
t("network.row_connected"),
{"kind": "eth", "iface": iface, "state": state},
inuse=True)
elif state == "disconnected":
add_row("eth", "Ethernet (câble)", "Cliquer pour se connecter",
add_row("eth", t("network.row_ethernet"),
t("network.row_click_to_connect"),
{"kind": "eth", "iface": iface, "state": state})
# "unavailable" = pas de câble : inutile de l'afficher.
for n in wifi:
if n["inuse"]:
had_conn = True
detail = "Connecté ✓"
detail = t("network.row_connected")
elif n["secured"]:
detail = f"{n['signal']} % · sécurisé"
detail = t("network.row_wifi_secured", signal=n["signal"])
else:
detail = f"{n['signal']} % · ouvert"
detail = t("network.row_wifi_open", signal=n["signal"])
add_row("wifi", n["ssid"], detail,
{"kind": "wifi", "ssid": n["ssid"],
"secured": n["secured"]}, inuse=n["inuse"])
@@ -283,19 +301,14 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
# Message d'état global.
active_wifi = self._active_wifi_ssid()
if active_wifi:
self._show_feedback(f"Connecté au Wi-Fi « {active_wifi} » ✓ — "
"vous pouvez continuer.", _GREEN)
self._show_feedback(
t("network.wifi_connected", ssid=active_wifi), _GREEN)
elif had_conn:
self._show_feedback("Connecté à Internet (Ethernet) ✓ — "
"vous pouvez continuer.", _GREEN)
self._show_feedback(t("network.ethernet_online"), _GREEN)
elif not self._networks:
self._show_feedback(
"Aucun réseau détecté. Vérifiez que le Wi-Fi est activé, "
"branchez un câble Ethernet, ou cliquez « Rafraîchir ».", _RED)
self._show_feedback(t("network.no_network"), _RED)
else:
self._show_feedback(
"Cliquez sur un réseau Wi-Fi pour vous connecter "
"(ou branchez un câble Ethernet).", _GREY)
self._show_feedback(t("network.pick_network"), _GREY)
self._hide_password_panel()
def _show_feedback(self, text, color=_GREY):
@@ -314,21 +327,21 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
if meta["kind"] == "eth":
if meta["state"] == "connected":
self._show_feedback(
"Ethernet déjà connecté — vous pouvez continuer.", _GREEN)
t("network.ethernet_already_connected"), _GREEN)
else:
self._connect_eth(meta["iface"])
return
# Wi-Fi
if meta["inuse"]:
self._show_feedback(
f"Vous êtes déjà connecté au Wi-Fi « {meta['ssid']} ».",
t("network.wifi_already_connected", ssid=meta["ssid"]),
_GREEN)
return
self._current_ssid = meta["ssid"]
if meta["secured"]:
self._pw_title.set_markup(
f'Mot de passe du réseau Wi-Fi « '
f'<b>{GLib.markup_escape_text(meta["ssid"])}</b> » :')
self._pw_title.set_markup(t(
"network.password_prompt",
ssid=GLib.markup_escape_text(meta["ssid"])))
self._entry.set_text("")
self._entry.set_editable(True)
self._entry.set_visibility(
@@ -336,15 +349,14 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._panel.show()
self._entry.grab_focus()
self._show_feedback(
f"Tapez le mot de passe de « {meta['ssid']} » puis cliquez "
"« Se connecter ».", _GREY)
t("network.type_password", ssid=meta["ssid"]), _GREY)
else:
self._connect_wifi(meta["ssid"], None)
def _refresh_clicked(self):
if self._busy:
return
self._show_feedback("Recherche des réseaux…", _GREY)
self._show_feedback(t("network.searching"), _GREY)
self._set_busy(True, list_only=True)
threading.Thread(target=self._refresh_worker, daemon=True).start()
@@ -364,18 +376,19 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
return
password = self._entry.get_text()
if not password:
self._show_feedback("Tapez d'abord le mot de passe.", _RED)
self._show_feedback(t("network.password_missing"), _RED)
return
self._connect_wifi(self._current_ssid, password)
def _connect_eth(self, iface):
self._show_feedback(f"Connexion Ethernet ({iface})…", _GREY)
self._show_feedback(
t("network.ethernet_connecting", iface=iface), _GREY)
self._set_busy(True)
threading.Thread(target=self._eth_worker, args=(iface,),
daemon=True).start()
def _connect_wifi(self, ssid, password):
self._show_feedback(f"Connexion au Wi-Fi « {ssid} »…", _GREY)
self._show_feedback(t("network.wifi_connecting", ssid=ssid), _GREY)
self._set_busy(True)
threading.Thread(target=self._wifi_worker, args=(ssid, password),
daemon=True).start()
@@ -405,8 +418,7 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._current_ssid = None
self._hide_password_panel()
self._show_feedback(
f"Connecté au Wi-Fi « {name} » ✓ — vous pouvez "
"continuer.", _GREEN)
t("network.wifi_connected", ssid=name), _GREEN)
# Marqueur pour le %post (profils NM vers la cible).
try:
with open(_KEEP_WIFI, "w") as fh:
@@ -414,14 +426,12 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
except OSError:
pass
else:
self._show_feedback(
"Ethernet connecté ✓ — vous pouvez continuer.", _GREEN)
self._show_feedback(t("network.ethernet_connected"), _GREEN)
self._build_list(rescan=False) # marque « Connecté ✓ » + état
else:
if kind == "wifi":
self._show_feedback(
f"Connexion à « {name} » impossible : mot de passe "
"incorrect, ou réseau hors de portée. Réessayez.", _RED)
t("network.wifi_failed", ssid=name), _RED)
if password is not None:
# On garde la main sur le champ pour corriger.
self._current_ssid = name
@@ -432,9 +442,7 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._panel.show()
self._entry.grab_focus()
else:
self._show_feedback(
"Connexion Ethernet impossible (câble débranché ?).",
_RED)
self._show_feedback(t("network.ethernet_failed"), _RED)
return False
# ------------------------------------------------------------ helpers --
@@ -50,29 +50,38 @@ from pyanaconda.modules.common.structures.user import UserData
from pyanaconda.ui.gui import GraphicalUserInterface
from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__)
__all__ = ["FWSRecapSpoke"]
# Doit rester aligné sur le %post du kickstart (étape « Bureau choisi ») et
# sur les libellés de la spoke fws_desktop.
_DESKTOP_LABELS = {
"cli": "ligne de commande uniquement (aucun bureau)",
"gnome": "GNOME (+ Firefox, GDM)",
"kde": "KDE Plasma (+ Firefox, SDDM)",
"hyprland": "Hyprland — Wayland, non compatible VR (+ Firefox, SDDM)",
"i3": "i3 — X11, compatible VR/SteamVR (+ Firefox, SDDM)",
"xfce": "XFCE (+ Firefox, SDDM)",
}
def _desktop_label(desk):
# Built on each call rather than kept as a module constant, so the labels
# follow a language changed on the first screen.
labels = {
"cli": t("recap.desktop_cli"),
"gnome": t("recap.desktop_gnome"),
"kde": t("recap.desktop_kde"),
"hyprland": t("recap.desktop_hyprland"),
"i3": t("recap.desktop_i3"),
"xfce": t("recap.desktop_xfce"),
}
return labels.get(desk, desk)
_PARTITIONING_LABELS = {
"AUTOMATIC": "automatique (recommandé)",
"INTERACTIVE": "personnalisé (assistant)",
"CUSTOM": "personnalisé",
"BLIVET": "avancé (blivet-gui)",
"MANUAL": "points de montage manuels",
}
def _partitioning_label(method):
labels = {
"AUTOMATIC": t("recap.partitioning_automatic"),
"INTERACTIVE": t("recap.partitioning_interactive"),
"CUSTOM": t("recap.partitioning_custom"),
"BLIVET": t("recap.partitioning_blivet"),
"MANUAL": t("recap.partitioning_manual"),
}
return labels.get(method, method)
def _safe(getter, default):
@@ -108,67 +117,82 @@ def _config_lines():
lang = _safe(lambda: LOCALIZATION.get_proxy().Language, "")
if lang:
lines.append(f" • Langue : {lang}")
lines.append((t("recap.row_language"), lang))
layouts = _safe(lambda: list(LOCALIZATION.get_proxy().XLayouts), [])
if layouts:
lines.append(f" • Clavier (X11) : {', '.join(layouts)}")
lines.append((t("recap.row_keyboard"), ", ".join(layouts)))
tz = _safe(lambda: TIMEZONE.get_proxy().Timezone, "")
if tz:
ntp = _safe(lambda: TIMEZONE.get_proxy().NTPEnabled, None)
suffix = {True: " — synchronisation NTP activée",
False: " — synchronisation NTP désactivée"}.get(ntp, "")
lines.append(f" • Fuseau horaire : {tz}{suffix}")
tz_txt = {True: t("recap.timezone_ntp_on", timezone=tz),
False: t("recap.timezone_ntp_off", timezone=tz)}.get(ntp, tz)
lines.append((t("recap.row_timezone"), tz_txt))
users = _safe(
lambda: UserData.from_structure_list(USERS.get_proxy().Users), [])
if users:
names = ", ".join(u.name for u in users if u.name)
lines.append(f" • Utilisateur(s) : {names} (sudo via wheel)")
lines.append((t("recap.row_users"), t("recap.users_value", users=names)))
else:
lines.append(" • Utilisateur(s) : AUCUN — pensez-y avant de lancer !")
lines.append((t("recap.row_users"), t("recap.users_none")))
root_locked = _safe(lambda: USERS.get_proxy().IsRootAccountLocked, None)
root_pw = _safe(lambda: USERS.get_proxy().IsRootPasswordSet, None)
if root_locked:
root_txt = "verrouillé (recommandé)"
root_txt = t("recap.root_locked")
elif root_pw:
root_txt = "actif, mot de passe défini"
root_txt = t("recap.root_password_set")
elif root_pw is not None:
# Même règle que l'étape « Sécurité » du %post : un root resté sans
# mot de passe sera verrouillé en fin d'installation.
root_txt = "sans mot de passe → sera VERROUILLÉ en fin d'install"
root_txt = t("recap.root_no_password")
else:
root_txt = ""
if root_txt:
lines.append(f" • Compte root : {root_txt}")
lines.append((t("recap.row_root"), root_txt))
# Hostname : écrit par le spoke Utilisateur (patch user.py du paquet
# anaconda). Même nettoyage / même défaut que le %post --nochroot.
hn = "".join(c for c in _read_flag("/tmp/fws-hostname")
if c.isalnum() or c in "._-") or "fws"
lines.append(f" • Nom de machine : {hn}")
lines.append((t("recap.row_hostname"), hn))
# Bureau : écrit par fws_desktop.apply() (sortie de la spoke). Absent =
# spoke jamais visitée = « cli », exactement le défaut du %post.
desk = _read_flag("/tmp/fws-desktop") or "cli"
lines.append(f" • Bureau : {_DESKTOP_LABELS.get(desk, desk)}")
lines.append((t("recap.row_desktop"), _desktop_label(desk)))
method = _safe(
lambda: STORAGE.get_proxy(
STORAGE.get_proxy().AppliedPartitioning).PartitioningMethod, "")
if method:
lines.append(" • Partitionnement : "
f"{_PARTITIONING_LABELS.get(method, method)}")
lines.append((t("recap.row_partitioning"), _partitioning_label(method)))
return lines, desk, method
def _format_rows(rows, width):
"""Lay out (label, value) pairs as " • label : value" lines."""
# Labels are padded to the longest one of the current language so the
# values line up in the monospace view; the line breaks a translation
# puts in a value continue under the value column.
lines = []
for label, value in rows:
prefix = f" • {label:<{width}} : "
lines.append(prefix + value.replace("\n", "\n" + " " * len(prefix)))
return "\n".join(lines)
def _indent(text):
# Translations keep their own line breaks; the indentation is layout and
# stays here.
return "\n".join(" " + line for line in text.splitlines())
def _build_summary():
config_lines, desk, method = _config_lines()
config_text = "\n".join(config_lines) \
or " (configuration non disponible)"
# Disques ciblés par l'installation (spoke « Destination »).
selected = set(_safe(
@@ -177,70 +201,71 @@ def _build_summary():
for line in _capture("lsblk", "-dno", "NAME,SIZE,MODEL,TYPE").splitlines():
fields = line.split()
if fields and fields[-1] == "disk":
mark = " ← CIBLE de l'installation" if fields[0] in selected else ""
disks.append(" • " + " ".join(fields[:-1]) + mark)
disk_text = "\n".join(disks) or " (aucun disque détecté)"
disk = " ".join(fields[:-1])
if fields[0] in selected:
disk = t("recap.disk_target", disk=disk)
disks.append(" • " + disk)
disk_text = "\n".join(disks) or _indent(t("recap.no_disk"))
if method == "AUTOMATIC":
disk_warn = (
" ⚠ Rien n'a encore été écrit. Le partitionnement automatique\n"
" EFFACERA ENTIÈREMENT le(s) disque(s) cible(s) au lancement.")
disk_warn = _indent(t("recap.disk_warning_automatic"))
else:
disk_warn = (
" ⚠ Rien n'a encore été écrit. Au lancement, ce sont vos choix\n"
" de partitionnement faits dans l'installateur qui s'appliqueront.")
disk_warn = _indent(t("recap.disk_warning_manual"))
virt = (_capture("systemd-detect-virt").strip().splitlines() or ["none"])[0]
if virt in ("", "none"):
virt = "aucune (machine physique)"
virt = t("recap.virtualization_none")
gpus = []
for line in _capture("lspci").splitlines():
low = line.lower()
if ("vga" in low or "3d" in low or "display" in low) and ":" in line:
gpus.append(" • " + line.split(":", 2)[-1].strip())
gpu_text = "\n".join(gpus) or " (aucune carte graphique détectée)"
gpu_text = "\n".join(gpus) or _indent(t("recap.no_gpu"))
try:
net_ok = util.execWithRedirect("ip", ["route", "get", "1.1.1.1"]) == 0
except (OSError, RuntimeError):
net_ok = False
if net_ok:
net = "disponible ✔"
net = t("recap.network_ok")
else:
net = ("INDISPONIBLE ✖ — bureau, drivers et stack FWS ne\n"
" s'installeront PAS (rattrapable au 1er boot)")
net = t("recap.network_down")
extras = ("Steam, Wine, VR (Monado/OpenXR), PacManager"
if desk != "cli" else "rien de plus (choix CLI)")
extras = (t("recap.extras_desktop")
if desk != "cli" else t("recap.extras_cli"))
hardware_lines = [(t("recap.row_virtualization"), virt),
(t("recap.row_network"), net)]
width = max(len(label) for label, _ in config_lines + hardware_lines)
config_text = _format_rows(config_lines, width) \
or _indent(t("recap.config_unavailable"))
return f"""\
══════════════════════════════════════════════════════════
FWS — RÉCAPITULATIF AVANT INSTALLATION
{t("recap.summary_title")}
══════════════════════════════════════════════════════════
CONFIGURATION CHOISIE
{t("recap.section_config")}
{config_text}
DISQUES
{t("recap.section_disks")}
{disk_warn}
{disk_text}
MATÉRIEL DÉTECTÉ
• Virtualisation : {virt}
• Réseau : {net}
Cartes graphiques (drivers installés automatiquement en fin d'install) :
{t("recap.section_hardware")}
{_format_rows(hardware_lines, width)}
{t("recap.gpus_heading")}
{gpu_text}
DÉROULEMENT DE L'INSTALLATION
1. Partitionnement, puis copie du système live FWS (payload LiveOS)
2. Noyau + initramfs régénérés (mkinitcpio), GRUB installé
3. Bureau choisi + navigateur installés (réseau requis)
4. Matériel : drivers GPU, outils VM, son, Bluetooth, Podman
+ si bureau choisi : {extras}
{t("recap.section_steps")}
1. {t("recap.step_partitioning")}
2. {t("recap.step_kernel")}
3. {t("recap.step_desktop")}
4. {t("recap.step_hardware")}
{t("recap.step_hardware_extras", extras=extras)}
« Précédent » pour revenir modifier vos choix —
« Lancer l'installation » pour démarrer réellement l'installation.
{t("recap.footer")}
"""
@@ -270,9 +295,6 @@ class FWSRecapSpoke(StandaloneSpoke):
def initialize(self):
StandaloneSpoke.initialize(self)
# Le bouton « continuer » de CETTE page est le vrai déclencheur :
# l'écran suivant (ProgressSpoke) démarre la file d'installation.
self.window.get_continue_button().set_label("_Lancer l'installation")
# Capture pour « Précédent » : initialize() est appelé DEPUIS
# GraphicalUserInterface._on_continue_clicked (clic « Commencer
@@ -302,7 +324,8 @@ class FWSRecapSpoke(StandaloneSpoke):
# (à côté de « Quitter » — leur parent est la GtkButtonBox du bas).
quit_button = self.window.get_quit_button()
button_box = quit_button.get_parent()
self._back_button = Gtk.Button.new_with_mnemonic("_Précédent")
# Label set by _set_static_texts() on each display.
self._back_button = Gtk.Button(use_underline=True)
self._back_button.connect("clicked", self._on_back_clicked)
button_box.add(self._back_button)
# [Quitter, Lancer l'installation, Précédent] -> Précédent au MILIEU,
@@ -338,8 +361,18 @@ class FWSRecapSpoke(StandaloneSpoke):
hub.entered.emit(hub)
ui._currentAction = hub
def _set_static_texts(self):
# Set here rather than in initialize(): the user can go back to the
# language screen and pick another language before coming back.
self.window.set_property("window-name", t("recap.window_name"))
# Le bouton « continuer » de CETTE page est le vrai déclencheur :
# l'écran suivant (ProgressSpoke) démarre la file d'installation.
self.window.get_continue_button().set_label(t("recap.start_button"))
self._back_button.set_label(t("wizard.back"))
def refresh(self):
StandaloneSpoke.refresh(self)
self._set_static_texts()
text = _build_summary()
self.builder.get_object("recapView").get_buffer().set_text(text)
# Copie pour le harnais de debug du .xinitrc (fws-debug.txt).
@@ -45,6 +45,7 @@ from gi.repository import GLib, Gtk
from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__)
@@ -64,18 +65,6 @@ _GREEN = "#1e7145"
_RED = "#b3261e"
_GREY = "#555555"
# Le vrai recours de dernier ressort, et ses conséquences. Dit en clair : une
# utilisatrice débutante a qualifié de « flippant » le fait de ne pas savoir ce
# qui se passait — l'inverse de rassurer, c'est cacher, pas expliquer.
_BIOS_FALLBACK = (
"Il reste une solution, dans le BIOS de la machine : cherche le réglage de "
"stockage (souvent « SATA Mode », « Intel RST » ou « Optane ») et choisis "
"« AHCI », puis redémarre sur la clé FWS.\n\n"
"À savoir si Windows est installé sur cette machine : après ce changement, "
"Windows ne démarrera plus tant que le réglage n'est pas remis comme avant. "
"Si tu veux garder Windows, mieux vaut demander de l'aide avant d'y toucher."
)
def _run_engine(args, timeout=180):
"""Lance le moteur. Renvoie (code, sortie). Jamais d'exception vers l'UI."""
@@ -117,6 +106,10 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._status, self._details = self._detect()
self._busy = False
self._resolved = False
self._failed = False
# The step of the status line is kept rather than its text, so that
# refresh() can show it again in a language picked since.
self._step = None
# -------------------------------------------------------------- moteur --
@staticmethod
@@ -152,13 +145,10 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._spinner = self.builder.get_object("rstSpinner")
self._status_label = self.builder.get_object("rstStatus")
self._fallback = self.builder.get_object("rstFallback")
self._expander = self.builder.get_object("rstExpander")
self._log = self.builder.get_object("rstLog")
self._button.connect("clicked", self._on_fix_clicked)
self._title.set_markup(
'<span size="x-large"><b>%s</b></span>'
% GLib.markup_escape_text(self._headline()))
self._intro.set_text(self._explanation())
self._append(self._details)
# « Précédent » vers l'écran réseau, comme depuis la première étape de
@@ -171,6 +161,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
def refresh(self):
StandaloneSpoke.refresh(self)
self._set_texts()
# Continuer reste TOUJOURS possible : si la prise en charge échoue,
# l'utilisateur doit pouvoir avancer (l'écran « Destination » dira
# qu'aucun disque n'a été trouvé) ou revenir en arrière. Un écran dont
@@ -181,33 +172,62 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
def apply(self):
pass
def _set_texts(self):
"""Set every text of the screen in the installer's current language.
Called on each display, not once from initialize(): the user may go
back to the first screen and pick another language.
"""
self.window.set_property("window-name", t("rst.window_name"))
self._title.set_markup(
'<span size="x-large"><b>%s</b></span>'
% GLib.markup_escape_text(self._headline()))
self._intro.set_text(self._explanation())
self._button.set_label(t("rst.retry_button") if self._failed
else t("rst.fix_button"))
self._expander.set_label(t("rst.details_expander"))
# Le vrai recours de dernier ressort, et ses conséquences. Dit en
# clair : une utilisatrice débutante a qualifié de « flippant » le fait
# de ne pas savoir ce qui se passait — l'inverse de rassurer, c'est
# cacher, pas expliquer.
# Set even while hidden: _finish() only has to show it.
self._fallback.set_text(t("rst.bios_fallback"))
self._set_status(self._step)
def _headline(self):
if self._status == "raid":
return "Tes disques sont regroupés en RAID Intel"
return "Ton disque n'est pas encore visible"
return t("rst.title_raid")
return t("rst.title_hidden")
def _explanation(self):
if self._resolved:
return t("rst.intro_resolved")
if self._status == "raid":
return (
"Sur cette machine, plusieurs disques sont regroupés en un seul "
"volume par la carte mère (« RAID Intel »). FWS sait s'en servir, "
"mais il doit d'abord préparer ce qu'il faut pour que la machine "
"redémarre dessus après l'installation.\n\n"
"Clique sur le bouton : rien n'est effacé à cette étape, et tu "
"n'as rien à changer dans le BIOS.")
return (
"Cette machine range son disque derrière une technologie Intel "
"appelée RST (elle s'appelle parfois « Optane » ou « RAID » dans le "
"BIOS). C'est pour ça qu'aucun disque n'apparaît pour l'instant.\n\n"
"FWS sait s'en occuper : clique sur le bouton. Rien n'est effacé à "
"cette étape, et tu n'as rien à changer dans le BIOS.")
return t("rst.intro_raid")
return t("rst.intro_hidden")
# ----------------------------------------------------------- affichage --
def _set_status(self, text, color=_GREY):
def _set_status(self, step):
self._step = step
if step is None:
return
text, color = self._status_message(step)
self._status_label.set_markup(
'<span foreground="%s">%s</span>'
% (color, GLib.markup_escape_text(text)))
@staticmethod
def _status_message(step):
if step == "working":
return t("rst.status_working"), _GREY
if step == "rescanning":
return t("rst.status_rescanning"), _GREY
if step == "visible":
return t("rst.status_visible"), _GREEN
if step == "visible_rescan_hint":
return t("rst.status_visible_rescan_hint"), _GREEN
return t("rst.status_failed"), _RED
def _append(self, text):
if not text:
return
@@ -223,8 +243,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._fallback.hide()
self._spinner.show()
self._spinner.start()
self._set_status("Préparation du disque… quelques secondes, il n'y a "
"rien à faire.")
self._set_status("working")
threading.Thread(target=self._work, daemon=True).start()
def _work(self):
@@ -242,9 +261,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
# Le moteur a rendu la main sur un état exploitable : Anaconda doit
# REFAIRE son inventaire, sinon l'écran « Destination » resterait
# sur la liste vide construite au démarrage de l'installateur.
GLib.idle_add(self._set_status,
"Le disque répond. Mise à jour de la liste des "
"disques…", _GREY)
GLib.idle_add(self._set_status, "rescanning")
rescanned = self._rescan_storage()
GLib.idle_add(self._finish, True, rescanned)
else:
@@ -263,7 +280,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
# ré-analyse, et le disque est de toute façon visible du noyau.
log.warning("FWS: nouveau scan des disques impossible : %s", exc)
GLib.idle_add(self._append,
"[FWS] nouveau scan automatique impossible : %s" % exc)
t("rst.rescan_failed_details", error=exc))
return False
def _finish(self, success, rescanned):
@@ -273,22 +290,16 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
if success:
self._resolved = True
message = "C'est bon, ton disque est visible."
if not rescanned:
# Honnête plutôt que faussement rassurant : on dit quoi faire.
message += (" Si l'écran suivant ne le montre pas, utilise "
"« Ré-analyser les disques » à cette étape.")
self._set_status("visible_rescan_hint")
else:
message += " Tu peux continuer."
self._set_status(message, _GREEN)
self._intro.set_text(
"FWS se souviendra de ce réglage pour le système installé : la "
"machine redémarrera bien sur son disque après l'installation.")
self._set_status("visible")
self._intro.set_text(self._explanation())
self._button.hide()
else:
self._set_status(
"FWS n'a pas réussi à rendre le disque visible.", _RED)
self._fallback.set_text(_BIOS_FALLBACK)
self._failed = True
self._set_status("failed")
self._fallback.show()
self._button.set_sensitive(True)
self._button.set_label("Réessayer")
self._button.set_label(t("rst.retry_button"))
@@ -50,12 +50,15 @@
# en cas d'échec, on retombe sur le hub classique, l'installation reste possible.
# ⚠ Chemin couplé à la version de Python d'Arch (3.14), comme les autres spokes.
import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__)
@@ -67,18 +70,16 @@ __all__ = []
_WIZARD_ORDER = (
"DatetimeSpoke", # Date et heure
"StorageSpoke", # Destination de l'installation (disque)
"FWSDesktopSpoke", # Bureau FWS
"UserSpoke", # Compte utilisateur + nom de machine
"PasswordSpoke", # Mot de passe administrateur (root)
"FWSDesktopSpoke", # Bureau FWS
)
# Le bouton du coin haut-gauche des écrans d'Anaconda s'appelle « Terminé » :
# dans un assistant, c'est le bouton « suivant ».
_NEXT_LABEL = "_Suivant"
_BACK_LABEL = "_Précédent"
_DONE_BUTTON_NAME = "anaconda-spoke-window-done"
_WAIT_MSG = "Analyse du matériel en cours, l'écran suivant s'ouvre tout seul…"
# Read by /root/.xinitrc once the installer has closed.
_LANGUAGE_FILE = "/tmp/fws-lang"
# Écrans standalone situés JUSTE AVANT le bloc du hub : c'est là que
# « Précédent » doit mener depuis la première étape de l'assistant. De là, leur
@@ -176,12 +177,49 @@ def _hook_welcome_spoke():
_apply_live_keyboard()
except Exception: # pylint: disable=broad-except
log.exception("FWS: application du clavier au live impossible.")
# The live session's dialogs shown after the installer has closed
# (/root/.xinitrc) speak this language too, and by then the
# installer's environment is gone: leave it in a file.
try:
with open(_LANGUAGE_FILE, "w", encoding="utf-8") as fh:
fh.write(os.environ.get("LANG", ""))
except OSError:
log.warning("FWS: impossible d'écrire %s.", _LANGUAGE_FILE)
spoke_class.apply = apply
spoke_class._fws_keyboard_hooked = True
log.info("FWS: clavier du live branché sur l'écran de langue.")
def _hook_user_spoke():
"""Translates the host name field that the FWS anaconda package adds.
That field comes from a patch of user.glade in the anaconda package, so its
texts are in none of Anaconda's catalogs: they come from ours, set on each
display like the FWS screens.
"""
from pyanaconda.ui.gui.spokes import user as user_module
spoke_class = user_module.UserSpoke
if getattr(spoke_class, "_fws_i18n_hooked", False):
return
original_refresh = spoke_class.refresh
def refresh(self, *args, **kwargs):
result = original_refresh(self, *args, **kwargs)
label = self.builder.get_object("hostname_label")
if label is not None:
label.set_text_with_mnemonic(t("user.hostname_label"))
entry = self.builder.get_object("hostname_entry")
if entry is not None:
entry.get_accessible().set_name(t("user.hostname_accessible"))
return result
spoke_class.refresh = refresh
spoke_class._fws_i18n_hooked = True
# --------------------------------------------------------------------------
# Assistant : le hub Résumé enchaîne ses écrans au lieu de les proposer
# --------------------------------------------------------------------------
@@ -203,6 +241,21 @@ def _really_show(widget):
widget.show()
def _follow_language(button, text):
# These buttons are created once per screen, but the user can change the
# language (back to the first screen) before the screen is shown again.
# "map" is emitted each time the screen becomes visible, whatever path led
# there, so the label is re-read from text() at that moment.
def relabel(widget):
label = text()
if widget.get_label() != label:
widget.set_label(label)
button.set_use_underline(True)
relabel(button)
button.connect("map", relabel)
def _build_nav_bar(spoke, on_back):
"""Barre de navigation « Précédent / Suivant » en BAS À DROITE.
@@ -236,7 +289,8 @@ def _build_nav_bar(spoke, on_back):
box.set_margin_end(6)
box.set_margin_bottom(6)
back = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
back = Gtk.Button()
_follow_language(back, lambda: t("wizard.back"))
back.connect("clicked", lambda _button: on_back(spoke))
box.add(back)
@@ -244,8 +298,7 @@ def _build_nav_bar(spoke, on_back):
# La variable Python garde une référence forte : le retrait du GtkGrid
# ne peut donc pas détruire le bouton avant qu'on le rattache.
window.get_nav_area().remove(done)
done.set_use_underline(True)
done.set_label(_NEXT_LABEL)
_follow_language(done, lambda: t("wizard.next"))
box.add(done)
window.get_main_box().pack_start(box, False, True, 0)
@@ -349,7 +402,8 @@ def add_back_button(spoke, target_class_name):
log.warning("FWS: barre de boutons introuvable, « Précédent » non ajouté.")
return None
button = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
button = Gtk.Button()
_follow_language(button, lambda: t("wizard.back"))
button.connect("clicked",
lambda _b: go_back_to_standalone(spoke, target_class_name))
button_box.add(button)
@@ -512,7 +566,7 @@ def _install_wizard():
# set_info, elle clignoterait 10 fois par seconde.
if getattr(self, "_fws_pending", None) is not spoke:
self._fws_pending = spoke
self.set_info(_WAIT_MSG)
self.set_info(t("wizard.wait_hardware_scan"))
return
self._fws_pending = None
@@ -647,6 +701,11 @@ try:
except Exception: # pylint: disable=broad-except
log.exception("FWS: clavier immédiat non branché (écran de langue inchangé).")
try:
_hook_user_spoke()
except Exception: # pylint: disable=broad-except
log.exception("FWS: champ « nom de machine » laissé non traduit.")
try:
_patch_main_window()
except Exception: # pylint: disable=broad-except
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env python3
"""Print an FWS installer text in the language of $LANG.
Usage: fws-i18n <key> [name=value ...]
Shell side of the installer translations: the live session (/root/.xinitrc)
shows dialogs after the installer has closed, in the language picked on its
first screen. Same file and same lookup as the installer screens, so a key is
translated once for both.
"""
import glob
import importlib.util
import sys
def main():
if len(sys.argv) < 2:
print(__doc__.strip().splitlines()[2], file=sys.stderr)
return 2
key = sys.argv[1]
fields = dict(arg.split("=", 1) for arg in sys.argv[2:] if "=" in arg)
text = key
# The module sits in Anaconda's folder, whose path follows Python's version.
for path in glob.glob("/usr/lib/python3*/site-packages/pyanaconda/ui/gui/spokes/fws_i18n.py"):
try:
spec = importlib.util.spec_from_file_location("fws_i18n", path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
text = module.t(key, **fields)
except Exception: # pylint: disable=broad-except
# A dialog with the key in it beats no dialog at all.
pass
break
print(text)
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -23,6 +23,7 @@
# that into one step per installation phase and a message that says which
# script is running and what it is doing.
#
import json
import os
import re
import threading
@@ -47,6 +48,18 @@ FWS_PROGRESS_POLL = 0.5
FWS_TITLE_PATTERN = re.compile(r"^#\s*FWS-TITLE:\s*(.+?)\s*$", re.MULTILINE)
def _fws_message(key, **fields):
"""Progress message carrying a translation key and its named fields.
Nothing is composed or translated in this module process: the texts are
FWS's, not Anaconda's gettext ones, and the progress spoke translates them
at display time in the language picked on the first screen. The message
reads "<key> <JSON fields>"; a field may itself be such a message or a key
published by a script, the spoke renders those first.
"""
return "%s %s" % (key, json.dumps(fields, ensure_ascii=False))
class _ProgressWatcher(threading.Thread):
"""Follow the progress published by the running kickstart script.
@@ -149,11 +162,15 @@ class RunScriptsTask(Task):
:param label: what is being done, in the installer language
"""
index, total, title = self._current_script
message = "%s — %s %%" % (label, percent)
if total > 1:
message = "Script %d/%d · %s" % (index, total, message)
message = _fws_message("fws:progress.script_phase", index=index,
total=total, label=label, percent=percent)
elif title:
message = "%s · %s" % (title, message)
message = _fws_message("fws:progress.titled_phase", title=title,
label=label, percent=percent)
else:
message = _fws_message("fws:progress.phase", label=label,
percent=percent)
step = min(self.steps, int(percent * self.steps / 100))
log.debug("FWS install progress: %s (step %s/%s)", message, step, self.steps)
@@ -166,7 +183,7 @@ class RunScriptsTask(Task):
match = FWS_TITLE_PATTERN.search(getattr(script, "script", "") or "")
if match:
return match.group(1)
return "Script %d" % index
return _fws_message("fws:progress.untitled_script", index=index)
def run(self):
"""Execute the task."""
@@ -179,7 +196,8 @@ class RunScriptsTask(Task):
# percentages published by the script itself, so it never runs
# ahead of what has actually been done.
self.report_progress(
"Script %d/%d · %s" % (index, total, self._current_script[2])
_fws_message("fws:progress.script_start", index=index,
total=total, title=self._current_script[2])
)
watcher = _ProgressWatcher(self)
@@ -0,0 +1,336 @@
#
# Copyright (C) 2011-2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY expressed or implied, including the implied warranties of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details. You should have received a copy of the
# GNU General Public License along with this program; if not, write to the
# Free Software Foundation, Inc., 31 Milk Street #960789 Boston, MA
# 02196 USA. Any Red Hat trademarks that are incorporated in the
# source code or documentation are not subject to the GNU General Public
# License and may only be used or replicated with the express permission of
# Red Hat, Inc.
#
# FWS: this file is an overlay of the upstream Anaconda spoke. The only
# addition is a "journal" toggle under the progress bar that reveals a live
# tail of the FWS installation logs: the %pre and %post --nochroot logs on
# the live, and the chrooted %post log on the target. Without it, a user who
# saw the bar stop could not tell a slow mirror from a crash short of
# switching to a console, and the failures that matter (no EFI partition,
# no initramfs) are written as CRITIQUE in exactly those files.
#
import json
import os
import gi
from pykickstart.constants import KS_REBOOT, KS_SHUTDOWN
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk
from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.core import util
from pyanaconda.core.configuration.anaconda import conf
from pyanaconda.core.constants import IPMI_FINISHED
from pyanaconda.core.i18n import C_, _
from pyanaconda.core.product import get_product_name
from pyanaconda.flags import flags
from pyanaconda.modules.common.constants.services import RUNTIME
from pyanaconda.modules.common.structures.reboot import RebootData
from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
from pyanaconda.ui.gui.utils import gtk_call_once
from pyanaconda.ui.lib.installation_progress_error import InstallationProgressErrorMixin
log = get_module_logger(__name__)
__all__ = ["ProgressSpoke"]
# Logs shown by the journal toggle, in the order the installation writes them.
# The target path is completed with conf.target.system_root at runtime.
FWS_LOGS = (
("fws:progress.log_pre", "/tmp/fws-pre.log"),
("fws:progress.log_post_nochroot", "/tmp/fws-post-nochroot.log"),
("fws:progress.log_post", "var/log/fws-post.log"),
)
FWS_LOG_POLL_MS = 1000
# A log that is already large when the view opens is shown from its tail.
FWS_LOG_BACKLOG = 256 * 1024
FWS_LOG_MAX_CHARS = 2_000_000
FWS_KEY_PREFIX = "fws:"
def _fws_render(message):
"""Text to show for a progress message, in the installer's language.
FWS messages are a translation key with the "fws:" prefix, optionally
followed by a space and a JSON object of named fields (see
pyanaconda/modules/runtime/scripts/runtime.py). They are translated here,
at display time, because t() follows the language picked on the first
screen, which Anaconda stores in this process's $LANG. String fields are
rendered first, so a script's own key can sit inside a composed message.
Anything else is shown as is: Anaconda's messages are already translated
by gettext, and a plain text from a script must keep working.
"""
if not message.startswith(FWS_KEY_PREFIX):
return message
key, _sep, payload = message[len(FWS_KEY_PREFIX):].partition(" ")
fields = {}
if payload:
try:
fields = json.loads(payload)
except ValueError:
return message
if not isinstance(fields, dict):
return message
fields = {name: _fws_render(value) if isinstance(value, str) else value
for name, value in fields.items()}
return t(key, **fields)
class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
"""
.. inheritance-diagram:: ProgressSpoke
:parts: 3
"""
builderObjects = ["progressWindow"]
mainWidgetName = "progressWindow"
uiFile = "spokes/installation_progress.glade"
postForHub = SummaryHub
@staticmethod
def get_screen_id():
"""Return a unique id of this UI screen."""
return "installation-progress"
def __init__(self, data, storage, payload):
super().__init__(data, storage, payload)
self._progressBar = self.builder.get_object("progressBar")
self._progressLabel = self.builder.get_object("progressLabel")
self._progressNotebook = self.builder.get_object("progressNotebook")
self._spinner = self.builder.get_object("progressSpinner")
self._task_proxy = None
self._fws_build_log_view()
@property
def completed(self):
"""This spoke is never completed, initially."""
return False
def apply(self):
"""There is nothing to apply."""
pass
def _on_installation_done(self):
log.debug("The installation has finished.")
# Stop the spinner.
gtk_call_once(self._spinner.stop)
gtk_call_once(self._spinner.hide)
# Finish the installation task. Re-raise tracebacks if any.
self._task_proxy.Finish()
util.ipmi_report(IPMI_FINISHED)
if conf.license.eula:
self.set_warning(_("Use of this product is subject to the license agreement "
"found at %s") % conf.license.eula)
self.window.show_all()
# Show the reboot message.
self._progressNotebook.set_current_page(1)
# Enable the continue button.
self.window.set_may_continue(True)
# Hide the quit button.
quit_button = self.window.get_quit_button()
quit_button.hide()
runtime_proxy = RUNTIME.get_proxy()
reboot_data = RebootData.from_structure(runtime_proxy.Reboot)
# kickstart install, continue automatically if reboot or shutdown selected
if flags.automatedInstall and reboot_data.action in [KS_REBOOT, KS_SHUTDOWN]:
self.window.emit("continue-clicked")
def initialize(self):
super().initialize()
# Disable the continue button.
self.window.set_may_continue(False)
# Set the label of the continue button.
if conf.target.is_hardware and conf.system.can_reboot:
continue_label = C_("GUI|Progress", "_Reboot System")
else:
continue_label = C_("GUI|Progress", "_Finish Installation")
continue_button = self.window.get_continue_button()
continue_button.set_label(continue_label)
# Set the reboot label.
if conf.target.is_hardware:
continue_text = _(
"%s is now successfully installed and ready for you to use!\n"
"Go ahead and reboot your system to start using it!"
) % get_product_name()
else:
continue_text = _(
"%s is now successfully installed and ready for you to use!\n"
"Go ahead and quit the application to start using it!"
) % get_product_name()
label = self.builder.get_object("rebootLabel")
label.set_text(continue_text)
# Don't show the reboot message.
self._progressNotebook.set_current_page(0)
def refresh(self):
from pyanaconda.core.dbus import DBus
from pyanaconda.core.threads import thread_manager
from pyanaconda.modules.common.constants.services import BOSS
super().refresh()
self._fws_set_toggle_label()
# Wait for background threads to finish
if thread_manager.running > 1:
log.debug("Waiting for %s threads to finish...", thread_manager.running - 1)
for name in thread_manager.names:
log.debug("Thread %s is still running", name)
thread_manager.wait_all()
log.debug("No more threads are running, continuing with installation.")
# Initialize the progress bar
gtk_call_once(self._progressBar.set_fraction, 0.0)
# Start the installation task via D-Bus
boss_proxy = BOSS.get_proxy()
task_path = boss_proxy.InstallWithTasks()[0]
self._task_proxy = DBus.get_proxy(BOSS.service_name, task_path)
self._task_proxy.ProgressChanged.connect(self._on_progress_changed)
self._task_proxy.ErrorRaised.connect(self._on_error_raised)
self._task_proxy.Stopped.connect(self._on_installation_done)
self._task_proxy.Start()
# Start the spinner
gtk_call_once(self._spinner.start)
log.debug("The installation has started.")
# ---- FWS: live journal -------------------------------------------------
def _fws_build_log_view(self):
box = self.builder.get_object("progressBox")
self._fws_toggle = Gtk.ToggleButton()
self._fws_set_toggle_label()
self._fws_toggle.set_halign(Gtk.Align.START)
self._fws_toggle.connect("toggled", self._fws_on_toggled)
box.pack_start(self._fws_toggle, False, False, 6)
self._fws_toggle.show()
self._fws_text = Gtk.TextView(editable=False, cursor_visible=False,
monospace=True)
self._fws_text.set_wrap_mode(Gtk.WrapMode.WORD_CHAR)
self._fws_buffer = self._fws_text.get_buffer()
self._fws_end = self._fws_buffer.create_mark(
None, self._fws_buffer.get_end_iter(), False)
self._fws_scroll = Gtk.ScrolledWindow(vexpand=True, hexpand=True)
self._fws_scroll.set_policy(Gtk.PolicyType.AUTOMATIC,
Gtk.PolicyType.AUTOMATIC)
self._fws_scroll.set_min_content_height(260)
self._fws_scroll.set_shadow_type(Gtk.ShadowType.IN)
self._fws_scroll.add(self._fws_text)
self._fws_text.show()
# Hidden until the user asks for it: the plain progress screen stays
# the default.
box.pack_start(self._fws_scroll, True, True, 0)
root = conf.target.system_root
self._fws_logs = [
{"tag": tag, "path": path if path.startswith("/")
else os.path.join(root, path), "offset": None}
for tag, path in FWS_LOGS
]
self._fws_last_tag = None
self._fws_timer = None
def _fws_set_toggle_label(self):
# Also called from refresh(): the spoke can be built before the user
# picks the language, the label must follow the language when shown.
if self._fws_toggle.get_active():
self._fws_toggle.set_label(t("progress.log_hide"))
else:
self._fws_toggle.set_label(t("progress.log_show"))
def _fws_on_toggled(self, button):
self._fws_set_toggle_label()
if button.get_active():
self._fws_scroll.show()
self._fws_poll()
if self._fws_timer is None:
self._fws_timer = GLib.timeout_add(FWS_LOG_POLL_MS,
self._fws_poll)
else:
self._fws_scroll.hide()
if self._fws_timer is not None:
GLib.source_remove(self._fws_timer)
self._fws_timer = None
def _fws_poll(self):
"""Append what each log gained since the last poll. Always True so the
GLib timer keeps running while the view is shown."""
for entry in self._fws_logs:
try:
with open(entry["path"], "rb") as fh:
if entry["offset"] is None:
fh.seek(0, os.SEEK_END)
entry["offset"] = max(0, fh.tell() - FWS_LOG_BACKLOG)
fh.seek(entry["offset"])
data = fh.read()
except OSError:
# Not written yet: the chrooted %post has not started, or the
# log lives on the target which is not mounted yet.
continue
if not data:
continue
entry["offset"] += len(data)
text = data.decode("utf-8", errors="replace")
if self._fws_last_tag != entry["tag"]:
header = t("progress.log_header", name=_fws_render(entry["tag"]),
path=entry["path"])
text = f"\n{header}\n{text}"
self._fws_last_tag = entry["tag"]
self._fws_append(text)
return True
def _fws_append(self, text):
buf = self._fws_buffer
buf.insert(buf.get_end_iter(), text)
if buf.get_char_count() > FWS_LOG_MAX_CHARS:
cut = buf.get_iter_at_offset(buf.get_char_count() - FWS_LOG_MAX_CHARS)
cut.forward_line()
buf.delete(buf.get_start_iter(), cut)
self._fws_text.scroll_to_mark(self._fws_end, 0.0, True, 0.0, 1.0)
def _on_progress_changed(self, step, message):
"""Handle a new progress report."""
if message:
# FWS: the post-install scripts send translation keys (see
# _fws_render); other messages go through unchanged.
gtk_call_once(self._progressLabel.set_text, _fws_render(message))
if self._task_proxy.Steps > 0:
gtk_call_once(self._progressBar.set_fraction, step/self._task_proxy.Steps)
@@ -0,0 +1,619 @@
# FWS installer — translations of the FWS screens and messages.
#
# Anaconda's own screens are translated by Anaconda. This file covers what FWS
# adds: its screens, buttons and installation progress messages. The code
# looks texts up by key (t("network.title")) in the language picked on the
# first screen, and screens re-read their texts each time they are shown.
#
# One table per message, one entry per language:
#
# [network.wifi_connected]
# fr = "Connecté au Wi-Fi « {ssid} » ✓ — vous pouvez continuer."
# en = "Connected to Wi-Fi “{ssid}” ✓ — you can continue."
#
# - Language codes are Anaconda's (the names of its translation folders):
# fr, de, pt_BR, zh_CN, sr@latin… Codes containing "@" must be quoted
# ("sr@latin" = "…"). A territory entry (fr_CH) overrides the language
# entry (fr) for that territory only.
# - "en" is mandatory: it is shown for every language without an entry.
# - {name} placeholders are filled by the code: keep them unchanged in every
# language, wherever the sentence needs them. Write a literal brace as {{ }}.
# - "_" before a letter marks a button's keyboard shortcut (_Next).
# - Entries commented "markup" are Pango markup: keep the tags as they are.
# - scripts/check-installer-translations.py checks all of the above; build.sh
# runs it before building.
# ==== Wizard navigation (every step) ========================================
[wizard.back]
fr = "_Précédent"
en = "_Back"
[wizard.next]
fr = "_Suivant"
en = "_Next"
[wizard.wait_hardware_scan]
fr = "Analyse du matériel en cours, l'écran suivant s'ouvre tout seul…"
en = "Scanning your hardware… The next screen will open by itself."
# ==== Internet connection screen ============================================
[network.window_name]
fr = "CONNEXION INTERNET"
en = "INTERNET CONNECTION"
[network.title]
fr = "Connexion à Internet"
en = "Internet connection"
[network.hint]
fr = "Choisissez votre réseau Wi-Fi dans la liste, ou branchez un câble Ethernet. (Vous pourrez continuer sans réseau si besoin.)"
en = "Choose your Wi-Fi network from the list, or plug in an Ethernet cable. (You can continue without a network if needed.)"
[network.list_title]
fr = "Réseaux détectés :"
en = "Networks found:"
[network.refresh_button]
fr = "Rafraîchir"
en = "Refresh"
[network.show_password]
fr = "Afficher"
en = "Show"
[network.connect_button]
fr = "Se connecter"
en = "Connect"
[network.password_placeholder]
fr = "Mot de passe"
en = "Password"
[network.row_ethernet]
fr = "Ethernet (câble)"
en = "Ethernet (cable)"
[network.row_connected]
fr = "Connecté ✓"
en = "Connected ✓"
[network.row_click_to_connect]
fr = "Cliquer pour se connecter"
en = "Click to connect"
[network.row_wifi_secured]
fr = "{signal} % · sécurisé"
en = "{signal}% · secured"
[network.row_wifi_open]
fr = "{signal} % · ouvert"
en = "{signal}% · open"
[network.wifi_connected]
fr = "Connecté au Wi-Fi « {ssid} » ✓ — vous pouvez continuer."
en = "Connected to Wi-Fi “{ssid}” ✓ — you can continue."
[network.ethernet_online]
fr = "Connecté à Internet (Ethernet) ✓ — vous pouvez continuer."
en = "Connected to the Internet (Ethernet) ✓ — you can continue."
[network.no_network]
fr = "Aucun réseau détecté. Vérifiez que le Wi-Fi est activé, branchez un câble Ethernet, ou cliquez « Rafraîchir »."
en = "No network found. Check that Wi-Fi is turned on, plug in an Ethernet cable, or click “Refresh”."
[network.pick_network]
fr = "Cliquez sur un réseau Wi-Fi pour vous connecter (ou branchez un câble Ethernet)."
en = "Click a Wi-Fi network to connect (or plug in an Ethernet cable)."
[network.ethernet_already_connected]
fr = "Ethernet déjà connecté — vous pouvez continuer."
en = "Ethernet is already connected — you can continue."
[network.wifi_already_connected]
fr = "Vous êtes déjà connecté au Wi-Fi « {ssid} »."
en = "You are already connected to Wi-Fi “{ssid}”."
# markup
[network.password_prompt]
fr = "Mot de passe du réseau Wi-Fi « <b>{ssid}</b> » :"
en = "Password for Wi-Fi network “<b>{ssid}</b>”:"
[network.type_password]
fr = "Tapez le mot de passe de « {ssid} » puis cliquez « Se connecter »."
en = "Type the password for “{ssid}”, then click “Connect”."
[network.searching]
fr = "Recherche des réseaux…"
en = "Searching for networks…"
[network.password_missing]
fr = "Tapez d'abord le mot de passe."
en = "Type the password first."
[network.ethernet_connecting]
fr = "Connexion Ethernet ({iface})…"
en = "Connecting via Ethernet ({iface})…"
[network.wifi_connecting]
fr = "Connexion au Wi-Fi « {ssid} »…"
en = "Connecting to Wi-Fi “{ssid}”…"
[network.ethernet_connected]
fr = "Ethernet connecté ✓ — vous pouvez continuer."
en = "Ethernet connected ✓ — you can continue."
[network.wifi_failed]
fr = "Connexion à « {ssid} » impossible : mot de passe incorrect, ou réseau hors de portée. Réessayez."
en = "Could not connect to “{ssid}”: wrong password, or the network is out of range. Try again."
[network.ethernet_failed]
fr = "Connexion Ethernet impossible (câble débranché ?)."
en = "Could not connect via Ethernet (cable unplugged?)."
# ==== Disk support screen (Intel VMD/RST machines only) =====================
[rst.window_name]
fr = "PRISE EN CHARGE DU DISQUE"
en = "DISK SUPPORT"
[rst.title_raid]
fr = "Tes disques sont regroupés en RAID Intel"
en = "Your disks are grouped in an Intel RAID"
[rst.title_hidden]
fr = "Ton disque n'est pas encore visible"
en = "Your disk isn't visible yet"
[rst.intro_raid]
fr = "Sur cette machine, plusieurs disques sont regroupés en un seul volume par la carte mère (« RAID Intel »). FWS sait s'en servir, mais il doit d'abord préparer ce qu'il faut pour que la machine redémarre dessus après l'installation.\n\nClique sur le bouton : rien n'est effacé à cette étape, et tu n'as rien à changer dans le BIOS."
en = "On this machine, the motherboard groups several disks into a single volume (“Intel RAID”). FWS can use it, but first it has to prepare what the machine needs to start from it after the installation.\n\nClick the button: nothing is erased at this step, and you don't need to change anything in the BIOS."
[rst.intro_hidden]
fr = "Cette machine range son disque derrière une technologie Intel appelée RST (elle s'appelle parfois « Optane » ou « RAID » dans le BIOS). C'est pour ça qu'aucun disque n'apparaît pour l'instant.\n\nFWS sait s'en occuper : clique sur le bouton. Rien n'est effacé à cette étape, et tu n'as rien à changer dans le BIOS."
en = "This machine keeps its disk behind an Intel technology called RST (sometimes named “Optane” or “RAID” in the BIOS). That's why no disk shows up for now.\n\nFWS can handle this: click the button. Nothing is erased at this step, and you don't need to change anything in the BIOS."
[rst.intro_resolved]
fr = "FWS se souviendra de ce réglage pour le système installé : la machine redémarrera bien sur son disque après l'installation."
en = "FWS will remember this setting for the installed system: the machine will start from its disk after the installation."
[rst.fix_button]
fr = "Rendre mon disque visible"
en = "Make my disk visible"
[rst.retry_button]
fr = "Réessayer"
en = "Try again"
[rst.details_expander]
fr = "Afficher les détails techniques"
en = "Show technical details"
[rst.status_working]
fr = "Préparation du disque… quelques secondes, il n'y a rien à faire."
en = "Preparing the disk… it takes a few seconds, there's nothing to do."
[rst.status_rescanning]
fr = "Le disque répond. Mise à jour de la liste des disques…"
en = "The disk is responding. Updating the list of disks…"
[rst.status_visible]
fr = "C'est bon, ton disque est visible. Tu peux continuer."
en = "Done, your disk is visible. You can continue."
# "Rescan Disks" is the button of Anaconda's own disk rescan dialog.
[rst.status_visible_rescan_hint]
fr = "C'est bon, ton disque est visible. Si l'écran suivant ne le montre pas, utilise « Actualiser… » puis « Analyser à nouveau les disques » à cette étape."
en = "Done, your disk is visible. If the next screen doesn't show it, use “Refresh…” then “Rescan Disks” at that step."
[rst.status_failed]
fr = "FWS n'a pas réussi à rendre le disque visible."
en = "FWS couldn't make the disk visible."
[rst.bios_fallback]
fr = "Il reste une solution, dans le BIOS de la machine : cherche le réglage de stockage (souvent « SATA Mode », « Intel RST » ou « Optane ») et choisis « AHCI », puis redémarre sur la clé FWS.\n\nÀ savoir si Windows est installé sur cette machine : après ce changement, Windows ne démarrera plus tant que le réglage n'est pas remis comme avant. Si tu veux garder Windows, mieux vaut demander de l'aide avant d'y toucher."
en = "One solution is left, in the machine's BIOS: look for the storage setting (often “SATA Mode”, “Intel RST” or “Optane”), choose “AHCI”, then restart from the FWS USB stick.\n\nImportant if Windows is installed on this machine: after this change, Windows will no longer start until the setting is put back as it was. If you want to keep Windows, ask for help before changing it."
# Line added to the technical details pane, next to the engine's output.
[rst.rescan_failed_details]
fr = "[FWS] nouveau scan automatique impossible : {error}"
en = "[FWS] automatic disk rescan failed: {error}"
# ==== Anaconda user screen: field added by the FWS anaconda package =========
[user.hostname_label]
fr = "Nom de _machine"
en = "_Host name"
[user.hostname_accessible]
fr = "Nom de machine"
en = "Host name"
# ==== Desktop environment screen ============================================
[desktop.window_name]
fr = "ENVIRONNEMENT DE BUREAU"
en = "DESKTOP ENVIRONMENT"
[desktop.intro]
fr = "Choisissez l'environnement de bureau à installer. Un navigateur web (Firefox) est installé automatiquement avec chaque bureau."
en = "Choose the desktop environment to install. A web browser (Firefox) is installed automatically with any desktop."
[desktop.choice_cli]
fr = "Ligne de commande uniquement (aucun bureau)"
en = "Command line only (no desktop)"
[desktop.choice_hyprland]
fr = "Hyprland — Wayland (non compatible VR)"
en = "Hyprland — Wayland (NOT VR compatible)"
[desktop.choice_i3]
fr = "i3 — X11 (compatible VR : SteamVR, HTC Vive, Valve Index…)"
en = "i3 — X11 (VR compatible: SteamVR, HTC Vive, Valve Index…)"
# ==== Summary before installing =============================================
[recap.window_name]
fr = "RÉCAPITULATIF AVANT INSTALLATION"
en = "REVIEW BEFORE INSTALLATION"
[recap.start_button]
fr = "_Lancer l'installation"
en = "_Start Installation"
[recap.summary_title]
fr = "FWS — RÉCAPITULATIF AVANT INSTALLATION"
en = "FWS — REVIEW BEFORE INSTALLATION"
[recap.section_config]
fr = "CONFIGURATION CHOISIE"
en = "CHOSEN CONFIGURATION"
[recap.row_language]
fr = "Langue"
en = "Language"
[recap.row_keyboard]
fr = "Clavier (X11)"
en = "Keyboard (X11)"
[recap.row_timezone]
fr = "Fuseau horaire"
en = "Time zone"
[recap.timezone_ntp_on]
fr = "{timezone} — synchronisation NTP activée"
en = "{timezone} — NTP synchronization enabled"
[recap.timezone_ntp_off]
fr = "{timezone} — synchronisation NTP désactivée"
en = "{timezone} — NTP synchronization disabled"
[recap.row_users]
fr = "Utilisateur(s)"
en = "User(s)"
[recap.users_value]
fr = "{users} (sudo via wheel)"
en = "{users} (sudo via wheel)"
[recap.users_none]
fr = "AUCUN — pensez-y avant de lancer !"
en = "NONE — create one before starting!"
[recap.row_root]
fr = "Compte root"
en = "Root account"
[recap.root_locked]
fr = "verrouillé (recommandé)"
en = "locked (recommended)"
[recap.root_password_set]
fr = "actif, mot de passe défini"
en = "enabled, password set"
[recap.root_no_password]
fr = "sans mot de passe → sera VERROUILLÉ en fin d'install"
en = "no password → will be LOCKED at the end of the install"
[recap.row_hostname]
fr = "Nom de machine"
en = "Hostname"
[recap.row_desktop]
fr = "Bureau"
en = "Desktop"
[recap.desktop_cli]
fr = "ligne de commande uniquement (aucun bureau)"
en = "command line only (no desktop)"
[recap.desktop_gnome]
fr = "GNOME (+ Firefox, GDM)"
en = "GNOME (+ Firefox, GDM)"
[recap.desktop_kde]
fr = "KDE Plasma (+ Firefox, SDDM)"
en = "KDE Plasma (+ Firefox, SDDM)"
[recap.desktop_hyprland]
fr = "Hyprland — Wayland, non compatible VR (+ Firefox, SDDM)"
en = "Hyprland — Wayland, not VR compatible (+ Firefox, SDDM)"
[recap.desktop_i3]
fr = "i3 — X11, compatible VR/SteamVR (+ Firefox, SDDM)"
en = "i3 — X11, VR/SteamVR compatible (+ Firefox, SDDM)"
[recap.desktop_xfce]
fr = "XFCE (+ Firefox, SDDM)"
en = "XFCE (+ Firefox, SDDM)"
[recap.row_partitioning]
fr = "Partitionnement"
en = "Partitioning"
[recap.partitioning_automatic]
fr = "automatique (recommandé)"
en = "automatic (recommended)"
[recap.partitioning_interactive]
fr = "personnalisé (assistant)"
en = "custom (guided)"
[recap.partitioning_custom]
fr = "personnalisé"
en = "custom"
[recap.partitioning_blivet]
fr = "avancé (blivet-gui)"
en = "advanced (blivet-gui)"
[recap.partitioning_manual]
fr = "points de montage manuels"
en = "manual mount points"
[recap.config_unavailable]
fr = "(configuration non disponible)"
en = "(configuration not available)"
[recap.section_disks]
fr = "DISQUES"
en = "DISKS"
# Two lines: keep a line break, the code indents each line.
[recap.disk_warning_automatic]
fr = "⚠ Rien n'a encore été écrit. Le partitionnement automatique\nEFFACERA ENTIÈREMENT le(s) disque(s) cible(s) au lancement."
en = "⚠ Nothing has been written yet. Automatic partitioning will\nCOMPLETELY ERASE the target disk(s) when the installation starts."
# Two lines: keep a line break, the code indents each line.
[recap.disk_warning_manual]
fr = "⚠ Rien n'a encore été écrit. Au lancement, ce sont vos choix\nde partitionnement faits dans l'installateur qui s'appliqueront."
en = "⚠ Nothing has been written yet. When the installation starts,\nthe partitioning choices made in the installer will be applied."
[recap.disk_target]
fr = "{disk} ← CIBLE de l'installation"
en = "{disk} ← installation TARGET"
[recap.no_disk]
fr = "(aucun disque détecté)"
en = "(no disk detected)"
[recap.section_hardware]
fr = "MATÉRIEL DÉTECTÉ"
en = "DETECTED HARDWARE"
[recap.row_virtualization]
fr = "Virtualisation"
en = "Virtualization"
[recap.virtualization_none]
fr = "aucune (machine physique)"
en = "none (physical machine)"
[recap.row_network]
fr = "Réseau"
en = "Network"
[recap.network_ok]
fr = "disponible ✔"
en = "available ✔"
# Two lines: keep a line break, the code aligns the second line under the first.
[recap.network_down]
fr = "INDISPONIBLE ✖ — bureau, drivers et stack FWS ne\ns'installeront PAS (rattrapable au 1er boot)"
en = "UNAVAILABLE ✖ — the desktop, drivers and FWS stack will\nNOT be installed (can be done at first boot)"
[recap.gpus_heading]
fr = "Cartes graphiques (drivers installés automatiquement en fin d'install) :"
en = "Graphics cards (drivers installed automatically at the end of the install):"
[recap.no_gpu]
fr = "(aucune carte graphique détectée)"
en = "(no graphics card detected)"
[recap.section_steps]
fr = "DÉROULEMENT DE L'INSTALLATION"
en = "INSTALLATION STEPS"
[recap.step_partitioning]
fr = "Partitionnement, puis copie du système live FWS (payload LiveOS)"
en = "Partitioning, then copy of the FWS live system (LiveOS payload)"
[recap.step_kernel]
fr = "Noyau + initramfs régénérés (mkinitcpio), GRUB installé"
en = "Kernel + initramfs regenerated (mkinitcpio), GRUB installed"
[recap.step_desktop]
fr = "Bureau choisi + navigateur installés (réseau requis)"
en = "Chosen desktop + browser installed (network required)"
[recap.step_hardware]
fr = "Matériel : drivers GPU, outils VM, son, Bluetooth, Podman"
en = "Hardware: GPU drivers, VM tools, sound, Bluetooth, Podman"
[recap.step_hardware_extras]
fr = "+ si bureau choisi : {extras}"
en = "+ if a desktop is chosen: {extras}"
[recap.extras_desktop]
fr = "Steam, Wine, VR (Monado/OpenXR), PacManager"
en = "Steam, Wine, VR (Monado/OpenXR), PacManager"
[recap.extras_cli]
fr = "rien de plus (choix CLI)"
en = "nothing more (CLI chosen)"
# Two lines: keep the line break.
[recap.footer]
fr = "« Précédent » pour revenir modifier vos choix —\n« Lancer l'installation » pour démarrer réellement l'installation."
en = "“Back” to go back and change your choices —\n“Start Installation” to actually start the installation."
# ==== Installation progress (keys sent by the kickstart %post) ==============
[progress.base_ready]
fr = "Système de base préparé — configuration"
en = "Base system ready — configuring"
[progress.live_cleanup]
fr = "Nettoyage des résidus du live"
en = "Cleaning up live session leftovers"
[progress.initramfs]
fr = "Construction de l'initramfs"
en = "Building the initramfs"
[progress.grub]
fr = "Installation de GRUB"
en = "Installing GRUB"
[progress.keyboard_language]
fr = "Clavier et langue du système"
en = "System keyboard and language"
[progress.desktop_install]
fr = "Installation du bureau (pacman)"
en = "Installing the desktop (pacman)"
[progress.desktop_installed]
fr = "Bureau installé — pilotes et pile matérielle"
en = "Desktop installed — drivers and hardware stack"
[progress.desktop_config]
fr = "Configuration du bureau (raccourcis, barres, thème)"
en = "Configuring the desktop (shortcuts, panels, theme)"
[progress.admin_identity]
fr = "Droits administrateur et identité FWS"
en = "Administrator rights and FWS identity"
[progress.security_network]
fr = "Sécurité et réseau du système installé"
en = "Security and networking of the installed system"
[progress.finalizing]
fr = "Finalisation"
en = "Finishing up"
[progress.done]
fr = "Installation terminée"
en = "Installation complete"
[progress.script_start]
fr = "Script {index}/{total} · {title}"
en = "Script {index}/{total} · {title}"
[progress.script_phase]
fr = "Script {index}/{total} · {label} — {percent} %"
en = "Script {index}/{total} · {label} — {percent}%"
[progress.titled_phase]
fr = "{title} · {label} — {percent} %"
en = "{title} · {label} — {percent}%"
[progress.phase]
fr = "{label} — {percent} %"
en = "{label} — {percent}%"
# Title of a script that declares no "# FWS-TITLE:" line.
[progress.untitled_script]
fr = "Script {index}"
en = "Script {index}"
[progress.log_show]
fr = "Afficher le journal"
en = "Show log"
[progress.log_hide]
fr = "Masquer le journal"
en = "Hide log"
# Header printed before the lines of each log: {name} is one of the log names
# below, {path} the log file.
[progress.log_header]
fr = "── {name} : {path} ──"
en = "── {name}: {path} ──"
[progress.log_pre]
fr = "pré-installation (live)"
en = "pre-installation (live)"
[progress.log_post_nochroot]
fr = "préparation du disque (live)"
en = "disk preparation (live)"
[progress.log_post]
fr = "système installé"
en = "installed system"
[progress.title_prepare]
fr = "Préparation de l'installation (live)"
en = "Preparing the installation (live system)"
[progress.title_configure]
fr = "Configuration du système installé"
en = "Configuring the installed system"
[progress.title_finish]
fr = "Finalisation et copie des journaux"
en = "Finishing and copying the logs"
# ==== Live session dialogs after the installer has closed (/root/.xinitrc) ====
[session.success_title]
fr = "FWS — installation réussie ✅"
en = "FWS — installation complete ✅"
# markup
[session.success_text]
fr = "<b>FWS est installé sur le disque.</b>\n\n1. Clique OK pour <b>éteindre</b> la machine.\n2. <b>Retire l'ISO</b> (lecteur CD/DVD).\n3. Rallume → FWS démarre."
en = "<b>FWS is installed on the disk.</b>\n\n1. Click OK to <b>shut down</b> the machine.\n2. <b>Remove the ISO</b> (CD/DVD drive).\n3. Power on again → FWS starts."
[session.failure_title]
fr = "FWS — l'installation ne s'est pas terminée (sortie {code})"
en = "FWS — the installation did not finish (exit {code})"
[session.close]
fr = "Fermer"
en = "Close"
[session.send_report]
fr = "Envoyer le rapport aux développeurs"
en = "Send the report to the developers"
[session.reboot]
fr = "Redémarrer"
en = "Restart"
[session.bugreport_missing]
fr = "fws-bugreport est absent de cette image :\nle rapport ne peut pas être envoyé d'ici."
en = "fws-bugreport is missing from this image:\nthe report cannot be sent from here."
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- FWS — onglet « Desktop Environment » (choix du bureau à installer). -->
<!-- The texts below are only a preview for Glade: FWSDesktopSpoke.refresh()
replaces them with those of installer-translations.toml (desktop.*), as
Anaconda's catalogs do not contain them. -->
<interface>
<requires lib="gtk+" version="3.6"/>
<requires lib="AnacondaWidgets" version="1.0"/>
@@ -1,5 +0,0 @@
title FWS install medium (%ARCH%, UEFI)
sort-key 01
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
@@ -1,2 +0,0 @@
timeout 3
default 01-archiso-linux.conf
+48 -31
View File
@@ -1,3 +1,8 @@
# UEFI boot menu of the ISO (bootmode uefi.grub). GRUB reads the kernel and
# initramfs straight from the ISO 9660 file system, so the EFI system
# partition only carries GRUB itself instead of a second copy of both.
# Entries mirror the BIOS menu (syslinux/archiso_sys-linux.cfg).
# Load partition table and file system modules
insmod part_gpt
insmod part_msdos
@@ -36,52 +41,60 @@ else
archiso_platform="${grub_cpu}-${grub_platform}"
fi
# Get the lowercase UEFI machine type short-name to use for architecture-specific tools
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' ]; then
uefi_machine_type_lower='x64'
elif [ "${grub_cpu}" == 'i386' ]; then
uefi_machine_type_lower='ia32'
fi
fi
# Set default menu entry
default=fwslinux
timeout=20
default=fws
timeout=3
timeout_style=menu
# Menu entries
menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
# Safe graphics: no KMS, X falls back to the firmware framebuffer.
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% nomodeset udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
# Boots the live without the installer and starts fws-recovery (fws.recovery=1).
menuentry "FWS - Reparer une installation (recovery)" --class fws --class gnu-linux --class gnu --class os --id 'fws-recovery' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45 fws.recovery=1
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "FWS install medium (%ARCH%, ${archiso_platform}) with speech" --hotkey s --class fws --class gnu-linux --class gnu --class os --id 'fws-accessibility' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a -f "/boot/memtest86+/memtest86${uefi_machine_type_lower}.efi" ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == 'i386' -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellia32.efi
}
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellaa64.efi
}
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellriscv64.efi
}
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellloongarch64.efi
chainloader /shell${uefi_machine_type_lower}.efi
}
fi
@@ -99,3 +112,7 @@ menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...'
reboot
}
# Audible cue that the menu is up, for users of the speech entry.
play 600 988 1 1319 4
+40 -29
View File
@@ -13,52 +13,63 @@ else
archiso_platform="${grub_cpu}-${grub_platform}"
fi
# Get the lowercase UEFI machine type short-name to use for architecture-specific tools
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' ]; then
uefi_machine_type_lower='x64'
elif [ "${grub_cpu}" == 'i386' ]; then
uefi_machine_type_lower='ia32'
fi
fi
# Set default menu entry
default=fwslinux
timeout=15
default=fws
timeout=3
timeout_style=menu
# Menu entries
# Menu entries (same as grub.cfg, booted through GRUB's loopback support)
menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" nomodeset udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "FWS - Reparer une installation (recovery)" --class fws --class gnu-linux --class gnu --class os --id 'fws-recovery' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" fws.recovery=1 udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
menuentry "FWS install medium (%ARCH%, ${archiso_platform}) with speech" --hotkey s --class fws --class gnu-linux --class gnu --class os --id 'fws-accessibility' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on udev.event_timeout=45
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
}
if [ "${grub_platform}" == 'efi' -a -f "/boot/memtest86+/memtest86${uefi_machine_type_lower}.efi" ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest.efi
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
}
fi
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
elif [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest
}
fi
if [ "${grub_platform}" == 'efi' ]; then
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellx64.efi
}
elif [ "${grub_cpu}" == 'i386' -a -f '/shellia32.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellia32.efi
}
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellaa64.efi
}
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellriscv64.efi
}
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
menuentry 'UEFI Shell' --class efi {
chainloader /shellloongarch64.efi
chainloader /shell${uefi_machine_type_lower}.efi
}
fi
+1 -7
View File
@@ -124,12 +124,6 @@ qemu-guest-agent
virtualbox-guest-utils-nox
open-vm-tools
# Conteneurs : moteur sans démon pour les applications isolées, utilisé par
# la stack matérielle. fws-setup-hardware l'installait APRÈS coup, donc
# seulement si le réseau tenait pendant l'installation — dans l'image,
# il est là quoi qu'il arrive.
podman
# --- FWS (fws-local) ---
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
@@ -146,7 +140,7 @@ anaconda
# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit.
python-legacy-cgi
# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par
# pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local).
# pyanaconda/core/users.py (hash des mots de passe). Fourni par [extra].
python-crypt_r
# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree
# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'.
+11 -2
View File
@@ -26,7 +26,12 @@ Architecture = auto
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Build-time only: this file is never copied into the image. Nothing reads the
# documentation at runtime (man and info pages stay: man-db and texinfo are
# installed). The /boot microcode images are never loaded by the live (no
# initrd entry, no microcode hook) and archiso empties /boot in the image; the
# installed system gets its microcode from /usr/lib/firmware via mkinitcpio.
NoExtract = usr/share/doc/* usr/share/gtk-doc/* boot/intel-ucode.img boot/amd-ucode.img
# Misc options
#UseSyslog
@@ -43,7 +48,7 @@ ParallelDownloads = 5
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
RemoteFileSigLevel = Optional
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
@@ -93,6 +98,10 @@ Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
[fws]
Server = https://repo.laxacube.ch/x86_64
SigLevel = Optional TrustAll
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
+4 -1
View File
@@ -8,7 +8,9 @@ iso_application="Linux made simple, without giving up its power"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="fws"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
# uefi.grub: the EFI partition only holds GRUB, which loads the kernel and
# initramfs from ISO 9660 (systemd-boot needed its own copy of both).
bootmodes=('bios.syslinux' 'uefi.grub')
arch="x86_64"
pacman_conf="pacman.conf"
airootfs_image_type="squashfs"
@@ -47,5 +49,6 @@ file_permissions=(
["/usr/local/bin/fws-bugreport"]="0:0:755"
["/usr/local/bin/fws-wallpaper"]="0:0:755"
["/usr/local/bin/fws-install-step"]="0:0:755"
["/usr/local/bin/fws-i18n"]="0:0:755"
["/etc/grub.d/42_fws-recovery"]="0:0:755"
)
@@ -137,7 +137,7 @@ bootloader --disabled
# pacman, choix de bureau écrit par l'addon de sélection).
# ============================================================================
%post --nochroot --log=/tmp/fws-post-nochroot.log
# FWS-TITLE: Préparation de l'installation (live)
# FWS-TITLE: fws:progress.title_prepare
# Écran de progression : chaque phase publie son avancement (fws-install-step),
# l'installeur affiche le script en cours, ce qu'il fait et un pourcentage.
set -x
@@ -247,7 +247,7 @@ if [ -f /tmp/fws-keep-wifi ]; then
"$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true
fi
fws-install-step 6 "Système de base préparé — configuration"
fws-install-step 6 fws:progress.base_ready
%end
@@ -257,9 +257,9 @@ fws-install-step 6 "Système de base préparé — configuration"
# Log persistant : /var/log/fws-post.log sur le système installé.
# ============================================================================
%post --log=/var/log/fws-post.log
# FWS-TITLE: Configuration du système installé
# FWS-TITLE: fws:progress.title_configure
set -x
fws-install-step 8 "Nettoyage des résidus du live"
fws-install-step 8 fws:progress.live_cleanup
# --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ----
# Le live fournit /etc/mkinitcpio.d/linux.preset = preset « archiso » (pointe
@@ -346,7 +346,7 @@ rm -f /etc/systemd/system/dbus-org.freedesktop.network1.service \
/etc/systemd/system/sockets.target.wants/pcscd.socket \
/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true
fws-install-step 14 "Construction de l'initramfs"
fws-install-step 14 fws:progress.initramfs
# --- 2) mkinitcpio : noyau (rattrapage) + génération finale -----------------
# mkinitcpio exige un noyau lisible : s'il manque (rattrapage de copie raté
@@ -372,7 +372,7 @@ else
echo "[FWS] CRITIQUE : toujours aucun noyau — initramfs NON généré, le disque NE BOOTERA PAS."
fi
fws-install-step 22 "Installation de GRUB"
fws-install-step 22 fws:progress.grub
# --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------
install_grub() {
@@ -502,7 +502,7 @@ fi
# d'activation n'est créé qu'ici, dans le système installé).
systemctl enable fws-grub-finalize.service || true
fws-install-step 28 "Clavier et langue du système"
fws-install-step 28 fws:progress.keyboard_language
# --- 3bis) Clavier (X11) + LOCALE --------------------------------------------
# CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X
@@ -539,10 +539,13 @@ if [ -n "$FWSLANG" ]; then
_cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8"
grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \
|| printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen
locale-gen || echo "[FWS] locale-gen a échoué pour $FWSLANG"
fi
# Always, even without a language: the live ships every UTF-8 locale (so the
# installer speaks all of Anaconda's languages) and locale-gen rebuilds the
# archive from /etc/locale.gen only, instead of keeping ~190 MiB of locales.
locale-gen || echo "[FWS] locale-gen a échoué pour ${FWSLANG:-?}"
fws-install-step 32 "Installation du bureau (pacman)"
fws-install-step 32 fws:progress.desktop_install
# --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) -------
DESK="cli"
@@ -808,7 +811,7 @@ MOTD
fi
fi
fws-install-step 62 "Bureau installé — pilotes et pile matérielle"
fws-install-step 62 fws:progress.desktop_installed
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------
# Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci
@@ -824,7 +827,7 @@ if [ -x /usr/local/bin/fws-setup-hardware ]; then
/usr/local/bin/fws-setup-hardware --unattended "$DESK" || true
fi
fws-install-step 76 "Configuration du bureau (raccourcis, barres, thème)"
fws-install-step 76 fws:progress.desktop_config
# --- Config Hyprland (si choisi) : clavier + apps + waybar -------------------
# Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa
@@ -882,7 +885,7 @@ if [ "$DESK" = "i3" ] && [ -f /usr/local/share/fws/i3-config ]; then
done < /etc/passwd
fi
fws-install-step 84 "Droits administrateur et identité FWS"
fws-install-step 84 fws:progress.admin_identity
# --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer -----------------
# Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut
@@ -956,7 +959,7 @@ systemctl enable systemd-timesyncd.service 2>/dev/null || true
# normal), la target le tire par Requires. Dans le bureau, le lanceur
# « Récupération FWS » (fws-recovery.desktop, polkit) fait le même travail.
fws-install-step 92 "Sécurité et réseau du système installé"
fws-install-step 92 fws:progress.security_network
# --- 5) Sécurité : verrouiller root s'il est resté SANS mot de passe ----------
# L'airootfs live a souvent un root sans mot de passe ; si l'utilisateur n'en a
@@ -981,7 +984,7 @@ systemctl enable systemd-resolved.service 2>/dev/null || true
install -d /etc/NetworkManager/conf.d
printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf
fws-install-step 99 "Finalisation"
fws-install-step 99 fws:progress.finalizing
%end
@@ -994,9 +997,9 @@ fws-install-step 99 "Finalisation"
# le disque va booter.
# ============================================================================
%post --nochroot
# FWS-TITLE: Finalisation et copie des journaux
# FWS-TITLE: fws:progress.title_finish
SYSROOT=/mnt/sysroot
[ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage
cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true
fws-install-step 100 "Installation terminée"
fws-install-step 100 fws:progress.done
%end
@@ -1,5 +0,0 @@
title FWS install medium (%ARCH%, UEFI)
sort-key 01
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
@@ -1,8 +0,0 @@
# Mode graphique de secours : SANS KMS (nomodeset). Filet de sécurité
# standard pour les GPU/hyperviseurs dont le pilote KMS pose problème :
# X démarre alors sur le framebuffer VESA/EFI (plus lent mais fiable).
title FWS install medium (%ARCH%, UEFI, safe graphics)
sort-key 01b
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% nomodeset udev.event_timeout=45
@@ -1,9 +0,0 @@
# « Réparer FWS » : boote le live SANS installateur et lance l'assistant de
# réparation en console (fws-recovery, via le hook fws.recovery=1 du
# .zprofile) : réinstaller GRUB, régénérer l'initramfs, réparer pacman,
# shell chroot — le point de restauration FWS.
title FWS - Reparer une installation (recovery)
sort-key 01d
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45 fws.recovery=1
@@ -1,5 +0,0 @@
title FWS install medium (%ARCH%, UEFI) with speech
sort-key 02
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on udev.event_timeout=45
@@ -1,4 +0,0 @@
title Memtest86+
sort-key 03
efi /boot/memtest86+/memtest.efi
architecture x64
@@ -1,3 +0,0 @@
timeout 15
default 01-archiso-linux.conf
beep on
+1 -7
View File
@@ -125,12 +125,6 @@ qemu-guest-agent
virtualbox-guest-utils-nox
open-vm-tools
# Conteneurs : moteur sans démon pour les applications isolées, utilisé par
# la stack matérielle. fws-setup-hardware l'installait APRÈS coup, donc
# seulement si le réseau tenait pendant l'installation — dans l'image,
# il est là quoi qu'il arrive.
podman
# --- FWS (fws-local) ---
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
@@ -145,7 +139,7 @@ anaconda
# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit.
python-legacy-cgi
# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par
# pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local).
# pyanaconda/core/users.py (hash des mots de passe). Fourni par [extra].
python-crypt_r
# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree
# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'.
+8 -1
View File
@@ -3,12 +3,19 @@ HoldPkg = pacman glibc
Architecture = auto
ParallelDownloads = 5
CheckSpace
# Same exclusions as configs/baseline/pacman.conf (which overrides this file).
NoExtract = usr/share/doc/* usr/share/gtk-doc/* boot/intel-ucode.img boot/amd-ucode.img
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
RemoteFileSigLevel = Optional
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
Include = /etc/pacman.d/mirrorlist
[fws]
Server = https://repo.laxacube.ch/x86_64
SigLevel = Optional TrustAll
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

+5 -3
View File
@@ -17,11 +17,12 @@ cas et s'exécutent directement. Les ISO récentes du dépôt sont produites ain
| OS | Arch Linux (rolling), kernel `7.x-archN` |
| Paquets requis | `base-devel`, `git`, `archiso`, `dos2unix` (`pacman -S --needed …`) |
| Droits | `sudo` (mkarchiso et pacstrap exigent root) |
| Réseau | requis (pacstrap télécharge les paquets ; `setup-aur.sh` clone/compile l'AUR) |
| Réseau | requis (pacstrap télécharge les paquets, dont ceux du dépôt `[fws]` ; `setup-aur.sh` clone/compile l'AUR) |
```bash
sudo ./setup-aur.sh # paquets AUR/anaconda → local-repo/
sudo ./build.sh # mkarchiso → out/FWS-<date>-x86_64.iso
sudo ./build.sh # mkarchiso → out/FWS-<date>-x86_64.iso (paquets FWS depuis [fws])
# Seulement pour (re)construire les paquets AUR, à publier ensuite sur [fws] :
sudo ./setup-aur.sh # paquets AUR → local-repo/
```
Depuis septembre 2026, le build tourne aussi **depuis Fedora via la bascule
@@ -298,6 +299,7 @@ Hôtes réellement nécessaires :
|---|---|---|
| `aur.archlinux.org` | clonage des PKGBUILD AUR | **non bloquant depuis 09/2026** : seconde tentative, puis réutilisation du paquet déjà construit dans `local-repo/`. Bloquant seulement si le paquet n'y est jamais entré |
| miroirs Arch (`*.pkgbuild.com`, ou les tiens) | `pacman -Syu`, `pacstrap` | bloquant. `reflector` en choisit d'autres, mais il en faut au moins un |
| `repo.laxacube.ch` | dépôt `[fws]` : paquets FWS + pilote Broadcom embarqué (`build.sh`, `pacstrap`) | bloquant : `build.sh` s'arrête avant mkarchiso |
| `gitea.nocode-var.tech` | rien pendant le build (les sources FWS privées sont **vendues** dans `pkgbuilds/`) | sans effet |
> Panne déjà observée : deux miroirs et l'AUR en **timeout TCP** simultané
-48
View File
@@ -1,48 +0,0 @@
# Maintainer: FWS
# Widgets GTK3 de l'installateur Anaconda (rhinstaller). Lib C + introspection
# GObject (AnacondaWidgets-1.0.typelib) + overrides gi. Le sous-dossier widgets/
# du source anaconda est un projet autotools AUTONOME (son propre configure.ac,
# AC_INIT([AnacondaWidgets],[3.4])) → on le construit seul depuis le tarball
# anaconda-45.8. Paquet versionné sur la release anaconda (comme le sous-paquet
# Fedora anaconda-widgets).
pkgname=anaconda-widgets
pkgver=45.8
pkgrel=1
pkgdesc="GTK3 UI widgets for the Anaconda installer (introspection inclus)"
arch=('x86_64')
url="https://github.com/rhinstaller/anaconda"
license=('GPL-2.0-or-later')
depends=('gtk3' 'glib2' 'pango' 'gdk-pixbuf2' 'python-gobject')
# NB : pas de 'glade' — on désactive le module Glade (catalogue pour le designer,
# inutile au runtime). Sur Arch le paquet s'appelle 'glade' (pas 'gladeui').
# glib2-devel : fournit gdbus-codegen / glib-mkenums / glib-genmarshal (outils
# de codegen GLib, scindés de glib2 sur Arch). Indispensable au build des widgets.
makedepends=('autoconf' 'automake' 'libtool' 'gettext' 'intltool'
'gobject-introspection' 'gtk-doc' 'glib2-devel' 'python')
# GCC 16 segfaults in lto1 while linking libAnacondaWidgets (internal compiler
# error in cl_optimization_restore). LTO buys nothing measurable here.
options=('!lto')
source=("anaconda-$pkgver.tar.gz::https://github.com/rhinstaller/anaconda/archive/refs/tags/anaconda-$pkgver.tar.gz")
sha256sums=('5ef1464bff7f28a4a09a821cbb0121f09ef504ec169288d742373f86807ec4ed')
_srcdir="anaconda-anaconda-$pkgver"
build() {
cd "$srcdir/$_srcdir/widgets"
# Glade désactivé : le flag doit être posé À LA FOIS pour autoreconf (variable
# d'env lue par m4 dans configure.ac) ET pour configure (--disable-glade).
export ANACONDA_DISABLE_GLADE=yes
# autogen.sh : autoreconf -vfi + copie /usr/share/gettext/gettext.h dans src/.
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib \
--disable-static --disable-gtk-doc --disable-glade --enable-introspection
make
}
package() {
cd "$srcdir/$_srcdir/widgets"
make DESTDIR="$pkgdir" install
find "$pkgdir" -name '*.la' -delete
# NB : on inclut aussi les fichiers -devel (.so/.h/.pc + catalogue glade) ;
# inoffensif sur l'ISO et évite de manquer un fichier runtime. Le paquet
# « anaconda » retirera ces mêmes fichiers de son propre pkgdir.
}
-249
View File
@@ -1,249 +0,0 @@
# Maintainer: FWS
# ============================================================================
# anaconda — l'installateur Fedora (rhinstaller) PORTÉ sur Arch pour FWS.
# Build autotools : ./autogen.sh && ./configure && make && make install
# (le source compile aussi widgets/ via AC_CONFIG_SUBDIRS → on retire ces
# fichiers en package(), ils sont fournis par le paquet anaconda-widgets).
#
# ⚠️ SCAFFOLD À ITÉRER : ce PKGBUILD est un point de départ fidèle au spec
# amont, mais Anaconda est profondément couplé à Fedora. Il faudra très
# probablement itérer sur Arch RÉEL (via ./setup-aur.sh) pour :
# - des BuildRequires manquants au configure,
# - des chemins/macros Fedora (systemd-rpm-macros, find_lang…),
# - la compat Python 3.14 d'Arch (Anaconda vise le Python de Fedora).
#
# DÉVIATIONS FWS vs Requires du spec (justifiées) :
# - RETIRÉS car payload liveimg (jamais le payload DNF) : python3-libdnf5,
# python3-rpm. → cf. verdict « drop DNF » (libdnf5 importé seulement dans
# dnf_manager.py, chemin non pris avec liveimg).
# - RETIRÉ libselinux : Arch n'est pas SELinux (blivet/anaconda gèrent son
# absence). - RETIRÉS Fedora-only / N/A archiso : subscription-manager,
# s390utils-*, crypto-policies(-scripts), glibc-langpack-*, dracut-network,
# teamd/NetworkManager-team, flatpak(-libs). - grub2-common → grub (Arch).
# - RISQUE connu : python3-crypt-r (module `crypt` retiré de Python ≥ 3.13)
# n'a peut-être pas d'équivalent Arch → à packager si l'import casse.
# ============================================================================
pkgname=anaconda
pkgver=45.8
pkgrel=6
pkgdesc="The Anaconda installer (porté sur Arch pour FWS, payload liveimg)"
arch=('x86_64')
url="https://github.com/rhinstaller/anaconda"
license=('GPL-2.0-or-later')
depends=(
# — interface & widgets —
'anaconda-widgets' 'gtk3' 'python-gobject' 'gsettings-desktop-schemas'
'adwaita-icon-theme' 'librsvg' 'nm-connection-editor'
# — cœur Python Anaconda —
'python' 'python-meh' 'python-simpleline' 'pykickstart' 'python-dasbus'
'python-productmd' 'python-pid' 'python-langtable' 'python-iso639'
'python-requests' 'python-requests-file' 'python-requests-ftp'
# — stockage —
'python-blivet' 'libblockdev' 'python-pyparted' 'parted' 'util-linux'
'lvm2' 'cryptsetup' 'mdadm' 'dosfstools' 'e2fsprogs' 'xfsprogs' 'btrfs-progs'
# — rapport de crash (python-meh importe `report` en dur) —
'libreport'
# — système / réseau / boot —
'networkmanager' 'kbd' 'chrony' 'systemd' 'dbus' 'openssh' 'grub'
'libpwquality' 'python-systemd' 'python-xkbregistry' 'cracklib'
)
# NB : pas de 'glade' — module Glade désactivé au build (cf. build()).
makedepends=(
'autoconf' 'automake' 'libtool' 'gettext' 'intltool' 'gtk-doc'
'gobject-introspection' 'python' 'gdk-pixbuf2' 'libxml2'
'desktop-file-utils' 'glib2-devel' 'libarchive' 'rpm-tools'
)
# GCC 16 segfaults in lto1 while linking libAnacondaWidgets (internal compiler
# error in cl_optimization_restore). LTO buys nothing measurable here.
options=('!lto')
source=("anaconda-$pkgver.tar.gz::https://github.com/rhinstaller/anaconda/archive/refs/tags/anaconda-$pkgver.tar.gz")
sha256sums=('5ef1464bff7f28a4a09a821cbb0121f09ef504ec169288d742373f86807ec4ed')
_srcdir="anaconda-anaconda-$pkgver"
prepare() {
cd "$srcdir/$_srcdir"
# ── FWS : clavier par défaut selon le TERRITOIRE de la locale ──────────────
# set_layouts() amont fait « locale = get_language_id(self.language) » →
# get_language_id JETTE le territoire (fr_CH.UTF-8 → 'fr') → list_keyboards('fr')
# = 'fr(oss)' (France) au lieu de 'ch(fr)' (Suisse). On passe la LOCALE COMPLÈTE
# (self.language) : langtable.list_keyboards('fr_CH.UTF-8') = 'ch(fr)'. La
# validation l'accepte (is_valid_langcode → parse_locale().language non vide).
# → le clavier du GUI ET du système installé suivent enfin la locale choisie.
sed -i \
's/^\(\s*\)locale = get_language_id(self\.language)/\1locale = self.language # FWS: garder le territoire (fr_CH -> ch(fr))/' \
pyanaconda/modules/localization/localization.py
# Garde-fou : casse le build si le motif amont a changé (le patch silencieux).
grep -q 'locale = self.language # FWS' \
pyanaconda/modules/localization/localization.py
# ── FWS : champ « Nom de machine » dans le spoke Utilisateur ───────────────
# Anaconda ne propage PAS le hostname (le champ du spoke Réseau est perdu chez
# nous → /etc/hostname vide). Le nom de machine est désormais demandé PLUS TÔT,
# à l'écran « Réseau » (spoke fws_network.py de l'airootfs, qui écrit
# /tmp/fws-hostname). Le champ ci-dessous sert de RE-DEMANDE au moment de la
# création de compte : il est PRÉ-REMPLI depuis /tmp/fws-hostname (pour ne pas
# écraser le nom choisi à l'écran Réseau par une valeur vide) et user.py écrit
# la valeur (éventuellement modifiée) dans /tmp/fws-hostname, que le %post du
# kickstart applique à /etc/hostname.
python3 - <<'PYEOF'
import glob
# 1) user.glade : insérer label + entry "Host name" APRÈS le bloc username_entry.
glades = [p for p in glob.glob("pyanaconda/**/user.glade", recursive=True)
if 'username_entry' in open(p, encoding='utf-8').read()]
assert glades, "FWS: user.glade introuvable"
g = glades[0]
s = open(g, encoding='utf-8').read()
assert 'id="hostname_entry"' not in s, "FWS: glade déjà patché"
i = s.index('id="username_entry"')
k = s.index('</packing>', i) # fin du packing de username_entry
j = s.index('</child>', k) + len('</child>') # fin du <child> EXTERNE (pas l'accessible)
block = '''
<child>
<object class="GtkLabel" id="hostname_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xpad">10</property>
<property name="label" translatable="yes" context="GUI|User">_Host name</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">hostname_entry</property>
<property name="xalign">1</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="hostname_entry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="width-chars">50</property>
<child internal-child="accessible">
<object class="AtkObject" id="hostname_entry-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Host Name</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>'''
open(g, 'w', encoding='utf-8').write(s[:j] + block + s[j:])
# 2) user.py (GUI) : récupérer le widget + écrire /tmp/fws-hostname dans apply().
pys = glob.glob("pyanaconda/ui/gui/spokes/user.py")
assert pys, "FWS: user.py introuvable"
p = pys[0]
s = open(p, encoding='utf-8').read()
anchor = 'self._username_entry = self.builder.get_object("username_entry")'
assert anchor in s, "FWS: ancre username_entry absente"
s = s.replace(anchor,
anchor + '\n self._hostname_entry = self.builder.get_object("hostname_entry")' + '''
# FWS : pré-remplir depuis l'écran Réseau (fws_network.py) si un nom y a
# déjà été saisi — sinon apply() ci-dessous écraserait ce nom par une
# valeur vide (le champ démarre vide). initialize() relit le fichier à
# chaque entrée dans le spoke.
try:
with open("/tmp/fws-hostname") as _fh:
_hn0 = _fh.read().strip()
except OSError:
_hn0 = ""
if _hn0:
try:
self._hostname_entry.set_text(_hn0)
except Exception:
pass''',
1)
ap = 'set_user_list(self._users_module, self._user_list, remove_unset=True)'
assert ap in s, "FWS: ancre apply() absente"
s = s.replace(ap, ap + '''
# FWS : mémorise le nom de machine saisi (cible pas encore montée) pour
# le %post du kickstart, qui l'écrira dans /etc/hostname.
try:
_hn = self._hostname_entry.get_text().strip()
except Exception:
_hn = ""
try:
with open("/tmp/fws-hostname", "w") as _f:
_f.write(_hn)
except OSError:
pass''', 1)
open(p, 'w', encoding='utf-8').write(s)
print("FWS: champ Hostname ajouté au spoke Utilisateur (glade + user.py)")
PYEOF
# ── FWS : créer l'ESP même avec « bootloader --disabled » ─────────────────
# Le kickstart désactive le bootloader d'Anaconda (grub2-install n'existe pas
# sur Arch, GRUB est posé par le %post). Or execution.py met alors
# skip_bootloader=True, et schedule_partitions() SAUTE la requête « efi » du
# partitionnement automatique (« skipping unneeded stage1 efi request »).
# Résultat vu en réel (HP OMEN, NVMe vierge, UEFI) : /boot + LVM, AUCUNE
# partition EFI → grub-install n'avait nulle part où écrire, et la machine ne
# démarrait qu'avec la clé USB branchée. On ne garde que l'autre moitié de la
# condition : ne pas créer de 2e ESP si une partition stage1 existe déjà.
sed -i \
's/^\(\s*\)(storage\.bootloader\.skip_bootloader or stage1_device):$/\1stage1_device: # FWS: ESP créée même sans bootloader Anaconda/' \
pyanaconda/modules/storage/partitioning/automatic/utils.py
grep -q 'stage1_device: # FWS: ESP' \
pyanaconda/modules/storage/partitioning/automatic/utils.py
}
build() {
cd "$srcdir/$_srcdir"
# Glade désactivé (catalogue designer, inutile au runtime) → pas de dép glade.
# La variable d'env doit être posée AVANT autogen.sh (lue par m4 à l'autoreconf)
# EN PLUS du flag --disable-glade au configure.
export ANACONDA_DISABLE_GLADE=yes
# autogen.sh : autoreconf -vfi racine + (cd widgets && ./autogen.sh).
./autogen.sh
# ANACONDA_RELEASE=1 : release réelle, pas la date de création du tarball.
./configure \
--prefix=/usr --libdir=/usr/lib --sysconfdir=/etc \
--disable-glade --disable-gtk-doc ANACONDA_RELEASE=1
make
}
package() {
cd "$srcdir/$_srcdir"
make DESTDIR="$pkgdir" install
find "$pkgdir" -name '*.la' -delete
# Répertoires attendus par Anaconda (créés vides par le spec).
install -d "$pkgdir/usr/share/anaconda/addons" \
"$pkgdir/usr/share/anaconda/post-scripts"
# Fichiers widgets : fournis par le paquet anaconda-widgets → on les retire
# ici (le build principal recompile widgets/ via AC_CONFIG_SUBDIRS) pour
# éviter le conflit de fichiers à l'install. On enlève TOUT l'empreinte
# widgets : lib, typelib, pkgconfig, headers, .gir, doc, override gi.
rm -f "$pkgdir"/usr/lib/libAnacondaWidgets.so*
rm -f "$pkgdir"/usr/lib/girepository-*/AnacondaWidgets*.typelib
rm -f "$pkgdir"/usr/lib/pkgconfig/AnacondaWidgets.pc
rm -rf "$pkgdir"/usr/include/AnacondaWidgets
rm -f "$pkgdir"/usr/share/gir-1.0/AnacondaWidgets*.gir
rm -rf "$pkgdir"/usr/share/gtk-doc/html/AnacondaWidgets
rm -f "$pkgdir"/usr/lib/python*/site-packages/gi/overrides/AnacondaWidgets*
# interactive-defaults.ks : FWS le fournit via l'overlay airootfs
# (configs/*/airootfs/usr/share/anaconda/) avec le payload liveimg. mkarchiso
# copie l'overlay AVANT pacstrap → si le paquet livrait aussi ce fichier, pacman
# planterait (« exists in filesystem »). On retire donc la version amont : le
# fichier de l'overlay reste la seule à ce chemin, et anaconda le lit au runtime.
rm -f "$pkgdir"/usr/share/anaconda/interactive-defaults.ks
# usr-merge Arch : /usr/sbin est un LIEN → /usr/bin. Anaconda installe dans
# /usr/sbin (vrai dossier sur Fedora) → conflit avec le paquet 'filesystem'.
# On rapatrie le contenu dans /usr/bin et on supprime le dossier sbin.
if [ -d "$pkgdir/usr/sbin" ] && [ ! -L "$pkgdir/usr/sbin" ]; then
install -d "$pkgdir/usr/bin"
cp -aT "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
rm -rf "$pkgdir/usr/sbin"
fi
}
-31
View File
@@ -1,31 +0,0 @@
# Maintainer: FWS
pkgname=fws-dnd
pkgver=2.0.0
pkgrel=1
pkgdesc="Gestionnaire D&D 5e pour FWS (GTK4) : dés, créateur de personnage (règles officielles), grimoire, sessions, tracker de combat"
arch=('any')
url="https://fws.local/fws-dnd"
license=('MIT')
depends=('python' 'python-gobject' 'gtk4')
source=("${pkgname}-${pkgver}.tar.gz")
sha256sums=('SKIP')
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Module Python (application GTK4)
install -d "${pkgdir}/usr/share/${pkgname}"
cp -r gui/fwsdnd "${pkgdir}/usr/share/${pkgname}/"
# pas de bytecode pré-généré dans le paquet
find "${pkgdir}/usr/share/${pkgname}" -name '__pycache__' -type d -exec rm -rf {} +
# Exécutable
install -Dm755 bin/fws-dnd "${pkgdir}/usr/bin/fws-dnd"
# Intégration bureau
install -Dm644 fws-dnd.desktop "${pkgdir}/usr/share/applications/fws-dnd.desktop"
install -Dm644 fws-dnd.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/fws-dnd.svg"
# Documentation
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}
Binary file not shown.
-59
View File
@@ -1,59 +0,0 @@
# Maintainer: FWS
pkgname=fws-pacmanage
pkgver=1.6.2
pkgrel=1
pkgdesc="PacManager — gestionnaire de paquets graphique FWS (Qt6, sur pacman)"
arch=('x86_64')
url="https://gitea.nocode-var.tech/FWS/FWS-PacManage"
# FWS owns PacManager; the upstream LICENSE is source-available, not free.
license=('custom')
depends=('qt6-base' 'zlib' 'pacman')
makedepends=('cmake' 'gcc')
# Pinned to the commit the V1.6.2 tag points at instead of the tag name: a sha
# keeps the archive reproducible even if the tag is moved (V1.6.2).
_commit=d27792975ed572d7ba4c617d910d10e017fd0649
source=("${pkgname}-${pkgver}.tar.gz::https://gitea.nocode-var.tech/FWS/FWS-PacManage/archive/${_commit}.tar.gz")
sha256sums=('be6be117c7ac55a6d4ff8d95967eea80f972d4edaf2c3f4737673d58063b6c59')
# The whole app lives under /opt/fws-pacmanage because it updates itself: the
# self-update replaces the binary, the `version` marker and the plugins in the
# directory of the running executable. A real prefix keeps those files out of
# /usr/bin (a bare `bin` install would drop /usr/bin/version and /usr/bin/plugins).
build() {
cmake -S "${srcdir}/${pkgname}" -B "${srcdir}/build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/fws-pacmanage \
-DFWS_BUILD_FLATPAK_PLUGIN=ON \
-DFWS_BUILD_AUR_PLUGIN=ON
cmake --build "${srcdir}/build" -j"$(nproc)"
}
package() {
DESTDIR="${pkgdir}" cmake --install "${srcdir}/build"
# The upstream CMakeLists declares its plugin install() rules ABOVE the
# FWS_BUILD_*_PLUGIN option() calls, so both are undefined there and
# `cmake --install` never ships the providers. Install the built modules by
# hand into the first search path, which is also where the self-update
# refreshes them (<prefix>/bin/plugins).
install -d "${pkgdir}/opt/fws-pacmanage/bin/plugins"
install -m755 "${srcdir}/build/plugins/"*.so \
"${pkgdir}/opt/fws-pacmanage/bin/plugins/"
# Entry point outside the self-updating tree: launchers and shells find it on
# PATH while the update keeps rewriting /opt/fws-pacmanage/bin.
install -d "${pkgdir}/usr/bin"
ln -s /opt/fws-pacmanage/bin/PacManager "${pkgdir}/usr/bin/PacManager"
# Launchers only read /usr/share; the prefix copies stay in /opt.
install -Dm644 "${pkgdir}/opt/fws-pacmanage/share/applications/org.fws.PacManager.desktop" \
"${pkgdir}/usr/share/applications/org.fws.PacManager.desktop"
install -Dm644 "${pkgdir}/opt/fws-pacmanage/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg" \
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg"
# Restrictive upstream license (FWS, all rights reserved): the notice has to
# travel with the redistributed binary.
install -Dm644 "${srcdir}/${pkgname}/LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
-28
View File
@@ -1,28 +0,0 @@
# Maintainer: FWS
# Dépendance de l'installateur Anaconda (rhinstaller) — parseur du langage
# Kickstart (Anaconda l'exige >= 3.73 ; absent des dépôts Arch et de l'AUR).
# Pur Python (setuptools, install_requires=['requests']) : on installe
# l'arborescence du module à la main pour éviter d'exiger python-build/installer.
pkgname=pykickstart
pkgver=3.74
pkgrel=1
pkgdesc="Library for manipulating kickstart files (dépendance Anaconda)"
arch=('any')
url="https://github.com/pykickstart/pykickstart"
license=('GPL-2.0-or-later')
depends=('python' 'python-requests')
_tag="r$pkgver"
source=("$pkgname-$pkgver.tar.gz::https://github.com/pykickstart/pykickstart/archive/refs/tags/$_tag.tar.gz")
sha256sums=('05b19c5af3453f90464428c418b0c79bbe0a87718d1db1812f9006ba151e5c63')
_srcdir="pykickstart-$_tag"
package() {
cd "$srcdir/$_srcdir"
local sitedir
sitedir=$(python -c 'import site; print(site.getsitepackages()[0])')
install -d "$pkgdir$sitedir"
cp -a pykickstart "$pkgdir$sitedir/pykickstart"
# -d : grave le chemin d'exécution réel dans les .pyc (pas le $pkgdir de build).
python -m compileall -q -d "$sitedir/pykickstart" "$pkgdir$sitedir/pykickstart" || true
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
-72
View File
@@ -1,72 +0,0 @@
# Maintainer: FWS
# Dépendance de l'installateur Anaconda (rhinstaller) — couche d'abstraction
# de gestion du stockage (partitions, LVM, LUKS, RAID).
#
# VENDORISÉ depuis l'AUR (python-blivet) avec DEUX modifications FWS :
#
# 1. Retrait de 'libselinux' des depends. Arch n'est pas SELinux et blivet
# importe selinux en try/except (blivet/util.py + flags.py →
# HAVE_SELINUX/self.selinux = False si absent), donc il fonctionne sans.
# Ça évite de tirer toute la pile SELinux (libselinux/libsepol) de l'AUR
# juste pour une fonctionnalité inutile sur FWS.
#
# 2. depends COMPLÉTÉS. L'AUR ne déclare QUE 'libblockdev' → sur une vraie ISO
# blivet crashe à l'import. Il lui faut en plus :
# - python-libblockdev : l'OVERRIDE GObject-introspection
# (gi/overrides/BlockDev.py) qui définit les helpers (plugin_specs_from_names)
# ET les alias d'enum (DMTech.MAP, LoopTech, MDTech…) qu'utilise blivet.
# SANS lui : « AttributeError: 'gi.repository.BlockDev' object has no
# attribute 'plugin_specs_from_names' » puis « DMTech has no attribute MAP ».
# C'est LA pièce maîtresse (les symboles n'existent QUE dans cet override,
# pas dans le typelib ni l'amont libblockdev).
# - les 11 sous-paquets plugins libblockdev-* (sur Arch ils sont SÉPARÉS du
# cœur 'libblockdev') : sinon « failed to load module lvm: libbd_lvm.so.3 ».
# - libbytesize : fournit le module Python 'bytesize' (blivet/size.py).
# - python-dasbus : importé en dur (blivet/util.py).
#
# Tout le reste (code source) est identique à l'amont.
_py='python'
_pkg="blivet"
pkgname="python-${_pkg}"
pkgver=3.13.2
_tag="${_pkg}-${pkgver}"
pkgrel=4
pkgdesc="A DBus service and python module for management of the system storage configuration (dépendance Anaconda)"
arch=('any')
license=('LGPL-2.1-only')
depends=(
'libblockdev'
# Override GI (gi/overrides/BlockDev.py) : helpers + alias d'enum exigés par
# blivet. ABSENT du paquet 'libblockdev' → paquet séparé. Pièce maîtresse.
"${_py}-libblockdev"
# Plugins libblockdev : sous-paquets SÉPARÉS sur Arch (le cœur 'libblockdev'
# ne fournit PAS les libbd_*.so.3). blivet les charge à l'import via
# try_reinit() ; sans eux : « failed to load module lvm: libbd_lvm.so.3 ».
'libblockdev-lvm' 'libblockdev-btrfs' 'libblockdev-swap' 'libblockdev-loop'
'libblockdev-crypto' 'libblockdev-mpath' 'libblockdev-dm' 'libblockdev-mdraid'
'libblockdev-part' 'libblockdev-fs' 'libblockdev-nvme'
# libbytesize fournit le module Python 'bytesize' (blivet/size.py:
# « from bytesize import bytesize ») — sinon ModuleNotFoundError.
'libbytesize'
'lsof'
'multipath-tools'
'parted'
"${_py}"
"${_py}-six"
"${_py}-pyparted"
"${_py}-pyudev"
"${_py}-gobject"
# blivet importe dasbus en dur (blivet/util.py: from dasbus.connection ...).
"${_py}-dasbus"
'systemd-libs'
'util-linux'
)
makedepends=("${_py}-setuptools")
url='https://github.com/storaged-project/blivet'
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/storaged-project/${_pkg}/archive/${_pkg}-${pkgver}.tar.gz")
sha512sums=('6142ee7e25416c13d751bffab22ba287895e256611254fb87652f1005d6303df50cb116683552bbbad28b818a515e6a20f7073d313e024996a99b449c29132bf')
package() {
cd "${srcdir}/${_pkg}-${_tag}"
"${_py}" setup.py install --root="${pkgdir}" --optimize=1
}
-38
View File
@@ -1,38 +0,0 @@
# Maintainer: FWS
# ============================================================================
# python-crypt_r — réintroduit le module `crypt` (et son alias moderne
# `crypt_r`) retiré de Python 3.13 (PEP 594). Arch est en Python 3.14.
#
# POURQUOI (dépendance Anaconda) : pyanaconda/core/users.py fait
# import crypt_r (ligne 41) → sinon fallback :
# import crypt as crypt_r (ligne 44)
# Les DEUX échouent sur Python ≥ 3.13 → « ModuleNotFoundError: crypt_r »
# puis « crypt » → Anaconda plante au chargement (hash des mots de passe
# root/utilisateur à l'install). Ce paquet PyPI (maintenu par fedora-python,
# les mêmes que legacy-cgi) fournit les modules `crypt_r` ET `crypt` via une
# extension C qui enrobe crypt_r(3) de libxcrypt.
#
# Paquet absent d'Arch officiel ET de l'AUR → packagé maison pour FWS.
# ============================================================================
pkgname=python-crypt_r
_pyname=crypt_r
pkgver=3.13.1
pkgrel=1
pkgdesc="The crypt module removed from Python 3.13 (PEP 594), as crypt_r + crypt (dépendance Anaconda)"
arch=('x86_64')
url="https://github.com/fedora-python/crypt_r"
license=('PSF-2.0')
depends=('python' 'libxcrypt')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('5bd46ad51f5b7fe5f0ecf49d8ba2cafd6fbd43aa3bb5efbcaa6b44df6340c1a6')
build() {
cd "$srcdir/${_pyname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/${_pyname}-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
}
-39
View File
@@ -1,39 +0,0 @@
# Maintainer: FWS
# ============================================================================
# python-iso639 — bibliothèque ISO 639 (langues) pour Anaconda.
#
# ⚠️ IL Y A PLUSIEURS PROJETS PyPI HOMONYMES « iso639 » avec des API
# INCOMPATIBLES. Anaconda (pyanaconda/localization.py) utilise les
# FONCTIONS DE MODULE :
# iso639.find(iso639_2=...) et iso639.to_name(...)
# → c'est le projet PyPI « iso639 » (SANS tiret), version 0.1.4, MIT.
#
# Le paquet AUR « python-iso639 » fournit un AUTRE projet (API
# Iso639/languages, PAS de find()) → « AttributeError: module 'iso639'
# has no attribute 'find' » et le module DBus Localization d'Anaconda
# sort en status 1. On le RETIRE donc de setup-aur.sh AUR_PACKAGES et on
# le remplace par CE paquet local (même nom → satisfait la dép anaconda).
# Idem « iso-639 » (avec tiret, noumar) : API languages.get(), pas find().
# ============================================================================
pkgname=python-iso639
pkgver=0.1.4
pkgrel=1
pkgdesc="ISO 639 library with find()/to_name() module API (dépendance Anaconda Localization)"
arch=('any')
url="https://pypi.org/project/iso639/"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/i/iso639/iso639-$pkgver.tar.gz")
sha256sums=('88b70cf6c64ee9c2c2972292818c8beb32db9ea6f4de1f8471a9b081a3d92e98')
build() {
cd "$srcdir/iso639-$pkgver"
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/iso639-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-36
View File
@@ -1,36 +0,0 @@
# Maintainer: FWS
# ============================================================================
# python-langtable — tables de langues/locales/claviers (dépendance Anaconda).
#
# ⚠️ L'AUR python-langtable est figé à 0.0.51, TROP VIEUX pour Anaconda 45.8 :
# le spoke d'accueil GUI fait localization.get_common_languages() →
# langtable.list_common_languages(), fonction ajoutée seulement en
# langtable 0.0.71 (« derived from gnome-control-center »). Avec 0.0.51 :
# « AttributeError: module 'langtable' has no attribute
# 'list_common_languages' » → le GUI plante au démarrage.
#
# On package donc 0.0.71 en LOCAL (même nom → satisfait la dép anaconda) et
# on RETIRE python-langtable de setup-aur.sh AUR_PACKAGES.
# ============================================================================
pkgname=python-langtable
_pyname=langtable
pkgver=0.0.71
pkgrel=1
pkgdesc="Guessing reasonable defaults for locale/keyboard/territory/language (dépendance Anaconda)"
arch=('any')
url="https://github.com/mike-fabian/langtable"
license=('GPL-3.0-or-later' 'MIT')
depends=('python' 'python-setuptools' 'gzip')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/l/langtable/langtable-$pkgver.tar.gz")
sha256sums=('f9d39c06d5182ea14eb4576bf1da8875af1d44efb166e55d6865b3b59b8ac617')
build() {
cd "$srcdir/langtable-$pkgver"
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/langtable-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
}
-47
View File
@@ -1,47 +0,0 @@
# Maintainer: FWS
# Dépendance de l'installateur Anaconda (rhinstaller) — gestion d'exceptions.
# setup.py amont = distutils + `setup.py install` : tous deux supprimés
# (Python 3.12+, setuptools 80+). Le paquet étant du pur Python, on installe
# l'arborescence à la main plutôt que de patcher la chaîne distutils.
pkgname=python-meh
pkgver=0.43
pkgrel=2
pkgdesc="Python exception handling library (dépendance Anaconda)"
arch=('any')
url="https://github.com/rhinstaller/python-meh"
license=('GPL-2.0-or-later')
depends=('python' 'python-gobject' 'python-dbus' 'libreport')
_tag="r$pkgver-1"
source=("$pkgname-$pkgver.tar.gz::https://github.com/rhinstaller/python-meh/archive/refs/tags/$_tag.tar.gz")
sha256sums=('cd50301794ab68a064715f1ace960f6de07aea809aa85f73087d44573c98be52')
_srcdir="python-meh-$_tag"
prepare() {
cd "$srcdir/$_srcdir"
# gettext.ldgettext a été SUPPRIMÉ en Python 3.11 : sans ce remplacement, le
# gestionnaire d'exceptions d'Anaconda plante LUI-MÊME (AttributeError) dès
# qu'il doit AFFICHER une erreur → traceback brut au lieu du dialogue meh,
# en GUI comme en TUI. dgettext est l'équivalent direct (ldgettext n'était
# que la variante bytes). Corrigé en amont après 0.43.
sed -i 's/gettext\.ldgettext(/gettext.dgettext(/' \
meh/handler.py meh/ui/text.py meh/ui/gui.py
# .pyc d'une extraction précédente (src/ n'est pas nettoyé par makepkg -f) :
# à jeter, sinon ils partiraient dans le paquet via cp -a.
find meh -type d -name __pycache__ -exec rm -rf {} +
if grep -rn --include='*.py' 'ldgettext' meh/; then
echo "ERREUR : ldgettext encore présent après patch" >&2
return 1
fi
}
package() {
cd "$srcdir/$_srcdir"
local sitedir
sitedir=$(python -c 'import site; print(site.getsitepackages()[0])')
install -d "$pkgdir$sitedir"
cp -a meh "$pkgdir$sitedir/meh"
# -d : grave le chemin d'exécution réel dans les .pyc (pas le $pkgdir de build).
python -m compileall -q -d "$sitedir/meh" "$pkgdir$sitedir/meh" || true
install -Dm644 ui/exception-dialog.glade -t "$pkgdir/usr/share/python-meh/"
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
@@ -1,898 +0,0 @@
format = 2
pkgname = python-meh
pkgbase = python-meh
pkgver = 0.43-1
pkgarch = any
pkgbuild_sha256sum = 207bd70c0f151083b8194b40534aeed665c9af48e588230ad370757eb4368229
packager = Unknown Packager
builddate = 1781307281
builddir = /home/nocode/Files/FWS-ISO/pkgbuilds/python-meh
startdir = /home/nocode/Files/FWS-ISO/pkgbuilds/python-meh
buildtool = makepkg
buildtoolver = 7.1.0
buildenv = !distcc
buildenv = color
buildenv = !ccache
buildenv = check
buildenv = !sign
options = strip
options = docs
options = !libtool
options = !staticlibs
options = emptydirs
options = zipman
options = purge
options = debug
options = lto
installed = aardvark-dns-1.17.1-1-x86_64
installed = abseil-cpp-20260107.1-1-x86_64
installed = accountsservice-26.13.3-1-x86_64
installed = acl-2.3.2-2-x86_64
installed = adwaita-cursors-50.0-1-any
installed = adwaita-fonts-50.0-1-any
installed = adwaita-icon-theme-50.0-1-any
installed = adwaita-icon-theme-legacy-46.2-3-any
installed = alsa-card-profiles-1:1.6.6-1-x86_64
installed = alsa-lib-1.2.16-1-x86_64
installed = alsa-plugins-1:1.2.12-5-x86_64
installed = alsa-topology-conf-1.2.5.1-4-any
installed = alsa-ucm-conf-1.2.16-2-any
installed = aom-3.14.1-1-x86_64
installed = appstream-1.1.2-1-x86_64
installed = aquamarine-0.12.1-1-x86_64
installed = arch-install-scripts-31-1-any
installed = archiso-88-1-any
installed = archlinux-keyring-20260420-1-any
installed = argon2-20190702-6-x86_64
installed = at-spi2-core-2.60.4-1-x86_64
installed = atkmm-2.28.5-2-x86_64
installed = attr-2.5.2-2-x86_64
installed = audit-4.1.4-2-x86_64
installed = autoconf-2.73-1-any
installed = automake-1.18.1-1-any
installed = avahi-1:0.9rc4-1-x86_64
installed = base-3-3-any
installed = base-devel-1-2-any
installed = bash-5.3.15-1-x86_64
installed = bemoji-0.4.0-1-any
installed = binutils-2.46+r70+g155188ea10a7-1-x86_64
installed = bison-3.8.2-8-x86_64
installed = blas-3.12.1-2-x86_64
installed = bluez-libs-5.86-6-x86_64
installed = boost-libs-1.91.0-1-x86_64
installed = brightnessctl-0.5.1-3-x86_64
installed = brotli-1.2.0-1-x86_64
installed = bubblewrap-0.11.2-1-x86_64
installed = bzip2-1.0.8-6-x86_64
installed = c-ares-1.34.6-1-x86_64
installed = ca-certificates-20240618-1-any
installed = ca-certificates-mozilla-3.124-1-x86_64
installed = ca-certificates-utils-20240618-1-any
installed = cabextract-1.11-2-x86_64
installed = cairo-1.18.4-1-x86_64
installed = cairomm-1.14.6-1-x86_64
installed = cairomm-1.16-1.18.1-1-x86_64
installed = catatonit-0.2.1-2-x86_64
installed = cblas-3.12.1-2-x86_64
installed = cliphist-1:0.7.0-2-x86_64
installed = clucene-2.3.3.4-17-x86_64
installed = cmake-4.3.3-1-x86_64
installed = compiler-rt-22.1.6-1-x86_64
installed = composefs-1.0.8-1-x86_64
installed = conmon-1:2.2.1-1-x86_64
installed = containers-common-1:0.67.1-3-any
installed = coreutils-9.11-1-x86_64
installed = cpio-2.15-3-x86_64
installed = cppdap-1.58.0-3-x86_64
installed = cracklib-2.10.3-1-x86_64
installed = criu-4.2-3-x86_64
installed = crun-1.28-1-x86_64
installed = cryptsetup-2.8.6-1-x86_64
installed = curl-8.20.0-7-x86_64
installed = dav1d-1.5.3-1-x86_64
installed = db5.3-5.3.28-7-x86_64
installed = dbus-1.16.2-1-x86_64
installed = dbus-broker-37-3-x86_64
installed = dbus-broker-units-37-3-x86_64
installed = dbus-units-37-3-x86_64
installed = dconf-0.49.0-1-x86_64
installed = debugedit-5.3-1-x86_64
installed = default-cursors-3-1-any
installed = desktop-file-utils-0.28-1-x86_64
installed = device-mapper-2.03.41-1-x86_64
installed = diffutils-3.12-2-x86_64
installed = discord-1:1.0.142-1-x86_64
installed = dkms-3.4.1-1-any
installed = dos2unix-7.5.6-1-x86_64
installed = dosfstools-4.2-5-x86_64
installed = double-conversion-3.4.0-1-x86_64
installed = duktape-2.7.0-7-x86_64
installed = e2fsprogs-1.47.4-1-x86_64
installed = efibootmgr-18-4-x86_64
installed = efivar-39-2-x86_64
installed = egl-gbm-1.1.3-1-x86_64
installed = egl-wayland-4:1.1.21-1-x86_64
installed = egl-wayland2-1.0.1-1-x86_64
installed = egl-x11-1.0.5-1-x86_64
installed = eglexternalplatform-1.2.1-1-any
installed = electron41-41.7.2-1-x86_64
installed = elfutils-0.195-1-x86_64
installed = erofs-utils-1.9.1-1-x86_64
installed = exo-4.20.0-2-x86_64
installed = expat-2.8.1-1-x86_64
installed = extra-cmake-modules-6.26.0-1-any
installed = fakeroot-1:1.37.2-1-x86_64
installed = fcft-3.3.3-1-x86_64
installed = ffmpeg-2:8.1.1-2-x86_64
installed = fftw-3.3.11-1-x86_64
installed = file-5.48-1-x86_64
installed = filesystem-2025.10.12-1-any
installed = findutils-4.10.0-3-x86_64
installed = firefox-151.0.4-1-x86_64
installed = flac-1.5.0-1-x86_64
installed = flatpak-1:1.18.0-1-x86_64
installed = flex-2.6.4-6-x86_64
installed = fmt-12.1.0-2-x86_64
installed = fontconfig-2:2.18.1-1-x86_64
installed = freerdp-2:3.26.0-1-x86_64
installed = freetype2-2.14.3-1-x86_64
installed = fribidi-1.0.16-2-x86_64
installed = fuse-common-3.18.2-1-x86_64
installed = fuse2-2.9.9-5-x86_64
installed = fuse3-3.18.2-1-x86_64
installed = fuzzel-1.14.1-1-x86_64
installed = gawk-5.4.0-1-x86_64
installed = gc-8.2.12-1-x86_64
installed = gcc-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = gcc-libs-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = gcr-3.41.2-2-x86_64
installed = gcr-4-4.4.0.1-1-x86_64
installed = gdb-17.2-1-x86_64
installed = gdb-common-17.2-1-x86_64
installed = gdbm-1.26-2-x86_64
installed = gdk-pixbuf2-2.44.6-2-x86_64
installed = gettext-1.0-2-x86_64
installed = giflib-6.1.3-1-x86_64
installed = git-2.54.0-1-x86_64
installed = glib-networking-1:2.80.1-1-x86_64
installed = glib2-2.88.1-1-x86_64
installed = glibc-2.43+r22+g8362e8ce10b2-2-x86_64
installed = glibmm-2.66.8-2-x86_64
installed = glibmm-2.68-2.88.0-2-x86_64
installed = glslang-1:1.4.350.0-1-x86_64
installed = glycin-2.1.1-1-x86_64
installed = gmp-6.3.0-3-x86_64
installed = gnome-themes-extra-1:3.28-1-any
installed = gnulib-l10n-20241231-1-any
installed = gnupg-2.4.9-1-x86_64
installed = gnutls-3.8.13-2-x86_64
installed = go-2:1.26.4-1-x86_64
installed = gobject-introspection-1.86.0-2-x86_64
installed = gobject-introspection-runtime-1.86.0-2-x86_64
installed = gparted-1.8.1-2-x86_64
installed = gperftools-2.18.1-1-x86_64
installed = gpgme-2.1.0-1-x86_64
installed = gpgmepp-2.1.0-1-x86_64
installed = gpm-1.20.7.r38.ge82d1a6-6-x86_64
installed = gpsd-3.27.5-1-x86_64
installed = gptfdisk-1.0.10-2-x86_64
installed = graphene-1.10.8-2-x86_64
installed = graphite-1:1.3.15-1-x86_64
installed = grep-3.12-2-x86_64
installed = grim-1.5.0-2-x86_64
installed = groff-1.24.1-1-x86_64
installed = grub-2:2.14-1-x86_64
installed = gsettings-desktop-schemas-50.1-1-any
installed = gsettings-system-schemas-50.1-1-any
installed = gsm-1.0.24-1-x86_64
installed = gssdp-1.6.5-1-x86_64
installed = gst-plugins-bad-libs-1.28.3-1-x86_64
installed = gst-plugins-base-libs-1.28.3-1-x86_64
installed = gstreamer-1.28.3-1-x86_64
installed = gtest-1.17.0-2-x86_64
installed = gtk-layer-shell-0.10.1-1-x86_64
installed = gtk-update-icon-cache-1:4.22.4-1-x86_64
installed = gtk3-1:3.24.52-1-x86_64
installed = gtk4-1:4.22.4-1-x86_64
installed = gtkmm-4.0-4.22.0-2-x86_64
installed = gtkmm3-3.24.11-1-x86_64
installed = guile-3.0.11-1-x86_64
installed = gupnp-1:1.6.10-1-x86_64
installed = gupnp-igd-1.6.0-2-x86_64
installed = gzip-1.14-2-x86_64
installed = harfbuzz-14.2.1-1-x86_64
installed = harfbuzz-icu-14.2.1-1-x86_64
installed = hicolor-icon-theme-0.18-1-any
installed = hidapi-0.15.0-1-x86_64
installed = highway-1.4.0-1-x86_64
installed = hunspell-1.7.3-1-x86_64
installed = hwdata-0.408-1-any
installed = hwloc-2.13.0-1-x86_64
installed = hyphen-2.8.9-1-x86_64
installed = hyprcursor-0.1.13-6-x86_64
installed = hyprgraphics-0.5.1-2-x86_64
installed = hypridle-0.1.7-9-x86_64
installed = hyprland-0.55.4-1-x86_64
installed = hyprland-guiutils-0.2.1-6-x86_64
installed = hyprland-qt-support-0.1.0-12-x86_64
installed = hyprlang-0.6.8-4-x86_64
installed = hyprlock-0.9.5-4-x86_64
installed = hyprpaper-0.8.4-2-x86_64
installed = hyprpicker-0.4.7-1-x86_64
installed = hyprpolkitagent-0.1.3-7-x86_64
installed = hyprshot-1.3.0-4-any
installed = hyprtoolkit-0.5.4-2-x86_64
installed = hyprutils-0.13.1-1-x86_64
installed = hyprwayland-scanner-0.4.6-1-x86_64
installed = hyprwire-0.3.1-2-x86_64
installed = iana-etc-20260530-1-any
installed = icu-78.3-1-x86_64
installed = imagemagick-7.1.2.25-1-x86_64
installed = iniparser-4.2.6-2-x86_64
installed = iproute2-7.0.0-1-x86_64
installed = iptables-1:1.8.13-1-x86_64
installed = iputils-20250605-1-x86_64
installed = iso-codes-4.20.1-1-any
installed = jack2-1.9.22-2-x86_64
installed = jansson-2.15.0-1-x86_64
installed = jbigkit-2.1-8-x86_64
installed = jq-1.8.1-3-x86_64
installed = json-c-0.18-2-x86_64
installed = json-glib-1.10.8-1-x86_64
installed = jsoncpp-1.9.6-3-x86_64
installed = kbd-2.10.0-1-x86_64
installed = kcoreaddons-6.26.0-1-x86_64
installed = keyutils-1.6.3-4-x86_64
installed = ki18n-6.26.0-1-x86_64
installed = kitty-0.47.1-1-x86_64
installed = kitty-shell-integration-0.47.1-1-x86_64
installed = kitty-terminfo-0.47.1-1-x86_64
installed = kmod-34.2-1-x86_64
installed = kpmcore-26.04.2-1-x86_64
installed = krb5-1.22.2-1-x86_64
installed = kwidgetsaddons-6.26.0-1-x86_64
installed = l-smash-2.14.5-4-x86_64
installed = lame-3.101.r6531-1-x86_64
installed = lapack-3.12.1-2-x86_64
installed = lcms2-2.19.1-1-x86_64
installed = leancrypto-1.7.2-1-x86_64
installed = lib32-alsa-lib-1.2.16-1-x86_64
installed = lib32-alsa-plugins-1.2.12-1-x86_64
installed = lib32-brotli-1.1.0-1-x86_64
installed = lib32-bzip2-1.0.8-4-x86_64
installed = lib32-curl-8.20.0-7-x86_64
installed = lib32-dbus-1.16.2-1-x86_64
installed = lib32-e2fsprogs-1.47.4-1-x86_64
installed = lib32-expat-2.8.1-1-x86_64
installed = lib32-fontconfig-2:2.18.1-1-x86_64
installed = lib32-freetype2-2.14.3-1-x86_64
installed = lib32-gcc-libs-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = lib32-glib2-2.88.1-1-x86_64
installed = lib32-glibc-2.43+r22+g8362e8ce10b2-2-x86_64
installed = lib32-gmp-6.3.0-2-x86_64
installed = lib32-gnutls-3.8.13-3-x86_64
installed = lib32-icu-78.3-1-x86_64
installed = lib32-json-c-0.18-2-x86_64
installed = lib32-keyutils-1.6.3-4-x86_64
installed = lib32-krb5-1.22.2-1-x86_64
installed = lib32-libdrm-2.4.134-1-x86_64
installed = lib32-libelf-0.195-1-x86_64
installed = lib32-libffi-3.5.2-1-x86_64
installed = lib32-libgcrypt-1.12.2-1-x86_64
installed = lib32-libglvnd-1.7.0-1-x86_64
installed = lib32-libgpg-error-1.61-1-x86_64
installed = lib32-libidn2-2.3.8-1-x86_64
installed = lib32-libldap-2.6.13-1-x86_64
installed = lib32-libnghttp2-1.69.0-1-x86_64
installed = lib32-libnghttp3-1.16.0-1-x86_64
installed = lib32-libngtcp2-1.23.0-1-x86_64
installed = lib32-libnm-1.56.1-1-x86_64
installed = lib32-libpciaccess-0.19-1-x86_64
installed = lib32-libpipewire-1:1.6.6-1-x86_64
installed = lib32-libpng-1.6.58-1-x86_64
installed = lib32-libpsl-0.21.5-1-x86_64
installed = lib32-libssh2-1.11.1-1-x86_64
installed = lib32-libtasn1-4.21.0-1-x86_64
installed = lib32-libunistring-1.4.2-1-x86_64
installed = lib32-libva-2.22.0-1-x86_64
installed = lib32-libx11-1.8.13-1-x86_64
installed = lib32-libxau-1.0.12-1-x86_64
installed = lib32-libxcb-1.17.0-1-x86_64
installed = lib32-libxcrypt-4.5.2-1-x86_64
installed = lib32-libxcrypt-compat-4.5.2-1-x86_64
installed = lib32-libxdmcp-1.1.5-1-x86_64
installed = lib32-libxext-1.3.7-1-x86_64
installed = lib32-libxfixes-6.0.1-2-x86_64
installed = lib32-libxinerama-1.1.6-1-x86_64
installed = lib32-libxml2-2.15.3-1-x86_64
installed = lib32-libxshmfence-1.3.3-1-x86_64
installed = lib32-libxss-1.2.5-1-x86_64
installed = lib32-libxxf86vm-1.1.5-2-x86_64
installed = lib32-llvm-libs-1:22.1.6-1-x86_64
installed = lib32-lm_sensors-1:3.6.2-2-x86_64
installed = lib32-mesa-1:26.1.2-1-x86_64
installed = lib32-ncurses-6.6-2-x86_64
installed = lib32-nettle-4.0-2-x86_64
installed = lib32-nspr-4.39-1-x86_64
installed = lib32-nss-3.124-1-x86_64
installed = lib32-nvidia-utils-610.43.02-1-x86_64
installed = lib32-openssl-1:3.6.3-1-x86_64
installed = lib32-p11-kit-0.26.2-1-x86_64
installed = lib32-pcre2-10.47-1-x86_64
installed = lib32-pipewire-1:1.6.6-1-x86_64
installed = lib32-spirv-tools-1:1.4.350.0-1-x86_64
installed = lib32-sqlite-3.53.2-1-x86_64
installed = lib32-systemd-260.2-1-x86_64
installed = lib32-util-linux-2.42.1-1-x86_64
installed = lib32-vulkan-icd-loader-1.4.350.0-1-x86_64
installed = lib32-wayland-1.25.0-1-x86_64
installed = lib32-xz-5.8.3-1-x86_64
installed = lib32-zlib-1.3.2-1-x86_64
installed = lib32-zstd-1.5.7-2-x86_64
installed = libabw-0.1.4-1-x86_64
installed = libadwaita-1:1.9.1-1-x86_64
installed = libaio-0.3.113-4-x86_64
installed = libappindicator-12.10.1-1-x86_64
installed = libarchive-3.8.7-1-x86_64
installed = libasan-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libass-0.17.4-2-x86_64
installed = libassuan-3.0.0-1-x86_64
installed = libasyncns-1:0.8+r3+g68cd5af-3-x86_64
installed = libatomic-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libatomic_ops-7.8.2-2-x86_64
installed = libavc1394-0.5.4-7-x86_64
installed = libavif-1.4.2-1-x86_64
installed = libb2-0.98.1-3-x86_64
installed = libblake3-1.8.4-1-x86_64
installed = libbluray-1.4.1-1-x86_64
installed = libbpf-1.7.0-1-x86_64
installed = libbs2b-3.1.0-10-x86_64
installed = libbsd-0.12.2-2-x86_64
installed = libburn-1.5.8-1-x86_64
installed = libcanberra-1:0.30+r2+gc0620e4-6-x86_64
installed = libcap-2.78-1-x86_64
installed = libcap-ng-0.9.3-1-x86_64
installed = libcbor-0.14.0-1-x86_64
installed = libcdio-2.3.0-1-x86_64
installed = libcdio-paranoia-10.2+2.0.2-2-x86_64
installed = libcdr-0.1.9-1-x86_64
installed = libcloudproviders-0.4.0-1-x86_64
installed = libcmis-0.6.3-1-x86_64
installed = libcolord-1.4.8-1-x86_64
installed = libcups-2:2.4.19-1-x86_64
installed = libdaemon-0.14-6-x86_64
installed = libdatrie-0.2.14-1-x86_64
installed = libdbusmenu-glib-18.10.20180917-1-x86_64
installed = libdbusmenu-gtk3-18.10.20180917-1-x86_64
installed = libdecor-0.2.5-1-x86_64
installed = libdeflate-1.25-1-x86_64
installed = libdisplay-info-0.3.0-1-x86_64
installed = libdovi-3.3.2-1-x86_64
installed = libdrm-2.4.134-1-x86_64
installed = libdvdnav-7.0.0-1-x86_64
installed = libdvdread-7.0.1-1-x86_64
installed = libe-book-0.1.3-20-x86_64
installed = libebur128-1.2.6-2-x86_64
installed = libedit-20260512_3.1-1-x86_64
installed = libei-1.6.0-1-x86_64
installed = libelf-0.195-1-x86_64
installed = libepoxy-1.5.10-3-x86_64
installed = libepubgen-0.1.1-6-x86_64
installed = libetonyek-0.1.13-2-x86_64
installed = libevdev-1.13.6-1-x86_64
installed = libevent-2.1.12-5-x86_64
installed = libexif-0.6.26-1-x86_64
installed = libexttextcat-3.4.8-1-x86_64
installed = libfdk-aac-2.0.3-2-x86_64
installed = libffi-3.5.2-1-x86_64
installed = libfido2-1.17.0-1-x86_64
installed = libfontenc-1.1.9-1-x86_64
installed = libfreeaptx-0.2.2-1-x86_64
installed = libfreehand-0.1.3-1-x86_64
installed = libfyaml-0.9.6-2-x86_64
installed = libgcc-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libgcrypt-1.12.2-1-x86_64
installed = libgfortran-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libgirepository-1.86.0-2-x86_64
installed = libgit2-1:1.9.4-1-x86_64
installed = libglvnd-1.7.0-3-x86_64
installed = libgomp-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libgpg-error-1.61-1-x86_64
installed = libgtop-2.41.3-2-x86_64
installed = libgudev-238-3-x86_64
installed = libice-1.1.2-1-x86_64
installed = libidn2-2.3.8-1-x86_64
installed = libiec61883-1.2.0-9-x86_64
installed = libimobiledevice-1.4.0-2-x86_64
installed = libimobiledevice-glue-1.3.2-1-x86_64
installed = libinih-62-2-x86_64
installed = libinput-1.31.3-1-x86_64
installed = libisl-0.27-1-x86_64
installed = libisoburn-1.5.8.2-1-x86_64
installed = libisofs-1.5.8.2-1-x86_64
installed = libixion-0.20.0-7-x86_64
installed = libjpeg-turbo-3.1.4.1-1-x86_64
installed = libjxl-0.11.2-2-x86_64
installed = libksba-1.8.0-1-x86_64
installed = liblangtag-0.6.8-1-x86_64
installed = liblc3-1.1.3-2-x86_64
installed = libldac-2.0.2.3-3-x86_64
installed = libldap-2.6.13-1-x86_64
installed = liblqr-0.4.3-1-x86_64
installed = liblsan-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libmakepkg-dropins-20-1-any
installed = libmalcontent-0.14.0-4-x86_64
installed = libmd-1.2.0-1-x86_64
installed = libmm-glib-1.24.2-1-x86_64
installed = libmnl-1.0.5-2-x86_64
installed = libmodplug-0.8.9.0-7-x86_64
installed = libmpc-1.4.1-1-x86_64
installed = libmpdclient-2.23-1-x86_64
installed = libmspub-0.1.5-1-x86_64
installed = libmwaw-0.3.22-4-x86_64
installed = libmysofa-1.3.4-1-x86_64
installed = libndp-1.9-1-x86_64
installed = libnet-2:1.3-2-x86_64
installed = libnetfilter_conntrack-1.1.1-1-x86_64
installed = libnewt-0.52.25-2-x86_64
installed = libnfnetlink-1.0.2-2-x86_64
installed = libnftnl-1.3.1-1-x86_64
installed = libnghttp2-1.69.0-1-x86_64
installed = libnghttp3-1.16.0-1-x86_64
installed = libngtcp2-1.23.0-1-x86_64
installed = libnice-0.1.23-1-x86_64
installed = libnl-3.12.0-1-x86_64
installed = libnm-1.56.1-1-x86_64
installed = libnma-1.10.6-3-x86_64
installed = libnma-common-1.10.6-3-x86_64
installed = libnotify-0.8.8-1-x86_64
installed = libnsl-2.0.1-2-x86_64
installed = libnumbertext-1.0.11-3-x86_64
installed = libobjc-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libodfgen-0.1.8-5-x86_64
installed = libogg-1.3.6-1-x86_64
installed = libopenmpt-0.8.7-1-x86_64
installed = libopenrazer-0.4.0-1-x86_64
installed = liborcus-0.21.0-6-x86_64
installed = libp11-kit-0.26.2-1-x86_64
installed = libpagemaker-0.0.4-5-x86_64
installed = libpcap-1.10.6-1-x86_64
installed = libpciaccess-0.19-1-x86_64
installed = libpgm-5.3.128-4-x86_64
installed = libpipewire-1:1.6.6-1-x86_64
installed = libplacebo-7.360.1-2-x86_64
installed = libplist-2.7.0-3-x86_64
installed = libpng-1.6.58-1-x86_64
installed = libproxy-0.5.12-1-x86_64
installed = libpsl-0.21.5-2-x86_64
installed = libpulse-17.0+r98+gb096704c0-1-x86_64
installed = libpwquality-1.4.5-7-x86_64
installed = libquadmath-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libqxp-0.0.3-1-x86_64
installed = libraqm-0.10.5-1-x86_64
installed = libraw1394-2.1.2-4-x86_64
installed = libreoffice-fresh-26.2.4-1-x86_64
installed = librevenge-0.0.5-4-x86_64
installed = librsvg-2:2.62.3-1-x86_64
installed = librsync-1:2.3.4-2-x86_64
installed = libsamplerate-0.2.2-3-x86_64
installed = libsasl-2.1.28-5-x86_64
installed = libseccomp-2.6.0-1-x86_64
installed = libsecret-0.21.7-1-x86_64
installed = libsigc++-2.12.2-1-x86_64
installed = libsigc++-3.0-3.8.1-1-x86_64
installed = libsixel-1.10.5-1-x86_64
installed = libsm-1.2.6-1-x86_64
installed = libsndfile-1.2.2-4-x86_64
installed = libsodium-1.0.22-1-x86_64
installed = libsoup3-3.6.6-2-x86_64
installed = libsoxr-0.1.3-4-x86_64
installed = libssh-0.12.0-1-x86_64
installed = libssh2-1.11.1-1-x86_64
installed = libstaroffice-0.0.7-5-x86_64
installed = libstdc++-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libstemmer-3.1.1-1-x86_64
installed = libsysprof-capture-50.0-2-x86_64
installed = libtasn1-4.21.0-1-x86_64
installed = libtatsu-1.0.5-1-x86_64
installed = libteam-1.32-3-x86_64
installed = libthai-0.1.30-1-x86_64
installed = libtheora-1.2.0-1-x86_64
installed = libtiff-4.7.1-2-x86_64
installed = libtirpc-1.3.7-1-x86_64
installed = libtommath-1.3.0-2-x86_64
installed = libtool-2.6.1-1-x86_64
installed = libtsan-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libubsan-16.1.1+r12+g301eb08fa2c5-1-x86_64
installed = libunibreak-7.0-1-x86_64
installed = libunistring-1.4.2-1-x86_64
installed = libunwind-1.8.2-1-x86_64
installed = liburing-2.14-1-x86_64
installed = libusb-1.0.30-1-x86_64
installed = libusbmuxd-2.1.1-2-x86_64
installed = libutf8proc-2.11.3-1-x86_64
installed = libuv-1.52.1-1-x86_64
installed = libva-2.23.0-1-x86_64
installed = libva-nvidia-driver-0.0.17-1-x86_64
installed = libvdpau-1.5-4-x86_64
installed = libverto-0.3.2-6-x86_64
installed = libvisio-0.1.11-1-x86_64
installed = libvorbis-1.3.7-4-x86_64
installed = libvpl-2.16.0-2-x86_64
installed = libvpx-1.16.0-3-x86_64
installed = libwacom-2.19.0-1-x86_64
installed = libwebp-1.6.0-2-x86_64
installed = libwireplumber-0.5.14-1-x86_64
installed = libwpd-0.10.3-6-x86_64
installed = libwps-0.4.14-4-x86_64
installed = libx11-1.8.13-1-x86_64
installed = libxau-1.0.12-1-x86_64
installed = libxcb-1.17.0-1-x86_64
installed = libxcomposite-0.4.7-1-x86_64
installed = libxcrypt-4.5.2-1-x86_64
installed = libxcrypt-compat-4.5.2-1-x86_64
installed = libxcursor-1.2.3-1-x86_64
installed = libxcvt-0.1.3-1-x86_64
installed = libxdamage-1.1.7-1-x86_64
installed = libxdmcp-1.1.5-2-x86_64
installed = libxext-1.3.7-1-x86_64
installed = libxfce4ui-4.20.2-1-x86_64
installed = libxfce4util-4.20.1-1-x86_64
installed = libxfixes-6.0.2-1-x86_64
installed = libxfont2-2.0.7-1-x86_64
installed = libxft-2.3.9-1-x86_64
installed = libxi-1.8.3-1-x86_64
installed = libxinerama-1.1.6-1-x86_64
installed = libxkbcommon-1.13.2-1-x86_64
installed = libxkbcommon-x11-1.13.2-1-x86_64
installed = libxkbfile-1.2.0-1-x86_64
installed = libxml2-2.15.3-1-x86_64
installed = libxml2-legacy-2.13.9-2-x86_64
installed = libxmlb-0.3.27-1-x86_64
installed = libxmp-4.7.0-1-x86_64
installed = libxmu-1.3.1-1-x86_64
installed = libxpresent-1.0.2-1-x86_64
installed = libxrandr-1.5.5-1-x86_64
installed = libxrender-0.9.12-1-x86_64
installed = libxshmfence-1.3.3-1-x86_64
installed = libxslt-1.1.45-2-x86_64
installed = libxss-1.2.5-1-x86_64
installed = libxt-1.3.1-1-x86_64
installed = libxtst-1.2.5-1-x86_64
installed = libxv-1.0.13-1-x86_64
installed = libxxf86vm-1.1.7-1-x86_64
installed = libyaml-0.2.5-3-x86_64
installed = libyuv-r2426+464c51a03-1-x86_64
installed = libzip-1.11.4-1-x86_64
installed = libzmf-0.0.2-20-x86_64
installed = licenses-20240728-1-any
installed = lilv-0.26.4-1-x86_64
installed = linux-7.0.11.arch1-1-x86_64
installed = linux-api-headers-7.0-1-x86_64
installed = linux-firmware-20260519-1-any
installed = linux-firmware-amdgpu-20260519-1-any
installed = linux-firmware-atheros-20260519-1-any
installed = linux-firmware-broadcom-20260519-1-any
installed = linux-firmware-cirrus-20260519-1-any
installed = linux-firmware-intel-20260519-1-any
installed = linux-firmware-mediatek-20260519-1-any
installed = linux-firmware-nvidia-20260519-1-any
installed = linux-firmware-other-20260519-1-any
installed = linux-firmware-radeon-20260519-1-any
installed = linux-firmware-realtek-20260519-1-any
installed = linux-firmware-whence-20260519-1-any
installed = linux-headers-7.0.11.arch1-1-x86_64
installed = lld-22.1.6-1-x86_64
installed = llhttp-9.3.1-1-x86_64
installed = llvm-libs-22.1.6-1-x86_64
installed = lm_sensors-1:3.6.2-1-x86_64
installed = lmdb-0.9.35-1-x86_64
installed = lpsolve-5.5.2.14-1-x86_64
installed = lsb-release-2.0.r55.a25a4fc-1-any
installed = lsof-4.99.6-1-x86_64
installed = lua-5.5.0-2-x86_64
installed = lua54-5.4.8-6-x86_64
installed = luajit-2.1.1780076327+b925b3e-1-x86_64
installed = lug-helper-1:4.13-1-any
installed = lv2-1.18.10-2-x86_64
installed = lz4-1:1.10.0-2-x86_64
installed = lzo-2.10-5-x86_64
installed = m4-1.4.21-2-x86_64
installed = mailcap-2.1.54-2-any
installed = make-4.4.1-3-x86_64
installed = mako-1.11.0-1-x86_64
installed = md4c-0.5.3-1-x86_64
installed = mesa-1:26.1.2-1-x86_64
installed = meson-1.11.1-3-any
installed = mingw-w64-binutils-2.46.0-1-x86_64
installed = mingw-w64-crt-14.0.0-1-any
installed = mingw-w64-gcc-16.1.0-1-x86_64
installed = mingw-w64-headers-14.0.0-1-any
installed = mingw-w64-winpthreads-14.0.0-1-any
installed = minizip-1:1.3.2-3-x86_64
installed = mkinitcpio-41-4-any
installed = mkinitcpio-busybox-1.36.1-1-x86_64
installed = mobile-broadband-provider-info-20251101-1-any
installed = mpdecimal-4.0.1-3-x86_64
installed = mpfr-4.2.2-1-x86_64
installed = mpg123-1.33.5-1-x86_64
installed = mpv-1:0.41.0-3-x86_64
installed = mpvpaper-1.8-1-x86_64
installed = mtdev-1.1.7-1-x86_64
installed = mtools-1:4.0.49-1-x86_64
installed = mujs-1.3.9-1-x86_64
installed = muparser-2.3.5-2-x86_64
installed = nano-9.0-1-x86_64
installed = ncurses-6.6-2-x86_64
installed = neon-0.37.1-1-x86_64
installed = netavark-1.17.2-2-x86_64
installed = nettle-4.0-1-x86_64
installed = network-manager-applet-1.36.0-2-x86_64
installed = networkmanager-1.56.1-1-x86_64
installed = nftables-1:1.1.6-3-x86_64
installed = ninja-1.13.2-3-x86_64
installed = nm-connection-editor-1.36.0-2-x86_64
installed = noto-fonts-1:2026.06.01-1-any
installed = noto-fonts-cjk-20240730-1-any
installed = noto-fonts-emoji-1:2.051-1-any
installed = noto-fonts-extra-1:2026.06.01-1-any
installed = npth-1.8-1-x86_64
installed = nspr-4.39-1-x86_64
installed = nss-3.124-1-x86_64
installed = nvidia-open-610.43.02-2-x86_64
installed = nvidia-utils-610.43.02-2-x86_64
installed = ocl-icd-2.3.4-1-x86_64
installed = onetbb-2023.0.0-1-x86_64
installed = oniguruma-6.9.10-1-x86_64
installed = openal-1.25.2-1-x86_64
installed = opencore-amr-0.1.6-2-x86_64
installed = openjpeg2-2.5.4-1-x86_64
installed = openrazer-daemon-3.12.2-2-any
installed = openrazer-driver-dkms-3.12.2-2-any
installed = openssh-10.3p1-1-x86_64
installed = openssl-3.6.3-1-x86_64
installed = opus-1.6.1-1-x86_64
installed = opusfile-0.12-4-x86_64
installed = orc-0.4.42-1-x86_64
installed = os-prober-1.84-1-x86_64
installed = ostree-2025.7-3-x86_64
installed = p11-kit-0.26.2-1-x86_64
installed = pacman-7.1.0.r9.g54d9411-2-x86_64
installed = pacman-mirrorlist-20260610-1-any
installed = pahole-1:1.31-2-x86_64
installed = pam-1.7.2-2-x86_64
installed = pambase-20250719-1-any
installed = pango-1:1.57.1-1-x86_64
installed = pangomm-2.46.4-3-x86_64
installed = pangomm-2.48-2.56.1-2-x86_64
installed = papirus-icon-theme-20250501-1-any
installed = parted-3.7-1-x86_64
installed = paru-2.1.0-2-x86_64
installed = paru-debug-2.1.0-2-x86_64
installed = passt-2026_05_26.038c51e-1-x86_64
installed = patch-2.8-1-x86_64
installed = pavucontrol-1:6.2-1-x86_64
installed = pciutils-3.15.0-1-x86_64
installed = pcre-8.45-4-x86_64
installed = pcre2-10.47-1-x86_64
installed = pcsclite-2.5.1-1-x86_64
installed = perl-5.42.2-1-x86_64
installed = perl-error-0.17030-3-any
installed = perl-mailtools-2.22-3-any
installed = perl-timedate-2.35-1-any
installed = pinentry-1.3.2-2-x86_64
installed = pipewire-1:1.6.6-1-x86_64
installed = pipewire-audio-1:1.6.6-1-x86_64
installed = pipewire-pulse-1:1.6.6-1-x86_64
installed = pixman-0.46.4-1-x86_64
installed = pkgconf-2.5.1-1-x86_64
installed = playerctl-2.4.1-5-x86_64
installed = podman-5.8.3-1-x86_64
installed = podman-compose-1.6.0-1-any
installed = podman-desktop-1.27.2-2-x86_64
installed = polkit-127-3-x86_64
installed = polkit-qt6-0.201.1-1-x86_64
installed = poppler-26.05.0-1-x86_64
installed = popt-1.19-2-x86_64
installed = portaudio-1:19.7.0-4-x86_64
installed = portmidi-1:2.0.8-1-x86_64
installed = pps-tools-1.0.3-2-x86_64
installed = procps-ng-4.0.6-1-x86_64
installed = protobuf-35.0-1-x86_64
installed = protobuf-c-1.5.2-10-x86_64
installed = psmisc-23.7-2-x86_64
installed = pugixml-1.15-3-x86_64
installed = python-3.14.5-1-x86_64
installed = python-attrs-26.1.0-1-any
installed = python-autocommand-2.2.2-9-any
installed = python-cffi-2.0.0-2-x86_64
installed = python-click-8.3.3-1-any
installed = python-cryptography-48.0.1-1-x86_64
installed = python-daemonize-2.5.0-10-any
installed = python-dbus-1.4.0-2-x86_64
installed = python-dotenv-1.2.2-1-any
installed = python-filelock-3.29.0-1-any
installed = python-gobject-3.56.3-1-x86_64
installed = python-jaraco.collections-5.1.0-3-any
installed = python-jaraco.context-6.1.2-1-any
installed = python-jaraco.functools-4.1.0-3-any
installed = python-jaraco.text-4.0.0-4-any
installed = python-mako-1.3.11-1-any
installed = python-markdown-3.10.2-1-any
installed = python-markupsafe-3.0.3-1-x86_64
installed = python-more-itertools-11.1.0-1-any
installed = python-numpy-2.4.6-1-x86_64
installed = python-openrazer-3.12.2-2-any
installed = python-packaging-26.2-1-any
installed = python-pip-26.1.2-1-any
installed = python-pkg_resources-81.0.0-1-any
installed = python-platformdirs-4.10.0-1-any
installed = python-protobuf-35.0-1-x86_64
installed = python-pycparser-3.00-1-any
installed = python-pygame-2.6.1-5-x86_64
installed = python-pyudev-0.24.4-1-any
installed = python-setproctitle-1.3.7-2-x86_64
installed = python-setuptools-1:82.0.1-1-any
installed = python-tqdm-4.68.1-1-any
installed = python-typing_extensions-4.15.0-3-any
installed = python-wheel-0.47.0-1-any
installed = python-yaml-6.0.3-2-x86_64
installed = qt5-base-5.15.19+kde+r96-1-x86_64
installed = qt5-declarative-5.15.19+kde+r23-1-x86_64
installed = qt5-graphicaleffects-5.15.19-1-x86_64
installed = qt5-quickcontrols2-5.15.19+kde+r5-1-x86_64
installed = qt5-svg-5.15.19+kde+r5-1-x86_64
installed = qt5-translations-5.15.19-1-any
installed = qt5-wayland-5.15.19+kde+r55-1-x86_64
installed = qt6-5compat-6.11.1-1-x86_64
installed = qt6-base-6.11.1-1-x86_64
installed = qt6-declarative-6.11.1-3-x86_64
installed = qt6-shadertools-6.11.1-1-x86_64
installed = qt6-svg-6.11.1-1-x86_64
installed = qt6-tools-6.11.1-1-x86_64
installed = qt6-translations-6.11.1-1-any
installed = qt6-wayland-6.11.1-1-x86_64
installed = raptor-2.0.16-9-x86_64
installed = rasqal-1:0.9.33-9-x86_64
installed = rav1e-0.8.1-2-x86_64
installed = razergenie-1.3.0-1-x86_64
installed = re2-2:2025.11.05-4-x86_64
installed = readline-8.3.003-1-x86_64
installed = redland-1:1.0.17-10-x86_64
installed = reflector-2023-5-any
installed = resvg-0.47.0-2-x86_64
installed = rhash-1.4.6-1-x86_64
installed = rsync-3.4.4-1-x86_64
installed = rtkit-0.14-1-x86_64
installed = rubberband-4.0.0-2-x86_64
installed = rustup-1.29.0-2-x86_64
installed = sbc-2.2-1-x86_64
installed = scdoc-1.11.4-1-x86_64
installed = sdbus-cpp-2.3.1-1-x86_64
installed = sddm-0.21.0-7-x86_64
installed = sddm-catppuccin-git-r42.10831de-1-any
installed = sdl2-compat-2.32.70-1-x86_64
installed = sdl2_image-2.8.12-1-x86_64
installed = sdl2_mixer-2.8.2-1-x86_64
installed = sdl2_ttf-2.24.0-2-x86_64
installed = sdl3-3.4.10-1-x86_64
installed = sdl3_ttf-3.2.2-3-x86_64
installed = seatd-0.9.3-1-x86_64
installed = sed-4.10-1-x86_64
installed = serd-0.32.10-1-x86_64
installed = shaderc-2026.2-1-x86_64
installed = shadow-4.18.0-1-x86_64
installed = shared-mime-info-2.4-3-x86_64
installed = slang-2.3.3-4-x86_64
installed = slurp-1.5.0-2-x86_64
installed = smartmontools-7.5-1-x86_64
installed = snappy-1.2.2-3-x86_64
installed = sndio-1.10.0-1-x86_64
installed = sord-0.16.22-1-x86_64
installed = sound-theme-freedesktop-0.8-6-any
installed = source-highlight-3.1.9-18-x86_64
installed = spandsp-0.0.6-7-x86_64
installed = spdlog-1.17.0-2-x86_64
installed = speex-1.2.1-2-x86_64
installed = speexdsp-1.2.1-2-x86_64
installed = spirv-tools-1:1.4.350.0-1-x86_64
installed = sqlite-3.53.2-1-x86_64
installed = squashfs-tools-4.7.5-1-x86_64
installed = sratom-0.6.22-1-x86_64
installed = srt-1.5.5-1-x86_64
installed = startup-notification-0.12-9-x86_64
installed = steam-1.0.0.85-7-x86_64
installed = steam-devices-1.0.0.85-7-x86_64
installed = sudo-1.9.17.p2-2-x86_64
installed = svt-av1-4.1.0-1-x86_64
installed = systemd-260.2-2-x86_64
installed = systemd-libs-260.2-2-x86_64
installed = systemd-sysvcompat-260.2-2-x86_64
installed = tar-1.35-2-x86_64
installed = tcl-8.6.16-1-x86_64
installed = tdb-1.4.15-1-x86_64
installed = texinfo-7.3-1-x86_64
installed = thunar-4.20.8-3-x86_64
installed = tinysparql-3.11.1-1-x86_64
installed = tk-8.6.16-1-x86_64
installed = tomlplusplus-3.4.0-2-x86_64
installed = tpm2-tss-4.1.3-1-x86_64
installed = tslib-1.24-1-x86_64
installed = ttf-jetbrains-mono-nerd-3.4.0-2-any
installed = tzdata-2026b-1-x86_64
installed = uchardet-0.0.8-4-x86_64
installed = uefitool-debug-1:0.28.0-3-x86_64
installed = unzip-6.0-23-x86_64
installed = upower-1.91.2-1-x86_64
installed = usbutils-019-1-x86_64
installed = util-linux-2.42.1-1-x86_64
installed = util-linux-libs-2.42.1-1-x86_64
installed = v4l-utils-1.32.0-2-x86_64
installed = vapoursynth-76-1-x86_64
installed = vid.stab-1.1.1-2-x86_64
installed = vim-9.2.0623-1-x86_64
installed = vim-runtime-9.2.0623-1-x86_64
installed = vmaf-3.1.0-1-x86_64
installed = vmware-keymaps-1.0-3-any
installed = vmware-workstation-26H1-3-x86_64
installed = vscodium-bin-1.121.03429-1-x86_64
installed = vulkan-icd-loader-1.4.350.0-1-x86_64
installed = vulkan-tools-1.4.350.0-1-x86_64
installed = waybar-0.15.0-2-x86_64
installed = wayland-1.25.0-1-x86_64
installed = wayland-protocols-1.49-1-any
installed = webrtc-audio-processing-1-1.3-5-x86_64
installed = which-2.25-1-x86_64
installed = winboat-bin-0.9.0-1-x86_64
installed = wine-staging-11.10-1-x86_64
installed = wireplumber-0.5.14-1-x86_64
installed = wl-clipboard-1:2.3.0-1-x86_64
installed = wlogout-1.2.2-0-x86_64
installed = woff2-font-awesome-7.2.0-1-any
installed = wpa_supplicant-2:2.11-5-x86_64
installed = x264-3:0.165.r3222.b35605a-2-x86_64
installed = x265-4.1-1-x86_64
installed = xautomation-1.09-6-x86_64
installed = xcb-proto-1.17.0-4-any
installed = xcb-util-0.4.1-2-x86_64
installed = xcb-util-cursor-0.1.6-1-x86_64
installed = xcb-util-errors-1.0.1-2-x86_64
installed = xcb-util-image-0.4.1-3-x86_64
installed = xcb-util-keysyms-0.4.1-5-x86_64
installed = xcb-util-renderutil-0.3.10-2-x86_64
installed = xcb-util-wm-0.4.2-2-x86_64
installed = xdg-dbus-proxy-0.1.7-1-x86_64
installed = xdg-desktop-portal-1.22.0-1-x86_64
installed = xdg-desktop-portal-gtk-1.15.3-1-x86_64
installed = xdg-desktop-portal-hyprland-1.3.12-2-x86_64
installed = xdg-user-dirs-0.20-1-x86_64
installed = xdg-utils-1.2.1-2-any
installed = xf86-input-libinput-1.5.0-1-x86_64
installed = xfconf-4.20.0-2-x86_64
installed = xkeyboard-config-2.47-1-any
installed = xmlsec-1.3.11-1-x86_64
installed = xorg-fonts-encodings-1.1.0-2-any
installed = xorg-server-21.1.23-1-x86_64
installed = xorg-server-common-21.1.23-1-x86_64
installed = xorg-setxkbmap-1.3.5-1-x86_64
installed = xorg-xauth-1.1.5-1-x86_64
installed = xorg-xkbcomp-1.5.0-1-x86_64
installed = xorg-xprop-1.2.8-1-x86_64
installed = xorg-xrandr-1.5.4-1-x86_64
installed = xorg-xwayland-24.1.12-1-x86_64
installed = xorgproto-2025.1-1-any
installed = xvidcore-1.3.7-3-x86_64
installed = xxhash-0.8.3-1-x86_64
installed = xz-5.8.3-1-x86_64
installed = yaml-cpp-0.9.0-1-x86_64
installed = yay-12.6.0-1-x86_64
installed = yay-debug-12.6.0-1-x86_64
installed = zenity-4.2.2-1-x86_64
installed = zeromq-4.3.5-3-x86_64
installed = zimg-3.0.6-1-x86_64
installed = zint-2.16.0-2-x86_64
installed = zix-0.8.0-1-x86_64
installed = zlib-1:1.3.2-3-x86_64
installed = zlib-ng-2.3.3-1-x86_64
installed = zstd-1.5.7-3-x86_64
installed = zxing-cpp-3.0.2-1-x86_64
Binary file not shown.
@@ -1,16 +0,0 @@
# Generated by makepkg 7.1.0
# using fakeroot version 1.37.2
pkgname = python-meh
pkgbase = python-meh
xdata = pkgtype=pkg
pkgver = 0.43-1
pkgdesc = Python exception handling library (dépendance Anaconda)
url = https://github.com/rhinstaller/python-meh
builddate = 1781307281
packager = Unknown Packager
size = 170289
arch = any
license = GPL-2.0-or-later
depend = python
depend = python-gobject
depend = python-dbus
@@ -1,139 +0,0 @@
#
# __init__.py - Basic stuff for exception handling
#
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from collections import namedtuple
# These constants represent the return values of buttons on the initial
# exception handling dialog - the dialog that first pops up when an
# exception is hit.
MAIN_RESPONSE_DEBUG = 0
MAIN_RESPONSE_SAVE = 1
MAIN_RESPONSE_QUIT = 2
MAIN_RESPONSE_SHELL = 3
MAIN_RESPONSE_NONE = 4
class ConfigError(Exception):
"""Exception class for the configuration related errors."""
pass
class Config(object):
"""Hold configuration info useful throughout the exception handling
classes. This prevents having to pass a bunch of arguments to a
bunch of different functions. A Config instance must be created
before creating an ExceptionHandler instance.
"""
def __init__(self, *args, **kwargs):
"""Create a new Config instance. Arguments may be passed in to
set any of the configuration values. Unknown arguments will
be ignored. Instance attributes:
attrSkipList -- A list of strings. When handling a traceback,
any attributes found with the same name as an
element of this list will not be written to
the dump. This is to prevent writing potentially
sensitive information like passwords. The names
must be given without the leading name of the
object passed to handler.install(). For instance,
if handler.install() gets an Anaconda instance
with the name "anaconda" and you want to skip
anaconda.id.rootPassword, "id.rootPassword" should
be listed in attrSkipList.
fileList -- A list of files to find on the system and add
to the traceback dump.
localSkipList -- A list of strings. When handling a traceback,
any local variables found with their name containing
an element of this list will not be written to
the dump. This is subtely different from
attrSkipList.
callbackDict -- A dictionary having item names as keys and pairs
(function, attchmnt_only) as values.
@see register_callback
programName -- The name of the erroring program.
programVersion -- The version number of the erroring program.
Both programName and programVersion are used
throughout the exception handler, so must be
set.
programArch -- The architecture of the erroring program.
"""
self.attrSkipList = []
self.fileList = []
self.localSkipList = []
self.callbackDict = dict()
self.programName = None
self.programVersion = None
self.programArch = None
# Override the defaults set above with whatever's passed in as an
# argument. Unknown arguments get thrown away.
for (key, val) in kwargs.items():
if key in self.__dict__:
self.__dict__[key] = val
# Make sure required things are set.
if not self.programName:
raise ValueError("programName must be set.")
if not self.programVersion:
raise ValueError("programVersion must be set.")
def register_callback(self, item_name, callback, attchmnt_only=False,
override=False):
"""
Register new callback that will be called when data about the
crash is collected. The returned value will be included as the
'item_name' item.
:param item_name: name of the item storing the value returned by the
'callback' function
:type item_name: string
:param callback: a function to be called
:type callback: a function of type: () -> string
:param attchmnt_only: whether the returned valued should be included only
as an attachment or also in the main '*-tb' file
(defaults to False)
:type attchmnt_only: bool
:param override: whether to override the previously registered callback
with the same item name or not (may raise exception)
:type override: bool
:raise ConfigError: if callback with the 'item_name' has already been
registered and 'override' is not set to True
:return: None
"""
if item_name not in self.callbackDict or override:
self.callbackDict[item_name] = (callback, attchmnt_only)
else:
msg = "Callback with name '%s' already registered" % item_name
raise ConfigError(msg)
# type, value and stack are items provided by Python for the exception handler
ExceptionInfo = namedtuple("ExceptionInfo", ["type", "value", "stack"])
# ExceptionInfo instance plus the object that should be dumped
DumpInfo = namedtuple("DumpInfo", ["exc_info", "object"])
# information about a package (as provided e.g. by rpm)
PackageInfo = namedtuple("PackageInfo", ["name", "version", "release", "epoch",
"arch"])
@@ -1,551 +0,0 @@
#
# dump.py - general exception formatting and saving
#
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Matt Wilson <msw@redhat.com>
# Erik Troan <ewt@redhat.com>
# Chris Lumens <clumens@redhat.com>
#
# pylint: disable=bare-except,broad-except
import copy
import inspect
import os
import traceback
import sys
import codecs
import six
from meh import PackageInfo
from meh.safe_string import SafeStr
# Python 2/3 compatibilty
try:
longtype = long # pylint: disable=undefined-variable
except NameError:
longtype = int
try:
unitype = unicode # pylint: disable=undefined-variable
except NameError:
unitype = str
class ExceptionDump(object):
"""This class represents a traceback and contains several useful methods
for manipulating a traceback. In general, clients should not have to
use this class. It is mainly for internal use.
"""
def __init__(self, exc_info, config_obj):
"""Create a new ExceptionDump instance. Instance attributes:
:param exc_info: info about the exception provided by Python
:type exc_info: an instance of the meh.ExceptionInfo class
:param config_obj: configuration for python-meh
:type config_obj: an instance of the meh.Config class
"""
if inspect.istraceback(exc_info.stack):
self.stack = inspect.getinnerframes(exc_info.stack)
else:
self.stack = exc_info.stack
self.conf = config_obj
self.type = exc_info.type
self.value = exc_info.value
self._dumpHash = {}
@property
def desc(self):
# The description is a single line of text that should be used anywhere
# the bug needs to quickly be summarized. The most obvious example of
# this is when saving to bugzilla. We can populate the UI with this
# string so the user doesn't need to come up with one.
if self.type and self.value:
return traceback.format_exception_only(self.type, self.value)[0].strip()
else:
return ""
def _get_environment_info(self):
"""
Returns dictionary containing these items for a bugreport header
architecture
cmdline
component
executable
kernel
package
release
other involved packages
:rtype: dict (string -> string)
"""
RELEASE_NAME_FILE = "/etc/system-release"
class RPMinfoError(Exception):
"""Exception for errors in rpm queries"""
pass
def get_python_opts():
"""
Returns python's command line options
:return: list of python's command line options
:rtype: list
"""
flags_to_opts = {
"debug": "-d",
"py3k_warning": "-3",
"division_new": "-Qnew",
"division_warning": "-Q",
"inspect": "-i",
"interactive": "-i",
"optimize": "-O",
"dont_write_bytecode": "-B",
"no_user_site": "-s",
"no_site": "-S",
"ignore_environment": "-E",
"tabcheck": "-t",
"verbose": "-v",
"unicode": "-u",
"bytes_warning": "-b",
"quiet": "-q",
}
ret = set()
for flag in flags_to_opts.keys():
if getattr(sys.flags, flag, None):
ret.add(flags_to_opts[flag])
ret = list(ret)
return ret
def get_package_and_component(file_=sys.argv[0]):
"""
Returns package and component names for file (by default for script itself).
:param file_: filename
:type file_: string
:return: tuple containing package info and component name for the file
:rtype: (PackageInfo, str)
:raise RPMinfoError: if package and component for the file cannot be found
"""
import rpm
ts = rpm.TransactionSet()
mi = ts.dbMatch("basenames", file_)
try:
header = next(mi)
except StopIteration:
raise RPMinfoError("Cannot get package and component for file "+
"{0}".format(file_))
pkg_info = PackageInfo(header["name"].decode("utf-8"), header["version"].decode("utf-8"),
header["release"].decode("utf-8"),
u"%d" % header["epoch"] if header["epoch"] else u"0",
header["arch"].decode("utf-8"))
# cuts the name from the NVR format: foo-blah-2.8.8-2.fc17.src.rpm
srpm_name = header["sourcerpm"].decode("utf-8")
name_end = len(srpm_name)
try:
name_end = srpm_name.rindex('-')
name_end = srpm_name[:name_end].rindex('-')
except ValueError:
# expected exception
pass
component = srpm_name[:name_end]
return (pkg_info, component)
def get_release_version():
"""Returns release version (according to RELEASE_NAME_FILE)"""
try:
with open(RELEASE_NAME_FILE, "r") as file_:
return file_.readline().rstrip()
except IOError:
return "Cannot get release name."
def get_other_packages(self):
"""
Returns a set of additional packages whose files appear in
traceback.
:rtype: set
"""
packages = set()
if not self.stack:
return packages
for (_frame, fn, _lineno, _func, _ctx, _idx) in self.stack:
try:
pkg_info = get_package_and_component(fn)[0]
package = "{0.name}-{0.version}-{0.release}.{0.arch}".format(
pkg_info)
packages.add(package)
except RPMinfoError:
continue
try:
pkg_info = get_package_and_component()[0]
package = "{0.name}-{0.version}-{0.release}.{0.arch}".format(
pkg_info)
packages.discard(package)
except RPMinfoError:
pass
return packages
def get_environment_variables():
"""
Returns a list of strings containing defined environment
variables and their values in the following format:
VARIABLE=VALUE
:rtype: list
"""
ret = list()
for (key, value) in os.environ.items():
ret.append("{0}={1}".format(key, value))
return ret
#--begining of the method _get_environment_info--
try:
pkg_info, component = get_package_and_component()
except RPMinfoError:
pkg_info = None
component = None
other_packages = ", ".join(get_other_packages(self))
ret = dict()
ret["architecture"] = os.uname()[4]
ret["cmdline"] = "{0} {1} {2}".format(sys.executable,
" ".join(get_python_opts()),
" ".join(sys.argv))
if component:
ret["component"] = component
ret["executable"] = sys.argv[0]
ret["kernel"] = os.uname()[2]
if pkg_info:
ret["pkg_info"] = pkg_info
ret["release"] = get_release_version()
if other_packages:
ret["other involved packages"] = other_packages
ret["environ"] = "\n".join(get_environment_variables())
return ret
@property
def environment_info(self):
return self._get_environment_info()
def __str__(self):
lst = self._format_stack()
lst.insert(0, "%s %s exception report\n" % (self.conf.programName, self.conf.programVersion))
lst.insert(1, "Traceback (most recent call last):\n")
if self.type is not None and self.value is not None:
lst.extend(traceback.format_exception_only(self.type, self.value))
return "".join(lst)
def _format_stack(self):
if not self.stack:
return []
frames = []
for (_frame, fn, lineno, func, ctx, _idx) in self.stack:
if isinstance(ctx, list):
code = "".join(ctx)
else:
code = ctx
frames.append((fn, lineno, func, code))
return traceback.format_list(frames)
# Create a string representation of a class. This method will recursively
# handle all attributes of the base given class.
def _dumpClass(self, instance, level=0, parentkey="", skipList=None):
# This is horribly cheesy, and bound to require maintainence in the
# future. The problem is that anything subclassed from object fails
# the types.InstanceType test we used to have which means those
# objects never get dumped. However, most everything basic in
# python is derived from object so we can't just check for the super
# class. Any instances of the following types will just be printed
# out, and everything else will be assumed to be something that
# needs to be recursed on.
def __isSimpleType(instance):
return isinstance(instance, bool) or \
isinstance(instance, complex) or \
isinstance(instance, float) or \
isinstance(instance, int) or \
isinstance(instance, longtype) or \
isinstance(instance, type(None)) or \
isinstance(instance, bytes) or \
isinstance(instance, str) or \
isinstance(instance, unitype) or \
not hasattr(instance, "__class__") or \
not hasattr(instance, "__dict__")
ret = SafeStr()
if not skipList:
skipList = []
# protect from loops
try:
# Store the id(), not the instance name to protect against
# instances that cannot be hashed.
if not id(instance) in self._dumpHash:
self._dumpHash[id(instance)] = None
else:
ret += "Already dumped (%s instance)\n" % instance.__class__.__name__
return ret
except TypeError:
ret += "Cannot dump object\n"
return ret
if ("__str__" in instance.__class__.__dict__ or
"__repr__" in instance.__class__.__dict__):
try:
ret += "%s\n" % (instance,)
except:
ret += "\n"
return ret
ret += "%s instance, containing members:\n" %\
(instance.__class__.__name__)
pad = ' ' * ((level) * 2)
for key, value in instance.__dict__.items():
if key.startswith("_%s__" % instance.__class__.__name__):
continue
if parentkey != "":
curkey = parentkey + "." + key
else:
curkey = key
# Don't dump objects that are in our skip list, though ones that are
# None are probably okay.
if eval("instance.%s is not None" % key) and \
eval("id(instance.%s)" % key) in skipList:
ret += "%s%s: Skipped\n" % (pad, curkey)
continue
if isinstance(value, list):
ret += "%s%s: [" % (pad, curkey)
first = 1
for item in value:
if not first:
ret += ", "
else:
first = 0
if __isSimpleType(item):
ret += "%s" % (item,)
else:
ret += self._dumpClass(item, level + 1, skipList=skipList)
ret += "]\n"
elif isinstance(value, dict):
# append things one after another so that e.g. binary data is
# replaced by hexa values separately
ret += pad
ret += curkey
ret += ": {"
first = 1
for k, v in value.items():
if not first:
ret += ", "
else:
first = 0
if isinstance(k, str) or isinstance(k, unitype):
ret += "'"
ret += k
ret += "': "
else:
ret += "%s: " % (k,)
if __isSimpleType(v):
ret += "%s" % (v,)
else:
ret += self._dumpClass(v, level + 1, parentkey = curkey, skipList=skipList)
ret += "}\n"
elif __isSimpleType(value):
ret += "%s%s: " % (pad, curkey)
ret += value
ret += "\n"
else:
ret += "%s%s: " % (pad, curkey)
ret += self._dumpClass(value, level + 1, parentkey=curkey, skipList=skipList)
return ret
def dump(self, obj):
"""Dump the local variables and all attributes of a given object.
The lists of files and attrs to ignore are all taken from a
Config object instance provided when the ExceptionDump class was
created.
obj -- Any Python object. This object will have all its attributes
written out, except for those mentioned in the attrSkipList.
"""
idSkipList = []
ret = SafeStr()
# We need to augment the environment eval() will run in with the
# bindings that were local when the traceback happened so that the
# idSkipList can be populated. However since we're not allowed to
# modify the results of locals(), we'll have to make a copy first.
localVars = copy.copy(locals())
if self.stack:
localVars.update(self.stack[-1][0].f_locals)
# Catch attributes that do not exist at the time we do the exception dump
# and ignore them.
for k in self.conf.attrSkipList:
try:
eval("idSkipList.append(id(obj.%s))" % k, None, localVars)
except:
pass
# Write local variables to the given file descriptor, ignoring any of
# the local skips.
if self.stack:
frame = self.stack[-1][0]
ret += "\nLocal variables in innermost frame:\n"
try:
for (key, value) in frame.f_locals.items():
lowered_key = key.lower()
if any(item.lower() in lowered_key
for item in self.conf.localSkipList):
continue
ret += "%s: %s\n" % (key, value)
except:
pass
# And now dump the object's attributes.
try:
ret += "\n\n"
ret += self._dumpClass(obj, skipList=idSkipList)
except:
ret += "\nException occurred during state dump:\n"
ret += traceback.format_exc(None)
# Filter out item names and callbacks that should appear
# only as attachments
items_callbacks = ((name, cb) for (name, (cb, attchmnt_only))
in self.conf.callbackDict.items()
if not attchmnt_only)
# And now add data returned by the registered callbacks
ret += "\nRegistered callbacks:\n"
for (item_name, callback) in items_callbacks:
try:
callback_ret = callback()
if callback_ret:
ret += "%s:\n%s\n" % (item_name, callback_ret)
except Exception as exc:
ret += "%s: Caused error: %s\n" % (item_name, exc)
# And finally, write a bunch of files into the dump too.
for fname in self.conf.fileList:
try:
if six.PY2:
with codecs.open(fname, "r", "utf-8", "ignore") as fobj:
ret += "\n\n%s:\n" % (fname,)
for line in fobj:
ret += line.encode("utf-8")
else:
with open(fname, "rt", encoding="utf-8") as fobj:
ret += "\n\n%s:\n" % (fname,)
for line in fobj:
ret += line
except IOError:
pass
except:
ret += "\nException occurred during %s file copy:\n" % (fname,)
ret += traceback.format_exc(None)
return ret
@property
def hash(self):
"""Create a hash for this traceback object. This is most suitable for
searching bug filing systems for duplicates. The hash is composed
of the basename of each file in the stack, the method names, and
the bit of code. Line numbers and the actual exception message
itself are left out.
"""
import hashlib
s = ""
if self.stack:
for (file, _lineno, func, text) in [f[1:5] for f in self.stack]:
if isinstance(text, list):
text = "".join(text)
s += "%s %s %s\n" % (os.path.basename(file), func, text)
else:
s = "%s %s" % (self.type, self.value)
return hashlib.sha256(s.encode("utf-8")).hexdigest()
def traceback_and_object_dump(self, obj):
"""
Return the traceback and a text representation of an object.
:param obj: Any Python object. This object will have all its attributes
written out, except for those mentioned in the attrSkipList.
"""
ret = SafeStr(str(self))
ret += self.dump(obj)
return ret
class ReverseExceptionDump(ExceptionDump):
"""This class provides an alternate representation of an exception. In
this representation, the traceback is printed with the most recent call
at the top of the stack, and the most generic call at the bottom. Note
that this order does not affect the hash at all.
"""
def __str__(self):
lst = self._format_stack()
lst.reverse()
lst.insert(0, "%s %s exception report\n" % (self.conf.programName, self.conf.programVersion))
lst.insert(1, "Traceback (most recent call first):\n")
if self.type is not None and self.value is not None:
lst.extend(traceback.format_exception_only(self.type, self.value))
return "".join(lst)
@@ -1,299 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_SAVE, MAIN_RESPONSE_SHELL, MAIN_RESPONSE_QUIT, DumpInfo, ExceptionInfo
import bdb
import os
import sys
import report
import traceback
import subprocess
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
class NoNetwork(Exception):
def __init__(self, msg=""):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return "No network is available"
class ExceptionHandler(object):
def __init__(self, confObj, intfClass, exnClass):
"""Create a new ExceptionHandler instance. Subclasses of this one may
be created, provided they are careful to provide all the methods
this one does. Instance attributes:
conf -- A filled in Config instance. At least the programName
and programVersion are required.
exnClass -- An instance of ExceptionDump or a subclass of it. This
is required to know how to represent the Python
exception internally.
intfClass-- An instance of AbstractIntf. This is required to know
what UI classes to use.
"""
self.conf = confObj
self.exnClass = exnClass
self.intf = intfClass
self._exitcode = 10
self._exn = None
self.exnFile = None
self.exnText = ""
def _setExitCode(self, code):
self._exitcode = code
exitcode = property(lambda s: s._exitcode,
lambda s, v: s._setExitCode(v))
def _setExn(self, e):
self._exn = e
exn = property(lambda s: s._exn,
lambda s, v: s._setExn(v))
def handleException(self, dump_info):
"""This is the main exception handling entry point. When Python
gets an exception it doesn't know how to handle, this method will
be called. It then saves the traceback and displays the main
dialog asking the user what to do next. Once this method is
called, there's no good way to go back to what you were doing
before.
All arguments are passed in from the handler created by calling
self.install(). This method should not usually be overridden by
a subclass.
:type dump_info: an instance of the meh.DumpInfo class
"""
responseHash = { MAIN_RESPONSE_QUIT: self.runQuit,
MAIN_RESPONSE_DEBUG: self.runDebug,
MAIN_RESPONSE_SAVE: self.runSave,
MAIN_RESPONSE_SHELL: self.runShell,
}
# Quit if we got an exception when running pdb.
if isinstance(dump_info.exc_info.value, bdb.BdbQuit):
sys.exit(self.exitcode)
# Restore original exception handler.
sys.excepthook = sys.__excepthook__
self.preWriteHook(dump_info)
# Save the exception to the filesystem first.
self.exn = self.exnClass(dump_info.exc_info, self.conf)
(fobj, self.exnFile) = self.openFile()
self.exnText = self.exn.traceback_and_object_dump(dump_info.object)
fobj.write(self.exnText)
fobj.close()
self.postWriteHook(dump_info)
# Run initial UI screen, asking whether to save/debug/quit.
while True:
win = self.intf.mainExceptionWindow(str(self.exn), self.exnText)
if not win:
self.runQuit(dump_info.exc_info)
rc = win.run()
win.destroy()
try:
responseHash[rc](dump_info.exc_info)
except KeyError:
# This happens if (for example) the user hits Escape instead
# of pressing a button.
continue
win.destroy()
def preWriteHook(self, dump_info):
"""Subclasses may supply a function with this name that will be
called immediately before the traceback is written to disk in
order to have any sort of special pre-write processing that needs
to be done.
:type dump_info: an instance of the meh.DumpInfo class
"""
pass
def postWriteHook(self, dump_info):
"""Subclasses may supply a function with this name that will be
called immediately after the traceback is written to disk, but
immediately before the UI is run. This is to provide a place for
any special handling to happen once there is a file on disk.
:type dump_info: an instance of the meh.DumpInfo class
"""
pass
def install(self, obj):
"""Install ourselves as the top level exception handler with Python.
If this method is not called after an ExceptionHandler instance is
created, none of the rest of this code will ever be called.
obj -- A Python object that may be dumped to a file when the
exception is saved. This should be something like the top
level object in a program.
"""
sys.excepthook = lambda ty, value, tb: \
self.handleException(DumpInfo(ExceptionInfo(ty, value, tb), obj))
def openFile(self):
"""Create a randomly named output file to write the exception dump to.
This requires a programName be set in the Config instance. The
return value is a (file descriptor, path) pair. The file must be
closed by the caller when writing is done. Subclasses should not
override this method unless they know what they're doing.
"""
import tempfile
(fd, path) = tempfile.mkstemp("", "%s-tb-" % self.conf.programName, "/tmp")
fo = os.fdopen(fd, "w")
return (fo, path)
### Methods called by the primary exception handling dialog.
def runQuit(self, exc_info):
"""This method is called when the "Exit" button is clicked. It may
be overridden by a subclass, but the basic behavior of eventually
quitting should be preserved.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
sys.exit(self.exitcode)
def runDebug(self, exc_info):
"""This method is called when the "Debug" button is clicked. It may
be overridden by a subclass if specialized behavior is required to
enter debug mode.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
print("")
print(_("Use 'continue' command to quit the debugger and get back to "
"the main menu"))
import pdb
pdb.post_mortem(exc_info.stack)
#no need to quit here, let's just get back to the main dialog
def runShell(self, exc_info):
"""This method is called when user requests to run a shell. It may
be overridden by a subclass if specialized behavior is required to
run shell (e.g. TTY switching).
:type exc_info: an instance of the meh.ExceptionInfo class
"""
print("")
print(_("Exit the shell to get back to the main menu"))
proc = subprocess.Popen(["bash", "--login"], shell=True, cwd="/")
proc.wait()
def runSave(self, exc_info):
"""This method is called when the "Save" button is clicked. It may
be overridden by a subclass, but that's going to be a lot of work.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
params = dict()
params.update(self.exn.environment_info)
pkg_info = params.pop("pkg_info", None)
#if rpmdb queries fail (anaconda), use self.conf.* values
if "component" not in params:
params["component"] = self.conf.programName
if pkg_info:
params["pkg_name"] = pkg_info.name
params["pkg_version"] = pkg_info.version
params["pkg_release"] = pkg_info.release
params["pkg_epoch"] = pkg_info.epoch
params["pkg_arch"] = pkg_info.arch
params["package"] = "%s-%s-%s.%s" % (pkg_info.name, pkg_info.version,
pkg_info.release, pkg_info.arch)
else:
params["pkg_name"] = self.conf.programName
parts = self.conf.programVersion.rsplit("-", 1)
if len(parts) == 2:
version, release = parts
else:
version = parts[0]
# not given, make something up
release = "1"
params["pkg_version"] = version
params["pkg_release"] = release
# we don't support specifying epoch in the config object and only
# the anaconda which is not using epochs doesn't have the RPMdb to
# query
params["pkg_epoch"] = "0"
params["pkg_arch"] = self.conf.programArch
params["package"] = "{0.programName}-{0.programVersion}".format(
self.conf)
params["hashmarkername"] = self.conf.programName
params["duphash"] = self.exn.hash
params["reason"] = self.exn.desc
params["description"] = "The following was filed automatically by %s:\n%s" \
% (self.conf.programName, str(self.exn))
tb_item_name = "%s-tb" % self.conf.programName
params[tb_item_name] = self.exnText
# save data generated by callbacks
for (item_name, (callback, _anc)) in self.conf.callbackDict.items():
try:
ret = callback()
if ret:
params[item_name] = ret
except Exception as exc: # pylint: disable=broad-except
params[item_name] = "Caused error: %s" % exc
for fpath in self.conf.fileList:
try:
with open(fpath, "r") as fobj:
# would be better to use the full path here, but libreport
# doesn't allow '/' characters in the item name
filename = os.path.basename(fpath)
if filename not in params:
params[filename] = fobj.read()
else:
params[filename+"_file"] = fobj.read()
except: # pylint: disable=bare-except
#skip files we cannot read
continue
# tell ABRT some more things it requires
params["analyzer"] = "Python"
params["backtrace"] = "".join(traceback.format_exception(exc_info.type,
exc_info.value,
exc_info.stack))
signature = report.createPythonUnhandledExceptionSignature(**params)
# We don't want to automatically quit here since the user may wish to
# save somewhere else, debug, etc.
self.intf.saveExceptionWindow(signature)
@@ -1,45 +0,0 @@
#
# network.py - network configuration install data
#
# Copyright (C) 2008, 2009 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): David Cantrell <dcantrell@redhat.com>
#
import dbus
# This code was taken from anaconda, and slightly adapted to not rely
# on isys.
NM_SERVICE = "org.freedesktop.NetworkManager"
NM_MANAGER_PATH = "/org/freedesktop/NetworkManager"
NM_STATE_CONNECTED = 3
DBUS_PROPS_IFACE = "org.freedesktop.DBus.Properties"
def hasActiveNetDev():
"""Does the system have an enabled network interface?"""
try:
bus = dbus.SystemBus()
nm = bus.get_object(NM_SERVICE, NM_MANAGER_PATH)
props = dbus.Interface(nm, DBUS_PROPS_IFACE)
state = props.Get(NM_SERVICE, "State")
if int(state) == NM_STATE_CONNECTED:
return True
else:
return False
except dbus.DBusException:
return False
@@ -1,71 +0,0 @@
#
# Copyright (C) 2013 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author: Vratislav Podzimek <vpodzime@redhat.com>
#
#
import sys
PY = int(sys.version.split('.')[0])
"""
This module provides a SafeStr class.
@see: SafeStr
"""
class SafeStr(str):
"""
String class that has a modified __add__ method so that ascii strings,
binary data represented as a byte string and unicode objects can be
safely appended to it (not causing traceback). BINARY DATA IS OMITTED.
"""
def __add__(self, other):
if PY > 2:
return SafeStr(str.__add__(self, str(other)))
if not (isinstance(other, str) or isinstance(other, unicode)): # pylint: disable=undefined-variable
if hasattr(other, "__str__"):
other = other.__str__()
else:
other = "OMITTED OBJECT WITHOUT __str__ METHOD"
if isinstance(other, unicode): # pylint: disable=undefined-variable
ret = SafeStr(str.__add__(self, other.encode("utf-8")))
else:
try:
# try to decode which doesn't cause traceback for utf-8 encoded
# non-ascii string and ascii string
other.decode("utf-8")
ret = SafeStr(str.__add__(self, other))
except UnicodeDecodeError:
# binary data, get the representation used by Python for
# non-ascii bytes
# hex(255) returns "0xff", we want "\xff"
other_hexa = (hex(ord(char)) for char in other)
other_backslashed = (hex_num.replace("0x", "\\x")
for hex_num in other_hexa)
other_repr = "".join(other_backslashed)
ret = SafeStr(str.__add__(self, other_repr))
return ret
@@ -1,181 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
class AbstractIntf(object):
"""The base class for Interfaces. This is an abstract class. It
provides methods that create and run various kinds of windows.
We provide a basic level of graphical and text oriented interfaces
here, but it should be possible for things like anaconda to supply
their own much more complicated ones with little effort.
"""
def __init__(self, *args, **kwargs):
"""Create a new AbstractInterface instance. This method need not
be overridden by subclasses.
"""
pass
def enableNetwork(self, *args, **kwargs):
"""Display and run a dialog that brings up the network, if it is
currently disabled. This method must be provided by all subclasses,
and should return False if unsuccessful.
"""
raise NotImplementedError
def exitWindow(self, title, message, *args, **kwargs):
"""Display and run a dialog that displays a message with the proper
buttons and images for quitting afterwards. This method must be
provided by all subclasses.
title -- The window's title.
message -- The window's text.
"""
raise NotImplementedError
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
"""Create and return an instance of the initial execption handling
dialog. This method must be provided by all subclasses.
text -- The short traceback (usually, just the stack trace).
exnFile -- A file containing the output of ExceptionDump.write().
"""
raise NotImplementedError
def messageWindow(self, title, message, *args, **kwargs):
"""Display a generic informational message. This can be an error,
status update, and so forth. It must be provided by all subclasses.
title -- The window's title.
message -- The window's text.
"""
raise NotImplementedError
def saveExceptionWindow(self, exnFile, *args, **kwargs):
"""Create and return an instance of the exception saving dialog. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractMainExceptionWindow(object):
"""This abstract class describes the basic level of support required of
any interface that supplies a main exception window. The main exception
window is the initial dialog displayed by the exception handler that
provides the debug/save/quit options.
"""
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
"""Create a new MainExceptionWindow instance. This must handle
creating the dialog and populating it with widgets, but must not
run the dialog. A self.dialog attribute should be created that
refers to the dialog itself.
shortTraceback -- The short traceback (usually, just the stack
trace).
longTraceback -- The long traceback (full traceback and the main
object dump).
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up, but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractExitWindow(object):
"""This abstract class describes the basic level of support required of
a basic message dialog that should be displayed before the program
exits. All interfaces must provide this class.
"""
def __init__(self, title, text, *args, **kwargs):
"""Create a new ExitWindow instance. This must handle creating the
dialog and putting the text into it, but must not run the dialog.
This method must be provided by all subclasses.
title -- The window's title.
text -- The window's text.
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractMessageWindow(object):
"""This abstract class describes the basic level of support required of
a basic message dialog. All interfaces must provide this class.
"""
def __init__(self, title, text, *args, **kwargs):
"""Create a new MessageWindow instance. This must handle creating the
dialog and putting the text into it, but must not run the dialog.
This method must be provided by all subclasses.
title -- The window's title.
text -- The window's text.
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractSaveExceptionWindow(object):
"""This abstract class describes the basic level of support required of
any interface that supplies an exception saving window. The exception
saving window is the dialog displayed if the user clicks "save" on the
initial dialog, and presents multiple options for how the traceback
should be saved.
"""
def __init__(self, *args, **kwargs):
"""Create a new SaveExceptionWindow instance. This must handle
creating the dialog and populating it with widgets, but must not
run the dialog. A self.dialog attribute should be created that
refers to the dialog itself.
"""
pass
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
@@ -1,177 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_NONE, MAIN_RESPONSE_QUIT, MAIN_RESPONSE_SAVE
from meh.ui import AbstractIntf, AbstractSaveExceptionWindow, AbstractMainExceptionWindow, AbstractMessageWindow
import os
import sys
import report
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
def find_glade_file(file):
path = os.environ.get("GLADEPATH", "./:ui/:/tmp/updates/:/tmp/updates/ui/:/usr/share/python-meh/")
for d in path.split(":"):
fn = d + file
if os.access(fn, os.R_OK):
return fn
raise RuntimeError("Unable to find glade file %s" % file)
class GraphicalIntf(AbstractIntf):
def __init__(self, *args, **kwargs):
AbstractIntf.__init__(self, *args, **kwargs)
def enableNetwork(self, *args, **kwargs):
"""Should be provided by the inheriting class."""
return False
def exitWindow(self, title, message, *args, **kwargs):
win = ExitWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
win = MainExceptionWindow(text, exnFile, *args, **kwargs)
return win
def messageWindow(self, title, message, *args, **kwargs):
win = MessageWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def saveExceptionWindow(self, signature, *args, **kwargs):
win = SaveExceptionWindow(signature)
win.run()
class SaveExceptionWindow(AbstractSaveExceptionWindow):
def __init__(self, signature, *args, **kwargs):
AbstractSaveExceptionWindow.__init__(self, signature, *args, **kwargs)
self.signature = signature
def run(self, *args, **kwargs):
# Don't need to check the return value of report since it will
# handle all the UI reporting for us.
report.report_problem_in_memory(self.signature, report.LIBREPORT_WAIT)
class MainExceptionWindow(AbstractMainExceptionWindow):
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
AbstractMainExceptionWindow.__init__(self, shortTraceback, longTraceback,
*args, **kwargs)
builder = Gtk.Builder()
builder.set_translation_domain("python-meh")
glade_file = find_glade_file("exception-dialog.glade")
builder.add_from_file(glade_file)
builder.connect_signals(self)
self._main_window = builder.get_object("exceptionWindow")
# this makes sure the Meh window remains active
# even if the exception has been triggered in a dialog
window_group = Gtk.WindowGroup()
window_group.add_window(self._main_window)
self._traceback_buffer = builder.get_object("tracebackBuffer")
self._traceback_buffer.set_text(longTraceback)
self._response = MAIN_RESPONSE_QUIT
self._debug_button = builder.get_object("debugButton")
allowDebug = kwargs.get("allowDebug", sys.stdout.isatty)
if allowDebug and not allowDebug():
self._debug_button.set_sensitive(False)
@property
def main_window(self):
return self._main_window
def destroy(self, *args, **kwargs):
self._main_window.destroy()
def run(self, *args, **kwargs):
self._main_window.show_all()
# keep our window above dialogs
self._main_window.set_modal(True)
self._main_window.set_keep_above(True)
Gtk.main()
self.destroy()
return self._response
def on_report_clicked(self, button):
# hide our window to not interfere with libreport window
self._main_window.hide()
self._response = MAIN_RESPONSE_SAVE
Gtk.main_quit()
def on_quit_clicked(self, button):
self._response = MAIN_RESPONSE_QUIT
Gtk.main_quit()
def on_debug_clicked(self, button):
self._response = MAIN_RESPONSE_DEBUG
Gtk.main_quit()
def on_expander_activated(self, expander, *args):
if not expander.get_expanded():
self._main_window.resize(600, 400)
else:
#resize the window back to the default size when expander is
#minimized
self._main_window.resize(600, 1)
def on_main_window_deleted(self, *args):
self._response = MAIN_RESPONSE_NONE
self.destroy()
Gtk.main_quit()
class MessageWindow(AbstractMessageWindow):
def __init__(self, title, text, *args, **kwargs):
AbstractMessageWindow.__init__(self, title, text, *args, **kwargs)
self.rc = 0
self.dialog = Gtk.MessageDialog(buttons=Gtk.ButtonsType.OK,
type=Gtk.MessageType.INFO,
message_format=text)
self.dialog.set_title(title)
self.dialog.set_position(Gtk.WindowPosition.CENTER)
def destroy(self, *args, **kwargs):
self.dialog.destroy()
def run(self, *args, **kwargs):
self.dialog.show_all()
self.rc = self.dialog.run()
self.dialog.destroy()
class ExitWindow(MessageWindow):
def __init__(self, title, text, *args, **kwargs): # pylint: disable=super-init-not-called
self.dialog = Gtk.MessageDialog(buttons=Gtk.ButtonsType.NONE,
type=Gtk.MessageType.INFO,
message_format=text)
self.dialog.set_title(title)
self.dialog.add_button(_("_Exit"), 0)
self.dialog.set_position(Gtk.WindowPosition.CENTER)
@@ -1,225 +0,0 @@
# Copyright (C) 2009, 2013 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
# Vratislav Podzimek <vpodzime@redhat.com>
#
from __future__ import print_function
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_SAVE, MAIN_RESPONSE_SHELL, MAIN_RESPONSE_QUIT
from meh.ui import AbstractIntf, AbstractSaveExceptionWindow, AbstractMainExceptionWindow, AbstractMessageWindow
import report
import report.io.TextIO
from report import LIBREPORT_WAIT, LIBREPORT_RUN_CLI
import os
import sys
if sys.version_info.major == 3:
raw_input_fn = input
else:
raw_input_fn = raw_input # pylint: disable=undefined-variable
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
class IOHandler(object):
"""
Class that provides methods for input and output. Its instance is expected
to be passed to objects performing some I/O operations.
"""
def __init__(self, in_func=raw_input_fn, out_func=print): # pylint: disable=used-before-assignment
"""
Constructor for the IOhandler class. Arguments can be used to override
default I/O functions with the custom ones.
:param in_func: input function similar to standard raw_input
:type in_func: str -> str
:param out_func: output function similar to standard print
:type out_func: str -> None
"""
self.in_func = in_func
self.out_func = out_func
def print(self, msg=""):
self.out_func(msg)
def raw_input(self, prompt):
return self.in_func(prompt)
class TextWindow(object):
"""Helper class providing some common methods needed by all text windows."""
def __init__(self, title, *args, **kwargs):
self._io = kwargs.get("io_handler", IOHandler())
self._title = title
# short (one-char) answer meaning "yes"
self._yes_answer = _("y")
# short (one-char) answer meaning "no"
self._no_answer = _("n")
@property
def _usable_width(self):
return os.environ.get("COLUMNS", 80) - 1
def _print_rule(self):
rule = self._usable_width * "="
self._io.print(rule)
def print_header(self):
self._io.print()
self._print_rule()
self._io.print(self._title)
self._print_rule()
def destroy(self):
self._print_rule()
self._print_rule()
class TextIntf(AbstractIntf):
def __init__(self, *args, **kwargs):
AbstractIntf.__init__(self, *args, **kwargs)
self.screen = kwargs.get("screen", None)
self._io = kwargs.get("io_handler", IOHandler())
def set_io_handler(self, handler):
"""
Set different IO handler.
:type handler: an instance of the IOHandler class
"""
self._io = handler
def enableNetwork(self, *args, **kwargs):
"""Should be provided by the inheriting class."""
return False
def exitWindow(self, title, message, *args, **kwargs):
kwargs["io_handler"] = self._io
win = ExitWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
kwargs["io_handler"] = self._io
win = MainExceptionWindow(text, exnFile, *args, **kwargs)
return win
def messageWindow(self, title, message, *args, **kwargs):
kwargs["io_handler"] = self._io
win = MessageWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def saveExceptionWindow(self, signature, *args, **kwargs):
kwargs["io_handler"] = self._io
win = SaveExceptionWindow(signature, *args, **kwargs)
win.run()
win.destroy()
class SaveExceptionWindow(TextWindow, AbstractSaveExceptionWindow):
def __init__(self, signature, *args, **kwargs):
AbstractSaveExceptionWindow.__init__(self, signature,
*args, **kwargs)
TextWindow.__init__(self, _("Save exception"), *args, **kwargs)
self.signature = signature
def run(self, *args, **kwargs):
# Don't need to check the return value of report since it will
# handle all the UI reporting for us.
report.report_problem_in_memory(self.signature,
LIBREPORT_WAIT|LIBREPORT_RUN_CLI)
class MainExceptionWindow(TextWindow, AbstractMainExceptionWindow):
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
AbstractMainExceptionWindow.__init__(self, shortTraceback, longTraceback,
*args, **kwargs)
TextWindow.__init__(self, _("An unknown error has occurred"),
*args, **kwargs)
self._short_traceback = shortTraceback
self._menu_items = [(_("Report Bug"), MAIN_RESPONSE_SAVE),
(_("Run shell"), MAIN_RESPONSE_SHELL),
(_("Quit"), MAIN_RESPONSE_QUIT)]
allowDebug = kwargs.get("allowDebug", sys.stdout.isatty)
if allowDebug and allowDebug():
self._menu_items.insert(1, (_("Debug"), MAIN_RESPONSE_DEBUG))
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._short_traceback)
self._io.print(_("What do you want to do now?"))
for (idx, item) in enumerate(self._menu_items):
self._io.print("%d) %s" % (idx + 1, item[0]))
ret = -1
num_menu_items = len(self._menu_items)
self._io.print()
while not (0 < ret <= num_menu_items):
ret = self._io.raw_input(_("Please make your choice from above: "))
try:
ret = int(ret)
except ValueError:
ret = -1
return self._menu_items[ret - 1][1]
class MessageWindow(TextWindow, AbstractMessageWindow):
def __init__(self, title, text, *args, **kwargs):
AbstractMessageWindow.__init__(self, title, text, *args, **kwargs)
TextWindow.__init__(self, title, *args, **kwargs)
self._text = text
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._text)
self._io.print()
self._io.raw_input(_("Hit ENTER to continue"))
class ExitWindow(MessageWindow):
def __init__(self, title, text, *args, **kwargs):
MessageWindow.__init__(self, title, text, *args, **kwargs)
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._text)
self._io.print()
# self._no_answer may be non-ascii string (simple .upper() doesn't work)
no_answer_upper = self._no_answer.decode("utf-8").upper().encode("utf-8")
answer = self._io.raw_input(_(
"Are you sure you want to exit? [%(yes)s/%(no)s]") %
{ "yes": self._yes_answer,
"no": no_answer_upper })
# no answer means accepting the default (self._no_answer) and the answer
# is case insensitive (and may be non-ascii)
lower_answer = answer.decode("utf-8").lower().encode("utf-8")
answer = lower_answer or self._no_answer
if answer in (self._yes_answer, self._no_answer):
return answer == self._yes_answer
else:
self.run(*args, **kwargs)
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
@@ -1,248 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="exceptionWindow">
<property name="can_focus">False</property>
<property name="window_position">center-always</property>
<property name="default_width">600</property>
<property name="type_hint">dialog</property>
<property name="urgency_hint">True</property>
<signal name="delete-event" handler="on_main_window_deleted" swapped="no"/>
<child>
<object class="GtkBox" id="mainBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin_left">20</property>
<property name="margin_top">30</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon-size">5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="titleLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">An unknown error has occurred</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.1000000000000001"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="explainLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin_left">40</property>
<property name="margin_right">40</property>
<property name="label" translatable="yes">This program has encountered an unknown error. You may
report the bug below or quit the program.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">21</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_right">20</property>
<property name="spacing">10</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="reportButton">
<property name="label" translatable="yes">_Report Bug</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_report_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="quitButton">
<property name="label" translatable="yes">_Quit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_quit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_bottom">10</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_expander_activated" swapped="no"/>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="commentLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">2</property>
<property name="xalign">0.10000000149011612</property>
<property name="label" translatable="yes">The output below may help determine the cause of the error:</property>
<attributes>
<attribute name="style" value="italic"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="tracebackScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="tracebackView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vscroll_policy">natural</property>
<property name="editable">False</property>
<property name="cursor_visible">False</property>
<property name="buffer">tracebackBuffer</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="bottomBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="warningLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">'Debug' may take you to tty1.</property>
<attributes>
<attribute name="style" value="italic"/>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="debugButton">
<property name="label" translatable="yes">_Debug</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_debug_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="expanderLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">More _info...</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkTextBuffer" id="tracebackBuffer">
<property name="text" translatable="yes">No additional info available.</property>
</object>
</interface>
Binary file not shown.
@@ -1 +0,0 @@
/home/nocode/Files/FWS-ISO/pkgbuilds/python-meh/python-meh-0.43.tar.gz
@@ -1,14 +0,0 @@
*.pyc
.*.swp
python-meh*.tar.gz
ChangeLog
po/*.gmo
po/*.po
po/POTFILES
build/
.directory
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
@@ -1,6 +0,0 @@
include COPYING Makefile ChangeLog
recursive-include meh *.py
recursive-include ui *.glade
recursive-include pixmaps *.png
recursive-include po *.po *.pot Makefile
recursive-include tests *.py
@@ -1,101 +0,0 @@
PKGNAME=python-meh
VERSION=$(shell awk '/Version:/ { print $$2 }' $(PKGNAME).spec)
RELEASE=$(shell awk '/Release:/ { print $$2 }' $(PKGNAME).spec | sed -e 's|%.*$$||g')
TAG=r$(VERSION)-$(RELEASE)
PREFIX=/usr
PYTHON2=python2
PYTHON3=python3
PYTHON=$(PYTHON2)
TESTSUITE:=tests/baseclass.py
PYCHECKEROPTS=--no-argsused --no-miximport --maxargs 0 --no-local -\# 0 --only -Q
ZANATA_PULL_ARGS = --transdir po/
ZANATA_PUSH_ARGS = --srcdir po/ --push-type source --force
default: all
all:
$(MAKE) -C po
clean:
-rm *.tar.gz meh/*.pyc meh/ui/*.pyc tests/*.pyc ChangeLog
$(MAKE) -C po clean
$(PYTHON) setup.py -q clean --all
test:
@echo "*** Running unittests with Python 2 ***"
PYTHONPATH=. $(PYTHON2) $(TESTSUITE) -v
@echo "*** Running unittests with Python 3 ***"
PYTHONPATH=. $(PYTHON3) $(TESTSUITE) -v
check:
PYTHONPATH=. tests/pylint/runpylint.py
install:
$(PYTHON) setup.py install --root=$(DESTDIR)
$(MAKE) -C po install
ChangeLog:
(GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
tag:
git tag -a -m "Tag as $(TAG)" -f $(TAG)
@echo "Tagged as $(TAG)"
release: tag archive
archive: po-pull
@rm -f ChangeLog
@make ChangeLog
git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
mkdir $(PKGNAME)-$(VERSION)
cp -r po $(PKGNAME)-$(VERSION)
cp ChangeLog $(PKGNAME)-$(VERSION)/
tar -rf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
gzip -9 $(PKGNAME)-$(VERSION).tar
rm -rf $(PKGNAME)-$(VERSION)
git checkout -- po/$(PKGNAME).pot
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
local: po-pull
@rm -f ChangeLog
@make ChangeLog
@rm -rf $(PKGNAME)-$(VERSION).tar.gz
@rm -rf /tmp/$(PKGNAME)-$(VERSION) /tmp/$(PKGNAME)
@dir=$$PWD; cp -a $$dir /tmp/$(PKGNAME)-$(VERSION)
@cd /tmp/$(PKGNAME)-$(VERSION) ; $(PYTHON) setup.py -q sdist
@cp /tmp/$(PKGNAME)-$(VERSION)/dist/$(PKGNAME)-$(VERSION).tar.gz .
@rm -rf /tmp/$(PKGNAME)-$(VERSION)
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
rpmlog:
@git log --pretty="format:- %s (%ae)" $(TAG).. |sed -e 's/@.*)/)/'
@echo
potfile:
$(MAKE) -C po potfile
po-pull:
rpm -q zanata-python-client &>/dev/null || ( echo "need to run: dnf install zanata-python-client"; exit 1 )
zanata pull $(ZANATA_PULL_ARGS)
bumpver: potfile
zanata push $(ZANATA_PUSH_ARGS) || ( echo "zanata push failed"; exit 1 )
@NEWSUBVER=$$((`echo $(VERSION) |cut -d . -f 2` + 1)) ; \
NEWVERSION=`echo $(VERSION).$$NEWSUBVER |cut -d . -f 1,3` ; \
DATELINE="* `LANG=c date "+%a %b %d %Y"` `git config user.name` <`git config user.email`> - $$NEWVERSION-1" ; \
cl=`grep -n %changelog python-meh.spec |cut -d : -f 1` ; \
tail --lines=+$$(($$cl + 1)) python-meh.spec > speclog ; \
(head -n $$cl python-meh.spec ; echo "$$DATELINE" ; make --quiet rpmlog 2>/dev/null ; echo ""; cat speclog) > python-meh.spec.new ; \
mv python-meh.spec.new python-meh.spec ; rm -f speclog ; \
sed -i "s/Version: $(VERSION)/Version: $$NEWVERSION/" python-meh.spec ; \
sed -i "s/version='$(VERSION)'/version='$$NEWVERSION'/" setup.py
ci: check test
.PHONY: clean install tag archive local
@@ -1,38 +0,0 @@
#!/usr/bin/python -tbBQnew
# -*- coding: utf-8 -*-
import sys
import meh
import meh.handler
import meh.dump
import subprocess
class MyTestError(Exception):
pass
class MyObject(object):
def __init__(self):
self.unicode_str = u"řčšěčšěčěš"
self.encoded_unicode_str = self.unicode_str.encode("utf-8")
self.binary_data = '\xff\xff\xfe'
if __name__ == "__main__":
print("***Running python-meh test***")
config = meh.Config(programName="myMehTest", programVersion="1.0-1",
programArch="noarch",
fileList=["/proc/cmdline", "unicode.txt", "ascii.txt"])
if len(sys.argv) > 1 and sys.argv[1] == "g":
import meh.ui.gui
intf = meh.ui.gui.GraphicalIntf()
else:
import meh.ui.text
intf = meh.ui.text.TextIntf()
handler = meh.handler.ExceptionHandler(config, intf,
meh.dump.ExceptionDump)
handler.install(MyObject())
#raise MyTestError("My testing exception.")
subprocess.call(["non_existing_executable"])
@@ -1,139 +0,0 @@
#
# __init__.py - Basic stuff for exception handling
#
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from collections import namedtuple
# These constants represent the return values of buttons on the initial
# exception handling dialog - the dialog that first pops up when an
# exception is hit.
MAIN_RESPONSE_DEBUG = 0
MAIN_RESPONSE_SAVE = 1
MAIN_RESPONSE_QUIT = 2
MAIN_RESPONSE_SHELL = 3
MAIN_RESPONSE_NONE = 4
class ConfigError(Exception):
"""Exception class for the configuration related errors."""
pass
class Config(object):
"""Hold configuration info useful throughout the exception handling
classes. This prevents having to pass a bunch of arguments to a
bunch of different functions. A Config instance must be created
before creating an ExceptionHandler instance.
"""
def __init__(self, *args, **kwargs):
"""Create a new Config instance. Arguments may be passed in to
set any of the configuration values. Unknown arguments will
be ignored. Instance attributes:
attrSkipList -- A list of strings. When handling a traceback,
any attributes found with the same name as an
element of this list will not be written to
the dump. This is to prevent writing potentially
sensitive information like passwords. The names
must be given without the leading name of the
object passed to handler.install(). For instance,
if handler.install() gets an Anaconda instance
with the name "anaconda" and you want to skip
anaconda.id.rootPassword, "id.rootPassword" should
be listed in attrSkipList.
fileList -- A list of files to find on the system and add
to the traceback dump.
localSkipList -- A list of strings. When handling a traceback,
any local variables found with their name containing
an element of this list will not be written to
the dump. This is subtely different from
attrSkipList.
callbackDict -- A dictionary having item names as keys and pairs
(function, attchmnt_only) as values.
@see register_callback
programName -- The name of the erroring program.
programVersion -- The version number of the erroring program.
Both programName and programVersion are used
throughout the exception handler, so must be
set.
programArch -- The architecture of the erroring program.
"""
self.attrSkipList = []
self.fileList = []
self.localSkipList = []
self.callbackDict = dict()
self.programName = None
self.programVersion = None
self.programArch = None
# Override the defaults set above with whatever's passed in as an
# argument. Unknown arguments get thrown away.
for (key, val) in kwargs.items():
if key in self.__dict__:
self.__dict__[key] = val
# Make sure required things are set.
if not self.programName:
raise ValueError("programName must be set.")
if not self.programVersion:
raise ValueError("programVersion must be set.")
def register_callback(self, item_name, callback, attchmnt_only=False,
override=False):
"""
Register new callback that will be called when data about the
crash is collected. The returned value will be included as the
'item_name' item.
:param item_name: name of the item storing the value returned by the
'callback' function
:type item_name: string
:param callback: a function to be called
:type callback: a function of type: () -> string
:param attchmnt_only: whether the returned valued should be included only
as an attachment or also in the main '*-tb' file
(defaults to False)
:type attchmnt_only: bool
:param override: whether to override the previously registered callback
with the same item name or not (may raise exception)
:type override: bool
:raise ConfigError: if callback with the 'item_name' has already been
registered and 'override' is not set to True
:return: None
"""
if item_name not in self.callbackDict or override:
self.callbackDict[item_name] = (callback, attchmnt_only)
else:
msg = "Callback with name '%s' already registered" % item_name
raise ConfigError(msg)
# type, value and stack are items provided by Python for the exception handler
ExceptionInfo = namedtuple("ExceptionInfo", ["type", "value", "stack"])
# ExceptionInfo instance plus the object that should be dumped
DumpInfo = namedtuple("DumpInfo", ["exc_info", "object"])
# information about a package (as provided e.g. by rpm)
PackageInfo = namedtuple("PackageInfo", ["name", "version", "release", "epoch",
"arch"])
@@ -1,551 +0,0 @@
#
# dump.py - general exception formatting and saving
#
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Matt Wilson <msw@redhat.com>
# Erik Troan <ewt@redhat.com>
# Chris Lumens <clumens@redhat.com>
#
# pylint: disable=bare-except,broad-except
import copy
import inspect
import os
import traceback
import sys
import codecs
import six
from meh import PackageInfo
from meh.safe_string import SafeStr
# Python 2/3 compatibilty
try:
longtype = long # pylint: disable=undefined-variable
except NameError:
longtype = int
try:
unitype = unicode # pylint: disable=undefined-variable
except NameError:
unitype = str
class ExceptionDump(object):
"""This class represents a traceback and contains several useful methods
for manipulating a traceback. In general, clients should not have to
use this class. It is mainly for internal use.
"""
def __init__(self, exc_info, config_obj):
"""Create a new ExceptionDump instance. Instance attributes:
:param exc_info: info about the exception provided by Python
:type exc_info: an instance of the meh.ExceptionInfo class
:param config_obj: configuration for python-meh
:type config_obj: an instance of the meh.Config class
"""
if inspect.istraceback(exc_info.stack):
self.stack = inspect.getinnerframes(exc_info.stack)
else:
self.stack = exc_info.stack
self.conf = config_obj
self.type = exc_info.type
self.value = exc_info.value
self._dumpHash = {}
@property
def desc(self):
# The description is a single line of text that should be used anywhere
# the bug needs to quickly be summarized. The most obvious example of
# this is when saving to bugzilla. We can populate the UI with this
# string so the user doesn't need to come up with one.
if self.type and self.value:
return traceback.format_exception_only(self.type, self.value)[0].strip()
else:
return ""
def _get_environment_info(self):
"""
Returns dictionary containing these items for a bugreport header
architecture
cmdline
component
executable
kernel
package
release
other involved packages
:rtype: dict (string -> string)
"""
RELEASE_NAME_FILE = "/etc/system-release"
class RPMinfoError(Exception):
"""Exception for errors in rpm queries"""
pass
def get_python_opts():
"""
Returns python's command line options
:return: list of python's command line options
:rtype: list
"""
flags_to_opts = {
"debug": "-d",
"py3k_warning": "-3",
"division_new": "-Qnew",
"division_warning": "-Q",
"inspect": "-i",
"interactive": "-i",
"optimize": "-O",
"dont_write_bytecode": "-B",
"no_user_site": "-s",
"no_site": "-S",
"ignore_environment": "-E",
"tabcheck": "-t",
"verbose": "-v",
"unicode": "-u",
"bytes_warning": "-b",
"quiet": "-q",
}
ret = set()
for flag in flags_to_opts.keys():
if getattr(sys.flags, flag, None):
ret.add(flags_to_opts[flag])
ret = list(ret)
return ret
def get_package_and_component(file_=sys.argv[0]):
"""
Returns package and component names for file (by default for script itself).
:param file_: filename
:type file_: string
:return: tuple containing package info and component name for the file
:rtype: (PackageInfo, str)
:raise RPMinfoError: if package and component for the file cannot be found
"""
import rpm
ts = rpm.TransactionSet()
mi = ts.dbMatch("basenames", file_)
try:
header = next(mi)
except StopIteration:
raise RPMinfoError("Cannot get package and component for file "+
"{0}".format(file_))
pkg_info = PackageInfo(header["name"].decode("utf-8"), header["version"].decode("utf-8"),
header["release"].decode("utf-8"),
u"%d" % header["epoch"] if header["epoch"] else u"0",
header["arch"].decode("utf-8"))
# cuts the name from the NVR format: foo-blah-2.8.8-2.fc17.src.rpm
srpm_name = header["sourcerpm"].decode("utf-8")
name_end = len(srpm_name)
try:
name_end = srpm_name.rindex('-')
name_end = srpm_name[:name_end].rindex('-')
except ValueError:
# expected exception
pass
component = srpm_name[:name_end]
return (pkg_info, component)
def get_release_version():
"""Returns release version (according to RELEASE_NAME_FILE)"""
try:
with open(RELEASE_NAME_FILE, "r") as file_:
return file_.readline().rstrip()
except IOError:
return "Cannot get release name."
def get_other_packages(self):
"""
Returns a set of additional packages whose files appear in
traceback.
:rtype: set
"""
packages = set()
if not self.stack:
return packages
for (_frame, fn, _lineno, _func, _ctx, _idx) in self.stack:
try:
pkg_info = get_package_and_component(fn)[0]
package = "{0.name}-{0.version}-{0.release}.{0.arch}".format(
pkg_info)
packages.add(package)
except RPMinfoError:
continue
try:
pkg_info = get_package_and_component()[0]
package = "{0.name}-{0.version}-{0.release}.{0.arch}".format(
pkg_info)
packages.discard(package)
except RPMinfoError:
pass
return packages
def get_environment_variables():
"""
Returns a list of strings containing defined environment
variables and their values in the following format:
VARIABLE=VALUE
:rtype: list
"""
ret = list()
for (key, value) in os.environ.items():
ret.append("{0}={1}".format(key, value))
return ret
#--begining of the method _get_environment_info--
try:
pkg_info, component = get_package_and_component()
except RPMinfoError:
pkg_info = None
component = None
other_packages = ", ".join(get_other_packages(self))
ret = dict()
ret["architecture"] = os.uname()[4]
ret["cmdline"] = "{0} {1} {2}".format(sys.executable,
" ".join(get_python_opts()),
" ".join(sys.argv))
if component:
ret["component"] = component
ret["executable"] = sys.argv[0]
ret["kernel"] = os.uname()[2]
if pkg_info:
ret["pkg_info"] = pkg_info
ret["release"] = get_release_version()
if other_packages:
ret["other involved packages"] = other_packages
ret["environ"] = "\n".join(get_environment_variables())
return ret
@property
def environment_info(self):
return self._get_environment_info()
def __str__(self):
lst = self._format_stack()
lst.insert(0, "%s %s exception report\n" % (self.conf.programName, self.conf.programVersion))
lst.insert(1, "Traceback (most recent call last):\n")
if self.type is not None and self.value is not None:
lst.extend(traceback.format_exception_only(self.type, self.value))
return "".join(lst)
def _format_stack(self):
if not self.stack:
return []
frames = []
for (_frame, fn, lineno, func, ctx, _idx) in self.stack:
if isinstance(ctx, list):
code = "".join(ctx)
else:
code = ctx
frames.append((fn, lineno, func, code))
return traceback.format_list(frames)
# Create a string representation of a class. This method will recursively
# handle all attributes of the base given class.
def _dumpClass(self, instance, level=0, parentkey="", skipList=None):
# This is horribly cheesy, and bound to require maintainence in the
# future. The problem is that anything subclassed from object fails
# the types.InstanceType test we used to have which means those
# objects never get dumped. However, most everything basic in
# python is derived from object so we can't just check for the super
# class. Any instances of the following types will just be printed
# out, and everything else will be assumed to be something that
# needs to be recursed on.
def __isSimpleType(instance):
return isinstance(instance, bool) or \
isinstance(instance, complex) or \
isinstance(instance, float) or \
isinstance(instance, int) or \
isinstance(instance, longtype) or \
isinstance(instance, type(None)) or \
isinstance(instance, bytes) or \
isinstance(instance, str) or \
isinstance(instance, unitype) or \
not hasattr(instance, "__class__") or \
not hasattr(instance, "__dict__")
ret = SafeStr()
if not skipList:
skipList = []
# protect from loops
try:
# Store the id(), not the instance name to protect against
# instances that cannot be hashed.
if not id(instance) in self._dumpHash:
self._dumpHash[id(instance)] = None
else:
ret += "Already dumped (%s instance)\n" % instance.__class__.__name__
return ret
except TypeError:
ret += "Cannot dump object\n"
return ret
if ("__str__" in instance.__class__.__dict__ or
"__repr__" in instance.__class__.__dict__):
try:
ret += "%s\n" % (instance,)
except:
ret += "\n"
return ret
ret += "%s instance, containing members:\n" %\
(instance.__class__.__name__)
pad = ' ' * ((level) * 2)
for key, value in instance.__dict__.items():
if key.startswith("_%s__" % instance.__class__.__name__):
continue
if parentkey != "":
curkey = parentkey + "." + key
else:
curkey = key
# Don't dump objects that are in our skip list, though ones that are
# None are probably okay.
if eval("instance.%s is not None" % key) and \
eval("id(instance.%s)" % key) in skipList:
ret += "%s%s: Skipped\n" % (pad, curkey)
continue
if isinstance(value, list):
ret += "%s%s: [" % (pad, curkey)
first = 1
for item in value:
if not first:
ret += ", "
else:
first = 0
if __isSimpleType(item):
ret += "%s" % (item,)
else:
ret += self._dumpClass(item, level + 1, skipList=skipList)
ret += "]\n"
elif isinstance(value, dict):
# append things one after another so that e.g. binary data is
# replaced by hexa values separately
ret += pad
ret += curkey
ret += ": {"
first = 1
for k, v in value.items():
if not first:
ret += ", "
else:
first = 0
if isinstance(k, str) or isinstance(k, unitype):
ret += "'"
ret += k
ret += "': "
else:
ret += "%s: " % (k,)
if __isSimpleType(v):
ret += "%s" % (v,)
else:
ret += self._dumpClass(v, level + 1, parentkey = curkey, skipList=skipList)
ret += "}\n"
elif __isSimpleType(value):
ret += "%s%s: " % (pad, curkey)
ret += value
ret += "\n"
else:
ret += "%s%s: " % (pad, curkey)
ret += self._dumpClass(value, level + 1, parentkey=curkey, skipList=skipList)
return ret
def dump(self, obj):
"""Dump the local variables and all attributes of a given object.
The lists of files and attrs to ignore are all taken from a
Config object instance provided when the ExceptionDump class was
created.
obj -- Any Python object. This object will have all its attributes
written out, except for those mentioned in the attrSkipList.
"""
idSkipList = []
ret = SafeStr()
# We need to augment the environment eval() will run in with the
# bindings that were local when the traceback happened so that the
# idSkipList can be populated. However since we're not allowed to
# modify the results of locals(), we'll have to make a copy first.
localVars = copy.copy(locals())
if self.stack:
localVars.update(self.stack[-1][0].f_locals)
# Catch attributes that do not exist at the time we do the exception dump
# and ignore them.
for k in self.conf.attrSkipList:
try:
eval("idSkipList.append(id(obj.%s))" % k, None, localVars)
except:
pass
# Write local variables to the given file descriptor, ignoring any of
# the local skips.
if self.stack:
frame = self.stack[-1][0]
ret += "\nLocal variables in innermost frame:\n"
try:
for (key, value) in frame.f_locals.items():
lowered_key = key.lower()
if any(item.lower() in lowered_key
for item in self.conf.localSkipList):
continue
ret += "%s: %s\n" % (key, value)
except:
pass
# And now dump the object's attributes.
try:
ret += "\n\n"
ret += self._dumpClass(obj, skipList=idSkipList)
except:
ret += "\nException occurred during state dump:\n"
ret += traceback.format_exc(None)
# Filter out item names and callbacks that should appear
# only as attachments
items_callbacks = ((name, cb) for (name, (cb, attchmnt_only))
in self.conf.callbackDict.items()
if not attchmnt_only)
# And now add data returned by the registered callbacks
ret += "\nRegistered callbacks:\n"
for (item_name, callback) in items_callbacks:
try:
callback_ret = callback()
if callback_ret:
ret += "%s:\n%s\n" % (item_name, callback_ret)
except Exception as exc:
ret += "%s: Caused error: %s\n" % (item_name, exc)
# And finally, write a bunch of files into the dump too.
for fname in self.conf.fileList:
try:
if six.PY2:
with codecs.open(fname, "r", "utf-8", "ignore") as fobj:
ret += "\n\n%s:\n" % (fname,)
for line in fobj:
ret += line.encode("utf-8")
else:
with open(fname, "rt", encoding="utf-8") as fobj:
ret += "\n\n%s:\n" % (fname,)
for line in fobj:
ret += line
except IOError:
pass
except:
ret += "\nException occurred during %s file copy:\n" % (fname,)
ret += traceback.format_exc(None)
return ret
@property
def hash(self):
"""Create a hash for this traceback object. This is most suitable for
searching bug filing systems for duplicates. The hash is composed
of the basename of each file in the stack, the method names, and
the bit of code. Line numbers and the actual exception message
itself are left out.
"""
import hashlib
s = ""
if self.stack:
for (file, _lineno, func, text) in [f[1:5] for f in self.stack]:
if isinstance(text, list):
text = "".join(text)
s += "%s %s %s\n" % (os.path.basename(file), func, text)
else:
s = "%s %s" % (self.type, self.value)
return hashlib.sha256(s.encode("utf-8")).hexdigest()
def traceback_and_object_dump(self, obj):
"""
Return the traceback and a text representation of an object.
:param obj: Any Python object. This object will have all its attributes
written out, except for those mentioned in the attrSkipList.
"""
ret = SafeStr(str(self))
ret += self.dump(obj)
return ret
class ReverseExceptionDump(ExceptionDump):
"""This class provides an alternate representation of an exception. In
this representation, the traceback is printed with the most recent call
at the top of the stack, and the most generic call at the bottom. Note
that this order does not affect the hash at all.
"""
def __str__(self):
lst = self._format_stack()
lst.reverse()
lst.insert(0, "%s %s exception report\n" % (self.conf.programName, self.conf.programVersion))
lst.insert(1, "Traceback (most recent call first):\n")
if self.type is not None and self.value is not None:
lst.extend(traceback.format_exception_only(self.type, self.value))
return "".join(lst)
@@ -1,299 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_SAVE, MAIN_RESPONSE_SHELL, MAIN_RESPONSE_QUIT, DumpInfo, ExceptionInfo
import bdb
import os
import sys
import report
import traceback
import subprocess
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
class NoNetwork(Exception):
def __init__(self, msg=""):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return "No network is available"
class ExceptionHandler(object):
def __init__(self, confObj, intfClass, exnClass):
"""Create a new ExceptionHandler instance. Subclasses of this one may
be created, provided they are careful to provide all the methods
this one does. Instance attributes:
conf -- A filled in Config instance. At least the programName
and programVersion are required.
exnClass -- An instance of ExceptionDump or a subclass of it. This
is required to know how to represent the Python
exception internally.
intfClass-- An instance of AbstractIntf. This is required to know
what UI classes to use.
"""
self.conf = confObj
self.exnClass = exnClass
self.intf = intfClass
self._exitcode = 10
self._exn = None
self.exnFile = None
self.exnText = ""
def _setExitCode(self, code):
self._exitcode = code
exitcode = property(lambda s: s._exitcode,
lambda s, v: s._setExitCode(v))
def _setExn(self, e):
self._exn = e
exn = property(lambda s: s._exn,
lambda s, v: s._setExn(v))
def handleException(self, dump_info):
"""This is the main exception handling entry point. When Python
gets an exception it doesn't know how to handle, this method will
be called. It then saves the traceback and displays the main
dialog asking the user what to do next. Once this method is
called, there's no good way to go back to what you were doing
before.
All arguments are passed in from the handler created by calling
self.install(). This method should not usually be overridden by
a subclass.
:type dump_info: an instance of the meh.DumpInfo class
"""
responseHash = { MAIN_RESPONSE_QUIT: self.runQuit,
MAIN_RESPONSE_DEBUG: self.runDebug,
MAIN_RESPONSE_SAVE: self.runSave,
MAIN_RESPONSE_SHELL: self.runShell,
}
# Quit if we got an exception when running pdb.
if isinstance(dump_info.exc_info.value, bdb.BdbQuit):
sys.exit(self.exitcode)
# Restore original exception handler.
sys.excepthook = sys.__excepthook__
self.preWriteHook(dump_info)
# Save the exception to the filesystem first.
self.exn = self.exnClass(dump_info.exc_info, self.conf)
(fobj, self.exnFile) = self.openFile()
self.exnText = self.exn.traceback_and_object_dump(dump_info.object)
fobj.write(self.exnText)
fobj.close()
self.postWriteHook(dump_info)
# Run initial UI screen, asking whether to save/debug/quit.
while True:
win = self.intf.mainExceptionWindow(str(self.exn), self.exnText)
if not win:
self.runQuit(dump_info.exc_info)
rc = win.run()
win.destroy()
try:
responseHash[rc](dump_info.exc_info)
except KeyError:
# This happens if (for example) the user hits Escape instead
# of pressing a button.
continue
win.destroy()
def preWriteHook(self, dump_info):
"""Subclasses may supply a function with this name that will be
called immediately before the traceback is written to disk in
order to have any sort of special pre-write processing that needs
to be done.
:type dump_info: an instance of the meh.DumpInfo class
"""
pass
def postWriteHook(self, dump_info):
"""Subclasses may supply a function with this name that will be
called immediately after the traceback is written to disk, but
immediately before the UI is run. This is to provide a place for
any special handling to happen once there is a file on disk.
:type dump_info: an instance of the meh.DumpInfo class
"""
pass
def install(self, obj):
"""Install ourselves as the top level exception handler with Python.
If this method is not called after an ExceptionHandler instance is
created, none of the rest of this code will ever be called.
obj -- A Python object that may be dumped to a file when the
exception is saved. This should be something like the top
level object in a program.
"""
sys.excepthook = lambda ty, value, tb: \
self.handleException(DumpInfo(ExceptionInfo(ty, value, tb), obj))
def openFile(self):
"""Create a randomly named output file to write the exception dump to.
This requires a programName be set in the Config instance. The
return value is a (file descriptor, path) pair. The file must be
closed by the caller when writing is done. Subclasses should not
override this method unless they know what they're doing.
"""
import tempfile
(fd, path) = tempfile.mkstemp("", "%s-tb-" % self.conf.programName, "/tmp")
fo = os.fdopen(fd, "w")
return (fo, path)
### Methods called by the primary exception handling dialog.
def runQuit(self, exc_info):
"""This method is called when the "Exit" button is clicked. It may
be overridden by a subclass, but the basic behavior of eventually
quitting should be preserved.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
sys.exit(self.exitcode)
def runDebug(self, exc_info):
"""This method is called when the "Debug" button is clicked. It may
be overridden by a subclass if specialized behavior is required to
enter debug mode.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
print("")
print(_("Use 'continue' command to quit the debugger and get back to "
"the main menu"))
import pdb
pdb.post_mortem(exc_info.stack)
#no need to quit here, let's just get back to the main dialog
def runShell(self, exc_info):
"""This method is called when user requests to run a shell. It may
be overridden by a subclass if specialized behavior is required to
run shell (e.g. TTY switching).
:type exc_info: an instance of the meh.ExceptionInfo class
"""
print("")
print(_("Exit the shell to get back to the main menu"))
proc = subprocess.Popen(["bash", "--login"], shell=True, cwd="/")
proc.wait()
def runSave(self, exc_info):
"""This method is called when the "Save" button is clicked. It may
be overridden by a subclass, but that's going to be a lot of work.
:type exc_info: an instance of the meh.ExceptionInfo class
"""
params = dict()
params.update(self.exn.environment_info)
pkg_info = params.pop("pkg_info", None)
#if rpmdb queries fail (anaconda), use self.conf.* values
if "component" not in params:
params["component"] = self.conf.programName
if pkg_info:
params["pkg_name"] = pkg_info.name
params["pkg_version"] = pkg_info.version
params["pkg_release"] = pkg_info.release
params["pkg_epoch"] = pkg_info.epoch
params["pkg_arch"] = pkg_info.arch
params["package"] = "%s-%s-%s.%s" % (pkg_info.name, pkg_info.version,
pkg_info.release, pkg_info.arch)
else:
params["pkg_name"] = self.conf.programName
parts = self.conf.programVersion.rsplit("-", 1)
if len(parts) == 2:
version, release = parts
else:
version = parts[0]
# not given, make something up
release = "1"
params["pkg_version"] = version
params["pkg_release"] = release
# we don't support specifying epoch in the config object and only
# the anaconda which is not using epochs doesn't have the RPMdb to
# query
params["pkg_epoch"] = "0"
params["pkg_arch"] = self.conf.programArch
params["package"] = "{0.programName}-{0.programVersion}".format(
self.conf)
params["hashmarkername"] = self.conf.programName
params["duphash"] = self.exn.hash
params["reason"] = self.exn.desc
params["description"] = "The following was filed automatically by %s:\n%s" \
% (self.conf.programName, str(self.exn))
tb_item_name = "%s-tb" % self.conf.programName
params[tb_item_name] = self.exnText
# save data generated by callbacks
for (item_name, (callback, _anc)) in self.conf.callbackDict.items():
try:
ret = callback()
if ret:
params[item_name] = ret
except Exception as exc: # pylint: disable=broad-except
params[item_name] = "Caused error: %s" % exc
for fpath in self.conf.fileList:
try:
with open(fpath, "r") as fobj:
# would be better to use the full path here, but libreport
# doesn't allow '/' characters in the item name
filename = os.path.basename(fpath)
if filename not in params:
params[filename] = fobj.read()
else:
params[filename+"_file"] = fobj.read()
except: # pylint: disable=bare-except
#skip files we cannot read
continue
# tell ABRT some more things it requires
params["analyzer"] = "Python"
params["backtrace"] = "".join(traceback.format_exception(exc_info.type,
exc_info.value,
exc_info.stack))
signature = report.createPythonUnhandledExceptionSignature(**params)
# We don't want to automatically quit here since the user may wish to
# save somewhere else, debug, etc.
self.intf.saveExceptionWindow(signature)
@@ -1,45 +0,0 @@
#
# network.py - network configuration install data
#
# Copyright (C) 2008, 2009 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): David Cantrell <dcantrell@redhat.com>
#
import dbus
# This code was taken from anaconda, and slightly adapted to not rely
# on isys.
NM_SERVICE = "org.freedesktop.NetworkManager"
NM_MANAGER_PATH = "/org/freedesktop/NetworkManager"
NM_STATE_CONNECTED = 3
DBUS_PROPS_IFACE = "org.freedesktop.DBus.Properties"
def hasActiveNetDev():
"""Does the system have an enabled network interface?"""
try:
bus = dbus.SystemBus()
nm = bus.get_object(NM_SERVICE, NM_MANAGER_PATH)
props = dbus.Interface(nm, DBUS_PROPS_IFACE)
state = props.Get(NM_SERVICE, "State")
if int(state) == NM_STATE_CONNECTED:
return True
else:
return False
except dbus.DBusException:
return False
@@ -1,71 +0,0 @@
#
# Copyright (C) 2013 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author: Vratislav Podzimek <vpodzime@redhat.com>
#
#
import sys
PY = int(sys.version.split('.')[0])
"""
This module provides a SafeStr class.
@see: SafeStr
"""
class SafeStr(str):
"""
String class that has a modified __add__ method so that ascii strings,
binary data represented as a byte string and unicode objects can be
safely appended to it (not causing traceback). BINARY DATA IS OMITTED.
"""
def __add__(self, other):
if PY > 2:
return SafeStr(str.__add__(self, str(other)))
if not (isinstance(other, str) or isinstance(other, unicode)): # pylint: disable=undefined-variable
if hasattr(other, "__str__"):
other = other.__str__()
else:
other = "OMITTED OBJECT WITHOUT __str__ METHOD"
if isinstance(other, unicode): # pylint: disable=undefined-variable
ret = SafeStr(str.__add__(self, other.encode("utf-8")))
else:
try:
# try to decode which doesn't cause traceback for utf-8 encoded
# non-ascii string and ascii string
other.decode("utf-8")
ret = SafeStr(str.__add__(self, other))
except UnicodeDecodeError:
# binary data, get the representation used by Python for
# non-ascii bytes
# hex(255) returns "0xff", we want "\xff"
other_hexa = (hex(ord(char)) for char in other)
other_backslashed = (hex_num.replace("0x", "\\x")
for hex_num in other_hexa)
other_repr = "".join(other_backslashed)
ret = SafeStr(str.__add__(self, other_repr))
return ret
@@ -1,181 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
class AbstractIntf(object):
"""The base class for Interfaces. This is an abstract class. It
provides methods that create and run various kinds of windows.
We provide a basic level of graphical and text oriented interfaces
here, but it should be possible for things like anaconda to supply
their own much more complicated ones with little effort.
"""
def __init__(self, *args, **kwargs):
"""Create a new AbstractInterface instance. This method need not
be overridden by subclasses.
"""
pass
def enableNetwork(self, *args, **kwargs):
"""Display and run a dialog that brings up the network, if it is
currently disabled. This method must be provided by all subclasses,
and should return False if unsuccessful.
"""
raise NotImplementedError
def exitWindow(self, title, message, *args, **kwargs):
"""Display and run a dialog that displays a message with the proper
buttons and images for quitting afterwards. This method must be
provided by all subclasses.
title -- The window's title.
message -- The window's text.
"""
raise NotImplementedError
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
"""Create and return an instance of the initial execption handling
dialog. This method must be provided by all subclasses.
text -- The short traceback (usually, just the stack trace).
exnFile -- A file containing the output of ExceptionDump.write().
"""
raise NotImplementedError
def messageWindow(self, title, message, *args, **kwargs):
"""Display a generic informational message. This can be an error,
status update, and so forth. It must be provided by all subclasses.
title -- The window's title.
message -- The window's text.
"""
raise NotImplementedError
def saveExceptionWindow(self, exnFile, *args, **kwargs):
"""Create and return an instance of the exception saving dialog. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractMainExceptionWindow(object):
"""This abstract class describes the basic level of support required of
any interface that supplies a main exception window. The main exception
window is the initial dialog displayed by the exception handler that
provides the debug/save/quit options.
"""
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
"""Create a new MainExceptionWindow instance. This must handle
creating the dialog and populating it with widgets, but must not
run the dialog. A self.dialog attribute should be created that
refers to the dialog itself.
shortTraceback -- The short traceback (usually, just the stack
trace).
longTraceback -- The long traceback (full traceback and the main
object dump).
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up, but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractExitWindow(object):
"""This abstract class describes the basic level of support required of
a basic message dialog that should be displayed before the program
exits. All interfaces must provide this class.
"""
def __init__(self, title, text, *args, **kwargs):
"""Create a new ExitWindow instance. This must handle creating the
dialog and putting the text into it, but must not run the dialog.
This method must be provided by all subclasses.
title -- The window's title.
text -- The window's text.
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractMessageWindow(object):
"""This abstract class describes the basic level of support required of
a basic message dialog. All interfaces must provide this class.
"""
def __init__(self, title, text, *args, **kwargs):
"""Create a new MessageWindow instance. This must handle creating the
dialog and putting the text into it, but must not run the dialog.
This method must be provided by all subclasses.
title -- The window's title.
text -- The window's text.
"""
pass
def destroy(self, *args, **kwargs):
"""Destroy the current dialog. This method must be provided by all
subclasses.
"""
raise NotImplementedError
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
class AbstractSaveExceptionWindow(object):
"""This abstract class describes the basic level of support required of
any interface that supplies an exception saving window. The exception
saving window is the dialog displayed if the user clicks "save" on the
initial dialog, and presents multiple options for how the traceback
should be saved.
"""
def __init__(self, *args, **kwargs):
"""Create a new SaveExceptionWindow instance. This must handle
creating the dialog and populating it with widgets, but must not
run the dialog. A self.dialog attribute should be created that
refers to the dialog itself.
"""
pass
def run(self, *args, **kwargs):
"""Run the window and set a return value. This method does everything
after the interface has been set up but does not destroy it. This
method must be provided by all subclasses.
"""
raise NotImplementedError
@@ -1,177 +0,0 @@
# Copyright (C) 2009 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
#
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_NONE, MAIN_RESPONSE_QUIT, MAIN_RESPONSE_SAVE
from meh.ui import AbstractIntf, AbstractSaveExceptionWindow, AbstractMainExceptionWindow, AbstractMessageWindow
import os
import sys
import report
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
def find_glade_file(file):
path = os.environ.get("GLADEPATH", "./:ui/:/tmp/updates/:/tmp/updates/ui/:/usr/share/python-meh/")
for d in path.split(":"):
fn = d + file
if os.access(fn, os.R_OK):
return fn
raise RuntimeError("Unable to find glade file %s" % file)
class GraphicalIntf(AbstractIntf):
def __init__(self, *args, **kwargs):
AbstractIntf.__init__(self, *args, **kwargs)
def enableNetwork(self, *args, **kwargs):
"""Should be provided by the inheriting class."""
return False
def exitWindow(self, title, message, *args, **kwargs):
win = ExitWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
win = MainExceptionWindow(text, exnFile, *args, **kwargs)
return win
def messageWindow(self, title, message, *args, **kwargs):
win = MessageWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def saveExceptionWindow(self, signature, *args, **kwargs):
win = SaveExceptionWindow(signature)
win.run()
class SaveExceptionWindow(AbstractSaveExceptionWindow):
def __init__(self, signature, *args, **kwargs):
AbstractSaveExceptionWindow.__init__(self, signature, *args, **kwargs)
self.signature = signature
def run(self, *args, **kwargs):
# Don't need to check the return value of report since it will
# handle all the UI reporting for us.
report.report_problem_in_memory(self.signature, report.LIBREPORT_WAIT)
class MainExceptionWindow(AbstractMainExceptionWindow):
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
AbstractMainExceptionWindow.__init__(self, shortTraceback, longTraceback,
*args, **kwargs)
builder = Gtk.Builder()
builder.set_translation_domain("python-meh")
glade_file = find_glade_file("exception-dialog.glade")
builder.add_from_file(glade_file)
builder.connect_signals(self)
self._main_window = builder.get_object("exceptionWindow")
# this makes sure the Meh window remains active
# even if the exception has been triggered in a dialog
window_group = Gtk.WindowGroup()
window_group.add_window(self._main_window)
self._traceback_buffer = builder.get_object("tracebackBuffer")
self._traceback_buffer.set_text(longTraceback)
self._response = MAIN_RESPONSE_QUIT
self._debug_button = builder.get_object("debugButton")
allowDebug = kwargs.get("allowDebug", sys.stdout.isatty)
if allowDebug and not allowDebug():
self._debug_button.set_sensitive(False)
@property
def main_window(self):
return self._main_window
def destroy(self, *args, **kwargs):
self._main_window.destroy()
def run(self, *args, **kwargs):
self._main_window.show_all()
# keep our window above dialogs
self._main_window.set_modal(True)
self._main_window.set_keep_above(True)
Gtk.main()
self.destroy()
return self._response
def on_report_clicked(self, button):
# hide our window to not interfere with libreport window
self._main_window.hide()
self._response = MAIN_RESPONSE_SAVE
Gtk.main_quit()
def on_quit_clicked(self, button):
self._response = MAIN_RESPONSE_QUIT
Gtk.main_quit()
def on_debug_clicked(self, button):
self._response = MAIN_RESPONSE_DEBUG
Gtk.main_quit()
def on_expander_activated(self, expander, *args):
if not expander.get_expanded():
self._main_window.resize(600, 400)
else:
#resize the window back to the default size when expander is
#minimized
self._main_window.resize(600, 1)
def on_main_window_deleted(self, *args):
self._response = MAIN_RESPONSE_NONE
self.destroy()
Gtk.main_quit()
class MessageWindow(AbstractMessageWindow):
def __init__(self, title, text, *args, **kwargs):
AbstractMessageWindow.__init__(self, title, text, *args, **kwargs)
self.rc = 0
self.dialog = Gtk.MessageDialog(buttons=Gtk.ButtonsType.OK,
type=Gtk.MessageType.INFO,
message_format=text)
self.dialog.set_title(title)
self.dialog.set_position(Gtk.WindowPosition.CENTER)
def destroy(self, *args, **kwargs):
self.dialog.destroy()
def run(self, *args, **kwargs):
self.dialog.show_all()
self.rc = self.dialog.run()
self.dialog.destroy()
class ExitWindow(MessageWindow):
def __init__(self, title, text, *args, **kwargs): # pylint: disable=super-init-not-called
self.dialog = Gtk.MessageDialog(buttons=Gtk.ButtonsType.NONE,
type=Gtk.MessageType.INFO,
message_format=text)
self.dialog.set_title(title)
self.dialog.add_button(_("_Exit"), 0)
self.dialog.set_position(Gtk.WindowPosition.CENTER)
@@ -1,225 +0,0 @@
# Copyright (C) 2009, 2013 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author(s): Chris Lumens <clumens@redhat.com>
# Vratislav Podzimek <vpodzime@redhat.com>
#
from __future__ import print_function
from meh import MAIN_RESPONSE_DEBUG, MAIN_RESPONSE_SAVE, MAIN_RESPONSE_SHELL, MAIN_RESPONSE_QUIT
from meh.ui import AbstractIntf, AbstractSaveExceptionWindow, AbstractMainExceptionWindow, AbstractMessageWindow
import report
import report.io.TextIO
from report import LIBREPORT_WAIT, LIBREPORT_RUN_CLI
import os
import sys
if sys.version_info.major == 3:
raw_input_fn = input
else:
raw_input_fn = raw_input # pylint: disable=undefined-variable
import gettext
_ = lambda x: gettext.ldgettext("python-meh", x)
class IOHandler(object):
"""
Class that provides methods for input and output. Its instance is expected
to be passed to objects performing some I/O operations.
"""
def __init__(self, in_func=raw_input_fn, out_func=print): # pylint: disable=used-before-assignment
"""
Constructor for the IOhandler class. Arguments can be used to override
default I/O functions with the custom ones.
:param in_func: input function similar to standard raw_input
:type in_func: str -> str
:param out_func: output function similar to standard print
:type out_func: str -> None
"""
self.in_func = in_func
self.out_func = out_func
def print(self, msg=""):
self.out_func(msg)
def raw_input(self, prompt):
return self.in_func(prompt)
class TextWindow(object):
"""Helper class providing some common methods needed by all text windows."""
def __init__(self, title, *args, **kwargs):
self._io = kwargs.get("io_handler", IOHandler())
self._title = title
# short (one-char) answer meaning "yes"
self._yes_answer = _("y")
# short (one-char) answer meaning "no"
self._no_answer = _("n")
@property
def _usable_width(self):
return os.environ.get("COLUMNS", 80) - 1
def _print_rule(self):
rule = self._usable_width * "="
self._io.print(rule)
def print_header(self):
self._io.print()
self._print_rule()
self._io.print(self._title)
self._print_rule()
def destroy(self):
self._print_rule()
self._print_rule()
class TextIntf(AbstractIntf):
def __init__(self, *args, **kwargs):
AbstractIntf.__init__(self, *args, **kwargs)
self.screen = kwargs.get("screen", None)
self._io = kwargs.get("io_handler", IOHandler())
def set_io_handler(self, handler):
"""
Set different IO handler.
:type handler: an instance of the IOHandler class
"""
self._io = handler
def enableNetwork(self, *args, **kwargs):
"""Should be provided by the inheriting class."""
return False
def exitWindow(self, title, message, *args, **kwargs):
kwargs["io_handler"] = self._io
win = ExitWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def mainExceptionWindow(self, text, exnFile, *args, **kwargs):
kwargs["io_handler"] = self._io
win = MainExceptionWindow(text, exnFile, *args, **kwargs)
return win
def messageWindow(self, title, message, *args, **kwargs):
kwargs["io_handler"] = self._io
win = MessageWindow(title, message, *args, **kwargs)
win.run()
win.destroy()
def saveExceptionWindow(self, signature, *args, **kwargs):
kwargs["io_handler"] = self._io
win = SaveExceptionWindow(signature, *args, **kwargs)
win.run()
win.destroy()
class SaveExceptionWindow(TextWindow, AbstractSaveExceptionWindow):
def __init__(self, signature, *args, **kwargs):
AbstractSaveExceptionWindow.__init__(self, signature,
*args, **kwargs)
TextWindow.__init__(self, _("Save exception"), *args, **kwargs)
self.signature = signature
def run(self, *args, **kwargs):
# Don't need to check the return value of report since it will
# handle all the UI reporting for us.
report.report_problem_in_memory(self.signature,
LIBREPORT_WAIT|LIBREPORT_RUN_CLI)
class MainExceptionWindow(TextWindow, AbstractMainExceptionWindow):
def __init__(self, shortTraceback=None, longTraceback=None, *args, **kwargs):
AbstractMainExceptionWindow.__init__(self, shortTraceback, longTraceback,
*args, **kwargs)
TextWindow.__init__(self, _("An unknown error has occurred"),
*args, **kwargs)
self._short_traceback = shortTraceback
self._menu_items = [(_("Report Bug"), MAIN_RESPONSE_SAVE),
(_("Run shell"), MAIN_RESPONSE_SHELL),
(_("Quit"), MAIN_RESPONSE_QUIT)]
allowDebug = kwargs.get("allowDebug", sys.stdout.isatty)
if allowDebug and allowDebug():
self._menu_items.insert(1, (_("Debug"), MAIN_RESPONSE_DEBUG))
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._short_traceback)
self._io.print(_("What do you want to do now?"))
for (idx, item) in enumerate(self._menu_items):
self._io.print("%d) %s" % (idx + 1, item[0]))
ret = -1
num_menu_items = len(self._menu_items)
self._io.print()
while not (0 < ret <= num_menu_items):
ret = self._io.raw_input(_("Please make your choice from above: "))
try:
ret = int(ret)
except ValueError:
ret = -1
return self._menu_items[ret - 1][1]
class MessageWindow(TextWindow, AbstractMessageWindow):
def __init__(self, title, text, *args, **kwargs):
AbstractMessageWindow.__init__(self, title, text, *args, **kwargs)
TextWindow.__init__(self, title, *args, **kwargs)
self._text = text
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._text)
self._io.print()
self._io.raw_input(_("Hit ENTER to continue"))
class ExitWindow(MessageWindow):
def __init__(self, title, text, *args, **kwargs):
MessageWindow.__init__(self, title, text, *args, **kwargs)
def run(self, *args, **kwargs):
self.print_header()
self._io.print(self._text)
self._io.print()
# self._no_answer may be non-ascii string (simple .upper() doesn't work)
no_answer_upper = self._no_answer.decode("utf-8").upper().encode("utf-8")
answer = self._io.raw_input(_(
"Are you sure you want to exit? [%(yes)s/%(no)s]") %
{ "yes": self._yes_answer,
"no": no_answer_upper })
# no answer means accepting the default (self._no_answer) and the answer
# is case insensitive (and may be non-ascii)
lower_answer = answer.decode("utf-8").lower().encode("utf-8")
answer = lower_answer or self._no_answer
if answer in (self._yes_answer, self._no_answer):
return answer == self._yes_answer
else:
self.run(*args, **kwargs)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

@@ -1,76 +0,0 @@
#
# Makefile for the PO files (translation) catalog
#
# $Id$
TOP = ../..
# What is this package?
NLSPACKAGE = python-meh
POTFILE = $(NLSPACKAGE).pot
INSTALL = /usr/bin/install -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = /usr/bin/install -d
# destination directory
INSTALL_NLS_DIR = $(RPM_BUILD_ROOT)/usr/share/locale
# PO catalog handling
MSGMERGE = msgmerge -v
XGETTEXT = xgettext --default-domain=$(NLSPACKAGE) \
--add-comments
MSGFMT = msgfmt --statistics --verbose
# What do we need to do
POFILES = $(wildcard *.po)
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
PYSRC = $(wildcard ../meh/*.py ../meh/ui/*.py)
GLADEFILES = $(wildcard ../ui/*.glade)
all:: update-po $(MOFILES)
potfile: $(PYSRC) glade-po
$(XGETTEXT) -L Python --keyword=_ --keyword=N_ $(PYSRC) tmp/*.h
@if cmp -s $(NLSPACKAGE).po $(POTFILE); then \
rm -f $(NLSPACKAGE).po; \
else \
mv -f $(NLSPACKAGE).po $(POTFILE); \
fi; \
glade-po: $(GLADEFILES)
rm -rf tmp/
for f in $(GLADEFILES); do \
intltool-extract --type=gettext/glade -l $$f ;\
done
update-po: Makefile potfile refresh-po
refresh-po: Makefile
for cat in $(POFILES); do \
lang=`basename $$cat .po`; \
if $(MSGMERGE) $$lang.po $(POTFILE) > $$lang.pot ; then \
mv -f $$lang.pot $$lang.po ; \
echo "$(MSGMERGE) of $$lang succeeded" ; \
else \
echo "$(MSGMERGE) of $$lang failed" ; \
rm -f $$lang.pot ; \
fi \
done
clean:
@rm -fv *mo *~ .depend
@rm -rf tmp
install: $(MOFILES)
@for n in $(MOFILES); do \
l=`basename $$n .mo`; \
$(INSTALL_DIR) $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) --verbose $$n $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
done
%.mo: %.po
$(MSGFMT) -o $@ $<
.PHONY: missing depend
@@ -1,116 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-05 14:50+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../meh/handler.py:195
msgid ""
"Use 'continue' command to quit the debugger and get back to the main menu"
msgstr ""
#: ../meh/handler.py:211
msgid "Exit the shell to get back to the main menu"
msgstr ""
#. short (one-char) answer meaning "yes"
#: ../meh/ui/text.py:75
msgid "y"
msgstr ""
#. short (one-char) answer meaning "no"
#: ../meh/ui/text.py:78
msgid "n"
msgstr ""
#: ../meh/ui/text.py:145
msgid "Save exception"
msgstr ""
#: ../meh/ui/text.py:158 tmp/exception-dialog.glade.h:1
msgid "An unknown error has occurred"
msgstr ""
#: ../meh/ui/text.py:161
msgid "Report Bug"
msgstr ""
#: ../meh/ui/text.py:162
msgid "Run shell"
msgstr ""
#: ../meh/ui/text.py:163
msgid "Quit"
msgstr ""
#: ../meh/ui/text.py:168
msgid "Debug"
msgstr ""
#: ../meh/ui/text.py:173
msgid "What do you want to do now?"
msgstr ""
#: ../meh/ui/text.py:181
msgid "Please make your choice from above: "
msgstr ""
#: ../meh/ui/text.py:199
msgid "Hit ENTER to continue"
msgstr ""
#: ../meh/ui/text.py:213
#, python-format
msgid "Are you sure you want to exit? [%(yes)s/%(no)s]"
msgstr ""
#: ../meh/ui/gui.py:176
msgid "_Exit"
msgstr ""
#: tmp/exception-dialog.glade.h:2
msgid ""
"This program has encountered an unknown error. You may\n"
"report the bug below or quit the program."
msgstr ""
#: tmp/exception-dialog.glade.h:4
msgid "_Report Bug"
msgstr ""
#: tmp/exception-dialog.glade.h:5
msgid "_Quit"
msgstr ""
#: tmp/exception-dialog.glade.h:6
msgid "The output below may help determine the cause of the error:"
msgstr ""
#: tmp/exception-dialog.glade.h:7
msgid "'Debug' may take you to tty1."
msgstr ""
#: tmp/exception-dialog.glade.h:8
msgid "_Debug"
msgstr ""
#: tmp/exception-dialog.glade.h:9
msgid "More _info..."
msgstr ""
#: tmp/exception-dialog.glade.h:10
msgid "No additional info available."
msgstr ""
@@ -1,383 +0,0 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global with_python3 1
%define libreportver 2.0.18-1
Summary: A python library for handling exceptions
Name: python-meh
Url: https://github.com/rhinstaller/python-meh
Version: 0.43
Release: 1%{?dist}
# This is a Red Hat maintained package which is specific to
# our distribution. Thus the source is only available from
# within this srpm.
# This tarball was created from upstream git:
# git clone https://github.com/rhinstaller/python-meh
# cd python-meh && make archive
Source0: https://github.com/rhinstaller/python-meh/archive/%{name}-%{version}.tar.gz
License: GPLv2+
Group: System Environment/Libraries
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildRequires: gettext
BuildRequires: python-setuptools
BuildRequires: intltool
BuildRequires: dbus-python
BuildRequires: libreport-gtk >= %{libreportver}
BuildRequires: libreport-cli >= %{libreportver}
BuildRequires: libreport-python >= %{libreportver}
BuildRequires: python-six
%if 0%{with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-dbus
BuildRequires: libreport-python3 >= %{libreportver}
BuildRequires: python3-six
BuildRequires: python3-pocketlint
%endif
Requires: python
Requires: dbus-python
Requires: rpm-python
Requires: libreport-cli >= %{libreportver}
Requires: libreport-python >= %{libreportver}
Requires: python-six
%description
The python-meh package is a python library for handling, saving, and reporting
exceptions.
%package gui
Summary: Graphical user interface for the python-meh library
Requires: python-meh = %{version}-%{release}
Requires: pygobject3
Requires: gtk3
Requires: libreport-gtk >= %{libreportver}
%description gui
The python-meh-gui package provides a GUI for the python-meh library.
%if 0%{with_python3}
%package -n python3-meh
Summary: A python 3 library for handling exceptions
Requires: python3
Requires: python3-dbus
Requires: rpm-python3
Requires: libreport-cli >= %{libreportver}
Requires: libreport-python3 >= %{libreportver}
Requires: python3-six
%description -n python3-meh
The python3-meh package is a python 3 library for handling, saving, and reporting
exceptions.
%package -n python3-meh-gui
Summary: Graphical user interface for the python3-meh library
Requires: python3-meh = %{version}-%{release}
Requires: python3-gobject, gtk3
Requires: libreport-gtk >= %{libreportver}
%description -n python3-meh-gui
The python3-meh-gui package provides a GUI for the python3-meh library.
%endif
%prep
%setup -q
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
make
%if 0%{?with_python3}
pushd %{py3dir}
make PYTHON=%{__python3}
popd
%endif
%check
make test
%if 0%{?with_python3}
pushd %{py3dir}
# Needs UTF-8 locale
LANG=en_US.UTF-8 make PYTHON=%{__python3} test
popd
%endif
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%if 0%{?with_python3}
pushd %{py3dir}
make PYTHON=%{__python3} DESTDIR=%{buildroot} install
popd
%endif
%find_lang %{name}
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog COPYING
%{python_sitelib}/*
%exclude %{python_sitelib}/meh/ui/gui.py*
%files gui
%{python_sitelib}/meh/ui/gui.py*
%{_datadir}/python-meh
%files -n python3-meh
%doc ChangeLog COPYING
%{python3_sitelib}/*
%exclude %{python3_sitelib}/meh/ui/gui.py*
%files -n python3-meh-gui
%{python3_sitelib}/meh/ui/gui.py*
%{_datadir}/python-meh
%changelog
* Mon Oct 05 2015 Martin Kolman <mkolman@redhat.com> - 0.43-1
- Set translations domain for glade files (vtrefny)
* Tue Sep 29 2015 Martin Kolman <mkolman@redhat.com> - 0.42-1
- Add tests and ChangeLog to MANIFEST.in (vtrefny)
- Fix clicking on buttons on error pop-up doesn't work (#1250942) (vtrefny)
- Add Makefile to MANIFEST.in (vtrefny)
- Add archive target to Makefile (vtrefny)
- Add .gitignore (vtrefny)
* Wed Sep 16 2015 Martin Kolman <mkolman@redhat.com> - 0.41-1
- Make sure the Meh window has focus even if a dialog is displayed (mkolman)
- Run pylint as part of "make ci". (clumens)
- Add a new makefile target that does everything needed for jenkins. (clumens)
- Fix the other pylint-discovered errors. (clumens)
- Use isinstance instead of type. (clumens)
- Fix all the places we're redefining something. (clumens)
- Don't use [] as the default argument in a method. (clumens)
- Take care of exception-related pylint messages. (clumens)
- Get rid of all the unused variable warnings. (clumens)
- Get rid of all unused and wildcard imports. (clumens)
- Add pocketlint support to python-meh. (clumens)
- Use gi.require_version for Gtk import (vtrefny)
* Tue Apr 28 2015 Martin Kolman <mkolman@redhat.com> - 0.40-1
- Make sure the date in RPM changelog is always in English (mkolman)
- Update upstream URL (mkolman)
* Wed Apr 01 2015 Martin Kolman <mkolman@redhat.com> - 0.39-1
- Handle LANG=C (mkolman)
* Tue Mar 31 2015 Martin Kolman <mkolman@redhat.com> - 0.38-1
- Switch to Zanata for translations (mkolman)
- Run both Python 2 and Python 3 tests for "make test" (mkolman)
- Python 3 compatibility fixes for the Unicode test (mkolman)
- Make it possible to specify file open mode (mkolman)
- Add missing six dependency (mkolman)
- Fix date in changelog (mkolman)
* Fri Mar 27 2015 Martin Kolman <mkolman@redhat.com> - 0.37-1
- Fix dumping file attachments in Python 3 (vtrefny)
- meh has not required openssh-clients since 2009 (awilliam)
* Thu Mar 05 2015 Martin Kolman <mkolman@redhat.com> - 0.36-1
- Package's epoch returned by RPM is an integer (#1199263) (vpodzime)
* Tue Feb 17 2015 Martin Kolman <mkolman@redhat.com> - 0.35-1
- Add option to remove the 'Debug' option/button for mainExceptionWindow (vtrefny)
* Tue Dec 09 2014 Vratislav Podzimek <vpodzime@redhat.com> - 0.34-1
- Encode str/unicode object before hashing it (vpodzime)
- Use dict.items() instead of dict.iteritems() (vpodzime)
- Add one more flag to test (for Python3) (vpodzime)
- Make sure we work with strings when we think we do (vpodzime)
* Fri Dec 05 2014 Vratislav Podzimek <vpodzime@redhat.com> - 0.33-1
- Make sure fresh translations are always fetched (vpodzime)
- Add pieces needed to build the python3- subpackage (#985294) (mhroncok)
- Remove yum from requires and fix setuptools requires (mhroncok)
- raw_input is replaced by input in Python3 (vpodzime)
- Raise exception in a Python3 compatible way (mhroncok)
- Remove the --disable-overwrite parameter for the Transifex client (mkolman)
- Use /usr/bin/python2 in scripts (mkolman)
- Add example code using python-meh (vpodzime)
* Mon Apr 28 2014 Martin Kolman <mkolman@redhat.com> - 0.32-1
- Translation update
* Fri Mar 21 2014 Martin Kolman <mkolman@redhat.com> - 0.31-1
- Translation update
* Wed Dec 18 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.30-1
- Exclude compiled versions of gui.py from the non-gui package (dshea)
- Skip callbacks providing no information (vpodzime)
* Wed Nov 20 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.29-1
- Split GUI out into a separate package (vpodzime)
- Create archives in one Makefile target and reuse it (vpodzime)
* Tue Nov 05 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.28-1
- Introduce support for Python 3 while keeping Python 2 working (miro)
- Sync spec with downstream (vpodzime)
* Wed Oct 09 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.27-1
- Use join method instead of the joinfields function
- Translate the hints on how to quit debugger and shell
- Add a way to run shell when exception appears
- Get rid of constants that are no longer used anywhere
- Filter local variables in a nicer way and fix docstring
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 23 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.26-1
- Output binary data correctly as hexa strings (#986515) (vpodzime)
- Add newline before dumping callbacks' outputs (vpodzime)
* Tue Jun 18 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.25-1
- Add and use the safe_string module and the SafeStr class (vpodzime)
- Give translators hint about the cryptic strings (vpodzime)
* Thu May 02 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.24-1
- Epoch of the package from RPM db can be None (#957789) (vpodzime)
* Wed Apr 17 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.23-1
- Use Sphinx syntax for docstrings (vpodzime)
- Allow a change of the I/O functions (vpodzime)
- Reword the 'Debug' button warning (#948256) (vpodzime)
* Thu Apr 04 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.22-1
- Some more stuff for ABRT/libreport (#929181) (vpodzime)
- Tell ABRT we are reporting a Python excetion (vpodzime)
- Use named tuples instead of our magic tuples (vpodzime)
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Jan 21 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.21-1
- New purely textual text interface (vpodzime)
- Add dumb enableNetwork implementation to GraphicalIntf (vpodzime)
- Destroy main window after running it (vpodzime)
- Get rid of the accountManager and use new libreport API (vpodzime)
- Add a way to override previously registered callback (vpodzime)
- Allow callbacks marked as attachment only (vpodzime)
- Add support for callbacks providing additional data (vpodzime)
* Tue Dec 11 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.20-1
- Handle non-ascii dict keys and values correctly (#883641) (vpodzime)
* Wed Nov 14 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.19-1
- Add test for handling unicode strings and files (vpodzime)
- Read files as UTF-8 and ignore errors (#874250) (vpodzime)
- Add %check section to the spec file (vpodzime)
- Fix tests (vpodzime)
* Thu Oct 25 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.18-1
- Handle tracebacks with no stack (#866441) (vpodzime)
- Parse component name correctly (#866526) (vpodzime)
- Spelling corrections (#865993) (vpodzime)
* Tue Oct 09 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.17-1
- Handle unicode strings correctly (#854959) (vpodzime)
* Tue Sep 11 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.16-1
- Do not overwrite process information with files having the same basename (vpodzime)
- Encode dump as utf-8 before writing to file (#854959) (vpodzime)
* Mon Aug 20 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.15-1
- Add main_window property to the MainExceptionWindow (vpodzime)
- Don't try to dump objects without __dict__ (vpodzime)
- Change require from rpm to rpm-python (vpodzime)
* Fri Aug 03 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.14-1
- Use just a basename of the attached file as the item name (vpodzime)
- Set the type hint for the mainExceptionWindow to Dialog (vpodzime)
- Store and then write out the string representation of the traceback and object dump (vpodzime)
* Fri Jul 27 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.13-1
- Add files specified in the Config object as attachments to bugreports (vpodzime)
- Display hint how to quit the debugger (vpodzime)
- Do not kill the process when 'continue' is used in pdb (vpodzime)
- Port to Gtk3 and the new design (vpodzime)
- Remove the rc attribute and getrc methods (vpodzime)
- Fix 'all' and 'install' Makefile targets (vpodzime)
- Migrate l10n to Transifex (vpodzime)
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Dec 20 2011 Vratislav Podzimek <vpodzime@redhat.com> 0.12
- Use new libreport API to get more information to bugzilla (vpodzime).
- Adapt to the new API of libreport (vpodzime).
- Move "import rpm" to where it's needed to avoid nameserver problems (clumens).
Resolves: rhbz#749330
- Change dependency to libreport-* (mtoman).
Resolves: rhbz#730924
- Add abrt-like information to bug reports (vpodzime).
Resolves: rhbz#728871
- Propagate the screen attr when using text mode (jmoskovc).
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jan 25 2011 Chris Lumens <clumens@redhat.com> - 0.11-1
- Update the spec file URL to something valid (#670601). (clumens)
- Don't use _D for Debug, since that's already used by the expander (#640929). (clumens)
- Translation updates.
* Tue Jun 22 2010 Chris Lumens <clumens@redhat.com> 0.10-1
- Treat classes like simple types, too. (clumens)
* Thu Jun 10 2010 Chris Lumens <clumens@redhat.com> - 0.9-1
- Remove the requirement on python-bugzilla (#602794). (clumens)
- Rename ba.po -> bs.po (#583055). (clumens)
- Translation updates.
* Thu Mar 04 2010 Chris Lumens <clumens@redhat.com> - 0.8-1
- And add a requirement for report as well. (clumens)
- filer.py is now completely taken over by meh. (clumens)
- Everything from savers.py has moved into report. (clumens)
- Remove unused UI code now that report handles all this for me. (clumens)
- Switch ExceptionHandler to use report (#562656). (clumens)
- Don't allow an exception when writing out an attribute stop the whole dump. (clumens)
- Credit where credit is due. (clumens)
* Tue Nov 03 2009 Chris Lumens <clumens@redhat.com> - 0.7-1
- Add a test case framework.
- Move src -> meh for ease of test case writing.
- Another attempt at making the attrSkipList work (#532612, #532737).
* Thu Oct 08 2009 Chris Lumens <clumens@redhat.com> - 0.6-1
- Make idSkipList work again.
- Support dumping objects derived from Python's object.
- Use the right method to set text on a snack.Entry (#526884).
* Tue Sep 29 2009 Chris Lumens <clumens@redhat.com> - 0.5-1
- Always compare version numbers as strings (#526188).
* Fri Sep 25 2009 Chris Lumens <clumens@redhat.com> - 0.4-1
- Add a default description to bug reports.
- Handle the user pressing Escape by continuing to show the dialog.
- Lots more translation updates.
* Thu Sep 10 2009 Chris Lumens <clumens@redhat.com> - 0.3-1
- Pull in lots of new translations (#522410).
* Wed Aug 19 2009 Chris Lumens <clumens@redhat.com> - 0.2-1
- Add a title to the main exception dialog so it looks right in anaconda.
- Don't include an extra '/' in the displayed bug URL (#517515).
- Now that there's .po files, package them.
- Use the new exception icon (#517164).
* Tue Jul 28 2009 Chris Lumens <clumens@redhat.com> - 0.1-1
- Initial package.
@@ -1,10 +0,0 @@
#!/usr/bin/python2
from distutils.core import setup
setup(name='python-meh', version='0.43',
description='Python module for handling exceptions',
author='Chris Lumens', author_email='clumens@redhat.com',
url='http://git.fedoraproject.org/git/?p=python-meh.git',
data_files = [('/usr/share/python-meh', ['ui/exception-dialog.glade'])],
packages=['meh', 'meh.ui'])
Whitespace-only changes.
@@ -1,25 +0,0 @@
import unittest
from tests.baseclass import BaseTestCase
from meh import Config
class Example:
def __init__(self):
self.rootPassword = "blahblah"
self.dontSkipMe = 12345
class AttrSkipList_TestCase(BaseTestCase):
def runTest(self):
example = Example()
conf = Config(programName="test",
programVersion="47",
attrSkipList=[ "rootPassword" ])
dump = self.dump(conf, example)
self.assertIn("rootPassword: Skipped", dump)
self.assertNotIn("dontSkipMe: Skipped", dump)
if __name__ == "__main__":
unittest.main()
@@ -1,103 +0,0 @@
import glob
import importlib
import os
import sys
import tempfile
import unittest
import six
from meh import ExceptionInfo
from meh.dump import ExceptionDump
class BaseTestCase(unittest.TestCase):
def dump(self, conf, obj):
from inspect import stack as _stack
stack = _stack()[1:]
dump = ExceptionDump(ExceptionInfo(None, None, stack), conf)
return dump.dump(obj)
def openFile(self, mode="w"):
(fd, path) = tempfile.mkstemp()
# only Python 3 has supports the "encoding" keyword argument
if six.PY2:
fo = os.fdopen(fd, mode)
else:
fo = os.fdopen(fd, mode, encoding="utf-8")
return (fo, path)
def tracebackContains(self, path, s):
f = open(path)
while True:
l = f.readline()
if l == "":
f.close()
return False
if l.find(s) != -1:
f.close()
return True
f.close()
return False
def loadModules(moduleDir, cls_pattern="_TestCase", skip_list=None):
'''taken from firstboot/loader.py'''
if not skip_list:
skip_list = ["__init__", "baseclass"]
# Guaruntee that __init__ is skipped
if skip_list.count("__init__") == 0:
skip_list.append("__init__")
tests = list()
# Make sure moduleDir is in the system path so imputil works.
if not moduleDir in sys.path:
sys.path.insert(0, moduleDir)
# Get a list of all *.py files in moduleDir
lst = map(lambda x: os.path.splitext(os.path.basename(x))[0],
glob.glob(moduleDir + "/*.py"))
# Inspect each .py file found
for module in lst:
if module in skip_list:
continue
# Attempt to load the found module.
try:
loaded = importlib.import_module(module)
except ImportError:
print("Error loading module %s." % module)
continue
# Find class names that match the supplied pattern (default: "_TestCase")
beforeCount = len(tests)
for obj in loaded.__dict__.keys():
if obj.endswith(cls_pattern):
tests.append(loaded.__dict__[obj])
afterCount = len(tests)
# Warn if no tests found
if beforeCount == afterCount:
print("Module %s does not contain any test cases; skipping." % module)
continue
return tests
# Run the tests
if __name__ == "__main__":
# Create a test suite
MehTestSuite = unittest.TestSuite()
# Find tests to add
tstList = loadModules(os.path.join(os.environ.get("PWD"), "tests/"))
for tst in tstList:
MehTestSuite.addTest(tst())
# Run tests
unittest.main(defaultTest="MehTestSuite")
@@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
from tests.baseclass import BaseTestCase
from meh import Config, ConfigError
def callback1():
return "This was generated by the callback1"
def callback2():
return "This was generated by the callback2"
def callback3():
raise RuntimeError("Testing callback raising exception")
def callback4():
return "This was generated by the callback4"
def callback5():
return ""
class Callbacks_TestCase(BaseTestCase):
def runTest(self):
conf = Config(programName="CallbacksTest",
programVersion="1.0",
callbackDict={"callback1": (callback1, False),
"callback2": (callback2, False)})
# another way to register callback
conf.register_callback("callback3", callback2)
# callback with given item name already registered
with self.assertRaises(ConfigError):
conf.register_callback("callback3", callback3)
# should not raise exception
conf.register_callback("callback3", callback3, override=True)
conf.register_callback("callback4", callback4, attchmnt_only=True)
conf.register_callback("callback5", callback5, attchmnt_only=False)
# should not raise exception
dump = self.dump(conf, None)
self.assertIn("callback1:\nThis was generated by the callback1\n",
dump)
self.assertIn("callback2:\nThis was generated by the callback2\n",
dump)
self.assertIn("callback3: Caused error", dump)
# should not appear in the dump (attachment only)
self.assertNotIn("callback4", dump)
# should not appear in the dump (nothing provided)
self.assertNotIn("callback5", dump)
@@ -1,41 +0,0 @@
# -*- coding: utf-8 -*-
from tests.baseclass import BaseTestCase
from meh import Config
BINARY_DATA = b"\xff\x61\xfe\xdd"
BINARY_DATA2 = b"\xfe\x61\xff\xdd"
BINARY_DATA3 = b"\xfe\x62\xff\xdd"
class BinaryExample(object):
def __init__(self):
self.bin_data = BINARY_DATA
# crazy, but possible
self.dict = dict()
self.dict[BINARY_DATA2] = BINARY_DATA2
self.list = [BINARY_DATA3]
class HandleBinary_TestCase(BaseTestCase):
def runTest(self):
binary_example = BinaryExample()
conf = Config(programName="UnicodeTest",
programVersion="1.0")
# should not raise exception
dump = self.dump(conf, binary_example)
# should contain the attribute name and hexa representation of binary
# data ('\x61' == 'a' which shouldn't be translated)
self.assertTrue("bin_data: \\xff\\x61\\xfe\\xdd\n" in dump or
"bin_data: b'\\xffa\\xfe\\xdd'\n" in dump)
# should contain the binary-keyed dict
self.assertTrue("dict: {'\\xfe\\x61\\xff\\xdd': \\xfe\\x61\\xff\\xdd" in dump or
"dict: {b'\\xfea\\xff\\xdd': b'\\xfea\\xff\\xdd'" in dump)
# should contain the list with binary item(s)
self.assertTrue("list: [\\xfe\\x62\\xff\\xdd]" in dump or
"list: [b'\\xfeb\\xff\\xdd']" in dump)
@@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
import six
from tests.baseclass import BaseTestCase
from meh import Config
UNICODE_STR = u"řěšččšě"
UNICODE_LINE = u"řčšřščřčš\n"
ASCII_STR = "fsdkljfdsldfs"
ASCII_LINE = "fdsfsdakjfdsa\n"
class UnicodeExample(object):
def __init__(self):
self.ascii_str = ASCII_STR
self.unicode_str = UNICODE_STR
self.encoded_str = self.unicode_str.encode("utf-8")
self.unicode_dict = { u"úú" : u"áá" }
class HandleUnicode_TestCase(BaseTestCase):
def setUp(self):
# write UTF-8 and ASCII files for testing
if six.PY2:
(fobj, self.uni_file_path) = self.openFile()
else:
(fobj, self.uni_file_path) = self.openFile(mode="wt")
try:
fobj.write(UNICODE_LINE)
except UnicodeEncodeError:
fobj.write(UNICODE_LINE.encode("utf-8"))
fobj.close()
(fobj, self.ascii_file_path) = self.openFile()
fobj.write(ASCII_LINE)
fobj.close()
def runTest(self):
unicode_example = UnicodeExample()
conf = Config(programName="UnicodeTest",
programVersion="1.0",
fileList=[self.uni_file_path, self.ascii_file_path])
# should not raise exception
dump = self.dump(conf, unicode_example)
self.assertIn("_str: " + str(UNICODE_STR.encode("utf-8")), dump)
self.assertIn("encoded_str: " + str(UNICODE_STR.encode("utf-8")), dump)
if six.PY2:
self.assertIn(str(UNICODE_LINE.encode("utf-8")), dump)
else:
self.assertIn(UNICODE_LINE, dump)
self.assertIn("ascii_str: " + ASCII_STR, dump)
self.assertIn(ASCII_LINE.rstrip(), dump)
@@ -1,19 +0,0 @@
#!/usr/bin/python3
import sys
from pocketlint import PocketLintConfig, PocketLinter
class MehLintConfig(PocketLintConfig):
@property
def pylintPlugins(self):
retval = super(MehLintConfig, self).pylintPlugins
retval.remove("pocketlint.checkers.eintr")
retval.remove("pocketlint.checkers.markup")
return retval
if __name__ == "__main__":
conf = MehLintConfig()
linter = PocketLinter(conf)
rc = linter.run()
sys.exit(rc)
@@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
from tests.baseclass import BaseTestCase
from meh.safe_string import SafeStr, PY
class TestClass(object):
def __str__(self):
return "string representation of TestClass instance"
class TestClass2():
pass
class SafeStr_TestCase(BaseTestCase):
def setUp(self):
self.safestr = SafeStr()
self.unistr = u"ááááá"
self.enc_unistr = self.unistr.encode("utf-8")
self.asciistr = "aaaa"
self.bindata = b'\xff\xff\xfe'
self.test_object = TestClass()
self.test_object2 = TestClass2()
def runTest(self):
self.safestr += self.asciistr
self.safestr += self.enc_unistr
self.safestr += self.unistr
self.safestr += self.bindata
self.safestr += self.test_object
self.safestr += self.test_object2
self.assertIn(self.asciistr, self.safestr)
if PY == 2:
self.assertIn("OMITTED OBJECT WITHOUT __str__ METHOD", self.safestr)
# should be included twice -- appended enc_unistr and unistr
self.assertIn(str(self.enc_unistr), self.safestr)
else:
self.assertIn("<safe_string_test.TestClass2 object at ", self.safestr)
self.assertIn(str(self.enc_unistr), self.safestr)
self.assertIn(self.unistr, self.safestr)
self.assertIn("\\xff\\xff\\xfe", self.safestr)
self.assertIn(str(self.test_object), self.safestr)
@@ -1,248 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="exceptionWindow">
<property name="can_focus">False</property>
<property name="window_position">center-always</property>
<property name="default_width">600</property>
<property name="type_hint">dialog</property>
<property name="urgency_hint">True</property>
<signal name="delete-event" handler="on_main_window_deleted" swapped="no"/>
<child>
<object class="GtkBox" id="mainBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="margin_left">20</property>
<property name="margin_top">30</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon-size">5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="titleLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">An unknown error has occurred</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.1000000000000001"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="explainLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin_left">40</property>
<property name="margin_right">40</property>
<property name="label" translatable="yes">This program has encountered an unknown error. You may
report the bug below or quit the program.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">21</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_right">20</property>
<property name="spacing">10</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="reportButton">
<property name="label" translatable="yes">_Report Bug</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_report_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="quitButton">
<property name="label" translatable="yes">_Quit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_quit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_bottom">10</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_expander_activated" swapped="no"/>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="commentLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">2</property>
<property name="xalign">0.10000000149011612</property>
<property name="label" translatable="yes">The output below may help determine the cause of the error:</property>
<attributes>
<attribute name="style" value="italic"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="tracebackScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="tracebackView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vscroll_policy">natural</property>
<property name="editable">False</property>
<property name="cursor_visible">False</property>
<property name="buffer">tracebackBuffer</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="bottomBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="warningLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">'Debug' may take you to tty1.</property>
<attributes>
<attribute name="style" value="italic"/>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="debugButton">
<property name="label" translatable="yes">_Debug</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_debug_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="expanderLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">More _info...</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkTextBuffer" id="tracebackBuffer">
<property name="text" translatable="yes">No additional info available.</property>
</object>
</interface>
@@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://zanata.org/namespace/config/">
<url>https://fedora.zanata.org/</url>
<project>python-meh</project>
<project-version>master</project-version>
<project-type>gettext</project-type>
<locales>
<locale>sq</locale>
<locale>ar</locale>
<locale>as</locale>
<locale>ast</locale>
<locale>bal</locale>
<locale>eu</locale>
<locale>bn</locale>
<locale>bn-IN</locale>
<locale>brx</locale>
<locale>bs</locale>
<locale>br</locale>
<locale>bg</locale>
<locale>ca</locale>
<locale>zh-CN</locale>
<locale>zh-HK</locale>
<locale>zh-TW</locale>
<locale>kw</locale>
<locale>kw-GB</locale>
<locale>cs</locale>
<locale>da</locale>
<locale>nl</locale>
<locale>en-GB</locale>
<locale>eo</locale>
<locale>et</locale>
<locale>fi</locale>
<locale>fr</locale>
<locale>gl</locale>
<locale>ka</locale>
<locale>de</locale>
<locale>el</locale>
<locale>gu</locale>
<locale>he</locale>
<locale>hi</locale>
<locale>hu</locale>
<locale>is</locale>
<locale>id</locale>
<locale>ia</locale>
<locale>it</locale>
<locale>ja</locale>
<locale>kn</locale>
<locale>kk</locale>
<locale>km</locale>
<locale>ky</locale>
<locale>ko</locale>
<locale>lt</locale>
<locale>nds</locale>
<locale>mk</locale>
<locale>mai</locale>
<locale>ms</locale>
<locale>ml</locale>
<locale>mr</locale>
<locale>mn</locale>
<locale>ne</locale>
<locale>nb</locale>
<locale>nn</locale>
<locale>or</locale>
<locale>pa</locale>
<locale>fa</locale>
<locale>pl</locale>
<locale>pt</locale>
<locale>pt-BR</locale>
<locale>ro</locale>
<locale>ru</locale>
<locale>sr</locale>
<locale>sr@latin</locale>
<locale>si</locale>
<locale>sk</locale>
<locale>sl</locale>
<locale>es</locale>
<locale>sv</locale>
<locale>tg</locale>
<locale>ta</locale>
<locale>te</locale>
<locale>bo</locale>
<locale>tr</locale>
<locale>uk</locale>
<locale>ur</locale>
<locale>wba</locale>
<locale>cy</locale>
<locale>lv</locale>
<locale>kw@uccor</locale>
<locale>kw@kkcor</locale>
<locale>af</locale>
<locale>am</locale>
<locale>be</locale>
<locale>hr</locale>
<locale>de-CH</locale>
<locale>th</locale>
<locale>vi</locale>
<locale>zu</locale>
<locale>ilo</locale>
<locale>nso</locale>
<locale>tw</locale>
<locale>yo</locale>
<locale>anp</locale>
</locales>
</config>
Loaded 100 of 253 files, more files were not shown because too many files have changed in this diff. Show more