diff --git a/sys-fs/erofs-utils/Manifest b/sys-fs/erofs-utils/Manifest index 3bf92e0bfe..4b9d3aab55 100644 --- a/sys-fs/erofs-utils/Manifest +++ b/sys-fs/erofs-utils/Manifest @@ -1 +1,2 @@ DIST erofs-utils-1.1.tar.gz 46133 BLAKE2B 24a2f16059e39bd65203f4a28721b8aad70599d6201ead02c291234de631bd3def1c403fa8b50b6dce4af3eea2768b912c4f56ad20c3c26db3853ba3174775ac SHA512 f300b536f0ba91a05a7eb3dc9a9ec402c98966ad7c0e1f2f664a650caaffce6c4433722374418c6d03e69ce2e74785e55f9bcc45e6717a8bc67e5352e450806b +DIST erofs-utils-1.2.tar.gz 60991 BLAKE2B 08b9bea397f52d158a40f095811853315a3b553618f380d1ece012c813d708c2331b2a445bb59c4b86d81edab33c834e37aeb0aeeb9acb157b7aebed309cb591 SHA512 167311beb2d4722436051956076d670f6a54da72e1690d19d43e0c46dd972f9f61427b4792b469813a6a4ff2e3c445646cf063d37b4ee2b52f88eb14e7bf2713 diff --git a/sys-fs/erofs-utils/erofs-utils-1.2.ebuild b/sys-fs/erofs-utils/erofs-utils-1.2.ebuild new file mode 100644 index 0000000000..62a2d24c46 --- /dev/null +++ b/sys-fs/erofs-utils/erofs-utils-1.2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Userspace tools for EROFS images" +HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git" +SRC_URI="${HOMEPAGE}/snapshot/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="fuse lz4 selinux +uuid" + +RDEPEND=" + fuse? ( sys-fs/fuse:0 ) + lz4? ( >=app-arch/lz4-1.9 ) + selinux? ( sys-libs/libselinux ) + uuid? ( sys-apps/util-linux ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-no-common.patch" +) + +src_prepare() { + default + use fuse && use selinux && sed -i \ + -e 's/.*CFLAGS}.*/& ${libselinux_CFLAGS}/' \ + -e 's/.*LIBS}.*/& ${libselinux_LIBS}/' \ + fuse/Makefile.am + eautoreconf +} + +src_configure() { + econf \ + $(use_enable fuse) \ + $(use_enable lz4) \ + $(use_with selinux) \ + $(use_with uuid) +} diff --git a/sys-fs/erofs-utils/erofs-utils-9999.ebuild b/sys-fs/erofs-utils/erofs-utils-9999.ebuild new file mode 100644 index 0000000000..1b9df41119 --- /dev/null +++ b/sys-fs/erofs-utils/erofs-utils-9999.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools git-r3 + +DESCRIPTION="Userspace tools for EROFS images" +HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git" +EGIT_BRANCH="experimental" +EGIT_REPO_URI="${HOMEPAGE}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="" +IUSE="fuse lz4 selinux +uuid" + +RDEPEND=" + fuse? ( sys-fs/fuse:0 ) + lz4? ( >=app-arch/lz4-1.9 ) + selinux? ( sys-libs/libselinux ) + uuid? ( sys-apps/util-linux ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable fuse) \ + $(use_enable lz4) \ + $(use_with selinux) \ + $(use_with uuid) +} diff --git a/sys-fs/erofs-utils/files/erofs-utils-1.2-no-common.patch b/sys-fs/erofs-utils/files/erofs-utils-1.2-no-common.patch new file mode 100644 index 0000000000..689e485d7c --- /dev/null +++ b/sys-fs/erofs-utils/files/erofs-utils-1.2-no-common.patch @@ -0,0 +1,61 @@ +From ac0d13efa1fe673e677343cda4795d820500da6b Mon Sep 17 00:00:00 2001 +From: Gao Xiang +Date: Tue, 8 Dec 2020 18:57:41 +0800 +Subject: erofs-utils: fix multiple definition of `sbi' + +As nl6720 reported [1], lib/inode.o (mkfs) and lib/super.o (erofsfuse) +could be compiled together by some options. Fix it now. + +[1] https://lore.kernel.org/r/10789285.Na0ui7I3VY@walnut + +Link: https://lore.kernel.org/r/20201208105741.9614-1-hsiangkao@aol.com +Fixes: 5e35b75ad499 ("erofs-utils: introduce fuse implementation") +Reported-by: nl6720 +Signed-off-by: Gao Xiang +--- + lib/config.c | 1 + + lib/inode.c | 2 -- + lib/super.c | 2 -- + 3 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/lib/config.c b/lib/config.c +index 3155112..3ecd481 100644 +--- a/lib/config.c ++++ b/lib/config.c +@@ -11,6 +11,7 @@ + #include "erofs/internal.h" + + struct erofs_configure cfg; ++struct erofs_sb_info sbi; + + void erofs_init_configure(void) + { +diff --git a/lib/inode.c b/lib/inode.c +index 3d634fc..0c4839d 100644 +--- a/lib/inode.c ++++ b/lib/inode.c +@@ -22,8 +22,6 @@ + #include "erofs/xattr.h" + #include "erofs/exclude.h" + +-struct erofs_sb_info sbi; +- + #define S_SHIFT 12 + static unsigned char erofs_ftype_by_mode[S_IFMT >> S_SHIFT] = { + [S_IFREG >> S_SHIFT] = EROFS_FT_REG_FILE, +diff --git a/lib/super.c b/lib/super.c +index 2d36692..025cefe 100644 +--- a/lib/super.c ++++ b/lib/super.c +@@ -11,8 +11,6 @@ + #include "erofs/io.h" + #include "erofs/print.h" + +-struct erofs_sb_info sbi; +- + static bool check_layout_compatibility(struct erofs_sb_info *sbi, + struct erofs_super_block *dsb) + { +-- +cgit 1.2.3-1.el7 + diff --git a/sys-fs/erofs-utils/metadata.xml b/sys-fs/erofs-utils/metadata.xml index e4bdaaa462..277295be69 100644 --- a/sys-fs/erofs-utils/metadata.xml +++ b/sys-fs/erofs-utils/metadata.xml @@ -32,5 +32,6 @@ Allow interaction with libuuid in sys-apps/util-linux. It's recommended turn on + Enable support for Filesystem in Userspace via sys-fs/fuse