OpenVAS Change Request #38: Reorganize OpenVAS libraries
Status: Voted +6. Done in subversion trunk (past 2.0) since 2009-09-01.Purpose
Consolidate all libraries of the OpenVAS tool chain.
To prevent code redundancies (duplication of same code in various modules).
Simplified release management and installation.
References
This change was discussed in a session at the OpenVAS DevCon-2 in July 2009.
Rationale
A survey on libraries spread over OpenVAS toolchain shows:
- openvas-libraries:libopenvas
- openvas-libraries:libopenvas_hg
- openvas-client:libnessus (static, modified copy of libopenvas)
- openvas-libnasl:libopenvasnasl
- openvas-manager:libomp (static)
- openvas-manager:libotp (static)
- openvas-manager:libmanage (static)
- openvas-manager:libstring (static)
- openvas-manager:libfile (static)
- openvas-manager:libovas-mngr-comm (static)
- openvas-manager:libcommon (static)
Modules that will use the consolidated form of openvas-libraries would be:
- openvas-client
- openvas-server
- openvas-manager
- openvas-config-manager
- arbitrary individually crafted clients
From the maintenance perspective (technically as well as in terms of copyright and license), a consolidation will less trouble new developers. Clean rules on where to place API elements will provide a guide to more easily involve into the developments.
Apart from that, source code transparency is improved as well.
Effects
No effects for users, because these are internal changes.
Packagers need to adjust packaging. It does make sense to produce separate binary packages, each containing a library. That way, the clients need only to require the library packages of relevance.
In fact, this means to retire the module "openvas-libnasl". All of its contents would move into "openvas-libraries".
A side effect is that the glib minimum requirement needs to be raised to 2.12 for some of the libraries from openvas-manager.
Design and Implementation
Central idea is to collect any library in openvas-libraries module. This essentially means also to migrate libopenvasnasl into this module and to retire the module openvas-libnasl.
The new set of libraries inside openvas-libraries should be as follows:
- openvas-libraries/nasl: The nasl library (contents of openvas-libnasl/nasl)
- openvas-libraries/base: openvas-libraries/libopenvascommon/ and all other basic API methods that are of general use but do not involve other dependencies than glib. libfile should be integrated here as well.
- openvas-libraries/misc: All old stuff from openvas-libraries/libopenvas which is not being re-inmplemented or obsoleted over time. Eventually this library should be empty and then removed.
- openvas-libraries/hg: openvas-libraries/libopenvas_hg, remains as is until consolidated into other library or resolved in another way.
- openvas-libraries/net: Low-level networking functions that require dependencies to low level system libraries.
- openvas-libraries/omp: API for OMP clients (libcommon from openvas-manager as a start. Needs to be extended with full API).
- openvas-libraries/otp: API for OTP clients. Empty initially, with the idea of extending to a full API in the future.
The other libraries of openvas-manager (libomp, libotp, libmanage, libopenvas-mngr-comm and libstring) remain with that module as long as they are not required by any other module. libomp and libotp need to be renamed as they clash with openvas-libraries.
The contents of all libraries except for nasl, misc and hg are entirely new developments with clean GPL v2+ licensing.
It is still to decide whether to move towards cmake and disregard the current autotools approach for configuration of source code package. As autotools and cmake do not necessarily conflict when used in the same module, the new libraries will be managed via cmake. Eventually the whole module can get rid of the autotools.
Since there are going to be a lot of changes and the ABI might not be backwards compatible it should be ensured there is a SONAME bump when the libraries change so that people don't try to mix older versions of openvas-{client,server} with the new libraries provided by openvas-libraries.
History
- 2009-09-03 Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>:
Setting status to "done". - 2009-08-12 Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>:
Added voting result and set to "in progress". - 2009-08-03 Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>:
Added hints from Javier about SONAME. - 2009-07-31 Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>:
Some little clarifications, especially more effects. - 2009-07-16 Matthew Mundell <matthew.mundell@intevation.de>:
Adjust actions on libomp and libotp. - 2009-07-14 Jan-Oliver Wagner <jan-oliver.wagner@intevation.de>:
Initial text. This is a result of a session at OpenVAS DevCon2.
English |
