[opensuse-buildservice] %goprep macro not found by rpm-build
I have created build script home:mpapis/sm-json and it fails, here is log of it's build https://build.opensuse.org/package/live_build_log?arch=x86_64&package=sm-json&project=home%3Ampapis&repository=openSUSE_12.1 I tried to google for this/similar error, and it looks like there is no %goprep macro, but I have no clue why it would be missing, I have searched for similar packages spec and I think I did everything properly - but still the error happens in both building via service and locally. after commenting the %goprep line it fails on %gobuild line. Thanks, Michal -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Fri, 8 Jun 2012 06:30:10 +0200
Michał Papis
I have created build script home:mpapis/sm-json and it fails, here is log of it's build https://build.opensuse.org/package/live_build_log?arch=x86_64&package=sm-json&project=home%3Ampapis&repository=openSUSE_12.1
I tried to google for this/similar error, and it looks like there is no %goprep macro, but I have no clue why it would be missing, I have searched for similar packages spec and I think I did everything properly - but still the error happens in both building via service and locally. after commenting the %goprep line it fails on %gobuild line.
Thanks, Michal Hi Have a look at /etc/rpm/macros.go file to see what macros exist.... http://paste.opensuse.org/60163632
-- Cheers Malcolm °¿° (Linux Counter #276890) openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop up 10:48, 3 users, load average: 0.02, 0.06, 0.05 CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
I was using this instruction: http://en.opensuse.org/openSUSE:Packaging_Go is there any way that could be updated with proper example? -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Friday 08 Jun 2012 07:33:39 Michał Papis wrote:
I was using this instruction: http://en.opensuse.org/openSUSE:Packaging_Go
is there any way that could be updated with proper example?
Thanks for bringing this up, I'll add some lines to show an example with a real world package. In the meantime a quick explanation. The %goprep macro prepares a directory structure inside the build that mimicks the the expected locations that the Go toolchain build tool "go" expects to see. On the wiki page, where it shows the following entry in the .spec recipe: %goprep $IMPORTPATH_NAMESPACE You should replace $IMPORTPATH_NAMESPACE with the package import path you would use to import the package into a go source file. For example if I was importing the protocol buffer package in my go source I would have: import "code.google.com/p/goprotobuf" Thus, in the .spec file for the protocol buffer package on OBS, this becomes: %goprep code.google.com/p/goprotobuf In your case, this should be: %goprep github.com/sm/json Hope this helps, let me know if you have any further questions about building go packages on OBS. Cheers the noo, Graham
On Friday 08 Jun 2012 00:11:27 Malcolm wrote:
On Fri, 8 Jun 2012 06:30:10 +0200
Michał Papis
wrote: I have created build script home:mpapis/sm-json and it fails, here is log of it's build https://build.opensuse.org/package/live_build_log?arch=x86_64&package=sm-j son&project=home%3Ampapis&repository=openSUSE_12.1>
I tried to google for this/similar error, and it looks like there is no %goprep macro, but I have no clue why it would be missing, I have searched for similar packages spec and I think I did everything properly - but still the error happens in both building via service and locally. after commenting the %goprep line it fails on %gobuild line.
Thanks, Michal
Hi Have a look at /etc/rpm/macros.go file to see what macros exist.... http://paste.opensuse.org/60163632
That's a bit out of date, see: https://build.opensuse.org/package/view_file?file=macros.go&package=go&project=devel:languages:go&rev=1185ee3f5e22a2ed54660151911c0682
I gave it another try on opensuse factory and those macros worked.
On Fri, Jun 8, 2012 at 5:19 PM, Graham Anderson
On Friday 08 Jun 2012 00:11:27 Malcolm wrote:
On Fri, 8 Jun 2012 06:30:10 +0200
Michał Papis
wrote: I have created build script home:mpapis/sm-json and it fails, here is log of it's build https://build.opensuse.org/package/live_build_log?arch=x86_64&package=sm-j son&project=home%3Ampapis&repository=openSUSE_12.1>
I tried to google for this/similar error, and it looks like there is no %goprep macro, but I have no clue why it would be missing, I have searched for similar packages spec and I think I did everything properly - but still the error happens in both building via service and locally. after commenting the %goprep line it fails on %gobuild line.
Thanks, Michal
Hi Have a look at /etc/rpm/macros.go file to see what macros exist.... http://paste.opensuse.org/60163632
That's a bit out of date, see:
https://build.opensuse.org/package/view_file?file=macros.go&package=go&project=devel:languages:go&rev=1185ee3f5e22a2ed54660151911c0682 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Graham Anderson
-
Malcolm
-
Michał Papis