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: Wed, 02 Dec 2020 07:34:56
Message-Id: 1606894475.c54f1d5636d1ca49e21634a81af3bf7a9609581d.RarogCmex@gentoo
1 commit: c54f1d5636d1ca49e21634a81af3bf7a9609581d
2 Author: Denis Reva <denis7774 <AT> gmail <DOT> com>
3 AuthorDate: Wed Dec 2 07:34:35 2020 +0000
4 Commit: Denis Reva <denis7774 <AT> gmail <DOT> com>
5 CommitDate: Wed Dec 2 07:34:35 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c54f1d56
7
8 sys-fs/dwarfs: A fast high compression read-only file system
9
10 I has just ported new package:
11 https://github.com/mhx/dwarfs
12 It's file-system like squashfs but compresses stronger
13
14 I had to use built-in libs because they hard-coded,
15 and furthermore they used partially
16
17 So It no more require dev-cpp/folly,
18 and I thought about deleting its.
19
20 Package-Manager: Portage-3.0.9, Repoman-3.0.2
21 Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>
22
23 sys-fs/dwarfs/Manifest | 3 ++
24 sys-fs/dwarfs/dwarfs-0.2.3.ebuild | 93 +++++++++++++++++++++++++++++++++++++++
25 sys-fs/dwarfs/metadata.xml | 19 ++++++++
26 3 files changed, 115 insertions(+)
27
28 diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest
29 new file mode 100644
30 index 00000000..51b331f4
31 --- /dev/null
32 +++ b/sys-fs/dwarfs/Manifest
33 @@ -0,0 +1,3 @@
34 +DIST dwarfs-0.2.3.tar.gz 131021 BLAKE2B 4bdcbc7c775b4e20dc523f77e7fb84a9cd978df8c63bfd2300343bbf4dd49394e8f0fb1779ac990174c38acb2dbe1444404c518c22382da8e36e13e65343c568 SHA512 4638f3a9d712ead6701f3b739d0239ddf5f742c02cf4723079df702549c3af179b798b833bd69b77eeffb68df670fbcedff70ef8d7a88e4c9e5dd42b090eed63
35 +DIST fbthrift-2020.11.30.00.tar.gz 5274706 BLAKE2B ad13eb7b66f804c7a667746d72298e05726d1f78a49523a10f2712cc4dbea71999590a2c420e8081d32dc24a7d203e11d5c7e5c15f2627594295cd5533096dd9 SHA512 33b4c1a4cfc8783f99d5da8ae113f877e1f23586f5a854833107805fe35834604e677d7abe690cefeb70baed20cb3cc14449cfae35a9af89594974377bbe0329
36 +DIST folly-2020.11.30.00.tar.gz 3261437 BLAKE2B 5070819f1f8bac2030e761a8d2330379e8e5ba242d21330b98dcd598cb18e12046a9ad3fb6462f82dbc47c53cf0905c330e707201bfbbedb81f203ef1b30731e SHA512 e7e06bd8c8e38af345d20a04886b4497c4f0c9877263dbcb5a3f2d17c7a3252a2529086a5a04d07c2d3a457ca3930c43672fc4f74b7bdbc2ec0d07abdf1ed425
37
38 diff --git a/sys-fs/dwarfs/dwarfs-0.2.3.ebuild b/sys-fs/dwarfs/dwarfs-0.2.3.ebuild
39 new file mode 100644
40 index 00000000..c5976474
41 --- /dev/null
42 +++ b/sys-fs/dwarfs/dwarfs-0.2.3.ebuild
43 @@ -0,0 +1,93 @@
44 +# Copyright 1999-2020 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=7
48 +
49 +inherit cmake check-reqs
50 +
51 +DESCRIPTION="A fast very high compression read-only FUSE file system"
52 +HOMEPAGE="https://github.com/mhx/dwarfs"
53 +
54 +FBTHRIFT_MAGIC="2020.11.30.00"
55 +FOLLY_MAGIC="2020.11.30.00"
56 +
57 +SRC_URI="https://github.com/mhx/dwarfs/archive/v${PV}.tar.gz -> ${P}.tar.gz
58 + https://github.com/facebook/fbthrift/archive/v${FBTHRIFT_MAGIC}.tar.gz -> fbthrift-${FBTHRIFT_MAGIC}.tar.gz
59 + https://github.com/facebook/folly/archive/v${FOLLY_MAGIC}.tar.gz -> folly-${FOLLY_MAGIC}.tar.gz"
60 +
61 +LICENSE="GPL-3"
62 +SLOT="0"
63 +KEYWORDS="~amd64 ~x86"
64 +IUSE="jemalloc"
65 +
66 +DEPEND="app-arch/zstd
67 + app-arch/lz4
68 + app-arch/xz-utils
69 + app-arch/snappy
70 + dev-libs/boost[context,threads]
71 + dev-libs/double-conversion
72 + dev-libs/libfmt
73 + dev-libs/libevent
74 + dev-cpp/gflags
75 + dev-cpp/glog[gflags]
76 + dev-cpp/sparsehash
77 + sys-libs/binutils-libs
78 + sys-libs/libunwind
79 + sys-fs/fuse:3
80 + sys-devel/flex
81 + sys-devel/binutils:*
82 + sys-libs/zlib
83 + jemalloc? ( dev-libs/jemalloc )"
84 +RDEPEND="dev-libs/boost[context,threads]
85 + dev-libs/double-conversion
86 + app-arch/zstd
87 + app-arch/lz4
88 + app-arch/xz-utils
89 + app-arch/snappy
90 + sys-fs/fuse:3
91 + sys-libs/binutils-libs
92 + sys-libs/libunwind"
93 +BDEPEND="app-text/ronn
94 + dev-util/cmake
95 + sys-apps/sed
96 + sys-devel/bison
97 + virtual/pkgconfig"
98 +
99 +CHECKREQS_DISK_BUILD="512M"
100 +
101 +DOCS=( "README.md" "CHANGES.md" "TODO" )
102 +
103 +src_unpack(){
104 + default
105 + rm -d "${S}"/fbthrift/
106 + rm -d "${S}"/folly/
107 + mv "${WORKDIR}/fbthrift-${FBTHRIFT_MAGIC}" "${S}"/fbthrift/
108 + mv "${WORKDIR}/folly-${FBTHRIFT_MAGIC}" "${S}"/folly/
109 +}
110 +
111 +src_prepare(){
112 + einfo "setting path to $(get_libdir)"
113 + pushd "${S}"/folly
114 + sed "s/lib CACHE/$(get_libdir) CACHE/" -i CMakeLists.txt || die
115 + sed "s/lib\/cmake\/folly CACHE/$(get_libdir)\/cmake\/folly CACHE/" -i CMakeLists.txt || die
116 + popd
117 + pushd "${S}"/fbthrift
118 + sed "s/lib CACHE/$(get_libdir) CACHE/" -i CMakeLists.txt || die
119 + sed "s/lib\/cmake\/fbthrift CACHE/$(get_libdir)\/cmake\/fbthrift CACHE/" -i CMakeLists.txt || die
120 + popd
121 + sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
122 + cmake_src_prepare
123 +}
124 +
125 +pkg_postinst(){
126 + elog "Test shows that dwarfs compiled with Clang is substantially faster than GCC ones"
127 + elog "See ${HOMEPAGE}"
128 + elog "So you may want to compile it independently with Clang by the"
129 + elog "https://wiki.gentoo.org/wiki/Clang"
130 + elog "And with the per-package settings:"
131 + elog "https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Per-package_environment_variables"
132 + elog "Also you may find more information in the"
133 + elog "${HOMEPAGE}"
134 + elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
135 + elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
136 +}
137
138 diff --git a/sys-fs/dwarfs/metadata.xml b/sys-fs/dwarfs/metadata.xml
139 new file mode 100644
140 index 00000000..17e2efa0
141 --- /dev/null
142 +++ b/sys-fs/dwarfs/metadata.xml
143 @@ -0,0 +1,19 @@
144 +<?xml version="1.0" encoding="UTF-8"?>
145 +<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
146 +<pkgmetadata>
147 + <maintainer type="person">
148 + <email>denis7774@×××××.com</email>
149 + <name>Denis Reva</name>
150 + <description>Partial maintainer</description>
151 + </maintainer>
152 + <longdescription lang="en">
153 + DwarFS is a read-only file system with a focus on achieving very high compression ratios in particular for very redundant data.
154 + This probably doesn't sound very exciting, because if it's redundant, it should compress well. However, I found that other read-only, compressed file systems don't do a very good job at making use of this redundancy. See here for a comparison with other compressed file systems.
155 + DwarFS also doesn't compromise on speed and for my use cases I've found it to be on par with or perform better than SquashFS. For my primary use case, DwarFS compression is an order of magnitude better than SquashFS compression, it's 4 times faster to build the file system, it's typically faster to access files on DwarFS and it uses less CPU resources.
156 + Distinct features of DwarFS are:
157 + * Clustering of files by similarity using a similarity hash function. This makes it easier to exploit the redundancy across file boundaries.
158 + * Segmentation analysis across file system blocks in order to reduce the size of the uncompressed file system. This saves memory when using the compressed file system and thus potentially allows for higher cache hit rates as more data can be kept in the cache.
159 + * Highly multi-threaded implementation. Both the file system creation tool as well as the FUSE driver are able to make good use of the many cores of your system.
160 + * Optional experimental Lua support to provide custom filtering and ordering functionality.
161 + </longdescription>
162 +</pkgmetadata>