public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2016-04-18 22:22 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2016-04-18 22:22 UTC (permalink / raw
  To: gentoo-commits

commit:     6b2446cdc15c0c171f7e426687dc6b755bbf153d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 22:22:14 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 22:22:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b2446cd

sys-fs/f2fs-tools: fix build w/newer glibc #580338

 sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild          |  6 ++-
 .../files/f2fs-tools-1.6.1-sysmacros.patch         | 45 ++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
index 793c43d..a5edab4 100644
--- a/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit multilib
+inherit multilib eutils
 
 DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
 HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/jaegeuk/f2fs-tools.git;a=summary"
@@ -15,6 +15,10 @@ SLOT="0/0"
 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
 IUSE=""
 
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-sysmacros.patch #580338
+}
+
 src_configure() {
 	#This is required to install to /sbin, bug #481110
 	econf --prefix=/ --includedir=/usr/include

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch
new file mode 100644
index 0000000..f5cc4a0
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/580338
+
+From d6abcb38899cd03d59e0f30c49419695f86ae543 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:18:07 -0400
+Subject: [PATCH] fibmap: pull in sys/sysmacros.h for major/minor
+
+These funcs are provided by sys/sysmacros.h, so include the header
+directly.  Building with alternative C libraries can fail otherwise
+like so:
+
+fibmap.c: In function 'print_stat':
+fibmap.c:36:32: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
+  printf("dev       [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
+                                ^
+fibmap.c:36:51: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
+  printf("dev       [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
+                                                   ^
+fibmap.o: In function 'print_stat':
+tools/fibmap.c:36: undefined reference to 'minor'
+tools/fibmap.c:36: undefined reference to 'major'
+fibmap.o: In function 'stat_bdev':
+tools/fibmap.c:59: undefined reference to 'minor'
+tools/fibmap.c:59: undefined reference to 'major'
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tools/fibmap.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/fibmap.c b/tools/fibmap.c
+index 224b233..6b092f5 100644
+--- a/tools/fibmap.c
++++ b/tools/fibmap.c
+@@ -8,6 +8,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <libgen.h>
+ #include <linux/hdreg.h>
+ #include <linux/types.h>
+-- 
+2.7.4
+


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2017-08-22  5:30 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-08-22  5:30 UTC (permalink / raw
  To: gentoo-commits

commit:     2d11c53e87eb3976889ca2f3226a374d6dbdf47d
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 04:44:47 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 05:05:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d11c53e

sys-fs/f2fs-tools: fix bug #623660 for version 1.8.0

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 sys-fs/f2fs-tools/f2fs-tools-1.8.0.ebuild                |  4 ++++
 sys-fs/f2fs-tools/files/f2fs-tools-1.8.0-sysmacros.patch | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.8.0.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.8.0.ebuild
index 11d3ad95aa0..fe85240c1de 100644
--- a/sys-fs/f2fs-tools/f2fs-tools-1.8.0.ebuild
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.8.0.ebuild
@@ -17,6 +17,10 @@ RDEPEND="
 	selinux? ( sys-libs/libselinux )"
 DEPEND="$RDEPEND"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-sysmacros.patch #623660
+)
+
 src_configure() {
 	#This is required to install to /sbin, bug #481110
 	econf \

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.8.0-sysmacros.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.8.0-sysmacros.patch
new file mode 100644
index 00000000000..7ca70222fd5
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.8.0-sysmacros.patch
@@ -0,0 +1,10 @@
+--- f2fs-tools-1.8.0/lib/libf2fs.c.orig	2017-07-03 03:01:53.000000000 +0600
++++ f2fs-tools-1.8.0/lib/libf2fs.c	2017-08-17 00:45:01.638979885 +0600
+@@ -16,6 +16,7 @@
+ #include <fcntl.h>
+ #include <mntent.h>
+ #include <time.h>
++#include <sys/sysmacros.h>
+ #include <sys/stat.h>
+ #include <sys/mount.h>
+ #include <sys/ioctl.h>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2018-03-06  8:34 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2018-03-06  8:34 UTC (permalink / raw
  To: gentoo-commits

commit:     cdfc6cdb46f30d5011c432a062260b056be09253
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  6 08:33:51 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Mar  6 08:34:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdfc6cdb

sys-fs/f2fs-tools: fix bug #649168 in 1.10.0

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sys-fs/f2fs-tools/f2fs-tools-1.10.0.ebuild                |  2 ++
 .../files/f2fs-tools-1.10.0-fibmap-include-config_h.patch | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.10.0.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.10.0.ebuild
index 94561df90d6..6d2be3599a8 100644
--- a/sys-fs/f2fs-tools/f2fs-tools-1.10.0.ebuild
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.10.0.ebuild
@@ -17,6 +17,8 @@ RDEPEND="
 	selinux? ( sys-libs/libselinux )"
 DEPEND="$RDEPEND"
 
+PATCHES=( "${FILESDIR}"/${P}-fibmap-include-config_h.patch )
+
 src_configure() {
 	#This is required to install to /sbin, bug #481110
 	econf \

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.10.0-fibmap-include-config_h.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.10.0-fibmap-include-config_h.patch
new file mode 100644
index 00000000000..df57412b74c
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.10.0-fibmap-include-config_h.patch
@@ -0,0 +1,15 @@
+See https://bugs.gentoo.org/649168
+
+Patch by: Matt Whitlock <gentoo@mattwhitlock.name>
+
+diff -Naur a/tools/fibmap.c b/tools/fibmap.c
+--- a/tools/fibmap.c	2018-03-01 00:09:24.861919778 +0000
++++ b/tools/fibmap.c	2018-03-01 17:31:48.854604556 +0000
+@@ -15,6 +15,7 @@
+ #ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
+ #endif
++#include "config.h"
+ #include <unistd.h>
+ #include <string.h>
+ #include <stdlib.h>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2018-12-03 14:12 Mikle Kolyada
  0 siblings, 0 replies; 6+ messages in thread
From: Mikle Kolyada @ 2018-12-03 14:12 UTC (permalink / raw
  To: gentoo-commits

commit:     76ae45b316e09ec982a1f02d77017efbd5909d40
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  3 14:12:19 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon Dec  3 14:12:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76ae45b3

sys-fs/f2fs-tools: revbump to fix fsck on boot

Closes: https://bugs.gentoo.org/671786
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-fs/f2fs-tools/f2fs-tools-1.12.0-r1.ebuild      | 37 ++++++++++++++
 .../f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch  | 56 ++++++++++++++++++++++
 2 files changed, 93 insertions(+)

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.12.0-r1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.12.0-r1.ebuild
new file mode 100644
index 00000000000..523fddda177
--- /dev/null
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.12.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
+HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/about/"
+SRC_URI="https://dev.gentoo.org/~zlogene/distfiles/${CATEGORY}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/6"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-fsck.patch
+	default
+	eautoreconf
+}
+
+src_configure() {
+	#This is required to install to /sbin, bug #481110
+	econf \
+		--bindir="${EPREFIX}"/sbin \
+		--disable-static \
+		$(use_with selinux)
+}
+
+src_install() {
+	default
+	find "${D}" -name "*.la" -delete || die
+}

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch
new file mode 100644
index 00000000000..72d86fec465
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch
@@ -0,0 +1,56 @@
+From a6160c3e21f43b89b49802cc4a956d1c4b65ae44 Mon Sep 17 00:00:00 2001
+From: Chao Yu <yuchao0@huawei.com>
+Date: Mon, 26 Nov 2018 18:53:37 +0800
+Subject: fsck.f2fs: allow to fsck readonly image w/ -f option
+
+To keep line with e2fsprogs, let's allow to fsck mounted image as
+readonly w/ -f option.
+
+Reported-by: Perfect Gentleman <perfect007gentleman@gmail.com>
+Signed-off-by: Chao Yu <yuchao0@huawei.com>
+---
+ fsck/main.c       | 1 +
+ include/f2fs_fs.h | 1 +
+ lib/libf2fs.c     | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/fsck/main.c b/fsck/main.c
+index 675c603..bb79f6e 100644
+--- a/fsck/main.c
++++ b/fsck/main.c
+@@ -249,6 +249,7 @@ void f2fs_parse_options(int argc, char *argv[])
+ 			case 'f':
+ 			case 'y':
+ 				c.fix_on = 1;
++				c.force = 1;
+ 				MSG(0, "Info: Force to fix corruption\n");
+ 				break;
+ 			case 'q':
+diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
+index 65cc8fd..6eebb3a 100644
+--- a/include/f2fs_fs.h
++++ b/include/f2fs_fs.h
+@@ -369,6 +369,7 @@ struct f2fs_configuration {
+ 	void *private;
+ 	int dry_run;
+ 	int fix_on;
++	int force;
+ 	int defset;
+ 	int bug_on;
+ 	int alloc_failed;
+diff --git a/lib/libf2fs.c b/lib/libf2fs.c
+index cc335db..498f6c0 100644
+--- a/lib/libf2fs.c
++++ b/lib/libf2fs.c
+@@ -821,7 +821,7 @@ int get_device_info(int i)
+ 			return -1;
+ 		}
+ 
+-		if (S_ISBLK(stat_buf->st_mode))
++		if (S_ISBLK(stat_buf->st_mode) && !c.force)
+ 			fd = open(dev->path, O_RDWR | O_EXCL);
+ 		else
+ 			fd = open(dev->path, O_RDWR);
+-- 
+cgit 1.2-0.3.lf.el7
+


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2023-05-30  5:33 Viorel Munteanu
  0 siblings, 0 replies; 6+ messages in thread
From: Viorel Munteanu @ 2023-05-30  5:33 UTC (permalink / raw
  To: gentoo-commits

commit:     b87b3ac59a270ae43be2e0b7f1e0717128d7935c
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Tue May 30 05:32:42 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Tue May 30 05:32:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b87b3ac5

sys-fs/f2fs-tools: drop 1.15.0-r2

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 sys-fs/f2fs-tools/Manifest                         |  1 -
 sys-fs/f2fs-tools/f2fs-tools-1.15.0-r2.ebuild      | 45 ----------------------
 .../files/f2fs-tools-1.15.0-lz4-1.9.4.patch        | 25 ------------
 3 files changed, 71 deletions(-)

diff --git a/sys-fs/f2fs-tools/Manifest b/sys-fs/f2fs-tools/Manifest
index 7093187d4ebf..7cad1b728e87 100644
--- a/sys-fs/f2fs-tools/Manifest
+++ b/sys-fs/f2fs-tools/Manifest
@@ -1,2 +1 @@
-DIST f2fs-tools-1.15.0.tar.gz 387663 BLAKE2B 1e55f87c839cee6431d9a83e9786201e9b6b872be27c8b92854b30b0fd1c651a9b7235ce93e70c530bfa7a4e9f4dfd309c72702b3338a4aa96e365b29424fb1d SHA512 61e40f16296091b55cec2dbdc6306af6abc2d3f854f39ef03a741b7f6f47348f915498375789f017f8da27fa7d27c79c905dd047693518adde503ea7ebf89387
 DIST f2fs-tools-1.16.0.tar.gz 265507 BLAKE2B a4fb94ff879198652a2922a0101b7e34aad156c3536e5a20c1cb2e36a6a734d92d3f97b2570eb702d029ef1d6c03d6123113fc1aa5658ba979401e0691b7b447 SHA512 ea198cebf7c5bb0c42c9b53bc80484495c403b1ed1354eb7cb7b4f63ed9a5c81653a76eaf1bc35067171fa5fd99b1564178c5440c21b6b025f4e83b9def82680

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.15.0-r2.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.15.0-r2.ebuild
deleted file mode 100644
index 72236b8baf0b..000000000000
--- a/sys-fs/f2fs-tools/f2fs-tools-1.15.0-r2.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools
-
-DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
-HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/about/"
-SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/${PN}.git/snapshot/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0/9"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv x86"
-IUSE="selinux"
-
-RDEPEND="
-	selinux? ( sys-libs/libselinux )
-	elibc_musl? ( sys-libs/queue-standalone )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.15.0-lz4-1.9.4.patch
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	# This is required to install to /sbin, bug #481110
-	econf \
-		--bindir="${EPREFIX}"/sbin \
-		--disable-static \
-		$(use_with selinux)
-}
-
-src_install() {
-	default
-	find "${D}" -name "*.la" -delete || die
-	# Collides with sg3_utils
-	# https://bugs.gentoo.org/880899
-	rm "${ED}/usr/sbin/sg_write_buffer" || die
-}

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.15.0-lz4-1.9.4.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.15.0-lz4-1.9.4.patch
deleted file mode 100644
index 4194054271db..000000000000
--- a/sys-fs/f2fs-tools/files/f2fs-tools-1.15.0-lz4-1.9.4.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugs.gentoo.org/867691
-https://github.com/jaegeuk/f2fs-tools/commit/b9e0985dc2e8f0a15faca21fa208afae57593486
-
-From: Jaegeuk Kim <jaegeuk@kernel.org>
-Date: Mon, 29 Aug 2022 11:03:35 -0700
-Subject: [PATCH] f2fs-tools: fix build error on lz4-1.9.4
-
-LZ4_STREAMSIZE_U64 is undefined in new lz4 lib.
-
-Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---- a/fsck/compress.c
-+++ b/fsck/compress.c
-@@ -32,10 +32,7 @@
- #ifdef HAVE_LIBLZ4
- #define LZ4_MEMORY_USAGE		14
- #define LZ4_MAX_INPUT_SIZE		0x7E000000 /* 2 113 929 216 bytes */
--#ifndef LZ4_STREAMSIZE
--#define LZ4_STREAMSIZE			(LZ4_STREAMSIZE_U64 * sizeof(long long))
--#endif
--#define LZ4_MEM_COMPRESS		LZ4_STREAMSIZE
-+#define LZ4_MEM_COMPRESS		sizeof(LZ4_stream_t)
- #define LZ4_ACCELERATION_DEFAULT	1
- #define LZ4_WORK_SIZE			ALIGN_UP(LZ4_MEM_COMPRESS, 8)
- #endif
-


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/
@ 2023-10-21 17:46 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-10-21 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     c5b54e85b0ab5dfaf9d9020ffa9e636d91b1dffc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 17:46:24 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 17:46:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5b54e85

sys-fs/f2fs-tools: fix build w/ musl-1.2.4

Closes: https://bugs.gentoo.org/908664
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild      |  56 +++
 .../files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch   | 403 +++++++++++++++++++++
 2 files changed, 459 insertions(+)

diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild
new file mode 100644
index 000000000000..8a7ff5b69fa2
--- /dev/null
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
+HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/about/"
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/${PN}.git"
+	EGIT_BRANCH="dev"
+else
+	SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/${PN}.git/snapshot/${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0/10"
+IUSE="lz4 lzo selinux"
+
+RDEPEND="
+	lz4? ( app-arch/lz4:= )
+	lzo? ( dev-libs/lzo:2 )
+	sys-apps/util-linux
+	selinux? ( sys-libs/libselinux )
+	elibc_musl? ( sys-libs/queue-standalone )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-musl-1.2.4-lfs.patch
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=(
+		# This is required to install to /sbin, bug #481110
+		--bindir="${EPREFIX}"/sbin
+		$(use_with lz4)
+		$(use_with lzo lzo2)
+		$(use_with selinux)
+	)
+
+	econf "${myconf[@]}"
+}
+
+src_install() {
+	default
+	find "${ED}" -name "*.la" -delete || die
+}

diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch
new file mode 100644
index 000000000000..03be41400c20
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.16.0-musl-1.2.4-lfs.patch
@@ -0,0 +1,403 @@
+https://bugs.gentoo.org/908664
+https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=b15b6cc56ac7764be17acbdbf96448f388992adc
+
+From b15b6cc56ac7764be17acbdbf96448f388992adc Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Wed, 23 Aug 2023 15:41:28 +0200
+Subject: f2fs-tools: convert to lseek() and kill lseek64
+
+This patch replaces lseek64 with lseek() having #define _FILE_OFFSET_BITS 64.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -187,8 +187,6 @@ AC_CHECK_FUNCS_ONCE([
+ 	getmntent
+ 	getuid
+ 	keyctl
+-	llseek
+-	lseek64
+ 	memset
+ 	setmntent
+ 	clock_gettime
+--- a/fsck/Makefile.am
++++ b/fsck/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+ 
+ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = fsck.f2fs
+ noinst_HEADERS = common.h dict.h dqblk_v2.h f2fs.h fsck.h node.h quotaio.h \
+ 		quotaio_tree.h quotaio_v2.h xattr.h compress.h
+--- a/include/android_config.h
++++ b/include/android_config.h
+@@ -30,8 +30,6 @@
+ #define HAVE_FSTAT 1
+ #define HAVE_FSTAT64 1
+ #define HAVE_GETMNTENT 1
+-#define HAVE_LLSEEK 1
+-#define HAVE_LSEEK64 1
+ #define HAVE_MEMSET 1
+ #define HAVE_SELINUX_ANDROID_H 1
+ #define HAVE_SETMNTENT 1
+@@ -67,7 +65,6 @@
+ #define HAVE_FSTAT 1
+ #define HAVE_FSTAT64 1
+ #define HAVE_GETMNTENT 1
+-#define HAVE_LLSEEK 1
+ #define HAVE_MEMSET 1
+ #define HAVE_SPARSE_SPARSE_H 1
+ #define HAVE_LIBLZ4 1
+@@ -78,6 +75,5 @@
+ #endif
+ 
+ #if defined(_WIN32)
+-#define HAVE_LSEEK64
+ #define HAVE_SPARSE_SPARSE_H 1
+ #endif
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -3,7 +3,7 @@
+ lib_LTLIBRARIES = libf2fs.la
+ 
+ libf2fs_la_SOURCES = libf2fs.c libf2fs_io.c libf2fs_zoned.c nls_utf8.c
+-libf2fs_la_CFLAGS = -Wall
++libf2fs_la_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ libf2fs_la_CPPFLAGS = -I$(top_srcdir)/include
+ libf2fs_la_LDFLAGS = -version-info $(LIBF2FS_CURRENT):$(LIBF2FS_REVISION):$(LIBF2FS_AGE)
+ 
+--- a/lib/libf2fs.c
++++ b/lib/libf2fs.c
+@@ -6,9 +6,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+-#define _FILE_OFFSET_BITS 64
+-
+ #include <f2fs_fs.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--- a/lib/libf2fs_io.c
++++ b/lib/libf2fs_io.c
+@@ -11,8 +11,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -67,22 +65,13 @@ static int __get_device_fd(__u64 *offset)
+ 	return -1;
+ }
+ 
+-#ifndef HAVE_LSEEK64
+-typedef off_t	off64_t;
+-
+-static inline off64_t lseek64(int fd, __u64 offset, int set)
+-{
+-	return lseek(fd, offset, set);
+-}
+-#endif
+-
+ /* ---------- dev_cache, Least Used First (LUF) policy  ------------------- */
+ /*
+  * Least used block will be the first victim to be replaced when max hash
+  * collision exceeds
+  */
+ static bool *dcache_valid; /* is the cached block valid? */
+-static off64_t  *dcache_blk; /* which block it cached */
++static off_t  *dcache_blk; /* which block it cached */
+ static uint64_t *dcache_lastused; /* last used ticks for cache entries */
+ static char *dcache_buf; /* cached block data */
+ static uint64_t dcache_usetick; /* current use tick */
+@@ -172,7 +161,7 @@ static int dcache_alloc_all(long n)
+ {
+ 	if (n <= 0)
+ 		return -1;
+-	if ((dcache_blk = (off64_t *) malloc(sizeof(off64_t) * n)) == NULL
++	if ((dcache_blk = (off_t *) malloc(sizeof(off_t) * n)) == NULL
+ 		|| (dcache_lastused = (uint64_t *)
+ 				malloc(sizeof(uint64_t) * n)) == NULL
+ 		|| (dcache_buf = (char *) malloc (F2FS_BLKSIZE * n)) == NULL
+@@ -257,7 +246,7 @@ static inline long dcache_relocate(long entry, int n)
+ 			dcache_config.num_cache_entry;
+ }
+ 
+-static long dcache_find(off64_t blk)
++static long dcache_find(off_t blk)
+ {
+ 	register long n = dcache_config.num_cache_entry;
+ 	register unsigned m = dcache_config.max_hash_collision;
+@@ -278,10 +267,10 @@ static long dcache_find(off64_t blk)
+ }
+ 
+ /* Physical read into cache */
+-static int dcache_io_read(int fd, long entry, off64_t offset, off64_t blk)
++static int dcache_io_read(int fd, long entry, off_t offset, off_t blk)
+ {
+-	if (lseek64(fd, offset, SEEK_SET) < 0) {
+-		MSG(0, "\n lseek64 fail.\n");
++	if (lseek(fd, offset, SEEK_SET) < 0) {
++		MSG(0, "\n lseek fail.\n");
+ 		return -1;
+ 	}
+ 	if (read(fd, dcache_buf + entry * F2FS_BLKSIZE, F2FS_BLKSIZE) < 0) {
+@@ -308,12 +297,12 @@ static int dcache_io_read(int fd, long entry, off64_t offset, off64_t blk)
+  *       1: cache not available (uninitialized)
+  *      -1: error
+  */
+-static int dcache_update_rw(int fd, void *buf, off64_t offset,
++static int dcache_update_rw(int fd, void *buf, off_t offset,
+ 		size_t byte_count, bool is_write)
+ {
+-	off64_t blk;
++	off_t blk;
+ 	int addr_in_blk;
+-	off64_t start;
++	off_t start;
+ 
+ 	if (!dcache_initialized)
+ 		dcache_init(); /* auto initialize */
+@@ -377,13 +366,13 @@ static int dcache_update_rw(int fd, void *buf, off64_t offset,
+  * return value: 1: cache not available
+  *               0: success, -1: I/O error
+  */
+-int dcache_update_cache(int fd, void *buf, off64_t offset, size_t count)
++int dcache_update_cache(int fd, void *buf, off_t offset, size_t count)
+ {
+ 	return dcache_update_rw(fd, buf, offset, count, true);
+ }
+ 
+ /* handles read into cache + read into buffer  */
+-int dcache_read(int fd, void *buf, off64_t offset, size_t count)
++int dcache_read(int fd, void *buf, off_t offset, size_t count)
+ {
+ 	return dcache_update_rw(fd, buf, offset, count, false);
+ }
+@@ -395,7 +384,7 @@ int dev_read_version(void *buf, __u64 offset, size_t len)
+ {
+ 	if (c.sparse_mode)
+ 		return 0;
+-	if (lseek64(c.kd, (off64_t)offset, SEEK_SET) < 0)
++	if (lseek(c.kd, (off_t)offset, SEEK_SET) < 0)
+ 		return -1;
+ 	if (read(c.kd, buf, len) < 0)
+ 		return -1;
+@@ -534,10 +523,10 @@ int dev_read(void *buf, __u64 offset, size_t len)
+ 
+ 	/* err = 1: cache not available, fall back to non-cache R/W */
+ 	/* err = 0: success, err=-1: I/O error */
+-	err = dcache_read(fd, buf, (off64_t)offset, len);
++	err = dcache_read(fd, buf, (off_t)offset, len);
+ 	if (err <= 0)
+ 		return err;
+-	if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++	if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ 		return -1;
+ 	if (read(fd, buf, len) < 0)
+ 		return -1;
+@@ -580,9 +569,9 @@ int dev_write(void *buf, __u64 offset, size_t len)
+ 	 * dcache_update_cache() just update cache, won't do I/O.
+ 	 * Thus even no error, we need normal non-cache I/O for actual write
+ 	 */
+-	if (dcache_update_cache(fd, buf, (off64_t)offset, len) < 0)
++	if (dcache_update_cache(fd, buf, (off_t)offset, len) < 0)
+ 		return -1;
+-	if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++	if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ 		return -1;
+ 	if (write(fd, buf, len) < 0)
+ 		return -1;
+@@ -596,7 +585,7 @@ int dev_write_block(void *buf, __u64 blk_addr)
+ 
+ int dev_write_dump(void *buf, __u64 offset, size_t len)
+ {
+-	if (lseek64(c.dump_fd, (off64_t)offset, SEEK_SET) < 0)
++	if (lseek(c.dump_fd, (off_t)offset, SEEK_SET) < 0)
+ 		return -1;
+ 	if (write(c.dump_fd, buf, len) < 0)
+ 		return -1;
+@@ -618,7 +607,7 @@ int dev_fill(void *buf, __u64 offset, size_t len)
+ 	/* Only allow fill to zero */
+ 	if (*((__u8*)buf))
+ 		return -1;
+-	if (lseek64(fd, (off64_t)offset, SEEK_SET) < 0)
++	if (lseek(fd, (off_t)offset, SEEK_SET) < 0)
+ 		return -1;
+ 	if (write(fd, buf, len) < 0)
+ 		return -1;
+--- a/lib/libf2fs_zoned.c
++++ b/lib/libf2fs_zoned.c
+@@ -6,7 +6,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+ 
+ #include <f2fs_fs.h>
+ #include <stdio.h>
+--- a/mkfs/Makefile.am
++++ b/mkfs/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+ 
+ AM_CPPFLAGS = ${libuuid_CFLAGS} ${libblkid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall -DWITH_BLKDISCARD
++AM_CFLAGS = -Wall -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = mkfs.f2fs
+ noinst_HEADERS = f2fs_format_utils.h
+ include_HEADERS = $(top_srcdir)/include/f2fs_fs.h
+@@ -10,7 +10,7 @@ mkfs_f2fs_LDADD = ${libuuid_LIBS} ${libblkid_LIBS} $(top_builddir)/lib/libf2fs.l
+ 
+ lib_LTLIBRARIES = libf2fs_format.la
+ libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
+-libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD
++libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64
+ libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \
+ 	-version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
+ 
+--- a/mkfs/f2fs_format.c
++++ b/mkfs/f2fs_format.c
+@@ -6,8 +6,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+--- a/mkfs/f2fs_format_main.c
++++ b/mkfs/f2fs_format_main.c
+@@ -6,8 +6,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+--- a/mkfs/f2fs_format_utils.c
++++ b/mkfs/f2fs_format_utils.c
+@@ -6,20 +6,10 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+ 
+-#ifndef _FILE_OFFSET_BITS
+-#define _FILE_OFFSET_BITS 64
+-#endif
+-
+ #include <f2fs_fs.h>
+ 
+ #include <stdio.h>
+--- a/mkfs/f2fs_format_utils.h
++++ b/mkfs/f2fs_format_utils.h
+@@ -6,8 +6,6 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
+-
+ #include "f2fs_fs.h"
+ 
+ extern struct f2fs_configuration c;
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+ 
+ AM_CPPFLAGS = ${libuuid_CFLAGS} -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS =
+ if !WINDOWS
+ sbin_PROGRAMS += fibmap.f2fs parse.f2fs
+--- a/tools/f2fs_io/Makefile.am
++++ b/tools/f2fs_io/Makefile.am
+@@ -2,7 +2,7 @@
+ 
+ if LINUX
+ AM_CPPFLAGS = -I$(top_srcdir)/include
+-AM_CFLAGS = -Wall
++AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ sbin_PROGRAMS = f2fs_io
+ f2fs_io_SOURCES = f2fs_io.c
+ endif
+--- a/tools/f2fs_io/f2fs_io.c
++++ b/tools/f2fs_io/f2fs_io.c
+@@ -9,12 +9,6 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
+ #endif
+--- a/tools/f2fs_io_parse.c
++++ b/tools/f2fs_io_parse.c
+@@ -8,7 +8,6 @@
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  */
+-#define _LARGEFILE64_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+--- a/tools/f2fscrypt.c
++++ b/tools/f2fscrypt.c
+@@ -7,15 +7,6 @@
+  * Authors: Michael Halcrow <mhalcrow@google.com>,
+  *	    Ildar Muslukhov <ildarm@google.com>
+  */
+-
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+-
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+--- a/tools/fibmap.c
++++ b/tools/fibmap.c
+@@ -1,13 +1,6 @@
+ #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #define _XOPEN_SOURCE 600
+ #define _DARWIN_C_SOURCE
+-#define _FILE_OFFSET_BITS 64
+-#ifndef _LARGEFILE_SOURCE
+-#define _LARGEFILE_SOURCE
+-#endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
+-#endif
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+ #endif
+-- 
+cgit


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-21 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30  5:33 [gentoo-commits] repo/gentoo:master commit in: sys-fs/f2fs-tools/, sys-fs/f2fs-tools/files/ Viorel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2023-10-21 17:46 Sam James
2018-12-03 14:12 Mikle Kolyada
2018-03-06  8:34 Anthony G. Basile
2017-08-22  5:30 Anthony G. Basile
2016-04-18 22:22 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox