From 5d1ee56a3ac9ed3096bde7ed5a778df64fb995f9 Mon Sep 17 00:00:00 2001 From: --global Date: Mon, 23 Sep 2024 20:38:21 +0200 Subject: [PATCH] Rework archzfs by moving mirrors to dedicated mirrorlist --- .gitignore | 1 + bin/installation.sh | 48 +++++++++++++-------------------------------- build.sh | 14 +++++++++---- 3 files changed, 25 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index a96ebc1..9047423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build.sh.log configuration/*.sh dynamic_data/* +software/ diff --git a/bin/installation.sh b/bin/installation.sh index 3599b72..f8b4565 100755 --- a/bin/installation.sh +++ b/bin/installation.sh @@ -238,12 +238,17 @@ function _initialize_archzfs () pacman-key -r DDF7DB817396A49B2A2723F7403BD972F75D9D76 pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76 - #adding repository - cat >> /etc/pacman.conf <<"DELIM" -[archzfs] + #creating mirrorlist + cat >> /etc/pacman.d/archzfs <<"DELIM" Server = http://archzfs.com/archzfs/x86_64 Server = http://mirror.sum7.eu/archlinux/archzfs/archzfs/x86_64 Server = https://mirror.biocrafting.net/archlinux/archzfs/archzfs/x86_64 +DELIM + + #adding repository + cat >> /etc/pacman.conf <<"DELIM" +[archzfs] +Include = /etc/pacman.d/archzfs DELIM #updating packages @@ -689,34 +694,6 @@ DELIM _echo_if_be_verbose " Chroot and configure system" arch-chroot /mnt /bin/bash -xe <> /etc/pacman.conf <<"EOSF" -||||||| 6049dc2 - _echo_if_be_verbose ":: Chroot and configure system" - arch-chroot /mnt /bin/bash -xe <> /etc/pacman.conf <<"EOSF" -======= - _echo_if_be_verbose ":: Chroot and configure system" - arch-chroot /mnt /bin/bash -xe <> /etc/pacman.conf <<"EOSF" ->>>>>>> b4746763ae94d6b9bf73864bae34181e15a6f2b3 -[archzfs] +cat >> /etc/pacman.d/archzfs <<"EOSF" Server = http://archzfs.com/archzfs/x86_64 Server = http://mirror.sum7.eu/archlinux/archzfs/archzfs/x86_64 Server = https://mirror.biocrafting.net/archlinux/archzfs/archzfs/x86_64 +EOSF + +cat >> /etc/pacman.conf <<"EOSF" +[archzfs] +Include = /etc/pacman.d/archzfs EOSF pacman -Syu --noconfirm zfs-utils diff --git a/build.sh b/build.sh index c11069e..3bac2a9 100755 --- a/build.sh +++ b/build.sh @@ -107,12 +107,14 @@ function add_packages_and_repository () local REPO_INDEX_OR_EMPTY_STRING local PATH_TO_THE_PACKAGES_FILE local PATH_TO_THE_PACMAN_CONF_FILE + local PATH_TO_THE_PACMAN_D_ARCHZFS_FILE PATH_TO_THE_ARCHLIVE=${1:-""} REPO_INDEX_OR_EMPTY_STRING=${2:-""} PATH_TO_THE_PACKAGES_FILE="${PATH_TO_THE_ARCHLIVE}/packages.x86_64" PATH_TO_THE_PACMAN_CONF_FILE="${PATH_TO_THE_ARCHLIVE}/pacman.conf" + PATH_TO_THE_PACMAN_D_ARCHZFS_FILE="${PATH_TO_THE_ARCHLIVE}/pacman.d/archzfs" #eo: variable #bo: argument validation @@ -177,14 +179,18 @@ function add_packages_and_repository () if [[ ${IS_DRY_RUN} -ne 1 ]]; then - _echo_if_be_verbose " Adding archzfs repositories to PATH_TO_THE_PACMAN_CONF_FILE >>${PATH_TO_THE_PACMAN_CONF_FILE}<<." + _echo_if_be_verbose " Creating archzfs mirrorlist file >>${PATH_TO_THE_PACMAN_D_ARCHZFS_FILE}<<." #bo: adding repository + echo "Server = http://archzfs.com/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_D_ARCHZFS_FILE} + echo "Server = http://mirror.sum7.eu/archlinux/archzfs/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_D_ARCHZFS_FILE} + echo "Server = https://mirror.biocrafting.net/archlinux/archzfs/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_D_ARCHZFS_FILE} + + _echo_if_be_verbose " Adding archzfs repositories to PATH_TO_THE_PACMAN_CONF_FILE >>${PATH_TO_THE_PACMAN_CONF_FILE}<<." + echo "" >> ${PATH_TO_THE_PACMAN_CONF_FILE} echo "[archzfs]" >> ${PATH_TO_THE_PACMAN_CONF_FILE} - echo "Server = http://archzfs.com/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_CONF_FILE} - echo "Server = http://mirror.sum7.eu/archlinux/archzfs/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_CONF_FILE} - echo "Server = https://mirror.biocrafting.net/archlinux/archzfs/\$repo/\$arch" >> ${PATH_TO_THE_PACMAN_CONF_FILE} + echo "Include = /etc/pacman.d/archzfs" >> ${PATH_TO_THE_PACMAN_CONF_FILE} #eo: adding repository _echo_if_be_verbose " Adding packages."