MISP icon indicating copy to clipboard operation
MISP copied to clipboard

Bug: UPGRADE.ubuntu2404.sh needs to recreate venv for install Python Scripts in /var/www/MISP

Open fqvcsirt opened this issue 1 year ago • 0 comments

Actual behavior

Hi, when I executed UPGRADE.ubuntu2404 it not recreated "venv" in /var/www/MISP and it not install requirements.txt with the python version that include Ubuntu 24.04.

Please fix the script.

Thanks.

Expected behavior

Libraries installed:

imagen

Steps to reproduce

  1. Go to Administration -> Server Settings and Maintenance -> Diagnostics
  2. In Section can yo see the libraries not seem it

Version

2.5

Operating System

Ubuntu

Operating System version

24.04

PHP version

8.3

Browser

Firefox

Browser version

No response

Relevant log output

No response

Extra attachments

I found a workaround by modifying the script to install all the libraries:

Editing line 148, and add python libraries to install

declare -a packages=( supervisor jq python3 python3-pip python3-virtualenv );

(Before line 285)

print_status "Setting up Python environment for MISP (Re-create)"

# Remove previously venv
if [ -d "${MISP_PATH}/venv" ]; then
    rm -rf ${MISP_PATH}/venv
fi

# Create a python3 virtualenv again
sudo -u ${APACHE_USER} virtualenv -p python3 ${MISP_PATH}/venv &>> $logfile
error_check "Python virtualenv creation"

cd ${MISP_PATH}
. ./venv/bin/activate &>> $logfile
error_check "Python virtualenv activation"

# install python dependencies
${MISP_PATH}/venv/bin/pip install -r ${MISP_PATH}/requirements.txt  &>> $logfile
error_check "Python dependencies installation"

chown -R ${APACHE_USER}:${APACHE_USER} ${MISP_PATH}/venv

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

fqvcsirt avatar Oct 10 '24 15:10 fqvcsirt