f37 -> f39
[infrastructure.git] / omf / export-omf.sh
1 #!/bin/bash
2 #
3 # to be run on www.planet-lab.eu where the CERTH key was imported
4 # triggered by /etc/cron.d/export-nitos.cron
5 #
6 # (*) initialized gpg with the gpg rings found in /etc/planetlab
7 # ple-www.pl.sophia.inria.fr ~ # ls -ld .gnupg .gnupg/*ring.gpg
8 # drwx------ 2 root root  4096 Jun 17 16:11 .gnupg
9 # -rw------- 1 root root 28357 Jun 17 16:11 .gnupg/pubring.gpg
10 # -rw------- 1 root root 47028 Jun 16 16:43 .gnupg/secring.gpg# 
11 #
12 # (*) used NITOS indications to locate armored key
13 # http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4646985724FAFE07
14 #
15 # (*) stored that in /etc/planetlab/Nitlab.key
16 #
17 # (*) gpg --import /etc/planetlab/Nitlab.key
18 #
19 # (*) signed the snipped version and published it to NITOS
20 #
21 ####################
22 # (*) upon reception of their acknowledgement, which establishes trust
23 # sign and trust the key:
24 # [boot-planet-lab-eu] ~/.gnupg # gpg --edit-key CERTH
25 # gpg (GnuPG) 1.4.7; Copyright (C) 2006 Free Software Foundation, Inc.
26
27 # <snip>
28
29 # Command> sign
30
31 # <snip>
32
33 # Really sign? (y/N) y
34
35 # Command> trust
36
37 # <snip>
38
39 #   1 = I don't know or won't say
40 #   2 = I do NOT trust
41 #   3 = I trust marginally
42 #   4 = I trust fully
43 #   5 = I trust ultimately
44 #   m = back to the main menu
45
46 # Your decision? 5
47 # Do you really want to set this key to ultimate trust? (y/N) y
48
49 # <snip>
50
51 # Command> q
52 # Save changes? (y/N) y
53 # [boot-planet-lab-eu] ~/.gnupg # 
54
55
56 DIRNAME=$(dirname $0)
57
58 cd $DIRNAME
59
60 # refresh the gpg encrypted version of the export file 
61 mv -f EXPORT.nitlab.gpg EXPORT.nitlab.gpg.bak
62 plcsh ./export-omf.py | gpg -r CERTH -e --output EXPORT.nitlab.gpg
63
64 # publish under /var/www/html/download/EXPORT.nitlab
65 cp EXPORT.nitlab.gpg /var/www/html/download/EXPORT.nitlab.gpg