Commit Graph

359 Commits

Author SHA1 Message Date
Javier Martinez Canillas
2021dcd990
Add %{_libexecdir}/installkernel directory to the %files list
Only the %{_libexecdir}/installkernel/installkernel-bls file was added to
the %files directive but the dir containing the file should also be listed.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-08-11 22:07:49 +02:00
Peter Jones
dd8a32f45a Fix the typo I introduced.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-06 13:43:20 -04:00
Javier Martinez Canillas
b8ca92b29b Add an installkernel script for BLS configurations
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-06 13:33:24 -04:00
Peter Jones
c3049d21d8 Kill .note.gnu.property with fire.
Related: rhbz#1612339

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-03 15:13:04 -04:00
Peter Jones
5a73eab265 Backport a pile of fixes from the f29 tree.
Related: rhbz#1609431

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-02 16:21:44 -04:00
Peter Jones
2451824471 More bls fixes.
Resolves: rhbz#1609431

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-31 14:21:27 -04:00
Peter Jones
316103d670 Update the changelog.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-31 14:16:05 -04:00
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
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
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
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
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
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
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
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
Peter Jones
b52a729921 Fix Obsoletes on grub2-pc
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-09-06 18:26:03 -04:00
Petr Šabata
50a9c3a2b3 Limit the pattern matching in do_alt_efi_install to files
This unbreaks module builds that contain the ".module" string in their
dist tags.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2017-08-30 11:03:41 -04:00
Peter Jones
7849a868f2 Revert the /usr/lib/.build-id/ change
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>
2017-08-25 16:40:58 -04:00
Peter Jones
152cdcd6f5 Minor updates to provides and excludes
Add some unconditional Provides:
  grub2-efi on grub2-efi-${arch}
  grub2-efi-cdboot on grub2-efi-${arch}-cdboot
  grub2 on all grub2-${arch} pacakges
Something is somehow adding /usr/lib/.build-id/... to all the -tools
  subpackages, so exclude all that.

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-25 13:31:34 -04:00
Peter Jones
1300d7b633 Fix arm kernel command line allocation
Resolves: rhbz#1484609
Get rid of the temporary extra efi packages hack.

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-24 14:10:08 -04:00
Peter Jones
53a4172ac4 Various fixups
- Put grub2-mkimage in -tools, not -tools-extra.
- Fix i686 building
- Fix ppc HFS+ usage due to /boot/efi's presence.

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-23 17:05:03 -04:00
Peter Jones
71e0fb4ea6 Put grub2-mkimage in -tools, not -tools-extra.
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-22 11:14:37 -04:00
Peter Jones
31ea67e0aa Add the .img files into grub2-pc-modules (and all legacy variants)
autoqa is seeing a failure that looks like:

13:50:17,909 INF program: grub2-install: error: cannot open `/usr/lib/grub/i386-pc/lzma_decompress.img': No such file or directory.

And it's because the .img files are currently excluded.  So put them
back.

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-18 17:36:01 -04:00