Bug 1010713

Summary: create and own %{_datadir}/gocode and %{_datadir}/gocode/src
Product: [Fedora] Fedora Reporter: Matthew Miller <mattdm>
Component: golangAssignee: Vincent Batts <vbatts>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: adam, admiller, golang-updates, lemenkov, lsm5, mario.blaettermann, renich, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: golang-1.2.2-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-21 02:36:44 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: 1023769, 1023771, 1023772, 1023773, 1023774, 1026870    

Description Matthew Miller 2013-09-22 17:48:07 UTC
Although this isn't final, I think we will converge on a Go library packaging standard similar to Debian's: https://wiki.debian.org/MichaelStapelberg/GoPackaging

As part of this, Go library packages (like golang-github-kr-pty) will define 

%global gopath          %{_datadir}/gocode

and install their source code under that. Right now, all of the packages then own %{_datadir}/gocode and %{_datadir}/gocode. We could reduce duplication by adding this to the golang package itself (which all of these packages already require).


So:

  1. define gopath as above at the start of the spec file. (Maybe we can put this in some global file at some point?)
  2. create the directories in %install
  3. own them with %dir in %files

Thanks!

Comment 1 Vincent Batts 2013-09-23 19:54:54 UTC
today matthew and i were chatting about this. Perhaps the 'golang' package should produce a '-devel' subpackage that has /etc/rpm/macros.golang for definitions like this.
'golang-devel' Requires 'golang'
then libraries Requires 'golang-devel' so the macros will expand.

spec files for libraries and such ought only be boilerplate then.

Comment 2 Peter Lemenkov 2013-10-13 10:01:31 UTC
(In reply to Vincent Batts from comment #1)
> today matthew and i were chatting about this. Perhaps the 'golang' package
> should produce a '-devel' subpackage that has /etc/rpm/macros.golang for
> definitions like this.

No need for *-devel subpackage. Entire golang is a devel-like kind of a package. So instead shop RPM macros directly with it. 

Another one moment - we should install macros into /etc/rpm only on EL6. More up-to-date branches (EL7, Fedora) provides /usr/lib/rpm/macros.d/ directory.

Btw I'd like to join macros discission.

Comment 3 Matthew Miller 2013-10-14 14:04:30 UTC
(In reply to Peter Lemenkov from comment #2)
> Btw I'd like to join macros discission.

Cool. Probably the best place for that is on the Fedora Packaging mailing list https://lists.fedoraproject.org/mailman/listinfo/packaging, and as work on the draft guidelines https://fedoraproject.org/wiki/PackagingDrafts/Go

Comment 4 Peter Lemenkov 2013-11-04 14:19:35 UTC
I think we should add the following directories as well:

%{_datadir}/gocode/github.com/
%{_datadir}/gocode/bitbucket.org/
%{_datadir}/gocode/code.google.com/
%{_datadir}/gocode/code.google.com/p/

Comment 5 Mario Blättermann 2014-01-09 12:11:54 UTC
(In reply to Peter Lemenkov from comment #4)
> I think we should add the following directories as well:
> 
> %{_datadir}/gocode/github.com/
> %{_datadir}/gocode/bitbucket.org/
> %{_datadir}/gocode/code.google.com/
> %{_datadir}/gocode/code.google.com/p/

Any news about that? There are some dependent packages waiting for a review, I like to proceed there.

Comment 6 Vincent Batts 2014-04-10 21:08:04 UTC
as an update, this will be included in >= golang-1.2.1-4, which I am still ironing out all the changes that will be included.

Comment 7 Fedora Update System 2014-05-14 18:17:32 UTC
golang-1.2.2-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/golang-1.2.2-2.el6

Comment 8 Fedora Update System 2014-05-14 18:18:20 UTC
golang-1.2.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-1.2.2-2.fc20

Comment 9 Fedora Update System 2014-05-14 18:19:24 UTC
golang-1.2.2-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/golang-1.2.2-2.fc19

Comment 10 Fedora Update System 2014-05-16 03:01:13 UTC
Package golang-1.2.2-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing golang-1.2.2-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1416/golang-1.2.2-2.el6
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2014-05-20 13:55:37 UTC
golang-1.2.2-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/golang-1.2.2-3.el6

Comment 12 Fedora Update System 2014-05-21 02:36:44 UTC
golang-1.2.2-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2014-05-21 12:41:17 UTC
golang-1.2.2-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/golang-1.2.2-6.fc19