-
Notifications
You must be signed in to change notification settings - Fork 75
docs: expand Linux manual installation guide #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,7 +157,7 @@ sudo rpm -ivh cosign-${LATEST_VERSION}-1.x86_64.rpm | |
| ``` | ||
|
|
||
| </details> | ||
| <details markdown="1"><summary><b>Linux: dkpg</b></summary><br> | ||
| <details markdown="1"><summary><b>Linux: dpkg</b></summary><br> | ||
|
|
||
| ```sh | ||
| LATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | jq -r .tag_name | tr -d "v") | ||
|
|
@@ -320,7 +320,59 @@ nix-shell -p tenv | |
|
|
||
| <a id="manual-installation"></a> | ||
| #### Manual Installation | ||
| Get the most recent packaged binaries (`.deb`, `.rpm`, `.apk`, `pkg.tar.zst `, `.zip` or `.tar.gz` format) by visiting the [release page](https://github.com/tofuutils/tenv/releases). After downloading, unzip the folder and seamlessly integrate it into your system's `PATH`. | ||
|
|
||
| Download the latest packaged binaries from the [release page](https://github.com/tofuutils/tenv/releases) (`.tar.gz` for Linux/macOS, `.zip` for Windows, or distro packages like `.deb`, `.rpm`, `.apk`, `pkg.tar.zst`). | ||
|
|
||
| <details markdown="1"><summary><b>Linux: system-wide installation (requires root)</b></summary><br> | ||
|
|
||
| If you have root access via `sudo` or `su`, you can install tenv for all users on the system. | ||
|
|
||
| Determine your architecture (`x86_64`, `arm64`, `armv6`, or `i386`) and run: | ||
|
|
||
| ```sh | ||
| LATEST_VERSION=$(curl --silent "https://api.github.com/repos/tofuutils/tenv/releases/latest" | grep '"tag_name"' | sed 's/.*"tag_name": *"\([^"]*\)".*/\1/') | ||
| curl -O -L "https://github.com/tofuutils/tenv/releases/latest/download/tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" | ||
| sudo tar xzf "tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" -C /usr/local/bin | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tenv release tarball contains non-binary files alongside the executables: Extract to a staging directory first, then copy only the binaries: TMP=$(mktemp -d)
sudo tar xzf "tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" -C "$TMP"
sudo cp "$TMP"/tenv "$TMP"/tofu "$TMP"/terraform "$TMP"/terragrunt "$TMP"/terramate "$TMP"/tf "$TMP"/atmos /usr/local/bin/
rm -rf "$TMP" |
||
| ``` | ||
|
|
||
| This extracts the binaries directly into `/usr/local/bin`, which is typically already in `$PATH`. | ||
|
|
||
| Alternatively, install to a dedicated directory and create symlinks: | ||
|
|
||
| ```sh | ||
| sudo mkdir -p /usr/local/tenv | ||
| sudo tar xzf "tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" -C /usr/local/tenv | ||
| sudo ln -sf /usr/local/tenv/tenv /usr/local/bin/tenv | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tarball ships seven binaries: Create symlinks for all binaries: for bin in tenv tofu terraform terragrunt terramate tf atmos; do
sudo ln -sf "/usr/local/tenv/$bin" "/usr/local/bin/$bin"
doneThe same gap applies to the user-local section at line 358: |
||
| ``` | ||
|
|
||
| </details> | ||
|
|
||
| <details markdown="1"><summary><b>Linux: user-local installation (no root required)</b></summary><br> | ||
|
|
||
| If you do not have root access, install tenv into your home directory: | ||
|
|
||
| ```sh | ||
| LATEST_VERSION=$(curl --silent "https://api.github.com/repos/tofuutils/tenv/releases/latest" | grep '"tag_name"' | sed 's/.*"tag_name": *"\([^"]*\)".*/\1/') | ||
| curl -O -L "https://github.com/tofuutils/tenv/releases/latest/download/tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" | ||
| mkdir -p ~/bin | ||
| tar xzf "tenv_${LATEST_VERSION}_Linux_x86_64.tar.gz" -C ~/bin | ||
| ``` | ||
|
|
||
| Then ensure `~/bin` is on your `PATH`. Add the following to `~/.profile` (or `~/.bashrc`): | ||
|
|
||
| ```sh | ||
| export PATH="$HOME/bin:$PATH" | ||
| ``` | ||
|
|
||
| Reload your shell: | ||
|
|
||
| ```sh | ||
| source ~/.profile | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reload command hardcodes On most modern Linux distros, source ~/.bashrc |
||
| ``` | ||
|
|
||
| > **Note:** tenv stores managed tool versions under `~/.tenv` by default. Without root, all installed tools are local to your user account. | ||
|
|
||
| </details> | ||
|
|
||
| <a id="docker-installation"></a> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prose at line 330 tells users to "Determine your architecture (
x86_64,arm64,armv6, ori386) and run:", but both code blocks (here and at line 356) still hardcodex86_64. A user onarm64who follows the instruction would run a command that downloads the wrong binary with no indication of where to substitute.Introduce an
ARCHvariable at the top of each code block: