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