Commit Graph

392 Commits

Author SHA1 Message Date
Javier Martinez Canillas
5d7e4540ed
Some BLS fixes
20-grub-install: Replace, rather than overwrite, the existing kernel (pjones)
  Resolves: rhbz#1642402
99-grub-mkconfig: Don't update grubenv generating entries on ppc64le
  Related: rhbz#1637875
blscfg: fallback to default_kernelopts if BLS option field isn't set
  Related: rhbz#1625124
grub-switch-to-blscfg: copy increment.mod for legacy BIOS and ppc64
  Resolves: rhbz#1652806

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-02-27 19:54:32 +01:00
Javier Martinez Canillas
f6d4ab8f83
Check if blsdir exists before attempting to get it's real path
Resolves: rhbz#1677415

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-02-15 18:22:18 +01:00
Javier Martinez Canillas
e3a408a521
A couple of fixes
Don't make grub_strtoull() print an error if no conversion is performed
  Resolves: rhbz#1674512
Set blsdir if the BLS directory path isn't one of the looked up by default
  Resolves: rhbz#1657240

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-02-13 13:41:46 +01:00
Javier Martinez Canillas
11b49b804e
BLS support enhancements and some fixes
- Don't build the grub2-efi-ia32-* packages on i686 (pjones)
- Add efi-export-env and efi-load-env commands (pjones)
- Make it possible to subtract conditions from debug= (pjones)
- Try to set -fPIE and friends on libgnu.a (pjones)
- Add more options to blscfg command to make it more flexible
- Add support for prepend early initrds to the BLS entries
- Fix grub.cfg-XXX look up when booting over TFTP

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-02-04 19:28:49 +01:00
Fedora Release Engineering
5699af497f - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 01:37:54 +00:00
Igor Gnatenko
3463a4b800 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:06 +01:00
Igor Gnatenko
23b6ae2b79
Remove obsolete scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-27 19:01:54 +01:00
Javier Martinez Canillas
bb036b8233
Don't exclude /etc/grub.d/01_fallback_counting anymore
This was causing issues but it should be fixed now.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-17 12:58:43 +01:00
Javier Martinez Canillas
4ff5f8dcef
Another set of BLS fixes
BLS files should only be copied by grub-switch-to-blscfg if BLS isn't set
  Related: rhbz#1638117
Fix get_entry_number() wrongly dereferencing the tail pointer
  Resolves: rhbz#1654936
Make grub2-mkconfig to honour GRUB_CMDLINE_LINUX in /etc/default/grub
  Resolves: rhbz#1637875

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-11 20:23:51 +01:00
Javier Martinez Canillas
1f092caba7
Drop two efinet patches that were causing issues and a bunch of other fixes
Add comments and revert logic changes in 01_fallback_counting
Remove quotes when reading ID value from /etc/os-release
  Related: rhbz#1650706
blscfg: expand grub_users before passing to grub_normal_add_menu_entry()
  Resolves: rhbz#1650706
Drop buggy downstream patch "efinet: retransmit if our device is busy"
  Resolves: rhbz#1649048
Make the menu entry users option argument to be optional
  Related: rhbz#1652434
10_linux_bls: add missing menu entries options
  Resolves: rhbz#1652434
Drop "Be more aggro about actually using the *configured* network device."
  Resolves: rhbz#1654388
Fix menu entry selection based on title
  Resolves: rhbz#1654936

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-01 03:28:36 +01:00
Javier Martinez Canillas
f92a00c4b3
Remove installkernel-bls script
The installkernel-bls script is present in both the grub2-common and
grubby packages. But there's no need for this duplication and it can
just be installed by the grubby package.

Related: rhbz#1647721

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-11-21 10:06:17 +01:00
Javier Martinez Canillas
ff9dc1ed7d
Don't unconditionally set default entry when installing debug kernels
If a debug kernel package is installed, the default entry should only
be set when DEFAULTDEBUG=yes is set in /etc/sysconfig/kernel.

Resolves: rhbz#1636346

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-10-26 14:25:04 +02:00
Javier Martinez Canillas
420527a50b
A bunch of fixes for BLS
- add 10_linux_bls grub.d snippet to generate menu entries from BLS files
  Resolves: rhbz#1636013
- Only set kernelopts in grubenv if it wasn't set before
  Resolves: rhbz#1636466
- kernel-install: Remove existing initramfs if it's older than the kernel (pjones)
  Resolves: rhbz#1638405
- Update the saved entry correctly after a kernel install (pjones)
  Resolves: rhbz#1638117
- blscfg: sort everything with rpm *package* comparison (pjones)
  Related: rhbz#1638103
- blscfg: Make 10_linux_bls sort the same way as well
  Related: rhbz#1638103
- don't set saved_entry on grub2-mkconfig
  Resolves: rhbz#1636466
- Fix menu entry selection based on ID and title (pjones)
  Resolves: rhbz#1640979

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-10-23 15:57:56 +02:00
Peter Jones
db4a99687c Exclude /etc/grub.d/01_fallback_counting until we work through some design
questions.
  Resolves: rhbz#1614637

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-10-04 17:11:21 -04:00
Peter Jones
7531222057 Fix the fallback counting script even harder. Apparently, this wasn't
tested well enough.
  Resolves: rhbz#1614637

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-10-03 15:57:52 -04:00
Peter Jones
a3bfe35d12 Various bug fixes
- Fix grub.cfg boot counting snippet generation (lorbus)
  Resolves: rhbz#1614637
- Fix spurrious allocation error reporting on EFI boot
  Resolves: rhbz#1635319
- Stop doing TPM on BIOS *again*.  It just doesn't work.
  Related: rhbz#1579835
- Make blscfg module loadable on older grub2 i386-pc and powerpc-ieee1275
  builds
- Fix execstack cropping up in grub2-tools
- Ban stack trampolines with compiler flags.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-10-02 13:40:52 -04:00
Hans de Goede
ace3c257a6 Stop using pkexec for grub2-set-bootflag
Stop using pkexec for grub2-set-bootflag, it does not work under gdm instead
make it suid root (it was written with this in mind)

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-25 14:11:00 -04:00
Peter Jones
e30274adfa More EFI memory allocator work.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-25 14:10:22 -04:00
Peter Jones
c4e6bf30f6 Some more bug fixes and just some general hygiene.
Add 2 conditions to boot-success timer and service:
  Don't run it for system users
  Resolves: rhbz#1592201
  Don't run it when pkexec isn't available
  Resolves: rhbz#1619445
Use -Wsign-compare -Wconversion -Wextra in the build.
  Related: rhbz#1624532
  Related: rhbz#1626844

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-12 10:36:43 -04:00
Peter Jones
98536ecf37 Once more into the breach, dear friends.
- Limit grub_malloc() on x86_64 to < 31bit addresses, as some devices seem to
  have a colossally broken storage controller (or UEFI driver) that can't do
  DMA to higher memory addresses, but fails silently.
  Resolves: rhbz#1626844 (possibly really resolving it this time.)
- Also integrate Hans's attempt to fix the related error from -54, but do it
  the other way around: try the low addresses first and *then* the high one if
  the allocation fails.  This way we'll get low regions by default, and if
  kernel/initramfs don't fit anywhere, it'll try the higher addresses.
  Related: rhbz#1624532
- Coalesce all the intermediate debugging junk from -54/-55/-56.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-11 18:08:44 -04:00
Peter Jones
371309b06e More bug "fixes"...
Don't mangle fw_path even harder.
  Resolves: rhbz#1626844
Fix reboot being missing on some platforms, and make it alias to
  "reset" as well.
More dprintf().

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-11 11:07:08 -04:00
Peter Jones
76df8270f6 Several fixes.
Fix UEFI memory problem in a different way.
  Related: rhbz#1624532
Don't mangle fw_path with a / unless we're on http
  Resolves: rhbz#1626844

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-10 17:32:30 -04:00
Peter Jones
0c72748086 Fix UEFI booting in a different way.
Related: rhbz#1626844
Related: rhbz#1624532
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-09-10 17:05:51 -04:00
Kevin Fenzi
1b51084aaa Add patch from https://github.com/rhboot/grub2/pull/30 to fix uefi booting
Resolves: rhbz#1624532
2018-09-07 10:17:38 -07:00
Peter Jones
66fa5861ee Update conflicts on grubby
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-30 11:18:03 -04:00
Peter Jones
c2f7a5e9af Update some more stuff again and whatnot.
Fix AArch64 machines with no RAM latched lower than 1GB
  Resolves: rhbz#1615969
Set http_path and http_url when HTTP booting
Hopefully slightly better error reporting in some cases
Better allocation of kernel+initramfs on x86_64 and aarch64
  Resolves: rhbz#1572126

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-30 11:15:56 -04:00
Peter Jones
c87b938e5d woops
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-19 10:42:52 -04:00
Peter Jones
cefdf750ef We don't have the force python patch in SOURCES any more.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-16 14:21:41 -04:00
Peter Jones
bed013f094 Fix arm32 off-by-one error on reading the PE header.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-16 13:55:16 -04:00
Peter Jones
f0ceaa7597 Fix typo in /etc/grub.d/01_fallback_counting
Resolves: rhbz#1614637
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-16 13:53:45 -04:00
Javier Martinez Canillas
2d1140eb96
Add an installkernel script for BLS configurations
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-08-11 21:57:02 +02:00
Peter Jones
4892e6bea5 Temporarily make -cdboot files 0700 again.
We need to move these to /boot/efi/EFI/BOOT/ and change the perms at the same
time, but that means changing this, comps, and lorax (at least) at the same
time.  Right this minute isn't a good time to do that.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-07 11:21:29 -04:00
Peter Jones
73bf9047ae Kill .note.gnu.property with fire.
Resolves: rhbz#1612339

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-03 15:12:58 -04:00
Peter Jones
3e07ee7c3e Enable armv7 EFI builds. This was way harder than I expected.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-08-02 14:04:20 -04:00
Peter Jones
dbfd2e6b04 Make more stuff in our buildroot go into the git repo so I can grep it better.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-31 16:40:33 -04:00
Peter Jones
15a207211f Roll upstream's patches into one big patch here.
I don't really need to watch 150+ patches from upstream get applied.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-31 10:57:52 -04:00
Peter Jones
8d563110da --with-utils=host
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-27 12:52:55 -04:00
Peter Jones
da0e16c206 Fix autogen/autoconf invocation to actually re-make configure.
autogen.sh was running autoreconf, which *ran* configure but didn't actually
re-make it if it was there.  This means we effectively can't change our
configure invocation (for newer configure options), so that's bad.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-27 12:43:35 -04:00
Peter Jones
1f9267118f Fix some minor BLS issues
Rework the FDT module linking to make aarch64 build and boot right

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-17 16:50:04 -04:00
Peter Jones
ad4aff0c12 Rework SB patches and 10_linux.in changes even harder.
Apparently working on two identical trees at once is not good for doing things
right.

Resolves: rhbz#1601578
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-17 10:21:37 -04:00
Hans de Goede
1d36e193e6 Add support for setting boot_success / boot_indeterminate grubenv flags
Add support for making the user session automatically set the boot_success
flag and make offline-updates increment the boot_indeterminate grubenv var.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-07-16 16:51:14 -04:00
Peter Jones
ce0f493268 Rebased to newer upstream for fedora-29
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-16 15:54:21 -04:00
Peter Jones
e08eb33a57 Revert broken moduledir fix *again*.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-13 10:16:42 -04:00
Peter Jones
321567331b Fix our linuxefi/linux comand reunion
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-12 23:20:02 -04:00
Peter Jones
bfa240db6a Turn off armv7hl again until I can make the rest of the builds work
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-12 11:06:07 -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
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
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
Igor Gnatenko
15eb78a25c add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-09 19:06:46 +02:00