Skip to contentSkip to conversation

grub2: fix do_configure failure when largefile is not in DISTRO_FEATURES

PATCH In review Chen Qi 3 participants 6 messages Apr 7, 2016 – Apr 11, 2016

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover grub2: fix do_configure failure when largefile is not in DISTRO_FEATURES

The following changes since commit 5ebea1114d54120d5ff5d8a6cd148110d0fda23f:

build-appliance-image: Update to master head revision (2016-04-06 23:54:57 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/grub2-largefile
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/grub2-largefile

Chen Qi (1):
grub2: fix do_configure failure when largefile is not in
DISTRO_FEATURES

 ...-configure.ac-support-disabling-largefile.patch | 44 ++++++++++++++++++++++
 meta/recipes-bsp/grub/grub2.inc                    |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 grub2: fix do_configure failure when largefile is not in DISTRO_FEATURES

When 'largefile' is not in DISTRO_FEATURES, '--disable-largefile' is passed to the configure options. However, the configure script checks the size of off_t regardless of this option. This raises the following error.

configure: error: Large file support is required

This patch fixes the above problem.

---
 ...-configure.ac-support-disabling-largefile.patch | 44 ++++++++++++++++++++++
 meta/recipes-bsp/grub/grub2.inc                    |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch
meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch new file +44 -0
new file mode 100644
index 0000000..e22dc00
@@ -0,0 +1,44 @@
+Upstream-Status: Pending
+
+Subject: configure.ac: support disabling largefile
+
+Do not check off_t size when largefile is disabled.
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ configure.ac | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index df20991..14ff7ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -306,13 +306,18 @@ if test x$grub_cv_apple_cc = xyes ; then
+   HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
+ fi
+ 
+-case "$host_os" in
+-  cygwin | windows* | mingw32* | aros*)
+-     ;;
+-  *)
+-     AC_CHECK_SIZEOF(off_t)
+-     test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
+-esac
++AC_ARG_ENABLE([largefile],
++              [AS_HELP_STRING([--enable-largefile],
++                             [Enable large file support (default=guessed)])])
++if test x"$enable_largefile" = xyes ; then
++  case "$host_os" in
++    cygwin | windows* | mingw32* | aros*)
++       ;;
++    *)
++       AC_CHECK_SIZEOF(off_t)
++       test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
++  esac
++fi
+ 
+ if test x$USE_NLS = xno; then
+   HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
+-- 
+1.9.1
+
meta/recipes-bsp/grub/grub2.inc +1 -0
index 146dde6..6cd8d36 100644
@@ -30,6 +30,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
            file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
            file://fix-texinfo.patch \
+           file://0001-configure.ac-support-disabling-largefile.patch \
             "
 
 DEPENDS = "flex-native bison-native"
Signature · 1 line
1.9.1
#2 lore raw
Quoted 2 lines · Chen Qi

configure: error: Large file support is required

Is it safe to ignore configure.ac telling you that large file support is required?

Ross

author
#3 lore raw
Quoted 9 lines · Ross

On 7 April 2016 at 10:22, Chen Qi <[email protected] <mailto:[email protected]>> wrote:

configure: error: Large file support is required

Is it safe to ignore configure.ac <http://configure.ac> telling you that large file support is required?

Ross

Frankly I'm not sure about it ...
Maybe Khem has more knowledge in this area.

Best Regards,
Chen Qi

#4 lore raw
Quoted 10 lines · ChenQi
Quoted 8 lines · Ross
Quoted 2 lines · Chen Qi

configure: error: Large file support is required

Is it safe to ignore configure.ac telling you that large file support is

required?

Quoted 7 lines
Quoted 2 lines

Ross

Frankly I'm not sure about it ...
Maybe Khem has more knowledge in this area.

We cache sizeof off_t with out considering lfs support thats the fundamental problem. We should probably stop doing that.

Quoted 2 lines

Best Regards,
Chen Qi

#5 lore raw
Quoted 4 lines · Khem Raj

We cache sizeof off_t with out considering lfs support thats the fundamental problem. We should probably stop doing that.

Thanks for reminding me, patch on the list shortly.

Ross