Rajan Walia | 15 Feb 2012 16:54
Picon

Starting to work for xapian

Hello Everyone,
  I want to do some work for the xapian project, for starting I am
thinking of working on small project like replacing getopt(), and then
later something big. I also want to apply for this years GSoC, so can
someone please guide me about the details.
Thanks,
  Rajan
Dan Colish | 15 Feb 2012 18:03
Picon
Gravatar

Re: Starting to work for xapian


On Feb 15, 2012 7:55 AM, "Rajan Walia" <rajanwalia92 <at> gmail.com> wrote:
>
> Hello Everyone,
>  I want to do some work for the xapian project, for starting I am
> thinking of working on small project like replacing getopt(), and then
> later something big. I also want to apply for this years GSoC, so can
> someone please guide me about the details.
>

Hi Rajan,

Thanks for your interest in Xapian. We have a pretty good list of ideas here, http://trac.xapian.org/wiki/ProjectIdeas. I also noticed you asked the same question in irc the other day. Its best to hang out for a while after asking. We're scattered across a few timezones so responses can be a bit slow.

--Dan

_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Rajan Walia | 16 Feb 2012 14:49
Picon

Re: Starting to work for xapian

For starting I want to work on this:
Replace getopt() with popt() or similar

A longer term aim is to be able to relicense Xapian under a more
liberal licence.

One obstacle is that we use GNU getopt, which is GPL, so it would be
helpful to replace this with something else which provides at least
the same user functionality. One option is popt, which is MIT/X
licensed and provides a slightly higher level API:

 http://directory.fsf.org/project/popt/

There are a number of other command line option parsing libraries, so
there are probably others with a suitable licence and functionality.
The simplest option in terms of requiring the least changes to the
code would be a getopt implementation which supports GNU-style long
options, if such a thing exists with a suitable licence.

So that I can get a flow with the code before GSoC. I wanted little
tips to start working on this.
Thanks,
 Rajan

On Wed, Feb 15, 2012 at 10:33 PM, Dan Colish <dcolish <at> gmail.com> wrote:
>
> On Feb 15, 2012 7:55 AM, "Rajan Walia" <rajanwalia92 <at> gmail.com> wrote:
>>
>> Hello Everyone,
>>  I want to do some work for the xapian project, for starting I am
>> thinking of working on small project like replacing getopt(), and then
>> later something big. I also want to apply for this years GSoC, so can
>> someone please guide me about the details.
>>
>
> Hi Rajan,
>
> Thanks for your interest in Xapian. We have a pretty good list of ideas
> here, http://trac.xapian.org/wiki/ProjectIdeas. I also noticed you asked the
> same question in irc the other day. Its best to hang out for a while after
> asking. We're scattered across a few timezones so responses can be a bit
> slow.
>
> --Dan

_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Charlie Hull | 16 Feb 2012 15:04

Re: Starting to work for xapian

On 16/02/2012 13:49, Rajan Walia wrote:
> For starting I want to work on this:
> Replace getopt() with popt() or similar
>
> A longer term aim is to be able to relicense Xapian under a more
> liberal licence.

I'm afraid there are considerably more things to do before this can be 
considered: see http://trac.xapian.org/wiki/FAQ/CommercialLicence for 
more details.

Cheers

Charlie
>
> One obstacle is that we use GNU getopt, which is GPL, so it would be
> helpful to replace this with something else which provides at least
> the same user functionality. One option is popt, which is MIT/X
> licensed and provides a slightly higher level API:
>
>   http://directory.fsf.org/project/popt/
>
> There are a number of other command line option parsing libraries, so
> there are probably others with a suitable licence and functionality.
> The simplest option in terms of requiring the least changes to the
> code would be a getopt implementation which supports GNU-style long
> options, if such a thing exists with a suitable licence.
>
> So that I can get a flow with the code before GSoC. I wanted little
> tips to start working on this.
> Thanks,
>   Rajan
>
> On Wed, Feb 15, 2012 at 10:33 PM, Dan Colish<dcolish <at> gmail.com>  wrote:
>>
>> On Feb 15, 2012 7:55 AM, "Rajan Walia"<rajanwalia92 <at> gmail.com>  wrote:
>>>
>>> Hello Everyone,
>>>   I want to do some work for the xapian project, for starting I am
>>> thinking of working on small project like replacing getopt(), and then
>>> later something big. I also want to apply for this years GSoC, so can
>>> someone please guide me about the details.
>>>
>>
>> Hi Rajan,
>>
>> Thanks for your interest in Xapian. We have a pretty good list of ideas
>> here, http://trac.xapian.org/wiki/ProjectIdeas. I also noticed you asked the
>> same question in irc the other day. Its best to hang out for a while after
>> asking. We're scattered across a few timezones so responses can be a bit
>> slow.
>>
>> --Dan
>
> _______________________________________________
> Xapian-devel mailing list
> Xapian-devel <at> lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-devel
Olly Betts | 16 Feb 2012 23:48
Favicon
Gravatar

Re: Starting to work for xapian

On Thu, Feb 16, 2012 at 02:04:13PM +0000, Charlie Hull wrote:
> On 16/02/2012 13:49, Rajan Walia wrote:
>> For starting I want to work on this:
>> Replace getopt() with popt() or similar
>>
>> A longer term aim is to be able to relicense Xapian under a more
>> liberal licence.
>
> I'm afraid there are considerably more things to do before this can be  
> considered: see http://trac.xapian.org/wiki/FAQ/CommercialLicence for  
> more details.

Rajan is just quoting the above from the wiki.  Just because there are
many things to do to achieve something doesn't mean it is pointless to
try to do one of them, especially as one aim of doing so is to get
familiar with the code.

>> One obstacle is that we use GNU getopt, which is GPL, so it would be
>> helpful to replace this with something else which provides at least
>> the same user functionality.

This is actually wrong though (probably my fault as I think I wrote
this) - GNU getopt is LGPL, so wouldn't block a relicensing of the
GPL code, though it would make the licensing situation clearer if
we didn't have any LGPL code involved.

>> One option is popt, which is MIT/X
>> licensed and provides a slightly higher level API:

Something with a higher level API would probably be an improvement.

OpenBSD also have a getopt_long() implementation, which seems to be
licensed suitably:

http://www.marko.homeunix.org/cgi-bin/man-cgi?getopt_long+3
ftp://ftp.irisa.fr/pub/OpenBSD/src/lib/libc/stdlib/getopt_long.c

Not sure if that uses any OpenBSD specific library features though.

Also the man page shows various differences from GNU getopt, so we
would need to carefully review that list and decide if any matter.

>> So that I can get a flow with the code before GSoC. I wanted little
>> tips to start working on this.

The first step is to check out the latest version.  I would recommend
using git for this - we found last year that the students using git had
fewer issues with it than the student using SVN:

http://xapian.org/bleeding#git

Then follow the instructions for building it there.

Once you've got that going, look at the GNU getopt API and how it is
used.  Pick a replacement to try, and read up on how to call it, and
then try changing one program to use it.

Cheers,
    Olly
Charlie Hull | 17 Feb 2012 10:00

Re: Starting to work for xapian

On 16/02/2012 22:48, Olly Betts wrote:
> On Thu, Feb 16, 2012 at 02:04:13PM +0000, Charlie Hull wrote:
>> On 16/02/2012 13:49, Rajan Walia wrote:
>>> For starting I want to work on this:
>>> Replace getopt() with popt() or similar
>>>
>>> A longer term aim is to be able to relicense Xapian under a more
>>> liberal licence.
>>
>> I'm afraid there are considerably more things to do before this can be
>> considered: see http://trac.xapian.org/wiki/FAQ/CommercialLicence for
>> more details.
>
> Rajan is just quoting the above from the wiki.  Just because there are
> many things to do to achieve something doesn't mean it is pointless to
> try to do one of them, especially as one aim of doing so is to get
> familiar with the code.

Apologies Rajan, I didn't spot this.

C
Rajan Walia | 28 Feb 2012 17:24
Picon

Re: Starting to work for xapian

So for replacing this with OpenBSD getopt are we going to statically
compile the newer one and replace the gnu getopt completely (also the
GNU C Library one) and for that I will have to change the files in
xapian-core/common/getopt.cc right?
And also currently the getopt.cc is modified by Olly for compilation
with C++, so what will be the right path for me to go ahead?
I have compiled the source from the bleeding edge git repo and have
also familiarized myself with the usage of gnu getopt by building a
sample application.

On Fri, Feb 17, 2012 at 2:30 PM, Charlie Hull <charlie <at> juggler.net> wrote:
> On 16/02/2012 22:48, Olly Betts wrote:
>>
>> On Thu, Feb 16, 2012 at 02:04:13PM +0000, Charlie Hull wrote:
>>>
>>> On 16/02/2012 13:49, Rajan Walia wrote:
>>>>
>>>> For starting I want to work on this:
>>>> Replace getopt() with popt() or similar
>>>>
>>>> A longer term aim is to be able to relicense Xapian under a more
>>>> liberal licence.
>>>
>>>
>>> I'm afraid there are considerably more things to do before this can be
>>> considered: see http://trac.xapian.org/wiki/FAQ/CommercialLicence for
>>> more details.
>>
>>
>> Rajan is just quoting the above from the wiki.  Just because there are
>> many things to do to achieve something doesn't mean it is pointless to
>> try to do one of them, especially as one aim of doing so is to get
>> familiar with the code.
>
>
> Apologies Rajan, I didn't spot this.
>
>
> C
>
> _______________________________________________
> Xapian-devel mailing list
> Xapian-devel <at> lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-devel

_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Rajan Walia | 29 Feb 2012 17:03
Picon

Re: Starting to work for xapian

Hello everyone,
   I wanted to know how do we use and test xapian as a standalone program.
Thanks,
Rajan

On Tue, Feb 28, 2012 at 9:54 PM, Rajan Walia <rajanwalia92 <at> gmail.com> wrote:
> So for replacing this with OpenBSD getopt are we going to statically
> compile the newer one and replace the gnu getopt completely (also the
> GNU C Library one) and for that I will have to change the files in
> xapian-core/common/getopt.cc right?
> And also currently the getopt.cc is modified by Olly for compilation
> with C++, so what will be the right path for me to go ahead?
> I have compiled the source from the bleeding edge git repo and have
> also familiarized myself with the usage of gnu getopt by building a
> sample application.
>
> On Fri, Feb 17, 2012 at 2:30 PM, Charlie Hull <charlie <at> juggler.net> wrote:
>> On 16/02/2012 22:48, Olly Betts wrote:
>>>
>>> On Thu, Feb 16, 2012 at 02:04:13PM +0000, Charlie Hull wrote:
>>>>
>>>> On 16/02/2012 13:49, Rajan Walia wrote:
>>>>>
>>>>> For starting I want to work on this:
>>>>> Replace getopt() with popt() or similar
>>>>>
>>>>> A longer term aim is to be able to relicense Xapian under a more
>>>>> liberal licence.
>>>>
>>>>
>>>> I'm afraid there are considerably more things to do before this can be
>>>> considered: see http://trac.xapian.org/wiki/FAQ/CommercialLicence for
>>>> more details.
>>>
>>>
>>> Rajan is just quoting the above from the wiki.  Just because there are
>>> many things to do to achieve something doesn't mean it is pointless to
>>> try to do one of them, especially as one aim of doing so is to get
>>> familiar with the code.
>>
>>
>> Apologies Rajan, I didn't spot this.
>>
>>
>> C
>>
>> _______________________________________________
>> Xapian-devel mailing list
>> Xapian-devel <at> lists.xapian.org
>> http://lists.xapian.org/mailman/listinfo/xapian-devel

_______________________________________________
Xapian-devel mailing list
Xapian-devel <at> lists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-devel
Olly Betts | 1 Mar 2012 07:43
Favicon
Gravatar

Re: Starting to work for xapian

On Tue, Feb 28, 2012 at 09:54:36PM +0530, Rajan Walia wrote:
> So for replacing this with OpenBSD getopt are we going to statically
> compile the newer one and replace the gnu getopt completely (also the
> GNU C Library one) and for that I will have to change the files in
> xapian-core/common/getopt.cc right?

There's certainly an argument for using the same implementation
everywhere, but there's also one for using the C library implementation
where there is one.  If GNU getopt and OpenBSD getopt are API
compatible, I'm not sure what is best to do.

Also, presumably on OpenBSD their getopt implementation is available in
libc, so we probably don't want to use a bundled version there.

> And also currently the getopt.cc is modified by Olly for compilation
> with C++, so what will be the right path for me to go ahead?

Currently we compile all the C code as C++ (aside from tools using
only during the build, like lemon and snowmall).  In some cases we
need to tweak the C code a little to get this to work.

The main reason we went this route was that on some platforms configure
could end up picking an incompatible C and C++ compiler combination by
default.  We were running a lot of automated builds, and trying to stop
them doing this without manual intervention was a pain.  That may not
really be an issue now, so compiling C code as C is probably OK if
that's easier.

> I have compiled the source from the bleeding edge git repo and have
> also familiarized myself with the usage of gnu getopt by building a
> sample application.

Cool.

Cheers,
    Olly
Olly Betts | 1 Mar 2012 07:47
Favicon
Gravatar

Re: Starting to work for xapian

On Wed, Feb 29, 2012 at 09:33:19PM +0530, Rajan Walia wrote:
>    I wanted to know how do we use and test xapian as a standalone program.

Running "make check" in the source tree runs a lot of automated tests.
This will exercise some command-line options on some of the tools too,
so if that passes all tests, you're probably doing well.

Cheers,
    Olly

Gmane