Skip to content

Commit

Permalink
moved libffi to pre install
Browse files Browse the repository at this point in the history
  • Loading branch information
dorpvom committed Apr 3, 2019
1 parent 5f0f77d commit dcbceab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/install/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def install_pip(python_command):
raise InstallationError('Error in pip installation for {}:\n{}'.format(python_command, output))


def main(distribution):
def main(distribution): # pylint: disable=too-many-statements
xenial = distribution == 'xenial'

apt_install_packages('apt-transport-https')
Expand Down Expand Up @@ -62,7 +62,7 @@ def main(distribution):

# install general python dependencys
apt_install_packages('libmagic-dev')
apt_install_packages('libffi-dev', 'libfuzzy-dev')
apt_install_packages('libfuzzy-dev')
pip3_install_packages('git+https://github.com/fkie-cad/fact_helper_file.git')
pip3_install_packages('psutil')
pip3_install_packages('pytest==3.5.1', 'pytest-cov', 'pytest-pep8', 'pylint', 'python-magic', 'xmltodict', 'yara-python==3.7.0', 'appdirs')
Expand Down
14 changes: 7 additions & 7 deletions src/install/pre_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
FACTUSER=$(whoami)

CODENAME=$(lsb_release -cs)
if [ ${CODENAME} = 'tara' -o ${CODENAME} = 'tessa' ]; then
if [ "${CODENAME}" = "tara" ] || [ "${CODENAME}" = "tessa" ]; then
CODENAME=bionic
elif [ ${CODENAME} = 'sarah' -o ${CODENAME} = 'serena' -o ${CODENAME} = 'sonya' -o ${CODENAME} = 'sylvia' ]; then
elif [ "${CODENAME}" = "sarah" ] || [ "${CODENAME}" = "serena" ] || [ "${CODENAME}" = "sonya" ] || [ "${CODENAME}" = "sylvia" ]; then
CODENAME=xenial
elif [ ${CODENAME} = 'rebecca' -o ${CODENAME} = 'rafaela' -o ${CODENAME} = 'rosa' ]; then
elif [ "${CODENAME}" = "rebecca" ] || [ "${CODENAME}" = "rafaela" ] || [ "${CODENAME}" = "rosa" ]; then
CODENAME=trusty
sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get -y install "linux-image-extra-$(uname -r)" linux-image-extra-virtual
fi

echo "Install Pre-Install Requirements"
sudo apt-get -y install python3-pip git
sudo apt-get -y install python3-pip git libffi-dev

echo "Installing Docker"

Expand All @@ -37,11 +37,11 @@ sudo apt-get -y install docker-ce
sudo systemctl enable docker

# add fact-user to docker group
if [ ! $(getent group "docker") ]
if [ ! "$(getent group docker)" ]
then
sudo groupadd docker
fi
sudo usermod -aG docker $FACTUSER
sudo usermod -aG docker "$FACTUSER"

sudo -EH pip3 install --upgrade docker-compose

Expand Down

0 comments on commit dcbceab

Please sign in to comment.