From 99a944f903552c10112f3ab6bc3e753646269ea1 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 15 Jul 2026 16:05:27 -0400 Subject: [PATCH] Use official xlibre repository on x86_64 systems. This hopefully means less packages for me to maintain for 2 systems. --- x86_64/airootfs/etc/pacman.conf | 4 ++ x86_64/airootfs/root/customize_airootfs.sh | 19 +++++++ x86_64/airootfs/usr/local/bin/install-stormux | 57 ++++++++++++++++++- x86_64/pacman.conf | 4 ++ 4 files changed, 82 insertions(+), 2 deletions(-) diff --git a/x86_64/airootfs/etc/pacman.conf b/x86_64/airootfs/etc/pacman.conf index 4745275..0868879 100644 --- a/x86_64/airootfs/etc/pacman.conf +++ b/x86_64/airootfs/etc/pacman.conf @@ -76,6 +76,10 @@ LocalFileSigLevel = Optional #[core-testing] #Include = /etc/pacman.d/mirrorlist +[xlibre] +SigLevel = Required DatabaseOptional +Server = https://packages.xlibre.net/arch/stable/$arch + [stormux] SigLevel = Required DatabaseOptional Server = https://packages.stormux.org/$arch diff --git a/x86_64/airootfs/root/customize_airootfs.sh b/x86_64/airootfs/root/customize_airootfs.sh index b7ae680..d9af284 100644 --- a/x86_64/airootfs/root/customize_airootfs.sh +++ b/x86_64/airootfs/root/customize_airootfs.sh @@ -52,10 +52,29 @@ install_rhvoice_english_fixes() { 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 echo "Initializing pacman keyring..." pacman-key --init pacman-key --populate archlinux +install_xlibre_key # Add Stormux repository key echo "Adding Stormux repository key..." diff --git a/x86_64/airootfs/usr/local/bin/install-stormux b/x86_64/airootfs/usr/local/bin/install-stormux index ad0f7bc..73448fb 100755 --- a/x86_64/airootfs/usr/local/bin/install-stormux +++ b/x86_64/airootfs/usr/local/bin/install-stormux @@ -1286,6 +1286,35 @@ enable_multilib_repo() { "$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() { local sourceDir="/etc/RHVoice/dicts/English" local targetDir="$mountPoint/etc/RHVoice/dicts/English" @@ -1302,8 +1331,8 @@ copy_rhvoice_english_fixes() { install_base_system() { log_info "=== Installing Base System ===" - # Copy pacman config with Stormux repo - log_info "Configuring pacman with Stormux repository" + # Copy pacman config with XLibre and Stormux repositories + log_info "Configuring pacman with XLibre and Stormux repositories" log_info "Configuring package manager" local copyItems=( @@ -1345,6 +1374,10 @@ install_base_system() { enable_multilib_repo "$mountPoint/etc/pacman.conf" fi + if ! install_xlibre_key; then + return 1 + fi + # Define package groups local basePackages=( base base-devel linux linux-firmware @@ -1797,6 +1830,26 @@ fi pacman-key --init 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 if [[ -f /usr/share/pacman/keyrings/stormux.gpg ]]; then if ! pacman-key --add /usr/share/pacman/keyrings/stormux.gpg; then diff --git a/x86_64/pacman.conf b/x86_64/pacman.conf index 4745275..0868879 100644 --- a/x86_64/pacman.conf +++ b/x86_64/pacman.conf @@ -76,6 +76,10 @@ LocalFileSigLevel = Optional #[core-testing] #Include = /etc/pacman.d/mirrorlist +[xlibre] +SigLevel = Required DatabaseOptional +Server = https://packages.xlibre.net/arch/stable/$arch + [stormux] SigLevel = Required DatabaseOptional Server = https://packages.stormux.org/$arch