From: Sergey Matveev Date: Sat, 29 Apr 2023 11:01:08 +0000 (+0300) Subject: Merge branch 'develop' X-Git-Tag: v8.8.3^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=9edd0bca196b4a7722ee64c27a8a2864f0677ad8;hp=63e74b14bd682547ed9801827c905a31526b2db5 Merge branch 'develop' --- diff --git a/bin/default.do b/bin/default.do index b9ac0f8..52c5501 100644 --- a/bin/default.do +++ b/bin/default.do @@ -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##*/} diff --git a/doc/download.texi b/doc/download.texi index a41b363..27776b0 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -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 diff --git a/doc/index.texi b/doc/index.texi index 8e15d83..b08e06a 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -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 diff --git a/doc/install.texi b/doc/install.texi index 6850354..e124734 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -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). diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 49e7778..bc331a8 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -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 diff --git a/doc/news.texi b/doc/news.texi index 50f675b..fa97340 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -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 diff --git a/makedist.sh b/makedist similarity index 95% rename from makedist.sh rename to makedist index 997ce75..0df054c 100755 --- a/makedist.sh +++ 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 < 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 Отпечаток: 92C2 F0AE FE73 208E 46BF F3DE 2B25 868E 75A1 A953 diff --git a/src/area.go b/src/area.go index f59bbc0..be9f22f 100644 --- a/src/area.go +++ b/src/area.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/call.go b/src/call.go index 95a70d6..50f1de1 100644 --- a/src/call.go +++ b/src/call.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/cfg.go b/src/cfg.go index 98bc80c..a57277e 100644 --- a/src/cfg.go +++ b/src/cfg.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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{} diff --git a/src/cfgdir.go b/src/cfgdir.go index de45a7d..f9378c8 100644 --- a/src/cfgdir.go +++ b/src/cfgdir.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 . 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 = ¬ify } - 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 } diff --git a/src/check.go b/src/check.go index bd19103..a4e0d06 100644 --- a/src/check.go +++ b/src/check.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 } } diff --git a/src/chunked.go b/src/chunked.go index ffa3455..dd88ef5 100644 --- a/src/chunked.go +++ b/src/chunked.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/cmd/nncp-ack/main.go b/src/cmd/nncp-ack/main.go index 098218a..20fe681 100644 --- a/src/cmd/nncp-ack/main.go +++ b/src/cmd/nncp-ack/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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]) diff --git a/src/cmd/nncp-bundle/main.go b/src/cmd/nncp-bundle/main.go index 28423b4..6fa0ab3 100644 --- a/src/cmd/nncp-bundle/main.go +++ b/src/cmd/nncp-bundle/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 { diff --git a/src/cmd/nncp-call/main.go b/src/cmd/nncp-call/main.go index 4d8fb06..8ff3a0e 100644 --- a/src/cmd/nncp-call/main.go +++ b/src/cmd/nncp-call/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() diff --git a/src/cmd/nncp-caller/main.go b/src/cmd/nncp-caller/main.go index 50d9bf4..7859377 100644 --- a/src/cmd/nncp-caller/main.go +++ b/src/cmd/nncp-caller/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() diff --git a/src/cmd/nncp-cfgdir/main.go b/src/cmd/nncp-cfgdir/main.go index a2656d6..5697fee 100644 --- a/src/cmd/nncp-cfgdir/main.go +++ b/src/cmd/nncp-cfgdir/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) } diff --git a/src/cmd/nncp-cfgenc/main.go b/src/cmd/nncp-cfgenc/main.go index cce42da..c1ac70e 100644 --- a/src/cmd/nncp-cfgenc/main.go +++ b/src/cmd/nncp-cfgenc/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) diff --git a/src/cmd/nncp-cfgmin/main.go b/src/cmd/nncp-cfgmin/main.go index bc50792..459cad0 100644 --- a/src/cmd/nncp-cfgmin/main.go +++ b/src/cmd/nncp-cfgmin/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-cfgnew/main.go b/src/cmd/nncp-cfgnew/main.go index 8e0fa9f..debe88e 100644 --- a/src/cmd/nncp-cfgnew/main.go +++ b/src/cmd/nncp-cfgnew/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-check/main.go b/src/cmd/nncp-check/main.go index 2c9eafb..2fc3fd6 100644 --- a/src/cmd/nncp-check/main.go +++ b/src/cmd/nncp-check/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-cronexpr/main.go b/src/cmd/nncp-cronexpr/main.go index 682aa30..0a4f4b7 100644 --- a/src/cmd/nncp-cronexpr/main.go +++ b/src/cmd/nncp-cronexpr/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-daemon/main.go b/src/cmd/nncp-daemon/main.go index bcd5bcd..6ae89c0 100644 --- a/src/cmd/nncp-daemon/main.go +++ b/src/cmd/nncp-daemon/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-exec/main.go b/src/cmd/nncp-exec/main.go index aa2ab74..f7a28c4 100644 --- a/src/cmd/nncp-exec/main.go +++ b/src/cmd/nncp-exec/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) diff --git a/src/cmd/nncp-file/main.go b/src/cmd/nncp-file/main.go index 9d9c694..abcf8bc 100644 --- a/src/cmd/nncp-file/main.go +++ b/src/cmd/nncp-file/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) diff --git a/src/cmd/nncp-freq/main.go b/src/cmd/nncp-freq/main.go index 09bf375..9c1f41f 100644 --- a/src/cmd/nncp-freq/main.go +++ b/src/cmd/nncp-freq/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-hash/main.go b/src/cmd/nncp-hash/main.go index de49971..c349007 100644 --- a/src/cmd/nncp-hash/main.go +++ b/src/cmd/nncp-hash/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-log/main.go b/src/cmd/nncp-log/main.go index dbe03b8..73d09af 100644 --- a/src/cmd/nncp-log/main.go +++ b/src/cmd/nncp-log/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-pkt/main.go b/src/cmd/nncp-pkt/main.go index d40b8c5..e8377b2 100644 --- a/src/cmd/nncp-pkt/main.go +++ b/src/cmd/nncp-pkt/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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( diff --git a/src/cmd/nncp-reass/main.go b/src/cmd/nncp-reass/main.go index 77d1c7e..e92a2e5 100644 --- a/src/cmd/nncp-reass/main.go +++ b/src/cmd/nncp-reass/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 { diff --git a/src/cmd/nncp-rm/main.go b/src/cmd/nncp-rm/main.go index ef6c44d..b527445 100644 --- a/src/cmd/nncp-rm/main.go +++ b/src/cmd/nncp-rm/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 . 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 diff --git a/src/cmd/nncp-stat/main.go b/src/cmd/nncp-stat/main.go index 241201f..1fc0fb1 100644 --- a/src/cmd/nncp-stat/main.go +++ b/src/cmd/nncp-stat/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-toss/main.go b/src/cmd/nncp-toss/main.go index 76bb765..6a96036 100644 --- a/src/cmd/nncp-toss/main.go +++ b/src/cmd/nncp-toss/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } diff --git a/src/cmd/nncp-trns/main.go b/src/cmd/nncp-trns/main.go index bd822d1..f48bad6 100644 --- a/src/cmd/nncp-trns/main.go +++ b/src/cmd/nncp-trns/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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", diff --git a/src/cmd/nncp-xfer/main.go b/src/cmd/nncp-xfer/main.go index dc522a8..8685b1c 100644 --- a/src/cmd/nncp-xfer/main.go +++ b/src/cmd/nncp-xfer/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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" }) diff --git a/src/ctx.go b/src/ctx.go index c6f77c8..cf7d728 100644 --- a/src/ctx.go +++ b/src/ctx.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 } diff --git a/src/dirwatch.go b/src/dirwatch.go index 1dab640..1f36d85 100644 --- a/src/dirwatch.go +++ b/src/dirwatch.go @@ -3,7 +3,7 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/dirwatch_dummy.go b/src/dirwatch_dummy.go index 424637a..80e724d 100644 --- a/src/dirwatch_dummy.go +++ b/src/dirwatch_dummy.go @@ -3,7 +3,7 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/eblob.go b/src/eblob.go index a65f068..fdb6bd9 100644 --- a/src/eblob.go +++ b/src/eblob.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/go.mod b/src/go.mod index 26b0315..7f20203 100644 --- a/src/go.mod +++ b/src/go.mod @@ -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 diff --git a/src/go.sum b/src/go.sum index 53d4cc9..c43bd51 100644 --- a/src/go.sum +++ b/src/go.sum @@ -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= diff --git a/src/humanizer.go b/src/humanizer.go index 618f608..8fdd70d 100644 --- a/src/humanizer.go +++ b/src/humanizer.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/jobs.go b/src/jobs.go index 05a7c9c..ff2977b 100644 --- a/src/jobs.go +++ b/src/jobs.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) } diff --git a/src/lockdir.go b/src/lockdir.go index a756381..1e4e394 100644 --- a/src/lockdir.go +++ b/src/lockdir.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/log.go b/src/log.go index 7953a02..5e53bcb 100644 --- a/src/log.go +++ b/src/log.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/magic.go b/src/magic.go index 60af73e..96b7860 100644 --- a/src/magic.go +++ b/src/magic.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/mcd.go b/src/mcd.go index b4de4f4..aceee17 100644 --- a/src/mcd.go +++ b/src/mcd.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/mth.go b/src/mth.go index ff39237..655ffb9 100644 --- a/src/mth.go +++ b/src/mth.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 { diff --git a/src/mth_test.go b/src/mth_test.go index f3c5dfe..fcdff17 100644 --- a/src/mth_test.go +++ b/src/mth_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() } } diff --git a/src/nncp.go b/src/nncp.go index 1655b9d..dde9bcb 100644 --- a/src/nncp.go +++ b/src/nncp.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 .` 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 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. diff --git a/src/node.go b/src/node.go index 10577b1..d71fd29 100644 --- a/src/node.go +++ b/src/node.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/pipe.go b/src/pipe.go index 0f0ac9d..e9295d4 100644 --- a/src/pipe.go +++ b/src/pipe.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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() { diff --git a/src/pkt.go b/src/pkt.go index ba711a3..38e4659 100644 --- a/src/pkt.go +++ b/src/pkt.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 } diff --git a/src/pkt_test.go b/src/pkt_test.go index 37cb637..d90877d 100644 --- a/src/pkt_test.go +++ b/src/pkt_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) diff --git a/src/progress.go b/src/progress.go index 171f8e9..c170674 100644 --- a/src/progress.go +++ b/src/progress.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/sp.go b/src/sp.go index eca9544..3bef9c3 100644 --- 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 +Copyright (C) 2016-2023 Sergey Matveev 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"), diff --git a/src/tmp.go b/src/tmp.go index 4a43eaa..c4f57c1 100644 --- a/src/tmp.go +++ b/src/tmp.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/toss.go b/src/toss.go index d6c74c4..b4363f7 100644 --- a/src/toss.go +++ b/src/toss.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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( diff --git a/src/toss_test.go b/src/toss_test.go index 000653d..aea765d 100644 --- a/src/toss_test.go +++ b/src/toss_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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) diff --git a/src/tx.go b/src/tx.go index f7f099b..4edbea4 100644 --- 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 +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/tx_test.go b/src/tx_test.go index 9f8d750..4523b63 100644 --- a/src/tx_test.go +++ b/src/tx_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 } } diff --git a/src/ucspi.go b/src/ucspi.go index c48f2ed..7aa6fc7 100644 --- a/src/ucspi.go +++ b/src/ucspi.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/uilive/writer.go b/src/uilive/writer.go index 911769c..5546d58 100644 --- a/src/uilive/writer.go +++ b/src/uilive/writer.go @@ -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() } diff --git a/src/via.go b/src/via.go index 65cd925..86a2d5f 100644 --- a/src/via.go +++ b/src/via.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/yggdrasil/tcpip.go b/src/yggdrasil/tcpip.go index a1a71ac..9796686 100644 --- a/src/yggdrasil/tcpip.go +++ b/src/yggdrasil/tcpip.go @@ -3,7 +3,7 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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{ diff --git a/src/yggdrasil/yggdrasil.go b/src/yggdrasil/yggdrasil.go index 6fec636..ad52744 100644 --- a/src/yggdrasil/yggdrasil.go +++ b/src/yggdrasil/yggdrasil.go @@ -3,7 +3,7 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 diff --git a/src/yggdrasil/yggdrasil_dummy.go b/src/yggdrasil/yggdrasil_dummy.go index 9eaea66..5b88bfa 100644 --- a/src/yggdrasil/yggdrasil_dummy.go +++ b/src/yggdrasil/yggdrasil_dummy.go @@ -3,7 +3,7 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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