]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' v8.8.3
authorSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2023 11:01:08 +0000 (14:01 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 29 Apr 2023 11:01:08 +0000 (14:01 +0300)
68 files changed:
bin/default.do
doc/download.texi
doc/index.texi
doc/install.texi
doc/news.ru.texi
doc/news.texi
makedist [moved from makedist.sh with 95% similarity]
src/area.go
src/call.go
src/cfg.go
src/cfgdir.go
src/check.go
src/chunked.go
src/cmd/nncp-ack/main.go
src/cmd/nncp-bundle/main.go
src/cmd/nncp-call/main.go
src/cmd/nncp-caller/main.go
src/cmd/nncp-cfgdir/main.go
src/cmd/nncp-cfgenc/main.go
src/cmd/nncp-cfgmin/main.go
src/cmd/nncp-cfgnew/main.go
src/cmd/nncp-check/main.go
src/cmd/nncp-cronexpr/main.go
src/cmd/nncp-daemon/main.go
src/cmd/nncp-exec/main.go
src/cmd/nncp-file/main.go
src/cmd/nncp-freq/main.go
src/cmd/nncp-hash/main.go
src/cmd/nncp-log/main.go
src/cmd/nncp-pkt/main.go
src/cmd/nncp-reass/main.go
src/cmd/nncp-rm/main.go
src/cmd/nncp-stat/main.go
src/cmd/nncp-toss/main.go
src/cmd/nncp-trns/main.go
src/cmd/nncp-xfer/main.go
src/ctx.go
src/dirwatch.go
src/dirwatch_dummy.go
src/eblob.go
src/go.mod
src/go.sum
src/humanizer.go
src/jobs.go
src/lockdir.go
src/log.go
src/magic.go
src/mcd.go
src/mth.go
src/mth_test.go
src/nncp.go
src/node.go
src/pipe.go
src/pkt.go
src/pkt_test.go
src/progress.go
src/sp.go
src/tmp.go
src/toss.go
src/toss_test.go
src/tx.go
src/tx_test.go
src/ucspi.go
src/uilive/writer.go
src/via.go
src/yggdrasil/tcpip.go
src/yggdrasil/yggdrasil.go
src/yggdrasil/yggdrasil_dummy.go

index b9ac0f8fad6c839168266aaf88a4c0e897c3af7b..52c55015310d0d9120c354e5fe4f42c2b4f47e3f 100644 (file)
@@ -1,5 +1,5 @@
 cd ../src
-redo-ifchange ../config *.go cmd/$1/*.go
+redo-ifchange ../config *.go cmd/${1##*/}/*.go
 . ../config
 GO=${GO:-go}
 mod=`$GO list -m`
@@ -7,4 +7,4 @@ GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultCfgPath=$CFGPATH"
 GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSendmailPath=$SENDMAIL"
 GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSpoolPath=$SPOOLPATH"
 GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultLogPath=$LOGPATH"
-$GO build -o ../bin/$3 $GO_CFLAGS -ldflags "$GO_LDFLAGS" ./cmd/$1
+$GO build -o ../bin/$3 $GO_CFLAGS -ldflags "$GO_LDFLAGS" ./cmd/${1##*/}
index a41b363444e7568e7f9e17860e6eb472e9b5c1ee..27776b00bb0b4c53e8d4f0e3b03e2be6b7c13b4a 100644 (file)
@@ -5,7 +5,7 @@
 @cindex download
 @section Prepared tarballs
 
-You can obtain releases source code prepared tarballs from the links below.
+You can obtain releases source code prepared tarballs from the tars below.
 Do not forget to check tarball @ref{Integrity, integrity}! Also there
 are @ref{Mirrors, mirrors} of this website.
 
@@ -46,497 +46,362 @@ And additional ones for Yggdrasil support:
 @item @code{gvisor.dev/gvisor} @tab Apache 2.0
 @end multitable
 
-@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {meta4 link sig} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
-@headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
-
-@item @ref{Release 8_8_1, 8.8.1} @tab 2022-10-30 @tab 1748 KiB
-@tab
-    @url{download/nncp-8.8.1.tar.xz.meta4, meta4}
-    @url{download/nncp-8.8.1.tar.xz, link}
-    @url{download/nncp-8.8.1.tar.xz.sig, sig}
-@tab @code{426463C9 7211AD88 DF74DDDF 61BDBB83 0BAE2756 68B2F231 58D43146 517469A6}
-
-@item @ref{Release 8_8_0, 8.8.0} @tab 2022-09-04 @tab 1739 KiB
-@tab
-    @url{download/nncp-8.8.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.8.0.tar.xz, link}
-    @url{download/nncp-8.8.0.tar.xz.sig, sig}
-@tab @code{829E2FB2 F1EED8AF 7ACE4554 405E56F0 341BE2A0 1C234A34 D0112238 2AA0794C}
-
-@item @ref{Release 8_7_2, 8.7.2} @tab 2022-03-13 @tab 1673 KiB
-@tab
-    @url{download/nncp-8.7.2.tar.xz.meta4, meta4}
-    @url{download/nncp-8.7.2.tar.xz, link}
-    @url{download/nncp-8.7.2.tar.xz.sig, sig}
-@tab @code{A0EEC9B0 F33059DE 33F13084 599805D0 F4A1C8C3 79E925BA CFE8DC94 D1DDC23D}
-
-@item @ref{Release 8_7_1, 8.7.1} @tab 2022-03-09 @tab 1669 KiB
-@tab
-    @url{download/nncp-8.7.1.tar.xz.meta4, meta4}
-    @url{download/nncp-8.7.1.tar.xz, link}
-    @url{download/nncp-8.7.1.tar.xz.sig, sig}
-@tab @code{CEB4D197 AF5A8D9E 93B749D5 C0F50B53 E6746A31 8AF47B36 4BF5CB32 3D6C4EBD}
-
-@item @ref{Release 8_7_0, 8.7.0} @tab 2022-03-04 @tab 1670 KiB
-@tab
-    @url{download/nncp-8.7.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.7.0.tar.xz, link}
-    @url{download/nncp-8.7.0.tar.xz.sig, sig}
-@tab @code{ED488FFD 7D88028B DD64386B EC4AD911 6F7DA088 1FB1E628 493D2F2B BBD1E868}
-
-@item @ref{Release 8_6_0, 8.6.0} @tab 2022-03-02 @tab 1670 KiB
-@tab
-    @url{download/nncp-8.6.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.6.0.tar.xz, link}
-    @url{download/nncp-8.6.0.tar.xz.sig, sig}
-@tab @code{AE16F0A0 9C1B7D1D A3767E1C 0F410D9C 29ACCAE6 32A448A9 55DB4A0F 15BF838F}
-
-@item @ref{Release 8_5_0, 8.5.0} @tab 2022-01-26 @tab 1685 KiB
-@tab
-    @url{download/nncp-8.5.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.5.0.tar.xz, link}
-    @url{download/nncp-8.5.0.tar.xz.sig, sig}
-@tab @code{E8850D27 70C4FA74 5CF9B9A9 0CEEE5D6 05E50FA5 031A0813 49844C15 3E7BBFF4}
-
-@item @ref{Release 8_4_0, 8.4.0} @tab 2022-01-25 @tab 1683 KiB
-@tab
-    @url{download/nncp-8.4.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.4.0.tar.xz, link}
-    @url{download/nncp-8.4.0.tar.xz.sig, sig}
-@tab @code{CCC410CF 677359CA B14DA645 7985C1B9 7A69FEC9 41402DA3 59E414E6 08E8121B}
-
-@item @ref{Release 8_3_0, 8.3.0} @tab 2022-01-23 @tab 1682 KiB
-@tab
-    @url{download/nncp-8.3.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.3.0.tar.xz, link}
-    @url{download/nncp-8.3.0.tar.xz.sig, sig}
-@tab @code{6C14887A 9EF686D6 112F2096 ED1DA56B AABE5FEB 4BA92573 89ACC6B2 6D0A23EA}
-
-@item @ref{Release 8_2_0, 8.2.0} @tab 2022-01-20 @tab 1669 KiB
-@tab
-    @url{download/nncp-8.2.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.2.0.tar.xz, link}
-    @url{download/nncp-8.2.0.tar.xz.sig, sig}
-@tab @code{59B0D6E2 48D30289 29395B63 5D4E0CF1 14BC4DE0 F4F9F105 2E049284 980EEADD}
-
-@item @ref{Release 8_1_0, 8.1.0} @tab 2022-01-16 @tab 1339 KiB
-@tab
-    @url{download/nncp-8.1.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.1.0.tar.xz, link}
-    @url{download/nncp-8.1.0.tar.xz.sig, sig}
-@tab @code{777536DF 775E76D6 6B05645D 6F440494 D39DFCBD 7E52DE02 5AF919A3 94CF53EC}
-
-@item @ref{Release 8_0_2, 8.0.2} @tab 2021-11-10 @tab 1204 KiB
-@tab
-    @url{download/nncp-8.0.2.tar.xz.meta4, meta4}
-    @url{download/nncp-8.0.2.tar.xz, link}
-    @url{download/nncp-8.0.2.tar.xz.sig, sig}
-@tab @code{84C6FB6C 0764DF11 5C51EE42 4EEF4B9C 84775522 4350A6CC 484F3AB3 C779B9D3}
-
-@item @ref{Release 8_0_1, 8.0.1} @tab 2021-11-09 @tab 1206 KiB
-@tab
-    @url{download/nncp-8.0.1.tar.xz.meta4, meta4}
-    @url{download/nncp-8.0.1.tar.xz, link}
-    @url{download/nncp-8.0.1.tar.xz.sig, sig}
-@tab @code{0F849065 19EDB1BF E3262B35 077CD6F6 F365A897 2BA7D369 4864F3CE 4CA4C5A0}
-
-@item @ref{Release 8_0_0, 8.0.0} @tab 2021-11-08 @tab 1203 KiB
-@tab
-    @url{download/nncp-8.0.0.tar.xz.meta4, meta4}
-    @url{download/nncp-8.0.0.tar.xz, link}
-    @url{download/nncp-8.0.0.tar.xz.sig, sig}
-@tab @code{376BE15D 956AE171 2D04B607 15D53B17 62CDFA72 86AA9957 2D8E4641 4DA987F0}
-
-@item @ref{Release 7_7_0, 7.7.0} @tab 2021-09-11 @tab 1180 KiB
-@tab
-    @url{download/nncp-7.7.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.7.0.tar.xz, link}
-    @url{download/nncp-7.7.0.tar.xz.sig, sig}
-@tab @code{A692A2FC 963CB0A4 5BFD5B7F 497A26D0 BD738630 4F9FA3CD 526DC69F CA3929EE}
-
-@item @ref{Release 7_6_0, 7.6.0} @tab 2021-08-08 @tab 1153 KiB
-@tab
-    @url{download/nncp-7.6.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.6.0.tar.xz, link}
-    @url{download/nncp-7.6.0.tar.xz.sig, sig}
-@tab @code{00852E80 70415154 197A5555 DDAE636E 6E3940EC DD53D39E A69E5FF1 531BA4C6}
-
-@item @ref{Release 7_5_1, 7.5.1} @tab 2021-08-05 @tab 1147 KiB
-@tab
-    @url{download/nncp-7.5.1.tar.xz.meta4, meta4}
-    @url{download/nncp-7.5.1.tar.xz, link}
-    @url{download/nncp-7.5.1.tar.xz.sig, sig}
-@tab @code{B093A745 C2EB9F5F E8341ED2 A6F1EE75 701B2646 B5701BAA F4E760D9 32CDD91A}
-
-@item @ref{Release 7_5_0, 7.5.0} @tab 2021-07-28 @tab 1151 KiB
-@tab
-    @url{download/nncp-7.5.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.5.0.tar.xz, link}
-    @url{download/nncp-7.5.0.tar.xz.sig, sig}
-@tab @code{14D92DC5 B8164EE4 4926D7AF 46DA9F23 0C8F6207 350CC747 6DB5CDFB 8E7C3FE4}
-
-@item @ref{Release 7_4_0, 7.4.0} @tab 2021-07-19 @tab 1153 KiB
-@tab
-    @url{download/nncp-7.4.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.4.0.tar.xz, link}
-    @url{download/nncp-7.4.0.tar.xz.sig, sig}
-@tab @code{F7499FBF B0658054 F2732722 D54FE31E A0F105FD 9970B5BB 6413A9CC 065CB0EB}
-
-@item @ref{Release 7_3_2, 7.3.2} @tab 2021-07-12 @tab 1141 KiB
-@tab
-    @url{download/nncp-7.3.2.tar.xz.meta4, meta4}
-    @url{download/nncp-7.3.2.tar.xz, link}
-    @url{download/nncp-7.3.2.tar.xz.sig, sig}
-@tab @code{65F6A230 04189D3F 307D160C AE97F99A 620DDA23 52821652 15DDC946 F6CC4B7F}
-
-@item @ref{Release 7_3_1, 7.3.1} @tab 2021-07-11 @tab 1142 KiB
-@tab
-    @url{download/nncp-7.3.1.tar.xz.meta4, meta4}
-    @url{download/nncp-7.3.1.tar.xz, link}
-    @url{download/nncp-7.3.1.tar.xz.sig, sig}
-@tab @code{8611DC6A 3EAC7FFA A6A1C688 2073AB4D A4E93D36 C864F050 C5F880FE 10FCFC46}
-
-@item @ref{Release 7_3_0, 7.3.0} @tab 2021-07-10 @tab 1141 KiB
-@tab
-    @url{download/nncp-7.3.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.3.0.tar.xz, link}
-    @url{download/nncp-7.3.0.tar.xz.sig, sig}
-@tab @code{CB34487A 6D7EF507 04D4B8F9 5A16EF16 CC841D3D 7F5423B1 EBB7979D 1062EB4E}
-
-@item @ref{Release 7_2_1, 7.2.1} @tab 2021-07-09 @tab 1139 KiB
-@tab
-    @url{download/nncp-7.2.1.tar.xz.meta4, meta4}
-    @url{download/nncp-7.2.1.tar.xz, link}
-    @url{download/nncp-7.2.1.tar.xz.sig, sig}
-@tab @code{6462BA44 7DB30234 DA6DFB4B B5BF890F 6CA2CC36 697B3AE7 E6F86B86 94AC97D6}
-
-@item @ref{Release 7_2_0, 7.2.0} @tab 2021-07-08 @tab 1136 KiB
-@tab
-    @url{download/nncp-7.2.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.2.0.tar.xz, link}
-    @url{download/nncp-7.2.0.tar.xz.sig, sig}
-@tab @code{70DBB97B 86C9B4B6 E35CFF02 B8C9FAE2 4323EEA5 C56403A2 66CBA268 D82F5077}
-
-@item @ref{Release 7_1_1, 7.1.1} @tab 2021-07-06 @tab 1132 KiB
-@tab
-    @url{download/nncp-7.1.1.tar.xz.meta4, meta4}
-    @url{download/nncp-7.1.1.tar.xz, link}
-    @url{download/nncp-7.1.1.tar.xz.sig, sig}
-@tab @code{B741C9E3 EC3DB342 893FE081 888C40E4 B94E4298 E5C1A8E0 BA4D179C C239CCCA}
-
-@item @ref{Release 7_1_0, 7.1.0} @tab 2021-07-04 @tab 1142 KiB
-@tab
-    @url{download/nncp-7.1.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.1.0.tar.xz, link}
-    @url{download/nncp-7.1.0.tar.xz.sig, sig}
-@tab @code{D3BC010F 5D86BB59 E07A2A84 2FF9C73B 4C2F780B 807EF25C E4BC477C E40764A6}
-
-@item @ref{Release 7_0_0, 7.0.0} @tab 2021-06-30 @tab 1123 KiB
-@tab
-    @url{download/nncp-7.0.0.tar.xz.meta4, meta4}
-    @url{download/nncp-7.0.0.tar.xz, link}
-    @url{download/nncp-7.0.0.tar.xz.sig, sig}
-@tab @code{D4D28E9A CF40FE12 68BDE134 9CD36076 282395BE 70094EFB 0DB75CE8 C32EA664}
-
-@item @ref{Release 6_6_0, 6.6.0} @tab 2021-06-26 @tab 1041 KiB
-@tab
-    @url{download/nncp-6.6.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.6.0.tar.xz, link}
-    @url{download/nncp-6.6.0.tar.xz.sig, sig}
-@tab @code{73DB666F A5C30282 770516B2 F39F1240 74117B45 A9F4B484 0361861A 183577F1}
-
-@item @ref{Release 6_5_0, 6.5.0} @tab 2021-05-30 @tab 1041 KiB
-@tab
-    @url{download/nncp-6.5.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.5.0.tar.xz, link}
-    @url{download/nncp-6.5.0.tar.xz.sig, sig}
-@tab @code{241D2AA7 27275CCF 86F06797 1AA8B3B8 D625C85C 4279DFDE 560216E3 38670B9A}
-
-@item @ref{Release 6_4_0, 6.4.0} @tab 2021-04-22 @tab 1042 KiB
-@tab
-    @url{download/nncp-6.4.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.4.0.tar.xz, link}
-    @url{download/nncp-6.4.0.tar.xz.sig, sig}
-@tab @code{3D0D1156 D69AF698 D402663C F84E51CC 3D40A50D 300E34D1 105A6F75 32E4B99B}
-
-@item @ref{Release 6_3_0, 6.3.0} @tab 2021-04-14 @tab 1042 KiB
-@tab
-    @url{download/nncp-6.3.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.3.0.tar.xz, link}
-    @url{download/nncp-6.3.0.tar.xz.sig, sig}
-@tab @code{76C26A11 E3423540 BB7B8470 820176A3 5FCD0493 B21A872E C223EB94 43BA466B}
-
-@item @ref{Release 6_2_1, 6.2.1} @tab 2021-03-26 @tab 1038 KiB
-@tab
-    @url{download/nncp-6.2.1.tar.xz.meta4, meta4}
-    @url{download/nncp-6.2.1.tar.xz, link}
-    @url{download/nncp-6.2.1.tar.xz.sig, sig}
-@tab @code{D9682D95 4D68025A F5B07516 258D9FFC DA29A4D7 E7E1635B E0C219A1 C5DDB067}
-
-@item @ref{Release 6_2_0, 6.2.0} @tab 2021-03-07 @tab 1038 KiB
-@tab
-    @url{download/nncp-6.2.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.2.0.tar.xz, link}
-    @url{download/nncp-6.2.0.tar.xz.sig, sig}
-@tab @code{272CEDED 69FFF3B3 78767297 3199481A C610B753 BB82C22E ECEC45FC 05DA40FE}
-
-@item @ref{Release 6_1_0, 6.1.0} @tab 2021-02-24 @tab 1040 KiB
-@tab
-    @url{download/nncp-6.1.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.1.0.tar.xz, link}
-    @url{download/nncp-6.1.0.tar.xz.sig, sig}
-@tab @code{083A533F 7D021206 9AE07F9F D6CD22E3 C5BE09E8 30F2C9C4 97D97CF6 14E5413F}
-
-@item @ref{Release 6_0_0, 6.0.0} @tab 2021-01-23 @tab 1028 KiB
-@tab
-    @url{download/nncp-6.0.0.tar.xz.meta4, meta4}
-    @url{download/nncp-6.0.0.tar.xz, link}
-    @url{download/nncp-6.0.0.tar.xz.sig, sig}
-@tab @code{42FE8AA5 4520B3A1 ABB50D66 1BBBA6A1 41CE4E74 9B4816B0 D4C6845D 67465916}
-
-@item @ref{Release 5_6_0, 5.6.0} @tab 2021-01-17 @tab 1024 KiB
-@tab
-    @url{download/nncp-5.6.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.6.0.tar.xz, link}
-    @url{download/nncp-5.6.0.tar.xz.sig, sig}
-@tab @code{1DC83F05 F14A3C3B 95820046 C60B170E B8C8936F 142A5B9A 1E943E6F 4CEFBDE3}
-
-@item @ref{Release 5_5_1, 5.5.1} @tab 2021-01-11 @tab 1165 KiB
-@tab
-    @url{download/nncp-5.5.1.tar.xz.meta4, meta4}
-    @url{download/nncp-5.5.1.tar.xz, link}
-    @url{download/nncp-5.5.1.tar.xz.sig, sig}
-@tab @code{E7DEED7A D3BA696C F64359C0 DC0A93AD 109950C5 6660D028 5FD7BB57 120C9CF7}
-
-@item @ref{Release 5_5_0, 5.5.0} @tab 2021-01-07 @tab 1161 KiB
-@tab
-    @url{download/nncp-5.5.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.5.0.tar.xz, link}
-    @url{download/nncp-5.5.0.tar.xz.sig, sig}
-@tab @code{EF0CBEE1 520BE97D A210794C 172BF444 E6F75DB2 84F5BD05 66919193 326AED77}
-
-@item @ref{Release 5_4_1, 5.4.1} @tab 2020-09-28 @tab 1143 KiB
-@tab
-    @url{download/nncp-5.4.1.tar.xz.meta4, meta4}
-    @url{download/nncp-5.4.1.tar.xz, link}
-    @url{download/nncp-5.4.1.tar.xz.sig, sig}
-@tab @code{A02D0C9B 51533DF8 115C17E1 02F8C485 9F7B805A 64290CDF 79151BA9 E627FA63}
-
-@item @ref{Release 5_3_3, 5.3.3} @tab 2020-01-23 @tab 1116 KiB
-@tab
-    @url{download/nncp-5.3.3.tar.xz.meta4, meta4}
-    @url{download/nncp-5.3.3.tar.xz, link}
-    @url{download/nncp-5.3.3.tar.xz.sig, sig}
-@tab @code{707CD852 4E424C24 BCB22D6B 4BC81709 71C42A5F E0062B93 A8D1DD9D 7FB365D0}
-
-@item @ref{Release 5_3_2, 5.3.2} @tab 2019-12-28 @tab 1118 KiB
-@tab
-    @url{download/nncp-5.3.2.tar.xz.meta4, meta4}
-    @url{download/nncp-5.3.2.tar.xz, link}
-    @url{download/nncp-5.3.2.tar.xz.sig, sig}
-@tab @code{6E2D1B3C CA0DD462 A6F5F8DE 5CB8DE15 C3D33C74 238A2C52 373C7BD6 A126A834}
-
-@item @ref{Release 5_3_1, 5.3.1} @tab 2019-12-25 @tab 1117 KiB
-@tab
-    @url{download/nncp-5.3.1.tar.xz.meta4, meta4}
-    @url{download/nncp-5.3.1.tar.xz, link}
-    @url{download/nncp-5.3.1.tar.xz.sig, sig}
-@tab @code{23A52819 F0395A6A E05E4176 017DCA3C 4A20A023 EEADA6A3 3168E58D BEE34A5B}
-
-@item @ref{Release 5_3_0, 5.3.0} @tab 2019-12-22 @tab 1112 KiB
-@tab
-    @url{download/nncp-5.3.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.3.0.tar.xz, link}
-    @url{download/nncp-5.3.0.tar.xz.sig, sig}
-@tab @code{9F093115 506D00E7 2E41ACD6 3F283172 8430E1C2 8BA4A941 FFA3C65D 89AD4ED0}
-
-@item @ref{Release 5_2_1, 5.2.1} @tab 2019-12-15 @tab 1109 KiB
-@tab
-    @url{download/nncp-5.2.1.tar.xz.meta4, meta4}
-    @url{download/nncp-5.2.1.tar.xz, link}
-    @url{download/nncp-5.2.1.tar.xz.sig, sig}
-@tab @code{983D1A8A 4398C281 76356AE1 C5541124 B0755555 D115063B D1388F85 9C4A6B3E}
-
-@item @ref{Release 5_2_0, 5.2.0} @tab 2019-12-14 @tab 1109 KiB
-@tab
-    @url{download/nncp-5.2.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.2.0.tar.xz, link}
-    @url{download/nncp-5.2.0.tar.xz.sig, sig}
-@tab @code{FFC55467 8B4ECCA6 92D90F42 ACC0286D 209E054E EA1CBF87 0307003E CF219610}
-
-@item @ref{Release 5_1_2, 5.1.2} @tab 2019-12-13 @tab 1106 KiB
-@tab
-    @url{download/nncp-5.1.2.tar.xz.meta4, meta4}
-    @url{download/nncp-5.1.2.tar.xz, link}
-    @url{download/nncp-5.1.2.tar.xz.sig, sig}
-@tab @code{52B2043B 1B22D20F C44698EC AFE5FF46 F99B4DD5 2C392D4D 25FE1580 993263B3}
-
-@item @ref{Release 5_1_1, 5.1.1} @tab 2019-12-01 @tab 1103 KiB
-@tab
-    @url{download/nncp-5.1.1.tar.xz.meta4, meta4}
-    @url{download/nncp-5.1.1.tar.xz, link}
-    @url{download/nncp-5.1.1.tar.xz.sig, sig}
-@tab @code{B9537678 E5B549BA 6FA0D20D 41B2D4A9 4ED31F2C AB9FAF63 A388D95E 7662A93F}
-
-@item @ref{Release 5_1_0, 5.1.0} @tab 2019-11-24 @tab 1103 KiB
-@tab
-    @url{download/nncp-5.1.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.1.0.tar.xz, link}
-    @url{download/nncp-5.1.0.tar.xz.sig, sig}
-@tab @code{6F5B74EC 952EAFEC 2A787463 CE1E808E CC990F03 D46F28E9 A89BAB55 5A2C2214}
-
-@item @ref{Release 5_0_0, 5.0.0} @tab 2019-11-15 @tab 1099 KiB
-@tab
-    @url{download/nncp-5.0.0.tar.xz.meta4, meta4}
-    @url{download/nncp-5.0.0.tar.xz, link}
-    @url{download/nncp-5.0.0.tar.xz.sig, sig}
-@tab @code{3696D7EE B0783E91 87E5EEF4 EFC35235 10452353 7C51FA4C 9BD3CBEE A22678B3}
-
-@item @ref{Release 4_1, 4.1} @tab 2019-05-01 @tab 1227 KiB
-@tab
-    @url{download/nncp-4.1.tar.xz.meta4, meta4}
-    @url{download/nncp-4.1.tar.xz, link}
-    @url{download/nncp-4.1.tar.xz.sig, sig}
-@tab @code{29AEC53D EC914906 D7C47194 0955A32E 2BF470E6 9B8E09D3 AF3B62D8 CC8E541E}
-
-@item @ref{Release 4_0, 4.0} @tab 2019-04-28 @tab 1227 KiB
-@tab
-    @url{download/nncp-4.0.tar.xz.meta4, meta4}
-    @url{download/nncp-4.0.tar.xz, link}
-    @url{download/nncp-4.0.tar.xz.sig, sig}
-@tab @code{EAFA6272 22E355FC EB772A90 FC6DEA8E AE1F1695 3F48A4A3 57ADA0B4 FF918452}
-
-@item @ref{Release 3_4, 3.4} @tab 2018-06-10 @tab 1154 KiB
-@tab
-    @url{download/nncp-3.4.tar.xz.meta4, meta4}
-    @url{download/nncp-3.4.tar.xz, link}
-    @url{download/nncp-3.4.tar.xz.sig, sig}
-@tab @code{9796C4CB 7B670FC7 5FEED3CD 467CA556 B230387D 935B09BB 4B19FD57 FD17FFBA}
-
-@item @ref{Release 3_3, 3.3} @tab 2018-06-02 @tab 1152 KiB
-@tab
-    @url{download/nncp-3.3.tar.xz.meta4, meta4}
-    @url{download/nncp-3.3.tar.xz, link}
-    @url{download/nncp-3.3.tar.xz.sig, sig}
-@tab @code{1F8FA9B4 6125D8A9 0608298B A1ED87E1 12DB2D8B 81C766DE F4DFE191 C7B1BFC2}
-
-@item @ref{Release 3_2, 3.2} @tab 2018-05-27 @tab 1147 KiB
-@tab
-    @url{download/nncp-3.2.tar.xz.meta4, meta4}
-    @url{download/nncp-3.2.tar.xz, link}
-    @url{download/nncp-3.2.tar.xz.sig, sig}
-@tab @code{BE76802F 1E273D1D E91F0648 A7CB23C5 989F5390 A36F2D0C FD873046 51B9141E}
-
-@item @ref{Release 3_1, 3.1} @tab 2018-02-18 @tab 1145 KiB
-@tab
-    @url{download/nncp-3.1.tar.xz.meta4, meta4}
-    @url{download/nncp-3.1.tar.xz, link}
-    @url{download/nncp-3.1.tar.xz.sig, sig}
-@tab @code{B9344516 4230B58E 8AAADAA2 066F37F2 493CCB71 B025126B BCAD8FAD 6535149F}
-
-@item @ref{Release 3_0, 3.0} @tab 2017-12-30 @tab 993 KiB
-@tab
-    @url{download/nncp-3.0.tar.xz.meta4, meta4}
-    @url{download/nncp-3.0.tar.xz, link}
-    @url{download/nncp-3.0.tar.xz.sig, sig}
-@tab @code{248B2257 2F576E79 A19672E9 B82EB649 18FC95A9 194408C0 67EA4DD3 0468286D}
-
-@item @ref{Release 2_0, 2.0} @tab 2017-12-02 @tab 986 KiB
-@tab
-    @url{download/nncp-2.0.tar.xz.meta4, meta4}
-    @url{download/nncp-2.0.tar.xz, link}
-    @url{download/nncp-2.0.tar.xz.sig, sig}
-@tab @code{BEF31B13 FB25381E A511FB77 067798AB 27409238 BDF5600F E2EADB29 E5E78996}
-
-@item @ref{Release 1_0, 1.0} @tab 2017-12-02 @tab 987 KiB
-@tab
-    @url{download/nncp-1.0.tar.xz.meta4, meta4}
-    @url{download/nncp-1.0.tar.xz, link}
-    @url{download/nncp-1.0.tar.xz.sig, sig}
-@tab @code{68BF7803 CD25F59A 56D9FD6C 695002B5 BFBAF591 8A6583F4 3139FC28 CA1AB4AF}
-
-@item @ref{Release 0_12, 0.12} @tab 2017-10-08 @tab 978 KiB
-@tab
-    @url{download/nncp-0.12.tar.xz.meta4, meta4}
-    @url{download/nncp-0.12.tar.xz, link}
-    @url{download/nncp-0.12.tar.xz.sig, sig}
-@tab @code{707B4005 97753B29 73A5F3E5 DAB51B92 21CC296D 690EF4BC ADE93E0D 2595A5F2}
-
-@item @ref{Release 0_11, 0.11} @tab 2017-08-21 @tab 1031 KiB
-@tab
-    @url{download/nncp-0.11.tar.xz.meta4, meta4}
-    @url{download/nncp-0.11.tar.xz, link}
-    @url{download/nncp-0.11.tar.xz.sig, sig}
-@tab @code{D0F73C3B ADBF6B8B 13641A61 4D34F65F 20AF4C84 90894331 BF1F1609 2D65E719}
-
-@item @ref{Release 0_10, 0.10} @tab 2017-07-04 @tab 949 KiB
-@tab
-    @url{download/nncp-0.10.tar.xz.meta4, meta4}
-    @url{download/nncp-0.10.tar.xz, link}
-    @url{download/nncp-0.10.tar.xz.sig, sig}
-@tab @code{DCE7C762 2F9281EB 282F1A67 5CA6500E 854F2DEC D60F3264 07872B91 4F4E6FA0}
-
-@item @ref{Release 0_9, 0.9} @tab 2017-05-17 @tab 942 KiB
-@tab
-    @url{download/nncp-0.9.tar.xz.meta4, meta4}
-    @url{download/nncp-0.9.tar.xz, link}
-    @url{download/nncp-0.9.tar.xz.sig, sig}
-@tab @code{8D0765A5 F9D81086 7E1F5AB4 52A9464D C5035CCB 4E09A29A 9C9A4934 1A72AB2C}
-
-@item @ref{Release 0_8, 0.8} @tab 2017-04-30 @tab 932 KiB
-@tab
-    @url{download/nncp-0.8.tar.xz.meta4, meta4}
-    @url{download/nncp-0.8.tar.xz, link}
-    @url{download/nncp-0.8.tar.xz.sig, sig}
-@tab @code{9BD607D5 C5551857 B7E9277D 0E857936 1DB7353A E0F1556E EA9B1D91 8305B184}
-
-@item @ref{Release 0_7, 0.7} @tab 2017-04-02 @tab 783 KiB
-@tab
-    @url{download/nncp-0.7.tar.xz.meta4, meta4}
-    @url{download/nncp-0.7.tar.xz, link}
-    @url{download/nncp-0.7.tar.xz.sig, sig}
-@tab @code{D3407323 F89296DD 743FA764 51964B43 794E61BE 0E1D2DD4 ABD02042 B94FFC4F}
-
-@item @ref{Release 0_6, 0.6} @tab 2017-02-05 @tab 746 KiB
-@tab
-    @url{download/nncp-0.6.tar.xz.meta4, meta4}
-    @url{download/nncp-0.6.tar.xz, link}
-    @url{download/nncp-0.6.tar.xz.sig, sig}
-@tab @code{DCFEE3F9 F669AC28 563C50DB 67BB8B43 0CFF4AB6 EC770ACE B5378D0B B40C0656}
-
-@item @ref{Release 0_5, 0.5} @tab 2017-01-19 @tab 743 KiB
-@tab
-    @url{download/nncp-0.5.tar.xz.meta4, meta4}
-    @url{download/nncp-0.5.tar.xz, link}
-    @url{download/nncp-0.5.tar.xz.sig, sig}
-@tab @code{D98F9149 5A6D6726 4C659640 1AD7F400 271A58CE 5D8D4AC5 5D1CF934 59BEDFA6}
-
-@item @ref{Release 0_4, 0.4} @tab 2017-01-17 @tab 741 KiB
-@tab
-    @url{download/nncp-0.4.tar.xz.meta4, meta4}
-    @url{download/nncp-0.4.tar.xz, link}
-    @url{download/nncp-0.4.tar.xz.sig, sig}
-@tab @code{93577327 B3DEBFE3 A80BEB0D 8325B2E6 0939EC55 4DBB05F3 4CA34B99 229C3722}
-
-@item @ref{Release 0_3, 0.3} @tab 2017-01-17 @tab 741 KiB
-@tab
-    @url{download/nncp-0.3.tar.xz.meta4, meta4}
-    @url{download/nncp-0.3.tar.xz, link}
-    @url{download/nncp-0.3.tar.xz.sig, sig}
-@tab @code{6E76EC5E 6B575C65 BF2D6388 870F2A1C 417D63E4 1628CAA1 BB499D0D 0634473B}
-
-@item @ref{Release 0_2, 0.2} @tab 2017-01-17 @tab 740 KiB
-@tab
-    @url{download/nncp-0.2.tar.xz.meta4, meta4}
-    @url{download/nncp-0.2.tar.xz, link}
-    @url{download/nncp-0.2.tar.xz.sig, sig}
-@tab @code{00BEAC5A 0C4083B0 42E3152B ACA6FF20 12768B82 CE24D716 8E04279C ECE14DB7}
-
-@item 0.1 @tab 2017-01-10 @tab 720 KiB
-@tab
-    @url{download/nncp-0.1.tar.xz.meta4, meta4}
-    @url{download/nncp-0.1.tar.xz, link}
-    @url{download/nncp-0.1.tar.xz.sig, sig}
-@tab @code{8F71D65B 70865EBF FE802CDF A5C14D00 A9FD6559 FD722E60 5D97E82C 5E2412C2}
+@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {meta4 tar sig}
+@headitem Version @tab Date @tab Size @tab Tarball
+
+@item @ref{Release 8_8_2, 8.8.2} @tab 2022-11-18 @tab 1752 KiB @tab
+@url{download/nncp-8.8.2.tar.xz.meta4, meta4}
+@url{download/nncp-8.8.2.tar.xz, tar}
+@url{download/nncp-8.8.2.tar.xz.sig, sig}
+
+@item @ref{Release 8_8_1, 8.8.1} @tab 2022-10-30 @tab 1748 KiB @tab
+@url{download/nncp-8.8.1.tar.xz.meta4, meta4}
+@url{download/nncp-8.8.1.tar.xz, tar}
+@url{download/nncp-8.8.1.tar.xz.sig, sig}
+
+@item @ref{Release 8_8_0, 8.8.0} @tab 2022-09-04 @tab 1739 KiB @tab
+@url{download/nncp-8.8.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.8.0.tar.xz, tar}
+@url{download/nncp-8.8.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_7_2, 8.7.2} @tab 2022-03-13 @tab 1673 KiB @tab
+@url{download/nncp-8.7.2.tar.xz.meta4, meta4}
+@url{download/nncp-8.7.2.tar.xz, tar}
+@url{download/nncp-8.7.2.tar.xz.sig, sig}
+
+@item @ref{Release 8_7_1, 8.7.1} @tab 2022-03-09 @tab 1669 KiB @tab
+@url{download/nncp-8.7.1.tar.xz.meta4, meta4}
+@url{download/nncp-8.7.1.tar.xz, tar}
+@url{download/nncp-8.7.1.tar.xz.sig, sig}
+
+@item @ref{Release 8_7_0, 8.7.0} @tab 2022-03-04 @tab 1670 KiB @tab
+@url{download/nncp-8.7.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.7.0.tar.xz, tar}
+@url{download/nncp-8.7.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_6_0, 8.6.0} @tab 2022-03-02 @tab 1670 KiB @tab
+@url{download/nncp-8.6.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.6.0.tar.xz, tar}
+@url{download/nncp-8.6.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_5_0, 8.5.0} @tab 2022-01-26 @tab 1685 KiB @tab
+@url{download/nncp-8.5.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.5.0.tar.xz, tar}
+@url{download/nncp-8.5.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_4_0, 8.4.0} @tab 2022-01-25 @tab 1683 KiB @tab
+@url{download/nncp-8.4.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.4.0.tar.xz, tar}
+@url{download/nncp-8.4.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_3_0, 8.3.0} @tab 2022-01-23 @tab 1682 KiB @tab
+@url{download/nncp-8.3.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.3.0.tar.xz, tar}
+@url{download/nncp-8.3.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_2_0, 8.2.0} @tab 2022-01-20 @tab 1669 KiB @tab
+@url{download/nncp-8.2.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.2.0.tar.xz, tar}
+@url{download/nncp-8.2.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_1_0, 8.1.0} @tab 2022-01-16 @tab 1339 KiB @tab
+@url{download/nncp-8.1.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.1.0.tar.xz, tar}
+@url{download/nncp-8.1.0.tar.xz.sig, sig}
+
+@item @ref{Release 8_0_2, 8.0.2} @tab 2021-11-10 @tab 1204 KiB @tab
+@url{download/nncp-8.0.2.tar.xz.meta4, meta4}
+@url{download/nncp-8.0.2.tar.xz, tar}
+@url{download/nncp-8.0.2.tar.xz.sig, sig}
+
+@item @ref{Release 8_0_1, 8.0.1} @tab 2021-11-09 @tab 1206 KiB @tab
+@url{download/nncp-8.0.1.tar.xz.meta4, meta4}
+@url{download/nncp-8.0.1.tar.xz, tar}
+@url{download/nncp-8.0.1.tar.xz.sig, sig}
+
+@item @ref{Release 8_0_0, 8.0.0} @tab 2021-11-08 @tab 1203 KiB @tab
+@url{download/nncp-8.0.0.tar.xz.meta4, meta4}
+@url{download/nncp-8.0.0.tar.xz, tar}
+@url{download/nncp-8.0.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_7_0, 7.7.0} @tab 2021-09-11 @tab 1180 KiB @tab
+@url{download/nncp-7.7.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.7.0.tar.xz, tar}
+@url{download/nncp-7.7.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_6_0, 7.6.0} @tab 2021-08-08 @tab 1153 KiB @tab
+@url{download/nncp-7.6.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.6.0.tar.xz, tar}
+@url{download/nncp-7.6.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_5_1, 7.5.1} @tab 2021-08-05 @tab 1147 KiB @tab
+@url{download/nncp-7.5.1.tar.xz.meta4, meta4}
+@url{download/nncp-7.5.1.tar.xz, tar}
+@url{download/nncp-7.5.1.tar.xz.sig, sig}
+
+@item @ref{Release 7_5_0, 7.5.0} @tab 2021-07-28 @tab 1151 KiB @tab
+@url{download/nncp-7.5.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.5.0.tar.xz, tar}
+@url{download/nncp-7.5.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_4_0, 7.4.0} @tab 2021-07-19 @tab 1153 KiB @tab
+@url{download/nncp-7.4.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.4.0.tar.xz, tar}
+@url{download/nncp-7.4.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_3_2, 7.3.2} @tab 2021-07-12 @tab 1141 KiB @tab
+@url{download/nncp-7.3.2.tar.xz.meta4, meta4}
+@url{download/nncp-7.3.2.tar.xz, tar}
+@url{download/nncp-7.3.2.tar.xz.sig, sig}
+
+@item @ref{Release 7_3_1, 7.3.1} @tab 2021-07-11 @tab 1142 KiB @tab
+@url{download/nncp-7.3.1.tar.xz.meta4, meta4}
+@url{download/nncp-7.3.1.tar.xz, tar}
+@url{download/nncp-7.3.1.tar.xz.sig, sig}
+
+@item @ref{Release 7_3_0, 7.3.0} @tab 2021-07-10 @tab 1141 KiB @tab
+@url{download/nncp-7.3.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.3.0.tar.xz, tar}
+@url{download/nncp-7.3.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_2_1, 7.2.1} @tab 2021-07-09 @tab 1139 KiB @tab
+@url{download/nncp-7.2.1.tar.xz.meta4, meta4}
+@url{download/nncp-7.2.1.tar.xz, tar}
+@url{download/nncp-7.2.1.tar.xz.sig, sig}
+
+@item @ref{Release 7_2_0, 7.2.0} @tab 2021-07-08 @tab 1136 KiB @tab
+@url{download/nncp-7.2.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.2.0.tar.xz, tar}
+@url{download/nncp-7.2.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_1_1, 7.1.1} @tab 2021-07-06 @tab 1132 KiB @tab
+@url{download/nncp-7.1.1.tar.xz.meta4, meta4}
+@url{download/nncp-7.1.1.tar.xz, tar}
+@url{download/nncp-7.1.1.tar.xz.sig, sig}
+
+@item @ref{Release 7_1_0, 7.1.0} @tab 2021-07-04 @tab 1142 KiB @tab
+@url{download/nncp-7.1.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.1.0.tar.xz, tar}
+@url{download/nncp-7.1.0.tar.xz.sig, sig}
+
+@item @ref{Release 7_0_0, 7.0.0} @tab 2021-06-30 @tab 1123 KiB @tab
+@url{download/nncp-7.0.0.tar.xz.meta4, meta4}
+@url{download/nncp-7.0.0.tar.xz, tar}
+@url{download/nncp-7.0.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_6_0, 6.6.0} @tab 2021-06-26 @tab 1041 KiB @tab
+@url{download/nncp-6.6.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.6.0.tar.xz, tar}
+@url{download/nncp-6.6.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_5_0, 6.5.0} @tab 2021-05-30 @tab 1041 KiB @tab
+@url{download/nncp-6.5.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.5.0.tar.xz, tar}
+@url{download/nncp-6.5.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_4_0, 6.4.0} @tab 2021-04-22 @tab 1042 KiB @tab
+@url{download/nncp-6.4.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.4.0.tar.xz, tar}
+@url{download/nncp-6.4.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_3_0, 6.3.0} @tab 2021-04-14 @tab 1042 KiB @tab
+@url{download/nncp-6.3.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.3.0.tar.xz, tar}
+@url{download/nncp-6.3.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_2_1, 6.2.1} @tab 2021-03-26 @tab 1038 KiB @tab
+@url{download/nncp-6.2.1.tar.xz.meta4, meta4}
+@url{download/nncp-6.2.1.tar.xz, tar}
+@url{download/nncp-6.2.1.tar.xz.sig, sig}
+
+@item @ref{Release 6_2_0, 6.2.0} @tab 2021-03-07 @tab 1038 KiB @tab
+@url{download/nncp-6.2.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.2.0.tar.xz, tar}
+@url{download/nncp-6.2.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_1_0, 6.1.0} @tab 2021-02-24 @tab 1040 KiB @tab
+@url{download/nncp-6.1.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.1.0.tar.xz, tar}
+@url{download/nncp-6.1.0.tar.xz.sig, sig}
+
+@item @ref{Release 6_0_0, 6.0.0} @tab 2021-01-23 @tab 1028 KiB @tab
+@url{download/nncp-6.0.0.tar.xz.meta4, meta4}
+@url{download/nncp-6.0.0.tar.xz, tar}
+@url{download/nncp-6.0.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_6_0, 5.6.0} @tab 2021-01-17 @tab 1024 KiB @tab
+@url{download/nncp-5.6.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.6.0.tar.xz, tar}
+@url{download/nncp-5.6.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_5_1, 5.5.1} @tab 2021-01-11 @tab 1165 KiB @tab
+@url{download/nncp-5.5.1.tar.xz.meta4, meta4}
+@url{download/nncp-5.5.1.tar.xz, tar}
+@url{download/nncp-5.5.1.tar.xz.sig, sig}
+
+@item @ref{Release 5_5_0, 5.5.0} @tab 2021-01-07 @tab 1161 KiB @tab
+@url{download/nncp-5.5.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.5.0.tar.xz, tar}
+@url{download/nncp-5.5.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_4_1, 5.4.1} @tab 2020-09-28 @tab 1143 KiB @tab
+@url{download/nncp-5.4.1.tar.xz.meta4, meta4}
+@url{download/nncp-5.4.1.tar.xz, tar}
+@url{download/nncp-5.4.1.tar.xz.sig, sig}
+
+@item @ref{Release 5_3_3, 5.3.3} @tab 2020-01-23 @tab 1116 KiB @tab
+@url{download/nncp-5.3.3.tar.xz.meta4, meta4}
+@url{download/nncp-5.3.3.tar.xz, tar}
+@url{download/nncp-5.3.3.tar.xz.sig, sig}
+
+@item @ref{Release 5_3_2, 5.3.2} @tab 2019-12-28 @tab 1118 KiB @tab
+@url{download/nncp-5.3.2.tar.xz.meta4, meta4}
+@url{download/nncp-5.3.2.tar.xz, tar}
+@url{download/nncp-5.3.2.tar.xz.sig, sig}
+
+@item @ref{Release 5_3_1, 5.3.1} @tab 2019-12-25 @tab 1117 KiB @tab
+@url{download/nncp-5.3.1.tar.xz.meta4, meta4}
+@url{download/nncp-5.3.1.tar.xz, tar}
+@url{download/nncp-5.3.1.tar.xz.sig, sig}
+
+@item @ref{Release 5_3_0, 5.3.0} @tab 2019-12-22 @tab 1112 KiB @tab
+@url{download/nncp-5.3.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.3.0.tar.xz, tar}
+@url{download/nncp-5.3.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_2_1, 5.2.1} @tab 2019-12-15 @tab 1109 KiB @tab
+@url{download/nncp-5.2.1.tar.xz.meta4, meta4}
+@url{download/nncp-5.2.1.tar.xz, tar}
+@url{download/nncp-5.2.1.tar.xz.sig, sig}
+
+@item @ref{Release 5_2_0, 5.2.0} @tab 2019-12-14 @tab 1109 KiB @tab
+@url{download/nncp-5.2.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.2.0.tar.xz, tar}
+@url{download/nncp-5.2.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_1_2, 5.1.2} @tab 2019-12-13 @tab 1106 KiB @tab
+@url{download/nncp-5.1.2.tar.xz.meta4, meta4}
+@url{download/nncp-5.1.2.tar.xz, tar}
+@url{download/nncp-5.1.2.tar.xz.sig, sig}
+
+@item @ref{Release 5_1_1, 5.1.1} @tab 2019-12-01 @tab 1103 KiB @tab
+@url{download/nncp-5.1.1.tar.xz.meta4, meta4}
+@url{download/nncp-5.1.1.tar.xz, tar}
+@url{download/nncp-5.1.1.tar.xz.sig, sig}
+
+@item @ref{Release 5_1_0, 5.1.0} @tab 2019-11-24 @tab 1103 KiB @tab
+@url{download/nncp-5.1.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.1.0.tar.xz, tar}
+@url{download/nncp-5.1.0.tar.xz.sig, sig}
+
+@item @ref{Release 5_0_0, 5.0.0} @tab 2019-11-15 @tab 1099 KiB @tab
+@url{download/nncp-5.0.0.tar.xz.meta4, meta4}
+@url{download/nncp-5.0.0.tar.xz, tar}
+@url{download/nncp-5.0.0.tar.xz.sig, sig}
+
+@item @ref{Release 4_1, 4.1} @tab 2019-05-01 @tab 1227 KiB @tab
+@url{download/nncp-4.1.tar.xz.meta4, meta4}
+@url{download/nncp-4.1.tar.xz, tar}
+@url{download/nncp-4.1.tar.xz.sig, sig}
+
+@item @ref{Release 4_0, 4.0} @tab 2019-04-28 @tab 1227 KiB @tab
+@url{download/nncp-4.0.tar.xz.meta4, meta4}
+@url{download/nncp-4.0.tar.xz, tar}
+@url{download/nncp-4.0.tar.xz.sig, sig}
+
+@item @ref{Release 3_4, 3.4} @tab 2018-06-10 @tab 1154 KiB @tab
+@url{download/nncp-3.4.tar.xz.meta4, meta4}
+@url{download/nncp-3.4.tar.xz, tar}
+@url{download/nncp-3.4.tar.xz.sig, sig}
+
+@item @ref{Release 3_3, 3.3} @tab 2018-06-02 @tab 1152 KiB @tab
+@url{download/nncp-3.3.tar.xz.meta4, meta4}
+@url{download/nncp-3.3.tar.xz, tar}
+@url{download/nncp-3.3.tar.xz.sig, sig}
+
+@item @ref{Release 3_2, 3.2} @tab 2018-05-27 @tab 1147 KiB @tab
+@url{download/nncp-3.2.tar.xz.meta4, meta4}
+@url{download/nncp-3.2.tar.xz, tar}
+@url{download/nncp-3.2.tar.xz.sig, sig}
+
+@item @ref{Release 3_1, 3.1} @tab 2018-02-18 @tab 1145 KiB @tab
+@url{download/nncp-3.1.tar.xz.meta4, meta4}
+@url{download/nncp-3.1.tar.xz, tar}
+@url{download/nncp-3.1.tar.xz.sig, sig}
+
+@item @ref{Release 3_0, 3.0} @tab 2017-12-30 @tab 993 KiB @tab
+@url{download/nncp-3.0.tar.xz.meta4, meta4}
+@url{download/nncp-3.0.tar.xz, tar}
+@url{download/nncp-3.0.tar.xz.sig, sig}
+
+@item @ref{Release 2_0, 2.0} @tab 2017-12-02 @tab 986 KiB @tab
+@url{download/nncp-2.0.tar.xz.meta4, meta4}
+@url{download/nncp-2.0.tar.xz, tar}
+@url{download/nncp-2.0.tar.xz.sig, sig}
+
+@item @ref{Release 1_0, 1.0} @tab 2017-12-02 @tab 987 KiB @tab
+@url{download/nncp-1.0.tar.xz.meta4, meta4}
+@url{download/nncp-1.0.tar.xz, tar}
+@url{download/nncp-1.0.tar.xz.sig, sig}
+
+@item @ref{Release 0_12, 0.12} @tab 2017-10-08 @tab 978 KiB @tab
+@url{download/nncp-0.12.tar.xz.meta4, meta4}
+@url{download/nncp-0.12.tar.xz, tar}
+@url{download/nncp-0.12.tar.xz.sig, sig}
+
+@item @ref{Release 0_11, 0.11} @tab 2017-08-21 @tab 1031 KiB @tab
+@url{download/nncp-0.11.tar.xz.meta4, meta4}
+@url{download/nncp-0.11.tar.xz, tar}
+@url{download/nncp-0.11.tar.xz.sig, sig}
+
+@item @ref{Release 0_10, 0.10} @tab 2017-07-04 @tab 949 KiB @tab
+@url{download/nncp-0.10.tar.xz.meta4, meta4}
+@url{download/nncp-0.10.tar.xz, tar}
+@url{download/nncp-0.10.tar.xz.sig, sig}
+
+@item @ref{Release 0_9, 0.9} @tab 2017-05-17 @tab 942 KiB @tab
+@url{download/nncp-0.9.tar.xz.meta4, meta4}
+@url{download/nncp-0.9.tar.xz, tar}
+@url{download/nncp-0.9.tar.xz.sig, sig}
+
+@item @ref{Release 0_8, 0.8} @tab 2017-04-30 @tab 932 KiB @tab
+@url{download/nncp-0.8.tar.xz.meta4, meta4}
+@url{download/nncp-0.8.tar.xz, tar}
+@url{download/nncp-0.8.tar.xz.sig, sig}
+
+@item @ref{Release 0_7, 0.7} @tab 2017-04-02 @tab 783 KiB @tab
+@url{download/nncp-0.7.tar.xz.meta4, meta4}
+@url{download/nncp-0.7.tar.xz, tar}
+@url{download/nncp-0.7.tar.xz.sig, sig}
+
+@item @ref{Release 0_6, 0.6} @tab 2017-02-05 @tab 746 KiB @tab
+@url{download/nncp-0.6.tar.xz.meta4, meta4}
+@url{download/nncp-0.6.tar.xz, tar}
+@url{download/nncp-0.6.tar.xz.sig, sig}
+
+@item @ref{Release 0_5, 0.5} @tab 2017-01-19 @tab 743 KiB @tab
+@url{download/nncp-0.5.tar.xz.meta4, meta4}
+@url{download/nncp-0.5.tar.xz, tar}
+@url{download/nncp-0.5.tar.xz.sig, sig}
+
+@item @ref{Release 0_4, 0.4} @tab 2017-01-17 @tab 741 KiB @tab
+@url{download/nncp-0.4.tar.xz.meta4, meta4}
+@url{download/nncp-0.4.tar.xz, tar}
+@url{download/nncp-0.4.tar.xz.sig, sig}
+
+@item @ref{Release 0_3, 0.3} @tab 2017-01-17 @tab 741 KiB @tab
+@url{download/nncp-0.3.tar.xz.meta4, meta4}
+@url{download/nncp-0.3.tar.xz, tar}
+@url{download/nncp-0.3.tar.xz.sig, sig}
+
+@item @ref{Release 0_2, 0.2} @tab 2017-01-17 @tab 740 KiB @tab
+@url{download/nncp-0.2.tar.xz.meta4, meta4}
+@url{download/nncp-0.2.tar.xz, tar}
+@url{download/nncp-0.2.tar.xz.sig, sig}
+
+@item 0.1 @tab 2017-01-10 @tab 720 KiB @tab
+@url{download/nncp-0.1.tar.xz.meta4, meta4}
+@url{download/nncp-0.1.tar.xz, tar}
+@url{download/nncp-0.1.tar.xz.sig, sig}
 
 @end multitable
index 8e15d831a891d7ae79d7ff96ec61e63981f76799..b08e06afccb6ad0abd8a9aeb1518070ed3b5224f 100644 (file)
@@ -1,12 +1,11 @@
 \input texinfo
-@documentencoding UTF-8
 @settitle NNCP
 
 @copying
 This manual is for NNCP (Node to Node copy) -- collection of utilities
 simplifying secure store-and-forward files and mail exchanging.
 
-Copyright @copyright{} 2016-2022 @email{stargrave@@stargrave.org, Sergey Matveev}
+Copyright @copyright{} 2016-2023 @email{stargrave@@stargrave.org, Sergey Matveev}
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
index 6850354c1ccc41ae73411d9f7b9f0b75dbce4536..e124734cec6a50a73492e3c4c045bd9bcd5c39d0 100644 (file)
@@ -15,6 +15,9 @@ Possibly NNCP package already exists for your distribution:
 @cindex Debian
 @item @url{https://tracker.debian.org/pkg/nncp, Debian packages}
 
+@cindex Docker
+@item @url{https://hub.docker.com/r/jgoerzen/nncp, Docker image}
+
 @cindex DragonFly
 @item @url{https://github.com/DragonFlyBSD/DPorts/tree/master/net/nncp, DragonFly BSD ports}
 
@@ -22,7 +25,10 @@ Possibly NNCP package already exists for your distribution:
 @item @url{https://www.freshports.org/net/nncp/, FreeBSD ports}
 
 @cindex Guix
-@item GNU @url{https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/uucp.scm, Guix}
+@item GNU @url{https://packages.guix.gnu.org/packages/nncp/, Guix}
+
+@cindex Mint
+@item Linux @url{https://community.linuxmint.com/software/view/nncp, Mint}
 
 @cindex NetBSD
 @item @url{https://pkgsrc.se/wip/nncp, NetBSD package}
@@ -30,8 +36,12 @@ Possibly NNCP package already exists for your distribution:
 @cindex NixOS
 @item @url{https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/misc/nncp, NixOS packages}
 
+@cindex Ubuntu
+@item @url{https://packages.ubuntu.com/search?keywords=nncp, Ubuntu}
+
 @cindex Void Linux
 @item @url{https://github.com/void-linux/void-packages/blob/master/srcpkgs/nncp/template, Void Linux}
+
 @end itemize
 
 @cindex POSIX
@@ -40,7 +50,7 @@ NNCP should run on any POSIX-compatible operating system.
 @pindex go
 @pindex texinfo
 NNCP is written on @url{https://go.dev/, Go} programming language
-and you have to install Go compiler 1.17+ version.
+and you have to install Go compiler 1.20+ version.
 @url{http://cr.yp.to/redo.html, redo} build system is recommended for
 convenience. @url{https://www.gnu.org/software/texinfo/, Texinfo} is
 used for building documentation (although tarballs already include it).
index 49e7778ed9de4190719b9491ea57eb29b56b2c85..bc331a886664d09e8a176a237cbed16d313c1309 100644 (file)
@@ -1,6 +1,19 @@
 @node Новости
 @section Новости
 
+@node Релиз 8.8.3
+@subsection Релиз 8.8.3
+@itemize
+
+@item
+Исправлена @command{nncp-reass} команда, которая некорректно сообщала о
+плохом размере последнего куска файла если он был кратен размеру chunk-а.
+
+@item
+Обновлены зависимости. Теперь требуется Go 1.20+.
+
+@end itemize
+
 @node Релиз 8.8.2
 @subsection Релиз 8.8.2
 @itemize
index 50f675bc4973eca3e6b388124dcca94eca8e5869..fa973407bbac647a13281a5ece77fd9c6a9983aa 100644 (file)
@@ -4,6 +4,19 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 8_8_3
+@section Release 8.8.3
+@itemize
+
+@item
+Fixed @command{nncp-reass} command, that incorrectly reported about
+wrong last chunk's size if it is multiple of the chunk-size.
+
+@item
+Updated dependencies. Go 1.20+ is required now.
+
+@end itemize
+
 @node Release 8_8_2
 @section Release 8.8.2
 @itemize
similarity index 95%
rename from makedist.sh
rename to makedist
index 997ce75b4e9a51645bd2d4586b043fea6555ec9a..0df054c5bc648f07e766e3ada156a1deba4d4709 100755 (executable)
+++ b/makedist
@@ -125,13 +125,12 @@ tarball=nncp-"$release".tar.xz
 gpg --detach-sign --sign --local-user releases@nncpgo.org "$tarball"
 gpg --enarmor < "$tarball".sig |
     sed "/^Comment:/d ; s/ARMORED FILE/SIGNATURE/" > "$tarball".asc
-meta4-create -file "$tarball" -mtime "$tarball" -sig "$tarball".asc \
+meta4-create -fn "$tarball" -mtime "$tarball" -sig "$tarball".asc \
     http://www.nncpgo.org/download/"$tarball" \
     http://y.www.nncpgo.org/download/"$tarball" \
-    https://nncp.mirrors.quux.org/download/"$tarball" > "$tarball".meta4
+    https://nncp.mirrors.quux.org/download/"$tarball" < "$tarball" > "$tarball".meta4
 
 size=$(( $(stat -f %z $tarball) / 1024 ))
-hash=$(gpg --print-md SHA256 < $tarball)
 release_date=$(date "+%Y-%m-%d")
 
 mv -v $tmp/"$tarball" $tmp/"$tarball".sig $tmp/"$tarball".meta4 $cur/doc/download
@@ -139,12 +138,10 @@ mv -v $tmp/"$tarball" $tmp/"$tarball".sig $tmp/"$tarball".meta4 $cur/doc/downloa
 release_underscored=`echo $release | tr . _`
 cat <<EOF
 An entry for documentation:
-@item @ref{Release $release_underscored, $release} @tab $release_date @tab $size KiB
-@tab
-    @url{download/nncp-${release}.tar.xz.meta4, meta4}
-    @url{download/nncp-${release}.tar.xz, link}
-    @url{download/nncp-${release}.tar.xz.sig, sig}
-@tab @code{$hash}
+@item @ref{Release $release_underscored, $release} @tab $release_date @tab $size KiB @tab
+@url{download/nncp-${release}.tar.xz.meta4, meta4}
+@url{download/nncp-${release}.tar.xz, link}
+@url{download/nncp-${release}.tar.xz.sig, sig}
 EOF
 
 cd $cur
@@ -185,7 +182,6 @@ Source code and its signature for that version can be found here:
     http://www.nncpgo.org/download/nncp-${release}.tar.xz ($size KiB)
     http://www.nncpgo.org/download/nncp-${release}.tar.xz.sig
 
-SHA256 hash: $hash
 GPG key ID: 0x2B25868E75A1A953 NNCP releases <releases@nncpgo.org>
 Fingerprint: 92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
 
@@ -240,7 +236,6 @@ $(git cat-file -p v$release | sed -n '6,/^.*BEGIN/p' | sed '$d')
     http://www.nncpgo.org/download/nncp-${release}.tar.xz ($size KiB)
     http://www.nncpgo.org/download/nncp-${release}.tar.xz.sig
 
-SHA256 хэш: $hash
 Идентификатор GPG ключа: 0x2B25868E75A1A953 NNCP releases <releases@nncpgo.org>
 Отпечаток: 92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
 
index f59bbc02d588966a4db365f67aa5fe1529f175c6..be9f22f31848ea6195e5302ba2663ac0e0b1b29f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 95a70d6dcc502e03484c2385d8a665dde3b78bf8..50f1de1a71dc0ce399e439ee902566340394ad37 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 98bc80c1a4c35c249f91d2cfa1e2488c9daed480..a57277e88be3462aee9c4dcc4ab1d1282d07cd62 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -468,7 +468,7 @@ func NewArea(ctx *Ctx, name string, cfg *AreaJSON) (*Area, error) {
 
 func CfgParse(data []byte) (*CfgJSON, error) {
        var err error
-       if bytes.Compare(data[:8], MagicNNCPBv3.B[:]) == 0 {
+       if bytes.Equal(data[:8], MagicNNCPBv3.B[:]) {
                os.Stderr.WriteString("Passphrase:")
                password, err := term.ReadPassword(0)
                if err != nil {
@@ -479,9 +479,9 @@ func CfgParse(data []byte) (*CfgJSON, error) {
                if err != nil {
                        return nil, err
                }
-       } else if bytes.Compare(data[:8], MagicNNCPBv2.B[:]) == 0 {
+       } else if bytes.Equal(data[:8], MagicNNCPBv2.B[:]) {
                log.Fatalln(MagicNNCPBv2.TooOld())
-       } else if bytes.Compare(data[:8], MagicNNCPBv1.B[:]) == 0 {
+       } else if bytes.Equal(data[:8], MagicNNCPBv1.B[:]) {
                log.Fatalln(MagicNNCPBv1.TooOld())
        }
        var cfgGeneral map[string]interface{}
index de45a7d10a546428a6e4a614c0da165b6352a9e5..f9378c8b34c6abd94294a44fc4842f73c209e052 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -18,8 +18,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package nncp
 
 import (
+       "errors"
        "fmt"
-       "io/ioutil"
+       "io/fs"
        "os"
        "path/filepath"
        "sort"
@@ -65,7 +66,7 @@ func cfgDirSave(v interface{}, dst ...string) error {
        if strings.HasSuffix(dst[len(dst)-1], "prv") {
                mode = os.FileMode(0600)
        }
-       return ioutil.WriteFile(filepath.Join(dst...), []byte(r+"\n"), mode)
+       return os.WriteFile(filepath.Join(dst...), []byte(r+"\n"), mode)
 }
 
 func cfgDirTouch(dst ...string) error {
@@ -433,9 +434,9 @@ func CfgToDir(dst string, cfg *CfgJSON) (err error) {
 }
 
 func cfgDirLoad(src ...string) (v string, exists bool, err error) {
-       b, err := ioutil.ReadFile(filepath.Join(src...))
+       b, err := os.ReadFile(filepath.Join(src...))
        if err != nil {
-               if os.IsNotExist(err) {
+               if errors.Is(err, fs.ErrNotExist) {
                        return "", false, nil
                }
                return "", false, err
@@ -531,8 +532,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                cfg.MCDRxIfis = strings.Split(*sp, "\n")
        }
 
-       fis, err := ioutil.ReadDir(filepath.Join(src, "mcd-send"))
-       if err != nil && !os.IsNotExist(err) {
+       fis, err := os.ReadDir(filepath.Join(src, "mcd-send"))
+       if err != nil && !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
        if len(fis) > 0 {
@@ -543,7 +544,7 @@ func DirToCfg(src string) (*CfgJSON, error) {
                if n[0] == '.' {
                        continue
                }
-               b, err := ioutil.ReadFile(filepath.Join(src, "mcd-send", fi.Name()))
+               b, err := os.ReadFile(filepath.Join(src, "mcd-send", fi.Name()))
                if err != nil {
                        return nil, err
                }
@@ -565,8 +566,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                        return nil, err
                }
        }
-       fis, err = ioutil.ReadDir(filepath.Join(src, "notify", "exec"))
-       if err != nil && !os.IsNotExist(err) {
+       fis, err = os.ReadDir(filepath.Join(src, "notify", "exec"))
+       if err != nil && !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
        for _, fi := range fis {
@@ -582,7 +583,7 @@ func DirToCfg(src string) (*CfgJSON, error) {
                cfg.Notify = &notify
        }
 
-       if _, err = ioutil.ReadDir(filepath.Join(src, "self")); err == nil {
+       if _, err = os.ReadDir(filepath.Join(src, "self")); err == nil {
                self := NodeOurJSON{}
                if self.Id, err = cfgDirLoadMust(src, "self", "id"); err != nil {
                        return nil, err
@@ -606,13 +607,13 @@ func DirToCfg(src string) (*CfgJSON, error) {
                        return nil, err
                }
                cfg.Self = &self
-       } else if !os.IsNotExist(err) {
+       } else if !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
 
        cfg.Neigh = make(map[string]NodeJSON)
-       fis, err = ioutil.ReadDir(filepath.Join(src, "neigh"))
-       if err != nil && !os.IsNotExist(err) {
+       fis, err = os.ReadDir(filepath.Join(src, "neigh"))
+       if err != nil && !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
        for _, fi := range fis {
@@ -638,8 +639,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                }
 
                node.Exec = make(map[string][]string)
-               fis2, err := ioutil.ReadDir(filepath.Join(src, "neigh", n, "exec"))
-               if err != nil && !os.IsNotExist(err) {
+               fis2, err := os.ReadDir(filepath.Join(src, "neigh", n, "exec"))
+               if err != nil && !errors.Is(err, fs.ErrNotExist) {
                        return nil, err
                }
                for _, fi2 := range fis2 {
@@ -697,8 +698,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                }
 
                node.Addrs = make(map[string]string)
-               fis2, err = ioutil.ReadDir(filepath.Join(src, "neigh", n, "addrs"))
-               if err != nil && !os.IsNotExist(err) {
+               fis2, err = os.ReadDir(filepath.Join(src, "neigh", n, "addrs"))
+               if err != nil && !errors.Is(err, fs.ErrNotExist) {
                        return nil, err
                }
                for _, fi2 := range fis2 {
@@ -747,8 +748,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                        node.MaxOnlineTime = &i
                }
 
-               fis2, err = ioutil.ReadDir(filepath.Join(src, "neigh", n, "calls"))
-               if err != nil && !os.IsNotExist(err) {
+               fis2, err = os.ReadDir(filepath.Join(src, "neigh", n, "calls"))
+               if err != nil && !errors.Is(err, fs.ErrNotExist) {
                        return nil, err
                }
                callsIdx := make([]int, 0, len(fis2))
@@ -861,8 +862,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
        }
 
        cfg.Areas = make(map[string]AreaJSON)
-       fis, err = ioutil.ReadDir(filepath.Join(src, "areas"))
-       if err != nil && !os.IsNotExist(err) {
+       fis, err = os.ReadDir(filepath.Join(src, "areas"))
+       if err != nil && !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
        for _, fi := range fis {
@@ -890,8 +891,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                }
 
                area.Exec = make(map[string][]string)
-               fis2, err := ioutil.ReadDir(filepath.Join(src, "areas", n, "exec"))
-               if err != nil && !os.IsNotExist(err) {
+               fis2, err := os.ReadDir(filepath.Join(src, "areas", n, "exec"))
+               if err != nil && !errors.Is(err, fs.ErrNotExist) {
                        return nil, err
                }
                for _, fi2 := range fis2 {
@@ -916,8 +917,8 @@ func DirToCfg(src string) (*CfgJSON, error) {
                cfg.Areas[n] = area
        }
 
-       fis, err = ioutil.ReadDir(filepath.Join(src, "yggdrasil-aliases"))
-       if err != nil && !os.IsNotExist(err) {
+       fis, err = os.ReadDir(filepath.Join(src, "yggdrasil-aliases"))
+       if err != nil && !errors.Is(err, fs.ErrNotExist) {
                return nil, err
        }
        if len(fis) > 0 {
@@ -928,7 +929,7 @@ func DirToCfg(src string) (*CfgJSON, error) {
                if n[0] == '.' {
                        continue
                }
-               b, err := ioutil.ReadFile(filepath.Join(src, "yggdrasil-aliases", fi.Name()))
+               b, err := os.ReadFile(filepath.Join(src, "yggdrasil-aliases", fi.Name()))
                if err != nil {
                        return nil, err
                }
index bd191034fe5191c5bf5136eabf377713792d7206..a4e0d06d31ea7cc51048acb4ec8b0d7a5a0dbd9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ func Check(
        ); err != nil {
                return false, err
        }
-       return bytes.Compare(hsh.Sum(nil), checksum) == 0, nil
+       return bytes.Equal(hsh.Sum(nil), checksum), nil
 }
 
 func (ctx *Ctx) checkXxIsBad(nodeId *NodeId, xx TRxTx) bool {
@@ -113,7 +113,7 @@ func (ctx *Ctx) CheckNoCK(nodeId *NodeId, hshValue *[MTHSize]byte, mth MTH) (int
                ); err != nil {
                        return 0, err
                }
-               if bytes.Compare(mth.Sum(nil), hshValue[:]) == 0 {
+               if bytes.Equal(mth.Sum(nil), hshValue[:]) {
                        gut = true
                }
        }
index ffa34554d190ba2cbcf4d588b8a990b0e99173b5..dd88ef5124bd1a971be97b56dde5a1188f22d66e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 098218aa356c45583167a5f032305d28e53bcd89..20fe68121686cf9b721d17bbf2fb2dbaac8892a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -34,8 +34,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-ack -- send packet receipt acknowledgement\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-ack -- send packet receipt acknowledgement\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] -all\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "Usage: %s [options] -node NODE[,...]\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "Usage: %s [options] -node NODE -pkt PKT\n", os.Args[0])
index 28423b42fd031740507a677534c895162ddfc96a..6fa0ab3642489d76fa04cf22d693c73c45f31cb1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ import (
        "flag"
        "fmt"
        "io"
-       "io/ioutil"
+       "io/fs"
        "log"
        "os"
        "path/filepath"
@@ -38,8 +38,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-bundle -- Create/digest stream of NNCP encrypted packets\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-bundle -- Create/digest stream of NNCP encrypted packets\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] -tx [-delete] NODE [NODE ...] > ...\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -rx -delete [-dryrun] [NODE ...] < ...\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -rx [-check] [-dryrun] [NODE ...] < ...\n", os.Args[0])
@@ -408,7 +408,7 @@ func main() {
                        }
                        dstDirPath := filepath.Join(ctx.Spool, sender, string(nncp.TRx))
                        dstPath := filepath.Join(dstDirPath, pktName)
-                       if _, err = os.Stat(dstPath); err == nil || !os.IsNotExist(err) {
+                       if _, err = os.Stat(dstPath); err == nil || !errors.Is(err, fs.ErrNotExist) {
                                ctx.LogD("bundle-rx-exists", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": packet already exists"
                                })
@@ -416,7 +416,7 @@ func main() {
                        }
                        if _, err = os.Stat(filepath.Join(
                                dstDirPath, nncp.SeenDir, pktName,
-                       )); err == nil || !os.IsNotExist(err) {
+                       )); err == nil || !errors.Is(err, fs.ErrNotExist) {
                                ctx.LogD("bundle-rx-seen", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": packet already seen"
                                })
@@ -461,7 +461,7 @@ func main() {
                                }
                        } else {
                                if *dryRun {
-                                       if _, err = nncp.CopyProgressed(ioutil.Discard, tarR, "Rx", les, ctx.ShowPrgrs); err != nil {
+                                       if _, err = nncp.CopyProgressed(io.Discard, tarR, "Rx", les, ctx.ShowPrgrs); err != nil {
                                                log.Fatalln("Error during copying:", err)
                                        }
                                } else {
index 4d8fb0648a3eaf547b4d635bec8cf0a584e70a16..8ff3a0e548523135d52a564772dd150d639e91bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -32,8 +32,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-call -- call TCP daemon\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-call -- call TCP daemon\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] NODE[:ADDR] [FORCEADDR]\n", os.Args[0])
        fmt.Fprintln(os.Stderr, "Options:")
        flag.PrintDefaults()
index 50d9bf4fc8b85aa8737cc48f2fd428b53bffa89d..7859377f34c309285e05979ea9a2022cfb8ffd6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-caller -- croned NNCP TCP daemon caller\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-caller -- croned NNCP TCP daemon caller\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] [NODE ...]\n", os.Args[0])
        fmt.Fprintln(os.Stderr, "Options:")
        flag.PrintDefaults()
index a2656d640df708e5467d2d061cbd18562eb10abd..5697feec32bc384f372be2ad86d11632810876fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@ package main
 import (
        "flag"
        "fmt"
-       "io/ioutil"
        "log"
        "os"
 
@@ -30,8 +29,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-cfgdir -- Convert configuration file to the directory layout.\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-cfgdir -- Convert configuration file to the directory layout.\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] [-cfg ...] -dump /path/to/dir\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -load /path/to/dir > cfg.hjson\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
@@ -63,7 +62,7 @@ func main() {
        }
 
        if *doDump {
-               cfgRaw, err := ioutil.ReadFile(*cfgPath)
+               cfgRaw, err := os.ReadFile(*cfgPath)
                if err != nil {
                        log.Fatalln(err)
                }
index cce42dac950e890b7789c4521840422cd397fdfe..c1ac70e40565b646de9fc7af33900790cbe9bdd1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -23,7 +23,6 @@ import (
        "errors"
        "flag"
        "fmt"
-       "io/ioutil"
        "log"
        "os"
 
@@ -34,8 +33,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-cfgenc -- encrypt/decrypt configuration file\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-cfgenc -- encrypt/decrypt configuration file\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] cfg.hjson > cfg.hjson.eblob\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -d cfg.hjson.eblob > cfg.hjson\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -dump cfg.hjson.eblob\n", os.Args[0])
@@ -70,7 +69,7 @@ func main() {
                os.Exit(1)
        }
 
-       data, err := ioutil.ReadFile(flag.Arg(0))
+       data, err := os.ReadFile(flag.Arg(0))
        if err != nil {
                log.Fatalln("Can not read data:", err)
        }
@@ -115,7 +114,7 @@ func main() {
                log.Fatalln(err)
        }
        os.Stderr.WriteString("\n")
-       if bytes.Compare(password1, password2) != 0 {
+       if !bytes.Equal(password1, password2) {
                log.Fatalln(errors.New("Passphrases do not match"))
        }
        eblob, err := nncp.NewEBlob(*sOpt, *tOpt, *pOpt, password1, data)
index bc50792325ab4757c80b85667f4fb7e7f2c4be40..459cad0a7385aff1acf5127d4dc6c4009793c6f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -29,8 +29,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-cfgmin -- print stripped configuration\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-cfgmin -- print stripped configuration\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index 8e0fa9f819c48e2e4ad1801e6a106229c73a1f4a..debe88e0d2d5811b2085479c999dab16fbde64ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
        fmt.Fprintln(os.Stderr, "nncp-cfgnew -- generate new configuration and keys\nOptions:")
        flag.PrintDefaults()
 }
index 2c9eafb4b6a5469b6b77516bf439b9542663ec9b..2fc3fd6d78f30ac5d3838e1a0e2f2f6ff221fdcb 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-check -- verify Rx/Tx packets checksum\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-check -- verify Rx/Tx packets checksum\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [-nock] [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index 682aa30b5972d666b3217655a9d8eeac6ceb177e..0a4f4b70795669f76a51ab56cbd4ff9c2e39d1d0 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -31,8 +31,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-cronexpr -- cron expression checker\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-cronexpr -- cron expression checker\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [-num XXX] CRON-EXPRESSION\n", os.Args[0])
        flag.PrintDefaults()
 }
index bcd5bcda8ff72c80ad9baf5292b4df79a6e1fac7..6ae89c0385021a938e1aec210c299276fb5ec92a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -36,8 +36,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-daemon -- TCP daemon\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-daemon -- TCP daemon\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index aa2ab74895cce66d152883df6c6234521f4aff5f..f7a28c41872c15820a06f96eac1f6466763a7450 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-exec -- send execution command\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-exec -- send execution command\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] NODE HANDLE [ARG0 ARG1 ...]\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] %s:AREA HANDLE [ARG0 ARG1 ...]\nOptions:\n",
                os.Args[0], nncp.AreaDir)
index 9d9c694ab5e432c19bed289ceaa5c1af8fd0e4eb..abcf8bc76621d4430c760da4740770061a6f6ce7 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -29,8 +29,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-file -- send file\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-file -- send file\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] SRC NODE:[DST]\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] SRC %s:AREA:[DST]\nOptions:\n",
                os.Args[0], nncp.AreaDir)
index 09bf3752d5864d024c56a805705e5a643fbcf51e..9c1f41fe1905c1d28b15ca6a49e24b758cd2bac6 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-freq -- send file request\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-freq -- send file request\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] NODE:SRC [DST]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index de49971d03b2d2d48d976f81fec0ea0e93e14d23..c349007ac7c78a4b7c7c2c61ad53328ab0ebbde1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -32,8 +32,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-hash -- calculate MTH hash of the file\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-hash -- calculate MTH hash of the file\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [-file ...] [-seek X] [-debug] [-progress] [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index dbe03b8d20bbbba943ea29ec6ddf7031f8bfa65b..73d09afa362d864fee50ac5b5c9205174dc4503f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-log -- read logs\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-log -- read logs\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index d40b8c5f859a969296acab7d012dc53fdb123721..e8377b2e5b9d38feb4d85c6543538989e1e3c120 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-pkt -- parse raw packet\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-pkt -- parse raw packet\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
        fmt.Fprintln(os.Stderr, "Packet is read from stdin.")
@@ -103,7 +103,6 @@ func doPlain(ctx *nncp.Ctx, pkt nncp.Pkt, dump, decompress bool) {
                "Packet type: plain\nPayload type: %s\nNiceness: %s (%d)\nPath: %s\n",
                payloadType, nncp.NicenessFmt(pkt.Nice), pkt.Nice, path,
        )
-       return
 }
 
 func doEncrypted(
index 77d1c7ee600c1c34f38424bb507ac917c951288d..e92a2e59307f1d5f2c5580d5d8992053106cb0a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@ import (
        "fmt"
        "hash"
        "io"
+       "io/fs"
        "log"
        "os"
        "path/filepath"
@@ -39,8 +40,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-reass -- reassemble chunked files\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-reass -- reassemble chunked files\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] [FILE.nncp.meta]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
        fmt.Fprint(os.Stderr, `
@@ -51,10 +52,10 @@ but at least one of them must be specified.
 
 func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bool {
        fd, err := os.Open(path)
-       defer fd.Close()
        if err != nil {
                log.Fatalln("Can not open file:", err)
        }
+       defer fd.Close()
        var metaPkt nncp.ChunkedMeta
        les := nncp.LEs{{K: "Path", V: path}}
        logMsg := func(les nncp.LEs) string {
@@ -115,7 +116,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
        for chunkNum, chunkPath := range chunksPaths {
                fi, err := os.Stat(chunkPath)
                lesChunk := append(les, nncp.LE{K: "Chunk", V: chunkNum})
-               if err != nil && os.IsNotExist(err) {
+               if err != nil && errors.Is(err, fs.ErrNotExist) {
                        ctx.LogI("reass-chunk-miss", lesChunk, func(les nncp.LEs) string {
                                return fmt.Sprintf("%s: chunk %d missing", logMsg(les), chunkNum)
                        })
@@ -124,7 +125,8 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                }
                var badSize bool
                if chunkNum+1 == len(chunksPaths) {
-                       badSize = uint64(fi.Size()) != metaPkt.FileSize%metaPkt.ChunkSize
+                       left := metaPkt.FileSize % metaPkt.ChunkSize
+                       badSize = left != 0 && uint64(fi.Size()) != left
                } else {
                        badSize = uint64(fi.Size()) != metaPkt.ChunkSize
                }
@@ -164,7 +166,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
                        log.Fatalln(err)
                }
                fd.Close()
-               if bytes.Compare(hsh.Sum(nil), metaPkt.Checksums[chunkNum][:]) != 0 {
+               if !bytes.Equal(hsh.Sum(nil), metaPkt.Checksums[chunkNum][:]) {
                        ctx.LogE(
                                "reass-chunk",
                                nncp.LEs{{K: "Path", V: path}, {K: "Chunk", V: chunkNum}},
@@ -269,7 +271,7 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
        dstPathCtr := 0
        for {
                if _, err = os.Stat(dstPath); err != nil {
-                       if os.IsNotExist(err) {
+                       if errors.Is(err, fs.ErrNotExist) {
                                break
                        }
                        log.Fatalln(err)
@@ -291,7 +293,6 @@ func process(ctx *nncp.Ctx, path string, keep, dryRun, stdout, dumpMeta bool) bo
 
 func findMetas(ctx *nncp.Ctx, dirPath string) []string {
        dir, err := os.Open(dirPath)
-       defer dir.Close()
        logMsg := func(les nncp.LEs) string {
                return "Finding .meta in " + dirPath
        }
@@ -299,6 +300,7 @@ func findMetas(ctx *nncp.Ctx, dirPath string) []string {
                ctx.LogE("reass", nncp.LEs{{K: "Path", V: dirPath}}, err, logMsg)
                return nil
        }
+       defer dir.Close()
        fis, err := dir.Readdir(0)
        dir.Close()
        if err != nil {
index ef6c44d287f7e27e38b2488997b742e004b0925c..b5274454a017cae0a0260a492c48e2ec2429d083 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,9 +19,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package main
 
 import (
+       "errors"
        "flag"
        "fmt"
        "io"
+       "io/fs"
        "log"
        "os"
        "path/filepath"
@@ -34,8 +36,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-rm -- remove packet\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-rm -- remove packet\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] [-older X] -tmp\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] -lock\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       %s [options] [-older X] {-all|-node NODE} -part\n", os.Args[0])
@@ -205,12 +207,12 @@ func main() {
                }
                remove := func(xx nncp.TRxTx) error {
                        p := filepath.Join(ctx.Spool, node.Id.String(), string(xx))
-                       if _, err := os.Stat(p); err != nil && os.IsNotExist(err) {
+                       if _, err := os.Stat(p); err != nil && errors.Is(err, fs.ErrNotExist) {
                                return nil
                        }
                        dir, err := os.Open(p)
                        if err != nil {
-                               if os.IsNotExist(err) {
+                               if errors.Is(err, fs.ErrNotExist) {
                                        return nil
                                }
                                return err
@@ -293,7 +295,7 @@ func main() {
                removeSub := func(p string) error {
                        return filepath.Walk(p, func(path string, info os.FileInfo, err error) error {
                                if err != nil {
-                                       if os.IsNotExist(err) {
+                                       if errors.Is(err, fs.ErrNotExist) {
                                                return nil
                                        }
                                        return err
@@ -356,7 +358,7 @@ func main() {
                                filepath.Join(ctx.Spool, node.Id.String(), nncp.AreaDir),
                                func(path string, info os.FileInfo, err error) error {
                                        if err != nil {
-                                               if os.IsNotExist(err) {
+                                               if errors.Is(err, fs.ErrNotExist) {
                                                        return nil
                                                }
                                                return err
index 241201f46d0db886c50fecfe21d446f35c378704..1fc0fb13e8f0924e4b5248dcb5b3bfcd01c00736 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-stat -- show queued Rx/Tx stats\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-stat -- show queued Rx/Tx stats\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] [-pkt] [-node NODE]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index 76bb7653b2e97f177e0313d1005b33b8f3ef9d84..6a960368143aa8bca59548a171d9972bbd755596 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -30,8 +30,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-toss -- process inbound packets\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-toss -- process inbound packets\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
index bd822d1a3c22309b9621933056988d27dcb92508..f48bad6ad95bc84a7b5edb12d68da9c5dd1ce63e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -31,8 +31,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-trns -- transit existing encrypted packet\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-trns -- transit existing encrypted packet\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] -via NODEx[,...] NODE:PKT\n", os.Args[0])
        fmt.Fprintf(os.Stderr, "       (to transit SPOOL/NODE/tx/PKT)\n")
        fmt.Fprintf(os.Stderr, "       %s [options] -via NODEx[,...] /path/to/PKT\nOptions:\n",
index dc522a85dbfc0818e07b79d405a3898d34646c11..8685b1c1c5324633c292e2cbe53b08d21e52f03b 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ import (
        "flag"
        "fmt"
        "io"
+       "io/fs"
        "log"
        "os"
        "path/filepath"
@@ -33,8 +34,8 @@ import (
 )
 
 func usage() {
-       fmt.Fprintf(os.Stderr, nncp.UsageHeader())
-       fmt.Fprintf(os.Stderr, "nncp-xfer -- copy inbound and outbounds packets\n\n")
+       fmt.Fprint(os.Stderr, nncp.UsageHeader())
+       fmt.Fprint(os.Stderr, "nncp-xfer -- copy inbound and outbounds packets\n\n")
        fmt.Fprintf(os.Stderr, "Usage: %s [options] DIR\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
@@ -120,7 +121,7 @@ func main() {
        }
        ctx.LogD("xfer-self", les, logMsg)
        if _, err = os.Stat(selfPath); err != nil {
-               if os.IsNotExist(err) {
+               if errors.Is(err, fs.ErrNotExist) {
                        ctx.LogD("xfer-self-no-dir", les, func(les nncp.LEs) string {
                                return logMsg(les) + ": no directory"
                        })
@@ -215,7 +216,7 @@ func main() {
                                string(nncp.TRx),
                                nncp.SeenDir,
                                fiInt.Name(),
-                       )); err == nil || !os.IsNotExist(err) {
+                       )); err == nil || !errors.Is(err, fs.ErrNotExist) {
                                ctx.LogI("xfer-rx-seen", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": packet already seen"
                                })
@@ -389,7 +390,7 @@ Tx:
                }
                _, err = os.Stat(nodePath)
                if err != nil {
-                       if os.IsNotExist(err) {
+                       if errors.Is(err, fs.ErrNotExist) {
                                ctx.LogD("xfer-tx-not-exist", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": does not exist"
                                })
@@ -420,7 +421,7 @@ Tx:
                }
                _, err = os.Stat(dstPath)
                if err != nil {
-                       if os.IsNotExist(err) {
+                       if errors.Is(err, fs.ErrNotExist) {
                                if err = os.Mkdir(dstPath, os.FileMode(0777)); err != nil {
                                        ctx.UnlockDir(dirLock)
                                        ctx.LogE("xfer-tx-mkdir", les, err, logMsg)
@@ -450,7 +451,7 @@ Tx:
                                })
                                continue
                        }
-                       if _, err = os.Stat(filepath.Join(dstPath, pktName)); err == nil || !os.IsNotExist(err) {
+                       if _, err = os.Stat(filepath.Join(dstPath, pktName)); err == nil || !errors.Is(err, fs.ErrNotExist) {
                                ctx.LogD("xfer-tx-exists", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": already exists"
                                })
index c6f77c86876f644b27a8a69a3966e5ef5b0948f2..cf7d728d42ec06564a30a501fa873c035b48d849 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ package nncp
 import (
        "errors"
        "fmt"
-       "io/ioutil"
+       "io/fs"
        "os"
        "path/filepath"
        "strconv"
@@ -80,7 +80,7 @@ func ensureDir(dirs ...string) error {
                }
                return fmt.Errorf("%s: is not a directory", p)
        }
-       if !os.IsNotExist(err) {
+       if !errors.Is(err, fs.ErrNotExist) {
                return err
        }
        return os.MkdirAll(p, os.FileMode(0777))
@@ -119,7 +119,7 @@ func CtxFromCmdline(
                        return nil, err
                }
        } else {
-               cfgRaw, err := ioutil.ReadFile(cfgPath)
+               cfgRaw, err := os.ReadFile(cfgPath)
                if err != nil {
                        return nil, err
                }
index 1dab640ba6b8f3a1bcf14184024b5257f736ecbf..1f36d85267750796530db55d5a0ccaaff8f94ea1 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 424637a61c8abea46a126ecad983e8a7202db786..80e724df6733cc141faa1196e209285fda2ace94 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index a65f06842e16386a91ca84e7ec3d4cfc9bb41b79..fdb6bd9842edc11fc1503d8460f8c1a6079a1665 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 26b0315332ba26f8a0e435242922b1141d54465f..7f202039bb070556b9b39a1cac005df33fd1684c 100644 (file)
@@ -1,31 +1,31 @@
 module go.cypherpunks.ru/nncp/v8
 
 require (
-       github.com/Arceliar/ironwood v0.0.0-20221025225125-45b4281814c2
+       github.com/Arceliar/ironwood v0.0.0-20221115123222-ec61cea2f439
        github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892
-       github.com/dustin/go-humanize v1.0.0
+       github.com/dustin/go-humanize v1.0.1
        github.com/flynn/noise v1.0.0
        github.com/fsnotify/fsnotify v1.6.0
        github.com/gologme/log v1.3.0
        github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
        github.com/hjson/hjson-go v3.3.0+incompatible
-       github.com/klauspost/compress v1.15.12
-       github.com/yggdrasil-network/yggdrasil-go v0.4.6
+       github.com/klauspost/compress v1.16.5
+       github.com/yggdrasil-network/yggdrasil-go v0.4.7
        go.cypherpunks.ru/balloon v1.1.1
-       go.cypherpunks.ru/recfile v0.5.1
-       golang.org/x/crypto v0.3.0
-       golang.org/x/net v0.2.0
-       golang.org/x/sys v0.2.0
-       golang.org/x/term v0.2.0
-       gvisor.dev/gvisor v0.0.0-20220901235040-6ca97ef2ce1c
+       go.cypherpunks.ru/recfile v0.7.0
+       golang.org/x/crypto v0.8.0
+       golang.org/x/net v0.9.0
+       golang.org/x/sys v0.7.0
+       golang.org/x/term v0.7.0
+       gvisor.dev/gvisor v0.0.0-20230428223346-f33f75cda699
        lukechampine.com/blake3 v1.1.7
 )
 
 require (
        github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979 // indirect
        github.com/google/btree v1.0.1 // indirect
-       github.com/klauspost/cpuid/v2 v2.2.1 // indirect
-       golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
+       github.com/klauspost/cpuid/v2 v2.2.4 // indirect
+       golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
 )
 
 go 1.17
index 53d4cc9741d31b014592cd0a078a67c9cdbcc882..c43bd5107564424d5d15a5c006087279d4bfbb15 100644 (file)
@@ -1,11 +1,11 @@
-github.com/Arceliar/ironwood v0.0.0-20221025225125-45b4281814c2 h1:Usab30pNT2i/vZvpXcN9uOr5IO1RZPcUqoGH0DIAPnU=
-github.com/Arceliar/ironwood v0.0.0-20221025225125-45b4281814c2/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk=
+github.com/Arceliar/ironwood v0.0.0-20221115123222-ec61cea2f439 h1:eOW6/XIs06TnUn9GPCnfv71CQZw8edP3u3mH3lZt6iM=
+github.com/Arceliar/ironwood v0.0.0-20221115123222-ec61cea2f439/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk=
 github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979 h1:WndgpSW13S32VLQ3ugUxx2EnnWmgba1kCqPkd4Gk1yQ=
 github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979/go.mod h1:6Lkn+/zJilRMsKmbmG1RPoamiArC6HS73xbwRyp3UyI=
 github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o=
 github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE=
-github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
+github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
 github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ=
 github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=
 github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
@@ -18,44 +18,44 @@ github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 h1:f0n1xnMSmBLzVf
 github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA=
 github.com/hjson/hjson-go v3.3.0+incompatible h1:Rqr+Ya+0aCJMjaE4s8E9YKvuJLuLVpEvz4ONum52vnI=
 github.com/hjson/hjson-go v3.3.0+incompatible/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio=
-github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
-github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
+github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
+github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.2.1 h1:U33DW0aiEj633gHYw3LoDNfkDiYnE5Q8M/TKJn2f2jI=
-github.com/klauspost/cpuid/v2 v2.2.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
+github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
+github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
 github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/yggdrasil-network/yggdrasil-go v0.4.6 h1:GALUDV9QPz/5FVkbazpkTc9EABHufA556JwUJZr41j4=
-github.com/yggdrasil-network/yggdrasil-go v0.4.6/go.mod h1:PBMoAOvQjA9geNEeGyMXA9QgCS6Bu+9V+1VkWM84wpw=
+github.com/yggdrasil-network/yggdrasil-go v0.4.7 h1:1zFAsyHSgjQ2HGCsps1bK2EoUH3t0ZXfg+fEclPW0G8=
+github.com/yggdrasil-network/yggdrasil-go v0.4.7/go.mod h1:FjWmrJHR3To7qSAulXG23+WshFJSSRFiqqsNjxMEqgE=
 go.cypherpunks.ru/balloon v1.1.1 h1:ypHM1DRf/XuCrp9pDkTHg00CqZX/Np/APb//iHvDJTA=
 go.cypherpunks.ru/balloon v1.1.1/go.mod h1:k4s4ozrIrhpBjj78Z7LX8ZHxMQ+XE7DZUWl8gP2ojCo=
-go.cypherpunks.ru/recfile v0.5.1 h1:Sk9Og/7aybvg4PrZdhyFSeEdS6wvcisvd+1oGf8uFyU=
-go.cypherpunks.ru/recfile v0.5.1/go.mod h1:sR+KajB+vzofL3SFVFwKt3Fke0FaCcN1g3YPNAhU3qI=
+go.cypherpunks.ru/recfile v0.7.0 h1:0R1UnDGKccp7JnC66msslJMlSY02jHx/XkW+ISl0GuY=
+go.cypherpunks.ru/recfile v0.7.0/go.mod h1:sR+KajB+vzofL3SFVFwKt3Fke0FaCcN1g3YPNAhU3qI=
 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
 golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
-golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
+golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
+golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
-golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
+golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
+golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
-golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
+golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
-golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
+golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
+golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44=
+golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gvisor.dev/gvisor v0.0.0-20220901235040-6ca97ef2ce1c h1:m5lcgWnL3OElQNVyp3qcncItJ2c0sQlSGjYK2+nJTA4=
-gvisor.dev/gvisor v0.0.0-20220901235040-6ca97ef2ce1c/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
+gvisor.dev/gvisor v0.0.0-20230428223346-f33f75cda699 h1:Ns93L6u6C3xgQY2eodedE2ZgIW8JaQYExfHdACX1BJc=
+gvisor.dev/gvisor v0.0.0-20230428223346-f33f75cda699/go.mod h1:pzr6sy8gDLfVmDAg8OYrlKvGEHw5C3PGTiBXBTCx76Q=
 lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0=
 lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
index 618f608bb35855ec1751497942e16d5de180bc2e..8fdd70dfbf0e6184c2d1a5a251d92deaa8678930 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 05a7c9c66c91cee809e3cafc9fe8a0caea056a41..ff2977b22d1f9a369921033152617a3f9b1da8f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,8 +19,10 @@ package nncp
 
 import (
        "bytes"
+       "errors"
        "fmt"
        "io"
+       "io/fs"
        "os"
        "path/filepath"
        "strings"
@@ -148,7 +150,7 @@ func (ctx *Ctx) jobsFind(nodeId *NodeId, xx TRxTx, nock, part bool) chan Job {
                                fd, err = os.Open(pth)
                        } else {
                                fd, err = os.Open(JobPath2Hdr(pth))
-                               if err != nil && os.IsNotExist(err) {
+                               if err != nil && errors.Is(err, fs.ErrNotExist) {
                                        hdrExists = false
                                        fd, err = os.Open(pth)
                                }
index a756381bee0f5d353d602112c75080cef0704694..1e4e39498fb50e9bdba3e83b128eff2eb73fb576 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 7953a0227afe14836cb878ccbe10fa4020ad8539..5e53bcbd0c3a08dacae28a2959e27957ba7d1ea0 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 60af73eb1ffad5c2b2a6210ffdd737f08d454f82..96b78605d3b4d5f8b5dd7a44e92119821fcb90d2 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index b4de4f4cb602c97f0ced66027d744ca7441a03db..aceee17f7baed22d24cf9fb808bda005f25d6d04 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index ff39237f4a6fa1c64a9f07477417b412f919a039..655ffb97d7bdece50a512b3b0748e547e78b729f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -82,9 +82,7 @@ type MTHSeq struct {
        size        int64
        prependSize int64
        toSkip      int64
-       skipped     bool
        finished    bool
-       pktName     string
 }
 
 func MTHSeqNew(size, offset int64) *MTHSeq {
index f3c5dfe702875bbde1a7d2b322b7dd91e10bac5a..fcdff1752c2476abb369d1ec9106f931469dd22d 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -49,13 +49,13 @@ func TestMTHSeqSymmetric(t *testing.T) {
                if _, err := mth.PreaddFrom(bytes.NewReader(data), "", false); err != nil {
                        panic(err)
                }
-               if bytes.Compare(hsh0, mth.Sum(nil)) != 0 {
+               if !bytes.Equal(hsh0, mth.Sum(nil)) {
                        return false
                }
 
                mth = MTHSeqNew(0, 0)
                mth.Write(data)
-               if bytes.Compare(hsh0, mth.Sum(nil)) != 0 {
+               if !bytes.Equal(hsh0, mth.Sum(nil)) {
                        return false
                }
 
@@ -65,7 +65,7 @@ func TestMTHSeqSymmetric(t *testing.T) {
                        panic(err)
                }
                hsh00 := mth.Sum(nil)
-               if bytes.Compare(hsh0, hsh00) == 0 {
+               if bytes.Equal(hsh0, hsh00) {
                        return false
                }
 
@@ -76,17 +76,13 @@ func TestMTHSeqSymmetric(t *testing.T) {
                if _, err := mth.PreaddFrom(bytes.NewReader(data), "", false); err != nil {
                        panic(err)
                }
-               if bytes.Compare(hsh00, mth.Sum(nil)) != 0 {
+               if !bytes.Equal(hsh00, mth.Sum(nil)) {
                        return false
                }
 
                mth = MTHSeqNew(0, 0)
                mth.Write(data)
-               if bytes.Compare(hsh00, mth.Sum(nil)) != 0 {
-                       return false
-               }
-
-               return true
+               return bytes.Equal(hsh00, mth.Sum(nil))
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
@@ -110,7 +106,7 @@ func TestMTHSeqAndFatEqual(t *testing.T) {
                if _, err := io.Copy(seq, bytes.NewReader(data)); err != nil {
                        panic(err)
                }
-               return bytes.Compare(hshFat, seq.Sum(nil)) == 0
+               return bytes.Equal(hshFat, seq.Sum(nil))
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
@@ -128,7 +124,7 @@ func TestMTHNull(t *testing.T) {
        if _, err := seq.Write(nil); err != nil {
                t.Error(err)
        }
-       if bytes.Compare(hshFat, seq.Sum(nil)) != 0 {
+       if !bytes.Equal(hshFat, seq.Sum(nil)) {
                t.FailNow()
        }
 }
index 1655b9d713f03f88799273938756dc130a312159..dde9bcb020cb3b509bf5c0e0d7cbf3f22361a388 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.`
 const Base32Encoded32Len = 52
 
 var (
-       Version string = "8.8.2"
+       Version string = "8.8.3"
 
        Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding)
 )
@@ -51,7 +51,7 @@ func VersionGet() string {
 
 func UsageHeader() string {
        return VersionGet() + `
-Copyright (C) 2016-2022 Sergey Matveev
+Copyright (C) 2016-2023 Sergey Matveev
 License GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
index 10577b17289cbee491496b2c7653459fc5c8e9d7..d71fd294d9ef6d97c903ae83427f8d2edddaddf9 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 0f0ac9d111eeca33358469f50b69071f311b758a..e9295d483f24394cedee5088bfa20eeeb2e0414a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ func (c PipeConn) SetWriteDeadline(t time.Time) error {
 }
 
 func (c PipeConn) Close() (err error) {
-       err = c.r.Close()
+       c.r.Close()
        err = c.w.Close()
        go c.cmd.Wait()
        time.AfterFunc(time.Duration(10*time.Second), func() {
index ba711a30a86e2708803716db371dcf42ff3ed68e..38e4659a0030f0d153e889d822ea83745abc6bf7 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -514,7 +514,7 @@ FullRead:
                if err != nil {
                        panic(err)
                }
-               if bytes.Compare(ct[:n], pt[:n]) != 0 {
+               if !bytes.Equal(ct[:n], pt[:n]) {
                        err = errors.New("wrong pad value")
                        return
                }
index 37cb637b9dfc2aeb9ec8e3be344d80a100a01f95..d90877dafac36ec4ad38d227e2b9ff13d2515947 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -146,7 +146,7 @@ func TestPktEncRead(t *testing.T) {
                }
                var pktBuf bytes.Buffer
                xdr.Marshal(&pktBuf, &pkt)
-               return bytes.Compare(pt.Bytes(), append(pktBuf.Bytes(), data...)) == 0
+               return bytes.Equal(pt.Bytes(), append(pktBuf.Bytes(), data...))
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
index 171f8e95878a4de603ae987784d52fa9e2fded25..c170674334a0fff1fc2e30b9f78d75a92f9ea146 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -37,7 +37,6 @@ var progressBarsLock sync.RWMutex
 
 type ProgressBar struct {
        w       *uilive.Writer
-       hash    string
        started time.Time
        initial int64
        full    int64
index eca9544945b1e0d734d6b21d692cce85dc68f372..3bef9c3cf63105d68ee5d9d14ab16bee1e048134 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -287,21 +287,22 @@ func (state *SPState) dirUnlock() {
 
 func (state *SPState) WriteSP(dst io.Writer, payload []byte, ping bool) error {
        state.writeSPBuf.Reset()
-       n, err := xdr.Marshal(&state.writeSPBuf, SPRaw{
+       if _, err := xdr.Marshal(&state.writeSPBuf, SPRaw{
                Magic:   MagicNNCPSv1.B,
                Payload: payload,
-       })
+       }); err != nil {
+               return err
+       }
+       n, err := dst.Write(state.writeSPBuf.Bytes())
        if err != nil {
                return err
        }
-       if n, err = dst.Write(state.writeSPBuf.Bytes()); err == nil {
-               state.TxLastSeen = time.Now()
-               state.TxBytes += int64(n)
-               if !ping {
-                       state.TxLastNonPing = state.TxLastSeen
-               }
+       state.TxLastSeen = time.Now()
+       state.TxBytes += int64(n)
+       if !ping {
+               state.TxLastNonPing = state.TxLastSeen
        }
-       return err
+       return nil
 }
 
 func (state *SPState) ReadSP(src io.Reader) ([]byte, error) {
@@ -1118,7 +1119,7 @@ func (state *SPState) Wait() bool {
        state.wg.Wait()
        close(state.payloads)
        close(state.pings)
-       state.Duration = time.Now().Sub(state.started)
+       state.Duration = time.Since(state.started)
        state.dirUnlock()
        state.RxSpeed = state.RxBytes
        state.TxSpeed = state.TxBytes
@@ -1477,7 +1478,7 @@ func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) {
                        if hasherAndOffset != nil {
                                delete(state.fileHashers, filePath)
                                if hasherAndOffset.mth.PreaddSize() == 0 {
-                                       if bytes.Compare(hasherAndOffset.mth.Sum(nil), file.Hash[:]) != 0 {
+                                       if !bytes.Equal(hasherAndOffset.mth.Sum(nil), file.Hash[:]) {
                                                state.Ctx.LogE(
                                                        "sp-file-bad-checksum", lesp,
                                                        errors.New("checksum mismatch"),
index 4a43eaa41a2675969f0d7109fe362f5304c93866..c4f57c167dad4ba6353f1c08c2edbde8ddaeff32 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index d6c74c405cf069fc5f203525190a3b5315fd3b02..b4363f713ea7856a16df74e26ff5a10ae0413ae6 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ import (
        "errors"
        "fmt"
        "io"
-       "io/ioutil"
+       "io/fs"
        "log"
        "mime"
        "os"
@@ -357,7 +357,7 @@ func jobProcess(
                        dstPathCtr := 0
                        for {
                                if _, err = os.Stat(dstPath); err != nil {
-                                       if os.IsNotExist(err) {
+                                       if errors.Is(err, fs.ErrNotExist) {
                                                break
                                        }
                                        ctx.LogE("rx-stat", les, err, func(les LEs) string {
@@ -475,7 +475,7 @@ func jobProcess(
                        )
                        return err
                }
-               dstRaw, err := ioutil.ReadAll(pipeR)
+               dstRaw, err := io.ReadAll(pipeR)
                if err != nil {
                        ctx.LogE("rx-read", les, err, func(les LEs) string {
                                return fmt.Sprintf(
index 000653d7be96cf60c8b0fd4a09961836bea880d8..aea765d9ec602057ec9cc6193966bf374417a823 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@ import (
        "crypto/rand"
        "fmt"
        "io"
-       "io/ioutil"
        "os"
        "path/filepath"
        "strconv"
@@ -56,7 +55,7 @@ func TestTossExec(t *testing.T) {
                for i, recipient := range recipients {
                        recipients[i] = recipient % 8
                }
-               spool, err := ioutil.TempDir("", "testtoss")
+               spool, err := os.MkdirTemp("", "testtoss")
                if err != nil {
                        panic(err)
                }
@@ -138,7 +137,7 @@ func TestTossExec(t *testing.T) {
                                return false
                        }
                }
-               mbox, err := ioutil.ReadFile(filepath.Join(spool, "mbox"))
+               mbox, err := os.ReadFile(filepath.Join(spool, "mbox"))
                if err != nil {
                        return false
                }
@@ -150,7 +149,7 @@ func TestTossExec(t *testing.T) {
                        )
                        expected = append(expected, []byte("BODY\n")...)
                }
-               return bytes.Compare(mbox, expected) == 0
+               return bytes.Equal(mbox, expected)
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
@@ -174,7 +173,7 @@ func TestTossFile(t *testing.T) {
                        }
                        files[strconv.Itoa(i)] = data
                }
-               spool, err := ioutil.TempDir("", "testtoss")
+               spool, err := os.MkdirTemp("", "testtoss")
                if err != nil {
                        panic(err)
                }
@@ -200,7 +199,7 @@ func TestTossFile(t *testing.T) {
                        hasher.Write(fileData)
                        fileName := Base32Codec.EncodeToString(hasher.Sum(nil))
                        src := filepath.Join(spool, fileName)
-                       if err := ioutil.WriteFile(src, fileData, os.FileMode(0600)); err != nil {
+                       if err := os.WriteFile(src, fileData, os.FileMode(0600)); err != nil {
                                panic(err)
                        }
                        if err := ctx.TxFile(
@@ -236,11 +235,11 @@ func TestTossFile(t *testing.T) {
                        hasher := MTHNew(0, 0)
                        hasher.Write(fileData)
                        fileName := Base32Codec.EncodeToString(hasher.Sum(nil))
-                       data, err := ioutil.ReadFile(filepath.Join(incomingPath, fileName))
+                       data, err := os.ReadFile(filepath.Join(incomingPath, fileName))
                        if err != nil {
                                panic(err)
                        }
-                       if bytes.Compare(data, fileData) != 0 {
+                       if !bytes.Equal(data, fileData) {
                                return false
                        }
                }
@@ -254,7 +253,7 @@ func TestTossFile(t *testing.T) {
 func TestTossFileSameName(t *testing.T) {
        f := func(filesRaw uint8) bool {
                files := int(filesRaw)%8 + 1
-               spool, err := ioutil.TempDir("", "testtoss")
+               spool, err := os.MkdirTemp("", "testtoss")
                if err != nil {
                        panic(err)
                }
@@ -275,7 +274,7 @@ func TestTossFileSameName(t *testing.T) {
                }
                ctx.Neigh[*nodeOur.Id] = nodeOur.Their()
                srcPath := filepath.Join(spool, "junk")
-               if err = ioutil.WriteFile(
+               if err = os.WriteFile(
                        srcPath,
                        []byte("doesnotmatter"),
                        os.FileMode(0600),
@@ -315,10 +314,7 @@ func TestTossFileSameName(t *testing.T) {
                        }
                        delete(expected, filename)
                }
-               if len(expected) != 0 {
-                       return false
-               }
-               return true
+               return len(expected) == 0
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
@@ -330,7 +326,7 @@ func TestTossFreq(t *testing.T) {
                if len(fileSizes) == 0 {
                        return true
                }
-               spool, err := ioutil.TempDir("", "testtoss")
+               spool, err := os.MkdirTemp("", "testtoss")
                if err != nil {
                        panic(err)
                }
@@ -390,7 +386,7 @@ func TestTossFreq(t *testing.T) {
                        return false
                }
                for fileName, fileData := range files {
-                       if err := ioutil.WriteFile(
+                       if err := os.WriteFile(
                                filepath.Join(spool, fileName),
                                fileData,
                                os.FileMode(0600),
@@ -423,8 +419,7 @@ func TestTossFreq(t *testing.T) {
                        if pkt.Nice != replyNice {
                                return false
                        }
-                       dst := string(pkt.Path[:int(pkt.PathLen)])
-                       if bytes.Compare(buf.Bytes(), files[dst]) != 0 {
+                       if !bytes.Equal(buf.Bytes(), files[string(pkt.Path[:int(pkt.PathLen)])]) {
                                return false
                        }
                }
@@ -449,7 +444,7 @@ func TestTossTrns(t *testing.T) {
                        }
                        datum[i] = data
                }
-               spool, err := ioutil.TempDir("", "testtoss")
+               spool, err := os.MkdirTemp("", "testtoss")
                if err != nil {
                        panic(err)
                }
@@ -495,7 +490,7 @@ func TestTossTrns(t *testing.T) {
                        }
                        hasher := MTHNew(0, 0)
                        hasher.Write(dst.Bytes())
-                       if err := ioutil.WriteFile(
+                       if err := os.WriteFile(
                                filepath.Join(rxPath, Base32Codec.EncodeToString(hasher.Sum(nil))),
                                dst.Bytes(),
                                os.FileMode(0600),
@@ -509,20 +504,17 @@ func TestTossTrns(t *testing.T) {
                        return false
                }
                for _, filename := range dirFiles(txPath) {
-                       dataRead, err := ioutil.ReadFile(filepath.Join(txPath, filename))
+                       dataRead, err := os.ReadFile(filepath.Join(txPath, filename))
                        if err != nil {
                                panic(err)
                        }
                        for k, data := range datum {
-                               if bytes.Compare(dataRead, data) == 0 {
+                               if bytes.Equal(dataRead, data) {
                                        delete(datum, k)
                                }
                        }
                }
-               if len(datum) > 0 {
-                       return false
-               }
-               return true
+               return len(datum) == 0
        }
        if err := quick.Check(f, nil); err != nil {
                t.Error(err)
index f7f099b39f3239c34979388be784393c694cfda8..4edbea4e849eb183002f9f77e8d2f2c5ab626f98 100644 (file)
--- a/src/tx.go
+++ b/src/tx.go
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 9f8d7506b652ee04d25dd739d8a573e0a64ca079..4523b6343b8ba6ed17acea1b6f7662a82837af0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@ import (
        "bytes"
        "crypto/rand"
        "io"
-       "io/ioutil"
        "os"
        "path"
        "testing"
@@ -48,7 +47,7 @@ func TestTx(t *testing.T) {
                        pathSrc = pathSrc[:MaxPathSize]
                }
                hops = hops % 4
-               spool, err := ioutil.TempDir("", "testtx")
+               spool, err := os.MkdirTemp("", "testtx")
                if err != nil {
                        panic(err)
                }
@@ -86,6 +85,9 @@ func TestTx(t *testing.T) {
                        nodeTgt.Via = append(nodeTgt.Via, node.Id)
                }
                pkt, err := NewPkt(PktTypeExec, replyNice, []byte(pathSrc))
+               if err != nil {
+                       panic(err)
+               }
                src := bytes.NewReader(data)
                dstNode, _, _, err := ctx.Tx(
                        nodeTgt,
@@ -148,14 +150,14 @@ func TestTx(t *testing.T) {
                                if !bytes.HasPrefix(pkt.Path[:], []byte(pathSrc)) {
                                        return false
                                }
-                               if bytes.Compare(bufR.Bytes(), []byte(data)) != 0 {
+                               if !bytes.Equal(bufR.Bytes(), []byte(data)) {
                                        return false
                                }
                        } else {
                                if pkt.Type != PktTypeTrns {
                                        return false
                                }
-                               if bytes.Compare(pkt.Path[:MTHSize], vias[i+1][:]) != 0 {
+                               if !bytes.Equal(pkt.Path[:MTHSize], vias[i+1][:]) {
                                        return false
                                }
                        }
index c48f2eddbec77d3d31c2b44058bb60b96309ac43..7aa6fc70928b12af3d99bbacd2378579289d1199 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 911769c4e7136ada5391eb52620d56a7c9a57e9f..5546d5803257de856dceb3f52296ce7ecbbf6b2b 100644 (file)
@@ -103,7 +103,7 @@ func (w *Writer) Flush() (err error) {
 // Start starts the listener in a non-blocking manner
 func (w *Writer) Start() {
        w.ticker = time.NewTicker(w.RefreshInterval)
-       w.tdone = make(chan struct{}, 0)
+       w.tdone = make(chan struct{})
        w.Out.Write([]byte("\n"))
        go w.Listen()
 }
index 65cd925af3bb09bad1381cfcb2ebb37515f56fda..86a2d5f2d6f27873b99c1d53441ccf7d04b6bae5 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index a1a71acd3eab4fae041ad22e5a16d9c764bd4b4c..9796686a3c6f58463a2dd634231134c5cfe4595c 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ func (*TCPIPEndpoint) LinkAddress() tcpip.LinkAddress { return "" }
 
 func (*TCPIPEndpoint) Wait() {}
 
-func (e *TCPIPEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error {
+func (e *TCPIPEndpoint) WritePacket(pkt stack.PacketBufferPtr) tcpip.Error {
        v := pkt.ToView()
        n, err := v.Read(e.writeBuf)
        if err != nil {
@@ -99,13 +99,9 @@ func (e *TCPIPEndpoint) WritePackets(pbs stack.PacketBufferList) (int, tcpip.Err
        return len(pbs.AsSlice()), nil
 }
 
-func (e *TCPIPEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error {
-       panic("not implemented")
-}
-
 func (*TCPIPEndpoint) ARPHardwareType() header.ARPHardwareType { return header.ARPHardwareNone }
 
-func (e *TCPIPEndpoint) AddHeader(*stack.PacketBuffer) {}
+func (e *TCPIPEndpoint) AddHeader(stack.PacketBufferPtr) {}
 
 func convertToFullAddr(ip net.IP, port int) (tcpip.FullAddress, tcpip.NetworkProtocolNumber) {
        return tcpip.FullAddress{
index 6fec636cd727a77db39d85ef1c561c7c819792ef..ad52744b2ec52140524d1f48223bcf8c64eb82fd 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 9eaea66fd6493ff3c962db746f32d94e2b0cbf56..5b88bfa36be4e3bd86962401ff50096e283b5af7 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by