The following RPM build was created for the EMC Control Center Agent. This agent communicates with the EMC Control Center console to guage SAN storage usage.
I already installed the EMC Control Center Agent to test the functionality. I noted the files & directories that were modified to make sure the RPM package is customized for our environment. Specifically, I customized the following files:
/etc/init.d/eccmad (oddly enough this distribution was not configured for Linux where I had to manually enable it for chkconfig so we can just type - service eccmad start) /function_tools/exec/master.ini (reflected new directory of /tools versus /function_tools) /var/emc/.eccrc (reflected new directory of /tools versus /function_tools)Back to the RPM building...
1. Create RPM build structure mkdir RPMBUILD/BUILDS mkdir RPMBUILD/RPMS mkdir RPMBUILD/SOURCES mkdir RPMBUILD/SPEC mkdir RPMBUILD/tmp 2. Create the customized directory structure mkdir -p RPMBUILD/SOURCES/ECC-5.2.0/etc/init.d mkdir RPMBUILD/SOURCES/ECC-5.2.0/tools mkdir -p RPMBUILD/SOURCES/ECC-5.2.0/var/emc 3. Copy over the files & directories cp /etc/init.d/eccmad RPMBUILD/SOURCES/ECC-5.2.0/etc/init.d/ cp -rp /function_tools/* RPMBUILD/SOURCES/ECC-5.2.0/tools/. cp -rp /var/emc/* RPMBUILD/SOURCES/ECC-5.2.0/var/emc/. 4. Create the spec file touch RPMBUILD/SPEC/ECC-5.2.0.spec defined a whole bunch of stuff (to be added later) 5. Build the RPM source & RPM binary (Make sure you have the rpm-build RPM installed first ;-) rpmbuild -ba RPMBUILD/SPEC/ECC-5.2.0.spec 6. Copy the new RPM binary to a http accessible directory cp -p RPMBUILD/RPMS/ECC-5.2.0-1.rpm /var/www/html/RPMs 7. Test the RPM from a new freshly kickstarted box rpm -ivh http://central/RPMs/ECC-5.2.0-1.rpm
Leave a comment