Commit Graph

477 Commits

Author SHA1 Message Date
Peter Jones
6b2dd0f731 Another arm building fix.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-12 10:56:34 -04:00
Peter Jones
b887897c3c do-rebase: use --no-signature as well
This adds --no-signature to do-rebase's diff format-patch invocation, so the
only things that change are the actual patch contents.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-12 10:55:34 -04:00
Peter Jones
e8fe2763b0 Minor fixup, woops.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 17:57:52 -04:00
Peter Jones
64626d2a22 Fix arm (32-bit) ABI specification.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 17:13:42 -04:00
Peter Jones
a52365a0df Port several fixes from the F28 tree and a WIP tree.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 16:49:50 -04:00
Javier Martinez Canillas
91f9e5a07c 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-07-11 15:40:00 -04:00
Javier Martinez Canillas
db5dccf332 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-07-11 15:40:00 -04:00
Javier Martinez Canillas
64420615c2 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-07-11 15:40:00 -04:00
Peter Jones
cee2256e1c Fix some places where f28 and f29 .spec diverged
This is just to make diffing to make sure I haven't missed anything easier.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 15:40:00 -04:00
Peter Jones
33444dc94a Rebased to newer upstream for fedora-29
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 14:42:27 -04:00
Peter Jones
bf795fa3c9 We don't need 10002-Make-it-possible-to-enabled-build-id-sha1.patch any more.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-11 14:42:27 -04:00
Peter Jones
ac03ec8379 Force gentpl to use python3
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 16:55:09 -04:00
Peter Jones
752ceb1640 Rebased to newer upstream for fedora-29
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 15:12:02 -04:00
Peter Jones
dd0009ec4d Enable 32-bit ARM EFI builds.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 15:12:02 -04:00
Peter Jones
31cddd6fc0 Add some features to do-rebase
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 15:11:55 -04:00
Peter Jones
bf33524673 Minor permissions fixes
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-10 14:39:21 -04:00
Igor Gnatenko
15eb78a25c add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-09 19:06:46 +02:00
Peter Jones
63f1a982b9 Various fixups (gcc 8, xfs, UEFI https)
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>
2018-05-16 11:15:49 -04:00
Javier Martinez Canillas
655e9ec04f 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:23:31 -04:00
Javier Martinez Canillas
9fefeed59c 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:23:31 -04:00
Javier Martinez Canillas
0e98773e00 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:23:31 -04:00
Javier Martinez Canillas
bbce628672 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:16 -04:00
Javier Martinez Canillas
dc178ac546 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:13:07 -04:00
Peter Jones
a8d8dcf190 A couple of fixes needed by Fedora Atomic - javierm
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-05-11 10:13:05 -04:00
Peter Jones
578b4d713f 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-05-11 10:13:04 -04:00
Peter Jones
fb3328442e 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:38 -04:00
Peter Jones
c789522f7c Work around some issues with older automake found in CentOS.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-11 14:43:48 -04:00
Javier Martinez Canillas
ed50db379d 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:11:27 -04:00
Peter Jones
4fd69fdbcd Pull in some TPM fixes I missed.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-06 16:19:11 -04:00
Peter Jones
9f11ff245c Fix rebase error.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-06 16:03:10 -04:00
Peter Jones
0bcec266a0 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:42:49 -04:00
Peter Jones
78e1a10ec4 Add grub2-switch-to-blscfg
Fix for BLS paths on BIOS / non-UEFI (javierm)

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-03 13:41:24 -04:00
Benjamin Pereto
d73e0cbe7e FIX: broken rpm build introduced in 61faef, which fails with "missing directory for 20-grubby.install" 2018-04-02 07:47:39 -07:00
Javier Martinez Canillas
61faef65b2 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:09:34 -04:00
Peter Jones
06b68a8c94 Build the blscfg module in on EFI builds.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-06 14:47:22 -05:00
Peter Jones
ec4acbbd98 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 10:08:00 -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