[augeas-devel] Initial Ustr attempt

David Lutterkort dlutter at redhat.com
Mon Jun 16 17:21:39 UTC 2008


On Sun, 2008-06-15 at 00:51 -0400, James Antill wrote:
> On Fri, 2008-06-13 at 11:29 -0700, David Lutterkort wrote:
> > On Fri, 2008-06-13 at 13:45 -0400, James Antill wrote:
> > > This is an initial attempt to use Ustr[1] in augeas instead of "struct
> > > string" ... it's mostly the least amount of work possible to do a port,
> > > however I also converted make_regexp() from (char *) to (Ustr *) because
> > > of the way that consumed the externally allocated data.
> > 
> > My first question is: is ustr widely enough available ? Including
> > platforms like OS/X and FreeBSD ?
> 
>  Well I know it's in Fedora/debian/ubuntu ... I thought I saw something
> about a FreeBSD "port" but I can't confirm as I don't have one.
>  It's fair to say it isn't "everywhere" though ... I don't even know
> what OS/X uses for addons.

That's a good start ... I wish I would have a OS/X machine available to
play around with it there a little.

> >  If not, is it possible to pull ustr
> > into the source tree on those platforms, similar to how gnulib is being
> > pulled in ?
> 
>  Sure, it's kind of built to do that ... but differently from how you
> have gnulib setup.
>  The was I imagined people would use it is like autoconf etc. ... you
> install ustr-devel or whatever and then run "ustr-import [...] -c all"
> somewhere and you get all the files needed, then you build it how you
> want.

Is that something a maintainer does or left up to the end user ? The
nice thing about the gnulib setup is that (a) it's very easy for a
maintainer to pull in gnulib (happens when you run autogen.sh) and (b)
gnulib sources are included in the dist tarball, so that endusers don't
even need to be aware of the package using gnulib.

>  Doing a git clone of the upstream repo. and typing "make" should get
> you just the static libraries ... and I'm pretty sure you can put that
> dir. in your -I and -L path and it'll just work ... but I've not tested
> that :).
> 
> > Also, there probably needs to be some change in autoconf that checks for
> > ustr and/or a flag to pull in ustr on platforms where it's not readily
> > available.
> 
>  *nods*

I'd definitely like to get a better feel for what is needed there before
switching to ustr. (And with the summit coming up, it's definitely not
happening this week :( )

David





More information about the augeas-devel mailing list