libostree: Add initial GRUB2 support

In this approach, we drop a /etc/grub.d/15_ostree file which is a
hybrid of shell/C that picks up bits from the GRUB2 library (e.g. the
block device script generation), and then calls into libostree's
GRUB2 code which knows about the BLS entries.

This is admittedly ugly.  There exists another approach for GRUB2 to
learn the BLS specification.  However, the spec has a few issues:

https://www.redhat.com/archives/anaconda-devel-list/2014-July/msg00002.html

This approach also gives a bit more control to the admin via the
naming of the 15_ostree symlink; they can easily disable it:

Or reorder the ostree entries ahead of 10_linux:

Also, this approach doesn't require patches for grub2, which is an
issue with the pressure to backport (rpm-)OSTree to EL7.
This commit is contained in:
Colin Walters committed 2014-10-16 14:15:00 -04:00
1 parent 92c5a9f992
commit d546abfa2a
19 files changed
+639 -11

No files matched your search

+12
View File
@@ -46,6 +46,14 @@ Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package includes the header files for the %{name} library.
%package grub2
Summary: GRUB2 integration for OSTree
Group: Development/Libraries
Requires: grub2
%description grub2
GRUB2 integration for OSTree
%prep
%setup -q -n ostree-%{version}
@@ -94,3 +102,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/gtk-doc/html/ostree
%{_datadir}/gtk-doc/html/ostree
%{_datadir}/gir-1.0/OSTree-1.0.gir
%files grub2
%{_sysconfdir}/grub.d/*ostree
%{_libexecdir}/ostree/grub2*