For EFI systems, the BLS fragments were stored in the EFI System Partition
(ESP) while in non-EFI systems it was stored in /boot.
For consistency, it's better to always store the BLS fragments in the same
path regardless of the firmware interface used.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
The kernel-install plugins are called with an environment variable named
$KERNEL_INSTALL_MACHINE_ID, which is set to the machine ID read from the
/etc/machine-id file. If the file doesn't exist or is empty, the variable
is empty and $BOOT_DIR_ABS is set to a temporary directory that's removed
after all the plugins exit.
So if $KERNEL_INSTALL_MACHINE_ID is not set, just exit the script since
installing a kernel BootLoaderSpec fragment won't be possible anyways.
Resolves: rhbz#1576573
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Add some fixes for BLS parsing logic and also make 20-grub.install script
to query the relative path of the kernel and initramfs images, so BLS can
also work when /boot is not a mount point or is a btrfs subvolume.
Also pull some build fixes.
Resolves: rhbz#1588184
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Fixups to work with gcc 8
Experimental https boot support on UEFI
XFS fixes for sparse inode support
Resolves: rhbz#1575797
Signed-off-by: Peter Jones <pjones@redhat.com>
Currently the script always pull the patches from rhboot Github repo, but
for testing and developing purposes may be useful to use a different one.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
The script has set -u so calling do-rebase --help fails with the following:
$ ./do-rebase --help
./do-rebase: line 16: $1: unbound variable
Avoid this by setting a default value when doing the parameter expansion
for the positional parameter $1 passed to the usage() function.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Commit 97a85089d67 ("Make do-rebase generate proper patches regardless of
git config") changed do-rebase to generate patches as expected by the pkg
but unfortunately it missed the file to control the order in which files
appear in the output.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
The do-rebase script generate patches with git-format-patch, but the pkg
expects some non-default git configurations for the diffs and stats.
So instead requiring developers to setup these config options, pass them
to git-format-patch in do-rebase to generate the proper patches.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
- Use version field to sort BLS entries if id field isn't defined
- Add version field to BLS fragments generated by 20-grub.install
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
If MAKEDEBUG=yes in /etc/sysconfig/kernel, then a debug menu entry should
be created. So for BLS, a debug configuration file has to be created that
contains debug kernel command line parameters.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Install a 20-grubby.install and 90-loaderentry.install kernel-install
scripts in /etc/kernel/install.d so these have higher precedence than
the ones installed in /usr/lib/kernel/install.d by the systemd pkg.
If GRUB 2 pkg isn't installed, then the systemd scripts are executed
on kernel installation and removal.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
- Try to fix things for new compiler madness.
I really don't know why gcc decided __attribute__((packed)) on a "typedef
struct" should imply __attribute__((align (1))) and that it should have a
warning that it does so. The obvious behavior would be to keep the alignment
of the first element unless it's used in another object or type that /also/
hask the packed attribute. Why should it change the default alignment at
all?
- Merge in the BLS patches Javier and I wrote.
- Attempt to fix pmtimer initialization failures to not be super duper slow.
Signed-off-by: Peter Jones <pjones@redhat.com>
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Fix a merge error from 2.02-21 that affected kernel loading on Aarch64.
Related: rhbz#1519311
Related: rhbz#1506704
Related: rhbz#1502312
Signed-off-by: Peter Jones <pjones@redhat.com>
- Only nerf annobin, not -fstack-crash-protection.
- Fix a conflict on /boot/efi directory permissions between -cdboot and the
normal bootloader.
Signed-off-by: Peter Jones <pjones@redhat.com>
For now, completely nerf annobin and -fstack-clash-protection; at least
one of those things makes grubx64.efi crash on start.
Signed-off-by: Peter Jones <pjones@redhat.com>
You'll still need to actually install grub2-${efiarch}-modules and then
use grub2-install to install the xen modules in /boot/grub2/,
but this should handle actually loading them from the grub config file.
Resolves: rhbz#1486002
Signed-off-by: Peter Jones <pjones@redhat.com>
I'm not sure this is 100% the right place to do this - maybe it should
go in anaconda - but it seems most expedient :/
Resolves: rhbz#1491045
Signed-off-by: Peter Jones <pjones@redhat.com>
Revert the /usr/lib/.build-id/ change:
https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo
says (without any particularly convincing reasoning):
The main build-id file should not be in the debuginfo file, but in the
main package (this was always a problem since the package and debuginfo
package installed might not match). If we want to make usr/lib/debug/ a
network resource then we will need to move the symlink to another
location (maybe /usr/lib/.build-id).
So do it that way. Of course it doesn't matter, because exclude gets
ignored due to implementation details.
Signed-off-by: Peter Jones <pjones@redhat.com>
Revert the /usr/lib/.build-id/ change:
https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo
says (without any particularly convincing reasoning):
The main build-id file should not be in the debuginfo file, but in the
main package (this was always a problem since the package and debuginfo
package installed might not match). If we want to make usr/lib/debug/ a
network resource then we will need to move the symlink to another
location (maybe /usr/lib/.build-id).
So do it that way. Of course it doesn't matter, because exclude gets
ignored due to implementation details.
Signed-off-by: Peter Jones <pjones@redhat.com>