build(calamares): update calamares configuration and enable networkmanager on live

This commit is contained in:
2026-05-26 15:05:12 +02:00
parent 2d135ed06b
commit c50db7a5bf
39 changed files with 486 additions and 900 deletions
+11 -1
View File
@@ -48,11 +48,16 @@ if [ -d "\$WORK_DIR/configs/baseline" ]; then
echo "==> configs/baseline/ fusionné (prioritaire)"
fi
echo "==> Activation de NetworkManager.service sur le live (symlink réel WSL)..."
mkdir -p /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants
ln -sf /usr/lib/systemd/system/NetworkManager.service \
/tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service
echo "==> Vérification des services systemd..."
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/ 2>/dev/null || echo " (aucun service)"
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/ 2>/dev/null || echo " (aucun symlink)"
# Copie le repo local Calamares
# Copie le repo local (calamares + winboat-bin)
if ls "\$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then
echo "==> Copie du repo local Calamares..."
mkdir -p /tmp/fws-build/local-repo
@@ -110,6 +115,11 @@ else
echo "==> configs/baseline/ fusionné (prioritaire)"
fi
echo "==> Activation de NetworkManager.service sur le live (symlink réel)..."
mkdir -p /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants
ln -sf /usr/lib/systemd/system/NetworkManager.service \
/tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service
echo "==> Vérification des services systemd..."
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/ 2>/dev/null || echo " (aucun service)"
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/ 2>/dev/null || echo " (aucun symlink)"
@@ -5,17 +5,17 @@
componentName: fws
strings:
productName: "FWS Linux"
productName: "FWS"
shortProductName: "FWS"
version: "1.0"
shortVersion: "1.0"
versionedName: "FWS Linux 1.0"
versionedName: "FWS 1.0"
shortVersionedName: "FWS 1.0"
bootloaderEntryName: "FWS Linux"
productUrl: "https://fws-linux.org"
supportUrl: "https://fws-linux.org/support"
releaseNotesUrl: "https://fws-linux.org/release-notes"
donateUrl: "https://fws-linux.org/donate"
bootloaderEntryName: "FWS"
productUrl: ""
supportUrl: ""
releaseNotesUrl: ""
donateUrl: ""
images:
productLogo: "logo.png"
@@ -1,22 +1,18 @@
# ============================================================
# FWS Linux — modules/bootloader.conf
# ============================================================
# Bootloader à utiliser
# Options: grub, systemd-boot, refind
---
efiBootLoader: "grub"
# Paramètres GRUB
kernel: "/vmlinuz-linux"
img: "/initramfs-linux.img"
fallback: "/initramfs-linux-fallback.img"
timeout: "5"
grubInstall: "grub-install"
grubMkconfig: "grub-mkconfig"
grubCfg: "/boot/grub/grub.cfg"
grubProbe: "grub-probe"
efiBootMgr: "efibootmgr"
# Chemin EFI
efiDirectory: "/boot/efi"
efiBootloaderId: "FWS"
# ID pour l'entrée EFI
efiBootEntryName: "FWS Linux"
# Menu GRUB
grubTimeout: 5
grubQuiet: false
installEFIFallback: true
@@ -1,11 +1,6 @@
# ============================================================
# FWS Linux — modules/finished.conf
# ============================================================
# Redémarrer automatiquement après l'installation
---
restartNowEnabled: true
restartNowChecked: false
restartNowCommand: "systemctl reboot"
restartNowCommand: "systemctl -i reboot"
# Message de fin affiché à l'utilisateur
notifyOnFinished: true
@@ -0,0 +1,13 @@
---
mountOptions:
default: defaults,noatime
btrfs: defaults,noatime,compress=zstd,space_cache=v2
ssdExtraMountOptions:
ext4: discard
jfs: discard
xfs: discard
swap: discard
btrfs: discard=async
crypttabOptions: luks,keyscript=/bin/cat
@@ -1,28 +1,13 @@
# ============================================================
# FWS Linux — modules/grubcfg.conf
# Paramètres passés à grub-mkconfig
# ============================================================
---
overwrite: true
# Nom de l'entrée dans le menu GRUB
defaultEntry: "FWS Linux"
kernel_params:
- "quiet"
defaults:
GRUB_ENABLE_CRYPTODISK: true
# Paramètres kernel supplémentaires
kernel_params: ""
# Désactiver l'écran splash (mettre false pour debug)
splash: true
# Thème GRUB (laisse vide pour le thème par défaut)
theme: ""
# Timeout du menu GRUB (en secondes)
timeout: 5
# Activer les entrées des autres OS détectés (os-prober)
enable_osprober: true
# Écrire /etc/default/grub
writeEtcDefaultGrub: true
GRUB_TIMEOUT: 5
GRUB_DEFAULT: "saved"
GRUB_DISABLE_SUBMENU: true
GRUB_TERMINAL_OUTPUT: "console"
GRUB_DISABLE_RECOVERY: true
GRUB_DISTRIBUTOR: "FWS"
@@ -0,0 +1,6 @@
---
location: EtcFile
writeHostsFile: true
setSystemdHostname: EtcFile
template: "fws-${first}"
@@ -0,0 +1 @@
---
@@ -1,24 +1,19 @@
# ============================================================
# FWS Linux — modules/initcpiocfg.conf
# Configure /etc/mkinitcpio.conf sur le système cible
# ============================================================
# Modules à inclure dans le initramfs
---
# Hooks par défaut Arch + support clavier/LUKS avant block/filesystems.
modules: []
# Binaires supplémentaires
binaries: []
# Fichiers supplémentaires
files: []
# Hooks — ordre important !
hooks:
- base
- udev
- autodetect
- microcode
- modconf
- kms
- keyboard
- keymap
- consolefont
- block
- filesystems
- keyboard
- fsck
@@ -1,17 +1,6 @@
# ============================================================
# FWS Linux — modules/keyboard.conf
# ============================================================
# Disposition clavier par défaut
xorgConfigFileName: "/etc/X11/xorg.conf.d/00-keyboard.conf"
# Clavier par défaut
---
xOrgConfFileName: "00-keyboard.conf"
convertedKeymapPath: "/usr/share/X11/xkb/symbols/pc"
keyboardLayout: "fr"
keyboardVariant: ""
keyboardModel: "pc105"
# Permettre à l'utilisateur de choisir son clavier
guiTimezone: true
# Conversions vc (console virtuelle) → X11
convertedKeymapPath: "/lib/kbd/keymaps/xkb"
@@ -1,18 +1,6 @@
# ============================================================
# FWS Linux — modules/locale.conf
# ============================================================
# Région/timezone par défaut
---
region: "Europe"
zone: "Paris"
# Langue par défaut
locale: "fr_FR.UTF-8"
# Format des nombres, dates, monnaie
# Laisse vide pour utiliser la même valeur que locale
localeGenPath: "/etc/locale.gen"
# Timezone GeoIP (détection auto basée sur l'IP)
geoipStyle: "json"
geoipUrl: "https://geoip.kde.org/v1/calamares"
@@ -0,0 +1 @@
---
@@ -0,0 +1,4 @@
---
systemd: true
dbus: true
dbus-symlink: true
@@ -0,0 +1,25 @@
---
extraMounts:
- device: proc
fs: proc
mountPoint: /proc
- device: sys
fs: sysfs
mountPoint: /sys
- device: /dev
mountPoint: /dev
options: [bind]
- device: /dev/pts
fs: devpts
mountPoint: /dev/pts
- device: tmpfs
fs: tmpfs
mountPoint: /run
- device: /run/udev
mountPoint: /run/udev
options: [bind]
extraMountsEfi:
- device: efivarfs
fs: efivarfs
mountPoint: /sys/firmware/efi/efivars
@@ -0,0 +1,2 @@
---
# Copie /etc/NetworkManager du live vers le système cible (NM gérera le réseau).
@@ -1,54 +1,16 @@
# ============================================================
# FWS Linux — modules/packages.conf
# Paquets installés via pacman pendant l'installation
# ============================================================
---
# Étape post-unpackfs : on retire les paquets qui ne servent que dans
# l'ISO live (installeur + outils archiso). Les paquets utiles sont déjà
# présents sur le système cible parce qu'unpackfs a copié tout le live.
# Gestionnaire de paquets
backend: pacman
# Ne pas mettre à jour la base de données pacman (déjà dans le live)
update_db: false
update_system: false
operations:
- install:
# Base système
- base
- base-devel
- linux
- linux-headers
- linux-firmware
# Bootloader
- grub
- efibootmgr
- os-prober
- mkinitcpio-openswap
# Réseau
- networkmanager
- network-manager-applet
- wpa_supplicant
- dhcpcd
# Outils essentiels
- sudo
- nano
- vim
- git
- curl
- wget
- htop
- bash-completion
# Locale & timezone
- tzdata
# Optionnel — retire ce qui ne correspond pas à FWS
- pipewire
- pipewire-pulse
- wireplumber
# Paquets à retirer du système live (pas nécessaires après install)
# - remove:
- remove:
- calamares
- calamares-config
- kpmcore
- archinstall
- livecd-sounds
- mkinitcpio-archiso
@@ -1,34 +1,22 @@
# ============================================================
# FWS Linux — modules/partition.conf
# ============================================================
# Backend de partitionnement
backend: kpmcore
# Autoriser le partitionnement manuel
allowManualPartitioning: true
# Schéma de partition par défaut (pour install automatique)
# Options: mbr, gpt
defaultPartitionTableType: gpt
# Swap
# Options: none, small, suspend, file
defaultSwapType: small
# Taille minimale des partitions en MiB
defaultFileSystemType: "ext4"
# Partitions EFI (pour UEFI)
---
efiSystemPartition: "/boot/efi"
efiSystemPartitionSize: 300
efiSystemPartitionSize: 300M
efiSystemPartitionName: EFI
# Point de montage racine
requiredStorage: 20.0
userSwapChoices:
- none
- small
- suspend
- file
# Systèmes de fichiers proposés à l'utilisateur
drawNestedPartitions: true
alwaysShowPartitionLabels: true
initialPartitioningChoice: replace
initialSwapChoice: small
defaultFileSystemType: "ext4"
availableFileSystemTypes: ["ext4", "btrfs", "xfs", "f2fs"]
# Chiffrement
# Activer le chiffrement LUKS
allowZfs: true
enableLuksAutomatedPartitioning: true
allowManualPartitioning: true
@@ -1,23 +1,15 @@
# ============================================================
# FWS Linux — modules/services-systemd.conf
# Services systemd activés sur le système installé
# ============================================================
---
services:
# Réseau
- name: NetworkManager
mandatory: true
# DHCP
- name: dhcpcd
mandatory: false
- name: systemd-resolved
mandatory: true
# Heure synchronisée
- name: systemd-timesyncd
mandatory: true
# Ajoute ici tes services FWS supplémentaires
# - name: mon-service-fws
# mandatory: false
- name: sshd
mandatory: false
targets: []
@@ -1,16 +1,9 @@
# ============================================================
# FWS Linux — modules/unpackfs.conf
# Copie le système live vers le disque cible
# ============================================================
---
# Copie le squashfs du live vers le disque cible.
# Le chemin /run/archiso/bootmnt/<install_dir>/<arch>/airootfs.sfs
# doit correspondre à `install_dir` dans configs/releng/profiledef.sh ("fws").
unpack:
# Source : le squashfs de l'ISO FWS
# Adapte "FWS" selon la valeur de iso_name dans profiledef.sh
- source: /run/archiso/bootmnt/FWS/x86_64/airootfs.sfs
sourcefs: squashfs
- source: "/run/archiso/bootmnt/fws/x86_64/airootfs.sfs"
sourcefs: "squashfs"
destination: ""
# Alternative si tu utilises erofs au lieu de squashfs :
# - source: /run/archiso/bootmnt/FWS/x86_64/airootfs.erofs
# sourcefs: erofs
# destination: ""
@@ -1,39 +1,24 @@
# ============================================================
# FWS Linux — modules/users.conf
# ============================================================
# Nom d'hôte par défaut
---
defaultGroups:
- users
- lp
- wheel
- audio
- video
- network
- storage
- wheel
- audio
- optical
- scanner
- power
- lp
- scanner
# Autoriser le login automatique
autologinGroup: autologin
# Sudoers — donne les droits sudo au groupe wheel
sudoersGroup: wheel
# Shell par défaut pour les nouveaux utilisateurs
setRootPassword: true
doAutologin: false
userShell: /bin/bash
# Hostname par défaut
hostname:
location: EtcFile
template: "fws-${first}"
# Règles pour les mots de passe
passwordRequirements:
minLength: 6
maxLength: -1
nonempty: true
# Permet de définir le même mot de passe pour root et user
allowWeakPasswords: false
allowWeakPasswordsDefault: false
@@ -1,29 +1,20 @@
# ============================================================
# FWS Linux — modules/welcome.conf
# ============================================================
# Afficher les conditions requises avant l'installation
---
showSupportUrl: true
showKnownIssuesUrl: true
showReleaseNotesUrl: false
showDonateUrl: false
# Vérifications système requises
requirements:
# Espace disque minimum en MiB
requiredStorage: 20.0
# RAM minimum en MiB
requiredRam: 2.0
# Vérifier la connexion internet (optionnel)
checkInternet: false
# Vérifier si on tourne en live (pas déjà installé)
checkForRoot: true
# Vérifier l'alimentation (AC power)
checkPower: true
# Ne bloque pas l'install si pas connecté
internetCheckUrl: "https://cloudflare.com"
requiredStorage: 8.0
requiredRam: 1.5
internetCheckUrl: "https://archlinux.org"
check:
- storage
- ram
- power
- root
- screen
required:
- storage
- ram
- root
@@ -1,21 +1,45 @@
---
componentName: fws
# ============================================================
# FWS — Calamares settings
# ============================================================
strings:
productName: FWS
shortProductName: FWS
version: 2026.03
versionedName: FWS 2026.03
bootloaderEntryName: FWS
productUrl: https://github.com/ton-repo/fws
supportUrl: https://github.com/ton-repo/fws/issues
knownIssuesUrl: https://github.com/ton-repo/fws/issues
releaseNotesUrl: https://github.com/ton-repo/fws
modules-search: [ local, /usr/lib/calamares/modules ]
images:
productLogo: logo.png
productIcon: logo.png
productWelcome: logo.png
sequence:
- show:
- welcome
- locale
- keyboard
- partition
- users
- summary
- exec:
- partition
- mount
- unpackfs
- machineid
- fstab
- locale
- keyboard
- localecfg
- users
- hostname
- hwclock
- networkcfg
- initcpiocfg
- initcpio
- grubcfg
- bootloader
- packages
- services-systemd
- umount
- show:
- finished
slideshow: show.qml
slideshowAPI: 2
branding: fws
prompt-install: true
dont-chroot: false
oem-setup: false
disable-cancel: false
disable-cancel-during-exec: false
@@ -1,11 +0,0 @@
[Match]
Type=ether
# Exclude virtual Ethernet interfaces
Kind=!*
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
MulticastDNS=yes
@@ -1,2 +0,0 @@
[Network]
IPv6PrivacyExtensions=yes
@@ -1,16 +0,0 @@
[Unit]
Description=Calamares Installer
After=xorg-start.service
Requires=xorg-start.service
[Service]
Type=simple
User=root
Environment=DISPLAY=:0
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/calamares
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-config.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-final.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-local.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-main.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/cloud-init-network.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/systemd-networkd-wait-online.service
@@ -1 +0,0 @@
/usr/lib/systemd/system/systemd-networkd.socket
@@ -1,6 +0,0 @@
# Allow systemd-networkd-wait-online to succeed with one interface, otherwise, if multiple network interfaces exist,
# network-online.target gets needlessly delayed.
# See https://wiki.archlinux.org/title/systemd-networkd#systemd-networkd-wait-online
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
@@ -1,14 +0,0 @@
[Unit]
Description=Xorg Display Server
After=systemd-logind.service
Wants=systemd-logind.service
[Service]
Type=simple
User=root
ExecStart=/usr/bin/Xorg :0 vt1 -nolisten tcp
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
+2
View File
@@ -1,4 +1,6 @@
#!/bin/sh
# Lancé par startx (cf. /root/.zprofile)
xsetroot -solid "#1a1a2e"
openbox &
sleep 1
exec calamares
+4 -7
View File
@@ -1,8 +1,5 @@
# Fallback si les services systemd n'ont pas démarré Calamares
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$DISPLAY" ]; then
Xorg :0 vt1 &
sleep 2
DISPLAY=:0 openbox &
sleep 1
DISPLAY=:0 calamares
# Démarrage automatique de Xorg + Calamares sur tty1 (autologin root).
# La session X exécute /root/.xinitrc qui lance Openbox + Calamares.
if [[ "$(tty)" == "/dev/tty1" && -z "$DISPLAY" ]]; then
exec startx -- vt1
fi
+93 -128
View File
@@ -1,144 +1,109 @@
alsa-utils
amd-ucode
arch-install-scripts
archinstall
b43-fwcutter
# ============================================================
# FWS — paquets de l'ISO live
# Objectif : système live bootable + installeur Calamares
# fonctionnel + jeu minimal d'outils de rescue.
# ============================================================
# --- Base système ---
base
bcachefs-tools
bind
bolt
brltty
broadcom-wl
btrfs-progs
calamares
clonezilla
cloud-init
cryptsetup
darkhttpd
ddrescue
dhcpcd
diffutils
dmidecode
dmraid
dnsmasq
dosfstools
e2fsprogs
edk2-shell
efibootmgr
espeakup
ethtool
exfatprogs
f2fs-tools
fatresize
foot-terminfo
fsarchiver
gpart
gpm
gptfdisk
grml-zsh-config
grub
hdparm
hyperv
intel-ucode
irssi
iw
iwd
jfsutils
kitty-terminfo
kpmcore
ldns
less
lftp
libfido2
libusb-compat
base-devel
linux
linux-atm
linux-firmware
linux-firmware-marvell
livecd-sounds
lsscsi
lvm2
lynx
man-db
man-pages
mc
mdadm
memtest86+
memtest86+-efi
amd-ucode
intel-ucode
# --- initramfs / archiso ---
mkinitcpio
mkinitcpio-archiso
mkinitcpio-nfs-utils
mmc-utils
modemmanager
mtools
nano
nbd
ndisc6
fastfetch
nfs-utils
nilfs-utils
nmap
# --- Boot ---
syslinux
grub
efibootmgr
edk2-shell
os-prober
memtest86+
memtest86+-efi
# --- Filesystems ---
btrfs-progs
e2fsprogs
exfatprogs
xfsprogs
f2fs-tools
dosfstools
ntfs-3g
nvme-cli
openbox
open-iscsi
open-vm-tools
openconnect
openpgp-card-tools
openssh
openvpn
partclone
cryptsetup
lvm2
mdadm
# --- Outils disque ---
parted
partimage
pcsclite
ppp
pptpclient
pv
qemu-guest-agent
qt5-base
qt5-svg
qt6-base
refind
reflector
rsync
rxvt-unicode-terminfo
screen
sdparm
sequoia-sq
sg3_utils
gptfdisk
fatresize
testdisk
smartmontools
sof-firmware
squashfs-tools
nvme-cli
mmc-utils
hdparm
# --- Réseau ---
networkmanager
wpa_supplicant
wireless-regdb
openssh
rsync
curl
wget
# --- Shell / système ---
zsh
grml-zsh-config
bash
nano
vim
less
git
sudo
polkit
polkit-gnome
syslinux
systemd-resolvconf
tcpdump
terminus-font
testdisk
tmux
tpm2-tools
tpm2-tss
ttf-dejavu
udftools
usb_modeswitch
usbmuxd
man-db
man-pages
arch-install-scripts
reflector
pacman-contrib
# --- Hardware ---
dmidecode
usbutils
vim
virtualbox-guest-utils-nox
vpnc
winboat-bin
wireless-regdb
wireless_tools
wpa_supplicant
wvdial
xdg-utils
xfsprogs
xl2tpd
pciutils
fastfetch
htop
# --- Audio (slideshow, optionnel) ---
alsa-utils
sof-firmware
# --- Xorg + Openbox (pour Calamares) ---
xorg-server
xorg-xinit
xorg-xrandr
zsh
xorg-xsetroot
xorg-xsetroot
openbox
ttf-dejavu
# --- Calamares (fournis par fws-local) ---
calamares
kpmcore
qt5-base
qt5-svg
qt5-webengine
qt6-base
# --- Agents VM (pratique pour tester l'ISO) ---
qemu-guest-agent
virtualbox-guest-utils-nox
open-vm-tools
# --- FWS (fws-local) ---
winboat-bin
+93 -128
View File
@@ -1,144 +1,109 @@
alsa-utils
amd-ucode
arch-install-scripts
archinstall
b43-fwcutter
# ============================================================
# FWS — paquets de l'ISO live
# Objectif : système live bootable + installeur Calamares
# fonctionnel + jeu minimal d'outils de rescue.
# ============================================================
# --- Base système ---
base
bcachefs-tools
bind
bolt
brltty
broadcom-wl
btrfs-progs
calamares
clonezilla
cloud-init
cryptsetup
darkhttpd
ddrescue
dhcpcd
diffutils
dmidecode
dmraid
dnsmasq
dosfstools
e2fsprogs
edk2-shell
efibootmgr
espeakup
ethtool
exfatprogs
f2fs-tools
fatresize
foot-terminfo
fsarchiver
gpart
gpm
gptfdisk
grml-zsh-config
grub
hdparm
hyperv
intel-ucode
irssi
iw
iwd
jfsutils
kitty-terminfo
kpmcore
ldns
less
lftp
libfido2
libusb-compat
base-devel
linux
linux-atm
linux-firmware
linux-firmware-marvell
livecd-sounds
lsscsi
lvm2
lynx
man-db
man-pages
mc
mdadm
memtest86+
memtest86+-efi
amd-ucode
intel-ucode
# --- initramfs / archiso ---
mkinitcpio
mkinitcpio-archiso
mkinitcpio-nfs-utils
mmc-utils
modemmanager
mtools
nano
nbd
ndisc6
fastfetch
nfs-utils
nilfs-utils
nmap
# --- Boot ---
syslinux
grub
efibootmgr
edk2-shell
os-prober
memtest86+
memtest86+-efi
# --- Filesystems ---
btrfs-progs
e2fsprogs
exfatprogs
xfsprogs
f2fs-tools
dosfstools
ntfs-3g
nvme-cli
openbox
open-iscsi
open-vm-tools
openconnect
openpgp-card-tools
openssh
openvpn
partclone
cryptsetup
lvm2
mdadm
# --- Outils disque ---
parted
partimage
pcsclite
ppp
pptpclient
pv
qemu-guest-agent
qt5-base
qt5-svg
qt6-base
refind
reflector
rsync
rxvt-unicode-terminfo
screen
sdparm
sequoia-sq
sg3_utils
gptfdisk
fatresize
testdisk
smartmontools
sof-firmware
squashfs-tools
nvme-cli
mmc-utils
hdparm
# --- Réseau ---
networkmanager
wpa_supplicant
wireless-regdb
openssh
rsync
curl
wget
# --- Shell / système ---
zsh
grml-zsh-config
bash
nano
vim
less
git
sudo
polkit
polkit-gnome
syslinux
systemd-resolvconf
tcpdump
terminus-font
testdisk
tmux
tpm2-tools
tpm2-tss
ttf-dejavu
udftools
usb_modeswitch
usbmuxd
man-db
man-pages
arch-install-scripts
reflector
pacman-contrib
# --- Hardware ---
dmidecode
usbutils
vim
virtualbox-guest-utils-nox
vpnc
winboat-bin
wireless-regdb
wireless_tools
wpa_supplicant
wvdial
xdg-utils
xfsprogs
xl2tpd
pciutils
fastfetch
htop
# --- Audio (slideshow, optionnel) ---
alsa-utils
sof-firmware
# --- Xorg + Openbox (pour Calamares) ---
xorg-server
xorg-xinit
xorg-xrandr
zsh
xorg-xsetroot
xorg-xsetroot
openbox
ttf-dejavu
# --- Calamares (fournis par fws-local) ---
calamares
kpmcore
qt5-base
qt5-svg
qt5-webengine
qt6-base
# --- Agents VM (pratique pour tester l'ISO) ---
qemu-guest-agent
virtualbox-guest-utils-nox
open-vm-tools
# --- FWS (fws-local) ---
winboat-bin
+67 -299
View File
@@ -1,350 +1,118 @@
#!/bin/bash
# ============================================================
# FWS — Setup Calamares + Xorg autostart
# v4 — Version stable avec toutes les corrections
# FWS — Build des paquets AUR (calamares + winboat-bin)
# et création du repo pacman local fws-local/.
#
# Rejoue-le si tu changes la liste AUR_PACKAGES ou pour
# rafraîchir le repo local.
# ============================================================
set -e
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'
AUR_PACKAGES=(calamares winboat-bin)
DISTRO_NAME="${ARCH_WSL_DISTRO:-Arch}"
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'
BLUE='\033[0;34m'; CYAN='\033[0;36m'; NC='\033[0m'
info() { echo -e "${BLUE}==>${NC} $1"; }
success() { echo -e "${GREEN}[OK]${NC} $1"; }
warn() { echo -e "${YELLOW}[!!]${NC} $1"; }
error() { echo -e "${RED}[ERR]${NC} $1"; exit 1; }
step() { echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"; \
echo -e "${CYAN} $1${NC}"; \
step() { echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${CYAN} $1${NC}"
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"; }
# ============================================================
# DÉTECTION Git Bash / WSL
# Bascule Git Bash WSL si besoin
# ============================================================
IS_GITBASH=false
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || -n "$WINDIR" ]]; then
IS_GITBASH=true
fi
if $IS_GITBASH; then
info "Git Bash détecté — Recherche de la distro Arch dans WSL..."
info "Git Bash détecté — bascule dans WSL ($DISTRO_NAME)..."
export MSYS_NO_PATHCONV=1
export MSYS2_ARG_CONV_EXCL="*"
ARCH_DISTRO=""
if ! wsl.exe -d "$DISTRO_NAME" -u root -- echo ok >/dev/null 2>&1; then
# Auto-détection
for name in "Arch" "ArchLinux" "archlinux" "arch" "ArchWSL"; do
if wsl.exe -d "$name" -u root -- echo "ok" > /dev/null 2>&1; then
ARCH_DISTRO="$name"; break
if wsl.exe -d "$name" -u root -- echo ok >/dev/null 2>&1; then
DISTRO_NAME="$name"; break
fi
done
if [ -z "$ARCH_DISTRO" ]; then
warn "Détection automatique impossible."
read -r -p "Nom de ta distro Arch WSL > " ARCH_DISTRO
ARCH_DISTRO=$(echo "$ARCH_DISTRO" | tr -d '\r\n')
fi
success "Distro : '$ARCH_DISTRO'"
SCRIPT_DIR_WIN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -W)"
SCRIPT_PATH_WSL=$(MSYS_NO_PATHCONV=1 wsl.exe -d "$ARCH_DISTRO" -u root -- \
SCRIPT_PATH_WSL=$(MSYS_NO_PATHCONV=1 wsl.exe -d "$DISTRO_NAME" -u root -- \
wslpath "$(echo "$SCRIPT_DIR_WIN" | sed 's|/|\\\\|g')/setup-calamares.sh" \
2>/dev/null | tr -d '\r\n')
info "Lancement dans WSL ($ARCH_DISTRO) en root..."
MSYS_NO_PATHCONV=1 wsl.exe -d "$ARCH_DISTRO" -u root -- bash "$SCRIPT_PATH_WSL"
MSYS_NO_PATHCONV=1 wsl.exe -d "$DISTRO_NAME" -u root -- bash "$SCRIPT_PATH_WSL"
exit 0
fi
# ============================================================
# VÉRIFICATIONS
# Vérifications
# ============================================================
if ! command -v pacman &>/dev/null; then error "Pas dans Arch WSL !"; fi
if [ "$EUID" -ne 0 ]; then exec su -c "bash $0" root; fi
success "Arch Linux WSL — root ✓"
command -v pacman >/dev/null || error "pacman introuvable (lance depuis Arch / WSL)"
[ "$EUID" -eq 0 ] || exec su -c "bash $0" root
success "Arch Linux (root) ✓"
# ─── Détection des chemins du projet ────────────────────────
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LOCAL_REPO="$SCRIPT_DIR/local-repo"
BUILD_DIR="/tmp/fws-aur-build"
BUILD_USER="fwsbuild"
PACMAN_CONF=""
for c in "$SCRIPT_DIR/releng/pacman.conf" \
"$SCRIPT_DIR/configs/baseline/pacman.conf" \
"$SCRIPT_DIR/configs/releng/pacman.conf" \
"$SCRIPT_DIR/pacman.conf"; do
[ -f "$c" ] && { PACMAN_CONF="$c"; success "pacman.conf : $c"; break; }
# ============================================================
step "1/4 — Outils de build"
# ============================================================
pacman -Sy --needed --noconfirm base-devel git
# ============================================================
step "2/4 — Préparation utilisateur de build (non-root pour makepkg)"
# ============================================================
rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
if ! id "$BUILD_USER" &>/dev/null; then
useradd -m "$BUILD_USER"
echo "$BUILD_USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/fwsbuild
chmod 440 /etc/sudoers.d/fwsbuild
success "Utilisateur $BUILD_USER créé"
fi
chown -R "$BUILD_USER:$BUILD_USER" "$BUILD_DIR"
# ============================================================
step "3/4 — Build des paquets AUR : ${AUR_PACKAGES[*]}"
# ============================================================
for pkg in "${AUR_PACKAGES[@]}"; do
info "Clonage $pkg"
su - "$BUILD_USER" -c "git clone https://aur.archlinux.org/${pkg}.git $BUILD_DIR/$pkg" \
|| error "Clonage $pkg échoué"
info "Build $pkg (peut prendre plusieurs minutes)…"
su - "$BUILD_USER" -c "cd $BUILD_DIR/$pkg && makepkg -s --noconfirm" \
|| error "Build $pkg échoué"
success "$pkg build OK"
done
[ -z "$PACMAN_CONF" ] && error "pacman.conf introuvable !"
PACKAGES_FILE=""
for c in "$SCRIPT_DIR/releng/packages.x86_64" \
"$SCRIPT_DIR/configs/baseline/packages.x86_64" \
"$SCRIPT_DIR/configs/releng/packages.x86_64" \
"$SCRIPT_DIR/packages.x86_64"; do
[ -f "$c" ] && { PACKAGES_FILE="$c"; success "packages.x86_64 : $c"; break; }
done
[ -z "$PACKAGES_FILE" ] && error "packages.x86_64 introuvable !"
AIROOTFS=""
for c in "$SCRIPT_DIR/airootfs" \
"$SCRIPT_DIR/configs/baseline/airootfs" \
"$SCRIPT_DIR/releng/airootfs"; do
[ -d "$c" ] && { AIROOTFS="$c"; success "airootfs : $c"; break; }
done
[ -z "$AIROOTFS" ] && error "airootfs introuvable !"
# ============================================================
step "ÉTAPE 1 — Outils de build"
step "4/4 — Création du repo pacman local fws-local"
# ============================================================
pacman -S --needed --noconfirm base-devel git || error "Échec install outils"
success "base-devel + git OK"
# ============================================================
step "ÉTAPE 2 — Rebuild Calamares depuis l'AUR"
# ============================================================
warn "Suppression ancien build et repo local..."
rm -rf "$BUILD_DIR" "$LOCAL_REPO"
rm -rf "$LOCAL_REPO"
mkdir -p "$LOCAL_REPO"
if ! id "fwsbuild" &>/dev/null; then
useradd -m fwsbuild
echo "fwsbuild ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
success "Utilisateur fwsbuild créé"
fi
for pkg in "${AUR_PACKAGES[@]}"; do
cp "$BUILD_DIR/$pkg"/*.pkg.tar.zst "$LOCAL_REPO/" \
|| error "Paquet $pkg introuvable dans $BUILD_DIR/$pkg"
done
mkdir -p "$BUILD_DIR"
chown fwsbuild:fwsbuild "$BUILD_DIR"
info "Clonage de calamares depuis l'AUR..."
su - fwsbuild -c \
"git clone https://aur.archlinux.org/calamares.git $BUILD_DIR/calamares" \
|| error "Clonage échoué"
info "Build de Calamares (plusieurs minutes)..."
su - fwsbuild -c \
"cd $BUILD_DIR/calamares && makepkg -s --noconfirm" \
|| error "Build échoué"
success "Calamares buildé ✓"
# ============================================================
step "ÉTAPE 3 — Création du repo local pacman"
# ============================================================
cp "$BUILD_DIR/calamares"/calamares-[0-9]*.pkg.tar.zst "$LOCAL_REPO/" \
|| error "Paquet introuvable"
repo-add "$LOCAL_REPO/fws-local.db.tar.gz" \
"$LOCAL_REPO"/calamares-[0-9]*.pkg.tar.zst \
|| error "repo-add échoué"
repo-add "$LOCAL_REPO/fws-local.db.tar.gz" "$LOCAL_REPO"/*.pkg.tar.zst \
|| error "repo-add a échoué"
success "Repo local prêt : $LOCAL_REPO"
# ============================================================
step "ÉTAPE 4 — Nettoyage packages.x86_64"
# Nettoyage utilisateur de build
# ============================================================
# Supprime les paquets invalides/AUR
for pkg in "mkinitcpio-openswap" "qt5-webengine" \
"calamares-configs" "zshcalamares" "xorg-init"; do
if grep -q "^${pkg}$" "$PACKAGES_FILE"; then
sed -i "/^${pkg}$/d" "$PACKAGES_FILE"
warn "Supprimé (invalide) : $pkg"
fi
done
userdel -r "$BUILD_USER" 2>/dev/null || true
rm -f /etc/sudoers.d/fwsbuild
# Ajoute les paquets requis
for pkg in "calamares" \
"xorg-server" "xorg-xinit" "xorg-xrandr" "xorg-xsetroot" \
"openbox" "ttf-dejavu" \
"qt5-base" "qt5-svg" \
"kpmcore" "polkit" "polkit-gnome"; do
if ! grep -q "^${pkg}$" "$PACKAGES_FILE"; then
echo "$pkg" >> "$PACKAGES_FILE"
success "Ajouté : $pkg"
else
info "Déjà présent : $pkg"
fi
done
# ============================================================
step "ÉTAPE 5 — Patch pacman.conf"
# ============================================================
# Supprime [community] obsolète
if grep -q "\[community\]" "$PACMAN_CONF"; then
sed -i '/^\[community\]/,/^Include.*mirrorlist/d' "$PACMAN_CONF"
warn "[community] supprimé"
fi
# Supprime l'ancien bloc fws-local et le réécrit proprement
sed -i '/^\[fws-local\]/,/^$/d' "$PACMAN_CONF"
PACMAN_TMP=$(mktemp)
printf '[fws-local]\nSigLevel = Optional TrustAll\nServer = file://%s\n\n' \
"$LOCAL_REPO" > "$PACMAN_TMP"
cat "$PACMAN_CONF" >> "$PACMAN_TMP"
mv "$PACMAN_TMP" "$PACMAN_CONF"
success "[fws-local] ajouté → $LOCAL_REPO"
# ============================================================
step "ÉTAPE 6 — Config airootfs (services + Calamares)"
# ============================================================
# ─── Nettoyage des anciens fichiers ─────────────────────────
rm -f "$AIROOTFS/etc/systemd/system/calamares-autostart.service"
rm -f "$AIROOTFS/etc/systemd/system/multi-user.target.wants/calamares-autostart.service"
rm -f "$AIROOTFS/etc/systemd/system/getty@tty1.service.d/calamares.conf"
rmdir "$AIROOTFS/etc/systemd/system/getty@tty1.service.d" 2>/dev/null || true
# ─── Autologin root sur tty1 ────────────────────────────────
info "Autologin root sur tty1..."
mkdir -p "$AIROOTFS/etc/systemd/system/getty@tty1.service.d"
cat > "$AIROOTFS/etc/systemd/system/getty@tty1.service.d/autologin.conf" << 'EOF'
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
EOF
success "Autologin configuré"
# ─── Service xorg-start ──────────────────────────────────────
info "Service xorg-start.service..."
mkdir -p "$AIROOTFS/etc/systemd/system"
cat > "$AIROOTFS/etc/systemd/system/xorg-start.service" << 'EOF'
[Unit]
Description=Xorg Display Server
After=systemd-logind.service
Wants=systemd-logind.service
[Service]
Type=simple
User=root
ExecStart=/usr/bin/Xorg :0 vt1 -nolisten tcp
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
EOF
mkdir -p "$AIROOTFS/etc/systemd/system/multi-user.target.wants"
ln -sf /etc/systemd/system/xorg-start.service \
"$AIROOTFS/etc/systemd/system/multi-user.target.wants/xorg-start.service"
success "xorg-start.service activé"
# ─── Service calamares ───────────────────────────────────────
info "Service calamares.service..."
cat > "$AIROOTFS/etc/systemd/system/calamares.service" << 'EOF'
[Unit]
Description=Calamares Installer
After=xorg-start.service
Requires=xorg-start.service
[Service]
Type=simple
User=root
Environment=DISPLAY=:0
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/calamares
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
ln -sf /etc/systemd/system/calamares.service \
"$AIROOTFS/etc/systemd/system/multi-user.target.wants/calamares.service"
success "calamares.service activé"
# ─── .zprofile fallback ──────────────────────────────────────
info "Création .zprofile (fallback)..."
mkdir -p "$AIROOTFS/root"
cat > "$AIROOTFS/root/.zprofile" << 'EOF'
# Fallback si les services systemd n'ont pas démarré Calamares
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$DISPLAY" ]; then
Xorg :0 vt1 &
sleep 2
DISPLAY=:0 openbox &
sleep 1
DISPLAY=:0 calamares
fi
EOF
success ".zprofile fallback créé"
# ─── settings.conf Calamares ─────────────────────────────────
info "settings.conf Calamares..."
mkdir -p "$AIROOTFS/etc/calamares/modules"
cat > "$AIROOTFS/etc/calamares/settings.conf" << 'EOF'
---
modules-search: [ local, /usr/lib/calamares/modules ]
sequence:
- show:
- welcome
- locale
- keyboard
- partition
- users
- summary
- exec:
- partition
- mount
- unpackfs
- fstab
- locale
- keyboard
- localecfg
- users
- initcpio
- bootloader
- services-systemd
- umount
- show:
- finished
branding: default
prompt-install: false
dont-chroot: false
EOF
success "settings.conf créé"
# ─── Vérification finale ─────────────────────────────────────
echo ""
info "Vérification des fichiers créés..."
for f in \
"$AIROOTFS/etc/systemd/system/xorg-start.service" \
"$AIROOTFS/etc/systemd/system/calamares.service" \
"$AIROOTFS/etc/systemd/system/multi-user.target.wants/xorg-start.service" \
"$AIROOTFS/etc/systemd/system/multi-user.target.wants/calamares.service" \
"$AIROOTFS/etc/systemd/system/getty@tty1.service.d/autologin.conf" \
"$AIROOTFS/root/.zprofile" \
"$AIROOTFS/etc/calamares/settings.conf"
do
if [ -e "$f" ]; then
success "$(basename $f)"
else
warn "MANQUANT : $f"
fi
done
# ============================================================
step "NETTOYAGE"
# ============================================================
userdel -r fwsbuild 2>/dev/null || true
sed -i '/fwsbuild ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers
success "Utilisateur fwsbuild supprimé"
# ============================================================
echo ""
echo -e "${GREEN}╔══════════════════════════════════════════════════╗${NC}"
echo -e "${GREEN} Setup terminé ! Lance maintenant : ${NC}"
echo -e "${GREEN}║ ./build.sh ║${NC}"
echo -e "${GREEN}║ Setup terminé. Lance maintenant : ./build.sh${NC}"
echo -e "${GREEN}╚══════════════════════════════════════════════════╝${NC}"
echo ""
echo -e " ${CYAN}Séquence de boot de l'ISO :${NC}"
echo -e " 1. Boot ISO FWS"
echo -e " 2. systemd → xorg-start.service → Xorg :0 démarre"
echo -e " 3. systemd → calamares.service → DISPLAY=:0 calamares"
echo -e " 4. Calamares s'ouvre automatiquement ✓"
echo -e ""
echo -e " ${CYAN}Si service échoue → fallback :${NC}"
echo -e " autologin root tty1 → .zprofile → Xorg + Calamares"
echo ""