Skip to content
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

Linux manual installation guide is largely incomplete #263

Open
notorand-it opened this issue Oct 10, 2024 · 4 comments
Open

Linux manual installation guide is largely incomplete #263

notorand-it opened this issue Oct 10, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation hacktoberfest help wanted Extra attention is needed

Comments

@notorand-it
Copy link

Describe the bug
Manual installation guide is largely incomplete.

Expected details (example)
If you can escalate to root privileges (with su or sudo or even logging in as root), you can make a system-wide installation of the tenvtool.
Untar the package directly to /usr/bin or any other directory whose name is listed in the $PATH directory. As an option, you can untar it into any other directory (e.g. /usr/local/tenv) and then add it to the system-wide $PATH or even create symlinks from that directory to one already listed in $PATH.
If you cannot escalate to root privileges, you need to untar the package into a directory inde your own $HOME (e.g. ~/bin), add that directory to your local $PATH (e.g. by using your .profile or .login file).

Any subsequent call to tenv will refer to the calling user $HOME directory, thus installing, running and listing whatever binaries are present in the local directory (~/.tenv by default).

Additional context
Clear documentation is key to success IMHO.

@kvendingoldo
Copy link
Collaborator

Agree, thank you for reporting. It's a good point for us

@kvendingoldo kvendingoldo added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Oct 10, 2024
@notorand-it
Copy link
Author

Glad to be of any help.

@notorand-it
Copy link
Author

I have the following suggestions to be merged in the README.md (is that really a markdown file?)

  1. Getting started/Prerequisites/Linux: local, static
BINDIR=${HOME}/bin
mkdir -p ${BINDIR}
wget -q -O - "https://api.github.com/repos/sigstore/cosign/releases/latest" | \
  jq -r '.assets[] | select(.name | match("cosign-linux-amd64$") ) | .browser_download_url' | \
  wget -q -i - -O ${BINDIR}/cosign && chmod 700 ${BINDIR}/cosign
  1. Getting started/Installation/Manual installation
BINDIR=${HOME}/bin
mkdir -p ${BINDIR} &> /dev/null || true
wget -q -O - "https://api.github.com/repos/tofuutils/tenv/releases/latest" | \
  jq -r '.assets[] | select(.name | match("Linux_x86_64.tar.gz$") ) | .browser_download_url' | \
  wget -q -i - -O - | tar xfz - -C ${BINDIR}

In case $BINDIR is a system dir (like /usr/bin), you need to prepend the tar command with either sudo or use any other privilege escalation tool.

I am deviating from your previous shell snippets because:

  1. quite often you can find wget but not curl.
  2. A single pipeline is better than a command concatenation (;)
  3. My solution for manual installation can be easily automated.

@kvendingoldo
Copy link
Collaborator

I will do the PR.

@kvendingoldo kvendingoldo reopened this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants