Configure and test modification for better Freebsd port
This commit is contained in:
parent
fe1aeda4f2
commit
8c18f2a86d
12 changed files with 31 additions and 29 deletions
|
|
@ -18,6 +18,9 @@
|
||||||
* non-pretty print remove all spaces, eg `{"operations":{"clixon-example:client-rpc":[null]`
|
* non-pretty print remove all spaces, eg `{"operations":{"clixon-example:client-rpc":[null]`
|
||||||
* Replaced JSON `null` with `[null]` as proper empty JSON leaf/leaf-list encoding.
|
* Replaced JSON `null` with `[null]` as proper empty JSON leaf/leaf-list encoding.
|
||||||
|
|
||||||
|
### Minor changes
|
||||||
|
* Configure and test modification for better Freebsd port
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
* Hello netconf candidate capability misspelled, mentioned in [Can clixon_netconf receive netconf packets as a server? #93](https://github.com/clicon/clixon/issues/93)
|
* Hello netconf candidate capability misspelled, mentioned in [Can clixon_netconf receive netconf packets as a server? #93](https://github.com/clicon/clixon/issues/93)
|
||||||
* [Cannot write to config using restconf example #91](https://github.com/clicon/clixon/issues/91)
|
* [Cannot write to config using restconf example #91](https://github.com/clicon/clixon/issues/91)
|
||||||
|
|
|
||||||
26
configure
vendored
26
configure
vendored
|
|
@ -686,7 +686,6 @@ infodir
|
||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
runstatedir
|
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
|
|
@ -769,7 +768,6 @@ datadir='${datarootdir}'
|
||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
runstatedir='${localstatedir}/run'
|
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||||
|
|
@ -1022,15 +1020,6 @@ do
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
|
||||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
|
||||||
| --run | --ru | --r)
|
|
||||||
ac_prev=runstatedir ;;
|
|
||||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
|
||||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
|
||||||
| --run=* | --ru=* | --r=*)
|
|
||||||
runstatedir=$ac_optarg ;;
|
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
|
@ -1168,7 +1157,7 @@ fi
|
||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir runstatedir
|
libdir localedir mandir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
|
|
@ -1321,7 +1310,6 @@ Fine tuning of the installation directories:
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
|
|
@ -1381,8 +1369,8 @@ Some influential environment variables:
|
||||||
you have headers in a nonstandard directory <include dir>
|
you have headers in a nonstandard directory <include dir>
|
||||||
CPP C preprocessor
|
CPP C preprocessor
|
||||||
YACC The `Yet Another Compiler Compiler' implementation to use.
|
YACC The `Yet Another Compiler Compiler' implementation to use.
|
||||||
Defaults to the first program found out of: `bison -y', `byacc',
|
Defaults to the first program found out of: `bison -o y.tab.c',
|
||||||
`yacc'.
|
`byacc', `yacc'.
|
||||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||||
This script will default YFLAGS to the empty string to avoid a
|
This script will default YFLAGS to the empty string to avoid a
|
||||||
default value of `-d' given by some make applications.
|
default value of `-d' given by some make applications.
|
||||||
|
|
@ -4011,7 +3999,7 @@ $as_echo "CFLAGS is $CFLAGS" >&6; }
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: INSTALLFLAGS is $INSTALLFLAGS" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: INSTALLFLAGS is $INSTALLFLAGS" >&5
|
||||||
$as_echo "INSTALLFLAGS is $INSTALLFLAGS" >&6; }
|
$as_echo "INSTALLFLAGS is $INSTALLFLAGS" >&6; }
|
||||||
|
|
||||||
for ac_prog in 'bison -y' byacc
|
for ac_prog in 'bison -o y.tab.c' byacc
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
|
|
@ -4218,11 +4206,11 @@ if test "$LEX" = ":"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get "bison" from bison -y or other string
|
# Get "bison" from bison -y or other string
|
||||||
bisonstr=$(expr substr "$YACC" 1 5)
|
if test "$YACC" = "${YACC##bison}" ; then
|
||||||
if test "$bisonstr" != "bison"; then
|
|
||||||
as_fn_error $? "CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC=\"$YACC\"" "$LINENO" 5
|
as_fn_error $? "CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC=\"$YACC\"" "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
# Hardcoded to bison -y, seems to work in all bisons?
|
||||||
|
YACC="bison -y"
|
||||||
|
|
||||||
if test "$prefix" = "NONE"; then
|
if test "$prefix" = "NONE"; then
|
||||||
prefix=${ac_default_prefix}
|
prefix=${ac_default_prefix}
|
||||||
|
|
|
||||||
|
|
@ -127,11 +127,11 @@ if test "$LEX" = ":"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get "bison" from bison -y or other string
|
# Get "bison" from bison -y or other string
|
||||||
bisonstr=$(expr substr "$YACC" 1 5)
|
if test "$YACC" = "${YACC##bison}" ; then
|
||||||
if test "$bisonstr" != "bison"; then
|
|
||||||
AC_MSG_ERROR(CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC="$YACC")
|
AC_MSG_ERROR(CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC="$YACC")
|
||||||
fi
|
fi
|
||||||
|
# Hardcoded to bison -y, seems to work in all bisons?
|
||||||
|
YACC="bison -y"
|
||||||
|
|
||||||
if test "$prefix" = "NONE"; then
|
if test "$prefix" = "NONE"; then
|
||||||
prefix=${ac_default_prefix}
|
prefix=${ac_default_prefix}
|
||||||
|
|
|
||||||
|
|
@ -121,3 +121,7 @@ After release:
|
||||||
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\""
|
CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\""
|
||||||
```
|
```
|
||||||
* Run autoconf
|
* Run autoconf
|
||||||
|
|
||||||
|
## Use of constants etc
|
||||||
|
|
||||||
|
Use MAXPATHLEN (not PATH_MAX)
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/time.h> /* gettimeofday */
|
#include <sys/time.h> /* gettimeofday */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/param.h> /* MAXPATHLEN */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CLIXON version macros
|
* CLIXON version macros
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ typedef struct clixon_plugin_api* (plginit2_t)(clicon_handle); /* Clixon plug
|
||||||
|
|
||||||
struct clixon_plugin_api{
|
struct clixon_plugin_api{
|
||||||
/*--- Common fields. ---*/
|
/*--- Common fields. ---*/
|
||||||
char ca_name[PATH_MAX]; /* Name of plugin (given by plugin) */
|
char ca_name[MAXPATHLEN]; /* Name of plugin (given by plugin) */
|
||||||
plginit2_t *ca_init; /* Clixon plugin Init (implicit) */
|
plginit2_t *ca_init; /* Clixon plugin Init (implicit) */
|
||||||
plgstart_t *ca_start; /* Plugin start */
|
plgstart_t *ca_start; /* Plugin start */
|
||||||
plgexit_t *ca_exit; /* Plugin exit */
|
plgexit_t *ca_exit; /* Plugin exit */
|
||||||
|
|
@ -235,7 +235,7 @@ typedef struct clixon_plugin_api clixon_plugin_api;
|
||||||
/* Internal plugin structure with dlopen() handle and plugin_api
|
/* Internal plugin structure with dlopen() handle and plugin_api
|
||||||
*/
|
*/
|
||||||
struct clixon_plugin{
|
struct clixon_plugin{
|
||||||
char cp_name[PATH_MAX]; /* Plugin filename. Note api ca_name is given by plugin itself */
|
char cp_name[MAXPATHLEN]; /* Plugin filename. Note api ca_name is given by plugin itself */
|
||||||
plghndl_t cp_handle; /* Handle to plugin using dlopen(3) */
|
plghndl_t cp_handle; /* Handle to plugin using dlopen(3) */
|
||||||
clixon_plugin_api cp_api;
|
clixon_plugin_api cp_api;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -509,7 +509,7 @@ rpc_callback_register(clicon_handle h,
|
||||||
char *namespace,
|
char *namespace,
|
||||||
char *name)
|
char *name)
|
||||||
{
|
{
|
||||||
rpc_callback_t *rc;
|
rpc_callback_t *rc = NULL;
|
||||||
|
|
||||||
if (name == NULL || namespace == NULL){
|
if (name == NULL || namespace == NULL){
|
||||||
clicon_err(OE_DB, EINVAL, "name or namespace NULL");
|
clicon_err(OE_DB, EINVAL, "name or namespace NULL");
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
/* cligen */
|
/* cligen */
|
||||||
#include <cligen/cligen.h>
|
#include <cligen/cligen.h>
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
/* cligen */
|
/* cligen */
|
||||||
#include <cligen/cligen.h>
|
#include <cligen/cligen.h>
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,10 @@ testname=
|
||||||
# Wait after daemons (backend/restconf) start. See mem.sh for valgrind
|
# Wait after daemons (backend/restconf) start. See mem.sh for valgrind
|
||||||
: ${RCWAIT:=2}
|
: ${RCWAIT:=2}
|
||||||
|
|
||||||
|
# www user (on linux typically www-data, freebsd www)
|
||||||
|
# could be taken from configure
|
||||||
|
: ${wwwuser:=www-data}
|
||||||
|
|
||||||
# Parse yangmodels from https://github.com/YangModels/yang
|
# Parse yangmodels from https://github.com/YangModels/yang
|
||||||
# Recommended: checkout yangmodels elsewhere in the tree and set the env
|
# Recommended: checkout yangmodels elsewhere in the tree and set the env
|
||||||
# to that
|
# to that
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ if [ $BE -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new "kill old restconf daemon"
|
new "kill old restconf daemon"
|
||||||
sudo pkill -u www-data clixon_restconf
|
sudo pkill -u $wwwuser clixon_restconf
|
||||||
|
|
||||||
new "start restconf daemon"
|
new "start restconf daemon"
|
||||||
start_restconf -f $cfg
|
start_restconf -f $cfg
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ main(int argc,
|
||||||
int c;
|
int c;
|
||||||
char *regexp = NULL;
|
char *regexp = NULL;
|
||||||
char *content = NULL;
|
char *content = NULL;
|
||||||
int ret;
|
int ret = 0;
|
||||||
int nr = 1;
|
int nr = 1;
|
||||||
int mode = 0; /* 0 is posix, 1 is libxml */
|
int mode = 0; /* 0 is posix, 1 is libxml */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue