RPM with ClearCase


 
Thread Tools Search this Thread
Operating Systems Linux RPM with ClearCase
# 1  
Old 12-24-2007
RPM with ClearCase

Hello. I have a task to complete and it involves using RPM with ClearCase. I have looked through as much documentation as possible about RPM and I still have questions about it. My task is to create a .rpm using ClearCase by unzipping a 22 Mb file and placing it into a set directory structure. I don't have alot but my spec file goes through the %prep section fine. However, I have some questions:

a) i would like to test to see if the directory exists and if it doesn't, create the directory structure. I can't seem to get the right syntax of my if...else test. this is what i have so far:

Code:
if [ this equals the directory ]
then
      echo "Directory already exists!!"
else
      mkdir -p <directory>
fi

b) once, i have the directory structure, i need to unzip the source file into that directory. will RPM allow for such a task and how should I go about it? Any help would be appreciated.

Last edited by mastachef; 12-28-2007 at 09:30 AM.. Reason: spelling
# 2  
Old 12-27-2007
I'm not aware of ClearCase, but since you have shell script, can't you just call "unizp" with the respective parameters and then call "rpmbuild -bb" ; "rpm -Uvh" or appropriate command ?
# 3  
Old 12-28-2007
hmm on editing the ctspec file itself it should automatically extract in clearcase.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

2. UNIX for Dummies Questions & Answers

clearcase,

Hi, I have two unix server. In one server clearcase is installed. I want to take files from one server to clearcase server. Could anyone help to start up this, for how to connect clearcase server from my main server. ?? Currently am having IP address of that clearcase server. Thanks in... (0 Replies)
Discussion started by: ckchelladurai
0 Replies

3. Shell Programming and Scripting

clearcase shell script

I am running all clearcase commands in shell script and every command is redirecting output to file data.txt cleartool diffbl -act -ver label1 label2 >& data.txt cleartool diffbl -baselines label1 label2 >& data.txt cleartool diffbl -elements label1 label2 >& data.txt Issues was all commands... (6 Replies)
Discussion started by: saku
6 Replies

4. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

5. UNIX for Dummies Questions & Answers

Clearcase Query

Hi, Can you please help? I am trying to use variables within a clearcase command, however i am having a major problems - the variables don't appear to be accessible. Using the following as an example: cat=1 2 3 dog=4 5 6 cleartool mkattr -replace Four_Legs '"$cat $dog"' lbtype:Animal ... (3 Replies)
Discussion started by: spikey
3 Replies

6. Shell Programming and Scripting

Extract RPM name from path to .rpm file

It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from: /home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'. I can't get the awk syntax right: awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies

7. SuSE

How to install .src.rpm ? ( source rpm )

Hi, I have got few RPM's from rpmfind.net ( mainly gcc ). But it seems to be src files instead of the image. so I think we have to build the src files according to target machine using rpmbuild. Can any one help me with 1) Various options of rpm build that have to be taken care 2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies

8. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

9. UNIX for Advanced & Expert Users

ssh + clearcase hangs

Hi, prefix: cleartool is an clearcase command. clearcase is a control version tool I have setup a passwordless ssh connection between Unix machines A and B. I am executing a ssh command from Unix box 'A' to Unix box 'B' as follows. ssh username@B 'ls /home/username' This works perfectly... (2 Replies)
Discussion started by: sunilav
2 Replies

10. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies
Login or Register to Ask a Question