Novell Home

Heads Up: Updating SLE10 product info via ZLM 7.2 SLE10-SP1-Online-Bundle after upgrading to SLE10 SP1

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 25 Jul 2007
 

Here's an important piece of information for those of you using ZENworks Linux Management 7.2 to upgrade to SUSE Linux Enterprise 10 SP1. There's an issue where SLE10 does not appear to be upgraded to SLE10 SP1 when using ZLM 7.2 SLE10-SP1-Online-Bundle. When you use the "rug pd" command, it indicates that SLE10 has not been upgraded to SLE10 SP1.

Here's the workaround.

In ZCC edit the SLE10-SP1-Online-Bundle to add the following script as a post-installation script:

---------------------------------------------------------------------------------
#!/bin/sh
for file in `ls -1 /var/lib/zypp/db/products/` ; do
    if [ `grep "<name>SUSE_SLED" /var/lib/zypp/db/products/$file | wc -l` -eq 1 ]; then
        rm /var/lib/zypp/db/products/$file
    elif [ `grep "<name>SUSE_SLES" /var/lib/zypp/db/products/$file | wc -l` -eq 1 ]; then
        rm /var/lib/zypp/db/products/$file
    fi
done
sarch=`arch`
datesec=`date +%s`

filename="/var/lib/zypp/db/products/"`uuidgen | awk '{gsub(/-/,"",$1); print $1}'`
if [ `cat /etc/SuSE-release |grep "SUSE Linux Enterprise Desktop 10"|wc -l` -eq 1 ]; then
    issled=1
else
    issled=0
fi

echo '
<product version="2.0" xmlns="http://www.novell.com/metadata/zypp/xml-store" type="base">' >$filename

if [ $issled -eq 1 ]; then
    echo '  <name>SUSE_SLED_SP1</name>
  <version ver="10.1" rel="0" epoch="0" />' >>$filename
    echo "  <arch>$sarch</arch>" >> $filename
    echo '      <provides><capability kind="product" >SUSE_SLE == 10.1</capability>
<capability kind="product" >SUSE_SLED == 10.1</capability>
<capability kind="product" >SUSE-Linux-Enterprise-Desktop-SP1 == 10-SP1</capability>
<capability kind="product" >SUSE_SLED_SP1 == 10.1-0</capability>
</provides>
    <obsoletes><capability kind="product" >SUSE_SLED < 10.1</capability>
</obsoletes>
    <requires><capability kind="pattern" >basesystem</capability>
<capability kind="package" >sled-release-10-sp1</capability>
</requires>


<summary>SUSE Linux Enterprise Desktop 10 SP1</summary>
<summary lang="de">SUSE Linux Enterprise Desktop 10 SP1</summary>
<summary lang="en">SUSE Linux Enterprise Desktop 10 SP1</summary>
<summary lang="en_US">SUSE Linux Enterprise Desktop 10 SP1</summary>' >> $filename
else
    echo '  <name>SUSE_SLES_SP1</name>
  <version ver="10.1" rel="0" epoch="0" />' >>$filename
    echo "  <arch>$sarch</arch>" >> $filename
    echo '      <provides><capability kind="product" >SUSE_SLE == 10.1</capability>
<capability kind="product" >SUSE_SLES == 10.1</capability>
<capability kind="product" >SUSE-Linux-Enterprise-Server-SP1 == 10-SP1</capability>
<capability kind="product" >SUSE_SLES_SP1 == 10.1-0</capability>
</provides>
    <obsoletes><capability kind="product" >SUSE_SLES < 10.1</capability>
</obsoletes>
    <requires><capability kind="package" >sles-release-10-sp1</capability>
<capability kind="pattern" >basesystem</capability>
</requires>


<summary>SUSE Linux Enterprise Server 10 SP1</summary>
<summary lang="de">SUSE Linux Enterprise Server 10 SP1</summary>
<summary lang="en">SUSE Linux Enterprise Server 10 SP1</summary>
<summary lang="en_US">SUSE Linux Enterprise Server 10 SP1</summary>' >> $filename
fi

echo '<description></description>
<description lang="en"></description>
<description lang="en_US"></description>
<install-notify></install-notify>
<install-notify lang="en"></install-notify>
<install-notify lang="en_US"></install-notify>
<delete-notify></delete-notify>
<delete-notify lang="en"></delete-notify>
<delete-notify lang="en_US"></delete-notify>
<license-to-confirm></license-to-confirm>
<license-to-confirm lang="en"></license-to-confirm>
<license-to-confirm lang="en_US"></license-to-confirm>
  <vendor>SUSE LINUX Products GmbH, Nuernberg, Germany</vendor>
  <size>0</size>
  <archive-size>0</archive-size>
  <install-only>false</install-only>
  <build-time>0</build-time>' >> $filename
echo "  <install-time>$datesec</install-time>" >> $filename

if [ $issled -eq 1 ]; then
    echo '<shortname>SLED 10 SP1</shortname>
  <distribution-name>SUSE-Linux-Enterprise-Desktop-SP1</distribution-name>
  <distribution-edition>10-SP1</distribution-edition>
  <source>SUSE Linux Enterprise Desktop 10 SP1 10.1-0</source>
  <release-notes-url>http://www.novell.com/linux/releasenotes/i386/SUSE-SLED/10-SP1/release-notes-sled.rpm</release-notes-url>' >>$filename
else
    echo '<shortname>SLES 10 SP1</shortname>
  <distribution-name>SUSE-Linux-Enterprise-Server-SP1</distribution-name>
  <distribution-edition>10-SP1</distribution-edition>
  <source>SUSE Linux Enterprise Server 10 SP1</source>
  <release-notes-url>http://www.novell.com/linux/releasenotes/i386/SUSE-SLES/10-SP1/release-notes-sles.rpm</release-notes-url>' >> $filename
fi
echo '  <update-urls>
  </update-urls>
  <extra-urls>
  </extra-urls>
  <optional-urls>
  </optional-urls>
  <product-flags>
    <product-flag>update</product-flag>
  </product-flags>
</product>
' >> $filename
-------------------------------------------------------------------------------------

Save and deploy the bundle. When this bundle is installed on a SLE10 GA device, the product info will get updated.

About the Problem

To replicate this problem, create a bundle in ZLM 7.2 server by mirroring SLE10-SP1-Online catalog from nu.novell.com and assign the bundle to a SLE10 managed device, so that the bundle gets installed on the device and the device becomes SLE10 SP1 device.

When a SLE10 GA device is upgraded online from nu.novell.com, a special patch called product-sled10-sp1 is installed which updates the product information. This patch does not have a corresponding rpm file. zlmmirror mirrors down SLE10-SP1-Online, but it only creates a bundle of rpms. When this bundle is installed on a SLE10 GA device, this patch does not get installed and product information does not get updated to reflect that the device is SLE10 SP1.

For additional information, see this TID.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.