forked from pool/grub2
Accepting request 1169603 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1169603 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=325
This commit is contained in:
commit
fb2269db05
@ -1,88 +0,0 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# grub-mkconfig helper script.
|
||||
# Copyright (C) 2011 Michal Ambroz <rebus@seznam.cz>
|
||||
# Adapted for openSUSE by Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
# Adapted for EFI by Hans-Peter Jansen <hpj@urpla.net>
|
||||
#
|
||||
# you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with the script. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
# This file is deprecated, it is going to be removed soon
|
||||
# and it's functionality has been disabled.
|
||||
# The package memtest86+ is going to provide a similar file.
|
||||
# Until that happens, you can reenable this file by
|
||||
# adding to it the execute permission.
|
||||
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
export TEXTDOMAIN=grub2
|
||||
export TEXTDOMAINDIR=/usr/share/locale
|
||||
|
||||
CLASS="--class memtest86 --class gnu --class tools"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=Memtest
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} Memtest"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
|
||||
fi
|
||||
|
||||
# memtest86+ comes in two flavours, one EFI and one suitable for x86 real mode.
|
||||
# The EFI module requires security disabled in BIOS (Boot Mode: Other OS)
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
if [ -f /boot/efi/EFI/memtest86/memtest.efi ]; then
|
||||
memtest=/boot/efi/EFI/memtest86/memtest.efi
|
||||
elif [ -f /usr/lib/memtest86+/memtest.efi ]; then
|
||||
memtest=/usr/lib/memtest86+/memtest.efi
|
||||
else
|
||||
#memtest.efi not found
|
||||
exit 0
|
||||
fi
|
||||
loader='linux '
|
||||
message="$(gettext_printf "Loading EFI memtest ...\n" | grub_quote)"
|
||||
else
|
||||
if [ -f /boot/memtest.bin ]; then
|
||||
memtest=/boot/memtest.bin
|
||||
elif [ -f /usr/lib/memtest86+/memtest.bin ]; then
|
||||
memtest=/usr/lib/memtest86+/memtest.bin
|
||||
else
|
||||
#memtest.bin not found
|
||||
exit 0
|
||||
fi
|
||||
loader='linux16'
|
||||
message="$(gettext_printf "Loading x86 memtest ...\n" | grub_quote)"
|
||||
fi
|
||||
# locate the real partition
|
||||
GRUB_DEVICE_BOOT=$(grub2-probe -t device "$memtest")
|
||||
|
||||
if grub_file_is_not_garbage "$memtest" ; then
|
||||
gettext_printf "Found memtest image: %s\n" "$memtest" >&2
|
||||
basename=`basename $memtest`
|
||||
dirname=`dirname $memtest`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE_BOOT}")"
|
||||
|
||||
printf "menuentry '%s' %s \$menuentry_id_option '%s' {\n" "${OS}" "${CLASS}" "memtest-$boot_device_id"
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo '$message'
|
||||
${loader} ${rel_dirname}/${basename}
|
||||
}
|
||||
|
||||
EOF
|
||||
fi
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 19 21:50:53 UTC 2024 - Giacomo Comes <gcomes.obs@gmail.com>
|
||||
|
||||
- remove deprecated file 20_memtest86+
|
||||
* a similar file is provided by the package memtest86+
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 11 02:55:05 UTC 2024 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
|
11
grub2.spec
11
grub2.spec
@ -177,7 +177,6 @@ Source1: 90_persistent
|
||||
Source2: grub.default
|
||||
Source4: grub2.rpmlintrc
|
||||
Source6: grub2-once
|
||||
Source7: 20_memtest86+
|
||||
Source8: README.ibm3215
|
||||
Source10: openSUSE-UEFI-CA-Certificate.crt
|
||||
Source11: SLES-UEFI-CA-Certificate.crt
|
||||
@ -1009,9 +1008,6 @@ find %{buildroot}/%{_datadir}/%{name} \
|
||||
# Script that makes part of grub.cfg persist across updates
|
||||
install -m 755 %{SOURCE1} %{buildroot}/%{_sysconfdir}/grub.d/
|
||||
|
||||
# Script to generate memtest86+ menu entry
|
||||
install -m 644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/grub.d/
|
||||
|
||||
# Ghost config file
|
||||
install -d %{buildroot}/boot/%{name}
|
||||
touch %{buildroot}/boot/%{name}/grub.cfg
|
||||
@ -1037,10 +1033,6 @@ install -m 755 -D %{SOURCE19} %{buildroot}/%{_libexecdir}/grub2-instdev-fixup.pl
|
||||
%endif
|
||||
|
||||
R="%{buildroot}"
|
||||
%ifarch %{ix86} x86_64
|
||||
%else
|
||||
rm -f $R%{_sysconfdir}/grub.d/20_memtest86+
|
||||
%endif
|
||||
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
rm -f $R%{_sysconfdir}/grub.d/95_textmode
|
||||
@ -1174,9 +1166,6 @@ grep -E ${EXTRA_PATTERN} %{grubarch}-mod-all.lst > %{grubarch}-mod-extras.lst
|
||||
%ifnarch ppc ppc64 ppc64le
|
||||
%config(noreplace) %{_sysconfdir}/grub.d/95_textmode
|
||||
%endif
|
||||
%ifarch %{ix86} x86_64
|
||||
%config(noreplace) %{_sysconfdir}/grub.d/20_memtest86+
|
||||
%endif
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
%config(noreplace) %{_sysconfdir}/grub.d/20_ppc_terminfo
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user