Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ VERSION | 2 +- cmd/govpn-client/main.go => src/govpn/cmd/govpn-client/main.go | 0 cmd/govpn-server/main.go => src/govpn/cmd/govpn-server/main.go | 0 cmd/govpn-verifier/main.go => src/govpn/cmd/govpn-verifier/main.go | 0 common.go => src/govpn/common.go | 0 doc/contacts.texi | 2 -- doc/download.texi | 4 ++++ doc/installation.texi | 29 ++++++++++++----------------- doc/makefile => doc/Makefile | 6 ++++-- doc/news.texi | 12 ++++++++++++ doc/sources.texi | 11 +++++------ govpn.go => src/govpn/govpn.go | 0 handshake.go => src/govpn/handshake.go | 0 identify.go => src/govpn/identify.go | 0 makefile | 25 ------------------------- src/.gitignore | 2 ++ src/Makefile | 18 ++++++++++++++++++ stats.go => src/govpn/stats.go | 0 tap.go => src/govpn/tap.go | 0 tap_freebsd.go => src/govpn/tap_freebsd.go | 0 tap_linux.go => src/govpn/tap_linux.go | 0 transport.go => src/govpn/transport.go | 0 transport_test.go => src/govpn/transport_test.go | 0 utils/makedist.sh | 28 ++++++++++++++++++++++++---- verifier.go => src/govpn/verifier.go | 0 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..0670d39701bb789f6c17e76290f8fc10ef027f4b --- /dev/null +++ b/Makefile @@ -0,0 +1,49 @@ +GOPATH != pwd +VERSION != cat VERSION + +LDFLAGS = -X govpn.Version $(VERSION) +PREFIX ?= /usr/local +BINDIR = $(DESTDIR)$(PREFIX)/bin +INFODIR = $(DESTDIR)$(PREFIX)/info +SHAREDIR = $(DESTDIR)$(PREFIX)/share/govpn +DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/govpn + +all: govpn-client govpn-server govpn-verifier + +depends: + $(MAKE) -C src + +govpn-client: depends + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client + +govpn-server: depends + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server + +govpn-verifier: depends + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier + +bench: + cd src/govpn ; GOPATH=$(GOPATH) GOMAXPROC=2 go test -bench . + +clean: + rm -f govpn-client govpn-server govpn-verifier + +doc: + $(MAKE) -C doc + +install: all doc + mkdir -p $(BINDIR) + cp -f govpn-client govpn-server govpn-verifier $(BINDIR) + chmod 755 $(BINDIR)/govpn-client $(BINDIR)/govpn-server $(BINDIR)/govpn-verifier + mkdir -p $(INFODIR) + cp -f doc/govpn.info $(INFODIR) + chmod 644 $(INFODIR)/govpn.info + mkdir -p $(SHAREDIR) + cp -f utils/newclient.sh utils/storekey.sh $(SHAREDIR) + chmod 755 $(SHAREDIR)/newclient.sh $(SHAREDIR)/storekey.sh + mkdir -p $(DOCDIR) + cp -f -L AUTHORS INSTALL NEWS README THANKS $(DOCDIR) + chmod 644 $(DOCDIR)/AUTHORS $(DOCDIR)/INSTALL $(DOCDIR)/NEWS $(DOCDIR)/README $(DOCDIR)/THANKS + +install-strip: install + strip $(BINDIR)/govpn-client $(BINDIR)/govpn-server $(BINDIR)/govpn-verifier diff --git a/VERSION b/VERSION index 8c50098d8aed57b02fd10f40a670a7c673b7c5a5..a3ec5a4bd3d7209b4a687a77cad49b945339994b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1 +3.2 diff --git a/cmd/govpn-client/main.go b/src/govpn/cmd/govpn-client/main.go rename from cmd/govpn-client/main.go rename to src/govpn/cmd/govpn-client/main.go diff --git a/cmd/govpn-server/main.go b/src/govpn/cmd/govpn-server/main.go rename from cmd/govpn-server/main.go rename to src/govpn/cmd/govpn-server/main.go diff --git a/cmd/govpn-verifier/main.go b/src/govpn/cmd/govpn-verifier/main.go rename from cmd/govpn-verifier/main.go rename to src/govpn/cmd/govpn-verifier/main.go diff --git a/common.go b/src/govpn/common.go rename from common.go rename to src/govpn/common.go diff --git a/doc/contacts.texi b/doc/contacts.texi index 9acdbf071f532c4a2938689b974b8e50ce92d0ac..1154d8dd1fb6535d523b001c06ae8de37a18c17a 100644 --- a/doc/contacts.texi +++ b/doc/contacts.texi @@ -13,5 +13,3 @@ Official website is @url{http://www.cypherpunks.ru/govpn/}, also available as @url{https://www.torproject.org/, Tor} hidden service: @url{http://vabu56j2ep2rwv3b.onion/govpn/}. -Development Git source code repository currently is located here: -@url{https://github.com/stargrave/govpn.git}. diff --git a/doc/download.texi b/doc/download.texi index 68e596a2ffd8411ecb49e54dc397b47f9b6edf13..351c8dbf0f13af969783c9588b303446d43a3e9f 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -30,6 +30,10 @@ @item 3.0 @tab 53 KiB @tab @url{download/govpn-3.0.tar.xz, link} @url{download/govpn-3.0.tar.xz.sig, sign} @tab @code{12579c5c3cccfe73c66b5893335bc70c42d7b13b8e94c7751ec65d421eaff9a5} +@item 3.1 @tab 54 KiB +@tab @url{download/govpn-3.1.tar.xz, link} @url{download/govpn-3.1.tar.xz.sig, sign} +@tab @code{4034a67eb472e33760ed1783ca871f531c3a6be99b9bd6213f4f83c1147c344b} + @end multitable Also you can try its @ref{Contacts, .onion} version. diff --git a/doc/installation.texi b/doc/installation.texi index 727647696575480551788b5a4bc2e4eca41fda5e..6d3cf7d8256749108ab9e615b231482811496021 100644 --- a/doc/installation.texi +++ b/doc/installation.texi @@ -2,38 +2,33 @@ @node Installation @unnumbered Installation GoVPN is written on @url{http://golang.org/, Go programming language}, -@url{https://www.gnu.org/software/make/, GNU Make} is recommended for -convenient building. @url{https://www.gnu.org/software/texinfo/, Texinfo} +@emph{Make} is recommended for convenient building. +@url{https://www.gnu.org/software/texinfo/, Texinfo} is used for building documentation. -Required libraries, dependencies (they are installed automatically when -using @emph{Make}): +Included required libraries: @multitable @columnfractions .40 .20 .40 @headitem Library @tab Platform @tab Licence -@item @code{golang.org/x/crypto/poly1305} @tab All @tab BSD 3-Clause -@item @code{golang.org/x/crypto/salsa20} @tab All @tab BSD 3-Clause -@item @code{golang.org/x/crypto/xtea} @tab All @tab BSD 3-Clause -@item @code{golang.org/x/crypto/pbkdf2} @tab All @tab BSD 3-Clause +@item @code{golang.org/x/crypto} @tab All @tab BSD 3-Clause @item @code{github.com/agl/ed25519} @tab All @tab BSD 3-Clause @item @code{github.com/bigeagle/water} @tab GNU/Linux @tab BSD 3-Clause @end multitable -You can get tarball, set proper @code{$GOPATH} and run -@code{make} (that will install all necessary libraries and build -@emph{govpn-client}, @emph{govpn-server}, @emph{govpn-verifier} binaries: +Get the tarball and run @code{make}. +@emph{govpn-client}, @emph{govpn-server}, @emph{govpn-verifier} +binaries will be build in the current directory. @example -% mkdir -p govpn/src -% set -e % wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz % wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz.sig % gpg --verify govpn-2.3.tar.xz.sig govpn-2.3.tar.xz -% tar xfC govpn-2.3.tar.xz govpn/src -% mv govpn/src/govpn-2.3 govpn/src/govpn -% export GOPATH=$(pwd)/govpn:$GOPATH -% gmake -C govpn/src/govpn all +% tar xf govpn-2.3.tar.xz +% make -C govpn-2.3 all @end example + +There is @code{install} target respecting @code{DESTDIR}. It will +install binaries, info-documentation and utilities. @menu * Prepared tarballs:: diff --git a/doc/makefile b/doc/Makefile rename from doc/makefile rename to doc/Makefile index c55b888bae3ce11e256c3b5dbd69aadcb5850908..ec5af2ac7212528ccb259acb9f36f228c0727773 100644 --- a/doc/makefile +++ b/doc/Makefile @@ -1,11 +1,13 @@ all: govpn.info govpn.html +MAKEINFO ?= makeinfo + govpn.info: *.texi handshake.utxt - makeinfo govpn.texi + $(MAKEINFO) govpn.texi handshake.utxt: handshake.txt plantuml -tutxt handshake.txt govpn.html: *.texi handshake.utxt rm -f govpn.html/*.html - makeinfo --html -o govpn.html govpn.texi + $(MAKEINFO) --html -o govpn.html govpn.texi diff --git a/doc/news.texi b/doc/news.texi index be9bc6043e93c7becc7af86aaffd571b5bd01874..8b68bf462af13c8693102ed3574d0d730b79b7d2 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -2,6 +2,18 @@ @node News @unnumbered News @table @strong +@item Release 3.2 +@itemize @bullet +@item +Deterministic building: dependent libraries source code commits are +fixed in our makefiles. +@item +No Internet connection is needed for building the source code: all +required libraries are included in release tarballs. +@item +FreeBSD Make compatibility. GNU Make is not necessary anymore. +@end itemize + @item Release 3.1 @itemize @bullet @item diff --git a/doc/sources.texi b/doc/sources.texi index acecea741bf7b6cf4b9243149e0c0612fdf5e5c8..e8b6fed9214d4b21e42074b27a2942d247135444 100644 --- a/doc/sources.texi +++ b/doc/sources.texi @@ -2,11 +2,13 @@ @node Development source code @section Development source code Development source contains the latest version of the code. It may be -buggy. Also it does not contain compiled documentation and is not -recommended for porters because of that. +buggy. It does not contain compiled documentation and dependent +libraries source code. Because of that it is not recommended for porters. You can obtain it by cloning Git repository: @code{git clone https://github.com/stargrave/govpn.git}. +@code{src} directory has makefile that will download necessary dependent +library versions. Also there is mirror of dependent libraries for safety if their native repositories will be unavailable (they are seldom updated): @@ -14,9 +16,6 @@ @multitable @columnfractions .50 .50 @headitem Software/library @tab Mirror @item @code{govpn} @tab @url{git://git.cypherpunks.ru/govpn.git} -@item @code{golang.org/x/crypto/poly1305} @tab @url{git://git.cypherpunks.ru/crypto.git} -@item @code{golang.org/x/crypto/salsa20} @tab @url{git://git.cypherpunks.ru/crypto.git} -@item @code{golang.org/x/crypto/xtea} @tab @url{git://git.cypherpunks.ru/crypto.git} -@item @code{golang.org/x/crypto/pbkdf2} @tab @url{git://git.cypherpunks.ru/crypto.git} +@item @code{golang.org/x/crypto} @tab @url{git://git.cypherpunks.ru/crypto.git} @item @code{github.com/agl/ed25519} @tab @url{git://git.cypherpunks.ru/ed25519.git} @end multitable diff --git a/govpn.go b/src/govpn/govpn.go rename from govpn.go rename to src/govpn/govpn.go diff --git a/handshake.go b/src/govpn/handshake.go rename from handshake.go rename to src/govpn/handshake.go diff --git a/identify.go b/src/govpn/identify.go rename from identify.go rename to src/govpn/identify.go diff --git a/makefile b/makefile deleted file mode 100644 index e5db1dabde20f91e8e9b7237e50b25a14be8918b..0000000000000000000000000000000000000000 --- a/makefile +++ /dev/null @@ -1,25 +0,0 @@ -.PHONY: govpn-client govpn-server govpn-verifier - -LDFLAGS=-X govpn.Version $(shell cat VERSION) - -all: govpn-client govpn-server govpn-verifier - -dependencies: - [ "$(shell uname)" = FreeBSD ] || go get github.com/bigeagle/water - go get golang.org/x/crypto/poly1305 - go get golang.org/x/crypto/salsa20 - go get golang.org/x/crypto/xtea - go get golang.org/x/crypto/pbkdf2 - go get github.com/agl/ed25519 - -govpn-client: dependencies - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client - -govpn-server: dependencies - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server - -govpn-verifier: dependencies - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier - -bench: dependencies - GOMAXPROC=2 go test -bench . diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1fb92d95b76b2bc11f51f2615274894a92668723 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,2 @@ +github.com +golang.org diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..452b23f5c3734385d8be51414adb623936a49132 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,18 @@ +GIT ?= git + +all: golang.org/x/crypto github.com/agl/ed25519 github.com/bigeagle/water + +github.com/bigeagle/water: + mkdir -p github.com/bigeagle + $(GIT) clone https://github.com/bigeagle/water.git github.com/bigeagle/water + cd github.com/bigeagle/water && $(GIT) checkout --force 36aebfeb35da4f1f6a975726716c6fc563c5c495 + +github.com/agl/ed25519: + mkdir -p github.com/agl + $(GIT) clone https://github.com/agl/ed25519.git github.com/agl/ed25519 + cd github.com/agl/ed25519 && $(GIT) checkout --force d2b94fd789ea21d12fac1a4443dd3a3f79cda72c + +golang.org/x/crypto: + mkdir -p golang.org/x + $(GIT) clone https://go.googlesource.com/crypto golang.org/x/crypto + cd golang.org/x/crypto && $(GIT) checkout --force 24ffb5feb3312a39054178a4b0a4554fc2201248 diff --git a/stats.go b/src/govpn/stats.go rename from stats.go rename to src/govpn/stats.go diff --git a/tap.go b/src/govpn/tap.go rename from tap.go rename to src/govpn/tap.go diff --git a/tap_freebsd.go b/src/govpn/tap_freebsd.go rename from tap_freebsd.go rename to src/govpn/tap_freebsd.go diff --git a/tap_linux.go b/src/govpn/tap_linux.go rename from tap_linux.go rename to src/govpn/tap_linux.go diff --git a/transport.go b/src/govpn/transport.go rename from transport.go rename to src/govpn/transport.go diff --git a/transport_test.go b/src/govpn/transport_test.go rename from transport_test.go rename to src/govpn/transport_test.go diff --git a/utils/makedist.sh b/utils/makedist.sh index 6ff776ca7131767dc9d6d4d5c793efe8ee54b19f..e40814222704b3474c8c8535215ae03251210bfb 100755 --- a/utils/makedist.sh +++ b/utils/makedist.sh @@ -4,20 +4,40 @@ cur=$(pwd) tmp=$(mktemp -d) release=$1 [ -n "$release" ] + git clone . $tmp/govpn-$release +cat > $tmp/includes < doc/download.texi <