From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XPZ6B-0001qQ-W0 for mharc-grub-devel@gnu.org; Thu, 04 Sep 2014 11:37:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPZ64-0001eF-6n for grub-devel@gnu.org; Thu, 04 Sep 2014 11:37:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPZ5y-0001y1-2j for grub-devel@gnu.org; Thu, 04 Sep 2014 11:37:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPZ5x-0001xq-Rv for grub-devel@gnu.org; Thu, 04 Sep 2014 11:37:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s84Fb84V030827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 4 Sep 2014 11:37:08 -0400 Received: from fenchurch.internal.datastacks.com.com (ovpn-113-152.phx2.redhat.com [10.3.113.152]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s84Fb7iv014651 for ; Thu, 4 Sep 2014 11:37:07 -0400 From: Peter Jones To: grub-devel@gnu.org Subject: [PATCH 0/2] Allow editenv to follow symlinks to find/make grubenv Date: Thu, 4 Sep 2014 11:36:53 -0400 Message-Id: <1409845015-16778-1-git-send-email-pjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 15:37:22 -0000 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().