diff --git a/molecules/arm-base.common b/molecules/arm-base.common index 658ced4..e65ddfe 100644 --- a/molecules/arm-base.common +++ b/molecules/arm-base.common @@ -12,7 +12,7 @@ execution_strategy: chroot_to_mmc # IMAGE_NAME = name of the final MMC image # DESTINATION_IMAGE_DIR = path to the destination image directory # CHROOT_DIR = path pointing to the chroot -# outer_source_chroot_script: /some/path.sh +outer_source_chroot_script: ${SABAYON_MOLECULE_HOME:-/sabayon}/scripts/outer_source_chroot_script_arm.sh # Inner source chroot script. Called from inside the source_chroot. # Can be used to spawn package updates inside the chroot. diff --git a/scripts/inner_source_chroot_update.sh b/scripts/inner_source_chroot_update.sh index fa5b5c8..84e3462 100755 --- a/scripts/inner_source_chroot_update.sh +++ b/scripts/inner_source_chroot_update.sh @@ -1,5 +1,7 @@ #!/bin/bash +TARGET="${1}" + /usr/sbin/env-update . /etc/profile @@ -118,14 +120,17 @@ for conf in 00-sabayon.package.use 00-sabayon.package.mask \ fi done -# Update /usr/portage/profiles -# This is actually not strictly needed but several -# gentoo tools expect to find valid /etc/make.profile symlink -# This part is best effort, if it will be able to complete -# correctly, fine. -# For a list of mirrors, see: http://www.gentoo.org/main/en/mirrors-rsync.xml -RSYNC_URI="rsync://rsync.at.gentoo.org/gentoo-portage/profiles" -PROFILES_DIR="/usr/portage/profiles" -safe_run rsync -av -H -A -X --delete-during "${RSYNC_URI}/" "${PROFILES_DIR}/" +# qemu-user arm has problems with rsync, deadlocks? +if [ "${TARGET}" != "arm" ]; then + # Update /usr/portage/profiles + # This is actually not strictly needed but several + # gentoo tools expect to find valid /etc/make.profile symlink + # This part is best effort, if it will be able to complete + # correctly, fine. + # For a list of mirrors, see: http://www.gentoo.org/main/en/mirrors-rsync.xml + RSYNC_URI="rsync://rsync.at.gentoo.org/gentoo-portage/profiles" + PROFILES_DIR="/usr/portage/profiles" + safe_run rsync -av -H -A -X --delete-during "${RSYNC_URI}/" "${PROFILES_DIR}/" +fi equo query list installed -qv > /etc/sabayon-pkglist diff --git a/scripts/iso_build.sh b/scripts/iso_build.sh index 10bdbf4..03f9138 100755 --- a/scripts/iso_build.sh +++ b/scripts/iso_build.sh @@ -377,7 +377,7 @@ build_sabayon() { dst="${DAILY_TMPDIR}/${ARM_SOURCE_SPECS[i]}" cp "${src}" "${dst}" -p || return 1 echo >> "${dst}" - echo "inner_source_chroot_script: ${inner_chroot}" >> "${dst}" + echo "inner_source_chroot_script: ${inner_chroot} arm" >> "${dst}" # tweak iso image name sed -i "s/image_name:.*/image_name: ${ARM_SOURCE_SPECS_IMG[i]}/" \ diff --git a/scripts/outer_source_chroot_script_arm.sh b/scripts/outer_source_chroot_script_arm.sh new file mode 100755 index 0000000..ab76dd8 --- /dev/null +++ b/scripts/outer_source_chroot_script_arm.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +/usr/sbin/env-update +. /etc/profile + +# Execute this here due to technical problems with qemu-user + +# Update /usr/portage/profiles +# This is actually not strictly needed but several +# gentoo tools expect to find valid /etc/make.profile symlink +# This part is best effort, if it will be able to complete +# correctly, fine. +# For a list of mirrors, see: http://www.gentoo.org/main/en/mirrors-rsync.xml +RSYNC_URI="rsync://rsync.at.gentoo.org/gentoo-portage/profiles" +PROFILES_DIR="${CHROOT_DIR}/usr/portage/profiles" +for x in $(seq 5); do + rsync -av -H -A -X --delete-during "${RSYNC_URI}/" "${PROFILES_DIR}/" && break + sleep 1m || exit 1 +done + +exit 0