mirror of
https://github.com/fsquillace/junest.git
synced 2026-01-23 02:34:30 +00:00
Change mirrorlist, update the initial message, do not inherit PATH variable and use precompiled yay during build phase
This commit is contained in:
parent
86277fd589
commit
9ecabcd524
3 changed files with 7 additions and 20 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue