README.CVS

From XastirWiki
Jump to: navigation, search

Contents

CVS Instructions

For those who think CVS might be a bit too complicated to deal with, here are (I think) the minimal commands. See the "SUDO" section below though for ideas on how to make updating Xastir even simpler.


Initial CVS Checkout

  • Create a ".cvsrc" file in your home directory containing the following lines. Use whatever Unix-type editor you're comfortable with. Choices might be pico, vi, emacs, others:

        ##cvs -z3
        update -P -d
        status -v
        diff -u
These are just some of the CVS options that I prefer, and make some things easier. They are not required.
The "cvs -z3" option isn't accepted by SourceForge currently. Comment it out by adding a couple of '#' marks in front of the line. You can test it at a later date by removing the '#' marks and trying a cvs command.
  • Start up a shell window of some type, perhaps an xterm or an rxvt. Type the following commands into this one shell. You'll be setting an environment variable which will then allow you check out the full sources for the first time. After that, the environment variable won't be needed anymore and all shells you use will be able to work with the remote CVS repository. The checked-out sources contain administration info which the CVS commands use to know which remote server to talk to, and which account/encrypted password to use from your ~/.cvspass file.
For those that are Internet-challenged, here are the two commands, customized for the Xastir project:
         cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir login
Press the <ENTER> key when it asks you for a password. That creates a ".cvspass" file in your home directory with the anonymous login information inside it.
         cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co xastir
That creates a subdirectory called "xastir" that has all the latest sources in it.
You may want to use this instead, to get the sources corresponding to the latest release:
      cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co -r RELEASE xastir
or use this line to get the latest version deemed "stable" by the developers (generally newer than the RELEASE version):
      cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co -r STABLE xastir

All done! You now have the latest development sources on your computer. Now you can forget about all of the previous instructions unless you delete the entire tree and want to start over from scratch.

Note that if you choose the "RELEASE" or "STABLE" tags, those tags will become sticky, so that "cvs update" commands will update to the latest versions of files containing those tags. If you wish to remove this sticky option so that you can synchronize to a different tag or the latest developer's CVS, see the "cvs update -A" command below.


CVS Commands for Maintaining the Current Development Sources

Once all this is in place, just cd into the "xastir" directory at any time, type "cvs update", then type "make install" and you'll have the latest development stuff installed on your system.

Here are the commands to do if you want a clean build of the latest sources, and want configure to recheck all the libraries and header files that Xastir needs:

        cd xastir
        cvs update (snag all the latest changes)
        ./bootstrap.sh
        ./configure
        (make clean;make -j3 2>&1) | tee make.log
        su
        make install (make install-strip can be used after the first time,
                      it removes debugging info from executable)
        chmod 4555 /usr/local/bin/xastir (only needed if using kernel AX.25)
        exit (from root)
        xastir

Note that you'll need autoconf 2.53 or newer and automake 1.6.3 or newer in order to run the "./bootstrap.sh" script.

For the "cvs update" line, you can also choose which version to update to, just like the "cvs co" lines shown above:

      cvs update -r RELEASE
    or
      cvs update -r STABLE

Once you specify a revision tag (RELEASE or STABLE), that option becomes "sticky" for future checkouts and updates. That means you only need to type "cvs update" in order to update your code to the latest sources containing that tag.

      cvs update -A

will make the cvs update command track to the most recently submitted versions again (will make the RELEASE or STABLE options un-sticky). To review:

      cvs update -A            # To get to developers sources.
      cvs update -r STABLE     # To get to latest stable sources.
      cvs update -r RELEASE    # To get to latest released sources.


Even more CVS commands (most people won't need these)

I use these aliases the most (defined in my bash shell startup files):

      alias cvsdiff='cvs diff -w -r HEAD'
      alias cvsstat2='cvs -n -q update'
      alias cvsstat3='(cvs status 2>&1) | grep -E "Status: | Examining" | grep -v Up-to-date | grep -v Makefile.in'

to see if anything has changed. cvsstat3 is the most useful one for me as a developer. If anything has, I can use this alias to see the details on a particular file:

        alias cvsdiff='cvs diff -w -r HEAD'
    As in:
        cvsdiff main.c
        -or- (not using the alias)
        cvs diff -w -r HEAD main.c

Then perhaps do an update on that file alone:

        cvs update main.c

There are many more CVS commands and options. Many of them are more of use to the developers than the users. The above should be enough for most people to keep their copies in sync with the latest CVS development sources.

Notes:Sudo

Navigation
Related Advertisements
Personal tools