1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[ui] add forced DD mode exceptions for Red Hat based distros

* Anaconda broke ISO compatibility, most likely with the following commit:
  84529204fe
* However, Ret Hat, and its followers, have drunk the "DD only" kool aid, and
  appear to be blissfully unaware of the very real drawbacks that enforcing a
  "DD only" mode for ISOHybrid can actually place on distro users.
* Rather than spend another wasted effort trying get people, who appear to be
  impervious to even remotely consider the idea that DD imaging can have flaws,
  to look into the possibility that Red Hat might indeed have introduced a
  regression, and given the downright hostility I have been subjected to from
  trying to state this *very verifiable* fact, we'll just force DD mode for the
  affected Red Hat and derivatives, whilst trusting that users will be smart
  enough to compare their more limited installation experience against the ones
  from other distros (such as Arch, Debian or Ubuntu, which, unlike Red Hat and
  co., appear to fully understand that the whole ISOHybrid vs DD mode situation
  is not all black and white), and see for themselves which distros do actually
  place *their* interests first, rather than just the interests of the distro
  maintainers...
This commit is contained in:
Pete Batard 2021-04-23 17:04:55 +01:00
parent 16c0e8e2a2
commit 9c8fa40995
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 27 additions and 7 deletions

View file

@ -11,7 +11,7 @@
<Identity <Identity
Name="19453.net.Rufus" Name="19453.net.Rufus"
Publisher="CN=7AC86D13-3E5A-491A-ADD5-80095C212740" Publisher="CN=7AC86D13-3E5A-491A-ADD5-80095C212740"
Version="3.14.1779.0" /> Version="3.14.1780.0" />
<Properties> <Properties>
<DisplayName>Rufus</DisplayName> <DisplayName>Rufus</DisplayName>

View file

@ -44,6 +44,7 @@
#include "localization.h" #include "localization.h"
#include "ui.h" #include "ui.h"
#include "re.h"
#include "drive.h" #include "drive.h"
#include "settings.h" #include "settings.h"
#include "bled/bled.h" #include "bled/bled.h"
@ -1202,7 +1203,18 @@ out:
// The scanning process can be blocking for message processing => use a thread // The scanning process can be blocking for message processing => use a thread
DWORD WINAPI ImageScanThread(LPVOID param) DWORD WINAPI ImageScanThread(LPVOID param)
{ {
int i; // Regexp patterns used to match ISO labels for distros whose
// maintainers have drunk the "ISOHybrid = DD only" kool aid...
const char* dd_koolaid_drinkers[] = {
"^CentOS-8-[3-9].*", // CentOS 8.3 or later
"^CentOS-9-.*", // CentOS 9.x
"^OL-.*-BaseOS-.*", // Oracle Linux
"^RHEL-8.[2-9].*", // Red Hat 8.2 or later
"^RHEL-9.*", // Red Hat 9.x
// Don't bother with Fedora for now, even as they use
// the same problematic Anaconda...
};
int i, len;
uint8_t arch; uint8_t arch;
char tmp_path[MAX_PATH]; char tmp_path[MAX_PATH];
@ -1262,6 +1274,14 @@ DWORD WINAPI ImageScanThread(LPVOID param)
if (img_report.is_iso) { if (img_report.is_iso) {
DisplayISOProps(); DisplayISOProps();
for (i = 0; i < ARRAYSIZE(dd_koolaid_drinkers); i++) {
if (re_match(dd_koolaid_drinkers[i], img_report.label, &len) >= 0) {
img_report.disable_iso = TRUE;
break;
}
}
// If we have an ISOHybrid, but without an ISO method we support, disable ISO support altogether // If we have an ISOHybrid, but without an ISO method we support, disable ISO support altogether
if (IS_DD_BOOTABLE(img_report) && (img_report.disable_iso || if (IS_DD_BOOTABLE(img_report) && (img_report.disable_iso ||
(!IS_BIOS_BOOTABLE(img_report) && !IS_EFI_BOOTABLE(img_report)))) { (!IS_BIOS_BOOTABLE(img_report) && !IS_EFI_BOOTABLE(img_report)))) {

View file

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