This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1010713 - create and own %{_datadir}/gocode and %{_datadir}/gocode/src
create and own %{_datadir}/gocode and %{_datadir}/gocode/src
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: golang (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vincent Batts
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1023769 1023771 1023772 1023773 1023774 1026870
  Show dependency treegraph
 
Reported: 2013-09-22 13:48 EDT by Matthew Miller
Modified: 2014-05-21 08:41 EDT (History)
8 users (show)

See Also:
Fixed In Version: golang-1.2.2-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-20 22:36:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Miller 2013-09-22 13:48:07 EDT
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 15:54:54 EDT
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 06:01:31 EDT
(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 10:04:30 EDT
(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 09:19:35 EST
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 07:11:54 EST
(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 17:08:04 EDT
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 14:17:32 EDT
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 14:18:20 EDT
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 14:19:24 EDT
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-15 23:01:13 EDT
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 09:55:37 EDT
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-20 22:36:44 EDT
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 08:41:17 EDT
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

Note You need to log in before you can comment on or make changes to this bug.