Dpkg Arch Repository

This is written as a tutorial for users who haven't used Arch before. For those that have, the bits you already know have been seperated out into separate pages.

The Dpkg Archive

To access the Dpkg archive (as well as other people's), you need to register the location using the tla register-archive command. With most archives you just need to give it the path or URL where it can be found.

$ tla register-archive http://www.dpkg.org/htdocs/arch/scott@netsplit.com--2005/
Registering archive: scott@netsplit.com--2005

Inside the archive there's a fairly strict naming convention used to describe branches, <category>--<branch>--<version>. You can list the categories in an archive using the tla categories command.

$ tla categories scott@netsplit.com--2005
dpkg
planet
tla

Note that the category for Dpkg is simply dpkg, it generally refers to the name of the project you're placing in version control. Categories contain multiple branches, you can list them using the tla branches command.

$ tla branches scott@netsplit.com--2005/dpkg
dpkg--bzip2-support
dpkg--devel
dpkg--dists
dpkg--stable

Some branches such as devel are main line branches where patches are merged, stable are main line branches were only critical bug fixes are merged, and others such as bzip2-support are places to work on particular features without interfering with the main line. The dists branch is special, we'll talk about that right at the end.

Finally branches contain multiple versions, you can list them using the tla versions command.

$ tla versions scott@netsplit.com--2005/dpkg--stable
dpkg--stable--1.10
$ tla versions scott@netsplit.com--2005/dpkg--devel
dpkg--devel--1.13

Inside a branch you'll find revisions, which unsurprisingly can be listed with the tla revisions command.

$ tla revisions scott@netsplit.com--2005/dpkg--devel--1.13
base-0
patch-1
patch-2
  :
patch-49

The first revision in any branch is called base-0 and each subsequent revision is patch-N with N starting at 1.

Finally another useful command is tla abrowse which combines all of the above commands to give you an overview of the entire contents of an archive.

Developing Dpkg in Arch

Releases

Sometimes you want to get the revision corresponding to a particular release from Arch, rather than just downloading the appropriate source package or tarball.

These are recorded in configs in the special dpkg--dists--0 branch. Configs provide a convenient way to manage multiple branches and releases of a particular category or archive.

Check out the dists tree and have a look around.

$ tla get scott@netsplit.com--2005/dpkg--dists--0 dpkg
$ cd dpkg
$ ls
branches/  releases/  {arch}/
$ ls releases
1.10.22  1.10.23  1.10.24
$ ls branches
1.10  1.13
$ cat releases/1.10.24
dpkg-1.10.24    scott@netsplit.com--2005/dpkg--devo--1.10--patch-53

Within this directory you can obtain any dpkg branch or release using the tla build-config command without having to remember the actual branch or revision they refer to.

$ tla build-config releases/1.10.24
$ cd dpkg-1.10.24

$ tla build-config branches/1.13
$ cd dpkg-1.13

Bootstrapping from Arch - development branch

<!>

You'll need the autoconf, automake1.8 and gettext packages installed. Make sure that the automake alternative is set to the 1.8 version, and not 1.4.

After you've checked out either the development branch or a development release (1.13+), you simply need to run the autoreconf command to put together the build infrastructure:

$ tla build-config branches/1.13
$ cd dpkg-1.13
$ autoreconf --install
$ ./configure
$ make -fMakefile.maint package

The package target will generate source and binary packages and place them in the current directory along with the changes file. You can pass target options with the TARGET_ARGS variable, any other dpkg-buildpackage options with the DPKG_BUILDPACKAGE_ARGS variable and any arguments to lintian (if you have it installed) with the LINTIAN_ARGS variable.

$ make TARGET_ARGS=-S -fMakefile.maint package
$ ls *.changes
dpkg_1.13~_source.changes

$ make TARGET_ARGS=-aia64 DPKG_BUILDPACKAGE_ARGS="-uc -us" LINTIAN_ARGS=-i -fMakefile.maint package

Alternatively you can simply use make and make install to install dpkg as an ordinary piece of software without packaging it first.

Bootstrapping from Arch - stable branch

<!>

You'll need the autoconf and gettext packages installed.

The stable branch and releases (1.10.x) are unfortunately not as easy to bootstrap, you'll still need autoconf and gettext installed. Once you've checked out the source, you need to run the autogen.sh script in the source directory:

$ tla build-config branches/1.10
$ cd dpkg-1.10
$ ./autogen.sh --copy

The first time you run this, it will fail because po/Makefile.in will end up referenced in configure.in twice. Edit configure.in, near the bottom there's the AC_OUTPUT macro call and it'll have two occurances of po/Makefile.in in there; delete one of them.

/!\

Bugs on this will be closed, it's fixed in 1.13.

You can now run autogen.sh again:

$ vi configure.in
$ ./autogen.sh --copy
$ ./configure

If you make a source package within this directory, it'll end up containing all sorts of control files. The release.sh script deletes most of them, but be warned, you'll need to do a fresh checkout afterwards. The script doesn't account for Arch control files, so you need to delete those manually.

$ ./release.sh
$ rm -rf {arch}
$ find . -name ".arch*" | xargs rm -rf
$ dpkg-buildpackage

Further Reading

This is only intended as a quick way to get you up and running, if you want to learn more about Arch and some of its more powerful features, or just want a tutorial from a different angle, some of the following URLs are useful.

A list of all Arch commands is available using tla help. All commands will give a summary of their options if the -h parameter is given, and more detailed instruction in their usage if -H is given.

dpkg: ArchRepository (last edited 2005-03-11 10:24:53 by ScottJamesRemnant)