diff --git a/gdb-6.3-rh-testversion-20041202.patch b/gdb-6.3-rh-testversion-20041202.patch index 82c693b..b8c7940 100644 --- a/gdb-6.3-rh-testversion-20041202.patch +++ b/gdb-6.3-rh-testversion-20041202.patch @@ -18,7 +18,7 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest -re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" { pass "printed version with cast" } -+ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" { ++ -re ".\[0-9\]+ = .(Fedora Linux|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" { + pass "printed version Fedora or Red Hat Enterprise Linux only" + } } @@ -32,7 +32,7 @@ diff --git a/gdb/top.c b/gdb/top.c struct internalvar *minor_version_var = create_internalvar ("_gdb_minor"); int vmajor = 0, vminor = 0, vrevision = 0; - sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision); -+ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision); ++ sscanf (version, "%*[^0123456789]%d.%d.%d", &vmajor, &vminor, &vrevision); set_internalvar_integer (major_version_var, vmajor); set_internalvar_integer (minor_version_var, vminor + (vrevision > 0)); } diff --git a/gdb.spec b/gdb.spec index 03ef822..fe1c2da 100644 --- a/gdb.spec +++ b/gdb.spec @@ -51,7 +51,7 @@ Version: 12.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -1189,6 +1189,10 @@ fi %endif %changelog +* Fri Jan 27 2023 Kevin Buettner - 12.1-7 +- Tweak gdb-6.3-rh-testversion-20041202.patch so that $_gdb_major + and $_gdb_minor will be obtained correctly. + * Mon Dec 19 2022 Andrew Burgess - Backport upstream commits 38665d717a3 and c3efaf0afd9 to fix RHBZ 2152431.