Merge pull request #237 from fsquillace/dev

Dev
This commit is contained in:
Filippo Squillace 2019-12-15 15:46:40 +01:00 committed by GitHub
commit 5b60382ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View file

@ -26,6 +26,5 @@ script:
- sudo -E ${PWD}/bin/junest groot -- ${PWD}/lib/checks/check.sh --run-root-tests
- yes | junest setup --delete
# Disable arm because it fails when exiting from check.sh for apparent no reason
#- JUNEST_HOME=~/.junest-arm junest proot -f -- ./lib/checks/check.sh --skip-aur-tests
#- yes | JUNEST_HOME=~/.junest-arm junest setup --delete
- JUNEST_HOME=~/.junest-arm junest proot --fakeroot -- ${PWD}/lib/checks/check.sh
- yes | JUNEST_HOME=~/.junest-arm junest setup --delete

View file

@ -74,7 +74,8 @@ then
maindir=$(mktemp -d -t ${CMD}.XXXXXXXXXX)
builtin cd ${maindir}
curl -L -J -O -k "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=${aur_package}"
/opt/makepkg/bin/makepkg -sfc --noconfirm
# -A allows to ignore arch for ARM
/opt/makepkg/bin/makepkg -Asfc --noconfirm
pacman --noconfirm -U ${aur_package}*.pkg.tar.xz
pacman --noconfirm -Rsn ${aur_package}

View file

@ -55,7 +55,9 @@ function build_image_env(){
# The archlinux-keyring and libunistring are due to missing dependencies declaration in ARM archlinux
# All the essential executables (ln, mkdir, chown, etc) are in coreutils
# unshare command belongs to util-linux
sudo pacstrap -G -M -d ${maindir}/root pacman coreutils libunistring archlinux-keyring util-linux
local arm_keyring=""
[[ $(uname -m) == *"arm"* ]] && arm_keyring="archlinuxarm-keyring"
sudo pacstrap -G -M -d ${maindir}/root pacman coreutils libunistring archlinux-keyring $arm_keyring util-linux
sudo bash -c "echo 'Server = $DEFAULT_MIRROR' >> ${maindir}/root/etc/pacman.d/mirrorlist"
sudo mkdir -p ${maindir}/root/run/lock
@ -76,8 +78,17 @@ function build_image_env(){
sudo pacman --noconfirm --root ${maindir}/root -Rsn sed gzip
info "Setting up the pacman keyring (this might take a while!)..."
sudo ${maindir}/root/opt/junest/bin/groot -b /dev ${maindir}/root bash -c \
"pacman-key --init; pacman-key --populate archlinux; [ -e /etc/pacman.d/gnupg/S.gpg-agent ] && gpg-connect-agent -S /etc/pacman.d/gnupg/S.gpg-agent killagent /bye"
# gawk command is required for pacman-key
sudo pacman --noconfirm --root ${maindir}/root -S gawk
sudo ${maindir}/root/opt/junest/bin/groot -b /dev ${maindir}/root bash -c '
pacman-key --init;
for keyring_file in /usr/share/pacman/keyrings/*.gpg;
do
keyring=$(basename $keyring_file | cut -f 1 -d ".");
pacman-key --populate $keyring;
done;
[ -e /etc/pacman.d/gnupg/S.gpg-agent ] && gpg-connect-agent -S /etc/pacman.d/gnupg/S.gpg-agent killagent /bye'
sudo pacman --noconfirm --root ${maindir}/root -Rsn gawk
sudo rm ${maindir}/root/var/cache/pacman/pkg/*
# This is needed on system with busybox tar command.