SHA256
1
0
forked from pool/grub2

Accepting request 179591 from home:arvidjaar:grub2-next

Now Fedora is using trunk as well, just serialized - every commit
as separate patch on top of base 2.00 version. So we are not alone
and can move along.

Please test.

OBS-URL: https://build.opensuse.org/request/show/179591
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=42
This commit is contained in:
Jiri Slaby 2013-06-18 17:11:34 +00:00 committed by Git OBS Bridge
parent daeb537263
commit 608d5e43ad
25 changed files with 23779 additions and 10127 deletions

View File

@ -1,36 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Date: Fri Jan 4 09:46:56 UTC 2013
Subject: properly quote translated strings in grub.cfg
References: bnc#775610
Patch-Mainline: no
Add support for chainloading another bootloader on UEFI systems.
This requires additional os-prober support to be actually useful.
Index: grub-2.00/util/grub.d/30_os-prober.in
===================================================================
--- grub-2.00.orig/util/grub.d/30_os-prober.in
+++ grub-2.00/util/grub.d/30_os-prober.in
@@ -144,6 +144,22 @@ EOF
}
EOF
;;
+ efi)
+
+ EFIPATH=${DEVICE#*@}
+ DEVICE=${DEVICE%@*}
+ onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
+ cat << EOF
+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {
+EOF
+ save_default_entry | sed -e "s/^/\t/"
+ prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+
+ cat <<EOF
+ chainloader ${EFIPATH}
+}
+EOF
+ ;;
linux)
LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
prepare_boot_cache=

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +0,0 @@
From 61474615b8e177881caa89fc04cae16019cf01b9 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Wed, 15 Aug 2012 14:37:07 -0400
Subject: [PATCH] efidisk: Read chunks in smaller blocks
---
grub-core/disk/efi/efidisk.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
index a432b44..77ab5b0 100644
--- a/grub-core/disk/efi/efidisk.c
+++ b/grub-core/disk/efi/efidisk.c
@@ -546,6 +546,9 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
struct grub_efidisk_data *d;
grub_efi_block_io_t *bio;
grub_efi_status_t status;
+ grub_size_t remaining = size;
+ grub_size_t read = 0;
+ grub_size_t chunk = 0x500;
d = disk->data;
bio = d->block_io;
@@ -554,14 +557,29 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
"reading 0x%lx sectors at the sector 0x%llx from %s\n",
(unsigned long) size, (unsigned long long) sector, disk->name);
+ while (remaining > chunk) {
+ status = efi_call_5 (bio->read_blocks, bio, bio->media->media_id,
+ (grub_efi_uint64_t) sector + read,
+ (grub_efi_uintn_t) chunk << disk->log_sector_size,
+ buf + (read << disk->log_sector_size));
+ if (status != GRUB_EFI_SUCCESS)
+ return grub_error (GRUB_ERR_READ_ERROR,
+ N_("failure reading sector 0x%llx from `%s'"),
+ (unsigned long long) sector + read,
+ disk->name);
+ read += chunk;
+ remaining -= chunk;
+ }
+
status = efi_call_5 (bio->read_blocks, bio, bio->media->media_id,
- (grub_efi_uint64_t) sector,
- (grub_efi_uintn_t) size << disk->log_sector_size,
- buf);
+ (grub_efi_uint64_t) sector + read,
+ (grub_efi_uintn_t) remaining << disk->log_sector_size,
+ buf + (read << disk->log_sector_size));
+
if (status != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_READ_ERROR,
N_("failure reading sector 0x%llx from `%s'"),
- (unsigned long long) sector,
+ (unsigned long long) sector + read,
disk->name);
return GRUB_ERR_NONE;
--
1.7.11.2

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f4d92ad2353a226412ee395036401714b81f2371494b365dad52f7fbcf87034
size 6006924
oid sha256:e50be331c1aab4bf45c2290e755089c0bb8909ca57b6a1c9da9301e298cbc732
size 5025068

View File

@ -1,39 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: add "(on /dev/XXX)" to top level os-prober Linux menu entries
References: bnc#796919
1. It disambiguates multiple instances of the same OS if present.
2. It allows menu entry to be skipped by another os-prober. Otherwise
it may result in endless recursion.
Index: grub-2.00/util/grub.d/30_os-prober.in
===================================================================
--- grub-2.00.orig/util/grub.d/30_os-prober.in
+++ grub-2.00/util/grub.d/30_os-prober.in
@@ -202,7 +202,7 @@ EOF
if [ "x$is_first_entry" = xtrue ]; then
cat << EOF
-menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
+menuentry '$(echo "$OS $onstr" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
EOF
save_default_entry | sed -e "s/^/\t/"
printf '%s\n' "${prepare_boot_cache}"
@@ -217,7 +217,7 @@ EOF
cat << EOF
}
EOF
- echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
+ echo "submenu '$(gettext_printf "Advanced options for %s" "${OS} $onstr" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
is_first_entry=false
fi
title="${LLABEL} $onstr"
@@ -238,7 +238,7 @@ EOF
}
EOF
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
- replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
+ replacement_title="$(echo "Advanced options for ${OS} $onstr" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"

View File

@ -1,26 +0,0 @@
Suse has its fonts in /usr/share/fonts/uni, so use it.
---
--- a/configure.ac 2012-06-06 10:36:33 +0000
+++ b/configure.ac 2012-06-24 13:24:26 +0000
@@ -242,7 +242,7 @@
FONT_SOURCE=
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni; do
if test -f "$dir/unifont.$ext"; then
FONT_SOURCE="$dir/unifont.$ext"
break 2
--- a/configure
+++ b/configure
@@ -4126,7 +4126,7 @@ fi
FONT_SOURCE=
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni; do
if test -f "$dir/unifont.$ext"; then
FONT_SOURCE="$dir/unifont.$ext"
break 2

View File

@ -1,37 +0,0 @@
From b9701a5d7a60dac218d9bb309560cd4aab57b6cd Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Thu, 25 Oct 2012 14:18:31 +0800
Subject: [PATCH] fix build error on flex-2.5.37
Patch-Mainline: no
New flex version 2.5.37 introduces build error like this
[ 420s] grub_script.yy.c: In function 'yy_scan_bytes':
[ 420s] grub_script.yy.c:2296:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
[ 420s] ./grub-core/script/yylex.l: At top level:
[ 420s] grub_script.yy.c:2351:13: error: 'yy_fatal_error' defined but not used [-Werror=unused-function]
[ 420s] cc1: all warnings being treated as errors
This patch ignore the two diagnostic pragmas as a temporal fix, hope
someone could dig into it and get the root cause.
---
grub-core/script/yylex.l | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
index f6a39c5..f4ff2bd 100644
--- a/grub-core/script/yylex.l
+++ b/grub-core/script/yylex.l
@@ -29,6 +29,8 @@
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wunused-function"
#define yyfree grub_lexer_yyfree
#define yyalloc grub_lexer_yyalloc
--
1.7.3.4

View File

@ -1,38 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] fix off by one error in enumerating MSDOS partitions
References: bnc#779534
As reported in https://bugzilla.novell.com/show_bug.cgi?id=779534,
grub2 assigns incorrect partition number to extended partitions.
This is due to slightly non-standard EBR which contains single extended
partition record, but no normal partition. Due to incorrect p.number
comparison, grub2 includes it in partition numbering.
With standard EBR first entry is "true" partition that correctly
gets assigned next available number.
At the point of comparison p.number is one less than partition
number; so make correct comparison.
Actual partition chain is visible in this attachement:
http://bugzilla.novell.com/attachment.cgi?id=519076
Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
---
grub-core/partmap/msdos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: grub-2.00/grub-core/partmap/msdos.c
===================================================================
--- grub-2.00.orig/grub-core/partmap/msdos.c
+++ grub-2.00/grub-core/partmap/msdos.c
@@ -196,7 +196,7 @@ grub_partition_msdos_iterate (grub_disk_
return grub_errno;
}
}
- else if (p.number < 4)
+ else if (p.number < 3)
/* If this partition is a logical one, shouldn't increase the
partition number. */
p.number++;

View File

@ -1,35 +0,0 @@
From 4b5567de4546b48e5911a45eba184c92ec45eed0 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Wed, 18 Jul 2012 15:11:59 +0800
Subject: [PATCH] fix mo not copied to ${grubdir}/locale/
References: bnc#771393
Patch-Mainline: no
The hard-coded grub.mo should be replaced by @PACKAGE@.mo. For
people who configure to use other package name, the hard-coded
grub.mo is not matched thus not copied to ${grubdir}/locale. This
patch fixes the issue by using @PACKAGE@.mo to correct match the
file name.
---
util/grub-install.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/grub-install.in b/util/grub-install.in
index 3a7d332..af4e2e2 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -545,8 +545,8 @@ fi
# Copy gettext files
mkdir -p "${grubdir}"/locale/
for dir in "${localedir}"/*; do
- if test -f "$dir/LC_MESSAGES/grub.mo"; then
- cp -f "$dir/LC_MESSAGES/grub.mo" "${grubdir}/locale/${dir##*/}.mo"
+ if test -f "$dir/LC_MESSAGES/@PACKAGE@.mo"; then
+ cp -f "$dir/LC_MESSAGES/@PACKAGE@.mo" "${grubdir}/locale/${dir##*/}.mo"
fi
done
--
1.7.3.4

View File

@ -1,38 +0,0 @@
From: Vladimir Serbinenko <phcoder@gmail.com>
Subject: grub-core/net/tftp.c: fix endianness problem.
* grub-core/net/tftp.c (ack): Fix endianness problem.
(tftp_receive): Likewise.
Reported by: Michael Davidsave
Signed-off-by: Michael Chang <mchang@suse.com>
---
grub-core/net/tftp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
index 9c70efb..d0f39ea 100644
--- a/grub-core/net/tftp.c
+++ b/grub-core/net/tftp.c
@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
tftph_ack = (struct tftphdr *) nb_ack.data;
tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
- tftph_ack->u.ack.block = block;
+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
err = grub_net_send_udp_packet (data->sock, &nb_ack);
if (err)
@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
grub_priority_queue_pop (data->pq);
if (file->device->net->packs.count < 50)
- err = ack (data, tftph->u.data.block);
+ err = ack (data, data->block + 1);
else
{
file->device->net->stall = 1;
--
1.7.3.4

View File

@ -1,42 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] return failure from grub-mount if fuse_main failed
Currently there is no way to check that mount was successful. It caused
problem with os-prober which did not try kernel mount fallback.
Return value of fuse_init is currenty unused, but still it looks wrong
to always return success. In this case it should simply be void; if it
returns value, let value be correct.
Ref: https://bugzilla.novell.com/show_bug.cgi?id=802983
Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
---
util/grub-mount.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: grub-2.00/util/grub-mount.c
===================================================================
--- grub-2.00.orig/util/grub-mount.c
+++ grub-2.00/util/grub-mount.c
@@ -383,7 +383,8 @@ fuse_init (void)
return grub_errno;
}
- fuse_main (fuse_argc, fuse_args, &grub_opers, NULL);
+ if (fuse_main (fuse_argc, fuse_args, &grub_opers, NULL))
+ grub_error (GRUB_ERR_UNKNOWN_FS, "fuse_main failed");
for (i = 0; i < num_disks; i++)
{
@@ -403,7 +404,7 @@ fuse_init (void)
grub_free (loop_name);
}
- return GRUB_ERR_NONE;
+ return grub_errno;
}
static struct argp_option options[] = {

View File

@ -20,7 +20,7 @@ Index: grub-2.00/grub-core/partmap/msdos.c
===================================================================
--- grub-2.00.orig/grub-core/partmap/msdos.c
+++ grub-2.00/grub-core/partmap/msdos.c
@@ -181,13 +181,20 @@ grub_partition_msdos_iterate (grub_disk_
@@ -188,13 +188,20 @@ grub_partition_msdos_iterate (grub_disk_
(unsigned long long) p.len);
/* If this partition is a normal one, call the hook. */
@ -33,16 +33,16 @@ Index: grub-2.00/grub-core/partmap/msdos.c
+ {
+ p.number++;
- if (hook (disk, &p))
- if (hook (disk, &p, hook_data))
- return grub_errno;
+ /* prevent someone doing mkfs or mkswap on an
+ extended partition, but leave room for LILO */
+ if (grub_msdos_partition_is_extended (e->type))
+ p.len = 2;
+
+ if (hook (disk, &p))
+ if (hook (disk, &p, hook_data))
+ return grub_errno;
+ }
}
else if (p.number < 4)
else if (p.number < 3)
/* If this partition is a logical one, shouldn't increase the

View File

@ -0,0 +1,27 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Subject: disable rsync to make it possible to use in RPM build
We need to create po/LINGUAS to generate message catalogs. Use
linguas.sh to ensure we always use the same rules as upstream, but
disable rsync.
Index: grub-2.00/linguas.sh
===================================================================
--- grub-2.00.orig/linguas.sh
+++ grub-2.00/linguas.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-rsync -Lrtvz --exclude=ko.po translationproject.org::tp/latest/grub/ po
+#rsync -Lrtvz --exclude=ko.po translationproject.org::tp/latest/grub/ po
autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
@@ -14,7 +14,7 @@ done
(
cd po && ls *.po| cut -d. -f1
for x in $autogenerated; do
- echo "$x";
+ : echo "$x";
done
) | sort | uniq | xargs
) >po/LINGUAS

View File

@ -1,7 +1,7 @@
Index: grub-1.99/util/grub.d/10_linux.in
Index: grub-2.00/util/grub.d/10_linux.in
===================================================================
--- grub-1.99.orig/util/grub.d/10_linux.in
+++ grub-1.99/util/grub.d/10_linux.in
--- grub-2.00.orig/util/grub.d/10_linux.in
+++ grub-2.00/util/grub.d/10_linux.in
@@ -31,7 +31,7 @@ CLASS="--class gnu-linux --class gnu --c
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
@ -11,10 +11,10 @@ Index: grub-1.99/util/grub.d/10_linux.in
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
fi
@@ -116,7 +116,7 @@ EOF
@@ -135,7 +135,7 @@ linux_entry ()
message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
echo '$message'
echo '$(echo "$message" | grub_quote)'
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args}
EOF

View File

@ -1,122 +0,0 @@
From: Andrey Borzenkov <arvidjaar@gmail.com>
Date: Mon Nov 19 16:40:25 UTC 2012
Subject: properly quote translated strings in grub.cfg
References: bnc#790195
Patch-Mainline: no
Not all translated strings in grub.cfg were properly quoted. This
resulted in parser errors for languages that contained literal single
quote in translations.
Upstream commit 4558
Index: grub-2.00/util/grub.d/10_hurd.in
===================================================================
--- grub-2.00.orig/util/grub.d/10_hurd.in
+++ grub-2.00/util/grub.d/10_hurd.in
@@ -117,7 +117,7 @@ EOF
opts=
fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
EOF
@@ -133,7 +133,7 @@ EOF
fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
Index: grub-2.00/util/grub.d/10_kfreebsd.in
===================================================================
--- grub-2.00.orig/util/grub.d/10_kfreebsd.in
+++ grub-2.00/util/grub.d/10_kfreebsd.in
@@ -100,7 +100,7 @@ kfreebsd_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
kfreebsd ${rel_dirname}/${basename} ${args}
EOF
Index: grub-2.00/util/grub.d/10_linux.in
===================================================================
--- grub-2.00.orig/util/grub.d/10_linux.in
+++ grub-2.00/util/grub.d/10_linux.in
@@ -134,14 +134,14 @@ linux_entry ()
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
initrd ${rel_dirname}/${initrd}
EOF
fi
Index: grub-2.00/util/grub.d/20_linux_xen.in
===================================================================
--- grub-2.00.orig/util/grub.d/20_linux_xen.in
+++ grub-2.00/util/grub.d/20_linux_xen.in
@@ -120,16 +120,16 @@ linux_entry ()
xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$xmessage'
+ echo '$(echo "$xmessage" | grub_quote)'
multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
- echo '$lmessage'
+ echo '$(echo "$lmessage" | grub_quote)'
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module ${rel_dirname}/${initrd}
EOF
fi
Index: grub-2.00/util/grub-mkconfig_lib.in
===================================================================
--- grub-2.00.orig/util/grub-mkconfig_lib.in
+++ grub-2.00/util/grub-mkconfig_lib.in
@@ -260,19 +260,19 @@ version_find_latest ()
echo "$version_find_latest_a"
}
-# One layer of quotation is eaten by "", the second by sed, and the third by
-# printf; so this turns ' into \'. Note that you must use the output of
+# One layer of quotation is eaten by "" and the second by
+# sed; so this turns ' into \'. Note that you must use the output of
# this function in a printf format string.
grub_quote () {
- sed "s/'/'\\\\\\\\''/g"
+ sed "s/'/'\\\\''/g"
}
gettext_quoted () {
- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
+ gettext "$@" | grub_quote
}
-# Run the first argument through gettext_quoted, and then pass that and all
+# Run the first argument through gettext, and then pass that and all
# remaining arguments to printf. This is a useful abbreviation and tends to
# be easier to type.
gettext_printf () {

View File

@ -15,11 +15,11 @@ Signed-off-by: Michael Chang <mchang@suse.com>
5 files changed, 415 insertions(+), 0 deletions(-)
create mode 100644 grub-core/loader/i386/efi/linux.c
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 39e77a4..f9cbfc3 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1415,6 +1415,14 @@ module = {
Index: grub-2.00/grub-core/Makefile.core.def
===================================================================
--- grub-2.00.orig/grub-core/Makefile.core.def
+++ grub-2.00/grub-core/Makefile.core.def
@@ -1453,6 +1453,14 @@ module = {
};
module = {
@ -34,11 +34,11 @@ index 39e77a4..f9cbfc3 100644
name = chain;
efi = loader/efi/chainloader.c;
i386_pc = loader/i386/pc/chainloader.c;
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index a2edc84..88b2557 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -47,6 +47,38 @@ static grub_efi_uintn_t finish_desc_size;
Index: grub-2.00/grub-core/kern/efi/mm.c
===================================================================
--- grub-2.00.orig/grub-core/kern/efi/mm.c
+++ grub-2.00/grub-core/kern/efi/mm.c
@@ -47,6 +47,38 @@ static grub_efi_uintn_t finish_desc_size
static grub_efi_uint32_t finish_desc_version;
int grub_efi_is_finished = 0;
@ -77,11 +77,10 @@ index a2edc84..88b2557 100644
/* Allocate pages. Return the pointer to the first of allocated pages. */
void *
grub_efi_allocate_pages (grub_efi_physical_address_t address,
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
new file mode 100644
index 0000000..b79e632
Index: grub-2.00/grub-core/loader/i386/efi/linux.c
===================================================================
--- /dev/null
+++ b/grub-core/loader/i386/efi/linux.c
+++ grub-2.00/grub-core/loader/i386/efi/linux.c
@@ -0,0 +1,371 @@
+/*
+ * GRUB -- GRand Unified Bootloader
@ -179,13 +178,13 @@ index 0000000..b79e632
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ if (initrd_mem)
+ grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(params->ramdisk_size));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)initrd_mem, BYTES_TO_PAGES(params->ramdisk_size));
+ if (linux_cmdline)
+ grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(params->cmdline_size + 1));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)linux_cmdline, BYTES_TO_PAGES(params->cmdline_size + 1));
+ if (kernel_mem)
+ grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
+ if (params)
+ grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)params, BYTES_TO_PAGES(16384));
+ return GRUB_ERR_NONE;
+}
+
@ -233,7 +232,7 @@ index 0000000..b79e632
+ }
+
+ params->ramdisk_size = size;
+ params->ramdisk_image = (grub_uint32_t)(grub_uint64_t) initrd_mem;
+ params->ramdisk_image = (grub_uint32_t)(grub_addr_t) initrd_mem;
+
+ ptr = initrd_mem;
+
@ -260,7 +259,7 @@ index 0000000..b79e632
+ grub_free (files);
+
+ if (initrd_mem && grub_errno)
+ grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(size));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)initrd_mem, BYTES_TO_PAGES(size));
+
+ return grub_errno;
+}
@ -369,7 +368,7 @@ index 0000000..b79e632
+ linux_cmdline + sizeof (LINUX_IMAGE) - 1,
+ lh.cmdline_size - (sizeof (LINUX_IMAGE) - 1));
+
+ lh.cmd_line_ptr = (grub_uint32_t)(grub_uint64_t)linux_cmdline;
+ lh.cmd_line_ptr = (grub_uint32_t)(grub_addr_t)linux_cmdline;
+
+ handover_offset = lh.handover_offset;
+
@ -406,7 +405,7 @@ index 0000000..b79e632
+ {
+ grub_loader_set (grub_linuxefi_boot, grub_linuxefi_unload, 0);
+ loaded = 1;
+ lh.code32_start = (grub_uint32_t)(grub_uint64_t) kernel_mem;
+ lh.code32_start = (grub_uint32_t)(grub_addr_t) kernel_mem;
+ }
+
+ memcpy(params, &lh, 2 * 512);
@ -425,13 +424,13 @@ index 0000000..b79e632
+ }
+
+ if (linux_cmdline && !loaded)
+ grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(lh.cmdline_size + 1));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)linux_cmdline, BYTES_TO_PAGES(lh.cmdline_size + 1));
+
+ if (kernel_mem && !loaded)
+ grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
+
+ if (params && !loaded)
+ grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
+ grub_efi_free_pages((grub_efi_physical_address_t)(grub_addr_t)params, BYTES_TO_PAGES(16384));
+
+ return grub_errno;
+}
@ -454,11 +453,11 @@ index 0000000..b79e632
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index e67d92b..1b0e7ae 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -40,6 +40,9 @@ void EXPORT_FUNC(grub_efi_stall) (grub_efi_uintn_t microseconds);
Index: grub-2.00/include/grub/efi/efi.h
===================================================================
--- grub-2.00.orig/include/grub/efi/efi.h
+++ grub-2.00/include/grub/efi/efi.h
@@ -40,6 +40,9 @@ void EXPORT_FUNC(grub_efi_stall) (grub_e
void *
EXPORT_FUNC(grub_efi_allocate_pages) (grub_efi_physical_address_t address,
grub_efi_uintn_t pages);
@ -468,10 +467,10 @@ index e67d92b..1b0e7ae 100644
void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address,
grub_efi_uintn_t pages);
int
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
index 9d064c8..c29c5af 100644
--- a/include/grub/i386/linux.h
+++ b/include/grub/i386/linux.h
Index: grub-2.00/include/grub/i386/linux.h
===================================================================
--- grub-2.00.orig/include/grub/i386/linux.h
+++ grub-2.00/include/grub/i386/linux.h
@@ -139,6 +139,7 @@ struct linux_kernel_header
grub_uint64_t setup_data;
grub_uint64_t pref_address;
@ -480,6 +479,3 @@ index 9d064c8..c29c5af 100644
} __attribute__ ((packed));
/* Boot parameters for Linux based on 2.6.12. This is used by the setup
--
1.7.3.4

View File

@ -25,9 +25,9 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
===================================================================
--- grub-2.00.orig/grub-core/loader/efi/chainloader.c
+++ grub-2.00/grub-core/loader/efi/chainloader.c
@@ -36,15 +36,31 @@
#include <grub/i18n.h>
#include <grub/net.h>
@@ -40,15 +40,31 @@
#include <grub/i386/macho.h>
#endif
+#ifdef __x86_64__
+#define SUPPORT_SECURE_BOOT
@ -57,7 +57,7 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
static grub_err_t
grub_chainloader_unload (void)
@@ -59,6 +75,7 @@ grub_chainloader_unload (void)
@@ -63,6 +79,7 @@ grub_chainloader_unload (void)
grub_free (cmdline);
cmdline = 0;
file_path = 0;
@ -65,7 +65,7 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
grub_dl_unref (my_mod);
return GRUB_ERR_NONE;
@@ -186,19 +203,466 @@ make_file_path (grub_efi_device_path_t *
@@ -190,12 +207,460 @@ make_file_path (grub_efi_device_path_t *
return file_path;
}
@ -527,14 +527,15 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
grub_efi_status_t status;
grub_efi_boot_services_t *b;
grub_device_t dev = 0;
grub_efi_device_path_t *dp = 0;
@@ -203,7 +668,6 @@ grub_cmd_chainloader (grub_command_t cmd
grub_efi_loaded_image_t *loaded_image;
char *filename;
void *boot_image = 0;
- grub_efi_handle_t dev_handle = 0;
if (argc == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
@@ -210,9 +674,36 @@ grub_cmd_chainloader (grub_command_t cmd
@@ -215,9 +679,36 @@ grub_cmd_chainloader (grub_command_t cmd
address = 0;
image_handle = 0;
file_path = 0;
@ -571,7 +572,7 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
file = grub_file_open (filename);
if (! file)
goto fail;
@@ -258,14 +749,14 @@ grub_cmd_chainloader (grub_command_t cmd
@@ -263,14 +754,14 @@ grub_cmd_chainloader (grub_command_t cmd
grub_printf ("file path: ");
grub_efi_print_device_path (file_path);
@ -589,20 +590,44 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
GRUB_EFI_LOADER_CODE,
@@ -278,7 +769,7 @@ grub_cmd_chainloader (grub_command_t cmd
goto fail;
@@ -284,7 +775,7 @@ grub_cmd_chainloader (grub_command_t cmd
}
- if (grub_file_read (file, (void *) ((grub_addr_t) address), size) != size)
+ if (grub_file_read (file, (void *) ((grub_addr_t) address), fsize) != fsize)
boot_image = (void *) ((grub_addr_t) address);
- if (grub_file_read (file, boot_image, size) != size)
+ if (grub_file_read (file, boot_image, fsize) != fsize)
{
if (grub_errno == GRUB_ERR_NONE)
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
@@ -287,8 +778,17 @@ grub_cmd_chainloader (grub_command_t cmd
goto fail;
@@ -294,7 +785,7 @@ grub_cmd_chainloader (grub_command_t cmd
}
#if defined (__i386__) || defined (__x86_64__)
- if (size >= (grub_ssize_t) sizeof (struct grub_macho_fat_header))
+ if (fsize >= (grub_ssize_t) sizeof (struct grub_macho_fat_header))
{
struct grub_macho_fat_header *head = boot_image;
if (head->magic
@@ -317,20 +808,30 @@ grub_cmd_chainloader (grub_command_t cmd
> ~grub_cpu_to_le32 (archs[i].size)
|| grub_cpu_to_le32 (archs[i].offset)
+ grub_cpu_to_le32 (archs[i].size)
- > (grub_size_t) size)
+ > (grub_size_t) fsize)
{
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
filename);
goto fail;
}
boot_image = (char *) boot_image + grub_cpu_to_le32 (archs[i].offset);
- size = grub_cpu_to_le32 (archs[i].size);
+ fsize = grub_cpu_to_le32 (archs[i].size);
}
}
#endif
+#ifdef SUPPORT_SECURE_BOOT
+ /* FIXME is secure boot possible also with universal binaries? */
+ if (debug_secureboot || (grub_secure_mode() && grub_secure_validate ((void *)address, fsize)))
+ {
+ grub_file_close (file);
@ -612,12 +637,12 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
+#endif
+
status = efi_call_6 (b->load_image, 0, grub_efi_image_handle, file_path,
- (void *) ((grub_addr_t) address), size,
+ (void *) ((grub_addr_t) address), fsize,
&image_handle);
- boot_image, size,
+ boot_image, fsize,
&image_handle);
if (status != GRUB_EFI_SUCCESS)
{
@@ -313,33 +813,10 @@ grub_cmd_chainloader (grub_command_t cmd
@@ -355,33 +856,10 @@ grub_cmd_chainloader (grub_command_t cmd
grub_file_close (file);
@ -653,7 +678,7 @@ Index: grub-2.00/grub-core/loader/efi/chainloader.c
}
grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
@@ -358,6 +835,9 @@ grub_cmd_chainloader (grub_command_t cmd
@@ -400,6 +878,9 @@ grub_cmd_chainloader (grub_command_t cmd
if (address)
efi_call_2 (b->free_pages, address, pages);

View File

@ -28,7 +28,7 @@ Index: grub-2.00/grub-core/kern/corecmd.c
/* set ENVVAR=VALUE */
static grub_err_t
grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)),
@@ -81,6 +85,13 @@ grub_core_cmd_insmod (struct grub_comman
@@ -75,6 +79,13 @@ grub_core_cmd_insmod (struct grub_comman
{
grub_dl_t mod;
@ -46,7 +46,7 @@ Index: grub-2.00/grub-core/kern/efi/efi.c
===================================================================
--- grub-2.00.orig/grub-core/kern/efi/efi.c
+++ grub-2.00/grub-core/kern/efi/efi.c
@@ -229,6 +229,34 @@ grub_efi_get_variable (const char *var,
@@ -259,6 +259,34 @@ grub_efi_get_variable (const char *var,
return NULL;
}
@ -85,10 +85,10 @@ Index: grub-2.00/include/grub/efi/efi.h
===================================================================
--- grub-2.00.orig/include/grub/efi/efi.h
+++ grub-2.00/include/grub/efi/efi.h
@@ -67,6 +67,7 @@ grub_err_t EXPORT_FUNC (grub_efi_set_vir
void *EXPORT_FUNC (grub_efi_get_variable) (const char *variable,
const grub_efi_guid_t *guid,
grub_size_t *datasize_out);
@@ -72,6 +72,7 @@ EXPORT_FUNC (grub_efi_set_variable) (con
const grub_efi_guid_t *guid,
void *data,
grub_size_t datasize);
+grub_efi_boolean_t EXPORT_FUNC (grub_efi_secure_boot) (void);
int
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,

View File

@ -24,8 +24,8 @@ Index: grub-2.00/util/grub.d/30_os-prober.in
osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
@@ -207,11 +216,11 @@ EOF
save_default_entry | sed -e "s/^/\t/"
@@ -216,11 +225,11 @@ EOF
save_default_entry | grub_add_tab
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
- linux ${LKERNEL} ${LPARAMS}
@ -38,9 +38,9 @@ Index: grub-2.00/util/grub.d/30_os-prober.in
EOF
fi
cat << EOF
@@ -227,11 +236,11 @@ EOF
save_default_entry | sed -e "s/^/\t\t/"
printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
@@ -236,11 +245,11 @@ EOF
save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
cat << EOF
- linux ${LKERNEL} ${LPARAMS}
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}

View File

@ -1,27 +0,0 @@
From: Andreas Jaeger
Date: Sat Jul 28 14:17:56 UTC 2012
Subject: [PATCH] Fix stdio.in.h with glibc 2.16
stdio.in.h expects that gets is declared but this is not the
case with ISO C11 anymore which glibc 2.16 follows.
This is a patch to a file that grub takes from gnulib - and is
fixed in upstream gnulib and will thus be in grub2 once this
file gets regenerated with a newer grub release.
Patch-Mainline: no
Index: grub-2.00/grub-2.00/grub-core/gnulib/stdio.in.h
===================================================================
--- grub-2.00.orig/grub-2.00/grub-core/gnulib/stdio.in.h
+++ grub-2.00/grub-2.00/grub-core/gnulib/stdio.in.h
@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#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@

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Sun Jun 16 12:42:33 UTC 2013 - arvidjaar@gmail.com
- update to current upstream trunk rev 5042
* drop upstream patches
- grub2-correct-font-path.patch
- grub2-fix-mo-not-copied-to-grubdir-locale.patch
- grub2-stdio.in.patch
- grub2-fix-build-error-on-flex-2.5.37.patch
- grub2-quote-messages-in-grub.cfg.patch
- 30_os-prober_UEFI_support.patch
- grub2-fix-enumeration-of-extended-partition.patch
- grub2-add-device-to-os_prober-linux-menuentry.patch
- grub2-fix-tftp-endianness.patch
- efidisk-ahci-workaround
- grub2-grub-mount-return-failure-if-FUSE-failed.patch
* rediff
- rename-grub-info-file-to-grub2.patch
- grub2-linux.patch
- use-grub2-as-a-package-name.patch
- grub2-iterate-and-hook-for-extended-partition.patch
- grub2-secureboot-add-linuxefi.patch
- grub2-secureboot-no-insmod-on-sb.patch
- grub2-secureboot-chainloader.patch
* add
- grub2-linguas.sh-no-rsync.patch
+ disable rsync in linguas.sh so it can be used during RPM build
+ disable auto-generated catalogs, they fail at the moment due to
missing C.UTF-8 locale
* update Makefile.util.am and Makefile.core.am
* grub2-mknetdir is now in /usr/bin
* generate po/LINGUAS for message catalogs using distributed linguas.sh
* remove po/stamp-po during setup to trigger message catalogs rebuild
* package bootinfo.txt on PPC (used by grub2-mkrescue)
-------------------------------------------------------------------
Sat Apr 13 08:48:52 UTC 2013 - arvidjaar@gmail.com

View File

@ -107,7 +107,6 @@ Source9: Makefile.core.am
Source10: openSUSE-UEFI-CA-Certificate.crt
Source11: SLES-UEFI-CA-Certificate.crt
Source1000: PATCH_POLICY
Patch0: grub2-correct-font-path.patch
Patch1: rename-grub-info-file-to-grub2.patch
Patch2: grub2-linux.patch
Patch3: use-grub2-as-a-package-name.patch
@ -116,30 +115,21 @@ Patch7: grub2-install-opt-skip-fs-probe.patch
Patch8: grub2-ppc-terminfo.patch
Patch9: grub2-GRUB_CMDLINE_LINUX_RECOVERY-for-recovery-mode.patch
Patch10: grub2-fix-error-terminal-gfxterm-isn-t-found.patch
Patch11: grub2-fix-mo-not-copied-to-grubdir-locale.patch
Patch12: grub2-fix-menu-in-xen-host-server.patch
Patch13: grub2-enable-theme-for-terminal-window.patch
Patch14: grub2-stdio.in.patch
Patch15: not-display-menu-when-boot-once.patch
Patch16: grub2-fix-Grub2-with-SUSE-Xen-package-install.patch
Patch17: grub2-pass-corret-root-for-nfsroot.patch
Patch18: grub2-fix-locale-en.mo.gz-not-found-error-message.patch
Patch19: grub2-fix-build-error-on-flex-2.5.37.patch
Patch20: grub2-quote-messages-in-grub.cfg.patch
Patch21: grub2-secureboot-add-linuxefi.patch
Patch22: grub2-secureboot-use-linuxefi-on-uefi.patch
Patch23: grub2-secureboot-no-insmod-on-sb.patch
Patch24: grub2-secureboot-provide-linuxefi-config.patch
Patch25: 30_os-prober_UEFI_support.patch
Patch26: grub2-fix-enumeration-of-extended-partition.patch
Patch27: grub2-add-device-to-os_prober-linux-menuentry.patch
Patch28: grub2-fix-unquoted-string-in-class.patch
Patch29: grub2-secureboot-chainloader.patch
Patch30: grub2-cdpath.patch
Patch31: efidisk-ahci-workaround
Patch32: grub2-grub-mount-return-failure-if-FUSE-failed.patch
Patch33: grub2-fix-tftp-endianness.patch
Patch34: grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch
Patch35: grub2-linguas.sh-no-rsync.patch
Requires: gettext-runtime
%if 0%{?suse_version} >= 1140
Requires: os-prober
@ -221,11 +211,13 @@ provides support for EFI systems.
# We create (if we build for efi) two copies of the sources in the Builddir
%setup -q -n grub-%{version} -a 5
(cd po && ls *.po | cut -d. -f1 | xargs) >po/LINGUAS
%patch0 -p1
%patch1 -p1
# This simplifies patch handling without need to use git to create patch
# that renames file
mv docs/grub.texi docs/grub2.texi
# This avoids attempt to rebuild potfiles which fails because necessary
# sources are not included in tarball
mv po/grub.pot po/%{name}.pot
%patch2 -p1
%patch3 -p1
%patch6 -p1
@ -233,34 +225,30 @@ mv docs/grub.texi docs/grub2.texi
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
# disable and back to use black colored terminal window (bnc#776244)
# we could enable it when
# 1 we have background with better contrast to the font's color
# 2 we confirm it's eligible to set the terminal background this way
#%patch13 -p1
%patch14 -p2
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
# Generate po/LINGUAS for message catalogs ...
./linguas.sh
# ... and make sure new catalogs are actually created
rm -f po/stamp-po
# README.openSUSE
cp %{SOURCE3} .
@ -561,7 +549,6 @@ fi
%{_sbindir}/%{name}-bios-setup
%{_sbindir}/%{name}-install
%{_sbindir}/%{name}-mkconfig
%{_sbindir}/%{name}-mknetdir
%{_sbindir}/%{name}-once
%{_sbindir}/%{name}-ofpathname
%{_sbindir}/%{name}-probe
@ -570,16 +557,19 @@ fi
%{_sbindir}/%{name}-sparc64-setup
%{_bindir}/%{name}-editenv
%{_bindir}/%{name}-fstest
%{_bindir}/%{name}-glue-efi
%{_bindir}/%{name}-kbdcomp
%{_bindir}/%{name}-menulst2cfg
%{_bindir}/%{name}-mkfont
%{_bindir}/%{name}-mkimage
%{_bindir}/%{name}-mklayout
%{_bindir}/%{name}-mknetdir
%{_bindir}/%{name}-mkpasswd-pbkdf2
%{_bindir}/%{name}-mkrelpath
%{_bindir}/%{name}-mkrescue
%{_bindir}/%{name}-mkstandalone
%{_bindir}/%{name}-mount
%{_bindir}/%{name}-render-label
%{_bindir}/%{name}-script-check
%dir %{_libdir}/%{name}
%dir %{_datadir}/%{name}
@ -591,21 +581,23 @@ fi
%{_infodir}/%{name}.info*
%{_mandir}/man1/%{name}-editenv.1.*
%{_mandir}/man1/%{name}-fstest.1.*
%{_mandir}/man1/%{name}-glue-efi.1.*
%{_mandir}/man1/%{name}-kbdcomp.1.*
%{_mandir}/man1/%{name}-menulst2cfg.1.*
%{_mandir}/man1/%{name}-mkfont.1.*
%{_mandir}/man1/%{name}-mkimage.1.*
%{_mandir}/man1/%{name}-mklayout.1.*
%{_mandir}/man1/%{name}-mknetdir.1.*
%{_mandir}/man1/%{name}-mkpasswd-pbkdf2.1.*
%{_mandir}/man1/%{name}-mkrelpath.1.*
%{_mandir}/man1/%{name}-mkrescue.1.*
%{_mandir}/man1/%{name}-mkstandalone.1.*
%{_mandir}/man1/%{name}-mount.1.*
%{_mandir}/man1/%{name}-render-label.1.*
%{_mandir}/man1/%{name}-script-check.1.*
%{_mandir}/man8/%{name}-bios-setup.8.*
%{_mandir}/man8/%{name}-install.8.*
%{_mandir}/man8/%{name}-mkconfig.8.*
%{_mandir}/man8/%{name}-mknetdir.8.*
%{_mandir}/man8/%{name}-ofpathname.8.*
%{_mandir}/man8/%{name}-probe.8.*
%{_mandir}/man8/%{name}-reboot.8.*
@ -617,6 +609,10 @@ fi
%files %{grubarch}
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}/%{grubarch}
%ifarch ppc ppc64
%{_libdir}/%{name}/%{grubarch}/%{name}.chrp
%{_libdir}/%{name}/%{grubarch}/bootinfo.txt
%endif
%ifnarch ppc ppc64
%{_libdir}/%{name}/%{grubarch}/*.image
%endif

View File

@ -11,16 +11,11 @@ whole file if patch needs refreshing. It means that to regenerate two
files - Makefile.core.am and Makefile.util.am - it may be necessary to
manually rename it.
---
docs/Makefile.am | 2 +-
docs/Makefile.in | 46 ++++++++++++++++++++--------------------
docs/{grub.texi => grub2.texi} | 2 +-
3 files changed, 25 insertions(+), 25 deletions(-)
rename docs/{grub.texi => grub2.texi} (99%)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 93eb396..4143042 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
Index: grub-2.00/docs/Makefile.am
===================================================================
--- grub-2.00.orig/docs/Makefile.am
+++ grub-2.00/docs/Makefile.am
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects
@ -30,22 +25,20 @@ index 93eb396..4143042 100644
grub_TEXINFOS = fdl.texi
EXTRA_DIST = font_char_metrics.png font_char_metrics.txt
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 217ea7e..49dc477 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -35,8 +35,8 @@ build_triplet = @build@
Index: grub-2.00/docs/Makefile.in
===================================================================
--- grub-2.00.orig/docs/Makefile.in
+++ grub-2.00/docs/Makefile.in
@@ -51,7 +51,7 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = docs
-DIST_COMMON = $(grub_TEXINFOS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/stamp-1 $(srcdir)/stamp-vti \
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/stamp-1 $(srcdir)/stamp-vti \
$(srcdir)/version-dev.texi $(srcdir)/version.texi mdate-sh \
texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -91,14 +91,14 @@ CONFIG_CLEAN_FILES =
+DIST_COMMON = $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/stamp-1 $(srcdir)/stamp-vti \
$(srcdir)/version-dev.texi $(srcdir)/version.texi \
$(top_srcdir)/build-aux/mdate-sh \
@@ -108,14 +108,14 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
@ -66,7 +59,7 @@ index 217ea7e..49dc477 100644
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
@@ -767,7 +767,7 @@ top_srcdir = @top_srcdir@
@@ -810,7 +810,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = subdir-objects
# AM_MAKEINFOFLAGS = --no-split --no-validate
@ -75,7 +68,7 @@ index 217ea7e..49dc477 100644
grub_TEXINFOS = fdl.texi
EXTRA_DIST = font_char_metrics.png font_char_metrics.txt
all: all-am
@@ -850,14 +850,14 @@ $(am__aclocal_m4_deps):
@@ -893,14 +893,14 @@ $(am__aclocal_m4_deps):
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
@ -97,7 +90,7 @@ index 217ea7e..49dc477 100644
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
@@ -979,16 +979,16 @@ dist-info: $(INFO_DEPS)
@@ -1020,16 +1020,16 @@ dist-info: $(INFO_DEPS)
done
mostlyclean-aminfo:
@ -134,6 +127,3 @@ index 26944ac..fb7fb0e 100644
@include version.texi
@settitle GNU GRUB Manual @value{VERSION}
@c Unify all our little indices for now.
--
1.7.10.4

View File

@ -12,19 +12,19 @@ Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
configure.ac | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 50e6bf6..544c16a 100755
--- a/configure
+++ b/configure
Index: grub-2.00/configure
===================================================================
--- grub-2.00.orig/configure
+++ grub-2.00/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for GRUB 2.00.
+# Generated by GNU Autoconf 2.68 for GRUB2 2.00.
-# Generated by GNU Autoconf 2.69 for GRUB 2.00.
+# Generated by GNU Autoconf 2.69 for GRUB2 2.00.
#
# Report bugs to <bug-grub@gnu.org>.
#
@@ -558,10 +558,10 @@ MFLAGS=
@@ -578,10 +578,10 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
@ -38,7 +38,7 @@ index 50e6bf6..544c16a 100755
PACKAGE_BUGREPORT='bug-grub@gnu.org'
PACKAGE_URL=''
@@ -1904,7 +1904,7 @@ if test "$ac_init_help" = "long"; then
@@ -1938,7 +1938,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
@ -47,7 +47,7 @@ index 50e6bf6..544c16a 100755
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1952,7 +1952,7 @@ Fine tuning of the installation directories:
@@ -1986,7 +1986,7 @@ Fine tuning of the installation director
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
@ -56,7 +56,7 @@ index 50e6bf6..544c16a 100755
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1975,7 +1975,7 @@ fi
@@ -2009,7 +2009,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
@ -65,25 +65,25 @@ index 50e6bf6..544c16a 100755
esac
cat <<\_ACEOF
@@ -2108,7 +2108,7 @@ fi
@@ -2144,7 +2144,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GRUB configure 2.00
+GRUB2 configure 2.00
generated by GNU Autoconf 2.68
generated by GNU Autoconf 2.69
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2812,7 +2812,7 @@ cat >config.log <<_ACEOF
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2853,7 +2853,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GRUB $as_me 2.00, which was
+It was created by GRUB2 $as_me 2.00, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3789,7 +3789,7 @@ fi
@@ -3839,7 +3839,7 @@ fi
# Define the identity of the package.
@ -92,29 +92,29 @@ index 50e6bf6..544c16a 100755
VERSION='2.00'
@@ -23344,7 +23344,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -23470,7 +23470,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GRUB $as_me 2.00, which was
+This file was extended by GRUB2 $as_me 2.00, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23414,7 +23414,7 @@ _ACEOF
@@ -23540,7 +23540,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GRUB config.status 2.00
+GRUB2 config.status 2.00
configured by $0, generated by GNU Autoconf 2.68,
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 1b5132c..5ea7ffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ dnl type, so there is no conflict. Variables with the prefix "TARGET_"
Index: grub-2.00/configure.ac
===================================================================
--- grub-2.00.orig/configure.ac
+++ grub-2.00/configure.ac
@@ -32,7 +32,7 @@ dnl type, so there is no conflict. Varia
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
dnl type.
@ -123,6 +123,3 @@ index 1b5132c..5ea7ffe 100644
AC_CONFIG_AUX_DIR([build-aux])
--
1.7.10.4