commit: 51e6f456ff8eeee1c157158319415daa4bf02147 Author: Christopher Fore <csfore <AT> posteo <DOT> net> AuthorDate: Fri Feb 7 21:53:19 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Feb 8 00:54:53 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51e6f456
sys-fs/bcachefs-tools: add 1.20.0 - Fix verify-sig previously not working Closes: https://bugs.gentoo.org/947167 Signed-off-by: Christopher Fore <csfore <AT> posteo.net> Closes: https://github.com/gentoo/gentoo/pull/40439 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-fs/bcachefs-tools/Manifest | 2 + sys-fs/bcachefs-tools/bcachefs-tools-1.20.0.ebuild | 230 +++++++++++++++++++++ 2 files changed, 232 insertions(+) diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest index 9d14fffa4d7c..b62b933c0e9f 100644 --- a/sys-fs/bcachefs-tools/Manifest +++ b/sys-fs/bcachefs-tools/Manifest @@ -16,6 +16,8 @@ DIST autocfg-1.1.0.crate 13272 BLAKE2B 7724055c337d562103f191f4e36cab469e578f0c5 DIST bcachefs-tools-1.11.0.tar.gz 1131076 BLAKE2B 27b506c004528f3bedb2fddd19bc1d94acacd34152d13870df3be582baaa8843ac505b48b901c829c35789c5c4a09313ddee4a858d3e32d2130e1205f2042760 SHA512 87ca789f1557a026b53469571e5a84d1f6a64e3e3378cc344485d95fae8883eb512a8e3f478d89c6265dd203419412fdce9c396ea805f898b67b9cebec0e4f19 DIST bcachefs-tools-1.13.0.tar.sign 833 BLAKE2B 5163a07570a0c1e12617d07def63c721540e586eb6312a51642683d7008d08c3029c562dc6dddb6dd7bc0443369331544b272c2253d26b2e3789c328bbdad7ac SHA512 950498dfc3ea062803140378a715820e54c0b46c66d77a160040b432c8c5b55141b611b2687bf33bffbd5dc04e18f1f35b40229c664c7841475323f8d2b32267 DIST bcachefs-tools-1.13.0.tar.zst 1136771 BLAKE2B 1ab2d1805d8e18a709f2684785dcbd0cffd27f292eb4f785d4f8187403363db001969200bcf18994827cd11ecb679d6939f02fc6ead069daeef43c7974540433 SHA512 0e79642712db07f92d65c92621ed964695756e3cdaf6214f4787afd0047bde26ad9707c86e14131ad694f6c455f33cd845d720b3b62c57fc9916bdce57decefb +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.7.0.tar.gz 1103425 BLAKE2B 952310999035465a4e8621e8e3ef65e5a3ba50d40a0ca76a3ca8b7265bab2f33c40981d2ca83ef3ecc70a5da9cff0d002d2f9676aa6355d1717a0dad968828af SHA512 5f7934997c0cd6b893c67a87e9cb5060cdd37857d6761356bdb1c96572b67ea3a2c03c43fcbd8beb01b0cf9c30da3297d082ef40bb312f5ca40c85faa46cdd3a DIST bcachefs-tools-1.9.4.tar.gz 1132203 BLAKE2B 447881b52dcaa3990a4c233523bf8c2b3faf4755f3a0fad315ca17fa900e2192b9a2168f22a3ac8c59ad2756999f8a6792b732a527510361044b541fec6ce26b SHA512 8a6a2896620c4e1aa3abd26a2e59087d417b5d546ee6dc1130a59e06c8e8561e8de29edeb1d5dd3c5223be8338a8b4265ad3e753c830f475413ed83a0d968dd8 DIST bindgen-0.69.4.crate 221092 BLAKE2B 69ed55a5827bfe850f589e39bc6e2f4445e20363002c765c5475007b75e4d81cac3d9df358505c63bd6a48300ae4988507abf78dd734bb98b33525bf9212237b SHA512 99530060708690f2ce0b87b97c9ce2998ee968df193137f3c9bf4fa66836814e2ae74c7e0b3057dcff1da7d2c4ea38157e21143c5117be35e94b878c0a427a34 diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-1.20.0.ebuild b/sys-fs/bcachefs-tools/bcachefs-tools-1.20.0.ebuild new file mode 100644 index 000000000000..c84d856e0e12 --- /dev/null +++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.20.0.ebuild @@ -0,0 +1,230 @@ +# 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 +}
