Giter VIP home page Giter VIP logo

greenbone-env's Introduction

greenbone-env

The problem

You need to develop/test/work on different versions/branches/features of the GVM/OpenVAS modules, it's difficult to track where these versions are installed and you have to adjust all the paths manually.

Solution

Create an environment for Greenbone/OpenVAS development. This allows to use different versions of OpenVAS at the same time by seperating the install directory. Highly inspired by virtualenv for python.

Install

greenbone-env requires Python 3 to be installed.

Clone the repo and run

$ path/to/greenbone-env <path/to/env>

e.g.

$ ~/git/greenbon-env/greenbon-env ~/install/master-with-postgres

to create a new environment. At the specified environment directory greenbone-env adds an activate script which must be sourced to get into the environment.

Running

$ source path/to/env/bin/activate

e.g

$ source ~/install/master-with-postgres/bin/activate

will start the environment. Afterwards you will get a prompt like

(env: master-with-postgres) $

The environment can be terminated by running

(env: myenv) $ deactivate

Usage

activate

The activate script sets some shell environment variables and shell aliases to be able to separate installations. These environment variables will be used when configuring the GVM/OpenVAS repos. E.g. to configure openvas-scanner to be installed within the environment use the following commands:

(env: myenv) $ mkdir build
(env: myenv) $ cd build
(env: myenv) $ cmake path/to/scanner-git-repo-clone
(env: myenv) $ make
(env: myenv) $ make install

build

The build script even simplifies the steps to build a specific GVM/OpenVAS module. By passing a second parameter to greenbone-env it is possible to customize the source prefix directory where the source of the modules can be found. The third parameter sets the build prefix directory.

$ path/to/greenbone-env <path/to/env> <path/to/sources> <path/to/builds>

e.g.

$ ~/git/greenbon-env/greenbon-env ~/install/master-with-postgres ~/sources ~/builds

Afterward a module can be build with

(env: myenv) $ build <modulename>

e.g.

(env: myenv) $ build gvm

Example:

$ ~/git/greenbon-env/greenbon-env ~/install/my-env ~/sources ~/builds
$ source ~/install/my-env/bin/activate
(env: myenv) $ build gvm

will build gvm from ~/source/gvm in ~/builds/gvm and installs to ~/my-env.

greenbone-env's People

Contributors

bjoernricks avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

greenbone-env's Issues

Dependabot can't resolve your Python dependency files

Dependabot can't resolve your Python dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

ERROR: ERROR: Could not find a version that matches autohooks
No versions found
Was <redacted> reachable?
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       ResolutionFailure: ERROR: ERROR: Could not find a version that matches autohooks
[pipenv.exceptions.ResolutionFailure]:       No versions found
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches autohooks
No versions found
Was <redacted> reachable?

['Traceback (most recent call last):\n', '  File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 501, in create_spinner\n    yield sp\n', '  File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 649, in venv_resolve_deps\n    c = resolve(cmd, sp)\n', '  File "/usr/local/.pyenv/versions/2.7.17/lib/python2.7/site-packages/pipenv/utils.py", line 539, in resolve\n    sys.exit(c.return_code)\n', 'SystemExit: 1\n']

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.