diff mbox series

[meta-filesystems,2/2] f2fs-tools: Upgrade to 1.15.0

Message ID 20221222025323.994194-2-raj.khem@gmail.com
State New
Headers show
Series [meta-filesystems,1/2] xfsprogs: Upgrade to 6.0.0 | expand

Commit Message

Khem Raj Dec. 22, 2022, 2:53 a.m. UTC
Add patches to build builds when S != B and largefile support

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-f2fs_io-Fix-out-of-tree-builds.patch | 27 +++++++++++
 ...-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch | 47 +++++++++++++++++++
 ...s-tools_1.14.0.bb => f2fs-tools_1.15.0.bb} |  4 +-
 3 files changed, 77 insertions(+), 1 deletion(-)
 create mode 100644 meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
 create mode 100644 meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch
 rename meta-filesystems/recipes-utils/f2fs-tools/{f2fs-tools_1.14.0.bb => f2fs-tools_1.15.0.bb} (74%)
diff mbox series

Patch

diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
new file mode 100644
index 0000000000..aa243bd9c0
--- /dev/null
+++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
@@ -0,0 +1,27 @@ 
+From f110e34d7a4929cdea647b98fa177cf1bccf8b1e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 21 Dec 2022 18:21:42 -0800
+Subject: [PATCH] f2fs_io: Fix out of tree builds
+
+Relative path does not work when searching for include files
+when srcdir != builddir
+
+Upstream-Status: Submitted [https://lore.kernel.org/linux-f2fs-devel/20221222022830.976309-1-raj.khem@gmail.com/T/#t]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/f2fs_io/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/f2fs_io/Makefile.am b/tools/f2fs_io/Makefile.am
+index 6c17db1..bc4f9d0 100644
+--- a/tools/f2fs_io/Makefile.am
++++ b/tools/f2fs_io/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Makefile.am
+ 
+ if LINUX
+-AM_CPPFLAGS = -I../../include
++AM_CPPFLAGS = -I$(top_srcdir)/include
+ AM_CFLAGS = -Wall
+ sbin_PROGRAMS = f2fs_io
+ f2fs_io_SOURCES = f2fs_io.c
diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch
new file mode 100644
index 0000000000..66a70bca8c
--- /dev/null
+++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch
@@ -0,0 +1,47 @@ 
+From 3c0314e1820afc9a98e890cc5f7973c3c81877f8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 21 Dec 2022 18:23:03 -0800
+Subject: [PATCH] f2fs_io: Define _FILE_OFFSET_BITS=64
+
+Remove _LARGEFILE64_SOURCE, this is redundant when _FILE_OFFSET_BITS=64
+additionally it fixes build with musl because the detection logic for
+lseek64 fails because when using _LARGEFILE64_SOURCE musl also define's
+lseek64 as an alias to lseek
+
+Upstream-Status: Submitted [https://lore.kernel.org/linux-f2fs-devel/20221222022830.976309-2-raj.khem@gmail.com/T/#u]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/libf2fs_io.c        | 4 +++-
+ tools/f2fs_io/f2fs_io.c | 4 ++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c
+index a392255..f02336c 100644
+--- a/lib/libf2fs_io.c
++++ b/lib/libf2fs_io.c
+@@ -11,7 +11,9 @@
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
+  */
+-#define _LARGEFILE64_SOURCE
++#ifndef _FILE_OFFSET_BITS
++#define _FILE_OFFSET_BITS 64
++#endif
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
+index 0edac6f..2a67927 100644
+--- a/tools/f2fs_io/f2fs_io.c
++++ b/tools/f2fs_io/f2fs_io.c
+@@ -12,8 +12,8 @@
+ #ifndef _LARGEFILE_SOURCE
+ #define _LARGEFILE_SOURCE
+ #endif
+-#ifndef _LARGEFILE64_SOURCE
+-#define _LARGEFILE64_SOURCE
++#ifndef _FILE_OFFSET_BITS
++#define _FILE_OFFSET_BITS 64
+ #endif
+ #ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.14.0.bb b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb
similarity index 74%
rename from meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.14.0.bb
rename to meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb
index fb71b18b60..5da059f738 100644
--- a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.14.0.bb
+++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb
@@ -7,8 +7,10 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=362b4b2594cd362b874a97718faa51d3"
 # to provide libuuid
 DEPENDS = "util-linux"
 
-SRCREV = "d41dcbdf46dc3841cd0a0507e6573e38cb6c55bb"
+SRCREV = "64f2596142800c215cb40a658ebd5793ed37c936"
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git;branch=master \
+           file://0001-f2fs_io-Fix-out-of-tree-builds.patch \
+           file://0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch \
            "
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"