-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Easy install shell script #176
base: dev
Are you sure you want to change the base?
Conversation
Awesome! thank you for this pull request, we'll need some testing, and to improve a few things, but it's a great start |
Hi Team, I have add distro integration (debian/ubuntu/fedora/alpine). |
A few comments (cc @ShutdownRepo) :
|
iirc, source install is better as it gives more control to the wrapper. Especially for updating itself.
Not sure, wasn't it a new requirement made in Debian? @Dramelac do you know?
Indeed
Hmm not sure. This is supposed to be an install script, so it makes sense to run |
I tried on a debian with
We can use root@3197674ac39a:/# python3 -m pip install exegol --break-system-packages
Collecting exegol
Downloading Exegol-4.2.5.tar.gz (2.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 23.0 MB/s eta 0:00:00 |
The goal is to install the wrapper and not necessarily the image ? Both are ok, you choose
We must then choose an installation folder and configure a venv for exegol |
@QU35T-code |
No it's OK to use venv. As long as the
Not sure to understand the question, but the default python should be ok with a venv if needed (and the latest python version is the better)
Let's keep
That's a trick one! When using source you have more control to switch on dev branch and the wrapper can be self-updated but on the other hand, when using pip for an upgrade, the requirements will be updated too with the wrapper. |
Hi, I have add venv for install Exegol. |
A pipx install would probably better wouldn't it? What do you think @QU35T-code ? |
Sure, you right, pipx can be better. We won't have any problems with the venv in this case.
|
It is possible to add a check on the $OSTYPE variable for installation on macOS. if [[ "$OSTYPE" == "darwin"* ]]; then
if command -v brew >/dev/null 2>&1; then
PACKAGE_MANAGER="brew"
PACKAGE_MANAGER_INSTALL="brew install -y"
else
echo "Homebrew isn't install."
echo "For install Exegol, pls refert to: https://exegol.readthedocs.io/en/latest/getting-started/install.html"
exit 1
fi
fi |
Agreed |
Hi @VincentSan I have add MacOs install with brew. |
Hi @0xlildoudou I attempted to run the script, but it failed on macOS due to dependency issues. I found a solution, but it's not compatible with the 'sh' shell. I'm looking for a solution that works with 'sh'. #!/bin/bash
name_dependencies=("venv" "git" "pip" "docker" "sudo" "python3")
command_dependencies=("python3 -m venv -h" "git --version" "python3 -m pip --version" "docker --version" "sudo -h" "python3 --version")
name_dependencies_ko=()
for ((i=0; i<${#name_dependencies[@]}; i++)); do
echo "Check dependencie ${name_dependencies[i]}: ${command_dependencies[i]}"
${command_dependencies[i]} &> /dev/null
if [ $? -eq 0 ]; then
echo "Done."
else
echo "KO."
name_dependencies_ko+=("${name_dependencies[i]}")
fi
done
# Display missing dependencies
if [ ${#name_dependencies_ko[@]} -ne 0 ]; then
echo "Missing dependencies :"
for ((i=0; i<${#name_dependencies_ko[@]}; i++)); do
echo "${name_dependencies_ko[i]}"
done
else
echo "All dependencies has been install."
fi This solution is universal and can be used on any operating system (without Windows). It does not require a package manager. |
Can you send me the dependencies error for MacOS ? Thanks |
Yes, I use verbose option.
|
I have add python dependencies check |
Test new commitWith the new changes, I no longer meet the condition below. if [ -f "$lsb_dist" ]; then
if command -v brew >/dev/null 2>&1; then
PACKAGE_MANAGER="brew"
PACKAGE_MANAGER_INSTALL="brew install -y"
else
echo "Homebrew isn't install."
echo "For install Exegol, pls refert to: https://exegol.readthedocs.io/en/latest/getting-started/install.html"
exit 1
fi
else
... If you replace The dependency check is carried out without any issues. Suggestion for improvementInstead of checking if sudo is available, we can check if the user has executed the installation script with root privileges : check_root(){
if [ "$(id -u)" -ne 0 ]; then
echo "❌ - To execute this script, root privileges are needed. Try with 'sudo'."
exit 1
else
echo "✅ - Run with root privileges."
fi
} I'm not sure if it's necessary to check Docker permissions in the installation script, given that they will be automatically handled by Exegol. This would simplify the script. |
@ShutdownRepo @QU35T-code whats next for this MR ? |
I'm not the best person for this PR, I'll let @Dramelac and @ShutdownRepo follow this PR ! |
Hi,
I have made a simply script for install Exegol wrapper like "curl -s https://github.com/TheProgs/Exegol/install.sh | sh"
It's work for GNU/Linux Debian distro but i continue for Fedora / Alpine and Debian-Like (ex: Ubuntu)
It is created in shell script and not in bash because the shell is available by default on all GNU/Linux systems.
a debug mode is available with the -v|--verbose argument
Please note:
In its current state, it is not completely immutable and is not insensitive to breakage.
For example, if a package is not installed, the script will not install it but will say which package is missing. Similarly, it cannot be restarted cleanly in the event of a problem.