The YumaPro server source code is very modular. Various protocol and feature options can be added or removed using make command line options.


The current list of make flags is listed in the README file in the top-level of the source distribution.

The make flags can be used to add features that are not enabled in the binary distribution.

Typically they are used to build the smallest possible image with the features needed.


 

YumaPro README

Last Updated: 2018-03-01

Pre-Build steps:

   - set netconf/src/platform/platform.profile details if needed
      - see procdefs.h in this directory for common H defs
      - CFLAGS and other make details are here

   - To build:
         > cd to the yumapro top directory
         > make [Build Variables]
         > sudo make [Buiald Variables] install

Build Variables:

  BITBAKE=1: build for Yocto/bitbake environment. Should set
  NO_LIBSSH2=1 and NO_LIBSSL=1 if building yp-shell.
  Can also use STATIC=1 and STATIC_SERVER=1.
  Do not use UCLINUX=1.

  CENTOS5=1: build for the CentOS 5.10 platform.
  Must also use LIB64=1 for x86_64 architecture.

  CLANG=1: use clang instead of gcc for the C compiler
      Default is to use gcc. Ignored if any of these flags set:
         - WINDOWS
         - CROSS_TARGET
         - PACKAGE_BUILD
         - GPROFILE

  COVERITY=1: special flag used with MAC=1 to allow Coverity
     Static Analysis tools to run on Ubuntu but build with
     MAC=1 compiler flags.  DO NOT USE THIS FLAG FOR A REAL BUILD.

  CYGWIN=1: build on windows within cygwin environment

  DEBIAN=1: set for Ubuntu packaging build; do not use
     in normal builds

  DEBIAN_MAKE=1: set for ubuntu packaing build; do not use
     in normal builds; Indicates compile phase of build

  DEBUG=1: set to add gdb symbols instead of -O2;
           does not remove the #ifdef DEBUG function
           NULL pointer checks in external functions

  DEBUG2=1: set to enable extra debugging code; DEBUG=1
            must also be set

  DESTDIR=string: set the debian target build (default NULL)

  DOC=1: debian packaging build flag to build the yuma-doc package.
      Do not use in normal builds
      This is used for yumapro 13.04, but just to build docs, not
      create a separate package for docs

  DOCDIR=/path/to/docs: set to override the default location
      to install user manuals, which is $(PREFIX)/share/doc/yumapro
      with default prefix is /usr/share/doc/yumapro

  ETC_PREFIX=string: set the top etc dir (after DESTDIR)
         default: /etc

  EVAL=1: build the evaluation version of the YumaPro software
  This is obsolete and does not work.

  EVERYTHING=1: build all optional code modules. This flag cannot be
  be used if DEBIAN=1 is set. Do not use for packaging builds
  Equivalent to:
     WITH_CALLHOME=1
     WITH_CLI=1
     WITH_CURL=1
     WITH_IETF_INTERFACES=1
     WITH_GET2_TEST=1
     WITH_HOOKS_TEST=1
     WITH_LIB_SHOW=1
     WITH_LIB_SYSTEM=1
     WITH_OPENSSL=1
     WITH_RESTCONF=1
     WITH_SIL_ERROR=1
     WITH_SUPPORT_SAVE=1
     WITH_TEMPLATES=1
     WITH_YANGMAP=1
     WITH_YCONTROL=1
     WITH_YP_HA=1
     WITH_YUMA_ARP=1
     WITH_YUMA_INTERFACES=1
     WITH_YUMA_PROC=1


  FREEBSD=1: Build for a FreeBSD platform

  FORCE_YUMA_HOME=1: use when building SIL libraries to
     link against a development version of yuma.
     The YUMA_HOME environment variable must be set,
     and it must point to the 'netconf' directory:

     Bash example using 'mybranch':

     export YUMA_HOME=/home/andy/swdev/yuma/trunk/branches/mybranch/netconf

     The yuma include (H) files from $(YUMA_HOME)/src/*
     will be used instead of the system H files in /usr/include/yuma.

     The libagt and libncx libraries from $(YUMA_HOME)/target/lib
     will be used instead of the system libraries in /usr/lib or /usr/lib64.
     The static versions (libagt.a and libncx.a) will be expected if
     STATIC=1 is also set.  Otherwise the dynamic library versions
     will be expected instead.

  FULL_STATIC=1: solve linking problems forcing static versions
      of all external libraries (used only by debian package build)
      This is deprecated and no longer used in any packaging builds

  GPROFILE=1: add -pg to the CFLAGS to enable GCC profiling
      The STATIC=1 option should also be used.

  INC_PREFIX=string: set the base string for the include path
      The default is $(DESTDIR)$(INSTALL_PREFIX)/include

  INSTALL_PREFIX=string: set the top install dir (after DESTDIR)
         default for all but MacOSX: /usr
         default for MacOSX: /usr/local

  LIB_PREFIX=string: set the base string for the library path
      for linking. The default is $(INSTALL_PREFIX)/lib

  LIB64=1: install and look for SIL libs in /usr/lib64/yuma
         instead of /usr/lib/yuma (used by FC14 64 bit)

  MAC=1: set to compile for MacOsX

  MANDIR=/path/to/man: set to override the default location
      to install man pages, which is $(PREFIX)/share/man/man.1
      with default prefix is /usr/share/man/man.1

  MCHECK=1: enables mcheck heap corruption checking
       Used when getting heap corruption errors
       Run mcheck(0) in the gdb debugger as needed

  MEMTRACE=1: enables mtrace debugging
       Used when Memory leak error message printed upon exit.
       Need to install glibc-utils for the 'mtrace' program.
       Tools will generate an 'mtracefile' in the CWD.
       Run mtrace /path/to/program ./mtracefile

  MODULES=1: used in debian build only to install just the
     YumaPro YANG Modules files for packaging

  NETCONFD_LIB=1: build the netconfd-pro server as a static
  library for uCLinux or BusyBox. The netconfd-pro code will be
  built as a static library instead of a stand-alone program.
  Default target will be /usr/lib/libyumapro_netconfd-pro.a

  NO_LIBSSH2=1: removes libssh2 code from build; used for
  uCLinux which only supports yp-shell, not yangcli-pro
  This will remove NETCONF over SSH support from the mgr and
  ycli directories. Do not use if building yangcli-pro.

  NO_LIBSSL=1: removes libssl code from build; used for
  uCLinux which only supports yp-shell, not yangcli-pro
  This will remove RESTCONF over SSL support from the mgr and
  ycli directories. Do not use if building yangcli-pro.

  NOTOASTER=1: disables building the example toaster SIL

  PACKAGE=<pkgname>: set for Ubuntu packaging build;
    do not use in normal builds.  Needed to pick the variant
    that is being installed in a dummy dir and packaged

    Values:
        CLIENT: used in debian build only to install just the
        yangcli-pro files for packaging

        COMPILER: used in debian build only to install just the
        yangdump-pro files for packaging

        DEVELOPER: used in debian build only to install all of the
        YumaPro user binaries (including developer files)

        SERVER: used in debian build only to install just the
        YumaPro Server files for packaging to run on an embedded
        system

        USER: used in debian build only to install all of the
        YumaPro user binaries (no developer files)

  PACKAGE_BUILD=1: set in debian and fedora packlaging scripts
    to indicate a packaging build is in progress.
    Replaces usage of RELEASE=N or PRODUCTION=1.

  PACKAGE_HOST_BUILD=1: set in debian and fedora packaging scripts
    by the host machine setting up the sources; Use with DOC=1.
    This sets up $HOME/Packaging/yuma_docs so the packaging
    builds have PDF and HTML files already made for the release

  PREFIX=string: set the top install dir (after DESTDIR)
    default: /usr
    !!! NO LONGER SUPPORTED OR USED !!!
    !!! SEE INSTALL_PREFIX INSTEAD !!!

  PRODUCTION=1: disables the --DDEBUG flag definition
    in compilation so all #ifdef DEBUG code is removed

  PTHREADS=1: generate a threaded version of the server. Adds
    '-pthread' to the gcc CFLAGS and links with the pthread
    library (see pthread.h).

  RELEASE=N: sets the version to ver-release instead of
    version.svnversion

  SHLIB_NCX=1: used in debian build only to install just the
    YumaPro Server libncx files for packaging
    This is not used in yumapro 13.04+.

  STATIC=1:set to use static libraries such as libncx.a,
    instead of dynamic libraries like libncx.so

  STATIC_LIBSYSTEM=static-libspec
    The relative or absolute filespec representing the
    static libyp_system library. Used when STATIC_SERVER=1/
    Used from the netconf/src/netconfd-pro directory.
    Default: ../../../libsystem/lib/libyp_system-static.a

  STATIC_SERVER=1:set to use force the server to not use
    any dynamic linked SIL code.  The -dl linker option will not be
    used and the dlopen, dlclose type of SIL invocation
    will not be used. The server will expect the STATIC_LIBSYSTEM
    library to be available when netconfd-pro is linked

  TEST=1: make will include the 'netconf/test' directory
    Run this command before make test, e.g.
    make TEST=1; make test; sudo make install
    Can be run from top or netconf directory

  NOFLOAT=1: disable use of double and tgmath.h; XPath eval
    of complex numbers will cause invalid results;
    Cygwin does not support complex.h

  PIPE_RESTRICTED=1: Affects yp-shell and yangcli-pro only;
    Causes the pipe command to be restricted to the sget, sget-config
    and show commands. Default is to allow pipe command on any command

  UCLINUX=1: build a small static server for the uCLinux OS.
  The netconfd-pro, netconf-subsystem-pro, and yp-shell programs
  are supported.  No distributed services are supported such
  as YP-HA, DB-API, SIL-SA. No ypwatcher support. Need to
  use flags: STATIC=1 STATIC_SERVER=1 NO_LIBSSH2=1 NO_LIBSSL=1

  USE_WERROR=1: use -Werror in the compile process
    Default is not to use -Werror.

  USER_SERVER_INC=string: specify some include directives (-I)
    to be added to the make command CINC variable

  USER_SERVER_LIB=string: specify some include directives (-L, -l)
    to be added to the netconfd-pro make command LIBS variable

  WEB_DIR=<dirspec>: Use the specified <dirspec> as directory
    when installing the yang-api and/or restconf programs directly
    into a WEB server sub-directory (non-production build)
    Default is '$(DESTDIR)/var/www/yang-api'.

  WEB_GROUP=<name>: Use the specified <name> as the group name
    when installing the yang-api and/or restconf programs directly
    into a WEB server sub-directory (non-production build)
    Default is 'www-data'.

  WEB_USER=<name>: Use the specified <name> as the user name
    when installing the yang-api and/or restconf programs directly
    into a WEB server sub-directory (non-production build)
    Default is 'www-data'.

  WITH_CALLHOME=1: build the IETF Call-Home reverse connection support
    Default is not to add this code.  Included with EVERYTHING=1.
    Parts of Call-home may be patented by Juniper, Inc.

  WITH_CLI=1: build the netconfd-pro server with the CLI
    protocol included. Default is not to add this code

  WITH_COAP=1: build the netconfd-pro server with the CoAP
    protocol included. Default is not to add this code

  WITH_CURL=1: build the netconfd-pro server with libcurl
    support included. Default is not to add this code

  WITH_IETF_INTERFACES=1: build the ietf-interfaces SIL code
    for the netconfd-pro server. Will also include the IF-MIB
    module if WITH_SNMP=1 is used as well. Default is to build
    this module in package builds, but not other builds

  WITH_GDB=1: add -ggdb3 to CFALGS even if DEBUG not set
    Default is not to add this flag if DEBUG=1 not set

  WITH_GET2_TEST=1: build the libget2-test library
    enable the SIL-SA library for the get2-test module
    The server must be started with --module=get2-test
    and the sil-sa-app must be run for the distributed
    operational data test to work

  WITH_HOOKS_TEST=1: build the libhooks-test directory
    to install the SIL code for the hooks-test YANG module
    Not supported if STATIC=1 is used

  WITH_LIB_SHOW=1: add the libshow directory to the build
    This builds the example libyp_show.so library.
    Normally off in regular builds and always on in package builds

  WITH_LIB_SYSTEM=1: add the libsystem directory to the build
    This builds the example yp-system directory.
    Normally off in regular builds and always on in package builds

  WITH_OPENSSL=1: build the netconfd-pro server with OpenSSL library
    support for NETCONF over TLS protocol. Default is not to add this
    code.

  WITH_RESTCONF=1: build the netconfd-pro server with the RESTCONF
    protocol included. Default is not to add this code. If set
    will load ietf-restconf-monitoring module and enable SIL
    library for this module.

  WITH_SIL_ERROR=1: add the sil-error directory to the build
    This allows SIL errors to be easily generated during
    the specified SIL callback phase for different data node types.
    Used for developer testing to force corner-case transaction
    code to be invoked.

  WITH_SUPPORT_SAVE=1: build the yumawork-support-save module
    into the server. Used to add <get-support-save> operation
    does not cause any server problems.

  WITH_SYSTEST_SIL=1: build the test SIL libraries in the systest-sil
    directory. Used for regression testing to make sure code stub SIL
    does not cause any server problems. Ignored if PACKAGE_BUILD=1
    is also used

  WITH_TEMPLATES=1: build the server code for the yumaworks-templates
    module, to support configuration templates

  WITH_YANG11=1: Allow YANG 1.1 code to be enabled; Deprecated.
    This flag MUST be set to 1 for the 16.10 release train.
    This flag MUST NOT be set for the 14.04 or 15.10 release trains.
    This flag is forced on starting in 16.10 and later.

  WITH_YANGAPI=1: build the netconfd-pro server with the YANG-API
    protocol included. Default is not to add this code
    This protocol is deprecated. Use WITH_RESTCONF instead.

  WITH_YANG_HASH=1: build the libdict module and add support
    for fast lookup via YANG Hash object dictionary (Experimental)

  WITH_YANGMAP=1: build the agt_yangmap functionality
    for YANG model mapping feature

  WITH_YCONTROL=1: build the netconfd-pro server with the YumaPro
    Control Protocol sub-system, plus ycontrol and sil-sa libraries.
    Used for distributed server instrumentation.

  WITH_YP_HA=1: build the YP-HA server redundancy protocol support
    Requires that WITH_YCONTROL=1 also be used in the make commands

  WITH_YUMA_ARP=1: build the libyuma-arp directory
    to install the SIL code for the yuma-arp YANG module

  WITH_YUMA_INTERFACES=1: build the libyuma-interfaces directory
    to install the SIL code for the yuma-interfaces YANG module

  WITH_YUMA_NACM=1: build the agt_acm_nacm code and enable it
    in the agt_acm module. This module is obsolete and not
    supported at all. Do not use!

  WITH_YUMA_PROC=1: build the libyuma-proc directory
    to install the SIL code for the yuma-proc YANG module

  XCODE=<path>: specify the location of XCode usr/include directory
  Only relevant if MAC=1 also set. Default:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
       Developer/SDKs/MacOSX10.11.sdk/usr/include

  WITH_SNMP=1: build the SNMP server protocol support.
    Requires that WITH_RESTCONF=1 also be used in the make commands


To build all default components (shared libs) on Linux, this will build
all default components and install it in the default locations:

   - make [FLAGS]
   - [sudo] make [FLAGS] install

For example, to build all default components (static libs only) on Cygwin:

   - make STATIC=1 NOFLOAT=1 CYGWIN=1
   - [sudo] make STATIC=1 CYGWIN=1 install

For example, to build all default components (shared libs) on Fedora,
64-bit:

   - make LIB64=1
   - [sudo] make LIB64=1 install

For example, to build all default components (shared libs)
except /usr/lib/yuma/libtoaster.so

   - make NOTOASTER=1
   - [sudo] make NOTOASTER=1 install

External file dependencies (for netconfd, optional):

   - /etc/services
   - /etc/ssh/sshd_config
   - /etc/apache2/sites-available/yang-api.conf
   - /etc/apache2/sites-available/restconf.conf
   - a2ensite yang-api
   - a2ensite restconf
   - a2enmod fcgi
   - SELinux config to allow access to port 830

Default Installed Programs:

   - /usr/bin/db-api-app  [WITH_DB_API]
   - /usr/bin/yangcli-pro
   - /usr/bin/yangdump-pro
   - /usr/bin/yangdump-sdk
   - /usr/bin/yangdiff-pro
   - /usr/bin/ypcontrol
   - /usr/bin/ypwatcher
   - /usr/bin/yp-shell    [WITH_CLI]
   - /usr/bin/yp-ha-app   [WITH_YP_HA]
   - /usr/sbin/netconfd-pro
   - /usr/sbin/netconf-subsystem-pro
   - /usr/sbin/restconf   [WITH_RESTCONF]
   - /usr/sbin/yang-api   [WITH_YANGAPI]

Default Installed Libraries:

  - /usr/lib/libyumapro_agt.so.MM.NN
  - /usr/lib/libyumapro_db-api.so.MM.NN   [WITH_DB_API]
  - /usr/lib/libyumapro_mgr.so.MM.NN
  - /usr/lib/libyumapro_ncx.so.MM.NN
  - /usr/lib/libyumapro_sil-sa.so.MM.NN   [WITH_SIL_SA]
  - /usr/lib/libyumapro_subsys-pro.so.MM.NN
  - /usr/lib/libyumapro_ycli.so.MM.NN
  - /usr/lib/libyumapro_ycontrol.so.MM.NN   [WITH_YCONTROL]
  - /usr/lib/yumapro/libtoaster.so
  - /usr/lib/yumapro/libyp_system.so
  - /usr/lib/yumapro/libsil-error.so

Default Installed Libraries if LIB64=1:

  - /usr/lib64/...

Default Installed Additional Files:

  /usr/share/doc/yumapro/*     -- user documentation
  /etc/yumapro/*               -- sample application config files
  /usr/share/yumapro/*         -- root of all YumaPro static data files
  /usr/share/yumapro/modules/* -- root of default installed YANG modules
  /usr/man/man1/*              -- man page files installed here

User-Specific Files

  $HOME/.yumapro               -- yangcli-pro and netconfd-pro files


YumaPro Package Variants:

# the docs are no longer split into several bundles for installation
# Instead, 1 bundle for RPM and 1 for Debian are produced
#
#  yumapro-doc
#
# BINARY PACKAGES
#
#  yumapro-sdk ==> PACKAGE=DEVELOPER
#  yumapro-pthreads ==> PACKAGE=DEVELOPER PTHREADS=1
#  yangcli-pro ==> PACKAGE=CLIENT
#
# NO LONGER USED
#
#  yumapro ==> PACKAGE=USER
#  yumapro ==> PACKAGE=SERVER
#