rlex / carbonapi-deb

Debian/ubuntu packaging for https://github.com/dgryski/carbonapi
2 stars 0 forks source link

Any golang-go version dependency? #1

Open abravorus opened 7 years ago

abravorus commented 7 years ago

Is there any dependency on golang-go version? Debian stable has golang 1.3.3, in backports - 1.7, testing - 1.8.

Latest go-carbon requires golang-go >= 1.8+ (means Debian testing). But for go-carbon binary .deb package is available. What about carbonapi, with which golang-go version it's possible to build it?

Many thanks, Alexandr

rlex commented 7 years ago

That's question for carbonapi dev (this repo is just packaging scripts), but i'm building it using golang 1.3.3 from debian stable and it works. More recent version of go will be better, i think.

abravorus commented 7 years ago

Thanks, that is what I would like to know because I will build on stable too.

31 мар. 2017 г. 17:05 пользователь "Lex Rivera" notifications@github.com написал:

That's question for carbonapi dev (this repo is just packaging scripts), but i'm building it using golang 1.3.3 from debian stable and it works. More recent version of go will be better, i think.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rlex/carbonapi-deb/issues/1#issuecomment-290721272, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9Gyv9Y0LWg2Lc9qiV4fy6KZN2iSFV7ks5rrQhDgaJpZM4Mvjk_ .

abravorus commented 7 years ago

Sorry, one more question. Following the howto trying to build carbonapi using carbonapi-deb (as a normal user) and got an error at the almost end of procedure:

dpkg-buildpackage -sa

dpkg-buildpackage: source package carbonapi
dpkg-buildpackage: source version 0.1~git20161210
dpkg-buildpackage: source distribution testing
dpkg-buildpackage: source changed by Lex Rivera <me@lex.io>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build carbonapi-deb
 fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang,quilt
   dh_testdir -O--buildsystem=golang
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/stend/tanja/carbonapi-deb'
dh_clean
make[1]: Leaving directory '/home/stend/tanja/carbonapi-deb'
   dh_quilt_unpatch -O--buildsystem=golang
No patch removed
   dh_clean -O--buildsystem=golang
 dpkg-source -b carbonapi-deb
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: warning: source directory 'carbonapi-deb' is not <sourcepackage>-<upstreamversion> 'carbonapi-0.1~git20161210'
dpkg-source: info: building carbonapi in carbonapi_0.1~git20161210.tar.gz
dpkg-source: info: building carbonapi in carbonapi_0.1~git20161210.dsc
 debian/rules build
dh build --buildsystem=golang --with=golang,quilt
   dh_testdir -O--buildsystem=golang
   dh_quilt_patch -O--buildsystem=golang
No series file found
   dh_auto_configure -O--buildsystem=golang
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/stend/tanja/carbonapi-deb'
go get -v github.com/dgryski/carbonapi
github.com/dgryski/carbonapi (download)
import "context": import path doesn't contain a slash
package github.com/dgryski/carbonapi
    imports context: unrecognized import path "context"
github.com/JaderDias/movingmedian (download)
github.com/bradfitz/gomemcache (download)
github.com/dgryski/carbonzipper (download)
github.com/gogo/protobuf (download)
github.com/dgryski/go-onlinestats (download)
github.com/aclements/go-moremath (download)
github.com/dustin/go-humanize (download)
github.com/gonum/matrix (download)
github.com/gonum/blas (download)
github.com/gonum/internal (download)
github.com/gonum/floats (download)
github.com/gonum/lapack (download)
github.com/kisielk/og-rek (download)
github.com/mjibson/go-dsp (download)
github.com/wangjohn/quickselect (download)
github.com/dgryski/go-expirecache (download)
github.com/facebookgo/grace (download)
github.com/facebookgo/httpdown (download)
github.com/facebookgo/clock (download)
github.com/facebookgo/stats (download)
github.com/facebookgo/pidfile (download)
github.com/facebookgo/atomicfile (download)
github.com/gorilla/handlers (download)
github.com/lomik/zapwriter (download)
Fetching https://go.uber.org/zap?go-get=1
Parsing meta tags from https://go.uber.org/zap?go-get=1 (status code 200)
get "go.uber.org/zap": found meta tag main.metaImport{Prefix:"go.uber.org/zap", VCS:"git", RepoRoot:"https://github.com/uber-go/zap"} at https://go.uber.org/zap?go-get=1
go.uber.org/zap (download)
Fetching https://go.uber.org/atomic?go-get=1
Parsing meta tags from https://go.uber.org/atomic?go-get=1 (status code 200)
get "go.uber.org/atomic": found meta tag main.metaImport{Prefix:"go.uber.org/atomic", VCS:"git", RepoRoot:"https://github.com/uber-go/atomic"} at https://go.uber.org/atomic?go-get=1
go.uber.org/atomic (download)
Fetching https://go.uber.org/zap/buffer?go-get=1
Parsing meta tags from https://go.uber.org/zap/buffer?go-get=1 (status code 200)
get "go.uber.org/zap/buffer": found meta tag main.metaImport{Prefix:"go.uber.org/zap", VCS:"git", RepoRoot:"https://github.com/uber-go/zap"} at https://go.uber.org/zap/buffer?go-get=1
get "go.uber.org/zap/buffer": verifying non-authoritative meta tag
Fetching https://go.uber.org/zap?go-get=1
Parsing meta tags from https://go.uber.org/zap?go-get=1 (status code 200)
Fetching https://go.uber.org/zap/zapcore?go-get=1
Parsing meta tags from https://go.uber.org/zap/zapcore?go-get=1 (status code 200)
get "go.uber.org/zap/zapcore": found meta tag main.metaImport{Prefix:"go.uber.org/zap", VCS:"git", RepoRoot:"https://github.com/uber-go/zap"} at https://go.uber.org/zap/zapcore?go-get=1
get "go.uber.org/zap/zapcore": verifying non-authoritative meta tag
Fetching https://go.uber.org/zap?go-get=1
Parsing meta tags from https://go.uber.org/zap?go-get=1 (status code 200)
github.com/peterbourgon/g2g (download)
github.com/satori/go.uuid (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag main.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
debian/rules:12: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '/home/stend/tanja/carbonapi-deb'
debian/rules:9: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

What could be wrong here? Something with go.uber.org?

rlex commented 7 years ago

Since it reports 200 it should be fine. Note that i missed "export GOPATH" part (should be in scripts but i missed it, this whole repo was very quickly hacked together) Also, it will be a good thing to adjust date in debian/changelog to reflect build date. I just run it on my debian 8 system and got this, but your output looks different from mine:

builder@midgard:~/carbonapi-deb$ export GOPATH=/tmp/gopathb
builder@midgard:~/carbonapi-deb$ dpkg-buildpackage -sa
dpkg-buildpackage: source package carbonapi
dpkg-buildpackage: source version 0.1~git20161210
dpkg-buildpackage: source distribution testing
dpkg-buildpackage: source changed by Lex Rivera <me@lex.io>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build carbonapi-deb
 fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang,quilt
   dh_testdir -O--buildsystem=golang
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/builder/carbonapi-deb'
dh_clean
make[1]: Leaving directory '/home/builder/carbonapi-deb'
   dh_quilt_unpatch -O--buildsystem=golang
No patch removed
   dh_clean -O--buildsystem=golang
 dpkg-source -b carbonapi-deb
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: warning: source directory 'carbonapi-deb' is not <sourcepackage>-<upstreamversion> 'carbonapi-0.1~git20161210'
dpkg-source: info: building carbonapi in carbonapi_0.1~git20161210.tar.gz
dpkg-source: info: building carbonapi in carbonapi_0.1~git20161210.dsc
 debian/rules build
dh build --buildsystem=golang --with=golang,quilt
   dh_testdir -O--buildsystem=golang
   dh_quilt_patch -O--buildsystem=golang
No series file found
   dh_auto_configure -O--buildsystem=golang
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/builder/carbonapi-deb'
go get -v github.com/dgryski/carbonapi
go build -v github.com/dgryski/carbonapi
github.com/dgryski/carbonapi
make[1]: Leaving directory '/home/builder/carbonapi-deb'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/home/builder/carbonapi-deb'
#go test -v github.com/dgryski/carbonapi
:
make[1]: Leaving directory '/home/builder/carbonapi-deb'
 fakeroot debian/rules binary
dh binary --buildsystem=golang --with=golang,quilt
   dh_testroot -O--buildsystem=golang
   dh_prep -O--buildsystem=golang
   debian/rules override_dh_auto_install
make[1]: Entering directory '/home/builder/carbonapi-deb'
install -Dm0755 carbonapi debian/carbonapi/usr/bin/carbonapi
install -Dm0755 files/carbonapi.service debian/carbonapi/usr/lib/systemd/system/carbonapi.service
install -Dm0755 files/carbonapi.env debian/carbonapi/etc/default/carbonapi
make[1]: Leaving directory '/home/builder/carbonapi-deb'
   dh_installdocs -O--buildsystem=golang
   dh_installchangelogs -O--buildsystem=golang
   dh_perl -O--buildsystem=golang
   dh_link -O--buildsystem=golang
   dh_compress -O--buildsystem=golang
   dh_fixperms -O--buildsystem=golang
   dh_strip -O--buildsystem=golang
   dh_makeshlibs -O--buildsystem=golang
   dh_shlibdeps -O--buildsystem=golang
   dh_installdeb -O--buildsystem=golang
   dh_golang -O--buildsystem=golang
   dh_gencontrol -O--buildsystem=golang
dpkg-gencontrol: warning: package carbonapi: unused substitution variable ${misc:Built-Using}
   dh_md5sums -O--buildsystem=golang
   dh_builddeb -u-Zxz -O--buildsystem=golang
dpkg-deb: building package `carbonapi' in `../carbonapi_0.1~git20161210_amd64.deb'.
 dpkg-genchanges -sa >../carbonapi_0.1~git20161210_amd64.changes
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build carbonapi-deb
dpkg-buildpackage: full upload; Debian-native package (full source is included)
builder@midgard:~/carbonapi-deb$ file ../carbonapi_0.1~git20161012_amd64.deb
../carbonapi_0.1~git20161012_amd64.deb: Debian binary package (format 2.0)
abravorus commented 7 years ago

Hm, very interesting...

I assigned GOPATH to the folder created inside of the carbonapi-deb structure, I think it doesn't matter. And I have a lot of additional downloads comparing with you - from facebookgo, uber and other.

Everything was done also on Debian 8 (stable=jessie) in following steps: 1) sudo apt-get install devscripts dh-golang golang-go 2) sudo apt-get install quilt (I didn't have it) 3) git clone https://github.com/rlex/carbonapi-deb.git 4) cd carbonapi-deb/ 5) mkdir carbonapi 6) export GOPATH=/home/stend/tanja/carbonapi-deb/carbonapi 7) dpkg-buildpackage -sa

rlex commented 7 years ago

So it compiled after GOPATH was set?

abravorus commented 7 years ago

Yes. It wan't compile without GOPATH set.

abravorus commented 7 years ago

Sorry, I just realized that I didn't understand your question.

First I have run the process without GOPATH set and it failed immediatelly. After that I set GOPATH, run it again, the log above shows the results with GOPATH set already. So, for me it doesn't work with GOPATH set too.

Alexandr