Update xlibre-server to xlibre-xserver.

This commit is contained in:
Storm Dragon
2025-08-23 15:35:54 -04:00
parent 9008788a7d
commit 17cb26ff04
2 changed files with 25 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
install_package() { install_package() {
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once. # If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
# make sure system is up to date # make sure system is up to date
@@ -29,7 +31,8 @@ attention() {
add_stormux_repo() { add_stormux_repo() {
# Check if StormUX repository is already configured # Check if StormUX repository is already configured
if grep -q "packages.stormux.org" /etc/pacman.conf; then if grep -q "\[stormux\]" /etc/pacman.conf; then
msgbox "StormUX repository is already configured."
return 0 return 0
fi fi
@@ -42,34 +45,38 @@ add_stormux_repo() {
fi fi
# Locally sign the key # Locally sign the key
if ! sudo "${sudoFlags[@]}" pacman-key --lsign-key storm_dragon@stormux.org; then if ! sudo "${sudoFlags[@]}" pacman-key --lsign-key 52ADA49000F1FF0456F8AEEFB4CDE1CD56EF8E82; then
msgbox "Failed to sign StormUX repository key." msgbox "Failed to sign StormUX repository key."
return 1 return 1
fi fi
# Add repository to pacman.conf before any AUR-related sections # Add repository to pacman.conf before [core] to give it highest priority
# Create a temporary file with the repository configuration local temp_conf
local temp_conf=$(mktemp) temp_conf=$(mktemp)
local added_repo=false local added_repo=false
while IFS= read -r line; do while IFS= read -r line; do
# Add StormUX repo before any AUR or custom repo sections # Add StormUX repo before [core] section
if [[ "$line" =~ ^\[.*\]$ ]] && [[ ! "$line" =~ ^\[(core|extra|multilib|testing|multilib-testing)\]$ ]] && [[ "$added_repo" == false ]]; then if [[ "$line" == "[core]" ]] && [[ "$added_repo" == false ]]; then
echo "[stormux]" >> "$temp_conf" {
echo "SigLevel = Required" >> "$temp_conf" echo "[stormux]"
echo "Server = https://packages.stormux.org/\$repo/\$arch" >> "$temp_conf" echo "SigLevel = Required DatabaseOptional"
echo "" >> "$temp_conf" echo "Server = https://packages.stormux.org/\$arch"
echo ""
} >> "$temp_conf"
added_repo=true added_repo=true
fi fi
echo "$line" >> "$temp_conf" echo "$line" >> "$temp_conf"
done < /etc/pacman.conf done < /etc/pacman.conf
# If we didn't add it yet (no custom repos found), add it at the end # If we didn't find [core] section, add it at the end
if [[ "$added_repo" == false ]]; then if [[ "$added_repo" == false ]]; then
echo "" >> "$temp_conf" {
echo "[stormux]" >> "$temp_conf" echo ""
echo "SigLevel = Required" >> "$temp_conf" echo "[stormux]"
echo "Server = https://packages.stormux.org/\$repo/\$arch" >> "$temp_conf" echo "SigLevel = Required DatabaseOptional"
echo "Server = https://packages.stormux.org/\$arch"
} >> "$temp_conf"
fi fi
# Replace the original pacman.conf # Replace the original pacman.conf
@@ -87,47 +94,7 @@ add_stormux_repo() {
return 1 return 1
fi fi
msgbox "StormUX repository added successfully!"
return 0 return 0
} }
install_xlibre() {
# Make sure system is up to date
yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu
# Check if we have internet connectivity
if ! ping -c1 stormux.org &>/dev/null; then
msgbox "No internet connection detected. X11Libre installation requires internet access."
return 1
fi
# Add StormUX repository with proper key management
if ! add_stormux_repo; then
msgbox "Failed to add StormUX repository. Installation aborted."
return 1
fi
# Remove conflicting packages
infobox "Removing conflicting Xorg packages..."
sudo "${sudoFlags[@]}" pacman -R --noconfirm xorg-server xf86-input-libinput xf86-video-fbdev 2>/dev/null || true
# Install X11Libre packages from StormUX repository
infobox "Installing X11Libre server and drivers..."
if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm xlibre-server-common xlibre-server-devel; then
msgbox "Failed to install X11Libre server components."
return 1
fi
if ! sudo "${sudoFlags[@]}" pacman -Sdd --noconfirm xlibre-server; then
msgbox "Failed to install X11Libre server main package."
return 1
fi
# Install input and video drivers from StormUX repository
if ! sudo "${sudoFlags[@]}" pacman -S --noconfirm xlibre-input-libinput xlibre-video-dummy-with-vt xlibre-video-fbdev; then
msgbox "Failed to install X11Libre input and video drivers."
return 1
fi
infobox "X11Libre installation completed successfully!"
return 0
}

View File

@@ -25,7 +25,7 @@ esac
./.includes/toggle-screen.sh -n ./.includes/toggle-screen.sh -n
# Install X11Libre and GUI packages # Install X11Libre and GUI packages
install_package ${packages} brave-bin nodm-dgw orca speech-dispatcher xclip xlibre-server xlibre-input-libinput xlibre-video-fbdev xlibre-video-dummy-with-vt install_package ${packages} brave-bin nodm-dgw orca speech-dispatcher xclip xlibre-xserver xlibre-input-libinput xlibre-video-fbdev xlibre-video-dummy-with-vt
# GUI bluetooth manager # GUI bluetooth manager
if [[ "${architecture}" == "aarch64" ]]; then if [[ "${architecture}" == "aarch64" ]]; then