[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report CFWORKDIR vs WORKDIR - 2.1.11
From: |
David E. Nelson |
Subject: |
Re: Bug report CFWORKDIR vs WORKDIR - 2.1.11 |
Date: |
Thu, 18 Nov 2004 09:44:05 -0600 (CST) |
Hi Mark,
Sure, no problem.
The cfengine-2.1.11 source d/l has a md5sum of:
6d6bd644e4e8b4374d4eb9ed5bd154a2 cfengine-2.1.11.tar.gz
which matches the d/l site.
The build machine in this instance is a RedHat AS2.1.
This is my procedure for building:
### Unset CFINPUTS env var - I've had to set this to make things work but when
I first compiled cfengine it wasn't set.
### Untar src
### cp 'solaris' and 'redhat' directories from my home dir which contain the
static libs and headers for BerkeleyDB into the root of the cfengine src. We
have conflicting versions of BerkeleyDB so I prefer to compile these statically
to avoid any issues.
solaris/:
include lib
solaris/include:
cxx_common.h cxx_except.h db.h
solaris/lib:
libdb.a
redhat/:
include lib
redhat/include:
db_185.h db_cxx.h db.h
redhat/lib:
libdb-3.3.a libdb-3.3.la libdb.a libdb_cxx-3.3.a libdb_cxx-3.3.la
### ./configure --prefix=/usr/local/pkgs/cfengine-2.1.10
--with-berkeleydb=/home/dnelson/ftp/cfengine-2.1.11/redhat
### Output from ./configure ... above:
config.status: creating contrib/vicf
config.status: creating src/conf.h
config.status: executing depfiles commands
### Line #92 of src/conf.h specifies:
#define WORKDIR "/var/cfengine"
### From the src dir: `grep WORKDIR * | grep -v CFWORKDIR`
cfagent.c: snprintf(file,CF_BUFSIZE,"%s/state/allclasses",WORKDIR);
conf.h:#define WORKDIR "/var/cfengine" conf.h.in:#undef WORKDIR
### From the src dir: `grep CFWORKDIR * | grep define` to see if somewhere
'CFWORKDIR' was defined the same as 'WORKDIR' - no files
### Line #589 from src/cfrun.c (actually many src files refer to 'CFWORKDIR'
but I'll focus on cfrun.c).
snprintf(filename, CF_BUFSIZE, "%s/inputs/", CFWORKDIR);
### Build the src's
### As 'root', execute 'cfrun -v':
# ./cfrun -v
Unable to open /inputs/cfrun.hosts
GNU Cfengine server daemon -
2.1.11
Free Software Foundation 1994-
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway
### If I edit 'src/conf.h' and add '#define CFWORKDIR WORKDIR' such that lines
#92 and #93 read:
#define WORKDIR "/var/cfengine"
#define CFWORKDIR WORKDIR
### Recompile and execute 'cfrun -v' as root now it's looking in the correct
place. BTW, the system I'm running this on is not the cfengine master so there
isn't a cfrun.hosts file.
# ./cfrun -v
Unable to open /var/cfengine/inputs/cfrun.hosts
GNU Cfengine server daemon -
2.1.10
Free Software Foundation 1994-
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway
### From cfengine-2.1.10 src/cfrun.c, I see that 'WORKDIR' was using instead of
'CFWORKDIR'.
Thanks,
/\/elson
On Thu, 18 Nov 2004, Mark Burgess wrote:
This does not affect me. Can you provide more information?
M
On Wed, Nov 17, 2004 at 03:38:13PM -0600, David E. Nelson wrote:
Hi CFEngine Team,
Just d/l and compiled 2.1.11 on Solaris 8 and ran into the following
problems:
- cfrun seems to look in /inputs rather than /var/cfengine/inputs; If I
define the env var 'CFINPUTS=/var/cfengine/inputs' it works as advertised.
I didn't have this problem under 2.1.10.
In conf.h I found "#define WORKDIR "/var/cfengine"" but cfrun.c uses
'CFWORKDIR', instead.
It also looks like a global search and replace for WORKDIR was done so I'd
suspect that other binaries are affected.
Regards,
/\/elson
--
~~ ** ~~ If you didn't learn anything when you broke it the 1st ~~ ** ~~
time, then break it again.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine
--
~~ ** ~~ If you didn't learn anything when you broke it the 1st ~~ ** ~~
time, then break it again.