?? contributing.txt
字號:
Contributing To Busybox=======================This document describes what you need to do to contribute to Busybox, whereyou can help, guidelines on testing, and how to submit a well-formed patchthat is more likely to be accepted.The Busybox home page is at: http://busybox.lineo.comPre-Contribution Checklist--------------------------So you want to contribute to Busybox, eh? Great, wonderful, glad you want tohelp. However, before you dive in, headlong and hotfoot, there are some thingsyou need to do:Checkout the Latest Code from CVS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~This is a necessary first step. Please do not try to work with the lastreleased version, as there is a good chance that somebody has already fixedthe bug you found. Somebody might have even added the feature you had in mind.Don't make your work obsolete before you start!For information on how to check out Busybox from CVS, please look at thefollowing links: http://oss.lineo.com/cvs_anon.html http://oss.lineo.com/cvs_howto.htmlRead the Mailing List~~~~~~~~~~~~~~~~~~~~~No one is required to read the entire archives of the mailing list, but youshould at least read up on what people have been talking about lately. Ifyou've recently discovered a problem, chances are somebody else has too. Ifyou're the first to discover a problem, post a message and let the rest of usknow.Archives can be found here: http://oss.lineo.com/lists/busybox/If you have a serious interest in Busybox, i.e., you are using it day-to-day oras part of an embedded project, it would be a good idea to join the mailinglist.A web-based sign-up form can be found here: http://oss.lineo.com/mailman/listinfo/busyboxCoordinate with the Applet Maintainer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Some (not all) of the applets in Busybox are "owned" by a maintainer who hasput significant effort into it and is probably more familiar with it thanothers. To find the maintainer of an applet, look at the top of the .c filefor a name following the word 'Copyright' or 'Written by' or 'Maintainer'.Before plunging ahead, it's a good idea to send a message to the mailing listthat says: "Hey, I was thinking about adding the 'transmogrify' feature to the'foo' applet. Would this be useful? Is anyone else working on it?" You mightwant to CC the maintainer (if any) with your question.Areas Where You Can Help------------------------Busybox can always use improvement! If you're looking for ways to help, therethere are a variety of areas where you could help.What Busybox Doesn't Need~~~~~~~~~~~~~~~~~~~~~~~~~Before listing the areas where you _can_ help, it's worthwhile to mention theareas where you shouldn't bother. While Busybox strives to be the "Swiss ArmyKnife" of embedded Linux, there are some applets that will not be accepted: - Any filesystem manipulation tools: Busybox is filesystem independent and we do not want to start adding mkfs/fsck tools for every (or any) filesystem under the sun. (fsck_minix.c and mkfs_minix.c are living on borrowed time.) There are far too many of these tools out there. Use the upstream version. Not everything has to be part of Busybox. - Any partitioning tools: Partitioning a device is typically done once and only once, and tools which do this generally do not need to reside on the target device (esp a flash device). If you need a partitioning tool, grab one (such as fdisk, sfdisk, or cfdisk from util-linux) and use that, but don't try to merge it into busybox. These are nasty and complex and we don't want to maintain them. - Any disk, device, or media-specific tools: Use the -utils or -tools package that was designed for your device; don't try to shoehorn them into Busybox. - Any architecture specific tools: Busybox is (or should be) architecture independent. Do not send us tools that cannot be used across multiple platforms / arches. - Any daemons that are not essential to basic system operation. To date, only syslogd and klogd meet this requirement. We do not need a web server, an ftp daemon, a dhcp server, a mail transport agent or a dns resolver. If you need one of those, you are welcome to ask the folks on the mailing list for recommendations, but please don't bloat up Busybox with any of these.Bug Reporting~~~~~~~~~~~~~If you find a bug in Busybox, you can send a bug report to our bug trackingsystem (homepage: http://bugs.lineo.com). Instructions on how to send a bugreport to the tracking system can be found at: http://bugs.lineo.com/Reporting.html The README file that comes with Busybox also describes how to submit a bug.A well-written bug report should include a transcript of a shell session thatdemonstrates the bad behavior and enables anyone else to duplicate the bug ontheir own machine. The following is such an example: When I execute Busybox 'date' it produces unexpected results. This is using GNU date: $ date Wed Mar 21 14:19:41 MST 2001 This is using Busybox date: $ date codswaddleBug Triage~~~~~~~~~~Validating and confirming bugs is nearly as important as reporting them in thefirst place. It is valuable to know if a bug can be duplicated on a differentmachine, on a different filesystem, on a different architecture, with adifferent C library, and so forth.To see a listing of all the bugs currently filed against Busybox, look here: http://bugs.lineo.com/db/pa/lbusybox.htmlIf you have comments to add to a bug (can / can't duplicate, think a bugshould be closed / reopened), please send it to [bugnumber]@bugs.lineo.com.The message you send will automatically be forwarded to the mailing list forall to see.Write Documentation~~~~~~~~~~~~~~~~~~~Chances are, documentation in Busybox is either missing or needs improvement.Either way, help is welcome.Work is being done to automatically generate documentation from sources,especially from the usage.h file. If you want to correct the documentation,please make changes to the pre-generation parts, rather than the generateddocumentation. [More to come on this later...]It is preferred that modifications to documentation be submitted in patchformat (more on this below), but we're a little more lenient when it comes todocs. You could, for example, just say "after the listing of the mountoptions, the following example would be helpful..."Consult Existing Sources~~~~~~~~~~~~~~~~~~~~~~~~For a quick listing of "needs work" spots in the sources, cd into the Busyboxdirectory and run the following: for i in TODO FIXME XXX; do grep $i *.[ch]; doneThis will show all of the trouble spots or 'questionable' code. Pick a spot,any spot, these are all invitations for you to contribute.Consult The Bug-Tracking System~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Head to: http://bugs.lineo.com/db/pa/lBusybox.html and look at the bugs onthere. Pick one you think you can fix, and fix it. If it's a wishlist item andsomeone's requesting a new feature, take a stab at adding it. Everythingpreviously said about "reading the mailing list" and "coordinating with theapplet maintainer" still applies.Add a New Applet~~~~~~~~~~~~~~~~If you want to add a new applet to Busybox, we'd love to see it. However,before you write any code, please ask beforehand on the mailing list somethinglike "Do you think applet 'foo' would be useful in Busybox?" or "Would youguys accept applet 'foo' into Busybox if I were to write it?" If the answer is"no" by the folks on the mailing list, then you've saved yourself some time.Conversely, you could get some positive responses from folks who might beinterested in helping you implement it, or can recommend the best approach.Perhaps most importantly, this is your way of calling "dibs" on something andavoiding duplication of effort.Also, before you write a line of code, please read the 'new-applet-HOWTO.txt'file in the docs/ directory.Janitorial Work~~~~~~~~~~~~~~~These are dirty jobs, but somebody's gotta do 'em. - Converting applets to use getopt() for option processing. Type 'grep -L getopt *.c' to get a listing of the applets that currently don't use getopt. If a .c file processes no options, it should have a line that reads: /* no options, no getopt */ somewhere in the file. - Replace any "naked" calls to malloc, calloc, realloc, str[n]dup, fopen with the x* equivalents found in utility.c. - Security audits: http://www.securityfocus.com/frames/?content=/forums/secprog/secure-programming.html - Synthetic code removal: http://www.perl.com/pub/2000/06/commify.html - This is very Perl-specific, but the advice given in here applies equally well to C. - C library funciton use audits: Verifying that functions are being used properly (called with the right args), replacing unsafe library functions with safer versions, making sure return codes are being checked, etc. - Where appropriate, replace preprocessor defined macros and values with compile-time equivalents.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -