Package: cfengine3
Version: 3.0.5+dfsg-1
Severity: important

I tried to follow chapter 3 of the Cfengine3 Concept Guide
(<http://www.cfengine.org/manuals/cf3-tutorial.html#First-promises>) and
immediately ran into trouble:

    $ rm -rf ~/.cfagent
    $ /usr/sbin/cf-key 
    Fatal cfengine error:  !!! No access to workspace

Wow. This is quite a disappointing first impression from a new user's
perspective. :-)

The reason turns out to be a missing input directory, as suggested in
<http://serverfault.com/questions/174549/cfengine-no-access-to-workspace>:

    $ find ~/.cfagent
    /home/bengen/.cfagent
    /home/bengen/.cfagent/reports
    /home/bengen/.cfagent/outputs
    /home/bengen/.cfagent/lastseen
    /home/bengen/.cfagent/bin

Creating this directory by hand fixes the situation for me:

    $ mkdir ~/.cfagent/inputs
    $ /usr/sbin/cf-key 
    Making a key pair for cfengine, please wait, this could take a minute...

But why has the input directory not been created along with those other
directories? I noticed that this behavior is introduced by the Debian
package because the following two lines in src/generic_agent.c have been
commented out by debian/patches/fhs-compliance:

    
snprintf(vbuff,CF_BUFSIZE,"%s%cinputs%cupdate.conf",CFWORKDIR,FILE_SEPARATOR,FILE_SEPARATOR);
    MakeParentDirectory(vbuff,force);

I believe I understand the intention for disabling this particular
MakeParentDirectory() call: The global 'input' directory is supposed to
be a symlink to /etc/cfengine3, not a directory. But I don't see what
actual problem is being solved here. At the first time a (privileged)
user can run cf-* commands, the package will already have created that
symlink. And as far as I have observed,the MakeParentDirectory() code
doesn't do any harm if that symlink already exists.

Please consider removing this part of the fhs-compliance patch.

Thanks,
-Hilko

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cfengine3 depends on:
ii  libc6                         2.11.2-6   Embedded GNU C Library: Shared lib
ii  libdb4.8                      4.8.30-2   Berkeley v4.8 Database Libraries [
ii  libpcre3                      8.02-1.1   Perl 5 Compatible Regular Expressi
ii  libssl0.9.8                   0.9.8o-2   SSL shared libraries

cfengine3 recommends no packages.

cfengine3 suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to