commit:     572e45f62436a714a34e26176fe20bb4379bf0bd
Author:     Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Sun Mar 23 18:37:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Mar 25 11:23:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=572e45f6

sys-fs/bcachefs-tools: add 1.25.0

- builds on amd64 and arm64

Signed-off-by: Christopher Fore <csfore <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/41245
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 sys-fs/bcachefs-tools/Manifest                     |   2 +
 sys-fs/bcachefs-tools/bcachefs-tools-1.25.0.ebuild | 231 +++++++++++++++++++++
 2 files changed, 233 insertions(+)

diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest
index 1ec8414241d2..e7aa80a68042 100644
--- a/sys-fs/bcachefs-tools/Manifest
+++ b/sys-fs/bcachefs-tools/Manifest
@@ -8,6 +8,8 @@ DIST anyhow-1.0.89.crate 47078 BLAKE2B 
fc824e72891bff0cc7aa3b538adfb9af7dc843ab6
 DIST bcachefs-tools-1.20.0-fix-fuse-build.patch 1233 BLAKE2B 
8700c561fa1e88f2868bdc3386aac120365af52b8a00f7369c94c5c5dc6bc50a9e92ff72f63c903223df7387c16b71b902b8ca15425800929aa72bec485a2ea3
 SHA512 
5378437d3acf8fdbdfb5a3adf508dd3755180c77e964ae22a104171105332cd560dae7bf4893008a5d1b3c65c4add36ca70a5850cc9c7b7af1c866f6de1b24b6
 DIST bcachefs-tools-1.20.0.tar.sign 833 BLAKE2B 
2f05ff0329bd7e1294f5612baada16153bc20777075970afe1d6fe4df6946043a65561a195db77caa831e53d8aac12f17ffb2f7cb385c1bf5111acc3c67e4a84
 SHA512 
ecd5ee8a502b7eeea755a9b3a7be2dec8e5941a2d9b5eb9efb4e9ab8933924f755662fdf045befd17f8b19d14d0404f64bb18999593c82f991b49d212ae6359b
 DIST bcachefs-tools-1.20.0.tar.zst 1171239 BLAKE2B 
d73fae9dc3b83d0ed5a9a723fba347a3628a7a0a4f7104c50aa93020f28a5eb9fd0b04c34b31a84d13405d7d1a681452deef87e4f04651b070b3e3cf459b615c
 SHA512 
6df9966861bbbcbccc4473847eb38f4fcb2eea5d4c0b3ea745698819b5157d9ae6e0bf7203424d914a672a0554e6310bb3022c23f92c680681e62596ee752d23
+DIST bcachefs-tools-1.25.0.tar.sign 833 BLAKE2B 
8a9f7a8c77de58a5907f5ea069fdfbe2a8e289311608683abcfe14f8708ce2a174ccd3e526f4ace059c8ae71e0d8a1e9dd5a3cd0e0d41ae85dc2360b6acf8b00
 SHA512 
4339e75f0b7a43bd938dad75f83ba834cf8ed86640478c91987360c7ec380197c9e6f612276b02053c38c698e539eea02ba399d43008c2949a28e3438e71d84e
+DIST bcachefs-tools-1.25.0.tar.zst 1178797 BLAKE2B 
b2c6f2d26db07b88ab59f2801b1245bf51f20b82d562264a45f3628ca4913b843f420b9eb5accb0efb7dc13585c69beb5a04bcef263a708d95787d1bee5d5bbf
 SHA512 
465fdcf4dd4477225df652076ae9649ae90c9417d65be4649706100ffb702b4251d5722cdd494f15082b66325a7ac690a2c987cef5b2a827e357bb94e474853b
 DIST bindgen-0.69.5.crate 221128 BLAKE2B 
b89edbf883e1bc11a074c2f37f84bb966749823a6408b9765d6a61ee1179451d67dadde41d27838e8ddc6172dee9c342429f42fbe6959ff9fd7dcbc73d7506ea
 SHA512 
b232b906af7535f8b87198f0a4037a0f09af367e0c913575f3d16453a2c272e7d76033cb3fd12d4223ebda4a0f8130629e67c5883e026a2422db3e0659ed3c3f
 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.25.0.ebuild 
b/sys-fs/bcachefs-tools/bcachefs-tools-1.25.0.ebuild
new file mode 100644
index 000000000000..98a2f8b739dd
--- /dev/null
+++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.25.0.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2025 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]
+"
+
+LLVM_COMPAT=( {17..19} )
+PYTHON_COMPAT=( python3_{10..13} )
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kentoverstreet.asc
+
+inherit cargo flag-o-matic llvm-r1 python-any-r1 shell-completion 
toolchain-funcs unpacker verify-sig
+
+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://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.zst
+               ${CARGO_CRATE_URIS}
+       "
+       SRC_URI+=" verify-sig? ( 
https://evilpiepirate.org/bcachefs-tools/bcachefs-tools-${PV}.tar.sign )"
+       S="${WORKDIR}/${P}"
+       KEYWORDS="~amd64 ~arm64"
+fi
+
+LICENSE="Apache-2.0 BSD GPL-2 MIT"
+SLOT="0"
+IUSE="fuse verify-sig"
+RESTRICT="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}]
+       ')
+       $(unpacker_src_uri_depends)
+       $(llvm_gen_dep '
+               llvm-core/clang:${LLVM_SLOT}
+       ')
+       elibc_musl? ( >=sys-libs/musl-1.2.5 )
+       virtual/pkgconfig
+       verify-sig? ( >=sec-keys/openpgp-keys-kentoverstreet-20241012 )
+"
+
+QA_FLAGS_IGNORED="/sbin/bcachefs"
+
+python_check_deps() {
+       python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       llvm-r1_pkg_setup
+       python-any-r1_pkg_setup
+}
+
+src_unpack() {
+       # Upstream signs the uncompressed tarball
+       if use verify-sig; then
+               einfo "Unpacking ${P}.tar.zst ..."
+               verify-sig_verify_detached - "${DISTDIR}"/${P}.tar.sign \
+                       < <(zstd -fdc "${DISTDIR}"/${P}.tar.zst | tee >(tar -xf 
-))
+               assert "Unpack failed"
+       fi
+
+       if [[ ${PV} == "9999" ]]; then
+               git-r3_src_unpack
+               S="${S}/rust-src" cargo_live_src_unpack
+       else
+               unpacker ${P}.tar.zst
+               cargo_src_unpack
+       fi
+
+}
+
+src_prepare() {
+       default
+       tc-export CC
+
+       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
+
+       # This version mangles the symbolic link,
+       # please check if this can be removed before bumping
+       rm "${S}"/bcachefs
+       ln -s "${S}"/target/release/bcachefs bcachefs
+
+       local shell
+       for shell in bash fish zsh; do
+               ./bcachefs completions ${shell} > ${shell}.completion || die
+       done
+}
+
+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