sys-fs/btrfs-progs: Sync with Gentoo

It's from Gentoo commit ed468028e725c9580a7b2ee02d6b7b9375f7a0b2.
This commit is contained in:
Krzesimir Nowak 2023-01-25 17:47:22 +01:00
parent f7935aa5e1
commit 27b73a5c4a
3 changed files with 55 additions and 52 deletions

View File

@ -1 +1 @@
DIST btrfs-progs-v5.15.1.tar.xz 2280796 BLAKE2B b460254a6261d3d04a2d265a3b4e05a89385888f7ea4f2b16ec5b73922646c7f47a546fc78ba7c009e65914125435cf38157eabffc74f5d00df2c21c844922e3 SHA512 68ed89e337ae857fdaf077eaa889e259e9f162ea2222bdaa03f4187783a8682c24d45c91b0559b901d81429ba2cd3f84087d032d354092d5512fb226bdf91549
DIST btrfs-progs-v6.0.2.tar.xz 2321220 BLAKE2B 391bd9dcc7ae2d40c339eb9b7fb466624c3f122149af640bc0ca73abfc85ca7bd076976d47ce2d4eab64fb3b9b1309e3446acdd78ba77e5cb583b939710f8b6c SHA512 8e01fa6e3373d95a8e8577003ceb94722e4dfdf24110bfea79191a9862daf5e6580d72e898fdea134b5e86beeda32948eed572072f7906226189c6f1ac8615e3

View File

@ -1,14 +0,0 @@
We forked this package for the following reasons:
- We override the udev rules directory. The configure script does not
provide a way to override it, so we need to hack it, otherwise the
configure script will figure out the wrong path in our builds. We do
it by overriding it in Makefile.inc.in. Ideal solution here would be
to patch btrfs-progs to allow overriding the udev path and then
override it in the ebuild properly, without the sed hacks.
- We change the python versions, because we still have only python
3.6.
- We stabilize the package on both amd64 and arm64 to keep it in sync
with our linux kernel version.

View File

@ -1,43 +1,47 @@
# Copyright 2008-2021 Gentoo Authors
# Copyright 2008-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
# Flatcar: We still have python 3.6 only.
PYTHON_COMPAT=( python3_{6..9} )
PYTHON_COMPAT=( python3_{9..10} )
# Flatcar: Inherit udev eclass, so we can get the udev directory.
inherit bash-completion-r1 python-single-r1 udev
libbtrfs_soname=0
if [[ ${PV} != 9999 ]]; then
MY_PV="v${PV/_/-}"
[[ "${PV}" = *_rc* ]] || \
# Flatcar: Stabilize our arches.
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
S="${WORKDIR}/${PN}-${MY_PV}"
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
S="${WORKDIR}"/${PN}-${MY_PV}
else
WANT_LIBTOOL=none
inherit autotools git-r3
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"
HOMEPAGE="https://btrfs.wiki.kernel.org https://btrfs.readthedocs.io/en/latest/"
LICENSE="GPL-2"
SLOT="0/${libbtrfs_soname}"
IUSE="+convert doc python reiserfs static static-libs +zstd"
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 )"
RESTRICT=test # tries to mount repared filesystems
# Tries to mount repaired filesystems
RESTRICT="test"
RDEPEND="
dev-libs/lzo:2=
sys-apps/util-linux:0=[static-libs(+)?]
sys-libs/zlib:0=
sys-apps/util-linux:=[static-libs(+)?]
sys-libs/zlib:=
convert? (
sys-fs/e2fsprogs:=
reiserfs? (
@ -45,7 +49,8 @@ RDEPEND="
)
)
python? ( ${PYTHON_DEPS} )
zstd? ( app-arch/zstd:0= )
udev? ( virtual/libudev:= )
zstd? ( app-arch/zstd:= )
"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-5.10
@ -65,19 +70,14 @@ DEPEND="${RDEPEND}
>=sys-fs/reiserfsprogs-3.6.27[static-libs(+)]
)
)
zstd? ( app-arch/zstd:0[static-libs(+)] )
)
"
BDEPEND="
doc? (
|| ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
app-text/docbook-xml-dtd:4.5
app-text/xmlto
zstd? ( app-arch/zstd[static-libs(+)] )
)
"
BDEPEND="virtual/pkgconfig
man? ( dev-python/sphinx )"
if [[ ${PV} == 9999 ]]; then
DEPEND+=" sys-devel/gnuconfig"
BDEPEND+=" sys-devel/gnuconfig"
fi
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@ -88,30 +88,39 @@ pkg_setup() {
src_prepare() {
default
if [[ ${PV} == 9999 ]]; then
AT_M4DIR=m4 eautoreconf
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 "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || 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
# Flatcar: Replace udevdir variable with proper udev directory.
sed -i -e 's#^\(udevdir\s\+=\).*#\1 $(get_udevdir)#' Makefile.inc.in
}
src_configure() {
local myeconfargs=(
--bindir="${EPREFIX}"/sbin
--enable-lzo
--disable-experimental
$(use_enable convert)
$(use_enable doc documentation)
$(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[@]}"
}
@ -124,10 +133,18 @@ src_install() {
$(usex python install_python '')
$(usex static install-static '')
)
emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
newbashcomp btrfs-completion btrfs
use python && python_optimize
# install prebuilt subset of manuals
use doc || doman Documentation/*.[58]
emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
newbashcomp btrfs-completion btrfs
use python && python_optimize
}
pkg_postinst() {
udev_reload
}
pkg_postrm() {
udev_reload
}