Gentoo Archives: gentoo-commits

From: Denis Reva <denis7774@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/
Date: Thu, 07 Jan 2021 19:41:59
Message-Id: 1610047989.a0bb3020f949ef0fe00caff718c38e5641b5d54d.RarogCmex@gentoo
1 commit: a0bb3020f949ef0fe00caff718c38e5641b5d54d
2 Author: Denis Reva <denis7774 <AT> gmail <DOT> com>
3 AuthorDate: Thu Jan 7 19:33:09 2021 +0000
4 Commit: Denis Reva <denis7774 <AT> gmail <DOT> com>
5 CommitDate: Thu Jan 7 19:33:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a0bb3020
7
8 sys-fs/dwarfs: new version 0.3.1
9
10 Ebuild changes:
11 * Added use flags for jemalloc and python
12 Upsteam changes:
13 Even better compression than before
14 Mostly thanks to a new ordering algorithm that is now
15 enabled by default, I've seen a 15% improvement in achievable
16 compression ratio. In my standard test of packing 48 GiB of
17 Perl installations, the resulting DwarFS image size reduced
18 from 556 MiB to 472 MiB without any regression in
19 compression speed.
20
21 More memory efficient FUSE driver
22 By switching to jemalloc, the FUSE driver has become much
23 more memory efficient, using up to ten times less memory
24 than with the standard glibc allocator.
25
26 Python scripting support
27 The Lua scripting interface has been fully replaced by
28 a new Python interface. I've been looking for a
29 luabind replacement, but none of the candidates seemed
30 to be well maintained or reasonably easy to integrate.
31 Python is much more approachable for most people and
32 boost::python seems well maintained. The new interface
33 also has a lot more features. You can find an
34 example script in the distribution.
35
36 Fix for file system images created with versions
37 before dwarfs-0.2.3
38 If you've created DwarFS images with the 0.2.0,
39 0.2.1 or 0.2.2 releases, symbolic links were stored
40 in a way that the FUSE driver in the 0.2.x releases
41 could not read them back correctly. With the
42 new 0.3.0 release, these old images, including the
43 symbolic links, can now be read again, so there's
44 no need to rebuild your old images.
45
46 Improved file system format
47 The file system format has been updated with
48 the 0.3.0 release to include integrity checking via
49 SHA2-512/256 hashes as well as features that should make
50 recovery easier in case of file system image corruption.
51 In addition to the SHA hashes, the extremely fast xxHash
52 library is used to store a second hash that is
53 checked every time any part of the file system is
54 used. While there are currently no recovery features
55 implemented, having this data in the file system
56 already should be really valuable. You can convert
57 an old image to the new format using:
58
59 mkdwarfs -i old.dwarfs -o new.dwarfs --recompress none
60 Statically linked 64-bit Linux binaries available
61 Given the long list of dependencies, building DwarFS
62 might not be an option for you. In that case, you can
63 now download the binary distribution that should work
64 fine on most 64-bit Linux distributions.
65 FUSE drivers are included for both FUSE2 and FUSE3
66
67 Lots of smaller fixes & changes
68 See the Change Log for a full list of changes.
69
70 Package-Manager: Portage-3.0.12, Repoman-3.0.2
71 Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>
72
73 sys-fs/dwarfs/Manifest | 1 +
74 sys-fs/dwarfs/dwarfs-0.3.1.ebuild | 94 +++++++++++++++++++++++++++++++++++++++
75 2 files changed, 95 insertions(+)
76
77 diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest
78 index a46c3f8f..4a31b877 100644
79 --- a/sys-fs/dwarfs/Manifest
80 +++ b/sys-fs/dwarfs/Manifest
81 @@ -1,3 +1,4 @@
82 DIST dwarfs-0.2.4.tar.gz 131125 BLAKE2B 06dd11a90d203882a6b2398d6a3e763a269746a57394444e67913bbb66176305e3d6d606a7f35b4c3692d1d761e90d853b268f876004be1e8274b5b16174dcde SHA512 2136f1159eaf80afd6f5a1edda65c7a7f2cb147c7b14a5d19981fbd417e8785c2d7f986df3787587b4b5157bfd299159f4015a017d289bb0c9fba77b337ed3b5
83 +DIST dwarfs-0.3.1.tar.bz2 8704811 BLAKE2B f7f5a2affae5da78d526891017ac66ed16f73919c7b990b558413c028590e3e3efa2f7e8cc70d97cbad2a0332d91458444898611ea86343a5978bcdf2ed1bf3b SHA512 5776f5da14a5ccbe0e1cf11acec1c9360aa23e2f6751f54a5df200d4625ffc1892658bd4d987ae15fb08ec1f97d7db2a8c42ed80bb6aae062a45e50513e09f51
84 DIST fbthrift-2020.11.30.00.tar.gz 5274706 BLAKE2B ad13eb7b66f804c7a667746d72298e05726d1f78a49523a10f2712cc4dbea71999590a2c420e8081d32dc24a7d203e11d5c7e5c15f2627594295cd5533096dd9 SHA512 33b4c1a4cfc8783f99d5da8ae113f877e1f23586f5a854833107805fe35834604e677d7abe690cefeb70baed20cb3cc14449cfae35a9af89594974377bbe0329
85 DIST folly-2020.11.30.00.tar.gz 3261437 BLAKE2B 5070819f1f8bac2030e761a8d2330379e8e5ba242d21330b98dcd598cb18e12046a9ad3fb6462f82dbc47c53cf0905c330e707201bfbbedb81f203ef1b30731e SHA512 e7e06bd8c8e38af345d20a04886b4497c4f0c9877263dbcb5a3f2d17c7a3252a2529086a5a04d07c2d3a457ca3930c43672fc4f74b7bdbc2ec0d07abdf1ed425
86
87 diff --git a/sys-fs/dwarfs/dwarfs-0.3.1.ebuild b/sys-fs/dwarfs/dwarfs-0.3.1.ebuild
88 new file mode 100644
89 index 00000000..ece7ed8b
90 --- /dev/null
91 +++ b/sys-fs/dwarfs/dwarfs-0.3.1.ebuild
92 @@ -0,0 +1,94 @@
93 +# Copyright 1999-2021 Gentoo Authors
94 +# Distributed under the terms of the GNU General Public License v2
95 +
96 +EAPI=7
97 +
98 +PYTHON_COMPAT=( python3_{6,7,8,9} )
99 +
100 +inherit cmake check-reqs python-single-r1
101 +
102 +DESCRIPTION="A fast very high compression read-only FUSE file system"
103 +HOMEPAGE="https://github.com/mhx/dwarfs"
104 +
105 +SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/dwarfs-${PV}.tar.bz2 -> ${P}.tar.bz2"
106 +
107 +LICENSE="GPL-3"
108 +SLOT="0"
109 +KEYWORDS="~amd64 ~arm64 ~x86"
110 +IUSE="python +jemalloc"
111 +
112 +#test IUSE disabled because there is no googletest in portage tree
113 +#-DWITH_TESTS=$(usex test ON OFF)
114 +
115 +PYTHON_REQ_USE="python"
116 +
117 +DEPEND="sys-devel/flex
118 + sys-devel/binutils:*"
119 +RDEPEND="dev-libs/boost[context,threads,python?]
120 + dev-libs/double-conversion
121 + dev-libs/libfmt
122 + dev-libs/libevent
123 + dev-libs/xxhash
124 + jemalloc? ( >=dev-libs/jemalloc-5.2.1 )
125 + app-arch/zstd
126 + app-arch/lz4
127 + app-arch/xz-utils
128 + app-arch/snappy
129 + dev-cpp/sparsehash
130 + dev-cpp/gflags
131 + dev-cpp/glog[gflags]
132 + sys-fs/fuse:3
133 + sys-libs/binutils-libs
134 + sys-libs/zlib
135 + sys-libs/libunwind
136 + !dev-cpp/folly"
137 +BDEPEND="app-text/ronn
138 + dev-util/cmake
139 + sys-apps/sed
140 + sys-devel/bison
141 + virtual/pkgconfig"
142 +
143 +CHECKREQS_DISK_BUILD="768M"
144 +
145 +DOCS=( "README.md" "CHANGES.md" "TODO" )
146 +
147 +CMAKE_IN_SOURCE_BUILD=true
148 +CMAKE_WARN_UNUSED_CLI=no
149 +
150 +QA_SONAME="${D}/usr/lib64/libdwarfs.so ${D}/usr/lib64/libxxhash.so"
151 +
152 +src_prepare(){
153 + einfo "setting library path to $(get_libdir)"
154 + sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
155 + cmake_src_prepare
156 +}
157 +
158 +src_configure(){
159 + einfo "setting configuration flags to:"
160 + mycmakeargs=(
161 + -DUSE_JEMALLOC=$(usex jemalloc ON OFF)
162 + -DWITH_PYTHON=$(usex python ON OFF)
163 + )
164 + if use python; then mycmakeargs+=( -DWITH_PYTHON_VERSION=${EPYTHON#python} ); fi
165 + einfo ${mycmakeargs}
166 + cmake_src_configure
167 +}
168 +
169 +src_install(){
170 + cmake_src_install
171 + dolib.so libmetadata_thrift.so libthrift_light.so
172 + dolib.so folly/libfolly.so.0.58.0-dev folly/libfolly.so
173 +}
174 +
175 +pkg_postinst(){
176 + elog "Test shows that dwarfs compiled with Clang is substantially faster than GCC ones"
177 + elog "See https://github.com/mhx/dwarfs/issues/14"
178 + elog "So you may want to compile it independently with Clang by the"
179 + elog "https://wiki.gentoo.org/wiki/Clang"
180 + elog "And with the per-package settings:"
181 + elog "https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Per-package_environment_variables"
182 + elog "Also you may find more information in the"
183 + elog "${HOMEPAGE}"
184 + elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
185 + elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
186 +}