diff --git a/lib/core/build.sh b/lib/core/build.sh index b57cce2..e17650a 100644 --- a/lib/core/build.sh +++ b/lib/core/build.sh @@ -8,18 +8,6 @@ # # vim: ft=sh -function _install_pkg_from_aur(){ - local maindir=$1 - local pkgname=$2 - local installname=$3 - mkdir -p ${maindir}/packages/${pkgname} - builtin cd ${maindir}/packages/${pkgname} - $CURL "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=${pkgname}" - [ -z "${installname}" ] || $CURL "https://aur.archlinux.org/cgit/aur.git/plain/${installname}?h=${pkgname}" - makepkg -sfcd - sudo pacman --noconfirm --root ${maindir}/root -U ${pkgname}*.pkg.tar.* -} - function _install_pkg(){ # This function allows to install packages from AUR. # At the moment is not used. @@ -76,11 +64,7 @@ function build_image_env(){ SigLevel = Optional TrustedOnly Server = https://raw.githubusercontent.com/fsquillace/junest-repo/master/any EOT - sudo pacman --noconfirm --config ${maindir}/root/etc/pacman.conf --root ${maindir}/root -Sy sudo-fake groot-git proot-static qemu-user-static-bin-alt - - info "Installing yay..." - sudo pacman --noconfirm -S go - _install_pkg_from_aur ${maindir} "yay" + sudo pacman --noconfirm --config ${maindir}/root/etc/pacman.conf --root ${maindir}/root -Sy sudo-fake groot-git proot-static qemu-user-static-bin-alt yay echo "Generating the metadata info" sudo install -d -m 755 "${maindir}/root/etc/${CMD}" diff --git a/lib/core/common.sh b/lib/core/common.sh index c8cc8a1..113fb14 100644 --- a/lib/core/common.sh +++ b/lib/core/common.sh @@ -25,7 +25,7 @@ JUNEST_TEMPDIR=${JUNEST_TEMPDIR:-/tmp} # The update of the variable PATH ensures that the executables are # found on different locations -PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin +PATH=/usr/bin:/bin:/usr/local/bin:/usr/sbin:/sbin:${HOME}/.local/bin # The executable uname is essential in order to get the architecture # of the host system, so a fallback mechanism cannot be used for it. @@ -53,7 +53,7 @@ fi MAIN_REPO=https://s3-eu-west-1.amazonaws.com/${CMD}-repo ENV_REPO=${MAIN_REPO}/${CMD} -DEFAULT_MIRROR='https://mirrors.kernel.com/archlinux/$repo/os/$arch' +DEFAULT_MIRROR='https://mirror.rackspace.com/archlinux/$repo/os/$arch' ORIGIN_WD=$(pwd) diff --git a/lib/core/setup.sh b/lib/core/setup.sh index 532f2a2..28b04d3 100644 --- a/lib/core/setup.sh +++ b/lib/core/setup.sh @@ -54,7 +54,10 @@ function _setup_env(){ $TAR -zxpf ${imagepath} -C ${JUNEST_HOME} info "${NAME} installed successfully!" echo - info "Please change the pacman mirror URL in /etc/pacman.d/mirrorlist according to your location." + info "Default mirror URL set to: ${DEFAULT_MIRROR}" + info "You can change the pacman mirror URL in /etc/pacman.d/mirrorlist according to your location:" + info " \$EDITOR ${JUNEST_HOME}/etc/pacman.d/mirrorlist" + echo info "Remember to refresh the package databases from the server:" info " pacman -Syy" }