Package Details: tfenv 3.0.0-2

Git Clone URL: https://aur.archlinux.org/tfenv.git (read-only, click to copy)
Package Base: tfenv
Description: Terraform version manager inspired by rbenv
Upstream URL: https://github.com/tfutils/tfenv
Keywords: terraform
Licenses: MIT
Conflicts: terraform
Provides: terraform, tfenv
Submitter: zephrax
Maintainer: T4cC0re (gmy, Daklon)
Last Packager: Daklon
Votes: 16
Popularity: 0.000064
First Submitted: 2018-02-26 14:36 (UTC)
Last Updated: 2023-05-14 00:20 (UTC)

Required by (18)

Sources (1)

Pinned Comments

T4cC0re commented on 2020-04-20 17:53 (UTC)

tfenv 2.0!

Also some under the hood improvements to the way this is packaged

  • Versions and the version file remain in /var/lib/tfenv/
  • Actual application is now installed to /opt/tfenv
  • Symlinks to /usr/bin are provided for both tfenv and terraform
  • Once you add your user to the tfenv group, you can manage versions as a non-root user

Latest Comments

1 2 3 Next › Last »

npreining commented on 2023-10-15 08:43 (UTC)

Please install the keyring for gpg authentications. With the following patch, one can create a file /opt/tfenv/use-gpgv containing trust-tfenv: yes and further installations will check the gpg checksum:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,6 +26,7 @@ package() {
        mkdir -p "${pkgdir}/opt/tfenv/libexec"
        mkdir -p "${pkgdir}/opt/tfenv/lib"
        mkdir -p "${pkgdir}/opt/tfenv/bin"
+       mkdir -p "${pkgdir}/opt/tfenv/share"

        # This patches tfenv to use a separate dir for versions and the default version
        sed -i 's:${TFENV_CONFIG_DIR}/version:/var/lib/tfenv/version:g' {libexec/tfenv-*,lib/*.sh}
@@ -42,6 +43,9 @@ package() {
         for i in "${srcdir}/${pkgname}-${pkgver}/lib/"*; do
                 install -m555 "$i" "${pkgdir}/opt/tfenv/lib/$(basename "$i")"
         done
+        for i in "${srcdir}/${pkgname}-${pkgver}/share/"*; do
+                install -m644 "$i" "${pkgdir}/opt/tfenv/share/$(basename "$i")"
+        done

        install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
 }

(BTW, why is the mode set to -m555 so that not even root as write permissions?)

T4cC0re commented on 2023-10-02 16:29 (UTC)

@Shamshiel make sure your user is added to the tfenv group and you restart your shell. The group grants permissions to install terraform binaries at runtime via tfenv.

Shamshiel commented on 2023-08-07 06:14 (UTC)

I installed the latest version of this package and I'm running into the following issue:

tfenv install
Installing Terraform v1.5.4
Downloading release tarball from https://releases.hashicorp.com/terraform/1.5.4/terraform_1.5.4_linux_amd64.zip

Downloading SHA hash file from https://releases.hashicorp.com/terraform/1.5.4/terraform_1.5.4_SHA256SUMS
Not instructed to use Local PGP (/opt/tfenv/use-{gpgv,gnupg}) & No keybase install found, skipping OpenPGP signature verification
mkdir: cannot create directory ‘/var/lib/tfenv/versions/1.5.4’: Permission denied
Failed to make directory /var/lib/tfenv/versions/1.5.4

Getting a mkdir: cannot create directory ‘...’: Permission denied error. Any idea why and how to fix it?

Daklon commented on 2023-05-13 21:20 (UTC) (edited on 2023-05-13 21:20 (UTC) by Daklon)

Can we get the new 3.0 version also? I'm willing to maintain or co-maintain this package as well

trouter commented on 2023-01-13 21:23 (UTC)

Hi, please can you add arm64 support to the PKGBUILD? Thanks!

OJFord commented on 2022-03-16 21:21 (UTC) (edited on 2022-03-16 21:22 (UTC) by OJFord)

@T4cC0re Fair enough! I still haven't encountered the problem, (nor has it managed to create them in /opt) though it's not immediately clear to me why.

T4cC0re commented on 2022-03-16 19:49 (UTC)

@OJFord this is to ensure, that tfenv can be installed system-wide without requiring root permissions to install new versions. The patched target directory is writable to users in the tfenv group, which you can add your own user to.

Considering that it is apparent you did not thoroughly test the version you packaged I removed you as a co-maintainer. I will update the package myself in the coming days.

OJFord commented on 2022-03-16 17:47 (UTC)

@WhiteAnthrax I'm not sure if there's some comments lost here, but certainly I'm lacking some context - what's the motivation for the 'use a separate dir for versions and the default version' sed patch?

Seems inevitably brittle, I'm just not sure it's worth the maintenance burden. Or why it's Arch specific for that matter, is there an upstream issue/PR?

ghthor commented on 2022-03-16 16:23 (UTC)

Patch by @ribugent is working, thanks!

alxndr13 commented on 2022-03-11 13:03 (UTC)

@ribugent thanks, the fix worked.