Vladimir 'phcoder' Serbinenko
9f9d3f69f4
Fix --help formatting.
...
* util/grub-mkconfig_lib.in (print_option_help): New function.
(grub_fmt): Likewise.
* util/grub-install.in: Use print_option_help and grub_fmt.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-04-07 19:49:25 +02:00
Vladimir 'phcoder' Serbinenko
83c93b9cf5
* util/grub-mkconfig_lib.in: Fix typo.
2012-03-19 16:27:59 +01:00
Vladimir 'phcoder' Serbinenko
93b1cd79c8
Use sort -V by the idea of Georgi Georgiev.
...
* util/grub-mkconfig_lib.in (version_sort): New function.
(version_test_numeric): Use version_sort.
2012-03-04 23:13:16 +01:00
Vladimir 'phcoder' Serbinenko
0cdc126ca2
Use submenus in grub-mkconfig.
...
* util/grub-mkconfig.in: Define GRUB_ACTUAL_DEFAULT.
* util/grub-mkconfig_lib.in (grub_quote): New function.
(gettext_printf): Use gettext and not gettext_quoted to fix several
messages.
* util/grub.d/10_hurd.in: Use submenus.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
* util/grub.d/10_illumos.in: Add missing quoting.
* util/grub.d/10_windows.in: Likewise.
2012-03-04 22:18:33 +01:00
Vladimir 'phcoder' Serbinenko
d9bef9bc43
Fix menu title instability bug.
...
* grub-core/commands/menuentry.c (options): New option --id.
(grub_normal_add_menu_entry): New argument id. All users updated.
(grub_cmd_menuentry): Handle --id.
(grub_menu_init): Accept unknown arguments.
* grub-core/normal/main.c (features): Add feature_menuentry_id and
feature_menuentry_options.
* grub-core/normal/menu.c (grub_menu_execute_entry): Use id for
saved_entry.
(get_entry_number): Match with id as well.
* include/grub/menu.h (grub_menu_entry): New member id.
* util/grub-mkconfig_lib.in (grub_get_device_id): New function.
* util/grub.d/00_header.in: Define menuentry_id_option.
* util/grub.d/10_hurd.in: Define id.
* util/grub.d/10_illumos.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
2012-03-04 14:55:13 +01:00
Vladimir 'phcoder' Serbinenko
2311c5caa9
Replace PACKAGE_TARNAME with PACKAGE in pkglibdir and pkgdatadir.
2012-02-27 11:04:50 +01:00
Vladimir 'phcoder' Serbinenko
fc847818fc
Don't transform PACKAGE_TARNAME following a discussion on autoconf
...
mailing list.
* util/grub-install.in: Don't transform PACKAGE_TARNAME.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-02-26 18:37:54 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6
Improve gettext support. Stylistic fixes and error handling fixes while
...
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
a32d5c712d
* util/grub-mkstandalone.in: Fix help messages. Gettextize.
...
* util/grub-install.in: Gettextize.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
if not available.
(grub_warn): Gettextize.
* util/grub-mknetdir.in: Gettextize.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
* po/POTFILES-shell.in: Regenerate.
2012-02-03 11:42:22 +01:00
Vladimir 'phcoder' Serbinenko
ebe2c96154
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
...
Don't add "root" line if no compatibility hont is available.
Suggested by: Seth Goldberg.
2012-01-29 20:52:37 +01:00
Vladimir 'phcoder' Serbinenko
2980502850
Fix few bugs and memory leaks
2011-12-23 19:25:24 +01:00
Vladimir 'phcoder' Serbinenko
17785932df
merge mainline into hints
2011-12-23 18:49:00 +01:00
Vladimir 'phcoder' Serbinenko
6babad5e59
Initial integration of hints
2011-12-23 18:19:16 +01:00
Lukas Anzinger
a6120aca2e
* util/grub-mkconfig_lib.in (version_test_gt): Fix variable names.
2011-12-23 12:01:25 +01:00
Vladimir 'phcoder' Serbinenko
c3591189b8
Remove local keyword.
...
* util/grub-mkconfig_lib.in (version_test_numeric): Remove local.
(version_test_gt): Likewise.
(version_find_latest): Likewise.
(gettext_printf): Likewise.
* util/grub.d/10_windows.in (get_os_name_from_boot_ini): Likewise.
2011-11-10 08:46:09 +01:00
Colin Watson
2221ab6c62
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Return 1 for
...
*/README* as well as README*.
Reported by: Axel Beckert.
2011-09-05 13:58:33 +01:00
Vladimir Serbinenko
a251b71915
LUKS and GELI support.
...
* Makefile.util.def (libgrubkern.a): Add grub-core/lib/crypto.c,
grub-core/disk/luks.c, grub-core/disk/geli.c,
grub-core/disk/cryptodisk.c, grub-core/disk/AFSplitter.c,
grub-core/lib/pbkdf2.c, grub-core/commands/extcmd.c,
grub-core/lib/arg.c.
(libgrubmods.a): Remove gcrypts cflags and cppflags.
Remove grub-core/commands/extcmd.c, grub-core/lib/arg.c,
grub-core/lib/crypto.c, grub-core/lib/libgcrypt-grub/cipher/sha512.c,
grub-core/lib/libgcrypt-grub/cipher/crc.c and grub-core/lib/pbkdf2.c.
(grub-bin2h): Add libgcry.a.
(grub-mkimage): Likewise.
(grub-mkrelpath): Likewise.
(grub-script-check): Likewise.
(grub-editenv): Likewise.
(grub-mkpasswd-pbkdf2): Likewise.
(grub-pe2elf): Likewise.
(grub-fstest): Likewise.
(grub-mkfont): Likewise.
(grub-mkdevicemap): Likewise.
(grub-probe): Likewise.
(grub-ofpath): Likewise.
(grub-mklayout): Likewise.
(example_unit_test): Likewise.
(grub-menulst2cfg): Likewise.
* autogen.sh (UTIL_DEFS): Add Makefile.utilgcry.def.
* grub-core/Makefile.core.def (cryptodisk): New module.
(luks): Likewise.
(geli): Likewise.
* grub-core/disk/AFSplitter.c: New file.
* grub-core/disk/cryptodisk.c: Likewise.
* grub-core/disk/geli.c: Likewise.
* grub-core/disk/luks.c: Likewise.
* grub-core/kern/emu/getroot.c (get_dm_uuid): New function based on
grub_util_is_lvm.
(grub_util_get_dm_abstraction): New function.
(grub_util_follow_gpart_up): Likewise.
(grub_util_get_geom_abstraction): Likewise.
(grub_util_get_dev_abstraction): Use new functions.
(grub_util_pull_device): Pull GELI and LUKS.
(grub_util_get_grub_dev): Handle LUKS and GELI.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): New function.
(grub_util_biosdisk_open): Use grub_util_get_fd_sectors.
(follow_geom_up): Removed.
(grub_util_fd_seek): New function.
(open_device): Use grub_util_fd_seek.
(nread): Rename to ..
(grub_util_fd_read): ... this. All users updated.
* grub-core/lib/crypto.c (grub_crypto_ecb_decrypt): A better prototype.
(grub_crypto_cbc_decrypt): Likewise.
(grub_crypto_hmac_write): Likewise.
(grub_crypto_hmac_buffer): Likewise.
(grub_password_get): Extend to util.
* include/grub/crypto.h (gcry_cipher_spec) [GRUB_UTIL]:
New member modname.
(gcry_md_spec) [GRUB_UTIL]: Likewise.
* include/grub/cryptodisk.h: New file.
* include/grub/disk.h (grub_disk_dev_id): Rename LUKS to CRYPTODISK.
* include/grub/emu/getroot.h (grub_dev_abstraction_types): Add
LUKS and GELI.
(grub_util_follow_gpart_up): New proto.
* include/grub/emu/hostdisk.h (grub_util_fd_seek): Likewise.
(grub_util_fd_read): Likewise.
(grub_cryptodisk_cheat_mount): Likewise.
(grub_util_cryptodisk_print_uuid): Likewise.
(grub_util_get_fd_sectors): Likewise.
* util/grub-fstest.c (mount_crypt): New var.
(fstest): Mount crypto if requested.
(options): New option -C.
(argp_parser): Parse -C.
(main): Init and fini gcry.
* util/grub-install.in: Support cryptodisk install.
* util/grub-mkconfig.in: Export GRUB_ENABLE_CRYPTODISK.
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Support
cryptodisk.
(prepare_grub_to_access_device): Likewise.
* util/grub-mkpasswd-pbkdf2.c (main): Use grub_password_get.
* util/grub-probe.c (probe_partmap): Support cryptodisk UUID probe.
(probe_cryptodisk_uuid): New function.
(probe_abstraction): Likewise.
(probe): Use new functions.
* util/import_gcry.py: Create Makefile.utilgcry.def.
Add modname member.
Also-By: Michael Gorven <michael@gorven.za.net>
Also-By: Clemens Fruhwirth <clemens@endorphin.org>
2011-07-07 23:52:58 +02:00
Vladimir 'phcoder' Serbinenko
2a5e94d84a
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
...
partmap before abstraction.
2011-06-24 12:41:05 +02:00
Alexander Kurtz
535c191059
* util/grub-mkconfig_lib.in: Add missing quotes.
2011-06-24 12:38:24 +02:00
Vladimir 'phcoder' Serbinenko
20a409405b
Integrate geli into autoconfiguration system
2011-04-25 14:52:07 +02:00
Vladimir 'phcoder' Serbinenko
8306591ff3
support LUKS in shell libraries
2011-04-23 00:13:56 +02:00
Alexander Kurtz
cbac5b1ece
* util/grub-mkconfig_lib.in: Add missing quotes.
2011-04-10 15:30:45 +02:00
Colin Watson
96e0a6ea97
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Consider a
...
path unreadable if `grub-probe -t abstraction' fails, for example if
memberlist fails on an LVM volume group.
Reported by: Darius Jahandarie.
2011-01-22 01:26:49 +00:00
Grégoire Sutre
a21e5672fd
Handle openbsd and netbsd types being in part_bsd module.
2011-01-09 23:23:25 +01:00
Colin Watson
4e01b6c821
* util/grub-mkconfig_lib.in (gettext_quoted): Add clarifying
...
comment. Add an extra layer of quotation, requiring the output of
this function to be used in a printf format string.
(gettext_printf): New function.
* util/grub.d/10_hurd.in: Use gettext_printf where appropriate.
Extract translatable strings from here-documents and use a temporary
variable instead, so that xgettext can find them.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* po/grub.d.sed: New file.
* po/Makefile.in.in ($(DOMAIN).pot-update): Extract gettext_printf
arguments. Set c-format flags on all strings extracted from
util/grub.d/ (xgettext refuses to include these itself for strings
it extracted from a shell file, but these really are c-format).
2010-12-21 12:49:29 +00:00
Vladimir 'phcoder' Serbinenko
3c3b5040cd
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Add
...
explicit root argument to set to prevent UUID to be interpreted as
argument to set.
2010-09-14 21:04:08 +02:00
Vladimir 'phcoder' Serbinenko
3352800b99
Remove readability checks (too many false negatives).
...
* util/grub-install.in: Remove readability checks.
* util/grub-mkconfig.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Revert to old
way.
2010-09-13 22:18:03 +02:00
Robert Millan
6b8e78aee3
2010-09-08 Robert Millan <rmh@gnu.org>
...
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Improve
with (optional) parameters to specify device and relative path.
* util/grub-install.in: Use is_path_readable_by_grub() to
verify readability of a few critical files.
* util/grub-mkconfig.in: Use is_path_readable_by_grub() to
verify readability of grub.cfg.new.
2010-09-08 23:35:53 +02:00
Robert Millan
92f2aef045
2010-09-08 Robert Millan <rmh@gnu.org>
...
* configure.ac: Remove `--enable-grub-fstest' option.
* Makefile.util.def (grub-fstest): Remove COND_GRUB_FSTEST condition.
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Use
`grub-fstest' instead of `grub-probe' for readability verification.
* util/grub-probe.c (probe): Remove readability verification kludge.
2010-09-08 14:37:19 +02:00
Colin Watson
507736c87c
* util/grub-mkconfig_lib.in (uses_abstraction): New function.
...
* util/grub.d/10_linux.in: Use it to check for LVM, so that
LVM-on-RAID is handled correctly.
2010-07-02 12:32:05 +01:00
Colin Watson
8d4a2fec0d
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Sometimes
...
grub.d/README accidentally ends up executable for one reason or
another. Ignore it.
2010-07-02 10:50:04 +01:00
Colin Watson
f28a9212b4
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Prepend
...
"part_" to partmap module names, in line with grub-install.
Reported by: Jindřich Makovička (Debian bug #584426 ).
2010-06-04 13:53:30 +01:00
Robert Millan
5fdba519bb
2010-05-27 Robert Millan <rmh@gnu.org>
...
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Insert
partmap module to handle cross-partmap setups.
Reported by Orestes Mas. Gràcies!
2010-05-27 16:38:16 +02:00
Christian Franke
d1b61374ed
* util/grub-mkconfig_lib.in (make_system_path_relative_to_its_root):
...
Remove broken Cygwin path conversion.
* util/misc.c: [__CYGWIN__] Add include and define.
[__CYGWIN__] (get_win32_path): Copy function from getroot.c, modify
for Cygwin 1.7.
(make_system_path_relative_to_its_root): Simplify loop, replace early
return by break.
[__CYGWIN__] Add conversion to win32 path.
Include "/" case in trailing slash removal.
2010-05-01 21:39:32 +02:00
Grégoire Sutre
0d2c20c6f1
Add grub-mkconfig support for NetBSD.
2010-04-19 21:25:41 +02:00
Carles Pina i Estany
ce44826e79
Enclose all translated strings in grub.cfg in single quotes, and
...
escape them appropriately (Ubuntu bug #552921 ).
* util/grub-mkconfig_lib.in (gettext_quoted): New function.
* util/grub.d/10_hurd.in: Use it.
* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
* util/grub.d/10_linux.in (linux_entry): Likewise.
Also-By: Colin Watson <cjwatson@ubuntu.com>
2010-04-13 13:57:56 +01:00
Colin Watson
a0ca21c2d2
2010-02-25 Jordan Uggla <jordan.uggla@gmail.com>
...
* util/grub-mkconfig.in (GRUB_SAVEDEFAULT): Export new variable.
* util/grub-mkconfig_lib.in (save_default_entry): Only save a new
default entry if GRUB_SAVEDEFAULT=true. This allows using
GRUB_DEFAULT=saved on its own to let grub-reboot work, without
saving a new default on every boot.
2010-02-25 13:30:50 +00:00
Vladimir 'phcoder' Serbinenko
d27859b2ec
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
...
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Enclose
set root in single quotes to prevent \, from being unescaped.
2010-02-14 14:47:50 +01:00
Colin Watson
bc11fee9f5
merge from trunk
2010-01-05 10:53:03 +00:00
Colin Watson
5c23bb0f52
2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
...
2010-10-05 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/00_header.in: Define a "savedefault" function for use
in menu entries.
* util/grub-mkconfig_lib.in (save_default_entry): Use it.
2010-01-05 10:41:51 +00:00
Colin Watson
fcab4f04e5
missing backslash
2010-01-05 10:39:30 +00:00
Colin Watson
b445cfaa4d
2010-10-05 Jordan Uggla <jordan.uggla@gmail.com>
...
2010-10-05 Colin Watson <cjwatson@ubuntu.com>
* util/grub-mkconfig_lib.in (save_default_entry): Only set
saved_entry if boot_once is unset.
* util/grub.d/00_header.in: Set boot_once to "true" if there was a
previous saved entry (i.e. grub-reboot).
2010-01-05 10:30:14 +00:00
Felix Zielcke
a2c1332b70
2009-12-23 Felix Zielcke <fzielcke@z-51.de>
...
* commands/i386/pc/drivemap.c: Remove all trailing whitespace.
* commands/lspci.c: Likewise.
* commands/probe.c: Likewise.
* commands/xnu_uuid.c: Likewise.
* conf/i386-coreboot.rmk: Likewise.
* conf/i386-efi.rmk: Likewise.
* conf/i386-ieee1275.rmk: Likewise.
* conf/i386-pc.rmk: Likewise.
* conf/powerpc-ieee1275.rmk: Likewise.
* conf/sparc64-ieee1275.rmk: Likewise.
* conf/x86_64-efi.rmk: Likewise.
* fs/i386/pc/pxe.c: Likewise.
* gettext/gettext.c: Likewise.
* include/grub/efi/graphics_output.h: Likewise.
* include/grub/i386/pc/memory.h: Likewise.
* kern/env.c: Likewise.
* kern/i386/qemu/startup.S: Likewise.
* lib/i386/pc/biosnum.c: Likewise.
* lib/i386/relocator.c: Likewise.
* lib/i386/relocator_asm.S: Likewise.
* lib/relocator.c: Likewise.
* loader/i386/bsd.c: Likewise.
* loader/i386/multiboot.c: Likewise.
* loader/i386/pc/chainloader.c: Likewise.
* loader/i386/xnu.c: Likewise.
* loader/xnu.c: Likewise.
* normal/main.c: Likewise.
* normal/menu_text.c: Likewise.
* util/getroot.c: Likewise.
* util/grub-mkconfig_lib.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/i386/pc/grub-mkimage.c: Likewise.
* util/mkisofs/eltorito.c: Likewise.
* util/mkisofs/exclude.h: Likewise.
* util/mkisofs/hash.c: Likewise.
* util/mkisofs/iso9660.h: Likewise.
* util/mkisofs/joliet.c: Likewise.
* util/mkisofs/mkisofs.c: Likewise.
* util/mkisofs/mkisofs.h: Likewise.
* util/mkisofs/multi.c: Likewise.
* util/mkisofs/name.c: Likewise.
* util/mkisofs/rock.c: Likewise.
* util/mkisofs/tree.c: Likewise.
* util/mkisofs/write.c: Likewise.
* video/efi_gop.c: Likewise.
2009-12-23 17:41:32 +01:00
Colin Watson
c631d9fb17
2009-12-09 Colin Watson <cjwatson@ubuntu.com>
...
* util/grub-mkconfig_lib.in: Don't set grub_probe or grub_mkrelpath
if they're already set. This resolves the conflict between my
grub-install change on 2009-10-06 and Felix' change on 2009-11-11,
fixing the --grub-probe option again.
* util/sparc64/ieee1275/grub-install.in: Revert the last piece of my
change on 2009-10-06, so that we now once again source
`${libdir}/grub/grub-mkconfig_lib' after options have been parsed.
2009-12-09 16:20:17 +00:00
Colin Watson
b967a04d5b
2009-12-08 Colin Watson <cjwatson@ubuntu.com>
...
* util/grub.d/00_header.in: Use `set var=val' rather than plain
`var=val'.
* util/grub-mkconfig_lib.in (save_default_entry): Likewise.
2009-12-08 01:01:21 +00:00
Colin Watson
e8b2988803
merge from trunk
2009-12-08 00:55:17 +00:00
Colin Watson
242f0731c7
reimported savedefault by cjwatson and myself
...
Also-By: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
2009-11-20 09:41:20 +01:00
Felix Zielcke
50ceeb7cb5
2009-11-04 Felix Zielcke <fzielcke@z-51.de>
...
* util//grub-mkconfig_lib.in (bindir): New variable.
(grub_mkrelpath): Likewise.
Properly set path variable. Use ${grub_mkrelpath} instead of
calling it directly.
2009-11-02 Felix Zielcke <fzielcke@z-51.de>
* util/probe.c (probe): Make the file path relative to its root.
Change a info message to use the GRUB path. Enable again the
check if we can read the file with GRUB facilities.
2009-11-01 Felix Zielcke <fzielcke@z-51.de>
* util/grub-mkrelpath.c: New file.
* conf/common.rmk (bin_UTILITIES): Add grub-mkrelpath.
(grub_mkrelpath_SOURCES): New variable.
* include/grub/util/misc.h: New function prototype.
* util/misc.c (make_system_path_relative_to_its_root): New function.
* util/grub-mkconfig_lib.in (make_system_path_relative_to_its_root):
Use grub-mkrelpath.
2009-11-08 01:49:15 +01:00
fzielcke
d96875df6e
2009-09-23 Felix Zielcke <fzielcke@z-51.de>
...
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'
2009-09-23 09:46:08 +00:00
fzielcke
9b3f836571
2009-09-23 Felix Zielcke <fzielcke@z-51.de>
...
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
for `*.dpkg-new'.
2009-09-23 09:26:34 +00:00