1 |
commit: 02c1206282e6a9f33954ed4eaffd8cf8aab2985f |
2 |
Author: Kai Krakow <kai <AT> kaishome <DOT> de> |
3 |
AuthorDate: Fri Jan 12 06:51:17 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 29 20:03:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02c12062 |
7 |
|
8 |
sys-fs/bees: Best-Effort Extent-Same, a btrfs dedup agent. |
9 |
|
10 |
Bees is a block-oriented userspace dedup agent designed to avoid |
11 |
scalability problems on large filesystems. |
12 |
|
13 |
Bees is designed to degrade gracefully when underprovisioned with RAM. |
14 |
Bees does not use more RAM or storage as filesystem data size |
15 |
increases. The dedup hash table size is fixed at creation time and does |
16 |
not change. The effective dedup block size is dynamic and adjusts |
17 |
automatically to fit the hash table into the configured RAM limit. Hash |
18 |
table overflow is not implemented to eliminate the IO overhead of hash |
19 |
table overflow. Hash table entries are only 16 bytes per dedup block to |
20 |
keep the average dedup block size small. |
21 |
|
22 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
23 |
Signed-off-by: Kai Krakow <kai <AT> kaishome.de> |
24 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
25 |
Closes: https://github.com/gentoo/gentoo/pull/9925 |
26 |
|
27 |
sys-fs/bees/bees-9999.ebuild | 66 ++++++++++++++++++++++++++++++++++++++++++++ |
28 |
sys-fs/bees/metadata.xml | 19 +++++++++++++ |
29 |
2 files changed, 85 insertions(+) |
30 |
|
31 |
diff --git a/sys-fs/bees/bees-9999.ebuild b/sys-fs/bees/bees-9999.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..72fef108e72 |
34 |
--- /dev/null |
35 |
+++ b/sys-fs/bees/bees-9999.ebuild |
36 |
@@ -0,0 +1,66 @@ |
37 |
+# Copyright 1999-2018 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+inherit linux-info |
43 |
+ |
44 |
+DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent" |
45 |
+HOMEPAGE="https://github.com/Zygo/bees" |
46 |
+ |
47 |
+if [[ ${PV} == "9999" ]] ; then |
48 |
+ EGIT_REPO_URI="https://github.com/Zygo/bees.git" |
49 |
+ inherit git-r3 |
50 |
+else |
51 |
+ SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
52 |
+ KEYWORDS="~amd64" |
53 |
+fi |
54 |
+ |
55 |
+LICENSE="GPL-3" |
56 |
+SLOT="0" |
57 |
+IUSE="tools" |
58 |
+ |
59 |
+DEPEND=" |
60 |
+ >=sys-apps/util-linux-2.30.2 |
61 |
+ >=sys-fs/btrfs-progs-4.1 |
62 |
+" |
63 |
+RDEPEND="${DEPEND}" |
64 |
+ |
65 |
+CONFIG_CHECK="~BTRFS_FS" |
66 |
+ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs" |
67 |
+ |
68 |
+pkg_pretend() { |
69 |
+ if [[ ${MERGE_TYPE} != buildonly ]]; then |
70 |
+ if kernel_is -lt 4 4 3; then |
71 |
+ ewarn "Kernel versions below 4.4.3 lack critical features needed for bees to" |
72 |
+ ewarn "properly operate, so it won't work. It's recommended to run at least" |
73 |
+ ewarn "kernel version 4.11 for best performance and reliability." |
74 |
+ ewarn |
75 |
+ elif kernel_is -lt 4 11; then |
76 |
+ ewarn "With kernel versions below 4.11, bees may severely degrade system performance" |
77 |
+ ewarn "and responsiveness. Especially, the kernel may deadlock while bees is" |
78 |
+ ewarn "running, it's recommended to run at least kernel 4.11." |
79 |
+ ewarn |
80 |
+ elif kernel_is -lt 4 14 29; then |
81 |
+ ewarn "With kernel versions below 4.14.29, bees may generate a lot of bogus WARN_ON()" |
82 |
+ ewarn "messages in the kernel log. These messages can be ignored and this is fixed" |
83 |
+ ewarn "with more recent kernels:" |
84 |
+ ewarn "# WARNING: CPU: 3 PID: 18172 at fs/btrfs/backref.c:1391 find_parent_nodes+0xc41/0x14e0" |
85 |
+ ewarn |
86 |
+ fi |
87 |
+ elog "Bees recommends to run the latest current kernel for performance and" |
88 |
+ elog "reliability reasons, see README.md." |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ cat >localconf <<-EOF || die |
94 |
+ LIBEXEC_PREFIX=/usr/libexec |
95 |
+ PREFIX=/usr |
96 |
+ LIBDIR=$(get_libdir) |
97 |
+ DEFAULT_MAKE_TARGET=all |
98 |
+ EOF |
99 |
+ if use tools; then |
100 |
+ echo OPTIONAL_INSTALL_TARGETS=install_tools >>localconf || die |
101 |
+ fi |
102 |
+} |
103 |
|
104 |
diff --git a/sys-fs/bees/metadata.xml b/sys-fs/bees/metadata.xml |
105 |
new file mode 100644 |
106 |
index 00000000000..ba18bd51ea0 |
107 |
--- /dev/null |
108 |
+++ b/sys-fs/bees/metadata.xml |
109 |
@@ -0,0 +1,19 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="person"> |
114 |
+ <email>hurikhan77+bgo@×××××.com</email> |
115 |
+ <name>Kai Krakow</name> |
116 |
+ </maintainer> |
117 |
+ <maintainer type="project"> |
118 |
+ <email>proxy-maint@g.o</email> |
119 |
+ <name>Proxy Maintainers</name> |
120 |
+ </maintainer> |
121 |
+<use> |
122 |
+ <flag name="tools">Build extra tools useful for debugging (fiemap, feiwalk, beestop)</flag> |
123 |
+</use> |
124 |
+<upstream> |
125 |
+ <bugs-to>https://github.com/Zygo/bees/issues</bugs-to> |
126 |
+ <remote-id type="github">Zygo/bees</remote-id> |
127 |
+</upstream> |
128 |
+</pkgmetadata> |