diff --git a/gdb-add-index-chmod.patch b/gdb-add-index-chmod.patch new file mode 100755 index 0000000..00b37c4 --- /dev/null +++ b/gdb-add-index-chmod.patch @@ -0,0 +1,69 @@ +http://sourceware.org/ml/gdb-patches/2017-01/msg00110.html +Subject: [patch] contrib/gdb-add-index.sh: chmod u+w + + +--AhhlLboLdkugWU4S +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +Hi, + +in Fedora 24 it still worked, in Fedora 25 it does not - *-debuginfo.rpm +no longer have the .gdb_index accelerating section now. + +It happens because: +objcopy: unable to copy file 'foo.debug'; reason: Permission denied + +*.debug files in Fedora were always 444 but the time gdb-add-index is run is +still before the *.debug split and in Fedora 24 the files were -rwxr-xr-x +that time while in Fedora 25 they are apparently no longer w. + +OK for check-in? + + +Jan + +--AhhlLboLdkugWU4S +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/ChangeLog +2017-01-06 Jan Kratochvil + + * contrib/gdb-add-index.sh: Use chmod u+w for $file. + +diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh +index 0cd4ce3..5a190a0 100755 +--- a/gdb/contrib/gdb-add-index.sh ++++ b/gdb/contrib/gdb-add-index.sh +@@ -38,10 +38,11 @@ fi + dir="${file%/*}" + test "$dir" = "$file" && dir="." + index="${file}.gdb-index" ++mode="${file}.mode" + +-rm -f $index ++rm -f $index $mode + # Ensure intermediate index file is removed when we exit. +-trap "rm -f $index" 0 ++trap "rm -f $index $mode" 0 + + $GDB --batch -nx -iex 'set auto-load no' \ + -ex "file $file" -ex "save gdb-index $dir" || { +@@ -58,8 +59,13 @@ $GDB --batch -nx -iex 'set auto-load no' \ + status=0 + + if test -f "$index"; then ++ touch "$mode" ++ chmod --reference="$file" "$mode" ++ # objcopy: unable to copy file 'foo.debug'; reason: Permission denied ++ chmod u+w "$file" + $OBJCOPY --add-section .gdb_index="$index" \ + --set-section-flags .gdb_index=readonly "$file" "$file" ++ chmod --reference="$mode" "$file" + status=$? + else + echo "$myname: No index was created for $file" 1>&2 + +--AhhlLboLdkugWU4S-- + diff --git a/gdb.spec b/gdb.spec index e19cd5d..c3ed25f 100644 --- a/gdb.spec +++ b/gdb.spec @@ -26,7 +26,7 @@ Version: 7.12 # 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: 33%{?dist} +Release: 34%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -648,6 +648,9 @@ Patch1151: gdb-testsuite-morestack-gold.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). Patch1152: gdb-libexec-add-index.patch +# Fix gdb-add-index for 444 *.debug files. +Patch1153: gdb-add-index-chmod.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -1020,6 +1023,7 @@ done %patch1150 -p1 %patch1151 -p1 %patch1152 -p1 +%patch1153 -p1 %patch1075 -p1 %if 0%{?rhel:1} && 0%{?rhel} <= 7 @@ -1579,16 +1583,19 @@ then fi %changelog -* Mon Jan 02 2017 Rex Dieter - 7.12-33 +* Fri Jan 6 2017 Jan Kratochvil - 7.12-34.fc25 +- Fix gdb-add-index for 444 *.debug files. + +* Mon Jan 02 2017 Rex Dieter - 7.12-33.fc25 - fix logic of prior Conflicts -* Mon Jan 02 2017 Rex Dieter - 7.12-32 +* Mon Jan 02 2017 Rex Dieter - 7.12-32.fc25 - Conflicts: gdb-headless < 7.12-29 (#1402554) -* Fri Dec 09 2016 Charalampos Stratakis - 7.12-31.fc26 +* Fri Dec 09 2016 Charalampos Stratakis - 7.12-31.fc25 - Python 3.6 rebuild: Rebuild with python3 support. -* Fri Dec 09 2016 Charalampos Stratakis - 7.12-30.fc26 +* Fri Dec 09 2016 Charalampos Stratakis - 7.12-30.fc25 - Python 3.6 rebuild: Rebuild without python3 support. * Mon Oct 31 2016 Jan Kratochvil - 7.12-29.fc25