commit:     b892b929e7f38cb5f8b51a88c9459ea60a7d6945
Author:     Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Thu Apr 18 15:31:02 2024 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat Apr 20 04:04:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b892b929

sys-fs/bcachefs-tools: add 1.7.0

- Add LLVM 18 slot (tests pass)
- Add QA_FLAGS_IGNORED to fix bug 925610 (CLI app is written in Rust)
- Drop 1.3.x
- All tests pass on amd64 and arm64
- Musl is still broken
  - linux/sort.c:32:20: error: expected ';' before '__inline__'

Closes: https://bugs.gentoo.org/925610
Signed-off-by: Christopher Fore <csfore <AT> posteo.net>
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 sys-fs/bcachefs-tools/Manifest                    |   2 +-
 sys-fs/bcachefs-tools/bcachefs-tools-1.7.0.ebuild | 253 ++++++++++++++++++++++
 2 files changed, 254 insertions(+), 1 deletion(-)

diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest
index a0cd188831de..42d415af10d7 100644
--- a/sys-fs/bcachefs-tools/Manifest
+++ b/sys-fs/bcachefs-tools/Manifest
@@ -13,10 +13,10 @@ DIST anyhow-1.0.75.crate 43901 BLAKE2B 
6353557d7ec2cbfdd001c039fad62c95fea9e02b1
 DIST anyhow-1.0.79.crate 44931 BLAKE2B 
9270f04c6fbbecb535e3081f4275c3df28f6a893c1dfc0a9f7c009994de2deb8ebced04fe5e6f62931b33c3707f4fbfb0c3b28da1a611b413d40d27149d1fd2f
 SHA512 
ecd6fb1367d494df18c0e274b336a133f3acf7b6a5487d20bdd06e08c7f1f729877086a0966e998221daff120504fadd2be2dc4219ed621f81b0a50c2bbc2011
 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.3.5_p20231216.tar.gz 1059604 BLAKE2B 
0f3a138b0586c04c53967b801917372486f6558e8d1c9230bc33b1de39a1f7c82ba53bea0b063e1609742ec345fed9f374328ee4990d9bdf456f96ae5219334a
 SHA512 
52b49598ceb5308e7ff235d87fb1e628836b7b297f06a02232307ae34b63fa7cd3eeb4919022bda40aa05954e0237284db7d7cb2e1bfecad629f01cf08caaeec
 DIST bcachefs-tools-1.4.0.tar.gz 1060158 BLAKE2B 
c972de13e305b07910ab4acdfea05df85bfe70ed350dea5fb578a150a9e116f054dc99bf6dd185aa26dab799832939276a6248203717b918c1d7e0e9f2e0fdd9
 SHA512 
f374c3b2ec1836ea79ed37f188aaf9c98d6d217b2b05c050304467068a1e042e2e5ea99f2e67d546cd68f3e39be065e62bae73ff13e92ceb29a15df9fe63e4e2
 DIST bcachefs-tools-1.4.1.tar.gz 1069244 BLAKE2B 
7be0a343758a221a39dad5eca1c11c74d049e208712d30ffdfd919c97ef87e561983b85b2fbefa932cb69ef50418dce761a9c01afe0114f67b8ddd55b5d62a2c
 SHA512 
65d0f182982d942d1263d60cf435a1142393b9dcf1e7dbea53a873925a82954b47422ade04bbc5b69c955de80ef820e9eeefcfed47aaab3bcc27d3916a94ff4a
 DIST bcachefs-tools-1.6.4.tar.gz 1083811 BLAKE2B 
656b1545ccf41dd35e3e6f656a9b5280fe0b5fa43a0ea86243c6693033d986b091fdd3d79ab2ff5c1c9402bce6f4ee33f49e070f6aebd5bba355df7a82d8fc21
 SHA512 
3e73ee15673eac771393859132146f1c23f4250f68bf8753b5214e88e854959c56efabdaeff4a8ad883287bd289abe08c5c37f6ef7220b984fa679a90c578e57
+DIST bcachefs-tools-1.7.0.tar.gz 1103425 BLAKE2B 
952310999035465a4e8621e8e3ef65e5a3ba50d40a0ca76a3ca8b7265bab2f33c40981d2ca83ef3ecc70a5da9cff0d002d2f9676aa6355d1717a0dad968828af
 SHA512 
5f7934997c0cd6b893c67a87e9cb5060cdd37857d6761356bdb1c96572b67ea3a2c03c43fcbd8beb01b0cf9c30da3297d082ef40bb312f5ca40c85faa46cdd3a
 DIST bindgen-0.69.4.crate 221092 BLAKE2B 
69ed55a5827bfe850f589e39bc6e2f4445e20363002c765c5475007b75e4d81cac3d9df358505c63bd6a48300ae4988507abf78dd734bb98b33525bf9212237b
 SHA512 
99530060708690f2ce0b87b97c9ce2998ee968df193137f3c9bf4fa66836814e2ae74c7e0b3057dcff1da7d2c4ea38157e21143c5117be35e94b878c0a427a34
 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.7.0.ebuild 
b/sys-fs/bcachefs-tools/bcachefs-tools-1.7.0.ebuild
new file mode 100644
index 000000000000..e71c60bba299
--- /dev/null
+++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.7.0.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2024 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]
+"
+
+LLVM_COMPAT=( {16..18} )
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cargo flag-o-matic llvm-r1 multiprocessing python-any-r1 
shell-completion 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
+       
SRC_URI="https://github.com/koverstreet/bcachefs-tools/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz
+               ${CARGO_CRATE_URIS}"
+       S="${WORKDIR}/${P}"
+       KEYWORDS="~amd64 ~arm64"
+fi
+
+LICENSE="Apache-2.0 BSD GPL-2 MIT"
+SLOT="0"
+IUSE="fuse test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       app-arch/lz4:=
+       app-arch/zstd:=
+       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}"
+#
+# Clang is required for bindgen
+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)
+       $(llvm_gen_dep '
+               sys-devel/clang:${LLVM_SLOT}
+       ')
+       virtual/pkgconfig
+       virtual/rust
+"
+
+QA_FLAGS_IGNORED="/sbin/bcachefs"
+
+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}]"
+}
+
+pkg_setup() {
+       llvm-r1_pkg_setup
+       python-any-r1_pkg_setup
+}
+
+src_unpack() {
+       if [[ ${PV} == "9999" ]]; then
+               git-r3_src_unpack
+               S="${S}/rust-src" cargo_live_src_unpack
+       else
+               unpack ${P}.tar.gz
+               cargo_src_unpack
+       fi
+}
+
+src_prepare() {
+       default
+       tc-export CC
+
+       # Version sed needed because the Makefile hasn't been bumped yet
+       # Check if it is no longer before bumping
+       sed \
+               -e '/^CFLAGS/s:-O2::' \
+               -e '/^CFLAGS/s:-g::' \
+               -i Makefile || die
+       append-lfs-flags
+}
+
+src_compile() {
+       use fuse && export BCACHEFS_FUSE=1
+       export BUILD_VERBOSE=1
+       export VERSION=${PV}
+
+       default
+
+       use test && emake tests
+
+       local shell
+       for shell in bash fish zsh; do
+               ./bcachefs completions ${shell} > ${shell}.completion || die
+       done
+}
+
+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
+
+       dosym bcachefs /sbin/fsck.bcachefs
+       dosym bcachefs /sbin/mkfs.bcachefs
+       dosym bcachefs /sbin/mount.bcachefs
+
+       if use fuse; then
+               dosym bcachefs /sbin/fsck.fuse.bcachefs
+               dosym bcachefs /sbin/mkfs.fuse.bcachefs
+               dosym bcachefs /sbin/mount.fuse.bcachefs
+       fi
+
+       newbashcomp bash.completion bcachefs
+       newfishcomp fish.completion bcachefs.fish
+       newzshcomp zsh.completion _bcachefs
+
+       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