From 6f0c1ef64b3c8ecbf55e8de105f59b89ebe5d74a Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Fri, 3 May 2024 09:49:06 -0700 Subject: [PATCH] Remove crud from RHEL < 8 This patch removes a bunch of now dead code on RHEL prior to 8. This permits us to also remove some baggage we've been carrying for many years: copies of libipt and libstdc++ pretty-printers. I've also attempted to deal with any warnings output by rpmdeplint. There's still two remaining warnings with which to deal: gdb.spec:480: W: configure-without-libdir-spec gdb.spec:543: W: configure-without-libdir-spec 0 packages and 1 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.2 s I have also NOT addressed any issues arising from '--with testsuite' or SCL builds. I'll address those in follow-up patches. --- gdb.spec | 567 +++++++++++++++---------------------------------------- sources | 2 - 2 files changed, 152 insertions(+), 417 deletions(-) diff --git a/gdb.spec b/gdb.spec index 843f925..cffd1c3 100644 --- a/gdb.spec +++ b/gdb.spec @@ -14,18 +14,6 @@ # Disable LTO until upstream fixes GDB's ODR woes. %define _lto_cflags %{nil} -# Only build on x86 for RHEL6 SCL, defining missing parallel make macros. -%if 0%{?scl:1} && 0%{?el6:1} -ExclusiveArch: %{ix86} x86_64 -%global make_build make %{?_smp_mflags} -%global make_install make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT -%endif - -# Exclude aarch64 on RHEL7. -%if 0%{?scl:1} && 0%{?el7:1} -ExcludeArch: aarch64 -%endif - %{?scl:%scl_package gdb} %{!?scl: %global pkg_name %{name} @@ -37,13 +25,13 @@ ExcludeArch: aarch64 # If we're on Fedora or RHEL 9+, we will build the gdb-minimal package. # Never build the -minimal package on SCLs, since it's unneeded there. %if 0%{?fedora} || (0%{?rhel} > 8 && 0%{!?scl:1}) -%global _build_minimal 1 + %global _build_minimal 1 %endif # Include support for Guile? This is enabled on RHEL 8 and # Fedora < 38. %if (0%{?fedora:1} && 0%{?fedora} < 38) || (0%{?rhel:1} && 0%{?rhel} == 8) -%define use_guile 1 + %define use_guile 1 %endif Name: %{?scl_prefix}gdb @@ -57,12 +45,11 @@ Version: 14.2 # 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: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception # Do not provide URL for snapshots as the file lasts there only for 2 days. # ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz -#Source: %{tarname}.tar.xz Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz URL: https://gnu.org/software/gdb/ @@ -70,8 +57,8 @@ URL: https://gnu.org/software/gdb/ %global gdb_src %{tarname} %global gdb_build build-%{_target_platform} %if 0%{?_build_minimal} -%global gdb_build_minimal %{gdb_build}-minimal -%endif # 0%{?_build_minimal} + %global gdb_build_minimal %{gdb_build}-minimal +%endif # error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/gdb-gdb.py # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/PBOJDOFMWTRV3ZOKNV5HN7IBX5EPHDHF/ @@ -83,12 +70,6 @@ Recommends: dnf-command(debuginfo-install) %endif %if 0%{!?scl:1} -# when manpages were moved from -headless to main -# https://bugzilla.redhat.com/show_bug.cgi?id=1402554 -# theoretically should not be required due to versioned dependeny -# below, but it cannot hurt either -- rdieter -Conflicts: gdb-headless < 7.12-29 - Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages Requires: gdb-headless%{?_isa} = %{version}-%{release} @@ -110,25 +91,14 @@ Requires: which # in the binutils package. (BZ 2275274) Requires: binutils %endif +# endif !scl Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages -# Make sure we get rid of the old package gdb64, now that we have unified -# support for 32-64 bits in one single 64-bit gdb. -%ifarch ppc64 -Obsoletes: gdb64 < 5.3.91 -%endif - %ifarch %{arm} riscv64 -%global have_inproctrace 0 + %global have_inproctrace 0 %else -%global have_inproctrace 1 -%endif - -# gdb-add-index cannot be run even for SCL package on RHEL<=6. -%if 0%{!?rhel:1} || 0%{?rhel} > 6 -# eu-strip: -g recognizes .gdb_index as a debugging section. (#631997) -Conflicts: elfutils < 0.149 + %global have_inproctrace 1 %endif # https://fedorahosted.org/fpc/ticket/43 https://fedorahosted.org/fpc/ticket/109 @@ -143,25 +113,18 @@ Provides: bundled(md5-gcc) = %{snapsrc} # https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25.7B_isa.7D %if 0%{?_with_buildisa:1} || 0%{?_with_testsuite:1} -%global buildisa %{?_isa} + %global buildisa %{?_isa} %else -%global buildisa %{nil} + %global buildisa %{nil} %endif -%if 0%{!?rhel:1} || 0%{?rhel} > 7 # https://bugzilla.redhat.com/show_bug.cgi?id=1209492 Recommends: default-yama-scope -%endif # rpm-suggestions.py needs to import rpm which is found in python3-rpm. Recommends: python3-rpm -%if 0%{?el6:1} || 0%{?el7:1} -# GDB C++11 requires devtoolset gcc. -BuildRequires: %{?scl_prefix}gcc-c++ -%else BuildRequires: gcc-c++ -%endif # GDB patches have the format `gdb--bz-.patch'. # They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb). @@ -183,112 +146,58 @@ Source3: gdb-gstack.man #=fedora Source4: gdbinit -# libstdc++ pretty printers from GCC SVN. -%global libstdcxxpython gdb-libstdc++-v3-python-8.1.1-20180626 -#=fedora -Source5: %{libstdcxxpython}.tar.xz - -# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). -#=fedora -Source6: gdbtui - -# libipt: Intel Processor Trace Decoder Library -%global libipt_version 2.0.5 - # Include the auto-generated file containing the "Patch:" directives. # See README.local-patches for more details. -Patch9998: _gdb.spec.Patch.include -Patch9999: _gdb.spec.patch.include -%include %{PATCH9998} +Source9998: _gdb.spec.Patch.include +Source9999: _gdb.spec.patch.include +%include %{SOURCE9998} -# System readline is too old prior to RHEL8. -%if 0%{!?rhel:1} || 0%{?rhel} > 7 -%global use_system_readline 1 BuildRequires: readline-devel%{buildisa} >= 7.0 -%else -%global use_system_readline 0 -%endif - BuildRequires: ncurses-devel%{buildisa} texinfo gettext flex bison BuildRequires: expat-devel%{buildisa} -%if 0%{!?rhel:1} || 0%{?rhel} > 6 # gdb/minidebug.c uses the xz library to handle compressed debuginfo. BuildRequires: xz-devel%{buildisa} -%endif # dlopen() no longer makes rpm-libsFIXME{?_isa} (it's .so) a mandatory dependency. BuildRequires: rpm-devel%{buildisa} BuildRequires: zlib-devel%{buildisa} libselinux-devel%{buildisa} %if 0%{!?_without_python:1} -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -BuildRequires: python-devel%{buildisa} -%global __python /usr/bin/python2 -%else -%global __python %{__python3} + %global __python %{__python3} BuildRequires: python3-devel%{buildisa} %endif -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -# Temporarily before python files get moved to libstdc++.rpm -# libstdc++%{bits_other} is not present in Koji, the .spec script generating -# gdb/python/libstdcxx/ also does not depend on the %{bits_other} files. -BuildRequires: libstdc++%{buildisa} -%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 -%endif # 0%{!?_without_python:1} # gdb-doc in PDF, see: https://bugzilla.redhat.com/show_bug.cgi?id=919891#c10 BuildRequires: texinfo-tex -%if 0%{!?rhel:1} || 0%{?rhel} > 6 BuildRequires: texlive-collection-latexrecommended -%endif # Permit rebuilding *.[0-9] files even if they are distributed in gdb-*.tar: BuildRequires: /usr/bin/pod2man -%if 0%{!?rhel:1} || 0%{?rhel} > 7 BuildRequires: libbabeltrace-devel%{buildisa} - %if %{defined use_guile} - %if 0%{!?rhel:1} +%if %{defined use_guile} + %if 0%{!?rhel:1} BuildRequires: guile22-devel%{buildisa} - %endif - # Guile is only supported prior to RHEL9, where it was called "guile". - %if 0%{?rhel:1} && 0%{?rhel} < 9 + %endif + # Guile is only supported prior to RHEL9, where it was called "guile". + %if 0%{?rhel:1} && 0%{?rhel} < 9 BuildRequires: guile-devel%{buildisa} - %endif %endif %endif +# Add support for Intel Processor Trace on eligible architectures. %global have_libipt 0 -%if 0%{!?rhel:1} || 0%{?rhel} > 7 %ifarch %{ix86} x86_64 %global have_libipt 1 BuildRequires: libipt-devel%{buildisa} %endif -%endif -%if 0%{!?rhel:1} || 0%{?rhel} > 6 + # See https://bugzilla.redhat.com/show_bug.cgi?id=1593280 # DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3 on RHEL-7, RHEL-8, and # Fedora < 32, and mpfr-4 on Fedora 32+ and RHEL-9+. BuildRequires: mpfr-devel%{buildisa} -%endif -# RHEL6 doesn't have source-highlight. -%if 0%{!?rhel:1} || 0%{?rhel} > 6 BuildRequires: source-highlight-devel -%endif %if 0%{!?rhel:1} BuildRequires: xxhash-devel %endif -# Special case: on RHEL8+, we simply require the system debuginfod. -# Otherwise, we require the SCL version. Except on RHEL6, where debuginfod -# is not supported at all. -%global have_debuginfod 0 -%global use_scl_for_debuginfod 0 -%if 0%{!?rhel:1} || 0%{?rhel} >= 8 -%global have_debuginfod 1 +# Include debuginfod support. BuildRequires: elfutils-debuginfod-client-devel -%else -%if 0%{!?el6:1} && 0%{?scl:1} -%global have_debuginfod 1 -%global use_scl_for_debuginfod 1 -BuildRequires: %{?scl_prefix}elfutils-debuginfod-client-devel -%endif -%endif # Workaround for missing boost-devel dependency (rhbz 1718480) BuildRequires: boost-devel @@ -298,117 +207,66 @@ BuildRequires: boost-devel # Ensure the devel libraries are installed for both multilib arches. %global bits_local %{?_isa} %global bits_other %{?_isa} -%ifarch s390x -%if 0%{?rhel:1} && 0%{?rhel} < 8 -%global bits_other (%{__isa_name}-32) -%endif -%else #!s390x %ifarch ppc -%global bits_other (%{__isa_name}-64) -%else #!ppc -%ifarch sparc64 ppc64 s390x x86_64 -%global bits_other (%{__isa_name}-32) -%endif #sparc64 ppc64 s390x x86_64 -%endif #!ppc -%endif #!s390x + %global bits_other (%{__isa_name}-64) +%else + %ifarch ppc64 s390x x86_64 + %global bits_other (%{__isa_name}-32) + %endif +%endif BuildRequires: sharutils dejagnu -# gcc-objc++ is not covered by the GDB testsuite. + # Test supported SCL toolchain components. BuildRequires: %{?scl_prefix}gcc %{?scl_prefix}gcc-c++ %{?scl_prefix}gcc-gfortran -%if 0%{!?rhel:1} || 0%{?rhel} < 8 +# Fedora supports Objective C. +%if 0%{!?rhel:1} BuildRequires: gcc-objc %endif + # We don't support gcc-gdb-plugin on RHEL anymore. %if 0%{!?rhel:1} -BuildRequires: %{?scl_prefix}gcc-gdb-plugin%{?_isa} +BuildRequires: gcc-gdb-plugin%{?_isa} %endif -%if 0%{?rhel:1} && 0%{?rhel} < 7 -BuildRequires: gcc-java libgcj%{bits_local} libgcj%{bits_other} -# for gcc-java linkage: -BuildRequires: zlib-devel%{bits_local} zlib-devel%{bits_other} -%endif -# Exception for RHEL<=7 -%ifarch aarch64 -%if 0%{!?rhel:1} -BuildRequires: gcc-go -BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} -%endif -%else -%if 0%{!?rhel:1} || 0%{?rhel} == 7 -BuildRequires: gcc-go -BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} -%endif -%endif -# archer-sergiodj-stap-patch-split + BuildRequires: systemtap-sdt-devel -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -# Copied from prelink-0.4.2-3.fc13. -# Prelink is not yet ported to ppc64le. -%ifarch %{ix86} alpha sparc sparcv9 sparc64 s390 s390x x86_64 ppc ppc64 -# Prelink is broken on sparcv9/sparc64. -%ifnarch sparc sparcv9 sparc64 -BuildRequires: prelink -%endif -%endif -%endif -%if 0%{!?rhel:1} || 0%{?rhel} > 7 BuildRequires: opencl-headers ocl-icd-devel%{bits_local} ocl-icd-devel%{bits_other} -%endif + %if 0%{!?rhel:1} -# Fedora arm+ppc64le+s390x do not yet have fpc built. -%ifnarch %{arm} ppc64le s390x +BuildRequires: gcc-go +BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} +%endif + +%if 0%{!?rhel:1} + %ifnarch s390x +# Fedora s390x does not support fpc. BuildRequires: fpc + %endif %endif -%endif -# Copied from: gcc-6.2.1-1.fc26 -# Exception for RHEL<=7 -%ifarch s390x + %if 0%{!?rhel:1} BuildRequires: gcc-gnat BuildRequires: libgnat%{bits_local} libgnat%{bits_other} %endif -%else -%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64 -%if 0%{!?rhel:1} -BuildRequires: gcc-gnat -BuildRequires: libgnat%{bits_local} libgnat%{bits_other} -%endif -%endif -%endif BuildRequires: glibc-devel%{bits_local} glibc-devel%{bits_other} BuildRequires: libgcc%{bits_local} libgcc%{bits_other} BuildRequires: libgfortran%{bits_local} libgfortran%{bits_other} # libstdc++-devel of matching bits is required only for g++ -static. BuildRequires: libstdc++%{bits_local} libstdc++%{bits_other} -%if 0%{!?rhel:1} || 0%{?rhel} > 6 %ifarch %{ix86} x86_64 BuildRequires: libquadmath%{bits_local} libquadmath%{bits_other} %endif -%endif # multilib glibc-static is open Bug 488472: -%if 0%{?rhel} > 6 +%if 0%{?rhel:1} BuildRequires: glibc-static%{bits_other} %endif -%ifarch s390x -BuildRequires: %{?scl_preifx}valgrind%{bits_local} -%if 0%{!?rhel:1} || 0%{?rhel} > 7 -BuildRequires: %{?scl_prefix}valgrind%{bits_local} valgrind%{bits_other} -%endif -%else -BuildRequires: %{?scl_prefix}valgrind%{bits_local} valgrind%{bits_other} -%endif -%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: valgrind%{bits_local} valgrind%{bits_other} BuildRequires: xz -%endif -%if 0%{!?rhel:1} || 0%{?rhel} > 7 BuildRequires: rust +BuildRequires: elfutils-debuginfod %endif -%if 0%{!?el6:1} -BuildRequires: %{?scl_prefix}elfutils-debuginfod -%endif -%endif # 0%{?_with_testsuite:1} +# endif _with_testsuite BuildRequires: make gmp-devel %{?scl:Requires:%scl_runtime} @@ -440,7 +298,8 @@ fashion and printing their data. This package provides a minimal version of GDB, tailored to be used by the Fedora buildroot. It should probably not be used by end users. -%endif # 0%{?_build_minimal} +%endif +# endif _build_minimal %package gdbserver Summary: A standalone server for GDB (the GNU source-level debugger) @@ -475,23 +334,18 @@ This package provides INFO, HTML and PDF user manual for GDB. %prep %setup -q -n %{gdb_src} -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -# libstdc++ pretty printers. -tar xJf %{SOURCE5} -%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 - # Files have `# ' statements breaking VPATH / find-debuginfo.sh . (cd gdb;rm -fv $(perl -pe 's/\\\n/ /' 7 -CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" -%endif - export CXXFLAGS="$CFLAGS" -# For DTS11+, gcc defaults to c++17, causing issues with system-installed -# headers, e.g., python. Force to c++11. We coerce all builds to use c++11 -# to facilitate testing. -%if 0%{?rhel:1} && 0%{?rhel} < 8 -export CXXFLAGS="$CXXFLAGS -std=gnu++11" -%endif - # The configure flags we will use when building the full GDB. GDB_FULL_CONFIGURE_FLAGS="\ - --with-system-gdbinit=%{_sysconfdir}/gdbinit \ -%if 0%{!?rhel:1} || 0%{?rhel} > 7 - --with-babeltrace \ -%else - --without-babeltrace \ -%endif - --with-expat \ -$(: ppc64 host build crashes on ppc variant of libexpat.so ) \ - --without-libexpat-prefix \ - --enable-tui \ + --with-system-gdbinit=%{_sysconfdir}/gdbinit \ + --with-babeltrace \ + --with-expat \ +$(: ppc64 host build crashes on ppc variant of libexpat.so ) \ + --without-libexpat-prefix \ + --enable-tui \ %if 0%{!?_without_python:1} - --with-python=%{__python} \ + --with-python=%{__python} \ %else - --without-python \ + --without-python \ %endif %if %{defined use_guile} - --with-guile \ + --with-guile \ %else - --without-guile \ + --without-guile \ %endif %if %{have_inproctrace} - --enable-inprocess-agent \ + --enable-inprocess-agent \ %else - --disable-inprocess-agent \ + --disable-inprocess-agent \ %endif %if %{have_libipt} - --with-intel-pt \ + --with-intel-pt \ %else - --without-intel-pt \ + --without-intel-pt \ %endif %if 0%{!?rhel:1} - --with-xxhash \ + --with-xxhash \ %endif - --enable-unit-tests" + --enable-unit-tests" -# --htmldir and --pdfdir are not used as they are used from %{gdb_build}. -../configure \ - ${COMMON_GDB_CONFIGURE_FLAGS} \ - ${GDB_FULL_CONFIGURE_FLAGS} \ +# --htmldir and --pdfdir are not used as they are used from GDB_BUILD. +../configure \ + ${COMMON_GDB_CONFIGURE_FLAGS} \ + ${GDB_FULL_CONFIGURE_FLAGS} \ %if 0%{?pkgversion_configure_flag:1} - "%{pkgversion_configure_flag}" \ -%endif - --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ - --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ -%ifarch sparc sparcv9 - sparc-%{_vendor}-%{_target_os}%{?_gnu} -%else - --enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu,riscv64-linux-gnu \ - %{_target_platform} + "%{pkgversion_configure_flag}" \ %endif + --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ + --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ + --enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu,riscv64-linux-gnu \ + %{_target_platform} if [ -z "%{!?_with_profile:no}" ] then @@ -808,7 +606,7 @@ fi cd .. -done # fprofile +done # fprofile cd %{gdb_build} @@ -819,7 +617,7 @@ cd %{gdb_build} cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src} %check -# Initially we're in the %{gdb_src} directory. +# Initially we're in the GDB_SRC directory. cd %{gdb_build} # We always run the unittests. @@ -874,9 +672,9 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2 # Disable some problematic testcases. # RUNTESTFLAGS='--ignore ...' is not used below as it gets separated by the # `check//...' target spawn and too much escaping there would be dense. - for test in \ - gdb.base/readline-overflow.exp \ - gdb.base/bigcore.exp \ + for test in \ + gdb.base/readline-overflow.exp \ + gdb.base/bigcore.exp \ %if 0%{?rhel} < 7 gdb.base/gnu-debugdata.exp \ gdb.base/access-mem-running.exp \ @@ -913,9 +711,10 @@ uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2 cd ../.. echo ====================TESTING END===================== %endif +# endif _testsuite %install -# Initially we're in the %{gdb_src} directory. +# Initially we're in the GDB_SRC directory. %if 0%{?_build_minimal} cd %{gdb_build_minimal} rm -rf $RPM_BUILD_ROOT @@ -929,7 +728,8 @@ rm -fv $RPM_BUILD_ROOT%{_bindir}/{gcore,gdbserver,gstack,gdb-add-index} mv $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_bindir}/gdb.minimal cd .. -%endif # 0%{?_build_minimal} +%endif +# endif _build_minimal # Install the full build. @@ -939,11 +739,6 @@ cd %{gdb_build} # building gdb-minimal. %if 0%{!?_build_minimal} rm -rf $RPM_BUILD_ROOT -%endif # 0%{!?_build_minimal} - -%if 0%{?el6:1} -# GDB C++11 requires devtoolset gcc. -%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} %endif %make_install %{?_smp_mflags} @@ -951,24 +746,8 @@ rm -rf $RPM_BUILD_ROOT %if 0%{!?scl:1} mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec mv -f $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_prefix}/libexec/gdb -%if 0%{?rhel:1} && 0%{?rhel} <= 6 -# RHEL-6: ln: invalid option -- 'r': https://bugzilla.redhat.com/show_bug.cgi?id=1384947 -# RHEL-6 also does not have: /usr/bin/realpath -ln -s $( - perl -le 'sub x{$_=$_[0];s{/+}{/}g;s{/$}{};return split "/";}@a=x shift;@b=x shift;while($a[0] eq $b[0]){shift @a;shift @b;}print join "/",map("..",@a),@b;' \ - $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_prefix}/libexec/gdb -) $RPM_BUILD_ROOT%{_bindir}/gdb -%else -ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb +ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb %endif -%endif - -# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). -%if 0%{?rhel:1} && 0%{?rhel} <= 6 -test ! -e $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui -install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui -ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/man1/gdbtui.1 -%endif # 0%{?rhel:1} && 0%{?rhel} <= 6 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d touch -r %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d @@ -988,15 +767,12 @@ for pyo in "" "-O";do # RHEL-5: AttributeError: 'module' object has no attribute 'compile_file' %{__python} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))' done -%endif # 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1} - -# Compile python files -%if 0%{!?_without_python:1} && (0%{!?rhel:1} || 0%{?rhel} > 7) -%py_byte_compile %{__python3} %{buildroot}%{_datadir}/gdb/python/gdb %endif +# Compile python files %if 0%{!?_without_python:1} -%if 0%{!?rhel:1} || 0%{?rhel} > 6 +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/gdb/python/gdb + # BZ 999645: /usr/share/gdb/auto-load/ needs filesystem symlinks for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do # mkdir to satisfy dangling symlinks build check. @@ -1004,34 +780,10 @@ for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do ln -s $(echo %{_root_prefix}|sed 's#^/*##')/$i \ $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load/$i done -%endif # 0%{!?rhel:1} || 0%{?rhel} > 6 -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -# Temporarily now: -for LIB in $(echo lib $(basename %{_libdir})|tr ' ' '\n'|sort -u);do - LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_root_prefix}/$LIB" - mkdir -p $LIBPATH - # basename is being run only for the native (non-biarch) file. - sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \ - -e 's,@toolexeclibdir@,%{_root_prefix}/'"$LIB," \ - < $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \ - > $LIBPATH/$(basename %{_root_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py - # Test the filename 'libstdc++.so.6.*' has matched. - test -f $LIBPATH/libstdc++.so.6.[0-9]*-gdb.py -done -test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx -cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx \ - $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx -%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb -name "*.py"`; do # Files are installed by install(1) not preserving the timestamps. touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/version.in $i done -%endif # 0%{!?_without_python:1} - -# gdb-add-index cannot be run even for SCL package on RHEL<=6. -%if 0%{?rhel:1} && 0%{?rhel} <= 6 -rm -f $RPM_BUILD_ROOT%{_bindir}/gdb-add-index -rm -f $RPM_BUILD_ROOT%{_mandir}/*/gdb-add-index.1* %endif # Remove the files that are part of a gdb build but that are owned and @@ -1057,9 +809,7 @@ ln -s gstack $RPM_BUILD_ROOT%{_bindir}/pstack # Packaged GDB is not a cross-target one. (cd $RPM_BUILD_ROOT%{_datadir}/gdb/syscalls rm -f mips*.xml -%ifnarch sparc sparcv9 sparc64 rm -f sparc*.xml -%endif %ifnarch x86_64 rm -f amd64-linux.xml %endif @@ -1078,12 +828,6 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/ctf-spec* rm -f $RPM_BUILD_ROOT%{_infodir}/dir -%if 0%{?rhel:1} && 0%{?rhel} <= 7 -# /usr/share/gdb/guile/ gets installed even --without-guile -# https://sourceware.org/bugzilla/show_bug.cgi?id=17105 -rm -rf $RPM_BUILD_ROOT%{_datadir}/gdb/guile -%endif - # These files are unrelated to Fedora Linux. rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/elinos.py rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/wrs-linux.py @@ -1091,11 +835,7 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit %files # File must begin with "/": {GFDL,COPYING3,COPYING,COPYING.LIB,COPYING3.LIB} -%if 0%{!?el6:1} %license COPYING3 COPYING COPYING.LIB COPYING3.LIB -%else -%doc COPYING3 COPYING COPYING.LIB COPYING3.LIB -%endif %doc README NEWS %{_bindir}/gdb %{_bindir}/gcore @@ -1115,16 +855,8 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit %{_mandir}/*/gdb.1* %{_sysconfdir}/gdbinit.d %{_mandir}/*/gdbinit.5* -# gdb-add-index cannot be run even for SCL package on RHEL<=6. -%if 0%{!?rhel:1} || 0%{?rhel} > 6 %{_bindir}/gdb-add-index %{_mandir}/*/gdb-add-index.1* -%endif -# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). -%if 0%{?rhel:1} && 0%{?rhel} <= 6 -%{_bindir}/gdbtui -%{_mandir}/*/gdbtui.1* -%endif # 0%{?rhel:1} && 0%{?rhel} <= 6 %{_datadir}/gdb # don't include the files in include, they are part of binutils @@ -1133,15 +865,13 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit %files minimal %{_bindir}/gdb.minimal %{_bindir}/gdb-add-index -%endif # 0%{?_build_minimal} +%endif -%ifnarch sparc sparcv9 %files gdbserver %{_bindir}/gdbserver %{_mandir}/*/gdbserver.1* %if %{have_inproctrace} %{_libdir}/libinproctrace.so -%endif # %{have_inproctrace} %endif %if 0%{!?_without_python:1} @@ -1158,8 +888,8 @@ for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do fi fi done -%endif # 0%{!?rhel:1} -%endif # 0%{!?_without_python:1} +%endif +%endif %files doc %doc %{gdb_build}/gdb/doc/{gdb,annotate}.{html,pdf} @@ -1193,8 +923,15 @@ then fi fi %endif +# endif scl %changelog +* Tue Apr 30 2024 Keith Seitz - 14.2-7 +- Remove bundled copy of libipt. +- Remove bundled copy of libstdc++ pretty-printers. +- Always include debuginfod support. +- Purge RHEL < 8. + * Thu Apr 25 2024 Kevin Buettner - 14.2-6 - Further changes for fixing RHBZ 2275274: Add a 'Requires: binutils' which is needed because gdb-add-index uses @@ -1506,7 +1243,7 @@ fi - Update gdb-6.6-buildid-locate.patch. - Update gdb-6.6-buildid-locate-rpm.patch. - Remove 'Recommends: ' line for gcc-gdb-plugin for BZ2149246. -- Add 'define _lto_cflags %{nil}' to avoid ODR violations. +- Define _lto_cflags to nil to avoid ODR violations. - Add -Wno-stringop-overflow to --enable-gdb-build-warnings to work around gcc problem. @@ -4397,7 +4134,7 @@ fi - Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3 - Fix parsing DW_AT_const_value using DW_FORM_string - Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d - + db41e11ae0a3aec7120ad6ce86450d838af74dd6 + + db41e11ae0a3aec7120ad6ce86450d838af74dd6 - Fix Fortran modules/namespaces parsing (but no change was visible in F11). - Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8 - Fix "some Python error when displaying some C++ objects" (BZ 504356). @@ -4405,7 +4142,7 @@ fi - testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'. - Fix crashes due to (missing) varobj revalidation, for VLA (for BZ 377541). - Archer backport: 58dcda94ac5d6398f47382505e9d3d9d866d79bf - + f3de7bbd655337fe6705aeaafcc970deff3dd5d5 + + f3de7bbd655337fe6705aeaafcc970deff3dd5d5 - Implement Fortran modules namespaces (BZ 466118). - Fix crash in the charset support. @@ -4446,10 +4183,10 @@ fi - Archer backport: c14d9ab7eef43281b2052c885f89d2db96fb5f8e - Revert a change regressing: gdb.objc/basicclass.exp - Archer backport: ebd649b96e61a1fb481801b65d827bca998c6633 - + 1f080e897996d60ab7fde20423e2947512115667 - + 1948198702b51b31d79793fc49434b529b4e245f - + e107fb9687bb1e7f74170aa3d19c4a8f6edbb10f - + 1e012c996e121cb35053d239a46bd5dc65b0ce60 + + 1f080e897996d60ab7fde20423e2947512115667 + + 1948198702b51b31d79793fc49434b529b4e245f + + e107fb9687bb1e7f74170aa3d19c4a8f6edbb10f + + 1e012c996e121cb35053d239a46bd5dc65b0ce60 - Update the Python API from upstream. - Archer backport: d3c83ad5ec9f7672b87af9ad29279f459e53da11 - Fix a Python branch crash. diff --git a/sources b/sources index 25677ac..081568d 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 -SHA512 (v2.0.5.tar.gz) = 2e7ac2aede84671b15597d9c56dbe077a81357bbf44b6684802592246fb7729b4a5743238ddf02f6ea143b4d29872f581408135f9c1ea1ccc99dab905916d98d SHA512 (gdb-14.2.tar.xz) = 7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede