diff --git a/.travis.yml b/.travis.yml index dceb835..38470dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/lib/checks/check.sh b/lib/checks/check.sh index 9ee7505..fb60ff0 100755 --- a/lib/checks/check.sh +++ b/lib/checks/check.sh @@ -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} diff --git a/lib/core/build.sh b/lib/core/build.sh index faf7f08..898551a 100644 --- a/lib/core/build.sh +++ b/lib/core/build.sh @@ -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.