Skip to content

Commit

Permalink
Fix linker weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Burgess committed Jun 18, 2009
1 parent 362bc2e commit 163c70b
Show file tree
Hide file tree
Showing 25 changed files with 159 additions and 55 deletions.
5 changes: 2 additions & 3 deletions config.status
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ FGREP='/usr/bin/grep -F'
LD='/usr/x86_64-suse-linux/bin/ld -m elf_x86_64'
NM='/usr/bin/nm -B'
LN_S='ln -s'
max_cmd_len='3458764513820540925'
max_cmd_len='1572864'
ac_objext='o'
exeext=''
lt_unset='unset'
Expand Down Expand Up @@ -826,7 +826,7 @@ S["build"]="x86_64-unknown-linux-gnu"
S["target_alias"]=""
S["host_alias"]=""
S["build_alias"]=""
S["LIBS"]="-lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub"
S["LIBS"]="-lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub"
S["ECHO_T"]=""
S["ECHO_N"]="-n"
S["ECHO_C"]=""
Expand Down Expand Up @@ -926,7 +926,6 @@ D["HAVE_DLFCN_H"]=" 1"
D["LT_OBJDIR"]=" \".libs/\""
D["HAVE_GETLOADAVG"]=" 1"
D["HAVE_LIBM"]=" 1"
D["HAVE_LIBCFNOVA"]=" 1"
D["HAVE_LIBLDAP"]=" 1"
D["USE_BERKELEY_DB"]=" 1"
D["HAVE_LIBDB"]=" 1"
Expand Down
32 changes: 17 additions & 15 deletions docs/cf-agent.8
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,32 @@ is a self-healing configuration and change management based system. You can thin
as a very high level language, much higher level than Perl or shell. Asingle statement is called a promise, and compliance can result in many hundreds of filesbeing created, or the permissions of many hundreds offiles being set. The idea of .B cfengine
is to create a one or more sets of configuration files which willclassify and describe the setup of every host in a network.
.SH COMMAND LINE OPTIONS:
.IP "--help, -h"
Print the help message
.IP "--bootstrap, -B"
Bootstrap/repair a cfengine configuration from failsafe file in the current directory
.IP "--debug, -d" value
Set debugging level 0,1,2
.IP "--verbose, -v"
Output verbose information about the behaviour of the agent
.IP "--define, -D" value
Define a list of comma separated classes to be defined at the start of execution
.IP "--diagnostic, -x"
Activate internal diagnostics (developers only)
.IP "--dry-run, -n"
All talk and no action mode - make no changes, only inform of promises not kept
.IP "--version, -V"
Output the version of the software
.IP "--bootstrap, -B"
Bootstrap/repair a cfengine configuration from failsafe file in the current directory
.IP "--file, -f" value
Specify an alternative input file than the default
.IP "--define, -D" value
Define a list of comma separated classes to be defined at the start of execution
.IP "--help, -h"
Print the help message
.IP "--inform, -I"
Print basic information about changes made to the system, i.e. promises repaired
.IP "--negate, -N" value
Define a list of comma separated classes to be undefined at the start of execution
.IP "--no-lock, -K"
Ignore locking constraints during execution (ifelapsed/expireafter) if "too soon" to run
.IP "--inform, -I"
Print basic information about changes made to the system, i.e. promises repaired
.IP "--diagnostic, -x"
Activate internal diagnostics (developers only)
.IP "--policy-server, -s" value
Define the server name or IP address of the a policy server (for use with bootstrap)
.IP "--verbose, -v"
Output verbose information about the behaviour of the agent
.IP "--version, -V"
Output the version of the software
.SH AUTHOR
Mark Burgess and Cfengine AS
.SH INFORMATION
Expand All @@ -53,4 +55,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
6 changes: 4 additions & 2 deletions docs/cf-execd.8
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ Print basic information about changes made to the system, i.e. promises repaired
Activate internal diagnostics (developers only)
.IP "--no-fork, -F"
Run as a foreground processes (do not fork)
.IP "--ld-library-path, -L" value
.IP "--self-monitor, -s"
Set the internal value of LD_LIBRARY_PATH for child processes
.IP "--ld-library-path, -L" value
(null)
.SH AUTHOR
Mark Burgess and Cfengine AS
.SH INFORMATION
Expand All @@ -56,4 +58,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-key.8
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-know.8
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-monitord.8
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-promises.8
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-report.8
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-runagent.8
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion docs/cf-serverd.8
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Community info: http://www.cfengine.org
.pp
Support services: http://www.cfengine.com
.pp
This software is (C) 2008 Cfengine AS.
This software is (C) 2008- Cfengine AS.
2 changes: 1 addition & 1 deletion inputs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
LIBOBJS =
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_SELINUX =
LIPO =
Expand Down
1 change: 0 additions & 1 deletion src/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void SetEnvironment(char *s);

extern struct BodySyntax CFA_CONTROLBODY[];
extern struct Rlist *SERVERLIST;
char POLICY_SERVER[CF_BUFSIZE];

/*******************************************************************/
/* Command line options */
Expand Down
2 changes: 1 addition & 1 deletion src/cf3.defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#define CF_INBUNDLE 2

#define CF_MAX_NESTING 3
#define CF_DONEPASSES 3
#define CF_DONEPASSES 4

#define CF_TIME_SIZE 32

Expand Down
1 change: 1 addition & 0 deletions src/cf3.extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

extern struct PromiseParser P;
extern int REQUIRE_COMMENTS;
extern char POLICY_SERVER[CF_BUFSIZE];

extern struct Bundle *BUNDLES;
extern struct Body *BODIES;
Expand Down
2 changes: 2 additions & 0 deletions src/cf3globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ int LASTSEEN = true;

struct Topic *TOPIC_MAP = NULL;

char POLICY_SERVER[CF_BUFSIZE];

/*****************************************************************************/
/* Constants */
/*****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
/* #undef HAVE_LIBCFGALAXY */

/* Define to 1 if you have the `cfnova' library (-lcfnova). */
#define HAVE_LIBCFNOVA 1
/* #undef HAVE_LIBCFNOVA */

/* Define to 1 if you have the `crypto' library (-lcrypto). */
#define HAVE_LIBCRYPTO 1
Expand Down
12 changes: 12 additions & 0 deletions src/enterprise_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ void CheckAutoBootstrap()

/*****************************************************************************/

char *GetConsolePrefix()

{
#ifdef HAVE_LIBCFNOVA
return "nova>";
#else
return "cf3";
#endif
}

/*****************************************************************************/

void StartTwin(int argc,char **argv)

/* Self-monitor in case of crash or binary change */
Expand Down
6 changes: 3 additions & 3 deletions src/generic_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
extern FILE *yyin;
extern char *CFH[][2];
extern void CheckOpts(int argc,char **argv);
extern char POLICY_SERVER[CF_BUFSIZE];

/*****************************************************************************/

Expand Down Expand Up @@ -267,7 +266,8 @@ strcpy(FILE_SEPARATOR_STR,"/");
#endif

NewClass("any");
strcpy(VPREFIX,"cf3");

strcpy(VPREFIX,GetConsolePrefix());

if (VERBOSE)
{
Expand Down Expand Up @@ -1556,7 +1556,7 @@ printf(".pp\nThis software is (C) 2008- Cfengine AS.\n");
void Version(char *component)

{
printf("This is %s version %s - Free software %s%s\n",component,VERSION,CF3COPYRIGHT,VYEAR);
printf("This is %s core community version %s - %s%s\n",component,VERSION,CF3COPYRIGHT,VYEAR);
EnterpriseVersion();
}

Expand Down
4 changes: 2 additions & 2 deletions src/pipes.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ while(waitpid(pid,&status,0) < 0)
if (status == 0)
{
Debug(" -> Finished script %s ok\n",pp->promiser);
cfPS(cf_verbose,CF_CHG,"",pp,a," !! Finished script - succeeded %s\n",pp->promiser);
}
else
{
Expand All @@ -800,7 +801,6 @@ while ((wait_result = wait(&status)) != pid)
}
}


if (WIFSIGNALED(status))
{
cfPS(cf_inform,CF_INTERPT,"",pp,a," -> Finished script - interrupted %s\n",pp->promiser);
Expand All @@ -815,7 +815,7 @@ if (!WIFEXITED(status))

if (WEXITSTATUS(status) == 0)
{
Debug(" -> Finished script %s ok\n",pp->promiser);
cfPS(cf_verbose,CF_CHG,"",pp,a," !! Finished script - succeeded %s\n",pp->promiser);
}
else
{
Expand Down
1 change: 1 addition & 0 deletions src/prototypes3.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ int IsProcessType(char *s);
int IsEnterprise(void);
void EnterpriseVersion(void);
int EnterpriseExpiry(char *day,char *month,char *year);
char *GetConsolePrefix(void);
char *MailSubject(void);
void CheckAutoBootstrap(void);
void StartTwin(int argc,char **argv);
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
LIBOBJS =
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_SELINUX =
LIPO =
Expand Down
2 changes: 1 addition & 1 deletion tests/file_masters/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
LIBOBJS =
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_SELINUX =
LIPO =
Expand Down
2 changes: 1 addition & 1 deletion tests/file_operands/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
LIBOBJS =
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_SELINUX =
LIPO =
Expand Down
2 changes: 1 addition & 1 deletion tests/units/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
LIBOBJS =
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lcfnova -lm -L../pub -lcfpub
LIBS = -lacl -lnss_nis -lpthread -lgvc -lpq -lmysqlclient -lrt -lpcre -lldap -lm -L../pub -lcfpub
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIB_SELINUX =
LIPO =
Expand Down
Loading

0 comments on commit 163c70b

Please sign in to comment.