diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-02-19 02:14:15 -0500 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-02-19 02:14:15 -0500 |
commit | c02230bbe0112a1dea639a5c52ee6db6d446dfea (patch) | |
tree | 034d18c3057f43e5005b8f597f877853e318bc21 | |
parent | d0459e29cb1a6f6196e3e12ccc4da47601514d67 (diff) | |
parent | 7ab6793000d069c327e8d4923b9c89b13f60d3bd (diff) |
Merge commit 'dkg/master'
-rwxr-xr-x | Makefile | 4 | ||||
-rwxr-xr-x | packaging/debian/monkeysphere.postinst | 3 | ||||
-rw-r--r-- | src/share/common | 2 | ||||
-rwxr-xr-x | src/transitions/0.23 (renamed from src/transition_0.22_0.23) | 26 | ||||
-rw-r--r-- | src/transitions/README.txt | 16 |
5 files changed, 43 insertions, 8 deletions
@@ -47,13 +47,13 @@ clean: # working dir! install: all installman mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin - mkdir -p $(DESTDIR)$(PREFIX)/share/monkeysphere/m $(DESTDIR)$(PREFIX)/share/monkeysphere/mh $(DESTDIR)$(PREFIX)/share/monkeysphere/ma + mkdir -p $(DESTDIR)$(PREFIX)/share/monkeysphere/m $(DESTDIR)$(PREFIX)/share/monkeysphere/mh $(DESTDIR)$(PREFIX)/share/monkeysphere/ma $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions mkdir -p $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere 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/transitions/* $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions 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/packaging/debian/monkeysphere.postinst b/packaging/debian/monkeysphere.postinst index 8e79771..efa7fb4 100755 --- a/packaging/debian/monkeysphere.postinst +++ b/packaging/debian/monkeysphere.postinst @@ -17,6 +17,9 @@ if ! getent passwd monkeysphere >/dev/null ; then monkeysphere fi +# try to transition from 0.22 to 0.23: +/usr/share/monkeysphere/transition_0.22_0.23 + # setup monkeysphere authentication monkeysphere-authentication setup diff --git a/src/share/common b/src/share/common index 9630bf9..1c16ac6 100644 --- a/src/share/common +++ b/src/share/common @@ -8,7 +8,7 @@ # Jamie McClelland <jm@mayfirst.org> # Daniel Kahn Gillmor <dkg@fifthhorseman.net> # -# Copyright 2008, released under the GPL, version 3 or later +# Copyright 2008-2009, released under the GPL, version 3 or later # all-caps variables are meant to be user supplied (ie. from config # file) and are considered global diff --git a/src/transition_0.22_0.23 b/src/transitions/0.23 index 12ef1d2..e1c9e9e 100755 --- a/src/transition_0.22_0.23 +++ b/src/transitions/0.23 @@ -1,10 +1,24 @@ #!/bin/bash -# this script should run without any errors. -set -e - # This is a post-install script for monkeysphere, to transition an old -# (<0.23) setup to the new (>=0.23) setup +# (<0.23) setup to the new (>=0.23) setup. + +# You should be able to run this script after any version >= 0.23 is +# installed. This script should be well-behaved, even if it is run +# repeatedly. + +# Written by +# Jameson Rollins <jrollins@finestructure.net> +# Daniel Kahn Gillmor <dkg@fifthhorseman.net> +# +# Copyright 2009, released under the GPL, version 3 or later + +# NOTE: the reverse operation (downgrading) is not directly supported, +# and MAY LOCK YOU OUT OF YOUR SYSTEM, depending on how you have +# configured the monkeysphere! + +# any unexpected errors should cause this script to bail: +set -e SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"} @@ -29,7 +43,9 @@ is_domain_name() { printf "%s" "$1" | egrep -q '^[[:alnum:]][[:alnum:]-.]*[[:alnum:]]$' } -# run the authentication setup +# run the authentication setup (this is also the first chance to bail +# if 0.23 is not fully-installed, because m-a did not exist before +# 0.23) monkeysphere-authentication setup # before 0.23, the old gnupg-host data directory used to contain the diff --git a/src/transitions/README.txt b/src/transitions/README.txt new file mode 100644 index 0000000..7488c74 --- /dev/null +++ b/src/transitions/README.txt @@ -0,0 +1,16 @@ +This directory contains transition scripts for major changes to +monkeysphere infrastructure. + +They are expected to be run immediately after upgrading to the named +version or later. + +For example: you upgrade to from version 0.8 to version 0.15, and the +directory contains 0.6, 0.12 and 0.15, you should run 0.12 followed by +0.15. + +The scripts are supposed to be cleverly-written enough that you can +run them repeatedly, and they should only make their intended changes +once. If they do not behave that way, this is a bug. Please report +it! + + https://labs.riseup.net/code/projects/monkeysphere/ |