The sample plug-in contains the RPM CT.xml file in the components directory. This file defines the backing component for the rpm component type, and is not expected to be used directly as a component itself. Look at the following items in the example below:
The path, name, description, and platform attributes to the <component> element provide specific information about the component type.
The <extends> element tells you that the RPM component type extends the features available in the system#CR Simple Base component type.
The <varlist> element defines several variables that enable the user to customize components based on this component type.
The <installList> element calls the <exceNative> step to run the Linux command to install the RPM files.
The <uninstallList> element calls the <exceNative> step to run the Linux command to uninstall the RPM files.
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.sun.com/schema/SPS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="5.0"
xsi:schemaLocation="http://www.sun.com/schema/SPS
component.xsd"
modifier="ABSTRACT"
path="/com/sun/linux"
name="RPM CT"
description="RPM Installer"
platform="system#Red Hat Linux - any version">
<extends>
<type name="system#CR Simple Base"/>
</extends>
<varList>
<var name="filterName" default="rpmOnly" access="PRIVATE"/>
<var name="filterDescription"
default="show RPM file types only (.rpm)"
access="PRIVATE"/>
<var name="filterExtensions" default=".rpm" access="PRIVATE"/>
<var name="rpmCmd" default="rpm"/>
<var modifier="FINAL" name="installDeployMode" default="REPLACE"/>
<var name="installDiffDeploy" default="TRUE"/>
<var access="PRIVATE" name="exporterClassName"
default="com.sun.n1.sps.pluginimpl.system.export.FilesystemExporter"/>
<var access="PRIVATE" name="canBeConfigTemplate" default="FALSE"/>
</varList>
<installList>
<installSteps name="default">
<deployResource/>
<execNative userToRunAs="root">
<exec cmd=":[rpmCmd]">
<arg value="-i"></arg>
<arg value=":[sys.rsrcInstallPath]"></arg>
</exec>
</execNative>
</installSteps>
</installList>
<uninstallList>
<uninstallSteps name="default">
<execNative userToRunAs="root">
<shell cmd="sh -c">
<![CDATA[:[rpmCmd] -e `:[rpmCmd]
-qp :[sys.rsrcInstallPath]
-qf '%{NAME}' 2> /dev/null`]]>
</shell>
</execNative>
<call blockName="deleteFile">
<argList absPath=":[sys.rsrcInstallPath]"/>
<systemService name="system#core services"/>
</call>
</uninstallSteps>
</uninstallList>
</component>