Snap build not stripping the binary?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Harry Pidcock |
Bug Description
I'm not sure if something broke with our build process, but checking out 2.8 and doing 'make go-install' I get:
$ make go-install
go install -mod=mod -tags "" -ldflags "-s -w -X github.
github.
$ go version
go version go1.14.4 linux/amd64
$ ll -h ~/dev/go/bin/juju
-rwxrwxr-x 1 jameinel jameinel 89M Jun 16 16:49 /home/jameinel/
So 89MB for 'juju'. However, the snap 2.8.0 is:
$ ll /snap/juju/
-rwxr-xr-x 1 root root 120M Jun 3 09:22 /snap/juju/
If instead of doing 'make go-install' I run 'go install -v github.
$ ll -h ~/dev/go/bin/juju
-rwxrwxr-x 1 jameinel jameinel 119M Jun 16 16:51 /home/jameinel/
Which is about the same size as the snap.
So I think we broke stripping for the snap build.
Changed in juju: | |
status: | Triaged → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Harry Pidcock (hpidcock) |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
It seems that our Makefile has the flags to strip: /github. com/juju/ juju/blob/ develop/ Makefile# L72 /github. com/juju/ juju/blob/ develop/ Makefile# L129
https:/
https:/
but those don't seem to be part of the juju-go plugin: /github. com/juju/ juju/blob/ develop/ snap/plugins/ juju_go. py#L108
https:/