diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-17 02:02:20 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-17 02:02:20 +0000 |
commit | 2f50f3ca1d346a1f74054f124adb11136068b2b1 (patch) | |
tree | 10b9920e8655629b9153b171f314ed189fce6578 /sys-fs/bcachefs-tools | |
parent | e07c6f9648d478943b5ecd6f1c42cc91cae0f547 (diff) |
gentoo auto-resync : 17:12:2024 - 02:02:19
Diffstat (limited to 'sys-fs/bcachefs-tools')
4 files changed, 266 insertions, 5 deletions
diff --git a/sys-fs/bcachefs-tools/Manifest b/sys-fs/bcachefs-tools/Manifest index 31d5fa4f4a94..988e4a360046 100644 --- a/sys-fs/bcachefs-tools/Manifest +++ b/sys-fs/bcachefs-tools/Manifest @@ -1,3 +1,4 @@ +AUX bcachefs-tools-1.13.0-rustc-default-libs.patch 1614 BLAKE2B 4202ccb981d57fcd2ae762ccb2748e2c56f3ab20ead8b8996402632cffcf7167fd8260b3350860d59ab3bca2eab1549dd18a959616102edd2a6e60770b9dbc64 SHA512 7b53c9e2e8239a80562bd718a53ef6784161e0b8b719164bfacc4ec9ed230a9aa40903e3579bedd66f4b46a05834e74e1108cb28f8c0c3aaaa03b0751f1ba5ad DIST aho-corasick-1.1.2.crate 183136 BLAKE2B 2d4306d8968061b9f7e50190be6a92b3f668169ba1b9f9691de08a57c96185f7a4288d20c64cb8488a260eb18d3ed4b0e8358b0cca47aa44759b2e448049cbaa SHA512 61ef5092673ab5a60bec4e92df28a91fe6171ba59d5829ffe41fc55aff3bfb755533a4ad53dc7bf827a0b789fcce593b17e69d1fcfb3694f06ed3b1bd535d40c DIST aho-corasick-1.1.3.crate 183311 BLAKE2B 8dfcbba0b9d94e55eae739b16f5c6474baa43ee7854c5ca792f426a9f46fb0eece79cd493b804e51449181bcad338b96819fe977c02c9907654d713e26b9f830 SHA512 ba422a54688c4678fcf16e34fdf3ed06c333e6e3fc8b75af9272a215add494d43ebaef319021134b61327fd5d3572aec0dc655b714ffb3bc71ba3c265c9ebb69 DIST anstream-0.6.11.crate 30239 BLAKE2B 4ac585ec56a804239d32ad3e64d93936ef9d5c8e0f0e2df17f7b081b6a3b2c4c32ff4ebc09ec02507bbed22b025628029d859610aed90c024e19a3216de73c8b SHA512 f8dd65cc116a1495782a3bfc98edfdd0973ab22ea2fafd292fb4bd3495af7b5ea410f320d3fa05f7f812fa96c2a20f4cd2af9fc58869a1a306f32714cbe45163 @@ -159,7 +160,8 @@ DIST zeroize-1.8.1.crate 20029 BLAKE2B 092eba034cd35ec47290020e0c2b213177ff5dbe1 DIST zeroize_derive-1.4.2.crate 11141 BLAKE2B a40add656369a3a40d5b5f3397a77a1e9f803d4b8ae5b7d51c9f2ebb332a289b3c1ea528655806a26998e081a1cc9f4b07828664542de8d8d2619faf079d25c5 SHA512 d6966b024ce5e265c93e7056659ccbb97bbf6baa30f759fd96dc4391a6487426637f61f0a2713b6160019d778cf7d8ff1f25bb33d6c4f4585b990baae418b226 EBUILD bcachefs-tools-1.11.0-r1.ebuild 4377 BLAKE2B 0e624cbf095d678a0e98b2b58cfdd253d1139b604793b3a273044007995399dc9480b71674a33d5f48e94a7e0438aee01b09ec1f6b177454baa01fa79e6cb03b SHA512 d1925cc90e5cb859703fbb21425427e0c27ff927e3b4aef239f3832b67a4d634cc7931f0995f45fb7015f3f519e1f64e34530deda4823d533bc47740b5f4f27e EBUILD bcachefs-tools-1.13.0-r1.ebuild 4596 BLAKE2B 790e40da2bb1ab28836edb19eabedca6597706af1f30045a09206bfc560e7cfc75db7bc28e33501610146a3e574deb71d6635d8025fc45213c43d71e6ba0b497 SHA512 1047f27c76969c136a3db0b5086d0e6e1e0ac840e62349d2cad18fb9446169127479bc061b0c89d9ddc9b1796ff6d4bb29a0dfb1661eee4b9e6c21cdee7241bc +EBUILD bcachefs-tools-1.13.0-r2.ebuild 4544 BLAKE2B 1c5a11dd45a7369da817db478a6aeb3a9a1b4f796a906e6f1a6c2cf5f25e4a8314b0c9d439231195002c0e583185ad4c0bdf9623c87595e91c7d18ff9674a502 SHA512 afa1e1f75c917c8fe081b1db6f94e2524a2270dbd26347c0d76f9df4849cd32784f0cf738971abab0492b2650fb7b0d64436bbe29e7583aeb2b6a9fea9448e11 EBUILD bcachefs-tools-1.7.0-r1.ebuild 5262 BLAKE2B 610afe4e5d8f41935a5b8a67f7f0682bdab75a02f6bd4f204376ff5a7e0aa7cbe8d54092d36d6477b55a248bf19b80203a7fa40705ed92c6b7fd5dd30e7614a1 SHA512 8764ac6e087e9b81fef2c1d42c7edf2efab925f99952f62c286d0b8c63a77d542dc4c41d5f73cb4c4801ab5d87009c9db6a0d4c6dec93d39e406563b58c2bd44 EBUILD bcachefs-tools-1.9.4-r1.ebuild 5378 BLAKE2B 5ffcb42b37a50880592aef6577fa49b5fe18c460891864a7328b8b7bddc48f2ae03bcc66c11a0cf887d69e3dc61e6870c9cecca6286b7081eff7ef6956ec03ed SHA512 b0f44f0daebcec27892ae37a620bbe640c6f0cfadae41db47bfb5a0422394e94a3ad48676b40a26a9efd62ad7ed56d78cbd9dff1dc4fe4a0d615fb08bd990a5c -EBUILD bcachefs-tools-9999.ebuild 4429 BLAKE2B 6ad1196b3b18ffa7a8bc5586c7c76e0cbe2a47fc1b828996343e6d9cefd58548414a3afb81aa64032b36fad4cf92e49a2a0416bb5aac20d55f46fe269c76f8b4 SHA512 55409cc8f8002d3c73f73dbfd6eb60318308a8e068155c21e3a6275866da22ec95f4f692f9b36e8028ded3dc90ff99023e165acde603de842dda16ac416ccff4 +EBUILD bcachefs-tools-9999.ebuild 4319 BLAKE2B 558cd5e4b40789bd921b9ed1b49be51f8c46767b9292fb8224e17fb775c23220de7a3e329d8b6bfd23fe552f954423bb10f9dbcb9bc15b6b93a96b98af12fcff SHA512 5a1602b22373f049ecb5e027c1731a5aa26b610fe85308cb85c927730f1bfe857de2104b71fc7496b76f488d84057044272b5c3c073129156f6cacd30520ec47 MISC metadata.xml 679 BLAKE2B 54420caf5bda8ff5df2fcb25891b6a1e97df49051dfd8eb93538a886bce92ab4ed874bb5e09d8975cbddc26f5bbba08e751e82249cfd8e324e7fe685d2991c26 SHA512 de1478152acc6a27ca83dcdd7a77fde5e3720a5d8da19b2df5156ed4dc62f832fb8c0f89faefce8aefd60148a499c08a454b5eec94ef1b19d9b3871c225315d9 diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-1.13.0-r2.ebuild b/sys-fs/bcachefs-tools/bcachefs-tools-1.13.0-r2.ebuild new file mode 100644 index 000000000000..5545edff08b1 --- /dev/null +++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.13.0-r2.ebuild @@ -0,0 +1,225 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + aho-corasick@1.1.3 + anstream@0.6.15 + anstyle-parse@0.2.5 + anstyle-query@1.1.1 + anstyle-wincon@3.0.4 + anstyle@1.0.8 + anyhow@1.0.89 + bindgen@0.69.5 + bitfield@0.14.0 + bitflags@1.3.2 + bitflags@2.6.0 + cc@1.1.28 + cexpr@0.6.0 + cfg-if@1.0.0 + clang-sys@1.8.1 + clap@4.5.20 + clap_builder@4.5.20 + clap_complete@4.5.33 + clap_derive@4.5.18 + clap_lex@0.7.2 + colorchoice@1.0.2 + either@1.13.0 + env_logger@0.10.2 + errno-dragonfly@0.1.2 + errno@0.2.8 + errno@0.3.9 + glob@0.3.1 + heck@0.5.0 + home@0.5.9 + is_terminal_polyfill@1.70.1 + itertools@0.12.1 + lazy_static@1.5.0 + lazycell@1.3.0 + libc@0.2.159 + libloading@0.8.5 + libudev-sys@0.1.4 + linux-raw-sys@0.4.14 + log@0.4.22 + memchr@2.7.4 + minimal-lexical@0.2.1 + nom@7.1.3 + once_cell@1.20.2 + owo-colors@4.1.0 + paste@1.0.15 + pkg-config@0.3.31 + prettyplease@0.2.22 + proc-macro2@1.0.87 + quote@1.0.37 + regex-automata@0.4.8 + regex-syntax@0.8.5 + regex@1.11.0 + rustc-hash@1.1.0 + rustix@0.38.37 + rustversion@1.0.17 + shlex@1.3.0 + strsim@0.11.1 + strum@0.26.3 + strum_macros@0.26.4 + syn@2.0.79 + terminal_size@0.4.0 + udev@0.7.0 + unicode-ident@1.0.13 + utf8parse@0.2.2 + uuid@1.10.0 + which@4.4.2 + winapi-i686-pc-windows-gnu@0.4.0 + winapi-x86_64-pc-windows-gnu@0.4.0 + winapi@0.3.9 + windows-sys@0.52.0 + windows-sys@0.59.0 + windows-targets@0.52.6 + windows_aarch64_gnullvm@0.52.6 + windows_aarch64_msvc@0.52.6 + windows_i686_gnu@0.52.6 + windows_i686_gnullvm@0.52.6 + windows_i686_msvc@0.52.6 + windows_x86_64_gnu@0.52.6 + windows_x86_64_gnullvm@0.52.6 + windows_x86_64_msvc@0.52.6 + zeroize@1.8.1 + zeroize_derive@1.4.2 +" + +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" + +PATCHES=( + "${FILESDIR}/${P}-rustc-default-libs.patch" +) + +python_check_deps() { + 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 + 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 +} diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-9999.ebuild b/sys-fs/bcachefs-tools/bcachefs-tools-9999.ebuild index d31d231164a9..101ecf0c2584 100644 --- a/sys-fs/bcachefs-tools/bcachefs-tools-9999.ebuild +++ b/sys-fs/bcachefs-tools/bcachefs-tools-9999.ebuild @@ -87,7 +87,7 @@ CRATES=" zeroize_derive@1.4.2 " -LLVM_COMPAT=( {16..18} ) +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 @@ -124,7 +124,7 @@ DEPEND=" " RDEPEND="${DEPEND}" -# + # Clang is required for bindgen BDEPEND=" ${PYTHON_DEPS} @@ -165,8 +165,6 @@ 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::' \ diff --git a/sys-fs/bcachefs-tools/files/bcachefs-tools-1.13.0-rustc-default-libs.patch b/sys-fs/bcachefs-tools/files/bcachefs-tools-1.13.0-rustc-default-libs.patch new file mode 100644 index 000000000000..dad793cbe5e3 --- /dev/null +++ b/sys-fs/bcachefs-tools/files/bcachefs-tools-1.13.0-rustc-default-libs.patch @@ -0,0 +1,36 @@ +https://github.com/koverstreet/bcachefs-tools/commit/10dc29d5b9a44e7bb8aff657e73c0c68dccc32b9 +From: Alyssa Ross <hi@alyssa.is> +Date: Sat, 12 Oct 2024 18:13:19 +0200 +Subject: [PATCH] Pass -C default-linker-libraries to rustc + +By default, rustc passes -nodefaultlibs to the linker. In some cases, +this can cause compiler builtins (e.g. __cpu_model, used by +__builtin_cpu_supports) not to be linked in: + += note: /nix/store/s2cjhni3s6shh0n35ay1hpj8d85k44qk-x86_64-unknown-linux-musl-binutils-2.43.1/bin/x86_64-unknown-linux-musl-ld: ./libbcachefs.a(tools-util.o): in function `resolve_crc32c': + /build/source/c_src/tools-util.c:457:(.text+0x1023): undefined reference to `__cpu_model' + collect2: error: ld returned 1 exit status + +I saw this with static musl GCC builds, and others have reported it with +Clang. + +Link: https://github.com/koverstreet/bcachefs-tools/issues/300 +Signed-off-by: Alyssa Ross <hi@alyssa.is> +Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> +--- a/Makefile ++++ b/Makefile +@@ -73,12 +73,13 @@ CFLAGS+=$(call cc-disable-warning, zero-length-array) + CFLAGS+=$(call cc-disable-warning, shift-overflow) + CFLAGS+=$(call cc-disable-warning, enum-conversion) + CFLAGS+=$(call cc-disable-warning, gnu-variable-sized-type-not-at-end) ++export RUSTFLAGS=-C default-linker-libraries + + PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd libudev libkeyutils" + ifdef BCACHEFS_FUSE + PKGCONFIG_LIBS+="fuse3 >= 3.7" + CFLAGS+=-DBCACHEFS_FUSE +- export RUSTFLAGS=--cfg fuse ++ RUSTFLAGS+=--cfg fuse + endif + + PKGCONFIG_CFLAGS:=$(shell $(PKG_CONFIG) --cflags $(PKGCONFIG_LIBS)) |