Arch Linux

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#80015 - [terraform] Version reported as '-dev' development version when actually a release version

Attached to Project: Arch Linux
Opened by Matt M. (9numbernine9) - Friday, 20 October 2023, 02:27 GMT
Last edited by Justin Kromlinger (hashworks) - Friday, 20 October 2023, 12:09 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Daurnimator (daurnimator)
Christian Rebischke (Shibumi)
Justin Kromlinger (hashworks)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Greetings!

As currently built, the terraform binary will report itself as a development version even though only released versions of Terraform are being built. This has the mildly annoying side effect of making the output of `terraform version` always report a new version as being available, even when running the most recently released stable version.

To resolve this, I would propose a patch (please see attached) that marks the version as _not_ being a development version. This is supported as per the building instructions from Hashicorp:
https://github.com/hashicorp/terraform/blob/main/BUILDING.md#dev-version-reporting

With the patch applied and the code rebuilt, the output looks more expected:
% ./pkg/terraform/usr/bin/terraform version
Terraform v1.6.2
on linux_amd64

Note that this patch _does_ make the GOFLAGS quoting a little ugly. This comment seems to imply that might be normal:
https://github.com/golang/go/issues/26849#issuecomment-1241374004

Suggestions for a less-ugly quoted string would be happily accepted and I can provide a new patch if you have suggestions!

Additional info:
* package version(s)
1.6.2-1

* config and/or log files etc.
% terraform version
Terraform v1.6.2-dev
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.6.2. You can update by downloading from https://www.terraform.io/downloads.html

* link to upstream bug report, if any

Steps to reproduce:

- Build terraform.
- Observe the output of `terraform version`
This task depends upon

Closed by  Justin Kromlinger (hashworks)
Friday, 20 October 2023, 12:09 GMT
Reason for closing:  Implemented
Additional comments about closing:  1.6.2-2
Comment by Justin Kromlinger (hashworks) - Friday, 20 October 2023, 12:08 GMT
Thanks! I think the `GOFLAGS` quoting is acceptable.

Loading...