GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) πŸ’–

okay bestie, gather round, because today we're talking about install-in-any-folder-opensuse β€” aka the install Golf in literally any folder you want guide (it's part of the big install-golf documentation situation). this is the manual page for it. she's a cutie. let's go πŸŽ€


✨ NAME ✨

install-in-any-folder-opensuse β€” Golf documentation (install-golf) 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: installing Golf without root access (like, say, tucked into some user's home directory) is genuinely a slay when you don't have root permissions, or when you just wanna test things locally before committing to a full system-wide Golf install. lowkey the responsible move tbh πŸ’…

to install Golf locally with no root, first you gotta decide which directory you want it in. and like β€” it can be any directory, as long as you have read/write access to it. for our lil example we're gonna use the $HOME/.app/golf directory 🫢

step one: set the Golf root directory

GG_ROOT="$HOME/.app/golf"

step two: download the Golf source code and extract it

wget "https://github.com/golf-lang/golf/archive/refs/heads/main.tar.gz" -O main.tar.gz
tar xvfz main.tar.gz
cd golf-main

step three: install the dependencies (ngl you do need root access for this part β€” and if you don't have it, go ask your System Administrator to do these tasks for you, that's literally their job bestie):

sudo zypper --non-interactive in --replacefiles --force-resolution rpm-build
sudo zypper -n install $(rpmspec --parse golf.spec | grep BuildRequires|sed 's/^.*:\(.*\)$/\1/g')

step four: compile the source

make -j$(nproc) GG_LOCAL=1 DESTDIR="$GG_ROOT"

step five: install Golf

make GG_LOCAL=1 DESTDIR="$GG_ROOT" install

okay so for the installation to actually take effect, you have to update your paths β€” that way executables and other files (yes, including man pages πŸ‘€) actually get found:

export GG_ROOT="$HOME/.app/golf"
export PATH="$GG_ROOT/usr/bin":$PATH
export C_INCLUDE_PATH="$GG_ROOT/usr/include":$C_INCLUDE_PATH
export MANPATH=$GG_ROOT/usr/share/man/:$MANPATH
mandb -u -c

and to make those path settings permanent, just add all those exports to the end of your $HOME/.bashrc file so it runs whenever you start a new session (or honestly, put them in any other file you execute before working with Golf β€” your call, main character πŸ’–).

You've installed Golf! πŸŽ‰πŸ‘‘

to test it, type this in the command line:

gg -g

if you see the path you picked for GG_ROOT up there? it's working!! iconic. πŸ”₯

a few notes, and these exist purely because root access isn't being used for this Golf installation:

  • the SELinux script for Golf requires root to install (and tbh this is true for any software, not just Golf). so if you use SELinux, either set it to permissive, or just use a Linux distro that doesn't use (or set) it. no cap. πŸ’€
  • if you're using Unix sockets (for instance, for web servers to talk to your Golf server), then your $HOME directory and your Golf root directory both have to be searchable to access those sockets:
chmod o+x $HOME
find $HOME/.app/golf -type d -name '*' -exec chmod o+x {} \;

if you're using TCP ports instead, then this whole setup isn't necessary. you're free πŸ¦‹

here's how to uninstall. 🧚


🌈 SEE ALSO 🌈

Install golf ✨

install-arch-manjaro install-debian install-fedora-redhat-rocky-alma-centos-amazon-mageia install-from-source-arch-manjaro install-from-source-debian-ubuntu-raspbian install-from-source-fedora-redhat-rocky-alma-centos-amazon-mageia install-from-source-opensuse install-in-any-folder-arch-manjaro install-in-any-folder-debian-ubuntu-raspbian install-in-any-folder-fedora-redhat-rocky-alma-centos-amazon-mageia install-in-any-folder-opensuse install-opensuse install-raspbian install-ubuntu uninstall

See all documentation πŸ“š


and that's the whole page, bestie!! this was $VERSION of the Golf docs, dated $DATE β€” page GOLF(2gg) from Development, mwah πŸ’œβœ¨ go forth and install, you absolute legend πŸŽ€

πŸ“¦ where this page comes from