Commit graph

477 commits

Author SHA1 Message Date
Peter Jones
902c8e8602 Add some features to do-rebase
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-31 13:54:24 -04:00
Peter Jones
5725bcd5ca Rebased to newer upstream for fedora-28
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-09 13:34:03 -04:00
Peter Jones
bbaf640231 Bumpspec broke on the last one... 2018-07-03 14:49:22 -04:00
Peter Jones
c2f54f5e21 Use BLS fragment filename as menu entry id and for sort criterion
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-03 14:48:30 -04:00
Javier Martinez Canillas
afb0baacd6
Use BLS fragment filename as menu entry id and for sort criterion
The BLS config filenames are guaranteed to be unique, so they can be
used as GRUB2 entry id and can also be used to sort the menu entries.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-07-02 17:33:09 +02:00
Javier Martinez Canillas
359c2df03d
Use /boot/loader/entries as BLS dir also on EFI systems
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>
2018-06-26 11:58:10 +02:00
Peter Jones
499c3e9702 Try even harder to get the concatenation and quoting right for GRUB_MODULES
Oy.  It looks right in rpmspec -P anyway...

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-19 12:08:17 -04:00
Peter Jones
257c8083c6 Get the name of lsefimmap right
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-19 11:21:12 -04:00
Peter Jones
fff16d8da3 Fix a rpm macro evaluation mishap
We need to pad our module list with spaces at all times, or else we get
'xfshttp' as a module on EFI and the build fails.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-19 11:10:31 -04:00
Peter Jones
448fa56b6a Various bugfixes
- Make the release be 37 since 36 is the last one we actually built
- Squash down the changelog for that as well
- Fix some TPM errors on 32-bit (hdegoede)
- More fixups to avoid compiler changes (pjones)
- Put lsmmap into the EFI builds (pjones)
  Related: rhbz#1572126

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-19 10:39:51 -04:00
Peter Jones
2be1600cad Include lsmmap in the efi build
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-06-19 10:32:50 -04:00
Javier Martinez Canillas
46dcf6afe9
Make 20-grub.install to exit if there is no machine ID set
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>
2018-06-15 15:21:30 +02:00
Javier Martinez Canillas
db7cf3a089
More fixes for BLS
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>
2018-06-07 19:02:21 +02:00
Javier Martinez Canillas
10cf1ae6a4 Allow do-rebase to pull the patches from different repositories
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>
2018-05-14 15:22:03 -04:00
Javier Martinez Canillas
44d0f31d1f Set default in parameter expasion to avoid do-rebase exit due an unset var
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>
2018-05-14 15:22:03 -04:00
Javier Martinez Canillas
070bb462db Add .git.diff.order file
Commit 97a85089d6 ("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>
2018-05-14 15:22:03 -04:00
Javier Martinez Canillas
97a85089d6 Make do-rebase generate proper patches regardless of git config
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>
2018-05-11 10:53:08 -04:00
Javier Martinez Canillas
67f30b6a74 Two more fixes for BLS support
- 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>
2018-05-11 10:03:46 -04:00
Peter Jones
5034b2b164 A couple of fixes needed by Fedora Atomic - javierm
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-24 10:42:11 -04:00
Peter Jones
b43faa2e9b Put the os-prober dep back in - we need to change test plans and criteria
before it can go.
  Resolves: rhbz#1569411

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-23 15:21:59 -04:00
Peter Jones
7fae9c0df0 Work around some issues with older automake found in CentOS.
Make multiple initramfs images work in BLS.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-11 14:47:31 -04:00
Peter Jones
3c4dd19ca5 Work around some issues with older automake found in CentOS.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-11 14:42:18 -04:00
Javier Martinez Canillas
4decb44288 Make 20-grub.install to generate debug BLS when MAKEDEBUG is set
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>
2018-04-11 10:10:58 -04:00
Peter Jones
146faa5a93 Pull in some TPM fixes I missed.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-06 16:18:21 -04:00
Peter Jones
a8a2f78331 Fix rebase error.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-06 16:02:20 -04:00
Peter Jones
da1991e3f0 Enable TPM measurements
Set the default boot entry to the first entry when we're using BLS.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-06 15:41:46 -04:00
Peter Jones
e8e6235eab Fix for BLS paths on BIOS / non-UEFI (javierm)
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-03 13:37:54 -04:00
Peter Jones
a77a66863f I am getting very tired of this
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 16:42:01 -04:00
Peter Jones
b65b645183 Rebased to newer upstream for fedora-28
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 16:41:23 -04:00
Peter Jones
dd1f245e52 I am getting tired of this
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 16:08:30 -04:00
Peter Jones
d4f21da2e0 Some more minor build issues.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 15:58:52 -04:00
Peter Jones
e3bc417798 Fix up some minor build bugs.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 15:30:44 -04:00
Peter Jones
2e4660d8c6 blscfg scripts
Install kernel-install scripts. (javierm)
Add grub2-switch-to-blscfg

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-16 14:45:30 -04:00
Javier Martinez Canillas
4a0d9d88ab Add kernel-install scripts
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>
2018-03-14 17:07:19 -04:00
Peter Jones
4497b0da96 Build the blscfg module in on EFI builds.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-06 14:46:09 -05:00
Peter Jones
81987f4958 Update grub2 for f28
- 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>
2018-02-28 09:40:44 -05:00
Igor Gnatenko
38305f23ff
Remove %clean section
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>
2018-02-14 08:05:13 +01:00
Igor Gnatenko
8bbfda8a06
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:38 +01:00
Peter Jones
8b3d200862 Fix a merge error from 2.02-21 that affected kernel loading on Aarch64.
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>
2018-01-23 16:35:31 -05:00
Peter Jones
d51395ea7f Update our gcc nerfing.
- 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>
2018-01-19 13:17:09 -05:00
Peter Jones
28076bb004 Nerf some new gcc 'features'
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>
2018-01-18 18:23:41 -05:00
Peter Jones
a91fed7f66 Fix some efi modules bugs
- Fix grub2-efi-modules provides/obsoletes generation
  Resolves: rhbz#1506704
- *Also* build grub-efi-ia32{,-*,!-modules} packages for i686 builds
  Resolves: rhbz#1502312

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-18 14:14:19 -05:00
Peter Jones
8cceee7ebe Make everything under /boot/efi be mode 0700, since that's what FAT will
show anyway.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-18 14:12:52 -05:00
Peter Jones
6f1e3d5698 Dump a bunch of work-in-progress patches for now.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-17 17:04:51 -05:00
Peter Jones
da63b36ca7 Rebase to newer upstream and fix pmtimer.
- Rebase to current master
- Fix pmtimer calibration to not take forever to fail on kvm.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-17 15:41:44 -05:00
Peter Jones
17281fd098 Make do-rebase rebase from grub-2.02 not master.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-01-17 15:40:07 -05:00
Peter Jones
307d019554 Handle xen module loading (somewhat) better
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>
2017-10-24 12:53:12 -04:00
Peter Jones
e1f4c0ec1e Make grub2-efi-aa64 provide grub2
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>
2017-09-20 15:28:42 -04:00
Dennis Gilmore
8887fc70b1 bump for Obsoletes again
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2017-09-11 12:39:02 -05:00
Adam Williamson
af2933aadd Re-synchronize master and f27
There's really no need for them to diverge yet.
2017-09-11 10:01:54 -07:00