mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Gentoo: Rework Gentoo ebuild into overlay
This commit squashes all the little changes from the previous integration branch into one, adjusts to the new Makefile changes, and introduces an overlay layout so that the contrib/gentoo-bees subtree can be directly added as a Portage overlay to the system. The following list contains the previous commit descriptions: sys-fs/bees: Keyword tested architecture ~amd64 Bees was tested on this platform. sys-fs/bees: Add kernel version checks Add checking the kernel versions and write some info and/or warnings before building and installing the package. Running bees on older kernels may have some serious performance and stability impacts, let's tell the user about it. Closes #55 sys-fs/bees: Add metadata.xml sys-fs/bees: There's no configure script So, there's no point in calling "default". sys-fs/bees: Simplify src_configure() sys-fs/bees: Don't depend on markdown It makes no sense to install both README.md and README.html, and we can get rid of one dependency. Dependencies: btrfs-progs is no longer a buildtime-only dep It is actually needed by the bees service wrapper script, as pointed out by Gentoo QA review. sys-fs/bees: DOCS is not needed "COPYING" is already covered by the licensing. The ebuild defaults already include README* sys-fs/bees: Make warnings exclusive It was recommended by Gentoo QA to show only either one or another warning, and change the texts accordingly. sys-fs/bees: RDEPEND is not implicit RDEPEND does not implicitly default to DEPEND. Let's explicitly set the variable. sys-fs/bees: IUSE=test is only needed for explicit dependencies Thus, remove it. Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
parent
679a327ac5
commit
788774731b
@ -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
|
||||
|
||||
|
18
contrib/gentoo-bees/metadata/layout.conf
Normal file
18
contrib/gentoo-bees/metadata/layout.conf
Normal file
@ -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
|
1
contrib/gentoo-bees/profiles/repo_name
Normal file
1
contrib/gentoo-bees/profiles/repo_name
Normal file
@ -0,0 +1 @@
|
||||
bees
|
2
contrib/gentoo-bees/sys-fs/bees/Manifest
Normal file
2
contrib/gentoo-bees/sys-fs/bees/Manifest
Normal file
@ -0,0 +1,2 @@
|
||||
EBUILD bees-9999.ebuild 1576 BLAKE2B 105a00d14ee885d9f6ff0758305cf67b83b8790df76f35a8e9a8719acfcad5af87e53cd6f21f99811b22e183f3b4f2f679f24b71d36529bda97c2b5f175169e5 SHA512 b85219901e2d2325c45522321c57d7e7677f87f9fc5bae59d269284a8e6366020c9772486202973c8d042e0d8cf6eb4a3801a4e9126fc445ca4f19be2688226d
|
||||
MISC metadata.xml 479 BLAKE2B ef5e110ba8d88f0188dbc0d12bec2ad45c51abf707656f6fe4e0fa498d933fe9c32c5dc4c9b446402ec686084459f9f075e52f33402810962c1ac6b149fb70c8 SHA512 3fcc136ed4c55323cac4f8cf542210eb77f73e2a80f95fcce2d688bc645f6e5126404776536dedc938b18287b54abbc264610cc2f587a42a3a8e6d7bf8415aaa
|
57
contrib/gentoo-bees/sys-fs/bees/bees-9999.ebuild
Normal file
57
contrib/gentoo-bees/sys-fs/bees/bees-9999.ebuild
Normal file
@ -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
|
||||
}
|
15
contrib/gentoo-bees/sys-fs/bees/metadata.xml
Normal file
15
contrib/gentoo-bees/sys-fs/bees/metadata.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>hurikhan77+bgo@gmail.com</email>
|
||||
<name>Kai Krakow</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="tools">Build extra tools useful for debugging (fiemap, feiwalk, beestop)</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/Zygo/bees/issues</bugs-to>
|
||||
<remote-id type="github">Zygo/bees</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -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
|
||||
}
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user