commit:     fe8b129b2d225bcaf3d9d5c585ba9b3e0f6c02d7
Author:     Colin Gillespie <colin <AT> cgillespie <DOT> xyz>
AuthorDate: Mon Aug 14 08:50:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 28 06:17:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe8b129b

sys-fs/bcachefs-tools: add 1.2_p20230813

Signed-off-by: Colin Gillespie <colin <AT> cgillespie.xyz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/bcachefs-tools/Manifest                     |   1 +
 .../bcachefs-tools-1.2_p20230813.ebuild            | 256 +++++++++++++++++++++
 2 files changed, 257 insertions(+)

diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest
index 7837ad2f2f91..feecd9d1f002 100644
--- a/sys-fs/bcachefs-tools/Manifest
+++ b/sys-fs/bcachefs-tools/Manifest
@@ -4,6 +4,7 @@ DIST anyhow-1.0.68.crate 43882 BLAKE2B 
0ccd8fcb746344dfa85674fa7c95aa648aed8d401
 DIST anyhow-1.0.69.crate 43576 BLAKE2B 
deb44b3110aee1314dd599b730df8c2f03b7d13c0d945d4ef00a0e30ca74257269e43107be19868adfea331a8c730e0aec2dff3abea704e56bc6a35b9581fe14
 SHA512 
d65e5c9404a70b1e0af90dd66af157f8c31ad0858f703765d5fc6c828f1fc8db690b17451c4108e3a52a7da2d6c2366e745d7b4bd7d19e6dba3485f7c3a43071
 DIST atty-0.2.14.crate 5470 BLAKE2B 
2db856a9e898a430258f059aeaf7c844a153293e8856d90ac81f7d91a888c89198768ad5cb09303c23241fe85c560a55148fa56a303651a82b0edb895616bfab
 SHA512 
d7b6c4b9a0f898d91ddbc41a5ee45bbf45d1d269508c8cc87ee3e3990500e41e0ec387afb1f3bc7db55bedac396dd86c6509f4bf9e5148d809c3802edcc5e1d9
 DIST autocfg-1.1.0.crate 13272 BLAKE2B 
7724055c337d562103f191f4e36cab469e578f0c51cc24d33624dea155d108a07578703766341fd6a4cc1ef52acda406e7dba1650d59115f18261281e5b40203
 SHA512 
df972c09abbdc0b6cb6bb55b1e29c7fed706ece38a62613d9e275bac46a19574a7f96f0152cccb0239efea04ee90083a146b58b15307696c4c81878cd12de28f
+DIST bcachefs-tools-1.2_p20230813.tar.gz 1014471 BLAKE2B 
2daf56f8155dd7a8847501a34ab11e40bf92f9eb7eca28ea835ad6837731147d19ed00edbfca14f4f037cf9492aae4666d50137d16df86fd6823c9cea11d6ccd
 SHA512 
6895fc55c69df5cbb418e3827ced8ad7e6227073111c3320ac9228373025c5501e871a50e2a3daef9ea0fd7b94ce1d0448dd7498a62445dd272d940f5c28d654
 DIST bcachefs-tools-24_p20230603.tar.gz 997704 BLAKE2B 
147d7460fc06decac72ddbc6425bfdf687daf3f721f649fbc9855ab5924d5214e82938c70cd31f0f98810a57ab851ffe1252ab3b68ceb7ef272102251a1da146
 SHA512 
e2088f2658fdcfe3bf1e3346e9c037c65da614b4abe7dfc4f957490eba44716e08eb62f745d21f638c1b0a41ba48d33b14cb16e9455eba6a46696fe29365793f
 DIST bitfield-0.14.0.crate 16776 BLAKE2B 
abca546581d912133e7344f049d93b8d793de323eba7780fab162c53a244b845582ec2bd14b529b9491c363c2da6228b7de58407afc554cc718a9df8370f5535
 SHA512 
703d534f0684b19af68a18048ecff37367ccbe5a52a3e8d987f2420b980e4a20da9640019ca610b1a73841cbe45dbf4d6a1cfb10cf0e7d09f53199b1fcd141fe
 DIST bitflags-1.3.2.crate 23021 BLAKE2B 
eb990bb27b2bdeb66fd7212ce582cb36e1c616debbac85df642d0c82b25439e6bf9b1e811fac76b59e58ea3c1bbea6170d03a61e8f9a395e4334a0e2e2987eda
 SHA512 
3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62

diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-1.2_p20230813.ebuild 
b/sys-fs/bcachefs-tools/bcachefs-tools-1.2_p20230813.ebuild
new file mode 100644
index 000000000000..35de8ac80ee3
--- /dev/null
+++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.2_p20230813.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]+wasi-snapshot-preview1
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+"
+
+# Upstream have a fork of bindgen and use cgit
+declare -A GIT_CRATES=(
+       
[bindgen]="https://gitlab.com/Matt.Jolly/rust-bindgen-bcachefs;f773267b090bf16b9e8375fcbdcd8ba5e88806a8;rust-bindgen-bcachefs-%commit%/bindgen";
+)
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cargo flag-o-matic multiprocessing python-any-r1 toolchain-funcs 
unpacker
+
+DESCRIPTION="Tools for bcachefs"
+HOMEPAGE="https://bcachefs.org/";
+if [[ ${PV} == "9999" ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://evilpiepirate.org/git/bcachefs-tools.git";
+else
+       MY_COMMIT=4d04fe42623a2f2b91a75cfa3d3503ab88e48acc
+       
SRC_URI="https://github.com/koverstreet/bcachefs-tools/archive/${MY_COMMIT}.tar.gz
 -> ${P}.tar.gz
+               ${CARGO_CRATE_URIS}"
+       S="${WORKDIR}/${PN}-${MY_COMMIT}"
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="Apache-2.0 BSD GPL-2 MIT"
+SLOT="0"
+IUSE="fuse test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       app-arch/lz4
+       dev-libs/libaio
+       dev-libs/libsodium
+       dev-libs/userspace-rcu
+       sys-apps/keyutils
+       sys-apps/util-linux
+       sys-libs/zlib
+       virtual/udev
+       fuse? ( >=sys-fs/fuse-3.7.0 )
+"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_any_dep '
+               dev-python/docutils[${PYTHON_USEDEP}]
+               test? (
+                       dev-python/pytest[${PYTHON_USEDEP}]
+                       dev-python/pytest-xdist[${PYTHON_USEDEP}]
+               )
+       ')
+       $(unpacker_src_uri_depends)
+       sys-devel/clang
+       virtual/rust
+"
+
+python_check_deps() {
+       if use test; then
+               python_has_version \
+                       "dev-python/pytest[${PYTHON_USEDEP}]" \
+                       "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
+       fi
+       python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
+
+}
+
+src_unpack() {
+       if [[ ${PV} == "9999" ]]; then
+               git-r3_src_unpack
+               S="${S}/rust-src" cargo_live_src_unpack
+       else
+               default
+               cargo_src_unpack
+       fi
+}
+
+src_prepare() {
+       default
+       tc-export CC
+       sed \
+               -e '/^CFLAGS/s:-O2::' \
+               -e '/^CFLAGS/s:-g::' \
+               -i Makefile || die
+       # Patch our cargo-ebuild patch definition to pretend that our GIT_CRATE 
is upstream's URI.
+       if ! [[ ${PV} == "9999" ]]; then
+               sed -e 's https://gitlab.com/Matt.Jolly/rust-bindgen-bcachefs 
https://evilpiepirate.org/git/rust-bindgen.git ' \
+                       -i "${WORKDIR}/cargo_home/config" || die
+       fi
+       append-lfs-flags
+}
+
+src_compile() {
+       use fuse && export BCACHEFS_FUSE=1
+       export BUILD_VERBOSE=1
+       export VERSION=${PV}
+
+       default
+
+       use test && emake tests
+}
+
+src_test() {
+       if ! use fuse; then
+               EPYTEST_IGNORE=( tests/test_fuse.py )
+       fi
+       EPYTEST_DESELECT=(
+               # Valgrind
+               'tests/test_fixture.py::test_read_after_free'
+               'tests/test_fixture.py::test_undefined'
+               'tests/test_fixture.py::test_write_after_free'
+               'tests/test_fixture.py::test_undefined_branch'
+               'tests/test_fixture.py::test_leak'
+               'tests/test_fixture.py::test_check'
+               # Fails in portage because of usersandbox; ensure that these 
pass before bumping!
+               'tests/test_basic.py::test_format'
+               'tests/test_basic.py::test_fsck'
+               'tests/test_basic.py::test_list'
+               'tests/test_basic.py::test_list_inodes'
+               'tests/test_basic.py::test_list_dirent'
+       )
+       epytest -v -n "$(makeopts_jobs)"
+}
+
+src_install() {
+       into /
+       dosbin bcachefs fsck.bcachefs mkfs.bcachefs mount.bcachefs
+
+       if use fuse; then
+               dosbin mount.fuse.bcachefs
+               newsbin fsck.bcachefs fsck.fuse.bcachefs
+               newsbin mkfs.bcachefs mkfs.fuse.bcachefs
+       fi
+
+       doman bcachefs.8
+}
+
+pkg_postinst() {
+       if use fuse; then
+               ewarn "FUSE support is experimental."
+               ewarn "Please only use it for development purposes at the risk 
of losing your data."
+               ewarn "You have been warned."
+       fi
+}

Reply via email to