Building Release Tarballs

From Audacity Wiki
Jump to: navigation, search
Release tarballs are compressed .tar.xz archives of the Audacity source code which we offer for download from FossHub at every Audacity release.


Contents

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 Git repository. For a walk-through of actually creating a release tarball, skip to Step by Step at the bottom of the page. The stuff in between is mostly rationale and explanation.

What to include

We only release a Minimal Source tarball at the moment.

The rationale for deciding what goes in the tarball was worked out roughly as follows:

For Minimal Source tarball:

  • Anything for which Audacity Git is the upstream source and which is needed to build Audacity, goes in.
  • Anything which is patched in Audacity Git such that the upstream version is not sufficient to build Audacity without it, goes in.
  • Anything else doesn't.

When we had a Full tarball, the differences between the two tarballs were 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 practice this means that only the few Audacity-supported bits of lib-src go into the Minimal tarball.

Cleaning up

Any generated files, editor droppings and Git 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. At this time, one hidden file (.travis.yml) is included in the tarball. 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.

  1. Prerequisites: The script requires the unix2dos utility in dos2unix (get the zip version if you download it) in addition to standard stuff like tar and xz. The make distclean can require various different old versions of automake for different packages. I know at least version 1.10 is required. Probably not a bad idea to install all old versions made available by your distro. You will also need gperf to generate frametype.c in libid3tag (this sometimes works without gperf for some reason, but sometimes fails, so install it to be safe) and autogen to build.
  2. Start from an up to date *clean* git clone from https://github.com/audacity/audacity. Make sure that you don't have locally modified files, conflicts or other issues in the local copy before you begin. This includes making sure you don't have, for example, local patch files lying around. Even if they are not added to git they will get wrapped up in the tarball when the script is run.
  3. Change directory to the "audacity" directory that the git clone created.
  4. Look in src/Audacity.h to see what version and suffix are currently set. These will determine the name of the source tarball, so if necessary change them to define the tarballs you are trying to create.
  5. 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 git cloned directory, and named audacity-minsrc-x.y.z where x.y.z is the version number which is automatically extracted from the Audacity source code. The actual tarball, named "audacity-minsrc-x.y.z.tar.xz" will also be created. 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. When running for the first time it's not a bad idea to run with verbose, because in quiet mode stderr is directed to /dev/null for many commands. You may see a note that the Makefiles are not up to date, and the script will rerun configure. This is fine.
  6. 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.
  7. Change directory into the release structure (../audacity-minsrc-x.y.z).
  8. Before configuring, make sure that no unwanted '.deps' directories exist with 'find . -name ".deps"'. In tests in July 2015, a ./lib-src/mod-nyq-bench/.deps folder was found after running the maketarball script. If you have .deps directories, you may need to to install more recent versions of automake, because make distclean is failing.
  9. Now run ./configure then make to ensure the tarball can be configured and compiled successfully.
  10. If you have to make changes, then remember to copy them back to your git tree and commit them before deleting the tarball and release structure and starting again.
  11. If the tarball compiles successfully for you, then upload it so other people can test it before release. If you are making a 'Release Candidate', name it audacity-minsrc-2.X.Xrc1.tar.xz, for consistency with others.
Personal tools

Donate securely by PayPal, using your credit card or PayPal account!