]> Cypherpunks.ru repositories - nncp.git/blob - makedist.sh
Generate plaintext NEWS
[nncp.git] / makedist.sh
1 #!/bin/sh -ex
2
3 cur=$(pwd)
4 tmp=$(mktemp -d)
5 release=$1
6 [ -n "$release" ]
7
8 git clone . $tmp/nncp-$release
9 repos="
10     src/github.com/davecgh/go-xdr
11     src/github.com/dustin/go-humanize
12     src/github.com/flynn/noise
13     src/github.com/minio/blake2b-simd
14     src/golang.org/x/crypto
15     src/golang.org/x/net
16     src/golang.org/x/sys
17     src/gopkg.in/check.v1
18     src/gopkg.in/yaml.v2
19 "
20 for repo in $repos; do
21     git clone $repo $tmp/nncp-$release/$repo
22 done
23 cd $tmp/nncp-$release
24 git checkout $release
25 git submodule update --init
26
27 cat > $tmp/includes <<EOF
28 golang.org/x/crypto/AUTHORS
29 golang.org/x/crypto/CONTRIBUTORS
30 golang.org/x/crypto/LICENSE
31 golang.org/x/crypto/PATENTS
32 golang.org/x/crypto/README
33 golang.org/x/crypto/blake2b
34 golang.org/x/crypto/blake2s
35 golang.org/x/crypto/chacha20poly1305
36 golang.org/x/crypto/curve25519
37 golang.org/x/crypto/ed25519
38 golang.org/x/crypto/hkdf
39 golang.org/x/crypto/nacl
40 golang.org/x/crypto/poly1305
41 golang.org/x/crypto/salsa20
42 golang.org/x/crypto/twofish
43 golang.org/x/net/AUTHORS
44 golang.org/x/net/CONTRIBUTORS
45 golang.org/x/net/LICENSE
46 golang.org/x/net/PATENTS
47 golang.org/x/net/README
48 golang.org/x/net/netutil
49 golang.org/x/sys/AUTHORS
50 golang.org/x/sys/CONTRIBUTORS
51 golang.org/x/sys/LICENSE
52 golang.org/x/sys/PATENTS
53 golang.org/x/sys/README
54 golang.org/x/sys/unix
55 EOF
56 tar cfCI - src $tmp/includes | tar xfC - $tmp
57 rm -fr src/golang.org
58 mv $tmp/golang.org src/
59 rm -fr $tmp/golang.org $tmp/includes
60
61 find src -name .travis.yml -delete
62 rm -fr src/github.com/davecgh/go-xdr/xdr
63 rm -fr src/github.com/gorhill/cronexpr/cronexpr src/github.com/gorhill/cronexpr/APLv2
64 rm -fr ports
65 rm makedist.sh
66
67 cat > doc/download.texi <<EOF
68 @node Tarballs
69 @section Prepared tarballs
70 You can obtain releases source code prepared tarballs on
71 @url{http://www.nncpgo.org/}.
72 EOF
73 make -C doc
74 ./news.sh
75 rm -r doc/.well-known doc/nncp.html/.well-known news.sh
76
77 find . -name .git -type d | xargs rm -fr
78 find . -name .gitignore -delete
79 rm .gitmodules
80
81 cd ..
82 tar cvf nncp-"$release".tar nncp-"$release"
83 xz -9 nncp-"$release".tar
84 gpg --detach-sign --sign --local-user 0x2B25868E75A1A953 nncp-"$release".tar.xz
85 mv $tmp/nncp-"$release".tar.xz $tmp/nncp-"$release".tar.xz.sig $cur/doc/nncp.html/download
86
87 tarball=$cur/doc/nncp.html/download/nncp-"$release".tar.xz
88 size=$(( $(cat $tarball | wc -c) / 1024 ))
89 hash=$(gpg --print-md SHA256 < $tarball)
90 cat <<EOF
91 An entry for documentation:
92 @item @ref{Release $release, $release} @tab $size KiB
93 @tab @url{download/nncp-${release}.tar.xz, link} @url{download/nncp-${release}.tar.xz.sig, sign}
94 @tab @code{$hash}
95 EOF
96
97 cd $cur
98
99 cat <<EOF
100 Subject: NNCP $release release announcement
101
102 I am pleased to announce NNCP $release release availability!
103
104 NNCP (Node to Node copy) is a collection of utilities simplifying
105 secure store-and-forward files and mail exchanging.
106
107 This utilities are intended to help build up small size (dozens of
108 nodes) ad-hoc friend-to-friend (F2F) statically routed darknet networks
109 for fire-and-forget secure reliable files, file requests and Internet
110 mail transmission. All packets are integrity checked, end-to-end
111 encrypted (E2EE), explicitly authenticated by known participants public
112 keys. Onion encryption is applied to relayed packets. Each node acts
113 both as a client and server, can use push and poll behaviour model.
114
115 Out-of-box offline sneakernet/floppynet, dead drops and air-gapped
116 computers support. But online TCP daemon with full-duplex resumable data
117 transmission exists.
118
119 ------------------------ >8 ------------------------
120
121 The main improvements for that release are:
122
123 $(git cat-file -p $release | sed -n '6,/^.*BEGIN/p' | sed '$d')
124
125 ------------------------ >8 ------------------------
126
127 NNCP's home page is: http://www.nncpgo.org/
128
129 Source code and its signature for that version can be found here:
130
131     http://www.nncpgo.org/download/nncp-${release}.tar.xz ($size KiB)
132     http://www.nncpgo.org/download/nncp-${release}.tar.xz.sig
133
134 SHA256 hash: $hash
135 GPG key ID: 0x2B25868E75A1A953 NNCP releases <releases@nncpgo.org>
136 Fingerprint: 92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
137
138 Please send questions regarding the use of NNCP, bug reports and patches
139 to mailing list: https://lists.cypherpunks.ru/pipermail/nncp-devel/
140 EOF