]> Cypherpunks.ru repositories - nncp.git/commitdiff
Full go modules usage
authorSergey Matveev <stargrave@stargrave.org>
Wed, 9 Oct 2019 12:52:34 +0000 (15:52 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 10 Oct 2019 08:33:18 +0000 (11:33 +0300)
67 files changed:
.gitmodules [deleted file]
BSDmakefile
GNUmakefile
VERSION
common.mk
doc/download.texi
doc/integrity.texi
doc/news.ru.texi
doc/news.texi
doc/platforms.texi
makedist.sh
src/base32.go [moved from src/cypherpunks.ru/nncp/base32.go with 100% similarity]
src/call.go [moved from src/cypherpunks.ru/nncp/call.go with 100% similarity]
src/cfg.go [moved from src/cypherpunks.ru/nncp/cfg.go with 100% similarity]
src/check.go [moved from src/cypherpunks.ru/nncp/check.go with 100% similarity]
src/chunked.go [moved from src/cypherpunks.ru/nncp/chunked.go with 100% similarity]
src/cmd/nncp-bundle/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go with 99% similarity]
src/cmd/nncp-call/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-call/main.go with 99% similarity]
src/cmd/nncp-caller/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-caller/main.go with 99% similarity]
src/cmd/nncp-cfgenc/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-cfgenc/main.go with 99% similarity]
src/cmd/nncp-cfgmin/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-cfgmin/main.go with 98% similarity]
src/cmd/nncp-cfgnew/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-cfgnew/main.go with 98% similarity]
src/cmd/nncp-check/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-check/main.go with 98% similarity]
src/cmd/nncp-daemon/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-daemon/main.go with 99% similarity]
src/cmd/nncp-exec/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go with 99% similarity]
src/cmd/nncp-file/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-file/main.go with 99% similarity]
src/cmd/nncp-freq/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go with 99% similarity]
src/cmd/nncp-log/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-log/main.go with 98% similarity]
src/cmd/nncp-pkt/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-pkt/main.go with 99% similarity]
src/cmd/nncp-reass/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-reass/main.go with 99% similarity]
src/cmd/nncp-rm/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-rm/main.go with 99% similarity]
src/cmd/nncp-stat/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-stat/main.go with 99% similarity]
src/cmd/nncp-toss/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-toss/main.go with 99% similarity]
src/cmd/nncp-xfer/main.go [moved from src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go with 99% similarity]
src/ctx.go [moved from src/cypherpunks.ru/nncp/ctx.go with 100% similarity]
src/cypherpunks.ru/nncp/go.mod [deleted file]
src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon [deleted submodule]
src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr [deleted submodule]
src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize [deleted submodule]
src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise [deleted submodule]
src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr [deleted submodule]
src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto [deleted submodule]
src/cypherpunks.ru/nncp/vendor/golang.org/x/net [deleted submodule]
src/cypherpunks.ru/nncp/vendor/golang.org/x/sys [deleted submodule]
src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1 [deleted submodule]
src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2 [deleted submodule]
src/eblob.go [moved from src/cypherpunks.ru/nncp/eblob.go with 99% similarity]
src/go.mod [new file with mode: 0644]
src/go.sum [moved from src/cypherpunks.ru/nncp/go.sum with 53% similarity]
src/humanizer.go [moved from src/cypherpunks.ru/nncp/humanizer.go with 100% similarity]
src/jobs.go [moved from src/cypherpunks.ru/nncp/jobs.go with 100% similarity]
src/lockdir.go [moved from src/cypherpunks.ru/nncp/lockdir.go with 100% similarity]
src/log.go [moved from src/cypherpunks.ru/nncp/log.go with 100% similarity]
src/nice.go [moved from src/cypherpunks.ru/nncp/nice.go with 100% similarity]
src/nice_test.go [moved from src/cypherpunks.ru/nncp/nice_test.go with 100% similarity]
src/nncp.go [moved from src/cypherpunks.ru/nncp/nncp.go with 98% similarity]
src/node.go [moved from src/cypherpunks.ru/nncp/node.go with 100% similarity]
src/pkt.go [moved from src/cypherpunks.ru/nncp/pkt.go with 100% similarity]
src/pkt_test.go [moved from src/cypherpunks.ru/nncp/pkt_test.go with 100% similarity]
src/sortbynice.go [moved from src/cypherpunks.ru/nncp/sortbynice.go with 100% similarity]
src/sp.go [moved from src/cypherpunks.ru/nncp/sp.go with 100% similarity]
src/tmp.go [moved from src/cypherpunks.ru/nncp/tmp.go with 100% similarity]
src/toss.go [moved from src/cypherpunks.ru/nncp/toss.go with 100% similarity]
src/toss_test.go [moved from src/cypherpunks.ru/nncp/toss_test.go with 100% similarity]
src/tx.go [moved from src/cypherpunks.ru/nncp/tx.go with 100% similarity]
src/tx_test.go [moved from src/cypherpunks.ru/nncp/tx_test.go with 100% similarity]
src/via.go [moved from src/cypherpunks.ru/nncp/via.go with 100% similarity]

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644 (file)
index 12047c5..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-[submodule "src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr"]
-       path = src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr
-       url = https://github.com/davecgh/go-xdr.git
-[submodule "src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize"]
-       path = src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize
-       url = https://github.com/dustin/go-humanize.git
-[submodule "src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise"]
-       path = src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise
-       url = https://github.com/flynn/noise.git
-[submodule "src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1"]
-       path = src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1
-       url = https://github.com/go-check/check.git
-       branch = v1
-[submodule "src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2"]
-       path = src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2
-       url = https://github.com/go-yaml/yaml.git
-       branch = v2
-[submodule "src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto"]
-       path = src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto
-       url = https://go.googlesource.com/crypto
-[submodule "src/cypherpunks.ru/nncp/vendor/golang.org/x/sys"]
-       path = src/cypherpunks.ru/nncp/vendor/golang.org/x/sys
-       url = https://go.googlesource.com/sys
-[submodule "src/cypherpunks.ru/nncp/vendor/golang.org/x/net"]
-       path = src/cypherpunks.ru/nncp/vendor/golang.org/x/net
-       url = https://go.googlesource.com/net
-[submodule "src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr"]
-       path = src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr
-       url = https://github.com/gorhill/cronexpr.git
-[submodule "src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon"]
-       path = src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon
-       url = git://git.cypherpunks.ru/balloon.git
index 12bf97ac0211f22c59428ea0637c3230bd51bd7e..b57abb478822e7791fef04ac3a0532aae8b0e703 100644 (file)
@@ -1,14 +1,4 @@
+GOPATH != pwd
 VERSION != cat VERSION
-GO ?= go
-
-GO_MOD_EXISTS != $(GO) help mod >/dev/null 2>&1 || echo no
-
-.if ${GO_MOD_EXISTS} == "no"
-BUILDMOD ?=
-GOPATH ?= $(PWD)
-.else
-BUILDMOD ?= -mod=vendor
-GOPATH ?= $(PWD)/gopath
-.endif
 
 include common.mk
index 1bcb1be686401b7fd212d8d14549402f7b25c670..79efdfc08c749e956eb3812594a8386a93567d04 100644 (file)
@@ -1,14 +1,4 @@
+GOPATH = $(shell pwd)
 VERSION = $(shell cat VERSION)
-GO ?= go
-
-GO_MOD_EXISTS = $(shell $(GO) help mod >/dev/null 2>&1 || echo no)
-
-ifeq ($(GO_MOD_EXISTS), no)
-BUILDMOD ?=
-GOPATH ?= $(PWD)
-else
-BUILDMOD ?= -mod=vendor
-GOPATH ?= $(PWD)/gopath
-endif
 
 include common.mk
diff --git a/VERSION b/VERSION
index 7d5c902e777905446c67de7e52a945b88fd2038c..6aba2b245a847cc30a9b9dc009fc9d2522fff998 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.1
+4.2.0
index 8a06f9b79702d5fdcb4423a9ee14360c5cddc16a..5ab825bdcf8cf0590a28310d0096ba7f4feff861 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -1,3 +1,4 @@
+GO ?= go
 PREFIX ?= /usr/local
 
 SENDMAIL ?= /usr/sbin/sendmail
@@ -9,12 +10,14 @@ BINDIR = $(DESTDIR)$(PREFIX)/bin
 INFODIR = $(DESTDIR)$(PREFIX)/info
 DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/nncp
 
+MOD = go.cypherpunks.ru/nncp/v4
+
 LDFLAGS = \
-       -X cypherpunks.ru/nncp.Version=$(VERSION) \
-       -X cypherpunks.ru/nncp.DefaultCfgPath=$(CFGPATH) \
-       -X cypherpunks.ru/nncp.DefaultSendmailPath=$(SENDMAIL) \
-       -X cypherpunks.ru/nncp.DefaultSpoolPath=$(SPOOLPATH) \
-       -X cypherpunks.ru/nncp.DefaultLogPath=$(LOGPATH)
+       -X $(MOD).Version=$(VERSION) \
+       -X $(MOD).DefaultCfgPath=$(CFGPATH) \
+       -X $(MOD).DefaultSendmailPath=$(SENDMAIL) \
+       -X $(MOD).DefaultSpoolPath=$(SPOOLPATH) \
+       -X $(MOD).DefaultLogPath=$(LOGPATH)
 
 ALL = \
        nncp-bundle \
@@ -36,7 +39,7 @@ ALL = \
        nncp-toss \
        nncp-xfer
 
-SRC := $(PWD)/src/cypherpunks.ru/nncp
+SRC := $(PWD)/src
 BIN := $(PWD)/bin
 
 all: $(ALL)
@@ -45,11 +48,11 @@ $(BIN):
        mkdir -p $(BIN)
 
 $(ALL): $(BIN)
-       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) build $(BUILDMOD) -ldflags "$(LDFLAGS)" cypherpunks.ru/nncp/cmd/$@
+       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) build -ldflags "$(LDFLAGS)" $(MOD)/cmd/$@
        mv $(SRC)/$@ $(BIN)
 
 test:
-       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) test $(BUILDMOD) -failfast cypherpunks.ru/nncp/...
+       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) test -failfast $(MOD)/...
 
 clean:
        rm -rf $(BIN)
index 619b4e5d391733b204882f2cd9303dbd2bec6c50..d8f5d5a48f2cf0ce7314e74d397c853864db8192 100644 (file)
@@ -8,13 +8,13 @@ Tarballs include all necessary required libraries:
 
 @multitable @columnfractions .50 .50
 @headitem Library @tab Licence
-@item @code{cypherpunks.ru/balloon} @tab GNU LGPLv3
 @item @code{github.com/davecgh/go-xdr} @tab ISC
 @item @code{github.com/dustin/go-humanize} @tab MIT
 @item @code{github.com/flynn/noise} @tab BSD 3-Clause
 @item @code{github.com/go-check/check} @tab BSD 2-Clause
 @item @code{github.com/go-yaml/yaml} @tab Apache License 2.0 and MIT
 @item @code{github.com/gorhill/cronexpr} @tab GNU GPLv3
+@item @code{go.cypherpunks.ru/balloon} @tab GNU LGPLv3
 @item @code{golang.org/x/crypto} @tab BSD 3-Clause
 @item @code{golang.org/x/net} @tab BSD 3-Clause
 @item @code{golang.org/x/sys} @tab BSD 3-Clause
index 4d75b35cd1479303e068dcea2b708dbf472f5912..f6e04f78d25ad689bacd6379fafbfd2be91b9914 100644 (file)
@@ -31,5 +31,5 @@ $ gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org
 
 Then you could verify tarballs signature:
 @verbatim
-$ gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
+$ gpg --verify nncp-4.2.0.tar.xz.sig nncp-4.2.0.tar.xz
 @end verbatim
index 25865b770e65f091420be964a273ee72a388159e..4f15cd776ed0d3b6456539b221a48b9c44c3655c 100644 (file)
@@ -1,6 +1,14 @@
 @node Новости
 @section Новости
 
+@node Релиз 4.2.0
+@subsection Релиз 4.2.0
+@itemize
+@item Обновлены зависимости.
+@item Полное использование go модулей для управления зависимостями
+    (используется @code{go.cypherpunks.ru/nncp/v4} namespace).
+@end itemize
+
 @node Релиз 4.1
 @subsection Релиз 4.1
 @itemize
index 839effc005f6fe99d20d0f8f42b38e963a4dddc8..b1e4e4088cf0067bdf2decb9176267d154207f30 100644 (file)
@@ -3,6 +3,14 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 4.2.0
+@section Release 4.2.0
+@itemize
+@item Updated dependencies.
+@item Full usage of go modules for dependencies management
+    (@code{go.cypherpunks.ru/nncp/v4} namespace is used).
+@end itemize
+
 @node Release 4.1
 @section Release 4.1
 @itemize
index 595b7d0d4316dc498f478d6d7757c2722321d320..e9835e3b1cab72b99b04ddf0e46053c92a5974f8 100644 (file)
@@ -7,12 +7,11 @@
 Look @ref{Integrity, here} for finding public keys for tarball authentication.
 
 @verbatim
-$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
-$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
-$ gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
-$ xz -d nncp-3.1.tar.xz
-$ tar xf nncp-3.1.tar
-$ make -C nncp-3.1 all
+$ wget http://www.nncpgo.org/download/nncp-4.2.0.tar.xz
+$ wget http://www.nncpgo.org/download/nncp-4.2.0.tar.xz.sig
+$ gpg --verify nncp-4.2.0.tar.xz.sig nncp-4.2.0.tar.xz
+$ xz -d --stdout nncp-4.2.0.tar.xz | tar xf nncp-4.2.0.tar
+$ make -C nncp-4.2.0 all
 @end verbatim
 
 There is @command{install} target respecting @env{DESTDIR}. It will
@@ -33,7 +32,7 @@ Look @ref{Integrity, here} for finding public keys for tarball authentication.
 follow @ref{General, general} installation instructions
 
 @verbatim
-# make -C nncp-3.1 install PREFIX=/usr
+# make -C nncp-4.2.0 install PREFIX=/usr
 @end verbatim
 
 @item Ubuntu 14.04
index 7051f078da630d541ff39be1c02f0dfefc81122d..f5d893ce40fdd0ac18c3145e0a9a6c354bcb1310 100755 (executable)
@@ -5,27 +5,35 @@ tmp=$(mktemp -d)
 release=$1
 [ -n "$release" ]
 
-vendor=src/cypherpunks.ru/nncp/vendor
-
 git clone . $tmp/nncp-$release
-repos="
-    cypherpunks.ru/balloon
-    github.com/davecgh/go-xdr
-    github.com/dustin/go-humanize
-    github.com/flynn/noise
-    github.com/gorhill/cronexpr
-    golang.org/x/crypto
-    golang.org/x/net
-    golang.org/x/sys
-    gopkg.in/check.v1
-    gopkg.in/yaml.v2
+cd $tmp/nncp-$release
+git checkout v$release
+rm -fr .git
+
+mod_name=go.cypherpunks.ru/nncp/v4
+mv src src.orig
+mkdir -p src/$mod_name
+mv src.orig/* src/$mod_name
+rmdir src.orig
+
+mods="
+github.com/davecgh/go-xdr
+github.com/dustin/go-humanize
+github.com/flynn/noise
+github.com/gorhill/cronexpr
+go.cypherpunks.ru/balloon
+golang.org/x/crypto
+golang.org/x/net
+golang.org/x/sys
+gopkg.in/yaml.v2
 "
-for repo in $repos; do
-    git clone $vendor/$repo $tmp/nncp-$release/$vendor/$repo
+for mod in $mods; do
+    mod_path=$(sed -n "s#^     \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
+    [ -n "$mod_path" ]
+    mkdir -p src/$mod
+    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
+    chmod -R +w src/$mod
 done
-cd $tmp/nncp-$release
-git checkout $release
-git submodule update --init
 
 cat > $tmp/includes <<EOF
 golang.org/x/crypto/AUTHORS
@@ -63,14 +71,13 @@ golang.org/x/sys/PATENTS
 golang.org/x/sys/README.md
 golang.org/x/sys/unix
 EOF
-tar cfCI - $vendor $tmp/includes | tar xfC - $tmp
-rm -fr $vendor/golang.org
-mv $tmp/golang.org $vendor
-rm $tmp/includes
+tar cfCI - src $tmp/includes | tar xfC - $tmp
+rm -fr src/golang.org $tmp/includes
+mv $tmp/golang.org src
 
 find src -name .travis.yml -delete
-rm -fr $vendor/github.com/davecgh/go-xdr/xdr
-rm $vendor/github.com/gorhill/cronexpr/APLv2
+rm -fr src/github.com/davecgh/go-xdr/xdr
+rm src/github.com/gorhill/cronexpr/APLv2
 rm -fr ports
 rm makedist.sh
 
@@ -82,11 +89,15 @@ You can obtain releases source code prepared tarballs on
 EOF
 make -C doc
 ./supplementary_files.sh
-rm -r doc/.well-known doc/nncp.html/.well-known supplementary_files.sh
-
-find . -name .git | xargs rm -fr
-find . -name .gitignore -delete
-rm .gitmodules
+rm -r \
+    doc/.gitignore \
+    doc/.well-known \
+    doc/nncp.html/.well-known \
+    supplementary_files.sh
+
+find . -type d -exec chmod 700 {} \;
+find . -type f -exec chmod 600 {} \;
+find . -type f -name "*.sh" -exec chmod 700 {} \;
 
 cd ..
 tar cvf nncp-"$release".tar --uid=0 --gid=0 --numeric-owner nncp-"$release"
similarity index 100%
rename from src/cypherpunks.ru/nncp/call.go
rename to src/call.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/cfg.go
rename to src/cfg.go
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go
rename to src/cmd/nncp-bundle/main.go
index dcaf9eabb9a7e95c32fc1a20fce6b721b62e517c..05d7dc9db1fdadbf50961e21f75688952b04a530 100644 (file)
@@ -32,8 +32,8 @@ import (
        "strconv"
        "strings"
 
-       "cypherpunks.ru/nncp"
        "github.com/davecgh/go-xdr/xdr2"
+       "go.cypherpunks.ru/nncp/v4"
        "golang.org/x/crypto/blake2b"
 )
 
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-call/main.go
rename to src/cmd/nncp-call/main.go
index ede5a4864208c7ae72fd9873a366d0bbdf1a42c6..5b605ffb79242ef7dfc58537a6abaaa867dc65ce 100644 (file)
@@ -25,7 +25,7 @@ import (
        "os"
        "strings"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-caller/main.go
rename to src/cmd/nncp-caller/main.go
index 34ded664f0df28d4ffda1ead5d3d6ccc003dc74b..cb9fc594ecbc8be3d975e7c572eedfc3ac2781a9 100644 (file)
@@ -27,7 +27,7 @@ import (
        "sync"
        "time"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-cfgenc/main.go
rename to src/cmd/nncp-cfgenc/main.go
index 4d47e01cf4b09f4c0f699535ed2b107eb66459d1..a77eaed1e84c44aa0b4aaf362b7e3c2d22033695 100644 (file)
@@ -27,8 +27,8 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
        "github.com/davecgh/go-xdr/xdr2"
+       "go.cypherpunks.ru/nncp/v4"
        "golang.org/x/crypto/blake2b"
        "golang.org/x/crypto/ssh/terminal"
 )
similarity index 98%
rename from src/cypherpunks.ru/nncp/cmd/nncp-cfgmin/main.go
rename to src/cmd/nncp-cfgmin/main.go
index f75e037e212ef303a7849ffba0711b5758d126ac..d2730eba221cf841878ed635389e7425a12224bc 100644 (file)
@@ -24,7 +24,7 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
        "gopkg.in/yaml.v2"
 )
 
similarity index 98%
rename from src/cypherpunks.ru/nncp/cmd/nncp-cfgnew/main.go
rename to src/cmd/nncp-cfgnew/main.go
index c37ddffc7948631cc454ab5e1fd2a62c40ea4027..d923e0be7a92dae33a4c694ab56eacfd5365599f 100644 (file)
@@ -23,7 +23,7 @@ import (
        "fmt"
        "os"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
        "gopkg.in/yaml.v2"
 )
 
similarity index 98%
rename from src/cypherpunks.ru/nncp/cmd/nncp-check/main.go
rename to src/cmd/nncp-check/main.go
index 0d45b6bd1c5c7f393a33965b8a2672a5a1f36b57..a920ad641d80a480141060c813548cd7510d6461 100644 (file)
@@ -24,7 +24,7 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-daemon/main.go
rename to src/cmd/nncp-daemon/main.go
index 67e2c533f410b3b8410bc2bab74b80f160f299e3..2e55cd654ef23ce88b9d904271a9c8e6c37c4776 100644 (file)
@@ -27,7 +27,7 @@ import (
        "strconv"
        "time"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
        "golang.org/x/net/netutil"
 )
 
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go
rename to src/cmd/nncp-exec/main.go
index c5a446cfbdbb39d3d629cf347060056ab0f82054..18a93a6f4180280c67893aeed4e5a45818f2eb86 100644 (file)
@@ -26,7 +26,7 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-file/main.go
rename to src/cmd/nncp-file/main.go
index a721b92655bea1f53349bc16dd028217d5eee9cd..7cfe215a34d82b0cab9bb2a0ac0d8d84ac88f35c 100644 (file)
@@ -25,7 +25,7 @@ import (
        "os"
        "strings"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go
rename to src/cmd/nncp-freq/main.go
index 3ad8fbdd0ab7673274da86ce61c334bdfaf90985..6b62623acb6ba18f62a3cb93aec7f313bfd3303e 100644 (file)
@@ -27,7 +27,7 @@ import (
        "strconv"
        "strings"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 98%
rename from src/cypherpunks.ru/nncp/cmd/nncp-log/main.go
rename to src/cmd/nncp-log/main.go
index 77037ba2c4f8d1bacf96f56733c12f5b8239e060..780d31eba6b4094bc1bf5f27b2e4d4e33ecab578 100644 (file)
@@ -25,7 +25,7 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-pkt/main.go
rename to src/cmd/nncp-pkt/main.go
index bdb18ad0d6ff94b6c41be187b06cb888ef275185..3a7731b0f7bdd4f5ecf5011f517685e51c447ab9 100644 (file)
@@ -28,8 +28,8 @@ import (
        "log"
        "os"
 
-       "cypherpunks.ru/nncp"
        "github.com/davecgh/go-xdr/xdr2"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-reass/main.go
rename to src/cmd/nncp-reass/main.go
index d6df787955f1310bd19f6f8a15d6f997901cb7d0..a798bd37f0e02f2044fb4de036b45e9c7ad7dfb2 100644 (file)
@@ -33,9 +33,9 @@ import (
        "strconv"
        "strings"
 
-       "cypherpunks.ru/nncp"
        "github.com/davecgh/go-xdr/xdr2"
        "github.com/dustin/go-humanize"
+       "go.cypherpunks.ru/nncp/v4"
        "golang.org/x/crypto/blake2b"
 )
 
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-rm/main.go
rename to src/cmd/nncp-rm/main.go
index 1040b9a3b08c6f6f7a270e92b6a0cb9a77c1d6da..ba8d70b49c806771ec4cdfb2799235543f3474a8 100644 (file)
@@ -26,7 +26,7 @@ import (
        "path/filepath"
        "strings"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-stat/main.go
rename to src/cmd/nncp-stat/main.go
index bcda35526921efbf6f4ee535eaf4586306d8a33b..8f7fe76fb3c427a0f6899b00721a95c02847847f 100644 (file)
@@ -25,8 +25,8 @@ import (
        "os"
        "sort"
 
-       "cypherpunks.ru/nncp"
        "github.com/dustin/go-humanize"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-toss/main.go
rename to src/cmd/nncp-toss/main.go
index 6bd204d83ceb523377d8fb922bd99e96c2bf5527..0c41931c22055b87b4aebe59eabebf2d1d4b5441 100644 (file)
@@ -25,7 +25,7 @@ import (
        "os"
        "time"
 
-       "cypherpunks.ru/nncp"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 99%
rename from src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go
rename to src/cmd/nncp-xfer/main.go
index 2072a3cc956280ba6e318c21c2a51363bcaac2ce..dc6811c13a953b7cc61f6f35acd29439cd8e3055 100644 (file)
@@ -29,8 +29,8 @@ import (
        "path/filepath"
        "strconv"
 
-       "cypherpunks.ru/nncp"
        "github.com/davecgh/go-xdr/xdr2"
+       "go.cypherpunks.ru/nncp/v4"
 )
 
 func usage() {
similarity index 100%
rename from src/cypherpunks.ru/nncp/ctx.go
rename to src/ctx.go
diff --git a/src/cypherpunks.ru/nncp/go.mod b/src/cypherpunks.ru/nncp/go.mod
deleted file mode 100644 (file)
index 59cfe97..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-module cypherpunks.ru/nncp
-
-require (
-       cypherpunks.ru/balloon v0.0.0-20190427214838-0e07700b0279
-       github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892
-       github.com/dustin/go-humanize v1.0.0
-       github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6
-       github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
-       golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734
-       golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6
-       golang.org/x/sys v0.0.0-20190426135247-a129542de9ae
-       gopkg.in/yaml.v2 v2.2.2
-)
-
-replace cypherpunks.ru/balloon => git.cypherpunks.ru/balloon.git v0.0.0-20190427214838-0e07700b0279
diff --git a/src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon b/src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon
deleted file mode 160000 (submodule)
index 0e07700..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0e07700b027907d44e0060fc3f75c4590478452b
diff --git a/src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr b/src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr
deleted file mode 160000 (submodule)
index e6a2ba0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e6a2ba005892b6a5b27cb5352f64c2e96942dd28
diff --git a/src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize b/src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize
deleted file mode 160000 (submodule)
index 9f541cc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 9f541cc9db5d55bce703bd99987c9d5cb8eea45e
diff --git a/src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise b/src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise
deleted file mode 160000 (submodule)
index 2492fe1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2492fe189ae688d7edbeae0fd575de2f1c5fec8e
diff --git a/src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr b/src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr
deleted file mode 160000 (submodule)
index 88b0669..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 88b0669f7d75f171bd612b874e52b95c190218df
diff --git a/src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto b/src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto
deleted file mode 160000 (submodule)
index a29dc8f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a29dc8fdc73485234dbef99ebedb95d2eced08de
diff --git a/src/cypherpunks.ru/nncp/vendor/golang.org/x/net b/src/cypherpunks.ru/nncp/vendor/golang.org/x/net
deleted file mode 160000 (submodule)
index 4829fb1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4829fb13d2c62012c17688fa7f629f371014946d
diff --git a/src/cypherpunks.ru/nncp/vendor/golang.org/x/sys b/src/cypherpunks.ru/nncp/vendor/golang.org/x/sys
deleted file mode 160000 (submodule)
index a129542..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a129542de9ae0895210abff9c95d67a1f33cb93d
diff --git a/src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1 b/src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1
deleted file mode 160000 (submodule)
index 788fd78..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 788fd78401277ebd861206a03c884797c6ec5541
diff --git a/src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2 b/src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2
deleted file mode 160000 (submodule)
index 7b8349a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7b8349ac747c6a24702b762d2c4fd9266cf4f1d6
similarity index 99%
rename from src/cypherpunks.ru/nncp/eblob.go
rename to src/eblob.go
index 36b9d1f3c84fb1f0f3238ea9daa21f5e5d527520..64327901bd1f4455bf2deac59d65322bcbce2e66 100644 (file)
@@ -22,8 +22,8 @@ import (
        "crypto/rand"
        "hash"
 
-       "cypherpunks.ru/balloon"
        "github.com/davecgh/go-xdr/xdr2"
+       "go.cypherpunks.ru/balloon"
        "golang.org/x/crypto/blake2b"
        "golang.org/x/crypto/chacha20poly1305"
 )
diff --git a/src/go.mod b/src/go.mod
new file mode 100644 (file)
index 0000000..a195d28
--- /dev/null
@@ -0,0 +1,15 @@
+module go.cypherpunks.ru/nncp/v4
+
+require (
+       github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892
+       github.com/dustin/go-humanize v1.0.0
+       github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6
+       github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
+       github.com/kr/pretty v0.1.0 // indirect
+       go.cypherpunks.ru/balloon v1.1.0
+       golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
+       golang.org/x/net v0.0.0-20191007182048-72f939374954
+       golang.org/x/sys v0.0.0-20191008105621-543471e840be
+       gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
+       gopkg.in/yaml.v2 v2.2.4
+)
similarity index 53%
rename from src/cypherpunks.ru/nncp/go.sum
rename to src/go.sum
index cada0a91e95ae54c06e344f992197211c2d7a1ce..4f7a8901705967c1bbb490892df282f533ade2e6 100644 (file)
@@ -1,5 +1,3 @@
-git.cypherpunks.ru/balloon.git v0.0.0-20190427214838-0e07700b0279 h1:UtJj64EdBav9c3gXvDzuVhfKv0dSOUu/8rA709WRyBg=
-git.cypherpunks.ru/balloon.git v0.0.0-20190427214838-0e07700b0279/go.mod h1:MMNkZjNnjCkWMS+luQsSoSp6CCzhQiowH2uvfy5KgG8=
 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=
@@ -8,18 +6,27 @@ github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNp
 github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ=
 github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 h1:f0n1xnMSmBLzVfsMMvriDyA75NB/oBgILX2GcHXIQzY=
 github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+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=
+go.cypherpunks.ru/balloon v1.1.0 h1:tKwBeS1xrZYS/vn87Hm/4EvgNeHKyU1uC099aPRa2JQ=
+go.cypherpunks.ru/balloon v1.1.0/go.mod h1:k4s4ozrIrhpBjj78Z7LX8ZHxMQ+XE7DZUWl8gP2ojCo=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 h1:p/H982KKEjUnLJkM3tt/LemDnOc1GiZL5FCVlORJ5zo=
-golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4=
+golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6 h1:FP8hkuE6yUEaJnK7O2eTuejKWwW+Rhfj80dQ2JcKxCU=
-golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20191007182048-72f939374954 h1:JGZucVF/L/TotR719NbujzadOZ2AgnYlqphQGHDCKaU=
+golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190426135247-a129542de9ae h1:mQLHiymj/JXKnnjc62tb7nD5pZLs940/sXJu+Xp3DBA=
-golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
+golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
similarity index 100%
rename from src/cypherpunks.ru/nncp/jobs.go
rename to src/jobs.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/log.go
rename to src/log.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/nice.go
rename to src/nice.go
similarity index 98%
rename from src/cypherpunks.ru/nncp/nncp.go
rename to src/nncp.go
index 7cc65edeebabeaabedab3656ce39452157be1fb3..9ff5b6d73fbb2fc26259af42532379a116bf415d 100644 (file)
@@ -37,7 +37,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.`
 )
 
 var (
-       Version string
+       Version string = "UNKNOWN"
 )
 
 func VersionGet() string {
similarity index 100%
rename from src/cypherpunks.ru/nncp/node.go
rename to src/node.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/pkt.go
rename to src/pkt.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/sp.go
rename to src/sp.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/tmp.go
rename to src/tmp.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/toss.go
rename to src/toss.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/tx.go
rename to src/tx.go
similarity index 100%
rename from src/cypherpunks.ru/nncp/via.go
rename to src/via.go