index : bootstrap32 | |
Archlinux32 bootstrap scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-02-22 21:41:36 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-02-22 21:41:36 +0100 |
commit | 19862e96e73efe49975c194b71e2eb45f9db7a26 (patch) | |
tree | a9b4316f662e0fb1b0a3b2176731a26787f696fb /build_stage2_package.sh | |
parent | c0d2fbfd31227e114abbd2440a7ac99ee606f1e9 (diff) |
-rwxr-xr-x | build_stage2_package.sh | 14 |
diff --git a/build_stage2_package.sh b/build_stage2_package.sh index feeb7f0..95ab857 100755 --- a/build_stage2_package.sh +++ b/build_stage2_package.sh @@ -81,18 +81,25 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l # copy all files into the build area on the target machine # (but the package DESCR file) + if test -d "$PACKAGE_DIR"; then find "$PACKAGE_DIR"/* ! -name DESCR \ -exec cp {} . \; fi # execute makepkg on the host, we don't have git on the stage 1 machine (yet) + # we would actually like to have a mode like 'download, and noextract' but + # makepkg is not doing that (see -e and -o options) + makepkg --nobuild + rm -rf "$STAGE2_BUILD/$PACKAGE/src" # copy everything to the stage 1 machine + scp -i $CROSS_HOME/.ssh/id_rsa -rC "$STAGE2_BUILD/$PACKAGE" build@$STAGE1_MACHINE_IP:/build/. # building the actual package + ssh -i $CROSS_HOME/.ssh/id_rsa build@$STAGE1_MACHINE_IP bash -c "'cd $PACKAGE && makepkg --skipchecksums --skippgpcheck --nocheck'" > $PACKAGE.log 2>&1 RES=$? @@ -135,10 +142,15 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l tmp_dir=$(mktemp -d 'tmp.compute-dependencies.0.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT + cd $STAGE2_BUILD || exit 1 mv "$STAGE2_BUILD/$PACKAGE/$PACKAGE.log" "$tmp_dir" cd "$STAGE2_BUILD" || exit 1 rm -rf "$PACKAGE" - scp -i $CROSS_HOME/.ssh/id_rsa -rC build@$STAGE1_MACHINE_IP:/build/"$PACKAGE" "$STAGE2_BUILD/." + ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "'cd /build && tar zcf $PACKAGE.tar.gz $PACKAGE/'" + scp -i $CROSS_HOME/.ssh/id_rsa -rC build@$STAGE1_MACHINE_IP:/build/"$PACKAGE.tar.gz" "$STAGE2_BUILD/." + ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "'cd /build && rm -f $PACKAGE.tar.gz'" + tar zxf "$PACKAGE.tar.gz" + rm -f "$PACKAGE.tar.gz" mv "$tmp_dir/$PACKAGE.log" "$STAGE2_BUILD/$PACKAGE/." mv -vf "$STAGE2_BUILD/$PACKAGE/"*.pkg.tar.xz "$STAGE2_PACKAGES/." |