
























I can confirm that changing the go build command in the PKGBUILD works. Thanks a lot @TheEdgeOfRage.
Changing the go build command to this fixes the build issue:
go build -ldflags "-X main.rawVersion=$pkgver"
I've the following error when I try to install the latest version of this package:
# github.com/hashicorp/terraform-ls
main.version: cannot set with -X: not a var of type string (type:*github.com/hashicorp/go-version.Version)
==> ERROR: A failure occurred in build().
Aborting...
error: failed to build 'terraform-ls-0.30.2-1':
error: packages failed to build: terraform-ls-0.30.2-1
I have added the new architectures, thanks!
This builds fine on aarch64:
diff --git a/.SRCINFO b/.SRCINFO
index 57cb937..2c5ddea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -4,6 +4,7 @@ pkgbase = terraform-ls
pkgrel = 1
url = https://github.com/hashicorp/terraform-ls
arch = x86_64
+ arch = aarch64
license = custom:MPL2
makedepends = go
options = !lto
diff --git a/PKGBUILD b/PKGBUILD
index c1fd21a..edddfc4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=terraform-ls
pkgver=0.29.2
pkgrel=1
pkgdesc='Terraform Language Server'
-arch=('x86_64')
+arch=('x86_64' 'aarch64')
url='https://github.com/hashicorp/terraform-ls'
license=('custom:MPL2')
makedepends=('go')
Sorry, seems like they revoked the first release and released it a second time.
Build is failing due to checksum mismatch:
==> Making package: terraform-ls 0.28.0-1 (Tue Jun 7 18:33:53 2022)
==> Retrieving sources...
-> Downloading terraform-ls-0.28.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1043k 0 1043k 0 0 2506k 0 --:--:-- --:--:-- --:--:-- 2506k
==> Validating source files with sha256sums...
terraform-ls-0.28.0.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!
Output of sha256sum:
$ sha256sum terraform-ls-0.28.0.tar.gz
3c52faab9ef60f246c1f046b5689306ec6265eca6d560833dd797b8ec80b6129 terraform-ls-0.28.0.tar.gz
The version is correct now.
Could you please include build flags to set the version on the resulting binary?
diff --git a/PKGBUILD b/PKGBUILD
index db45658..f2ea048 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ build() {
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- go build
+ go build -ldflags "-X main.version=$pkgver -X main.prerelease="
}
package() {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Please follow RFC16 use MPL-2.0