add build patches, move /usr/sbin to /usr/bin

This commit is contained in:
Tobias Powalowski 2013-05-21 12:42:18 +00:00
parent df234e54c9
commit 4910f2daa3
3 changed files with 101 additions and 14 deletions

View File

@ -0,0 +1,50 @@
From d09689a5a2863043d007c1acb9bf0a8d1d3b776d Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Fri, 28 Dec 2012 06:43:35 +0000
Subject: [PATCH 069/364] Backport gnulib fixes for C11. Fixes Savannah bug
#37738.
* grub-core/gnulib/stdio.in.h (gets): Warn on use only if
HAVE_RAW_DECL_GETS.
* m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
---
ChangeLog | 8 ++++++++
grub-core/gnulib/stdio.in.h | 6 ++++--
m4/stdio_h.m4 | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
index 80b9dbf..a8b00c6 100644
--- a/grub-core/gnulib/stdio.in.h
+++ b/grub-core/gnulib/stdio.in.h
@@ -138,10 +138,12 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
#endif
/* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
+ so any use of gets warrants an unconditional warning; besides, C11
+ removed it. */
#undef gets
+#if HAVE_RAW_DECL_GETS
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index f5650cd..8458bec 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -37,7 +37,7 @@ AC_DEFUN([gl_STDIO_H],
dnl corresponding gnulib module is not in use, and which is not
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
- ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+ ]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat
snprintf tmpfile vdprintf vsnprintf])
])
--
1.8.1.4

View File

@ -8,7 +8,7 @@ _grub_915_ver=9
pkgname=('grub-common' 'grub-bios' 'grub-efi-i386')
pkgbase=grub
pkgver=2.00
pkgrel=1
pkgrel=2
url="https://www.gnu.org/software/grub/"
arch=('i686' 'x86_64')
license=('GPL3')
@ -23,21 +23,14 @@ source=("http://ftp.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
'grub.default'
'grub.cfg'
'20_memtest86+'
'grub_bzr_export.sh')
'grub_bzr_export.sh'
'0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch'
'grub-2.00-fix-docs.patch')
noextract=("grub2_extras_lua_r${_grub_lua_ver}.tar.xz"
"grub2_extras_ntldr-img_r${_grub_ntldr_ver}.tar.xz"
"grub2_extras_915resolution_r${_grub_915_ver}.tar.xz")
sha1sums=('274d91e96b56a5b9dd0a07accff69dbb6dfb596b'
'89290031b974780c6df76893836d2477d4add895'
'eb4b35b4c36b64f9405cbcbc538cb205171c1c0a'
'd5ae2efec25616028a9d89e98b6e454f1c4c415f'
'26e4e946190bea1f03632658cf08ba90e11dec57'
'dbf493dec4722feb11f0b5c71ad453a18daf0fc5'
'76ae862a945a8848e6999adf8ad1847f0f7008b9'
'ce35d7ae75cd1b5b677e894e528f96add40e77b9'
'0cfd4e51cdb14a92f06cfd3c607f2aa21f3e55fc')
_build_grub-common_and_bios() {
@ -71,7 +64,13 @@ _build_grub-common_and_bios() {
## Requires python2
# sed 's|python |python2 |g' -i "${srcdir}/grub_bios-${pkgver}/autogen.sh"
## start the actual build process
# fix compiling with gcc48
patch -Np1 -i ${srcdir}/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch
#fix docs compiling
patch -Np1 -i ${srcdir}/grub-2.00-fix-docs.patch
## start the actual build process
cd "${srcdir}/grub_bios-${pkgver}"
./autogen.sh
echo
@ -89,7 +88,7 @@ _build_grub-common_and_bios() {
--enable-grub-mount \
--prefix="/usr" \
--bindir="/usr/bin" \
--sbindir="/usr/sbin" \
--sbindir="/usr/bin" \
--mandir="/usr/share/man" \
--infodir="/usr/share/info" \
--datarootdir="/usr/share" \
@ -117,6 +116,12 @@ _build_grub-efi-i386() {
bsdtar xf "${srcdir}/grub2_extras_lua_r${_grub_lua_ver}.tar.xz" \
-C "${srcdir}/grub_efi-${pkgver}/grub-extras"
# fix compiling with gcc48
patch -Np1 -i ${srcdir}/0069-Backport-gnulib-fixes-for-C11.-Fixes-Savannah-bug-37.patch
#fix docs compiling
patch -Np1 -i ${srcdir}/grub-2.00-fix-docs.patch
cd "${srcdir}/grub_efi-${pkgver}"
./autogen.sh
echo
@ -134,7 +139,7 @@ _build_grub-efi-i386() {
--enable-grub-mount \
--prefix="/usr" \
--bindir="/usr/bin" \
--sbindir="/usr/sbin" \
--sbindir="/usr/bin" \
--mandir="/usr/share/man" \
--infodir="/usr/share/info" \
--datarootdir="/usr/share" \
@ -249,3 +254,14 @@ package_grub-efi-i386() {
rm -f "${pkgdir}/usr/lib/grub/i386-efi"/{kernel.exec,gdb_grub,gmodule.pl} || true
}
md5sums=('a1043102fbc7bcedbf53e7ee3d17ab91'
'704ea9f250b6137f05fa0197fd07053a'
'77f7d5f8ce395663cd7fff4d37099957'
'a80e2b1d3bab778c3b6117d5a698992f'
'3b3dae993939b4e323f19365dd830e12'
'a03ffd56324520393bf574cefccb893d'
'f184b060fe22eca662ad455c69241496'
'9b6358d3de5c4bb95a041ab7c44a21ec'
'f343ed2340ebc86c427873641bb72419'
'ab751d1d8cd3fd47e5ee24d71ecc31ed'
'342dd18472a24e5fd252458b24f39a29')

21
grub-2.00-fix-docs.patch Normal file
View File

@ -0,0 +1,21 @@
From 40d6b00fa48ae9c1cecf143da5c6061f6ffcb719 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com
Date: Tue, 12 Mar 2013 15:23:02 -0400
Subject: [PATCH] Fix docs
I think the doc generation tools got stricter, so fix up the .texi file
to work.
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
--- a/docs/grub-dev.texi
+++ b/docs/grub-dev.texi
@@ -1394,8 +1394,8 @@ grub_video_blit_glyph (&glyph, color, 0,
@node Bitmap API
@section Bitmap API
-@itemize
@subsection grub_video_bitmap_create
+@itemize
@item Prototype:
@example
grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)