Skip to content

Allow editenv to follow symlinks to find/make grubenv

Peter Jones grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add grub_util_readlink()grub-core/gnulib/Makefile.am grub-core/gnulib/gettimeofday.c grub-core/gnulib/pathmax.h +21 more+3295 -20 replies
2/2Make editenv chase symlinks including those across devices.Makefile.util.def util/editenv.c+53 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAdam Jackson
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Allow editenv to follow symlinks to find/make grubenv

Hi,
This is a patch series to allow grub-editenv and related utilities to follow symbolic links when finding its config file. This allows, for example, the ability to have two builds of grub for different platforms that have different prefixes set, but still use the same userland grub utilities.

For example, in our EFI builds we'll typically have prefix set as /EFI/fedora (on the EFI System Partition), but when you install on a BIOS machine it'll be /boot/grub2 (which may or may not be its own mountpoint.)

With this patch, on EFI machines we can make /boot/grub2/grubenv a symlink to /boot/efi/EFI/fedora/grubenv , and the same copy of grub-set-default will work on both kinds of systems.

Note: I'm not entirely sure I've done the gnulib parts of the first patch
the preferred way, but they do appear to be functional. I wound up using
"gnulib-tool --import --dir=. --lib=libgnu --source-base=grub-core/gnulib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files argp error fnmatch getdelim getline gettext progname readlink regex" and then only adding in the parts directly related to readlink().