100% found this document useful (2 votes)
373 views4 pages

ClearCase Client 7.0.1 for Linux

This document defines an RPM package for installing IBM Rational ClearCase Client version 7.0.1. It contains sections for preparing, installing, configuring, and uninstalling the ClearCase Client software and dependencies. The package installs ClearCase to /opt/rational and configures services and modules to support the ClearCase filesystem.

Uploaded by

daswathn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
373 views4 pages

ClearCase Client 7.0.1 for Linux

This document defines an RPM package for installing IBM Rational ClearCase Client version 7.0.1. It contains sections for preparing, installing, configuring, and uninstalling the ClearCase Client software and dependencies. The package installs ClearCase to /opt/rational and configures services and modules to support the ClearCase filesystem.

Uploaded by

daswathn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

%define _topdir /usr/src/redhat

%define _tmpdir /root

%define name ClearCase_Client


%define summary IBM Rational ClearCase Client (7.0.1) for Linux Kernel
%define version 7.0.1
%define release 3
%define license Internal Purpose only
%define group Development
%define source cc_linux_x86.7.0.1.tar.gz
%define vendor Your Company Name
%define packager Company Name

Name: %{name}
Version: %{version}
Release: %{release}
Packager: %{packager}
Vendor: %{vendor}
License: %{license}
Summary: %{summary}
Group: %{group}
Source: %{source}
Autoreq: 0

#### Product Description Section ####

%description
IBM Rational ClearCase Client(7.0.1) for Linux Kernel.

#### Prepare Section ####

%prep
rm -rf $RPM_BUILD_ROOT/linux_x86

#### Setup Section ####

%setup -n linux_x86

#### Build Section ####

%build

#### Installation Section ####

%install
cd clearcase/install
#/bin/sh install_release -no_query -rebuild_mvfs 0 -log
/tmp/Rational_install.log -rr unix -rbh clearcase02p.ch3.prod.i.com -lh
capitalreef.infores.com -comp
ratl_JRE,ratl_LAP,ratl_perl,atria_perl,CC_MS_doc_ENG,atria_install,atria_
basement,atria_cplus_shlib,atria_base,CC_base,atria_server,CC_vob_svr,atr
ia_X11_base,CC_doc_ENG,CC_client,atria_gui,CC_doc,CC_bld_client,CC_view_s
vr,atria_cplus_base,CC_MIN_STD,CC_int_client,CC_gui_client,CC_cnv_client,
CC_ONLY_SERVER,CC_MIN_STD_X,CC_FULL -local -rh
clearcase01p.ch3.prod.i.com -from /ccase/cc_siteprep/7.0.1/linux_x86
-level 5 -large_vob_db -nlog -to /opt/rational -model full

#### Pre Installation Section ####

%pre
ln -fs /usr/bin/perl /usr/local/bin/perl
ln -fs /usr/bin/perl /bin/perl
cp -f "/etc/services" "/etc/.services.orig.rational.rpmsave"
2>&1>/dev/null
cp -f "/lib/modules/`uname -r`/modules.dep" "/lib/modules/`uname -r`
/.modules.dep.orig.rational.rpmsave" 2>&1>/dev/null
cp -f "/etc/updatedb.conf" "/etc/updatedb.conf.orig.rational.rpmsave"
2>&1>/dev/null
cp -f "/etc/selinux/config" "/etc/selinux/config.orig.rational.rpmsave"

#### Post Installation Section ####

%post
mkdir -p /view

mkdir -p "/lib/modules/`uname -r`/kernel/fs/mvfs"

if [ ! -f "/lib/modules/`uname -r`/kernel/fs/mvfs/mvfs.ko" ]; then


cp -f "/opt/rational/common/pre-install/mvfs/mvfs.ko"
"/lib/modules/`uname -r`/kernel/fs/mvfs/mvfs.ko"
fi

"/usr/sbin/setenforce" 0 2>&1>/dev/null

sed s/"SELINUX=enforcing"/"SELINUX=permissive"/g -i "/etc/selinux/config"

if [ -f "/sbin/mount.mvfs" ]; then
mv -f "/sbin/mount.mvfs" "/sbin/mount.mvfs.orig.rational.rpmsave"
fi
ln -fs "/opt/rational/clearcase/etc/mount_mvfs" "/sbin/mount.mvfs"

kernelVersion="`uname -r`"
chkModDep="`grep mvfs /lib/modules/$kernelVersion/modules.dep`"

if [ -z "$chkModDep" ]; then
echo "/lib/modules/`uname -r`/kernel/fs/mvfs/mvfs.ko:
/lib/modules/`uname -r`/kernel/net/sunrpc/sunrpc.ko" >>
"/lib/modules/`uname -r`/modules.dep"
fi

chkServices="`grep albd /etc/services`"

if [ -z "$chkServices" ]; then
echo "#### Clearcase Service ######" >> "/etc/services"
echo "albd 371/udp" >> "/etc/services"
echo "albd 371/tcp" >> "/etc/services"
fi
if [ ! -f "/usr/lib/libstdc++.so.5.0.7" ] || [ ! -f
"/usr/lib/libstdc++.so.5" ]; then
cp -f "/opt/rational/common/pre-install/lib/libstdc++.so.5.0.7"
"/usr/lib/libstdc++.so.5.0.7"
ln -fs "/usr/lib/libstdc++.so.5.0.7" "/usr/lib/libstdc++.so.5"
fi

### Adding the updatedb.conf ###

chkUpdatedb="`grep mvfs /etc/updatedb.conf`"

if [ -z "$chkUpdatedb" ]; then
sed /"PRUNEFS"/s/\"$/' mvfs\"'/1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/\"$/' \/view \/vobs \/ccase \/ccstage
\/ccasebackup \/vobs01\"'/1g -i "/etc/updatedb.conf"
fi

### Adding the clearcase to the startup ####

chmod 755 /etc/init.d/clearcase

chkConfigLevel="`/sbin/chkconfig --list | grep clearcase`"

if [ -z "$chkConfigLevel" ]; then
/sbin/chkconfig --add clearcase
/sbin/chkconfig --level 345 clearcase on
fi

### Starting the ClearCase ####

"/opt/rational/clearcase/etc/clearcase" start 2>&1>/dev/null

#### Pre Uninstallation Section ####

%preun
"/opt/rational/clearcase/etc/clearcase" stop 2>&1>/dev/null

##Removing from the startup ###

/sbin/chkconfig --del clearcase

#### Post Uninstallation Section ####

%postun
sed /"albd"/d -i "/etc/services"
sed /"Clearcase"/d -i "/etc/services"
sed /"mvfs.ko"/d -i "/lib/modules/`uname -r`/modules.dep"
rm -rf "/opt/rational"
rm -rf "/etc/rc.d/init.d/clearcase"
rm -rf "/var/adm/rational"
rm -rf "/var/adm/atria"
rm -rf "/lib/modules/`uname -r`/kernel/fs/mvfs"
rm -rf "/sbin/mount.mvfs"

### Removing the mvfs from updatedb ####

sed /"PRUNEFS"/s/' mvfs'//1g -i "/etc/updatedb.conf"


sed /"PRUNEPATHS"/s/' \/view'//1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/' \/vobs'//1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/' \/vobs01'//1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/' \/ccase'//1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/' \/ccstage'//1g -i "/etc/updatedb.conf"
sed /"PRUNEPATHS"/s/' \/ccasebackup'//1g -i "/etc/updatedb.conf"

#### Cleaning the Build Root ####

%clean
rm -rf $RPM_BUILD_ROOT

#### Including the files ####

%files
/opt/rational
/etc/exports.mvfs
/etc/rc.d/init.d/clearcase
/var/adm/rational
/var/adm/atria

#### RPM Version History ####

%changelog
* Mon May 18 2009
1 Initial Release
1.4 Spec file updated
3.0 New Release

You might also like