diff --git a/README.md b/README.md index dddec0c..b1a7b76 100644 --- a/README.md +++ b/README.md @@ -417,7 +417,7 @@ Dependencies * btrfs-progs (tested with 4.1..4.15.1) Needed for btrfs.h and ctree.h during compile. - Not needed at runtime. + Also needed by the service wrapper script. * libuuid-dev diff --git a/contrib/gentoo-bees/metadata/layout.conf b/contrib/gentoo-bees/metadata/layout.conf new file mode 100644 index 0000000..f42dbbf --- /dev/null +++ b/contrib/gentoo-bees/metadata/layout.conf @@ -0,0 +1,18 @@ +# manifest-hashes specify hashes used for new/updated entries +# the current set went live on 2017-11-21, per 2017-11-12 Council meeting +# https://archives.gentoo.org/gentoo-dev/message/ba2e5d9666ebd7e1bff1143485a37856 +manifest-hashes = BLAKE2B SHA512 + +# The following hashes are required on all Manifest entries. If any +# of them are missing, repoman will refetch and rehash old distfiles. +# Otherwise, old distfiles will keep using their current hash set. +manifest-required-hashes = BLAKE2B + +# No more old ChangeLogs in Git +update-changelog = false + +# Sign Git commits, and NOT Manifests +sign-commits = true +sign-manifests = false + +masters = gentoo diff --git a/contrib/gentoo-bees/profiles/repo_name b/contrib/gentoo-bees/profiles/repo_name new file mode 100644 index 0000000..5e77210 --- /dev/null +++ b/contrib/gentoo-bees/profiles/repo_name @@ -0,0 +1 @@ +bees diff --git a/contrib/gentoo-bees/sys-fs/bees/Manifest b/contrib/gentoo-bees/sys-fs/bees/Manifest new file mode 100644 index 0000000..df74519 --- /dev/null +++ b/contrib/gentoo-bees/sys-fs/bees/Manifest @@ -0,0 +1,2 @@ +EBUILD bees-9999.ebuild 1576 BLAKE2B 105a00d14ee885d9f6ff0758305cf67b83b8790df76f35a8e9a8719acfcad5af87e53cd6f21f99811b22e183f3b4f2f679f24b71d36529bda97c2b5f175169e5 SHA512 b85219901e2d2325c45522321c57d7e7677f87f9fc5bae59d269284a8e6366020c9772486202973c8d042e0d8cf6eb4a3801a4e9126fc445ca4f19be2688226d +MISC metadata.xml 479 BLAKE2B ef5e110ba8d88f0188dbc0d12bec2ad45c51abf707656f6fe4e0fa498d933fe9c32c5dc4c9b446402ec686084459f9f075e52f33402810962c1ac6b149fb70c8 SHA512 3fcc136ed4c55323cac4f8cf542210eb77f73e2a80f95fcce2d688bc645f6e5126404776536dedc938b18287b54abbc264610cc2f587a42a3a8e6d7bf8415aaa diff --git a/contrib/gentoo-bees/sys-fs/bees/bees-9999.ebuild b/contrib/gentoo-bees/sys-fs/bees/bees-9999.ebuild new file mode 100644 index 0000000..9796217 --- /dev/null +++ b/contrib/gentoo-bees/sys-fs/bees/bees-9999.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit multilib linux-info + +DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent" +HOMEPAGE="https://github.com/Zygo/bees" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/kakra/bees.git" + EGIT_BRANCH="integration" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="tools" + +DEPEND=" + >=sys-apps/util-linux-2.30.2 + >=sys-fs/btrfs-progs-4.1 +" +RDEPEND="${DEPEND}" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + if kernel_is -lt 4 4 3; then + ewarn "Kernel versions below 4.4.3 lack critical features needed for bees to" + ewarn "properly operate, so it won't work. It's recommended to run at least" + ewarn "kernel version 4.11 for best performance and reliability." + elif 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." + fi + elog "Bees recommends to run the latest current kernel for performance and" + elog "reliability reasons, see README.md." + fi +} + +src_configure() { + cat >localconf <<-EOF || die + LIBEXEC_PREFIX=/usr/libexec + PREFIX=/usr + LIBDIR=$(get_libdir) + DEFAULT_MAKE_TARGET=all + EOF + if use tools; then + echo OPTIONAL_INSTALL_TARGETS=install_tools >>localconf || die + fi +} diff --git a/contrib/gentoo-bees/sys-fs/bees/metadata.xml b/contrib/gentoo-bees/sys-fs/bees/metadata.xml new file mode 100644 index 0000000..7283b45 --- /dev/null +++ b/contrib/gentoo-bees/sys-fs/bees/metadata.xml @@ -0,0 +1,15 @@ + + + + + hurikhan77+bgo@gmail.com + Kai Krakow + + + Build extra tools useful for debugging (fiemap, feiwalk, beestop) + + + https://github.com/Zygo/bees/issues + Zygo/bees + + diff --git a/contrib/gentoo/bees-9999.ebuild b/contrib/gentoo/bees-9999.ebuild deleted file mode 100644 index a03e3d1..0000000 --- a/contrib/gentoo/bees-9999.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit git-r3 eutils multilib - -DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent" -HOMEPAGE="https://github.com/Zygo/bees" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/kakra/bees.git" - EGIT_BRANCH="integration" -else - SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> ${P}.tar.gz" -fi - -PATCHES=" - ${FILESDIR}/v0.5-gentoo_build.patch -" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="" -IUSE="tools" - -COMMON_DEPEND=" - >=sys-apps/util-linux-2.30.2 - >=sys-devel/gcc-4.9 - >=sys-fs/btrfs-progs-4.1 -" -DEPEND=" - ${COMMON_DEPEND} - || ( dev-python/markdown dev-python/markdown2 ) -" -RDEPEND="${COMMON_DEPEND}" - -DOCS="README.md COPYING" -HTML_DOCS="README.html" - -src_prepare() { - default - echo LIBDIR=$(get_libdir) >>${S}/localconf - localconf=${S}/localconf - if use tools; then - einfo "Building with support tools fiemap and fiewalk." - echo OPTIONAL_INSTALL_TARGETS=install_tools >>${localconf} || die - fi -} diff --git a/contrib/gentoo/files/v0.5-gentoo_build.patch b/contrib/gentoo/files/v0.5-gentoo_build.patch deleted file mode 100644 index 74e48a9..0000000 --- a/contrib/gentoo/files/v0.5-gentoo_build.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/localconf b/localconf -new file mode 100644 -index 0000000..7705cbb ---- /dev/null -+++ b/localconf -@@ -0,0 +1,1 @@ -+LIBEXEC_PREFIX=/usr/libexec -diff --git a/makeflags b/makeflags -index f5983cb..0348623 100644 ---- a/makeflags -+++ b/makeflags -@@ -1,4 +1,3 @@ --CCFLAGS = -Wall -Wextra -Werror -O3 -march=native -I../include -ggdb -D_FILE_OFFSET_BITS=64 --# CCFLAGS = -Wall -Wextra -Werror -O0 -I../include -ggdb -fpic -D_FILE_OFFSET_BITS=64 --CFLAGS = $(CCFLAGS) -std=c99 --CXXFLAGS = $(CCFLAGS) -std=c++11 -Wold-style-cast -+CCFLAGS = -O3 -I../include -fpic -D_FILE_OFFSET_BITS=64 -+CFLAGS += $(CCFLAGS) -std=c99 -+CXXFLAGS += $(CCFLAGS) -std=c++11 -Wold-style-cast