Getting Started with the Helix Sources (I)

Part 1: Installing and Running CVS

Purpose

The purpose of this document is to give developers step-by-step instructions for obtaining the source code from the Helix Community CVS repository, using the Ribosome build system.

Note: This page provides instructions for getting the source code from CVS, which gives you the most up-to-date source code, and is the only way to retrieve many components of Helix. For developers who are evaluating the Helix Player or Helix DNA Client, another option is the nightly source tarball page, which provides simple downloads of limited profiles of the Helix DNA Client and Helix Player.

Step-by-Step Instructions

In the following steps, what you type is in bold. When what you would type is pretty much the same on all platforms, then only the Windows example will be given. When there is a significant difference in what you type between platforms, an example of what to type on each platform will be given. In some cases below, some of the text printed on the screen has been shortened for brevity. Whenever this is done you will see ellipses (...) in the place that text was removed. Also note that when we set environment variables in the examples for Unix below, we are assuming the bash shell. The exact method for setting environment variables may differ depending on your platform and shell.

Note: You can use a couple of different Windows packages to access the Helix community CVS sources. The steps below describe how to set up and use Cygwin on your Windows system. Cygwin SSH is the recommended method for Windows users accessing the Helix Community CVS server. However, if you really prefer to use PuTTY to access the sources, instructions for using PuTTY SSH are also included.

Note: If you joined the Helix community and checked out source files before February of 2004, it is recommended that you select a new directory for any sources you intend to check out now.

  1. Make sure you have a Helix community account. For more information, see the Helix community Web site. For the purposes of this example, it is assumed that your Helix community user name is myusername and your password is mypassword.

  2. The Helix sources are provided under the provisions of either the RPSL or RCSL license. However, you may also want to agree to the Binary EULA license, so you can build the Helix DNA with RealAudio/RealVideo Technology. Links to the licenses can be found under the Licenses selection on the right side of any of the Helix community pages.

  3. Make sure you have all the build tools listed for your platform in the Helix Tools Requirements document. Ensure the executables for both CVS and Python are in your path.

  4. Get a copy of ssh for your machine. On Linux, Mac OSX, and other POSIX operating systems, you probably already have it (look for ssh).

    On Windows, systems, use the following steps to obtain a copy of Cygwin and install the proper packages for use with the Helix sources:

    1. Obtain the Cygwin setup application at http://www.cygwin.com/setup.exe.

    2. Go to the directory where you installed the setup application and double-click on setup.exe to start the setup procedure.

    3. In the introductory dialog box, click Next.

    4. In the Choose Installation Type dialog, select the Install from Internet radio button, then click Next.

    5. In the Choose Installation Directory dialog, enter an installation directory for Cygwin (or leave it as is if you want to use the default directory), select the Install for radio button that is appropriate for your system, and select the Default Text File Type as DOS. Click Next.

    6. In the Select Local Package Directory, enter the directory in which you want the installation package for Cygwin to be placed. Use the Browse button to browse for an appropriate directory. After you have selected the directory, click Next.

    7. In the Select Connection Type dialog, select the appropriate connection type for your network. In most cases, Direct Connection should be selected. Click Next.

    8. In the Choose a Download Site, select one of the sites and click Next.

    9. In the Select Packages dialog, click the View button in the upper right side of the dialog. This dialog includes a list of packages that you can select to be installed in Cygwin.

    10. Scroll through the list of packages (they are listed in alphabetical order) for cvs. Select this package by clicking on the word Skip in the New column. This selects the binary package for this application and displays the revision number of the package in the New column.

    11. Continue to scroll through the list of packages until you get to openssh. Select this package by clicking on the word Skip in the New column. Click Next. The setup program will begin downloading and installing the Cygwin packages.

    12. Once the installation is complete, select Create icon on Desktop. Click Finish.

    13. A Setup Complete dialog box will appear. Click OK.

  5. Set your HOME environment variable. On Linux, Mac OSX, and other POSIX operating systems, HOME should probably already be set. You should not include a trailing slash on this environment variable since some versions of CVS fail when this occurs.

    On Windows, set the HOME environment variable using the following steps:

    1. In Windows, click the Start button, and select Settings->Control Panel.

    2. Double click on System to bring up the System Properties dialog box.

    3. Select the Advanced tab and click the Environment Variables button near the bottom of the dialog box.

    4. In the Environment Variables dialog, under User variables for <username>, click the New button.

    5. In the New User Variable dialog, enter HOME in the Variable name: text box. Then enter the directory you want to use as the root directory of your Helix source installation in the Variable value: text box. For example:

      C:/source

      Note: The instructions given in this quick start assume that you have NOT included a directory name in your HOME variable that contains spaces. Including spaces in a Windows directory name is acceptable practice. However, if you do include directory names with spaces, you will have to include quotes ( " ) around the variable name in the syntax of the commands given in other parts of this document. It is easier just to not use directory names with spaces.

    6. Click OK to exit the New User Variable dialog and set the HOME variable. The HOME variable should now appear in the User variables for <username> text box. Click OK to exit the Environment Variables dialog, and OK to exit the System Properties dialog.

  6. (Windows only) Once you have created the HOME directory, you must set up a link in Cygwin to this directory. Use the following steps to set up the link:

    1. Go to your Windows Desktop and click on the Cygwin icon. This brings up the Cygwin terminal.

    2. The next step is to create a link between Cygwin and your home directory (set by the HOME environment variable). To do this, type the following commands:


      cd /

      changes directory to Cygwin's top-level directory
      mkdir home

      creates a directory called "home"
      cd home

      changes the directory to /home
      ln -s $HOME <myusername>

      creates a link in /home for your Helix user name (be sure to substitute your Helix user name for <myusername> in this example)

  7. In the HOME directory, generate a .ssh subdirectory. On Linux, Mac OSX, and other POSIX operating systems, and within the Cygwin terminal on Windows, type the following:

    > mkdir "$HOME/.ssh"

  8. Generate a public/private key pair using ssh-keygen. Use the following syntax on Linux, Mac OSX and other POSIX operating systems, and within the Cygwin terminal on Windows:

    ssh-keygen -t rsa -f $HOME/.ssh/helixid_rsa

    Do not use a password (that is, when prompted for a password, just press Enter to enter a blank password). Using the example syntax above, the file containing the private key is called helixid_rsa and the file containing the public key is called helixid_rsa.pub.

  9. Go to https://helixcommunity.org/account/editsshkeys.php (you will need to have an account on helixcommunity.org, of course) and enter the public key that you just created into the "authorized keys" window. Make sure that no line breaks are included. Once you have pasted in the public key, click the Update button.

    Note: If you are pasting the key from Notepad on a Windows machine, make sure not to copy and paste any special characters you might see at the end of the public key file (they will appear as little square boxes).
    Note: RSAv1 encryption is no longer allowed on helixcommunity.org. Please make sure you use either RSAv2 or DSA. Also note that if you use RSAv2 encryption, some clients such as OpenSSH create multi-line files. The format for RSAv2 keys in the "authorized keys" window is:
    ssh-rsa yourverylongkeyhere optional comment string

    The Helix server will soon accept your public key for the abovementioned public key authentication. If you have just created an account, it may take up to five hours to complete this process. For those that have had accounts for greater than five hours, SSH key updates take only a few minutes.

  10. Type in the following lines in your favorite text editor. These properties tell ssh to always use your Helix user name, even if your local login name is different:

    # work around a bug in winsock:
    # (this is only needed with cygwin ssh, but should do no harm with others)
    ConnectionAttempts=4
    # connect to helixcommunity.org:
    host=cvs.helixcommunity.org
    BatchMode=no
    CompressionLevel=9
    IdentityFile=~/.ssh/helixid_rsa
    User=myusername

    Note: Be sure to change "myusername" in the last line to your Helix community user name.

    Save the file with the name "config" in your $HOME/.ssh directory. On Windows, make sure your editor does not append a .txt extension to this file.

  11. Test to ensure ssh works correctly. Enter the following line on Linux, Mac OSX, and other POSIX operating systems, and within the Cygwin terminal on Windows:

    ssh -l myusername cvs.helixcommunity.org

    You should get a warning that the public key of cvs.helixcommunity.org is not known, and are asked if you want to add it:

    The authenticity of host 'cvs.helixcommunity.org (207.188.25.137)' can't be established.
    RSA key fingerprint is 8e:74:14:1b:55:db:93:f3:28:b8:95:1f:14:f7:bb:44.
    Are you sure you want to continue connecting (yes/no)?

    If the RSA key fingerprint number you get back from ssh matches the one above, enter "yes". You should see this:

    Warning: Permanently added 'cvs.helixcommunity.org,207.188.25.137' (RSA) to
    the list of known hosts.

    *******************************************
    Welcome to the Helix Community CVS Server

    This is a *** Restricted Shell Account ***
    You cannot execute anything here.
    *******************************************
    Connection to cvs.helixcommunity.org closed.

    If you see this, you could connect to the server. What it is trying to tell you is that you cannot open a shell there. That's OK.

    If you do not see this, add -v -v to the ssh command line (multiple instances of -v increase the verbosity of ssh), and look for these lines (names and numbers will be different, of course):

    debug2: key: /home/myusername/.ssh/helixid_rsa (0x100caeff)
    debug1: Authentications that can continue:
    publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Offering public key: /home/myusername/.ssh/helixid_rsa
    debug2: we sent a publickey packet, wait for reply
    debug1: Server accepts key: pkalg ssh-rsa blen 149

    This means that the Helix ssh daemon has accepted your public key and that ssh will continue with public key authentication. If you don't see these lines, give the Helix site more time to update your key. If you still don't see these lines, make sure that you entered the right public key on the key maintenance page.

    debug2: input_userauth_pk_ok: fp
    a2:45:81:22:ff:e9:eb:8a:8e:48:35:9d:20:26:01:00
    debug1: read PEM private key done: type RSA
    debug1: Authentication succeeded (publickey).

    This means that you are authenticated. If instead, you are asked for a password, something went wrong. You are now on your own. (Hint: make sure that your version of ssh can find your key file, and that it does not have a password set, or that you are using a program such as ssh-agent or pagent to manage the password).

  12. Enter the following command on Linux, Mac OSX, and other POSIX operating systems, and within the Cygwin terminal on Windows to ensure that cvs uses ssh (make sure that ssh is in your path):

    export CVS_RSH=ssh

  13. From your HOME directory, enter the following command to check out the new ribosome:

    cvs -d :ext:myusername@cvs.helixcommunity.org:/cvsroot/ribosome co build

    Again, be sure to substitute your Helix user name for myusername in this example.

  14. Set the BUILD_ROOT environment variable to the build subdirectory you just created by checking out the build system. On Windows, you can either set this globally from the Control Panel (set in the same location as the HOME variable described in Step 2), or use a Windows command prompt to enter the following syntax:

    c:/> set BUILD_ROOT=C:/source/build

    and on Unix in the bash shell this might look like:

    myusername@pi2[~]export BUILD_ROOT=/home/myusername/source/build

    and on MacOSX in the tshell this might look like:

    myusername@pi2[~]setenv BUILD_ROOT ~/source/build

  15. Add the bin subdirectory under BUILD_ROOT to your path. On Windows, you can either set this globally from the Control Panel (set in the same location as the HOME variable described in Step 2), or use a Windows command prompt to enter the following syntax:

    c:/source> set PATH=%BUILD_ROOT%/bin;%PATH%

    on Unix in the bash shell this might look like:

    myusername@pi2[~]export PATH=$BUILD_ROOT/bin:$PATH

    and on MacOSX in the tshell this might look like:

    myusername@pi2[~]setenv PATH $BUILD_ROOT/bin:$PATH
    
            

Once you have completed these steps, you can now begin the process of building the Helix community sources.

说明:第15步骤的时候,请在你的/home/yourusrname/下面把下载到的source拷贝进去

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值