Index: chapter.sgml =================================================================== RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/developers-handbook/policies/chapter.sgml,v retrieving revision 1.34 diff -u -r1.34 chapter.sgml --- chapter.sgml 16 Aug 2008 21:42:36 -0000 1.34 +++ chapter.sgml 21 Aug 2008 09:24:40 -0000 @@ -12,6 +12,10 @@ Kamp Contributed by + + Giorgos + Keramidas + @@ -25,33 +29,55 @@ <makevar>MAINTAINER</makevar> on Makefiles ports maintainer - If a particular portion of the FreeBSD distribution is being - maintained by a person or group of persons, they can communicate this - fact to the world by adding a + If a particular portion of the &os; src/ + distribution is being maintained by a person or group of persons, + this is communicated through an entry in the + src/MAINTAINERS file. Maintainers of ports + within the Ports Collection express their maintainership to the + world by adding a MAINTAINER line to the + Makefile of the port in question: + + MAINTAINER= email-addresses + + + For other parts of the repository, or for sections not listed + as having a maintainer, or when you are unsure who the active + maintainer is, try looking at the recent commit history of the + relevant parts of the source tree. It is quite often the case + that a maintainer is not explicitly named, but the people who are + actively working in a part of the source tree for, say, the last + couple of years are interested in reviewing changes. Even if this + is not specifically mentioned in the documentation or the source + itself, asking for a review as a form of courtesy is a very + reasonable thing to do. + - MAINTAINER= email-addresses + The role of the maintainer is as follows: - line to the Makefiles covering this portion of the - source tree. - - The semantics of this are as follows: - + + The maintainer owns and is responsible for that code. This means - that he is responsible for fixing bugs and answering problem reports + that he or she is responsible for fixing bugs and answering problem reports pertaining to that piece of the code, and in the case of contributed software, for tracking new versions, as appropriate. + + Changes to directories which have a maintainer defined shall be sent to the maintainer for review before being committed. Only if the maintainer does not respond for an unacceptable period of time, to several emails, will it be acceptable to commit changes without review by the maintainer. However, it is suggested that you try to have the changes reviewed by someone else if at all possible. + + It is of course not acceptable to add a person or group as maintainer unless they agree to assume this duty. On the other hand it does not have to be a committer and it can easily be a group of people. + + @@ -66,6 +92,10 @@ David O'Brien + + Gavin + Atkinson + @@ -90,7 +120,7 @@ model over time, as it has significant advantages over the old method, including the ability to easily obtain diffs relative to the official versions of the source by everyone (even without - cvs access). This will make it significantly easier to return changes + direct repository access). This will make it significantly easier to return changes to the primary developers of the contributed software. Ultimately, however, it comes down to the people actually doing the @@ -102,50 +132,47 @@ Because of some unfortunate design limitations with the RCS file - format and CVS's use of vendor branches, minor, trivial and/or + format and the use of vendor branches, minor, trivial and/or cosmetic changes are strongly discouraged on files that are still tracking the vendor branch. Spelling fixes are explicitly included here under the - cosmetic category and are to be avoided for files with - revision 1.1.x.x. The repository bloat impact from a single character + cosmetic category and are to be avoided. + The repository bloat impact from a single character change can be rather dramatic. - The Tcl embedded programming - language will be used as example of how this model works: + + Vendor Imports with CVS + + The file utility, used to identify + the format of a file, will be used as example of how this model + works: - src/contrib/tcl contains the source as + src/contrib/file contains the source as distributed by the maintainers of this package. Parts that are entirely - not applicable for FreeBSD can be removed. In the case of Tcl, the - mac, win and - compat subdirectories were eliminated before the - import. + not applicable for &os; can be removed. In the case of &man.file.1;, the + python subdirectory and files with the lt + prefix were eliminated before the import, amongst others. - src/lib/libtcl contains only a bmake style + src/lib/libmagic contains a bmake style Makefile that uses the standard bsd.lib.mk makefile rules to produce the library and install the documentation. - src/usr.bin/tclsh contains only a bmake style + src/usr.bin/file contains a bmake style Makefile which will produce and install the - tclsh program and its associated man-pages using the + file program and its associated man-pages using the standard bsd.prog.mk rules. - src/tools/tools/tcl_bmake contains a couple of - shell-scripts that can be of help when the tcl software needs updating. - These are not part of the built or installed software. - The important thing here is that the - src/contrib/tcl directory is created according to + src/contrib/file directory is created according to the rules: it is supposed to contain the sources as distributed (on a - proper CVS vendor-branch and without RCS keyword expansion) with as few + proper vendor-branch and without RCS keyword expansion) with as few FreeBSD-specific changes as possible. If there are any doubts on how to go about it, it is imperative that you ask first and not blunder - ahead and hope it works out. CVS is not forgiving of - import accidents and a fair amount of effort is required to back out - major mistakes. + ahead and hope it works out. - Because of the previously mentioned design limitations with CVS's + Because of the previously mentioned design limitations with vendor branches, it is required that official patches from the vendor be applied to the original distributed sources and the result re-imported onto the vendor branch again. Official patches should never @@ -168,7 +195,7 @@ src/tools directory along with the port itself so that it is available to future maintainers. - In the src/contrib/tcl level directory, a file + In the src/contrib/file level directory, a file called FREEBSD-upgrade should be added and it should state things like: @@ -192,49 +219,298 @@ - However, please do not import FREEBSD-upgrade - with the contributed source. Rather you should cvs add - FREEBSD-upgrade ; cvs ci after the initial import. Example - wording from src/contrib/cpio is below: - - This directory contains virgin sources of the original distribution files -on a "vendor" branch. Do not, under any circumstances, attempt to upgrade -the files in this directory via patches and a cvs commit. New versions or -official-patch versions must be imported. Please remember to import with -"-ko" to prevent CVS from corrupting any vendor RCS Ids. - -For the import of GNU cpio 2.4.2, the following files were removed: + Example wording from + src/contrib/groff/FREEBSD-upgrade is + below: - INSTALL cpio.info mkdir.c - Makefile.in cpio.texi mkinstalldirs + $FreeBSD: src/contrib/groff/FREEBSD-upgrade,v 1.5.12.1 2005/11/15 22:06:18 ru Exp $ -To upgrade to a newer version of cpio, when it is available: - 1. Unpack the new version into an empty directory. - [Do not make ANY changes to the files.] +This directory contains virgin copies of the original distribution files +on a "vendor" branch. Do not, under any circumstances, attempt to upgrade +the files in this directory via patches and a cvs commit. - 2. Remove the files listed above and any others that don't apply to - FreeBSD. +To upgrade to a newer version of groff, when it is available: + 1. Unpack the new version into an empty directory. + [Do not make ANY changes to the files.] + + 2. Use the command: + cvs import -m 'Virgin import of FSF groff v<version>' \ + src/contrib/groff FSF v<version> + + For example, to do the import of version 1.19.2, I typed: + cvs import -m 'Virgin import of FSF groff v1.19.2' \ + src/contrib/groff FSF v1_19_2 - 3. Use the command: - cvs import -ko -m 'Virgin import of GNU cpio v<version>' \ - src/contrib/cpio GNU cpio_<version> + 3. Follow the instructions printed out in step 2 to resolve any + conflicts between local FreeBSD changes and the newer version. - For example, to do the import of version 2.4.2, I typed: - cvs import -ko -m 'Virgin import of GNU v2.4.2' \ - src/contrib/cpio GNU cpio_2_4_2 +Do not, under any circumstances, deviate from this procedure. - 4. Follow the instructions printed out in step 3 to resolve any - conflicts between local FreeBSD changes and the newer version. +To make local changes to groff, simply patch and commit to the main +branch (aka HEAD). Never make local changes on the FSF branch. -Do not, under any circumstances, deviate from this procedure. +All local changes should be submitted to Werner Lemberg <wl@gnu.org> or +Ted Harding <ted.harding@nessie.mcc.ac.uk> for inclusion in the next +vendor release. + +ru@FreeBSD.org - 20 October 2005 + + Another approach my also be taken for the list of files to be + excluded, which is especially useful when the list is large or + complicated or where imports happen frequently. By creating a + file FREEBSD-Xlist in the same directory the + vendor source is imported into, containing a list of filename + patterns to be excluded one per line, future imports can often + performed with: + + &prompt.user; tar FREEBSD-Xlist vendor-source.tgz + + An example of a FREEBSD-Xlist file, from + src/contrib/tcsh, is here: + + */BUGS +*/config/a* +*/config/bs2000 +*/config/bsd +*/config/bsdreno +*/config/[c-z]* +*/tests +*/win32 -To make local changes to cpio, simply patch and commit to the main -branch (aka HEAD). Never make local changes on the GNU branch. + + Please do not import FREEBSD-upgrade or + FREEBSD-Xlist with the contributed source. + Rather you should add these files after the initial + import. + -All local changes should be submitted to "cpio@gnu.ai.mit.edu" for -inclusion in the next vendor release. + -obrien@FreeBSD.org - 30 March 1997 + + + + + Dag-Erling + Smørgrav + Contributed by + + + + Vendor Imports with SVN + + This section describes the vendor import procedure with + Subversion in details. + + + + Preparing the Tree + + If this is your first import after the switch to + SVN, you will have to flatten and clean + up the vendor tree, and bootstrap merge history in the main + tree. If not, you can safely omit this step. + + During the conversion from CVS to + SVN, vendor branches were imported with + the same layout as the main tree. For example, the + foo vendor sources ended up in + vendor/foo/dist/contrib/foo, + but it is pointless and rather inconvenient. What we really + want is to have the vendor source directly in + vendor/foo/dist, + like this: + + &prompt.user; cd vendor/foo/dist/contrib/foo +&prompt.user; svn move $(svn list) ../.. +&prompt.user; cd ../.. +&prompt.user; svn remove contrib +&prompt.user; svn propdel svn:mergeinfo +&prompt.user; svn commit + + Note that, the propdel bit is + necessary because starting with 1.5, Subversion will + automatically add svn:mergeinfo to any + directory you copy or move. In this case, you will not need + this information, since you are not going to merge anything + from the tree you deleted. + + + You may want to flatten the tags as well. The + procedure is exactly the same. If you do this, put off + the commit until the end. + + + Check the dist tree and perform any + cleanup that is deemed to be necessary. You may want to + disable keyword expansion, as it makes no sense on + unmodified vendor code. In some cases, it can be even be + harmful. + + &prompt.user; svn propdel svn:keywords . +&prompt.user; svn commit + + Bootstrapping of svn:mergeinfo on the + target directory (in the main tree) to the revision that + corresponds to the last change was made to the vendor tree + prior to importing new sources is also needed: + + &prompt.user; cd head/contrib/foo +&prompt.user; svn merge svn_base/vendor/foo/dist@12345678 . +&prompt.user; svn commit + + where svn_base is the base + directory of your SVN repository, e.g. + svn+ssh://svn.FreeBSD.org/base. + + + + Importing New Sources + + Prepare a full, clean tree of the vendor sources. With + SVN, we can keep a full distribution in + the vendor tree without bloating the main tree. Import + everything but merge only what is needed. + + Note that you will need to add any files that were added + since the last vendor import, and remove any that were + removed. To facilitate this, you should prepare sorted + lists of the contents of the vendor tree and of the sources + you are about to import: + + &prompt.user; cd vendor/foo/dist +&prompt.user; svn list | grep '/$' | sort > ../old +&prompt.user; cd ../foo-9.9 +&prompt.user; find . f | cut 3- | sort > ../new + + With these two files, the following command will list + list removed files (files only in + old): + + &prompt.user; comm ../old ../new + + While the command below will list added files (files + only in + new): + + &prompt.user; comm ../old ../new + + Let's put this together: + + &prompt.user; cd vendor/foo/foo-9.9 +&prompt.user; tar cf - . | tar xf - ../dist +&prompt.user; cd ../dist +&prompt.user; comm ../old ../new | xargs svn remove +&prompt.user; comm ../old ../new | xargs svn add + + + If there are new directories in the new distribution, + the last command will fail. You will have to add the + directories, and run it again. Conversely, if any + directories were removed, you will have to remove them + manually. + + + Check properties on any new files: + + + + All text files + should have svn:eol-style set to + native. + + + + All binary files should have + svn:mime-type set to + application/octet-stream, unless + there is a more appropriate media type. + + + + Executable files should have + svn:executable set to + *. + + + + There should be no other properties on any file in + the tree. + + + + + You are ready to commit, but you should first check + the output of svn stat and svn + diff to make sure everything is in order. + + + Once you have committed the new vendor release, you + should tag it for future reference. The best and quickest + way is to do it directly in the repository: + + &prompt.user; svn copy svn_base/vendor/foo/dist svn_base/vendor/foo/9.9 + + To get the new tag, you can update your working copy of + vendor/foo. + + + If you choose to do the copy in the checkout instead, + do not forget to remove the generated + svn:mergeinfo as described + above. + + + + + Merging to <emphasis>-HEAD</emphasis> + + After you have prepared your import, it is time to + merge. Option tells + SVN not to handle merge conflicts yet, + because they will be taken care of manually: + + &prompt.user; cd head/contrib/foo +&prompt.user; svn update +&prompt.user; svn merge svn_base/vendor/foo/dist + + Resolve any conflicts, and make sure that any files that + were added or removed in the vendor tree have been properly + added or removed in the main tree. It is always a good idea + to check differences against the vendor branch: + + &prompt.user; svn diff svn_base/vendor/foo/dist . + + The option tells + SVN not to check files that are in the + vendor tree but not in the main tree. + + + With SVN, there is no concept of on + or off the vendor branch. If a file that previously had + local modifications no longer does, just remove any + left-over cruft, such as &os; version tags, so it no + longer shows up in diffs against the vendor tree. + + + If any changes are required for the world to build with + the new sources, make them now — and test until you + are satisfied that everything build and runs + correctly. + + + + Commit + + Now, you are ready to commit. Make sure you get + everything in one go. Ideally, you would have done all + steps in a clean tree, in which case you can just commit + from the top of that tree. That is the best way to avoid + surprises. If you do it properly, the tree will move + atomically from a consistent state with the old code to a + consistent state with the new code. + + + @@ -411,7 +687,7 @@ For non-port libraries, it is also our policy to change the shared library version number only once between releases. In addition, it is our policy to change the major shared library version number only once - between major OS releases (i.e. from 3.0 to 4.0). When you make a + between major OS releases (i.e. from 6.0 to 7.0). When you make a change to a system library that requires the version number to be bumped, check the Makefile's commit logs. It is the responsibility of the committer to ensure that the first such change