Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66963ec00d | ||
|
|
14123624e1 | ||
|
|
9b3cf9309f | ||
|
|
99971e1c56 | ||
|
|
0e5143e862 | ||
|
|
3bb97ea395 | ||
|
|
0e71a0aa22 | ||
|
|
b238ed07bc |
3 changed files with 49 additions and 12 deletions
5
install.conf
Normal file
5
install.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# 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
|
||||
28
sdubby.spec
28
sdubby.spec
|
|
@ -4,9 +4,10 @@
|
|||
|
||||
Name: sdubby
|
||||
Version: 1.0
|
||||
Release: 7%{?dist}
|
||||
Release: 13%{?dist}
|
||||
Summary: Set of systemd-boot shims that don't fit anywhere else in the distro
|
||||
License: GPLv2+
|
||||
# Automatically converted from old format: GPLv2+ - review is highly recommended.
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://pagure.io/sdubby.git
|
||||
BuildArchitectures: noarch
|
||||
ExclusiveArch: %{efi}
|
||||
|
|
@ -16,6 +17,9 @@ 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
|
||||
|
|
@ -54,6 +58,7 @@ 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
|
||||
|
|
@ -71,10 +76,29 @@ gzip %{buildroot}%{_mandir}/man8/updateloaderentries.8
|
|||
# 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)
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ if [[ "$progname" == "updateloaderentries" ]]; then
|
|||
fi
|
||||
|
||||
|
||||
OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args: -- "$@")"
|
||||
OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args:,default-kernel -- "$@")"
|
||||
|
||||
eval set -- "$OPTS"
|
||||
|
||||
|
|
@ -86,10 +86,17 @@ 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"
|
||||
|
|
@ -104,17 +111,18 @@ case "$utilmode" in
|
|||
;;
|
||||
add)
|
||||
config_file=`bootctl list |grep -B7 -A2 ".*linux:.*${info_kernel}"|grep "^.*source:" |cut -d: -f2- `
|
||||
grep ${modify_args} $config_file
|
||||
if [[ "$?" == "1" ]]; then
|
||||
sed -i -e "s/^options /options ${modify_args} /" $config_file
|
||||
fi
|
||||
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
|
||||
;;
|
||||
info)
|
||||
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
|
||||
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-
|
||||
;;
|
||||
merge)
|
||||
for i in /boot/efi/loader/entries/*; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue