linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs-tools: Fix cross-build problem caused by AC_CHECK_FILE abuse
@ 2018-08-28  0:29 Theodore Ts'o
  2018-08-28  3:44 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2018-08-28  0:29 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Helmut Grohne, Theodore Ts'o

From: Helmut Grohne <helmut@subdivi.de>

f2fs-tools fails to cross build from source, because its upstream
build system wrongly uses AC_CHECK_FILE. The purpose of the macro is
checking for files on the host system. However here it is used to
check whether a .git directory exists, which is a property of the
build place. A simple "test -d" should be used here. After doing so,
f2fs-tools cross builds successfully.

Addresses-Debian-Bug: #896909

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---

This was a FTCBFS problem reported by a Debian user:

	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896909

 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 62c18eb..f3e12d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,14 +20,14 @@ AC_DEFINE([F2FS_MINOR_VERSION], m4_bpatsubst(f2fs_tools_version,
 				[\([0-9]*\).\([0-9]*\)\(\w\|\W\)*], [\2]),
 				[Minor version for f2fs-tools])
 
-AC_CHECK_FILE(.git,
+AS_IF([test -d .git],[
 	AC_DEFINE([F2FS_TOOLS_DATE],
 		"m4_bpatsubst(f2fs_tools_gitdate,
 		[\([0-9-]*\)\(\w\|\W\)*], [\1])",
-		[f2fs-tools date based on Git commits]),
+		[f2fs-tools date based on Git commits])],[
 	AC_DEFINE([F2FS_TOOLS_DATE],
 		"f2fs_tools_date",
-		[f2fs-tools date based on Source releases]))
+		[f2fs-tools date based on Source releases])])
 
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
-- 
2.18.0.rc0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

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

* Re: [PATCH] f2fs-tools: Fix cross-build problem caused by AC_CHECK_FILE abuse
  2018-08-28  0:29 [PATCH] f2fs-tools: Fix cross-build problem caused by AC_CHECK_FILE abuse Theodore Ts'o
@ 2018-08-28  3:44 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-08-28  3:44 UTC (permalink / raw)
  To: Theodore Ts'o, linux-f2fs-devel; +Cc: Helmut Grohne

On 2018/8/28 8:29, Theodore Ts'o wrote:
> From: Helmut Grohne <helmut@subdivi.de>
> 
> f2fs-tools fails to cross build from source, because its upstream
> build system wrongly uses AC_CHECK_FILE. The purpose of the macro is
> checking for files on the host system. However here it is used to
> check whether a .git directory exists, which is a property of the
> build place. A simple "test -d" should be used here. After doing so,
> f2fs-tools cross builds successfully.
> 
> Addresses-Debian-Bug: #896909
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

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

end of thread, other threads:[~2018-08-28  3:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28  0:29 [PATCH] f2fs-tools: Fix cross-build problem caused by AC_CHECK_FILE abuse Theodore Ts'o
2018-08-28  3:44 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).