9.6 Incremental Update

With the image description diff tool (xdscr) included in the Novell Linux Point of Service 9 Patch Release and later releases, you have the ability to perform an incremental update of a client image. This feature lets you update the software on a Point of Service terminal without downloading an entire new image from the Branch Server. It is designed to make it easier to update your client images when new RPM modules or patches are released.

NOTE:In Novell Linux Point of Service 9 SSP3, a new --delta option was added to the xscr command to perform the same functionality as the xdscr command.

The process of doing an incremental update can be divided into three main steps:

9.6.1 Creating the Delta Image File

The command used to create the delta image files compares two images and builds a tarball containing a list of RPMs that need to be updated, a tarball checksum file, and a script to install the updated RPMs.

Before you run the command, you must create an updated image with your build distribution list pointing to the new software. To do this, follow the instructions in Section 9.4, Building Images with xscr.

After you have created the updated image, run either of the following commands to create the delta image file:

xdscr --image old_image --with new_image --destdir directory

or

xscr --delta --image old_image --with new_image --destdir directory

Specify the image names in the format image_name-version; for example, minimal-2.3.10. You can abbreviate the options as follows:

  • Substitute -i for --image
  • Substitute -w for --with
  • Substitute -d for --destdir

For example, the following command compares the minimal-2.3.10 Image Description Tree with the browser-2.3.10 Image Description Tree and saves the diff file to the /home directory:

xdscr -i minimal-2.3.10 -w browser-2.3.10 -d /home

The following is an excerpt from the resulting diff file:

#!/bin/bash ##Automatically generated by xdscr image diff tool # /opt/SLES/POS/dist/NLD9/SP3/CD1/suse/i586/rsync-2.6.2 -8.18.i586.rpm # /opt/SLES/POS/dist/NLD9/FCS/CD1/suse/i586/libtool-1.5.2 -56.2.i586.rpm # /opt/SLES/POS/pac/IBMJava2-JRE-1.4.2-0.68.i586.rpm # /opt/SLES/POS/pac/IBMJava2-JAVACOMM-1.4.2-0.21.i586.rpm rpm -Uh rsync-2.6.2-8.18.i586.rpm \ libtool-1.5.2-56.2.i586.rpm \ IBMJava2-JRE-1.4.2-0.68.i586.rpm \ IBMJava2-JAVACOMM-1.4.2-0.21.i586.rpm

In addition to the diff file, a tarball delta file and an MD5 file for the delta image are saved in the destination directory. The delta and MD5 filenames begin with delta- and contain the names of the old and new image files, followed by the date in the form yyyy-mm-dd and the appropriate extension (.tar and .md5). The diff filename begins with diff- and ends with the date.

NOTE:Both old and new image files must contain the RPM database in order for the delta image to be created successfully. By default, Minimal images have the RPM database stripped out. Before creating a delta image of an existing Minimal image, re-create the image using the --keep-rpm option and specify the resulting image as the old image in the xdscr command.

You can also use build distribution lists as inputs instead of the actual image files.

9.6.2 Adding the Delta Image Object in LDAP

The next step after creating the delta image is to add a corresponding object in the LDAP directory. This includes adding a new scPosDeltaImage object and setting the scPosDeltaImageDn attribute on the appropriate scCashRegister object.

Adding a New scPosDeltaImage Object

Use the posAdmin command to add a new image object in LDAP for the delta image. The syntax of the command is as follows (type the command all on one line):

posAdmin.pl --user admin_user --password password --base base_dn --add --scPosDeltaImage --cn common_name --scImageName name --scImageFile tarball_filename --scBsize size

For the --cn and --scImageName options, choose a short descriptive name that identifies the delta image. For --scImageFile, use the tarball filename without the date. For --scBsize, use the value displayed at the end of the .md5 file.

For example, to add an object for a delta image tarball file named delta-minimal-2.3.10-browser-2.3.10-2006-08-06.tar, enter the following command:

posAdmin.pl --user cn=admin,o=novell,c=us --password secret --base cn=default,cn=global,o=novell,c=us --add --scPosDeltaImage --cn minimal_browser_delta --scImageName minimal_browser_delta --scImageFile delta-minimal-2.3.10-browser-2.3.10.tar --scBsize 8192

Setting the scPosDeltaImageDn Attribute

Use the posAdmin command to set the scPosDeltaImageDn attribute on the scCashRegister object that the Point of Service terminal is associated with. The syntax of the command is as follows (type the command all on one line):

posAdmin.pl --user admin_user --password password --base base_dn --modify --scCashRegister --multival --scPosDeltaImageDn ’image_dn’ --DN crtype

For image_dn, specify the DN of the scPosDeltaImage object, enclosed in single quotes. For crtype, specify the DN of the crtype object you are modifying.

For example, to set this attribute for the delta image object created above, enter the following command:

posAdmin.pl --user cn=admin,o=novell,c=us --password novell --base cn=default,cn=global,o=novell,c=us --modify --scCashRegister --multival --scPosDeltaImageDn ’=>cn=minimal_browser_delta,cn=default,cn=global,o=novell,c=us’ --DN cn=crtype3,cn=global,o=novell,c=us

9.6.3 Copying the Delta Image Files to the Branch Server

To get the new delta image files to the necessary Branch Server, you must first rename the tarball and checksum files and copy them to the /opt/SLES/POS/rsync/image directory on the Admin Server. From there, you can distribute them to the Branch Server in the usual way.

  1. Rename the .tar and .md5 files for the delta image by removing the date portion of the filenames.

    For example, if the tarball file is named delta-minimal-2.3.10-browser-2.3.10-2006-08-06.tar, rename the file to delta-minimal-2.3.10-browser-2.3.10.tar.

  2. Copy the renamed delta image files to the /opt/SLES/POS/rsync/image directory on the Admin Server.

    For example, to copy the delta image files mentioned in Step 1, enter:

    cp delta-* /opt/SLES/POS/rsync/image

  3. On the Branch Server that the Point of Service terminals get their boot information from, run the following command to download the new image files to the Branch Server:

    possyncimages.pl

  4. On the Branch Server, run the following command to have the Branch Server update the configuration files for the Point of Service terminals on its subnet:

    posldap2crconfig.pl --dumpall

The next time the Point of Service terminals reboot, linuxrc detects the delta image files and automatically installs the updated RPMs after loading the base image.