Package Details: opentofu 1.6.0_beta1-1

Git Clone URL: https://aur.archlinux.org/opentofu.git (read-only, click to copy)
Package Base: opentofu
Description: The open source infrastructure as code tool.
Upstream URL: https://opentofu.org
Licenses: MPL2
Submitter: tucho
Maintainer: tucho
Last Packager: tucho
Votes: 8
Popularity: 2.66
First Submitted: 2023-09-20 19:02 (UTC)
Last Updated: 2023-11-30 18:29 (UTC)

Latest Comments

1 2 Next › Last »

sauyon commented on 2023-11-01 20:46 (UTC)

It seems like you haven't addressed the arch issue, haven't passed many of the recommended flags, and haven't added a check phase---would you like for me to write another patch?

esaporski commented on 2023-10-23 15:24 (UTC)

Thank you tucho!

tucho commented on 2023-10-23 13:54 (UTC)

There it is, version 1.6.0_alpha3. Thank you @esaporski for your collaboration.

tucho commented on 2023-10-23 13:31 (UTC)

Sorry folks, working on it.

esaporski commented on 2023-10-21 00:37 (UTC)

I made it work with this PKGBUILD: https://pastebin.com/3APzDQdr It's using the "v1.6.0-alpha3" version for now. Is the maintainer unresponsive?

sauyon commented on 2023-10-20 15:08 (UTC)

This package has been broken for some time, try my or @kemelzaidan's PKGBUILDs.

pchmykh commented on 2023-10-20 14:39 (UTC)

can't install, ==> Checking buildtime dependencies... ==> WARNING: Using existing $srcdir/ tree ==> Starting build()... /home/user/.cache/yay/opentofu/src/opentofu-main package github.com/opentofu/opentofu: build constraints exclude all Go files in /home/user/.cache/yay/opentofu/src/opentofu-main ==> ERROR: A failure occurred in build(). Aborting... -> error making: opentofu-exit status 4 -> Failed to install the following packages. Manual intervention is required: opentofu - exit status 4

sauyon commented on 2023-10-06 16:52 (UTC)

namcap runs with no errors.

kemelzaidan commented on 2023-10-06 01:00 (UTC)

Here is my PKGBUILD: https://pastebin.com/AtRCFk7N

It is building fine with no namcap errors. Have you used namcap after the package creation?

sauyon commented on 2023-10-04 22:09 (UTC)

Seems like most packages do add glibc as a dependency. Readded, updated version to 1.6.0-alpha1 and pinned commit to that ref.

diff --git a/PKGBUILD b/PKGBUILD
index b93c244..ad50f43 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,34 @@
 # Maintainer: Marcel Campello <marcel@prafrentex.com.br>
 pkgname=opentofu
-pkgver=1.6.0_dev
+pkgver=1.6.0_alpha1
+_commit=98bd62453522350e31ee420ff50f76a2977f9647  #refs/tags/v1.6.0-alpha1
 pkgrel=1
 pkgdesc="The open source infrastructure as code tool."
-arch=('any')
+arch=('x86_64')
 url="https://opentofu.org"
 license=('MPL2')
+depends=('glibc')
 makedepends=(
   'git'
   'go>=1.20.7'
 )
-source=("${pkgname}.zip::https://github.com/opentofu/opentofu/archive/refs/heads/main.zip")
+source=("git+https://github.com/opentofu/opentofu#commit=$_commit")
 sha256sums=('SKIP')

 build() {
-  export GOPATH="${srcdir}/go"
-  export CGO_ENABLED=0
+  cd "${pkgname}"

-  cd "${srcdir}/${pkgname}-main"
-  pwd
-  go install
+  go env -w CGO_ENABLED=0
+  go build -buildmode=pie -trimpath -mod=readonly -ldflags "-linkmode=external -extldflags -Wl,-z,relro,-z,now -w -s -X 'github.com/opentofu/opentofu/version.dev=no'" -o bin/ ./cmd/tofu
+  go env -u CGO_ENABLED
+}
+
+check() {
+  cd "${pkgname}"
+  go test ./...
 }

 package() {
-  cd "${srcdir}/go"
-  install bin/opentofu -t "${pkgdir}/usr/bin" -Dm 0755
+  cd "${pkgname}"
+  install bin/tofu -t "${pkgdir}/usr/bin" -Dm 0755
 }