googlecodein:gettingstarted

This is an old revision of the document!


Getting Started

Some of the FreeBSD tasks may seem daunting, especially to those who have no prior experience with FreeBSD or similar operating systems. This page should provide enough information to enable you to get started and in a position to work on the tasks as quickly as possible.

If you have any problems with any of the instructions here, please do feel free to talk to your mentor, or ask on IRC. There are many mentors available in #freebsd-soc on EFnet, feel free to pop in and say hello even if you are not having issues!

The easiest way to get started with the Google Code-In tasks is to download the pre-made Virtual Machine image. This is available from http://XXXX/ . It is known to work with VirtualBox, but should also work with minimal effort under VMware and Parallels.

Once the VM image has been imported, boot it. The image has been set up so that all your work can either be done on the VM console itself, or over SSH. XXX After the machine has booted, it shows basic instructions, including the IP address that the virtual machine has been given. You can SSH to this IP address if you wish to work over SSH rather than directly on the console.

There are two accounts set up:

'username' 'password'
root gcin
gcin gcin

You should only need to use the gcin username/password for most tasks.

In the home directory of the gcin users, a directory called “gcin2011” exists, containing following directories exist:

docXXX The FreeBSD Documentation tree
head FreeBSD source code for -CURRENT
stable/9 FreeBSD source code for the 9-STABLE branch

All three trees are checked out using Subversion.

(to be written)

(to be written)

The preferred format for submitting work done is in diff format. To produce a diff of your work, us the “svn diff” command.

For example, to create a diff of changes made to the FreeBSD handbook, the following command should be used:

svn diff doc/en_US.ISO8859-1/books/handbook/ > /var/tmp/gcin-handbook.diff

Then, upload the file /var/tmp/gcin-handbook.diff to Google Melange.

All the supplied trees can be updated using “svn update”.

Working on tasks without using the prepared VM images

There are several ways of obtaining the source code, each with advantages and disadvantages. The method described here is probably the easiest way of obtaining the source for small-scale work.

The following assumes that you are using FreeBSD, either on a real machine, or in a virtual environment, and that your system has Internet access.

Note that it is recommended that you do not update your tree whilst working on your tasks, as this combined with the approach documented here will cause your changes to be overwritten each time you update.

Documentation tree

As root, create a file named doc-supfile containing:

*default host=cvsup8.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress

doc-all
#www

For most tasks, the website source is not necessary. If you require it (or indeed, just want to see it), uncomment the www line. Be aware that the website is quite large, so make sure you have enough disk space.

Then, still as root, run "csup doc-supfile". This will drop the FreeBSD doc source code into /usr/doc (and the website code into /usr/www if that line is uncommented). Run this same command every time you want to update your local copy to match the “live” copy, but beware of the note above.

Once you have the documentation tree, find the file that you want to work on, and make a copy of it. For example, if your task involves making changes to the FreeBSD Handbook bibliography, make a copy of it:

cp -p /usr/doc/en_US.ISO8859-1/books/handbook/bibliography/chapter.sgml /usr/doc/en_US.ISO8859-1/books/handbook/bibliography/chapter.old.sgml

Then, make your edits to /usr/doc/en_US.ISO8859-1/books/handbook/bibliography/chapter.sgml

Once you are ready to test your changes, follow the instructions at http://www.freebsd.org/doc/en/books/fdp-primer/overview-quick-start.html

As you made a copy of the file before you made changes, you can produce a diff from it with:

diff -uw /usr/doc/en_US.ISO8859-1/books/handbook/bibliography/chapter.old.sgml /usr/doc/en_US.ISO8859-1/books/handbook/bibliography/chapter.sgml > /var/tmp/gcin-taskname.diff

This file can then be submitted to your task mentor(s) during the task, and uploaded to Google once you feel the task is complete.

  • googlecodein/gettingstarted.1322337188.txt.gz
  • Last modified: 2011/11/26 19:53
  • by GavinAtkinson