From: Sergey Matveev Date: Sat, 16 Jan 2021 12:49:00 +0000 (+0300) Subject: Vendorize tarballs X-Git-Tag: v5.1.1^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=gogost.git;a=commitdiff_plain;h=5cebc6fc16677fa449295a5afff018fd9f0a622c Vendorize tarballs --- diff --git a/.gitignore b/.gitignore index 10d32f3..fd85e30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -module-name VERSION diff --git a/bench.do b/bench.do index a08e351..8136d2e 100644 --- a/bench.do +++ b/bench.do @@ -1,3 +1,2 @@ -redo-ifchange module-name exec >&2 -go test -benchmem -bench . `cat module-name`/... +go test -benchmem -bench . ./... diff --git a/clean.do b/clean.do index 8cd8ae5..1b6ba08 100644 --- a/clean.do +++ b/clean.do @@ -1 +1 @@ -rm -f module-name streebog256 streebog512 VERSION +rm -f streebog256 streebog512 VERSION diff --git a/default.do b/default.do index db7986d..fc883f9 100644 --- a/default.do +++ b/default.do @@ -1,2 +1 @@ -redo-ifchange module-name -go build -o $3 `cat module-name`/cmd/$1 +go build -o $3 ./cmd/$1 diff --git a/go.mod b/go.mod index 875ef86..f81afb9 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module go.cypherpunks.ru/gogost/v5 go 1.12 -require golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a +require golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad diff --git a/go.sum b/go.sum index e84a7e0..e8a2b75 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/gogost.go b/gogost.go index 1d798a9..e148c68 100644 --- a/gogost.go +++ b/gogost.go @@ -1,4 +1,4 @@ // Pure Go GOST cryptographic functions library. package gogost -const Version = "5.1.0" +const Version = "5.1.1" diff --git a/install.texi b/install.texi index dcb8b25..0ef1621 100644 --- a/install.texi +++ b/install.texi @@ -10,7 +10,7 @@ $ [fetch|wget] http://www.gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.xz.si $ gpg --verify gogost-@value{VERSION}.tar.xz.sig gogost-@value{VERSION}.tar.xz $ xz --decompress --stdout gogost-@value{VERSION}.tar.xz | tar xf - $ cd gogost-@value{VERSION} -$ redo bench all +$ redo all $ echo hello world | ./streebog256 f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d @end example @@ -27,10 +27,9 @@ And then you can include its source code in your project for example like this: @example -$ mkdir -p myproj/src -$ cp -r gogost-@value{VERSION}/src/go.cypherpunks.ru myproj/src -$ export GOPATH=$PWD/myproj -$ cd myproj/src +$ mkdir -p myproj/vendor/go.cypherpunks.ru/gogost +$ mv gogost-@value{VERSION} myproj/vendor/go.cypherpunks.ru/gogost/v5 +$ cd myproj $ cat > main.go < /home/stargrave/gogost-@value{VERSION}/src/go.cypherpunks.ru/gogost/v5 +replace go.cypherpunks.ru/gogost/v5 => /path/to/gogost-@value{VERSION} @end example You can obtain development source code with -@command{git clone git://git.cypherpunks.ru/gogost.git}. +@command{git clone git://git.cypherpunks.ru/gogost.git} +(also you can use @url{https://git.cypherpunks.ru/gogost.git}). diff --git a/makedist.sh b/makedist.sh index c8f0d76..433fc9c 100755 --- a/makedist.sh +++ b/makedist.sh @@ -9,34 +9,11 @@ redo-ifchange streebog256 git clone . $tmp/gogost-$release cd $tmp/gogost-$release git checkout v$release -redo module-name VERSION -mod_name=`cat module-name` - -crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod) -mkdir -p src/$mod_name -mv \ - gost28147 \ - gost3410 \ - gost34112012256 \ - gost34112012512 \ - gost341194 \ - gost3412128 \ - gost341264 \ - gost3413 \ - mgm \ - prfplus \ - cmd internal gogost.go go.mod go.sum src/$mod_name - -echo $mod_name > module-name -find . -name "*.do" -exec perl -i -npe "s/^go/GOPATH=\`pwd\` go/" {} \; +redo VERSION +go mod vendor mkdir contrib cp ~/work/redo/minimal/do contrib/do -mkdir -p src/golang.org/x/crypto -( cd $GOPATH/pkg/mod/$crypto_mod_path ; \ - tar cf - AUTHORS CONTRIBUTORS LICENSE PATENTS README.md pbkdf2 hkdf ) | - tar xfC - src/golang.org/x/crypto - cat > download.texi < $texi <