COMP8440: Lab1 - building tuxpaint
Lab Setup
As this is the first lab, you should carefully read the Lab Setup page and follow all the instructions on that page to get the FOSSD environment installed and running.
Next, if you have not already done so, you should join the comp8440 mailing list using your ANU student email account. Note that you will need to be able to receive email to that account while in the lab. You will find that the email icon in the main menu bar of your lab system can be setup for accessing your ANU mail account.
When you first join the list, please send a very short email to the list to make sure it is working.
Investigating tuxpaint
The aim of this lab is to build and install the TuxPaint project. The tuxpaint project has been chosen as it provides an illustration of some of the types of problems you are likely to run into with your own project.
During this lab we will be spending quite a lot of time running through the various steps below on the projector, while you follow along on your own system. If you run into trouble on your own system, then we will be able to display your screen on the projector, so we can work through the solution for the benefit of all the students.
The lab has a number of parts:
- Investigate the project
- Who wrote it?
- Who supports it?
- Where would you submit a bug report?
- Where would you get help?
- How do you get the source code?
- How active is development?
- Download the source code
- Build and install it
Downloading the code
The source code for tuxpaint can be downloaded in several different ways, each of which leads to a different level of difficulty in building the project.
If you have time in this lab, try to download and build via all 3 of the following mechanisms:
- Using the apt package manager
- Using a release tarball
- Using a source code management system
You should now carefully read the build tips page for instructions on each of these approaches.
What are the advantages and disadvantages of each approach?
Installing tuxpaint distribution binary packages
Linux distributions contain FOSS software binary packages. Distributors take the source code of lots of FOSS packages, compile them, package them and make them available for installation. Although the source code is available, most users don't need to access it.
- To install
tuxpaint
from a binary package, runsudo apt install tuxpaint
. - Once installed, run
tuxpaint
. Note the version number on the splash screen. - Quit tuxpaint.
Installing tuxpaint from distribution sources
Distribution source packages usually include a "pristine" source archive of the original upstream source code, along with some metadata and/or patches for building corresponding distribution binary package(s).
Run apt source tuxpaint
. Use ls
to see what has been downloaded. Also note that the downloaded files have been unpacked into a directory. Use cd
to change into that directory and have a look around.
Use the editor of your choice to edit Makefile
in this directory. Append something to the value of VER_VERSION
in this file. For example:
VER_VERSION:=0.9.22-hacked
Now build binary packages by running dpkg-buildpackage -b -nc
.
Find the created packages and install them (using dpkg -i
). This will cause the packages you installed earlier to by replaced by the ones you just built.
Now, run tuxpaint
and note the version number on the splash screen. Do you notice anything different?
Uninstall the tuxpaint packages:
sudo dpkg -P $(dpkg -l | grep tuxpaint | awk '{print $2}')
:-)
Installing tuxpaint from a tarball
- Download a tarball from the tuxpaint site
- Unpack the tarball
- Make a modification to tuxpaint, similar to that above
- Build and install
- Run
tuxpaint
Is it possible to un-install tuxpaint when it is installed this way?
Installing tuxpaint from git
- Use
git clone
to make a local copy of the tuxpaint git repository - Make a modification, similar to that above
- Build and install
- Run
tuxpaint
Source Code Management (SCM) Tips
You may find some of the tips on the SCM Tips page useful for this lab.
MAKE SURE YOU BACKUP
Make sure you do a backup at the end of the lab, or you may lose all your work.