5 Commits

11 changed files with 228 additions and 102 deletions
+3 -2
View File
@@ -29,9 +29,10 @@ The script is designed for an x86_64 Arch host so it can emulate ARM binaries wi
## Building Your First Image ## Building Your First Image
1. Become root (`sudo -i`) so the script can create loop devices and mount them. 1. Become root (`sudo -i`) so the script can create loop devices and mount them.
2. From `/path/to/stormux`, run: 2. From the Pi builder directory, run:
```bash ```bash
sudo ./pi4/build/build-stormux.sh -l en_US -s 8 cd /path/to/stormux/pi4/build
sudo ./build-stormux.sh -l en_US -s 8
``` ```
- The builder creates an aarch64 image for Raspberry Pi 4/5-class systems. - The builder creates an aarch64 image for Raspberry Pi 4/5-class systems.
- `-l en_US` selects the locale (use `es_ES`, `fr_FR`, etc.). - `-l en_US` selects the locale (use `es_ES`, `fr_FR`, etc.).
+52 -6
View File
@@ -121,14 +121,28 @@ finish_build() {
exit 0 exit 0
} }
copy_rhvoice_english_fixes() { install_rhvoice_english_fixes() {
local sourceDir="../files/etc/RHVoice/dicts/English" local rhvoiceRepo="https://git.stormux.org/storm/rhvoice-english"
local targetDir="/mnt/etc/RHVoice/dicts/English" local targetDir="/mnt/etc/RHVoice/dicts/English"
local tempDir
local installStatus=0
if [[ -d "$sourceDir" ]]; then tempDir="$(mktemp -d)"
mkdir -p "$targetDir"
cp -a "$sourceDir/." "$targetDir/" echo "Installing latest RHVoice English dictionary fixes..."
if ! git clone --depth 1 "$rhvoiceRepo" "$tempDir"; then
rm -rf "$tempDir"
return 1
fi fi
mkdir -p "$targetDir"
rm -f "$targetDir/namefix.txt" "$targetDir/wordfix.txt"
if ! cp -a "$tempDir/English/." "$targetDir/"; then
installStatus=1
fi
rm -rf "$tempDir"
return "$installStatus"
} }
# shellcheck disable=SC2329 # install_sas is emitted into the chroot heredoc with declare -f # shellcheck disable=SC2329 # install_sas is emitted into the chroot heredoc with declare -f
@@ -222,6 +236,38 @@ if [ "$(whoami)" != "root" ] ; then
exit 1 exit 1
fi fi
# Refuse to mount the image over an unrelated filesystem already using /mnt.
if ! command -v mountpoint > /dev/null 2>&1; then
echo "Error: mountpoint is required to verify that /mnt is available."
exit 1
fi
if [[ ! -d /mnt || ! -w /mnt ]]; then
echo "Error: /mnt is missing or not writable. Please create or fix permissions."
exit 1
fi
if mountpoint -q /mnt; then
if [[ -t 0 ]]; then
read -rp "/mnt is already mounted. Unmount it to continue? [y/N] " answerText
case "$answerText" in
y|Y|yes|YES)
if ! umount /mnt; then
echo "Error: Failed to unmount /mnt."
exit 1
fi
;;
*)
echo "Error: Refusing to proceed while /mnt is mounted."
exit 1
;;
esac
else
echo "Error: /mnt is already mounted. Refusing to proceed in non-interactive mode."
exit 1
fi
fi
# make sure the needed tools are installed # make sure the needed tools are installed
if [[ "$(uname -m)" == "x86_64" ]]; then if [[ "$(uname -m)" == "x86_64" ]]; then
if ! pacman -Q qemu-user-static &> /dev/null ; then if ! pacman -Q qemu-user-static &> /dev/null ; then
@@ -549,7 +595,7 @@ sed -i '/^DisableSandbox/d' /etc/pacman.conf
EOF EOF
copy_rhvoice_english_fixes install_rhvoice_english_fixes
# Copy skel files to stormux user home (after user rename in chroot) # Copy skel files to stormux user home (after user rename in chroot)
find ../files/etc/skel/ -mindepth 1 -exec cp -rv "{}" /mnt/home/stormux/ \; find ../files/etc/skel/ -mindepth 1 -exec cp -rv "{}" /mnt/home/stormux/ \;
@@ -1,4 +0,0 @@
bifrost=buyfraust
danestange=dainstanggey
stange=stangey
kde=kaydeee
@@ -1,19 +0,0 @@
asus=aysus
certificate=cirtifficate
douche=doosh*
espeak=easpeak*
freenginx=freeenginex
git=ghit*
github=ghittehub
gitea=ghittee
jolla=yolla
jenux=jennux
lightnin=lighttnin
nginx=enginex
rhvoice=ahraychvoice
shit=shitt
sync=sink*
timezone=timezoan
vinux=vinnux
wench=wentch*
youngin=younggin*
+2 -2
View File
@@ -86,7 +86,7 @@ The Stormux repository key is also embedded in the ISO at `/usr/share/stormux/st
- **Fenrir screen reader** starts automatically (not speakup) - **Fenrir screen reader** starts automatically (not speakup)
- **Pipewire audio** properly initialized before Fenrir starts - **Pipewire audio** properly initialized before Fenrir starts
- **Speech-dispatcher** integration for speech synthesis - **Speech-dispatcher** integration for speech synthesis
- GRUB plays an audible tune on boot for accessibility - The UEFI systemd-boot menu enables its audible beep
- Boot menu defaults to accessible entry - Boot menu defaults to accessible entry
- Service startup order ensures audio is ready before screen reader - Service startup order ensures audio is ready before screen reader
- First-login live-environment setup calibrates volume, checks networking and time, then offers to run the installer - First-login live-environment setup calibrates volume, checks networking and time, then offers to run the installer
@@ -165,7 +165,7 @@ Edit `packages.x86_64` and add package names (one per line).
### Modifying Boot Configuration ### Modifying Boot Configuration
- BIOS: Edit `syslinux/archiso_sys-linux.cfg` - BIOS: Edit `syslinux/archiso_sys-linux.cfg`
- UEFI: Edit `grub/grub.cfg` - UEFI: Edit `efiboot/loader/loader.conf` and entries under `efiboot/loader/entries/`
### Adding Overlay Files ### Adding Overlay Files
@@ -1,4 +0,0 @@
bifrost=buyfraust
danestange=dainstanggey
stange=stangey
kde=kaydeee
@@ -1,19 +0,0 @@
asus=aysus
certificate=cirtifficate
douche=doosh*
espeak=easpeak*
freenginx=freeenginex
git=ghit*
github=ghittehub
gitea=ghittee
jolla=yolla
jenux=jennux
lightnin=lighttnin
nginx=enginex
rhvoice=ahraychvoice
shit=shitt
sync=sink*
timezone=timezoan
vinux=vinnux
wench=wentch*
youngin=younggin*
+4
View File
@@ -76,6 +76,10 @@ LocalFileSigLevel = Optional
#[core-testing] #[core-testing]
#Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
[xlibre]
SigLevel = Required DatabaseOptional
Server = https://packages.xlibre.net/arch/stable/$arch
[stormux] [stormux]
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
Server = https://packages.stormux.org/$arch Server = https://packages.stormux.org/$arch
@@ -28,10 +28,53 @@ install_sas() {
return "$installStatus" return "$installStatus"
} }
install_rhvoice_english_fixes() {
local rhvoiceRepo="https://git.stormux.org/storm/rhvoice-english"
local targetDir="/etc/RHVoice/dicts/English"
local tempDir
local installStatus=0
tempDir="$(mktemp -d)"
echo "Installing latest RHVoice English dictionary fixes..."
if ! git clone --depth 1 "$rhvoiceRepo" "$tempDir"; then
rm -rf "$tempDir"
return 1
fi
mkdir -p "$targetDir"
rm -f "$targetDir/namefix.txt" "$targetDir/wordfix.txt"
if ! cp -a "$tempDir/English/." "$targetDir/"; then
installStatus=1
fi
rm -rf "$tempDir"
return "$installStatus"
}
install_xlibre_key() {
local keyUrl="https://xlibre-arch.github.io/xlibre-archlinux.asc"
local keyId="B97F7C613F359424"
local keyFile
keyFile="$(mktemp)"
echo "Adding XLibre repository key..."
if ! curl -fsSL "$keyUrl" -o "$keyFile"; then
rm -f "$keyFile"
return 1
fi
pacman-key --add "$keyFile"
pacman-key --lsign-key "$keyId"
rm -f "$keyFile"
}
# Initialize pacman keyring # Initialize pacman keyring
echo "Initializing pacman keyring..." echo "Initializing pacman keyring..."
pacman-key --init pacman-key --init
pacman-key --populate archlinux pacman-key --populate archlinux
install_xlibre_key
# Add Stormux repository key # Add Stormux repository key
echo "Adding Stormux repository key..." echo "Adding Stormux repository key..."
@@ -49,6 +92,7 @@ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen locale-gen
install_sas install_sas
install_rhvoice_english_fixes
# Enable system services # Enable system services
systemctl enable NetworkManager.service systemctl enable NetworkManager.service
+119 -46
View File
@@ -1286,6 +1286,35 @@ enable_multilib_repo() {
"$pacmanConf" "$pacmanConf"
} }
install_xlibre_key() {
local keyUrl="https://xlibre-arch.github.io/xlibre-archlinux.asc"
local keyId="B97F7C613F359424"
local keyFile
keyFile="$(mktemp)"
log_info "Adding XLibre repository key"
if ! curl -fsSL "$keyUrl" -o "$keyFile"; then
rm -f "$keyFile"
log_error "Could not download XLibre repository key"
return 1
fi
if ! pacman-key --add "$keyFile"; then
rm -f "$keyFile"
log_error "Could not add XLibre repository key"
return 1
fi
if ! pacman-key --lsign-key "$keyId"; then
rm -f "$keyFile"
log_error "Could not locally sign XLibre repository key"
return 1
fi
rm -f "$keyFile"
}
copy_rhvoice_english_fixes() { copy_rhvoice_english_fixes() {
local sourceDir="/etc/RHVoice/dicts/English" local sourceDir="/etc/RHVoice/dicts/English"
local targetDir="$mountPoint/etc/RHVoice/dicts/English" local targetDir="$mountPoint/etc/RHVoice/dicts/English"
@@ -1302,8 +1331,8 @@ copy_rhvoice_english_fixes() {
install_base_system() { install_base_system() {
log_info "=== Installing Base System ===" log_info "=== Installing Base System ==="
# Copy pacman config with Stormux repo # Copy pacman config with XLibre and Stormux repositories
log_info "Configuring pacman with Stormux repository" log_info "Configuring pacman with XLibre and Stormux repositories"
log_info "Configuring package manager" log_info "Configuring package manager"
local copyItems=( local copyItems=(
@@ -1345,31 +1374,39 @@ install_base_system() {
enable_multilib_repo "$mountPoint/etc/pacman.conf" enable_multilib_repo "$mountPoint/etc/pacman.conf"
fi fi
if ! install_xlibre_key; then
return 1
fi
# Define package groups # Define package groups
local basePackages=( local basePackages=(
base base-devel linux linux-firmware base base-devel linux linux-firmware
networkmanager sudo dialog git ii rsync wget networkmanager sudo dialog git ii rsync wget curl
bash-completion cronie openssh bash-completion cronie openssh rng-tools
) )
local audioPackages=( local audioPackages=(
pipewire pipewire-alsa pipewire-pulse pipewire-jack pipewire pipewire-alsa pipewire-pulse pipewire-jack
wireplumber alsa-utils sox wireplumber alsa-utils sox gstreamer
gst-plugins-base gst-plugins-good
alsa-firmware sof-firmware alsa-firmware sof-firmware
bluez bluez-utils bluez bluez-utils
) )
local accessibilityPackages=( local accessibilityPackages=(
espeak-ng rhvoice-voice-bdl speech-dispatcher espeak-ng rhvoice-voice-bdl speech-dispatcher
fenrir brltty fenrir brltty cthulhu
) )
local utilityPackages=( local utilityPackages=(
vi vim nano screen magic-wormhole vi vim nano screen magic-wormhole
man man-pages man-db man-pages
xdg-user-dirs xdg-utils xdg-user-dirs xdg-utils
poppler socat parted poppler socat parted
realtime-privileges realtime-privileges wireless-regdb
python-dbus python-gobject python-msgpack
python-pyenchant python-pyte python-pyperclip
python-tornado
) )
# Stormux-specific packages (installed later in chroot after keyring setup) # Stormux-specific packages (installed later in chroot after keyring setup)
@@ -1385,18 +1422,17 @@ install_base_system() {
if [[ "$hasDesktop" == true ]]; then if [[ "$hasDesktop" == true ]]; then
case "$desktopEnvironment" in case "$desktopEnvironment" in
*) *)
allPackages+=(xlibre-xserver xlibre-input-libinput nodm-dgw brave-bin) allPackages+=(
i38 nodm-dgw xorg-xinit
xlibre-xserver xlibre-input-libinput
xlibre-video-dummy-with-vt xlibre-video-fbdev
)
if [[ "$installSteam" == "yes" ]]; then if [[ "$installSteam" == "yes" ]]; then
allPackages+=(steam) allPackages+=(steam)
fi fi
;;& ;;&
i3) i3)
allPackages+=(i3-wm orca python-psutil lxterminal pluma) allPackages+=(xdotool)
allPackages+=(discount jq libnotify xfce4-notifyd pamixer playerctl)
allPackages+=(python-i3ipc python-wxpython sox yad)
allPackages+=(lxsession magic-wormhole pcmanfm)
allPackages+=(python-gobject python-pillow python-pytesseract scrot tesseract)
allPackages+=(tesseract-data-eng udiskie xorg-setxkbmap xdotool)
;; ;;
esac esac
fi fi
@@ -1425,10 +1461,10 @@ install_base_system() {
# Generate or preserve fstab # Generate or preserve fstab
if [[ "$useExistingMount" == true ]]; then if [[ "$useExistingMount" == true ]]; then
if [[ -s "$mountPoint/etc/fstab" ]]; then if grep -Eq '^[[:space:]]*[^#[:space:]]' "$mountPoint/etc/fstab" 2>/dev/null; then
log_info "Manual mount mode: preserving existing /etc/fstab" log_info "Manual mount mode: preserving existing /etc/fstab"
else else
log_warning "Manual mount mode: /etc/fstab not found, generating one" log_warning "Manual mount mode: /etc/fstab has no filesystem entries, generating one"
genfstab -U "$mountPoint" > "$mountPoint/etc/fstab" genfstab -U "$mountPoint" > "$mountPoint/etc/fstab"
fi fi
else else
@@ -1750,7 +1786,6 @@ systemctl enable NetworkManager.service
systemctl enable brltty.path systemctl enable brltty.path
systemctl enable fenrirscreenreader.service systemctl enable fenrirscreenreader.service
systemctl enable cronie.service systemctl enable cronie.service
systemctl enable ssh-login-monitor.service
# Enable bluetooth if present # Enable bluetooth if present
if ! systemctl enable bluetooth.service; then if ! systemctl enable bluetooth.service; then
@@ -1759,56 +1794,65 @@ fi
# Enable SSH if requested # Enable SSH if requested
if [[ "${enableSsh}" == "yes" ]]; then if [[ "${enableSsh}" == "yes" ]]; then
systemctl enable sshd.service systemctl enable sshd.service ssh-login-monitor.service
echo "SSH server enabled" echo "SSH server enabled"
else
systemctl disable sshd.service ssh-login-monitor.service
systemctl disable sshd.socket 2> /dev/null || true
echo "SSH server disabled"
fi fi
# Setup desktop environment configurations # Setup desktop environment configurations
if [[ "${desktopEnvironment}" == "i3" ]]; then if [[ "${desktopEnvironment}" == "i3" ]]; then
firstUser="${userNames[0]}" desktopUser="${autoLoginUser}"
# Create git directory for better organization # Create git directory for better organization
mkdir -p /home/\$firstUser/git mkdir -p /home/\$desktopUser/git
chown \$firstUser:users /home/\$firstUser/git chown \$desktopUser:users /home/\$desktopUser/git
# Clone I38 to ~/git/I38 # Clone I38 to ~/git/I38
echo "Cloning I38 accessibility configuration..." echo "Cloning I38 accessibility configuration..."
if ! sudo -u \$firstUser git clone https://git.stormux.org/storm/I38 /home/\$firstUser/git/I38; then if ! sudo -u \$desktopUser git clone https://git.stormux.org/storm/I38 /home/\$desktopUser/git/I38; then
echo "WARNING: Failed to clone I38 repository" echo "WARNING: Failed to clone I38 repository"
fi fi
# Run I38 setup to generate accessible i3 configuration # Run I38 setup to generate accessible i3 configuration
if [[ -d /home/\$firstUser/git/I38 ]]; then if [[ -d /home/\$desktopUser/git/I38 ]]; then
echo "Configuring I38 for accessibility..." echo "Configuring I38 for accessibility..."
cd /home/\$firstUser/git/I38 || exit 1 cd /home/\$desktopUser/git/I38 || exit 1
# Ensure xdotool is available for I38 setup if ! sudo -u \$desktopUser ./i38.sh -D; then
if ! command -v xdotool >/dev/null 2>&1; then echo "WARNING: I38 default setup reported an error"
echo "Installing xdotool for I38..."
if ! pacman -Sy --noconfirm --needed xdotool; then
echo "WARNING: Failed to install xdotool for I38 setup"
fi
fi
# Run I38 setup scripts as the user
# -x generates xinitrc and xprofile
# Main script generates i3 config with accessibility features
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true
if ! sudo -u \$firstUser ./i38.sh -x; then
echo "WARNING: I38 xinit/xprofile setup reported an error"
fi
play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true
if ! sudo -u \$firstUser ./i38.sh; then
echo "WARNING: I38 main setup reported an error"
fi fi
cd - > /dev/null || exit 1 cd - > /dev/null || exit 1
fi fi
fi
# Initialize pacman keyring # Initialize pacman keyring
pacman-key --init pacman-key --init
pacman-key --populate archlinux pacman-key --populate archlinux
# Import XLibre key so installed systems keep using the official XLibre repository.
keyFile="\$(mktemp)"
if curl -fsSL https://xlibre-arch.github.io/xlibre-archlinux.asc -o "\$keyFile"; then
if ! pacman-key --add "\$keyFile"; then
echo "ERROR: Could not add XLibre signing key to pacman keyring"
rm -f "\$keyFile"
exit 1
fi
if ! pacman-key --lsign-key B97F7C613F359424; then
echo "ERROR: Could not locally sign XLibre pacman key"
rm -f "\$keyFile"
exit 1
fi
else
echo "ERROR: Could not download XLibre signing key"
rm -f "\$keyFile"
exit 1
fi
rm -f "\$keyFile"
# Import Stormux key if present # Import Stormux key if present
if [[ -f /usr/share/pacman/keyrings/stormux.gpg ]]; then if [[ -f /usr/share/pacman/keyrings/stormux.gpg ]]; then
if ! pacman-key --add /usr/share/pacman/keyrings/stormux.gpg; then if ! pacman-key --add /usr/share/pacman/keyrings/stormux.gpg; then
@@ -1841,7 +1885,11 @@ $pipewireConfigCmd
# Configure nodm for automatic login (only after nodm package is installed) # Configure nodm for automatic login (only after nodm package is installed)
if [[ "${desktopEnvironment}" == "i3" ]]; then if [[ "${desktopEnvironment}" == "i3" ]]; then
if [[ -f /etc/nodm.conf ]]; then if [[ -f /etc/nodm.conf ]]; then
sed -i "s/{user}/${autoLoginUser}/g" /etc/nodm.conf sed -i \
-e "s/{user}/${autoLoginUser}/g" \
-e "s#^NODM_USER=.*#NODM_USER='${autoLoginUser}'#" \
-e "s#^NODM_XSESSION=.*#NODM_XSESSION='/home/${autoLoginUser}/.xinitrc'#" \
/etc/nodm.conf
systemctl enable nodm.service systemctl enable nodm.service
echo "Display manager (nodm) configured for ${autoLoginUser}" echo "Display manager (nodm) configured for ${autoLoginUser}"
else else
@@ -1849,6 +1897,18 @@ if [[ "${desktopEnvironment}" == "i3" ]]; then
fi fi
fi fi
if command -v spd-conf > /dev/null 2>&1; then
spd-conf -n -C || echo "WARNING: Speech Dispatcher system configuration failed"
fi
if [[ -f /etc/speech-dispatcher/speechd.conf ]]; then
if grep -qE '^[[:space:]]*#?[[:space:]]*DefaultModule[[:space:]]+' /etc/speech-dispatcher/speechd.conf; then
sed -i -E 's/^[[:space:]]*#?[[:space:]]*DefaultModule[[:space:]]+.*/DefaultModule rhvoice/' /etc/speech-dispatcher/speechd.conf
else
printf '\nDefaultModule rhvoice\n' >> /etc/speech-dispatcher/speechd.conf
fi
fi
# Create system-wide accessibility configuration # Create system-wide accessibility configuration
cat > /etc/profile.d/stormux-accessibility.sh <<'PROFILE_EOF' cat > /etc/profile.d/stormux-accessibility.sh <<'PROFILE_EOF'
#!/bin/sh #!/bin/sh
@@ -2231,7 +2291,6 @@ else
if [[ "$desktopEnvironment" == "i3" ]]; then if [[ "$desktopEnvironment" == "i3" ]]; then
log " 4. Your i3 desktop is configured with I38 for accessibility" log " 4. Your i3 desktop is configured with I38 for accessibility"
log " - I38 source is available in ~/git/I38 for customization" log " - I38 source is available in ~/git/I38 for customization"
log " - Press Alt+Shift+F1 for I38 help after login"
fi fi
log "" log ""
@@ -2241,7 +2300,21 @@ else
# Play success sound # Play success sound
play_success_sound play_success_sound
finalExitCode=0 finalExitCode=0
promptPoweroff=true
fi
if [[ "${promptPoweroff:-false}" == true ]]; then
echo ""
read -rp "Power off this installation media now? [y/N]: " poweroffChoice
if [[ "$poweroffChoice" =~ ^[Yy]$ ]]; then
log_info "Powering off the installation media"
poweroff
log_warning "Poweroff command failed. To power off later, type: poweroff"
else
log "Leaving the installer. To power off later, type: poweroff"
fi
else
read -rp "Press Enter to exit..."
fi fi
read -rp "Press Enter to exit..."
exit "$finalExitCode" exit "$finalExitCode"
+4
View File
@@ -76,6 +76,10 @@ LocalFileSigLevel = Optional
#[core-testing] #[core-testing]
#Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
[xlibre]
SigLevel = Required DatabaseOptional
Server = https://packages.xlibre.net/arch/stable/$arch
[stormux] [stormux]
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
Server = https://packages.stormux.org/$arch Server = https://packages.stormux.org/$arch