]> Cypherpunks.ru repositories - gogost.git/commitdiff
Vendorize tarballs v5.1.1
authorSergey Matveev <stargrave@stargrave.org>
Sat, 16 Jan 2021 12:49:00 +0000 (15:49 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 16 Jan 2021 13:08:58 +0000 (16:08 +0300)
.gitignore
bench.do
clean.do
default.do
go.mod
go.sum
gogost.go
install.texi
makedist.sh
module-name.do [deleted file]
news.texi

index 10d32f339bc9364339671457e6a26da2a072b447..fd85e304082171b555e68c4a0ff99cf1004d9e2b 100644 (file)
@@ -1,2 +1 @@
-module-name
 VERSION
 VERSION
index a08e351231f87d477a633cbe1c21e197d54c67eb..8136d2e90722427a604906069e1533ff2bd99a5f 100644 (file)
--- a/bench.do
+++ b/bench.do
@@ -1,3 +1,2 @@
-redo-ifchange module-name
 exec >&2
 exec >&2
-go test -benchmem -bench . `cat module-name`/...
+go test -benchmem -bench . ./...
index 8cd8ae507fb14d7d25f72245060d90d5d0abe740..1b6ba08d06f39c73b59d380eca7ab9884632cd69 100644 (file)
--- a/clean.do
+++ b/clean.do
@@ -1 +1 @@
-rm -f module-name streebog256 streebog512 VERSION
+rm -f streebog256 streebog512 VERSION
index db7986db4a3337e701393ae21ac4060478c1eefd..fc883f94937dbba8b860edd64a5c82a174a0396a 100644 (file)
@@ -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 875ef862680c3401a4bf38703f3cee45458d70f4..f81afb9c39161f366ec696351e08de95a9706629 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,4 @@ module go.cypherpunks.ru/gogost/v5
 
 go 1.12
 
 
 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 e84a7e0ad20637c495da049f5d0cebb35b7dc6f7..e8a2b758f5f0dc98255a72c2da54b75756d509ff 100644 (file)
--- 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-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/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=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
index 1d798a9dd2c3036d667135c3ed8ed95c33e43285..e148c6883bcbb7dd659a2aebc46e7db7e6999cfd 100644 (file)
--- a/gogost.go
+++ b/gogost.go
@@ -1,4 +1,4 @@
 // Pure Go GOST cryptographic functions library.
 package gogost
 
 // Pure Go GOST cryptographic functions library.
 package gogost
 
-const Version = "5.1.0"
+const Version = "5.1.1"
index dcb8b25f2604ba50ea4c5fe23a830f3e759a5442..0ef1621056b4c27a327bc9879c52b65ddfbeaa38 100644 (file)
@@ -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}
 $ 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
 $ 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
 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 <<EOF
 package main
 
 $ cat > main.go <<EOF
 package main
 
@@ -88,18 +87,19 @@ GoGOST is also @command{go get}-able. For example to use
 $ go get go.cypherpunks.ru/gogost/cmd/streebog256
 @end example
 
 $ go get go.cypherpunks.ru/gogost/cmd/streebog256
 @end example
 
-@code{go.cypherpunks.ru} uses @url{http://www.ca.cypherpunks.ru/, ca.cypherpunks.ru}
-certificate authority. If you have issues using either
-@code{sum.golang.org} or @code{proxy.golang.org}, then you can disable
-their usage with @env{GOPRIVATE=go.cypherpunks.ru/gogost} environment
-variable.
+If you have problems with @code{*.golang.org}'s inability to verify
+authenticity of @code{go.cypherpunks.ru} TLS connection, then you can
+disable their usage by setting @env{GOPRIVATE=go.cypherpunks.ru}. You
+can override CA certificate file path with @env{SSL_CERT_FILE} and
+@env{GIT_SSL_CAINFO} environment variables.
 
 Also you can use @code{replace} feature inside your @file{go.mod}, like:
 
 @example
 require go.cypherpunks.ru/gogost/v5 v@value{VERSION}
 
 Also you can use @code{replace} feature inside your @file{go.mod}, like:
 
 @example
 require go.cypherpunks.ru/gogost/v5 v@value{VERSION}
-replace go.cypherpunks.ru/gogost/v5 => /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
 @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}).
index c8f0d760a254f5ac7cd4c7a4885f1775b9958aaf..433fc9cb854591351884469d7f06964ab59c6d5c 100755 (executable)
@@ -9,34 +9,11 @@ redo-ifchange streebog256
 git clone . $tmp/gogost-$release
 cd $tmp/gogost-$release
 git checkout v$release
 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 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 <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.gogost.cypherpunks.ru/}.
 cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.gogost.cypherpunks.ru/}.
@@ -77,23 +54,25 @@ cat > $texi <<EOF
 EOF
 mkinfo --output FAQ $texi
 
 EOF
 mkinfo --output FAQ $texi
 
-find . -name .git -type d | xargs rm -fr
-rm -fr .redo
+rm -rf .git
+redo-cleanup full
 rm -f \
     $texi \
     *.texi \
     .gitignore \
     clean.do \
     makedist.sh \
 rm -f \
     $texi \
     *.texi \
     .gitignore \
     clean.do \
     makedist.sh \
-    module-name.do \
     style.css \
     TODO \
     VERSION.do \
     www.do
 
     style.css \
     TODO \
     VERSION.do \
     www.do
 
+perl -i -npe "s/build/build -mod=vendor/" default.do
+perl -i -npe "s/test/test -mod=vendor/" bench.do
+
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
-chmod 755 contrib/do
+chmod +x contrib/do
 
 cd ..
 tar cvf gogost-"$release".tar --uid=0 --gid=0 --numeric-owner gogost-"$release"
 
 cd ..
 tar cvf gogost-"$release".tar --uid=0 --gid=0 --numeric-owner gogost-"$release"
diff --git a/module-name.do b/module-name.do
deleted file mode 100644 (file)
index 8284690..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-redo-ifchange go.mod
-sed -n 's/^module //p' < go.mod
index 5db2e91d4b94c096883c769f888b2300c48d8f59..33ea6490cc3a4edb624ad55b8c7a7547bacc00f0 100644 (file)
--- a/news.texi
+++ b/news.texi
@@ -3,6 +3,11 @@
 
 @table @strong
 
 
 @table @strong
 
+@anchor{Release 5.1.1}
+@item 5.1.1
+    Tarball uses vendoring, instead of @env{GOPATH} overriding.
+    As minimal Go version is 1.12 for a long time, it supports modules.
+
 @anchor{Release 5.1.0}
 @item 5.1.0
     @code{gost3410/KEK*} functions do not alter @code{ukm} argument.
 @anchor{Release 5.1.0}
 @item 5.1.0
     @code{gost3410/KEK*} functions do not alter @code{ukm} argument.