From ca854b125a6088b3ee89ddb0927630e5a44911be Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 19 Feb 2009 01:49:30 -0500 Subject: [PATCH] shipping transition script; requiring manual version synchronization between common and the changelog (until we come up with a more general templating build process) --- Makefile | 4 ++-- src/share/common | 2 +- tests/basic | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 59b8887..a8cd4d0 100755 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Makefile for monkeysphere -# (c) 2008 Daniel Kahn Gillmor +# (c) 2008-2009 Daniel Kahn Gillmor # Licensed under GPL v3 or later MONKEYSPHERE_VERSION = `head -n1 packaging/debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/'` @@ -29,7 +29,6 @@ tarball: clean debian-package: tarball tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz - sed -i "s|__VERSION__|$(MONKEYSPHERE_VERSION)|g" monkeysphere-$(MONKEYSPHERE_VERSION)/src/share/common cp -a packaging/debian monkeysphere-$(MONKEYSPHERE_VERSION) (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us) rm -rf monkeysphere-$(MONKEYSPHERE_VERSION) @@ -54,6 +53,7 @@ install: all installman install src/monkeysphere src/keytrans/openpgp2ssh src/keytrans/pem2openpgp $(DESTDIR)$(PREFIX)/bin install src/monkeysphere-host src/monkeysphere-authentication $(DESTDIR)$(PREFIX)/sbin install -m 0644 src/share/common $(DESTDIR)$(PREFIX)/share/monkeysphere + install -m 0644 src/share/transition* $(DESTDIR)$(PREFIX)/share/monkeysphere install -m 0644 src/share/m/* $(DESTDIR)$(PREFIX)/share/monkeysphere/m install -m 0644 src/share/mh/* $(DESTDIR)$(PREFIX)/share/monkeysphere/mh install -m 0644 src/share/ma/* $(DESTDIR)$(PREFIX)/share/monkeysphere/ma diff --git a/src/share/common b/src/share/common index b78f64a..b45363a 100644 --- a/src/share/common +++ b/src/share/common @@ -21,7 +21,7 @@ SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"} export SYSCONFIGDIR # monkeysphere version -VERSION=__VERSION__ +VERSION=0.23~pre ######################################################################## ### UTILITY FUNCTIONS diff --git a/tests/basic b/tests/basic index 9ae9c1c..dea393f 100755 --- a/tests/basic +++ b/tests/basic @@ -26,6 +26,7 @@ source "$TESTDIR"/common ## test has *more* requirements than plain ol' monkeysphere: which socat >/dev/null || { echo "You must have socat installed to run this test." ; exit 1; } + ## FIXME: other checks? ###################################################################### @@ -123,6 +124,21 @@ export SOCKET="$TEMPDIR"/ssh-socket # *anything* with any running X11 session. export DISPLAY=monkeys +## make sure that the version number matches the debian changelog +## (don't bother if this is being run from the tests). + +if [ -f "$TESTDIR"/../packaging/debian/changelog ]; then + echo "##################################################" + echo "### checking version string match..." + repver=$(monkeysphere version) + debver=$(head -n1 "$TESTDIR"/../packaging/debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/') + if [ "$repver" = "$debver" ] ; then + echo "Versions match!" + else + printf "reported version string (%s) does not match debian changelog (%s)\n" "$repver" "$debver" + exit 1 + fi +fi ###################################################################### ### CONFIGURE ENVIRONMENTS -- 2.26.2