From e5c7c314a7254356c7c779a478061a0567f983fa Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 31 May 2017 23:48:56 +0200 Subject: [PATCH] Add section about reproducible build to README In addition, the build script isn't needed any more. --- README.rst | 9 +++++ build_release_binaries.sh | 69 --------------------------------------- 2 files changed, 9 insertions(+), 69 deletions(-) delete mode 100755 build_release_binaries.sh diff --git a/README.rst b/README.rst index 35cbb0b53..9d6244881 100644 --- a/README.rst +++ b/README.rst @@ -68,6 +68,15 @@ following principles in mind: data should be de-duplicated before it is actually written to the storage back end to save precious backup space. +Reproducible Builds +------------------- + +The binaries released with each restic version starting at 0.6.1 are +[reproducible](https://reproducible-builds.org/), which means that you can +easily reproduce a byte identical version from the source code for that +release. Instructions on how to do that are contained in the +[build repository](https://github.com/restic/build). + News ---- diff --git a/build_release_binaries.sh b/build_release_binaries.sh deleted file mode 100755 index 93d151a0b..000000000 --- a/build_release_binaries.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -set -e - -if [[ -z "$VERSION" ]]; then - echo '$VERSION unset' - exit 1 -fi - -if [[ -n "$(git diff)" ]]; then - echo 'workspace is dirty' - exit 1 -fi - -dir=$(mktemp -d --tmpdir restic-release-XXXXXX) -echo "path is ${dir}" - -for R in \ - darwin/386 \ - darwin/amd64 \ - freebsd/386 \ - freebsd/amd64 \ - freebsd/arm \ - linux/386 \ - linux/amd64 \ - linux/arm \ - linux/arm64 \ - openbsd/386 \ - openbsd/amd64 \ - windows/386 \ - windows/amd64 \ - ; do \ - - OS=$(dirname $R) - ARCH=$(basename $R) - filename=restic_${VERSION}_${OS}_${ARCH} - - if [[ "$OS" == "windows" ]]; then - filename="${filename}.exe" - fi - - echo $filename - - go run build.go --goos $OS --goarch $ARCH --output ${filename} - if [[ "$OS" == "windows" ]]; then - zip ${filename%.exe}.zip ${filename} - rm ${filename} - mv ${filename%.exe}.zip ${dir} - else - bzip2 ${filename} - mv ${filename}.bz2 ${dir} - fi -done - -echo "packing sources" -git archive --format=tar --prefix=restic-$VERSION/ v$VERSION | gzip -n > restic-$VERSION.tar.gz -mv restic-$VERSION.tar.gz ${dir} - -echo "creating checksums" -pushd ${dir} -sha256sum restic_*.{zip,bz2} restic-$VERSION.tar.gz > SHA256SUMS -gpg --armor --detach-sign SHA256SUMS -popd - -echo "creating source signature file" -gpg --armor --detach-sign ${dir}/restic-$VERSION.tar.gz - -echo -echo "done, path is ${dir}"