Update xlibre-server to xlibre-xserver.
This commit is contained in:
		| @@ -1,3 +1,5 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| install_package() { | ||||
|     # 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 | ||||
| @@ -29,7 +31,8 @@ attention() { | ||||
|  | ||||
| add_stormux_repo() { | ||||
|     # 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 | ||||
|     fi | ||||
|      | ||||
| @@ -42,34 +45,38 @@ add_stormux_repo() { | ||||
|     fi | ||||
|      | ||||
|     # 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." | ||||
|         return 1 | ||||
|     fi | ||||
|      | ||||
|     # Add repository to pacman.conf before any AUR-related sections | ||||
|     # Create a temporary file with the repository configuration | ||||
|     local temp_conf=$(mktemp) | ||||
|     # Add repository to pacman.conf before [core] to give it highest priority | ||||
|     local temp_conf | ||||
|     temp_conf=$(mktemp) | ||||
|     local added_repo=false | ||||
|      | ||||
|     while IFS= read -r line; do | ||||
|         # Add StormUX repo before any AUR or custom repo sections | ||||
|         if [[ "$line" =~ ^\[.*\]$ ]] && [[ ! "$line" =~ ^\[(core|extra|multilib|testing|multilib-testing)\]$ ]] && [[ "$added_repo" == false ]]; then | ||||
|             echo "[stormux]" >> "$temp_conf" | ||||
|             echo "SigLevel = Required" >> "$temp_conf" | ||||
|             echo "Server = https://packages.stormux.org/\$repo/\$arch" >> "$temp_conf" | ||||
|             echo "" >> "$temp_conf" | ||||
|         # Add StormUX repo before [core] section | ||||
|         if [[ "$line" == "[core]" ]] && [[ "$added_repo" == false ]]; then | ||||
|             { | ||||
|                 echo "[stormux]" | ||||
|                 echo "SigLevel = Required DatabaseOptional" | ||||
|                 echo "Server = https://packages.stormux.org/\$arch" | ||||
|                 echo "" | ||||
|             } >> "$temp_conf" | ||||
|             added_repo=true | ||||
|         fi | ||||
|         echo "$line" >> "$temp_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 | ||||
|         echo "" >> "$temp_conf" | ||||
|         echo "[stormux]" >> "$temp_conf" | ||||
|         echo "SigLevel = Required" >> "$temp_conf" | ||||
|         echo "Server = https://packages.stormux.org/\$repo/\$arch" >> "$temp_conf" | ||||
|         { | ||||
|             echo "" | ||||
|             echo "[stormux]" | ||||
|             echo "SigLevel = Required DatabaseOptional" | ||||
|             echo "Server = https://packages.stormux.org/\$arch" | ||||
|         } >> "$temp_conf" | ||||
|     fi | ||||
|      | ||||
|     # Replace the original pacman.conf | ||||
| @@ -87,47 +94,7 @@ add_stormux_repo() { | ||||
|         return 1 | ||||
|     fi | ||||
|      | ||||
|     msgbox "StormUX repository added successfully!" | ||||
|     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 | ||||
| } | ||||
|   | ||||
| @@ -25,7 +25,7 @@ esac | ||||
| ./.includes/toggle-screen.sh -n | ||||
|  | ||||
| # 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 | ||||
| if [[ "${architecture}" == "aarch64" ]]; then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user