Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#58063 - [restic] Does not include version number

Attached to Project: Community Packages
Opened by Alexander Neumann (fd0) - Sunday, 01 April 2018, 11:41 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 07 April 2018, 14:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Hi, thanks a lot for packaging restic for Arch! I noticed that `restic version` does not print proper version information:

$ restic version
restic compiled manually
compiled with go1.10 on linux/amd64

It should print something along these lines:

restic 0.8.3 (v0.8.3-94-g594256bf)
compiled with go1.10 on linux/amd64

The version number is embedded during compilation. For the restic project, we're using a small program called `build.go` which does that and can be used to produce a binary easily with `go run build.go`.

You could either just call this script in `build()` to produce a binary, alternatively set the version number as follows:

go build -ldflags "-X 'main.version=${pkgver}'" ./cmd/restic

I've attached a small patch which does that.

Thanks again for your work!

This task depends upon

Closed by  Morten Linderud (Foxboron)
Saturday, 07 April 2018, 14:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with restic 0.8.3-3
Comment by Evangelos Foutras (foutrelis) - Monday, 02 April 2018, 14:17 GMT
+1 for `go run build.go` -- prepare() and the GOPATH in build() appear to be unneeded with that as well :)

Loading...