index : bootstrap32 | |
Archlinux32 bootstrap scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-03-15 11:15:58 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-03-15 11:15:58 +0100 |
commit | 80afdd710922f82171bb9250c33dca18475f42ca (patch) | |
tree | 2c604fc7cd126de2d039021e98356c1344e88a5f /build_stage2_package.sh | |
parent | 69f68ac358363ac31110fa1a1956539be60af313 (diff) |
-rwxr-xr-x | build_stage2_package.sh | 18 |
diff --git a/build_stage2_package.sh b/build_stage2_package.sh index 2b58eff..ab06ba8 100755 --- a/build_stage2_package.sh +++ b/build_stage2_package.sh @@ -49,7 +49,7 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l cp -a "$ARCHLINUX32_PACKAGES/core/$PACKAGE" . ;; *) - print "ERROR: unknown FETCH_METHOD '$FETCH_METHOD'.." >&2 + echo "ERROR: unknown FETCH_METHOD '$FETCH_METHOD'.." >&2 exit 1 esac @@ -99,6 +99,8 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l scp -i $CROSS_HOME/.ssh/id_rsa -rC "$STAGE2_BUILD/$PACKAGE" build@$STAGE1_MACHINE_IP:/build/. # building the actual package + + echo "Building $PACKAGE on target.." ssh -i $CROSS_HOME/.ssh/id_rsa build@$STAGE1_MACHINE_IP bash -c "'cd $PACKAGE && makepkg --skipchecksums --skippgpcheck --nocheck'" > $PACKAGE.log 2>&1 RES=$? @@ -106,6 +108,8 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l tail "$PACKAGE.log" if test $RES = 0; then + + echo "Package $PACKAGE built sucessfully, installing on target.." # copy to our package folder in the first stage chroot @@ -119,10 +123,10 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l # there, packages seem to reappear in old versions) ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "' - rm -rf /var/cache/pacman/pkg/* - rm -rf /packages/$TARGET_CPU/temp.db* - rm -rf /packages/$TARGET_CPU/temp.files* - repo-add /packages/$TARGET_CPU/temp.db.tar.gz /packages/$TARGET_CPU/*pkg.tar.xz +# rm -rf /var/cache/pacman/pkg/* +# rm -rf /packages/$TARGET_CPU/temp.db* +# rm -rf /packages/$TARGET_CPU/temp.files* +# repo-add /packages/$TARGET_CPU/temp.db.tar.gz /packages/$TARGET_CPU/*pkg.tar.xz '" # install onto stage 1 system via pacman @@ -130,7 +134,7 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l if test "$FORCE_INSTALL"; then FORCE="--force" fi - + ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "' # TODO: broken [temp] repo if test \"$ADDITIONAL_INSTALL_PACKAGE\" != \"\"; then @@ -144,6 +148,8 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l # copy packages from target machine and replace our local version with it + echo "Salvaging build environment of $PACKAGE from target back to host.." + tmp_dir=$(mktemp -d 'tmp.compute-dependencies.0.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT |