aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-07-12 17:15:18 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-07-12 17:16:42 +0100
commitef5d5bf15910fc5bfe02df2afe9861691a9e4e32 (patch)
treeed5f24a269ab5ae363dbe4d8c4be60110ba2dab7
parent5b44cb159bbc2b46bcc9cd6b8612f7e05d4f3ae5 (diff)
downloadlibrebootfr-ef5d5bf15910fc5bfe02df2afe9861691a9e4e32.tar.gz
librebootfr-ef5d5bf15910fc5bfe02df2afe9861691a9e4e32.zip
download/bucts: Verify checksums of downloaded files
-rw-r--r--docs/maintain/index.html9
-rwxr-xr-xresources/scripts/helpers/download/bucts11
-rw-r--r--resources/scripts/helpers/sha512sums/bucts2
3 files changed, 22 insertions, 0 deletions
diff --git a/docs/maintain/index.html b/docs/maintain/index.html
index 28a585d0..82bdc98a 100644
--- a/docs/maintain/index.html
+++ b/docs/maintain/index.html
@@ -560,6 +560,15 @@
is <i>resources/scripts/helpers/download/bucts</i> and
the build script is <i>resources/scripts/helpers/build/module/bucts</i>.
</p>
+ <p>
+ Note: you will also need to replace the sha512 sums in
+ <i>resources/scripts/helpers/sha512sums/bucts</i>. Do this with
+ an <i>unmodified</i> version of bucts, from the commit that you are using,
+ and make sure that the files/directories beginning with <i>.git</i> do not
+ appear in the list of sha512 checksums. You can generate the list like so:<br/>
+ $ <b>rm -f ../resources/scripts/helpers/sha512sums/bucts</b><br/>
+ $ <b>for i in $(find -type f); do sha512sum &quot;${i}&quot; >> ../resources/scripts/helpers/sha512sums/bucts; done</b>
+ </p>
<p>
<a href="#pagetop">Back to top of page</a>.
diff --git a/resources/scripts/helpers/download/bucts b/resources/scripts/helpers/download/bucts
index 94489656..9b277f2a 100755
--- a/resources/scripts/helpers/download/bucts
+++ b/resources/scripts/helpers/download/bucts
@@ -47,6 +47,17 @@ cd "bucts/"
printf "Patching bucts to not require git for building\n"
git reset --hard dc27919d7a66a6e8685ce07c71aefa4f03ef7c07
+
+# Verify checksums of the downloaded files
+# ------------------------------------------------------------------------------
+
+sha512sum -c "../resources/scripts/helpers/sha512sums/bucts" || (cd "../" && rm -Rf "bucts/" && printf "Invalid checksums for bucts\n" && exit 1)
+
+printf "Valid checksums for bucts\n"
+
+# Apply patches
+# ------------------------------------------------------------------------------
+
git am "../resources/bucts/patch/0001-Makefile-don-t-use-git.patch"
# we're done
diff --git a/resources/scripts/helpers/sha512sums/bucts b/resources/scripts/helpers/sha512sums/bucts
new file mode 100644
index 00000000..8c7f3c71
--- /dev/null
+++ b/resources/scripts/helpers/sha512sums/bucts
@@ -0,0 +1,2 @@
+2507b1d9f8dd51a6d7201bedc460fb8c4ab03ab92710e75dfc18b2e7d23b8d36334bf4ad21a1f701da77afb744f80b11cb20578a910fad9f604ed98c747c6bdd ./bucts.c
+c466d02f0d5c6579110b35ce68f3725c1914005bde2106a414489cb446550776f1c7fecadccc2e2d35f128a73a7ed8a94f05486ed3e984cab0ada6766e6c92b0 ./Makefile