libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Compilation and Installation

Cloning git repository

As written on libnetconf's Google Code page, the repository can be cloned using the following command:

$ git clone https://code.google.com/p/libnetconf/
Note
In case that git fails to clone the repository make sure your git is at least version 1.6.6.

Requirements

Before compiling the source code make sure that your system provides the following libraries or applications. Some of them are optional or can be avoided in cost of missing of some feature - see the notes for the specific item. All requirements are checked by the configure script.

  • compiler (gcc, clang, ...) and standard headers
  • pkg-config
  • libpthreads
  • libxml2 (including headers from the devel package)
  • libxslt (including headers from the devel package)
  • libssh (including headers from the devel package)
    • can be omitted by --disable-libssh option, but in that case a standalone SSH client (usually from the openSSH) is required. For more details, see --disable-libssh description.
  • libcurl (including headers from the devel package)
    • can be omitted by --disable-url option, but in that case the NETCONF :url capability is disabled.
  • libopenssl (including headers from the devel package)
    • required only when the TLS transport is enabled by --enable-tls option. More information about the TLS transport can be found in Transport Protocol section.
  • doxygen
    • optional, required to (re)build documentation (make doc)
  • rpmbuild
    • optional, required to build RPM package (make rpm)

Compilation

libnetconf uses standard GNU Autotools toolchain. To compile and install libnetconf you have to go through the following three steps:

$ ./configure
$ make
# make install

This way the library will be installed in /usr/local/lib/ (or lib64) and /usr/local/include/ respectively.

Configure Options

configure script supports the following options. The full list of the accepted options can be shown by --help option.

  • --disable-libssh
    • Remove dependency on the libssh library. By default, the libssh library is used by the client side functions to create SSH connection to a remote host. If the usage of the libssh is disabled, libnetconf will use a standalone ssh(1) client located in a system path. ssh(1) client is, for example, part of the OpenSSH. This option has no effect for server-side functionality.
  • --disable-notifications
    • Remove support for the NETCONF Notifications.
  • --disable-url
    • Remove support for NETCONF :url capability. cURL dependency is also removed.
  • --disable-validation
    • Remove support for NETCONF :validate capability.
  • --disable-yang-schemas
    • Remove support for YANG data model format for <get-schema> opration. With this option, only YIN format is available.
  • --enable-debug
    • Add debugging information for a debugger.
  • --enable-tls
    • Enable experimental support for TLS transport. More information about the TLS transport can be found in Transport Protocol section.
  • --with-pyapi[=path_to_python3]
    • Build also the libnetconf Python API. This requires python3, so if it is installed in some non-standard location, specify the complete path to the binary. For more information about Python API, see a separated doxygen documentation accessible from the project main page.
  • --with-nacm-recovery-uid=<uid>
  • --with-workingdir=<path>
    • Change location of libnetconf's working directory. Default path is /var/lib/libnetconf/. Note that applications using libnetconf should have permissions to read/write to this path, with --with-suid and --with-sgid this is set automatically.
  • --with-suid=<user>
    • Limit usage of libnetconf to the specific user. With this option, libnetconf creates shared files and other resources with access rights limited to the specified user. This option can be freely combined with the --with-sgid option. If neither --with-suid nor --with-sgid option is specified, full access rights for all users are granted.
  • --with-sgid=<group>
    • Limit usage of libnetconf to the specific group. With this option, libnetconf creates shared files and other resources with access rights limited to the specified group. This option can be freely combined with the --with-suid option. If neither --with-suid nor --with-sgid option is specified, full access rights for all users are granted.
Note
If the library is built with --with-suid or --with-sgid options, the proper suid or/and sgid bit should be set to the server-side application binaries that use the libnetconf library.