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)" echo "==> configs/baseline/ fusionné (prioritaire)"
fi 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..." 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 Calamares # Copie le repo local (calamares + winboat-bin)
if ls "\$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then if ls "\$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then
echo "==> Copie du repo local Calamares..." echo "==> Copie du repo local Calamares..."
mkdir -p /tmp/fws-build/local-repo mkdir -p /tmp/fws-build/local-repo
@@ -110,6 +115,11 @@ else
echo "==> configs/baseline/ fusionné (prioritaire)" echo "==> configs/baseline/ fusionné (prioritaire)"
fi 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..." 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)"
@@ -5,17 +5,17 @@
componentName: fws componentName: fws
strings: strings:
productName: "FWS Linux" productName: "FWS"
shortProductName: "FWS" shortProductName: "FWS"
version: "1.0" version: "1.0"
shortVersion: "1.0" shortVersion: "1.0"
versionedName: "FWS Linux 1.0" versionedName: "FWS 1.0"
shortVersionedName: "FWS 1.0" shortVersionedName: "FWS 1.0"
bootloaderEntryName: "FWS Linux" bootloaderEntryName: "FWS"
productUrl: "https://fws-linux.org" productUrl: ""
supportUrl: "https://fws-linux.org/support" supportUrl: ""
releaseNotesUrl: "https://fws-linux.org/release-notes" releaseNotesUrl: ""
donateUrl: "https://fws-linux.org/donate" donateUrl: ""
images: images:
productLogo: "logo.png" productLogo: "logo.png"
@@ -1,22 +1,18 @@
# ============================================================ ---
# FWS Linux — modules/bootloader.conf efiBootLoader: "grub"
# ============================================================
# Bootloader à utiliser kernel: "/vmlinuz-linux"
# Options: grub, systemd-boot, refind img: "/initramfs-linux.img"
efiBootLoader: "grub" fallback: "/initramfs-linux-fallback.img"
timeout: "5"
# Paramètres GRUB grubInstall: "grub-install"
grubInstall: "grub-install" grubMkconfig: "grub-mkconfig"
grubMkconfig: "grub-mkconfig" grubCfg: "/boot/grub/grub.cfg"
grubCfg: "/boot/grub/grub.cfg" grubProbe: "grub-probe"
efiBootMgr: "efibootmgr"
# Chemin EFI efiDirectory: "/boot/efi"
efiDirectory: "/boot/efi" efiBootloaderId: "FWS"
# ID pour l'entrée EFI installEFIFallback: true
efiBootEntryName: "FWS Linux"
# Menu GRUB
grubTimeout: 5
grubQuiet: false
@@ -1,11 +1,6 @@
# ============================================================ ---
# FWS Linux — modules/finished.conf restartNowEnabled: true
# ============================================================ restartNowChecked: false
restartNowCommand: "systemctl -i reboot"
# Redémarrer automatiquement après l'installation notifyOnFinished: true
restartNowEnabled: true
restartNowChecked: false
restartNowCommand: "systemctl 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 overwrite: true
# Paramètres passés à grub-mkconfig
# ============================================================
# Nom de l'entrée dans le menu GRUB kernel_params:
defaultEntry: "FWS Linux" - "quiet"
defaults: defaults:
GRUB_ENABLE_CRYPTODISK: true GRUB_TIMEOUT: 5
GRUB_DEFAULT: "saved"
# Paramètres kernel supplémentaires GRUB_DISABLE_SUBMENU: true
kernel_params: "" GRUB_TERMINAL_OUTPUT: "console"
GRUB_DISABLE_RECOVERY: true
# Désactiver l'écran splash (mettre false pour debug) GRUB_DISTRIBUTOR: "FWS"
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
@@ -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 # Hooks par défaut Arch + support clavier/LUKS avant block/filesystems.
# Configure /etc/mkinitcpio.conf sur le système cible
# ============================================================
# Modules à inclure dans le initramfs
modules: [] modules: []
# Binaires supplémentaires
binaries: [] binaries: []
# Fichiers supplémentaires
files: [] files: []
# Hooks — ordre important !
hooks: hooks:
- base - base
- udev - udev
- autodetect - autodetect
- microcode
- modconf - modconf
- kms
- keyboard
- keymap
- consolefont
- block - block
- filesystems - filesystems
- keyboard
- fsck - fsck
@@ -1,17 +1,6 @@
# ============================================================ ---
# FWS Linux — modules/keyboard.conf xOrgConfFileName: "00-keyboard.conf"
# ============================================================ convertedKeymapPath: "/usr/share/X11/xkb/symbols/pc"
keyboardLayout: "fr"
# Disposition clavier par défaut keyboardVariant: ""
xorgConfigFileName: "/etc/X11/xorg.conf.d/00-keyboard.conf" keyboardModel: "pc105"
# Clavier par défaut
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 region: "Europe"
# ============================================================ zone: "Paris"
# 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" localeGenPath: "/etc/locale.gen"
# Timezone GeoIP (détection auto basée sur l'IP)
geoipStyle: "json" geoipStyle: "json"
geoipUrl: "https://geoip.kde.org/v1/calamares" 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 # Étape post-unpackfs : on retire les paquets qui ne servent que dans
# Paquets installés via pacman pendant l'installation # 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 backend: pacman
# Ne pas mettre à jour la base de données pacman (déjà dans le live)
update_db: false update_db: false
update_system: false
operations: operations:
- install: - remove:
# 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:
- calamares - 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" efiSystemPartition: "/boot/efi"
efiSystemPartitionSize: 300 efiSystemPartitionSize: 300M
efiSystemPartitionName: EFI
# Point de montage racine userSwapChoices:
requiredStorage: 20.0 - 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"] availableFileSystemTypes: ["ext4", "btrfs", "xfs", "f2fs"]
# Chiffrement enableLuksAutomatedPartitioning: true
# Activer le chiffrement LUKS allowManualPartitioning: true
allowZfs: true
@@ -1,23 +1,15 @@
# ============================================================ ---
# FWS Linux — modules/services-systemd.conf
# Services systemd activés sur le système installé
# ============================================================
services: services:
# Réseau
- name: NetworkManager - name: NetworkManager
mandatory: true mandatory: true
# DHCP - name: systemd-resolved
- name: dhcpcd mandatory: true
mandatory: false
# Heure synchronisée
- name: systemd-timesyncd - name: systemd-timesyncd
mandatory: true mandatory: true
# Ajoute ici tes services FWS supplémentaires - name: sshd
# - name: mon-service-fws mandatory: false
# mandatory: false
targets: [] targets: []
@@ -1,16 +1,9 @@
# ============================================================ ---
# FWS Linux — modules/unpackfs.conf # Copie le squashfs du live vers le disque cible.
# Copie le système 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: unpack:
# Source : le squashfs de l'ISO FWS - source: "/run/archiso/bootmnt/fws/x86_64/airootfs.sfs"
# Adapte "FWS" selon la valeur de iso_name dans profiledef.sh sourcefs: "squashfs"
- source: /run/archiso/bootmnt/FWS/x86_64/airootfs.sfs
sourcefs: squashfs
destination: "" 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: defaultGroups:
- users - wheel
- lp - audio
- video - video
- network - network
- storage - storage
- wheel
- audio
- optical
- scanner
- power - power
- lp
- scanner
# Autoriser le login automatique
autologinGroup: autologin autologinGroup: autologin
# Sudoers — donne les droits sudo au groupe wheel
sudoersGroup: wheel sudoersGroup: wheel
setRootPassword: true
# Shell par défaut pour les nouveaux utilisateurs doAutologin: false
userShell: /bin/bash userShell: /bin/bash
# Hostname par défaut
hostname:
location: EtcFile
template: "fws-${first}"
# Règles pour les mots de passe
passwordRequirements: passwordRequirements:
minLength: 6 minLength: 6
maxLength: -1 maxLength: -1
nonempty: true nonempty: true
# Permet de définir le même mot de passe pour root et user allowWeakPasswords: false
allowWeakPasswords: false allowWeakPasswordsDefault: false
@@ -1,29 +1,20 @@
# ============================================================ ---
# FWS Linux — modules/welcome.conf showSupportUrl: true
# ============================================================ showKnownIssuesUrl: true
showReleaseNotesUrl: false
showDonateUrl: false
# Afficher les conditions requises avant l'installation
showSupportUrl: true
showKnownIssuesUrl: true
showReleaseNotesUrl: false
showDonateUrl: false
# Vérifications système requises
requirements: requirements:
# Espace disque minimum en MiB requiredStorage: 8.0
requiredStorage: 20.0 requiredRam: 1.5
internetCheckUrl: "https://archlinux.org"
# RAM minimum en MiB check:
requiredRam: 2.0 - storage
- ram
# Vérifier la connexion internet (optionnel) - power
checkInternet: false - root
- screen
# Vérifier si on tourne en live (pas déjà installé) required:
checkForRoot: true - storage
- ram
# Vérifier l'alimentation (AC power) - root
checkPower: true
# Ne bloque pas l'install si pas connecté
internetCheckUrl: "https://cloudflare.com"
@@ -1,21 +1,45 @@
--- ---
componentName: fws # ============================================================
# FWS — Calamares settings
# ============================================================
strings: modules-search: [ local, /usr/lib/calamares/modules ]
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
images: sequence:
productLogo: logo.png - show:
productIcon: logo.png - welcome
productWelcome: logo.png - 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 branding: fws
slideshowAPI: 2
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 #!/bin/sh
# Lancé par startx (cf. /root/.zprofile)
xsetroot -solid "#1a1a2e"
openbox & openbox &
sleep 1 sleep 1
exec calamares exec calamares
+4 -7
View File
@@ -1,8 +1,5 @@
# Fallback si les services systemd n'ont pas démarré Calamares # Démarrage automatique de Xorg + Calamares sur tty1 (autologin root).
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$DISPLAY" ]; then # La session X exécute /root/.xinitrc qui lance Openbox + Calamares.
Xorg :0 vt1 & if [[ "$(tty)" == "/dev/tty1" && -z "$DISPLAY" ]]; then
sleep 2 exec startx -- vt1
DISPLAY=:0 openbox &
sleep 1
DISPLAY=:0 calamares
fi fi
+93 -128
View File
@@ -1,144 +1,109 @@
alsa-utils # ============================================================
amd-ucode # FWS — paquets de l'ISO live
arch-install-scripts # Objectif : système live bootable + installeur Calamares
archinstall # fonctionnel + jeu minimal d'outils de rescue.
b43-fwcutter # ============================================================
# --- Base système ---
base base
bcachefs-tools base-devel
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
linux linux
linux-atm
linux-firmware linux-firmware
linux-firmware-marvell amd-ucode
livecd-sounds intel-ucode
lsscsi
lvm2 # --- initramfs / archiso ---
lynx
man-db
man-pages
mc
mdadm
memtest86+
memtest86+-efi
mkinitcpio mkinitcpio
mkinitcpio-archiso mkinitcpio-archiso
mkinitcpio-nfs-utils
mmc-utils # --- Boot ---
modemmanager syslinux
mtools grub
nano efibootmgr
nbd edk2-shell
ndisc6 os-prober
fastfetch memtest86+
nfs-utils memtest86+-efi
nilfs-utils
nmap # --- Filesystems ---
btrfs-progs
e2fsprogs
exfatprogs
xfsprogs
f2fs-tools
dosfstools
ntfs-3g ntfs-3g
nvme-cli cryptsetup
openbox lvm2
open-iscsi mdadm
open-vm-tools
openconnect # --- Outils disque ---
openpgp-card-tools
openssh
openvpn
partclone
parted parted
partimage gptfdisk
pcsclite fatresize
ppp testdisk
pptpclient
pv
qemu-guest-agent
qt5-base
qt5-svg
qt6-base
refind
reflector
rsync
rxvt-unicode-terminfo
screen
sdparm
sequoia-sq
sg3_utils
smartmontools smartmontools
sof-firmware nvme-cli
squashfs-tools 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 sudo
polkit polkit
polkit-gnome polkit-gnome
syslinux man-db
systemd-resolvconf man-pages
tcpdump arch-install-scripts
terminus-font reflector
testdisk pacman-contrib
tmux
tpm2-tools # --- Hardware ---
tpm2-tss dmidecode
ttf-dejavu
udftools
usb_modeswitch
usbmuxd
usbutils usbutils
vim pciutils
virtualbox-guest-utils-nox fastfetch
vpnc htop
winboat-bin
wireless-regdb # --- Audio (slideshow, optionnel) ---
wireless_tools alsa-utils
wpa_supplicant sof-firmware
wvdial
xdg-utils # --- Xorg + Openbox (pour Calamares) ---
xfsprogs
xl2tpd
xorg-server xorg-server
xorg-xinit xorg-xinit
xorg-xrandr xorg-xrandr
zsh
xorg-xsetroot
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 # FWS — paquets de l'ISO live
arch-install-scripts # Objectif : système live bootable + installeur Calamares
archinstall # fonctionnel + jeu minimal d'outils de rescue.
b43-fwcutter # ============================================================
# --- Base système ---
base base
bcachefs-tools base-devel
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
linux linux
linux-atm
linux-firmware linux-firmware
linux-firmware-marvell amd-ucode
livecd-sounds intel-ucode
lsscsi
lvm2 # --- initramfs / archiso ---
lynx
man-db
man-pages
mc
mdadm
memtest86+
memtest86+-efi
mkinitcpio mkinitcpio
mkinitcpio-archiso mkinitcpio-archiso
mkinitcpio-nfs-utils
mmc-utils # --- Boot ---
modemmanager syslinux
mtools grub
nano efibootmgr
nbd edk2-shell
ndisc6 os-prober
fastfetch memtest86+
nfs-utils memtest86+-efi
nilfs-utils
nmap # --- Filesystems ---
btrfs-progs
e2fsprogs
exfatprogs
xfsprogs
f2fs-tools
dosfstools
ntfs-3g ntfs-3g
nvme-cli cryptsetup
openbox lvm2
open-iscsi mdadm
open-vm-tools
openconnect # --- Outils disque ---
openpgp-card-tools
openssh
openvpn
partclone
parted parted
partimage gptfdisk
pcsclite fatresize
ppp testdisk
pptpclient
pv
qemu-guest-agent
qt5-base
qt5-svg
qt6-base
refind
reflector
rsync
rxvt-unicode-terminfo
screen
sdparm
sequoia-sq
sg3_utils
smartmontools smartmontools
sof-firmware nvme-cli
squashfs-tools 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 sudo
polkit polkit
polkit-gnome polkit-gnome
syslinux man-db
systemd-resolvconf man-pages
tcpdump arch-install-scripts
terminus-font reflector
testdisk pacman-contrib
tmux
tpm2-tools # --- Hardware ---
tpm2-tss dmidecode
ttf-dejavu
udftools
usb_modeswitch
usbmuxd
usbutils usbutils
vim pciutils
virtualbox-guest-utils-nox fastfetch
vpnc htop
winboat-bin
wireless-regdb # --- Audio (slideshow, optionnel) ---
wireless_tools alsa-utils
wpa_supplicant sof-firmware
wvdial
xdg-utils # --- Xorg + Openbox (pour Calamares) ---
xfsprogs
xl2tpd
xorg-server xorg-server
xorg-xinit xorg-xinit
xorg-xrandr xorg-xrandr
zsh
xorg-xsetroot
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
+70 -302
View File
@@ -1,350 +1,118 @@
#!/bin/bash #!/bin/bash
# ============================================================ # ============================================================
# FWS — Setup Calamares + Xorg autostart # FWS — Build des paquets AUR (calamares + winboat-bin)
# v4 — Version stable avec toutes les corrections # 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 set -e
RED='\033[0;31m' AUR_PACKAGES=(calamares winboat-bin)
GREEN='\033[0;32m' DISTRO_NAME="${ARCH_WSL_DISTRO:-Arch}"
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'
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"; } info() { echo -e "${BLUE}==>${NC} $1"; }
success() { echo -e "${GREEN}[OK]${NC} $1"; } success() { echo -e "${GREEN}[OK]${NC} $1"; }
warn() { echo -e "${YELLOW}[!!]${NC} $1"; } warn() { echo -e "${YELLOW}[!!]${NC} $1"; }
error() { echo -e "${RED}[ERR]${NC} $1"; exit 1; } error() { echo -e "${RED}[ERR]${NC} $1"; exit 1; }
step() { echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"; \ step() { echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${CYAN} $1${NC}"; \ echo -e "${CYAN} $1${NC}"
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${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 if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || -n "$WINDIR" ]]; then
IS_GITBASH=true info "Git Bash détecté — bascule dans WSL ($DISTRO_NAME)..."
fi
if $IS_GITBASH; then
info "Git Bash détecté — Recherche de la distro Arch dans WSL..."
export MSYS_NO_PATHCONV=1 export MSYS_NO_PATHCONV=1
export MSYS2_ARG_CONV_EXCL="*" export MSYS2_ARG_CONV_EXCL="*"
ARCH_DISTRO="" if ! wsl.exe -d "$DISTRO_NAME" -u root -- echo ok >/dev/null 2>&1; then
for name in "Arch" "ArchLinux" "archlinux" "arch" "ArchWSL"; do # Auto-détection
if wsl.exe -d "$name" -u root -- echo "ok" > /dev/null 2>&1; then for name in "Arch" "ArchLinux" "archlinux" "arch" "ArchWSL"; do
ARCH_DISTRO="$name"; break if wsl.exe -d "$name" -u root -- echo ok >/dev/null 2>&1; then
fi DISTRO_NAME="$name"; break
done 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 fi
success "Distro : '$ARCH_DISTRO'"
SCRIPT_DIR_WIN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -W)" 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" \ wslpath "$(echo "$SCRIPT_DIR_WIN" | sed 's|/|\\\\|g')/setup-calamares.sh" \
2>/dev/null | tr -d '\r\n') 2>/dev/null | tr -d '\r\n')
MSYS_NO_PATHCONV=1 wsl.exe -d "$DISTRO_NAME" -u root -- bash "$SCRIPT_PATH_WSL"
info "Lancement dans WSL ($ARCH_DISTRO) en root..."
MSYS_NO_PATHCONV=1 wsl.exe -d "$ARCH_DISTRO" -u root -- bash "$SCRIPT_PATH_WSL"
exit 0 exit 0
fi fi
# ============================================================ # ============================================================
# VÉRIFICATIONS # Vérifications
# ============================================================ # ============================================================
if ! command -v pacman &>/dev/null; then error "Pas dans Arch WSL !"; fi command -v pacman >/dev/null || error "pacman introuvable (lance depuis Arch / WSL)"
if [ "$EUID" -ne 0 ]; then exec su -c "bash $0" root; fi [ "$EUID" -eq 0 ] || exec su -c "bash $0" root
success "Arch Linux WSL — root ✓" success "Arch Linux (root) ✓"
# ─── Détection des chemins du projet ────────────────────────
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LOCAL_REPO="$SCRIPT_DIR/local-repo" LOCAL_REPO="$SCRIPT_DIR/local-repo"
BUILD_DIR="/tmp/fws-aur-build" BUILD_DIR="/tmp/fws-aur-build"
BUILD_USER="fwsbuild"
PACMAN_CONF="" # ============================================================
for c in "$SCRIPT_DIR/releng/pacman.conf" \ step "1/4 — Outils de build"
"$SCRIPT_DIR/configs/baseline/pacman.conf" \ # ============================================================
"$SCRIPT_DIR/configs/releng/pacman.conf" \ pacman -Sy --needed --noconfirm base-devel git
"$SCRIPT_DIR/pacman.conf"; do
[ -f "$c" ] && { PACMAN_CONF="$c"; success "pacman.conf : $c"; break; } # ============================================================
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 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" rm -rf "$LOCAL_REPO"
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"
mkdir -p "$LOCAL_REPO" mkdir -p "$LOCAL_REPO"
if ! id "fwsbuild" &>/dev/null; then for pkg in "${AUR_PACKAGES[@]}"; do
useradd -m fwsbuild cp "$BUILD_DIR/$pkg"/*.pkg.tar.zst "$LOCAL_REPO/" \
echo "fwsbuild ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers || error "Paquet $pkg introuvable dans $BUILD_DIR/$pkg"
success "Utilisateur fwsbuild créé" done
fi
mkdir -p "$BUILD_DIR" repo-add "$LOCAL_REPO/fws-local.db.tar.gz" "$LOCAL_REPO"/*.pkg.tar.zst \
chown fwsbuild:fwsbuild "$BUILD_DIR" || error "repo-add a échoué"
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é"
success "Repo local prêt : $LOCAL_REPO" success "Repo local prêt : $LOCAL_REPO"
# ============================================================ # ============================================================
step "ÉTAPE 4 — Nettoyage packages.x86_64" # Nettoyage utilisateur de build
# ============================================================ # ============================================================
# Supprime les paquets invalides/AUR userdel -r "$BUILD_USER" 2>/dev/null || true
for pkg in "mkinitcpio-openswap" "qt5-webengine" \ rm -f /etc/sudoers.d/fwsbuild
"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
# 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 ""
echo -e "${GREEN}╔══════════════════════════════════════════════════╗${NC}" echo -e "${GREEN}╔══════════════════════════════════════════════════╗${NC}"
echo -e "${GREEN} Setup terminé ! Lance maintenant : ${NC}" echo -e "${GREEN}║ Setup terminé. Lance maintenant : ./build.sh${NC}"
echo -e "${GREEN}║ ./build.sh ║${NC}"
echo -e "${GREEN}╚══════════════════════════════════════════════════╝${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 ""