]> Cypherpunks.ru repositories - gocheese.git/commitdiff
Vendorize tarball v2.6.0
authorSergey Matveev <stargrave@stargrave.org>
Fri, 22 Jan 2021 12:31:32 +0000 (15:31 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 22 Jan 2021 12:39:50 +0000 (15:39 +0300)
.gitignore
clean.do
go.mod
go.sum
gocheese.do
install.texi
makedist.sh
module-name.do [deleted file]
test.do

index fa62ba15a65d3ea1fdf5282a739e2f8a762f3c98..bc6365f5e4da1b3284ad442ee7d712a135a839a8 100644 (file)
@@ -1,5 +1,4 @@
 gocheese
 gocheese.info
 gocheese.html
 gocheese
 gocheese.info
 gocheese.html
-module-name
 VERSION
 VERSION
index 8216ea929f1aa6c3c98b9136ee643605e7bd2329..c1f4ca0d3e23d8bb9baa562aeb6ed0866e5d147d 100644 (file)
--- a/clean.do
+++ b/clean.do
@@ -1 +1 @@
-rm -f gocheese gocheese.info module-name VERSION
+rm -f gocheese gocheese.info VERSION
diff --git a/go.mod b/go.mod
index 0c48a2c73970cff04fd6ca61ee258057d43e2a75..a1659f571f972126a2f2c4d704bc17a068891606 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,6 @@ module go.cypherpunks.ru/gocheese/v2
 go 1.12
 
 require (
 go 1.12
 
 require (
-       golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
-       golang.org/x/net v0.0.0-20201031054903-ff519b6c9102
+       golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
+       golang.org/x/net v0.0.0-20210119194325-5f4716e94777
 )
 )
diff --git a/go.sum b/go.sum
index 4eefbf996e2d2bea2689eb13aac407bd3749ad6f..76607c24eebc6e5c7e480b7b53da5021490a208c 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -1,16 +1,16 @@
 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-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
-golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/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 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 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-20201031054903-ff519b6c9102 h1:42cLlJJdEh+ySyeUUbEQ5bsTiq8voBeTuweGVkY6Puw=
-golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
index a5f7cc5cf5244a30b01a30fe18fa51d21e43d6d2..0b53eddb4070d33083b611720f076a354c1fd9ec 100644 (file)
@@ -1,2 +1,2 @@
-redo-ifchange *.go module-name
-${GO:=go} build -o $3 `cat module-name`
+redo-ifchange *.go
+${GO:-go} build -o $3
index a060ec35410170ec60178427a3de4341a05c5293..eca66992b34d6ad64f85e0f72f098528a06379b7 100644 (file)
@@ -5,12 +5,12 @@ Preferable way is to download tarball with the signature from
 website and, for example, run tests with benchmarks:
 
 @example
 website and, for example, run tests with benchmarks:
 
 @example
-$ [fetch|wget] http://www.gocheese.cypherpunks.ru/gocheese-@value{VERSION}.tar.xz
-$ [fetch|wget] http://www.gocheese.cypherpunks.ru/gocheese-@value{VERSION}.tar.xz.sig
-$ gpg --verify gocheese-@value{VERSION}.tar.xz.sig gocheese-@value{VERSION}.tar.xz
-$ xz -d < gocheese-@value{VERSION}.tar.xz | tar xf -
+$ [fetch|wget] http://www.gocheese.cypherpunks.ru/gocheese-@value{VERSION}.tar.zst
+$ [fetch|wget] http://www.gocheese.cypherpunks.ru/gocheese-@value{VERSION}.tar.zst.sig
+$ gpg --verify gocheese-@value{VERSION}.tar.zst.sig gocheese-@value{VERSION}.tar.zst
+$ zstd -d < gocheese-@value{VERSION}.tar.zst | tar xf -
 $ cd gocheese-@value{VERSION}
 $ cd gocheese-@value{VERSION}
-$ redo test all
+$ redo test all # or go build -mod=vendor
 @end example
 
 It uses @url{http://cr.yp.to/redo.html, redo} build system for that
 @end example
 
 It uses @url{http://cr.yp.to/redo.html, redo} build system for that
index 87e7b6f988d32dd022347249bae203f51126de69..881d63438167233e693be7fd3bb4bcbaf8e33418 100755 (executable)
@@ -9,8 +9,9 @@ git clone . $tmp/gocheese-$release
 cd $tmp/gocheese-$release
 git checkout v$release
 
 cd $tmp/gocheese-$release
 git checkout v$release
 
-redo-ifchange module-name VERSION
-mod_name=`cat module-name`
+redo-ifchange VERSION
+
+go mod vendor
 
 cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 
 cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
@@ -18,60 +19,6 @@ You can obtain releases source code prepared tarballs on
 EOF
 redo gocheese.info
 
 EOF
 redo gocheese.info
 
-crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
-mkdir -p src/$mod_name
-mv *.go go.mod go.sum src/$mod_name
-
-mods="
-golang.org/x/crypto
-golang.org/x/net
-"
-for mod in $mods; do
-    mod_path=$(sed -n "s# // indirect## ; 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
-
-for mod in golang.org/x/sys; do
-    mod_path=$(sed -n "s#^\($mod\) \(.*\) h1:.*\$#\1@\2#p" src/$mod_name/go.sum | sed /go.mod/d | sort -n -r | sed -n 1p)
-    [ -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
-
-cat > $tmp/includes <<EOF
-golang.org/x/crypto/AUTHORS
-golang.org/x/crypto/argon2
-golang.org/x/crypto/blake2b
-golang.org/x/crypto/CONTRIBUTORS
-golang.org/x/crypto/go.mod
-golang.org/x/crypto/go.sum
-golang.org/x/crypto/LICENSE
-golang.org/x/crypto/PATENTS
-golang.org/x/crypto/README.md
-golang.org/x/net/AUTHORS
-golang.org/x/net/CONTRIBUTORS
-golang.org/x/net/go.mod
-golang.org/x/net/go.sum
-golang.org/x/net/LICENSE
-golang.org/x/net/netutil
-golang.org/x/net/PATENTS
-golang.org/x/net/README.md
-golang.org/x/sys/AUTHORS
-golang.org/x/sys/CONTRIBUTORS
-golang.org/x/sys/cpu
-golang.org/x/sys/go.mod
-golang.org/x/sys/LICENSE
-golang.org/x/sys/PATENTS
-golang.org/x/sys/README.md
-EOF
-tar cfCI - src $tmp/includes | tar xfC - $tmp
-rm -fr src/golang.org $tmp/includes
-mv $tmp/golang.org src
-
 mkinfo() {
     ${MAKEINFO:=makeinfo} --plaintext \
         --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
 mkinfo() {
     ${MAKEINFO:=makeinfo} --plaintext \
         --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
@@ -91,21 +38,21 @@ perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.
 mkinfo --output INSTALL $texi
 rm $texi
 
 mkinfo --output INSTALL $texi
 rm $texi
 
-rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do VERSION.do
-echo 'GOPATH=`pwd` ${GO:=go} build -o $3 `cat module-name`' > gocheese.do
-echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
+rm -rf .redo .git .gitignore style.css makedist.sh www.do VERSION.do
+perl -i -npe "s/go} build/go} build -mod=vendor/" gocheese.do
+perl -i -npe "s/go} test/go} test -mod=vendor/" test.do
 cp ~/work/redo/minimal/do contrib/do
 
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
 cp ~/work/redo/minimal/do contrib/do
 
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
-chmod 755 contrib/pyshop2packages.sh contrib/do
+chmod +x contrib/pyshop2packages.sh contrib/do
 
 cd ..
 tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
 
 cd ..
 tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
-xz -9 gocheese-"$release".tar
-gpg --detach-sign --sign --local-user CD5CD01F55343D88 gocheese-"$release".tar.xz
+zstd -19 -v gocheese-"$release".tar
+gpg --detach-sign --sign --local-user CD5CD01F55343D88 gocheese-"$release".tar.zst
 
 
-tarball=gocheese-"$release".tar.xz
+tarball=gocheese-"$release".tar.zst
 size=$(( $(stat -f %z $tarball) / 1024 ))
 hash=$(gpg --print-md SHA256 < $tarball)
 release_date=$(date "+%Y-%m-%d")
 size=$(( $(stat -f %z $tarball) / 1024 ))
 hash=$(gpg --print-md SHA256 < $tarball)
 release_date=$(date "+%Y-%m-%d")
@@ -113,7 +60,7 @@ release_date=$(date "+%Y-%m-%d")
 cat <<EOF
 An entry for documentation:
 @item $release @tab $release_date @tab $size KiB
 cat <<EOF
 An entry for documentation:
 @item $release @tab $release_date @tab $size KiB
-@tab @url{gocheese-${release}.tar.xz, link} @url{gocheese-${release}.tar.xz.sig, sign}
+@tab @url{gocheese-${release}.tar.zst, link} @url{gocheese-${release}.tar.zst.sig, sign}
 @tab @code{$hash}
 EOF
 
 @tab @code{$hash}
 EOF
 
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
diff --git a/test.do b/test.do
index 157579144643ba817a9e4bdbbbd0b039edc532c2..21eb21b176069634969079521fac41a9458a5361 100644 (file)
--- a/test.do
+++ b/test.do
@@ -1,2 +1 @@
-redo-ifchange module-name
-${GO:=go} test `cat module-name`/... >&2
+${GO:-go} test ./... >&2