[iso] fix incorrect detection of GRUB with nonstandard prefixes

* Existing code was trying to detect if GRUB patching was needed for GRUB bootloaders
  even if they were using standard prefixes, and as a result dropped GRUB support for
  any versions that wasn't 2.04 or 2.06, since we don't have a patch for those.
* This patch restores the expected behaviour to ensure that we don't disable GRUB if
  a standard prefix is being used, regardless of the version being reported.
* Note that this issue only affected BIOS GRUB boot. UEFI GRUB boot was unaffected.
* Also set rufus-next to 3.21.
This commit is contained in:
Pete Batard 2022-09-07 18:10:30 +01:00
parent 861d1473ac
commit d9e8b8caeb
No known key found for this signature in database
GPG Key ID: 38E0CF5E69EDD671
4 changed files with 26 additions and 24 deletions

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for rufus 3.20.
# Generated by GNU Autoconf 2.71 for rufus 3.21.
#
# Report bugs to <https://github.com/pbatard/rufus/issues>.
#
@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rufus'
PACKAGE_TARNAME='rufus'
PACKAGE_VERSION='3.20'
PACKAGE_STRING='rufus 3.20'
PACKAGE_VERSION='3.21'
PACKAGE_STRING='rufus 3.21'
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
PACKAGE_URL='https://rufus.ie'
@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures rufus 3.20 to adapt to many kinds of systems.
\`configure' configures rufus 3.21 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1336,7 +1336,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of rufus 3.20:";;
short | recursive ) echo "Configuration of rufus 3.21:";;
esac
cat <<\_ACEOF
@ -1428,7 +1428,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
rufus configure 3.20
rufus configure 3.21
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@ -1504,7 +1504,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by rufus $as_me 3.20, which was
It was created by rufus $as_me 3.21, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@ -2768,7 +2768,7 @@ fi
# Define the identity of the package.
PACKAGE='rufus'
VERSION='3.20'
VERSION='3.21'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -5310,7 +5310,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by rufus $as_me 3.20, which was
This file was extended by rufus $as_me 3.21, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -5366,7 +5366,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
rufus config.status 3.20
rufus config.status 3.21
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

View File

@ -1,4 +1,4 @@
AC_INIT([rufus], [3.20], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie])
AC_INIT([rufus], [3.21], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie])
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
AC_CONFIG_SRCDIR([src/rufus.c])
AC_CONFIG_MACRO_DIR([m4])

View File

@ -1149,13 +1149,15 @@ out:
// very end the file to patch the damn thing and get on with our life!
uprintf(" Detected Grub version: %s%s", img_report.grub2_version,
img_report.has_grub2 > 1 ? " with NONSTANDARD prefix" : "");
for (k = 0; k < ARRAYSIZE(grub_patch); k++) {
if (strcmp(img_report.grub2_version, grub_patch[k].version) == 0)
break;
}
if (k >= ARRAYSIZE(grub_patch)) {
uprintf(" • Don't have a prefix patch for this version => DROPPED!");
img_report.has_grub2 = 0;
if (img_report.has_grub2 > 1) {
for (k = 0; k < ARRAYSIZE(grub_patch); k++) {
if (strcmp(img_report.grub2_version, grub_patch[k].version) == 0)
break;
}
if (k >= ARRAYSIZE(grub_patch)) {
uprintf(" • Don't have a prefix patch for this version => DROPPED!");
img_report.has_grub2 = 0;
}
}
} else {
uprintf(" Could not detect Grub version");

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.20.1932"
CAPTION "Rufus 3.21.1933"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -395,8 +395,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,20,1932,0
PRODUCTVERSION 3,20,1932,0
FILEVERSION 3,21,1933,0
PRODUCTVERSION 3,21,1933,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.20.1932"
VALUE "FileVersion", "3.21.1933"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.20.exe"
VALUE "OriginalFilename", "rufus-3.21.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.20.1932"
VALUE "ProductVersion", "3.21.1933"
END
END
BLOCK "VarFileInfo"