Consider packing `pebble` binary with `upx`
Metadata
Current evaluation
Closed and manually migrated to canonical/pebble. Rockcraft uses pre-compiled Pebble snaps, so compressing the binary upstream better addresses the base image size reduction goal.
Suggested action: —
No scores available.
Issue body
### What needs to get done
Every rock includes pebble which means that every rock is at least as big as pebble. At the time of writing building the head of main gives me 13MB. [upx](https://github.com/upx/upx) supports automatic packing of go binaries and gives me a quite substantial drop to 56% file size:
```bash
$ https://github.com/canonical/pebble && cd pebble
$ go build -o pebble cmd/pebble/main.go
$ du -h ./pebble
13M
$ upx ./pebble &>/dev/null
$ du -h ./pebble
7.2M
```
and, with the `--ultra-brute` option down to `46%` at the cost of increased packing time.
### Why it needs to get done
Given pebble is shipped by default in *every* container, this, or something along these lines, might be worth considering to drop the base image size.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed and manually migrated to canonical/pebble. Rockcraft uses pre-compiled Pebble snaps, so compressing the binary upstream better addresses the base image size reduction goal. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and manually migrated to canonical/pebble. The upx compression suggestion was redirected to the upstream pebble repository, as Rockcraft consumes pre-compiled Pebble binaries. | |
| qwen/qwen3.6-35b-a3b | — | — | Suggested compressing the pebble binary with upx to reduce image size. Maintainer redirected the request to the canonical pebble repository. Author migrated the suggestion and closed the issue. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Suggested using UPX to compress the Pebble binary and reduce rock image size. Rejected as Rockcraft consumes a pre-compiled Pebble snap. Author manually migrated the issue to canonical/pebble and closed it. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and migrated to the canonical/pebble repository. The upx binary compression suggestion belongs in the upstream project, as Rockcraft uses a pre-compiled snap. Issue superseded by upstream tracking. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #177 project: use pebble snap instead of building | rockcraft | merged | Merged changes replacing local pebble binary builds with the published pebble snap. The update primes the binary as /usr/bin/pebble, reducing spread test runtime from ~32 to ~26 minutes. |