The csup Project

Status

The csup project is now officially completed. This tool has proven to be a solid CVSup replacement for checkout-only functionality, and is now being shipped along with the FreeBSD operating system, since FreeBSD 6.2-RELEASE. It still misses a few features that CVSup offers, such as CVS mode and authentication, but those are not necessary if all you want to do with it is update your FreeBSD source tree or ports tree.

Special thanks to the people who sent me money and thus made this possible.

News

18 Mar 2006
The 20060318 snapshot is here, it fixes a bug with signal handling under Linux. Grab it in the download section.
13 Mar 2006
A new snapshot has been released and is available in the download section. This snapshot adds support for the -d and -k options, fixes some build problems under FreeBSD 4.x and DragonFlyBSD, adds a thread-safe cache for UID/GID lookups, fixes parsing refuse files when they contain whitespace, and also fixes various other bugs.
02 Mar 2006
A new bugfix snapshot is available in the download section. It mostly fixes csup under NetBSD and some other minor bugs.
01 Mar 2006
Today's new snapshot is hot! Get it in the download section. In a nutshell: refuse files are now supported, as well as the -i and -A options, and a few bugs have been fixed. We're now pretty much feature complete as far as we don't try to use CVS mode and I will import csup in the FreeBSD base system hopefully very soon.
25 Feb 2006
Yet another new snapshot available in the download section. This one fixes a bug I introduced in 20060223 that could cause repeated "Delete" commands when the files are already gone.
24 Feb 2006
I have uploaded a new snapshot today, mostly to fix a bug that was introduced in the last one, where we would not retry to connect to the server if it has rejected us. Grab it in the download section. Also, if you're a Darwin user, csup is now available in the DarwinPorts collection.
23 Feb 2006
I've been a bad boy and forgot to update this website during a few new snapshot versions, but this is now repaired and a new snapshot is available. This version should be much more robust than previous versions. It supports fixups in case of MD5 checksum errors, handles synchronous or asynchronous errors correctly, and much more. Follow these links for detailed changelogs: here, and here, and grab the new snapshot in the download section.
04 Feb 2006
A new day, a new snapshot... This one fixes many, many things: csup now really works on FreeBSD 4.x and other systems with a pre-C99 compiler, we now always create files and directories with correct permissions, and we respect the umask setting of the collection for directories too, status file errors are correctly handled and the usual code improvements and various fixes. Please grab this new snapshot in the download section, or update your FreeBSD port and report any problem.
03 Feb 2006
Yet another new snapshot, this time bringing support for the "list=suffix" option in the supfile, new -4 and -6 switches to force usage of IPv4 or IPv6 and many bugfixes. It is available in the download section, and the FreeBSD port has been updated.
02 Feb 2006
A new snapshot is available in the download section, featuring many bugfixes and code improvements, a manual page and better performance. My tests have shown that csup is now faster than CVSup, but more benchmarks would be welcome. The FreeBSD port has been updated as well.
28 Jan 2006
I have just committed a port for csup in the FreeBSD ports tree. It's available under net/csup. This should help me get a wider audience for testing while I fix the remaining rough edges in csup. Enjoy!
27 Jan 2006
When working on the keyword expansion code, I have introduced a subtle bug that broke at least updating FreeBSD sources from RELENG_6_0 to HEAD. This bug is now fixed and the snapshot in the download section has been updated.
26 Jan 2006
I have been working on portability issues the last few days and csup now builds fine under Linux and Darwin. Let me know if it doesn't work for you. I have also rewritten the keyword expansion code so that it properly handles binary lines, which allowed me to remove the ugly workarounds introduced recently, and to properly handle a binary file containing RCS tags with expansion enabled (should that ever happen). Oh, and as usual, I have uploaded a new snapshot in the download section.
23 Jan 2006
Well it seems the bug happening when updating binary files is fixed now. What I committed is an ugly workaround, but it should work as long as we don't have binary files with actual RCS tags in it (such as $Id$), which should be quite rare. Anyways, thanks to this fix it is now possible to update from RELENG_6 to -CURRENT without any problem. I am not aware of any other bug in the diff updating code for now. Grab the new snapshot in the download section!
22 Jan 2006
I've finally found the time to finish and commit the code to support the status file in csup. Sometimes, being unemployed is a good thing :-). This means that csup is now much faster than before. I haven't done any benchmarking yet, but it should be as fast as CVSup. I have updated the snapshot in the download section so please let me know how it works for you. I will now concentrate on polishing this code and fixing a bug where csup gets confused trying to update a binary file. Once this is done, it will be time to add csup to the FreeBSD ports tree.

About

CVSup® is a software for distributing and updating collections of files accross a network. It can efficiently and accurately mirror all types of files, including sources, binaries, hard links, symbolic links, and even device nodes. In addition to being a great general-purpose mirroring tool, CVSup includes special features and optimizations specifically tailored to CVS repositories. It is being used as the preferred way to update sources within the FreeBSD, NetBSD and OpenBSD projects, and by many more projects such as PostgreSQL. It is written in Modula-3 and has been developed by John Polstra <jdp@polstra.com>.

csup is a rewrite of CVSup in C. One could rightfully wonder why we bother doing this; CVSup is fast, comes with full sources under a BSD license, and has proven to be a very robust software throughout years. This is not a religious language war; Modula-3, with its built-in threads support and other features fits perfectly for writing such a tool. What prompted this work is that the Modula-3 runtime environment has not been ported to all the architectures supported by the various *BSD projects, and it is becoming increasingly harder to find people for maintaining the code. Furthermore, having a C version of CVSup would allow us to put it in the base FreeBSD distribution instead of shipping it as a separate package.

For now, work has only started on the client, and it is not yet finished. Only checkout mode works, so you can't use csup to fetch a complete CVS repository yet. You can download a snapshot of the code below, or obtain the source code CVS.

Download

The latest snapshot of the source code is available here: csup-snap-20060318.tgz.

This project is now hosted on the FreeBSD anonymous CVS repository. You can find information about how to access this repository and what are the different mirrors available here. The module to checkout is named csup. If you wish, you can also browse the source code via the CVSWeb interface available here.

Building csup is straightforward, read the instructions in the README file.

This code has been successfully tested on a wide range of architectures (x86, amd64, sparc64, alpha, ia64, arm and ppc) and with various different threading libraries (libc_r, libthr and libkse libraries) under FreeBSD. It should also compile and run fine on any *BSD system as well as Linux and Darwin, although less testing has been done there. Of course, I am interested in knowing if it doesn't work on your system, especially if you attach a patch to your mail.

Contact

If you are interested in helping out with the development of csup, you should take a look at the TODO file contained in the tarball. A lot of work is still needed to complete this project, and any help is welcome. However, be aware that this project requires strong C skills, a good knowledge of the POSIX standards, and the ability to deal with multi-threaded applications. My name is Maxime Henrion and you can send me an e-mail here if you have questions, or better, patches :-). Please don't hate me if it takes me some time to answer you.

If you can't code but wish to support this project, please make a donation so as to help me finish implementing missing features in csup. My Paypal id is mux@FreeBSD.org.

Copyright © 2005 Maxime Henrion <mux@FreeBSD.org> | CVSup is a registered trademark of John D. Polstra