]> Cypherpunks.ru repositories - nncp.git/blob - makedist.sh
Do not include huge Noise testvectors in tarball
[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 cd $tmp/nncp-$release
10 git checkout v$release
11 rm -fr .git
12
13 mod_name=go.cypherpunks.ru/nncp/v5
14 mv src src.orig
15 mkdir -p src/$mod_name
16 mv src.orig/* src/$mod_name
17 rmdir src.orig
18
19 mods="
20 github.com/davecgh/go-xdr
21 github.com/dustin/go-humanize
22 github.com/flynn/noise
23 github.com/gorhill/cronexpr
24 github.com/hjson/hjson-go
25 go.cypherpunks.ru/balloon
26 golang.org/x/crypto
27 golang.org/x/net
28 golang.org/x/sys
29 "
30 for mod in $mods; do
31     mod_path=$(sed -n "s# // indirect## ; s#^   \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
32     [ -n "$mod_path" ]
33     mkdir -p src/$mod
34     ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
35     chmod -R +w src/$mod
36 done
37
38 cat > $tmp/includes <<EOF
39 golang.org/x/crypto/AUTHORS
40 golang.org/x/crypto/blake2b
41 golang.org/x/crypto/blake2s
42 golang.org/x/crypto/chacha20poly1305
43 golang.org/x/crypto/CONTRIBUTORS
44 golang.org/x/crypto/curve25519
45 golang.org/x/crypto/ed25519
46 golang.org/x/crypto/go.mod
47 golang.org/x/crypto/go.sum
48 golang.org/x/crypto/internal/chacha20
49 golang.org/x/crypto/internal/subtle
50 golang.org/x/crypto/LICENSE
51 golang.org/x/crypto/nacl
52 golang.org/x/crypto/PATENTS
53 golang.org/x/crypto/poly1305
54 golang.org/x/crypto/README.md
55 golang.org/x/crypto/salsa20
56 golang.org/x/crypto/ssh/terminal
57 golang.org/x/net/AUTHORS
58 golang.org/x/net/CONTRIBUTORS
59 golang.org/x/net/go.mod
60 golang.org/x/net/go.sum
61 golang.org/x/net/LICENSE
62 golang.org/x/net/netutil
63 golang.org/x/net/PATENTS
64 golang.org/x/net/README.md
65 golang.org/x/sys/AUTHORS
66 golang.org/x/sys/CONTRIBUTORS
67 golang.org/x/sys/cpu
68 golang.org/x/sys/go.mod
69 golang.org/x/sys/LICENSE
70 golang.org/x/sys/PATENTS
71 golang.org/x/sys/README.md
72 golang.org/x/sys/unix
73 EOF
74 tar cfCI - src $tmp/includes | tar xfC - $tmp
75 rm -fr src/golang.org $tmp/includes
76 mv $tmp/golang.org src
77
78 find src -name .travis.yml -delete
79 rm -fr src/github.com/davecgh/go-xdr/xdr
80 rm -r src/github.com/flynn/noise/vector*
81 rm src/github.com/hjson/hjson-go/build_release.sh
82 rm src/github.com/gorhill/cronexpr/APLv2
83 rm -fr ports
84 rm makedist.sh
85
86 cat > doc/download.texi <<EOF
87 @node Tarballs
88 @section Prepared tarballs
89 You can obtain releases source code prepared tarballs on
90 @url{http://www.nncpgo.org/}.
91 EOF
92 make -C doc
93
94 ########################################################################
95 # Supplementary files autogeneration
96 ########################################################################
97 texi=`mktemp`
98
99 cat > $texi <<EOF
100 \input texinfo
101 @documentencoding UTF-8
102 @settitle NEWS
103
104 @node News
105 @unnumbered News
106
107 `sed -n '5,$p' < doc/news.texi`
108
109 @bye
110 EOF
111 makeinfo --plaintext -o NEWS $texi
112
113 cat > $texi <<EOF
114 \input texinfo
115 @documentencoding UTF-8
116 @settitle NEWS.RU
117
118 @node Новости
119 @unnumbered Новости
120
121 `sed -n '3,$p' < doc/news.ru.texi | sed 's/^@subsection/@section/'`
122
123 @bye
124 EOF
125 makeinfo --plaintext -o NEWS.RU $texi
126
127 rm -f $texi
128
129 texi=$(TMPDIR=doc mktemp)
130 cat > $texi <<EOF
131 \input texinfo
132 @documentencoding UTF-8
133 @settitle INSTALL
134
135 @include install.texi
136
137 @bye
138 EOF
139 makeinfo --plaintext -o INSTALL $texi
140 rm -f $texi
141
142 texi=`mktemp`
143
144 cat > $texi <<EOF
145 \input texinfo
146 @documentencoding UTF-8
147 @settitle THANKS
148
149 `cat doc/thanks.texi`
150
151 @bye
152 EOF
153 makeinfo --plaintext -o THANKS $texi
154 rm -f $texi
155
156 ########################################################################
157
158 mv doc/.well-known/openpgpkey/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc PUBKEY.asc
159 rm -r doc/.gitignore doc/.well-known doc/nncp.html/.well-known
160
161 find . -type d -exec chmod 755 {} \;
162 find . -type f -exec chmod 644 {} \;
163 find . -type f -name "*.sh" -exec chmod 755 {} \;
164
165 cd ..
166 tar cvf nncp-"$release".tar --uid=0 --gid=0 --numeric-owner nncp-"$release"
167 xz -9v nncp-"$release".tar
168 gpg --detach-sign --sign --local-user releases@nncpgo.org nncp-"$release".tar.xz
169 mv -v $tmp/nncp-"$release".tar.xz $tmp/nncp-"$release".tar.xz.sig $cur/doc/nncp.html/download
170
171 tarball=$cur/doc/nncp.html/download/nncp-"$release".tar.xz
172 size=$(( $(stat -f %z $tarball) / 1024 ))
173 hash=$(gpg --print-md SHA256 < $tarball)
174 release_date=$(date "+%Y-%m-%d")
175
176 cat <<EOF
177 An entry for documentation:
178 @item @ref{Release $release, $release} @tab $release_date @tab $size KiB
179 @tab @url{download/nncp-${release}.tar.xz, link} @url{download/nncp-${release}.tar.xz.sig, sign}
180 @tab @code{$hash}
181 EOF
182
183 cd $cur
184
185 cat <<EOF
186 Subject: [EN] NNCP $release release announcement
187
188 I am pleased to announce NNCP $release release availability!
189
190 NNCP (Node to Node copy) is a collection of utilities simplifying
191 secure store-and-forward files and mail exchanging.
192
193 This utilities are intended to help build up small size (dozens of
194 nodes) ad-hoc friend-to-friend (F2F) statically routed darknet
195 delay-tolerant networks for fire-and-forget secure reliable files, file
196 requests, Internet mail and commands transmission. All packets are
197 integrity checked, end-to-end encrypted (E2EE), explicitly authenticated
198 by known participants public keys. Onion encryption is applied to
199 relayed packets. Each node acts both as a client and server, can use
200 push and poll behaviour model.
201
202 Out-of-box offline sneakernet/floppynet, dead drops, sequential and
203 append-only CD-ROM/tape storages, air-gapped computers support. But
204 online TCP daemon with full-duplex resumable data transmission exists.
205
206 ------------------------ >8 ------------------------
207
208 The main improvements for that release are:
209
210 $(git cat-file -p $release | sed -n '6,/^.*BEGIN/p' | sed '$d')
211
212 ------------------------ >8 ------------------------
213
214 NNCP's home page is: http://www.nncpgo.org/
215
216 Source code and its signature for that version can be found here:
217
218     http://www.nncpgo.org/download/nncp-${release}.tar.xz ($size KiB)
219     http://www.nncpgo.org/download/nncp-${release}.tar.xz.sig
220
221 SHA256 hash: $hash
222 GPG key ID: 0x2B25868E75A1A953 NNCP releases <releases@nncpgo.org>
223 Fingerprint: 92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
224
225 Please send questions regarding the use of NNCP, bug reports and patches
226 to mailing list: https://lists.cypherpunks.ru/pipermail/nncp-devel/
227 EOF
228
229 cat <<EOF
230 Subject: [RU] Состоялся релиз NNCP $release
231
232 Я рад сообщить о выходе релиза NNCP $release!
233
234 NNCP (Node to Node copy) это набор утилит упрощающий безопасный обмен
235 файлами и почтой в режиме сохранить-и-переслать.
236
237 Эти утилиты предназначены помочь с построением одноранговых устойчивых к
238 разрывам сетей небольшого размера (дюжины узлов), в режиме друг-к-другу
239 (F2F) со статической маршрутизацией для безопасной надёжной передачи
240 файлов, запросов на передачу файлов, Интернет почты и команд по принципу
241 выстрелил-и-забыл. Все пакеты проверяются на целостность, шифруются по
242 принципу точка-точка (E2EE), аутентифицируются известными публичными
243 ключами участников. Луковичное (onion) шифрование применяется ко всем
244 ретранслируемым пакетам. Каждый узел выступает одновременно в роли
245 клиента и сервера, может использовать как push, так и poll модель
246 поведения.
247
248 Поддержка из коробки offline флоппинета, тайников для сброса информации
249 (dead drop), последовательных и только-для-записи CD-ROM/ленточных
250 хранилищ, компьютеров с "воздушным зазором" (air-gap). Но также
251 существует и online TCP демон с полнодуплексной возобновляемой передачей
252 данных.
253
254 ------------------------ >8 ------------------------
255
256 Основные усовершенствования в этом релизе:
257
258 $(git cat-file -p $release | sed -n '6,/^.*BEGIN/p' | sed '$d')
259
260 ------------------------ >8 ------------------------
261
262 Домашняя страница NNCP: http://www.nncpgo.org/
263 Коротко об утилитах: http://www.nncpgo.org/Ob-utilitakh.html
264
265 Исходный код и его подпись для этой версии находятся здесь:
266
267     http://www.nncpgo.org/download/nncp-${release}.tar.xz ($size KiB)
268     http://www.nncpgo.org/download/nncp-${release}.tar.xz.sig
269
270 SHA256 хэш: $hash
271 Идентификатор GPG ключа: 0x2B25868E75A1A953 NNCP releases <releases@nncpgo.org>
272 Отпечаток: 92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
273
274 Пожалуйста, все вопросы касающиеся использования NNCP, отчёты об ошибках
275 и патчи отправляйте в nncp-devel почтовую рассылку:
276 https://lists.cypherpunks.ru/pipermail/nncp-devel/
277 EOF