From c8b26fe06596d26bdb14c5be85760fb3ddb197b3 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 9 Oct 2019 15:52:34 +0300 Subject: [PATCH] Full go modules usage --- .gitmodules | 32 --------- BSDmakefile | 12 +--- GNUmakefile | 12 +--- VERSION | 2 +- common.mk | 19 ++--- doc/download.texi | 2 +- doc/integrity.texi | 2 +- doc/news.ru.texi | 8 +++ doc/news.texi | 8 +++ doc/platforms.texi | 13 ++-- makedist.sh | 69 +++++++++++-------- src/{cypherpunks.ru/nncp => }/base32.go | 0 src/{cypherpunks.ru/nncp => }/call.go | 0 src/{cypherpunks.ru/nncp => }/cfg.go | 0 src/{cypherpunks.ru/nncp => }/check.go | 0 src/{cypherpunks.ru/nncp => }/chunked.go | 0 .../nncp => }/cmd/nncp-bundle/main.go | 2 +- .../nncp => }/cmd/nncp-call/main.go | 2 +- .../nncp => }/cmd/nncp-caller/main.go | 2 +- .../nncp => }/cmd/nncp-cfgenc/main.go | 2 +- .../nncp => }/cmd/nncp-cfgmin/main.go | 2 +- .../nncp => }/cmd/nncp-cfgnew/main.go | 2 +- .../nncp => }/cmd/nncp-check/main.go | 2 +- .../nncp => }/cmd/nncp-daemon/main.go | 2 +- .../nncp => }/cmd/nncp-exec/main.go | 2 +- .../nncp => }/cmd/nncp-file/main.go | 2 +- .../nncp => }/cmd/nncp-freq/main.go | 2 +- .../nncp => }/cmd/nncp-log/main.go | 2 +- .../nncp => }/cmd/nncp-pkt/main.go | 2 +- .../nncp => }/cmd/nncp-reass/main.go | 2 +- .../nncp => }/cmd/nncp-rm/main.go | 2 +- .../nncp => }/cmd/nncp-stat/main.go | 2 +- .../nncp => }/cmd/nncp-toss/main.go | 2 +- .../nncp => }/cmd/nncp-xfer/main.go | 2 +- src/{cypherpunks.ru/nncp => }/ctx.go | 0 src/cypherpunks.ru/nncp/go.mod | 15 ---- .../nncp/vendor/cypherpunks.ru/balloon | 1 - .../nncp/vendor/github.com/davecgh/go-xdr | 1 - .../nncp/vendor/github.com/dustin/go-humanize | 1 - .../nncp/vendor/github.com/flynn/noise | 1 - .../nncp/vendor/github.com/gorhill/cronexpr | 1 - .../nncp/vendor/golang.org/x/crypto | 1 - .../nncp/vendor/golang.org/x/net | 1 - .../nncp/vendor/golang.org/x/sys | 1 - .../nncp/vendor/gopkg.in/check.v1 | 1 - .../nncp/vendor/gopkg.in/yaml.v2 | 1 - src/{cypherpunks.ru/nncp => }/eblob.go | 2 +- src/go.mod | 15 ++++ src/{cypherpunks.ru/nncp => }/go.sum | 27 +++++--- src/{cypherpunks.ru/nncp => }/humanizer.go | 0 src/{cypherpunks.ru/nncp => }/jobs.go | 0 src/{cypherpunks.ru/nncp => }/lockdir.go | 0 src/{cypherpunks.ru/nncp => }/log.go | 0 src/{cypherpunks.ru/nncp => }/nice.go | 0 src/{cypherpunks.ru/nncp => }/nice_test.go | 0 src/{cypherpunks.ru/nncp => }/nncp.go | 2 +- src/{cypherpunks.ru/nncp => }/node.go | 0 src/{cypherpunks.ru/nncp => }/pkt.go | 0 src/{cypherpunks.ru/nncp => }/pkt_test.go | 0 src/{cypherpunks.ru/nncp => }/sortbynice.go | 0 src/{cypherpunks.ru/nncp => }/sp.go | 0 src/{cypherpunks.ru/nncp => }/tmp.go | 0 src/{cypherpunks.ru/nncp => }/toss.go | 0 src/{cypherpunks.ru/nncp => }/toss_test.go | 0 src/{cypherpunks.ru/nncp => }/tx.go | 0 src/{cypherpunks.ru/nncp => }/tx_test.go | 0 src/{cypherpunks.ru/nncp => }/via.go | 0 67 files changed, 130 insertions(+), 156 deletions(-) delete mode 100644 .gitmodules rename src/{cypherpunks.ru/nncp => }/base32.go (100%) rename src/{cypherpunks.ru/nncp => }/call.go (100%) rename src/{cypherpunks.ru/nncp => }/cfg.go (100%) rename src/{cypherpunks.ru/nncp => }/check.go (100%) rename src/{cypherpunks.ru/nncp => }/chunked.go (100%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-bundle/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-call/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-caller/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-cfgenc/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-cfgmin/main.go (98%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-cfgnew/main.go (98%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-check/main.go (98%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-daemon/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-exec/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-file/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-freq/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-log/main.go (98%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-pkt/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-reass/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-rm/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-stat/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-toss/main.go (99%) rename src/{cypherpunks.ru/nncp => }/cmd/nncp-xfer/main.go (99%) rename src/{cypherpunks.ru/nncp => }/ctx.go (100%) delete mode 100644 src/cypherpunks.ru/nncp/go.mod delete mode 160000 src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon delete mode 160000 src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr delete mode 160000 src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize delete mode 160000 src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise delete mode 160000 src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr delete mode 160000 src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto delete mode 160000 src/cypherpunks.ru/nncp/vendor/golang.org/x/net delete mode 160000 src/cypherpunks.ru/nncp/vendor/golang.org/x/sys delete mode 160000 src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1 delete mode 160000 src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2 rename src/{cypherpunks.ru/nncp => }/eblob.go (99%) create mode 100644 src/go.mod rename src/{cypherpunks.ru/nncp => }/go.sum (53%) rename src/{cypherpunks.ru/nncp => }/humanizer.go (100%) rename src/{cypherpunks.ru/nncp => }/jobs.go (100%) rename src/{cypherpunks.ru/nncp => }/lockdir.go (100%) rename src/{cypherpunks.ru/nncp => }/log.go (100%) rename src/{cypherpunks.ru/nncp => }/nice.go (100%) rename src/{cypherpunks.ru/nncp => }/nice_test.go (100%) rename src/{cypherpunks.ru/nncp => }/nncp.go (98%) rename src/{cypherpunks.ru/nncp => }/node.go (100%) rename src/{cypherpunks.ru/nncp => }/pkt.go (100%) rename src/{cypherpunks.ru/nncp => }/pkt_test.go (100%) rename src/{cypherpunks.ru/nncp => }/sortbynice.go (100%) rename src/{cypherpunks.ru/nncp => }/sp.go (100%) rename src/{cypherpunks.ru/nncp => }/tmp.go (100%) rename src/{cypherpunks.ru/nncp => }/toss.go (100%) rename src/{cypherpunks.ru/nncp => }/toss_test.go (100%) rename src/{cypherpunks.ru/nncp => }/tx.go (100%) rename src/{cypherpunks.ru/nncp => }/tx_test.go (100%) rename src/{cypherpunks.ru/nncp => }/via.go (100%) diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 12047c5..0000000 --- a/.gitmodules +++ /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 diff --git a/BSDmakefile b/BSDmakefile index 12bf97a..b57abb4 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -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 diff --git a/GNUmakefile b/GNUmakefile index 1bcb1be..79efdfc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 7d5c902..6aba2b2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1 +4.2.0 diff --git a/common.mk b/common.mk index 8a06f9b..5ab825b 100644 --- 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) diff --git a/doc/download.texi b/doc/download.texi index 619b4e5..d8f5d5a 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -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 diff --git a/doc/integrity.texi b/doc/integrity.texi index 4d75b35..f6e04f7 100644 --- a/doc/integrity.texi +++ b/doc/integrity.texi @@ -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 diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 25865b7..4f15cd7 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -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 diff --git a/doc/news.texi b/doc/news.texi index 839effc..b1e4e40 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -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 diff --git a/doc/platforms.texi b/doc/platforms.texi index 595b7d0..e9835e3 100644 --- a/doc/platforms.texi +++ b/doc/platforms.texi @@ -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 diff --git a/makedist.sh b/makedist.sh index 7051f07..f5d893c 100755 --- a/makedist.sh +++ b/makedist.sh @@ -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 < 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 index 0e07700..0000000 --- a/src/cypherpunks.ru/nncp/vendor/cypherpunks.ru/balloon +++ /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 index e6a2ba0..0000000 --- a/src/cypherpunks.ru/nncp/vendor/github.com/davecgh/go-xdr +++ /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 index 9f541cc..0000000 --- a/src/cypherpunks.ru/nncp/vendor/github.com/dustin/go-humanize +++ /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 index 2492fe1..0000000 --- a/src/cypherpunks.ru/nncp/vendor/github.com/flynn/noise +++ /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 index 88b0669..0000000 --- a/src/cypherpunks.ru/nncp/vendor/github.com/gorhill/cronexpr +++ /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 index a29dc8f..0000000 --- a/src/cypherpunks.ru/nncp/vendor/golang.org/x/crypto +++ /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 index 4829fb1..0000000 --- a/src/cypherpunks.ru/nncp/vendor/golang.org/x/net +++ /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 index a129542..0000000 --- a/src/cypherpunks.ru/nncp/vendor/golang.org/x/sys +++ /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 index 788fd78..0000000 --- a/src/cypherpunks.ru/nncp/vendor/gopkg.in/check.v1 +++ /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 index 7b8349a..0000000 --- a/src/cypherpunks.ru/nncp/vendor/gopkg.in/yaml.v2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7b8349ac747c6a24702b762d2c4fd9266cf4f1d6 diff --git a/src/cypherpunks.ru/nncp/eblob.go b/src/eblob.go similarity index 99% rename from src/cypherpunks.ru/nncp/eblob.go rename to src/eblob.go index 36b9d1f..6432790 100644 --- a/src/cypherpunks.ru/nncp/eblob.go +++ b/src/eblob.go @@ -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 index 0000000..a195d28 --- /dev/null +++ b/src/go.mod @@ -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 +) diff --git a/src/cypherpunks.ru/nncp/go.sum b/src/go.sum similarity index 53% rename from src/cypherpunks.ru/nncp/go.sum rename to src/go.sum index cada0a9..4f7a890 100644 --- a/src/cypherpunks.ru/nncp/go.sum +++ b/src/go.sum @@ -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= diff --git a/src/cypherpunks.ru/nncp/humanizer.go b/src/humanizer.go similarity index 100% rename from src/cypherpunks.ru/nncp/humanizer.go rename to src/humanizer.go diff --git a/src/cypherpunks.ru/nncp/jobs.go b/src/jobs.go similarity index 100% rename from src/cypherpunks.ru/nncp/jobs.go rename to src/jobs.go diff --git a/src/cypherpunks.ru/nncp/lockdir.go b/src/lockdir.go similarity index 100% rename from src/cypherpunks.ru/nncp/lockdir.go rename to src/lockdir.go diff --git a/src/cypherpunks.ru/nncp/log.go b/src/log.go similarity index 100% rename from src/cypherpunks.ru/nncp/log.go rename to src/log.go diff --git a/src/cypherpunks.ru/nncp/nice.go b/src/nice.go similarity index 100% rename from src/cypherpunks.ru/nncp/nice.go rename to src/nice.go diff --git a/src/cypherpunks.ru/nncp/nice_test.go b/src/nice_test.go similarity index 100% rename from src/cypherpunks.ru/nncp/nice_test.go rename to src/nice_test.go diff --git a/src/cypherpunks.ru/nncp/nncp.go b/src/nncp.go similarity index 98% rename from src/cypherpunks.ru/nncp/nncp.go rename to src/nncp.go index 7cc65ed..9ff5b6d 100644 --- a/src/cypherpunks.ru/nncp/nncp.go +++ b/src/nncp.go @@ -37,7 +37,7 @@ along with this program. If not, see .` ) var ( - Version string + Version string = "UNKNOWN" ) func VersionGet() string { diff --git a/src/cypherpunks.ru/nncp/node.go b/src/node.go similarity index 100% rename from src/cypherpunks.ru/nncp/node.go rename to src/node.go diff --git a/src/cypherpunks.ru/nncp/pkt.go b/src/pkt.go similarity index 100% rename from src/cypherpunks.ru/nncp/pkt.go rename to src/pkt.go diff --git a/src/cypherpunks.ru/nncp/pkt_test.go b/src/pkt_test.go similarity index 100% rename from src/cypherpunks.ru/nncp/pkt_test.go rename to src/pkt_test.go diff --git a/src/cypherpunks.ru/nncp/sortbynice.go b/src/sortbynice.go similarity index 100% rename from src/cypherpunks.ru/nncp/sortbynice.go rename to src/sortbynice.go diff --git a/src/cypherpunks.ru/nncp/sp.go b/src/sp.go similarity index 100% rename from src/cypherpunks.ru/nncp/sp.go rename to src/sp.go diff --git a/src/cypherpunks.ru/nncp/tmp.go b/src/tmp.go similarity index 100% rename from src/cypherpunks.ru/nncp/tmp.go rename to src/tmp.go diff --git a/src/cypherpunks.ru/nncp/toss.go b/src/toss.go similarity index 100% rename from src/cypherpunks.ru/nncp/toss.go rename to src/toss.go diff --git a/src/cypherpunks.ru/nncp/toss_test.go b/src/toss_test.go similarity index 100% rename from src/cypherpunks.ru/nncp/toss_test.go rename to src/toss_test.go diff --git a/src/cypherpunks.ru/nncp/tx.go b/src/tx.go similarity index 100% rename from src/cypherpunks.ru/nncp/tx.go rename to src/tx.go diff --git a/src/cypherpunks.ru/nncp/tx_test.go b/src/tx_test.go similarity index 100% rename from src/cypherpunks.ru/nncp/tx_test.go rename to src/tx_test.go diff --git a/src/cypherpunks.ru/nncp/via.go b/src/via.go similarity index 100% rename from src/cypherpunks.ru/nncp/via.go rename to src/via.go -- 2.44.0