aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Makefile44
-rw-r--r--sw/Makefile4
-rw-r--r--sw/debian/control4
m---------sw/libhal0
m---------sw/pkcs110
m---------sw/thirdparty/libtfm0
m---------sw/thirdparty/sqlite30
8 files changed, 25 insertions, 30 deletions
diff --git a/.gitmodules b/.gitmodules
index cb4501d..f24e2a2 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,6 +7,3 @@
[submodule "sw/thirdparty/libtfm"]
path = sw/thirdparty/libtfm
url = https://git.cryptech.is/sw/thirdparty/libtfm.git
-[submodule "sw/thirdparty/sqlite3"]
- path = sw/thirdparty/sqlite3
- url = https://git.cryptech.is/sw/thirdparty/sqlite3.git
diff --git a/Makefile b/Makefile
index 8135639..b4f03d2 100644
--- a/Makefile
+++ b/Makefile
@@ -15,19 +15,20 @@ DCH = test -f debian/changelog || \
dch --create --package cryptech-alpha --newversion '${CRYPTECH_PACKAGE_VERSION}' \
'$(strip Version ${CRYPTECH_VERSION} of software for Cryptech Alpha development board.)'
-REPOSITORY := /home/aptbot/alpha
-GNUPGHOME := /home/aptbot/gnupg
-CODENAME := wheezy
-REPO_UMASK := 002
-UPLOAD_USER := aptbot
-UPLOAD_URI := rsync://apt.cryptech.is/alpha/
+export GNUPGHOME := /home/aptbot/gnupg
-export GNUPGHOME
+REPO_BASE := /home/aptbot/alpha
+REPO_UMASK := 002
+PBUILDER_BASE := ${HOME}/pbuilder
+PBUILDER_TARGETS := debian/jessie/i386 debian/jessie/amd64 ubuntu/xenial/i386 ubuntu/xenial/amd64
+
+REPO_UPLOAD_USER := aptbot
+REPO_UPLOAD_URI := rsync://apt.cryptech.is/alpha/
all: init source pbuilder homebrew
-enchilada: all reprepro upload
+enchilada: all upload
init:
git submodule update --init --recursive
@@ -43,23 +44,20 @@ source:
cd sw; ${DCH}
cd sw; debuild -S -uc -us
-# Maybe use pdebuild here? Have full-blown multi-arch multi-dist
-# pbuilder example for another project, but something simpler would be
-# nice....
-
pbuilder:
- cd sw; debuild -b -uc -us
-
-reprepro: ${REPOSITORY}/conf/distributions ${REPOSITORY}/conf/options
- umask ${REPO_UMASK}; for f in *.changes; do reprepro -b ${REPOSITORY} include ${CODENAME} $$f; done
-
-${REPOSITORY}/conf/distributions ${REPOSITORY}/conf/options:
- install -D reprepro-conf/$(notdir $@) ${REPOSITORY}/conf/$(notdir $@)
+ rm -f ${PBUILDER_BASE}/*result/*
+ umask ${REPO_UMASK}; \
+ for target in ${PBUILDER_TARGETS}; do echo $$target | tr '/' ' '; done | \
+ while read dist code arch; do \
+ reprepro -b ${REPO_BASE}/$$dist -A $$arch list $$code cryptech-alpha | awk '{v = $$3} END {exit v != ${CRYPTECH_PACKAGE_VERSION}}' && continue; \
+ pbuilder-dist $$code $$arch build cryptech-alpha_${CRYPTECH_PACKAGE_VERSION}.dsc; \
+ reprepro -b ${REPO_BASE}/$$dist include $$code ${PBUILDER_BASE}/$${code}-$${arch}_result/cryptech-alpha_${CRYPTECH_PACKAGE_VERSION}_$${arch}.changes; \
+ done
-RSYNC := rsync --rsh 'ssh -l ${UPLOAD_USER}' --archive --itemize-changes
+RSYNC := rsync --rsh 'ssh -l ${REPO_UPLOAD_USER}' --archive --itemize-changes
upload:
- ${RSYNC} --ignore-existing ${REPOSITORY}/ ${UPLOAD_URI}
- ${RSYNC} --delete --delete-delay ${REPOSITORY}/ ${UPLOAD_URI}
+ ${RSYNC} --ignore-existing ${REPO_BASE}/ ${REPO_UPLOAD_URI}
+ ${RSYNC} --delete --delete-delay ${REPO_BASE}/ ${REPO_UPLOAD_URI}
-.PHONY: all init clean source pbuilder homebrew reprepro upload enchilada sandblast
+.PHONY: all init clean source pbuilder homebrew upload enchilada sandblast
diff --git a/sw/Makefile b/sw/Makefile
index 4b494a6..9fd3c72 100644
--- a/sw/Makefile
+++ b/sw/Makefile
@@ -1,17 +1,17 @@
# Makefile to build Debian package for Cryptech Alpha board software
all:
- cd thirdparty/sqlite3; ${MAKE}
cd thirdparty/libtfm; ${MAKE}
cd libhal; ${MAKE} daemon
cd pkcs11; ${MAKE}
clean distclean:
- for d in thirdparty/libtfm libhal thirdparty/sqlite3 pkcs11; do (cd $$d && ${MAKE} $@); done
+ for d in thirdparty/libtfm libhal pkcs11; do (cd $$d && ${MAKE} $@); done
install: all
install -m 644 -D pkcs11/libpkcs11.so ${DESTDIR}/usr/lib/libpkcs11.so
install -D pkcs11/p11util ${DESTDIR}/usr/sbin/p11util
install -D libhal/cryptech_rpcd ${DESTDIR}/usr/sbin/cryptech_rpcd
+ ln -s libpkcs11.so ${DESTDIR}/usr/lib/libpkcs11.so.0
# Might also want to install the firmware tarball, scripts to use it, ....
diff --git a/sw/debian/control b/sw/debian/control
index d7440f8..8ae25b9 100644
--- a/sw/debian/control
+++ b/sw/debian/control
@@ -3,12 +3,12 @@ Maintainer: APT Builder Robot <aptbot@cryptech.is>
Section: misc
Priority: optional
Standards-Version: 3.9.6
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), libsqlite3-0, libsqlite3-dev, python (>= 2.7), python-yaml
Homepage: http://trac.cryptech.is/wiki
Package: cryptech-alpha
Architecture: any
-Depends: libc6 (>= 2.13), ${misc:Depends}
+Depends: libc6 (>= 2.13), ${misc:Depends}, libsqlite3-0
Description: Cryptech open-source crypto software
"cryptech-alpha" contains software for use with the Cryptech Project
"Alpha" development board.
diff --git a/sw/libhal b/sw/libhal
-Subproject 52f1eb5c3dccd47d2434e0c7a302c23363790e1
+Subproject bf50cf8a7817274a7fb5e02d09a53598e168e22
diff --git a/sw/pkcs11 b/sw/pkcs11
-Subproject 6e7aabc780ff9f70bf05d41b97cc973451e0b2e
+Subproject ea4c71c075df677cd9f559ca06c79e920263051
diff --git a/sw/thirdparty/libtfm b/sw/thirdparty/libtfm
-Subproject 357ca59060848fb72367b67ccae137d66de6fe3
+Subproject 7bbbb682d2557d7aeba63709a27838b36055db2
diff --git a/sw/thirdparty/sqlite3 b/sw/thirdparty/sqlite3
deleted file mode 160000
-Subproject be705c3aecaf201b7f9c649cfed01e38e73c8f6