Package Details: opentofu 1.6.2-1

Git Clone URL: https://aur.archlinux.org/opentofu.git (read-only, click to copy)
Package Base: opentofu
Description: Lets you declaratively manage your cloud infrastructure
Upstream URL: https://github.com/opentofu/opentofu
Licenses: MPL-2.0
Submitter: tucho
Maintainer: carsme
Last Packager: carsme
Votes: 20
Popularity: 2.78
First Submitted: 2023-09-20 19:02 (UTC)
Last Updated: 2024-02-22 19:01 (UTC)

Dependencies (2)

Required by (0)

Sources (2)

Latest Comments

1 2 Next › Last »

carsme commented on 2024-02-08 20:32 (UTC)

@Felixoid That's a valid point for sure. I investigated the test failures a bit more and realized it was an issue on my end (see commit message) so I have reverted back to building from the source archive. Good input, thanks.

Felixoid commented on 2024-02-08 18:13 (UTC) (edited on 2024-02-08 18:19 (UTC) by Felixoid)

Please replace the source git+https with archive https://github.com/opentofu/opentofu/archive/refs/tags/v1.6.1.tar.gz from the release page https://github.com/opentofu/opentofu/releases/tag/v1.6.1

Cloning the repo is a nightmare from the traffic perspective. And costs much more time than just downloading a tar.gz

Here's the diff to apply

diff --git a/.SRCINFO b/.SRCINFO
index 801d7ea..44b9b81 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
 pkgbase = opentofu
        pkgdesc = Lets you declaratively manage your cloud infrastructure
        pkgver = 1.6.1
-       pkgrel = 1
+       pkgrel = 2
        url = https://github.com/opentofu/opentofu
        arch = x86_64
        license = MPL-2.0
        makedepends = git
        makedepends = go
        depends = glibc
-       source = opentofu::git+https://github.com/opentofu/opentofu.git?signed#commit=89ca50f3fe8c5327ec9943e9590bdb7b023fd4eb
+       source = opentofu-1.6.1.tgz::https://github.com/opentofu/opentofu/archive/refs/tags/v1.6.1.tar.gz
        source = tofu.fish
        validpgpkeys = 968479A1AFF927E37D1A566BB5690EEEBB952194
-       sha256sums = SKIP
+       sha256sums = 7c355deadd8abbf5671efee2217a97243ec1059884db4c87f66841612c0a5263
        sha256sums = 312fe00a97ed3098fa141a54dfc0694c13766957acedec19f10347b80f813ce8

 pkgname = opentofu
diff --git a/PKGBUILD b/PKGBUILD
index 6ac53ff..a263ffa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 pkgname=opentofu
 pkgver=1.6.1
 _commit=89ca50f3fe8c5327ec9943e9590bdb7b023fd4eb
-pkgrel=1
+pkgrel=2
 pkgdesc="Lets you declaratively manage your cloud infrastructure"
 arch=(x86_64)
 url="https://github.com/opentofu/opentofu"
@@ -15,19 +15,17 @@ makedepends=(
   go
 )
 source=(
-  "$pkgname::git+$url.git?signed#commit=$_commit"
+  "$pkgname-$pkgver.tgz::$url/archive/refs/tags/v$pkgver.tar.gz"
   "tofu.fish"
 )
 sha256sums=(
-  'SKIP'
+  '7c355deadd8abbf5671efee2217a97243ec1059884db4c87f66841612c0a5263'
   '312fe00a97ed3098fa141a54dfc0694c13766957acedec19f10347b80f813ce8'
 )
 validpgpkeys=('968479A1AFF927E37D1A566BB5690EEEBB952194') # GitHub <noreply@github.com>

-_archive="$pkgname"
-
 build() {
-  cd "$_archive"
+  cd "$pkgname-$pkgver"

   export CGO_CPPFLAGS="$CPPFLAGS"
   export CGO_CFLAGS="$CFLAGS"
@@ -39,13 +39,13 @@ build() {
 }

 check() {
-  cd "$_archive"
+  cd "$pkgname-$pkgver"

   go test ./...
 }

 package() {
-  cd "$_archive"
+  cd "$pkgname-$pkgver"

   install -Dm755 -t "$pkgdir/usr/bin" tofu

I've built it from the clear repository, and all tests passed

carsme commented on 2024-02-05 18:21 (UTC) (edited on 2024-02-08 20:26 (UTC) by carsme)

Hey, I've adopted the package and updated to version 1.6.1. Completions for bash and fish are now installed as part of the package. I couldn't get the test to pass without using the Git repository as source, as such you'll need to add GitHub's PGP key before updating:

$ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 968479A1AFF927E37D1A566BB5690EEEBB952194
gpg: key B5690EEEBB952194: public key "GitHub <noreply@github.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Let me know if there are any issues. Cheers!

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