Skip to content

Commit 4c64012

Browse files
Installer script fixes (#2585)
1 parent b467cfe commit 4c64012

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

extra/yara_installer.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ if [ ! -d /tmp/yara-python ]; then
88
git clone --recursive https://github.com/VirusTotal/yara-python /tmp/yara-python
99
fi
1010

11-
cd /tmp/yara-python
11+
/etc/poetry/bin/poetry --directory /opt/CAPEv2 run bash -c "cd /tmp/yara-python && python setup.py build --enable-cuckoo --enable-magic --enable-profiling"
12+
/etc/poetry/bin/poetry --directory /opt/CAPEv2 run pip install /tmp/yara-python
1213

13-
/etc/poetry/bin/poetry --directory /opt/CAPEv2 run python setup.py build --enable-cuckoo --enable-magic --enable-profiling
14-
/etc/poetry/bin/poetry --directory /opt/CAPEv2 run pip install .
15-
16-
cd ..
17-
18-
if [ -d yara-python ]; then
19-
rm -rf yara-python
20-
fi
14+
if [ -d /tmp/yara-python ]; then
15+
rm -rf /tmp/yara-python
16+
fi

installer/cape2.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ function install_yara() {
797797
ldconfig
798798

799799
# Run yara installer script
800-
sudo -u ${USER} /etc/poetry/bin/poetry --directory /opt/CAPEv2 run /opt/CAPEv2/extra/yara_installer.sh
800+
sudo -u ${USER} /etc/poetry/bin/poetry --directory /opt/CAPEv2 run extra/yara_installer.sh
801801

802802
if [ -d yara-python ]; then
803803
sudo rm -rf yara-python
@@ -944,7 +944,7 @@ function install_capa() {
944944
cd capa || return
945945
git pull
946946
git submodule update --init rules
947-
/etc/poetry/bin/poetry --directory /opt/CAPEv2/ run pip install .
947+
/etc/poetry/bin/poetry --directory /opt/CAPEv2/ run pip install /tmp/capa
948948
cd /opt/CAPEv2
949949
if [ -d /tmp/capa ]; then
950950
sudo rm -rf /tmp/capa

modules/machinery/az.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ def _get_relevant_machines(self, tag):
12151215
"""
12161216
# The number of relevant machines are those from the list of locked and unlocked machines
12171217
# that have the correct tag in their name
1218-
return self.db.list_machines(tags=[tag])
1218+
return [machine for machine in self.db.list_machines(tags=[tag])]
12191219

12201220
@staticmethod
12211221
def _wait_for_concurrent_operations_to_complete(timeout=AZURE_TIMEOUT):

0 commit comments

Comments
 (0)