diff options
Diffstat (limited to 'sys-fs/bees')
-rw-r--r-- | sys-fs/bees/Manifest | 4 | ||||
-rw-r--r-- | sys-fs/bees/bees-0.11_rc3.ebuild | 127 | ||||
-rw-r--r-- | sys-fs/bees/bees-9999.ebuild | 20 |
3 files changed, 142 insertions, 9 deletions
diff --git a/sys-fs/bees/Manifest b/sys-fs/bees/Manifest index 89986374540c..2cc96ec5f37c 100644 --- a/sys-fs/bees/Manifest +++ b/sys-fs/bees/Manifest @@ -2,7 +2,9 @@ AUX 0001-HACK-crucible-Work-around-kernel-memory-fragmentatio.patch 1183 BLAKE2B AUX 0001-context-demote-abandoned-toxic-match-to-debug-log-le.patch 1500 BLAKE2B c6f6895b92caae4ac8de83931574f87274d7798889c0589859204d73cd41072ee6967ae908c8509e7f5c929f3a4f04c73932b72a27ab3d244cef254ebc15030e SHA512 82e3e8872e4b9943afff883c3ee420a8850b337914fc0b388171f1331c4cd900778c2263b98ff1705f50f7cd3ffe5868d7f88ec48ab68217471a21573a559479 AUX 0002-HACK-crucible-Work-around-kernel-memory-fragmentatio_v2.patch 1445 BLAKE2B e1ebe9c50deeaf7eed82c738d172ab332c5048ab192150cc967843ea16f387631ee44c201c43f49c3c0a032a735219f3a08881e5f92fbbf5b85d050eebb1c7f8 SHA512 75655e40084a0f8660773293693d0a214d34c6bb2f861c2e502a4cc5a1576d5c8084b8af87f790155f419affa56886c23eed09532f82c29b2623f553a5c82999 DIST bees-0.10.tar.gz 177509 BLAKE2B 269cf65d5250a07297dfaee6c0fd6bc25199d63fe423d63ce39df8bcdb64d6f8110a0e03d0dc7dc1b105a8886f2a9364da8878481546eaa8dbf3dc46abc569ed SHA512 77a4ae3d66430c2d9dc0351c16c60bad95f21e238fc00f5f5787f55929ba75ee25212ac4bb4a3e4a9419cec27bbcfd2987aa925a54bc2872609b38a698dbedc3 +DIST bees-0.11-rc3.tar.gz 193475 BLAKE2B bb3d867843266ea5766bc079d6731c79bdc80b9df5cf08a3fa3361ecbe439002a396610b32d3875085c672cf891b55c61ccce7260d22a537d705c2a89b040e4c SHA512 66f42ff60ccdbd56a022d94370aa856453d016d69469c503a2182535b630e5b6d0d0fecf12574f1b23750942b48a9473414424cb9ad1954ef11a3b7a8e6ea1a6 EBUILD bees-0.10-r1.ebuild 4151 BLAKE2B d0b2ddea9523905f3a5620aa6e0da3c595a405afd34a9ab5488a20e7b1f5c77130d9b56b3856a236004982d6069f213ddacf28a9234f3498cc805b4f9a980f56 SHA512 35d51de04f606c5fe35bd0dd071c58e435398dc304f0520e307974a2436bc358856580f35f1611a8e45b6e1d16b4b67d050308ac61dfb8ea8c60872c616f47cd EBUILD bees-0.10.ebuild 4076 BLAKE2B dad615a8ad7fada7c1cd31a5cffa6fad2cdcbc1cf241cc6e602d927cd9c182289d944663365cbeaa27a2f14f89cd8150e7c7196c19b5bbd4cb2580dae80bc19c SHA512 53a60088a2e078e1dec4899d77961c51976f941ca3952de32ddacdb6c03b4e6350d977f159b7a845ec45901bb4cb77b19ca9aebeec2ef1cc7867740df74adbbb -EBUILD bees-9999.ebuild 4782 BLAKE2B d191d127ce13f1caff8ec7f36b22dab6a95bab5a1ef368b6f6c4645cd1316110f04abe669a15521ab10b59dc969f86e11550bb34f1f8555c405886f86eb1de47 SHA512 e3503e6cd9cd492c37a8f380201d0bf0cd494b3369a7b67811db98f6929833d17d00753426e64e4ef727ced60797a73c825c1987d9210981034b0a73bac54ede +EBUILD bees-0.11_rc3.ebuild 4809 BLAKE2B 3735114fb0938c72db642ac7f50e672db50657d7d7fe292fbaec8abed4cb74b62b2dae19c92afe13e6c57c409037de34a6eaa9991f93c12cdaddc25f7fcd0430 SHA512 45aa785c348097bc9bb4379995781d628e83713f2700d24dfdac9b191ba002874e56a6000ae69a06cb29ce44a605c3f5146cd8362c65da1fa8e3e8610c23ff51 +EBUILD bees-9999.ebuild 4822 BLAKE2B ff033fca18453e76d49490318246bb34bc2067aba6c6af1660621fcaef37faf45f15cfe52dbbc53d7493e2b8ff8a5c4e19771db271e78e5f42f7d37c7f598c28 SHA512 4ff9f174be78b93805d3471c884494920cd0196669103580de10ba31bf9b7aaa17ff45d2f9ad62090828e8668c8ba1a7a687389b72d61a028922eeb9eaa10db0 MISC metadata.xml 529 BLAKE2B 69ea069e33d1af7c2c38aa7f8fc61516f23c586ad162d9581859829b084c8da3ef76278173e1ac3afa1ef432355ab14f2ecc01d07f039f8447c20cc27b22d633 SHA512 cb9ba7a32c6a8269f7303ebd41bf0e21f4325560b40bba10aff08a05d07170f9f0e35e687e688f6793c0abf994c9b23f90a47b9d32544636f2d6b5ab51140bd3 diff --git a/sys-fs/bees/bees-0.11_rc3.ebuild b/sys-fs/bees/bees-0.11_rc3.ebuild new file mode 100644 index 000000000000..c2a394c8ae3a --- /dev/null +++ b/sys-fs/bees/bees-0.11_rc3.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent" +HOMEPAGE="https://github.com/Zygo/bees" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Zygo/bees.git" +else + MY_PV=${PV/_/-} + MY_P=${P/_/-} + S=${WORKDIR}/${MY_P} + + SRC_URI="https://github.com/Zygo/bees/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="" +fi + +LICENSE="GPL-3" +SLOT="0" + +DEPEND=" + >=sys-apps/util-linux-2.30.2 + >=sys-fs/btrfs-progs-4.20.2 +" +RDEPEND="${DEPEND}" + +CONFIG_CHECK="~BTRFS_FS" +ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + if kernel_is -lt 4 11; then + ewarn "With kernel versions below 4.11, bees may severely degrade system performance" + ewarn "and responsiveness. Especially, the kernel may deadlock while bees is" + ewarn "running, it's recommended to run at least kernel 4.11." + ewarn + elif kernel_is -lt 4 14 29; then + ewarn "With kernel versions below 4.14.29, bees may generate a lot of bogus WARN_ON()" + ewarn "messages in the kernel log. These messages can be ignored and this is fixed" + ewarn "with more recent kernels:" + ewarn "# WARNING: CPU: 3 PID: 18172 at fs/btrfs/backref.c:1391 find_parent_nodes+0xc41/0x14e0" + ewarn + elif kernel_is -lt 5 7 0; then + ewarn "With kernel versions below 5.4.96 and 5.7, the kernel may hold file system" + ewarn "locks for a long time while at the same time CPU usage increases when bees is" + ewarn "operating. bees tries to avoid this behavior by excluding very common extents" + ewarn "from deduplication. This has only a minimal impact on dedupe effectiveness." + ewarn + fi + if kernel_is -lt 5 1 0; then + ewarn "IMPORTANT: With kernel versions below 5.1.0, you may experience data corruption" + ewarn "due to bees using compression in btrfs. You are adviced to use a chronologically" + ewarn "later kernel, that includes older LTS versions released after 5.0.4:" + ewarn "Fixed in: 5.1+, 5.0.4+, 4.19.31+, 4.14.108+, 4.9.165+, 4.4.177+, 3.18.137+" + ewarn "# commit 8e92821 btrfs: fix corruption reading shared and compressed extents after hole punching" + ewarn + fi + if kernel_is -lt 5 4 19; then + ewarn "With kernel versions below 5.4.19, bees may trigger a btrfs bug when running" + ewarn "btrfs-balance in parallel. This may lead to meta-data corruption in the worst" + ewarn "case. Especially, kernels 5.1.21 and 5.2.21 should be avoided. Kernels 5.0.x" + ewarn "after 5.0.21 should be safe. In the best case, affected kernels may force" + ewarn "the device RO without writing corrupted meta-data. More details:" + ewarn "https://github.com/Zygo/bees/blob/master/docs/btrfs-kernel.md" + ewarn + fi + if kernel_is -gt 5 15 106; then + if kernel_is -lt 6 3 10; then + ewarn "With kernel versions 5.15.107 or later, there is a memory fragmentation" + ewarn "issue with LOGICAL_INO which can lead to cache thrashing and cause IO" + ewarn "latency spikes. This version ships with a work-around at the cost of not" + ewarn "handling highly duplicated filesystems that well. More details:" + ewarn "https://github.com/Zygo/bees/issues/260" + ewarn + fi + fi + if kernel_is -lt 5.7; then + ewarn "WARNING: Kernel versions lower than 5.7 are no longer really supported by" + ewarn "bees. While there should be no unexpected data loss, you may experience" + ewarn "severe slowdowns or even system lockups." + ewarn + fi + fi +} + +pkg_postinst() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + elog "Bees recommends running the latest current kernel for performance and" + elog "reliability reasons, see README.md." + elog + elog "NEWS: bees now defaults to a much improved extent-based scanner. It is compatible" + elog "with your existing state database in \`\$BEESHOME\` but it may start over from the" + elog "beginning. However, it will keep the state of the old scanner, so you can switch" + elog "back and forth. To actually use the new scanner, use scan mode 4 or remove the" + elog "scan mode parameter from your init script. Requires kernel 4.14 or higher!" + fi +} + +src_prepare() { + default + sed -i 's/ -Werror//' makeflags || die +} + +src_configure() { + tc-export CC CXX AR + cat >localconf <<-EOF || die + ETC_PREFIX="${EPREFIX}/etc" + LIBEXEC_PREFIX="${EPREFIX}/usr/libexec" + PREFIX="${EPREFIX}/usr" + SYSTEMD_SYSTEM_UNIT_DIR="$(systemd_get_systemunitdir)" + DEFAULT_MAKE_TARGET=all + EOF + if [[ ${PV} != "9999" ]] ; then + echo BEES_VERSION=v${MY_PV} >>localconf || die + fi +} + +src_compile() { + default + # localconf quotes leak in the systemd unit but are still needed for spaces + sed -i 's/"//g' scripts/beesd@.service || die +} diff --git a/sys-fs/bees/bees-9999.ebuild b/sys-fs/bees/bees-9999.ebuild index 193a07fc4468..965748b64f91 100644 --- a/sys-fs/bees/bees-9999.ebuild +++ b/sys-fs/bees/bees-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,7 +12,11 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/Zygo/bees.git" else - SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> ${P}.tar.gz" + MY_PV=${PV/_/-} + MY_P=${P/_/-} + S=${WORKDIR}/${MY_P} + + SRC_URI="https://github.com/Zygo/bees/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" KEYWORDS="~amd64 ~arm64" fi @@ -28,10 +32,6 @@ RDEPEND="${DEPEND}" CONFIG_CHECK="~BTRFS_FS" ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs" -PATCHES=( - "${FILESDIR}/0001-context-demote-abandoned-toxic-match-to-debug-log-le.patch" -) - pkg_pretend() { if [[ ${MERGE_TYPE} != buildonly ]]; then if kernel_is -lt 4 11; then @@ -85,12 +85,16 @@ pkg_pretend() { ewarn "severe slowdowns or even system lockups." ewarn fi + fi +} +pkg_postinst() { + if [[ ${MERGE_TYPE} != buildonly ]]; then elog "Bees recommends running the latest current kernel for performance and" elog "reliability reasons, see README.md." elog elog "NEWS: bees now defaults to a much improved extent-based scanner. It is compatible" - elog "with your existing state database in `\$BEESHOME` but it may start over from the" + elog "with your existing state database in \`\$BEESHOME\` but it may start over from the" elog "beginning. However, it will keep the state of the old scanner, so you can switch" elog "back and forth. To actually use the new scanner, use scan mode 4 or remove the" elog "scan mode parameter from your init script. Requires kernel 4.14 or higher!" @@ -112,7 +116,7 @@ src_configure() { DEFAULT_MAKE_TARGET=all EOF if [[ ${PV} != "9999" ]] ; then - echo BEES_VERSION=v${PV} >>localconf || die + echo BEES_VERSION=v${MY_PV} >>localconf || die fi } |