public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/
Date: Tue,  7 Mar 2023 15:43:56 +0000 (UTC)	[thread overview]
Message-ID: <1678203826.de2ae2e9c4a1525ddf806a24e081e075655e5be7.sam@gentoo> (raw)

commit:     de2ae2e9c4a1525ddf806a24e081e075655e5be7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  7 15:43:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 15:43:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de2ae2e9

sys-fs/btrfs-progs: add 6.2.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/btrfs-progs/Manifest                        |   1 +
 sys-fs/btrfs-progs/btrfs-progs-6.2.1.ebuild        | 165 +++++++++++++++++++++
 .../files/btrfs-progs-6.2.1-blake2-simd.patch      |  44 ++++++
 3 files changed, 210 insertions(+)

diff --git a/sys-fs/btrfs-progs/Manifest b/sys-fs/btrfs-progs/Manifest
index 7fcf3715e6cb..14940f3e52ec 100644
--- a/sys-fs/btrfs-progs/Manifest
+++ b/sys-fs/btrfs-progs/Manifest
@@ -3,3 +3,4 @@ DIST btrfs-progs-v6.0.2.tar.xz 2321220 BLAKE2B 391bd9dcc7ae2d40c339eb9b7fb466624
 DIST btrfs-progs-v6.1.1.tar.xz 2329864 BLAKE2B f3f15829af88f83cdabca30b61dd0e53fc0913615028eac9501204adec5a5beb8654b037617a73bac96c901835a83e8c08d478b8b496518512fea3714e604cfc SHA512 996045bebc441eba269eb5159d6d13c7b1471ba88039389ef221f57d03c535647a5716e23e7a17a20efb4012003f58b4b768f66af633abbdc1fe481192ca1ace
 DIST btrfs-progs-v6.1.2.tar.xz 2329940 BLAKE2B d2c86b0077e0269353ac70d948b948dd2984beec0e4225529adb0099a9cfe5d778a893bedc822168141ce29679f66500e32bdf3af8973bef5696657685ebf712 SHA512 0b02502f9f0902b7db04817fcfbaa4f6155035d47dd908c4c1faa86e4677e302d069756bb0935db7c88f0859c0f9ef87975b2777be7ad7f4d2389d2e95c1ff82
 DIST btrfs-progs-v6.1.3.tar.xz 2333984 BLAKE2B 71543f5be282a289fbc92f78b89b25e4162c3cbd2d3cf2e8564791f86c6f933f61c03ba93aeca029689be6284988ff35a47f25a6523f15be47f3e7ce9b5c0c4b SHA512 7c40d8bc3fcef0b2a7bf4be7d52923015b5b11c3f14bfc550ffa95a47d673f640b7deb840fee22fb7cc2743b6098fb12b5caea586fbf0972a1bc9a7606f3f375
+DIST btrfs-progs-v6.2.1.tar.xz 2415064 BLAKE2B 8ea7d9815e34c569dd82e53dc1f982c820265521708c7c41dc587646362b300edf938e940b52508e301874269ea5ebb96605f4a1046d096678257463ced53b03 SHA512 2a485d8c8b3091af27e91751cabe61306388526de3c1c51543708888ddee1bb26ebfe70c3b4cd6686b173d313c98c30168fee18723dadc7b4c00e10c502da169

diff --git a/sys-fs/btrfs-progs/btrfs-progs-6.2.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-6.2.1.ebuild
new file mode 100644
index 000000000000..f89547b3aa45
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-6.2.1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 2008-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit bash-completion-r1 python-single-r1 udev
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+	MY_PV="v${PV/_/-}"
+	SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+
+	if [[ ${PV} != *_rc* ]] ; then
+		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+	fi
+
+	S="${WORKDIR}"/${PN}-${MY_PV}
+else
+	EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git"
+	EGIT_BRANCH="devel"
+	WANT_LIBTOOL="none"
+	inherit autotools git-r3
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org https://btrfs.readthedocs.io/en/latest/"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert python +man reiserfs static static-libs udev +zstd"
+# Could support it with just !systemd => eudev, see mdadm, but let's
+# see if someone asks for it first.
+REQUIRED_USE="static? ( !udev )"
+
+# Tries to mount repaired filesystems
+RESTRICT="test"
+
+RDEPEND="
+	dev-libs/lzo:2=
+	sys-apps/util-linux:=[static-libs(+)?]
+	sys-libs/zlib:=
+	convert? (
+		sys-fs/e2fsprogs:=
+		reiserfs? (
+			>=sys-fs/reiserfsprogs-3.6.27
+		)
+	)
+	python? ( ${PYTHON_DEPS} )
+	udev? ( virtual/libudev:= )
+	zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}
+	>=sys-kernel/linux-headers-5.10
+	convert? ( sys-apps/acl )
+	python? (
+		$(python_gen_cond_dep '
+			dev-python/setuptools[${PYTHON_USEDEP}]
+		')
+	)
+	static? (
+		dev-libs/lzo:2[static-libs(+)]
+		sys-apps/util-linux:0[static-libs(+)]
+		sys-libs/zlib:0[static-libs(+)]
+		convert? (
+			sys-fs/e2fsprogs[static-libs(+)]
+			reiserfs? (
+				>=sys-fs/reiserfsprogs-3.6.27[static-libs(+)]
+			)
+		)
+		zstd? ( app-arch/zstd[static-libs(+)] )
+	)
+"
+BDEPEND="virtual/pkgconfig
+	man? ( dev-python/sphinx )"
+
+if [[ ${PV} == 9999 ]]; then
+	BDEPEND+=" sys-devel/gnuconfig"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.2.1-blake2-simd.patch
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]]; then
+		AT_M4DIR="m4" eautoreconf
+
+		mkdir config || die
+		local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+		[[ -e ${automakedir} ]] || die "Could not locate automake directory"
+
+		ln -s "${automakedir}"/install-sh config/install-sh || die
+		ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die
+		ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die
+	fi
+}
+
+src_configure() {
+	local myeconfargs=(
+		--bindir="${EPREFIX}"/sbin
+
+		--enable-lzo
+		--disable-experimental
+		$(use_enable convert)
+		$(use_enable man documentation)
+		$(use_enable elibc_glibc backtrace)
+		$(use_enable python)
+		$(use_enable static-libs static)
+		$(use_enable udev libudev)
+		$(use_enable zstd)
+
+		# Could support libgcrypt, libsodium, libkcapi
+		--with-crypto=builtin
+		--with-convert=ext2$(usex reiserfs ',reiserfs' '')
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake V=1 all $(usev static)
+}
+
+src_test() {
+	default
+
+	if use python ; then
+		cd libbtrfsutil/python || die
+
+		local -x LD_LIBRARY_PATH="${S}:libbtrfsutil/python:${LD_LIBRARY_PATH}"
+		${EPYTHON} -m unittest tests/test_*.py || die
+	fi
+}
+
+src_install() {
+	local makeargs=(
+		$(usex python install_python '')
+		$(usex static install-static '')
+	)
+
+	emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
+
+	newbashcomp btrfs-completion btrfs
+
+	use python && python_optimize
+}
+
+pkg_postinst() {
+	udev_reload
+}
+
+pkg_postrm() {
+	udev_reload
+}

diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-6.2.1-blake2-simd.patch b/sys-fs/btrfs-progs/files/btrfs-progs-6.2.1-blake2-simd.patch
new file mode 100644
index 000000000000..f2531135c5c4
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-6.2.1-blake2-simd.patch
@@ -0,0 +1,44 @@
+https://github.com/kdave/btrfs-progs/issues/589
+https://github.com/kdave/btrfs-progs/pull/591
+
+From c7e7e2568b073b6a501eef515f3a4b6402a71211 Mon Sep 17 00:00:00 2001
+From: Tino Mai <mai.tino@gmail.com>
+Date: Sun, 5 Mar 2023 18:15:52 +0100
+Subject: [PATCH] btrfs-progs: crypto: fix SSE2/SSE4.1 implementation of BLAKE2
+
+--- a/crypto/blake2b-round.h
++++ b/crypto/blake2b-round.h
+@@ -136,12 +136,6 @@
+ 
+ #endif
+ 
+-#if defined(HAVE_SSE41)
+-#include "blake2b-load-sse41.h"
+-#else
+-#include "blake2b-load-sse2.h"
+-#endif
+-
+ #define ROUND(r) \
+   LOAD_MSG_ ##r ##_1(b0, b1); \
+   G1(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h,b0,b1); \
+--- a/crypto/blake2b-sse2.c
++++ b/crypto/blake2b-sse2.c
+@@ -30,6 +30,7 @@
+ #include <x86intrin.h>
+ #endif
+ 
++#include "blake2b-load-sse2.h"
+ #include "blake2b-round.h"
+ 
+ static const uint64_t blake2b_IV[8] =
+--- a/crypto/blake2b-sse41.c
++++ b/crypto/blake2b-sse41.c
+@@ -34,6 +34,7 @@
+ #include <x86intrin.h>
+ #endif
+ 
++#include "blake2b-load-sse41.h"
+ #include "blake2b-round.h"
+ 
+ static const uint64_t blake2b_IV[8] =
+


             reply	other threads:[~2023-03-07 15:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 15:43 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-02  7:29 [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/files/, sys-fs/btrfs-progs/ Sam James
2024-04-25 12:21 Andreas K. Hüttel
2023-11-03 18:19 Sam James
2023-07-27 13:55 Sam James
2022-08-04 17:55 Mike Gilbert
2022-01-24 23:18 Sam James
2021-12-30  9:41 Sam James
2021-11-16 19:45 Georgy Yakovlev
2019-07-01  8:34 Lars Wendler
2019-05-19  7:57 Sergei Trofimovich
2019-01-16 12:02 Lars Wendler
2018-10-31  9:15 Lars Wendler
2018-03-19 13:36 Lars Wendler
2018-02-16 20:57 Mike Gilbert
2017-10-17  8:25 Lars Wendler
2017-03-27 20:45 Sergei Trofimovich
2016-11-12 22:09 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1678203826.de2ae2e9c4a1525ddf806a24e081e075655e5be7.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox