]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' 3.2
authorSergey Matveev <stargrave@stargrave.org>
Sat, 2 Jun 2018 15:44:48 +0000 (18:44 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 2 Jun 2018 15:44:48 +0000 (18:44 +0300)
13 files changed:
VERSION
doc/Makefile
doc/about.ru.texi
doc/about.texi
doc/bundles.texi
doc/cmds.texi
doc/download.texi
doc/index.texi
doc/news.ru.texi
doc/news.texi
doc/pedro.txt [new file with mode: 0644]
makedist.sh
src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go

diff --git a/VERSION b/VERSION
index 8c50098d8aed57b02fd10f40a670a7c673b7c5a5..a3ec5a4bd3d7209b4a687a77cad49b945339994b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.1
+3.2
index 4cfbdc2e9005eb0e68d97729dffe41d14ee0a036..4e65b0fe549402cc16a91d150962c62e5b3de85b 100644 (file)
@@ -2,12 +2,12 @@ all: nncp.info nncp.html
 
 MAKEINFO ?= makeinfo
 
-nncp.info: *.texi
+nncp.info: *.texi pedro.txt
        $(MAKEINFO) -o nncp.info index.texi
 
 CSS != cat style.css
 
-nncp.html: *.texi
+nncp.html: *.texi pedro.txt
        rm -f nncp.html/*.html
        $(MAKEINFO) --html \
                --set-customization-variable CSS_LINES='$(CSS)' \
index 526d37fa62d3786c522652a1312ef7ac32f3f790..baf97094cebe986de7d38fe4888282182d5edbdb 100644 (file)
@@ -1,8 +1,8 @@
 @node Об утилитах
 @section Подробнее об утилитах NNCP
 
-NNCP (Node to Node copy) это набор утилит упрощающий безопасный обмен
-файлами и почтой в режиме сохранить-и-переслать.
+@strong{NNCP} (Node to Node copy) это набор утилит упрощающий безопасный
+обмен файлами и почтой в режиме сохранить-и-переслать.
 
 Эти утилиты предназначены помочь с построением однораговых
 @url{https://ru.wikipedia.org/wiki/DTN, устойчивых к разрывам} сетей
index 4a7ab0560db6d68dff294dfa254d47b7d71953e2..01bfc5ee6bf1d049dc19102465d30a7bc40fb2d3 100644 (file)
@@ -1,5 +1,5 @@
-NNCP (Node to Node copy) is a collection of utilities simplifying
-secure store-and-forward files and mail exchanging.
+@strong{NNCP} (Node to Node copy) is a collection of utilities
+simplifying secure store-and-forward files and mail exchanging.
 
 See also this page @ref{Об утилитах, on russian}.
 
index 7541bfc5d158a3d84e2a54ba202b25c73e5b9a47..e5235bce45cf656aebf63ff16f96d9d6b5c56b2c 100644 (file)
@@ -49,7 +49,7 @@ can contain mix of various recipients.
 @end itemize
 
 Technically bundle is valid POSIX.1-2001 (pax)
-@url{http://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5, tar archive},
+@url{http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html, tar archive},
 with directory/files hierarchy identical to that is used in
 @ref{nncp-xfer}: @file{NNCP/RECIPIENT/SENDER/PACKET}. So bundle can also
 be created by manual tar-ing of @command{nncp-xfer} resulting directory.
index 7d05bf2363ef8b8296f50aca81bcbaa3372a4c17..33ad949dbbd86a49a7997bfe741d65568551a6b2 100644 (file)
@@ -87,7 +87,7 @@ spool if everything is good. So it is advisable to recheck your streams:
 % dd if=/dev/cd0 bs=2048 | nncp-bundle -rx -delete
 @end verbatim
 
-@option{-dryrun} option prevents any writing to the spool. This is
+@option{-dryrun} option prevents any writes to the spool. This is
 useful when you need to see what packets will pass by and possibly check
 their integrity.
 
index 6da3b86f15c1406b65c8a290520ab2d0d9d1e222..fab6f5ab5d85538e77928637c52658a965680955 100644 (file)
@@ -23,6 +23,10 @@ Tarballs include all necessary required libraries:
 @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 3.1, 3.1} @tab 1145 KiB
+@tab @url{download/nncp-3.1.tar.xz, link} @url{download/nncp-3.1.tar.xz.sig, sign}
+@tab @code{B9344516 4230B58E 8AAADAA2 066F37F2 493CCB71 B025126B BCAD8FAD 6535149F}
+
 @item @ref{Release 3.0, 3.0} @tab 993 KiB
 @tab @url{download/nncp-3.0.tar.xz, link} @url{download/nncp-3.0.tar.xz.sig, sign}
 @tab @code{248B2257 2F576E79 A19672E9 B82EB649 18FC95A9 194408C0 67EA4DD3 0468286D}
index 1b5c5e03c94b8b07499e3c9c4204a891e155213a..e2df9bd28d8f138d2739ba0077d579a5db15ff63 100644 (file)
@@ -18,7 +18,9 @@ A copy of the license is included in the section entitled "Copying conditions".
 @end copying
 
 @node Top
-@top NNCP
+@top
+
+@verbatiminclude pedro.txt
 
 @include about.texi
 
index 5061c81da743dbe38045814bc0f3bf0e5ad9587d..0cc0e7a37f41cf88de3925e2fd523d4d5ac92dd3 100644 (file)
@@ -1,6 +1,18 @@
 @node Новости
 @section Новости
 
+@node Релиз 3.2
+@subsection Релиз 3.2
+@itemize
+@item
+@strong{Несовместимое} изменение формата @emph{bundle} архивов и
+работоспособность @command{nncp-bundle} команды с Go 1.10+. Bundle
+должен быть корректным tar архивом, но Go 1.9 делал его недействительным
+из-за длинных путей внутри. NNCP нечаянно был зависим от этой баги.
+Явное добавление @file{NNCP/} директории в архив восстанавливает
+работоспособность с корректными tar архивами.
+@end itemize
+
 @node Релиз 3.1
 @subsection Релиз 3.1
 @itemize
index f3116d89c653c127b19b4317be2f434d5f1f838d..ae4c1a94abb586bcf46b85a9e85fe470c8747ccb 100644 (file)
@@ -3,6 +3,18 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 3.2
+@section Release 3.2
+@itemize
+@item
+@strong{Incompatible} @emph{bundle} archive format changes and
+@command{nncp-bundle} workability with Go 1.10+. Bundles must be
+valid tar archives, but Go 1.9 made them invalid because of long paths
+inside. NNCP accidentally was dependant on that bug. Explicit adding of
+@file{NNCP/} directory in archive restores workability with valid tar
+archives.
+@end itemize
+
 @node Release 3.1
 @section Release 3.1
 @itemize
diff --git a/doc/pedro.txt b/doc/pedro.txt
new file mode 100644 (file)
index 0000000..6ed87b9
--- /dev/null
@@ -0,0 +1,11 @@
+    ____/\____
+   (__________)
+       (oo)\_______
+       (__)\  . .  )\/\
+        U  ||----v||
+           ||     ||
+ _   _ _   /+ ____/+___
+| \ | | \ | |/ ___|  _ \
+|  \| |  \| | |   | |_) |
+| |\  | |\  | |___|  __/
+|_| \_|_| \_|\____|_|
index 35db1e798cf6ef7cd6faee025dfed2f23089f84f..f6e6ad920be1349044558a815de7a2dcad9820b8 100755 (executable)
@@ -50,6 +50,7 @@ golang.org/x/sys/CONTRIBUTORS
 golang.org/x/sys/LICENSE
 golang.org/x/sys/PATENTS
 golang.org/x/sys/README.md
+golang.org/x/sys/cpu
 golang.org/x/sys/unix
 EOF
 tar cfCI - src $tmp/includes | tar xfC - $tmp
index 3b754bc1b56a8d8d1311fe18217fbcdc38503cf7..1e5f8f2b190f9dd1b288597a391fcc7aad6158ea 100644 (file)
@@ -60,7 +60,7 @@ func main() {
                doTx      = flag.Bool("tx", false, "Transfer packets")
                doDelete  = flag.Bool("delete", false, "Delete transferred packets")
                doCheck   = flag.Bool("check", false, "Check integrity while receiving")
-               dryRun    = flag.Bool("dryrun", false, "Do not writings")
+               dryRun    = flag.Bool("dryrun", false, "Do no writes")
                spoolPath = flag.String("spool", "", "Override path to spool")
                logPath   = flag.String("log", "", "Override path to logfile")
                quiet     = flag.Bool("quiet", false, "Print only errors")
@@ -120,13 +120,22 @@ func main() {
                                        continue
                                }
                                if err = tarWr.WriteHeader(&tar.Header{
+                                       Format:   tar.FormatUSTAR,
+                                       Name:     nncp.NNCPBundlePrefix,
+                                       Mode:     0700,
+                                       Typeflag: tar.TypeDir,
+                               }); err != nil {
+                                       log.Fatalln("Error writing tar header:", err)
+                               }
+                               if err = tarWr.WriteHeader(&tar.Header{
+                                       Format: tar.FormatPAX,
                                        Name: strings.Join([]string{
                                                nncp.NNCPBundlePrefix,
                                                nodeId.String(),
                                                ctx.SelfId.String(),
                                                pktName,
                                        }, "/"),
-                                       Mode:     0440,
+                                       Mode:     0400,
                                        Size:     job.Size,
                                        Typeflag: tar.TypeReg,
                                }); err != nil {
@@ -194,6 +203,21 @@ func main() {
                                }
                                continue
                        }
+                       if entry.Typeflag != tar.TypeDir {
+                               ctx.LogD("nncp-bundle", sds, "Expected NNCP/")
+                               continue
+                       }
+                       entry, err = tarR.Next()
+                       if err != nil {
+                               if err != io.EOF {
+                                       ctx.LogD(
+                                               "nncp-bundle",
+                                               nncp.SdsAdd(sds, nncp.SDS{"err": err}),
+                                               "error reading tar",
+                                       )
+                               }
+                               continue
+                       }
                        sds["pkt"] = entry.Name
                        if entry.Size < nncp.PktEncOverhead {
                                ctx.LogD("nncp-bundle", sds, "Too small packet")