wiki:GettingStartedWithDevelopment

Version 9 (modified by jdreed, 9 years ago) (diff)

--

Getting Started With Development

Before beginning development, you should have a workstation (or virtual machine) with Debathena installed. Unless you have a strong preference, we recommend starting with the highest version of Ubuntu supported by Debathena. As of Fall 2012, this is Ubuntu 12.04 (Precise). The instructions henceforth assume that you are using the newest Debathena packages, and a base distribution (Debian or Ubuntu) from at least 2008. You should install at least the debathena-standard metapackage, so that you can get Kerberos tickets and access the AFS filesystem.

Packaging Tools

Most of the tools used to create Debian (and thus Debathena) packages are available as part of Debian or Ubuntu. If you have Debathena installed, you can install the debathena-debian-dev package, which installs a number of packages required for building Debian packages.

Note: If you're following along on a stock Ubuntu or Debian installation, you'll need to install these packages: build-essential cdbs debhelper wdiff debian-el devscripts devscripts-el dh-make dpatch dpkg-awk dpkg-dev dpkg-dev-el equivs fakeroot linda lintian quilt sbuild

Build Environment

You should also create the file ~/.devscripts with the following contents:

DEBUILD_DPKG_BUILDPACKAGE_OPTS="-us -uc -sa -i -I"
DEBEMAIL="yourusername@mit.edu"
DEBFULLNAME="Your Full Name"
DEBCHANGE_AUTO_NMU=no
DEBCHANGE_RELEASE_HEURISTIC=changelog

(Note that if you end up getting involved in upstream Debian or Ubuntu development, you might consider punting the last two lines. They do make things easier assuming you're developing for Debian.)

The DEBUILD_DPKG_BUILDPACKAGE_OPTS options mean:

  • (-sa) Look for original source as a tarfile or create one.
  • (-us) Do not sign the source package.
  • (-uc) Do not sign the changes file.
  • (-i) Ignore common version control metadata files when creating diffs.
  • (-I) (previously -I.svn) Ignore [.svn] paths when creating tarballs.

You may also want a $HOME/.sbuildrc file containing the following:

  $nolog = 1;
  $mailto = 'yourusername';
  $log_dir = '/tmp/sbuild-logs';
  $maintainer_name = 'Debathena Project <debathena@mit.edu>';
  $force_orig_source = 1;
  $sbuild_mode = "user";
  1;

You should also set the environment variable DEBATHENA_APT to /afs/sipb.mit.edu/project/debathena/apt.