-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add Makefile for building complete wheel (#952)
- Loading branch information
Showing
4 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,3 +171,38 @@ It's also recommended to perform all installation activities using ``root`` user | |
Add ``--no-report`` if you don't want ``draksetup`` to send `basic usage report <https://github.com/CERT-Polska/drakvuf-sandbox/blob/master/USAGE_STATISTICS.md>`_. | ||
16. Test your installation by navigating to the web interface ( http://localhost:6300/ ) and uploading some samples. The default analysis time is 10 minutes. | ||
|
||
Building from sources | ||
===================== | ||
|
||
1. Clone Drakvuf Sandbox repository including submodules | ||
|
||
.. code-block:: console | ||
$ git clone --recursive [email protected]:CERT-Polska/drakvuf-sandbox.git | ||
2. Build and install Drakvuf from sources using `instructions from the official Drakvuf documentation <https://drakvuf.com/>`_. It's recommended to use version pinned to the submodule. | ||
|
||
3. Install DRAKVUF Sandbox system dependencies | ||
|
||
.. code-block:: console | ||
$ apt install tcpdump genisoimage qemu-utils bridge-utils dnsmasq libmagic1 | ||
4. Install additional Web build dependencies | ||
|
||
.. code-block:: console | ||
$ apt install nodejs npm | ||
5. Make and install DRAKVUF Sandbox Python wheel. It's highly recommended to use `virtualenv <https://docs.python.org/3/library/venv.html>`_. | ||
|
||
.. code-block:: console | ||
$ python3 -m venv venv | ||
$ source venv/bin/activate | ||
$ cd drakrun | ||
$ make | ||
$ make install | ||
6. Follow the :ref:`Basic installation` starting from the Step 2. Redis, MinIO and Drakvuf Sandbox configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build/ | ||
drakrun.egg-info/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
WEB_SOURCE_FILES := $(wildcard *.js *.css) | ||
PYTHON_SOURCE_FILES := $( wildcard *.py ) drakrun/data pyproject.toml MANIFEST.in requirements.txt setup.py | ||
|
||
.PHONY: all | ||
all: dist/*.whl | ||
|
||
dist/*.whl: $(PYTHON_SOURCE_FILES) drakrun/web/frontend/build drakrun/tools/get-explorer-pid drakrun/tools/test-altp2m | ||
rm -f dist/*.whl | ||
ifndef DIST | ||
DRAKRUN_VERSION_TAG=$(shell git rev-parse --short HEAD) python3 setup.py bdist_wheel | ||
else | ||
python3 setup.py bdist_wheel | ||
endif | ||
|
||
drakrun/web/frontend/build: drakrun/web/frontend/node_modules $(WEB_SOURCE_FILES) drakrun/web/frontend/public | ||
cd drakrun/web/frontend ; npm run build | ||
|
||
drakrun/web/frontend/node_modules: drakrun/web/frontend/package.json drakrun/web/frontend/package-lock.json | ||
cd drakrun/web/frontend ; npm ci | ||
|
||
drakrun/tools/get-explorer-pid: drakrun/tools/get-explorer-pid.c | ||
gcc $< -o $@ -lvmi `pkg-config --cflags --libs glib-2.0` | ||
|
||
drakrun/tools/test-altp2m: drakrun/tools/test-altp2m.c | ||
gcc $< -o $@ -lvmi `pkg-config --cflags --libs glib-2.0` | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf dist drakvuf_sandbox.egg-info build | ||
rm -rf drakrun/web/frontend/build drakrun/web/frontend/node_modules | ||
rm -f drakrun/tools/get-explorer-pid drakrun/tools/test-altp2m | ||
|
||
.PHONY: install | ||
install: all | ||
pip install dist/*.whl |