Compare commits

..

No commits in common. "rawhide" and "f39" have entirely different histories.

3 changed files with 12 additions and 49 deletions

View file

@ -1,5 +0,0 @@
# systemd-boot default anaconda installs
# mounts the ESP at /boot/efi, tell kernel-install
# that it should be putting kernel/initrd/bls/etc
# entries there rather than in /boot
BOOT_ROOT=/boot/efi

View file

@ -4,10 +4,9 @@
Name: sdubby
Version: 1.0
Release: 13%{?dist}
Release: 7%{?dist}
Summary: Set of systemd-boot shims that don't fit anywhere else in the distro
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
License: GPLv2+
URL: https://pagure.io/sdubby.git
BuildArchitectures: noarch
ExclusiveArch: %{efi}
@ -17,9 +16,6 @@ Source2: COPYING
Source3: entries.srel
Source4: updateloaderentries.8
Source5: README.md
# another config script which should eventually be moved to
# anaconda, because it knows where the ESP is actually mounted
Source6: install.conf
Requires: findutils
Requires: util-linux
@ -58,7 +54,6 @@ install -T -m 444 %{SOURCE3} %{buildroot}%{efi_esp_root}/loader/entries.srel
ln -sr %{buildroot}%{_sbindir}/updateloaderentries %{buildroot}%{_sbindir}/grubby
install -TD -m 444 %{SOURCE4} %{buildroot}%{_mandir}/man8/updateloaderentries.8
gzip %{buildroot}%{_mandir}/man8/updateloaderentries.8
install -TD -m 444 %{SOURCE6} %{buildroot}%{_sysconfdir}/kernel/install.conf
# should we create /boot/efi/loader/loader.conf here?
# instead we are ghosting the config file, and letting anaconda create it
@ -76,29 +71,10 @@ install -TD -m 444 %{SOURCE6} %{buildroot}%{_sysconfdir}/kernel/install.conf
# files on the ESP (fat) will always have 700
%{efi_esp_root}/loader/entries
%config(noreplace) %{efi_esp_root}/loader/entries.srel
%config(noreplace) %{_sysconfdir}/kernel/install.conf
%attr(0644,root,root) %ghost %config(noreplace) %{efi_esp_root}/loader/loader.conf
%changelog
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Aug 26 2024 Jeremy Linton <jeremy.linton@arm.com> 1.0-11
- BZ 2271533 Support ALL for add/remove kernel options
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 1.0-10
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Mar 26 2024 Jeremy Linton <jeremy.linton@arm.com> - 1.0-8
- Add default kernel compatibility flag and install.conf file to force kernel-install to do the right thing, work around BZ 2271674
* Mon Mar 18 2024 Adam Williamson <awilliam@redhat.com> - 1.0-7
- Stop providing grubby (#2269992)

View file

@ -58,7 +58,7 @@ if [[ "$progname" == "updateloaderentries" ]]; then
fi
OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args:,default-kernel -- "$@")"
OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args: -- "$@")"
eval set -- "$OPTS"
@ -86,17 +86,10 @@ while [ ${#} -gt 0 ]; do
info_kernel="$2"
shift 1
;;
--default-kernel)
utilmode="defaultkernel"
;;
esac
shift
done
if [[ "$info_kernel" == "ALL" ]]; then
unset info_kernel
fi
case "$utilmode" in
help)
echo "updateloaderentries.sh: When run as updateloaderentries it doesn't require any parameters and merges"
@ -111,18 +104,17 @@ case "$utilmode" in
;;
add)
config_file=`bootctl list |grep -B7 -A2 ".*linux:.*${info_kernel}"|grep "^.*source:" |cut -d: -f2- `
for fn in $config_file; do
grep ${modify_args} $fn >/dev/null
if [[ "$?" == "1" ]]; then
sed -i -e "s/^options /options ${modify_args} /" $fn
fi
done
grep ${modify_args} $config_file
if [[ "$?" == "1" ]]; then
sed -i -e "s/^options /options ${modify_args} /" $config_file
fi
;;
info)
bootctl list | grep -B7 -A2 ".*linux:.*$info_kernel" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
;;
defaultkernel)
bootctl list |grep -A6 ".*title:.*(default)" | grep "linux:" | cut -c16-
if [[ "$info_kernel" == "ALL" ]];then
bootctl list | grep -B7 -A2 "linux:" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
else
bootctl list | grep -B7 -A2 ".*linux:.*$info_kernel" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
fi
;;
merge)
for i in /boot/efi/loader/entries/*; do