Release Notes for version 0.1.1

Joe Desbonnet, 27 Mar 2005

This software is being released under the terms of the GPL v2 license. The distribution also incorporates several libraries under similar licenses: Velocity Template Engine, JBDiff (Java port of bsdiff algorithm) and javaxdelta (Java port of the xdelta algorithm).

This is currently just a proof-of-concept demonstration and there are many limitations which will be addressed in subsequent releases. Some of the more obvious limitations:

Any feedback will be greatly appreciated. In particular I'm looking for feedback on the nomenclature used ('delta' vs 'diff', 'proxy server' vs 'virtual repository' etc). The format of the delta repository and the schema of the delta.xml manifest file.

Changes since version 0.1.0

Installation

The current version of this software relies on the Jakarta Tomcat servlet container. If you do not already have this installed you will need to download it from: http://jakarta.apache.org/. Tomcat version 4.1.31 is recommended. Other servlet containers should work also but the installation details may vary.

If you do not have a Java VM installed, download JDK 1.4.2 from Sun: http://java.sun.com. This software should work with other Java VMs but it has only tested with Sun Java.

In the distribution archive are several files including:

Copy RPMDC.war into the Tomcat webapps directory and restart the server.

Open a browser on the home page: eg http://localhost:8080/RPMDC/. Click on server administration and set the delta repository, updates repository and local RPM locations. The delta repository can be located on a web server (http:// prefix) or on the local file system (file:// prefix).

You can now test the operation by going back to the home page and clicking on Browse Virtual Repository.

Testing

I have made a delta repository for the Fedora Core 3 distribution at http://rpmdelta.wombat.ie/rpmdelta/fc3/i386/. This is a small virtual server with limited space and bandwidth, so it's only provided as a sample repository during the test phase of this software.

For testing I recommend that you build your own repository. See details below.

To test you need to make a directory with all the FC3 RPMs from the original distribution. You can make this by copying /media/cdrom/Fedora/RPMS/* from the 4 distribution CDs or by downloading all the RPM files at http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/ as follows:

wget --mirror ftp://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/

Edit /etc/yum.conf. In the 'updates-released' section of the file change the baseurl to baseurl=http://localhost:8080/RPMDC/repo/pub/fedora/linux/core/$releasever/$basearch/os/ (ie replace 'download.fedora.redhat.com' with 'localhost:8080').

Creating a delta repository

To create a delta repository you need the following:

The creation and maintenance of the delta repository is currently accomplished with a command line tool. A GUI frontend is being considered for the next release.

Copy rpmdc.jar to a convenient location. Set this directory to be your current working directory. Use the following command line:

java -Xmx200m -jar rpmdc.jar   orig-dist-dir   updates-dir   delta-dir

The -Xmx200m java switch allows Java to assign up to 200MBytes of heap space. This is needed for the jbdiff/bsdiff algorithm. Do not set this value to be any higher than the amount of RAM on your computer.

Optional switches are:

Example:

java -Xmx200m -jar rpmdc.jar ./fc3dist ./fc3updates ./deltas --latest-updates-only --no-clobber --ignore-packages=Omni,Omni-foomatic

Note: the repository builder will not save any deltas that do not yield a saving of more than 5%. This threshold is currently hard coded.

Delta Repository Format

The target RPM is defined as the update RPM for which a request is made. Example mypackage-1.0-3.i386.rpm. The source RPM is defined as an RPM to which a delta is applied (usually an RPM in the original distribution, eg mypackage-1.0-1.i386.rpm).

For each target RPM a directory is created. The directory file name is the name of the target RPM with the ".rpm" suffix removed.

The target directory can hold zero or more deltas which can be applied to various source RPMs. A file called deltas.xml provides metadata about each delta in the directory.

Example: mypackage-1.0-1.i386.rpm in the original distribution. Two updates are released some time later: mypackage-1.0-2.i386.rpm and mypackage-1.0-3.i386.rpm. The repository files for these updates will be as follows:

The deltas.xml file looks like this:

<?xml version="1.0"?>
<delta-manifest version="0.1">
<delta 
	file="mypackage-1.0-1.i386.jbdiff"
	size="1234"
	algorithm="jbdiff" 
	source="mypackage-1.0-1.i386.rpm"
	target="mypackage-1.0-3.i386.rpm"
	target-size="456789"
/>
<delta 
	file="mypackage-1.0-2.i386.xdelta"
	size="1211"
	algorithm="xdelta" 
	source="mypackage-1.0-2.i386.rpm"
	target="mypackage-1.0-3.i386.rpm"
	target-size="456789"
/>
</delta-manifest>

Related Projects