On Mon, Jan 09, 2012 at 07:09:12PM +0100, jjacky wrote:
> Hey there,
> So I've been working on a little app using libalpm, and I have a
> couple of questions. Hopefully it's okay to ask this here.
> First off, a quick question regarding the doc. Looking at the source
> code i see functions are nicely commented, but all I could find as
> documentation was this man page:
> Since it's totally possible, did I actually miss something
> (obvious), or are there no (generated) doc publicly available?
It's available, and it's religiously updated by Dan for git master:
> It's certainly not a problem, especially since I find the
> libalpm/pacman source code to be really clean/easy to read/follow;
> It's quite simple to figure out how things work and how to use them,
> so congratulations on that, great work. (I wish my code looked as
There's some places where it's not so nice, too
> But while I read pacman's code a lot to see how things are done, I
> happen to actually also full copy/paste stuff in my app, including
> complete functions (e.g. the whole parsing of the config file,
> strtrim(), humanize_size(), etc).
> So I wonder, what's the right thing to do when it comes to this, and
> copyright? I should probably mention that I'm very new at all this,
> so I'm not sure, for instance, what should be included in the source
> files of my app, on its copyright/version message, etc
Sure. You can check out some of the code that we've borrowed from other
projects -- PolarSSL, libcurl, RPM. Basically, it's set aside in a
separate .c file and includes a header from libalpm to carry protos. The
foreign project's copyright goes at the top of the .c with a note about
any possible modifications we've made.
> I'll release my stuff on GPL3+, and I believe pacman is GPL2+, so
> based on what I read it's compatible/allowed, I just wonder what's
> the proper way to do it. Like, should I include something like this:
> Copyright (C) 2012 Pacman Development Team
Yes, we use GPL2. I'm personally not a fan of how strict GPL3 is, and
personally choose to use MIT/ISC for my projects. IANAL, but I believe
you are correct -- a GPL3 project can include GPL2 source as long as it
retains the copyright notice.
> Lastly, while doing all this I came up with 2 (very) minor patches
> for pacman, so I'll share those. But I'm guessing it would be better
> as separate emails/threads, so I'll do it that way.