[libvirt] Fwd: Start contributing with Libvirt (Finding a mentor or helpful tips)

Hi everybody! I sent an e-mail to Daniel asking about contributing to the libvirt community for free. So, I copied the e-mail to the libvirt mailing list as Daniel suggested me. If anyone can help me I'd be pleased. Thanks very much! *--* *Julio Cesar Faracco* *University of São Paulo - Brazil* ---------- Forwarded message ---------- From: Julio Faracco <jcfaracco@gmail.com> Date: 2014-03-29 13:45 GMT-03:00 Subject: Start contributing with Libvirt (Finding a mentor or helpful tips) To: dan@berrange.com Hi Daniel. My name is Julio and I sent this e-mail because I would like to contribute with libvirt. Moreover, I follow the libvirt mailing list for a long time and have read the ideas page of libvirt, qemu and KVM of Google Summer of Code program. I thought the ideas very interesting but I didn't have time to propose my ideais or submit a patch. But I don't know a good way to start doing that. I want to contribute with libvirt for free (not like GSoC who pays a paycheck for it). I think that contributing with a project like libvirt enhances some of my programming skills. Today I work with Linux distribution management and not with programing itself. However, I'm finding some troubles to start. For example: - Can I fix a random open bug? - How to understand which bug can be easier to solve? - How to follow the conversation of the mailing list? Sometimes I feel so lost. I was looking for a mentor (if you know someone who could help me) or a person who can help me to follow the right way to start it. Thanks very much. *--* *Julio Cesar Faracco* *University of São Paulo - Brazil*

On 03/31/2014 10:00 AM, Julio Faracco wrote:
Hi everybody!
I sent an e-mail to Daniel asking about contributing to the libvirt community for free. So, I copied the e-mail to the libvirt mailing list as Daniel suggested me. If anyone can help me I'd be pleased.
Welcome to the community. I'd suggest starting off by reading http://libvirt.org/hacking.html and http://libvirt.org/governance.html to get more of a feel for what contributions involve. Among other things, we prefer working in the open (keep the list in the loop), which is why Daniel was right to redirect your 1-on-1 email back to the list instead of answering you outright. And if something didn't make sense, point it out - you aren't the only new person, so we'd like to fix it to make it easier for the next reader!
- Can I fix a random open bug?
Sure. There's plenty of bugs out there, but it may be easiest to start with one that you can personally reproduce.
- How to understand which bug can be easier to solve?
Feel free to ask on the list for some beginner project ideas. I personally find it helpful to try documentation patches first - as a newcomer, your perspective is quite valuable in comparison to some of us that overlook things "because they've always been that way"; plus, documenting things can help you learn what the code is doing.
- How to follow the conversation of the mailing list? Sometimes I feel so lost.
Unfortunately, that's going to be true of any high-volume list (it only gets worse as you move on to larger projects like the kernel).
I was looking for a mentor (if you know someone who could help me) or a person who can help me to follow the right way to start it. Thanks very much.
I can't personally commit to time as a mentor, based on other assignments I have, but in general if you ask on the list, someone will try to respond (and if you go more than 48 hours without a response, we don't mind a ping to kick us into action). The #virt IRC channel on OFTC is also a good resource, particularly for real-time questions. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 31.03.2014 23:43, Eric Blake wrote:
On 03/31/2014 10:00 AM, Julio Faracco wrote:
Hi everybody!
I sent an e-mail to Daniel asking about contributing to the libvirt community for free. So, I copied the e-mail to the libvirt mailing list as Daniel suggested me. If anyone can help me I'd be pleased.
Welcome to the community.
I'd suggest starting off by reading http://libvirt.org/hacking.html and http://libvirt.org/governance.html to get more of a feel for what contributions involve.
Among other things, we prefer working in the open (keep the list in the loop), which is why Daniel was right to redirect your 1-on-1 email back to the list instead of answering you outright.
And if something didn't make sense, point it out - you aren't the only new person, so we'd like to fix it to make it easier for the next reader!
- Can I fix a random open bug?
Sure. There's plenty of bugs out there, but it may be easiest to start with one that you can personally reproduce.
Just to give you a starting point: https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&component=libvirt&query_format=advanced Feel free to pick a random bug and try to fix it. If the bug you've picked is not easy to fix, just repeat the process. BTW: when fixing a tracked bug we find it very helpful to include the bug ID somewhere in the commit message, so we can close the bug later. Michal

On 03/31/2014 03:43 PM, Eric Blake wrote:
On 03/31/2014 10:00 AM, Julio Faracco wrote:
Hi everybody!
I sent an e-mail to Daniel asking about contributing to the libvirt community for free. So, I copied the e-mail to the libvirt mailing list as Daniel suggested me. If anyone can help me I'd be pleased.
Welcome to the community.
I'd suggest starting off by reading http://libvirt.org/hacking.html and http://libvirt.org/governance.html to get more of a feel for what contributions involve.
Here's an idea for a beginner's project. Very grunt work, but you mostly need time and patience, and not much understanding of the code base (I'd do it myself, if I had the time): We are inconsistent on how we declare enums. In our public headers, we made it a point to do: typedef enum { ... } virName; as it allows clients to use just 'virName' instead of 'enum virName' when referring to a variable holding an enum value. However, we also explicitly use 'int' instead of 'virName' for any API where an enum is passed in; this is intentional, because some compilers have flags that can change ABI if you pass enum types (if all values of an enum fit in a char, then the compiler can expose options to treat it as either a char or as an int, where the width chosen then affects how other code must link to that struct/function), whereas using 'int' leaves us with a stable ABI regardless of whether the client code played with those compiler flags. Besides, the C language is fairly lax about conversion in either direction between int and enum, unlike C++. Meanwhile, in our internal headers, we often have: enum virName { ... }; which means we HAVE to use 'enum virName' when referring to a variable holding one of those values. What's more, we have tended to carry over the public header notion of using 'int' instead of the enum type, so in util/ and conf/ you'll see lots of headers with struct members such as 'int type; /* enum virName */'. But this is stupid - our internal headers are NOT tied by ABI compatibility issues. And when seeing a function prototype, foo(int type) is a lot less instructive than foo(virName type), where type is supposed to be an enum value. Plus, we have lately been using the coding style of 'switch ((enum virName)expr) {...}' with no default: clause, to let the compiler enforce that we've covered all the enum values; but the cast in that switch is redundant if expr already has the proper enum type to begin with (and I'm a fan of removing redundant casts). I'd really like to see this cleaned up to use the typedef declaration style throughout our codebase, cleaning up internal headers to directly use enum types in both struct declarations and function declarations (where _only_ the public headers are forced to remain with int for ABI reasons), and checking that switch statements that try to cover all possible enum values use a consistent style that best aids the compiler. Ideally, we'd also implement some syntax check rules to enforce the style in the future; that part is trickier for a newcomer, but I don't mind helping on that front (and to some degree, tasks like this are sometimes easier if you write the checker first then hack the codebase until the checker no longer warns, then rebase the code into small enough patches with the checker last). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

It's a good suggestion to start. I will do that, Eric. =) -- *Julio Cesar Faracco*

Eric, I changed the enum structures to typedef structures. Specially the structures from util/ and conf/ dirs that have a big number of enum structures. To keep a stable release, I didn't change the attributes of the structs. Most of them still keep the old type: 'int type; /* enum virName */' I will submit a patch with the typedef changes first. Thanks! *--* *Julio Cesar Faracco*

On 04/15/2014 01:03 PM, Julio Faracco wrote:
Eric,
I changed the enum structures to typedef structures. Specially the structures from util/ and conf/ dirs that have a big number of enum structures.
To keep a stable release, I didn't change the attributes of the structs. Most of them still keep the old type: 'int type; /* enum virName */'
Probably still worth changing in later patches, but incremental cleanups are just fine, and saving stuff for later doesn't make your contribution any less valuable.
I will submit a patch with the typedef changes first.
Looking forward to it. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Julio Faracco
-
Michal Privoznik