Creating an independant XiVO Debian GNU/Linux repository from scratch (part 2/4)

A previous attempt was interrupted because it was impractical to create dependencies between XiVO packages manually. A new version of the packaging-farm was released to address this problem. A new attempt was made and more packages were produced for the lenny i386 gallifrey repository and the squeeze x86_64 skaro repository. The issues found will be addressed before another attempt is made.

Source package dependencies

package depends on the
package. Therefore, when misdn-kernel is updated, it may be necessary
to rebuild the misdn-user package. There are no standard Debian
GNU/Linux tools to compute the dependency graph between two source packages. And it’s not as
trivial as it seems, mainly because a source package creates one or more binary packages.
For instance misdn-user depends on misdn-headers which is created by the misdn-kernel package.
A script was
created to compute the source package dependencies. Its input is a set of debian/control files
and its output is a set of Makefile rules such as:

misdn-kernel ::
misdn-user ::  misdn-kernel

Note the :: which allows for additional dependencies to appear later in the Makefile. This
graph is abstract and would not be of any use unless it is associated to actions such as:

misdn-kernel :: /var/cache/packaging-farm/depends/misdn-kernel
/var/cache/packaging-farm/depends/misdn-kernel :: /var/cache/packaging-farm/sources/misdn-kernel/*/debian/control
        packaging-farm --cd misdn-kernel all
        touch $@

The script creates
the above snippet for each package. The packaging-farm --cd misdn-kernel all command creates all the packages
for misdn-kernel. If it succeeds, the /var/cache/packaging-farm/depends/misdn-kernel timestamp is updated
and the package is considered up to date. When a newer version of the package is uploaded to the /var/cache/packaging-farm/sources/misdn-kernel
directory, the /var/cache/packaging-farm/sources/misdn-kernel/*/debian/control file will have a modification
time more recent than the timestamp, thus triggering the rebuild of all depending packages in the graph.

The last set of lines created by are source lists that allow each package to gain access to the
most recently built version of the other packages:

define debian_SOURCE_LIST_APPEND
echo "deb http://localhost/packaging-farm/misdn-kernel/gnulinux/debian/${ARCHITECTURE}/${DISTRIBUTION}/src ./" >> $$source_list ; \\
echo "deb http://localhost/packaging-farm/misdn-user/gnulinux/debian/${ARCHITECTURE}/${DISTRIBUTION}/src ./" >> $$source_list ; \\
: finished

It would be tempting to ensure that each package is given the source list it needs and nothing more. However, unless
the number of packages handled on a single packaging farm grows over 100, it is probably overkill. There are less
than 50 package currently in XiVO.

A new version of packaging-farm was published today, including support for
dependencies, so that it can be used to continue building a standalone XiVO repository.

XiVO repository for i386 and x86_64

With the newer installation of the packaging-farm including dependency handling, another attempt to create
a i386 based gallifrey repository for lenny was made. For each package a command similar to

packaging-farm misdn-kernel

was run. It is using the dependency graph to build the package and all the packages it depends on before it.
In the end a few packages could not be built. Some of them because of trivial dependency problems that
were reported to Nicolas Hicher who agreed to fix them momentarily.
Another, more serious, is found in the sangoma-wanpipe package. It relates to the fact that it pulls dependencies
based on the kernel flavor. The native host is amd64 / x86_64 based and it fails when attempting to build in a i386
chroot. There probably are workarounds already implemented and looking into pbuilder is probably the best lead.
The i386 gallifrey repository now
contains more packages and there should be no major obstacle to complete it once the dependency and architecture problems
are resolved.
Nicolas Hicher is almost done with porting the skaro XiVO packages to squeeze. An attempt was made to build
them for x86_64. The result is still incomplete but it should run when the last dependency problems are resolved.