Re: [Setup-tool-hackers] FreeBSD patches



On Sunday 20 May 2001 01:46, you wrote:
<snip>
> >  - The warning messages when cracklib isn't found cause configure to bail
> >    out with '1: invalid FD'. Haven't been able to figure out why.
>
> As long as the users tool builds without cracklib and doesn't depend on it,
> i.e. builds and works as expected with crack features disabled, I don't see
> a problem with this. We need to keep the warning messages, though, to alert
> packagers so they ship packages with cracklib enabled where possible.

My problem was not building with or without cracklib per se, but the fact 
that configure would give me a shell error on not finding cracklib. I haven't 
tried to build to tools themselves, only the backends.

> The best fix would be to allow configure.in to find the crack features on
> FreeBSD too. I guess the normal way to do this can be gleaned from existing
> FreeBSD projects using cracklib and autoconf.

FreeBSD itself doesn't come with any crack features. I believe one can 
install cracklib from ports, and this should work (though I haven't tried).

<snip>
> >  --- backends/shares-conf.in
> >
> >  - Add FreeBSD to the $platforms, $platmap, and $filemap. There is no
> > mtab on FreeBSD though, so likely this stuff won't work until I find a
> > way to fix this.
>
> The functions that do this are in the library file filesys.pl.in. Of
> particular interest in this case is the xst_filesys_mtab_parse() function,
> which needs to be replaced for FreeBSD.
>
> Unfortunately I don't have a FreeBSD installation to test it on yet, but I
> think we can make a function, say, xst_filesys_mount_parse() that parses
> the output from running "mount", or even better make an
> xst_filesys_get_mntinfo() using direct calls to the kernel's getmntinfo()
> from Perl (I don't know if this is possible, but Perl does support similar
> calls).

Okay, I've done some research on this. Running 'mount -p' outputs something 
like the following:
--
/dev/ad0s3a     /       ufs rw  1 1
/dev/ad0s3f     /usr    ufs rw  2 2
--
I think this is enough information (exactly as much as is in fstab), so I'll 
try to write a routine which parses this.

I've already tried to write a routine which calls 'getfsstat' directly, but 
my Perl wasn't anywhere near as good to pull that off. I also suspected that 
parsing that code on any system other than FreeBSD would cause an error, so I 
really thing that the above solution is the way to go.

<snip>
> We're getting FreeBSD installed on our test box sometime in the coming
> week, so we can be more helpful towards this end :)

Great! :)

<snip>
> I think the patch is good, but we need to invest more work in FreeBSD
> porting (at least resolve the known issues) before it can be added to the
> lists of supported platforms in the backends. What happens when you try to
> set the configuration on FreeBSD now?

Bad Things(tm). Only editing SMB exports would theoretically work. But the 
main purpose of the patch was to get things started on FreeBSD, and to get to 
the details of every config system later.

Expect some more patches later this week.

-- 
Theo van Klaveren <t.vanklaveren@student.utwente.nl>
http://home.student.utwente.nl/t.vanklaveren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]