Building Release Tarballs
|Release tarballs are the Bzip2-compressed TAR archives of the Audacity source code which we release via SourceForge for every Audacity release.
Who uses them
They are used by three groups of people:
- People interested in looking at and analysing the Audacity source code
- People creating packages for Linux distributions like RPMs, DEBs and so on.
- End-users on Linux and Unix systems who can't use a pre-compiled package because one doesn't exist or is not suitable for their needs.
These different users have slightly different needs, and all of them differ from the needs of the development team, which largely determine the layout of the Audacity CVS repository. For a walk-through of actually creating a release tarball, skip to Step by Step at the bottom of the page. The stuff inbetween is mostly rationale and explanation.
What to include
The rationale for deciding what goes in release tarballs was worked out roughly as follows: For Full Source tarball:
- Anything in Audacity CVS needed to build Audacity (as released in binary form) on a bare system is included.
- This means all the dependencies except wxWidgets (which isn't in CVS).
For Minimal Source tarball:
- Anything for which Audacity CVS is the upstream source and which is needed to build Audacity, goes in.
- Anything which is patched in Audacity CVS such that the upstream version is not sufficient to build Audacity, goes in.
- Anything else doesn't.
The differences between the two tarballs are standard packages which are either optional (most of them) or assumed to be obtained via the system's package manager from their upstream source.
In practise this means that most of lib-src (except things too new to be used in releases or too old to be supported) goes into the Full tarball, but only the few Audacity-supported bits go into the Minimal tarball.
Any generated files, editor droppings and CVS droppings are removed from the source tree to minimise the size of the tarball, as these files are not needed at any time but left over from previous development work. All the CVS/ directories are removed because they are only needed to use version control, not to compile anything. A purge of symlinks and other library files known to be left behind by the build system is done, as they have caused problems in the past (although the build system should clean them up itself when make distclean is run).
To clear out all compiled files and executables, make clean and make distclean are run through the whole file tree to remove anything previous makes may have run. This also runs maintainer mode rules in Automake based projects in order to ensure that the shipped files have the correct timestamps on Makefile.in and configure files to stop Automake being run when the tarballs are built on end user's systems (when it often doesn't work).
Step by step
Luckily for you, the process of creating release tarballs is almost completely automated by the maketarball.sh shell script. These instructions assume you are using a Unix-like system where files have <CR> line endings, and a bourne-compatible shell is available. If this is not the case, then you are likely to encounter problems.
- Start from an up to date CVS checkout. Make sure that you don't have locally modified files, conflicts or other issues in the local copy before you begin. Make sure that redundant directories have been pruned by using the -P and -d flags to CVS. There is some help with CVS commands here.
- Make sure that the top level Makefile exists. If this is a fresh checkout, then you need to run configure. It doesn't matter what options you choose, and you don't need to run make, but the Makefile is needed later on.
- Change directory to the top level of the CVS checkout, if you aren't there already.
- Run ./scripts/maketarball.sh quiet to generate a new directory containing all the files that will end up in the tarball. The directory will be created alongside the CVS checkout directory, and named audacity-src-x.y.z where x.y.z is the version number which is automatically extracted from the Audacity source code. The quiet argument keeps the amount of output produced under control, whilst still providing some progress indication. It can be replaced with verbose to see the full file-by-file output.
- If you observe any error messages, then stop and check what has happened. You can ignore any make errors that make ignores, i.e. ones about distclean and clean targets not existing.
- Change directory up one level out of the CVS checkout directory, and run tar cjf audacity-src-x.y.z.tar.bz2 audacity-src-x.y.z to create a tarball from the directory structure.
- Change directory into the release structure, and check that it can be configured and compiled successfully.
- If you have to make changes, then remember to copy them back to your CVS tree and commit them before deleting the tarball and release structure and starting again.
- If the tarball compiles successfully for you, then upload it so other people can test it before release.