Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1184221

Summary: debugedit: .debug_line from golang is not updated
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: ffesti, gdb-bugs, jan.kratochvil, jchaloup, jzeleny, lkardos, novyjindrich, packaging-team-maint, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rpm-4.12.0.1-9.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-22 22:53:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1184257    
Attachments:
Description Flags
Fix none

Description Jan Kratochvil 2015-01-20 19:32:43 UTC
Description of problem:
GOLANG-BUILT-PKG-debuginfo.rpm will contain references to source files in the rpmbuild directory.

Version-Release number of selected component (if applicable):
rpm-build-4.12.0.1-6.fc22.x86_64

How reproducible:
Always.

Steps to Reproduce:
echo 'package main; func main () {}' >main.go
go build -a main.go
/usr/lib/rpm/debugedit -b `dirname $PWD` -d /usr/src/debug main
readelf -wl main|grep main.go

Actual results:
  1	0	0	0	/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.go/main.go

Expected results:
  1	0	0	0	/usr/src/debug/gdb.go/main.go

Additional info:
This is a tracking Bug for the Tools team.

Comment 1 Jan Kratochvil 2015-02-07 09:48:12 UTC
Created attachment 989164 [details]
Fix

golang does not produce DW_AT_comp_dir and debugedit ignored .debug_line in such case (despite golang .debug_line contains absolute filenames).

before:
$ gdb etcd
(gdb) l
16      /home/jkratoch/redhat/fedora/etcd/master/etcd-2.0.0/src/github.com/coreos/etcd/main.go: No such file or directory.

after:
$ gdb etcd
(gdb) l
16      // (located at github.com/coreos/etcd/etcdmain) to ensure that etcd is still
17      // "go getable"; e.g. `go get github.com/coreos/etcd` works as expected and
18      // builds a binary in $GOBIN/etcd
19      //
20      // This package should NOT be extended or modified in any way; to modify the
21      // etcd binary, work in the `github.com/coreos/etcd/etcdmain` package.
22      //
23      
24      package main
25      
(gdb) info source
Current source file is /usr/src/debug/etcd-2.0.0/src/github.com/coreos/etcd/main.go
Located in /usr/src/debug/etcd-2.0.0/src/github.com/coreos/etcd/main.go
Contains 32 lines.
Source language is unknown.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.

Comment 2 Jaroslav Reznik 2015-03-03 16:44:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Jan Kratochvil 2015-04-13 20:07:20 UTC
ping

Comment 4 Fedora Update System 2015-04-15 09:40:47 UTC
rpm-4.12.0.1-9.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/rpm-4.12.0.1-9.fc22

Comment 5 Florian Festi 2015-04-15 13:34:48 UTC
Also fixed in rawhide as rpm-4.12.0.1-14.fc23

Comment 6 Jan Chaloupka 2015-04-16 15:30:13 UTC
Hi Florian,

thanks for the fix. Can we fix this for f20 and f21 too?

Regards
Jan

Comment 7 Fedora Update System 2015-04-17 08:56:27 UTC
rpm-4.12.0.1-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/rpm-4.12.0.1-6.fc21

Comment 8 Fedora Update System 2015-04-17 09:23:05 UTC
rpm-4.11.3-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rpm-4.11.3-3.fc20

Comment 9 Fedora Update System 2015-04-21 19:08:19 UTC
rpm-4.12.0.1-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-04-22 22:53:25 UTC
rpm-4.12.0.1-9.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-04-28 13:17:37 UTC
rpm-4.11.3-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.