repo/gentoo:master commit in: sys-fs/bcachefs-tools/
"Florian Schmaus" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786992740.5d8fa3a5aac0e393ee2bd31eed52e6c56175c25c.flow@gentoo> |
commit: 5d8fa3a5aac0e393ee2bd31eed52e6c56175c25c Author: Florian Schmaus <flow <AT> gentoo <DOT> org> AuthorDate: Mon Aug 17 18:38:34 2026 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Mon Aug 17 18:52:20 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d8fa3a5 sys-fs/bcachefs-tools: add 1.39.2 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> sys-fs/bcachefs-tools/Manifest | 2 + sys-fs/bcachefs-tools/bcachefs-tools-1.39.2.ebuild | 382 +++++++++++++++++++++ 2 files changed, 384 insertions(+) diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest index ae1422738fc8..d513c0a230a4 100644 --- a/sys-fs/bcachefs-tools/Manifest +++ b/sys-fs/bcachefs-tools/Manifest @@ -33,6 +33,8 @@ DIST bcachefs-tools-1.39.0.tar.sign 833 BLAKE2B 782e2eff6ac716764885da0be7a5c230 DIST bcachefs-tools-1.39.0.tar.zst 3064489 BLAKE2B b99eea18c4b9e95b9198f37a3d25b79ce74f34ac039def598dbc0b4dd95a48562cd66fb35da93512c1a5d9477724f8fd75aa1450a60f3eba310079c013fed0f3 SHA512 8dbcaa1bdcfe0346be18f008b7891061766dec7c7f9b738bdcd9687e3f992148288ad58896cdda67fcfdc30adf9e630c0a9e29d42044b81a14c050c942f38f5c DIST bcachefs-tools-1.39.1.tar.sign 833 BLAKE2B f55c85dbdcf8a4ae2b5b0ad7a3e7b7bac2d8073ce65c8b5a8e62d95f54fd880c036ae7745272d24bb8019e3bed484455524865223200f5f245da4f3fb914c7e5 SHA512 a472b946ad5961ae0484b5957f5b1480b0e50148c4ac84f5bf0e962c534c817f9e136c4b1df5ee45c7c71e11c08a2fbafc7bb0ad3d2ffddd3c4fea0f2c09b4ab DIST bcachefs-tools-1.39.1.tar.zst 3083008 BLAKE2B d75a9bab36b243a8c54af0a3771fe813b657ad71124bf73b800cd22544e8395b34f0967226e03d2fee97b62818f05c840089291d0d9745b12fc00efea903f1e4 SHA512 62a4ce9e52a61a0b929c09b2d68c67533dfa5d3ac1aa775e8d45e96a5740e76025a1b0fa59d93def1b1a92fb50358ac560488ecb141d495ff34a70afaa237f71 +DIST bcachefs-tools-1.39.2.tar.sign 833 BLAKE2B 9446b8cd550650b9048c09373655360ede2439965e0a1b4e133eec0edd4f578845c9a462c4349f4f57c4bf31509c0ce38b6515032bda72dbc2f8ea53a74316fb SHA512 d4379b149eb7195e65b940aaed3cd2e1d55779aab6b856b8f0744b4756ccbfcae6564021a11af86e6117e8ee6680d662fd9e9ba34236d7cb07bb7d6bd245744b +DIST bcachefs-tools-1.39.2.tar.zst 3111095 BLAKE2B b396bf0c12a619d004ffe5db528961f907c46d18e9f17bf85a0bc0b848d1a52a24564a5162c0b73f6cd4c37b61e0468ee13c6d69f6736aea636c3a57350c07e6 SHA512 3aceda60f96df2118def21d351f5e79f0a4d0eb80e1c943bae6f5cfdba3dd4609f035f7c0469f2acb9abd9a03c6e98a5a5abc6010fc0447dd513babff5294f83 DIST bindgen-0.69.5.crate 221128 BLAKE2B b89edbf883e1bc11a074c2f37f84bb966749823a6408b9765d6a61ee1179451d67dadde41d27838e8ddc6172dee9c342429f42fbe6959ff9fd7dcbc73d7506ea SHA512 b232b906af7535f8b87198f0a4037a0f09af367e0c913575f3d16453a2c272e7d76033cb3fd12d4223ebda4a0f8130629e67c5883e026a2422db3e0659ed3c3f DIST bindgen-0.72.1.crate 246071 BLAKE2B b6db53ca86fa3b5f71abbf6d2fd5f83553e167507db2e869ed7f3acf8865478e49430eddce8c255a8fabf8f6e408e7dcc78a9088201cdeea1e48bc387f8a6f28 SHA512 14f4277b62cfc91661400ed1bacb82a9f28b7e6caa17dd4bb4dbeedd5784299d5915c2235af9da42a8a216fa0b14b49f1e38eaa530f1e906bcd74f864ae8a7e2 DIST bitfield-0.14.0.crate 16776 BLAKE2B abca546581d912133e7344f049d93b8d793de323eba7780fab162c53a244b845582ec2bd14b529b9491c363c2da6228b7de58407afc554cc718a9df8370f5535 SHA512 703d534f0684b19af68a18048ecff37367ccbe5a52a3e8d987f2420b980e4a20da9640019ca610b1a73841cbe45dbf4d6a1cfb10cf0e7d09f53199b1fcd141fe diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-1.39.2.ebuild b/sys-fs/bcachefs-tools/bcachefs-tools-1.39.2.ebuild new file mode 100644 index 000000000000..e7f5525662d2 --- /dev/null +++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.39.2.ebuild @@ -0,0 +1,382 @@ +# Copyright 1999-2026 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] + [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]+spec-1.1.0 + [email protected]+spec-1.1.0 + [email protected]+spec-1.1.0 + [email protected]+spec-1.1.0 + [email protected]+spec-1.1.0 + [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] + [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..21} ) +MODULES_INITRAMFS_IUSE=+initramfs +MODULES_KERNEL_MIN=6.16 +MODULES_OPTIONAL_IUSE=+modules +PYTHON_COMPAT=( python3_{11..14} ) +RUST_MIN_VER="1.85.0" +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kentoverstreet.asc + +inherit cargo flag-o-matic linux-mod-r1 llvm-r2 python-any-r1 +inherit shell-completion sysroot 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="GPL-2" +# Dependent crate licenses +LICENSE+=" Apache-2.0 BSD ISC MIT Unicode-DFS-2016" +SLOT="0" +IUSE="debug llvm-libunwind 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 + llvm-libunwind? ( llvm-runtimes/libunwind:= ) + !llvm-libunwind? ( sys-libs/libunwind:= ) + virtual/udev + virtual/zlib:= +" + +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 + modules? ( >=sys-kernel/linux-headers-6.16.0 ) + 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-r2_pkg_setup + python-any-r1_pkg_setup + rust_pkg_setup + if use modules; then + # grep -r 'depends on\|select ' ${S}/libbcachefs/Kconfig | grep -v '^#' + local CONFIG_CHECK=" + !BCACHEFS_FS + BLOCK + EXPORTFS + CRC32 + CRC64 + FS_POSIX_ACL + LZ4_COMPRESS + LZ4_DECOMPRESS + LZ4HC_COMPRESS + ZLIB_DEFLATE + ZLIB_INFLATE + ZSTD_COMPRESS + ZSTD_DECOMPRESS + CRYPTO_LIB_SHA256 + CRYPTO_LIB_CHACHA + CRYPTO_LIB_POLY1305 + KEYS + RAID6_PQ + RUST + XOR_BLOCKS + XXHASH + SYMBOLIC_ERRNAME + " + use debug && CONFIG_CHECK+=" + DEBUG_INFO + FRAME_POINTER + !DEBUG_INFO_REDUCED + " + linux-mod-r1_pkg_setup + fi +} + +src_unpack() { + if [[ ${PV} == "9999" ]]; then + git-r3_src_unpack + S="${S}/src" cargo_live_src_unpack + else + # 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 + unpacker ${P}.tar.zst + cargo_src_unpack + fi + +} + +src_prepare() { + default + tc-export CC + + echo "${PV}" > .version || die + sed \ + -e '/^CFLAGS/s:-O2::' \ + -e '/^CFLAGS/s:-g::' \ + -i Makefile || die + + if use llvm-libunwind; then + sed -i s/libunwind// Makefile || die + fi + + append-lfs-flags +} + +src_configure() { + cargo_src_configure + + MODULE_SRC="module/${PN%-*}-${PV}" + use modules && emake DESTDIR="${WORKDIR}" DKMSDIR="/${MODULE_SRC}" install_dkms +} + +src_compile() { + export BUILD_VERBOSE=1 + export VERSION=${PV} + + local modlist=( "bcachefs=:../${MODULE_SRC}:../${MODULE_SRC}/src/fs/bcachefs" ) + local modargs=( + KDIR=${KV_OUT_DIR} + ) + + # Makefile calls `cargo` directly, so make sure we set our rustflags (etc) + cargo_env emake bcachefs || die + use modules && linux-mod-r1_src_compile + + # Recent versions mangle the 'bcachefs' symbolic link, work around it. + [[ -e bcachefs ]] && die "bcachefs symlink is valid, please remove workaround" + ln -rsf target/release/bcachefs bcachefs || die + + local shell + for shell in bash fish zsh; do + sysroot_try_run_prefixed ./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 + + # Uses a crate-based implementation of FUSE, no dependency on sys-fs/fuse and unconditionally included. + dosym bcachefs /sbin/fsck.fuse.bcachefs + dosym bcachefs /sbin/mkfs.fuse.bcachefs + dosym bcachefs /sbin/mount.fuse.bcachefs + + newbashcomp bash.completion bcachefs + newfishcomp fish.completion bcachefs.fish + newzshcomp zsh.completion _bcachefs + + doman bcachefs.8 + + use modules && linux-mod-r1_src_install +}