256 Commits
Author SHA1 Message Date
BlackAngelTV 642c3e281e 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
BlackAngelTV 9f7ae8823f Merge pull request 'fix(wallpaper): keep retrying the first-login wallpaper for 20 minutes' (#27) from fix/wallpaper-first-login into Main
Reviewed-on: #27
2026-11-04 08:50:42 +01:00
BlackAngelTV 92d4881420 Merge pull request 'fix(installer): step-by-step wizard, Intel RST/VMD support, bug reports and a bootable EFI partition' (#17) from fix/installer-wizard into Main
Reviewed-on: #17
2026-11-04 08:02:00 +01:00
BlackAngelTV d3ed05ef2b fix(wallpaper): keep retrying the first-login wallpaper for 20 minutes
On real hardware the first Plasma login can be much slower than in a VM
(Wayland startup, slow disk, desktop installed late), so the previous
20-second window could pass with no wallpaper. Every failure was silent,
which made the cause impossible to diagnose after the fact.

The autostart entry now retries for 20 minutes, logs each attempt in
~/.local/state/fws/wallpaper.log, exposes --status, and only writes the
"done" marker after a successful apply so a later user choice is never
overwritten.
2026-11-04 08:02:00 +01:00
nocode e99a6edff1 docs(readme): one plain minimum/recommended table for the install machine 2026-11-03 12:52:35 +01:00
nocode 04a45e5ddb docs(readme): recommended hardware at the top
Readers decided whether FWS fits their machine by digging through the
feature list; the memory, storage, GPU, firmware and network needs are now
the first thing on the page. Storage is based on a real install (about
30 GB on / with KDE, drivers and applications); the Vulkan generations are
those the shipped free drivers and the NVIDIA open modules support.
2026-11-03 12:29:30 +01:00
nocode 95b87ad518 feat(hardware): ship Vulkan in the image as a base graphics driver
The installed system is a copy of the live image, and fws-setup-hardware
only completes the GPU drivers at the end of the installation when the
network is up. A machine installed offline therefore had no Vulkan ICD at
all: the desktop ran on software rendering and nothing from Steam started.

mesa, the loader, the free ICDs of every vendor, lavapipe and vulkaninfo
now travel in the image. The proprietary NVIDIA stack (DKMS) and the 32-bit
libraries (multilib) stay in fws-setup-hardware.
2026-11-03 12:18:49 +01:00
nocode 1bfa432898 fix(installer): create the EFI partition even with "bootloader --disabled"
On a blank UEFI disk the installed system only booted with the USB key
plugged in (HP OMEN MAX 16, see OMEN-demarrage-sans-cle-usb.md): Anaconda
had created /boot and the LVM PV but no EFI system partition.

The kickstart disables Anaconda's bootloader because Arch has no grub2-*
binaries and GRUB is installed by the %post. Anaconda then sets
skip_bootloader, and schedule_partitions() drops the "efi" request of the
automatic partitioning ("skipping unneeded stage1 efi request"). The
anaconda PKGBUILD now patches that condition so the ESP is still created
when no stage1 partition exists yet.

The first-boot log of that machine also showed fws-grub-finalize writing
GRUB to /dev/sda2, the Ventoy key's EFI partition, because it took the
first ESP of the system. The kickstart and fws-grub-finalize now look on
the disk carrying / first, then on internal disks only, and log a
CRITICAL line instead of borrowing a removable device's ESP.
2026-11-03 12:09:09 +01:00
nocode 423dcc66dc chore(merge): bring fix/installer-wizard up to date with Main
Main replaced WinBoat with PacManager 1.6.2 (fetched from the public Gitea,
installed under /opt and shipped in the live image) and added the install
progress steps, the Vulkan-per-GPU fix and the default emoji font. This
branch keeps everything that is specific to it: Intel RST/VMD handling
(fws-intel-rst, --no-nvram in the kickstart and fws-grub-finalize, the ESP
lookup fix), the Broadcom wl driver, fws-bugreport and the step-by-step
wizard.

Where the two sides disagreed on PacManager, Main wins: the vendored 1.4.3
tarball, the FWS launcher and the target-only install block (build.sh and
kickstart) are dropped, since the package now ships in packages.x86_64 and
the LiveOS payload copies it to the target. Launchers call PacManager, the
binary Main's package exposes on PATH.
2026-11-03 12:07:57 +01:00
BlackAngelTV 72a991743d Chore(PacManager): Update to 1.6.2
Update to 1.6.2 for new update system
2026-10-30 20:20:03 +01:00
BlackAngelTV 57df67d454 Merge pull request 'Feat/pacmanager replaces winboat' (#23) from feat/pacmanager-replaces-winboat into Main
Reviewed-on: #23
2026-10-30 11:31:25 +00:00
BlackAngelTV 68a402c9ce chore(Agents): Add new Agents.md 2026-10-30 12:26:57 +01:00
BlackAngelTV 2cd3014ed4 refactor(airootfs): drop WinBoat from the installer and hardware texts
The install summary, the hardware setup header and the About dialog still
announced Windows apps through WinBoat. They now name PacManager, which is the
package the image actually ships.
2026-10-30 10:06:42 +01:00
BlackAngelTV 5f33b401fa docs: describe PacManager in place of WinBoat
The quick start, changelog, attribution notice, license inventory and trademark
page all still advertised WinBoat. PacManager is first-party FWS software under a
restrictive source-available license, so it is documented outside the
third-party tables, and the install path is described because that directory is
what makes its automatic updates possible.
2026-10-30 10:06:42 +01:00
BlackAngelTV 09a26108f8 refactor(packages): replace winboat-bin with fws-pacmanage
WinBoat went unused, so both ISO profiles now list PacManager instead.
fws-pacmanage is built locally like the other FWS packages, so it joins the
local build order in setup-aur.sh rather than the AUR package list.
2026-10-30 10:06:42 +01:00
BlackAngelTV 9c933291a7 feat(pkgbuilds): package PacManager 1.6.0 for the FWS image
PacManager ships only sources from its Gitea releases, so the image needs a
recipe to carry the compiled app. It is installed under a dedicated
/opt/fws-pacmanage prefix because its self-update rewrites the directory of the
running binary: a bare bin/ install would drop a `version` marker and a
`plugins/` folder straight into /usr/bin. The upstream CMakeLists also declares
its plugin install rules above the FWS_BUILD_*_PLUGIN options, so the Flatpak
and AUR providers are installed by hand into that same directory.
2026-10-30 10:06:42 +01:00
BlackAngelTV 8afaa29661 fix(fastfetch): keep the standard information beside the logo
A config file replaces fastfetch's default module structure, so the FWS logo
was printed alone: no OS, kernel, CPU or disk lines at all. List the default
modules explicitly so the output looks like a normal fastfetch call, with the
FWS logo on the left and the machine's real information on the right; OS: comes
from /etc/os-release and therefore reads "FWS Linux", not "Arch Linux".
2026-10-29 21:42:46 +01:00
BlackAngelTV fb1646d2bf Merge pull request 'fix(build): install the pyanaconda overlays after pacstrap' (#22) from fix/anaconda-overlay into Main
Reviewed-on: #22
2026-10-29 20:22:52 +00:00
BlackAngelTV 9e935ee4cf fix(build): install the pyanaconda overlays after pacstrap
mkarchiso copies the profile airootfs before it installs packages, so shipping
files that replace files owned by the anaconda package aborted the build with
"exists in filesystem" and unpacstrapped root. Keep the two overlays in a
staging directory outside the package paths and copy them from
customize_airootfs.sh, which runs after pacstrap; fail the build loudly if they
do not land, and drop the staging copy so it never reaches the ISO.
2026-10-29 21:19:18 +01:00
BlackAngelTV 0cb2080d83 Merge pull request 'feat(installer): show each install phase on the progress screen' (#21) from feat/installer-progress into Main
Reviewed-on: #21
2026-10-29 20:13:22 +00:00
BlackAngelTV c46331b1e6 feat(installer): show each install phase on the progress screen
The progress screen sat on "Running post-installation scripts" for the whole
%post with a bar that never moved, so a slow desktop install looked like a
hang. The kickstart phases now publish what they are doing through
fws-install-step, the scripts task turns those percentages into one step per
phase with a message naming the running script, and the boss reserves the same
number of steps so the bar actually follows them. A title is taken from each
script's "# FWS-TITLE:" line, and progress stays cosmetic: a missing file or a
D-Bus failure falls back to the previous single step.
2026-10-29 21:09:47 +01:00
BlackAngelTV 37542ff4b7 Merge pull request 'feat(fastfetch): show the FWS logo whatever launches fastfetch' (#20) from feat/fastfetch-logo into Main
Reviewed-on: #20
2026-10-29 19:45:37 +00:00
BlackAngelTV 2f3c33062b feat(fastfetch): show the FWS logo whatever launches fastfetch
The FWS logo only came from the flags passed by the login-shell hook, so
running fastfetch from a desktop terminal, a TTY or any non-login shell fell
back to the Arch logo. Move the logo (and its colours) into a system-wide
config that fastfetch reads for every account, live or installed, and keep the
hook down to a plain call. The module list is left to fastfetch defaults so it
does not rot with upstream versions; a user's own config still wins.
2026-10-29 20:42:04 +01:00
BlackAngelTV 80a637225c Merge pull request 'feat(fonts): ship a configured default emoji font' (#19) from feat/default-emoji-font into Main
Reviewed-on: #19
2026-10-29 19:37:52 +00:00
BlackAngelTV 784d21c915 feat(fonts): ship a configured default emoji font
Emoji showed up as empty boxes almost everywhere: no emoji font was installed
by default, and nothing told fontconfig which family to use for them, so
GTK/Qt/Electron apps and the installer fell back to whatever the system had.
Install Noto Color Emoji on the live image, with the desktop transaction and in
the hardware base, and add a fontconfig rule that resolves the "emoji" family,
appends it as a last resort for generic families without displacing the primary
font, and keeps bitmap emoji enabled when a no-bitmap rule is active. The
desktop font stacks (waybar, wofi, polybar) list it explicitly, and the
fontconfig cache is refreshed after installation.
2026-10-29 20:02:55 +01:00
BlackAngelTV 0754cb8086 fix(hardware): install Vulkan for every detected GPU
Hybrid laptops expose two GPUs, but the driver detection kept only the first
matching vendor, so the second GPU got no Vulkan ICD at all; the Vulkan loader
was never installed explicitly and 32-bit games (Steam/Proton) had no ICD on
any machine. NVIDIA also had no VA-API driver, leaving video decode on the CPU.
Detect each vendor independently, add the loader, vulkaninfo and the 32-bit
ICDs, ship libva-nvidia-driver, and log the ICDs actually present so a missing
Vulkan driver is diagnosable from the install log.
2026-10-29 19:25:04 +01:00
BlackAngelTV 48e17ac6e6 Merge pull request 'feat(installer): ship a default FWS wallpaper for fresh installs' (#18) from feat/default-wallpaper into Main
Reviewed-on: #18
2026-10-29 18:09:24 +00:00
BlackAngelTV 28bb660457 feat(installer): ship a default FWS wallpaper for fresh installs
New installs landed on a bare background (especially Hyprland and i3, which
declared no wallpaper at all), so the desktop did not look like FWS on first
boot. The image is bundled in the ISO instead of downloaded: it works without
network during the first boot, renders identically everywhere and needs no
hosting. A per-user marker stops the script once the wallpaper is set, so the
choice made afterwards by the user is never overwritten.
2026-10-29 19:07:14 +01:00
nocode 674179bfab docs(security): security rules for AI agents and contributors
Twelve sections covering agent behaviour, prompt injection, secrets, input
validation, authentication, supply chain, CI, data and logs, infrastructure,
checklists, automated checks and vulnerability reporting. Each rule is meant to
be checkable by a test, a grep or a CI job.

Two of them are already project practice, now written down: only human authors
in commits, and agent rule files treated as an attack surface since they steer
every later generation.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-25 20:38:18 +02:00
nocode 9529a653be fix(bugreport): collect the install log from the live, and the crash traceback
A report sent from the live medium carried the system summary and the journal,
and nothing else. That is exactly what came back from a real installer crash on
RST hardware, and it was not enough to diagnose anything.

Two gaps, both of which made an installer failure unreportable.

The install log was only looked for at /var/log/fws-post.log, which exists on
the installed system. During an installation it is the %post --nochroot that
copies it into the live's /tmp, because the target disk is unmounted by the time
anyone needs to read it. Both paths are searched now. This is the log that says
whether the disk will boot.

/tmp/anaconda-tb-* was never collected at all. When the installer crashes, the
dialog shows only the dasbus wrapper frames and the real exception lives in that
file alone. The live runs in tmpfs, so it dies with the next reboot: without it
in the report, a crash cannot be looked at afterwards by anyone.

Verified on four situations: installed system, live without a crash, live with
one, and neither file present, which adds no empty section.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-25 20:38:18 +02:00
nocode 90167c54b6 fix(boot): never write NVRAM on Intel RST machines
Seen on real RST hardware: the installed system boots once, then never again,
the firmware no longer finding a bootable disk.

What is established. In the installer's chroot efivars is not reachable, so
nothing is written to NVRAM and the firmware boots EFI/BOOT/BOOTX64.EFI, which
it finds by scanning the ESP. That first boot works. Then fws-grub-finalize runs
grub-install again, and this time efivars answers: it creates a "FWS" entry and
puts it first in the boot order. That is the only thing this chain changes at
firmware level between the two boots, and firmware level is where the second
one fails.

What is assumed, not verified for lack of a VMD machine: why that entry is
unusable. Under VMD, Linux sees the NVMe in a synthetic PCI domain (10000:...)
that the vmd module creates and the firmware knows nothing about, so a device
path computed from that view resolves to nothing. "efibootmgr -v" on an
affected machine would settle it.

On any machine with an Intel VMD controller, FWS now relies solely on the
--removable path, which the first boot proves works. Detection goes through
fws-intel-rst (exit codes 10/11/12), the project's single VMD logic. Machines
without VMD are untouched and keep their NVRAM entry.

There were three NVRAM writers, and all three are gated:

- the kickstart %post, where the write fails anyway today but would break even
  the first boot in an environment that exposed efivars to the chroot;
- fws-grub-finalize, both grub-install and the efibootmgr -c fallback;
- fws-recovery, which was the worst of them. It goes through arch-chroot, and
  unlike Anaconda's chroot, arch-chroot mounts efivars, so the write succeeded
  there, from the ISO as well as from the installed system. A user whose RST
  machine would not boot would run "Réparer FWS", and the repair would recreate
  exactly the entry that stops it from booting.

Also in fws-grub-finalize: two lsblk calls took the disk from "lsblk -s", which
draws a tree, and got "└─/dev/nvme0n1" (checked on a real NVMe). The efibootmgr
fallback therefore always received a garbage device and never created its
entry, and the ESP search could fall back to the first ESP on the system,
Windows' on a dual-boot. The kickstart had already fixed this very trap in its
BIOS branch; the UEFI branch here had been missed. Fixing it alone would have
re-armed the efibootmgr writer on VMD, which is why it lands together with the
gate.

Tested by replacing the system tools with recording stubs: fws-grub-finalize
and fws-recovery each over five cases (no VMD, VMD in its three states, engine
missing), plus the engine's six detection cases. In every case the --removable
path is still installed, since on these machines it becomes the only way in.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-22 15:56:06 +02:00
nocode 3b0bd2ccda docs(installer): say why "bootloader --disabled" is not enough
The comment above it claimed that flag disables Anaconda's native bootloader
step. It does not, and believing it cost whole installations.

create_bls_entries runs "grub2-mkconfig -o /etc/grub2.cfg" in the target on
every live install and raises BootloaderInstallationError on a non-zero exit
(pyanaconda/modules/storage/bootloader/utils.py). Arch ships grub-mkconfig, not
grub2-mkconfig, so the command does not exist and the install dies at
"Installing boot loader" behind a D-Bus traceback that never names the cause.

Verified against the anaconda 45.8 package in local-repo, not taken on trust.
The comment now points at the /usr/bin/grub2-mkconfig shim that handles it.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-22 14:20:26 +02:00
nocode 86fe32787f build(anaconda): disable LTO, GCC 16 crashes linking the widgets
lto1 segfaults (internal compiler error) on libAnacondaWidgets. Both
packages compile widgets/, so both need it.
2026-09-22 14:03:06 +02:00
nocode c9c2d7d6bc fix(build): refresh the keyring and never partial-upgrade the build host
An idle WSL had a stale keyring ("unknown trust" on every package), and
"pacman -Sy <pkg>" broke on the gcc-libs split into libgcc and libstdc++.
2026-09-22 14:03:06 +02:00
nocode 9d5b79d130 fix(installer): stop Anaconda's grub2-mkconfig from aborting the install
Even with "bootloader --disabled", Anaconda runs "grub2-mkconfig -o
/etc/grub2.cfg" in the target for live installs and aborts on failure. On
an Intel RST laptop (Omen 16 Max) this crashed the install at "Installing
boot loader", before the %post that actually configures GRUB could run.
FWS never reads that file, so the shim now skips that single call.

The crash dialog only shows dasbus wrapper frames, so the FWS debug report
now also includes the tail of /tmp/anaconda-tb-*.
2026-09-22 14:03:06 +02:00
nocode cb7ec1c505 chore(iso): btop instead of htop, drop xterm from the releng list
Recorded as edited, with two facts that decide whether it ever takes effect.

This file is not the one that ships. build.sh copies configs/releng/* and then
overlays configs/baseline/* on top, and packages.x86_64 exists in both, so
baseline's copy replaces this one wholesale. baseline still lists htop and
xterm, so nothing in the built image changes until the same edit is made there.
The profiledef.sh header already carries this warning for permissions; it holds
for the package list too.

Dropping xterm should not be mirrored to baseline as it stands. It is the only
terminal in either list, no kitty, konsole, alacritty, foot or gnome-terminal
anywhere, and fws-recovery-gui calls it unguarded for its "terminal dans le
système (chroot)" button, the last-resort tool on a machine that no longer
boots. Without xterm that button raises and does nothing visible. fws-recovery
itself guards on command -v and degrades quietly, and fws-drivers keeps a
terminal fallback that would have nothing left to fall back to.

btop is fine either way, it just needs the same line in baseline to appear.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 11:23:27 +02:00
nocode 721a0c7d6d docs(release): pre-release note for the 0.8.1 test build
Written for testers rather than for the changelog. It says what changed for
someone using the machine, then asks for seven specific things in the order
they are useful to us, and names what is not verified instead of hoping nobody
asks.

Two items are honest gaps: the Intel RST module load was never exercised on a
machine actually set to RST, and PacManager could not be compiled on the
development machine for want of Qt6. Both are called out in the test list and
again under known limits. A tester finding out on their own that something was
untested is a tester who stops reporting.

It also asks the question that a changelog never does: at what point did you
feel lost. A screen whose purpose is unclear is a bug in a distribution whose
whole claim is that Linux is not complicated, and it will not show up in any
log.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 11:09:13 +02:00
nocode 6ff147ad6e docs: bring README and environnement.md up to 0.8.1
Six things shipped without ever reaching the README: PacManager, the "Pilotes
et matériel" window and its engine, Intel RST support, the Broadcom Wi-Fi
driver, and gparted in the live image. None of them appeared anywhere in it.

README gains them where a reader looks for them rather than in a changelog
paragraph: supported disks and the live disk tooling under Aperçu, the
conditional Intel RST screen and the Broadcom driver in the install section,
four commands in the installed-tooling table, and what setup-aur.sh and
build.sh actually do now. Four troubleshooting rows cover the failures a tester
will actually hit: no disk listed, no Wi-Fi after install on a Broadcom card,
a clone failing because the AUR is unreachable, and an installed system that
cannot find its root.

environnement.md gains what a build machine needs to know. The container path
from Fedora is named as a working reference next to native Arch, since that is
what the development machine runs. The network section now lists the three
hosts involved, which of them is fatal when unreachable, and the simultaneous
TCP timeout already observed on two mirrors and the AUR while DNS still
resolved. Two design points are recorded so they are not simplified away later:
--network=host, without which the AUR and the mirrors are unreachable from
inside the container while the host is perfectly online, and the reason
broadcom-wl-dkms is built but never installed in the build environment.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 11:09:08 +02:00
nocode 63eb4b395b docs(legal): name the authors instead of "FWS contributors"
AUTHORS.rst lists the two people behind the FWS-specific work rather than a
single collective address. COPYRIGHT.md and TRADEMARKS.md follow, the copyright
holder being designated by an author rather than by an anonymous contributor
pool.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 10:47:37 +02:00
nocode 526a330e02 fix(build): fall back to local-repo when the AUR cannot be reached
A run died cloning libxmlrpc, a package that was already built and sitting in
local-repo, along with the seven others. Ten minutes of keyring refresh, system
upgrade and 600 MB of build tools, thrown away on the first package, for a
clone whose only purpose was to read a version number.

That is why the clone happens at all: build_or_skip compares the PKGBUILD's
version against local-repo to decide between building and skipping, and the
PKGBUILD only exists once cloned. With no network there was no path left, even
though the answer was already on disk.

Three changes.

Each clone now gets a second attempt after five seconds. A network that
stumbles for a second should not cost a whole preparation phase.

When both attempts fail, the package already built in local-repo is reused and
the warning names the file that was picked. Offline there is no way to know
whether a newer version exists upstream, so the one on hand is taken. The
script only gives up when the package is genuinely absent, and it then says
which host to check.

A flag stops the bleeding after the first total failure: the remaining packages
go straight to the fallback rather than waiting through two TCP timeouts each,
which on eight packages is minutes of waiting for an answer already known.

Two name-matching traps are covered by the new helpers. A version-agnostic
lookup on "$pkg"-* would match "$pkg"-debug-* and install the debug package
instead, so the glob requires a digit after the dash, which every pacman
version starts with and no name suffix does. The same glob keeps a name from
catching a longer one that has it as a prefix. Neither helper has a test yet.

On the incident itself, only what the log shows: the mirrors gave up after 10 s
and the AUR after 21 s, so the run met connection timeouts rather than
refusals, and DNS had resolved. The container runs with --network=host, so
podman's bridge was not in the path. Why the packets went nowhere was not
measured. Transient, and now survivable.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 10:09:41 +02:00
nocode b0cc435ab5 feat(pacmanage): PacManager 1.4.3, screens split out and a plugin shop
Replaces the vendored 1.4.1 tarball. Upstream restructured: a logic layer of
background workers, a plugin shop and a controller, with one file per screen
under pages/ on top of it. New screens for dashboard, browse, cleanup, history,
logs and plugins, plus a doc/ directory.

Nothing new to install alongside. The CMake options, the Qt components and the
install rules are unchanged, and the plugin shop's catalog.json is fetched from
the Gitea repository at runtime rather than shipped. The plugin loop already
picks up both providers. doc/ is installed next to the README since it covers
installation, the interface, the plugin shop and troubleshooting, which is what
someone reaches for when a package source reports itself unavailable.

A prepare() now realigns the source's version file on pkgver. Upstream's file
lags the release: it read 1.4.1 in both the 1.4.2 and the 1.4.3 delivery. CMake
compiles that value into the binary and UpdateManager compares it to the Gitea
releases, so leaving it stale would have offered an already installed release
for ever, and pacman would have disagreed with the app's own about box. The
tarball stays a faithful copy of what upstream delivered and the correction
sits in one visible place. It should be fixed in FWS-PacManage so this can go.

Both plugin sources compile. The full build needs Qt6, absent here.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 09:33:07 +02:00
nocode 629a94cd6c feat(iso): ship gparted in the live image
The live medium had parted, gptfdisk and fatresize but nothing graphical. A
disk that will not take an automatic partitioning is the one case where
someone needs to look at the table before deciding, and telling a newcomer to
do that in parted is telling them to give up. Wiping a drive and recreating a
clean GPT is also the state an installer works best from.

Also here: __pycache__/ is ignored. Running fws-drivers from its directory
leaves bytecode next to it inside airootfs, and airootfs is copied wholesale
into the image, so it would otherwise be both committed and shipped.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 09:33:07 +02:00
nocode 2eb17bf598 feat(hardware): install what the machine needs, offer the rest on a click
The installer used to put in every detected group, comfort included. Codecs,
Steam, Wine, Proton, MangoHud and the VR stack are several gigabytes, and they
were downloaded during an unattended %post by people who had never asked for
them. On a slow connection that is the difference between an install that ends
and one that seems stuck.

A new --unattended mode draws the line. It is the installer's mode: it runs
with nobody in front of the screen, so it installs only what the machine does
not work without, which is drivers, sound, Wi-Fi, Bluetooth, brightness,
printing, containers and VM guest tools. The three on-demand groups, codecs,
gaming and vr, stay out of it.

They are not dropped, they are offered. "Pilotes et matériel" opens at first
boot and its simple install calls --all, which takes them. Same detection, same
script, same groups: the mode decides, so there is no second list to keep in
sync. The window's own wording now says plainly that this means several
gigabytes and a while depending on the connection.

The hardware-done marker follows the same rule. It is no longer written when
on-demand groups are still pending, because that marker is exactly what stops
the window from opening. Writing it would have installed the essentials and
then silently swallowed the offer.

Printing is now detected rather than assumed. It used to be enabled on any
machine with a desktop, which put several hundred megabytes of foomatic and
gutenprint on every laptop that has no printer. Three real signals are read
instead: a USB interface of class 07, a parallel port, or an existing CUPS
queue. A printer plugged in later is not lost, since the group stays offered
unticked in the advanced install, which can be reopened at any time. Note that
the parallel port is read from /sys/class/parport and not /dev/lp*: devtmpfs
creates lp0 through lp3 unconditionally, so the old path would have claimed a
printer on absolutely every machine.

Two checks were added where a success was being reported that did not exist.

pacman can exit 0 while a DKMS module was never built: the dkms hook runs after
unpacking, and a compile failure does not necessarily invalidate the
transaction. That is precisely the "NVIDIA driver installed but missing"
scenario, where nvidia-utils is present and the kernel module is not. dkms
status is now read and each unbuilt module is named.

A loaded module proves nothing about rendering either. The Vulkan loader still
has to find an ICD and manage to open it, and llvmpipe alone means software
rendering: it works, on the CPU, with a desktop that crawls and no playable
game and not one error message anywhere. That case is now called out. The test
is skipped rather than failed when it cannot conclude, which is when no module
is loaded or /dev/dri is absent, as in the installer chroot. OpenGL is only
reported on success, glxinfo requiring an open display it does not have under
pkexec or in a %post.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 09:33:07 +02:00
nocode 441f6681c4 feat(hardware): Wi-Fi on Broadcom laptops, driver carried in the image
linux-firmware covers Intel, Atheros, Realtek and the Broadcom FullMAC parts.
What it does not cover is Broadcom SoftMAC, BCM4311 through BCM4360, which only
the proprietary wl driver drives: neither b43 nor brcmsmac handles them. Those
laptops finished the install with no Wi-Fi at all, and therefore no way to
download the missing driver. The failure feeds itself.

Detection is factual rather than a PCI ID table. Such tables age badly, and
Broadcom reuses IDs across its SoftMAC and FullMAC families. The reliable
signal is that a Broadcom controller is present and the kernel produced no
wireless interface at all. The live medium runs the same kernel on the same
hardware as the target, so what is observed here holds for the installed
system.

broadcom-wl-dkms comes from the AUR, so no repository will serve it on the
target machine. build.sh drops it into the image the way it already does for
PacManager, and fws-setup-hardware installs it with pacman -U only when it sees
a mute Broadcom, then deletes the file.

It is deliberately absent from packages.x86_64. The package blacklists b43,
bcma, ssb and brcmsmac system-wide, so installing it on a machine that does
not need it would cut the Wi-Fi of the machines those very modules make work.

setup-aur.sh gains a no-install list for the same reason. build_or_skip
normally installs each package so AUR to AUR dependency chains resolve, but
this one has no dependents here and installing it would be actively harmful:
it compiles a DKMS module against the build environment's kernel, which is
pointless since the module is rebuilt on the target and fatal under set -e on
an image without linux-headers, and it drops the blacklist. On a native Arch
or WSL run that means the build machine's own Wi-Fi goes down. It is built,
published, and left alone.

The verification pass now reports on Wi-Fi: interface present, radio
unblocked, or a controller with no interface at all, which is named so the
user knows what is missing rather than assuming the card is dead.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-18 09:33:01 +02:00
nocode 273a554a30 docs(release): changelog for Intel RST and PacManager 1.4.1
Three entries added to the 0.8.1 section, which is not tagged yet: Intel RST
support and the installer screen under Added, the PacManager version bump
under Changed. 288 bullets before, 291 after.

The section date moves from 11 to 14 September, its content having grown since.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-14 10:58:00 +02:00
nocode c35ab3a610 feat(pacmanage): PacManager 1.4.1, with the AUR source
Vendored tarball replaced, 1.2.1 dropped. Upstream gains a third package
source, the AUR, plus an operation history, a readable log and an update check
against the Gitea repository.

Plugins are now collected instead of listed. CMake's POST_BUILD rule drops
every MODULE library it builds into build/plugins/, and PluginManager simply
scans *.so there, so a fixed path meant editing this PKGBUILD for each new
upstream provider. The AUR one arriving in 1.4 was exactly that.

The version file is installed next to the binary. UpdateManager::currentVersion
reads it and keeps the higher of that value and the one compiled in; upstream
installs it too. Leaving it out is harmless while the two agree, but they would
drift at the next bump.

pkgver follows the source's own version file, not the name of the delivery
folder, which said 1.4.2. CMake compiles that value into the binary and
UpdateManager compares it to the Gitea releases: a pkgver above the version
file would offer an already installed release for ever.

Qt6 Network is now required alongside Widgets; qt6-base covers both, so
depends is unchanged. yay and paru join optdepends since AurManager looks for
one of them and reports the source unavailable otherwise. FWS ships neither
yet, so that source will show as unavailable until one is added.

The FWS desktop entry is kept over the one upstream now generates. Upstream's
points at ${prefix}/bin/PacManager, a path this package does not have because
it keeps the binary in /usr/lib/fws-pacmanage/ next to its plugins, and its
icon is a 24px interface glyph with a hardcoded light stroke, invisible in a
menu on a light theme.

Both plugin sources compile; the full build needs Qt6, absent here.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-14 10:57:59 +02:00
nocode 042d6b6df6 feat(installer): install on disks hidden behind Intel RST
On most recent laptops the BIOS ships set to "RST" (also called "Optane" or
"RAID") rather than AHCI: the NVMe drive is no longer on the PCIe bus
directly, it sits behind an Intel VMD controller which creates its own PCI
domain. FWS could not install on those machines.

The advice found everywhere -- switch the BIOS to AHCI -- is both unnecessary
and often impossible. Unnecessary because the kernel has read those drives
through the vmd module since 4.5, and it is in Arch's kernel. Impossible
because plenty of BIOSes expose no such toggle at all, and because on a
dual-boot machine the change stops Windows from booting. FWS therefore never
asks for it first; it is the last resort, and the Windows consequence is
spelled out when it comes to that.

Where this really bit was the reboot, not the install. The live medium sees
the drive because its kernel loads vmd, the install runs to completion, and
then the installed machine does not come up: the initramfs has no vmd, so the
root device cannot be found before it is mounted. A silent failure, invisible
during the install itself.

fws-intel-rst holds all the logic, the way fws-setup-hardware holds the driver
logic, so there is only one detection to keep correct. It reads sysfs rather
than lspci: always present, works inside the %post chroot, and it is the only
source that gives the PCI domain, which is what proves an NVMe really is
behind the VMD rather than plugged in directly. Controllers are matched on
class plus vendor, not on device IDs, which change every generation.

The %pre loads the module before anything else, and that is the step that
makes the whole thing automatic. run_pre_scripts() is called by
/usr/bin/anaconda before the kickstart is even parsed, so before the disk
inventory and long before the UI. Without it the lsblk just below found no
drive, the target fell back to its /dev/sda default, a disk that does not
exist on these machines, and clearpart aimed at nothing, leaving no safe
default. The --ensure mode returns immediately on a machine with no VMD: no
PCI rescan, no waiting, since this sits on the startup path of every install.

The %post writes vmd and nvme into the target's MODULES before mkinitcpio
runs, and adds the mdadm_udev hook for firmware RAID volumes. Both modules are
declared explicitly instead of being left to autodetect, which works from the
modules loaded at image build time: missing vmd there shows up only at reboot,
on a machine that no longer starts.

The new installer screen, fws_rst.py, is the fallback for when even that
failed. It never shows on an ordinary machine: completed returns True as soon
as the engine says there is nothing to do, and _instantiateAction destroys any
completed standalone without displaying it. Machines with no VMD controller,
or with a working one, see nothing, so there is no extra box to understand for
the majority that needs none. When it does show, it explains the situation in
plain French with one button, and no VMD, initramfs or modprobe in any visible
string. Continue stays enabled and Précédent leads back to the network screen,
so the chain back to the keyboard choice stays whole; the wizard now resolves
that chain to the last standalone actually on the stack instead of a fixed
name.

Verified on synthetic sysfs trees, 27 cases: the four hardware states, both
false-positive guards (an Intel audio controller and a non-Intel RAID
controller), initramfs rewriting including idempotence, and the display
decision with Anaconda stubbed out. A missing engine or an unexpected exit
code shows nothing rather than worrying the user. The modprobe and PCI rescan
themselves are untested, there being no VMD controller on this machine.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-14 10:57:47 +02:00
nocode 75ae6d4885 docs(release): split the changelog into 0.7.0 and 0.8.1
0.7.0 is the installer release: the step-by-step wizard, its next/back
navigation, the keyboard applied immediately, the default desktop, the bug
reporting tool and every fix that stopped installations from completing
(ESP/GRUB, DNS, live services). Merged into the existing 0.7.0 section rather
than duplicated, so there is a single entry for that version.

0.8.1 is the hardware release: the driver script defects, the missing sound,
the graphical setup window, PacManager and podman.

VERSION was already at 0.8.1 but os-release still said 0.7.0 -- and os-release
is the one everything reads at runtime: the installer header, "À propos", the
bug report. Aligned, along with the .xinitrc fallback and the header examples
in the documentation.

The release notes move to changelog/ and still describe 0.7.0, which is now
accurate again after the split.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-11 14:18:53 +02:00
nocode e229dbc9e2 docs(brand): FWS opens its arms to everyone, not "replace Windows"
The project no longer presents itself as a Windows replacement. FWS is a Linux
distribution that opens its arms to everyone: it refutes the idea that Linux is
complicated by making it simple from the very first boot, without taking
anything away from it -- there is a full Arch underneath and everything remains
possible on it. Running Windows applications is still a feature; it is no
longer the purpose.

Rewritten in the README opening, the "À propos" tagline, and the rationale
comments that justified choices by "FWS replaces Windows".

Technical mentions of Windows are deliberately kept: winboat and Wine,
dual-boot and os-prober, building the ISO from Windows through WSL, and the
"Windows-like step by step" phrase describing the installer -- that comparison
is still accurate, and it actually serves the new claim: the familiar is not
Windows' private property. TRADEMARKS.md is legal text and stays untouched.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-11 14:18:41 +02:00
nocode af98fe88c6 feat(hardware): graphical driver setup, opened at first boot
New "Pilotes et matériel" window (fws-drivers) with the two paths asked for:
a simple install that puts in whatever the machine needs and then checks and
repairs display, sound, Bluetooth, network and printing, and an advanced one
that lists the groups as checkboxes, pre-ticked from what was detected. Plus a
"check and repair only" entry that installs nothing.

It decides nothing by itself: detection and installation stay in
fws-setup-hardware, which it calls, so there is no second hardware logic to
keep in sync with the kickstart.

No terminal. A computer novice described the previous flow as scary, and she
was right -- a black screen scrolling hundreds of pacman lines with nothing
saying things were going well. Privileges now go through pkexec and a polkit
policy (the mechanism fws-recovery already used, with the authentication agent
already autostarted in the i3 and Hyprland sessions), and progress is shown in
the window itself: a spinner, a plain-French step, a line telling the user
there is nothing to do, and the raw output folded away behind "Afficher les
détails" for whoever wants it or needs to paste it into a bug report.

It opens on its own at first boot, but only when it is needed: the engine
writes /var/lib/fws/hardware-done when pacman succeeded, and --autostart
withdraws silently if that marker is there. An install that had network stays
quiet; one without -- much the more common case -- gets the window to finish
the job. A "ne plus me le proposer" box stops it for good.

Also here: Super+P opens the package manager on i3 and Hyprland, declared with
its description on Hyprland so it shows up in the fws-keys panel, and
profiledef.sh gains the executable bit for fws-drivers.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-11 14:18:30 +02:00
nocode 9782ae2227 fix(hardware): install real GPU drivers and make audio work
No NVIDIA kernel module was ever installed. "nvidia" and "nvidia-dkms" no
longer exist in the Arch repositories -- only the open modules remain
(nvidia-open, nvidia-open-dkms). The script asked for nvidia-dkms, its own
validity filter dropped it in silence, and all that got installed was
nvidia-utils: the userspace libraries with no kernel module at all. X fell back
to nouveau, which makes a recent card unusable. The generation is now derived
from the PCI id -- Turing starts at 0x1E00 while Pascal and Volta top out in
0x1Dxx -- so open modules go to Turing through the RTX 50xx Blackwell cards and
xf86-video-nouveau to anything older.

Three more defects in the same place:

- Only one vendor was served. Detection was a "case", which stops at the first
  matching pattern, so on a hybrid laptop the integrated GPU got no driver at
  all. Each vendor is now tested independently.
- No 32-bit drivers, although Steam and Proton games depend on them.
- libva-mesa-driver and mesa-vdpau were merged into mesa: asking for them by
  their old names configured no hardware video decoding whatsoever.

And there was no sound on i3, nor on any bare window manager. The PipeWire
packages were installed but nothing ever started the server: GNOME and KDE
bring up the audio session themselves, i3, Hyprland and XFCE have no session
manager that does. The user units are now enabled with "systemctl --global", so
for existing and future accounts alike, and alsa-firmware/alsa-plugins are
installed -- some codecs stay mute without them.

The script also becomes an engine the graphical front-end can drive (--plan,
--groups, --check) so there is only one hardware logic in the project, adds a
printing group, verifies and repairs services after installing (Bluetooth
rfkill and controller, NetworkManager, cups), and NAMES packages missing from
the repositories instead of discarding them without a word -- that silence is
what hid nvidia-dkms going away.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-11 14:18:14 +02:00
nocode 213ff2d47d feat(installer): install PacManager on the target system only
PacManager (FWS-PacManage 1.2.1) is packaged like fws-dnd: a local PKGBUILD
with the sources vendored in the repository, because the upstream Gitea is
private and makepkg cannot fetch from it during the build.

It is deliberately absent from packages.x86_64. On a live system one is about
to replace, a package manager serves no purpose, and it would drag qt6-base
into the squashfs for nothing. build.sh drops the built package into the image
instead, and the kickstart %post installs it into the target, then deletes the
file. Two conditions there: only when a desktop was chosen (it is a GUI
application, nothing could launch it on a command-line install), and never
blocking -- "pacman -U" resolves qt6-base over the network, and no PacManager
is not a failed installation.

The binary goes to /usr/lib/fws-pacmanage rather than /usr/bin: PluginManager
looks for its plugins in applicationDirPath()/plugins, so /usr/bin would mean a
/usr/bin/plugins directory polluting a PATH entry. Binary and plugins stay
together in a private directory and /usr/bin/fws-pacmanage is a symlink -- Qt
resolves /proc/self/exe, so the plugins are still found. Upstream ships no
.desktop file, so one is provided here.

build.sh also gains a guard: it now checks, before any lengthy step, that every
package only local-repo can provide is actually built. Until now a missing one
surfaced as a bare "target not found" from pacman, after the mirror refresh,
the full upgrade and the whole mkarchiso setup -- several minutes for an error
detectable in one second.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 16:06:15 +02:00
nocode c7607b3f37 feat(iso): ship podman in the image
podman was never in packages.x86_64: only fws-setup-hardware installed it,
after the fact, so it was there only when the network held during
installation. It is not pulled in as a dependency either -- winboat-bin's
.PKGINFO declares "optdepend = podman-compose", nothing more -- so a machine
installed offline ended up with no container runtime and no way to run the
Windows applications winboat-bin exists for.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 16:06:02 +02:00
nocode 1daf35698d feat(branding): FWS Linux in the GRUB menu, and generate the fr_CH locale
The ISO boot menu still announced "Arch Linux"; the entry is renamed and its id
becomes fwslinux, with a slightly longer timeout on the main menu.

locale.gen also gains fr_CH.UTF-8. It is ADDED next to en_US.UTF-8, not
substituted for it: Anaconda's DBus modules call
setlocale(LC_ALL, "en_US.UTF-8") on startup, so dropping that locale makes the
Boss module exit with status 1 and the installer never comes up -- which the
comment at the top of the file already documented.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 14:42:53 +02:00
nocode 3880942932 Merge branch 'feat/bugreport' into fix/installer-wizard
Conflict resolution, file by file:

- interactive-defaults.ks: their %pre partitioning wins. It targets the largest
  NON-REMOVABLE disk instead of "clearpart --all" (which wiped every disk,
  including the user's Windows) and picks the disk label from the firmware
  (UEFI -> gpt, BIOS -> msdos) instead of forcing MBR everywhere. That
  supersedes my "let blivet decide" change. My GRUB fixes merged cleanly on top
  and are still needed: their branch still carried the broken ESP detection
  (awk on PARTTYPENAME, where "EFI System" contains a space and never matches),
  in the kickstart and twice in fws-grub-finalize, which they do not touch.

- build.sh: theirs for the rsync:// mirrorlist purge, the fws-bugreport syntax
  check and the systemd-networkd masking (networkd and NetworkManager were
  fighting over the same interfaces on the live). Their systemd-only symlink
  repair loop is dropped as redundant: the general restoration also covers
  /etc/resolv.conf and the gpt-auto-generator mask, which their loop missed.

- fws-bugreport replaces my fws-report-bug, which is deleted: theirs is the
  fuller tool (GTK form with a console fallback, exact JSON payload shown
  before sending, journal filtering, .desktop launcher). .xinitrc keeps my
  in-window buttons -- "Envoyer le rapport" and "Redémarrer" on the log window
  itself, retryable without losing the report -- but they now call
  fws-bugreport.

- profiledef.sh: their permission entry, mine removed with the tool.

- CHANGELOG.rst: both sets of entries. Two of mine were rewritten because the
  merge made them false (my reporting tool no longer exists, and my partition
  table change is superseded).

Untouched by their branch, so kept as is: the step-by-step wizard, the
next/back navigation and its transitions, the default desktop.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 11:40:03 +02:00
nocode 0ef580e67e docs(changelog): describe the installer and bug-reporting changes
Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:08:39 +02:00
nocode 880b29c9d6 fix(branding): point project URLs at the real repository
os-release, motd, fws-about, profiledef.sh and LICENSING.md all advertised
https://github.com/You-re-like-Windows-a-bitch/fws, which does not correspond
to where the project actually lives -- BUG_REPORT_URL included, so users had no
working way to report anything. They now point at
https://gitea.nocode-var.tech/FWS/FWS-ISO, and BUG_REPORT_URL at the FWS bug
tracker.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:08:39 +02:00
nocode b5db3008ee feat(installer): send failure reports to the FWS bug API
When an installation fails the machine does not reboot: it stays on the log
window. Until now the user had a complete report in front of them and no way to
get it to us -- no browser, no mail client in a live session.

The log window now carries two buttons, "Envoyer le rapport aux développeurs"
and "Redémarrer". Sending does not close the window, so it can be retried after
plugging in a network cable, which is the usual reason an install failed in the
first place.

fws-report-bug POSTs to https://fws.laxacube.ch/api/bugs.php. It is written in
python3 with urllib -- no added dependency, and json.dumps escapes raw logs
containing quotes, backslashes and accents, which a shell-built JSON breaks on
at the first line. It attaches the logs (last 200000 characters: the error is
always at the end) and the detected hardware (CPU/GPU model, RAM, UEFI or BIOS,
disks, virtualisation). It never sends the user name or the host name, and the
e-mail only when one is given. Nothing is sent without an explicit click.

profiledef.sh also gains the 0755 permission entry for the new helper, since
repository files are versioned 0644.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:08:30 +02:00
nocode 59bc828f9d feat(installer): step-by-step wizard with next/back navigation
Anaconda is a hub & spoke installer: a MENU where the user picks which screen
to enter, in any order. That assumes you already know what you are doing --
the opposite of what FWS is for. The Summary hub no longer shows its grid of
tiles; it chains its screens one by one, like the Windows installer:

  Language -> Internet -> Date & time -> Destination -> Desktop -> User
  -> Root password -> Summary -> Installation

Consequences addressed here:

- The desktop default was "command line only", on a screen that was neither
  mandatory nor visited by most users: the installation SUCCEEDED but left a
  console-only system -- a black screen on reboot, experienced as "the OS does
  not install". The screen is now part of the flow and defaults to KDE Plasma.
- Navigation was inconsistent: hub screens carried a single "Done" button in
  the TOP LEFT while standalone screens have their buttons at the bottom right.
  That button is moved into a bottom-right bar identical to the standalone one,
  renamed "Suivant", and joined by a "Précédent" button.
- Going back works from the last screen all the way to the first, including out
  of the hub, so a wrong language -- hence a wrong keyboard layout -- is no
  longer final. Leaving the hub and coming back would normally rebuild a fresh
  hub and lose every entry, so the hub instance is cached and reused.
- Going back applies nothing: the Destination screen's apply() reconfigures
  partitioning.
- Screens now slide horizontally, right to left going forward.
- The keyboard chosen on the first screen is applied to the running X server
  with setxkbmap. Anaconda 45 only pushes it to systemd-localed, which expects
  a compositor to listen -- there is none under the live session's Openbox/Xorg,
  so the whole installer stayed in QWERTY US and Wi-Fi and account passwords
  were typed blind.

The redundant screens (second keyboard choice, Anaconda's own network screen,
language support) are removed through Anaconda's supported "hidden_spokes"
option rather than by patching it.

Everything is behind try/except: should any of it fail, the classic hub comes
back and the installation stays possible.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:08:19 +02:00
nocode 557470ed60 fix(installer): find the EFI system partition instead of never finding it
Both the kickstart %post and fws-grub-finalize looked for the ESP with

    lsblk -nro PATH,PARTTYPENAME,FSTYPE | awk '$2=="EFI System" && $3=="vfat"'

but "lsblk -r" separates columns with SPACES and an ESP's label is literally
"EFI System" -- with a space. awk therefore sees $2="EFI" and $3="System", so
the condition can never be true and no ESP was ever found. The consequences
chain: /boot/efi never mounted, install_grub returns 1, grub-install and
grub-mkconfig skipped, /boot/grub missing, and the step 4ter grub-mkconfig
fails in turn (visible in the 2026-09-06 install journal as "+ grub-mkconfig"
followed by "+ true"). This is why GRUB had to be repaired by hand in a TTY
after bare-metal installs -- the first-boot safety net carried the same bug.

Detection now reads PARTTYPE (a type CODE: GUID on GPT, 0xef on MBR, never a
space) and queries each vfat partition separately, so an empty column cannot
shift the fields either.

Also in this commit:
- /boot/grub is created before any grub-mkconfig, so the menu is generated even
  when grub-install failed.
- The step 4ter grub-mkconfig no longer swallows its stderr; a failure now
  lands in /var/log/fws-post.log instead of /dev/null.
- clearpart no longer forces --disklabel=msdos: the table type is left to
  Anaconda/blivet, which picks it from the firmware (BIOS -> msdos, UEFI ->
  gpt). Forcing MBR under UEFI is out of spec and makes dual-boot beside a
  GPT Windows impossible.
- The resolv.conf copy to the target removes the destination first and copies
  the CONTENT, since /etc/resolv.conf is now a symlink on both sides.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:08:02 +02:00
nocode 21808ca05e fix(live): restore airootfs symlinks so DNS works in the installer
Seventeen files that must be symlinks were checked out as plain text files
containing their target (Git for Windows creates no symlinks by default), and
have been stored that way since the repository migration. Three of them break
the installer:

- /etc/resolv.conf holds the literal string
  "/run/systemd/resolve/stub-resolv.conf", so the glibc resolver finds no
  nameserver at all: no DNS in the live session, and "pacman -S <desktop>"
  fails in the middle of %post.
- etc/systemd/system-generators/systemd-gpt-auto-generator -> /dev/null is a
  MASK. As a regular file the mask is void and systemd auto-mounts the target
  disk's GPT partitions during installation.
- The dbus-org.freedesktop.* aliases and the *.target.wants/* links become
  invalid units.

build.sh now rebuilds them in the build tree, so the result no longer depends
on which OS the repository was cloned on. systemd-resolved and fws-rootfsbase
are enabled alongside NetworkManager (they carry an [Install] section but no
activation link survived the migration), and NetworkManager delegates DNS to
resolved -- the same setup the %post applies to the installed system.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-09 10:07:50 +02:00
BlackAngelTVandCodebuff ebf1515ddc docs: CHANGELOG — fws-bugreport, install bare-metal fiabilisé, build durci
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-08 22:04:30 +02:00
BlackAngelTV 62894a67a5 chore(build): durcir le build — miroirs rsync, symlinks systemd, networkd masqué
- Reflector peut écrire des miroirs rsync:// que pacman ne sait pas utiliser :
  retirés avant le premier -Sy (build mort, vu en réel).
- Vérification de la syntaxe de fws-bugreport (py_compile) avant chaque build.
- Checkout Windows → symlinks systemd matérialisés en fichiers plats (contenu
  = chemin cible) : détectés et remplacés par de vrais symlinks (plus de
  « Failed to preset all unit » / « not a symlink, ignoring » au boot live).
- systemd-networkd (service + socket) masqué sur le live : NetworkManager est
  le pilote FWS, fini la bagarre sysctl ipv6 entre les deux.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-08 22:04:30 +02:00
BlackAngelTV e180165d81 fix(installer): fiabiliser l'installation bare-metal (noyau, mkinitcpio, partitionnement)
- %pre : partitionnement selon la machine — cible = plus grand disque non
  amovible (fini le clearpart --all qui rayait les autres disques), GPT en
  UEFI / MBR en BIOS.
- airootfs : /etc/selinux/config et /etc/sysconfig/anaconda livrés — deux
  tâches d'Anaconda échouaient sur la cible (FileNotFoundError stoppant la
  file d'installation sur vrai matériel).
- Noyau : archiso exclut vmlinuz-linux du squashfs → chaîne de secours de
  copie (bootmnt → /run/archiso → source installateur → volumes étiquetés) +
  rattrapage pacman -S linux dans le %post chrooté, tout tracé dans
  fws-post.log.
- mkinitcpio : le preset Arch standard est écrit AVANT tout pacman — la purge
  de mkinitcpio-archiso déclenche le hook 90-mkinitcpio-install.hook
  (mkinitcpio -P) ; l'ancien ordre le faisait tourner avec le preset archiso
  et archiso.conf déjà supprimé (« Invalid option -c … must be readable »,
  reproduit en chroot). Vérification finale : initramfs absent ⇒ CRITIQUE.
- Système installé : NetworkManager activé, systemd-networkd neutralisé,
  reliques live purgées.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-08 22:04:22 +02:00
BlackAngelTV e5da70885a feat(bugreport): outil « Signaler un problème » — télémétrie optionnelle validée par l'utilisateur
fws-bugreport (GTK + repli console) envoie un rapport au créateur de l'OS
via curl vers https://fws.laxacube.ch/api/bugs.php, jamais automatiquement :
l'utilisateur voit le payload JSON exact et confirme l'envoi. Infos système +
extrait du journal (filtré du bruit Anaconda, dédupliqué, plafonné par source)
joignables au rapport ; trace de chaque envoi dans /tmp/fws-bugreport.log et
vérification du code HTTP / réponse JSON (plus de faux « envoyé ✔ »). Intégré
au menu d'applications, proposé sur l'écran de debug de l'installateur
(fws-bugreport --file /tmp/fws-debug.txt), permissions dans les deux profils,
règles de fenêtres flottantes i3/Hyprland, utilisateur ajouté à
systemd-journal à l'installation.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-08 22:04:13 +02:00
BlackAngelTV 8a83612237 Ajouter AGENTS.md 2026-09-04 12:22:12 +00:00
BlackAngelTV 1e0f58e261 feat(scripts): auto-fallback to Docker container when no Arch WSL distro is found
setup-aur.sh, build.sh and build-offi.sh now fall back to an archlinux
Docker container (repo mounted on /fws, shared pacman cache) instead of
erroring on Windows hosts without an Arch WSL distro. Also install sudo
in the container so makepkg -s can resolve makedepends as the non-root
fwsbuild user (the cause of the recurring anaconda build failure).
2026-09-04 14:16:16 +02:00
BlackAngelTV cc695e144d chore: bump FWS version from 0.6.0 to 0.7.0
0.7.0 ships the post-language network picker, the bare-metal dualboot
GRUB hardening and the self-healing setup-aur. The single os-release
overlay feeds the live /etc/os-release, the installer header and the
installed system's branding.
2026-09-03 21:57:13 +02:00
BlackAngelTV d386d83f32 fix(setup-aur): self-heal interrupted package transactions
An interrupted pacman -Syu leaves unowned files on disk; every later
install then fails with "exists in filesystem" and the whole AUR build
cascades into cryptic errors. A failed -Syu is now retried with
--overwrite, and all pacman -U installs go through a new pacman_ur()
helper that removes only files owned by no package and retries (up to
8 times) instead of dying on stale leftovers.
2026-09-03 21:57:09 +02:00
BlackAngelTV 23fdce5f9e fix(installer): make GRUB reliable on bare-metal dualboot installs
Three gaps left real machines booting straight into Windows after a
successful install (menu empty, no GRUB entry, no NVRAM record):

- os-prober was disabled (Arch default GRUB_DISABLE_OS_PROBER=true),
  so Windows never appeared in the generated menu; the airootfs
  overlay /etc/default/grub now ships GRUB_DISABLE_OS_PROBER=false.
- The %post chroot often had no ESP mounted and no efivars access, so
  grub-install silently did nothing on real hardware; it now finds and
  mounts an EFI FAT32 partition (including another OS's ESP, e.g.
  Windows) before installing.
- No safety net remained if the first attempt failed; the kickstart
  enables a new fws-grub-finalize.service that, on the installed
  system's first boot, re-installs GRUB with the --removable fallback
  (EFI/BOOT/BOOTX64.EFI) plus an NVRAM entry and regenerates the menu
  with os-prober active - automating the manual TTY repair.
2026-09-03 21:57:06 +02:00
BlackAngelTV 294f1bb149 feat(installer): simple network picker screen after language selection
Replace the complex anaconda NetworkStandaloneSpoke with a minimal
post-language "Connexion à Internet" screen: one list of detected
Wi-Fi networks plus Ethernet, click a network, enter the password,
done. Hostname typed there is kept (written to /tmp/fws-hostname and
prefilled into the User spoke via the anaconda PKGBUILD patch), and
the chosen Wi-Fi profile is copied to the installed system so it
works at first boot without re-entering the password.
2026-09-03 21:56:58 +02:00
BlackAngelTV 62246d0d89 docs(trademarks): update fws version number from 0.6 to 0.7 2026-09-03 21:37:10 +02:00
BlackAngelTV 9386783f9a docs(licensing): update fws version from 0.6 to 0.7 in installation header example 2026-09-03 21:37:10 +02:00
BlackAngelTV 079531b4a6 docs(changelog): add 0.7.0 release notes (network screen, dualboot GRUB, setup-aur) 2026-09-03 21:37:10 +02:00
BlackAngelTV 438ff0a278 docs(readme): describe simple network picker and dualboot GRUB hardening 2026-09-03 21:37:09 +02:00
BlackAngelTV 0d3d3c766a chore: untrack .freebuff session data
.freebuff holds local app state and was committed by accident in PR #4;
remove it from the tree and ignore the directory going forward.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-03 18:45:35 +02:00
BlackAngelTV d7c968e5c9 Merge pull request 'Fix desktop autostart' (#4) from fix-desktop-autostart into Main
Reviewed-on: #4
2026-08-26 17:46:54 +00:00
BlackAngelTV bbe6d99b9a fix(autoinstall): desktop install 2026-08-26 19:46:11 +02:00
nocode 7a43f35a74 feat(build): add preflight package resolution and fws-dnd package
Add preflight package resolution step in build-offi.sh to validate all profile
packages against pacman repositories before mkarchiso execution. This prevents
'target not found' errors during ISO creation by catching missing packages early
with helpful error messages and recovery instructions.

Introduce fws-dnd package (D&D 5e manager for FWS with GTK4 interface) to the
local package build process in setup-aur.sh. Include PKGBUILD definition and
source tarball.

When package resolution fails, the build now exits with clear feedback pointing
users to run setup-aur.sh to build missing dependencies like fws-dnd.
2026-07-07 21:39:29 +02:00
nocode d6fccca542 docs(changelog): update changelog with new features and fixes
Add entries for:
- Machine name selection at installation
- Interactive build script with versioning and naming
- systemd-timesyncd explicit activation
- Keyboard layout derivation from full locale
- DNS in build container configuration
2026-07-07 21:07:10 +02:00
nocode 5d168729f6 merge(Multi-Desktop)!: Add Multi DE on the installer 2026-07-07 21:04:19 +02:00
nocode f64aa94d35 Merge branch 'Main' into Multi-Desktop 2026-07-07 18:48:21 +00:00
nocode dc2c92ea1e Merge branch 'Multi-Desktop' into Main 2026-07-07 20:46:57 +02:00
nocode fde52e3e5c docs(trademarks): correct fws version number from 1.0 to 0.6 2026-07-07 13:57:22 +02:00
nocode f0acdb565e docs(readme): update fws version from 1.0 to 0.6 in installation header 2026-07-07 13:57:17 +02:00
nocode dc1b7b198e docs(licensing): update fws version from 1.0 to 0.6 in installation header example 2026-07-07 13:57:12 +02:00
nocode a2839c1038 docs(changelog): update fws version from 1.0 to 0.6 2026-07-07 13:57:08 +02:00
nocode 3de866e5fc feat(releng): enable systemd-timesyncd ntp synchronization
Add explicit activation of systemd-timesyncd service to ensure proper clock synchronization on installed systems. This prevents clock drift issues that can affect TLS and pacman operations, and meets user expectations for accurate system time.

The service is already present in the image but inherited symlinks from the live environment may be ordinary files that systemd ignores, so explicit enablement ensures correct behavior on all installations.
2026-07-07 13:57:04 +02:00
nocode 6739ca6b09 chore(release): bump version to 0.6.0 2026-07-07 13:56:58 +02:00
nocode 299f9c52f0 chore(.xinitrc): update anaconda default product version to 0.6 2026-07-07 13:56:54 +02:00
nocode 18b338bb29 chore(releng): convert systemd service files to symlinks
Convert three systemd service configuration files from regular files to symlinks pointing to their respective system libraries. This ensures that the services reference the actual systemd unit files from /usr/lib/systemd/system rather than maintaining duplicate copies.
2026-07-07 13:56:43 +02:00
nocode e8dfd217b1 chore: bump version to 0.6.0 2026-07-07 02:53:18 +02:00
nocode 410b76976a docs(changelog): release version 0.6.0
Update changelog with version 0.6.0 release notes dated 2026-07-07.

Documents major additions including:
- Anaconda installer 45 ported to Arch with Live OS payload
- FWS tooling suite (fws-hello, fws-update, fws-keys, etc.)
- System recovery functionality (fws-recovery-gui and engine)
- zram swap support and firewalld enablement
- Hyprland and i3 desktop parity

Includes changelog entries for changed items (FWS branding, boot entries, compression), fixed issues (splash watchdog, low RAM handling, profile synchronization), and removed items (syslinux config).
2026-07-07 02:53:14 +02:00
nocode e0a2bebb83 docs(environnement): add native arch linux build reference section
Document the native Arch Linux build environment that has been the reference since July 2026. This section explains that build.sh and setup-aur.sh now detect and execute directly on Arch Linux, replacing the previous Windows 11 + WSL setup as the primary reference.

The Windows + WSL path remains functional with automatic fallback from Git Bash but is no longer the reference environment.
2026-07-07 02:48:34 +02:00
nocode 491b2ec8f8 docs(trademarks): document branding removals and anaconda customization
Add detailed documentation of trademark and branding changes:

- BIOS boot menu: replaced archiso syslinux splash with FWS original artwork
- Login banner: uses FWS PRETTY_NAME without kernel version suffix
- User-facing text: replaced references to Arch Linux/Fedora with generic descriptions
- Anaconda installer: configured to display "FWS 1.0" via environment variables
- Splash screen filtering: removes Fedora mentions from visible logs
- Technical logs: intentionally preserve upstream component identification for diagnostics

All changes maintain nominative fair use and preserve functional upstream tool identifiers.
2026-07-07 02:48:29 +02:00
nocode 0d0d078ea3 docs(readme): update fws architecture and recovery system documentation
- Add FWS branding details for Anaconda installer (ANACONDA_PRODUCT* exports via .xinitrc)
- Enhance splash screen description with real-time anaconda activity monitoring and auto-diagnostic
- Document memory requirements (4 GB recommended, 2 GB minimum with zram swap)
- Clarify boot menu entries and recovery accessibility from live, GRUB, and installed system
- Add fws-recovery as GTK application with bash engine and console fallback
- Document zram swap configuration for both live and installed system
- Detail recovery system integration: GRUB entry, systemd target, polkit policy, and desktop launcher
- Update syslinux splash and DEFAULT entry documentation
- Expand merge rule warning with syslinux-linux.cfg example and BIOS boot status
- Enhance troubleshooting section with detailed recovery procedures and known issues resolutions
- Add information about splash watchdog, RAM warnings, and diagnostic auto-generation
2026-07-07 02:48:22 +02:00
nocode c452c4bd5d docs(licensing): mark anaconda branding removal as completed and update date
Update the Anaconda branding removal checklist item from incomplete to completed, documenting the implementation details:
- Product name changed to FWS via ANACONDA_PRODUCTNAME and ANACONDA_PRODUCTVERSION variables
- Variables exported by live .xinitrc and read from FWS os-release
- Installation header displays "FWS 1.0 INSTALLATION"
- BIOS boot menu visual replaced with FWS splash screen
- Modified Anaconda version documented in LICENSING.md and TRADEMARKS.md

Also update the compliance date from 2026-06-17 to 2026-07-07.
2026-07-07 02:48:09 +02:00
nocode 2199fa1fec feat(releng): add polkit policy for fws-recovery privileged operations
Add PolicyKit authorization policy file to allow fws-recovery-gui to execute fws-recovery engine via pkexec with administrative privileges. The policy uses auth_admin_keep to require authentication only once per session.
2026-07-07 02:48:03 +02:00
nocode 1bba514507 feat(icons): add fws-recovery scalable application icon
Add a new scalable SVG icon for FWS recovery application featuring a medical cross symbol in FWS brand colors (blues) on a dark background. Icon is placed in the standard hicolor scalable apps directory.
2026-07-07 02:47:59 +02:00
nocode aed17689cb feat(releng): add fws-recovery desktop application launcher
Add desktop entry file for FWS Recovery application launcher in the installed OS. Provides bilingual (French/English) interface for system repair operations including GRUB, initramfs, and pacman restoration. The application runs as a regular user with privilege escalation handled via pkexec.
2026-07-07 02:47:54 +02:00
nocode d7efb45f7a feat(releng): add fws-recovery-session script for recovery mode
Add a new script that launches an X session with Openbox and the fws-recovery-gui application. This script is executed by startx during the FWS repair boot entry, providing a minimal graphical environment with Openbox as a fallback if the GUI crashes.
2026-07-07 02:47:48 +02:00
nocode 4640708d3e feat(recovery): add fws-recovery-gui GTK3 application for system repair
Implement a graphical interface for the FWS system recovery tool using GTK3.

Features:
- Scans for FWS installations on disk
- Provides action buttons for common repairs: GRUB reinstall, initramfs
  regeneration, pacman repair, and full system repair
- Displays real-time engine output in a log viewer
- Supports both root session (live mode) and regular user (pkexec elevation)
- Includes terminal access (chroot) for manual diagnostics
- Offers system reboot/poweroff controls

The GUI replaces Arch Linux branding with FWS in output for consistency
while preserving technical identifiers (package names, file paths) for
accurate diagnostics.
2026-07-07 02:47:43 +02:00
nocode dfd468513c feat(zram): add zram-generator configuration for live environment
Enable compressed swap in RAM (zram) for the live environment to prevent memory saturation issues on systems with limited RAM. This configuration provides necessary headroom during Anaconda installation by leveraging zram's ~3:1 compression ratio on Python heaps. The configuration is automatically copied to installed systems via LiveOS payload, maintaining this safety net post-installation on modest hardware.
2026-07-07 02:47:35 +02:00
nocode b29adac4ef feat(systemd): add fws-recovery.target unit
Add new systemd target unit for FWS system recovery mode. This target is invoked via GRUB boot menu entry "Reparer FWS" and provides a multi-user environment with network access plus recovery session. The service includes proper dependency management to ensure getty@tty1 is properly handled.
2026-07-07 02:47:30 +02:00
nocode 7950d9241f feat(releng): add fws-recovery-boot systemd service
Add systemd service unit for FWS system recovery boot mode. This service handles recovery session initialization on tty1 with fallback from GUI (via startx/openbox) to console assistant if graphical startup fails. The service is only activated via fws-recovery.target kernel command line parameter and does not interfere with normal boot processes.
2026-07-07 02:47:24 +02:00
nocode 43014e6988 chore(releng): add issue file to airootfs
Add /etc/issue file to the releng airootfs configuration. This file provides pre-login banner information displayed to users connecting to the system.
2026-07-07 02:47:19 +02:00
nocode 74db06b698 feat(grub): add fws-recovery boot menu entry script
Add a new GRUB menu entry script that provides system recovery functionality.

The script generates a 'Réparer FWS (récupération du système)' menu entry that boots the system into fws-recovery.target with the fws.recovery=1 marker. This allows the recovery application to launch and perform system repairs via GUI or console fallback.

The script uses the fallback initramfs for maximum hardware compatibility during recovery operations, matching the UUID-based root detection logic of the standard 10_linux script.
2026-07-07 02:47:14 +02:00
nocode 6f2f085b28 chore(releng): optimize syslinux splash image
reduce splash.png file size from 45400 to 14037 bytes through image optimization
2026-07-07 02:47:06 +02:00
nocode a967fd6efe chore(releng): change default syslinux boot option from arch to fws 2026-07-07 02:47:01 +02:00
nocode e05b23b284 chore(releng): add file permissions for recovery utilities and grub module
Add file permissions configuration for new recovery-related executables and grub module:
- fws-recovery-session executable
- fws-recovery-gui executable
- grub.d recovery module

All set with standard executable permissions (755) and root ownership.
2026-07-07 02:46:56 +02:00
nocode 080acb5918 feat(releng): add zram-generator to x86_64 packages 2026-07-07 02:46:49 +02:00
nocode fbe5cdfd0a docs(anaconda): add comment about fws-recovery boot entry and service
Document the FWS recovery boot entry generated by GRUB configuration and explain how the fws-recovery.target and fws-recovery-boot.service work together. Clarify that no explicit activation is needed as the service has no [Install] section and is pulled by the target through Requires, while the desktop launcher provides an alternative way to invoke recovery.
2026-07-07 02:46:43 +02:00
nocode df0368e5f7 refactor(fws-recovery): restructure recovery script with subcommands and GUI support
Split monolithic script into modular functions and add subcommand interface:

- Add scan subcommand to list FWS installations
- Add repair subcommand with actions: grub, initramfs, pacman, pacman-update, all
- Add shell subcommand for chroot terminal access
- Implement support for operating on running system (no mount/chroot needed)
- Extract detection and mounting logic into reusable functions
- Add in_target() helper to execute commands in target (chroot or direct)
- Improve mkinitcpio warning documentation
- Maintain backward-compatible TUI mode when no args provided
- Enable GUI (fws-recovery-gui) to pilot repairs via subcommands
2026-07-07 02:46:30 +02:00
nocode aaa2569ad3 fix(fws-about): update distribution description to be more generic
Change the description from "Une distribution Arch Linux" to "Une distribution Linux" to better reflect the project's identity and avoid limiting it to Arch Linux specifically.
2026-07-07 02:46:20 +02:00
nocode 0005204dea chore(syslinux): remove legacy syslinux linux configuration file
Remove the outdated syslinux-linux.cfg configuration file from the baseline syslinux directory. This file is no longer needed as the project has moved away from syslinux-based boot configurations.
2026-07-07 02:46:11 +02:00
nocode d93fc0e7e4 chore(baseline): add file permissions for recovery tools and grub config
Add file permission entries for new recovery-related executables and grub configuration:
- /usr/local/bin/fws-recovery-session
- /usr/local/bin/fws-recovery-gui
- /etc/grub.d/42_fws-recovery

All entries set to 0:0:755 (root owner, executable).
2026-07-07 02:46:01 +02:00
nocode b8ccf63a24 feat(baseline): add zram-generator package 2026-07-07 02:45:52 +02:00
nocode 97492d0d30 fix(baseline): update recovery boot flow to use X with gtk application
Changed recovery mode (fws.recovery=1) to start X server with the GTK recovery application (fws-recovery-session) instead of directly launching the console assistant. This provides a graphical interface when possible, with a fallback to the console assistant if X fails to start.

Also updated comments to clarify the different recovery mechanisms on the live ISO versus the installed system.
2026-07-07 02:45:47 +02:00
nocode 9cafa0a383 feat(xinitrc): enhance anaconda startup splash with better diagnostics and feedback
Add memory check warning for systems with less than 2GB RAM.

Replace simple pulsing splash with active monitoring that displays:
- Real-time anaconda activity from log files
- Elapsed time and current operation
- Stall detection after 4 minutes of inactivity
- Automatic diagnostic report collection (journal, dmesg, udev status)
- Detection of GUI readiness to auto-hide splash

Add anaconda branding environment variables (ANACONDA_PRODUCTNAME,
ANACONDA_PRODUCTVERSION, ANACONDA_ISFINAL) to show "FWS" instead of
"Fedora" in installer headers and logs.

Improve splash cleanup to handle both feeder process and optional
diagnostic dialogs.
2026-07-07 02:45:32 +02:00
nocode a30cf1b3cd chore(releng): add zenity, xterm, and fws-dnd to installer packages
Add zenity for graphical dialogs in the installer, xterm for terminal debugging and Openbox menu entry, and fws-dnd for D&D 5e management functionality (dice, characters, grimoire, sessions, combat).
2026-07-06 18:40:42 +02:00
nocode 7f1ae85556 feat(anaconda): add desktop installation retry mechanism for network failures
Implement a robust desktop installation retry system that handles transient network issues during the Arch installation process.

Changes:
- Create fws-desktop-retry script in /usr/local/bin for manual recovery after installation
- Add DNS resolution wait loop (up to 10 attempts with 3-second intervals)
- Implement pacman retry logic with up to 3 attempts (15-second delay between retries)
- Generate /var/lib/fws/desktop-failed marker file on installation failure
- Create informative MOTD message guiding users to retry desktop installation
- Preserve FWS-specific MOTD when it contains retry instructions

This allows users to recover from network/mirror failures without reinstalling the entire system.
2026-07-06 18:40:37 +02:00
nocode fcb85f9955 refactor(baseline syslinux)!: restructure syslinux configuration for multi-boot selection
Replace simple serial-based menu with system detection logic using whichsys.c32 to automatically select between PXE and direct system boot. This enables dynamic boot method selection while maintaining support for both boot scenarios.

BREAKING CHANGE: Changes syslinux.cfg structure from single menu-based boot to conditional boot selection. Systems relying on the previous serial menu interface and default 'arch' label will need to adapt to the new whichsys-based selection mechanism.
2026-07-06 18:40:32 +02:00
nocode e5d0d718a8 chore(pacman): remove fws-local repository configuration
Remove the custom fws-local repository section from the baseline pacman configuration. This local repository reference is no longer needed in the baseline setup.
2026-07-06 18:40:27 +02:00
nocode f26204fdb1 feat(baseline): add firewalld to baseline packages
Include firewalld in the baseline x86_64 package list for system firewall management capabilities.
2026-07-06 18:40:23 +02:00
nocode f623231e5c chore(efiboot): update efifi boot loader entry configuration
Update the UEFI boot loader entry to reflect FWS install medium branding, add sort-key directive for boot order control, align configuration formatting, and increase udev event timeout to 45 seconds for improved hardware compatibility during boot.
2026-07-06 18:40:19 +02:00
nocode bae9103ba5 docs(readme): clarify baseline and releng config merge rules
Expand the ISO branding documentation to include a detailed warning about the build process where baseline configs overwrite releng configs. Add a list of critical files that must be kept in sync between both profiles (profiledef.sh, packages.x86_64, pacman.conf, efiboot/loader/entries/01-archiso-linux.conf, syslinux/syslinux.cfg) and include a verification command to detect file divergences. This prevents silent data loss from config mismatches during the build.
2026-07-06 18:40:10 +02:00
nocode f84dd0e1f2 fix(i3-config): disable picom in virtual machines to prevent rendering artifacts
picom's GPU compositing causes GTK window repaint issues in virtual environments (vmwgfx/llvmpipe), resulting in black content and visual artifacts. Use systemd-detect-virt to skip picom execution on VMs while keeping it enabled on real hardware.

The rounded corners feature is sacrificed in VM environments to maintain stable window rendering.
2026-07-04 14:10:27 +02:00
nocode 551c66a3fa docs(readme): document anaconda integration and fws tooling comprehensive updates
Update README to reflect completed Anaconda 45 integration on Arch Linux, replacing Calamares. Document:

- Desktop choices (GNOME, KDE Plasma, XFCE, Hyprland, i3) with VR compatibility matrix
- Installation flow: Anaconda hub with FWS spokes, LiveOS payload, recap page before write
- fws-* tooling ecosystem: fws-hello, fws-update, fws-keys, fws-powermenu, fws-about, fws-vr-setup, fws-proton-ge, fws-recovery
- Hyprland & i3 visual parity: Catppuccin Mocha theme, waybar/polybar, wofi/rofi, custom SDDM theme
- Boot sequence: menu entries (normal, safe graphics, recovery, speech) → Openbox live → Anaconda → recap → installation
- Build process: incremental AUR + local PKGBUILD compilation (anaconda stack)
- Expanded troubleshooting: VM rendering issues, SteamVR, Bluetooth, recovery mode, BIOS/UEFI boot
- Log locations for live and post-install debugging
- Clarified file locations: kickstart, spokes, configs, tools, branding
2026-07-04 14:10:15 +02:00
nocode 58f957e086 chore(releng): add fws-about desktop entry file
Add desktop entry file for the FWS About application with localized names and metadata for system integration.
2026-07-04 13:43:54 +02:00
nocode c06fb9df9c build(releng): hide xfce4-about application from menus
Add desktop entry file to hide the xfce4-about application from application menus. Since xfce4-about is a dependency of Thunar through libxfce4ui and does not require a full XFCE session, this entry prevents it from appearing in application launchers by leveraging XDG_DATA_DIRS priority where /usr/local/share takes precedence over /usr/share.
2026-07-04 13:43:50 +02:00
nocode 30365148c1 feat(powermenu): add fws-powermenu universal power menu utility
Add a Python-based power menu script that works with both Hyprland (Wayland) and i3 (X11) desktop environments. Supports lock, logout, suspend, reboot, and poweroff actions with appropriate display server backends (wofi for Hyprland, rofi for i3).
2026-07-04 13:43:45 +02:00
nocode bb455b91ab feat(fws-about): add fws-about dialog application for system information
Add a new GTK3-based Python application that displays an "About FWS" dialog with two tabs:

- "Le projet FWS" tab: shows project name, description, features, and home URL
- "Système" tab: displays system information including OS, kernel, desktop environment, hardware (CPU, memory, GPUs, disks)

The application detects system information from /proc, lsblk, lspci, and environment variables. It replaces the default Xfce About dialog with FWS branding.
2026-07-04 13:43:39 +02:00
nocode 55a85479a5 chore(releng): add fws-powermenu and fws-about to file permissions 2026-07-04 13:43:32 +02:00
nocode a1bcdf757b chore(anaconda): replace thunar with dolphin and gvfs with udisks2 in desktop environments
Update package lists for Hyprland and i3 desktop environments:
- Replace thunar file manager with dolphin (KDE's file manager)
- Add kio-extras for dolphin functionality
- Replace gvfs with udisks2 for USB mounting
- Update comments to reflect new mount mechanism

This change improves consistency and provides better integration for the respective desktop environments.
2026-07-04 13:43:29 +02:00
nocode f90185590a style(waybar): add custom power button styling
Add styling for custom power button with Catppuccin color scheme.

- Default color: #f38ba8 (rouge doux)
- Hover color: #ff6b81 (lighter red)
2026-07-04 13:42:44 +02:00
nocode 4c63dcc396 feat(waybar): add power menu module to waybar config
Add custom power menu module to waybar configuration with power icon and SUPER+X keyboard shortcut that launches fws-powermenu utility.
2026-07-04 13:42:41 +02:00
nocode 76c60bc99d feat(polybar): add power module to polybar configuration
Add a new power module to the polybar configuration that displays a power icon and triggers the fws-powermenu command on click. The module is styled with red foreground color and integrated into the modules-right bar.
2026-07-04 13:42:37 +02:00
nocode 0fcdef924d chore(i3-config): update file manager and add new keybindings and window rules
- Change default file manager from thunar to dolphin
- Add $mod+x keybinding for fws-powermenu (power menu)
- Add floating window rules for fws-hello and fws-about dialogs
2026-07-04 13:42:32 +02:00
nocode c839ab385d chore(hyprland): update hyprland config with dolphin, powermenu binding, and window rules
Replace thunar file manager with dolphin for consistency.
Add power menu keybinding (Super+X) for shutdown/restart operations.
Add floating window rules for fws-hello and fws-about applications.
2026-07-04 13:42:28 +02:00
nocode 0f9d8670cf fix(fws-hello): set window type hint to dialog and prevent resizing
Import Gdk and GLib modules to properly configure window behavior.

Set deterministic WM_CLASS using GLib.set_prgname() so that i3/Hyprland
window rules targeting "fws-hello" floating window behavior work correctly.

Set window type hint to DIALOG and disable resizing to ensure the window
remains floating with its natural size instead of being stretched across
the entire workspace, which would result in unreadable layout.
2026-07-04 13:42:24 +02:00
nocode d9199e724c chore(baseline): add file permissions for fws-powermenu and fws-about scripts 2026-07-04 13:42:11 +02:00
nocode 4a2420d2d6 feat(rofi): add rofi configuration for fws application menu
Add rofi configuration file with FWS styling matching the Hyprland wofi look. Includes dark background, blue borders and selection, icon support, and Catppuccin Mocha color scheme.
2026-07-04 13:15:45 +02:00
nocode fcce543668 feat(i3-config): add rofi configuration for i3 desktop environment
Install rofi configuration file (rofi-config.rasi) for i3 desktop to provide an application menu with FWS styling, equivalent to wofi in Hyprland. Configure rofi for both skeleton and existing user home directories with proper ownership settings.
2026-07-04 13:15:33 +02:00
nocode b92c7bcd02 feat(efiboot): add FWS recovery boot entry configuration
Add a new EFI boot loader entry for FWS recovery mode that boots the live system without the installer and launches the recovery assistant console. This enables system repair functionality including GRUB reinstallation, initramfs regeneration, and pacman repair.
2026-07-04 12:57:05 +02:00
nocode b228c5e496 feat(releng): add fws-updates-check script for update notifications
Add a new shell script that checks for available package updates using checkupdates from pacman-contrib. The script outputs the number of available updates with an icon for use in waybar/polybar status bars. Silent output when no updates are available allows the bar module to hide.
2026-07-04 12:57:01 +02:00
nocode b24feec376 feat(fws-update): add system update utility script
Add fws-update script to provide a one-command system update solution accessible from taskbar, fws-hello menu, or terminal.

The script performs:
- System update via pacman -Syu
- Package cache cleanup (retains 2 latest versions)
- Orphaned package detection and optional removal
- Flatpak updates if available

Requires root privileges and prompts for user confirmation on orphan removal.
2026-07-04 12:56:57 +02:00
nocode d2f4064210 feat(recovery): add fws-recovery script for system repair from live environment
Add a comprehensive system recovery tool that:
- Detects FWS installations on disks including LVM volumes
- Mounts target root filesystem with /boot and ESP partitions
- Provides interactive menu for common repair operations:
  - GRUB reinstallation (UEFI and BIOS support)
  - Initramfs regeneration via mkinitcpio
  - Pacman database repair and system updates
  - Interactive chroot shell for manual intervention

The script handles automatic LVM activation, filesystem detection via os-release, and proper cleanup on exit.
2026-07-04 12:56:51 +02:00
nocode feb92b4850 feat(releng): add fws-proton-ge script for proton-ge installation
Add a user-friendly bash script that automates downloading and installing
Proton-GE (GloriousEggroll) for Steam. The script fetches the latest release
from GitHub, verifies integrity with SHA512 checksums, and installs it to the
user's Steam compatibility tools directory. Includes error handling and user
guidance for Steam configuration.
2026-07-04 12:56:44 +02:00
nocode 148e4ee27e feat(releng): add fws-hello welcome window script
Add a new GTK3-based welcome window script that displays on first boot after installation. The script provides quick access to system setup tasks including system update, multimedia codecs installation, Proton-GE setup, VR configuration, and keyboard shortcuts (on Hyprland/i3). Users can opt to hide the window on subsequent boots via a checkbox and flag file.
2026-07-04 12:56:39 +02:00
nocode c470cf23af feat(releng): add fws-hello desktop autostart entry
Add desktop entry file to automatically launch fws-hello welcome window on first startup. This provides a user-friendly greeting interface when the system boots.
2026-07-04 12:56:33 +02:00
nocode 7adeb06609 feat(syslinux): add fws recovery boot option to syslinux config
Add a new boot menu entry for FWS installation recovery that boots into a guided console assistant without reinstalling. The recovery mode is triggered via the fws.recovery=1 kernel parameter.
2026-07-04 12:56:28 +02:00
nocode c2a38a779b chore(releng): add new executable file permissions to profiledef
Add permission entries for five new utility scripts:
- fws-hello
- fws-update
- fws-updates-check
- fws-proton-ge
- fws-recovery

All are configured with standard permissions (0:0:755).
2026-07-04 12:56:24 +02:00
nocode 072444a44d feat(releng): add firewalld to x86_64 packages 2026-07-04 12:56:17 +02:00
nocode 2a8cc08754 build(releng): add python-gobject, pacman-contrib packages and enable firewalld
- Add python-gobject for fws-hello welcome window (GTK3 comes with Firefox)
- Add pacman-contrib for checkupdates/paccache (update indicator and fws-update)
- Enable firewalld.service by default with public zone (blocks inbound, allows outbound)
- firewalld is already in the base image and can be activated offline
- GUI included in firewall-config package; KDE has additional plasma-firewall
2026-07-04 12:56:13 +02:00
nocode 1791a5e4e3 feat(waybar): add custom updates module to waybar configuration
Add a new custom/updates module to the waybar right-side modules that displays available system updates. The module executes fws-updates-check every 30 minutes (1800 seconds) and allows users to install updates by clicking, which launches a kitty terminal running fws-update. Tooltip text is displayed in French.
2026-07-04 12:56:08 +02:00
nocode 87092f91c1 feat(polybar): add updates module to polybar configuration
Add a new custom script module to check for system updates in the polybar status bar. The module runs fws-updates-check every 30 minutes and allows users to trigger updates with a left click to open the update utility in kitty terminal.
2026-07-04 12:56:03 +02:00
nocode 6ae86b32cf feat(i3-config): add fws-hello welcome window on startup
Add execution of fws-hello with --autostart flag to display a welcome window on first boot only. The window will automatically hide after the initial startup.
2026-07-04 12:55:56 +02:00
nocode e5572a0d7a feat(hyprland): add fws-hello welcome window on first startup
Add execution of fws-hello with --autostart flag to display a welcome window on first launch. The window will be automatically hidden on subsequent startups.
2026-07-04 12:55:50 +02:00
nocode b81d6193f4 feat(hardware-setup): add mangohud gaming performance overlay packages
Add mangohud and lib32-mangohud packages to the desktop environment setup for gaming performance monitoring. Mangohud provides an in-game FPS and performance metrics overlay that can be used with Steam games via '%command%' prefix.
2026-07-04 12:55:45 +02:00
nocode 6df2a1e861 chore(baseline): add file permissions for new fws utility scripts
Add file permission entries for five new utility scripts in the fws toolkit:
- fws-hello
- fws-update
- fws-updates-check
- fws-proton-ge
- fws-recovery

All scripts are configured with owner:group 0:0 and executable permission 755.
2026-07-04 12:55:38 +02:00
nocode 53084d4f09 feat(baseline): add recovery mode boot option to zprofile
Add support for recovery mode that can be triggered via the fws.recovery=1 kernel parameter. When recovery mode is enabled, the system launches the fws-recovery console assistant directly instead of starting the graphical environment.

This allows users to access repair tools without needing to start X server, improving system recovery capabilities.
2026-07-04 12:55:25 +02:00
nocode 1fceaa20d3 refactor(fws-keys): make keyboard shortcuts tool universal for hyprland and i3
Rename fws-hypr-keys to fws-keys and extend it to support both Hyprland and i3 desktop environments. The tool now detects the session type and uses appropriate methods:

- Hyprland: queries hyprctl binds for real loaded bindings (wofi dmenu)
- i3: parses ~/.config/i3/config with variable resolution (rofi dmenu)

Update all references in configs and templates. Add VM detection warning in fws-vr-setup to prevent VR attempts in virtual machines where GPU/USB access is unavailable.

Add ttf-liberation font dependency for Steam UI stability on minimal installations and improve error guidance for Steam crashes.
2026-07-04 03:59:09 +02:00
nocode c3132d616c feat(icons): add fws-vr vr headset icon
Add scalable SVR icon for the fws-vr-setup launcher using FWS/Catppuccin color palette. The icon depicts a VR headset with straps, lenses, and nose notch in blue and dark theme colors.
2026-07-04 03:30:46 +02:00
nocode 7a4b5e520d feat(releng): add fws-vr-setup desktop application entry
Add desktop application entry for VR setup tool that allows users to install drivers and runtimes for VR headsets including HTC Vive, Valve Index, and Meta Quest devices. The application launches fws-vr-setup command in a kitty terminal.
2026-07-04 03:30:41 +02:00
nocode cb8f437e4d feat(i3): add default i3 window manager configuration
Add FWS default i3 configuration file with X11 session support.

Includes:
- Color scheme based on Catppuccin Mocha palette
- Keyboard bindings for common applications and window management
- VR headset driver setup integration (Super+Shift+V)
- Multi-monitor and workspace navigation support
- Screenshot and multimedia control bindings
- Status bar configuration with i3status
- Autostart for dunst, nm-applet, polkit-gnome, and blueman
2026-07-04 03:30:38 +02:00
nocode 4697fbda72 feat(releng): add fws-vr-setup script for VR driver installation
Add interactive shell script for installing VR drivers and runtimes based on headset type. Supports HTC Vive/Valve Index (native SteamVR), Meta Quest/Pico (ALVR streaming), and Monado (OpenXR runtime). Script automatically detects GPU and installs appropriate 32-bit Vulkan libraries required by SteamVR. Includes multilib configuration and user guidance for each VR setup path.
2026-07-04 03:30:28 +02:00
nocode da2e3850a0 chore(releng): add fws-vr-setup executable to file permissions
Register the new fws-vr-setup script with executable permissions (755) in the releng profile configuration.
2026-07-04 03:30:23 +02:00
nocode f12e4854e5 feat(releng): add i3 window manager desktop environment configuration
Add i3 window manager as a selectable desktop environment option in the anaconda kickstart configuration. Includes:

- i3-wm with essential packages (i3status, i3lock, rofi, kitty, etc.)
- X11 server requirement for VR compatibility (SteamVR incompatible with Wayland)
- Bluetooth service enablement for i3 sessions
- Icon cache update for VR launcher visibility in rofi
- i3 configuration template installation for skeleton and existing users
- Keyboard layout handling via X11 xorg.conf.d (no keyboard injection needed)

This enables users to install a lightweight X11-based desktop environment with VR support capabilities.
2026-07-04 03:30:18 +02:00
nocode 4c5f5dfa7e fix(fws-setup-hardware): add blueman bluetooth manager support for i3 desktop
Include blueman in the base packages for i3 desktop environment, alongside hyprland and xfce, to provide graphical bluetooth management and pairing assistant for i3 users.
2026-07-04 03:30:12 +02:00
nocode 4dad78ca03 chore(baseline): add fws-vr-setup executable permission 2026-07-04 03:30:07 +02:00
nocode 0967000ddc feat(fws_desktop): add i3 window manager option with VR compatibility note
Add i3 X11 window manager as a desktop environment option with explicit VR compatibility information. Update Hyprland label to clarify it uses Wayland and is not VR compatible. Adjust position indices for subsequent radio button options.
2026-07-04 03:30:02 +02:00
nocode 6851d29a53 feat(fws_recap): add i3 desktop option and update hyprland description
Add i3 desktop environment option with X11 and VR compatibility note.
Update hyprland description to clarify Wayland protocol and VR incompatibility.
Both descriptions now include information about included applications (Firefox, SDDM).
2026-07-04 03:29:56 +02:00
nocode ff7c137fa5 feat(fws_desktop): add i3 desktop option and update hyprland description
Add i3 window manager as a desktop choice with X11 and SteamVR compatibility note. Update Hyprland description to clarify it uses Wayland and is not compatible with VR.
2026-07-04 03:29:44 +02:00
nocode c7de201721 refactor(hyprland): disable splash rendering in hyprland configuration
Add disable_splash_rendering option to misc section to hide the startup splash message at the bottom of the screen.
2026-07-04 03:06:39 +02:00
nocode ec7a466baa refactor(waybar): add format-no-controller for bluetooth module
Configure waybar bluetooth module to use an empty format when no bluetooth controller is detected, improving UI consistency.
2026-07-04 03:06:25 +02:00
nocode 81b9bdaed9 fix(hyprland): only launch blueman-applet if bluetooth adapter exists
Prevent blueman-applet from showing connection errors in virtual machines where no Bluetooth adapter is present. The applet now checks for the existence of a Bluetooth adapter in /sys/class/bluetooth before launching.

This change adds a conditional check that gracefully skips the applet initialization when no hardware is available, improving user experience in VM environments.
2026-07-04 03:05:57 +02:00
nocode da79ccbac8 feat(anaconda): add modified anaconda summary hub glade template
Add anaconda-summary-hub.glade file, a customized copy of anaconda 45.8's summary.glade without the "We won't touch your disks…" disclaimer label at the bottom of the hub.

This file is placed in a neutral path (usr/local/share/fws/) because mkarchiso applies the airootfs before pacstrap. Placing it at the anaconda package path would cause pacman to refuse installation due to filesystem conflicts. The live environment's .xinitrc copies this file to /usr/share/anaconda/ui/hubs/summary.glade during boot.
2026-07-04 02:52:33 +02:00
nocode e50a2784eb chore(baseline): remove anaconda summary glade file overlay
Delete the customized summary.glade file that was overlaying the anaconda package file. This file was previously used to hide the "We won't touch your disks…" message at the bottom of the installation summary hub.
2026-07-04 02:52:24 +02:00
nocode e354e40800 chore(baseline): add anaconda summary hub glade override in xinitrc
Add logic to override the anaconda summary hub glade file at live boot time. The custom glade file is stored in /usr/local/share/fws and copied to /usr/share/anaconda/ui/hubs/summary.glade during X initialization.

This workaround is necessary because mkarchiso applies the airootfs overlay before pacstrap, which prevents pacman from installing anaconda over existing files. The file is therefore delivered to /usr/local/share/fws and overlaid at boot when the live overlay is writable.
2026-07-04 02:52:18 +02:00
nocode 1de7896333 feat(anaconda): add customized summary glade ui file
Add a customized version of anaconda's summary.glade UI definition file to the baseline airootfs configuration. This file is based on anaconda 45.8 but with the "We won't touch your disks..." label removed from the bottom of the hub, allowing the overlay to mask the original package file without requiring an anaconda rebuild.
2026-07-04 01:07:39 +02:00
nocode 307348e913 chore(releng): remove fws-dnd package from x86_64 build
Remove the fws-dnd package and its associated comment from the x86_64 package list. This package is no longer needed for the release engineering build.
2026-07-04 01:02:50 +02:00
nocode 0f64b45d6c chore(releng): add fws-dnd package to x86_64 configuration
Add fws-dnd (D&D 5e manager for dice, characters, grimoire, sessions, and combat) to the releng packages.x86_64 configuration.
2026-07-04 01:01:27 +02:00
nocode 9b399af847 chore(releng): add pipewire and bluetooth packages to desktop environments
Add PipeWire audio stack (pipewire, pipewire-pulse, wireplumber, pavucontrol)
and Bluetooth support (bluez, bluez-utils, blueman) to xfce and hyprland
package lists to ensure they are installed alongside the desktop environment.

Enable bluetooth.service at installation time for hyprland to have Bluetooth
ready at first boot. Update comments to reflect the new guaranteed installation
of audio and Bluetooth components as part of the desktop environment transaction.
2026-07-04 01:01:20 +02:00
nocode 22435589e5 chore(hyprland): add blueman applet and remove steam keybinding
Add blueman-applet to the exec-once commands for bluetooth management.
Remove the Steam launcher keybinding (SUPER+KP_Multiply) from the configuration.
2026-07-04 01:01:12 +02:00
nocode 4a4ef0e3ea chore(packages): add fws-dnd package to baseline x86_64 configuration
Add the fws-dnd package (D&D 5e Manager for dice, characters, grimoire, sessions, and combat) to the baseline x86_64 packages list under the FWS section.
2026-07-04 01:01:09 +02:00
nocode 076c92078b chore(baseline): update installer preparation message in french
Change the estimated time message from '2 à 4 minutes' to 'Encore une à deux minutes' to provide more accurate timing information to users during the FWS installer preparation phase.
2026-07-04 01:00:53 +02:00
nocode 43d30df8b1 feat(wofi-style): add wofi application menu styling with catppuccin mocha theme
Add a new CSS stylesheet for wofi (application launcher menu triggered with Super+R) that implements the Catppuccin Mocha blue color scheme. The stylesheet includes styling for the window, input field, menu entries, and selection states with rounded corners and appropriate contrast ratios.
2026-07-04 00:26:37 +02:00
nocode c4992483a0 feat(releng): add wofi keyboard shortcuts panel styling
Add CSS stylesheet for the FWS keyboard shortcuts panel (fws-hypr-keys) using monospace font to align key combinations with descriptions. Uses the same color palette as the wofi menu with Catppuccin theme colors.
2026-07-04 00:26:31 +02:00
nocode 06c6270e7f feat(wofi): add wofi application menu configuration
Add wofi configuration file for FWS with settings for case-insensitive search, image support, custom dimensions, and application prompt.
2026-07-04 00:26:27 +02:00
nocode c7a1ea4248 feat(hyprland): add desktop portal and notification support to hyprland setup
Add missing packages for hyprland desktop environment:
- mako + libnotify for notifications
- polkit-gnome for GUI authentication
- network-manager-applet for network management in tray
- xdg-desktop-portal-hyprland for screen sharing
- gvfs for USB mounting in thunar
- ttf-nerd-fonts-symbols for waybar icons

Add start-hyprland launcher support for hyprland ≥0.53 to properly prepare systemd session/environment.

Add wofi configuration files (config and style.css) for application menu styling.

Update skeleton directory setup to install wofi configs for new users and fix chown path formatting.
2026-07-04 00:26:23 +02:00
nocode bf6f0059eb style(waybar): redesign waybar stylesheet with catppuccin mocha theme and pill-style modules
Update waybar-style.css to version 2 with the following changes:

- Switch to Catppuccin Mocha color scheme with blue accents
- Redesign bar as floating rounded container instead of bottom border
- Style modules as pill-shaped boxes with individual backgrounds
- Add Nerd Font symbols support for better icons
- Improve workspace buttons with hover effects and transitions
- Add tooltip styling and proper color coding for each module
- Update clock styling with dedicated background
- Enhance battery, network, and bluetooth status colors
- Refine spacing, padding, and border-radius throughout for modern appearance
2026-07-04 00:26:16 +02:00
nocode 51f4c33fd8 style(waybar): enhance waybar configuration with improved styling and additional modules
Update waybar configuration with:
- Adjusted height (34 to 36) and spacing (4 to 2)
- Added margins (top: 6, left: 10, right: 10)
- Added workspace navigation with scroll (e-1/e+1)
- Added backlight, bluetooth, and battery modules
- Enhanced clock format with calendar styling
- Improved audio controls with pavucontrol integration
- Added network bandwidth display
- Updated all module icons to use modern emoji/nerd font glyphs
- Improved tooltips with more detailed information
- Adjusted max window name length from 55 to 45 characters
2026-07-04 00:26:09 +02:00
nocode 8fa49844db chore(hyprland): add startup services and brightness/blueman window rules
- Add mako notification daemon to startup services
- Add nm-applet for network tray icon
- Add polkit-gnome authentication agent for privilege escalation dialogs
- Add brightness control keybinds for XF86MonBrightnessUp/Down
- Add float window rule for blueman-manager
- Update startup comment to describe all session initialization tasks
2026-07-04 00:26:02 +02:00
nocode 92477b53f3 feat(fws-setup-hardware): add brightnessctl and blueman to base stack
Add brightnessctl for brightness control without root via logind,
consumed by XF86MonBrightness* keys and waybar backlight module.

Add blueman as graphical Bluetooth manager for desktop environments
that don't provide their own (KDE and GNOME have built-in managers).
Blueman provides system tray integration and pairing assistant.

Update comments to clarify the purpose of these new packages.
2026-07-04 00:25:57 +02:00
nocode a2d8d0de0d feat(fws-hypr-keys): add optional style support and adjust wofi dimensions
- Import os module to check for style file existence
- Add _STYLE constant pointing to wofi-keys.css stylesheet
- Increase wofi window dimensions from 780x560 to 820x600
- Conditionally apply custom style if the stylesheet exists
- Refactor wofi command construction for better readability
2026-07-04 00:25:45 +02:00
nocode d0e865b542 fix(syslinux): add udev event timeout to all boot options
Add udev.event_timeout=45 parameter to all APPEND kernel boot options in the syslinux configuration to prevent udev event timeout issues during boot on systems with slow device initialization.
2026-07-04 00:13:13 +02:00
nocode 95547374ff fix(releng): add udev event timeout to speech boot entry
Add udev.event_timeout=45 parameter to the accessibility boot entry to prevent timeout issues during device initialization on systems with slower hardware or many devices.
2026-07-04 00:13:09 +02:00
nocode e440f65e03 fix(efiboot): add udev event timeout to nomodeset boot entry
Add udev.event_timeout=45 parameter to the safe graphics boot option to prevent timeout issues during device initialization on systems with slower hardware or complex device trees.
2026-07-04 00:13:04 +02:00
nocode e07b60293d fix(releng): add udev event timeout to archiso linux boot entry
Add udev.event_timeout=45 kernel parameter to the UEFI boot entry for the archiso linux image. This timeout helps prevent boot delays caused by udev waiting for device events to complete.
2026-07-04 00:12:53 +02:00
nocode 109d45c5fb feat(releng): add uefi boot entry with nomodeset graphics option
Add a new UEFI boot loader entry for Arch Linux installation medium with the nomodeset kernel parameter. This provides a fallback boot option for systems with GPU or hypervisor drivers that have issues with KMS (kernel mode setting), allowing the system to fall back to VESA/EFI framebuffer graphics mode which is slower but more reliable.
2026-07-04 00:00:11 +02:00
nocode 474fe718c0 feat(sddm): add fws login theme for kde xfce and hyprland
Introduce a new SDDM theme "fws" designed for FWS with support for KDE, XFCE, and Hyprland desktop environments.

The theme is built using pure QtQuick and QtQuick.Controls (Basic style) with no additional dependencies beyond what SDDM already requires. It includes:

- Main.qml: Custom login screen with clock, date, user/password fields, session selector, and power controls
- metadata.desktop: Theme metadata and configuration
- theme.conf: Default configuration with customizable accent color and gradient colors

The design uses a dark theme with accent colors and supports capslock detection and login error handling.
2026-07-04 00:00:05 +02:00
nocode 938c4b0756 feat(waybar): add waybar style configuration for fws theme
Add CSS stylesheet for Waybar that matches the FWS theme, SDDM appearance, and Hyprland borders. Includes styling for workspaces, clock, custom key help button, and system status modules with Catppuccin blue accent color (#89b4fa).
2026-07-03 23:59:58 +02:00
nocode 78fcb7e83d feat(waybar): add waybar configuration for hyprland desktop environment
Add waybar panel configuration with modules for workspaces, window title, clock, volume, network, CPU, and memory monitoring. Configured for top panel layout with French localization support.
2026-07-03 23:59:53 +02:00
nocode 137a31e9fe feat(releng): add fws-hypr-keys script to display hyprland keyboard shortcuts
Add a new Python utility script that displays actual Hyprland keyboard shortcuts from hyprctl binds output. The script:

- Queries hyprctl binds to get loaded key bindings from the compositor
- Formats keybinds with human-readable modifiers and key labels (French localization)
- Displays descriptions from bindd config entries or falls back to dispatcher actions
- Opens results in wofi dmenu for incremental search and filtering
- Handles special keys like mouse buttons, arrow keys, and common special keys
- Deduplicates repeated bindings (e.g., from resize actions)

No additional dependencies required beyond python3 and wofi (already in FWS + Hyprland packages).
2026-07-03 23:59:49 +02:00
nocode ce3846b0b3 feat(anaconda): add fws recap glade ui definition
Add new Glade UI definition file for the FWS recap (summary before installation) spoke. This defines the AnacondaStandaloneWindow layout with a scrollable text view to display installation summary information.
2026-07-03 23:59:44 +02:00
nocode 8e4ebaf319 feat(fws): add recap spoke for pre-installation summary
Add FWSRecapSpoke, a standalone spoke that displays a comprehensive summary of user configuration choices and detected hardware before installation begins. The spoke intercepts the installation flow between the SummaryHub and ProgressSpoke, allowing users to review and modify their choices before any disk writes occur.

Features:
- Displays user-selected configuration (language, keyboard, timezone, users, partitioning, desktop, hostname)
- Shows detected hardware (virtualization, GPUs, disks, network status)
- Provides installation flow overview and warnings about automatic partitioning
- Implements back navigation to return to the hub for modifications
- Never marks as completed to ensure proper flow control in anaconda's action queue
2026-07-03 23:59:39 +02:00
nocode a1c39300db fix(setup-aur.sh)!: use explicit package list instead of glob for install and publish
Change publish_to_repo() to accept explicit file list via variadic arguments
instead of a directory glob. This prevents re-publishing stale .pkg files
from previous builds that may still exist in BUILD_DIR.

Update build_or_skip() to get the actual list of packages produced by the
current makepkg invocation using --packagelist, filter for .pkg.tar.* files,
verify they exist on disk, and pass only those to pacman -U and publish_to_repo().

This fixes issues where:
- After pkgrel bumps, old .pkg files would cause pacman to receive duplicate
  package names ("repeated target" error)
- Stale packages would be republished over the purge in local-repo
- Optional debug packages would cause errors when not produced

BREAKING CHANGE: publish_to_repo() function signature changed from publish_to_repo(name, directory) to publish_to_repo(name, file1, file2, ...) - callers must pass explicit file paths instead of a directory path
2026-07-03 23:59:32 +02:00
nocode fbf205aa4c fix(python-meh): fix python 3.11 compatibility by replacing removed gettext.ldgettext
Replace gettext.ldgettext with gettext.dgettext in Anaconda exception handler
since ldgettext was removed in Python 3.11. Without this fix, the exception
handler crashes with AttributeError when trying to display errors, resulting
in raw tracebacks instead of the meh dialog in both GUI and TUI modes.

Also clean up stale __pycache__ directories from previous extractions and
add validation to ensure ldgettext is completely removed.
2026-07-03 23:59:25 +02:00
nocode 5cfe474294 feat(syslinux): add safe graphics boot option with nomodeset kernel parameter
Add a new boot menu entry for FWS without kernel mode setting (KMS) to provide a fallback option for systems where KMS causes issues. This entry uses the nomodeset kernel parameter to force the framebuffer to VESA/EFI mode, which is slower but more reliable for problematic GPU drivers and hypervisors like VMware.
2026-07-03 23:59:20 +02:00
nocode eb8cd6f1f9 chore(releng): add file permissions for fws-hypr-keys script 2026-07-03 23:59:13 +02:00
nocode cc691cd752 refactor(anaconda): clarify payload mechanism and enhance desktop environment configurations
Update interactive-defaults.ks kickstart file with:

- Clarified documentation on LiveOS payload detection and mounting via /run/rootfsbase bind-mount instead of direct liveimg directive
- Added comprehensive comments explaining why liveimg directive is intentionally omitted and how anaconda --liveinst handles payload creation
- Enhanced XFCE and Hyprland package sets with noto-fonts for proper TTF rendering and additional tools (thunar, hyprlock, grim, slurp, wl-clipboard, playerctl)
- Implemented SDDM theme configuration with FWS theme support and accent colors per desktop environment (teal for XFCE, Catppuccin blue for Hyprland, Breeze blue for KDE)
- Added GDM (GNOME) configuration via dconf with welcome banner, clock enhancements, and numlock settings
- Expanded Waybar configuration installation for Hyprland with config and style files
- Added comprehensive documentation for greeter customization and Hyprland VM compatibility
- Included details about FWS recap spoke (standalone GUI summary screen) replacing zenity-based pre-install approach
2026-07-03 23:59:09 +02:00
nocode b54fbeda79 feat(hyprland): expand hyprland config with keybindings, animations, and window rules
Add comprehensive keybinding descriptions using bindd/binde for keyboard shortcut display, implement Catppuccin Mocha color scheme with blue gradient borders, enable animations with custom bezier curve, configure touchpad settings, add blur/shadow configuration for VM compatibility, implement scratchpad support, add screenshot and multimedia key bindings with PipeWire/playerctl integration, and define window floating rules.

Keybindings now match i3/sway FWS configuration with French descriptions that automatically appear in fws-hypr-keys shortcut viewer. Configuration includes multi-screen support, workspace navigation (1-10), window resizing, and various utility bindings.
2026-07-03 23:59:00 +02:00
nocode dc14d0d7ad chore(baseline): add file permissions for selinux and hardware setup scripts
Add executable permissions for load_policy, setstatus, fws-setup-hardware, and fws-hypr-keys scripts in the baseline profile configuration.
2026-07-03 23:58:53 +02:00
nocode 554b784228 chore: remove pycache file 2026-07-03 23:58:48 +02:00
nocode 6280719fcb feat(xinitrc): add anaconda installer improvements and splash screen
Add several improvements to the liveinst installer workflow:

- Expose archiso squashfs at /run/rootfsbase where Anaconda expects to find
  the Live OS image, fixing SourceSetupError crashes
- Display immediate splash screen with zenity during Anaconda startup (2-4 min
  wait time) to provide user feedback and prevent perceived hangs
- Wrap liveinst with dbus-run-session to provide D-Bus session bus, fixing
  GLib.GError crashes from missing ScreenSaver service
- Add hardware summary log output to debug information collection

These changes address three crash scenarios identified during testing and
improve user experience during installer initialization.
2026-07-03 23:58:28 +02:00
nocode 76e89df96a feat(releng): add hardware detection and driver setup script
Add fws-setup-hardware script that automatically detects and installs:
- GPU drivers (NVIDIA, AMD, Intel) based on lspci output
- Hypervisor guest tools (VMware, VirtualBox, QEMU, Hyper-V)
- Audio/mic/headset stack (PipeWire), Bluetooth (BlueZ), containers (Podman)
- Optional desktop stack when non-CLI desktop is selected: Steam, Wine, VR support (Monado/OpenXR), and winboat-bin

The script is integrated into the Anaconda kickstart post-installation phase and is non-blocking to prevent installation failures from missing packages or network issues.

Also update profiledef.sh to set correct permissions (755) for the new script.
2026-06-24 23:32:37 +02:00
nocode dcfbdf80a0 feat(hyprland): add hyprland configuration with keyboard layout injection and vm compatibility
Add Hyprland desktop environment support with:

- New hyprland.conf template with keyboard layout placeholders (__KB_LAYOUT__ and __KB_VARIANT__) that get injected during installation
- Hyprland wrapper script (/usr/local/bin/fws-hyprland) that detects virtual machines and forces software rendering to prevent compositor crashes on virtual GPUs (VMware vmwgfx, VirtualBox)
- Automatic configuration deployment to /etc/skel and existing user home directories
- Refactored keyboard layout detection logic (moved to section 3bis) to support both X11/SDDM and Hyprland configurations
- Added locale generation during installation to ensure proper language support

Keyboard layout is now derived from either kickstart configuration or system locale using langtable, providing consistent keyboard behavior across all desktop environments.
2026-06-24 23:06:20 +02:00
nocode a9955650ef fix(anaconda): improve desktop environment setup and system configuration
- Fix XFCE display manager: replace lightdm-gtk-greeter with sddm for consistency
- Add SDDM numlock initialization for KDE, XFCE, and Hyprland
- Configure X11 keyboard layout from kickstart or locale via langtable to ensure correct SDDM login keyboard
- Enable wheel group sudo access and add all human users to wheel group
- Apply FWS branding to os-release, lsb-release, and GRUB configuration
- Remove inappropriate live system motd file
- Fix DNS resolution: configure systemd-resolved stub resolver with NetworkManager integration to prevent "Limited Connectivity" on first boot
- Reformat case statement for better readability
2026-06-24 19:02:31 +02:00
nocode ab0be38928 feat(anaconda): add desktop environment selection spoke for FWS
Implement a new Anaconda spoke that allows users to select their preferred desktop environment (CLI, GNOME, KDE Plasma, Hyprland, or XFCE) during installation.

The spoke:
- Displays radio buttons for five desktop choices with CLI as the default
- Persists the selection to /tmp/fws-desktop for the kickstart %post script
- Supports revisiting the spoke and resuming previous selections
- Includes a GTK UI definition file (glade) with translatable labels
- Integrates as a SoftwareCategory spoke in the Anaconda installer

The implementation leverages Anaconda's runtime spoke discovery mechanism via the airootfs overlay, avoiding the need to rebuild the anaconda package.
2026-06-24 17:58:52 +02:00
nocode 6b8bc0276a feat(build-offi): add build date to iso filename and prompt for version/variant on host
Refactor version and variant handling to prompt for metadata on the host before entering container, enabling proper terminal display. Pass FWS_ISO_VERSION and FWS_ISO_TAG via environment variables to container.

Add build date (AAAA.MM.JJ format) to the final ISO filename: fws-<version>-<variant>-<AAAA.MM.JJ>.iso

Implement ask_iso_meta_host() function to validate and collect version (major.minor.build) and variant name inputs before containerization. Use sudo -E to preserve environment variables across privilege escalation.

Update ISO metadata prompt logic to skip if already provided, supporting both container execution and native Arch/WSL environments.
2026-06-23 12:50:45 +02:00
nocode f6d88fc80a feat(build): refactor build script with interactive version and variant selection
Replace automatic version reading from VERSION file with interactive prompts for version (major.minor.build) and ISO variant name (e.g., cli, gnome, kde).

Changes:
- Remove automatic VERSION file reading; now serves as default with prompt
- Add interactive prompts for version and variant name with validation
- Simplify ISO naming from FWS-v{major}-{minor}-{build}-{date}-x86_64.iso to fws-{version}-{variant}.iso
- Update hostname from 'archiso' to 'fws'
- Add custom FWS logo for fastfetch with color configuration
- Improve error messages and user feedback

This enables flexible build variants and streamlines the build process.
2026-06-23 11:02:41 +02:00
nocode 693dc970aa feat(anaconda): add hostname field to user spoke and fix keyboard layout by territory
Replace keyboard correction logic in kickstart with anaconda package patches:

- Add "Nom de machine" (hostname) field to the User spoke in anaconda GUI
- user.py writes the hostname value to /tmp/fws-hostname for the kickstart %post
- Simplify kickstart to read from /tmp/fws-hostname instead of live hostname
- Fix keyboard layout selection to use full locale (e.g. fr_CH) instead of just language (fr)
  to correctly derive territory-specific keymaps (ch(fr) for Switzerland, not fr for France)
- Remove outdated fix_keyboard() function from kickstart

Also add --network=host flag to podman run in setup-aur.sh to ensure DNS and internet
connectivity through the host stack instead of the bridge (fixes timeout issues on
certain networks with firewalld/NAT).

Bump anaconda pkgrel from 2 to 4.
2026-06-23 10:48:32 +02:00
nocode cf863ddbc4 fix(releng): correct hostname and keyboard mapping in anaconda post-installation
Fix two bugs in the anaconda post-installation script:

1. Hostname handling: Anaconda writes an empty /etc/hostname to the target system. Now we preserve the hostname set during installation from the live environment, falling back to 'fws' if using default values.

2. Keyboard mapping: Anaconda derives keyboard layout from language only, ignoring territory. For locales with territory variants (e.g., fr_CH for Switzerland), we now apply territory-specific keyboard maps to both console (vconsole.conf) and X11 (xorg.conf.d) using langtable for proper mapping.
2026-06-23 08:40:42 +02:00
nocode cab2b91e22 fix(build): add --network=host to podman run commands for dns connectivity
Add --network=host flag to podman run commands in both build.sh and build-offi.sh to fix DNS resolution issues.

The podman bridge network was unable to route to external hosts on certain wifi networks due to firewalld/NAT misconfiguration after network changes, resulting in "core.db: Resolving timed out" errors. By sharing the host's network stack, the container inherits the same network connectivity including DNS resolution via 127.0.0.53/systemd-resolved that is available on the host.
2026-06-23 08:06:53 +02:00
nocode fcc069df20 feat(anaconda): improve installation process and post-install handling
- Add kernel copy step in %pre to ensure vmlinuz-linux is available for mkinitcpio
- Refactor xinitrc post-install log detection to use /tmp/fws-post-chroot.log copied by kickstart
- Add success detection based on mkinitcpio and grub-install log markers
- Display success screen and poweroff on successful installation, show debug logs on failure
- Add load_policy and setstatus stub scripts to suppress SELinux-related Anaconda warnings
- Force MBR partition table (--disklabel=msdos) for BIOS boot compatibility
- Create standard mkinitcpio preset to replace archiso-specific configuration
- Automatically inject lvm2 hook when root is on LVM
- Fix GRUB installation to properly extract disk path from lsblk output
- Downgrade version to 0.5.3 (development/testing release)
2026-06-22 15:04:41 +02:00
nocode df186f84d9 fix(installer): improve bootloader installation and debug logging
- Add fallback GRUB installation for UEFI systems using --removable flag to ensure boot without NVRAM entries
- Fix BIOS disk detection for LVM root partitions by using lsblk with proper filtering instead of pkname
- Enhance debug logging to include %post chroot phase logs (fws-post.log) which indicate bootloader success
- Automatically mount and retrieve installation logs from the installed disk to verify bootloader installation
- Add detailed comments explaining UEFI/BIOS fallback strategies and LVM-aware disk detection

These changes ensure the system can boot even when NVRAM entries are missing or forgotten by firmware, and provide better visibility into bootloader installation success during the debug phase.
2026-06-19 15:44:18 +02:00
nocode 3fb86eb009 chore(releng): add disk cleanup commands to anaconda kickstart
Add zerombr and clearpart commands to ensure clean disk state before installation.

This prevents issues when reinstalling on previously partitioned disks by:
- Reinitializing invalid partition tables (zerombr)
- Removing all partitions from all disks (clearpart --all)
- Writing a fresh disk label (--initlabel)

This makes reinstallation reliable even on disks with previous installations,
while allowing users to override defaults via the GUI if needed.
2026-06-18 18:41:38 +02:00
nocode 15bcb1b8a1 feat(baseline): add grub2 symlinks for compatibility
Add symbolic links for grub2 commands that point to their grub equivalents. This provides compatibility for systems expecting grub2 command names.

Symlinks created:
- grub2-editenv -> grub-editenv
- grub2-install -> grub-install
- grub2-mkconfig -> grub-mkconfig
- grub2-mkpasswd-pbkdf2 -> grub-mkpasswd-pbkdf2
- grub2-set-default -> grub-set-default
2026-06-17 23:42:19 +02:00
nocode ee924df441 feat(baseline): add locale generation and rootfs mounting infrastructure
Add locale configuration, systemd service for rootfs mounting, and customization script:

- Add locale.gen to generate en_US.UTF-8 locale required by Anaconda
- Add fws-rootfsbase.service to expose squashfs as /run/rootfsbase for Anaconda LiveOS payload detection
- Add customize_airootfs.sh to run locale-gen during image build
- Add python-iso639 0.1.4 PKGBUILD (local package with correct find() API)
- Add python-langtable 0.0.71 PKGBUILD (local package with list_common_languages())
- Remove python-iso639 and python-langtable from AUR packages due to version/API incompatibilities
- Update LOCAL_BUILD_ORDER to include new local packages
2026-06-17 23:32:46 +02:00
nocode 987cbf0f40 feat(anaconda): add python-crypt_r and ostree dependencies for python 3.13+ compatibility
Add python-crypt_r PKGBUILD to provide the crypt module removed in Python 3.13 (PEP 594), required by pyanaconda/core/users.py for password hashing.

Add python-legacy-cgi for the cgi module also removed in Python 3.13, required by python-requests-ftp imported by pyanaconda/core/util.py.

Add ostree to provide the OSTree-1.0 GI namespace required by pyanaconda/rescue.py for the rpm_ostree payload.

Add libblockdev LVM CLI mode configuration to avoid DBus dependency issues with lvmdbusd unavailable in Arch.

Update setup-aur.sh to include python-crypt_r in the local build order before python-meh.
2026-06-17 18:35:12 +02:00
nocode eaf341cd48 feat(anaconda): integrate anaconda installer with openbox and add licensing documentation
Add Anaconda installer integration to FWS live environment:

- Implement Anaconda launcher in .xinitrc with comprehensive error logging and debugging support
- Add anaconda and anaconda-widgets packages to baseline and releng ISO configs
- Fix anaconda-widgets PKGBUILD: replace gladeui with glib2-devel, disable Glade module
- Update anaconda PKGBUILD with improved dependencies and build configuration
- Add python-blivet PKGBUILD with detailed dependency documentation

Enhance documentation and branding:

- Expand AUTHORS.rst to clarify FWS vs archiso authorship and licensing
- Update CONTRIBUTING.rst with inbound=outbound licensing policy and DCO requirements
- Extend README.md with comprehensive legal basis table and licensing checklist
- Remove Arch Linux references from MOTD and update to FWS GitHub project page
- Fix fastfetch.sh to avoid read-only variable conflict in zsh
- Add xterm to packages for installer debugging

All changes maintain GPL-3.0-or-later compliance and improve GPL offer transparency.
2026-06-17 15:45:15 +02:00
nocode b76f014996 docs: add licensing and compliance documentation
Add comprehensive FOSS compliance documentation including:
- COPYRIGHT.md: copyright holders and code ownership
- LICENSING.md: GPL-3.0-or-later policy and source offer
- NOTICE: attribution requirements for permissive licenses
- THIRD-PARTY-LICENSES.md: third-party software inventory
- TRADEMARKS.md: trademark notices and non-affiliation
- os-release hook and files: identify FWS as separate from Arch Linux

These documents establish legal compliance baseline for GPL/AGPL/Apache/MIT/BSD obligations before public distribution.
2026-06-17 15:18:39 +02:00
nocode f63b377313 fix(setup-aur): fix variable expansion order in build_or_skip function
Fixed a bash variable expansion bug where $name was being referenced before assignment in a multi-variable local declaration. Changed d assignment to use $1 directly instead of $name to ensure the correct directory path is set. This prevents PKGBUILD lookup failures when processing dependent packages in AUR chains.
2026-06-17 13:42:08 +02:00
nocode 6d000032ec refactor(setup-aur): implement incremental build system for AUR and local packages
Replace the full rebuild approach with an incremental system that skips packages already present in local-repo at the same version. This provides significant performance improvement when iterating on individual packages.

Key changes:
- Add helper functions: pkgbuild_fullver(), repo_has(), publish_to_repo(), and build_or_skip()
- Use shallow git clones (--depth=1) for AUR packages to reduce download time
- Skip package builds if already present in local-repo with matching version
- Always install packages to resolve inter-package dependencies (AUR→AUR chains, anaconda, etc.)
- Consolidate local PKGBUILD building with the new incremental system
- Regenerate only the repo database instead of copying all packages each run
- Update step 4 to regenerate repo database from existing packages in local-repo
2026-06-17 13:21:52 +02:00
nocode d4128ceed4 feat(pkgbuild): add anaconda and anaconda-widgets packages with dependency ordering
Add PKGBUILD files for anaconda (45.8) and anaconda-widgets (45.8) to support Fedora's Anaconda installer ported to Arch for FWS with liveimg payload.

anaconda-widgets:
- GTK3 UI widgets with GObject introspection
- Extracted from anaconda source as autonomous autotools project
- Versioned on anaconda release

anaconda:
- Main installer with comprehensive dependency set
- Includes note that further iteration needed on real Arch for buildtime deps and Fedora-specific paths
- Removes widgets files (provided by anaconda-widgets package)

Update setup-aur.sh to build local packages in proper dependency order:
- Define LOCAL_BUILD_ORDER array to ensure leaf packages build first
- anaconda builds last (depends on all other local packages)
- Extract build logic into build_local_pkg function
- Fallback to alphabetical scan for future unlisted packages
- This prevents makepkg -s failures when deps are not yet installed
2026-06-17 11:24:10 +02:00
nocode 72636b648f feat(pkgbuilds): add anaconda dependencies packaging
Add PKGBUILD files for four Anaconda installer dependencies:
- pykickstart: Kickstart language parser (>= 3.73)
- python-blivet: Storage management abstraction layer
- python-productmd: OS product metadata parsers
- python-requests-file: file:// URL transport adapter for requests

These packages are required by rhinstaller but absent from Arch repos and AUR.
All use manual module installation to avoid unnecessary build dependencies.

Also fix .gitignore by removing pkgbuilds/ exclusion to allow tracking these new packages.
2026-06-17 11:15:53 +02:00
nocode d872bebc4c feat(build): add podman container support for non-arch linux distributions
Add automatic detection and relaunching of build scripts in an Arch Linux container via podman when running on non-Arch distributions (Fedora, Ubuntu, Debian, etc.).

Key changes:
- Implement host_is_arch() function to detect if running on Arch Linux by checking both pacman availability and /etc/os-release
- When non-Arch host is detected, scripts automatically pull docker.io/library/archlinux:latest and relaunch themselves in rootful podman container with --privileged
- Mount repository at same absolute path inside container so WORK_DIR and out/ directories work transparently
- Set up persistent pacman cache volume (fws-pacman-cache) between runs
- Auto-chown output files back to host user after build completes
- Update pacman config to disable landlock sandbox in containers (similar to WSL workaround)
- Run full pacman -Syu upgrade in container before installing archiso to avoid partial upgrade issues
- Add comprehensive documentation in README about Fedora/non-Arch setup
- Update .gitignore to exclude pkgbuilds/ directory
- Add environnement.md documentation file
2026-06-17 11:05:59 +02:00
nocode 722ca48064 chore: migrate from calamares to anaconda installer
Remove Calamares compilation and configuration, replace with Anaconda installer setup.

Changes:
- Remove Calamares-related entries from .gitignore
- Update README with migration status from Calamares to Anaconda
- Rename setup-calamares.sh references to setup-aur.sh
- Remove Calamares packages from package lists
- Add anaconda and liveimg payload packages
- Add Anaconda kickstart configuration (interactive-defaults.ks)
- Update boot sequence documentation: remove Calamares desktop selection, simplify to Openbox live environment
- Remove Calamares-specific troubleshooting entries
- Clean up .xinitrc and .zlogin to remove Calamares launcher
- Update build scripts to reference local repo generically instead of Calamares-specific
2026-06-17 10:33:28 +02:00
nocode 6befd049dc feat(Anaconda): Local Repo 2026-06-13 02:06:34 +02:00
nocode fbc5a9c872 refactor(Anaconda)! : Changing the installator to Anaconda
'cause Calamares is a way to difficult for what we want and we want to try something else
2026-06-12 23:31:35 +02:00
nocode 639282fd38 fix(Calamares): Installater will ask the desktop env before the calamares install
- The installer is still W.I.P
2026-06-04 23:30:33 +02:00
nocode 76f5ca97d9 fix(Multi-Desktop Hyperland): Fix some bugs of hyperland 2026-05-28 22:42:57 +02:00
nocode 938b3a3f0e refactor(INSTALLATION MD): Explain the installation precisly 2026-05-28 22:41:32 +02:00
nocode f087e22eed docs(ENV): Explain the environnement needed to build the .ISO 2026-05-28 22:40:24 +02:00
nocode 742cf441bb fix(Installer ─ Multi-Desktop): Fix Multi Desktop 2026-05-28 18:00:25 +02:00
nocode 5a1d57a329 docs(ReadMe): Refactor of the ReadMe.MD 2026-05-28 01:03:30 +02:00
nocode 0d1d13255a chore(Installer-MultiDesktop): Save to be able to work somewhere else 2026-05-28 00:41:11 +02:00
nocode 2f134344c7 fix(Installer-MultiDesktop): Fix the Multi Desktop Env you can now choose and use a desktop environnement 2026-05-27 23:21:53 +02:00
nocode be92659b37 feat(Installer): Add Multi Desktop environnement in the installer to allow the user to choose wich desktop env 2026-05-27 19:22:42 +02:00
BlackAngelTV f1c1947158 feat: multi environnemnt desktop
[180][WIP]
2026-05-27 16:02:05 +02:00
BlackAngelTV 58a1baaf7e feat: install and Xfce
[50][DONE]
2026-05-27 10:21:41 +02:00
nocode 5681b005d6 fix(Installer): fix the whole installer now its finishing the installation 2026-05-26 23:48:54 +02:00
nocode 45b1a5c803 build(calamares): update calamares configuration and enable networkmanager on live 2026-05-26 15:05:12 +02:00
nocode 36e7822360 docs(readme): replace rst readme with markdown fws documentation 2026-05-26 14:38:23 +02:00
nocode b30fcf0751 build(packages): add winboat-bin and normalize package lists 2026-05-26 14:23:43 +02:00
nocode 2f1696e036 Migration of FWS from Github 2026-04-02 15:32:15 +02:00
281 changed files with 25733 additions and 46842 deletions

No files matched your search

-30
View File
@@ -1,30 +0,0 @@
name: Probe runner
on:
workflow_dispatch:
jobs:
probe:
runs-on: arch-host
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Probe
run: |
set -e
echo "PWD=$PWD"
ls | head
sudo pacman -Sy --needed --noconfirm --quiet docker
docker run --rm --privileged -v "$PWD:$PWD" -w "$PWD" archlinux:latest sh -c '
ls | head
test -f release.sh && echo REPO_VISIBLE
'
echo marker > from-job.txt
docker run --rm --privileged -v "$PWD:$PWD" -w "$PWD" archlinux:latest sh -c '
cat from-job.txt && echo READ_BACK_OK
echo from-container > from-container.txt
'
echo "--- back in job"
cat from-container.txt
rm -f from-job.txt from-container.txt
-144
View File
@@ -1,144 +0,0 @@
name: Release
# Publishes a new version line: official build, then the release on Gitea and
# on GitHub with the ISO attached.
#
# Triggered when VERSION changes on Main (any push that touches VERSION fires
# it, even alongside other files: the path filter is an OR), and manually from
# the Actions tab.
on:
push:
branches: [Main]
paths:
- VERSION
workflow_dispatch:
inputs:
variant:
description: "Étiquette de l'ISO (multi = tous les bureaux, le choix se fait à l'installation)"
required: false
default: multi
force:
description: "Publier même sans changement de ligne de version"
type: boolean
default: false
dry_run:
description: "Vérifier la chaîne sans builder ni publier"
type: boolean
default: false
build_only:
description: "Builder l'ISO sans publier (valide mkarchiso sur le runner)"
type: boolean
default: false
# One release at a time: a build holds root, loop devices and ~20 min.
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
# Organisation runners: labels arch-host, ubuntu-latest, debian, alpine.
# Jobs run in an unprivileged Arch container (mount denied, no user
# namespaces), so build-offi.sh builds in a privileged archlinux container
# through the host's Docker socket.
runs-on: arch-host
timeout-minutes: 180
steps:
- name: Récupérer le dépôt avec ses tags
uses: actions/checkout@v4
with:
# The version-line rule reads the released tags.
fetch-depth: 0
- name: Git — accepter le dépôt monté par le runner
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" || true
- name: Faut-il publier ?
id: check
env:
FORCE: ${{ inputs.force }}
run: |
# The version-line rule reads the released tags: a checkout without
# them (fetch-depth: 0 dropped) would see every VERSION as a new line
# and publish a patch release.
[ -n "$(git tag -l)" ] \
|| { echo "::error::aucun tag dans le checkout — fetch-depth: 0 est requis"; exit 1; }
if [ "${FORCE}" = "true" ]; then
./release.sh --check --force
else
./release.sh --check
fi
- name: Outils du runner (docker)
if: steps.check.outputs.publish == 'true' || inputs.build_only
run: |
# The job runs in an unprivileged container: mount() is denied and
# user namespaces are off. build-offi.sh detects that and runs
# mkarchiso in a privileged archlinux container through the host
# Docker socket, so only the Docker CLI is needed here.
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
"${SUDO[@]}" pacman -S --needed --noconfirm --quiet docker
- name: Pré-vol du runner
if: steps.check.outputs.publish == 'true' || inputs.build_only
run: |
for c in bash curl jq git pacman docker; do
command -v "${c}" >/dev/null 2>&1 \
|| { echo "::error::${c} absent du runner"; exit 1; }
done
# build-offi.sh elevates itself once, to install packages and drive
# Docker; the build itself runs as root in the privileged container.
[ "$(id -u)" -eq 0 ] || sudo -n true 2>/dev/null \
|| { echo "::error::sudo sans mot de passe requis (installation des paquets) "; exit 1; }
# The privileged container is the only place where mount() works:
# prove the socket and a mount now, not after 20 minutes of build.
[ -S /var/run/docker.sock ] \
|| { echo "::error::/var/run/docker.sock absent : impossible de lancer le conteneur de build"; exit 1; }
if ! MOUNT_ERR="$(docker run --rm --privileged archlinux:latest \
sh -c 'mount -t tmpfs tmpfs /mnt && umount /mnt' 2>&1)"; then
echo "::error::le conteneur de build ne peut pas monter : ${MOUNT_ERR}"
exit 1
fi
- name: Build officiel et publication
if: steps.check.outputs.publish == 'true' || inputs.build_only
env:
GITEA_TOKEN: ${{ secrets.FWS_GITEA_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FWS_GITHUB_TOKEN }}
VARIANT: ${{ inputs.variant || 'multi' }}
DRY_RUN: ${{ inputs.dry_run }}
BUILD_ONLY: ${{ inputs.build_only }}
run: |
if [ "${DRY_RUN}" = "true" ]; then
# Same preflight and notes as a real run, without the build or any
# publication: how the chain is validated after a change.
./release.sh --dry-run --variant "${VARIANT}"
elif [ "${BUILD_ONLY}" = "true" ]; then
# Proves the official build works on this runner and touches
# neither forge. The ISO itself is thrown away with the workspace.
FWS_ISO_VERSION="$(cat VERSION)" FWS_ISO_TAG="${VARIANT}" ./build-offi.sh
else
./release.sh --variant "${VARIANT}"
fi
- name: Résumé
if: steps.check.outputs.publish == 'true' || inputs.build_only
run: |
[ -n "${GITHUB_STEP_SUMMARY:-}" ] || exit 0
{
echo "### FWS $(cat VERSION)"
echo ""
echo "ISO : $(ls -1t out/v*/v*/*.iso 2>/dev/null | head -1)"
} >> "${GITHUB_STEP_SUMMARY}"
- name: Rendre le workspace au runner
if: always()
run: |
# The build runs as root: its artifacts stay root-owned in the
# workspace, and act_runner then fails to clean it up and cannot check
# the repository out for the next run. Hand them back unconditionally.
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
"${SUDO[@]}" chown -R "$(id -u):$(id -g)" . 2>/dev/null || true
rm -rf out
-1
View File
@@ -1,7 +1,6 @@
out/ out/
.freebuff .freebuff
local-repo/ local-repo/
remote-repo/
configs/baseline/airootfs/etc/systemd/system/multi-user.target.wants/ configs/baseline/airootfs/etc/systemd/system/multi-user.target.wants/
configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/ configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/
+3 -3
View File
@@ -1,12 +1,12 @@
# AGENTS.md — Instructions pour les agents IA # AGENTS.md — Instructions pour les agents IA
> Fichier de référence pour les agents IA (Codebuff, Cursor, Claude Code, GitHub Copilot…) qui travaillent sur un dépôt de l'organisation **FWS**. Un agent doit lire ce fichier en premier : il contient les instructions à respecter. Le `README.md` présente l'organisation et le `CONTRIBUTING.rst` détaille les conventions de collaboration. > Fichier de référence pour les agents IA (Codebuff, Cursor, Claude Code, GitHub Copilot…) qui travaillent sur un dépôt de l'organisation **FWS**. Un agent doit lire ce fichier en premier : il contient les instructions à respecter. Le `README.md` présente l'organisation et le `CONTRIBUTING.md` détaille les conventions de collaboration.
## Contexte ## Contexte
- **FWS** est une organisation open source multi-projets : chaque projet choisit librement sa stack technique (sans restriction de langage). - **FWS** est une organisation open source multi-projets : chaque projet choisit librement sa stack technique (sans restriction de langage).
- Projet principal : **FWS ISO** — une distribution Linux basée sur Arch Linux, pensée pour simplifier l'installation et l'usage au quotidien. - Projet principal : **FWS ISO** — une distribution Linux basée sur Arch Linux, pensée pour simplifier l'installation et l'usage au quotidien.
- Conventions détaillées : `CONTRIBUTING.rst`. - Conventions détaillées : `CONTRIBUTING.md` (FR) / `CONTRIBUTING.en.md` (EN).
## Règles à respecter ## Règles à respecter
@@ -51,7 +51,7 @@
## Bonnes pratiques pour un agent ## Bonnes pratiques pour un agent
- Lire `AGENTS.md`, le `README.md` et le `CONTRIBUTING.rst` avant d'éditer du code. - Lire `AGENTS.md`, le `README.md` et le `CONTRIBUTING.md` avant d'éditer du code.
- Les commits doivent être signés. - Les commits doivent être signés.
- Faire les changements les plus petits possibles qui répondent à la demande. - Faire les changements les plus petits possibles qui répondent à la demande.
- Ne pas pousser, fusionner ni publier sans demande explicite de l'utilisateur. - Ne pas pousser, fusionner ni publier sans demande explicite de l'utilisateur.
+19 -45
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) - **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 - **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 - **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 (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* - **Boot** : UEFI (systemd-boot) + 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) - **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) - **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 ## Ce qu'il y a dans FWS
### À l'installation ### À l'installation
- **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 - **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
- **É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 - **É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 - **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 - **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
@@ -54,7 +54,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
### Sur le système installé (outillage `fws-*`) ### Sur le système installé (outillage `fws-*`)
| Commande | Rôle | Accès | | Commande | Rôle | Accès |
|---|---|---| |---|---|---|
| `fws-hello` | Bienvenue au 1er démarrage (mise à jour, « Pilotes et matériel », Proton-GE, raccourcis) | auto au 1er login | | `fws-hello` | Bienvenue au 1er démarrage (mise à jour, codecs, Proton-GE, VR, raccourcis) | auto au 1er login |
| `fws-wallpaper` | Fond d'écran FWS au **premier démarrage** — image embarquée dans l'ISO (aucun téléchargement) ; le choix fait ensuite par l'utilisateur n'est jamais écrasé (`--force` pour le reposer), et le premier login réessaie jusqu'à **20 min** si le bureau n'est pas prêt | auto au 1er login, `fws-wallpaper --force`, `fws-wallpaper --status`, `--wait <minutes>` | | `fws-wallpaper` | Fond d'écran FWS au **premier démarrage** — image embarquée dans l'ISO (aucun téléchargement) ; le choix fait ensuite par l'utilisateur n'est jamais écrasé (`--force` pour le reposer), et le premier login réessaie jusqu'à **20 min** si le bureau n'est pas prêt | auto au 1er login, `fws-wallpaper --force`, `fws-wallpaper --status`, `--wait <minutes>` |
| `fws-update` | Mise à jour complète (pacman + cache + orphelins + flatpak) | bouton 󰚰 de la barre | | `fws-update` | Mise à jour complète (pacman + cache + orphelins + flatpak) | bouton 󰚰 de la barre |
| `fws-keys` | Panneau des **raccourcis clavier réels** (lit la config Hyprland/i3) | `Super+K`, bouton ⌨ | | `fws-keys` | Panneau des **raccourcis clavier réels** (lit la config Hyprland/i3) | `Super+K`, bouton ⌨ |
@@ -65,6 +65,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
| `fws-drivers` | **« Pilotes et matériel »** : installation simple ou avancée des pilotes et de la stack matérielle, plus « vérifier et réparer seulement ». S'ouvre tout seul au 1er démarrage s'il reste quelque chose à proposer | auto au 1er démarrage, menu d'applications | | `fws-drivers` | **« Pilotes et matériel »** : installation simple ou avancée des pilotes et de la stack matérielle, plus « vérifier et réparer seulement ». S'ouvre tout seul au 1er démarrage s'il reste quelque chose à proposer | auto au 1er démarrage, menu d'applications |
| `fws-setup-hardware` | Le **moteur** derrière la fenêtre ci-dessus, utilisable seul : `--plan`, `--all`, `--groups a,b`, `--unattended`, `--check` | terminal | | `fws-setup-hardware` | Le **moteur** derrière la fenêtre ci-dessus, utilisable seul : `--plan`, `--all`, `--groups a,b`, `--unattended`, `--check` | terminal |
| `fws-intel-rst` | Disques derrière un contrôleur Intel VMD/RST : `--detect`, `--ensure`, `--enable`, `--persist` | terminal, appelé par l'installateur | | `fws-intel-rst` | Disques derrière un contrôleur Intel VMD/RST : `--detect`, `--ensure`, `--enable`, `--persist` | terminal, appelé par l'installateur |
| `fws-vr-setup` | Drivers/runtimes VR (Vive/Index → SteamVR natif ; Quest → ALVR ; Monado) | `Super+Shift+V` (i3), menu |
| `fws-proton-ge` | Installe/actualise Proton-GE pour Steam (vérif sha512) | fws-hello, terminal | | `fws-proton-ge` | Installe/actualise Proton-GE pour Steam (vérif sha512) | fws-hello, terminal |
| `fws-recovery` | **Application GTK de réparation** : GRUB, initramfs, pacman, terminal chroot (moteur bash + repli console) | menu « Récupération FWS » de l'OS installé, entrée GRUB « Réparer FWS », entrée de boot du live | | `fws-recovery` | **Application GTK de réparation** : GRUB, initramfs, pacman, terminal chroot (moteur bash + repli console) | menu « Récupération FWS » de l'OS installé, entrée GRUB « Réparer FWS », entrée de boot du live |
| `fws-desktop-retry` *(généré à l'install)* | (Ré)installe le bureau choisi et active le display manager — appelé automatiquement par `fws-desktop-finalize.service` au 1er démarrage si l'install du bureau a échoué ; `--auto` bascule sur l'écran de connexion sans reboot | auto au 1er boot si échec, sinon `sudo fws-desktop-retry` | | `fws-desktop-retry` *(généré à l'install)* | (Ré)installe le bureau choisi et active le display manager — appelé automatiquement par `fws-desktop-finalize.service` au 1er démarrage si l'install du bureau a échoué ; `--auto` bascule sur l'écran de connexion sans reboot | auto au 1er boot si échec, sinon `sudo fws-desktop-retry` |
@@ -215,16 +216,18 @@ Détails utiles :
Depuis **Git Bash sur Windows** (à la racine du repo) : Depuis **Git Bash sur Windows** (à la racine du repo) :
```bash ```bash
# Build de l'ISO via mkarchiso # Étape 1 : compilation des paquets AUR + PKGBUILD locaux
# → fusionne configs/releng + configs/baseline # (PacManager, anaconda porté sur Arch + ses dépendances python)
# → paquets FWS (PacManager, anaconda porté sur Arch + ses dépendances python) # → crée local-repo/ avec les .pkg.tar.zst
# tirés du dépôt distant [fws] (https://repo.laxacube.ch/x86_64) ./setup-aur.sh
# → sort l'ISO dans ./out/
# É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.sh ./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`. L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
--- ---
@@ -237,19 +240,13 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`.
4. **`pacman -Syu`** complet (obligatoire — sinon `makepkg` plante sur les "conflicting files" lors des splits de paquets type `gcc-libs`). 4. **`pacman -Syu`** complet (obligatoire — sinon `makepkg` plante sur les "conflicting files" lors des splits de paquets type `gcc-libs`).
5. **Install des outils de build** : `base-devel git`. 5. **Install des outils de build** : `base-devel git`.
6. **Création d'un utilisateur `fwsbuild`** non-root avec `sudo` NOPASSWD (makepkg refuse de tourner en root). 6. **Création d'un utilisateur `fwsbuild`** non-root avec `sudo` NOPASSWD (makepkg refuse de tourner en root).
7. **Clone + build AUR** : `broadcom-wl-dkms` et les paquets de `AUR_PACKAGES` via `makepkg -s --noconfirm`. Les paquets FWS (anaconda et ses deps, fws-dnd, fws-pacmanage) ne sont plus construits ici : ils viennent du dépôt distant `[fws]` déclaré dans le `pacman.conf` du profil. Le build est **incrémental** : un paquet déjà présent dans `local-repo/` à la bonne version est sauté. 7. **Clone + build AUR** : `broadcom-wl-dkms` et les paquets de `AUR_PACKAGES` via `makepkg -s --noconfirm`, plus les PKGBUILD locaux de `pkgbuilds/` (fws-pacmanage → PacManager 1.6.2, anaconda, anaconda-widgets, pykickstart, blivet, python-meh patché…). Le build est **incrémental** : un paquet déjà présent dans `local-repo/` à la bonne version est sauté.
- **Si l'AUR est injoignable**, chaque clonage a une seconde chance, puis le paquet déjà construit dans `local-repo/` est réutilisé. Le script n'abandonne que si le paquet est réellement absent. Un réseau qui bronche ne coûte plus les dix minutes de préparation pacman qui précèdent. - **Si l'AUR est injoignable**, chaque clonage a une seconde chance, puis le paquet déjà construit dans `local-repo/` est réutilisé. Le script n'abandonne que si le paquet est réellement absent. Un réseau qui bronche ne coûte plus les dix minutes de préparation pacman qui précèdent.
- **`broadcom-wl-dkms` est construit mais PAS installé** sur la machine de build : il blackliste `b43`/`bcma`/`ssb` pour tout le système et compilerait un module contre le noyau du conteneur. Sur un run Arch natif, l'installer couperait le Wi-Fi de ta propre machine. - **`broadcom-wl-dkms` est construit mais PAS installé** sur la machine de build : il blackliste `b43`/`bcma`/`ssb` pour tout le système et compilerait un module contre le noyau du conteneur. Sur un run Arch natif, l'installer couperait le Wi-Fi de ta propre machine.
8. **Création du repo local** : `repo-add local-repo/fws-local.db.tar.gz`. 8. **Création du repo local** : `repo-add local-repo/fws-local.db.tar.gz`.
9. **Cleanup** : suppression de l'utilisateur `fwsbuild`. 9. **Cleanup** : suppression de l'utilisateur `fwsbuild`.
**Durée** : quelques minutes en incrémental ; le premier build complet des paquets AUR est plus long. **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>`.
--- ---
@@ -260,11 +257,10 @@ Le dépôt distant est partagé avec d'autres projets (fws-deskmanager, fws-kitt
3. **Install `archiso`**. 3. **Install `archiso`**.
4. **Fusion configs** : `cp -ar configs/releng/* /tmp/fws-build/releng/` puis overlay `configs/baseline/*` par-dessus (baseline prioritaire). 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/`). 5. **Activation NetworkManager** sur le live (symlink réel `multi-user.target.wants/`).
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. 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 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é. 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.
8. **`dos2unix`** sur l'arborescence (au cas où tu as édité depuis Windows). 8. **`dos2unix`** sur l'arborescence (au cas où tu as édité depuis Windows).
9. **Firmwares jamais chargés** : `scripts/firmware-noextract.py` lit, dans le paquet `linux` qui sera installé, les firmwares que déclarent `iwlwifi` (Wi-Fi Intel) et `nouveau` (GSP NVIDIA), et ajoute au `pacman.conf` de build un `NoExtract` pour les versions plus anciennes que celle que le noyau chargera (~90 Mio). En cas d'échec, l'ISO garde simplement ces fichiers. 9. **`mkarchiso -v -w /tmp/fws-build/work -o out/ /tmp/fws-build/releng`**.
10. **`mkarchiso -v -w /tmp/fws-build/work -o out/ /tmp/fws-build/releng`**.
10. **Cleanup** du workdir. 10. **Cleanup** du workdir.
**Durée** : 5–15 minutes selon la machine et le cache pacman. **Durée** : 5–15 minutes selon la machine et le cache pacman.
@@ -289,13 +285,9 @@ Le dépôt distant est partagé avec d'autres projets (fws-deskmanager, fws-kitt
| `configs/releng/` | Profil principal (base ArchISO releng) | | `configs/releng/` | Profil principal (base ArchISO releng) |
| `configs/baseline/` | Overlay FWS (surcharge le profil releng) — **prioritaire** sur releng | | `configs/baseline/` | Overlay FWS (surcharge le profil releng) — **prioritaire** sur releng |
| `local-repo/` | Repo pacman local (généré par `setup-aur.sh`) | | `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 | | `out/` | ISOs générées |
| `fws/mkarchiso` | Binaire `mkarchiso` embarqué (fork) | | `fws/mkarchiso` | Binaire `mkarchiso` embarqué (fork) |
| `scripts/run_archiso.sh` | Lanceur QEMU | | `scripts/run_archiso.sh` | Lanceur QEMU |
| `scripts/check-translations.py` | Contrôle des deux fichiers de traductions (lancé par `build.sh`) |
| `scripts/firmware-noextract.py` | Liste les versions de firmware que le noyau de l'ISO ne charge jamais (lancé par `build.sh`) |
--- ---
@@ -328,23 +320,6 @@ Le dépôt distant est partagé avec d'autres projets (fws-deskmanager, fws-kitt
- **Swap zram** (live + installé) : `configs/releng/airootfs/etc/systemd/zram-generator.conf` (paquet `zram-generator`) - **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) - **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
Anaconda, les bureaux et leurs applications se traduisent eux-mêmes. Tout ce que FWS ajoute, plus les trous des catalogues d'Anaconda, vient de **trois fichiers** dans `configs/baseline/airootfs/usr/local/share/fws/` :
| Fichier | Contenu |
|---|---|
| `installer-translations.toml` | Écrans FWS de l'installateur (Connexion, Prise en charge du disque, Bureau, Récapitulatif, Précédent/Suivant), messages de progression, fenêtres de fin d'installation |
| `system-translations.toml` | Outils FWS du système installé (`fws-hello`, `fws-drivers`, `fws-setup-hardware`, `fws-update`, `fws-keys`…), écran de connexion SDDM, entrées de menu, demande de mot de passe polkit, libellés des barres i3/Hyprland |
| `anaconda-translations.toml` | Textes d'**Anaconda lui-même** absents de ses catalogues (écrans date, disque, utilisateur, root, dialogues) pour les langues qu'Anaconda couvre à 40 % ou plus. Ajoutés à `anaconda.mo` au build par `usr/local/lib/fws/merge-anaconda-translations.py`, sans jamais remplacer une traduction d'Anaconda |
- **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.
- **La langue suit l'environnement**, dans l'ordre de gettext (`LANGUAGE`, `LC_ALL`, `LC_MESSAGES`, `LANG`), et `/etc/locale.conf` si aucune n'est définie (outils relancés par `sudo`). Dans l'installateur, c'est la langue du premier écran, et chaque écran relit ses textes à chaque affichage : revenir changer de langue retraduit tout le parcours. Sur le système installé, changer la langue du bureau change celle des outils FWS.
- **Côté code** : le module est `usr/local/lib/fws/fws_i18n.py` (hors du dossier d'Anaconda, qui suit la version de Python). Python : `catalog("system").t("clé", champ=valeur)` (`t()` seul pour l'installateur). Bash : `. /usr/local/lib/fws/i18n.sh <espaces de noms>` charge les textes en un appel, puis `$(t clé champ=valeur)`. Le `%post` passe des clés (`fws-install-step 32 fws:progress.desktop`) que l'écran de progression traduit ; `fws-i18n [--catalog system] <clé>` affiche un texte.
- **Fichiers qui ne savent pas lire le catalogue** : les entrées de menu (`X-FWS-Translation=<préfixe>`), le thème SDDM (`translations.js`) et la politique polkit (`<!-- fws-i18n: <préfixe> -->`) reçoivent toutes les langues au build (`usr/local/lib/fws/translate-static-files.py`, lancé par `customize_airootfs.sh`). Les configs waybar, polybar et i3 portent des marqueurs `{{t:clé}}` que le `%post` remplace dans la langue choisie à l'installation.
- **Avant le choix de la langue** (alerte mémoire, écran d'attente du `.xinitrc`), les textes sont en anglais.
- **Contrôle** : `python3 scripts/check-translations.py` vérifie les trois fichiers (anglais présent, mêmes `{champs}` dans chaque langue, aucune clé utilisée par le code sans traduction, aucun espace de noms partagé entre les deux) 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 : > ⚠ **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 > ```bash
> comm -12 <(cd configs/baseline && find . -type f | sort) <(cd configs/releng && find . -type f | sort) > comm -12 <(cd configs/baseline && find . -type f | sort) <(cd configs/releng && find . -type f | sort)
@@ -360,8 +335,7 @@ Anaconda, les bureaux et leurs applications se traduisent eux-mêmes. Tout ce qu
| `WSL introuvable` | WSL n'est pas installé. PowerShell admin : `wsl --install`, puis installe une distro Arch. | | `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. | | `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`. | | `makepkg: conflicting files` | `pacman -Syu` incomplet avant le build. 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. | | `mkarchiso` plante sur `[fws-local]` | Le repo local n'a pas été généré. Relancer `setup-aur.sh`. |
| `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. | | É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. | | 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`. | | 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`. |
+1 -1
View File
@@ -1 +1 @@
0.9.0 0.8.1
+29 -108
View File
@@ -3,8 +3,8 @@
# FWS — Build OFFICIEL versionné de l'ISO (archiso) # FWS — Build OFFICIEL versionné de l'ISO (archiso)
# #
# IDENTIQUE à build.sh (même bascule conteneur/WSL, --network=host, fusion # IDENTIQUE à build.sh (même bascule conteneur/WSL, --network=host, fusion
# baseline, MÊMES paquets FWS tirés du dépôt distant [fws] → donc même paquet # baseline, MÊME injection local-repo → donc même paquet anaconda avec le champ
# anaconda avec le champ Hostname), avec EN PLUS uniquement le RENOMMAGE : # Hostname), avec EN PLUS uniquement le RENOMMAGE :
# - demande la version (major.minor.build) + le nom de variante, le fichier # - demande la version (major.minor.build) + le nom de variante, le fichier
# VERSION servant de défaut, # VERSION servant de défaut,
# - nomme l'ISO fws-<version>-<nom>.iso (ex. fws-1.5.0-cli.iso), # - 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. # 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)" OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
if [ -n "$OWNER" ]; then if [ -n "$OWNER" ]; then
for d in out; do for d in out local-repo; do
[ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true [ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true
done done
fi fi
@@ -227,60 +227,6 @@ if [ "$EUID" -ne 0 ]; then
fi fi
fi fi
# ── Conteneur sans CAP_SYS_ADMIN : builder via le Docker de l'hôte ──────────
# A Gitea runner runs jobs in an unprivileged container: mount() is denied and
# user namespaces are off, so mkarchiso cannot build in place. The host Docker
# socket is mounted though: re-run the build in a privileged archlinux
# container, streaming the tree in and the ISO out. A bind mount would not do:
# the runner workspace is not a path on the Docker host.
can_mount() {
local mp
mp="$(mktemp -d)" || return 1
if mount -t tmpfs tmpfs "$mp" 2>/dev/null; then
umount "$mp" 2>/dev/null
rmdir "$mp" 2>/dev/null
return 0
fi
rmdir "$mp" 2>/dev/null
return 1
}
if [ -z "$FWS_IN_CONTAINER" ] && ! can_mount; then
command -v docker >/dev/null 2>&1 \
|| { echo -e "\e[31mmount() refusé et docker absent : ce conteneur ne peut pas builder.\e[0m" >&2
echo " Installe docker (pacman -S docker) ou rends le runner privilégié." >&2
exit 1; }
[ -S /var/run/docker.sock ] \
|| { echo -e "\e[31mmount() refusé et /var/run/docker.sock absent : aucun moteur Docker joignable.\e[0m" >&2; exit 1; }
docker info >/dev/null 2>&1 \
|| { echo -e "\e[31mmount() refusé et démon Docker injoignable.\e[0m" >&2; exit 1; }
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
IMAGE="docker.io/library/archlinux:latest"
echo -e "\e[36mmount() refusé : build dans un conteneur Arch privilégié (docker)...\e[0m"
docker pull "$IMAGE" || exit 1
CID="$(docker create --privileged --network=host \
-e FWS_IN_CONTAINER=1 \
-e FWS_ISO_VERSION -e FWS_ISO_TAG \
-v fws-pacman-cache:/var/cache/pacman/pkg \
-w /tmp "$IMAGE" bash /tmp/build-offi.sh)" || exit 1
# docker cp from stdin needs an existing destination directory: /tmp is
# one, and it keeps the copied tree out of the container's root.
tar -C "$REPO_DIR" --exclude=./.git --exclude=./out -cf - . \
| docker cp - "$CID:/tmp" \
|| { docker rm -f "$CID" >/dev/null 2>&1; exit 1; }
if docker start -a "$CID"; then rc=0; else rc=$?; fi
if [ "$rc" -eq 0 ]; then
mkdir -p "$REPO_DIR/out"
docker cp "$CID:/tmp/out/." "$REPO_DIR/out/" || rc=$?
fi
docker rm -f "$CID" >/dev/null 2>&1 || true
OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
[ -z "$OWNER" ] || chown -R "$OWNER" "$REPO_DIR/out" 2>/dev/null || true
exit "$rc"
fi
if grep -qi 'microsoft\|wsl' /proc/version 2>/dev/null; then if grep -qi 'microsoft\|wsl' /proc/version 2>/dev/null; then
echo -e "\e[36mBuild officiel dans WSL ($DISTRO_NAME) en tant que root...\e[0m" echo -e "\e[36mBuild officiel dans WSL ($DISTRO_NAME) en tant que root...\e[0m"
IS_WSL=1 IS_WSL=1
@@ -294,16 +240,6 @@ fi
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "==> Dossier de travail : $WORK_DIR" 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 FWS..."
python3 -I "$WORK_DIR/scripts/check-translations.py" \
|| { echo -e "\e[31m[ERR] Traductions FWS 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. # 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 # Déjà demandés sur l'hôte (FWS_ISO_VERSION/FWS_ISO_TAG passés via -e) ; sinon
@@ -363,9 +299,9 @@ reflector --verbose --latest 10 --sort rate --save /etc/pacman.d/mirrorlist || t
if [ -n "$FWS_IN_CONTAINER" ]; then if [ -n "$FWS_IN_CONTAINER" ]; then
# Image de base qui vieillit → upgrade complet AVANT d'ajouter archiso, # Image de base qui vieillit → upgrade complet AVANT d'ajouter archiso,
# sinon partial upgrade (archiso tire des deps plus récentes que la base). # sinon partial upgrade (archiso tire des deps plus récentes que la base).
pacman -Syu --noconfirm archiso grub pacman -Syu --noconfirm archiso
else else
pacman -Sy --noconfirm archiso grub pacman -Sy --noconfirm archiso
fi fi
echo "==> Préparation de l'environnement de build..." echo "==> Préparation de l'environnement de build..."
@@ -405,6 +341,26 @@ 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/ 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)" 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)..." echo "==> Correction des retours à la ligne Windows (dos2unix)..."
pacman -S --needed --noconfirm dos2unix pacman -S --needed --noconfirm dos2unix
find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
@@ -412,16 +368,11 @@ find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
# ── Pré-vol : résolution de TOUS les paquets du profil ── # ── Pré-vol : résolution de TOUS les paquets du profil ──
# « error: target not found » ne doit plus surgir en plein mkarchiso : on # « 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 # résout la liste complète (packages.x86_64 fusionné) contre le pacman.conf
# du profil (dépôt distant [fws] inclus) dans une base temporaire. S'il manque # du profil (fws-local injecté inclus) dans une base temporaire. S'il manque
# un paquet, on échoue ICI avec la liste + le geste correctif. # un paquet, on échoue ICI avec la liste + le geste correctif.
echo "==> Pré-vol : résolution des paquets du profil..." echo "==> Pré-vol : résolution des paquets du profil..."
PREFLIGHT_DB="$(mktemp -d)" PREFLIGHT_DB="$(mktemp -d)"
if ! pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null; then pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null
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' \ mapfile -t PROFILE_PKGS < <(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' \
/tmp/fws-build/releng/packages.x86_64) /tmp/fws-build/releng/packages.x86_64)
# -Sp n'installe rien (affiche les URLs) ; LC_ALL=C fige le motif d'erreur. # -Sp n'installe rien (affiche les URLs) ; LC_ALL=C fige le motif d'erreur.
@@ -433,42 +384,12 @@ rm -rf "$PREFLIGHT_DB"
if [ -n "$MISSING" ]; then if [ -n "$MISSING" ]; then
echo -e "\e[31mPaquets introuvables dans les dépôts du profil :\e[0m" >&2 echo -e "\e[31mPaquets introuvables dans les dépôts du profil :\e[0m" >&2
printf ' \e[31m%s\e[0m\n' $MISSING >&2 printf ' \e[31m%s\e[0m\n' $MISSING >&2
echo -e "\e[33mPaquet FWS pas encore publié sur le dépôt [fws] (anaconda, fws-pacmanage," >&2 echo -e "\e[33mDépôt fws-local absent/incomplet ? Lance ./setup-aur.sh (construit" >&2
echo -e "fws-dnd, …) ? Publie-le, ou corrige son nom dans packages.x86_64, puis relance.\e[0m" >&2 echo -e "anaconda, fws-pacmanage, fws-dnd, …) puis relance ce script.\e[0m" >&2
exit 1 exit 1
fi fi
echo "==> Pré-vol OK : ${#PROFILE_PKGS[@]} paquets résolus." echo "==> Pré-vol OK : ${#PROFILE_PKGS[@]} paquets résolus."
# ============================================================
# Firmware versions the ISO's kernel never loads
#
# iwlwifi (Intel Wi-Fi) and nouveau (NVIDIA GSP) ship several versions of
# the same firmware and load only one: the older ones stay out of the image
# (~90 MiB, scripts/firmware-noextract.py explains the rule). The packages
# land in the host cache, which mkarchiso's pacstrap reuses: nothing is
# downloaded twice. Any failure only costs the saving, never the build.
# ============================================================
echo "==> Firmwares que le noyau ne charge jamais..."
_FW_CONF=/tmp/fws-build/releng/pacman.conf
_FW_NAMES="linux linux-firmware-intel linux-firmware-nvidia"
_FW_CACHE="$(pacman-conf CacheDir 2>/dev/null | head -1)"
# shellcheck disable=SC2086
if command -v python3 >/dev/null 2>&1 && [ -n "$_FW_CACHE" ] \
&& pacman -Sw --noconfirm $_FW_NAMES >/dev/null \
&& _FW_FILES="$(pacman -Sp --print-format '%f' $_FW_NAMES)" \
&& (cd "$_FW_CACHE" && python3 -I "$WORK_DIR/scripts/firmware-noextract.py" $_FW_FILES) > "$_FW_CONF.noextract" \
&& [ -s "$_FW_CONF.noextract" ]; then
# Right after the first NoExtract line, so inside [options].
awk -v list="$_FW_CONF.noextract" \
'{ print } /^NoExtract/ && !done { while ((getline l < list) > 0) print l; done = 1 }' \
"$_FW_CONF" > "$_FW_CONF.new" && mv -f "$_FW_CONF.new" "$_FW_CONF"
echo " $(grep -o 'usr/' "$_FW_CONF.noextract" | wc -l) fichiers de firmware exclus de l'image"
rm -f "$_FW_CONF.noextract"
else
rm -f "$_FW_CONF.noextract"
echo -e "\e[33m[!] Calcul des firmwares inutiles impossible : l'ISO les garde (≈ 90 Mio de plus).\e[0m" >&2
fi
echo "==> Lancement de mkarchiso..." echo "==> Lancement de mkarchiso..."
mkdir -p "$OUT_DIR" mkdir -p "$OUT_DIR"
# mkarchiso fait un « rm » interne de l'ISO cible avant de la (ré)écrire ; si # mkarchiso fait un « rm » interne de l'ISO cible avant de la (ré)écrire ; si
+71 -111
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. # 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)" OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
if [ -n "$OWNER" ]; then if [ -n "$OWNER" ]; then
for d in out; do for d in out local-repo; do
[ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true [ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true
done done
fi fi
@@ -199,16 +199,6 @@ fi
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "==> Dossier de travail : $WORK_DIR" 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 FWS..."
python3 -I "$WORK_DIR/scripts/check-translations.py" \
|| { echo -e "\e[31m[ERR] Traductions FWS 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 # pacman ≥ 7 sandboxe les ops FS via landlock, non supporté par le kernel
# WSL ni (selon le noyau) par le conteneur → désactivation. Idempotent, # WSL ni (selon le noyau) par le conteneur → désactivation. Idempotent,
# sans effet sur Arch natif. # sans effet sur Arch natif.
@@ -315,74 +305,84 @@ echo "==> Vérification des services systemd..."
ls "$SDDIR" 2>/dev/null | head -25 || echo " (aucun service)" ls "$SDDIR" 2>/dev/null | head -25 || echo " (aucun service)"
ls "$SDDIR/multi-user.target.wants/" 2>/dev/null || echo " (aucun symlink)" ls "$SDDIR/multi-user.target.wants/" 2>/dev/null || echo " (aucun symlink)"
# ============================================================ # Copie le repo local (fws-pacmanage + fws-dnd + deps Anaconda packagées)
# Dépôt distant [fws] : source des paquets FWS # « ls glob » renvoie un statut d'échec dès qu'une entrée FANTÔME traîne dans
# # local-repo (nom refusé par NTFS, laissé à moitié créé par un cp raté) : on
# fws-pacmanage, fws-dnd, anaconda and its python deps come from the [fws] # testait alors « aucun repo » et l'ISO partait sans les paquets FWS. On sonde
# repo declared in the profile's pacman.conf, which mkarchiso uses as is: # donc un fichier réellement stat-able, et on copie de même, un par un.
# the build needs neither local-repo/ nor a prior setup-aur.sh run. Its _localrepo_has=0
# database is read once here, for the check and the Broadcom driver below. for _f in "$WORK_DIR/local-repo/"*.pkg.tar.*; do
# ============================================================ if [ -e "$_f" ]; then _localrepo_has=1; break; fi
_PROFILE_CONF=/tmp/fws-build/releng/pacman.conf done
# dos2unix only runs further down: strip a possible CR from a Windows clone. if [ "$_localrepo_has" = 1 ]; then
FWS_REPO_URL="$(awk '/^\[/{f=/^\[fws\]/} f && /^[[:space:]]*Server[[:space:]]*=/{ echo "==> Copie du repo local fws-local..."
gsub(/\r/, ""); sub(/^[^=]*=[[:space:]]*/, ""); sub(/[[:space:]]+$/, ""); print; exit }' "$_PROFILE_CONF")" mkdir -p /tmp/fws-build/local-repo
FWS_REPO_URL="${FWS_REPO_URL//\$repo/fws}" for _f in "$WORK_DIR/local-repo/"*; do
FWS_REPO_URL="${FWS_REPO_URL//\$arch/x86_64}" if [ -e "$_f" ]; then cp -a "$_f" /tmp/fws-build/local-repo/; fi
if [ -z "$FWS_REPO_URL" ]; then done
echo -e "\e[31m[ERR] Aucun dépôt [fws] (Server = …) dans le pacman.conf du profil.\e[0m" >&2
exit 1 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 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 le dépôt [fws] # Garde-fou : les paquets FWS doivent EXISTER dans local-repo
# #
# packages.x86_64 liste des paquets que seul le dépôt FWS fournit (fws-*, # packages.x86_64 liste des paquets que seul le dépôt local fournit (fws-*,
# anaconda, fws-pacmanage, deps python…). S'ils n'y sont pas publiés, # anaconda, fws-pacmanage, deps python…). S'ils n'ont pas encore été construits,
# pacman ne le découvre qu'à la toute fin — après le -Syu, les miroirs et # 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 # 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 # plusieurs minutes de perdues. On vérifie donc AVANT de lancer quoi que ce
# soit de long, et on dit quoi faire. # soit de long, et on dit quoi faire.
# ============================================================ # ============================================================
echo "==> Vérification des paquets fournis par le dépôt [fws]..." echo "==> Vérification des paquets fournis par local-repo..."
# What [core]/[extra] do not provide can only come from [fws]. Deriving that _missing=()
# list here keeps the check free of any packaging tree. The host sync # Paquets construits depuis les PKGBUILD du dépôt (le nom du dossier est le
# databases are fresh: the "pacman -Syu" above has just refreshed them. # pkgname), plus la liste AUR lue dans setup-aur.sh — sa seule source de vérité.
mapfile -t _official < <(pacman -Slq core extra 2>/dev/null | sort -u) _local_pkgs=()
if [ "${#_official[@]}" -eq 0 ]; then for _d in "$WORK_DIR"/pkgbuilds/*/; do
echo -e "\e[31m[ERR] Bases pacman [core]/[extra] illisibles sur la machine de build.\e[0m" >&2 [ -f "$_d/PKGBUILD" ] || continue
exit 1 _local_pkgs+=("$(basename "$_d")")
done
# Liste AUR lue dans setup-aur.sh, sa seule source de vérité. L'extraction
# passe par bash : la déclaration est un tableau entre parenthèses, qu'un sed
# ramenait en UN SEUL mot — la comparaison ci-dessous ne matchait donc jamais
# packages.x86_64, et ce garde-fou ne vérifiait rien, en silence.
_aur_decl="$(awk '/^AUR_PACKAGES=\(/{f=1} f{print} f && /\)/{exit}' "$WORK_DIR/setup-aur.sh" 2>/dev/null)"
if [ -n "$_aur_decl" ]; then
# shellcheck disable=SC2207
_local_pkgs+=($(bash -c 'eval "$1"; printf "%s\n" "${AUR_PACKAGES[@]}"' _ "$_aur_decl" 2>/dev/null))
fi fi
_expected=() _missing=() # Présence testée par stat : « ls glob » renvoie un statut d'échec dès qu'une
# [[:space:]] also strips the CR of a Windows clone (dos2unix runs later). # entrée fantôme traîne dans local-repo, et déclarerait absents des paquets
for _p in $(comm -23 \ # pourtant présents.
<(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/fws-build/releng/packages.x86_64 | sort -u) \ for _p in "${_local_pkgs[@]}"; do
<(printf '%s\n' "${_official[@]}")); do grep -qx "$_p" /tmp/fws-build/releng/packages.x86_64 || continue
# An official group (xorg, …) is no package name, yet pacman resolves it. _found=0
if pacman -Sgq "$_p" >/dev/null 2>&1; then continue; fi for _f in "$WORK_DIR/local-repo/$_p"-[0-9]*.pkg.tar.*; do
_expected+=("$_p") if [ -e "$_f" ]; then _found=1; break; fi
printf '%s\n' "${_fws_pkgs[@]}" | grep -qxF -- "$_p" || _missing+=("$_p") done
[ "$_found" = 1 ] || _missing+=("$_p")
done done
if [ "${#_missing[@]}" -gt 0 ]; then 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 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 printf ' - %s\n' "${_missing[@]}" >&2
echo "" >&2 echo "" >&2
echo " Publie-les sur $FWS_REPO_URL (ou corrige leur nom dans packages.x86_64), puis relance." >&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
exit 1 exit 1
fi fi
echo " Attendus de [fws] : ${_expected[*]:-aucun} — tous présents ✔" echo " ${#_local_pkgs[@]} paquets locaux attendus, tous présents ✔"
# ============================================================ # ============================================================
# Pilote Wi-Fi Broadcom : embarqué, installé seulement SI DÉTECTÉ # Pilote Wi-Fi Broadcom : embarqué, installé seulement SI DÉTECTÉ
@@ -390,29 +390,19 @@ echo " Attendus de [fws] : ${_expected[*]:-aucun} — tous présents ✔"
# Volontairement absent de packages.x86_64 : broadcom-wl-dkms blackliste b43, # Volontairement absent de packages.x86_64 : broadcom-wl-dkms blackliste b43,
# bcma, ssb et brcmsmac pour tout le système — l'imposer à chaque machine # 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. # couperait le Wi-Fi de celles que ces modules font justement fonctionner.
# Une machine qui en a besoin n'a, par définition, pas de réseau : on le # Il vient de l'AUR, donc aucun dépôt ne le fournira sur la cible : on le
# dépose dans l'airootfs et fws-setup-hardware fait « pacman -U » UNIQUEMENT # 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. # s'il voit une Broadcom sans interface sans fil, puis supprime le fichier.
# ============================================================ # ============================================================
# Taken from [fws] (our build) and checked against the database checksum: _WL_PKG="$(ls "$WORK_DIR/local-repo"/broadcom-wl-dkms-[0-9]*.pkg.tar.* 2>/dev/null | head -1)"
# the repo is unsigned, so this is the only integrity check it gets. if [ -n "$_WL_PKG" ]; then
_WL_FILE="" _WL_SHA="" install -Dm644 "$_WL_PKG" \
for _desc in "$FWS_DB_DIR"/broadcom-wl-dkms-[0-9]*/desc; do "/tmp/fws-build/releng/airootfs/usr/local/share/fws/drivers/$(basename "$_WL_PKG")"
[ -f "$_desc" ] || continue echo "==> Pilote Wi-Fi Broadcom embarqué : $(basename "$_WL_PKG")"
_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 else
if [ -n "$_WL_FILE" ]; then rm -f "$_WL_DIR/$_WL_FILE"; fi echo -e "\e[33m[!] broadcom-wl-dkms absent de local-repo — les portables Broadcom\e[0m" >&2
echo -e "\e[33m[!] broadcom-wl-dkms introuvable ou corrompu dans [fws] — les portables Broadcom\e[0m" >&2 echo " resteront sans Wi-Fi. Lance ./setup-aur.sh pour le construire." >&2
echo " resteront sans Wi-Fi. Publie-le sur $FWS_REPO_URL (./setup-aur.sh puis ./prepare-remote-repo.sh)." >&2
fi fi
rm -rf "$FWS_DB_DIR"
echo "==> Correction des retours à la ligne Windows (dos2unix)..." echo "==> Correction des retours à la ligne Windows (dos2unix)..."
pacman -S --needed --noconfirm dos2unix pacman -S --needed --noconfirm dos2unix
@@ -464,36 +454,6 @@ while IFS= read -r -d '' _f; do
echo " lien restauré : ${_f#"$_AIROOTFS"} -> $_target" echo " lien restauré : ${_f#"$_AIROOTFS"} -> $_target"
done < <(find "$_AIROOTFS" -type f -print0) done < <(find "$_AIROOTFS" -type f -print0)
# ============================================================
# Firmware versions the ISO's kernel never loads
#
# iwlwifi (Intel Wi-Fi) and nouveau (NVIDIA GSP) ship several versions of
# the same firmware and load only one: the older ones stay out of the image
# (~90 MiB, scripts/firmware-noextract.py explains the rule). The packages
# land in the host cache, which mkarchiso's pacstrap reuses: nothing is
# downloaded twice. Any failure only costs the saving, never the build.
# ============================================================
echo "==> Firmwares que le noyau ne charge jamais..."
_FW_CONF=/tmp/fws-build/releng/pacman.conf
_FW_NAMES="linux linux-firmware-intel linux-firmware-nvidia"
_FW_CACHE="$(pacman-conf CacheDir 2>/dev/null | head -1)"
# shellcheck disable=SC2086
if command -v python3 >/dev/null 2>&1 && [ -n "$_FW_CACHE" ] \
&& pacman -Sw --noconfirm $_FW_NAMES >/dev/null \
&& _FW_FILES="$(pacman -Sp --print-format '%f' $_FW_NAMES)" \
&& (cd "$_FW_CACHE" && python3 -I "$WORK_DIR/scripts/firmware-noextract.py" $_FW_FILES) > "$_FW_CONF.noextract" \
&& [ -s "$_FW_CONF.noextract" ]; then
# Right after the first NoExtract line, so inside [options].
awk -v list="$_FW_CONF.noextract" \
'{ print } /^NoExtract/ && !done { while ((getline l < list) > 0) print l; done = 1 }' \
"$_FW_CONF" > "$_FW_CONF.new" && mv -f "$_FW_CONF.new" "$_FW_CONF"
echo " $(grep -o 'usr/' "$_FW_CONF.noextract" | wc -l) fichiers de firmware exclus de l'image"
rm -f "$_FW_CONF.noextract"
else
rm -f "$_FW_CONF.noextract"
echo -e "\e[33m[!] Calcul des firmwares inutiles impossible : l'ISO les garde (≈ 90 Mio de plus).\e[0m" >&2
fi
echo "==> Lancement de mkarchiso..." echo "==> Lancement de mkarchiso..."
mkdir -p "$WORK_DIR/out" mkdir -p "$WORK_DIR/out"
# mkarchiso fait un « rm » interne de l'ISO cible avant de la (ré)écrire ; si # mkarchiso fait un « rm » interne de l'ISO cible avant de la (ré)écrire ; si
@@ -1,7 +1 @@
HOOKS=(base udev modconf archiso block filesystems) 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"
@@ -12,7 +12,3 @@ Include = /etc/pacman.d/mirrorlist
[extra] [extra]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
[fws]
Server = https://repo.laxacube.ch/x86_64
SigLevel = Optional TrustAll
+31 -46
View File
@@ -40,9 +40,8 @@ if command -v liveinst >/dev/null 2>&1; then
# laisser l'utilisateur croire à un bug. # laisser l'utilisateur croire à un bug.
_MEMKB=$(awk '/^MemTotal:/{print $2}' /proc/meminfo 2>/dev/null) _MEMKB=$(awk '/^MemTotal:/{print $2}' /proc/meminfo 2>/dev/null)
if [ -n "$_MEMKB" ] && [ "$_MEMKB" -lt 2000000 ] && command -v zenity >/dev/null 2>&1; then if [ -n "$_MEMKB" ] && [ "$_MEMKB" -lt 2000000 ] && command -v zenity >/dev/null 2>&1; then
# Shown before the user picks a language: English, like the splash below. zenity --warning --width=460 --title="FWS — mémoire insuffisante ?" \
zenity --warning --width=460 --title="FWS — not enough memory?" \ --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
--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 fi
# ÉCRAN D'ATTENTE immédiat : le démarrage d'anaconda peut prendre 2 à # ÉCRAN D'ATTENTE immédiat : le démarrage d'anaconda peut prendre 2 à
@@ -78,7 +77,7 @@ if command -v liveinst >/dev/null 2>&1; then
_el=$(( _el + 3 )) _el=$(( _el + 3 ))
_last=$(ls -t /tmp/storage.log /tmp/anaconda.log /tmp/program.log /tmp/dbus.log 2>/dev/null | head -n1) _last=$(ls -t /tmp/storage.log /tmp/anaconda.log /tmp/program.log /tmp/dbus.log 2>/dev/null | head -n1)
if [ -z "$_last" ]; then if [ -z "$_last" ]; then
printf '# Starting the installer… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0 printf '# Démarrage d'"'"'Anaconda… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0
continue continue
fi fi
_stamp=$(stat -c %Y "$_last" 2>/dev/null) _stamp=$(stat -c %Y "$_last" 2>/dev/null)
@@ -94,24 +93,24 @@ if command -v liveinst >/dev/null 2>&1; then
| cut -c1-90) | cut -c1-90)
if [ "$_quiet" -ge 240 ] && [ ! -f /tmp/fws-stall.txt ]; then if [ "$_quiet" -ge 240 ] && [ ! -f /tmp/fws-stall.txt ]; then
{ {
echo "=== FWS: preparation stalled (no log activity for ${_quiet}s) ===" echo "=== FWS : préparation bloquée (aucune activité log depuis ${_quiet}s) ==="
echo "--- last active log: $_last"; tail -n 25 "$_last" 2>/dev/null echo "--- dernier log actif : $_last"; tail -n 25 "$_last" 2>/dev/null
echo "--- udev (stuck workers?)"; udevadm settle --timeout=0 2>&1 echo "--- udev (workers bloqués ?)"; udevadm settle --timeout=0 2>&1
echo "--- journal (end)"; journalctl -b --no-pager 2>/dev/null | tail -n 60 echo "--- journal (fin)"; journalctl -b --no-pager 2>/dev/null | tail -n 60
echo "--- dmesg (end)"; dmesg 2>/dev/null | tail -n 40 echo "--- dmesg (fin)"; dmesg 2>/dev/null | tail -n 40
} > /tmp/fws-stall.txt 2>&1 } > /tmp/fws-stall.txt 2>&1
zenity --text-info --title="FWS — preparation stalled: diagnostics" \ zenity --text-info --title="FWS — préparation bloquée : diagnostic" \
--filename=/tmp/fws-stall.txt --width=1000 --height=650 2>/dev/null & --filename=/tmp/fws-stall.txt --width=1000 --height=650 2>/dev/null &
fi fi
if [ "$_quiet" -ge 60 ]; then if [ "$_quiet" -ge 60 ]; then
printf '# ⚠ No activity for %d s (%s) — last message: %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0 printf '# ⚠ Aucune activité depuis %d s (%s) — dernier message : %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0
else else
printf '# Preparing (%d min %02d s) — %s: %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0 printf '# Préparation (%d min %02d s) — %s : %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0
fi fi
done done
) | zenity --progress --pulsate --no-cancel \ ) | zenity --progress --pulsate --no-cancel \
--title="FWS" \ --title="FWS" \
--text="<b>Preparing the FWS installer…</b>\n\nChecking the hardware and the disks.\nOne or two more minutes: this is normal." \ --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." \
--width=560 2>/dev/null & --width=560 2>/dev/null &
_SPLASH_PID=$! _SPLASH_PID=$!
fi fi
@@ -161,13 +160,6 @@ if command -v liveinst >/dev/null 2>&1; then
fi fi
pkill -f "fws-stall.txt" 2>/dev/null 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 # 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 # 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 # planté. On ne se fie donc PAS à $rc : en phase debug on regroupe TOUS les
@@ -199,33 +191,33 @@ if command -v liveinst >/dev/null 2>&1; then
DBG=/tmp/fws-debug.txt DBG=/tmp/fws-debug.txt
{ {
echo "===== liveinst exited (code $rc) — Anaconda logs =====" echo "===== liveinst sorti (code $rc) — logs Anaconda ====="
echo echo
echo "########## liveinst output (stdout+stderr) ##########" echo "########## sortie liveinst (stdout+stderr) ##########"
cat "$LIVEINST_LOG" 2>/dev/null cat "$LIVEINST_LOG" 2>/dev/null
echo echo
echo "########## chroot %post = grub-install / mkinitcpio ##########" echo "########## %post chrooté = grub-install / mkinitcpio ##########"
echo "########## >>> THIS BLOCK TELLS WHETHER THE DISK WILL BOOT <<< ##########" echo "########## >>> C'EST CE BLOC QUI DIT SI LE DISQUE VA BOOTER <<< ##########"
cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log not found)" cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log introuvable)"
echo echo
echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########" echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########"
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(missing)" cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(absent)"
echo echo
echo "########## Summary (fws_recap screen, before installing) ##########" echo "########## Récapitulatif (page GUI fws_recap, avant install) ##########"
cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(missing — summary screen not reached)" cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(absent — page récap pas atteinte)"
# The crash dialog only shows the dasbus wrapper frames; the actual # The crash dialog only shows the dasbus wrapper frames; the actual
# remote exception is at the end of this dump, and nowhere else. # remote exception is at the end of this dump, and nowhere else.
for f in /tmp/anaconda-tb-*; do for f in /tmp/anaconda-tb-*; do
[ -f "$f" ] || continue [ -f "$f" ] || continue
echo echo
echo "########## $f (Anaconda traceback, end) ##########" echo "########## $f (traceback Anaconda, fin) ##########"
tail -n 80 "$f" tail -n 80 "$f"
done done
for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \ for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \
/tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do /tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do
echo echo
echo "########## $f ##########" echo "########## $f ##########"
tail -n 200 "$f" 2>/dev/null || echo "(missing)" tail -n 200 "$f" 2>/dev/null || echo "(absent)"
done done
} >"$DBG" 2>&1 } >"$DBG" 2>&1
@@ -239,8 +231,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 \ 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 && 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 if command -v zenity >/dev/null 2>&1; then
zenity --info --width=480 --title="$(fws-i18n session.success_title)" \ zenity --info --width=480 --title="FWS — installation réussie ✅" \
--text="$(fws-i18n session.success_text)" \ --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." \
2>/dev/null 2>/dev/null
fi fi
systemctl poweroff systemctl poweroff
@@ -260,22 +252,15 @@ if command -v liveinst >/dev/null 2>&1; then
# logs de la machine, ça ne part pas sans un clic. # logs de la machine, ça ne part pas sans un clic.
if command -v zenity >/dev/null 2>&1; then 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 while :; do
_btn="$(zenity --text-info \ _btn="$(zenity --text-info \
--title="$(fws-i18n session.failure_title code="$rc")" \ --title="FWS — l'installation ne s'est pas terminée (sortie $rc)" \
--filename="$DBG" --width=1100 --height=720 \ --filename="$DBG" --width=1100 --height=720 \
--ok-label="$_close" \ --ok-label="Fermer" \
--extra-button="$_send" \ --extra-button="Envoyer le rapport aux développeurs" \
--extra-button="$_reboot" 2>/dev/null)" || true --extra-button="Redémarrer" 2>/dev/null)" || true
case "$_btn" in case "$_btn" in
# Window closed (empty answer): never mistake it for a button. "Envoyer le rapport aux développeurs")
"") break ;;
"$_send")
# fws-bugreport pré-charge le fichier de debug, # fws-bugreport pré-charge le fichier de debug,
# montre le payload EXACT et n'envoie que sur # montre le payload EXACT et n'envoie que sur
# confirmation — la télémétrie reste au choix de # confirmation — la télémétrie reste au choix de
@@ -287,10 +272,10 @@ if command -v liveinst >/dev/null 2>&1; then
fws-bugreport --file "$DBG" >/dev/null 2>&1 || true fws-bugreport --file "$DBG" >/dev/null 2>&1 || true
else else
zenity --error --width=440 \ zenity --error --width=440 \
--text="$(fws-i18n session.bugreport_missing)" 2>/dev/null || true --text="fws-bugreport est absent de cette image :\nle rapport ne peut pas être envoyé d'ici." 2>/dev/null || true
fi fi
;; ;;
"$_reboot") "Redémarrer")
systemctl reboot systemctl reboot
break break
;; ;;
@@ -12,20 +12,9 @@ set -euo pipefail
# Anaconda (ses modules DBus font setlocale(LC_ALL, "en_US.UTF-8") au démarrage, # 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). # 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. # ~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 locale-gen
mv -f /etc/locale.gen.fws /etc/locale.gen
# --- Overlays pyanaconda (écran de progression FWS, journal en direct) --------------------------- # --- Overlays pyanaconda (écran de progression FWS) ---------------------------
# mkarchiso copie l'airootfs AVANT le pacstrap (cf. fws/mkarchiso : # mkarchiso copie l'airootfs AVANT le pacstrap (cf. fws/mkarchiso :
# _make_custom_airootfs puis _make_packages) : un fichier de l'airootfs qui # _make_custom_airootfs puis _make_packages) : un fichier de l'airootfs qui
# remplace un fichier du paquet « anaconda » fait échouer pacman (« exists in # remplace un fichier du paquet « anaconda » fait échouer pacman (« exists in
@@ -39,24 +28,10 @@ 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 # 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). # 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 \ for _f in modules/runtime/scripts/runtime.py modules/boss/installation.py; do
ui/gui/spokes/installation_progress.py; do
if [ ! -f "/usr/lib/python3.14/site-packages/pyanaconda/${_f}" ]; then if [ ! -f "/usr/lib/python3.14/site-packages/pyanaconda/${_f}" ]; then
echo "[FWS] overlay pyanaconda manquant : ${_f}" >&2 echo "[FWS] overlay pyanaconda manquant : ${_f}" >&2
exit 1 exit 1
fi fi
done done
fi fi
# --- Anaconda's own texts missing from its catalogs ---------------------------
# Some languages get parts of Anaconda's screens in English (Bulgarian lacked
# most of the root account screen): anaconda-translations.toml fills those
# gaps, never overriding a translation Anaconda has. After the anaconda
# package is installed, which is now.
python3 /usr/local/lib/fws/merge-anaconda-translations.py
# --- FWS translations written into files that cannot look them up -------------
# Menu entries, the SDDM theme and the polkit policy are read by programs that
# know nothing of system-translations.toml: every language is written into them
# here. A failure stops the build, since the login screen would show keys.
python3 /usr/local/lib/fws/translate-static-files.py
@@ -16,29 +16,21 @@
# « pacman -S » du bureau + d'un navigateur (Firefox), et active le display # « pacman -S » du bureau + d'un navigateur (Firefox), et active le display
# manager. « cli » (défaut) = aucun bureau, rien à installer. # 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.categories.software import SoftwareCategory
from pyanaconda.ui.gui.spokes import NormalSpoke from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
__all__ = ["FWSDesktopSpoke"] __all__ = ["FWSDesktopSpoke"]
# clé interne (écrite dans /tmp/fws-desktop) → libellé affiché dans le statut. # clé interne (écrite dans /tmp/fws-desktop) → libellé affiché dans le statut.
def _choices(): _CHOICES = [
# A function, not a constant: the labels must follow the language picked ("cli", _("Command line only (no desktop)")),
# on the first screen, which can change after this module is imported. ("gnome", "GNOME"),
# Bare product names are the same in every language. ("kde", "KDE Plasma"),
return [ ("hyprland", "Hyprland — Wayland (non compatible VR)"),
("cli", t("desktop.choice_cli")), ("i3", "i3 — X11 (compatible VR : SteamVR)"),
("gnome", "GNOME"), ("xfce", "XFCE"),
("kde", "KDE Plasma"), ]
("hyprland", t("desktop.choice_hyprland")),
("i3", t("desktop.choice_i3")),
("xfce", "XFCE"),
]
_DESKTOP_FILE = "/tmp/fws-desktop" _DESKTOP_FILE = "/tmp/fws-desktop"
@@ -50,10 +42,6 @@ class FWSDesktopSpoke(NormalSpoke):
uiFile = "spokes/fws_desktop.glade" uiFile = "spokes/fws_desktop.glade"
category = SoftwareCategory category = SoftwareCategory
icon = "preferences-desktop-display-symbolic" 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") title = CN_("GUI|Spoke", "_Desktop Environment")
@staticmethod @staticmethod
@@ -75,7 +63,7 @@ class FWSDesktopSpoke(NormalSpoke):
def initialize(self): def initialize(self):
NormalSpoke.initialize(self) NormalSpoke.initialize(self)
for key, _label in _choices(): for key, _label in _CHOICES:
self._radios[key] = self.builder.get_object("radio_" + key) self._radios[key] = self.builder.get_object("radio_" + key)
# Reprend un éventuel choix déjà écrit (revisite du spoke). # Reprend un éventuel choix déjà écrit (revisite du spoke).
try: try:
@@ -87,18 +75,6 @@ class FWSDesktopSpoke(NormalSpoke):
pass pass
def refresh(self): 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. # Coche le bouton correspondant au choix courant.
rb = (self._radios.get(self._choice) rb = (self._radios.get(self._choice)
or self._radios.get(self._DEFAULT_CHOICE)) or self._radios.get(self._DEFAULT_CHOICE))
@@ -119,10 +95,10 @@ class FWSDesktopSpoke(NormalSpoke):
@property @property
def status(self): def status(self):
for key, label in _choices(): for key, label in _CHOICES:
if key == self._choice: if key == self._choice:
return label return label
return t("desktop.choice_cli") return _("Command line only (no desktop)")
@property @property
def completed(self): def completed(self):
@@ -1,20 +0,0 @@
# FWS — the installer screens' access to the FWS translations.
#
# The implementation lives in /usr/local/lib/fws/fws_i18n.py, shared with the
# FWS tools of the installed system, which must not depend on this folder: its
# path follows Python's version and Anaconda can be removed after installing.
#
# 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 importlib.util
_spec = importlib.util.spec_from_file_location("fws_i18n", "/usr/local/lib/fws/fws_i18n.py")
_module = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(_module)
t = _module.t
catalog = _module.catalog
language_candidates = _module.language_candidates
__all__ = []
@@ -49,7 +49,6 @@ from gi.repository import GLib, Gtk
from pyanaconda.anaconda_loggers import get_module_logger from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.hubs.summary import SummaryHub from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__) log = get_module_logger(__name__)
@@ -96,9 +95,9 @@ def _split_escaped(line):
class FWSNetworkStandaloneSpoke(StandaloneSpoke): class FWSNetworkStandaloneSpoke(StandaloneSpoke):
"""Choix simple du réseau (Ethernet / Wi-Fi + mot de passe) avant le hub.""" """Choix simple du réseau (Ethernet / Wi-Fi + mot de passe) avant le hub."""
builderObjects = ["fwsNetworkWindow", "netTitle", "netHint", "listTitle", builderObjects = ["fwsNetworkWindow", "netTitle", "netList", "netFeedback",
"netList", "netFeedback", "pwPanel", "pwTitle", "pwEntry", "pwPanel", "pwTitle", "pwEntry", "pwShow", "pwConnect",
"pwShow", "pwConnect", "refreshButton"] "refreshButton"]
mainWidgetName = "fwsNetworkWindow" mainWidgetName = "fwsNetworkWindow"
uiFile = "spokes/fws_network.glade" uiFile = "spokes/fws_network.glade"
@@ -127,6 +126,8 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
def initialize(self): def initialize(self):
StandaloneSpoke.initialize(self) StandaloneSpoke.initialize(self)
self._title = self.builder.get_object("netTitle") 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 = self.builder.get_object("netList")
self._list.connect("row-selected", self._on_row_selected) self._list.connect("row-selected", self._on_row_selected)
self._feedback = self.builder.get_object("netFeedback") self._feedback = self.builder.get_object("netFeedback")
@@ -162,24 +163,7 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
def _on_continue_clicked(self, *_args): def _on_continue_clicked(self, *_args):
self.apply() 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): def refresh(self):
self._set_static_texts()
# À chaque entrée sur l'écran : liste à jour + état courant. # À chaque entrée sur l'écran : liste à jour + état courant.
self._build_list(rescan=False) self._build_list(rescan=False)
# Cache Wi-Fi souvent vide au tout premier affichage (NM n'a pas # Cache Wi-Fi souvent vide au tout premier affichage (NM n'a pas
@@ -277,23 +261,21 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
for iface, state in eth: for iface, state in eth:
if state == "connected": if state == "connected":
had_conn = True had_conn = True
add_row("eth", t("network.row_ethernet"), add_row("eth", "Ethernet (câble)", "Connecté ✓",
t("network.row_connected"),
{"kind": "eth", "iface": iface, "state": state}, {"kind": "eth", "iface": iface, "state": state},
inuse=True) inuse=True)
elif state == "disconnected": elif state == "disconnected":
add_row("eth", t("network.row_ethernet"), add_row("eth", "Ethernet (câble)", "Cliquer pour se connecter",
t("network.row_click_to_connect"),
{"kind": "eth", "iface": iface, "state": state}) {"kind": "eth", "iface": iface, "state": state})
# "unavailable" = pas de câble : inutile de l'afficher. # "unavailable" = pas de câble : inutile de l'afficher.
for n in wifi: for n in wifi:
if n["inuse"]: if n["inuse"]:
had_conn = True had_conn = True
detail = t("network.row_connected") detail = "Connecté ✓"
elif n["secured"]: elif n["secured"]:
detail = t("network.row_wifi_secured", signal=n["signal"]) detail = f"{n['signal']} % · sécurisé"
else: else:
detail = t("network.row_wifi_open", signal=n["signal"]) detail = f"{n['signal']} % · ouvert"
add_row("wifi", n["ssid"], detail, add_row("wifi", n["ssid"], detail,
{"kind": "wifi", "ssid": n["ssid"], {"kind": "wifi", "ssid": n["ssid"],
"secured": n["secured"]}, inuse=n["inuse"]) "secured": n["secured"]}, inuse=n["inuse"])
@@ -301,14 +283,19 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
# Message d'état global. # Message d'état global.
active_wifi = self._active_wifi_ssid() active_wifi = self._active_wifi_ssid()
if active_wifi: if active_wifi:
self._show_feedback( self._show_feedback(f"Connecté au Wi-Fi « {active_wifi} » ✓ — "
t("network.wifi_connected", ssid=active_wifi), _GREEN) "vous pouvez continuer.", _GREEN)
elif had_conn: elif had_conn:
self._show_feedback(t("network.ethernet_online"), _GREEN) self._show_feedback("Connecté à Internet (Ethernet) ✓ — "
"vous pouvez continuer.", _GREEN)
elif not self._networks: elif not self._networks:
self._show_feedback(t("network.no_network"), _RED) 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)
else: else:
self._show_feedback(t("network.pick_network"), _GREY) self._show_feedback(
"Cliquez sur un réseau Wi-Fi pour vous connecter "
"(ou branchez un câble Ethernet).", _GREY)
self._hide_password_panel() self._hide_password_panel()
def _show_feedback(self, text, color=_GREY): def _show_feedback(self, text, color=_GREY):
@@ -327,21 +314,21 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
if meta["kind"] == "eth": if meta["kind"] == "eth":
if meta["state"] == "connected": if meta["state"] == "connected":
self._show_feedback( self._show_feedback(
t("network.ethernet_already_connected"), _GREEN) "Ethernet déjà connecté — vous pouvez continuer.", _GREEN)
else: else:
self._connect_eth(meta["iface"]) self._connect_eth(meta["iface"])
return return
# Wi-Fi # Wi-Fi
if meta["inuse"]: if meta["inuse"]:
self._show_feedback( self._show_feedback(
t("network.wifi_already_connected", ssid=meta["ssid"]), f"Vous êtes déjà connecté au Wi-Fi « {meta['ssid']} ».",
_GREEN) _GREEN)
return return
self._current_ssid = meta["ssid"] self._current_ssid = meta["ssid"]
if meta["secured"]: if meta["secured"]:
self._pw_title.set_markup(t( self._pw_title.set_markup(
"network.password_prompt", f'Mot de passe du réseau Wi-Fi « '
ssid=GLib.markup_escape_text(meta["ssid"]))) f'<b>{GLib.markup_escape_text(meta["ssid"])}</b> » :')
self._entry.set_text("") self._entry.set_text("")
self._entry.set_editable(True) self._entry.set_editable(True)
self._entry.set_visibility( self._entry.set_visibility(
@@ -349,14 +336,15 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._panel.show() self._panel.show()
self._entry.grab_focus() self._entry.grab_focus()
self._show_feedback( self._show_feedback(
t("network.type_password", ssid=meta["ssid"]), _GREY) f"Tapez le mot de passe de « {meta['ssid']} » puis cliquez "
"« Se connecter ».", _GREY)
else: else:
self._connect_wifi(meta["ssid"], None) self._connect_wifi(meta["ssid"], None)
def _refresh_clicked(self): def _refresh_clicked(self):
if self._busy: if self._busy:
return return
self._show_feedback(t("network.searching"), _GREY) self._show_feedback("Recherche des réseaux…", _GREY)
self._set_busy(True, list_only=True) self._set_busy(True, list_only=True)
threading.Thread(target=self._refresh_worker, daemon=True).start() threading.Thread(target=self._refresh_worker, daemon=True).start()
@@ -376,19 +364,18 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
return return
password = self._entry.get_text() password = self._entry.get_text()
if not password: if not password:
self._show_feedback(t("network.password_missing"), _RED) self._show_feedback("Tapez d'abord le mot de passe.", _RED)
return return
self._connect_wifi(self._current_ssid, password) self._connect_wifi(self._current_ssid, password)
def _connect_eth(self, iface): def _connect_eth(self, iface):
self._show_feedback( self._show_feedback(f"Connexion Ethernet ({iface})…", _GREY)
t("network.ethernet_connecting", iface=iface), _GREY)
self._set_busy(True) self._set_busy(True)
threading.Thread(target=self._eth_worker, args=(iface,), threading.Thread(target=self._eth_worker, args=(iface,),
daemon=True).start() daemon=True).start()
def _connect_wifi(self, ssid, password): def _connect_wifi(self, ssid, password):
self._show_feedback(t("network.wifi_connecting", ssid=ssid), _GREY) self._show_feedback(f"Connexion au Wi-Fi « {ssid} »…", _GREY)
self._set_busy(True) self._set_busy(True)
threading.Thread(target=self._wifi_worker, args=(ssid, password), threading.Thread(target=self._wifi_worker, args=(ssid, password),
daemon=True).start() daemon=True).start()
@@ -418,7 +405,8 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._current_ssid = None self._current_ssid = None
self._hide_password_panel() self._hide_password_panel()
self._show_feedback( self._show_feedback(
t("network.wifi_connected", ssid=name), _GREEN) f"Connecté au Wi-Fi « {name} » ✓ — vous pouvez "
"continuer.", _GREEN)
# Marqueur pour le %post (profils NM vers la cible). # Marqueur pour le %post (profils NM vers la cible).
try: try:
with open(_KEEP_WIFI, "w") as fh: with open(_KEEP_WIFI, "w") as fh:
@@ -426,12 +414,14 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
except OSError: except OSError:
pass pass
else: else:
self._show_feedback(t("network.ethernet_connected"), _GREEN) self._show_feedback(
"Ethernet connecté ✓ — vous pouvez continuer.", _GREEN)
self._build_list(rescan=False) # marque « Connecté ✓ » + état self._build_list(rescan=False) # marque « Connecté ✓ » + état
else: else:
if kind == "wifi": if kind == "wifi":
self._show_feedback( self._show_feedback(
t("network.wifi_failed", ssid=name), _RED) f"Connexion à « {name} » impossible : mot de passe "
"incorrect, ou réseau hors de portée. Réessayez.", _RED)
if password is not None: if password is not None:
# On garde la main sur le champ pour corriger. # On garde la main sur le champ pour corriger.
self._current_ssid = name self._current_ssid = name
@@ -442,7 +432,9 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
self._panel.show() self._panel.show()
self._entry.grab_focus() self._entry.grab_focus()
else: else:
self._show_feedback(t("network.ethernet_failed"), _RED) self._show_feedback(
"Connexion Ethernet impossible (câble débranché ?).",
_RED)
return False return False
# ------------------------------------------------------------ helpers -- # ------------------------------------------------------------ helpers --
@@ -50,38 +50,29 @@ from pyanaconda.modules.common.structures.user import UserData
from pyanaconda.ui.gui import GraphicalUserInterface from pyanaconda.ui.gui import GraphicalUserInterface
from pyanaconda.ui.gui.hubs.summary import SummaryHub from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__) log = get_module_logger(__name__)
__all__ = ["FWSRecapSpoke"] __all__ = ["FWSRecapSpoke"]
# Doit rester aligné sur le %post du kickstart (étape « Bureau choisi ») et # Doit rester aligné sur le %post du kickstart (étape « Bureau choisi ») et
# sur les libellés de la spoke fws_desktop. # sur les libellés de la spoke fws_desktop.
def _desktop_label(desk): _DESKTOP_LABELS = {
# Built on each call rather than kept as a module constant, so the labels "cli": "ligne de commande uniquement (aucun bureau)",
# follow a language changed on the first screen. "gnome": "GNOME (+ Firefox, GDM)",
labels = { "kde": "KDE Plasma (+ Firefox, SDDM)",
"cli": t("recap.desktop_cli"), "hyprland": "Hyprland — Wayland, non compatible VR (+ Firefox, SDDM)",
"gnome": t("recap.desktop_gnome"), "i3": "i3 — X11, compatible VR/SteamVR (+ Firefox, SDDM)",
"kde": t("recap.desktop_kde"), "xfce": "XFCE (+ Firefox, SDDM)",
"hyprland": t("recap.desktop_hyprland"), }
"i3": t("recap.desktop_i3"),
"xfce": t("recap.desktop_xfce"),
}
return labels.get(desk, desk)
_PARTITIONING_LABELS = {
def _partitioning_label(method): "AUTOMATIC": "automatique (recommandé)",
labels = { "INTERACTIVE": "personnalisé (assistant)",
"AUTOMATIC": t("recap.partitioning_automatic"), "CUSTOM": "personnalisé",
"INTERACTIVE": t("recap.partitioning_interactive"), "BLIVET": "avancé (blivet-gui)",
"CUSTOM": t("recap.partitioning_custom"), "MANUAL": "points de montage manuels",
"BLIVET": t("recap.partitioning_blivet"), }
"MANUAL": t("recap.partitioning_manual"),
}
return labels.get(method, method)
def _safe(getter, default): def _safe(getter, default):
@@ -117,82 +108,67 @@ def _config_lines():
lang = _safe(lambda: LOCALIZATION.get_proxy().Language, "") lang = _safe(lambda: LOCALIZATION.get_proxy().Language, "")
if lang: if lang:
lines.append((t("recap.row_language"), lang)) lines.append(f" • Langue : {lang}")
layouts = _safe(lambda: list(LOCALIZATION.get_proxy().XLayouts), []) layouts = _safe(lambda: list(LOCALIZATION.get_proxy().XLayouts), [])
if layouts: if layouts:
lines.append((t("recap.row_keyboard"), ", ".join(layouts))) lines.append(f" • Clavier (X11) : {', '.join(layouts)}")
tz = _safe(lambda: TIMEZONE.get_proxy().Timezone, "") tz = _safe(lambda: TIMEZONE.get_proxy().Timezone, "")
if tz: if tz:
ntp = _safe(lambda: TIMEZONE.get_proxy().NTPEnabled, None) ntp = _safe(lambda: TIMEZONE.get_proxy().NTPEnabled, None)
tz_txt = {True: t("recap.timezone_ntp_on", timezone=tz), suffix = {True: " — synchronisation NTP activée",
False: t("recap.timezone_ntp_off", timezone=tz)}.get(ntp, tz) False: " — synchronisation NTP désactivée"}.get(ntp, "")
lines.append((t("recap.row_timezone"), tz_txt)) lines.append(f" • Fuseau horaire : {tz}{suffix}")
users = _safe( users = _safe(
lambda: UserData.from_structure_list(USERS.get_proxy().Users), []) lambda: UserData.from_structure_list(USERS.get_proxy().Users), [])
if users: if users:
names = ", ".join(u.name for u in users if u.name) names = ", ".join(u.name for u in users if u.name)
lines.append((t("recap.row_users"), t("recap.users_value", users=names))) lines.append(f" • Utilisateur(s) : {names} (sudo via wheel)")
else: else:
lines.append((t("recap.row_users"), t("recap.users_none"))) lines.append(" • Utilisateur(s) : AUCUN — pensez-y avant de lancer !")
root_locked = _safe(lambda: USERS.get_proxy().IsRootAccountLocked, None) root_locked = _safe(lambda: USERS.get_proxy().IsRootAccountLocked, None)
root_pw = _safe(lambda: USERS.get_proxy().IsRootPasswordSet, None) root_pw = _safe(lambda: USERS.get_proxy().IsRootPasswordSet, None)
if root_locked: if root_locked:
root_txt = t("recap.root_locked") root_txt = "verrouillé (recommandé)"
elif root_pw: elif root_pw:
root_txt = t("recap.root_password_set") root_txt = "actif, mot de passe défini"
elif root_pw is not None: elif root_pw is not None:
# Même règle que l'étape « Sécurité » du %post : un root resté sans # Même règle que l'étape « Sécurité » du %post : un root resté sans
# mot de passe sera verrouillé en fin d'installation. # mot de passe sera verrouillé en fin d'installation.
root_txt = t("recap.root_no_password") root_txt = "sans mot de passe → sera VERROUILLÉ en fin d'install"
else: else:
root_txt = "" root_txt = ""
if root_txt: if root_txt:
lines.append((t("recap.row_root"), root_txt)) lines.append(f" • Compte root : {root_txt}")
# Hostname : écrit par le spoke Utilisateur (patch user.py du paquet # Hostname : écrit par le spoke Utilisateur (patch user.py du paquet
# anaconda). Même nettoyage / même défaut que le %post --nochroot. # anaconda). Même nettoyage / même défaut que le %post --nochroot.
hn = "".join(c for c in _read_flag("/tmp/fws-hostname") hn = "".join(c for c in _read_flag("/tmp/fws-hostname")
if c.isalnum() or c in "._-") or "fws" if c.isalnum() or c in "._-") or "fws"
lines.append((t("recap.row_hostname"), hn)) lines.append(f" • Nom de machine : {hn}")
# Bureau : écrit par fws_desktop.apply() (sortie de la spoke). Absent = # Bureau : écrit par fws_desktop.apply() (sortie de la spoke). Absent =
# spoke jamais visitée = « cli », exactement le défaut du %post. # spoke jamais visitée = « cli », exactement le défaut du %post.
desk = _read_flag("/tmp/fws-desktop") or "cli" desk = _read_flag("/tmp/fws-desktop") or "cli"
lines.append((t("recap.row_desktop"), _desktop_label(desk))) lines.append(f" • Bureau : {_DESKTOP_LABELS.get(desk, desk)}")
method = _safe( method = _safe(
lambda: STORAGE.get_proxy( lambda: STORAGE.get_proxy(
STORAGE.get_proxy().AppliedPartitioning).PartitioningMethod, "") STORAGE.get_proxy().AppliedPartitioning).PartitioningMethod, "")
if method: if method:
lines.append((t("recap.row_partitioning"), _partitioning_label(method))) lines.append(" • Partitionnement : "
f"{_PARTITIONING_LABELS.get(method, method)}")
return lines, desk, 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(): def _build_summary():
config_lines, desk, method = _config_lines() config_lines, desk, method = _config_lines()
config_text = "\n".join(config_lines) \
or " (configuration non disponible)"
# Disques ciblés par l'installation (spoke « Destination »). # Disques ciblés par l'installation (spoke « Destination »).
selected = set(_safe( selected = set(_safe(
@@ -201,71 +177,70 @@ def _build_summary():
for line in _capture("lsblk", "-dno", "NAME,SIZE,MODEL,TYPE").splitlines(): for line in _capture("lsblk", "-dno", "NAME,SIZE,MODEL,TYPE").splitlines():
fields = line.split() fields = line.split()
if fields and fields[-1] == "disk": if fields and fields[-1] == "disk":
disk = " ".join(fields[:-1]) mark = " ← CIBLE de l'installation" if fields[0] in selected else ""
if fields[0] in selected: disks.append(" • " + " ".join(fields[:-1]) + mark)
disk = t("recap.disk_target", disk=disk) disk_text = "\n".join(disks) or " (aucun disque détecté)"
disks.append(" • " + disk)
disk_text = "\n".join(disks) or _indent(t("recap.no_disk"))
if method == "AUTOMATIC": if method == "AUTOMATIC":
disk_warn = _indent(t("recap.disk_warning_automatic")) disk_warn = (
" ⚠ Rien n'a encore été écrit. Le partitionnement automatique\n"
" EFFACERA ENTIÈREMENT le(s) disque(s) cible(s) au lancement.")
else: else:
disk_warn = _indent(t("recap.disk_warning_manual")) disk_warn = (
" ⚠ Rien n'a encore été écrit. Au lancement, ce sont vos choix\n"
" de partitionnement faits dans l'installateur qui s'appliqueront.")
virt = (_capture("systemd-detect-virt").strip().splitlines() or ["none"])[0] virt = (_capture("systemd-detect-virt").strip().splitlines() or ["none"])[0]
if virt in ("", "none"): if virt in ("", "none"):
virt = t("recap.virtualization_none") virt = "aucune (machine physique)"
gpus = [] gpus = []
for line in _capture("lspci").splitlines(): for line in _capture("lspci").splitlines():
low = line.lower() low = line.lower()
if ("vga" in low or "3d" in low or "display" in low) and ":" in line: if ("vga" in low or "3d" in low or "display" in low) and ":" in line:
gpus.append(" • " + line.split(":", 2)[-1].strip()) gpus.append(" • " + line.split(":", 2)[-1].strip())
gpu_text = "\n".join(gpus) or _indent(t("recap.no_gpu")) gpu_text = "\n".join(gpus) or " (aucune carte graphique détectée)"
try: try:
net_ok = util.execWithRedirect("ip", ["route", "get", "1.1.1.1"]) == 0 net_ok = util.execWithRedirect("ip", ["route", "get", "1.1.1.1"]) == 0
except (OSError, RuntimeError): except (OSError, RuntimeError):
net_ok = False net_ok = False
if net_ok: if net_ok:
net = t("recap.network_ok") net = "disponible ✔"
else: else:
net = t("recap.network_down") net = ("INDISPONIBLE ✖ — bureau, drivers et stack FWS ne\n"
" s'installeront PAS (rattrapable au 1er boot)")
extras = (t("recap.extras_desktop") extras = ("Steam, Wine, VR (Monado/OpenXR), PacManager"
if desk != "cli" else t("recap.extras_cli")) if desk != "cli" else "rien de plus (choix 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"""\ return f"""\
══════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════
{t("recap.summary_title")} FWS — RÉCAPITULATIF AVANT INSTALLATION
══════════════════════════════════════════════════════════ ══════════════════════════════════════════════════════════
{t("recap.section_config")} CONFIGURATION CHOISIE
{config_text} {config_text}
{t("recap.section_disks")} DISQUES
{disk_warn} {disk_warn}
{disk_text} {disk_text}
{t("recap.section_hardware")} MATÉRIEL DÉTECTÉ
{_format_rows(hardware_lines, width)} • Virtualisation : {virt}
{t("recap.gpus_heading")} • Réseau : {net}
Cartes graphiques (drivers installés automatiquement en fin d'install) :
{gpu_text} {gpu_text}
{t("recap.section_steps")} DÉROULEMENT DE L'INSTALLATION
1. {t("recap.step_partitioning")} 1. Partitionnement, puis copie du système live FWS (payload LiveOS)
2. {t("recap.step_kernel")} 2. Noyau + initramfs régénérés (mkinitcpio), GRUB installé
3. {t("recap.step_desktop")} 3. Bureau choisi + navigateur installés (réseau requis)
4. {t("recap.step_hardware")} 4. Matériel : drivers GPU, outils VM, son, Bluetooth, Podman
{t("recap.step_hardware_extras", extras=extras)} + si bureau choisi : {extras}
{t("recap.footer")} « Précédent » pour revenir modifier vos choix —
« Lancer l'installation » pour démarrer réellement l'installation.
""" """
@@ -295,6 +270,9 @@ class FWSRecapSpoke(StandaloneSpoke):
def initialize(self): def initialize(self):
StandaloneSpoke.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 # Capture pour « Précédent » : initialize() est appelé DEPUIS
# GraphicalUserInterface._on_continue_clicked (clic « Commencer # GraphicalUserInterface._on_continue_clicked (clic « Commencer
@@ -324,8 +302,7 @@ class FWSRecapSpoke(StandaloneSpoke):
# (à côté de « Quitter » — leur parent est la GtkButtonBox du bas). # (à côté de « Quitter » — leur parent est la GtkButtonBox du bas).
quit_button = self.window.get_quit_button() quit_button = self.window.get_quit_button()
button_box = quit_button.get_parent() button_box = quit_button.get_parent()
# Label set by _set_static_texts() on each display. self._back_button = Gtk.Button.new_with_mnemonic("_Précédent")
self._back_button = Gtk.Button(use_underline=True)
self._back_button.connect("clicked", self._on_back_clicked) self._back_button.connect("clicked", self._on_back_clicked)
button_box.add(self._back_button) button_box.add(self._back_button)
# [Quitter, Lancer l'installation, Précédent] -> Précédent au MILIEU, # [Quitter, Lancer l'installation, Précédent] -> Précédent au MILIEU,
@@ -361,18 +338,8 @@ class FWSRecapSpoke(StandaloneSpoke):
hub.entered.emit(hub) hub.entered.emit(hub)
ui._currentAction = 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): def refresh(self):
StandaloneSpoke.refresh(self) StandaloneSpoke.refresh(self)
self._set_static_texts()
text = _build_summary() text = _build_summary()
self.builder.get_object("recapView").get_buffer().set_text(text) self.builder.get_object("recapView").get_buffer().set_text(text)
# Copie pour le harnais de debug du .xinitrc (fws-debug.txt). # Copie pour le harnais de debug du .xinitrc (fws-debug.txt).
@@ -45,7 +45,6 @@ from gi.repository import GLib, Gtk
from pyanaconda.anaconda_loggers import get_module_logger from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.hubs.summary import SummaryHub from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke from pyanaconda.ui.gui.spokes import StandaloneSpoke
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__) log = get_module_logger(__name__)
@@ -65,6 +64,18 @@ _GREEN = "#1e7145"
_RED = "#b3261e" _RED = "#b3261e"
_GREY = "#555555" _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): def _run_engine(args, timeout=180):
"""Lance le moteur. Renvoie (code, sortie). Jamais d'exception vers l'UI.""" """Lance le moteur. Renvoie (code, sortie). Jamais d'exception vers l'UI."""
@@ -106,10 +117,6 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._status, self._details = self._detect() self._status, self._details = self._detect()
self._busy = False self._busy = False
self._resolved = 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 -- # -------------------------------------------------------------- moteur --
@staticmethod @staticmethod
@@ -145,10 +152,13 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._spinner = self.builder.get_object("rstSpinner") self._spinner = self.builder.get_object("rstSpinner")
self._status_label = self.builder.get_object("rstStatus") self._status_label = self.builder.get_object("rstStatus")
self._fallback = self.builder.get_object("rstFallback") self._fallback = self.builder.get_object("rstFallback")
self._expander = self.builder.get_object("rstExpander")
self._log = self.builder.get_object("rstLog") self._log = self.builder.get_object("rstLog")
self._button.connect("clicked", self._on_fix_clicked) 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) self._append(self._details)
# « Précédent » vers l'écran réseau, comme depuis la première étape de # « Précédent » vers l'écran réseau, comme depuis la première étape de
@@ -161,7 +171,6 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
def refresh(self): def refresh(self):
StandaloneSpoke.refresh(self) StandaloneSpoke.refresh(self)
self._set_texts()
# Continuer reste TOUJOURS possible : si la prise en charge échoue, # Continuer reste TOUJOURS possible : si la prise en charge échoue,
# l'utilisateur doit pouvoir avancer (l'écran « Destination » dira # l'utilisateur doit pouvoir avancer (l'écran « Destination » dira
# qu'aucun disque n'a été trouvé) ou revenir en arrière. Un écran dont # qu'aucun disque n'a été trouvé) ou revenir en arrière. Un écran dont
@@ -172,62 +181,33 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
def apply(self): def apply(self):
pass 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): def _headline(self):
if self._status == "raid": if self._status == "raid":
return t("rst.title_raid") return "Tes disques sont regroupés en RAID Intel"
return t("rst.title_hidden") return "Ton disque n'est pas encore visible"
def _explanation(self): def _explanation(self):
if self._resolved:
return t("rst.intro_resolved")
if self._status == "raid": if self._status == "raid":
return t("rst.intro_raid") return (
return t("rst.intro_hidden") "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.")
# ----------------------------------------------------------- affichage -- # ----------------------------------------------------------- affichage --
def _set_status(self, step): def _set_status(self, text, color=_GREY):
self._step = step
if step is None:
return
text, color = self._status_message(step)
self._status_label.set_markup( self._status_label.set_markup(
'<span foreground="%s">%s</span>' '<span foreground="%s">%s</span>'
% (color, GLib.markup_escape_text(text))) % (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): def _append(self, text):
if not text: if not text:
return return
@@ -243,7 +223,8 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
self._fallback.hide() self._fallback.hide()
self._spinner.show() self._spinner.show()
self._spinner.start() self._spinner.start()
self._set_status("working") self._set_status("Préparation du disque… quelques secondes, il n'y a "
"rien à faire.")
threading.Thread(target=self._work, daemon=True).start() threading.Thread(target=self._work, daemon=True).start()
def _work(self): def _work(self):
@@ -261,7 +242,9 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
# Le moteur a rendu la main sur un état exploitable : Anaconda doit # Le moteur a rendu la main sur un état exploitable : Anaconda doit
# REFAIRE son inventaire, sinon l'écran « Destination » resterait # REFAIRE son inventaire, sinon l'écran « Destination » resterait
# sur la liste vide construite au démarrage de l'installateur. # sur la liste vide construite au démarrage de l'installateur.
GLib.idle_add(self._set_status, "rescanning") GLib.idle_add(self._set_status,
"Le disque répond. Mise à jour de la liste des "
"disques…", _GREY)
rescanned = self._rescan_storage() rescanned = self._rescan_storage()
GLib.idle_add(self._finish, True, rescanned) GLib.idle_add(self._finish, True, rescanned)
else: else:
@@ -280,7 +263,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
# ré-analyse, et le disque est de toute façon visible du noyau. # ré-analyse, et le disque est de toute façon visible du noyau.
log.warning("FWS: nouveau scan des disques impossible : %s", exc) log.warning("FWS: nouveau scan des disques impossible : %s", exc)
GLib.idle_add(self._append, GLib.idle_add(self._append,
t("rst.rescan_failed_details", error=exc)) "[FWS] nouveau scan automatique impossible : %s" % exc)
return False return False
def _finish(self, success, rescanned): def _finish(self, success, rescanned):
@@ -290,16 +273,22 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
if success: if success:
self._resolved = True self._resolved = True
message = "C'est bon, ton disque est visible."
if not rescanned: if not rescanned:
# Honnête plutôt que faussement rassurant : on dit quoi faire. # Honnête plutôt que faussement rassurant : on dit quoi faire.
self._set_status("visible_rescan_hint") message += (" Si l'écran suivant ne le montre pas, utilise "
"« Ré-analyser les disques » à cette étape.")
else: else:
self._set_status("visible") message += " Tu peux continuer."
self._intro.set_text(self._explanation()) 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._button.hide() self._button.hide()
else: else:
self._failed = True self._set_status(
self._set_status("failed") "FWS n'a pas réussi à rendre le disque visible.", _RED)
self._fallback.set_text(_BIOS_FALLBACK)
self._fallback.show() self._fallback.show()
self._button.set_sensitive(True) self._button.set_sensitive(True)
self._button.set_label(t("rst.retry_button")) self._button.set_label("Réessayer")
@@ -50,15 +50,12 @@
# en cas d'échec, on retombe sur le hub classique, l'installation reste possible. # 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. # ⚠ Chemin couplé à la version de Python d'Arch (3.14), comme les autres spokes.
import os
import gi import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from pyanaconda.anaconda_loggers import get_module_logger from pyanaconda.anaconda_loggers import get_module_logger
from pyanaconda.ui.gui.spokes.fws_i18n import t
log = get_module_logger(__name__) log = get_module_logger(__name__)
@@ -70,16 +67,18 @@ __all__ = []
_WIZARD_ORDER = ( _WIZARD_ORDER = (
"DatetimeSpoke", # Date et heure "DatetimeSpoke", # Date et heure
"StorageSpoke", # Destination de l'installation (disque) "StorageSpoke", # Destination de l'installation (disque)
"FWSDesktopSpoke", # Bureau FWS
"UserSpoke", # Compte utilisateur + nom de machine "UserSpoke", # Compte utilisateur + nom de machine
"PasswordSpoke", # Mot de passe administrateur (root) "PasswordSpoke", # Mot de passe administrateur (root)
"FWSDesktopSpoke", # Bureau FWS
) )
# Le bouton du coin haut-gauche des écrans d'Anaconda s'appelle « Terminé » : # Le bouton du coin haut-gauche des écrans d'Anaconda s'appelle « Terminé » :
# dans un assistant, c'est le bouton « suivant ». # dans un assistant, c'est le bouton « suivant ».
_NEXT_LABEL = "_Suivant"
_BACK_LABEL = "_Précédent"
_DONE_BUTTON_NAME = "anaconda-spoke-window-done" _DONE_BUTTON_NAME = "anaconda-spoke-window-done"
# Read by /root/.xinitrc once the installer has closed.
_LANGUAGE_FILE = "/tmp/fws-lang" _WAIT_MSG = "Analyse du matériel en cours, l'écran suivant s'ouvre tout seul…"
# Écrans standalone situés JUSTE AVANT le bloc du hub : c'est là que # É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 # « Précédent » doit mener depuis la première étape de l'assistant. De là, leur
@@ -117,14 +116,6 @@ def _apply_live_keyboard():
# faisait → XLayouts vide, et /root/anaconda-ks.cfg sans « --xlayouts= » # faisait → XLayouts vide, et /root/anaconda-ks.cfg sans « --xlayouts= »
# pour le %post du kickstart. # pour le %post du kickstart.
try: try:
# SetXKeyboardDefaults() keeps layouts already set, as if they came
# from a kickstart: coming back to pick another language would keep
# the first language's keyboard. With the keyboard screen hidden, the
# layouts only ever come from the language, so they are recomputed.
if not proxy.KeyboardKickstarted:
proxy.XLayouts = []
proxy.LayoutSwitchOptions = []
proxy.VirtualConsoleKeymap = ""
proxy.SetXKeyboardDefaults() proxy.SetXKeyboardDefaults()
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
log.debug("FWS: SetXKeyboardDefaults indisponible", exc_info=True) log.debug("FWS: SetXKeyboardDefaults indisponible", exc_info=True)
@@ -185,79 +176,12 @@ def _hook_welcome_spoke():
_apply_live_keyboard() _apply_live_keyboard()
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
log.exception("FWS: application du clavier au live impossible.") 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.apply = apply
spoke_class._fws_keyboard_hooked = True spoke_class._fws_keyboard_hooked = True
log.info("FWS: clavier du live branché sur l'écran de langue.") log.info("FWS: clavier du live branché sur l'écran de langue.")
def _hook_user_spoke():
"""User screen: a user account is required, and the host name field that
the FWS anaconda package adds is translated.
Upstream Anaconda lets the screen be left empty ("No user will be
created"): FWS would then install a system whose login screen nobody can
get past, since root is meant for repairs only. "Next" is refused until a
user name is typed (the password rules stay Anaconda's), and the screen is
mandatory so the summary cannot start the installation without it.
The host name 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.core.i18n import _
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
original_back = spoke_class.on_back_clicked
def on_back_clicked(self, button):
if not self.username.strip():
# Anaconda's own message: already translated in all its languages.
self.show_warning_message(_("User name not set!"))
return
original_back(self, button)
# Second lock, looked up on every check run rather than bound when the
# screen is built: Anaconda's own exit rule lets an all-empty screen go.
original_exit_conditions = spoke_class._check_spoke_exit_conditions
def _check_spoke_exit_conditions(self, unwaivable_check_failed):
original_exit_conditions(self, unwaivable_check_failed)
if not self.username.strip():
self.can_go_back = False
self.needs_waiver = False
spoke_class.refresh = refresh
spoke_class.on_back_clicked = on_back_clicked
spoke_class._check_spoke_exit_conditions = _check_spoke_exit_conditions
spoke_class.mandatory = property(lambda self: True)
spoke_class._fws_i18n_hooked = True
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Assistant : le hub Résumé enchaîne ses écrans au lieu de les proposer # Assistant : le hub Résumé enchaîne ses écrans au lieu de les proposer
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
@@ -279,21 +203,6 @@ def _really_show(widget):
widget.show() 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): def _build_nav_bar(spoke, on_back):
"""Barre de navigation « Précédent / Suivant » en BAS À DROITE. """Barre de navigation « Précédent / Suivant » en BAS À DROITE.
@@ -327,8 +236,7 @@ def _build_nav_bar(spoke, on_back):
box.set_margin_end(6) box.set_margin_end(6)
box.set_margin_bottom(6) box.set_margin_bottom(6)
back = Gtk.Button() back = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
_follow_language(back, lambda: t("wizard.back"))
back.connect("clicked", lambda _button: on_back(spoke)) back.connect("clicked", lambda _button: on_back(spoke))
box.add(back) box.add(back)
@@ -336,7 +244,8 @@ def _build_nav_bar(spoke, on_back):
# La variable Python garde une référence forte : le retrait du GtkGrid # 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. # ne peut donc pas détruire le bouton avant qu'on le rattache.
window.get_nav_area().remove(done) window.get_nav_area().remove(done)
_follow_language(done, lambda: t("wizard.next")) done.set_use_underline(True)
done.set_label(_NEXT_LABEL)
box.add(done) box.add(done)
window.get_main_box().pack_start(box, False, True, 0) window.get_main_box().pack_start(box, False, True, 0)
@@ -440,8 +349,7 @@ def add_back_button(spoke, target_class_name):
log.warning("FWS: barre de boutons introuvable, « Précédent » non ajouté.") log.warning("FWS: barre de boutons introuvable, « Précédent » non ajouté.")
return None return None
button = Gtk.Button() button = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
_follow_language(button, lambda: t("wizard.back"))
button.connect("clicked", button.connect("clicked",
lambda _b: go_back_to_standalone(spoke, target_class_name)) lambda _b: go_back_to_standalone(spoke, target_class_name))
button_box.add(button) button_box.add(button)
@@ -604,7 +512,7 @@ def _install_wizard():
# set_info, elle clignoterait 10 fois par seconde. # set_info, elle clignoterait 10 fois par seconde.
if getattr(self, "_fws_pending", None) is not spoke: if getattr(self, "_fws_pending", None) is not spoke:
self._fws_pending = spoke self._fws_pending = spoke
self.set_info(t("wizard.wait_hardware_scan")) self.set_info(_WAIT_MSG)
return return
self._fws_pending = None self._fws_pending = None
@@ -739,11 +647,6 @@ try:
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
log.exception("FWS: clavier immédiat non branché (écran de langue inchangé).") 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: écran utilisateur laissé tel quel (compte facultatif, nom de machine non traduit).")
try: try:
_patch_main_window() _patch_main_window()
except Exception: # pylint: disable=broad-except except Exception: # pylint: disable=broad-except
@@ -1,91 +0,0 @@
#!/usr/bin/env python3
"""Print FWS texts in the language of the environment.
Usage:
fws-i18n [--catalog NAME] <key> [name=value ...]
fws-i18n --catalog NAME --shell <namespace>...
fws-i18n --catalog NAME --render <file>
The first form prints one text: the live session (/root/.xinitrc) uses it for
the dialogs shown after the installer has closed. The catalog defaults to
"installer"; "system" holds the texts of the FWS tools.
--shell prints Bash assignments of every text of the given namespaces into the
associative array FWS_T, placeholders left in: /usr/local/lib/fws/i18n.sh loads
them once per script instead of starting Python for every message.
--render prints <file> with each {{t:key}} replaced by its text. The installer
uses it on the desktop configuration files it copies into the home folders.
Texts are escaped for JSON in a .json file; elsewhere their straight quotes are
made typographic, since these files embed them in quoted shell arguments.
"""
import json
import re
import shlex
import sys
sys.path.insert(0, "/usr/local/lib/fws")
MARKER = re.compile(r"\{\{t:([a-z0-9_]+(?:\.[a-z0-9_]+)+)\}\}")
TYPOGRAPHIC_QUOTES = str.maketrans({"'": "’", '"': "”"})
def shell_assignments(catalog, namespaces):
lines = ["declare -gA FWS_T"]
for key in sorted(catalog.messages()):
if key.split(".", 1)[0] in namespaces:
text = catalog.text(key)
if text is not None:
lines.append(f"FWS_T[{key}]={shlex.quote(text)}")
return "\n".join(lines)
def render(catalog, path):
with open(path, encoding="utf-8") as fh:
content = fh.read()
as_json = path.endswith(".json")
def replace(match):
text = catalog.t(match.group(1))
if as_json:
return json.dumps(text, ensure_ascii=False)[1:-1]
return text.translate(TYPOGRAPHIC_QUOTES)
return MARKER.sub(replace, content)
def main(argv):
name = "installer"
if len(argv) >= 2 and argv[0] == "--catalog":
name, argv = argv[1], argv[2:]
if not argv:
print(__doc__.strip().splitlines()[2], file=sys.stderr)
return 2
try:
import fws_i18n
catalog = fws_i18n.catalog(name)
except Exception as exc: # pylint: disable=broad-except
print(f"fws-i18n: {exc}", file=sys.stderr)
catalog = None
if argv[0] == "--shell":
# An empty array still lets the scripts run: they show keys then.
print(shell_assignments(catalog, set(argv[1:])) if catalog
else "declare -gA FWS_T")
return 0
if argv[0] == "--render":
if len(argv) != 2 or catalog is None:
return 2
sys.stdout.write(render(catalog, argv[1]))
return 0
key = argv[0]
fields = dict(arg.split("=", 1) for arg in argv[1:] if "=" in arg)
# A dialog with the key in it beats no dialog at all.
print(catalog.t(key, **fields) if catalog else key)
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
@@ -1,176 +0,0 @@
# FWS — translations of the FWS installer screens and of the FWS tools.
#
# Anaconda, the desktops and their applications translate themselves through
# gettext; the FWS parts are in none of their catalogs. Their texts live in TOML
# catalogs (one table per message, one entry per language) and are looked up by
# key:
#
# installer-translations.toml the FWS installer screens and live dialogs
# system-translations.toml the FWS tools of the installed system
#
# The language is read from the environment on every call, in gettext's order
# ($LANGUAGE, $LC_ALL, $LC_MESSAGES, $LANG). Anaconda keeps only $LANG, set to
# the language picked on its first screen, so a screen that sets its texts each
# time it is shown follows a language change made by going back to that screen;
# on the installed system the tools follow the desktop's language setting.
#
# This file sits outside Python's versioned site-packages so that the tools
# keep working when Python is upgraded or Anaconda removed.
import os
import tomllib
try:
from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)
except ImportError:
import logging
log = logging.getLogger(__name__)
TRANSLATIONS_DIR = "/usr/local/share/fws"
FALLBACK_LANGUAGE = "en"
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 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
Without an argument, every locale of the environment is expanded in turn.
"""
names = _environment_locales() if locale_name is None else [locale_name]
candidates = []
for name in names:
base, _, modifier = name.partition("@")
base = base.split(".", 1)[0]
language, _, territory = base.partition("_")
if not language:
continue
suffix = f"@{modifier}" if modifier else ""
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 list(dict.fromkeys(candidates))
def _environment_locales():
"""Message locales of the environment, in gettext's order.
$LANGUAGE is a priority list (de_CH:de:en) that gettext ignores when the
locale itself is C, so it is ignored here too.
"""
env = os.environ
locale_name = env.get("LC_ALL") or env.get("LC_MESSAGES") or env.get("LANG")
if not locale_name:
# sudo can drop the locale variables: a tool run as root then speaks
# the system's language, as systemd services do.
locale_name = _system_locale()
if locale_name.split(".", 1)[0] in ("", "C", "POSIX"):
return []
return [name for name in env.get("LANGUAGE", "").split(":") if name] + [locale_name]
def _system_locale():
try:
with open("/etc/locale.conf", encoding="utf-8") as fh:
for line in fh:
name, _, value = line.strip().partition("=")
if name == "LANG":
return value.strip().strip("\"'")
except OSError:
pass
return ""
class Catalog:
"""One translations file, reloaded when it changes on disk."""
def __init__(self, name):
self.path = os.path.join(TRANSLATIONS_DIR, f"{name}-translations.toml")
self._mtime = None
self._messages = {}
self._reported = set()
def messages(self):
"""{key: {language: text}}; empty when the file is missing or broken."""
try:
mtime = os.stat(self.path).st_mtime
except OSError:
return {}
if self._mtime != mtime:
try:
with open(self.path, "rb") as fh:
self._messages = dict(_flatten(tomllib.load(fh)))
except (OSError, tomllib.TOMLDecodeError) as exc:
# A broken file must not take the program down: keys are shown
# instead of texts, which is visible but harmless.
log.error("FWS: unreadable translations file %s: %s", self.path, exc)
self._messages = {}
self._mtime = mtime
return self._messages
def text(self, key, languages=None):
"""Raw text of `key` (placeholders left in), or None."""
texts = self.messages().get(key)
if texts:
for language in languages or language_candidates():
if texts.get(language):
return texts[language]
return None
def t(self, key, **fields):
"""Text of `key` in the current language.
Named `fields` fill the {placeholders} of the text; fields the text
does not use are ignored. An unknown key is returned as is, so a
missing translation shows up on screen instead of crashing.
"""
text = self.text(key)
if text is None:
if key not in self._reported:
self._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 = self.text(key, [FALLBACK_LANGUAGE]) or key
try:
return reference.format(**fields)
except (KeyError, IndexError, ValueError):
return reference
_catalogs = {}
def catalog(name):
"""The catalog `name` ("installer" or "system"), loaded once per process."""
if name not in _catalogs:
_catalogs[name] = Catalog(name)
return _catalogs[name]
def t(key, **fields):
"""Text of an installer message (see Catalog.t)."""
return catalog("installer").t(key, **fields)
@@ -1,40 +0,0 @@
# FWS — translations for the FWS shell tools (Bash, sourced).
#
# . /usr/local/lib/fws/i18n.sh <namespace>...
# say "$(t <key> [name=value]...)"
#
# Loads every text of the given namespaces of system-translations.toml with a
# single fws-i18n call, in the language of the environment; t then fills the
# {placeholders} in Bash. A missing text prints its key, like the Python tools.
# Literal braces ({{ }}) are not supported in texts used from shell.
declare -gA FWS_T=()
eval "$(/usr/local/bin/fws-i18n --catalog system --shell "$@" 2>/dev/null)" || true
t() {
local text="${FWS_T[$1]-$1}" pair
shift
for pair in "$@"; do
text="${text//"{${pair%%=*}}"/"${pair#*=}"}"
done
printf '%s' "$text"
}
# The answers a yes/no prompt accepts: the translated word, its first letter,
# the same without accents ("si" for "sí": not every keyboard has them), and
# the English ones that every keyboard can type.
t_is_yes() {
local answer="${1,,}" yes plain
yes="$(t common.yes)"
yes="${yes,,}"
[ -n "$answer" ] || return 1
# C.UTF-8 is built into glibc, so transliteration works even when the
# session's locale is not generated; anything else than plain letters
# (a non-Latin word comes out as "?" marks) keeps the word as written.
plain="$(printf '%s' "$yes" | LC_ALL=C.UTF-8 iconv -f UTF-8 -t ASCII//TRANSLIT 2>/dev/null)"
[[ "$plain" =~ ^[a-z]+$ ]] || plain="$yes"
case "$answer" in
y | yes | "$yes" | "${yes:0:1}" | "$plain" | "${plain:0:1}") return 0 ;;
esac
return 1
}
@@ -1,112 +0,0 @@
#!/usr/bin/env python3
"""Add the FWS translations of Anaconda's own texts to Anaconda's catalogs.
Run at build time by customize_airootfs.sh (usage: merge-anaconda-translations.py
[--root DIR]). Anaconda's catalogs leave some of its screens partly in English
in several languages (Bulgarian lacks most of the root account screen, for
instance). anaconda-translations.toml holds translations for the texts of the
screens FWS shows; each one is added to /usr/share/locale/<lang>/LC_MESSAGES/
anaconda.mo only when Anaconda has none, or only a copy of the English text
(Italian has "_Root Account" as is): its own translations always win. One
catalog serves both the Python code and GtkBuilder, so the .mo is rewritten
rather than a second domain added.
"""
import argparse
import os
import struct
import sys
import tomllib
SUPPLEMENT = "usr/local/share/fws/anaconda-translations.toml"
CATALOG = "usr/share/locale/{language}/LC_MESSAGES/anaconda.mo"
CONTEXT_SEPARATOR = b"\x04"
def read_mo(path):
"""[(original bytes, translation bytes)], plural and context keys as stored."""
with open(path, "rb") as fh:
data = fh.read()
magic = struct.unpack("<I", data[:4])[0]
order = "<" if magic == 0x950412DE else ">"
_, count, originals, translations = struct.unpack(order + "4I", data[4:20])
entries = []
for index in range(count):
length, offset = struct.unpack(order + "2I", data[originals + 8 * index:originals + 8 * index + 8])
key = data[offset:offset + length]
length, offset = struct.unpack(order + "2I", data[translations + 8 * index:translations + 8 * index + 8])
entries.append((key, data[offset:offset + length]))
return entries
def write_mo(path, entries):
"""Write a .mo without hash table: gettext then looks keys up by binary
search, which needs the originals sorted bytewise."""
entries = sorted(entries)
count = len(entries)
header = 7 * 4
originals_table = header
translations_table = originals_table + 8 * count
data_start = translations_table + 8 * count
blobs, original_index, translation_index = b"", b"", b""
for key, _ in entries:
original_index += struct.pack("<2I", len(key), data_start + len(blobs))
blobs += key + b"\0"
for _, value in entries:
translation_index += struct.pack("<2I", len(value), data_start + len(blobs))
blobs += value + b"\0"
with open(path + ".fws", "wb") as fh:
fh.write(struct.pack("<7I", 0x950412DE, 0, count, originals_table,
translations_table, 0, data_start))
fh.write(original_index + translation_index + blobs)
os.replace(path + ".fws", path)
def is_translated(key, value):
"""A copy of the English text is how some catalogs leave a text untranslated."""
msgid = key.split(CONTEXT_SEPARATOR, 1)[-1]
return bool(value) and value != msgid
def main():
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument("--root", default="/")
args = parser.parse_args()
supplement = os.path.join(args.root, SUPPLEMENT)
try:
with open(supplement, "rb") as fh:
messages = tomllib.load(fh).get("message", [])
except (OSError, tomllib.TOMLDecodeError) as exc:
print(f"merge-anaconda-translations: {supplement}: {exc}", file=sys.stderr)
return 1
by_language = {}
for message in messages:
key = message["msgid"].encode()
if message.get("context"):
key = message["context"].encode() + CONTEXT_SEPARATOR + key
for language, text in message.items():
# A text that reads the same as the English (de "Region") would
# change nothing on screen and look missing again on every run.
if language not in ("msgid", "context") and text != message["msgid"]:
by_language.setdefault(language, {})[key] = text.encode()
added = {}
for language, texts in sorted(by_language.items()):
path = os.path.join(args.root, CATALOG.format(language=language))
if not os.path.exists(path):
print(f"merge-anaconda-translations: no Anaconda catalog for {language}", file=sys.stderr)
continue
entries = read_mo(path)
present = {key for key, value in entries if is_translated(key, value)}
new = [(key, value) for key, value in texts.items() if key not in present]
if new:
write_mo(path, [(key, value) for key, value in entries if key not in texts or key in present] + new)
added[language] = len(new)
print("merge-anaconda-translations: " + (", ".join(f"{lang} +{n}" for lang, n in added.items()) or "nothing to add"))
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -1,147 +0,0 @@
#!/usr/bin/env python3
"""Write the FWS translations into the files that cannot look them up.
Run at build time by customize_airootfs.sh (usage: translate-static-files.py
[--root DIR], DIR defaulting to /). Menu entries, the SDDM theme and polkit
policies are read by programs that know nothing of the FWS catalogs, so the
texts of system-translations.toml are written into them, every language at
once; each program then picks the language of its user.
- Desktop entries carrying X-FWS-Translation=<prefix> get their Name,
GenericName, Comment and Keywords from <prefix>.name, .generic_name,
.comment and .keywords: the English text as the plain key, the other
languages as Name[de]= and so on.
- The SDDM theme "fws" gets translations.js with every sddm.* text.
- A polkit action containing <!-- fws-i18n: <prefix> --> gets its
<description> and <message> from <prefix>.description and .message.
"""
import argparse
import json
import os
import re
import sys
from xml.sax.saxutils import escape
FWS_LIB = "/usr/local/lib/fws"
DESKTOP_DIRS = ["usr/share/applications", "etc/xdg/autostart", "usr/local/share/applications"]
DESKTOP_FIELDS = {"Name": "name", "GenericName": "generic_name",
"Comment": "comment", "Keywords": "keywords"}
SDDM_TRANSLATIONS = "usr/share/sddm/themes/fws/translations.js"
POLKIT_DIR = "usr/share/polkit-1/actions"
POLKIT_MARKER = re.compile(r"<!--\s*fws-i18n:\s*([a-z0-9_.]+)\s*-->")
def desktop_value(text, field):
text = text.replace("\\", "\\\\").replace("\n", "\\n").replace("\t", "\\t")
if field == "Keywords" and not text.endswith(";"):
text += ";"
return text
def translate_desktop_entry(path, messages):
with open(path, encoding="utf-8") as fh:
lines = fh.read().splitlines()
prefix = next((line.split("=", 1)[1].strip() for line in lines
if line.startswith("X-FWS-Translation=")), None)
if not prefix:
return False
out, group = [], None
for line in lines:
if line.startswith("["):
group = line.strip()
field = line.split("=", 1)[0]
base = field.split("[", 1)[0]
texts = messages.get(f"{prefix}.{DESKTOP_FIELDS.get(base, '')}")
if group != "[Desktop Entry]" or base not in DESKTOP_FIELDS or not texts:
out.append(line)
continue
if field != base:
continue # an old translation, rewritten below
out.append(f"{base}={desktop_value(texts['en'], base)}")
for language in sorted(texts):
if language != "en":
out.append(f"{base}[{language}]={desktop_value(texts[language], base)}")
with open(path, "w", encoding="utf-8") as fh:
fh.write("\n".join(out) + "\n")
return True
def write_sddm_translations(path, messages):
sddm = {key: texts for key, texts in messages.items() if key.startswith("sddm.")}
with open(path, "w", encoding="utf-8") as fh:
fh.write(".pragma library\n"
"// Generated at build time from system-translations.toml.\n"
f"var messages = {json.dumps(sddm, ensure_ascii=False, sort_keys=True)};\n")
def translate_policy(path, messages):
with open(path, encoding="utf-8") as fh:
content = fh.read()
changed = False
def action(match):
nonlocal changed
block = match.group(0)
marker = POLKIT_MARKER.search(block)
if not marker:
return block
for element in ("description", "message"):
texts = messages.get(f"{marker.group(1)}.{element}")
if not texts:
continue
# Drop earlier translations, then put the English text back with
# every other language after it.
block = re.sub(rf"\s*<{element} xml:lang=\"[^\"]*\">.*?</{element}>", "", block)
base = re.search(rf"([ \t]*)<{element}>.*?</{element}>", block)
if not base:
continue
indent = base.group(1)
lines = [f"{indent}<{element}>{escape(texts['en'])}</{element}>"]
lines += [f"{indent}<{element} xml:lang=\"{language}\">{escape(text)}</{element}>"
for language, text in sorted(texts.items()) if language != "en"]
block = block[:base.start()] + "\n".join(lines) + block[base.end():]
changed = True
return block
content = re.sub(r"<action\b.*?</action>", action, content, flags=re.S)
if changed:
with open(path, "w", encoding="utf-8") as fh:
fh.write(content)
return changed
def main():
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument("--root", default="/")
args = parser.parse_args()
sys.path.insert(0, os.path.join(args.root, FWS_LIB.lstrip("/")))
import fws_i18n # pylint: disable=import-outside-toplevel
fws_i18n.TRANSLATIONS_DIR = os.path.join(args.root, fws_i18n.TRANSLATIONS_DIR.lstrip("/"))
messages = fws_i18n.catalog("system").messages()
if not messages:
print("translate-static-files: system-translations.toml missing or unreadable",
file=sys.stderr)
return 1
done = []
for folder in DESKTOP_DIRS:
folder = os.path.join(args.root, folder)
for name in sorted(os.listdir(folder)) if os.path.isdir(folder) else []:
if name.endswith(".desktop") and translate_desktop_entry(os.path.join(folder, name), messages):
done.append(name)
sddm = os.path.join(args.root, SDDM_TRANSLATIONS)
if os.path.isdir(os.path.dirname(sddm)):
write_sddm_translations(sddm, messages)
done.append("sddm")
policies = os.path.join(args.root, POLKIT_DIR)
for name in sorted(os.listdir(policies)) if os.path.isdir(policies) else []:
if name.startswith("org.fws.") and translate_policy(os.path.join(policies, name), messages):
done.append(name)
print(f"translate-static-files: {', '.join(done) or 'nothing to translate'}")
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -23,7 +23,6 @@
# that into one step per installation phase and a message that says which # that into one step per installation phase and a message that says which
# script is running and what it is doing. # script is running and what it is doing.
# #
import json
import os import os
import re import re
import threading import threading
@@ -48,18 +47,6 @@ FWS_PROGRESS_POLL = 0.5
FWS_TITLE_PATTERN = re.compile(r"^#\s*FWS-TITLE:\s*(.+?)\s*$", re.MULTILINE) 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): class _ProgressWatcher(threading.Thread):
"""Follow the progress published by the running kickstart script. """Follow the progress published by the running kickstart script.
@@ -162,15 +149,11 @@ class RunScriptsTask(Task):
:param label: what is being done, in the installer language :param label: what is being done, in the installer language
""" """
index, total, title = self._current_script index, total, title = self._current_script
message = "%s — %s %%" % (label, percent)
if total > 1: if total > 1:
message = _fws_message("fws:progress.script_phase", index=index, message = "Script %d/%d · %s" % (index, total, message)
total=total, label=label, percent=percent)
elif title: elif title:
message = _fws_message("fws:progress.titled_phase", title=title, message = "%s · %s" % (title, message)
label=label, percent=percent)
else:
message = _fws_message("fws:progress.phase", label=label,
percent=percent)
step = min(self.steps, int(percent * self.steps / 100)) step = min(self.steps, int(percent * self.steps / 100))
log.debug("FWS install progress: %s (step %s/%s)", message, step, self.steps) log.debug("FWS install progress: %s (step %s/%s)", message, step, self.steps)
@@ -183,7 +166,7 @@ class RunScriptsTask(Task):
match = FWS_TITLE_PATTERN.search(getattr(script, "script", "") or "") match = FWS_TITLE_PATTERN.search(getattr(script, "script", "") or "")
if match: if match:
return match.group(1) return match.group(1)
return _fws_message("fws:progress.untitled_script", index=index) return "Script %d" % index
def run(self): def run(self):
"""Execute the task.""" """Execute the task."""
@@ -196,8 +179,7 @@ class RunScriptsTask(Task):
# percentages published by the script itself, so it never runs # percentages published by the script itself, so it never runs
# ahead of what has actually been done. # ahead of what has actually been done.
self.report_progress( self.report_progress(
_fws_message("fws:progress.script_start", index=index, "Script %d/%d · %s" % (index, total, self._current_script[2])
total=total, title=self._current_script[2])
) )
watcher = _ProgressWatcher(self) watcher = _ProgressWatcher(self)
@@ -1,336 +0,0 @@
#
# 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)
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- FWS — onglet « Desktop Environment » (choix du bureau à installer). --> <!-- 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> <interface>
<requires lib="gtk+" version="3.6"/> <requires lib="gtk+" version="3.6"/>
<requires lib="AnacondaWidgets" version="1.0"/> <requires lib="AnacondaWidgets" version="1.0"/>
+31 -48
View File
@@ -1,8 +1,3 @@
# 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 # Load partition table and file system modules
insmod part_gpt insmod part_gpt
insmod part_msdos insmod part_msdos
@@ -41,60 +36,52 @@ else
archiso_platform="${grub_cpu}-${grub_platform}" archiso_platform="${grub_cpu}-${grub_platform}"
fi 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 # Set default menu entry
default=fws default=fwslinux
timeout=3 timeout=20
timeout_style=menu timeout_style=menu
# Menu entries # Menu entries
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' { menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
set gfxpayload=keep set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45 linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
} }
# Safe graphics: no KMS, X falls back to the firmware framebuffer. if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' { menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
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 set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi 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
} }
fi fi
if [ "${grub_platform}" == 'efi' ]; then if [ "${grub_platform}" == 'efi' ]; then
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' --class efi { menuentry 'UEFI Shell' --class efi {
chainloader /shell${uefi_machine_type_lower}.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
} }
fi fi
@@ -112,7 +99,3 @@ menuentry 'System restart' --class reboot --class restart {
echo 'System rebooting...' echo 'System rebooting...'
reboot reboot
} }
# Audible cue that the menu is up, for users of the speech entry.
play 600 988 1 1319 4
+29 -40
View File
@@ -13,63 +13,52 @@ else
archiso_platform="${grub_cpu}-${grub_platform}" archiso_platform="${grub_cpu}-${grub_platform}"
fi 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 # Set default menu entry
default=fws default=fwslinux
timeout=3 timeout=15
timeout_style=menu timeout_style=menu
# Menu entries (same as grub.cfg, booted through GRUB's loopback support) # Menu entries
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' { menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
set gfxpayload=keep set gfxpayload=keep
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 linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
} }
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' { if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
set gfxpayload=keep menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
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 set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi linux /boot/memtest86+/memtest.efi
} }
elif [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then fi
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool { 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 set gfxpayload=800x600,1024x768
linux /boot/memtest86+/memtest linux /boot/memtest86+/memtest
} }
fi fi
if [ "${grub_platform}" == 'efi' ]; then if [ "${grub_platform}" == 'efi' ]; then
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
menuentry 'UEFI Shell' --class efi { menuentry 'UEFI Shell' --class efi {
chainloader /shell${uefi_machine_type_lower}.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
} }
fi fi
+7 -1
View File
@@ -124,6 +124,12 @@ qemu-guest-agent
virtualbox-guest-utils-nox virtualbox-guest-utils-nox
open-vm-tools 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) --- # --- FWS (fws-local) ---
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un # Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier # répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
@@ -140,7 +146,7 @@ anaconda
# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit. # que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit.
python-legacy-cgi python-legacy-cgi
# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par # Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par
# pyanaconda/core/users.py (hash des mots de passe). Fourni par [extra]. # pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local).
python-crypt_r python-crypt_r
# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree # Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree
# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'. # (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'.
+2 -19
View File
@@ -26,20 +26,7 @@ Architecture = auto
#IgnoreGroup = #IgnoreGroup =
#NoUpgrade = #NoUpgrade =
# Build-time only: this file is never copied into the image. Nothing reads the #NoExtract =
# 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
# Firmware of router and server chips, never found in a PC (~47 MiB): Qualcomm
# IPQ/QCN Wi-Fi SoCs, MediaTek Filogic access points (mt7996), NXP DPAA2,
# Chelsio and Broadcom NetXtreme II server cards, QLogic NetXen. build.sh adds
# the firmware versions the kernel never loads (scripts/firmware-noextract.py).
NoExtract = usr/lib/firmware/ath11k/IPQ* usr/lib/firmware/ath11k/QCN9074* usr/lib/firmware/ath12k/IPQ* usr/lib/firmware/ath12k/QCN9274* usr/lib/firmware/mediatek/mt7996/* usr/lib/firmware/dpaa2/* usr/lib/firmware/cxgb4/* usr/lib/firmware/bnx2x/* usr/lib/firmware/phanfw.bin*
# Bytecode for "python -O" only (~7 MiB): nothing runs Python that way, and
# the plain .pyc next to them stays.
NoExtract = usr/lib/python3*/__pycache__/*.opt-1.pyc usr/lib/python3*/__pycache__/*.opt-2.pyc
# Misc options # Misc options
#UseSyslog #UseSyslog
@@ -56,7 +43,7 @@ ParallelDownloads = 5
# trusts (see pacman-key and its man page), as well as unsigned packages. # trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional LocalFileSigLevel = Optional
RemoteFileSigLevel = Optional #RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local # 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 # keyring can then be populated with the keys of all official Arch Linux
@@ -106,10 +93,6 @@ Include = /etc/pacman.d/mirrorlist
#[multilib] #[multilib]
#Include = /etc/pacman.d/mirrorlist #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 # An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories. # tips on creating your own repositories.
#[custom] #[custom]
+1 -4
View File
@@ -8,9 +8,7 @@ iso_application="Linux made simple, without giving up its power"
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)" iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
install_dir="fws" install_dir="fws"
buildmodes=('iso') buildmodes=('iso')
# uefi.grub: the EFI partition only holds GRUB, which loads the kernel and bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
# initramfs from ISO 9660 (systemd-boot needed its own copy of both).
bootmodes=('bios.syslinux' 'uefi.grub')
arch="x86_64" arch="x86_64"
pacman_conf="pacman.conf" pacman_conf="pacman.conf"
airootfs_image_type="squashfs" airootfs_image_type="squashfs"
@@ -49,6 +47,5 @@ file_permissions=(
["/usr/local/bin/fws-bugreport"]="0:0:755" ["/usr/local/bin/fws-bugreport"]="0:0:755"
["/usr/local/bin/fws-wallpaper"]="0:0:755" ["/usr/local/bin/fws-wallpaper"]="0:0:755"
["/usr/local/bin/fws-install-step"]="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" ["/etc/grub.d/42_fws-recovery"]="0:0:755"
) )
@@ -1,8 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
X-FWS-Translation=apps.drivers_autostart Name=Pilotes et matériel (FWS)
Name=Drivers & Hardware (FWS) Comment=Terminer la mise en route du matériel au premier démarrage
Comment=Finish setting up the hardware on first start
# --autostart : ne s'affiche que si le marqueur /var/lib/fws/hardware-done est # --autostart : ne s'affiche que si le marqueur /var/lib/fws/hardware-done est
# absent et que l'utilisateur ne l'a pas refusée. Deux cas le laissent absent : # absent et que l'utilisateur ne l'a pas refusée. Deux cas le laissent absent :
# une installation sans réseau (rien n'a pu être installé), et — sur un bureau — # une installation sans réseau (rien n'a pu être installé), et — sur un bureau —
@@ -1,8 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
X-FWS-Translation=apps.hello_autostart Name=Bienvenue sur FWS
Name=Welcome to FWS Comment=Fenêtre de bienvenue au premier démarrage
Comment=Welcome window on first start
Exec=fws-hello --autostart Exec=fws-hello --autostart
Icon=help-about Icon=help-about
Terminal=false Terminal=false
@@ -1,8 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
X-FWS-Translation=apps.wallpaper_autostart Name=Fond d'écran FWS
Name=FWS wallpaper Comment=Applique le fond d'écran FWS au premier démarrage (le choix de l'utilisateur est conservé ensuite)
Comment=Sets the FWS wallpaper on first start (the user's choice is kept afterwards)
# --autostart réessaie jusqu'à 20 min si le bureau n'est pas encore prêt. # --autostart réessaie jusqu'à 20 min si le bureau n'est pas encore prêt.
Exec=fws-wallpaper --autostart Exec=fws-wallpaper --autostart
TryExec=fws-wallpaper TryExec=fws-wallpaper
+35 -38
View File
@@ -1,14 +1,12 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# FWS — « About » window: two tabs, « The FWS project » (what FWS is, version, # FWS — fenêtre « À propos » : deux onglets, « Le projet FWS » (ce qu'est FWS,
# links) and « System » (detected hardware and software). Replaces the « About # version, liens) et « Système » (matériel + logiciel détectés). Remplace le
# Xfce » of libxfce4ui with an FWS-branded page. Texts come from # « About Xfce » de libxfce4ui par une page de marque FWS. GTK3 (python-gobject
# system-translations.toml (about.* keys). GTK3 (python-gobject installed with # installé avec le bureau).
# the desktop).
import os import os
import re import re
import subprocess import subprocess
import sys
import gi import gi
@@ -16,11 +14,6 @@ gi.require_version("Gtk", "3.0")
gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3) gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3)
from gi.repository import Gdk, GLib, Gtk # noqa: E402 from gi.repository import Gdk, GLib, Gtk # noqa: E402
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
t = catalog("system").t
GLib.set_prgname("fws-about") GLib.set_prgname("fws-about")
@@ -55,7 +48,7 @@ def _cpu():
return line.split(":", 1)[1].strip() return line.split(":", 1)[1].strip()
except OSError: except OSError:
pass pass
return t("about.unknown") return "inconnu"
def _mem(): def _mem():
@@ -64,10 +57,10 @@ def _mem():
for line in fh: for line in fh:
if line.startswith("MemTotal"): if line.startswith("MemTotal"):
kib = int(line.split()[1]) kib = int(line.split()[1])
return t("about.memory_size", size=f"{kib / 1048576:.1f}") return f"{kib / 1048576:.1f} Gio"
except OSError: except OSError:
pass pass
return t("about.unknown") return "inconnu"
def _gpus(): def _gpus():
@@ -76,7 +69,7 @@ def _gpus():
low = line.lower() low = line.lower()
if "vga" in low or "3d" in low or "display" in low: if "vga" in low or "3d" in low or "display" in low:
out.append(line.split(":", 2)[-1].strip()) out.append(line.split(":", 2)[-1].strip())
return out or [t("about.unknown")] return out or ["inconnu"]
def _desktop(): def _desktop():
@@ -84,13 +77,12 @@ def _desktop():
return "Hyprland" return "Hyprland"
env = os.environ.get("XDG_CURRENT_DESKTOP") \ env = os.environ.get("XDG_CURRENT_DESKTOP") \
or os.environ.get("DESKTOP_SESSION") or "" or os.environ.get("DESKTOP_SESSION") or ""
return env or t("about.unknown") return env or "inconnu"
def _session_type(): def _session_type():
session_type = os.environ.get("XDG_SESSION_TYPE", "") t = os.environ.get("XDG_SESSION_TYPE", "")
return {"wayland": "Wayland", "x11": "X11"}.get( return {"wayland": "Wayland", "x11": "X11"}.get(t, t or "inconnu")
session_type, session_type or t("about.unknown"))
def _disks(): def _disks():
@@ -99,7 +91,7 @@ def _disks():
f = line.split() f = line.split()
if f and f[-1] == "disk": if f and f[-1] == "disk":
out.append(" ".join(f[:-1])) out.append(" ".join(f[:-1]))
return out or [t("about.unknown")] return out or ["inconnu"]
def _grid(rows): def _grid(rows):
@@ -122,36 +114,43 @@ def _project_tab(osr):
title.set_markup(f"<span size='xx-large' weight='bold'>{name}</span>") title.set_markup(f"<span size='xx-large' weight='bold'>{name}</span>")
box.pack_start(title, False, False, 0) box.pack_start(title, False, False, 0)
tag = Gtk.Label(label=t("about.tagline")) tag = Gtk.Label(label="Une distribution Linux qui ouvre ses bras à tout "
"le monde : simple dès le premier démarrage, sans "
"rien retirer à Linux — c'est un Arch complet "
"dessous, et tout y reste possible.")
tag.set_line_wrap(True) tag.set_line_wrap(True)
tag.set_max_width_chars(52) tag.set_max_width_chars(52)
box.pack_start(tag, False, False, 0) box.pack_start(tag, False, False, 0)
feats = Gtk.Label() feats = Gtk.Label()
feats.set_markup(t("about.features")) feats.set_markup(
"<b>Inclus :</b> installateur graphique · plusieurs bureaux "
"(GNOME, KDE, Hyprland, i3, XFCE) · Steam &amp; Proton-GE · "
"réalité virtuelle (SteamVR) · PacManager (paquets) · "
"pare-feu · réparation système intégrée.")
feats.set_line_wrap(True) feats.set_line_wrap(True)
feats.set_max_width_chars(52) feats.set_max_width_chars(52)
feats.set_xalign(0) feats.set_xalign(0)
box.pack_start(feats, False, False, 6) box.pack_start(feats, False, False, 6)
home = osr.get("HOME_URL") or "https://gitea.nocode-var.tech/FWS/FWS-ISO" home = osr.get("HOME_URL") or "https://gitea.nocode-var.tech/FWS/FWS-ISO"
link = Gtk.LinkButton.new_with_label(home, t("about.project_website")) link = Gtk.LinkButton.new_with_label(home, "Site du projet")
box.pack_start(link, False, False, 0) box.pack_start(link, False, False, 0)
return box return box
def _system_tab(osr): def _system_tab(osr):
rows = [ rows = [
(t("about.system_label"), osr.get("PRETTY_NAME", "FWS Linux")), ("Système", osr.get("PRETTY_NAME", "FWS Linux")),
(t("about.build_label"), osr.get("BUILD_ID", "rolling")), ("Build", osr.get("BUILD_ID", "rolling")),
(t("about.kernel_label"), _cmd("uname", "-r") or t("about.unknown")), ("Noyau", _cmd("uname", "-r") or "inconnu"),
(t("about.desktop_label"), _desktop()), ("Bureau", _desktop()),
(t("about.display_label"), _session_type()), ("Affichage", _session_type()),
(t("about.hostname_label"), _cmd("hostname") or os.uname().nodename), ("Nom de machine", _cmd("hostname") or os.uname().nodename),
(t("about.processor_label"), _cpu()), ("Processeur", _cpu()),
(t("about.memory_label"), _mem()), ("Mémoire", _mem()),
(t("about.graphics_label"), "\n".join(_gpus())), ("Carte(s) graphique(s)", "\n".join(_gpus())),
(t("about.disks_label"), "\n".join(_disks())), ("Disque(s)", "\n".join(_disks())),
] ]
scroll = Gtk.ScrolledWindow() scroll = Gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
@@ -161,17 +160,15 @@ def _system_tab(osr):
class AboutWindow(Gtk.Window): class AboutWindow(Gtk.Window):
def __init__(self): def __init__(self):
super().__init__(title=t("about.window_title")) super().__init__(title="À propos de FWS")
self.set_default_size(520, 460) self.set_default_size(520, 460)
self.set_position(Gtk.WindowPosition.CENTER) self.set_position(Gtk.WindowPosition.CENTER)
self.set_type_hint(Gdk.WindowTypeHint.DIALOG) self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
osr = _osrelease() osr = _osrelease()
notebook = Gtk.Notebook() notebook = Gtk.Notebook()
notebook.append_page(_project_tab(osr), notebook.append_page(_project_tab(osr), Gtk.Label(label="Le projet FWS"))
Gtk.Label(label=t("about.project_tab"))) notebook.append_page(_system_tab(osr), Gtk.Label(label="Système"))
notebook.append_page(_system_tab(osr),
Gtk.Label(label=t("about.system_tab")))
self.add(notebook) self.add(notebook)
self.connect("destroy", Gtk.main_quit) self.connect("destroy", Gtk.main_quit)
@@ -32,16 +32,6 @@ import subprocess
import sys import sys
import time import time
import traceback import traceback
import unicodedata
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
# What the user sees comes from system-translations.toml (bugreport.* keys).
# The report itself (section titles, field names, notes inside the collected
# text, the local trace) stays in French whatever the session's language: it
# is read by the FWS team, not by the user.
t = catalog("system").t
# Trace locale de chaque tentative d'envoi (date, code HTTP, réponse du # Trace locale de chaque tentative d'envoi (date, code HTTP, réponse du
# serveur) — la façon de vérifier qu'un rapport est bien parti : # serveur) — la façon de vérifier qu'un rapport est bien parti :
@@ -51,12 +41,12 @@ _LOG_PATH = "/tmp/fws-bugreport.log"
_URL = "https://fws.laxacube.ch/api/bugs.php" _URL = "https://fws.laxacube.ch/api/bugs.php"
_APP = "FWS" _APP = "FWS"
# (value sent to the server, key of the label shown) # (valeur envoyée au serveur, libellé affiché)
_TYPES = [ _TYPES = [
("bug", "bugreport.type_bug"), ("bug", "Bug / panne"),
("question", "bugreport.type_question"), ("question", "Question"),
("suggestion", "bugreport.type_suggestion"), ("suggestion", "Suggestion"),
("other", "bugreport.type_other"), ("other", "Autre"),
] ]
try: try:
@@ -147,9 +137,8 @@ def _desktop():
def _session_type(): def _session_type():
session_type = os.environ.get("XDG_SESSION_TYPE", "") t = os.environ.get("XDG_SESSION_TYPE", "")
return {"wayland": "Wayland", "x11": "X11"}.get( return {"wayland": "Wayland", "x11": "X11"}.get(t, t or "inconnu")
session_type, session_type or "inconnu")
def _tail(path, max_lines): def _tail(path, max_lines):
@@ -422,11 +411,11 @@ def _send(payload):
except OSError as exc: except OSError as exc:
_trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — " _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — "
f"curl introuvable : {exc}"]) f"curl introuvable : {exc}"])
return False, t("bugreport.curl_missing", error=exc) return False, f"curl introuvable : {exc}"
except subprocess.TimeoutExpired: except subprocess.TimeoutExpired:
_trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — délai " _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — délai "
"dépassé (30 s)"]) "dépassé (30 s)"])
return False, t("bugreport.timeout") return False, "Délai dépassé (30 s) — vérifie ta connexion réseau."
out = proc.stdout.decode("utf-8", "replace") out = proc.stdout.decode("utf-8", "replace")
err = proc.stderr.decode("utf-8", "replace") err = proc.stderr.decode("utf-8", "replace")
@@ -438,8 +427,7 @@ def _send(payload):
detail = err.strip() or body.strip() detail = err.strip() or body.strip()
_trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC curl " _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC curl "
f"(code {proc.returncode}) : {detail[:300]}"]) f"(code {proc.returncode}) : {detail[:300]}"])
return False, detail or t("bugreport.curl_failed", return False, detail or f"curl a échoué (code {proc.returncode})."
code=proc.returncode)
# Le serveur répond en JSON : {"ok":true,"id":…,"message":…}. Un code # Le serveur répond en JSON : {"ok":true,"id":…,"message":…}. Un code
# HTTP ≥ 400 ne fait PAS échouer curl — on le détecte ici, sinon l'utilisateur # HTTP ≥ 400 ne fait PAS échouer curl — on le détecte ici, sinon l'utilisateur
@@ -465,8 +453,8 @@ def _send(payload):
if ok: if ok:
return True, f"HTTP {code or '?'} — {msg}{rid}" return True, f"HTTP {code or '?'} — {msg}{rid}"
return False, t("bugreport.server_refused", code=code or "?", return False, (f"HTTP {code or '?'} — {msg or 'réponse vide'}. "
message=msg or t("bugreport.empty_response")) "Le serveur a refusé le rapport.")
# ── Assistant console (repli sans X) ───────────────────────────────────────── # ── Assistant console (repli sans X) ─────────────────────────────────────────
@@ -487,41 +475,29 @@ def _tui(preload_path):
except EOFError: except EOFError:
return default return default
def is_yes(answer): print("FWS — « Signaler un problème » (envoi optionnel de logs)")
# Same answers as t_is_yes (i18n.sh): the translated word, its first print("Rien ne sera envoyé sans ta confirmation.\n")
# letter, the same without accents ("si" for "sí"), and the English
# ones that every keyboard can type.
answer = answer.lower()
yes = t("common.yes").lower()
plain = "".join(c for c in unicodedata.normalize("NFKD", yes)
if not unicodedata.combining(c))
return bool(answer) and answer in ("y", "yes", yes, yes[:1], plain, plain[:1])
print(t("bugreport.console_title"))
print(t("bugreport.console_confirmation_note") + "\n")
if preload_path: if preload_path:
try: try:
with open(preload_path, errors="replace") as fh: with open(preload_path, errors="replace") as fh:
description = fh.read().strip() description = fh.read().strip()
print(t("bugreport.console_logs_loaded", path=preload_path, print(f"Logs chargés depuis {preload_path} "
count=len(description))) f"({len(description)} caractères).")
except OSError as exc: except OSError as exc:
print(" ⚠ " + t("bugreport.read_error", path=preload_path, print(f" ⚠ Impossible de lire {preload_path} : {exc}")
error=exc))
description = "" description = ""
else: else:
description = "" description = ""
valid_types = [v for v, _l in _TYPES] valid_types = [v for v, _l in _TYPES]
if not description: if not description:
print(t("bugreport.console_type_choices", default="bug", print("Type (défaut : bug) : " + ", ".join(valid_types))
types=", ".join(valid_types)))
typ = ask("> ", "bug") typ = ask("> ", "bug")
if typ not in valid_types: if typ not in valid_types:
typ = "bug" typ = "bug"
title = ask(t("bugreport.title_label") + " ") title = ask("Titre : ")
print(t("bugreport.console_description_prompt")) print("Description (ligne vide pour terminer) :")
lines = [] lines = []
while True: while True:
line = ask("> ") line = ask("> ")
@@ -530,29 +506,26 @@ def _tui(preload_path):
lines.append(line) lines.append(line)
description = "\n".join(lines) description = "\n".join(lines)
else: else:
typ = ask(t("bugreport.console_type_prompt", default="bug") + " ", typ = ask("Type (défaut : bug) : ", "bug")
"bug")
if typ not in valid_types: if typ not in valid_types:
typ = "bug" typ = "bug"
title = ask(t("bugreport.title_label") + " ") title = ask("Titre : ")
if not title: if not title:
print(" ⚠ " + t("bugreport.console_title_required")) print(" ⚠ Titre obligatoire — envoi annulé.")
return 1 return 1
osr = _osrelease() osr = _osrelease()
payload = _build_payload(osr, typ, title, description, include_diag=True) payload = _build_payload(osr, typ, title, description, include_diag=True)
print("\n─── " + t("bugreport.console_preview_header", url=_URL) + " ───") print("\n─── Aperçu de ce qui sera envoyé à", _URL, "───")
print(json.dumps(payload, ensure_ascii=False, indent=2)) print(json.dumps(payload, ensure_ascii=False, indent=2))
answer = ask(f"\n{t('bugreport.console_send_prompt')} " if ask("\nEnvoyer ? [o/N] ", "n").lower() not in ("o", "oui", "y", "yes"):
f"{t('common.yes_no')} ", "n") print("Envoi annulé.")
if not is_yes(answer):
print(t("bugreport.console_cancelled"))
return 0 return 0
ok, msg = _send(payload) ok, msg = _send(payload)
print(("✔ " if ok else "✖ ") + msg) print(("✔ " if ok else "✖ ") + msg)
if not ok: if not ok:
print(t("bugreport.details", path=_LOG_PATH)) print(f"Détails : {_LOG_PATH}")
return 0 if ok else 1 return 0 if ok else 1
@@ -560,21 +533,21 @@ def _tui(preload_path):
if _HAS_GTK: if _HAS_GTK:
def _preview_dialog(parent, payload): def _preview_dialog(parent, payload):
dlg = Gtk.Dialog(title=t("bugreport.confirm_title"), dlg = Gtk.Dialog(title="Confirmer l'envoi", transient_for=parent,
transient_for=parent, modal=True, modal=True, destroy_with_parent=True)
destroy_with_parent=True)
dlg.set_default_size(680, 520) dlg.set_default_size(680, 520)
dlg.set_position(Gtk.WindowPosition.CENTER) dlg.set_position(Gtk.WindowPosition.CENTER)
dlg.add_buttons(t("bugreport.cancel_button"), Gtk.ResponseType.CANCEL, dlg.add_buttons("Annuler", Gtk.ResponseType.CANCEL,
t("bugreport.confirm_button"), Gtk.ResponseType.OK) "Confirmer l'envoi", Gtk.ResponseType.OK)
box = dlg.get_content_area() box = dlg.get_content_area()
box.set_spacing(10) box.set_spacing(10)
box.set_border_width(14) box.set_border_width(14)
note = Gtk.Label() note = Gtk.Label()
note.set_markup(t("bugreport.preview_note", note.set_markup(
url=GLib.markup_escape_text(_URL))) "<b>Voici EXACTEMENT ce qui sera envoyé</b> à "
"<span font_family='monospace'>https://fws.laxacube.ch/api/bugs.php</span> :")
note.set_line_wrap(True) note.set_line_wrap(True)
note.set_xalign(0) note.set_xalign(0)
box.pack_start(note, False, False, 0) box.pack_start(note, False, False, 0)
@@ -609,7 +582,7 @@ if _HAS_GTK:
class BugReportWindow(Gtk.Window): class BugReportWindow(Gtk.Window):
def __init__(self, preload_path=None): def __init__(self, preload_path=None):
super().__init__(title=t("bugreport.window_title")) super().__init__(title="Signaler un problème — FWS")
self.set_icon_name("fws-bugreport") self.set_icon_name("fws-bugreport")
self.set_default_size(580, -1) self.set_default_size(580, -1)
self.set_position(Gtk.WindowPosition.CENTER) self.set_position(Gtk.WindowPosition.CENTER)
@@ -627,11 +600,13 @@ if _HAS_GTK:
title = Gtk.Label() title = Gtk.Label()
title.set_markup( title.set_markup(
"<span size='x-large' weight='bold'>" "<span size='x-large' weight='bold'>Signaler un problème</span>")
f"{GLib.markup_escape_text(t('bugreport.title'))}</span>")
box.pack_start(title, False, False, 0) box.pack_start(title, False, False, 0)
subtitle = Gtk.Label(label=t("bugreport.subtitle")) subtitle = Gtk.Label(
label="Un souci avec FWS ? Décris-le ci-dessous. Les informations "
"système et les logs de diagnostic peuvent être joints pour "
"aider les développeurs. Rien ne part sans ta confirmation.")
subtitle.set_line_wrap(True) subtitle.set_line_wrap(True)
subtitle.set_xalign(0) subtitle.set_xalign(0)
box.pack_start(subtitle, False, False, 0) box.pack_start(subtitle, False, False, 0)
@@ -639,24 +614,21 @@ if _HAS_GTK:
grid = Gtk.Grid(column_spacing=10, row_spacing=8) grid = Gtk.Grid(column_spacing=10, row_spacing=8)
grid.set_halign(Gtk.Align.FILL) grid.set_halign(Gtk.Align.FILL)
grid.attach(Gtk.Label(label=t("bugreport.type_label"), xalign=1), grid.attach(Gtk.Label(label="Type :", xalign=1), 0, 0, 1, 1)
0, 0, 1, 1)
self._type = Gtk.ComboBoxText() self._type = Gtk.ComboBoxText()
for value, label in _TYPES: for value, label in _TYPES:
self._type.append(value, t(label)) self._type.append(value, label)
self._type.set_active(0) self._type.set_active(0)
grid.attach(self._type, 1, 0, 1, 1) grid.attach(self._type, 1, 0, 1, 1)
grid.attach(Gtk.Label(label=t("bugreport.title_label"), xalign=1), grid.attach(Gtk.Label(label="Titre :", xalign=1), 0, 1, 1, 1)
0, 1, 1, 1)
self._title = Gtk.Entry() self._title = Gtk.Entry()
self._title.set_placeholder_text(t("bugreport.title_placeholder")) self._title.set_placeholder_text("Résumé court du problème")
grid.attach(self._title, 1, 1, 1, 1) grid.attach(self._title, 1, 1, 1, 1)
box.pack_start(grid, False, False, 0) box.pack_start(grid, False, False, 0)
desc_label = Gtk.Label(label=t("bugreport.description_label"), desc_label = Gtk.Label(label="Description :", xalign=0)
xalign=0)
box.pack_start(desc_label, False, False, 0) box.pack_start(desc_label, False, False, 0)
scroll = Gtk.ScrolledWindow() scroll = Gtk.ScrolledWindow()
scroll.set_min_content_height(130) scroll.set_min_content_height(130)
@@ -664,7 +636,7 @@ if _HAS_GTK:
self._description = Gtk.TextView() self._description = Gtk.TextView()
self._description.set_wrap_mode(Gtk.WrapMode.WORD) self._description.set_wrap_mode(Gtk.WrapMode.WORD)
self._description.set_placeholder_text( self._description.set_placeholder_text(
t("bugreport.description_placeholder")) "Ce qui s'est passé, ce que tu attendais, ce que tu as essayé…")
scroll.add(self._description) scroll.add(self._description)
box.pack_start(scroll, False, False, 0) box.pack_start(scroll, False, False, 0)
@@ -674,29 +646,29 @@ if _HAS_GTK:
content = fh.read() content = fh.read()
self._description.get_buffer().set_text(content) self._description.get_buffer().set_text(content)
loaded = Gtk.Label() loaded = Gtk.Label()
path = GLib.markup_escape_text(preload_path)
loaded.set_markup( loaded.set_markup(
"<span size='small' foreground='#89b4fa'>" f"<span size='small' foreground='#89b4fa'>Logs chargés "
f"{t('bugreport.logs_loaded', path=path)}</span>") f"depuis <span font_family='monospace'>{preload_path}"
f"</span> — tu peux les compléter ou les retirer.</span>")
loaded.set_line_wrap(True) loaded.set_line_wrap(True)
loaded.set_xalign(0) loaded.set_xalign(0)
box.pack_start(loaded, False, False, 0) box.pack_start(loaded, False, False, 0)
except OSError as exc: except OSError as exc:
_message(self, "error", t("bugreport.file_unreadable"), _message(self, "error", "Fichier illisible",
t("bugreport.read_error", path=preload_path, f"{preload_path} : {exc}")
error=exc))
self._include = Gtk.CheckButton( self._include = Gtk.CheckButton(
label=t("bugreport.include_diagnostics")) label="Joindre les informations système et les logs de diagnostic")
self._include.set_active(True) self._include.set_active(True)
self._include.set_tooltip_text( self._include.set_tooltip_text(
t("bugreport.include_diagnostics_tooltip")) "Version FWS, matériel détecté, extrait du journal du dernier "
"démarrage — à relire dans l'aperçu avant l'envoi")
box.pack_start(self._include, False, False, 4) box.pack_start(self._include, False, False, 4)
footer = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) footer = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8)
cancel = Gtk.Button(label=t("common.close")) cancel = Gtk.Button(label="Fermer")
cancel.connect("clicked", lambda _b: self.close()) cancel.connect("clicked", lambda _b: self.close())
send = Gtk.Button(label=t("bugreport.send_button")) send = Gtk.Button(label="Envoyer…")
send.get_style_context().add_class("suggested-action") send.get_style_context().add_class("suggested-action")
send.connect("clicked", self._on_send) send.connect("clicked", self._on_send)
footer.pack_end(send, False, False, 0) footer.pack_end(send, False, False, 0)
@@ -714,8 +686,8 @@ if _HAS_GTK:
except Exception as exc: # noqa: BLE001 except Exception as exc: # noqa: BLE001
_trace(["=== CRASH fws-bugreport ===", _trace(["=== CRASH fws-bugreport ===",
traceback.format_exc()]) traceback.format_exc()])
_message(self, "error", t("bugreport.unexpected_error"), _message(self, "error", "Erreur inattendue",
f"{exc}\n\n{t('bugreport.details', path=_LOG_PATH)}") f"{exc}\n\nDétails : {_LOG_PATH}")
def _do_send(self): def _do_send(self):
title = self._title.get_text().strip() title = self._title.get_text().strip()
@@ -724,12 +696,13 @@ if _HAS_GTK:
buf.get_end_iter(), True).strip() buf.get_end_iter(), True).strip()
include = self._include.get_active() include = self._include.get_active()
if not title: if not title:
_message(self, "error", t("bugreport.title_missing"), _message(self, "error", "Titre manquant",
t("bugreport.title_missing_detail")) "Indique un titre court pour le problème.")
return return
if not description and not include: if not description and not include:
_message(self, "error", t("bugreport.report_empty"), _message(self, "error", "Rapport vide",
t("bugreport.report_empty_detail")) "Écris une description ou coche la jointure des "
"informations système et des logs.")
return return
typ = self._type.get_active_id() or "bug" typ = self._type.get_active_id() or "bug"
@@ -738,13 +711,13 @@ if _HAS_GTK:
return return
ok, msg = _send(payload) ok, msg = _send(payload)
if ok: if ok:
_message(self, "info", t("bugreport.sent_title"), _message(self, "info", "Rapport envoyé ✔",
f"{msg}\n\n{t('bugreport.sent_thanks')}\n" f"{msg}\n\nMerci ! L'équipe FWS a reçu ton rapport.\n"
f"{t('bugreport.log_path', path=_LOG_PATH)}") f"(trace : {_LOG_PATH})")
else: else:
_message(self, "error", t("bugreport.send_failed_title"), _message(self, "error", "Envoi impossible",
f"{msg}\n\n{t('bugreport.send_failed_detail')}\n" f"{msg}\n\nTon rapport n'a pas été envoyé. Vérifie ta "
f"{t('bugreport.details', path=_LOG_PATH)}") f"connexion et réessaie.\nDétails : {_LOG_PATH}")
def main(): def main():
@@ -12,14 +12,10 @@
# fws-setup-hardware --groups a,b <bureau>→ installation avancée # fws-setup-hardware --groups a,b <bureau>→ installation avancée
# fws-setup-hardware --check → vérification/réparation seule # fws-setup-hardware --check → vérification/réparation seule
# #
# Texts come from system-translations.toml (drivers.* keys); the group names
# come translated from the engine's plan (hardware.* keys).
#
# GTK3 : présent sur TOUS les bureaux FWS (Firefox le tire) ; python-gobject # GTK3 : présent sur TOUS les bureaux FWS (Firefox le tire) ; python-gobject
# est installé avec le bureau par le kickstart — mêmes prérequis que fws-hello. # est installé avec le bureau par le kickstart — mêmes prérequis que fws-hello.
import os import os
import shlex
import shutil import shutil
import subprocess import subprocess
import sys import sys
@@ -31,11 +27,6 @@ gi.require_version("Gtk", "3.0")
gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3) gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3)
from gi.repository import Gdk, GLib, Gtk # noqa: E402 from gi.repository import Gdk, GLib, Gtk # noqa: E402
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
t = catalog("system").t
# WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante » ciblent # WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante » ciblent
# cette classe. # cette classe.
GLib.set_prgname("fws-drivers") GLib.set_prgname("fws-drivers")
@@ -87,8 +78,8 @@ def _privileged_argv(args):
term = _terminal() term = _terminal()
if term is None: if term is None:
return ["sh", "-c", "sudo " + " ".join([_ENGINE] + args)], False return ["sh", "-c", "sudo " + " ".join([_ENGINE] + args)], False
command = ("sudo " + " ".join([_ENGINE] + args) + "; echo; echo " command = ("sudo " + " ".join([_ENGINE] + args)
+ shlex.quote(t("common.press_enter_to_close")) + "; read _") + "; echo; echo 'Appuie sur Entrée pour fermer.'; read _")
if term == "gnome-terminal": if term == "gnome-terminal":
return [term, "--", "sh", "-c", command], False return [term, "--", "sh", "-c", command], False
return [term, "-e", "sh", "-c", command], False return [term, "-e", "sh", "-c", command], False
@@ -138,7 +129,7 @@ def _big_button(label, description):
class DriversWindow(Gtk.Window): class DriversWindow(Gtk.Window):
def __init__(self, autostart=False): def __init__(self, autostart=False):
super().__init__(title=t("drivers.window_title")) super().__init__(title="FWS — Pilotes et matériel")
self._autostart = autostart self._autostart = autostart
self.set_default_size(560, -1) self.set_default_size(560, -1)
self.set_position(Gtk.WindowPosition.CENTER) self.set_position(Gtk.WindowPosition.CENTER)
@@ -163,30 +154,40 @@ class DriversWindow(Gtk.Window):
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
title = Gtk.Label() title = Gtk.Label()
title.set_markup("<span size='x-large' weight='bold'>" title.set_markup("<span size='x-large' weight='bold'>Pilotes et matériel</span>")
f"{GLib.markup_escape_text(t('drivers.title'))}</span>")
title.set_xalign(0) title.set_xalign(0)
box.pack_start(title, False, False, 0) box.pack_start(title, False, False, 0)
subtitle = Gtk.Label(label=t("drivers.subtitle")) subtitle = Gtk.Label(
label="Tout ce qu'il faut pour que ta machine fonctionne au mieux : "
"affichage, son, Bluetooth, luminosité, imprimante, jeux.")
subtitle.set_line_wrap(True) subtitle.set_line_wrap(True)
subtitle.set_xalign(0) subtitle.set_xalign(0)
box.pack_start(subtitle, False, False, 0) box.pack_start(subtitle, False, False, 0)
simple = _big_button(t("drivers.simple_label"), simple = _big_button(
t("drivers.simple_description")) "Installation simple (recommandé)",
"FWS installe ce dont ta machine a besoin, puis s'assure que "
"l'affichage, le son, le Bluetooth et le réseau fonctionnent. "
"Ajoute aussi les codecs audio/vidéo, Steam + Wine et la réalité "
"virtuelle : plusieurs gigaoctets, compte un bon moment selon ta "
"connexion. Tu n'as rien à choisir.")
simple.connect("clicked", self._on_simple) simple.connect("clicked", self._on_simple)
box.pack_start(simple, False, False, 0) box.pack_start(simple, False, False, 0)
advanced = _big_button(t("drivers.advanced_label"), advanced = _big_button(
t("drivers.advanced_description")) "Installation avancée",
"Pour décider toi-même de ce qui s'installe. Ce qui a été reconnu "
"sur ta machine est déjà coché.")
advanced.connect("clicked", self._on_advanced) advanced.connect("clicked", self._on_advanced)
box.pack_start(advanced, False, False, 0) box.pack_start(advanced, False, False, 0)
box.pack_start(Gtk.Separator(), False, False, 6) box.pack_start(Gtk.Separator(), False, False, 6)
check = _big_button(t("drivers.check_label"), check = _big_button(
t("drivers.check_description")) "Vérifier et réparer seulement",
"N'installe rien. Regarde si le son, le Bluetooth, le réseau et "
"l'imprimante répondent, et les remet en route si besoin.")
check.connect("clicked", self._on_check) check.connect("clicked", self._on_check)
box.pack_start(check, False, False, 0) box.pack_start(check, False, False, 0)
@@ -194,11 +195,12 @@ class DriversWindow(Gtk.Window):
# à la main, elle n'a aucune raison de se faire taire. # à la main, elle n'a aucune raison de se faire taire.
self._again = None self._again = None
if self._autostart: if self._autostart:
self._again = Gtk.CheckButton(label=t("drivers.dont_offer_again")) self._again = Gtk.CheckButton(
label="Ne plus me le proposer au démarrage")
self._again.set_active(False) self._again.set_active(False)
box.pack_start(self._again, False, False, 6) box.pack_start(self._again, False, False, 6)
close = Gtk.Button(label=t("common.close")) close = Gtk.Button(label="Fermer")
close.connect("clicked", lambda _b: self.close()) close.connect("clicked", lambda _b: self.close())
box.pack_start(close, False, False, 6) box.pack_start(close, False, False, 6)
return box return box
@@ -208,12 +210,13 @@ class DriversWindow(Gtk.Window):
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
title = Gtk.Label() title = Gtk.Label()
title.set_markup("<span size='x-large' weight='bold'>" title.set_markup("<span size='x-large' weight='bold'>Installation avancée</span>")
f"{GLib.markup_escape_text(t('drivers.advanced_label'))}</span>")
title.set_xalign(0) title.set_xalign(0)
box.pack_start(title, False, False, 0) box.pack_start(title, False, False, 0)
hint = Gtk.Label(label=t("drivers.advanced_hint")) hint = Gtk.Label(
label="Ce qui a été reconnu sur ta machine est coché. "
"Décoche ce dont tu ne veux pas.")
hint.set_line_wrap(True) hint.set_line_wrap(True)
hint.set_xalign(0) hint.set_xalign(0)
hint.get_style_context().add_class("dim-label") hint.get_style_context().add_class("dim-label")
@@ -234,7 +237,7 @@ class DriversWindow(Gtk.Window):
head = Gtk.Label() head = Gtk.Label()
mark = GLib.markup_escape_text(label) mark = GLib.markup_escape_text(label)
if not detected: if not detected:
mark += f" <i>{GLib.markup_escape_text(t('drivers.not_detected'))}</i>" mark += " <i>(non détecté sur cette machine)</i>"
head.set_markup(mark) head.set_markup(mark)
head.set_xalign(0) head.set_xalign(0)
head.set_line_wrap(True) head.set_line_wrap(True)
@@ -251,10 +254,10 @@ class DriversWindow(Gtk.Window):
buttons = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) buttons = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8)
buttons.set_halign(Gtk.Align.END) buttons.set_halign(Gtk.Align.END)
back = Gtk.Button(label=t("drivers.back_button")) back = Gtk.Button(label="Précédent")
back.connect("clicked", back.connect("clicked",
lambda _b: self._stack.set_visible_child_name("home")) lambda _b: self._stack.set_visible_child_name("home"))
install = Gtk.Button(label=t("drivers.install_selection_button")) install = Gtk.Button(label="Installer la sélection")
install.get_style_context().add_class("suggested-action") install.get_style_context().add_class("suggested-action")
install.connect("clicked", self._on_install_selection) install.connect("clicked", self._on_install_selection)
buttons.pack_start(back, False, False, 0) buttons.pack_start(back, False, False, 0)
@@ -292,19 +295,21 @@ class DriversWindow(Gtk.Window):
self._spinner = Gtk.Spinner() self._spinner = Gtk.Spinner()
self._spinner.start() self._spinner.start()
row.pack_start(self._spinner, False, False, 0) row.pack_start(self._spinner, False, False, 0)
self._status = Gtk.Label(label=t("drivers.status_preparing")) self._status = Gtk.Label(label="Préparation…")
self._status.set_xalign(0) self._status.set_xalign(0)
self._status.set_line_wrap(True) self._status.set_line_wrap(True)
row.pack_start(self._status, True, True, 0) row.pack_start(self._status, True, True, 0)
box.pack_start(row, False, False, 0) box.pack_start(row, False, False, 0)
self._reassure = Gtk.Label(label=t("drivers.reassurance")) self._reassure = Gtk.Label(
label="Tu peux laisser cette fenêtre ouverte, il n'y a rien à faire. "
"Évite juste d'éteindre la machine maintenant.")
self._reassure.set_line_wrap(True) self._reassure.set_line_wrap(True)
self._reassure.set_xalign(0) self._reassure.set_xalign(0)
self._reassure.get_style_context().add_class("dim-label") self._reassure.get_style_context().add_class("dim-label")
box.pack_start(self._reassure, False, False, 0) box.pack_start(self._reassure, False, False, 0)
expander = Gtk.Expander(label=t("drivers.show_details")) expander = Gtk.Expander(label="Afficher les détails")
scroll = Gtk.ScrolledWindow() scroll = Gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
scroll.set_min_content_height(240) scroll.set_min_content_height(240)
@@ -316,7 +321,7 @@ class DriversWindow(Gtk.Window):
expander.add(scroll) expander.add(scroll)
box.pack_start(expander, True, True, 0) box.pack_start(expander, True, True, 0)
self._close = Gtk.Button(label=t("common.close")) self._close = Gtk.Button(label="Fermer")
self._close.set_sensitive(False) self._close.set_sensitive(False)
self._close.connect("clicked", lambda _b: self.close()) self._close.connect("clicked", lambda _b: self.close())
box.pack_start(self._close, False, False, 0) box.pack_start(self._close, False, False, 0)
@@ -337,7 +342,8 @@ class DriversWindow(Gtk.Window):
# Repli terminal : impossible de suivre la sortie depuis ici. # Repli terminal : impossible de suivre la sortie depuis ici.
subprocess.Popen(argv) # noqa: S603 — commandes internes FWS subprocess.Popen(argv) # noqa: S603 — commandes internes FWS
self._spinner.stop() self._spinner.stop()
self._status.set_text(t("drivers.status_in_terminal")) self._status.set_text(
"La suite se passe dans la fenêtre de terminal qui vient de s'ouvrir.")
self._reassure.hide() self._reassure.hide()
self._close.set_sensitive(True) self._close.set_sensitive(True)
return return
@@ -358,24 +364,31 @@ class DriversWindow(Gtk.Window):
self._proc.wait() self._proc.wait()
GLib.idle_add(self._finished, self._proc.returncode, None) GLib.idle_add(self._finished, self._proc.returncode, None)
# Engine steps turned into readable sentences, by the tag of their line # Traduction des étapes du moteur en phrases lisibles. Les libellés bruts
# ("[FWS-hw:install] …"): the engine's text is translated, possibly into # restent dans les détails.
# another language than the window's (pkexec runs it with the system's), so _STEPS = (
# only the tag is read. The raw lines stay in the details. ("groupe «", "Installation : "),
_STEP_PREFIX = "[FWS-hw:" ("installation :", "Téléchargement et installation des paquets…"),
_STEPS = { ("vérification des services", "Vérification de ton matériel…"),
"install": "drivers.status_installing", ("synchro pacman", "Mise à jour de la liste des logiciels…"),
"check": "drivers.status_checking", )
}
def _append(self, line): def _append(self, line):
buf = self._log.get_buffer() buf = self._log.get_buffer()
buf.insert(buf.get_end_iter(), line + "\n") buf.insert(buf.get_end_iter(), line + "\n")
self._log.scroll_to_iter(buf.get_end_iter(), 0.0, False, 0.0, 0.0) self._log.scroll_to_iter(buf.get_end_iter(), 0.0, False, 0.0, 0.0)
if line.startswith(self._STEP_PREFIX): if not line.startswith("[FWS-hw]"):
step = line[len(self._STEP_PREFIX):].split("]", 1)[0] return False
if step in self._STEPS: text = line.split("]", 1)[1].strip()
self._status.set_text(t(self._STEPS[step])) for needle, friendly in self._STEPS:
if needle in text:
if friendly.endswith(": "):
# « groupe « Pilotes graphiques — … » » → « Pilotes graphiques »
label = text.split("«", 1)[1].rsplit("»", 1)[0]
self._status.set_text(friendly + label.split("—")[0].strip())
else:
self._status.set_text(friendly)
return False
return False return False
def _finished(self, code, error): def _finished(self, code, error):
@@ -383,27 +396,31 @@ class DriversWindow(Gtk.Window):
self._reassure.hide() self._reassure.hide()
self._close.set_sensitive(True) self._close.set_sensitive(True)
if error is not None: if error is not None:
self._show_result(t("drivers.launch_failed"), error) self._status.set_markup(
"<b>Impossible de lancer l'installation.</b>\n"
+ GLib.markup_escape_text(error))
return return
if code == 0: if code == 0:
self._show_result(t("drivers.done_title"), t("drivers.done_body")) self._status.set_markup(
"<b>C'est prêt.</b>\nSi des pilotes graphiques viennent d'être "
"installés, redémarre pour qu'ils prennent effet.")
elif code == 126: elif code == 126:
# pkexec : authentification refusée ou annulée. # pkexec : authentification refusée ou annulée.
self._show_result(t("drivers.cancelled_title"), t("drivers.cancelled_body")) self._status.set_markup(
"<b>Annulé.</b>\nRien n'a été modifié — le mot de passe "
"administrateur n'a pas été validé.")
else: else:
self._show_result(t("drivers.failed_title"), t("drivers.failed_body")) self._status.set_markup(
"<b>Tout n'a pas abouti.</b>\nLe plus souvent c'est la connexion "
def _show_result(self, title, body): "Internet. Vérifie-la puis réessaie ; les détails ci-dessous "
"""Status line: `title` in bold, then `body` on the next line.""" "disent ce qui a échoué.")
self._status.set_markup(f"<b>{GLib.markup_escape_text(title)}</b>\n"
+ GLib.markup_escape_text(body))
# ---------------------------------------------------------------- actions # ---------------------------------------------------------------- actions
def _on_simple(self, _button): def _on_simple(self, _button):
self._start(["--all", self._session], t("drivers.simple_heading")) self._start(["--all", self._session], "Installation du nécessaire")
def _on_check(self, _button): def _on_check(self, _button):
self._start(["--check"], t("drivers.check_heading")) self._start(["--check"], "Vérification du matériel")
def _on_advanced(self, _button): def _on_advanced(self, _button):
groups = _plan(self._session) groups = _plan(self._session)
@@ -411,9 +428,10 @@ class DriversWindow(Gtk.Window):
dialog = Gtk.MessageDialog( dialog = Gtk.MessageDialog(
transient_for=self, modal=True, transient_for=self, modal=True,
message_type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK, message_type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK,
text=t("drivers.plan_failed_title")) text="Impossible de lister le matériel")
dialog.format_secondary_text( dialog.format_secondary_text(
t("drivers.plan_failed_detail", command=f"{_ENGINE} --plan")) f"« {_ENGINE} --plan » n'a rien renvoyé. "
"L'installation simple reste utilisable.")
dialog.run() dialog.run()
dialog.destroy() dialog.destroy()
return return
@@ -431,7 +449,7 @@ class DriversWindow(Gtk.Window):
self._stack.set_visible_child_name("home") self._stack.set_visible_child_name("home")
return return
self._start(["--groups", ",".join(chosen), self._session], self._start(["--groups", ",".join(chosen), self._session],
t("drivers.selection_heading")) "Installation de ta sélection")
def main(): def main():
@@ -442,10 +460,11 @@ def main():
if os.path.exists(_SYSTEM_DONE) or os.path.exists(_USER_DONE): if os.path.exists(_SYSTEM_DONE) or os.path.exists(_USER_DONE):
return 0 return 0
if not Gtk.init_check()[0]: if not Gtk.init_check()[0]:
print(t("drivers.no_display", command=f"sudo {_ENGINE}"), file=sys.stderr) print("Aucun serveur graphique : utilise « sudo fws-setup-hardware » "
"en console.", file=sys.stderr)
return 1 return 1
if shutil.which(_ENGINE) is None: if shutil.which(_ENGINE) is None:
print(t("drivers.engine_missing", command=_ENGINE), file=sys.stderr) print(f"{_ENGINE} est absent de cette image.", file=sys.stderr)
return 1 return 1
window = DriversWindow(autostart=autostart) window = DriversWindow(autostart=autostart)
window.connect("destroy", lambda _w: Gtk.main_quit()) window.connect("destroy", lambda _w: Gtk.main_quit())
+33 -24
View File
@@ -1,8 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# FWS — welcome window on first start. Buttons: system update, « Drivers & # FWS — fenêtre de bienvenue au premier démarrage (pendant post-install de la
# Hardware » (which also installs codecs, games and VR), Proton-GE, keyboard # page récap de l'installateur). Boutons : mise à jour, codecs, VR, raccourcis,
# shortcuts. Texts come from system-translations.toml (hello.* keys). # Proton-GE. GTK3 : présent sur TOUS les bureaux FWS (Firefox le tire) ;
# GTK3 : présent sur TOUS les bureaux FWS (Firefox le tire) ;
# python-gobject est installé avec le bureau par le kickstart. # python-gobject est installé avec le bureau par le kickstart.
# #
# Lancement : /etc/xdg/autostart (KDE/GNOME/XFCE) et exec des configs # Lancement : /etc/xdg/autostart (KDE/GNOME/XFCE) et exec des configs
@@ -20,23 +19,32 @@ gi.require_version("Gtk", "3.0")
gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3) gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3)
from gi.repository import Gdk, GLib, Gtk # noqa: E402 from gi.repository import Gdk, GLib, Gtk # noqa: E402
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
t = catalog("system").t
# WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante » # WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante »
# ciblent cette classe. # ciblent cette classe.
GLib.set_prgname("fws-hello") GLib.set_prgname("fws-hello")
_FLAG = os.path.expanduser("~/.config/fws/hello-done") _FLAG = os.path.expanduser("~/.config/fws/hello-done")
# (label key, description key, command, in a terminal). Codecs and VR are _CODECS = ("gst-plugins-base gst-plugins-good gst-plugins-bad "
# groups of « Drivers & Hardware »: one place to install them, not two. "gst-plugins-ugly gst-libav ffmpeg mpv")
# (libellé, description, commande, en_terminal)
_ACTIONS = [ _ACTIONS = [
("hello.update_label", "hello.update_description", "fws-update", True), ("Mettre à jour le système",
("hello.drivers_label", "hello.drivers_description", "fws-drivers", False), "pacman -Syu + nettoyage du cache",
("hello.proton_label", "hello.proton_description", "fws-proton-ge", True), "fws-update", True),
("Pilotes et matériel",
"graphique, son, Bluetooth, luminosité, jeux, impression",
"fws-drivers", False),
("Installer les codecs multimédia",
"lecture vidéo/audio (GStreamer, ffmpeg, mpv)",
f"sudo pacman -S --needed {_CODECS}", True),
("Proton-GE pour Steam",
"meilleure compatibilité des jeux Windows",
"fws-proton-ge", True),
("Configurer la VR",
"drivers casque : HTC Vive, Index, Quest…",
"fws-vr-setup", True),
] ]
_TERMINALS = ["kitty", "konsole", "gnome-terminal", "xfce4-terminal", "xterm"] _TERMINALS = ["kitty", "konsole", "gnome-terminal", "xfce4-terminal", "xterm"]
@@ -65,7 +73,7 @@ def _run(command, in_terminal):
class HelloWindow(Gtk.Window): class HelloWindow(Gtk.Window):
def __init__(self): def __init__(self):
super().__init__(title=t("hello.window_title")) super().__init__(title="Bienvenue sur FWS")
self.set_default_size(460, -1) self.set_default_size(460, -1)
self.set_position(Gtk.WindowPosition.CENTER) self.set_position(Gtk.WindowPosition.CENTER)
self.set_border_width(18) self.set_border_width(18)
@@ -79,11 +87,11 @@ class HelloWindow(Gtk.Window):
self.add(box) self.add(box)
title = Gtk.Label() title = Gtk.Label()
title.set_markup("<span size='x-large' weight='bold'>" title.set_markup("<span size='x-large' weight='bold'>Bienvenue sur FWS !</span>")
f"{GLib.markup_escape_text(t('hello.title'))}</span>")
box.pack_start(title, False, False, 0) box.pack_start(title, False, False, 0)
subtitle = Gtk.Label(label=t("hello.subtitle")) subtitle = Gtk.Label(
label="Ton système est prêt. Quelques réglages utiles pour bien démarrer :")
subtitle.set_line_wrap(True) subtitle.set_line_wrap(True)
subtitle.set_xalign(0) subtitle.set_xalign(0)
box.pack_start(subtitle, False, False, 0) box.pack_start(subtitle, False, False, 0)
@@ -93,30 +101,31 @@ class HelloWindow(Gtk.Window):
# (Hyprland/i3) — les autres bureaux ont leurs propres réglages. # (Hyprland/i3) — les autres bureaux ont leurs propres réglages.
session = os.environ.get("XDG_CURRENT_DESKTOP", "").lower() session = os.environ.get("XDG_CURRENT_DESKTOP", "").lower()
if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE") or "i3" in session: if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE") or "i3" in session:
actions.append(("hello.keys_label", "hello.keys_description", actions.append(("Voir les raccourcis clavier",
"aussi disponible à tout moment : Super+K",
"fws-keys", False)) "fws-keys", False))
for label, desc, command, in_term in actions: for label, desc, command, in_term in actions:
button = Gtk.Button() button = Gtk.Button()
inner = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) inner = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2)
lab = Gtk.Label() lab = Gtk.Label()
lab.set_markup(f"<b>{GLib.markup_escape_text(t(label))}</b>") lab.set_markup(f"<b>{label}</b>")
lab.set_xalign(0) lab.set_xalign(0)
sub = Gtk.Label(label=t(desc)) sub = Gtk.Label(label=desc)
sub.set_xalign(0) sub.set_xalign(0)
sub.get_style_context().add_class("dim-label") sub.get_style_context().add_class("dim-label")
inner.pack_start(lab, False, False, 0) inner.pack_start(lab, False, False, 0)
inner.pack_start(sub, False, False, 0) inner.pack_start(sub, False, False, 0)
button.add(inner) button.add(inner)
button.connect("clicked", button.connect("clicked",
lambda _b, c=command, term=in_term: _run(c, term)) lambda _b, c=command, t=in_term: _run(c, t))
box.pack_start(button, False, False, 0) box.pack_start(button, False, False, 0)
self._again = Gtk.CheckButton(label=t("hello.show_again")) self._again = Gtk.CheckButton(label="Afficher cette fenêtre au prochain démarrage")
self._again.set_active(False) self._again.set_active(False)
box.pack_start(self._again, False, False, 6) box.pack_start(self._again, False, False, 6)
close = Gtk.Button(label=t("common.close")) close = Gtk.Button(label="Fermer")
close.connect("clicked", lambda _b: self.close()) close.connect("clicked", lambda _b: self.close())
box.pack_start(close, False, False, 0) box.pack_start(close, False, False, 0)
+19 -46
View File
@@ -13,60 +13,33 @@ import re
import subprocess import subprocess
import sys import sys
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
_catalog = catalog("system")
t = _catalog.t
_WOFI_STYLE = "/usr/local/share/fws/wofi-keys.css" _WOFI_STYLE = "/usr/local/share/fws/wofi-keys.css"
# Bits de modmask Hyprland (masques X11) dans l'ordre d'affichage voulu. # Bits de modmask Hyprland (masques X11) dans l'ordre d'affichage voulu.
_MODS = [(64, "SUPER"), (4, "CTRL"), (8, "ALT"), (1, "SHIFT")] _MODS = [(64, "SUPER"), (4, "CTRL"), (8, "ALT"), (1, "SHIFT")]
# Key names translated for display (keys of system-translations.toml).
_KEY_LABELS = { _KEY_LABELS = {
"mouse:272": "keys.left_click", "mouse:272": "clic gauche",
"mouse:273": "keys.right_click", "mouse:273": "clic droit",
"mouse:274": "keys.middle_click", "mouse:274": "clic molette",
"mouse_down": "keys.wheel_down", "mouse_down": "molette bas",
"mouse_up": "keys.wheel_up", "mouse_up": "molette haut",
"button4": "keys.wheel_up", "button4": "molette haut",
"button5": "keys.wheel_down", "button5": "molette bas",
"return": "keys.enter", "return": "Entrée",
"space": "keys.space", "space": "Espace",
"escape": "keys.escape", "escape": "Échap",
"tab": "keys.tab", "tab": "Tab",
"print": "keys.print_screen",
}
_KEY_SYMBOLS = {
"left": "←", "left": "←",
"right": "→", "right": "→",
"up": "↑", "up": "↑",
"down": "↓", "down": "↓",
"print": "Impr écran",
} }
def _label(key): def _label(key):
name = key.lower() return _KEY_LABELS.get(key.lower(), key)
if name in _KEY_LABELS:
return t(_KEY_LABELS[name])
return _KEY_SYMBOLS.get(name, key)
def _description(bind):
"""Description of a Hyprland bind, translated when it is an FWS key.
The FWS config writes keys (binds.open_terminal) as bindd descriptions:
a translated text with a comma in it would break the bind line, so they
are translated here instead of in the file. A user's own plain-text
description is shown as written.
"""
desc = (bind.get("description") or "").strip()
if desc.startswith("binds.") and _catalog.text(desc) is not None:
# The workspace binds share one text: their argument is the number.
return t(desc, number=(bind.get("arg") or "").strip())
return desc
# --- Hyprland : binds réels via hyprctl ------------------------------------ # --- Hyprland : binds réels via hyprctl ------------------------------------
@@ -81,7 +54,7 @@ def hyprland_lines():
if not combo or combo in seen: if not combo or combo in seen:
continue continue
seen.add(combo) seen.add(combo)
desc = _description(bind) \ desc = (bind.get("description") or "").strip() \
or f"{bind.get('dispatcher', '?')} {(bind.get('arg') or '').strip()}".strip() or f"{bind.get('dispatcher', '?')} {(bind.get('arg') or '').strip()}".strip()
lines.append(f"{combo:<24} {desc}") lines.append(f"{combo:<24} {desc}")
return lines return lines
@@ -121,17 +94,17 @@ def i3_lines():
def show(lines): def show(lines):
if not lines: if not lines:
lines = [t("keys.none_found")] lines = ["(aucun raccourci trouvé)"]
text = "\n".join(lines) text = "\n".join(lines)
if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"): if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"):
cmd = ["wofi", "--dmenu", "--prompt", t("keys.prompt_filter"), cmd = ["wofi", "--dmenu", "--prompt", "Raccourcis clavier — taper pour filtrer",
"--width", "820", "--height", "600", "--insensitive", "--width", "820", "--height", "600", "--insensitive",
"--cache-file", "/dev/null"] "--cache-file", "/dev/null"]
if os.path.exists(_WOFI_STYLE): if os.path.exists(_WOFI_STYLE):
cmd += ["--style", _WOFI_STYLE] cmd += ["--style", _WOFI_STYLE]
else: else:
# X11/i3 : rofi en dmenu, style assorti (mono pour l'alignement). # X11/i3 : rofi en dmenu, style assorti (mono pour l'alignement).
cmd = ["rofi", "-dmenu", "-i", "-p", t("keys.prompt"), cmd = ["rofi", "-dmenu", "-i", "-p", "Raccourcis clavier",
"-no-custom", "-no-custom",
"-theme-str", 'window { width: 880px; } listview { lines: 18; }', "-theme-str", 'window { width: 880px; } listview { lines: 18; }',
"-theme-str", '* { font: "Noto Sans Mono 11"; }'] "-theme-str", '* { font: "Noto Sans Mono 11"; }']
@@ -145,8 +118,8 @@ def main():
else: else:
lines = i3_lines() lines = i3_lines()
except Exception as exc: # noqa: BLE001 — best effort, jamais de crash muet except Exception as exc: # noqa: BLE001 — best effort, jamais de crash muet
subprocess.run(["notify-send", t("keys.error_title"), subprocess.run(["notify-send", "Raccourcis FWS", f"Erreur : {exc}"],
t("keys.error", error=exc)], check=False) check=False)
return 1 return 1
show(lines) show(lines)
return 0 return 0
@@ -9,14 +9,10 @@ import os
import subprocess import subprocess
import sys import sys
sys.path.insert(0, "/usr/local/lib/fws")
from fws_i18n import catalog # noqa: E402
t = catalog("system").t
_WOFI_STYLE = "/usr/local/share/fws/wofi-style.css" _WOFI_STYLE = "/usr/local/share/fws/wofi-style.css"
_HYPR = bool(os.environ.get("HYPRLAND_INSTANCE_SIGNATURE")) _HYPR = bool(os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"))
# (libellé affiché, commande shell). L'icône Nerd Font aide au repérage.
if _HYPR: if _HYPR:
_lock = "hyprlock" _lock = "hyprlock"
_logout = "hyprctl dispatch exit" _logout = "hyprctl dispatch exit"
@@ -24,26 +20,24 @@ else:
_lock = "i3lock -c 1e1e2e" _lock = "i3lock -c 1e1e2e"
_logout = "i3-msg exit" _logout = "i3-msg exit"
# (Nerd Font icon, label key, shell command). The icon stays out of the
# translated text: it is the same in every language.
_ITEMS = [ _ITEMS = [
("󰌾", "powermenu.lock", _lock), ("󰌾 Verrouiller", _lock),
("󰗽", "powermenu.log_out", _logout), ("󰗽 Déconnexion", _logout),
("󰤄", "powermenu.suspend", "systemctl suspend"), ("󰤄 Suspendre", "systemctl suspend"),
("󰜉", "powermenu.restart", "systemctl reboot"), ("󰜉 Redémarrer", "systemctl reboot"),
("󰐥", "powermenu.shut_down", "systemctl poweroff"), ("󰐥 Éteindre", "systemctl poweroff"),
] ]
def _menu(entries): def _menu(entries):
text = "\n".join(entries) text = "\n".join(entries)
if _HYPR: if _HYPR:
cmd = ["wofi", "--dmenu", "--prompt", t("powermenu.prompt"), cmd = ["wofi", "--dmenu", "--prompt", "Alimentation",
"--width", "300", "--height", "260", "--cache-file", "/dev/null"] "--width", "300", "--height", "260", "--cache-file", "/dev/null"]
if os.path.exists(_WOFI_STYLE): if os.path.exists(_WOFI_STYLE):
cmd += ["--style", _WOFI_STYLE] cmd += ["--style", _WOFI_STYLE]
else: else:
cmd = ["rofi", "-dmenu", "-i", "-p", t("powermenu.prompt"), "-no-custom", cmd = ["rofi", "-dmenu", "-i", "-p", "Alimentation", "-no-custom",
"-theme-str", "window { width: 300px; } listview { lines: 5; }"] "-theme-str", "window { width: 300px; } listview { lines: 5; }"]
out = subprocess.run(cmd, input=text, text=True, out = subprocess.run(cmd, input=text, text=True,
capture_output=True, check=False) capture_output=True, check=False)
@@ -51,13 +45,10 @@ def _menu(entries):
def main(): def main():
# The menu returns the chosen line: it is matched back to its command by choice = _menu([label for label, _ in _ITEMS])
# the very labels it was given.
items = [(f"{icon} {t(key)}", command) for icon, key, command in _ITEMS]
choice = _menu([label for label, _ in items])
if not choice: if not choice:
return 0 return 0
for label, command in items: for label, command in _ITEMS:
if label == choice: if label == choice:
subprocess.Popen(["sh", "-c", command]) # noqa: S603,S607 subprocess.Popen(["sh", "-c", command]) # noqa: S603,S607
break break
@@ -3,44 +3,44 @@
# meilleure compatibilité des jeux Windows que le Proton officiel. # meilleure compatibilité des jeux Windows que le Proton officiel.
# S'exécute en UTILISATEUR (installe dans ~/.steam/root/compatibilitytools.d). # S'exécute en UTILISATEUR (installe dans ~/.steam/root/compatibilitytools.d).
set -u set -u
. /usr/local/lib/fws/i18n.sh proton common
say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; } say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; }
fail() { printf '\033[1;31m ✗ %s\033[0m\n' "$*"; read -rp "$(t common.press_enter_to_close) " _; exit 1; } fail() { printf '\033[1;31m ✗ %s\033[0m\n' "$*"; read -rp "Entrée pour fermer. " _; exit 1; }
[ "$(id -u)" -eq 0 ] && fail "$(t proton.not_as_root)" [ "$(id -u)" -eq 0 ] && fail "à lancer en utilisateur normal (pas root) : l'outil s'installe dans ton Steam."
API="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest" API="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest"
DEST="$HOME/.steam/root/compatibilitytools.d" DEST="$HOME/.steam/root/compatibilitytools.d"
say "$(t proton.looking_up_latest)" say "Recherche de la dernière version de Proton-GE…"
JSON="$(curl -fsSL "$API")" || fail "$(t proton.github_unreachable)" JSON="$(curl -fsSL "$API")" || fail "GitHub inaccessible (réseau ?)"
URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.tar\.gz"' | cut -d'"' -f4 | head -1)" URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.tar\.gz"' | cut -d'"' -f4 | head -1)"
SUM_URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.sha512sum"' | cut -d'"' -f4 | head -1)" SUM_URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.sha512sum"' | cut -d'"' -f4 | head -1)"
[ -n "$URL" ] || fail "$(t proton.archive_not_found)" [ -n "$URL" ] || fail "archive introuvable dans la release GitHub"
NAME="$(basename "$URL" .tar.gz)" NAME="$(basename "$URL" .tar.gz)"
if [ -d "$DEST/$NAME" ]; then if [ -d "$DEST/$NAME" ]; then
say "$(t proton.already_installed name="$NAME")" say "$NAME est déjà installé ✔"
read -rp "$(t common.press_enter_to_close) " _; exit 0 read -rp "Entrée pour fermer. " _; exit 0
fi fi
TMP="$(mktemp -d)" TMP="$(mktemp -d)"
trap 'rm -rf "$TMP"' EXIT trap 'rm -rf "$TMP"' EXIT
say "$(t proton.downloading name="$NAME")" say "Téléchargement de $NAME (~450 Mo)…"
curl -fL --progress-bar -o "$TMP/$NAME.tar.gz" "$URL" || fail "$(t proton.download_failed)" curl -fL --progress-bar -o "$TMP/$NAME.tar.gz" "$URL" || fail "téléchargement échoué"
if [ -n "$SUM_URL" ]; then if [ -n "$SUM_URL" ]; then
say "$(t proton.verifying)" say "Vérification de l'intégrité (sha512)…"
curl -fsSL -o "$TMP/sum" "$SUM_URL" \ curl -fsSL -o "$TMP/sum" "$SUM_URL" \
&& (cd "$TMP" && sed "s|[^ ]*\.tar\.gz|$NAME.tar.gz|" sum | sha512sum -c -) \ && (cd "$TMP" && sed "s|[^ ]*\.tar\.gz|$NAME.tar.gz|" sum | sha512sum -c -) \
|| fail "$(t proton.checksum_invalid)" || fail "somme de contrôle invalide — archive corrompue ?"
fi fi
say "$(t proton.installing_into folder="$DEST")" say "Installation dans $DEST…"
mkdir -p "$DEST" mkdir -p "$DEST"
tar -xzf "$TMP/$NAME.tar.gz" -C "$DEST" || fail "$(t proton.extraction_failed)" tar -xzf "$TMP/$NAME.tar.gz" -C "$DEST" || fail "extraction échouée"
say "$(t proton.installed name="$NAME")" say "$NAME installé ✔"
# The texts carry their own line breaks: sed indents every line. echo " Dans Steam : Paramètres → Compatibilité → activer, puis choisir"
printf '%s\n' "$(t proton.how_to_enable name="$NAME")" "$(t proton.restart_steam)" | sed 's/^/ /' echo " « $NAME » (ou par jeu : Propriétés → Compatibilité)."
read -rp "$(t common.press_enter_to_close) " _ echo " Redémarre Steam pour qu'il apparaisse."
read -rp "Entrée pour fermer. " _
@@ -33,11 +33,6 @@ WANTED=""
usage() { sed -n '3,18p' "$0" | sed 's/^# \{0,1\}//'; } usage() { sed -n '3,18p' "$0" | sed 's/^# \{0,1\}//'; }
# Texts in the language of the environment (hardware.* keys). Like every step
# here, a missing helper must not stop the engine: t then prints the keys.
[ -r /usr/local/lib/fws/i18n.sh ] && . /usr/local/lib/fws/i18n.sh hardware
declare -F t >/dev/null || t() { printf '%s' "$1"; }
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
--plan) MODE="plan" ;; --plan) MODE="plan" ;;
@@ -46,22 +41,19 @@ while [ $# -gt 0 ]; do
--unattended) MODE="unattended" ;; --unattended) MODE="unattended" ;;
--groups) MODE="groups"; WANTED="$2"; shift ;; --groups) MODE="groups"; WANTED="$2"; shift ;;
-h|--help) usage; exit 0 ;; -h|--help) usage; exit 0 ;;
-*) echo "$(t hardware.unknown_option option="$1")" >&2; exit 2 ;; -*) echo "option inconnue : $1" >&2; exit 2 ;;
*) DESK="$1" ;; *) DESK="$1" ;;
esac esac
shift shift
done done
log() { echo "[FWS-hw] $*"; } log() { echo "[FWS-hw] $*"; }
# A step that fws-drivers shows in its status line: the window reads the step
# name in the tag ("[FWS-hw:install] …"), never the text, which is translated.
step() { local name="$1"; shift; echo "[FWS-hw:$name] $*"; }
ok() { echo " ✔ $*"; } ok() { echo " ✔ $*"; }
ko() { echo " ✘ $*"; } ko() { echo " ✘ $*"; }
# Les installations et les activations de services exigent root ; « --plan » non. # Les installations et les activations de services exigent root ; « --plan » non.
if [ "$MODE" != "plan" ] && [ "$(id -u)" -ne 0 ]; then if [ "$MODE" != "plan" ] && [ "$(id -u)" -ne 0 ]; then
echo "$(t hardware.needs_root)" >&2 echo "Ce script doit être lancé en root (sudo fws-setup-hardware …)" >&2
exit 1 exit 1
fi fi
@@ -133,7 +125,7 @@ if printf '%s' "$GPU" | grep -qiE 'NVIDIA|GeForce'; then
# prendre la main, alors qu'une carte récente sans module propriétaire est # prendre la main, alors qu'une carte récente sans module propriétaire est
# tout simplement inutilisable. # tout simplement inutilisable.
if [ "$_NEWEST" -eq 0 ] || [ "$_NEWEST" -ge $((16#1E00)) ]; then if [ "$_NEWEST" -eq 0 ] || [ "$_NEWEST" -ge $((16#1E00)) ]; then
GPU_NOTE="$(t hardware.note_nvidia_open device="NVIDIA 0x$(printf '%04x' "$_NEWEST")")" GPU_NOTE="NVIDIA 0x$(printf '%04x' "$_NEWEST") → modules ouverts (Turing ou plus récent)"
# libva-nvidia-driver : le pilote VA-API (décodage vidéo matériel) — # libva-nvidia-driver : le pilote VA-API (décodage vidéo matériel) —
# nvidia-utils ne fournit que le VDPAU historique ; sans ce paquet, # nvidia-utils ne fournit que le VDPAU historique ; sans ce paquet,
# Firefox/Chrome et les lecteurs décodent en CPU et saccadent en 4K. # Firefox/Chrome et les lecteurs décodent en CPU et saccadent en 4K.
@@ -146,7 +138,7 @@ if printf '%s' "$GPU" | grep -qiE 'NVIDIA|GeForce'; then
printf '%s' "$GPU" | grep -qiE '\bIntel\b|\bAMD\b|\bATI\b' \ printf '%s' "$GPU" | grep -qiE '\bIntel\b|\bAMD\b|\bATI\b' \
&& GPU_PKGS="$GPU_PKGS nvidia-prime" && GPU_PKGS="$GPU_PKGS nvidia-prime"
else else
GPU_NOTE="$(t hardware.note_nvidia_nouveau device="NVIDIA 0x$(printf '%04x' "$_NEWEST")")" GPU_NOTE="NVIDIA 0x$(printf '%04x' "$_NEWEST") antérieure à Turing → nouveau (pilote libre)"
GPU_PKGS="$GPU_PKGS xf86-video-nouveau" GPU_PKGS="$GPU_PKGS xf86-video-nouveau"
fi fi
fi fi
@@ -170,7 +162,7 @@ if printf '%s' "$GPU" | grep -qi '\bIntel\b'; then
[ "$LIB32" = 1 ] && GPU_PKGS="$GPU_PKGS lib32-vulkan-intel" [ "$LIB32" = 1 ] && GPU_PKGS="$GPU_PKGS lib32-vulkan-intel"
fi fi
group gpu "$(t hardware.group_gpu)${GPU_NOTE:+ — $GPU_NOTE}" 1 $GPU_PKGS group gpu "Pilotes graphiques${GPU_NOTE:+ — $GPU_NOTE}" 1 $GPU_PKGS
# ── 1bis) Réseau sans fil ─────────────────────────────────────────────────── # ── 1bis) Réseau sans fil ───────────────────────────────────────────────────
# linux-firmware couvre Intel, Atheros, Realtek et les Broadcom FullMAC # linux-firmware couvre Intel, Atheros, Realtek et les Broadcom FullMAC
@@ -204,18 +196,18 @@ WIFI_IFACE="$(wifi_iface)"
if [ -n "$WIFI_HW" ]; then if [ -n "$WIFI_HW" ]; then
WIFI_DETECT=1 WIFI_DETECT=1
if [ -n "$WIFI_IFACE" ]; then if [ -n "$WIFI_IFACE" ]; then
WIFI_NOTE="$(t hardware.note_wifi_interface interface="$WIFI_IFACE")" WIFI_NOTE="interface $WIFI_IFACE reconnue par le noyau"
elif printf '%s' "$WIFI_HW" | grep -qi 'Broadcom'; then elif printf '%s' "$WIFI_HW" | grep -qi 'Broadcom'; then
WIFI_NOTE="$(t hardware.note_wifi_broadcom)" WIFI_NOTE="Broadcom muette → pilote propriétaire wl"
# dkms + linux-headers : broadcom-wl-dkms compile son module à # dkms + linux-headers : broadcom-wl-dkms compile son module à
# l'installation ET à chaque mise à jour du noyau. # l'installation ET à chaque mise à jour du noyau.
WIFI_PKGS="$WIFI_PKGS broadcom-wl-dkms linux-headers dkms" WIFI_PKGS="$WIFI_PKGS broadcom-wl-dkms linux-headers dkms"
BROADCOM_WL=1 BROADCOM_WL=1
else else
WIFI_NOTE="$(t hardware.note_wifi_no_interface)" WIFI_NOTE="contrôleur sans interface — micrologiciel manquant ?"
fi fi
fi fi
group wifi "$(t hardware.group_wifi)${WIFI_NOTE:+ — $WIFI_NOTE}" "$WIFI_DETECT" $WIFI_PKGS group wifi "Réseau sans fil${WIFI_NOTE:+ — $WIFI_NOTE}" "$WIFI_DETECT" $WIFI_PKGS
# ── 2) Son ────────────────────────────────────────────────────────────────── # ── 2) Son ──────────────────────────────────────────────────────────────────
# PipeWire est le serveur audio, PAS PulseAudio : « pipewire-pulse » est la # PipeWire est le serveur audio, PAS PulseAudio : « pipewire-pulse » est la
@@ -223,7 +215,7 @@ group wifi "$(t hardware.group_wifi)${WIFI_NOTE:+ — $WIFI_NOTE}" "$WIFI_DETECT
# les modules volume de waybar/polybar fonctionnent) et elle est en conflit # les modules volume de waybar/polybar fonctionnent) et elle est en conflit
# pacman avec le vrai paquet pulseaudio — il ne peut pas s'installer. # pacman avec le vrai paquet pulseaudio — il ne peut pas s'installer.
# alsa-firmware/alsa-plugins : codecs et cartes muets sans eux. # alsa-firmware/alsa-plugins : codecs et cartes muets sans eux.
group audio "$(t hardware.group_audio)" 1 \ group audio "Son et micro (PipeWire)" 1 \
pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber \ pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber \
pavucontrol alsa-utils alsa-firmware alsa-plugins realtime-privileges pavucontrol alsa-utils alsa-firmware alsa-plugins realtime-privileges
@@ -233,17 +225,17 @@ BT_DETECT=0
BT_PKGS="bluez bluez-utils" BT_PKGS="bluez bluez-utils"
# KDE et GNOME ont leur propre gestionnaire ; blueman pour les autres bureaux. # KDE et GNOME ont leur propre gestionnaire ; blueman pour les autres bureaux.
case "$DESK" in hyprland|xfce|i3) BT_PKGS="$BT_PKGS blueman" ;; esac case "$DESK" in hyprland|xfce|i3) BT_PKGS="$BT_PKGS blueman" ;; esac
group bluetooth "$(t hardware.group_bluetooth)" "$BT_DETECT" $BT_PKGS group bluetooth "Bluetooth" "$BT_DETECT" $BT_PKGS
# ── 4) Luminosité ─────────────────────────────────────────────────────────── # ── 4) Luminosité ───────────────────────────────────────────────────────────
# brightnessctl règle la luminosité sans root (via logind) — utilisé par les # brightnessctl règle la luminosité sans root (via logind) — utilisé par les
# touches XF86MonBrightness* et le module backlight de waybar/polybar. # touches XF86MonBrightness* et le module backlight de waybar/polybar.
BL_DETECT=0 BL_DETECT=0
[ -n "$(ls -A /sys/class/backlight 2>/dev/null)" ] && BL_DETECT=1 [ -n "$(ls -A /sys/class/backlight 2>/dev/null)" ] && BL_DETECT=1
group brightness "$(t hardware.group_brightness)" "$BL_DETECT" brightnessctl group brightness "Luminosité de l'écran" "$BL_DETECT" brightnessctl
# ── 5) Codecs multimédia ──────────────────────────────────────────────────── # ── 5) Codecs multimédia ────────────────────────────────────────────────────
group codecs "$(t hardware.group_codecs)" "$GRAPHICAL" \ group codecs "Codecs audio et vidéo" "$GRAPHICAL" \
gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly \ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly \
gst-libav ffmpeg mpv gst-libav ffmpeg mpv
@@ -264,21 +256,21 @@ done
# déclarer une imprimante sur absolument toutes les machines. # déclarer une imprimante sur absolument toutes les machines.
[ "$PRINT_DETECT" = 0 ] && ls -d /sys/class/parport/parport* >/dev/null 2>&1 && PRINT_DETECT=1 [ "$PRINT_DETECT" = 0 ] && ls -d /sys/class/parport/parport* >/dev/null 2>&1 && PRINT_DETECT=1
[ "$PRINT_DETECT" = 0 ] && [ -s /etc/cups/printers.conf ] && PRINT_DETECT=1 [ "$PRINT_DETECT" = 0 ] && [ -s /etc/cups/printers.conf ] && PRINT_DETECT=1
group printing "$(t hardware.group_printing)" "$PRINT_DETECT" \ group printing "Imprimantes et scanners" "$PRINT_DETECT" \
cups cups-filters cups-pdf gutenprint foomatic-db foomatic-db-engine \ cups cups-filters cups-pdf gutenprint foomatic-db foomatic-db-engine \
system-config-printer sane avahi nss-mdns system-config-printer sane avahi nss-mdns
# ── 7) Jeux ───────────────────────────────────────────────────────────────── # ── 7) Jeux ─────────────────────────────────────────────────────────────────
# mangohud : overlay FPS/perfs en jeu (mangohud %command% dans Steam). # mangohud : overlay FPS/perfs en jeu (mangohud %command% dans Steam).
group gaming "$(t hardware.group_gaming)" "$GRAPHICAL" \ group gaming "Jeux (Steam, Wine, Proton)" "$GRAPHICAL" \
steam wine winetricks wine-mono wine-gecko lib32-pipewire \ steam wine winetricks wine-mono wine-gecko lib32-pipewire \
gamemode lib32-gamemode mangohud lib32-mangohud \ gamemode lib32-gamemode mangohud lib32-mangohud \
noto-fonts ttf-liberation noto-fonts ttf-liberation
# ── 8) Réalité virtuelle ──────────────────────────────────────────────────── # ── 8) Réalité virtuelle ────────────────────────────────────────────────────
# Monado/OpenXR → SteamVR pour HTC Vive et Valve Index ; Oculus/Meta n'a pas de # Monado/OpenXR → SteamVR pour HTC Vive et Valve Index ; Oculus/Meta n'a pas de
# support Linux officiel (streaming Wi-Fi via ALVR, hors dépôts Arch). # support Linux officiel (fws-vr-setup l'explique et propose ALVR pour Quest).
group vr "$(t hardware.group_vr)" "$GRAPHICAL" monado group vr "Réalité virtuelle (OpenXR, Monado)" "$GRAPHICAL" monado
# ── 9) Outils invité de virtualisation ────────────────────────────────────── # ── 9) Outils invité de virtualisation ──────────────────────────────────────
VM_PKGS=""; VMSVC=""; VM_DETECT=0 VM_PKGS=""; VMSVC=""; VM_DETECT=0
@@ -288,11 +280,11 @@ case "$(systemd-detect-virt 2>/dev/null)" in
qemu|kvm) VM_PKGS="qemu-guest-agent spice-vdagent"; VMSVC="qemu-guest-agent spice-vdagentd"; VM_DETECT=1 ;; qemu|kvm) VM_PKGS="qemu-guest-agent spice-vdagent"; VMSVC="qemu-guest-agent spice-vdagentd"; VM_DETECT=1 ;;
microsoft) VM_PKGS="hyperv"; VMSVC="hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon"; VM_DETECT=1 ;; microsoft) VM_PKGS="hyperv"; VMSVC="hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon"; VM_DETECT=1 ;;
esac esac
[ -n "$VM_PKGS" ] && group vm "$(t hardware.group_vm)" "$VM_DETECT" $VM_PKGS [ -n "$VM_PKGS" ] && group vm "Outils invité de la machine virtuelle" "$VM_DETECT" $VM_PKGS
# ── 10) Conteneurs ────────────────────────────────────────────────────────── # ── 10) Conteneurs ──────────────────────────────────────────────────────────
# Moteur de conteneurs sans démon : applications isolées (Distrobox, images OCI). # Moteur de conteneurs sans démon : applications isolées (Distrobox, images OCI).
group containers "$(t hardware.group_containers)" 1 podman group containers "Conteneurs (Podman)" 1 podman
# ── Groupes À LA DEMANDE ──────────────────────────────────────────────────── # ── Groupes À LA DEMANDE ────────────────────────────────────────────────────
# Ces groupes sont PERTINENTS (donc détectés, donc pré-cochés dans l'installation # Ces groupes sont PERTINENTS (donc détectés, donc pré-cochés dans l'installation
@@ -314,8 +306,6 @@ is_ondemand() {
# ── Mode « plan » : lister et sortir ──────────────────────────────────────── # ── Mode « plan » : lister et sortir ────────────────────────────────────────
# Format volontairement tabulé pour être lu par fws-drivers : # Format volontairement tabulé pour être lu par fws-drivers :
# id <TAB> détecté <TAB> libellé <TAB> paquets # id <TAB> détecté <TAB> libellé <TAB> paquets
# The label is already in the language of the environment: the window, which
# runs this as the same user, shows it as is.
if [ "$MODE" = "plan" ]; then if [ "$MODE" = "plan" ]; then
for id in "${ORDER[@]}"; do for id in "${ORDER[@]}"; do
printf '%s\t%s\t%s\t%s\n' \ printf '%s\t%s\t%s\t%s\n' \
@@ -347,7 +337,7 @@ case "$MODE" in
if [ -n "${G_LABEL[$id]:-}" ]; then if [ -n "${G_LABEL[$id]:-}" ]; then
SELECTED+=("$id") SELECTED+=("$id")
else else
log "$(t hardware.unknown_group group="$id")" log "groupe inconnu, ignoré : $id"
fi fi
done done
;; ;;
@@ -367,11 +357,11 @@ selected_has() {
if [ "${#SELECTED[@]}" -gt 0 ]; then if [ "${#SELECTED[@]}" -gt 0 ]; then
WANTED_PKGS="" WANTED_PKGS=""
for id in "${SELECTED[@]}"; do for id in "${SELECTED[@]}"; do
log "$(t hardware.group_selected group="${G_LABEL[$id]}")" log "groupe « ${G_LABEL[$id]} »"
WANTED_PKGS="$WANTED_PKGS ${G_PKGS[$id]}" WANTED_PKGS="$WANTED_PKGS ${G_PKGS[$id]}"
done done
pacman -Sy --noconfirm || log "$(t hardware.sync_failed)" pacman -Sy --noconfirm || log "synchro pacman échouée (réseau ?)"
# Filtre aux paquets RÉELLEMENT existants : un nom manquant ou renommé ne # Filtre aux paquets RÉELLEMENT existants : un nom manquant ou renommé ne
# doit pas faire échouer toute la transaction. Les absents sont NOMMÉS — # doit pas faire échouer toute la transaction. Les absents sont NOMMÉS —
@@ -384,9 +374,9 @@ if [ "${#SELECTED[@]}" -gt 0 ]; then
MISSING="$MISSING $p" MISSING="$MISSING $p"
fi fi
done done
[ -n "$MISSING" ] && log "$(t hardware.packages_not_found packages="${MISSING# }")" [ -n "$MISSING" ] && log "AVERTISSEMENT : paquets introuvables dans les dépôts :$MISSING"
if [ -n "$VALID" ]; then if [ -n "$VALID" ]; then
step install "$(t hardware.installing_packages packages="${VALID# }")" log "installation :$VALID"
if pacman -S --noconfirm --needed $VALID; then if pacman -S --noconfirm --needed $VALID; then
# polices : le cache fontconfig doit inclure la police emoji qui # polices : le cache fontconfig doit inclure la police emoji qui
# vient d'être installée, sinon les applications déjà lancées ne la # vient d'être installée, sinon les applications déjà lancées ne la
@@ -411,16 +401,17 @@ if [ "${#SELECTED[@]}" -gt 0 ]; then
done done
if [ -n "$_pending" ]; then if [ -n "$_pending" ]; then
rm -f /var/lib/fws/hardware-done rm -f /var/lib/fws/hardware-done
log "$(t hardware.pending_groups groups="${_pending# }")" log "reste à proposer à l'utilisateur :$_pending"
log "$(t hardware.drivers_will_open)" log "« Pilotes et matériel » s'ouvrira au premier démarrage"
else else
install -d /var/lib/fws install -d /var/lib/fws
printf '%s groupes=%s\n' "$(date -Is)" "${SELECTED[*]}" \ printf '%s groupes=%s\n' "$(date -Is)" "${SELECTED[*]}" \
> /var/lib/fws/hardware-done > /var/lib/fws/hardware-done
log "$(t hardware.setup_recorded path=/var/lib/fws/hardware-done)" log "mise en route matérielle enregistrée (/var/lib/fws/hardware-done)"
fi fi
else else
log "$(t hardware.install_incomplete)" log "certains paquets n'ont pas été installés — la fenêtre « Pilotes et matériel »"
log "s'ouvrira au premier démarrage pour terminer"
rm -f /var/lib/fws/hardware-done rm -f /var/lib/fws/hardware-done
fi fi
fi fi
@@ -438,19 +429,19 @@ _wifi_selected=0
for id in "${SELECTED[@]}"; do [ "$id" = wifi ] && _wifi_selected=1; done for id in "${SELECTED[@]}"; do [ "$id" = wifi ] && _wifi_selected=1; done
if [ "$BROADCOM_WL" = 1 ] && [ "$_wifi_selected" = 1 ]; then if [ "$BROADCOM_WL" = 1 ] && [ "$_wifi_selected" = 1 ]; then
if pacman -Qq broadcom-wl-dkms >/dev/null 2>&1; then if pacman -Qq broadcom-wl-dkms >/dev/null 2>&1; then
log "$(t hardware.broadcom_already_installed)" log "wi-fi Broadcom : pilote wl déjà installé"
else else
_WL_PKG="$(ls /usr/local/share/fws/drivers/broadcom-wl-dkms-*.pkg.tar.* 2>/dev/null | head -1)" _WL_PKG="$(ls /usr/local/share/fws/drivers/broadcom-wl-dkms-*.pkg.tar.* 2>/dev/null | head -1)"
if [ -z "$_WL_PKG" ]; then if [ -z "$_WL_PKG" ]; then
log "$(t hardware.broadcom_not_found)" log "wi-fi Broadcom : pilote wl introuvable (ni dépôts, ni image)"
elif pacman -U --noconfirm "$_WL_PKG"; then elif pacman -U --noconfirm "$_WL_PKG"; then
log "$(t hardware.broadcom_installed)" log "wi-fi Broadcom : pilote wl installé — redémarre pour l'activer"
rm -f "$_WL_PKG" rm -f "$_WL_PKG"
else else
# dkms et linux-headers ne sont PAS dans l'image : sans réseau, # dkms et linux-headers ne sont PAS dans l'image : sans réseau,
# « -U » échoue sur les dépendances. On le dit au lieu de laisser # « -U » échoue sur les dépendances. On le dit au lieu de laisser
# croire que la carte est définitivement morte. # croire que la carte est définitivement morte.
log "$(t hardware.broadcom_failed)" log "wi-fi Broadcom : échec — dkms/linux-headers manquants (réseau requis)"
fi fi
fi fi
fi fi
@@ -464,14 +455,14 @@ fi
# Jouée après une installation, et seule avec « --check ». Chaque contrôle est # Jouée après une installation, et seule avec « --check ». Chaque contrôle est
# idempotent : on peut la relancer autant de fois qu'on veut. # idempotent : on peut la relancer autant de fois qu'on veut.
echo echo
step check "$(t hardware.checking_services)" log "vérification des services et des connexions"
# --- Réseau ----------------------------------------------------------------- # --- Réseau -----------------------------------------------------------------
if systemctl is-enabled NetworkManager.service >/dev/null 2>&1; then if systemctl is-enabled NetworkManager.service >/dev/null 2>&1; then
ok "$(t hardware.networkmanager_enabled)" ok "NetworkManager activé"
else else
systemctl enable --now NetworkManager.service >/dev/null 2>&1 \ systemctl enable --now NetworkManager.service >/dev/null 2>&1 \
&& ok "$(t hardware.networkmanager_repaired)" || ko "$(t hardware.networkmanager_failed)" && ok "NetworkManager activé (réparé)" || ko "NetworkManager : activation impossible"
fi fi
# --- Son -------------------------------------------------------------------- # --- Son --------------------------------------------------------------------
@@ -487,8 +478,8 @@ if selected_has audio; then
# Une unité par appel : groupées, un seul échec en masquerait les autres. # Une unité par appel : groupées, un seul échec en masquerait les autres.
for u in pipewire.socket pipewire-pulse.socket wireplumber.service; do for u in pipewire.socket pipewire-pulse.socket wireplumber.service; do
systemctl --global enable "$u" >/dev/null 2>&1 \ systemctl --global enable "$u" >/dev/null 2>&1 \
&& ok "$(t hardware.audio_unit_enabled unit="$u")" \ && ok "son : $u activé pour toutes les sessions" \
|| ko "$(t hardware.audio_unit_failed unit="$u")" || ko "son : activation de $u impossible"
done done
# Priorité temps réel : contre les craquements et les coupures sous charge. # Priorité temps réel : contre les craquements et les coupures sous charge.
if getent group realtime >/dev/null 2>&1; then if getent group realtime >/dev/null 2>&1; then
@@ -496,7 +487,7 @@ if selected_has audio; then
[ "$uid" -ge 1000 ] && [ "$uid" -le 60000 ] \ [ "$uid" -ge 1000 ] && [ "$uid" -le 60000 ] \
&& usermod -aG realtime "$u" 2>/dev/null && usermod -aG realtime "$u" 2>/dev/null
done < /etc/passwd done < /etc/passwd
ok "$(t hardware.audio_realtime_group)" ok "son : comptes humains ajoutés au groupe realtime"
fi fi
fi fi
@@ -504,42 +495,41 @@ fi
if selected_has bluetooth; then if selected_has bluetooth; then
# rfkill d'abord : un contrôleur bloqué au niveau noyau ne répondra à # rfkill d'abord : un contrôleur bloqué au niveau noyau ne répondra à
# aucune commande, et c'est l'état par défaut sur pas mal de portables. # aucune commande, et c'est l'état par défaut sur pas mal de portables.
rfkill unblock bluetooth 2>/dev/null && ok "$(t hardware.bluetooth_unblocked)" rfkill unblock bluetooth 2>/dev/null && ok "bluetooth : radio débloquée"
if systemctl enable --now bluetooth.service >/dev/null 2>&1; then if systemctl enable --now bluetooth.service >/dev/null 2>&1; then
ok "$(t hardware.bluetooth_service_enabled)" ok "bluetooth : service activé"
# Contrôleur allumé + appairages retrouvés au démarrage. # Contrôleur allumé + appairages retrouvés au démarrage.
printf 'power on\n' | timeout 10 bluetoothctl >/dev/null 2>&1 \ printf 'power on\n' | timeout 10 bluetoothctl >/dev/null 2>&1 \
&& ok "$(t hardware.bluetooth_powered_on)" \ && ok "bluetooth : contrôleur allumé" \
|| ko "$(t hardware.bluetooth_unreachable)" || ko "bluetooth : contrôleur injoignable (aucun adaptateur ?)"
else else
ko "$(t hardware.bluetooth_service_unavailable)" ko "bluetooth : service indisponible"
fi fi
fi fi
# --- Impression ------------------------------------------------------------- # --- Impression -------------------------------------------------------------
if selected_has printing; then if selected_has printing; then
systemctl enable --now cups.service >/dev/null 2>&1 \ systemctl enable --now cups.service >/dev/null 2>&1 \
&& ok "$(t hardware.printing_cups_enabled)" || ko "$(t hardware.printing_cups_unavailable)" && ok "impression : cups activé" || ko "impression : cups indisponible"
# Découverte des imprimantes réseau (mDNS) : avahi + résolution .local. # Découverte des imprimantes réseau (mDNS) : avahi + résolution .local.
systemctl enable --now avahi-daemon.service >/dev/null 2>&1 \ systemctl enable --now avahi-daemon.service >/dev/null 2>&1 \
&& ok "$(t hardware.printing_discovery_enabled)" || true && ok "impression : découverte réseau (avahi) activée" || true
if [ -f /etc/nsswitch.conf ] && ! grep -q 'mdns' /etc/nsswitch.conf; then if [ -f /etc/nsswitch.conf ] && ! grep -q 'mdns' /etc/nsswitch.conf; then
sed -i 's/^hosts:.*/& mdns_minimal [NOTFOUND=return]/' /etc/nsswitch.conf \ sed -i 's/^hosts:.*/& mdns_minimal [NOTFOUND=return]/' /etc/nsswitch.conf \
&& ok "$(t hardware.printing_local_names_added)" && ok "impression : résolution .local ajoutée à nsswitch.conf"
fi fi
fi fi
# --- Conteneurs ------------------------------------------------------------- # --- Conteneurs -------------------------------------------------------------
if selected_has containers; then if selected_has containers; then
systemctl enable podman.socket >/dev/null 2>&1 \ systemctl enable podman.socket >/dev/null 2>&1 \
&& ok "$(t hardware.containers_enabled)" || ko "$(t hardware.containers_unavailable)" && ok "conteneurs : podman.socket activé" || ko "conteneurs : podman indisponible"
fi fi
# --- Outils invité VM ------------------------------------------------------- # --- Outils invité VM -------------------------------------------------------
if selected_has vm && [ -n "$VMSVC" ]; then if selected_has vm && [ -n "$VMSVC" ]; then
systemctl enable $VMSVC >/dev/null 2>&1 \ systemctl enable $VMSVC >/dev/null 2>&1 \
&& ok "$(t hardware.vm_services_enabled services="$VMSVC")" \ && ok "machine virtuelle : $VMSVC activés" || ko "machine virtuelle : activation partielle"
|| ko "$(t hardware.vm_services_partial)"
fi fi
# --- Modules DKMS réellement compilés --------------------------------------- # --- Modules DKMS réellement compilés ---------------------------------------
@@ -554,13 +544,13 @@ if command -v dkms >/dev/null 2>&1; then
: # aucun module DKMS attendu sur cette machine : # aucun module DKMS attendu sur cette machine
else else
_NBOK="$(printf '%s\n' "$_DKMS" | grep -c 'installed')" _NBOK="$(printf '%s\n' "$_DKMS" | grep -c 'installed')"
[ "$_NBOK" -gt 0 ] && ok "$(t hardware.dkms_built count="$_NBOK")" [ "$_NBOK" -gt 0 ] && ok "dkms : $_NBOK module(s) compilé(s) et installé(s)"
printf '%s\n' "$_DKMS" | grep -v 'installed' | while read -r _l; do printf '%s\n' "$_DKMS" | grep -v 'installed' | while read -r _l; do
[ -n "$_l" ] && ko "$(t hardware.dkms_not_built module="$_l")" [ -n "$_l" ] && ko "dkms : PAS compilé → $_l"
done done
if [ "$_NBOK" -eq 0 ]; then if [ "$_NBOK" -eq 0 ]; then
ko "$(t hardware.dkms_none_built)" ko "dkms : aucun module compilé — en-têtes du noyau absentes ?"
ko " $(t hardware.dkms_retry command="sudo dkms autoinstall")" ko " réessaie avec : sudo dkms autoinstall"
fi fi
fi fi
fi fi
@@ -572,9 +562,9 @@ fi
if selected_has gpu; then if selected_has gpu; then
_GMOD="$(lsmod 2>/dev/null | grep -oE '^(nvidia|amdgpu|i915|xe|radeon|nouveau)' | head -1)" _GMOD="$(lsmod 2>/dev/null | grep -oE '^(nvidia|amdgpu|i915|xe|radeon|nouveau)' | head -1)"
if [ -n "$_GMOD" ]; then if [ -n "$_GMOD" ]; then
ok "$(t hardware.gpu_module_loaded module="$_GMOD")" ok "graphique : module chargé ($_GMOD)"
else else
ko "$(t hardware.gpu_no_module)" ko "graphique : aucun module noyau chargé — redémarre pour appliquer les pilotes"
fi fi
# Un module chargé ne prouve RIEN sur le rendu : le loader Vulkan doit # Un module chargé ne prouve RIEN sur le rendu : le loader Vulkan doit
@@ -584,26 +574,26 @@ if selected_has gpu; then
# l'installateur. Sans module chargé ou sans /dev/dri, le test ne prouve # l'installateur. Sans module chargé ou sans /dev/dri, le test ne prouve
# rien : on le dit plutôt que d'afficher un échec qui n'en est pas un. # rien : on le dit plutôt que d'afficher un échec qui n'en est pas un.
if [ -z "$_GMOD" ] || [ ! -d /dev/dri ]; then if [ -z "$_GMOD" ] || [ ! -d /dev/dri ]; then
log " … $(t hardware.rendering_not_tested)" log " … rendu non testé ici (pilote pas encore actif) — contrôle au prochain démarrage"
else else
if command -v vulkaninfo >/dev/null 2>&1; then if command -v vulkaninfo >/dev/null 2>&1; then
_VK="$(vulkaninfo --summary 2>/dev/null \ _VK="$(vulkaninfo --summary 2>/dev/null \
| sed -n 's/^[[:space:]]*deviceName[[:space:]]*=[[:space:]]*//p')" | sed -n 's/^[[:space:]]*deviceName[[:space:]]*=[[:space:]]*//p')"
if [ -z "$_VK" ]; then if [ -z "$_VK" ]; then
ko "$(t hardware.vulkan_no_device)" ko "vulkan : aucun périphérique — ICD absent ou illisible"
ko " $(t hardware.vulkan_icds_present files="$(ls /usr/share/vulkan/icd.d/ 2>/dev/null | tr '\n' ' ')")" ko " ICD présents : $(ls /usr/share/vulkan/icd.d/ 2>/dev/null | tr '\n' ' ')"
elif ! printf '%s\n' "$_VK" | grep -qvi 'llvmpipe'; then elif ! printf '%s\n' "$_VK" | grep -qvi 'llvmpipe'; then
# llvmpipe SEUL = rendu logiciel : ça « marche », mais au CPU. # llvmpipe SEUL = rendu logiciel : ça « marche », mais au CPU.
# Le symptôme est un bureau qui rame et zéro jeu jouable, sans # Le symptôme est un bureau qui rame et zéro jeu jouable, sans
# le moindre message d'erreur nulle part. # le moindre message d'erreur nulle part.
ko "$(t hardware.vulkan_software_only)" ko "vulkan : rendu LOGICIEL seulement (llvmpipe) — le pilote matériel n'est pas actif"
else else
printf '%s\n' "$_VK" | while read -r _d; do printf '%s\n' "$_VK" | while read -r _d; do
[ -n "$_d" ] && ok "$(t hardware.vulkan_device device="$_d")" [ -n "$_d" ] && ok "vulkan : $_d"
done done
fi fi
else else
ko "$(t hardware.vulkan_tools_missing)" ko "vulkan : vulkan-tools absent, impossible de vérifier le rendu"
fi fi
# OpenGL : second avis, mais glxinfo EXIGE un affichage ouvert. Lancé # OpenGL : second avis, mais glxinfo EXIGE un affichage ouvert. Lancé
@@ -612,7 +602,7 @@ if selected_has gpu; then
if command -v glxinfo >/dev/null 2>&1 \ if command -v glxinfo >/dev/null 2>&1 \
&& [ -n "${DISPLAY:-}${WAYLAND_DISPLAY:-}" ]; then && [ -n "${DISPLAY:-}${WAYLAND_DISPLAY:-}" ]; then
_GL="$(glxinfo -B 2>/dev/null | sed -n 's/^OpenGL renderer string: //p')" _GL="$(glxinfo -B 2>/dev/null | sed -n 's/^OpenGL renderer string: //p')"
[ -n "$_GL" ] && ok "$(t hardware.opengl_renderer renderer="$_GL")" [ -n "$_GL" ] && ok "opengl : $_GL"
fi fi
fi fi
fi fi
@@ -623,16 +613,16 @@ fi
if selected_has wifi; then if selected_has wifi; then
WIFI_IFACE="$(wifi_iface)" WIFI_IFACE="$(wifi_iface)"
if [ -n "$WIFI_IFACE" ]; then if [ -n "$WIFI_IFACE" ]; then
ok "$(t hardware.wifi_interface_present interface="$WIFI_IFACE")" ok "wi-fi : interface $WIFI_IFACE présente"
rfkill unblock wifi 2>/dev/null && ok "$(t hardware.wifi_unblocked)" rfkill unblock wifi 2>/dev/null && ok "wi-fi : radio débloquée"
elif [ -n "$WIFI_HW" ]; then elif [ -n "$WIFI_HW" ]; then
ko "$(t hardware.wifi_no_interface)" ko "wi-fi : contrôleur détecté mais AUCUNE interface — pilote manquant"
ko " $(printf '%s' "$WIFI_HW" | head -1 | cut -c1-72)" ko " $(printf '%s' "$WIFI_HW" | head -1 | cut -c1-72)"
[ "$BROADCOM_WL" = 1 ] \ [ "$BROADCOM_WL" = 1 ] \
&& ko " $(t hardware.wifi_restart_for_wl)" && ko " pilote wl installé ? redémarre pour le charger"
fi fi
fi fi
echo echo
log "$(t hardware.done)" log "terminé"
exit 0 exit 0
@@ -8,28 +8,26 @@ if [ "$(id -u)" -ne 0 ]; then
exec sudo "$0" "$@" exec sudo "$0" "$@"
fi fi
. /usr/local/lib/fws/i18n.sh update common say "Mise à jour du système (pacman -Syu)…"
pacman -Syu || { echo "Échec de la mise à jour (réseau ?)"; read -rp "Entrée pour fermer. " _; exit 1; }
say "$(t update.updating_system)"
pacman -Syu || { echo "$(t update.failed)"; read -rp "$(t common.press_enter_to_close) " _; exit 1; }
if command -v paccache >/dev/null 2>&1; then if command -v paccache >/dev/null 2>&1; then
say "$(t update.cleaning_cache)" say "Nettoyage du cache des paquets (2 dernières versions gardées)…"
paccache -rk2 paccache -rk2
fi fi
ORPHANS="$(pacman -Qtdq 2>/dev/null)" ORPHANS="$(pacman -Qtdq 2>/dev/null)"
if [ -n "$ORPHANS" ]; then if [ -n "$ORPHANS" ]; then
say "$(t update.orphans)" say "Paquets orphelins (plus requis par rien) :"
echo "$ORPHANS" echo "$ORPHANS"
read -rp "$(t update.remove_orphans) $(t common.yes_no) " _rm read -rp "Les supprimer ? [o/N] " _rm
t_is_yes "$_rm" && echo "$ORPHANS" | pacman -Rns --noconfirm - case "$_rm" in o|O|oui) echo "$ORPHANS" | pacman -Rns --noconfirm - ;; esac
fi fi
if command -v flatpak >/dev/null 2>&1; then if command -v flatpak >/dev/null 2>&1; then
say "$(t update.updating_flatpaks)" say "Mise à jour des Flatpaks…"
flatpak update -y || true flatpak update -y || true
fi fi
say "$(t update.done)" say "Système à jour ✔"
read -rp "$(t common.press_enter_to_close) " _ read -rp "Entrée pour fermer. " _
@@ -0,0 +1,190 @@
# FWS — configuration Hyprland par défaut.
# Le clavier (__KB_LAYOUT__ / __KB_VARIANT__) est injecté à l'installation,
# depuis le choix fait dans Anaconda. Édite ce fichier librement.
#
# Raccourcis : transposition de la config i3/sway FWS (mêmes touches).
# Couleurs : nuances de bleu (palette Catppuccin Mocha).
#
# Les raccourcis sont déclarés avec « bindd » (bind + description) : la
# description alimente l'écran « Raccourcis clavier » (bouton ⌨ de la barre
# ou SUPER+K → fws-keys, qui lit les binds RÉELS via hyprctl). Ajoute
# tes propres bindd : ils apparaîtront automatiquement dans la liste.
# ⚠ Pas de virgule dans les descriptions (séparateur de champs Hyprland).
monitor = , preferred, auto, 1
input {
kb_layout = __KB_LAYOUT__
kb_variant = __KB_VARIANT__
follow_mouse = 1
numlock_by_default = true
touchpad {
natural_scroll = true
tap-to-click = true
}
}
general {
gaps_in = 4
gaps_out = 8
border_size = 2
# Nuances de bleu : bleu → sapphire en dégradé sur la fenêtre active.
col.active_border = rgb(89b4fa) rgb(74c7ec) 45deg
col.inactive_border = rgb(313244)
layout = dwindle
}
decoration {
rounding = 8
# Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM — cf. le
# wrapper fws-hyprland écrit par l'installateur. Sur un vrai GPU tu
# peux les réactiver (enabled = true).
blur {
enabled = false
}
shadow {
enabled = false
}
}
animations {
enabled = true
bezier = fws, 0.22, 1.0, 0.36, 1.0
animation = windows, 1, 3, fws
animation = workspaces, 1, 3, fws
animation = fade, 1, 2, default
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true # pas de « Thanks xxx! » en bas d'écran
force_default_wallpaper = 0
background_color = 0x1a1a2e # bleu nuit FWS (aucun fond requis)
}
# Démarrage de session : barre d'état, notifications, réseau dans le tray,
# agent d'authentification GUI (indispensable pour les apps qui demandent
# les droits admin : gestionnaire de disques, blueman…).
# Fond d'écran FWS : image EMBARQUÉE dans l'ISO (aucun réseau requis) — swaybg
# la repose à chaque session, Hyprland n'ayant pas de réglage de fond persistant
# hors config. « background_color » ci-dessus reste le repli si swaybg manque.
exec-once = fws-wallpaper --session
exec-once = waybar
exec-once = mako
exec-once = nm-applet
# Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a
# pas → blueman afficherait une erreur « Connection to BlueZ failed »).
exec-once = sh -c '[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet'
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite).
exec-once = fws-hello --autostart
# Mise en route du matériel : ne s'ouvre que si elle n'a pas abouti à
# l'installation (pilotes, son, Bluetooth, VR…).
exec-once = fws-drivers --autostart
$mod = SUPER
# --- Applications ---------------------------------------------------------
bindd = $mod, Return, Ouvrir un terminal (kitty), exec, kitty
bindd = $mod SHIFT, Return, Terminal flottant, exec, kitty --class floating-term
bindd = $mod, R, Menu des applications, exec, wofi --show drun
bindd = $mod, E, Gestionnaire de fichiers, exec, dolphin
bindd = $mod, B, Ouvrir Firefox, exec, firefox
bindd = $mod, P, Gestionnaire de paquets (PacManager), exec, PacManager
bindd = $mod, K, Afficher les raccourcis clavier, exec, fws-keys
bindd = $mod, X, Menu d'alimentation (arrêt/redémarrage…), exec, fws-powermenu
# --- Fenêtres ---------------------------------------------------------------
bindd = $mod, Q, Fermer la fenêtre, killactive,
bindd = $mod, V, Fenêtre flottante ou ancrée, togglefloating,
bindd = $mod, F, Plein écran, fullscreen,
bindd = $mod, J, Basculer la découpe horizontale/verticale, layoutmsg, togglesplit
bindd = $mod, L, Verrouiller l'écran, exec, hyprlock
bindd = $mod SHIFT, E, Quitter la session (retour à SDDM), exit,
bindd = $mod SHIFT, C, Recharger la configuration Hyprland, exec, hyprctl reload
# --- Focus (flèches) ---------------------------------------------------------
bindd = $mod, left, Focus à gauche, movefocus, l
bindd = $mod, right, Focus à droite, movefocus, r
bindd = $mod, up, Focus en haut, movefocus, u
bindd = $mod, down, Focus en bas, movefocus, d
# --- Déplacer la fenêtre (Maj + flèches) ---------------------------------------
bindd = $mod SHIFT, left, Déplacer la fenêtre à gauche, movewindow, l
bindd = $mod SHIFT, right, Déplacer la fenêtre à droite, movewindow, r
bindd = $mod SHIFT, up, Déplacer la fenêtre en haut, movewindow, u
bindd = $mod SHIFT, down, Déplacer la fenêtre en bas, movewindow, d
# --- Redimensionner (Ctrl + flèches, maintien possible) ------------------------
binde = $mod CTRL, left, resizeactive, -30 0
binde = $mod CTRL, right, resizeactive, 30 0
binde = $mod CTRL, up, resizeactive, 0 -30
binde = $mod CTRL, down, resizeactive, 0 30
# --- Espaces de travail 1-10 (0 = espace 10, comme i3) --------------------------
bindd = $mod, 1, Aller à l'espace 1, workspace, 1
bindd = $mod, 2, Aller à l'espace 2, workspace, 2
bindd = $mod, 3, Aller à l'espace 3, workspace, 3
bindd = $mod, 4, Aller à l'espace 4, workspace, 4
bindd = $mod, 5, Aller à l'espace 5, workspace, 5
bindd = $mod, 6, Aller à l'espace 6, workspace, 6
bindd = $mod, 7, Aller à l'espace 7, workspace, 7
bindd = $mod, 8, Aller à l'espace 8, workspace, 8
bindd = $mod, 9, Aller à l'espace 9, workspace, 9
bindd = $mod, 0, Aller à l'espace 10, workspace, 10
bindd = $mod SHIFT, 1, Envoyer la fenêtre vers l'espace 1, movetoworkspace, 1
bindd = $mod SHIFT, 2, Envoyer la fenêtre vers l'espace 2, movetoworkspace, 2
bindd = $mod SHIFT, 3, Envoyer la fenêtre vers l'espace 3, movetoworkspace, 3
bindd = $mod SHIFT, 4, Envoyer la fenêtre vers l'espace 4, movetoworkspace, 4
bindd = $mod SHIFT, 5, Envoyer la fenêtre vers l'espace 5, movetoworkspace, 5
bindd = $mod SHIFT, 6, Envoyer la fenêtre vers l'espace 6, movetoworkspace, 6
bindd = $mod SHIFT, 7, Envoyer la fenêtre vers l'espace 7, movetoworkspace, 7
bindd = $mod SHIFT, 8, Envoyer la fenêtre vers l'espace 8, movetoworkspace, 8
bindd = $mod SHIFT, 9, Envoyer la fenêtre vers l'espace 9, movetoworkspace, 9
bindd = $mod SHIFT, 0, Envoyer la fenêtre vers l'espace 10, movetoworkspace, 10
# --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) -------------
bindd = $mod CTRL, 1, Envoyer la fenêtre vers l'écran de gauche, movewindow, mon:l
bindd = $mod CTRL, 2, Envoyer la fenêtre vers l'écran de droite, movewindow, mon:r
# --- Molette = changer d'espace de travail --------------------------------------
bindd = $mod, mouse_up, Espace de travail précédent, workspace, e-1
bindd = $mod, mouse_down, Espace de travail suivant, workspace, e+1
# --- Scratchpad (espace spécial) -------------------------------------------------
bindd = $mod, S, Afficher le scratchpad, togglespecialworkspace, magic
bindd = $mod SHIFT, S, Envoyer la fenêtre au scratchpad, movetoworkspace, special:magic
# --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) -------------------
bindd = , Print, Capture plein écran vers le presse-papier, exec, grim - | wl-copy
bindd = $mod, Print, Capture d'une zone vers le presse-papier, exec, grim -g "$(slurp)" - | wl-copy
bindd = $mod SHIFT, Print, Capture d'une zone vers ~/Images, exec, sh -c 'mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png'
# --- Multimédia (touches XF86 : volume via PipeWire, lecture via playerctl) ------
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPrev, exec, playerctl previous
# --- Luminosité de l'écran (portables : touches Fn) ------------------------------
bindel = , XF86MonBrightnessUp, exec, brightnessctl set +5%
bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
# --- Souris : déplacer / redimensionner les fenêtres -----------------------------
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
# --- Règles de fenêtres (comme i3) ------------------------------------------------
# Syntaxe Hyprland ≥ 0.55 : champs « <règle> <valeur> » + cibles « match:… »
# (validé contre le binaire avec --verify-config).
windowrule = float on, match:class ^(floating-term)$
windowrule = size 900 550, match:class ^(floating-term)$
windowrule = float on, match:class ^([Pp]avucontrol|org.pulseaudio.pavucontrol)$
windowrule = float on, match:class ^(.?[Bb]lueman-manager.*)$
windowrule = float on, match:class ^([Ff]ws-hello)$
windowrule = float on, match:class ^([Ff]ws-drivers)$
windowrule = float on, match:class ^([Ff]ws-about)$
windowrule = float on, match:class ^([Ff]ws-bugreport)$
windowrule = float on, match:title ^(Picture-in-Picture)$
@@ -1,195 +0,0 @@
-- FWS — configuration Hyprland par défaut (format Lua, Hyprland ≥ 0.55).
--
-- Depuis Hyprland 0.57 le fichier hyprland.conf (syntaxe « hyprlang ») n'est
-- PLUS lu : seul hyprland.lua est chargé (0.55/0.56 le préfèrent aussi). C'est
-- donc le seul format que FWS livre.
--
-- Le clavier (__KB_LAYOUT__ / __KB_VARIANT__ / __KB_OPTIONS__) est injecté à
-- l'installation, depuis le choix fait dans Anaconda. Édite ce fichier
-- librement.
--
-- Raccourcis : transposition de la config i3/sway FWS (mêmes touches).
-- Couleurs : nuances de bleu (palette Catppuccin Mocha).
--
-- Les raccourcis sont décrits par des clés (binds.*) dans hl.bind() : la
-- description alimente l'écran « Raccourcis clavier » (bouton ⌨ de la barre
-- ou SUPER+K → fws-keys, qui lit les binds RÉELLEMENT chargés via hyprctl).
-- fws-keys affiche ces clés dans la langue de la session ; un texte en clair
-- s'affiche tel quel, sans virgule (séparateur de champs de Hyprland).
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 1,
})
hl.config({
input = {
kb_layout = "__KB_LAYOUT__",
kb_variant = "__KB_VARIANT__",
kb_options = "__KB_OPTIONS__",
follow_mouse = 1,
numlock_by_default = true,
touchpad = {
natural_scroll = true,
tap_to_click = true,
},
},
general = {
gaps_in = 4,
gaps_out = 8,
border_size = 2,
-- Nuances de bleu : bleu → sapphire en dégradé sur la fenêtre active.
col = {
active_border = {
colors = { "rgba(89b4faff)", "rgba(74c7ecff)" },
angle = 45,
},
inactive_border = "rgba(313244ff)",
},
layout = "dwindle",
},
decoration = {
rounding = 8,
-- Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM — cf. le
-- wrapper fws-hyprland écrit par l'installateur. Sur un vrai GPU tu
-- peux les réactiver (enabled = true).
blur = {
enabled = false,
},
shadow = {
enabled = false,
},
},
animations = {
enabled = true,
},
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true, -- pas de « Thanks xxx! » en bas d'écran
force_default_wallpaper = 0,
background_color = "0x1a1a2e", -- bleu nuit FWS (aucun fond requis)
},
})
hl.curve("fws", { type = "bezier", points = { { 0.22, 1.0 }, { 0.36, 1.0 } } })
hl.animation({ leaf = "windows", enabled = true, speed = 3, bezier = "fws" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 3, bezier = "fws" })
hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "default" })
-- Démarrage de session : barre d'état, notifications, réseau dans le tray,
-- agent d'authentification GUI (indispensable pour les apps qui demandent
-- les droits admin : gestionnaire de disques, blueman…).
-- Fond d'écran FWS : image EMBARQUÉE dans l'ISO (aucun réseau requis) — swaybg
-- la repose à chaque session, Hyprland n'ayant pas de réglage de fond persistant
-- hors config. « background_color » ci-dessus reste le repli si swaybg manque.
hl.on("hyprland.start", function()
hl.exec_cmd("fws-wallpaper --session")
hl.exec_cmd("waybar")
hl.exec_cmd("mako")
hl.exec_cmd("nm-applet")
-- Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a
-- pas → blueman afficherait une erreur « Connection to BlueZ failed »).
hl.exec_cmd('[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet')
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
-- Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite).
hl.exec_cmd("fws-hello --autostart")
-- Mise en route du matériel : ne s'ouvre que si elle n'a pas abouti à
-- l'installation (pilotes, son, Bluetooth, VR…).
hl.exec_cmd("fws-drivers --autostart")
end)
local mod = "SUPER"
-- --- Applications ---------------------------------------------------------
hl.bind(mod .. " + Return", hl.dsp.exec_cmd("kitty"), { description = "binds.open_terminal" })
hl.bind(mod .. " + SHIFT + Return", hl.dsp.exec_cmd("kitty --class floating-term"), { description = "binds.floating_terminal" })
hl.bind(mod .. " + R", hl.dsp.exec_cmd("wofi --show drun"), { description = "binds.app_menu" })
hl.bind(mod .. " + E", hl.dsp.exec_cmd("dolphin"), { description = "binds.file_manager" })
hl.bind(mod .. " + B", hl.dsp.exec_cmd("firefox"), { description = "binds.open_firefox" })
hl.bind(mod .. " + P", hl.dsp.exec_cmd("PacManager"), { description = "binds.package_manager" })
hl.bind(mod .. " + K", hl.dsp.exec_cmd("fws-keys"), { description = "binds.show_shortcuts" })
hl.bind(mod .. " + X", hl.dsp.exec_cmd("fws-powermenu"), { description = "binds.power_menu" })
-- --- Fenêtres ---------------------------------------------------------------
hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "binds.close_window" })
hl.bind(mod .. " + V", hl.dsp.window.float(), { description = "binds.toggle_floating" })
hl.bind(mod .. " + F", hl.dsp.window.fullscreen(), { description = "binds.fullscreen" })
hl.bind(mod .. " + J", hl.dsp.layout("togglesplit"), { description = "binds.toggle_split" })
hl.bind(mod .. " + L", hl.dsp.exec_cmd("hyprlock"), { description = "binds.lock_screen" })
hl.bind(mod .. " + SHIFT + E", hl.dsp.exit(), { description = "binds.exit_session" })
hl.bind(mod .. " + SHIFT + C", hl.dsp.reload_config(), { description = "binds.reload_config" })
-- --- Focus (flèches) ---------------------------------------------------------
hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }), { description = "binds.focus_left" })
hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }), { description = "binds.focus_right" })
hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }), { description = "binds.focus_up" })
hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" }), { description = "binds.focus_down" })
-- --- Déplacer la fenêtre (Maj + flèches) ---------------------------------------
hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }), { description = "binds.move_window_left" })
hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }), { description = "binds.move_window_right" })
hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }), { description = "binds.move_window_up" })
hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }), { description = "binds.move_window_down" })
-- --- Redimensionner (Ctrl + flèches, maintien possible) ------------------------
hl.bind(mod .. " + CTRL + left", hl.dsp.window.resize({ x = -30, y = 0, relative = true }), { repeating = true })
hl.bind(mod .. " + CTRL + right", hl.dsp.window.resize({ x = 30, y = 0, relative = true }), { repeating = true })
hl.bind(mod .. " + CTRL + up", hl.dsp.window.resize({ x = 0, y = -30, relative = true }), { repeating = true })
hl.bind(mod .. " + CTRL + down", hl.dsp.window.resize({ x = 0, y = 30, relative = true }), { repeating = true })
-- --- Espaces de travail 1-10 (0 = espace 10, comme i3) --------------------------
for i = 1, 10 do
local key = i % 10 -- 10 s'écrit 0, comme sur le pavé numérique
hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i }), { description = "binds.go_to_workspace" })
hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }), { description = "binds.send_window_to_workspace" })
end
-- --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) -------------
hl.bind(mod .. " + CTRL + 1", hl.dsp.window.move({ monitor = "l" }), { description = "binds.send_window_to_left_screen" })
hl.bind(mod .. " + CTRL + 2", hl.dsp.window.move({ monitor = "r" }), { description = "binds.send_window_to_right_screen" })
-- --- Molette = changer d'espace de travail --------------------------------------
hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { description = "binds.previous_workspace" })
hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { description = "binds.next_workspace" })
-- --- Scratchpad (espace spécial) -------------------------------------------------
hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("magic"), { description = "binds.show_scratchpad" })
hl.bind(mod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }), { description = "binds.send_window_to_scratchpad" })
-- --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) -------------------
hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy"), { description = "binds.screenshot_screen_to_clipboard" })
hl.bind(mod .. " + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy'), { description = "binds.screenshot_area_to_clipboard" })
hl.bind(mod .. " + SHIFT + Print", hl.dsp.exec_cmd('mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png'), { description = "binds.screenshot_area_to_pictures" })
-- --- Multimédia (touches XF86 : volume via PipeWire, lecture via playerctl) ------
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
-- --- Luminosité de l'écran (portables : touches Fn) ------------------------------
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set +5%"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true })
-- --- Souris : déplacer / redimensionner les fenêtres -----------------------------
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- --- Règles de fenêtres (comme i3) ------------------------------------------------
hl.window_rule({ name = "fws-floating-term-float", match = { class = "^(floating-term)$" }, float = true })
hl.window_rule({ name = "fws-floating-term-size", match = { class = "^(floating-term)$" }, size = "900 550" })
hl.window_rule({ name = "fws-pavucontrol", match = { class = "^([Pp]avucontrol|org.pulseaudio.pavucontrol)$" }, float = true })
hl.window_rule({ name = "fws-blueman", match = { class = "^.?[Bb]lueman-manager.*$" }, float = true })
hl.window_rule({ name = "fws-hello", match = { class = "^[Ff]ws-hello$" }, float = true })
hl.window_rule({ name = "fws-drivers", match = { class = "^[Ff]ws-drivers$" }, float = true })
hl.window_rule({ name = "fws-about", match = { class = "^[Ff]ws-about$" }, float = true })
hl.window_rule({ name = "fws-bugreport", match = { class = "^[Ff]ws-bugreport$" }, float = true })
hl.window_rule({ name = "fws-picture-in-picture", match = { title = "^(Picture-in-Picture)$" }, float = true })
@@ -1,7 +1,7 @@
# FWS — configuration i3 par défaut (session X11, COMPATIBLE VR). # FWS — configuration i3 par défaut (session X11, COMPATIBLE VR).
# SteamVR fonctionne en X11 : c'est le bureau à choisir pour un casque VR # SteamVR fonctionne en X11 : c'est le bureau à choisir pour un casque VR
# (HTC Vive, Valve Index…). « Pilotes et matériel » (menu d'applications) # (HTC Vive, Valve Index…). Lance « fws-vr-setup » (Super+Shift+V, ou menu)
# installe la base VR (groupe « Réalité virtuelle ») et Steam (groupe « Jeux »). # pour installer les drivers/runtimes selon ton casque.
# Le clavier X11 est configuré système via /etc/X11/xorg.conf.d/00-keyboard.conf # Le clavier X11 est configuré système via /etc/X11/xorg.conf.d/00-keyboard.conf
# (écrit par l'installateur selon ton choix Anaconda) : rien à régler ici. # (écrit par l'installateur selon ton choix Anaconda) : rien à régler ici.
@@ -40,6 +40,7 @@ bindsym $mod+r exec $menu
bindsym $mod+e exec $filemanager bindsym $mod+e exec $filemanager
bindsym $mod+b exec $browser bindsym $mod+b exec $browser
# VR : installation des drivers/runtimes casque (HTC Vive, Index, Quest…) # VR : installation des drivers/runtimes casque (HTC Vive, Index, Quest…)
bindsym $mod+Shift+v exec kitty -e fws-vr-setup
# Gestionnaire de paquets graphique (rechercher/installer/mettre à jour) # Gestionnaire de paquets graphique (rechercher/installer/mettre à jour)
bindsym $mod+p exec PacManager bindsym $mod+p exec PacManager
# Panneau des raccourcis clavier (aussi via le bouton ⌌ de la barre) # Panneau des raccourcis clavier (aussi via le bouton ⌌ de la barre)
@@ -56,7 +57,7 @@ bindsym $mod+f fullscreen toggle
bindsym $mod+j split toggle bindsym $mod+j split toggle
bindsym $mod+l exec i3lock -c 1e1e2e bindsym $mod+l exec i3lock -c 1e1e2e
# Quitter i3 → retour à SDDM # Quitter i3 → retour à SDDM
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m '{{t:bar.i3_exit_question}}' -B '{{t:bar.i3_exit_button}}' 'i3-msg exit'" bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Quitter i3 et revenir à SDDM ?' -B 'Oui, quitter' 'i3-msg exit'"
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# Focus (flèches) # Focus (flèches)
@@ -92,7 +92,7 @@ format-padding = 2
[module/keyhelp] [module/keyhelp]
type = custom/script type = custom/script
exec = echo "󰌌 {{t:bar.shortcuts}}" exec = echo "󰌌 Raccourcis"
interval = 3600 interval = 3600
click-left = fws-keys click-left = fws-keys
format-background = ${colors.blue} format-background = ${colors.blue}
@@ -118,7 +118,7 @@ label-volume = 󰕾 %percentage%%
format-volume-background = ${colors.surface0} format-volume-background = ${colors.surface0}
format-volume-foreground = ${colors.blue} format-volume-foreground = ${colors.blue}
format-volume-padding = 2 format-volume-padding = 2
label-muted = 󰝟 {{t:bar.muted}} label-muted = 󰝟 muet
format-muted-background = ${colors.surface0} format-muted-background = ${colors.surface0}
format-muted-foreground = ${colors.subtext} format-muted-foreground = ${colors.subtext}
format-muted-padding = 2 format-muted-padding = 2
@@ -133,7 +133,7 @@ format-connected-background = ${colors.surface0}
format-connected-foreground = ${colors.teal} format-connected-foreground = ${colors.teal}
format-connected-padding = 2 format-connected-padding = 2
format-disconnected = <label-disconnected> format-disconnected = <label-disconnected>
label-disconnected = 󰤭 {{t:bar.offline}} label-disconnected = 󰤭 hors ligne
format-disconnected-background = ${colors.surface0} format-disconnected-background = ${colors.surface0}
format-disconnected-foreground = ${colors.red} format-disconnected-foreground = ${colors.red}
format-disconnected-padding = 2 format-disconnected-padding = 2
@@ -12,14 +12,14 @@
"custom/power": { "custom/power": {
"format": "󰐥", "format": "󰐥",
"tooltip-format": "{{t:bar.power_menu}} (SUPER+X)", "tooltip-format": "Alimentation (SUPER+X)",
"on-click": "fws-powermenu" "on-click": "fws-powermenu"
}, },
"custom/updates": { "custom/updates": {
"exec": "fws-updates-check", "exec": "fws-updates-check",
"interval": 1800, "interval": 1800,
"tooltip-format": "{{t:bar.updates_tooltip}}", "tooltip-format": "Mises à jour disponibles — clic pour installer",
"on-click": "kitty -e fws-update" "on-click": "kitty -e fws-update"
}, },
@@ -44,8 +44,8 @@
} }
}, },
"custom/keyhelp": { "custom/keyhelp": {
"format": "󰌌 {{t:bar.shortcuts}}", "format": "󰌌 Raccourcis",
"tooltip-format": "{{t:bar.keyboard_shortcuts}} (SUPER+K)", "tooltip-format": "Raccourcis clavier (SUPER+K)",
"on-click": "fws-keys" "on-click": "fws-keys"
}, },
"backlight": { "backlight": {
@@ -53,17 +53,17 @@
"format-icons": ["󰃞", "󰃟", "󰃠"], "format-icons": ["󰃞", "󰃟", "󰃠"],
"on-scroll-up": "brightnessctl set +5%", "on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-", "on-scroll-down": "brightnessctl set 5%-",
"tooltip-format": "{{t:bar.brightness}} {percent}% ({{t:bar.scroll_to_adjust}})" "tooltip-format": "Luminosité {percent}% (molette pour régler)"
}, },
"pulseaudio": { "pulseaudio": {
"format": "{icon} {volume}%", "format": "{icon} {volume}%",
"format-muted": "󰝟 {{t:bar.muted}}", "format-muted": "󰝟 muet",
"format-icons": { "default": ["󰕿", "󰖀", "󰕾"] }, "format-icons": { "default": ["󰕿", "󰖀", "󰕾"] },
"on-click": "pavucontrol", "on-click": "pavucontrol",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+", "on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+",
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-", "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-",
"tooltip-format": "{desc} — {{t:bar.volume_tooltip}}" "tooltip-format": "{desc} — clic : mixeur, clic droit : muet"
}, },
"bluetooth": { "bluetooth": {
"format": "󰂯", "format": "󰂯",
@@ -77,7 +77,7 @@
"network": { "network": {
"format-wifi": "󰤨 {essid}", "format-wifi": "󰤨 {essid}",
"format-ethernet": "󰈀 {ipaddr}", "format-ethernet": "󰈀 {ipaddr}",
"format-disconnected": "󰤭 {{t:bar.offline}}", "format-disconnected": "󰤭 hors ligne",
"tooltip-format": "{ifname} — {ipaddr}\n⇡ {bandwidthUpBytes} ⇣ {bandwidthDownBytes}" "tooltip-format": "{ifname} — {ipaddr}\n⇡ {bandwidthUpBytes} ⇣ {bandwidthDownBytes}"
}, },
"cpu": { "cpu": {
@@ -87,7 +87,7 @@
"memory": { "memory": {
"format": " {percentage}%", "format": " {percentage}%",
"interval": 3, "interval": 3,
"tooltip-format": "{used:0.1f} / {total:0.1f} {{t:bar.gib_unit}}" "tooltip-format": "{used:0.1f} / {total:0.1f} Gio"
}, },
"battery": { "battery": {
"states": { "warning": 25, "critical": 10 }, "states": { "warning": 25, "critical": 10 },
@@ -137,7 +137,7 @@ bootloader --disabled
# pacman, choix de bureau écrit par l'addon de sélection). # pacman, choix de bureau écrit par l'addon de sélection).
# ============================================================================ # ============================================================================
%post --nochroot --log=/tmp/fws-post-nochroot.log %post --nochroot --log=/tmp/fws-post-nochroot.log
# FWS-TITLE: fws:progress.title_prepare # FWS-TITLE: Préparation de l'installation (live)
# Écran de progression : chaque phase publie son avancement (fws-install-step), # É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. # l'installeur affiche le script en cours, ce qu'il fait et un pourcentage.
set -x set -x
@@ -247,7 +247,7 @@ if [ -f /tmp/fws-keep-wifi ]; then
"$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true "$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true
fi fi
fws-install-step 6 fws:progress.base_ready fws-install-step 6 "Système de base préparé — configuration"
%end %end
@@ -257,9 +257,9 @@ fws-install-step 6 fws:progress.base_ready
# Log persistant : /var/log/fws-post.log sur le système installé. # Log persistant : /var/log/fws-post.log sur le système installé.
# ============================================================================ # ============================================================================
%post --log=/var/log/fws-post.log %post --log=/var/log/fws-post.log
# FWS-TITLE: fws:progress.title_configure # FWS-TITLE: Configuration du système installé
set -x set -x
fws-install-step 8 fws:progress.live_cleanup fws-install-step 8 "Nettoyage des résidus du live"
# --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ---- # --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ----
# Le live fournit /etc/mkinitcpio.d/linux.preset = preset « archiso » (pointe # 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/sockets.target.wants/pcscd.socket \
/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true /etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true
fws-install-step 14 fws:progress.initramfs fws-install-step 14 "Construction de l'initramfs"
# --- 2) mkinitcpio : noyau (rattrapage) + génération finale ----------------- # --- 2) mkinitcpio : noyau (rattrapage) + génération finale -----------------
# mkinitcpio exige un noyau lisible : s'il manque (rattrapage de copie raté # 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." echo "[FWS] CRITIQUE : toujours aucun noyau — initramfs NON généré, le disque NE BOOTERA PAS."
fi fi
fws-install-step 22 fws:progress.grub fws-install-step 22 "Installation de GRUB"
# --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------ # --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------
install_grub() { install_grub() {
@@ -502,7 +502,7 @@ fi
# d'activation n'est créé qu'ici, dans le système installé). # d'activation n'est créé qu'ici, dans le système installé).
systemctl enable fws-grub-finalize.service || true systemctl enable fws-grub-finalize.service || true
fws-install-step 28 fws:progress.keyboard_language fws-install-step 28 "Clavier et langue du système"
# --- 3bis) Clavier (X11) + LOCALE -------------------------------------------- # --- 3bis) Clavier (X11) + LOCALE --------------------------------------------
# CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X # CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X
@@ -512,75 +512,26 @@ fws-install-step 28 fws:progress.keyboard_language
# kb_layout). LOCALE : le locale choisi (ex. fr_CH.UTF-8) doit être GÉNÉRÉ — # kb_layout). LOCALE : le locale choisi (ex. fr_CH.UTF-8) doit être GÉNÉRÉ —
# Anaconda vient de Fedora (locales pré-générées) et ne lance pas locale-gen → # Anaconda vient de Fedora (locales pré-générées) et ne lance pas locale-gen →
# sans ça LANG casse et tout retombe en C. # sans ça LANG casse et tout retombe en C.
# Every layout Anaconda chose, and its switch shortcut, not only the first one: XL=""; XV=""
# a language whose own layout cannot type Latin letters (ru, bg, el, uk…) gets XKB="$(sed -n "s/.*--xlayouts=//p" /root/anaconda-ks.cfg 2>/dev/null | head -1)"
# "us" first (user names and passwords are typed in Latin letters) and its own XKB="${XKB#[\'\"]}"; XKB="${XKB%%[\'\"]*}"; XKB="${XKB%%,*}" # 1re dispo, ex. « ch (fr) »
# layout second. Keeping only the first one left those users without their if [ -z "$XKB" ]; then
# keyboard on the installed system. XL/XV/XO: comma-separated, as XKB wants. _loc="$(. /etc/locale.conf 2>/dev/null; printf '%s' "${LANG%%.*}")" # fr_CH
XL=""; XV=""; XO="" _lng="${_loc%%_*}"; _terr="${_loc#*_}"; [ "$_terr" = "$_loc" ] && _terr=""
eval "$(python3 - 2>/dev/null <<'KBPY' [ -n "$_terr" ] && XKB="$(python3 -c "import langtable; k=langtable.list_keyboards(languageId='$_lng', territoryId='$_terr'); print(k[0] if k else '')" 2>/dev/null)"
import re, shlex fi
layouts, options = [], [] if [ -n "$XKB" ]; then
try: XL="${XKB%%(*}"; XL="${XL%% *}" # ch
with open("/root/anaconda-ks.cfg", encoding="utf-8") as fh: case "$XKB" in *'('*')') XV="${XKB#*(}"; XV="${XV%)}" ;; *) XV="" ;; esac # fr
for line in fh:
if line.startswith("keyboard"):
for token in shlex.split(line)[1:]:
name, _, value = token.partition("=")
items = [item.strip() for item in value.split(",") if item.strip()]
if name == "--xlayouts":
layouts = items
elif name == "--switch":
options = items
break
except OSError:
pass
if not layouts:
# No layout in the generated kickstart: the same rule as Anaconda, from
# the installed locale (fr_CH -> ch(fr); ru_RU -> us + ru).
import langtable
locale = ""
try:
with open("/etc/locale.conf", encoding="utf-8") as fh:
for line in fh:
if line.startswith("LANG="):
locale = line.split("=", 1)[1].strip().strip("\"'").split(".")[0]
except OSError:
pass
language, _, territory = locale.partition("_")
if language and territory:
keyboards = langtable.list_keyboards(languageId=language, territoryId=territory)
if keyboards:
layouts = [keyboards[0]]
if not langtable.supports_ascii(keyboards[0].replace(" ", "")):
layouts.insert(0, "us")
pairs = []
for item in layouts:
match = re.match(r"^([\w/-]+)\s*(?:\(\s*([^)]*?)\s*\))?$", item)
if match:
pairs.append((match.group(1), match.group(2) or ""))
if len(pairs) > 1 and not options:
options = ["grp:alt_shift_toggle"]
print("XL=" + shlex.quote(",".join(layout for layout, _ in pairs)))
print("XV=" + shlex.quote(",".join(variant for _, variant in pairs)))
print("XO=" + shlex.quote(",".join(options)))
KBPY
)"
# Two layouts without variants give XV="," — XKB then has no usable variant
# list, so "no variant" stays empty.
[ -n "${XV//,/}" ] || XV=""
if [ -n "$XL" ]; then
install -d /etc/X11/xorg.conf.d install -d /etc/X11/xorg.conf.d
{ cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<KBEOF
printf 'Section "InputClass"\n' Section "InputClass"
printf ' Identifier "system-keyboard"\n' Identifier "system-keyboard"
printf ' MatchIsKeyboard "on"\n' MatchIsKeyboard "on"
printf ' Option "XkbLayout" "%s"\n' "$XL" Option "XkbLayout" "$XL"
printf ' Option "XkbVariant" "%s"\n' "$XV" Option "XkbVariant" "$XV"
[ -n "$XO" ] && printf ' Option "XkbOptions" "%s"\n' "$XO" EndSection
printf 'EndSection\n' KBEOF
} > /etc/X11/xorg.conf.d/00-keyboard.conf
echo "[FWS] clavier : $XL ($XV) ${XO:+— bascule $XO}"
fi fi
FWSLANG="$(. /etc/locale.conf 2>/dev/null; printf '%s' "${LANG:-}")" FWSLANG="$(. /etc/locale.conf 2>/dev/null; printf '%s' "${LANG:-}")"
@@ -588,13 +539,10 @@ if [ -n "$FWSLANG" ]; then
_cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8" _cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8"
grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \ grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \
|| printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen || printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen
locale-gen || echo "[FWS] locale-gen a échoué pour $FWSLANG"
fi 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 fws:progress.desktop_install fws-install-step 32 "Installation du bureau (pacman)"
# --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) ------- # --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) -------
DESK="cli" DESK="cli"
@@ -622,7 +570,7 @@ case "$DESK" in
# i3 : session X11 → COMPATIBLE VR (SteamVR ne marche pas sous Wayland). # i3 : session X11 → COMPATIBLE VR (SteamVR ne marche pas sous Wayland).
# xorg-server est requis (SDDM ne le tire pas) ; maim+xclip = captures X11, # xorg-server est requis (SDDM ne le tire pas) ; maim+xclip = captures X11,
# dunst = notifications X11 (équivalent de mako), i3lock = verrouillage. # dunst = notifications X11 (équivalent de mako), i3lock = verrouillage.
# « Pilotes et matériel » installe la base VR et Steam à la demande. # fws-vr-setup (Super+Shift+V ou menu) installe les drivers du casque.
i3) PKGS="i3-wm i3lock xorg-server polybar picom feh rofi kitty dolphin kio-extras udisks2 sddm noto-fonts ttf-nerd-fonts-symbols maim xclip dunst libnotify polkit-gnome network-manager-applet playerctl brightnessctl pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol bluez bluez-utils blueman"; DM="sddm" ;; i3) PKGS="i3-wm i3lock xorg-server polybar picom feh rofi kitty dolphin kio-extras udisks2 sddm noto-fonts ttf-nerd-fonts-symbols maim xclip dunst libnotify polkit-gnome network-manager-applet playerctl brightnessctl pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol bluez bluez-utils blueman"; DM="sddm" ;;
cli|*) PKGS="" ;; cli|*) PKGS="" ;;
esac esac
@@ -860,7 +808,7 @@ MOTD
fi fi
fi fi
fws-install-step 62 fws:progress.desktop_installed fws-install-step 62 "Bureau installé — pilotes et pile matérielle"
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------ # --- 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 # Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci
@@ -876,38 +824,21 @@ if [ -x /usr/local/bin/fws-setup-hardware ]; then
/usr/local/bin/fws-setup-hardware --unattended "$DESK" || true /usr/local/bin/fws-setup-hardware --unattended "$DESK" || true
fi fi
fws-install-step 76 fws:progress.desktop_config fws-install-step 76 "Configuration du bureau (raccourcis, barres, thème)"
# Bar labels ({{t:key}} markers) in the installed system's language: waybar,
# polybar and i3 cannot look texts up themselves, so they are written in once.
for _f in waybar-config.json polybar-config.ini i3-config; do
_src="/usr/local/share/fws/$_f"
[ -f "$_src" ] || continue
if LANG="${FWSLANG:-en_US.UTF-8}" /usr/local/bin/fws-i18n --catalog system \
--render "$_src" > "$_src.fws" && [ -s "$_src.fws" ]; then
mv -f "$_src.fws" "$_src"
else
rm -f "$_src.fws"
echo "[FWS] traduction de $_f impossible — libellés laissés en clés"
fi
done
# --- Config Hyprland (si choisi) : clavier + apps + waybar ------------------- # --- Config Hyprland (si choisi) : clavier + apps + waybar -------------------
# Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa # Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa
# disposition est dans SA config (input { kb_layout }). Sans config il démarre nu # disposition est dans SA config (input { kb_layout }). Sans config il démarre nu
# (QWERTY US, aucune touche utile). On déploie la config FWS (template Lua + # (QWERTY US, aucune touche utile). On déploie une config FWS (template +
# clavier XL/XV injecté) dans /etc/skel ET le home de chaque utilisateur déjà # clavier XL/XV injecté) dans /etc/skel ET le home de chaque utilisateur déjà
# créé par Anaconda (le %post tourne APRÈS la création de l'utilisateur). # créé par Anaconda (le %post tourne APRÈS la création de l'utilisateur).
if [ "$DESK" = "hyprland" ]; then if [ "$DESK" = "hyprland" ] && [ -f /usr/local/share/fws/hyprland.conf.tmpl ]; then
# Hyprland ≥ 0.57 ne lit plus hyprland.conf (syntaxe hyprlang supprimée) : sed -e "s/__KB_LAYOUT__/${XL:-us}/" -e "s/__KB_VARIANT__/${XV}/" \
# seul hyprland.lua est chargé. Le template est rendu avec le clavier /usr/local/share/fws/hyprland.conf.tmpl > /tmp/fws-hyprland.conf
# XL/XV/XO du choix Anaconda, puis posé dans le skel et chaque home. install -Dm644 /tmp/fws-hyprland.conf /etc/skel/.config/hypr/hyprland.conf
sed -e "s/__KB_LAYOUT__/${XL:-us}/" -e "s/__KB_VARIANT__/${XV}/" -e "s/__KB_OPTIONS__/${XO}/" \
/usr/local/share/fws/hyprland.lua.tmpl > /tmp/fws-hyprland.lua
install -Dm644 /tmp/fws-hyprland.lua /etc/skel/.config/hypr/hyprland.lua
# Waybar FWS : barre assortie + bouton « ⌨ Raccourcis » (fws-keys, # Waybar FWS : barre assortie + bouton « ⌨ Raccourcis » (fws-keys,
# aussi sur SUPER+K) qui liste les binds RÉELS chargés par Hyprland # aussi sur SUPER+K) qui liste les binds RÉELS chargés par Hyprland
# (hyprctl binds -j) — les descriptions viennent des hl.bind de la config. # (hyprctl binds -j) — les descriptions viennent des bindd de la config.
install -Dm644 /usr/local/share/fws/waybar-config.json /etc/skel/.config/waybar/config install -Dm644 /usr/local/share/fws/waybar-config.json /etc/skel/.config/waybar/config
install -Dm644 /usr/local/share/fws/waybar-style.css /etc/skel/.config/waybar/style.css install -Dm644 /usr/local/share/fws/waybar-style.css /etc/skel/.config/waybar/style.css
# wofi : style du menu d'applications (Super+R) — le panneau « Raccourcis » # wofi : style du menu d'applications (Super+R) — le panneau « Raccourcis »
@@ -916,7 +847,7 @@ if [ "$DESK" = "hyprland" ]; then
install -Dm644 /usr/local/share/fws/wofi-style.css /etc/skel/.config/wofi/style.css install -Dm644 /usr/local/share/fws/wofi-style.css /etc/skel/.config/wofi/style.css
while IFS=: read -r _u _x _uid _g _gec _home _sh; do while IFS=: read -r _u _x _uid _g _gec _home _sh; do
[ "$_uid" -ge 1000 ] && [ "$_uid" -le 60000 ] && [ -d "$_home" ] || continue [ "$_uid" -ge 1000 ] && [ "$_uid" -le 60000 ] && [ -d "$_home" ] || continue
install -Dm644 /tmp/fws-hyprland.lua "$_home/.config/hypr/hyprland.lua" install -Dm644 /tmp/fws-hyprland.conf "$_home/.config/hypr/hyprland.conf"
install -Dm644 /usr/local/share/fws/waybar-config.json "$_home/.config/waybar/config" install -Dm644 /usr/local/share/fws/waybar-config.json "$_home/.config/waybar/config"
install -Dm644 /usr/local/share/fws/waybar-style.css "$_home/.config/waybar/style.css" install -Dm644 /usr/local/share/fws/waybar-style.css "$_home/.config/waybar/style.css"
install -Dm644 /usr/local/share/fws/wofi-config "$_home/.config/wofi/config" install -Dm644 /usr/local/share/fws/wofi-config "$_home/.config/wofi/config"
@@ -925,7 +856,7 @@ if [ "$DESK" = "hyprland" ]; then
chown -R "$_u": "$_home/.config/hypr" "$_home/.config/waybar" \ chown -R "$_u": "$_home/.config/hypr" "$_home/.config/waybar" \
"$_home/.config/wofi" 2>/dev/null || true "$_home/.config/wofi" 2>/dev/null || true
done < /etc/passwd done < /etc/passwd
rm -f /tmp/fws-hyprland.lua rm -f /tmp/fws-hyprland.conf
fi fi
# --- Config i3 (si choisi) : raccourcis FWS + barre + autostart ------------- # --- Config i3 (si choisi) : raccourcis FWS + barre + autostart -------------
@@ -951,7 +882,7 @@ if [ "$DESK" = "i3" ] && [ -f /usr/local/share/fws/i3-config ]; then
done < /etc/passwd done < /etc/passwd
fi fi
fws-install-step 84 fws:progress.admin_identity fws-install-step 84 "Droits administrateur et identité FWS"
# --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer ----------------- # --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer -----------------
# Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut # Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut
@@ -1025,7 +956,7 @@ systemctl enable systemd-timesyncd.service 2>/dev/null || true
# normal), la target le tire par Requires. Dans le bureau, le lanceur # 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. # « Récupération FWS » (fws-recovery.desktop, polkit) fait le même travail.
fws-install-step 92 fws:progress.security_network fws-install-step 92 "Sécurité et réseau du système installé"
# --- 5) Sécurité : verrouiller root s'il est resté SANS mot de passe ---------- # --- 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 # L'airootfs live a souvent un root sans mot de passe ; si l'utilisateur n'en a
@@ -1050,7 +981,7 @@ systemctl enable systemd-resolved.service 2>/dev/null || true
install -d /etc/NetworkManager/conf.d install -d /etc/NetworkManager/conf.d
printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf
fws-install-step 99 fws:progress.finalizing fws-install-step 99 "Finalisation"
%end %end
@@ -1063,9 +994,9 @@ fws-install-step 99 fws:progress.finalizing
# le disque va booter. # le disque va booter.
# ============================================================================ # ============================================================================
%post --nochroot %post --nochroot
# FWS-TITLE: fws:progress.title_finish # FWS-TITLE: Finalisation et copie des journaux
SYSROOT=/mnt/sysroot SYSROOT=/mnt/sysroot
[ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage [ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage
cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true
fws-install-step 100 fws:progress.done fws-install-step 100 "Installation terminée"
%end %end
@@ -1,10 +1,10 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
X-FWS-Translation=apps.about Name=À propos de FWS
Name=About FWS Name[en]=About FWS
Comment=Information about the FWS project and this system Comment=Informations sur le projet FWS et sur le système
Exec=fws-about Exec=fws-about
Icon=help-about Icon=help-about
Terminal=false Terminal=false
Categories=System; Categories=System;
Keywords=about;system;project;info;FWS; Keywords=about;système;projet;info;FWS;
@@ -2,10 +2,12 @@
# FWS — « Signaler un problème » : envoi OPTIONNEL et validé par l'utilisateur # FWS — « Signaler un problème » : envoi OPTIONNEL et validé par l'utilisateur
# de logs/diagnostics à l'équipe FWS (via l'API bugs). Aucun envoi automatique. # de logs/diagnostics à l'équipe FWS (via l'API bugs). Aucun envoi automatique.
Type=Application Type=Application
X-FWS-Translation=apps.bugreport Name=Signaler un problème
Name=Report a problem Name[en]=Report a problem
GenericName=Send diagnostic logs to the FWS team GenericName=Envoyer des logs de diagnostic à l'équipe FWS
Comment=Send logs to the OS creator when something goes wrong (optional, user-validated) GenericName[en]=Send diagnostic logs to the FWS team
Comment=Envoyer des logs au créateur de l'OS en cas de problème (optionnel, validé par l'utilisateur)
Comment[en]=Send logs to the OS creator when something goes wrong (optional, user-validated)
Exec=fws-bugreport Exec=fws-bugreport
Icon=fws-bugreport Icon=fws-bugreport
# Associe la fenêtre (WM_CLASS via GLib.set_prgname) à ce lanceur → bonne # Associe la fenêtre (WM_CLASS via GLib.set_prgname) à ce lanceur → bonne
@@ -13,4 +15,5 @@ Icon=fws-bugreport
StartupWMClass=fws-bugreport StartupWMClass=fws-bugreport
Terminal=false Terminal=false
Categories=System; Categories=System;
Keywords=bug;report;log;diagnostic;telemetry;problem;issue; Keywords=bug;rapport;log;diagnostic;télémétrie;problème;signaler;
Keywords[en]=bug;report;log;diagnostic;telemetry;problem;issue;
@@ -1,10 +1,11 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
X-FWS-Translation=apps.drivers Name=Pilotes et matériel (FWS)
Name=Drivers & Hardware (FWS) Name[en]=Drivers & Hardware (FWS)
Comment=Install graphics drivers, audio, Bluetooth, gaming and printing Comment=Installer les pilotes graphiques, le son, le Bluetooth, les jeux, l'impression
Comment[en]=Install graphics drivers, audio, Bluetooth, gaming and printing
Exec=fws-drivers Exec=fws-drivers
Icon=preferences-desktop-display Icon=preferences-desktop-display
Terminal=false Terminal=false
Categories=Settings;HardwareSettings; Categories=Settings;HardwareSettings;
Keywords=driver;drivers;nvidia;amd;intel;gpu;audio;sound;bluetooth;brightness;printer;games; Keywords=pilote;pilotes;driver;nvidia;amd;intel;gpu;son;audio;bluetooth;luminosité;imprimante;jeux;
@@ -17,10 +17,10 @@
<policyconfig> <policyconfig>
<vendor>FWS</vendor> <vendor>FWS</vendor>
<action id="org.fws.hardware"> <action id="org.fws.hardware">
<!-- fws-i18n: polkit.hardware --> <description>Installer les pilotes et configurer le matériel</description>
<!-- The translations are added at build time from system-translations.toml. --> <description xml:lang="en">Install drivers and set up hardware</description>
<description>Install drivers and set up hardware</description> <message>Authentification requise pour installer les pilotes</message>
<message>Authentication is required to install drivers</message> <message xml:lang="en">Authentication is required to install drivers</message>
<icon_name>preferences-desktop-display</icon_name> <icon_name>preferences-desktop-display</icon_name>
<defaults> <defaults>
<allow_any>auth_admin_keep</allow_any> <allow_any>auth_admin_keep</allow_any>
@@ -8,9 +8,6 @@
// surchargé par theme.conf.user écrit par le %post : accent selon le DE). // surchargé par theme.conf.user écrit par le %post : accent selon le DE).
import QtQuick import QtQuick
import QtQuick.Controls.Basic import QtQuick.Controls.Basic
// Texts by language, written at build time from system-translations.toml
// (sddm.* keys) by /usr/local/lib/fws/translate-static-files.py.
import "translations.js" as Translations
Rectangle { Rectangle {
id: root id: root
@@ -20,46 +17,6 @@ Rectangle {
readonly property color accent: config.accent || "#3daee9" readonly property color accent: config.accent || "#3daee9"
readonly property color fieldBg: "#2a2a44" readonly property color fieldBg: "#2a2a44"
// The greeter's locale comes from the system's (/etc/locale.conf).
readonly property var languages: languageCandidates()
function languageCandidates() {
const names = Qt.locale().uiLanguages.concat([Qt.locale().name])
const out = []
for (let i = 0; i < names.length; i++) {
const parts = names[i].replace(/-/g, "_").split("_")
const language = parts[0]
let territory = "", modifier = ""
for (let j = 1; j < parts.length; j++) {
// A four-letter part is a script: only Latin Serbian has its
// own catalog entry (sr@latin, Cyrillic being plain sr).
if (parts[j].length === 4)
modifier = parts[j] === "Latn" ? "@latin" : ""
else
territory = parts[j]
}
if (territory)
out.push(language + "_" + territory + modifier)
out.push(language + modifier)
if (modifier) {
if (territory)
out.push(language + "_" + territory)
out.push(language)
}
}
out.push("en")
return out
}
function t(key) {
const texts = Translations.messages[key]
if (texts)
for (let i = 0; i < languages.length; i++)
if (texts[languages[i]])
return texts[languages[i]]
return key
}
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: config.colorTop || "#1a1a2e" } GradientStop { position: 0.0; color: config.colorTop || "#1a1a2e" }
GradientStop { position: 1.0; color: config.colorBottom || "#16213e" } GradientStop { position: 1.0; color: config.colorBottom || "#16213e" }
@@ -68,7 +25,7 @@ Rectangle {
Connections { Connections {
target: sddm target: sddm
function onLoginFailed() { function onLoginFailed() {
errorLabel.text = t("sddm.login_failed") errorLabel.text = "Échec de la connexion — vérifiez le mot de passe"
passwordField.text = "" passwordField.text = ""
passwordField.forceActiveFocus() passwordField.forceActiveFocus()
} }
@@ -88,12 +45,9 @@ Rectangle {
running: true running: true
repeat: true repeat: true
onTriggered: { onTriggered: {
const now = new Date() var now = new Date()
clockLabel.text = now.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) clockLabel.text = Qt.formatTime(now, "hh:mm")
// Only the first letter is raised: capitalizing every word gives dateLabel.text = Qt.formatDate(now, "dddd d MMMM yyyy")
// "26 Ноября" or "26 Novembre", where months are lowercase.
const date = now.toLocaleDateString(Qt.locale(), Locale.LongFormat)
dateLabel.text = date.charAt(0).toLocaleUpperCase() + date.slice(1)
} }
Component.onCompleted: triggered() Component.onCompleted: triggered()
} }
@@ -116,6 +70,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: "#a0a0b8" color: "#a0a0b8"
font.pixelSize: 20 font.pixelSize: 20
font.capitalization: Font.Capitalize
} }
} }
@@ -139,7 +94,7 @@ Rectangle {
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: config.greeting || t("sddm.greeting") text: config.greeting || "Bienvenue sur FWS"
color: "#f0f0f5" color: "#f0f0f5"
font.pixelSize: 22 font.pixelSize: 22
font.weight: Font.Medium font.weight: Font.Medium
@@ -152,7 +107,7 @@ Rectangle {
id: userField id: userField
width: parent.width width: parent.width
text: userModel.lastUser text: userModel.lastUser
placeholderText: t("sddm.username") placeholderText: "Utilisateur"
placeholderTextColor: "#7d7d95" placeholderTextColor: "#7d7d95"
color: "#f0f0f5" color: "#f0f0f5"
font.pixelSize: 15 font.pixelSize: 15
@@ -169,7 +124,7 @@ Rectangle {
TextField { TextField {
id: passwordField id: passwordField
width: parent.width width: parent.width
placeholderText: t("sddm.password") placeholderText: "Mot de passe"
placeholderTextColor: "#7d7d95" placeholderTextColor: "#7d7d95"
color: "#f0f0f5" color: "#f0f0f5"
font.pixelSize: 15 font.pixelSize: 15
@@ -188,7 +143,7 @@ Rectangle {
Text { Text {
visible: keyboard.capsLock visible: keyboard.capsLock
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: "⚠ " + t("sddm.caps_lock") text: "⚠ Verrouillage majuscules activé"
color: "#e6c07b" color: "#e6c07b"
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -208,7 +163,7 @@ Rectangle {
height: 44 height: 44
onClicked: doLogin() onClicked: doLogin()
contentItem: Text { contentItem: Text {
text: t("sddm.login_button") text: "Se connecter"
color: "#ffffff" color: "#ffffff"
font.pixelSize: 16 font.pixelSize: 16
font.weight: Font.Medium font.weight: Font.Medium
@@ -278,8 +233,8 @@ Rectangle {
anchors.margins: 24 anchors.margins: 24
spacing: 10 spacing: 10
PowerButton { label: t("sddm.reboot"); onClicked: sddm.reboot() } PowerButton { label: "Redémarrer"; onClicked: sddm.reboot() }
PowerButton { label: t("sddm.power_off"); onClicked: sddm.powerOff() } PowerButton { label: "Éteindre"; onClicked: sddm.powerOff() }
} }
// Nom de la machine, discret, en bas à gauche. // Nom de la machine, discret, en bas à gauche.
@@ -1,8 +1,7 @@
# Thème SDDM « fws » — valeurs par défaut, surchargées par theme.conf.user # Thème SDDM « fws » — valeurs par défaut, surchargées par theme.conf.user
# (écrit par le %post du kickstart : accent différent selon le bureau choisi). # (écrit par le %post du kickstart : accent différent selon le bureau choisi).
# "greeting" is not set here: the translated welcome text is used unless an
# administrator sets one in theme.conf.user.
[General] [General]
accent=#3daee9 accent=#3daee9
colorTop=#1a1a2e colorTop=#1a1a2e
colorBottom=#16213e colorBottom=#16213e
greeting=Bienvenue sur FWS
@@ -1,4 +0,0 @@
.pragma library
// Replaced at build time by /usr/local/lib/fws/translate-static-files.py with
// the sddm.* texts of system-translations.toml, every language included.
var messages = {};
+7 -1
View File
@@ -125,6 +125,12 @@ qemu-guest-agent
virtualbox-guest-utils-nox virtualbox-guest-utils-nox
open-vm-tools 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) --- # --- FWS (fws-local) ---
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un # Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier # répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
@@ -139,7 +145,7 @@ anaconda
# que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit. # que pyanaconda/core/util.py importe en dur. python-legacy-cgi le réintroduit.
python-legacy-cgi python-legacy-cgi
# Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par # Module 'crypt'/'crypt_r' (retiré de Python 3.13, PEP 594) requis par
# pyanaconda/core/users.py (hash des mots de passe). Fourni par [extra]. # pyanaconda/core/users.py (hash des mots de passe). Paquet maison (fws-local).
python-crypt_r python-crypt_r
# Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree # Namespace GI 'OSTree-1.0' : pyanaconda/rescue.py importe le payload rpm_ostree
# (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'. # (inconditionnellement, même si FWS utilise liveimg) → fourni par 'ostree'.
-15
View File
@@ -3,27 +3,12 @@ HoldPkg = pacman glibc
Architecture = auto Architecture = auto
ParallelDownloads = 5 ParallelDownloads = 5
CheckSpace 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
# Firmware of router and server chips, never found in a PC (~47 MiB): Qualcomm
# IPQ/QCN Wi-Fi SoCs, MediaTek Filogic access points (mt7996), NXP DPAA2,
# Chelsio and Broadcom NetXtreme II server cards, QLogic NetXen. build.sh adds
# the firmware versions the kernel never loads (scripts/firmware-noextract.py).
NoExtract = usr/lib/firmware/ath11k/IPQ* usr/lib/firmware/ath11k/QCN9074* usr/lib/firmware/ath12k/IPQ* usr/lib/firmware/ath12k/QCN9274* usr/lib/firmware/mediatek/mt7996/* usr/lib/firmware/dpaa2/* usr/lib/firmware/cxgb4/* usr/lib/firmware/bnx2x/* usr/lib/firmware/phanfw.bin*
# Bytecode for "python -O" only (~7 MiB): nothing runs Python that way, and
# the plain .pyc next to them stays.
NoExtract = usr/lib/python3*/__pycache__/*.opt-1.pyc usr/lib/python3*/__pycache__/*.opt-2.pyc
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional LocalFileSigLevel = Optional
RemoteFileSigLevel = Optional
[core] [core]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
[extra] [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: 9.1 KiB

After

Width:  |  Height:  |  Size: 14 KiB

+3 -5
View File
@@ -17,12 +17,11 @@ 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` | | OS | Arch Linux (rolling), kernel `7.x-archN` |
| Paquets requis | `base-devel`, `git`, `archiso`, `dos2unix` (`pacman -S --needed …`) | | Paquets requis | `base-devel`, `git`, `archiso`, `dos2unix` (`pacman -S --needed …`) |
| Droits | `sudo` (mkarchiso et pacstrap exigent root) | | Droits | `sudo` (mkarchiso et pacstrap exigent root) |
| Réseau | requis (pacstrap télécharge les paquets, dont ceux du dépôt `[fws]` ; `setup-aur.sh` clone/compile l'AUR) | | Réseau | requis (pacstrap télécharge les paquets ; `setup-aur.sh` clone/compile l'AUR) |
```bash ```bash
sudo ./build.sh # mkarchiso → out/FWS-<date>-x86_64.iso (paquets FWS depuis [fws]) sudo ./setup-aur.sh # paquets AUR/anaconda → local-repo/
# Seulement pour (re)construire les paquets AUR, à publier ensuite sur [fws] : sudo ./build.sh # mkarchiso → out/FWS-<date>-x86_64.iso
sudo ./setup-aur.sh # paquets AUR → local-repo/
``` ```
Depuis septembre 2026, le build tourne aussi **depuis Fedora via la bascule Depuis septembre 2026, le build tourne aussi **depuis Fedora via la bascule
@@ -299,7 +298,6 @@ 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é | | `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 | | 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 | | `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é > Panne déjà observée : deux miroirs et l'AUR en **timeout TCP** simultané
+48
View File
@@ -0,0 +1,48 @@
# 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
@@ -0,0 +1,249 @@
# 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
@@ -0,0 +1,31 @@
# 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
@@ -0,0 +1,59 @@
# 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
@@ -0,0 +1,28 @@
# 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
@@ -0,0 +1,72 @@
# 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
@@ -0,0 +1,38 @@
# 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
@@ -0,0 +1,39 @@
# 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
@@ -0,0 +1,36 @@
# 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
@@ -0,0 +1,47 @@
# 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"
}
@@ -0,0 +1,898 @@
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.
@@ -0,0 +1,16 @@
# 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
@@ -0,0 +1,139 @@
#
# __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"])
@@ -0,0 +1,551 @@
#
# 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)
@@ -0,0 +1,299 @@
# 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)
@@ -0,0 +1,45 @@
#
# 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
@@ -0,0 +1,71 @@
#
# 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
@@ -0,0 +1,181 @@
# 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
@@ -0,0 +1,177 @@
# 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)
@@ -0,0 +1,225 @@
# 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)
@@ -0,0 +1,339 @@
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.
@@ -0,0 +1,248 @@
<?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
View File
@@ -0,0 +1 @@
/home/nocode/Files/FWS-ISO/pkgbuilds/python-meh/python-meh-0.43.tar.gz
@@ -0,0 +1,14 @@
*.pyc
.*.swp
python-meh*.tar.gz
ChangeLog
po/*.gmo
po/*.po
po/POTFILES
build/
.directory
@@ -0,0 +1,339 @@
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.
Loaded 100 of 281 files, more files were not shown because too many files have changed in this diff. Show more