From 31ef2cff92b2dc6781e6549e07ab99a2b99a9fdb Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 23 Jun 2016 13:42:05 -0400 Subject: Whack with club until builds under pbuilder for Debian Jessie and Ubuntu Xenial. Drop use of private sqlite3 library, probably not needed anywhere, certainly not on Debian or Ubuntu. Handling of version number of shared library (libpkcs11.so.N) is wrong, right now we just use .0, need to sort out where that version number comes from in this wonderful multi-repository universe. --- .gitmodules | 3 --- Makefile | 44 +++++++++++++++++++++----------------------- sw/Makefile | 4 ++-- sw/debian/control | 4 ++-- sw/libhal | 2 +- sw/pkcs11 | 2 +- sw/thirdparty/libtfm | 2 +- sw/thirdparty/sqlite3 | 1 - 8 files changed, 28 insertions(+), 34 deletions(-) delete mode 160000 sw/thirdparty/sqlite3 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 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 index 52f1eb5..bf50cf8 160000 --- a/sw/libhal +++ b/sw/libhal @@ -1 +1 @@ -Subproject commit 52f1eb5c3dccd47d2434e0c7a302c23363790e1d +Subproject commit bf50cf8a7817274a7fb5e02d09a53598e168e22c diff --git a/sw/pkcs11 b/sw/pkcs11 index 6e7aabc..ea4c71c 160000 --- a/sw/pkcs11 +++ b/sw/pkcs11 @@ -1 +1 @@ -Subproject commit 6e7aabc780ff9f70bf05d41b97cc973451e0b2ee +Subproject commit ea4c71c075df677cd9f559ca06c79e9202630510 diff --git a/sw/thirdparty/libtfm b/sw/thirdparty/libtfm index 357ca59..7bbbb68 160000 --- a/sw/thirdparty/libtfm +++ b/sw/thirdparty/libtfm @@ -1 +1 @@ -Subproject commit 357ca59060848fb72367b67ccae137d66de6fe34 +Subproject commit 7bbbb682d2557d7aeba63709a27838b36055db26 diff --git a/sw/thirdparty/sqlite3 b/sw/thirdparty/sqlite3 deleted file mode 160000 index be705c3..0000000 --- a/sw/thirdparty/sqlite3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit be705c3aecaf201b7f9c649cfed01e38e73c8f68 -- cgit v1.2.3