commit 59aad368f24170654781fd4cd538337b0ec2312c Author: Mike Perry mikeperry-git@torproject.org Date: Tue Jan 27 08:46:08 2015 -0800
Bug 14422: Make incrementals by default.
Also create a "resume" rule to make it easier to resume a build, including remaking incrementals, and update the documentation.
Also remove the -beta rules, as we don't use those. --- gitian/Makefile | 44 ++++++++++---------------------------------- gitian/README.build | 17 +++-------------- gitian/hash-bundles.sh | 23 +++++++++++++++++------ 3 files changed, 30 insertions(+), 54 deletions(-)
diff --git a/gitian/Makefile b/gitian/Makefile index eaa22c2..ea82151 100644 --- a/gitian/Makefile +++ b/gitian/Makefile @@ -1,18 +1,21 @@ TORSOCKS = torsocks
-all: clean prep build +all: clean resume
-nightly: clean prep-nightly build-nightly +nightly: clean resume-nightly
-alpha: clean prep-alpha build-alpha +alpha: clean resume-alpha
-beta: clean prep-beta build-beta +resume: prep build incrementals hash + +resume-nightly: prep-nightly build-nightly + +resume-alpha: prep-alpha build-alpha incrementals-alpha hash-alpha
build: ./mkbundle-linux.sh ./mkbundle-windows.sh ./mkbundle-mac.sh - ./hash-bundles.sh
build-nightly: ./mkbundle-linux.sh versions.nightly @@ -24,22 +27,12 @@ build-alpha: ./mkbundle-linux.sh versions.alpha ./mkbundle-windows.sh versions.alpha ./mkbundle-mac.sh versions.alpha - ./hash-bundles.sh versions.alpha - -build-beta: - ./mkbundle-linux.sh versions.beta - ./mkbundle-windows.sh versions.beta - ./mkbundle-mac.sh versions.beta - ./hash-bundles.sh versions.beta
incrementals: - ../tools/update-responses/gen_incrementals release + ../tools/update-responses/gen_incrementals release || echo 'Warning: could not generate incremental MARs.' >&2
incrementals-alpha: - ../tools/update-responses/gen_incrementals alpha - -incrementals-beta: - ../tools/update-responses/gen_incrementals beta + ../tools/update-responses/gen_incrementals alpha || echo 'Warning: could not generate incremental MARs.' >&2
signmars: ./signmars.sh versions @@ -47,9 +40,6 @@ signmars: signmars-alpha: ./signmars.sh versions.alpha
-signmars-beta: - ./signmars.sh versions.beta - signmars-nightly: ./signmars.sh versions.nightly
@@ -59,8 +49,6 @@ update_responses: update_responses-alpha: ../tools/update-responses/update_responses alpha
-update_responses-beta: - ../tools/update-responses/update_responses beta
hash: ./hash-bundles.sh versions @@ -68,9 +56,6 @@ hash: hash-alpha: ./hash-bundles.sh versions.alpha
-hash-beta: - ./hash-bundles.sh versions.beta - hash-nightly: ./hash-bundles.sh versions.nightly
@@ -83,9 +68,6 @@ sign-alpha: sign-nightly: ./upload-signature.sh versions.nightly
-sign-beta: - $(TORSOCKS) ./upload-signature.sh versions.beta - match: $(TORSOCKS) ./check-match.sh versions
@@ -95,9 +77,6 @@ match-nightly: match-alpha: $(TORSOCKS) ./check-match.sh versions.alpha
-match-beta: - $(TORSOCKS) ./check-match.sh versions.beta - prep: ./check-prerequisites.sh $(TORSOCKS) ./fetch-inputs.sh ../../gitian-builder/inputs/ versions @@ -110,9 +89,6 @@ prep-alpha: ./check-prerequisites.sh $(TORSOCKS) ./fetch-inputs.sh ../../gitian-builder/inputs/ versions.alpha
-prep-beta: - ./check-prerequisites.sh - $(TORSOCKS) ./fetch-inputs.sh ../../gitian-builder/inputs/ versions.beta
clean: clean-utils clean-tor clean-browser clean-pt clean-bundle rm -f ../../gitian-builder/inputs/*.yml diff --git a/gitian/README.build b/gitian/README.build index 4caf690..8d8f008 100644 --- a/gitian/README.build +++ b/gitian/README.build @@ -62,33 +62,22 @@ Detailed Explanation of Scripts: To build beta/alpha/nightly bundles, alternate targets are provided: - nightly: The equivalent to the 'all' rule for nightly packages - alpha: The equivalent to the 'all' rule for alpha packages - - beta: The equivalent to the 'all' rule for beta packages - prep-nightly: The equivalent to the 'prep' rule for nightly packages - prep-alpha: The equivalent to the 'prep' rule for alpha packages - - prep-beta: The equivalent to the 'prep' rule for beta packages - build-nightly: The equivalent to the 'build' rule for nightly packages - build-alpha: The equivalent to the 'build' rule for alpha packages - - build-beta: The equivalent to the 'build' rule for beta packages - sign-nightly: The equivalent to the 'sign' rule for nightly packages - sign-alpha: The equivalent to the 'sign' rule for alpha packages - - sign-beta: The equivalent to the 'sign' rule for beta packages - match-nightly: The equivalent to the 'match' rule for nightly packages - match-alpha: The equivalent to the 'match' rule for alpha packages - - match-beta: The equivalent to the 'match' rule for beta packages - hash-nightly: The equivalent to the 'hash' rule for nightly packages - hash-alpha: The equivalent to the 'hash' rule for alpha packages - - hash-beta: The equivalent to the 'hash' rule for beta packages - incrementals-alpha: The equivalent to the 'incrementals' rule for alpha packages - - incrementals-beta: The equivalent to the 'incrementals' rule for - beta packages - update_responses-alpha: The equivalent to the 'update_responses' rule for alpha packages - - update_responses-beta: The equivalent to the 'update_responses' rule - for beta packages - signmars-nightly: The equivalent to the 'signmars' rule for nightly packages - signmars-alpha: The equivalent to the 'signmars' rule for alpha packages - - signmars-beta: The equivalent to the 'signmars' rule for beta packages
1. check-prerequisites.sh: This script checks if your system is capable of running Gitian, and if it is not, it tells you what you need to do. @@ -156,13 +145,13 @@ Partial Rebuilds:
Each stage leaves build artifacts in ../../gitian-builder/inputs/ for use in later stages. If the artifact files for a given stage are present, that - stage is skipped by a 'make build'. + stage is skipped by a 'make resume'.
No other dependency checking on build stages is performed.
If you wish to rebuild only a given stage, there are several 'make clean-' targets to remove the artifacts for that stage. Running a subsequent - 'make build' after that will rebuild only those targets that have been + 'make resume' after that will rebuild only those targets that have been cleaned, and then re-package everything again as well.
Note that if any of the source inputs, or the Ubuntu buildchain tools, or @@ -178,7 +167,7 @@ Known Issues and Quirks:
1. Sometimes, fresh VM installs can fail. If your build hangs while trying to connect to the target or during the SSH banner, it might be worth - running 'make vmclean && make build' to clean your VM images, but still + running 'make vmclean && make resume' to clean your VM images, but still resume the build process as the component you left off at. Remember, 'make' by itself runs a clean rule that will wipe your previous builds by default. diff --git a/gitian/hash-bundles.sh b/gitian/hash-bundles.sh index 37efdb1..fe04699 100755 --- a/gitian/hash-bundles.sh +++ b/gitian/hash-bundles.sh @@ -24,11 +24,22 @@ sha256sum `ls -1 | grep -v '.incremental.mar$' | sort` > sha256sums.txt if ls -1 | grep -q '.incremental.mar$' then sha256sum `ls -1 | grep '.incremental.mar$' | sort` > sha256sums.incrementals.txt + echo + echo "If this is an official build, you should now sign your result with: " + echo " make sign" + echo + echo "In either case, you can check against any official builds with: " + echo " make match" +else + echo + echo "It appears that this build did not generate any incremental update (.mar) files" + echo + echo "If your goal is to reproduce the entire release, you still need to download" + echo "the mar files from the previous release from the appropriate directory in: " + echo " https://archive.torproject.org/tor-package-archive/torbrowser/" + echo + echo "After that, you will need to make the incremental updates with: " + echo " make incrementals && make hash" fi
-echo -echo "If this is an official build, you should now sign your result with: " -echo " make sign" -echo -echo "In either case, you can check against any official builds with: " -echo " make match" +