Hitchhiker's Guide to Openbsd
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
- Bu sahifa navigatsiya:
- Common CVS tips
Pre-loading the tree:
src.tar.gz, sys.tar.gz While you can download the entire source tree from an AnonCVS server, you can often save a lot of time and bandwidth by "pre-loading" your source tree with the source files from either the OpenBSD CD or from an FTP server. This is particularly true if you are running -stable , as relatively few files change between this version and the -release it is based on. To extract the source tree from the CD to /usr/src (assuming the CD is mounted on /mnt): # cd /usr/src; tar xzf /mnt/src.tar.gz # cd /usr; tar xzf /mnt/xenocara.tar.gz # cd /usr; tar xzf /mnt/ports.tar.gz The source files available for download from the FTP servers are separated into two files to minimize the download time for those wishing to work with only one part of the tree. The two files are sys.tar. gz , which contains the files used to create the kernel, and src.tar.gz which contains all the other "userland" utilities except the ports tree and the X11 sources. In general, however, you will usually want both of them installed. Assuming the downloaded files, src.tar.gz and sys.tar.gz , are in /usr : # cd /usr/src # tar xzf ../sys.tar.gz http://www.openbsd.org/faq/faq5.html (8 of 26)9/4/2011 10:02:02 AM 5 - Building the System from Source # tar xzf ../src.tar.gz # cd /usr # tar xzf xenocara.tar.gz # tar xzf ports.tar.gz Not all people will wish to unpack all the file sets, but as the system must be kept in sync, you will generally need to set up all parts of the tree. Common CVS tips As indicated earlier, some options are mandatory to get a valid src tree in OpenBSD. The " -P " option above is one of those: It "prunes" (removes) directories that are empty. Over the years, directories have been created and deleted in the OpenBSD source tree, and sometimes the names of old directories are currently used as file names. Without the " -P " option, your newly checked-out tree WILL NOT successfully compile. Much the same with the -d option on the 'update' command -- it creates new directories that may have been added to the tree since your initial checkout. To get a successful update, you must use the -Pd options. Experienced CVS users may wonder why the CVSROOT was specified and used in this example, as cvs (1) will record the CVS server's location in the checked out tree. This is correct, however there are enough times where one may need to override the default anoncvs server, many people recommend always specifying the repository explicitly. It is also worth noting that while the CVSROOT environment variable can be used directly by cvs(1), it is used only if nothing else overrides it (i.e., cvs (1) would have an error without it), whereas specifying it in the cvs(1) command line overrides all other values. It is often useful to use a .cvsrc in your home directory to specify defaults for some of these options. An example .cvsrc file: $ more ~/.cvsrc cvs -q -danoncvs@anoncvs.example.org:/cvs diff -up update -Pd checkout -P This file would cause cvs(1) to use the anoncvs@anoncvs.example.org:/cvs server, suppress usually unneeded output (" -q " is "quiet") for all operations, a "cvs up" command defaults to using the - Pd , a "cvs diff" defaults to providing "unified diffs" due to the " -u ", and a "cvs checkout" will use the " - P " option. While this is convenient, if you forget this file exists, or try to run commands you got used to on a machine without this file, you will have problems. http://www.openbsd.org/faq/faq5.html (9 of 26)9/4/2011 10:02:02 AM 5 - Building the System from Source As the source trees consist of large numbers of mostly small files, turning on soft updates for the Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling