commit: da8279729077d0b3a5d12424e02c395135c7c6e6 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Sep 25 03:13:47 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Sep 25 03:20:01 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da827972
go-module.eclass: suggest XZ options and preferences for compression - Set XZ_OPT='-T0 -9' in the example tar call which: * uses threads to compress (and this will, with newer xz (>= 5.3.3 alpha), allow parallel decompression) * sets a higher compression level (default is -6) - Mention preferences for choice of compression method: developers should choose a method which supports parallel decompression if possible, and also choose a higher compression level given the size of these tarballs. Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/go-module.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass index 681a5bca5561..8047d498b08d 100644 --- a/eclass/go-module.eclass +++ b/eclass/go-module.eclass @@ -26,7 +26,9 @@ # If the software has a directory named vendor in its # top level directory, the only thing you need to do is inherit the # eclass. If it doesn't, you need to also create a dependency tarball and -# host it somewhere, for example in your dev space. +# host it somewhere, for example in your dev space. It's recommended that +# a format supporting parallel decompression is used and developers should +# use higher levels of compression like '-9' for xz. # # Here is an example of how to create a dependency tarball. # The base directory in the GOMODCACHE setting must be go-mod in order @@ -36,7 +38,7 @@ # # $ cd /path/to/project # $ GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw -# $ tar -acf project-1.0-deps.tar.xz go-mod +# $ XZ_OPT='-T0 -9' tar -acf project-1.0-deps.tar.xz go-mod # # @CODE #