Commit Graph

180 Commits

Author SHA1 Message Date
Troy Dawson
8c3b224dd2 Bump release for June 2024 mass rebuild 2024-06-24 08:45:30 -07:00
Fedora Release Engineering
758f62e580 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 21:05:49 +00:00
Fedora Release Engineering
5318daa5c6 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-20 21:34:21 +00:00
Marta Lewandowska
893f94f428 Don't overwrite vars that start with GRUB_CMDLINE_LINUX
When updating args for ALL kernels, grubby clobbers all variables
in /etc/default/grub that start with GRUB_CMDLINE_LINUX and renders
that line multiple times, for each variable that exists. This breaks
using recovery mode. Fix so this doesn't happen anymore.

Signed-off-by: Marta Lewandowska <mlewando@redhat.com>
2024-01-11 09:40:17 +01:00
Miroslav Suchý
a73ecd5815 Migrate to SPDX license
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2
2023-12-01 08:13:01 +00:00
Zbigniew Jędrzejewski-Szmek
aa9b1b454f Drop installkernel so that it can by provided by systemd
systemd has kernel-install which supports being invoked as installkernel.
After the file is removed from grubby, we can just provide a symlink
installkernel → kernel-install.
2023-09-11 13:14:30 +02:00
Fedora Release Engineering
3d050aaf49 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 05:39:58 +00:00
Marta Lewandowska
8656bfd565 Do not set root with not copying default 2023-02-21 19:10:32 -05:00
Fedora Release Engineering
d696710922 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 11:35:50 +00:00
Robbie Harwood
68f872a10e Drop custom rpm-sort
See-also: https://github.com/rpm-software-management/rpm/pull/2249
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-11-01 13:58:51 -04:00
Robbie Harwood
9f3764d8d2 Apply Marta's copy-default args fix
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-10-04 17:16:29 +00:00
Robbie Harwood
0da23ad751 Give up and just pull the config from BLS
Suggested-by: Bojan Smojver <bojan@rexursive.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-08-22 21:47:49 +00:00
Robbie Harwood
74ff4810be Mark package as obsoleting -deprecated
Resolves: #2117817
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-08-17 15:17:48 +00:00
Robbie Harwood
1faea2de0a Handle updating /etc/kernel/cmdline
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-08-02 18:00:16 -04:00
Fedora Release Engineering
c8241463d7 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 13:06:10 +00:00
Robbie Harwood
29fb24f205 Clarify that grub files aren't used on s390x in man page
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-07-19 19:26:03 +00:00
Robbie Harwood
810b5eee5a Update spec file for previous change
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-06-22 14:43:48 -04:00
Robbie Harwood
78927fa5ed Revert "Additionally write to /etc/kernel/cmdline"
This reverts commit 599a2e1a99.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-06-22 14:43:02 -04:00
Robbie Harwood
599a2e1a99 Additionally write to /etc/kernel/cmdline
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-05-31 17:23:49 +00:00
Robbie Harwood
79765ad0d7 Stop building on ia32
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-04-27 13:13:57 -04:00
Robbie Harwood
415ad451de Remove upstream and layers of indirection around -bls
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-04-27 13:08:25 -04:00
Robbie Harwood
1bc3038166 Add missing changelog (Remove grubby-deprecated)
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-03-15 16:06:36 -04:00
Robbie Harwood
59ba93105a grubby-bls: wire up -h (help)
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2022-03-10 20:40:02 +00:00
Robbie Harwood
dfdd26c908 grubby-bls: wire up -h (help)
Originally authored by Lukas Herbolt.
2022-02-07 16:42:57 -05:00
Fedora Release Engineering
0dd1a4fc40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 11:50:18 +00:00
Fedora Release Engineering
eaef784cc6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 07:09:11 +00:00
Javier Martinez Canillas
e69860d718
Man page and package description fixes
Clarify package description
  Resolves: rhbz#1913299
Update man page to not mention the GRUB config in the ESP anymore
  Resolves: rhbz#1958458

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2021-06-23 10:21:14 +02:00
Javier Martinez Canillas
e94425201f
Clarify package description
The grubby script was meant to be a temporary solution to provide backward
compatibility with existing grubby users. But it turned out that grubby is
the recommended approach to modify the boot loader entries.

Let's make clear in the package description that this is not only meant to
be used for legacy compatibility purposes, which may discourage its usage.

Resolves: rhbz#1913299

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2021-06-23 07:56:49 +02:00
Javier Martinez Canillas
2b59d1355d
grubby-bls: expand only the kernelopts variable
The BLS snippets have the options field set to a kernelopts variable by
default, which is set in GRUB's environemnt block to the kernel cmdline.

When the kernel command line parameters are modified for all the entries,
the value of this kernelopts variable is modified. But if the cmdline is
modified for a single entry, then the kernelopts variable is expanded and
the resulted modified value stored in the BLS snippet.

The grubby tool expanded all the variables in the options field, but it's
possible that some of these variables are managed by another tool. For
example the tuned program adds a tuned variable that shouldn't be changed
by the grubby tool. Otherwise it will mangle the tuned configuration set.

To prevent this, let's make grubby to only expand the kernelopts variable.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2021-06-09 23:40:23 +02:00
Javier Martinez Canillas
5d3963841d
grubby-bs: Fix changing kernel cmdline params not working on ppc64le
Currently the grubby script re-generates a GRUB config file that contains
menuentry commands for every /boot/loader/entries/*.conf file snippet.

But this is only needed for ppc64le machines that have a Petitboot version
that doesn't support parsing BLS snippets. Instead of generating a config
on any ppc64le machine, restrict this for the case where is really needed.

The /etc/grub.d/10_linux script already takes this into account and does
not add menuentry commands unless is needed. But the grubby script didn't
check this, causing changing kernel cmdline params to not work on ppc64le.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2021-04-26 18:46:31 +02:00
Fedora Release Engineering
786a133370 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 13:00:54 +00:00
Tom Stellard
fd57e031d4
Use make_build macro instead of plain make
This will make it possible for buildroots to inject arguments to
make by redefining the %__make macro.
2020-12-30 17:27:35 +01:00
Peter Robinson
536f42db1c Add device tree kernel install option, minor cleanups 2020-11-24 10:44:12 +00:00
Josh Boyer
b91640a743 Only require s390utils-core
zipl appears to be the only thing grubby needs, and that is provided by s390utils-core.  Change the Requires to that, which allows for a more minimal installation.
2020-10-26 16:13:44 -04:00
Josh Boyer
3498276978 Only require s390utils-core
zipl appears to be the only thing grubby needs, and that is provided by s390utils-core.  Change the Requires to that, which allows for a more minimal installation.
2020-10-24 12:33:50 +00:00
Fedora Release Engineering
1ead121a08 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 00:24:28 +00:00
Javier Martinez Canillas
a5c9c3a138
fix build with rpm-4.16 and correct --extra-initrd option image path
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-06-26 10:16:05 +02:00
Javier Martinez Canillas
12e62c4f0a
grubby-bls: don't replace options with kernelopts if values are the same
If the options field in a BLS file has the same value than the kernelopts
variable in grubenv, the options is replaced with the kernelopts variable.

This was done to keep the options in the BLS files in sync when possible,
but having the kernel cmdline as a variable in the grubenv file was proven
to be fragile. Instead, the kernel cmdline will be stored in the BLS files
to make the configuration more robust. This will work even if the grubenv
gets corrupted or is deleted.

Since we want to get rid of the kernelopts variable, don't attempt to use
that in the BLS snippets anymore.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-05-13 18:44:59 +02:00
Javier Martinez Canillas
959c481fa9
Fix installed man page file mode bits
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-05-06 16:24:55 +02:00
Javier Martinez Canillas
b2ab29059a
grubby-bls: add a --no-etc-grub-update option and a fix for --args
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-05-05 12:23:10 +02:00
Javier Martinez Canillas
670185c682
Update man page to match current grubby script options and fix a bug
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-04-29 18:37:40 +02:00
Javier Martinez Canillas
303821d014
grubby-bls: update man page to match options in current wrapper script
The man page of the old grubby tool is still shipped in the grubby package
but instead there should be a man page that only documents the options for
the wrapper grubby script that is used to manage the BLS config snippets.

Current man page is confusing for users so let's add one that contains the
options that are supported by the wrapper script but no unsupported ones.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-04-29 18:37:05 +02:00
Javier Martinez Canillas
8c7d866907
Make grubby to also update GRUB_CMDLINE_LINUX in /etc/default/grub
The grubby --update-kernel=ALL option is used to update the kernel command
line parameters for all the boot entries. But the updated cmdline is lost
if the grub2-mkconfig command is executed, since in that case the cmdline
is changed with the value set by GRUB_CMDLINE_LINUX in /etc/default/grub.

To prevent the cmdline set by users to be overridden by mistake, keep the
value of GRUB_CMDLINE_LINUX in sync with the current cmdline.

Related: rhbz#1287854

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-03-30 14:25:41 +02:00
Javier Martinez Canillas
5f9558c222
Fix FTBFS and a couple of cleanups
Fix FTBFS
  Resolves: rhbz#1799496
Fix wrong S-o-B tag in patch
Fix warning about using unversioned Obsoletes

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2020-02-10 20:19:29 +01:00
Fedora Release Engineering
03b13cef75 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 03:36:54 +00:00
Javier Martinez Canillas
b5070e2278
grubby-bls: don't update grubenv when generating grub.cfg for ppc64le
Since PowerNV machines can have a Petitboot versions that still don't have
BLS support, grubby re-generates the grub.cfg file on all ppc64le machines.

But this has the side effect that the grubenv file is updated, which will
overwrite any value that was set by grubby itself. To prevent that run the
grub2-mkconfig with the --no-grubenv-update option.

Related: rhbz#1726514

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-11-30 00:29:12 +01:00
Javier Martinez Canillas
3ffa2d2706
Fix logic that checks for kernelopts in BLS files and some cleanups
grubby-bls: don't print rpm-sort error messages
  Resolves: rhbz#1731924
grubby-bls: remove -o option and support -c for ppc64le grub config
  Resolves: rhbz#1758598
grubby-bls: fix logic to check if the kernelopts var is defined in a BLS
  Resolves: rhbz#1726514

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-11-28 12:11:39 +01:00
Yuval Turgeman
9baffd002d
grubby-bls: strip only /boot from paths
If the /boot directory is a mount point, then the paths of the kernel and
initramfs images paths in the BLS snippet have to be relative to the root
of the boot partition. So the /boot prefix has to be stripped from paths
in this case.

But the function was wrongly stripping the entire path instead of only the
/boot prefix, which prevented having kernels and initrds in subdirectories.

Signed-off-by: Yuval Turgeman <yturgema@redhat.com>
2019-08-06 16:03:53 +02:00
Fedora Release Engineering
4009bc7ed4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 07:49:12 +00:00
Javier Martinez Canillas
b50c79e71c
Add a kernel-install plugin to execute hook scripts in /etc/kernel/
The kernel hook scripts in /etc/kernel/postinst.d and /etc/kernel/prerm.d
were executed by the new-kernel-pkg --rpmposttrans and --remove options.

But with a BLS configuration the new-kernel-pkg script isn't executed and
instead the kernel-install plugins are used. Add a kernel-install plugin
that executes the hooks since packages like dkms and akmod make use of it.

Resolves: rhbz#1696202

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-06-17 18:10:58 +02:00