Added comments and links to patches.

This commit is contained in:
Grégoire Sutre 2010-01-02 18:17:17 +00:00 committed by Thomas Klausner
parent f4c89c2bb8
commit f898e884f2
13 changed files with 153 additions and 80 deletions

View file

@ -1,14 +1,14 @@
$NetBSD: distinfo,v 1.18 2010/01/02 13:27:15 gregoire Exp $
$NetBSD: distinfo,v 1.19 2010/01/02 18:17:17 gregoire Exp $
SHA1 (patch-10_linux-gettext) = fe0cfbaae7fe9ba98ceffe3ef68e25a63b0d2afd
SHA1 (patch-__enable_execute_stack) = 7fde8c41c0cbd2f718bc4cab219b8e5dc1e99c4f
SHA1 (patch-ac) = 4bfc5930654b68cea7687d7f30a9b78a71b7541b
SHA1 (patch-ad) = 95eaffddf037bdd26bb981fbcbb1a58f0f327622
SHA1 (patch-configure-LDFLAGS_AC) = 794ec679e40bab7d2772ba11cad46910951e7ea0
SHA1 (patch-gcc-warning-on-error-attribute) = 356c26bc6ee35019581501543e27b4637d84764e
SHA1 (patch-grub-install-mkdir) = 18d45465c18ec58380df5a6ee382a2e045ecf4de
SHA1 (patch-grub-mkconfig-grub_prefix) = 708b0792576f93a183a9c4ce262f6f8ad7eca35d
SHA1 (patch-grub-probe-netbsd) = 643eb96dd2e0532fc80cdfc1c2a3286acdf68fe6
SHA1 (patch-macroify-DEFAULT_DIRECTORY) = c085a748ab7b5ace6e0818be105cbf31d6f6440e
SHA1 (patch-makefile-gcc-headers) = c8bedfe1301d63959270f69624e1bf9ff53842b9
SHA1 (patch-misc-realpath) = efa6c81c725138ce72c539e9650302aa2c0bc8c3
SHA1 (patch-10_linux-gettext) = d417aefc70971b9cccff0e25221cb5bd623073db
SHA1 (patch-__enable_execute_stack) = 7610d645669b4af497198a9f926017cbc69e5c27
SHA1 (patch-ac) = 1a26883863d4e2c934204150240e0caf6f1382f0
SHA1 (patch-ad) = fada9edbd11d8c2c2978e377c3caf2278acdbd4d
SHA1 (patch-configure-LDFLAGS_AC) = d15faa78aa5377d767b382877b96527cb008d296
SHA1 (patch-gcc-warning-on-error-attribute) = a3d4829918f6a75ee13fdc1b63a7dabaa4c0acc9
SHA1 (patch-grub-install-mkdir) = 459dd20991d92f4bbb365abda94f3aee71feff0b
SHA1 (patch-grub-mkconfig-grub_prefix) = 24b381eadddc0abe9212e6d557e6400a6ce93f07
SHA1 (patch-grub-probe-netbsd) = 6eb5e6e87036a8a8fff6336742186a2d2ac067c7
SHA1 (patch-macroify-DEFAULT_DIRECTORY) = de4e275bc8ead17525863d6b0311064728aa38f3
SHA1 (patch-makefile-gcc-headers) = 9aeaa46efd9ed523ed78ad86a42e643864e0ae9e
SHA1 (patch-misc-realpath) = 2b0aabaf0fae93effb8006f40dc32651bbaead7c

View file

@ -1,6 +1,8 @@
$NetBSD: patch-10_linux-gettext,v 1.1 2009/12/30 22:23:08 gregoire Exp $
Description: fixes config file generation failure on Linux when grub is not
installed in the same prefix as gettext.
See: http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00461.html
--- util/grub.d/10_linux.in.orig 2009-12-30 15:37:01.000000000 +0100
--- util/grub.d/10_linux.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -22,7 +22,12 @@ bindir=@bindir@
libdir=@libdir@

View file

@ -1,6 +1,11 @@
--- include/grub/misc.h.orig 2009-12-27 12:58:34.000000000 +0100
+++ include/grub/misc.h 2009-12-27 12:58:54.000000000 +0100
@@ -191,7 +191,7 @@
Description: do not override __enable_execute_stack for utilities since they
are linked with libc. Fixes bug #28392.
See: http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00349.html
Bug: http://savannah.gnu.org/bugs/?28392
--- include/grub/misc.h.orig 2010-01-02 14:42:34.000000000 +0100
+++ include/grub/misc.h
@@ -191,7 +191,7 @@ grub_ssize_t EXPORT_FUNC(grub_utf8_to_uc
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
grub_uint32_t d, grub_uint32_t *r);
@ -9,9 +14,9 @@
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
#endif
--- kern/misc.c.orig 2009-12-27 12:58:02.000000000 +0100
+++ kern/misc.c 2009-12-27 12:58:20.000000000 +0100
@@ -987,7 +987,7 @@
--- kern/misc.c.orig 2010-01-02 14:42:35.000000000 +0100
+++ kern/misc.c
@@ -997,7 +997,7 @@ grub_abort (void)
void abort (void) __attribute__ ((alias ("grub_abort")));
#endif

View file

@ -1,16 +1,11 @@
$NetBSD: patch-ac,v 1.2 2010/01/01 23:28:05 gregoire Exp $
$NetBSD: patch-ac,v 1.3 2010/01/02 18:17:17 gregoire Exp $
--- Makefile.in.orig 2010-01-02 00:21:35.000000000 +0100
Description: apply program name substitution for generated info file, and
fix a minor typo in echo line of target uninstall.
--- Makefile.in.orig 2010-01-02 14:42:01.000000000 +0100
+++ Makefile.in
@@ -112,6 +112,7 @@ else
HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF
endif
AWK = @AWK@
+LIBUTIL = @LIBUTIL@
LIBCURSES = @LIBCURSES@
LIBUSB = @LIBUSB@
LIBPCIACCESS = @LIBPCIACCESS@
@@ -335,8 +336,8 @@ install-local: all
@@ -335,8 +335,8 @@ install-local: all
@list='$(info_INFOS)'; \
for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
@ -21,7 +16,7 @@ $NetBSD: patch-ac,v 1.2 2010/01/01 23:28:05 gregoire Exp $
if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \
@@ -374,12 +375,12 @@ uninstall:
@@ -374,12 +374,12 @@ uninstall:
@list='$(lib_SCRIPTS)'; \
for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \

View file

@ -1,6 +1,12 @@
$NetBSD: patch-ad,v 1.3 2010/01/01 23:28:05 gregoire Exp $
$NetBSD: patch-ad,v 1.4 2010/01/02 18:17:17 gregoire Exp $
--- conf/common.rmk.orig 2010-01-02 00:21:59.000000000 +0100
Description: forces installation of all configuration scripts. These are
installed in share/examples/grub2. The appropriates ones (as in the
original behavior below) are copied into etc/grub2 with the pkgsrc
directive CONF_FILES. See the main makefile of this pkgsrc package for
further details.
--- conf/common.rmk.orig 2010-01-02 14:42:26.000000000 +0100
+++ conf/common.rmk
@@ -177,9 +177,9 @@ CLEANFILES += grub-gettext_lib
./config.status --file=$@:$<
@ -15,12 +21,3 @@ $NetBSD: patch-ad,v 1.3 2010/01/01 23:28:05 gregoire Exp $
CLEANFILES += $(grub-mkconfig_SCRIPTS)
@@ -650,3 +650,8 @@ pkglib_MODULES += charset.mod
charset_mod_SOURCES = lib/charset.c
charset_mod_CFLAGS = $(COMMON_CFLAGS)
charset_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# Theses utilities use libutil (at least on NetBSD).
+grub_setup_LDFLAGS += $(LIBUTIL)
+grub_mkdevicemap_LDFLAGS += $(LIBUTIL)
+grub_probe_LDFLAGS += $(LIBUTIL)

View file

@ -1,6 +1,20 @@
--- acinclude.m4.orig 2009-12-30 22:05:08.000000000 +0100
+++ acinclude.m4 2009-12-30 21:56:05.000000000 +0100
@@ -93,7 +93,7 @@
Description: changes the definitions and uses of TARGET_IMG_LDFLAGS_AC so
that, in all cases, a number shall be appended to it. Fixes bug #28335.
See: http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00463.html
Bug: http://savannah.gnu.org/bugs/?28335
Change log
----------
2010-??-?? Gregoire Sutre <gregoire.sutre@labri.fr>
* configure.ac: all definitions and uses of TARGET_IMG_LDFLAGS_AC now
expect a number appended to it.
* acinclude.m4 (grub_PROG_OBJCOPY_ABSOLUTE): ${TARGET_IMG_LDFLAGS_AC}
expects a number appended to it.
--- acinclude.m4.orig 2010-01-02 14:42:11.000000000 +0100
+++ acinclude.m4
@@ -93,7 +93,7 @@ else
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 0x2000 0x8000 0x7C00; do
@ -9,9 +23,9 @@
else
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
fi
--- configure.ac.orig 2009-12-30 22:34:06.000000000 +0100
+++ configure.ac 2009-12-30 22:37:04.000000000 +0100
@@ -311,7 +311,7 @@
--- configure.ac.orig 2010-01-02 14:42:26.000000000 +0100
+++ configure.ac
@@ -311,7 +311,7 @@ else
if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then
TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext,"
@ -20,7 +34,7 @@
else
TARGET_IMG_LDSCRIPT=
TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,'
@@ -446,7 +446,7 @@
@@ -446,7 +446,7 @@ grub_ASM_USCORE
if test "x$target_cpu" = xi386; then
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
# Check symbols provided by linker script.

View file

@ -1,4 +1,10 @@
--- acinclude.m4.orig 2010-01-02 00:55:26.000000000 +0100
Description: checks whether the C compiler supports the error attribute
without warning, and disables -Werror if that is not the case as otherwise
the build will fail.
Note: A better patch is available from the link below.
See: http://lists.gnu.org/archive/html/grub-devel/2010-01/msg00036.html
--- acinclude.m4.orig 2010-01-02 14:42:11.000000000 +0100
+++ acinclude.m4
@@ -458,3 +458,16 @@ else
AC_MSG_RESULT([no])
@ -17,8 +23,8 @@
+rm -f conftest.s
+AC_MSG_RESULT([${error_attribute_without_warning}])
+])
--- configure.ac.orig 2010-01-02 00:55:22.000000000 +0100
+++ configure.ac 2010-01-02 00:57:40.000000000 +0100
--- configure.ac.orig 2010-01-02 14:42:26.000000000 +0100
+++ configure.ac
@@ -408,10 +408,14 @@ if test x"$sap_possible" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi

View file

@ -1,5 +1,9 @@
--- util/grub-install.in.orig 2010-01-02 02:27:06.000000000 +0100
+++ util/grub-install.in 2010-01-02 02:27:26.000000000 +0100
Description: on NetBSD and OpenBSD, $bootdir is empty by default. Hence,
grub-install runs mkdir "", which fails. This patch fixes this problem.
Moreover, the patch also permits a root directory of arbitrary depth.
--- util/grub-install.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub-install.in
@@ -207,8 +207,7 @@ else
fi
@ -10,8 +14,8 @@
# If --recheck is specified, remove the device map, if present.
if test $recheck = yes; then
--- util/i386/efi/grub-install.in.orig 2010-01-02 02:27:58.000000000 +0100
+++ util/i386/efi/grub-install.in 2010-01-02 02:28:10.000000000 +0100
--- util/i386/efi/grub-install.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/i386/efi/grub-install.in
@@ -143,8 +143,7 @@ else
fi
@ -22,8 +26,8 @@
# If --recheck is specified, remove the device map, if present.
if test $recheck = yes; then
--- util/ieee1275/grub-install.in.orig 2010-01-02 02:27:37.000000000 +0100
+++ util/ieee1275/grub-install.in 2010-01-02 02:27:50.000000000 +0100
--- util/ieee1275/grub-install.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/ieee1275/grub-install.in
@@ -140,8 +140,7 @@ fi
# XXX warn on firmware-unreadable filesystems?

View file

@ -1,4 +1,6 @@
--- util/grub-mkconfig.in.orig 2010-01-02 02:18:47.000000000 +0100
Description: sets $grub_prefix as in grub-install on NetBSD and OpenBSD.
--- util/grub-mkconfig.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub-mkconfig.in
@@ -24,10 +24,10 @@ sbindir=@sbindir@
libdir=@libdir@

View file

@ -1,5 +1,22 @@
--- util/getroot.c.orig 2010-01-02 10:53:01.000000000 +0100
+++ util/getroot.c 2010-01-02 14:17:08.000000000 +0100
Description: adds support for NetBSD in GRUB utilities.
See: http://lists.gnu.org/archive/html/grub-devel/2009-12/msg00432.html
Change log
----------
2010-??-?? Gregoire Sutre <gregoire.sutre@labri.fr>
Add grub-probe support for NetBSD.
* util/getroot.c (find_root_device): Convert block device to
character device on NetBSD.
* util/probe.c (probe): Require character device on NetBSD.
* util/hostdisk.c (grub_util_biosdisk_open): NetBSD specific code.
(convert_system_partition_to_system_disk): Likewise.
(grub_util_biosdisk_get_grub_dev): Likewise.
(make_device_name): Fixed a typo in bsd_part_str.
--- util/getroot.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/getroot.c
@@ -264,10 +264,17 @@ find_root_device (const char *dir, dev_t
/* Found! */
char *res;
@ -20,8 +37,8 @@
strip_extra_slashes (res);
free (cwd);
--- util/grub-probe.c.orig 2010-01-02 10:53:01.000000000 +0100
+++ util/grub-probe.c 2010-01-02 11:55:24.000000000 +0100
--- util/grub-probe.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub-probe.c
@@ -111,7 +111,7 @@ probe (const char *path, char *device_na
if (path == NULL)
@ -31,8 +48,8 @@
if (! grub_util_check_char_device (device_name))
grub_util_error ("%s is not a character device.\n", device_name);
#else
--- util/hostdisk.c.orig 2010-01-02 10:53:01.000000000 +0100
+++ util/hostdisk.c 2010-01-02 12:04:58.000000000 +0100
--- util/hostdisk.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/hostdisk.c
@@ -97,6 +97,17 @@ struct hd_geometry
# include <sys/disk.h>
#endif
@ -287,8 +304,8 @@
#else
# warning "The function `grub_util_biosdisk_get_grub_dev' might not work on your OS correctly."
return make_device_name (drive, -1, -1);
--- configure.ac.orig 2010-01-02 10:52:51.000000000 +0100
+++ configure.ac 2010-01-02 11:52:55.000000000 +0100
--- configure.ac.orig 2010-01-02 14:42:26.000000000 +0100
+++ configure.ac
@@ -208,6 +208,20 @@ AC_CHECK_FUNCS(memmove sbrk strdup lstat
AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h)
AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h)
@ -310,3 +327,24 @@
#
# Check for target programs.
#
--- Makefile.in.orig 2010-01-02 14:42:01.000000000 +0100
+++ Makefile.in
@@ -44,6 +44,9 @@ pkglibdir = $(libdir)/`echo @PACKAGE_TA
# Internationalization library.
LIBINTL = @LIBINTL@
+# Util library.
+LIBUTIL = @LIBUTIL@
+
XGETTEXT = @XGETTEXT@
MSGMERGE = @MSGMERGE@
MSGFMT = @MSGFMT@
@@ -75,7 +78,7 @@ MKDIR_P = @MKDIR_P@
mkinstalldirs = $(srcdir)/mkinstalldirs
-LIBS = @LIBS@ $(LIBINTL)
+LIBS = @LIBS@ $(LIBINTL) $(LIBUTIL)
CC = @CC@
CFLAGS = @CFLAGS@

View file

@ -1,6 +1,8 @@
--- util/elf/grub-mkimage.c.orig 2009-12-30 14:00:31.000000000 +0100
Description: use macro DEFAULT_DIRECTORY instead of /boot/grub.
--- util/elf/grub-mkimage.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/elf/grub-mkimage.c
@@ -390,7 +390,7 @@ main (int argc, char *argv[])
@@ -389,7 +389,7 @@ main (int argc, char *argv[])
if (prefix)
free (prefix);
@ -9,9 +11,9 @@
break;
case 'h':
--- util/i386/pc/grub-mkimage.c.orig 2009-12-30 14:00:31.000000000 +0100
--- util/i386/pc/grub-mkimage.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/i386/pc/grub-mkimage.c
@@ -387,7 +387,7 @@ main (int argc, char *argv[])
@@ -386,7 +386,7 @@ main (int argc, char *argv[])
if (prefix)
free (prefix);
@ -20,9 +22,9 @@
break;
case 'c':
--- util/sparc64/ieee1275/grub-mkimage.c.orig 2009-12-30 14:00:31.000000000 +0100
--- util/sparc64/ieee1275/grub-mkimage.c.orig 2010-01-02 14:42:39.000000000 +0100
+++ util/sparc64/ieee1275/grub-mkimage.c
@@ -254,7 +254,7 @@ main (int argc, char *argv[])
@@ -253,7 +253,7 @@ main (int argc, char *argv[])
if (prefix)
free (prefix);

View file

@ -1,6 +1,9 @@
--- Makefile.in.orig 2010-01-02 00:40:15.000000000 +0100
Description: defaults to /usr/include as path for compiler-specific headers
when gcc -print-file-name=include does not work.
--- Makefile.in.orig 2010-01-02 14:42:01.000000000 +0100
+++ Makefile.in
@@ -89,7 +89,14 @@
@@ -89,7 +89,14 @@ TARGET_ASFLAGS = @TARGET_ASFLAGS@
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
TARGET_APPLE_CC = @TARGET_APPLE_CC@
OBJCONV = @OBJCONV@

View file

@ -1,6 +1,11 @@
--- util/misc.c.orig 2009-12-28 01:09:18.000000000 +0100
Description: pre-allocate the result buffer in realpath(), to prevent
grub-mkrelpath from segfaulting on NetBSD. Fixes bug #28422.
Note: A better patch is available from the link below.
Bug: http://savannah.gnu.org/bugs/?28422
--- util/misc.c.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/misc.c
@@ -52,6 +52,19 @@
@@ -53,6 +53,19 @@
#include <winioctl.h>
#endif
@ -20,7 +25,7 @@
int verbosity = 0;
void
@@ -490,14 +503,10 @@ make_system_path_relative_to_its_root (c
@@ -491,14 +504,10 @@ make_system_path_relative_to_its_root (c
size_t len;
/* canonicalize. */