X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=docs%2Fcontributing.txt;h=e3289fd49b6e0b2ec5677274331ca4e0fa6160f7;hb=e32b6503e75d5bcbf8ffff69cafb09523ff2b482;hp=bf6dedfe8b498420b41b7aea46a4886f28a51bdb;hpb=cb81e6484d1f50ec2761f6294722407b14add525;p=oweals%2Fbusybox.git diff --git a/docs/contributing.txt b/docs/contributing.txt index bf6dedfe8..e3289fd49 100644 --- a/docs/contributing.txt +++ b/docs/contributing.txt @@ -17,19 +17,18 @@ help. However, before you dive in, headlong and hotfoot, there are some things you need to do: -Checkout the Latest Code from CVS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Checkout the Latest Code +~~~~~~~~~~~~~~~~~~~~~~~~ This is a necessary first step. Please do not try to work with the last released version, as there is a good chance that somebody has already fixed the 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 the +For information on how to check out Busybox development tree, please look at the following links: - http://busybox.net/cvs_anon.html - http://busybox.net/cvs_howto.html + http://busybox.net/source.html Read the Mailing List @@ -73,7 +72,7 @@ Areas Where You Can Help ------------------------ Busybox can always use improvement! If you're looking for ways to help, there -there are a variety of areas where you could help. +are a variety of areas where you could help. What Busybox Doesn't Need @@ -87,14 +86,10 @@ Knife" of embedded Linux, there are some applets that will not be accepted: 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. + the upstream version. Rationale: bugs in these tools can destroy + vast amounts of data. Keeping up with filesystem format development + is impractical (especially in the area of keeping fsck tool safe + and up-to-date). - 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. @@ -103,12 +98,6 @@ Knife" of embedded Linux, there are some applets that will not be accepted: 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 ~~~~~~~~~~~~~ @@ -116,7 +105,7 @@ Bug Reporting If you find bugs, please submit a detailed bug report to the busybox mailing list at busybox@busybox.net. A well-written bug report should include a transcript of a shell session that demonstrates the bad behavior and enables -anyone else to duplicate the bug on their own machine. The following is such +anyone else to duplicate the bug on their own machine. The following is such an example: To: busybox@busybox.net @@ -135,10 +124,10 @@ an example: But when I use BusyBox date I get this instead: $ date - llegal instruction + Illegal instruction - I am using Debian unstable, kernel version 2.4.19-rmk1 on an Netwinder, - and the latest uClibc from CVS. Thanks for the wonderful program! + I am using Debian unstable, kernel version 2.4.19-rmk1 on an Netwinder, + and the latest uClibc from CVS. -Diligent @@ -171,7 +160,7 @@ Consult Existing Sources For a quick listing of "needs work" spots in the sources, cd into the Busybox directory and run the following: - for i in TODO FIXME XXX; do grep $i *.[ch]; done + for i in TODO FIXME XXX; do find -name '*.[ch]'|xargs grep $i; done This will show all of the trouble spots or 'questionable' code. Pick a spot, any spot, these are all invitations for you to contribute. @@ -199,22 +188,14 @@ 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 + http://www.securityfocus.com/popups/forums/secprog/intro.shtml - 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 + - C library function 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. @@ -231,11 +212,11 @@ These are dirty jobs, but somebody's gotta do 'em. - "Ten Commandments" compliance: (this is a "maybe", certainly not as important as any of the previous items.) - http://web.onetelnet.ch/~twolf/tw/c/ten_commandments.html + http://www.lysator.liu.se/c/ten-commandments.html Other useful links: - - the comp.lang.c FAQ: http://web.onetelnet.ch/~twolf/tw/c/index.html#Sources + - the comp.lang.c FAQ: http://home.datacomm.ch/t_wolf/tw/c/index.html#Sources @@ -248,8 +229,11 @@ Here are some guidelines on how to submit a patch to Busybox. Making A Patch ~~~~~~~~~~~~~~ -If you've got anonymous CVS access set up, making a patch is simple. Just make -sure you're in the busybox/ directory and type 'cvs diff -bwu > mychanges.patch'. +If you've got anonymous Git access set up, making a patch is simple. Just make +sure you're in the busybox/ directory and type: + + git diff -b -w > mychanges.patch + You can send the resulting .patch file to the mailing list with a description of what it does. (But not before you test it! See the next section for some guidelines.) It is preferred that patches be sent as attachments, but it is @@ -257,8 +241,12 @@ not required. Also, feel free to help test other people's patches and reply to them with comments. You can apply a patch by saving it into your busybox/ directory and -typing 'patch < mychanges.patch'. Then you can recompile, see if it runs, test -if it works as advertised, and post your findings to the mailing list. +typing: + + patch -p1 < mychanges.patch + +Then you can recompile, see if it runs, test if it works as advertised, and +post your findings to the mailing list. NOTE: Please do not include extraneous or irrelevant changes in your patches. Please do not try to "bundle" two patches together into one. Make single, @@ -271,7 +259,7 @@ Testing Guidelines ~~~~~~~~~~~~~~~~~~ It's considered good form to test your new feature before you submit a patch -to the mailing list, and especially before you commit a change to CVS. Here +to the mailing list, and especially before you push a change to Git. Here are some guidelines on how to test your changes. - Always test Busybox applets against GNU counterparts and make sure the @@ -367,7 +355,7 @@ responses from queries to applet maintainer or positive responses from folks on the mailing list. We've made strident efforts to put a useful "collaboration" infrastructure in -place in the form of mailing lists, the bug tracking system, and CVS. Please +place in the form of mailing lists, the bug tracking system, and Git. Please use these resources. @@ -392,39 +380,43 @@ opposite effect. -Committing Changes to CVS -------------------------- +Pushing Changes to Git +---------------------- If you submit several patches that demonstrate that you are a skilled and wise -coder, you may be invited to become a committer, thus enabling you to commit -changes directly to CVS. This is nice because you don't have to wait for -someone else to commit your change for you, you can just do it yourself. +coder, you may be invited to become a committer, thus enabling you to push +changes directly to Git. This is nice because you don't have to wait for +someone else to push your change for you, you can just do it yourself. -But note that this is a priviledge that comes with some responsibilities. You -should test your changes before you commit them. You should also talk to an +But note that this is a privilege that comes with some responsibilities. You +should test your changes before you push them. You should also talk to an applet maintainer before you make any kind of sweeping changes to somebody else's code. Big changes should still go to the mailing list first. Remember, being wise, polite, and discreet is more important than being clever. +For more information on Git push access, see: -When To Commit -~~~~~~~~~~~~~~ + http://busybox.net/developer.html + + +When To Push +~~~~~~~~~~~~ -Generally, you should feel free to commit a change if: +Generally, you should feel free to push a change if: - Your changes are small and don't touch many files - You are fixing a bug - Somebody has told you that it's okay - It's obviously the Right Thing -The more of the above are true, the better it is to just commit a change -directly to CVS. +The more of the above are true, the better it is to just push a change +directly to Git. -When Not To Commit -~~~~~~~~~~~~~~~~~~ +When Not To Push +~~~~~~~~~~~~~~~~ -Even if you have commit rights, you should probably still post a patch to the +Even if you have push access, you should probably still post a patch to the mailing list if: - Your changes are broad and touch many different files @@ -433,7 +425,7 @@ mailing list if: - You are not the maintainer and your changes make the maintainer cringe The more of the above are true, the better it is to post a patch to the -mailing list instead of committing. +mailing list instead of pushing. @@ -445,5 +437,3 @@ you're having difficulty following some of the steps outlined in this document don't worry, the folks on the Busybox mailing list are a fairly good-natured bunch and will work with you to help get your patches into shape or help you make contributions. - -