On 3/27/2009 3:16 AM, Matt Taggart wrote:
>> First, I must say the installation and initial setup have improved,
>> specially by splitting post-install configuration. Thanks for that.
>
> No problem, let me know if there are still additional abstractions you need
> as we've only tested on Linux so far.
>
>> I still had to make changes for FreeBSD, like specific to its PostgreSQL
>> installation. I'll send patches for the ones that are worth integrating
>> (which possibly apply to other platforms).
>
> Yeah we're seeing some similar issues from Linux distro to Linux
distro, so
> maybe your changes will help them too.
>
Maybe these could be useful (if they are already done but didn't work
for me, I'll try to see what's happening).
- Create the log directory if does not exist (by default
/var/log/fossology/), either at install time or by the scheduler when
executed. Because if it's not there it currently fails to start.
- Set fossy:fossy (or root:fossy as docs say) permissions in
configuration files from fo-postinstall (it has similar sections).
- When scheduler runs it tries to open/create a /fossology-scheduler
file for shared memory (and doesn't have permissions after changing UID
to fossy), and I had to change it to something else like /var/tmp/...
(or in some fossology directory)
- In FreeBSD the PostgreSQL user is "pgsql" instead of "postgres". So I
changed the "su postgres" lines into "su pgsql". The problem came later:
it tried to open the non-existent "pgsql" database (which is still
called "postgres" as default), so it needs a parameter or setting
PGDATABASE=postgres in environment. (this change is very FreeBSD
specific, and it's OK to leave it in the port only)
- Documentation (INSTALL file) instructs to manually set up the database
(psql < ...) but it doesn't mention the new automatic setup "dbcreate"
and "dbcheck".
But the real problem is below (the scheduler still fails).
>> agent=fosscp_agent host=localhost |
>> /usr/local/lib/fossology/agents/engine-shell fosscp_agent
>> '/usr/local/bin/cp2foss {*}'
>
> I think there is supposed to be a % before the { above.
> The section in mkschedconf.c that generates that line is
>
> /** fosscp **/
> fprintf(Fout,"agent=fosscp_agent %s| ",CmdHost);
> memset(Cmd,'\0',sizeof(Cmd));
> snprintf(Cmd,sizeof(Cmd)-1,Rcmd,"%s/engine-shell fosscp_agent '%s/cp2foss
> %{*}'");
> fprintf(Fout,Cmd,AGENTDIR,BINDIR);
> fprintf(Fout,"\n");
>
>
> Maybe the freebsd snprintf is stealing the %? Do you get any
> warnings/errors when building that file? Let me know if you come up with
> syntax that's more portable.
>
> Thanks,
>
I replaced it with "%%" as printf(3) manpage suggests (I don't know how
widely adopted is it), and produces the correct results now.
But the scheduler fails to start exactly with the same error:
2009-03-27 18:07:54 scheduler[25720] : FATAL: Agent type 'w' not in
Scheduler.conf.
2009-03-27 18:07:54 scheduler[25720] : FATAL: Inconsistent agent(s)
detected.
Regards,
Ale
_______________________________________________
fossology mailing list
[email protected]
http://fossology.org/mailman/listinfo/fossology