mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-14 12:55:37 +00:00
Merge branch 'upstream' into experimental
This commit is contained in:
commit
0749c27555
1
.gitignore
vendored
1
.gitignore
vendored
@ -161,7 +161,6 @@ GPATH
|
||||
GRTAGS
|
||||
GSYMS
|
||||
GTAGS
|
||||
Makefile.tpl
|
||||
compile
|
||||
depcomp
|
||||
mdate-sh
|
||||
|
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2013-11-27 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
Generate Makefile.*.am directly from gentpl.py, eliminating the use
|
||||
of Autogen. The Autogen definitions files remain intact as they
|
||||
offer a useful abstraction.
|
||||
|
||||
2013-11-27 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
Add grub_util_disable_fd_syncs call to turn grub_util_fd_sync calls
|
||||
into no-ops, and use it in programs that copy files but do not need
|
||||
to take special care to sync writes (grub-mknetdir, grub-rescue,
|
||||
grub-mkstandalone).
|
||||
|
||||
2013-11-26 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* tests/util/grub-fs-tester.in: Execute xorriso from $PATH rather
|
||||
|
1
INSTALL
1
INSTALL
@ -55,7 +55,6 @@ need the following.
|
||||
* Python 2.5.2 or later
|
||||
* Autoconf 2.60 or later
|
||||
* Automake 1.10.1 or later
|
||||
* Autogen 5.10 or later
|
||||
|
||||
Prerequisites for make-check:
|
||||
|
||||
|
11
autogen.sh
11
autogen.sh
@ -8,8 +8,6 @@ unset LC_ALL
|
||||
find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
|
||||
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
|
||||
|
||||
autogen --version >/dev/null || exit 1
|
||||
|
||||
echo "Importing unicode..."
|
||||
python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
|
||||
|
||||
@ -32,10 +30,7 @@ for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul
|
||||
ln -s generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
|
||||
done
|
||||
|
||||
echo "Creating Makefile.tpl..."
|
||||
python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
|
||||
|
||||
echo "Running autogen..."
|
||||
echo "Generating Automake input..."
|
||||
|
||||
# Automake doesn't like including files from a path outside the project.
|
||||
rm -f contrib grub-core/contrib
|
||||
@ -59,8 +54,8 @@ for extra in contrib/*/Makefile.core.def; do
|
||||
fi
|
||||
done
|
||||
|
||||
cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
|
||||
cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
|
||||
python gentpl.py $UTIL_DEFS > Makefile.util.am
|
||||
python gentpl.py $CORE_DEFS > grub-core/Makefile.core.am
|
||||
|
||||
for extra in contrib/*/Makefile.common; do
|
||||
if test -e "$extra"; then
|
||||
|
@ -131,20 +131,15 @@ EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
BUILT_SOURCES =
|
||||
|
||||
# Rules for autogen definition files
|
||||
|
||||
.PRECIOUS: $(top_srcdir)/Makefile.tpl
|
||||
$(top_srcdir)/Makefile.tpl: $(top_srcdir)/gentpl.py
|
||||
python $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
|
||||
mv $@.new $@
|
||||
# Rules for Automake input
|
||||
|
||||
.PRECIOUS: $(top_srcdir)/Makefile.util.am
|
||||
$(top_srcdir)/Makefile.util.am: $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def $(top_srcdir)/Makefile.tpl
|
||||
cat $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def | autogen -T $(top_srcdir)/Makefile.tpl | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
|
||||
$(top_srcdir)/Makefile.util.am: $(top_srcdir)/gentpl.py $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def
|
||||
python $^ > $@.new || (rm -f $@.new; exit 1)
|
||||
mv $@.new $@
|
||||
|
||||
.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
|
||||
$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
|
||||
$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/gentpl.py $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def
|
||||
if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
|
||||
cat $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | autogen -T $(top_srcdir)/Makefile.tpl | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
|
||||
python $^ > $@.new || (rm -f $@.new; exit 1)
|
||||
mv $@.new $@
|
||||
|
@ -2,7 +2,6 @@ EXTRA_DIST += autogen.sh
|
||||
EXTRA_DIST += geninit.sh
|
||||
|
||||
EXTRA_DIST += gentpl.py
|
||||
EXTRA_DIST += Makefile.tpl
|
||||
EXTRA_DIST += Makefile.util.def
|
||||
EXTRA_DIST += Makefile.utilgcry.def
|
||||
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
grub2 (2.00+20131126-1) UNRELEASED; urgency=low
|
||||
grub2 (2.00+20131127-1) UNRELEASED; urgency=low
|
||||
|
||||
* New upstream snapshot.
|
||||
- Skip issuing cursor on/off sequences on Macs (closes: #683068).
|
||||
|
4
debian/patches/mkrescue_efi_modules.patch
vendored
4
debian/patches/mkrescue_efi_modules.patch
vendored
@ -3,13 +3,13 @@ Author: Mario Limonciello <Mario_Limonciello@dell.com>
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/677758
|
||||
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00028.html
|
||||
Last-Update: 2013-11-26
|
||||
Last-Update: 2013-11-27
|
||||
|
||||
Index: b/util/grub-mkrescue.c
|
||||
===================================================================
|
||||
--- a/util/grub-mkrescue.c
|
||||
+++ b/util/grub-mkrescue.c
|
||||
@@ -635,12 +635,18 @@
|
||||
@@ -636,12 +636,18 @@
|
||||
make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_IA64_EFI, "ia64-efi", imgname);
|
||||
free (imgname);
|
||||
|
||||
|
@ -455,6 +455,8 @@ grub_util_fd_close (grub_util_fd_t fd)
|
||||
}
|
||||
}
|
||||
|
||||
static int allow_fd_syncs = 1;
|
||||
|
||||
static void
|
||||
grub_util_fd_sync_volume (grub_util_fd_t fd)
|
||||
{
|
||||
@ -469,6 +471,8 @@ grub_util_fd_sync_volume (grub_util_fd_t fd)
|
||||
void
|
||||
grub_util_fd_sync (grub_util_fd_t fd)
|
||||
{
|
||||
if (allow_fd_syncs)
|
||||
{
|
||||
switch (fd->type)
|
||||
{
|
||||
case GRUB_UTIL_FD_FILE:
|
||||
@ -478,6 +482,13 @@ grub_util_fd_sync (grub_util_fd_t fd)
|
||||
grub_util_fd_sync_volume (fd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_disable_fd_syncs (void)
|
||||
{
|
||||
allow_fd_syncs = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -191,12 +191,21 @@ grub_util_fd_strerror (void)
|
||||
return strerror (errno);
|
||||
}
|
||||
|
||||
static int allow_fd_syncs = 1;
|
||||
|
||||
void
|
||||
grub_util_fd_sync (grub_util_fd_t fd)
|
||||
{
|
||||
if (allow_fd_syncs)
|
||||
fsync (fd);
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_disable_fd_syncs (void)
|
||||
{
|
||||
allow_fd_syncs = 0;
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_fd_close (grub_util_fd_t fd)
|
||||
{
|
||||
|
@ -240,12 +240,21 @@ grub_util_fd_write (grub_util_fd_t fd, const char *buf, size_t len)
|
||||
return real_read;
|
||||
}
|
||||
|
||||
static int allow_fd_syncs = 1;
|
||||
|
||||
void
|
||||
grub_util_fd_sync (grub_util_fd_t fd)
|
||||
{
|
||||
if (allow_fd_syncs)
|
||||
FlushFileBuffers (fd);
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_disable_fd_syncs (void)
|
||||
{
|
||||
allow_fd_syncs = 0;
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_fd_close (grub_util_fd_t fd)
|
||||
{
|
||||
|
@ -50,6 +50,8 @@ EXPORT_FUNC(grub_util_fd_strerror) (void);
|
||||
void
|
||||
grub_util_fd_sync (grub_util_fd_t fd);
|
||||
void
|
||||
grub_util_disable_fd_syncs (void);
|
||||
void
|
||||
EXPORT_FUNC(grub_util_fd_close) (grub_util_fd_t fd);
|
||||
|
||||
grub_uint64_t
|
||||
|
@ -492,7 +492,7 @@ grub_install_make_image_wrap (const char *dir, const char *prefix,
|
||||
memdisk_path, config_path,
|
||||
mkimage_target, note, comp);
|
||||
fflush (fp);
|
||||
fsync (fileno (fp));
|
||||
grub_util_fd_sync (fileno (fp));
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,7 @@ main (int argc, char *argv[])
|
||||
const char *pkglibdir;
|
||||
|
||||
grub_util_host_init (&argc, &argv);
|
||||
grub_util_disable_fd_syncs ();
|
||||
rootdir = xstrdup ("/srv/tftp");
|
||||
pkglibdir = grub_util_get_pkglibdir ();
|
||||
|
||||
|
@ -369,6 +369,7 @@ main (int argc, char *argv[])
|
||||
const char *pkgdatadir;
|
||||
|
||||
grub_util_host_init (&argc, &argv);
|
||||
grub_util_disable_fd_syncs ();
|
||||
|
||||
pkgdatadir = grub_util_get_pkgdatadir ();
|
||||
|
||||
@ -529,7 +530,7 @@ main (int argc, char *argv[])
|
||||
GRUB_COMPRESSION_AUTO);
|
||||
sz = ftello (sa);
|
||||
fflush (sa);
|
||||
fsync (fileno (sa));
|
||||
grub_util_fd_sync (fileno (sa));
|
||||
fclose (sa);
|
||||
|
||||
if (sz > 32768)
|
||||
|
@ -305,6 +305,7 @@ main (int argc, char *argv[])
|
||||
int i;
|
||||
|
||||
grub_util_host_init (&argc, &argv);
|
||||
grub_util_disable_fd_syncs ();
|
||||
|
||||
files = xmalloc ((argc + 1) * sizeof (files[0]));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user