* [PATCH] grub-efi-native: fix build on modern distributions without gets()
@ 2013-04-18 15:10 Koen Kooi
2013-05-01 20:39 ` Darren Hart
0 siblings, 1 reply; 3+ messages in thread
From: Koen Kooi @ 2013-04-18 15:10 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
O irony: the grub2/gnulib nag macro that says "don't use gets, use fgets" breaks the build if you're using a recent (e)glibc release that has gets removed.
Fedora already #if 0's the check in grub, so I stole their patch.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
.../grub-2.00-ignore-gnulib-gets-stupidity.patch | 28 ++++++++++++++++++++++
meta/recipes-bsp/grub/grub-efi-native_2.00.bb | 3 ++-
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
diff --git a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
new file mode 100644
index 0000000..70f6001
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
@@ -0,0 +1,28 @@
+From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Fri, 25 May 2012 15:28:19 -0400
+Subject: [PATCH] gnulib accused in build breaking shocker.
+
+Upstream-Status: pending [Fedora will push this]
+
+---
+ grub-core/gnulib/stdio.in.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
+index 80b9dbf..69932d9 100644
+--- a/grub-core/gnulib/stdio.in.h
++++ b/grub-core/gnulib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
++#if 0
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+--
+1.7.10.1
+
diff --git a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
index 6f8ba8e..2a5dad7 100644
--- a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
# FIXME: We should be able to optionally drop freetype as a dependency
DEPENDS = "autogen-native"
RDEPENDS_${PN} = "diffutils freetype"
-PR = "r1"
+PR = "r2"
# Native packages do not normally rebuild when the target changes.
# Ensure this is built once per HOST-TARGET pair.
@@ -28,6 +28,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://grub-2.00-disable-help2man.patch \
file://check-if-liblzma-is-disabled.patch \
file://grub-no-unused-result.patch \
+ file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
"
SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] grub-efi-native: fix build on modern distributions without gets()
2013-04-18 15:10 [PATCH] grub-efi-native: fix build on modern distributions without gets() Koen Kooi
@ 2013-05-01 20:39 ` Darren Hart
2013-05-02 6:07 ` Koen Kooi
0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2013-05-01 20:39 UTC (permalink / raw)
To: Koen Kooi; +Cc: openembedded-core
Hi Koen,
Please Cc recipe authors.
On 04/18/2013 08:10 AM, Koen Kooi wrote:
> O irony: the grub2/gnulib nag macro that says "don't use gets, use fgets" breaks the build if you're using a recent (e)glibc release that has gets removed.
Please ensure your git log wraps at around 72 chars to ensure it isn't
truncated in the git log output in a typical terminal.
>
> Fedora already #if 0's the check in grub, so I stole their patch.
Perfect :-)
>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
More below...
> ---
> .../grub-2.00-ignore-gnulib-gets-stupidity.patch | 28 ++++++++++++++++++++++
> meta/recipes-bsp/grub/grub-efi-native_2.00.bb | 3 ++-
> 2 files changed, 30 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
>
> diff --git a/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
> new file mode 100644
> index 0000000..70f6001
> --- /dev/null
> +++ b/meta/recipes-bsp/grub/files/grub-2.00-ignore-gnulib-gets-stupidity.patch
> @@ -0,0 +1,28 @@
> +From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
> +From: Peter Jones <pjones@redhat.com>
> +Date: Fri, 25 May 2012 15:28:19 -0400
> +Subject: [PATCH] gnulib accused in build breaking shocker.
> +
> +Upstream-Status: pending [Fedora will push this]
> +
> +---
> + grub-core/gnulib/stdio.in.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
> +index 80b9dbf..69932d9 100644
> +--- a/grub-core/gnulib/stdio.in.h
> ++++ b/grub-core/gnulib/stdio.in.h
> +@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
> + so any use of gets warrants an unconditional warning. Assume it is
> + always declared, since it is required by C89. */
> + #undef gets
> ++#if 0
> + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
> ++#endif
> +
> + #if @GNULIB_FOPEN@
> + # if @REPLACE_FOPEN@
> +--
> +1.7.10.1
> +
> diff --git a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
> index 6f8ba8e..2a5dad7 100644
> --- a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
> +++ b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb
> @@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> # FIXME: We should be able to optionally drop freetype as a dependency
> DEPENDS = "autogen-native"
> RDEPENDS_${PN} = "diffutils freetype"
> -PR = "r1"
> +PR = "r2"
>
> # Native packages do not normally rebuild when the target changes.
> # Ensure this is built once per HOST-TARGET pair.
> @@ -28,6 +28,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
> file://grub-2.00-disable-help2man.patch \
> file://check-if-liblzma-is-disabled.patch \
> file://grub-no-unused-result.patch \
> + file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
"
Please be consistent with whitespace above. I prefer TABs be used
exclusively for indentation with spaces used for alignment. The above is
purely alignment. However, others prefer TABs for as much of either as
possible. Either is fine, but it must be consistent throughout the file.
In this case, please use spaces.
> SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
> SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
>
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] grub-efi-native: fix build on modern distributions without gets()
2013-05-01 20:39 ` Darren Hart
@ 2013-05-02 6:07 ` Koen Kooi
0 siblings, 0 replies; 3+ messages in thread
From: Koen Kooi @ 2013-05-02 6:07 UTC (permalink / raw)
To: Darren Hart; +Cc: openembedded-core
Op 1 mei 2013, om 22:39 heeft Darren Hart <dvhart@linux.intel.com> het volgende geschreven:
>> # Native packages do not normally rebuild when the target changes.
>> # Ensure this is built once per HOST-TARGET pair.
>> @@ -28,6 +28,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
>> file://grub-2.00-disable-help2man.patch \
>> file://check-if-liblzma-is-disabled.patch \
>> file://grub-no-unused-result.patch \
>> + file://grub-2.00-ignore-gnulib-gets-stupidity.patch \
> "
>
> Please be consistent with whitespace above. I prefer TABs be used
> exclusively for indentation with spaces used for alignment. The above is
> purely alignment. However, others prefer TABs for as much of either as
> possible. Either is fine, but it must be consistent throughout the file.
> In this case, please use spaces.
I only use tabs in shell methods for oe-core, I just copied the indentation of the line above, which mixes tabs and spaces.
regards,
Koen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-02 6:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 15:10 [PATCH] grub-efi-native: fix build on modern distributions without gets() Koen Kooi
2013-05-01 20:39 ` Darren Hart
2013-05-02 6:07 ` Koen Kooi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.