[Cryptech-Commits] [user/sra/sqlite3] 01/01: Switch build method to keep a copy of the current tarball in the repository rather than fetching it every time, both to simplify the build and to avoid a lot of gratuitous re-fetches of the tarball when building under continuous integration or release engineering scripts.

git at cryptech.is git at cryptech.is
Tue Jul 7 17:20:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository user/sra/sqlite3.

commit f71125a0d3df1ec17453212fd5b6e64bf492fbf2
Author: Rob Austein <sra at hactrn.net>
Date:   Tue Jul 7 13:18:21 2015 -0400

    Switch build method to keep a copy of the current tarball in the
    repository rather than fetching it every time, both to simplify the
    build and to avoid a lot of gratuitous re-fetches of the tarball when
    building under continuous integration or release engineering scripts.
---
 .gitignore                     |   1 -
 Checksums                      |   1 -
 GNUmakefile                    |  30 ++++++++++++++++--------------
 README.md                      |   4 +---
 sqlite-autoconf-3080900.tar.gz | Bin 0 -> 2037200 bytes
 5 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index 08d6074..180ebd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
 build
 libsqlite3.a
-sqlite-autoconf-3080900.tar.gz
 sqlite3
 sqlite3.h
diff --git a/Checksums b/Checksums
deleted file mode 100644
index 2ae55f8..0000000
--- a/Checksums
+++ /dev/null
@@ -1 +0,0 @@
-76ebb6392cd2289fbff903af7ff67f3e49bd01ff30544b8028ecededd60269a2  sqlite-autoconf-3080900.tar.gz
diff --git a/GNUmakefile b/GNUmakefile
index 10d5b70..7e7367d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,4 @@
-# (GNU) Makefile to download and build SQLite3 from source with the
-# options we want for PKCS #11.
+# Build SQLite3 from source with the options we want for PKCS #11.
 #
 # Author: Rob Austein
 # Copyright (c) 2015, SUNET
@@ -29,6 +28,16 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+# URL from which we downloaded the source tarball.  SQLite3 uses an
+# oddball version control system I've never head of, and the SQLite3
+# project advises using this pre-processed tarball instead of messing
+# with their original source.  We could download the tarball every
+# time we build rather than stuffing it in our repository, but that
+# generates a lot of fetches during release engineering and continuous
+# integration, which would be a bit anti-social.
+
+URL := http://sqlite.org/2015/sqlite-autoconf-3080900.tar.gz
+
 # Whether to enable threading.  Main reason for being able to turn it
 # off is that gdb on the Novena goes bananas when threading is enabled.
 
@@ -36,7 +45,6 @@ ifndef ENABLE_THREADS
   ENABLE_THREADS := yes
 endif
 
-URL	:= http://sqlite.org/2015/sqlite-autoconf-3080900.tar.gz
 OPTIONS	:= --enable-static --disable-shared --disable-dynamic-extensions CFLAGS=-fPIC LDFLAGS=-fPIC
 
 ifneq "${ENABLE_THREADS}" "yes"
@@ -53,25 +61,14 @@ BUILD	:= ${TOP}/build
 OUTPUT	:= ${BUILD}/sqlite3.h ${BUILD}/.libs/libsqlite3.a ${BUILD}/sqlite3
 TARGETS	:= $(notdir ${OUTPUT})
 
-SHA256SUM := $(firstword $(wildcard /usr/local/bin/sha256sum /usr/local/bin/gsha256sum /usr/bin/sha256sum))
-
 all: ${TARGETS}
 
 clean:
 	rm -rf ${BUILD} ${TARGETS}
 
 distclean: clean
-	rm -f ${TARBALL}
-
-${TARBALL}:
-	wget ${URL}
 
 ${BUILD}/.build_done: ${TARBALL} GNUmakefile
-ifeq "" "${SHA256SUM}"
-	@echo "Couldn't find sha256sum, not verifying distribution checksum"
-else
-	${SHA256SUM} --check Checksums
-endif
 	rm -rf ${BUILD}
 	mkdir ${BUILD}
 	cd ${BUILD}; tar -xf ${TARBALL} --strip-components=1
@@ -81,3 +78,8 @@ endif
 	touch $@
 
 ${TARGETS}: ${BUILD}/.build_done
+
+fetch:
+	wget ${URL}
+
+.PHONY: all clean distclean fetch
diff --git a/README.md b/README.md
index 0205e5d..a0681b3 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,7 @@ SQLite3
 =======
 
 This is a trivial port of the SQLite3 database package to the Cryptech
-environment.  At least for now, this just downloads the source
-package, checks that the SHA-256 digest of the source tarball matches
-a known value, and builds the package with the options we want.
+environment.
 
 If we end up making heavier use of SQLite3 as the project progresses,
 we may need something more elaborate (eg, to enable SQLite3's "bare
diff --git a/sqlite-autoconf-3080900.tar.gz b/sqlite-autoconf-3080900.tar.gz
new file mode 100644
index 0000000..204e086
Binary files /dev/null and b/sqlite-autoconf-3080900.tar.gz differ



More information about the Commits mailing list