diff --git a/gdb-gcore-bash.patch b/gdb-gcore-bash.patch new file mode 100644 index 0000000..14c7299 --- /dev/null +++ b/gdb-gcore-bash.patch @@ -0,0 +1,10 @@ +diff --git a/gdb/gcore.in b/gdb/gcore.in +index b9770ea415..3149f6e1fe 100644 +--- a/gdb/gcore.in ++++ b/gdb/gcore.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!/bin/bash + + # Copyright (C) 2003-2019 Free Software Foundation, Inc. + diff --git a/gdb.changes b/gdb.changes index fcb31bd..7d40fe0 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Jun 14 11:39:56 UTC 2019 - Tom de Vries + +- Fix rpmlint macro-in-comment errors + +------------------------------------------------------------------- +Fri Jun 14 11:27:41 UTC 2019 - Tom de Vries + +- Fix rpmlint error "deprecated-grep ['egrep']" . + +------------------------------------------------------------------- +Fri Jun 14 11:22:54 UTC 2019 - Tom de Vries + +- gdb-gcore-bash.patch: Fix rpmlint error env-script-interpreter by + replacing "/usr/bin/env bash" with "/bin/bash" in gcore. + +------------------------------------------------------------------- +Thu Jun 13 17:51:04 UTC 2019 - Tom de Vries + +- Rewrite gdbserver.1 workaround for riscv64 to avoid + %define _unpackaged_files_terminate_build 0 + ------------------------------------------------------------------- Wed Jun 5 09:53:09 UTC 2019 - Andreas Schwab diff --git a/gdb.spec b/gdb.spec index cc96990..83dd1b1 100644 --- a/gdb.spec +++ b/gdb.spec @@ -51,7 +51,7 @@ Obsoletes: devtoolset-1.0-%{pkg_name} %global have_inproctrace 0 %ifarch %{ix86} x86_64 %global have_inproctrace 1 -%endif # %{ix86} x86_64 +%endif # %%{ix86} x86_64 # Choose python version %if 0%{?suse_version} >= 1320 @@ -214,8 +214,13 @@ Patch114: gdb-rhbz795424-bitpos-arrayview.patch Patch115: gdb-rhbz1371380-gcore-elf-headers.patch #Fedora Packages end -# Upstream patch to fix gcc -Werror +# openSUSE specific + +Patch1000: gdb-gcore-bash.patch Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch + +# Patches to upstream + Patch1004: gdb-fix-buf-overflow.diff Patch1005: gdb-7.10-swo18929.patch Patch1007: gdb-fix-s390-build.diff @@ -337,7 +342,7 @@ BuildRequires: glibc-devel-static-32bit BuildRequires: glibc-devel-static %endif -%endif # %{with testsuite} +%endif # %%{with testsuite} %ifarch ia64 BuildRequires: libunwind-devel @@ -349,17 +354,6 @@ GDB, the GNU debugger, allows you to debug programs written in C, C++, Java, and other languages, by executing them in a controlled fashion and printing their data. -%ifarch riscv64 -# Work around RPM build error: -# ... -# Installed (but unpackaged) file(s) found: -# /usr/share/man/man1/gdbserver.1.gz -# ... -# Filed at PR24575 - "gdbserver.1 should only be installed if gdbserver was -# build" ( https://sourceware.org/bugzilla/show_bug.cgi?id=24575 ). -%define _unpackaged_files_terminate_build 0 -%endif - %ifnarch riscv64 %if %{suse_version} > 1010 %package -n gdbserver @@ -415,7 +409,7 @@ rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c gdb/go-exp.c # *.info* is needlessly split in the distro tar; also it would not get used as -# we build in %{gdb_build}, just to be sure. +# we build in %%{gdb_build}, just to be sure. find -name "*.info*"|xargs rm -f #Fedora patching start @@ -535,7 +529,9 @@ find -name "*.info*"|xargs rm -f %patch115 -p1 #Fedora patching end +%patch1000 -p1 %patch1002 -p1 + %patch1004 -p1 %patch1005 -p1 %patch1007 -p1 @@ -573,7 +569,7 @@ rm -f gdb/doc/*.info-* # Identify the build directory with the version of gdb as well as the # architecture, to allow for mutliple versions to be installed and # built. -# Initially we're in the %{gdb_src} directory. +# Initially we're in the %%{gdb_src} directory. for fprofile in %{?_with_profile:-fprofile} "" do @@ -608,7 +604,7 @@ export CFLAGS="$RPM_OPT_FLAGS" for opt in -Wno-implicit-fallthrough -Wno-error=cast-function-type -Wno-error=stringop-truncation; do if ! echo "int foo(void) { int a; return a;} " | \ $CC -x c -c - -o /dev/null -W ${opt} 2>&1 | \ - egrep "Wno|no option" >/dev/null; then + grep -E "Wno|no option" >/dev/null; then CFLAGS="$CFLAGS ${opt}" fi done @@ -796,7 +792,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} %if %{without testsuite} @@ -890,8 +886,8 @@ do done done # `tar | bzip2 | uuencode' may have some piping problems in Brew. -#tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log} -#uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2 +#tar cjf gdb-%%{_target_platform}.tar.bz2 gdb-%%{_target_platform}*.{sum,log} +#uuencode gdb-%%{_target_platform}.tar.bz2 gdb-%%{_target_platform}.tar.bz2 # Strip dates and completion times from the log to make build-compare happy sed -i -e '/Test Run By abuild on/d' -e 's/completed in [0-9]* seconds//' *.{sum,log} cd ../.. @@ -899,7 +895,7 @@ echo ====================TESTING END===================== %endif %install -# Initially we're in the %{gdb_src} directory. +# Initially we're in the %%{gdb_src} directory. cd %{gdb_build} # It would break RHEL-5 by leaving excessive files for the doc subpackage. @@ -1015,6 +1011,17 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/stabs* rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%ifarch riscv64 +# Work around RPM build error: +# ... +# Installed (but unpackaged) file(s) found: +# /usr/share/man/man1/gdbserver.1.gz +# ... +# Filed at PR24575 - "gdbserver.1 should only be installed if gdbserver was +# build" ( https://sourceware.org/bugzilla/show_bug.cgi?id=24575 ). +rm %{buildroot}/usr/share/man/man1/gdbserver.1 +%endif + %post # This step is part of the installation of the RPM. Not to be confused # with the 'make install ' of the build (rpmbuild) process. @@ -1093,7 +1100,7 @@ fi %{_mandir}/*/gdbserver.1* %if %{have_inproctrace} %{_libdir}/libinproctrace.so -%endif # %{have_inproctrace} +%endif # %%{have_inproctrace} %endif %endif %endif