1748006 Members
4425 Online
108757 Solutions
New Discussion юеВ

Re: RPM question

 
SOLVED
Go to solution
Alex Lavrov
Regular Advisor

Re: RPM question

Hey,

I want to unpack things, put them in different places, modify some configuration files ...
As far as I know, it's too complicated for tar. If it was HPUX (I work on HPUX) I could build software depot and in linux I thought that it's gonna be rpm, correct me if I'm wrong.

Alexander Chuzhoy
Honored Contributor

Re: RPM question

if that's all you need to do-then tar will be the perfect choice..
if you make you tar from /
and add /etc/xinetd.d/telnet (just for example-nothing personal) to it.
Then when you unpack the tar while standing in / it will put it's file in exact the same location, i.e. in /etc/xinetd.d
So it's able to change configuration files...
Jerome Henry
Honored Contributor

Re: RPM question

100 % agree.
Use rpm if you really want to install programs, that is to say not only replace files, but add parameters to conf files or modify parameters, search for libs and so on...

If it's what you are looking for, then back to your prob. Otherwise tar is easy, except that it won' serach for files in different paths than the one you packed from.

J
You can lean only on what resists you...
Alex Lavrov
Regular Advisor

Re: RPM question

Well, it solves the unpacking issue, but if I need to create filesystem, modify some params, etc ....

And ofcourse the remove thing.
The person who uses my tar, never knows what it does, but if its rpm I can rpm -e it and it will remove it all, right?

(I'm totaly new to linux administration, so I'm sorry for the noob questions:-) )
Jerome Henry
Honored Contributor

Re: RPM question

But this is about programming issue.
Rpm is a convenient way to automatize installs and to put all the stuff in a all in one file. If you look at the freshrpms link above, you'll see that in the spec file the process looks much like as in a tarball, with make & make install.
If you know how to program a little exec file that would do the stuff you need, then you can use rpm to pack it and distribute it.
But rpm is not designed to do these things by itself.
So first step would be there : setting the program you need as if you could install it manually by a make install, then make from it an rpm...
hth

J
You can lean only on what resists you...
Jerome Henry
Honored Contributor

Re: RPM question

But this is about programming issue.
Rpm is a convenient way to automatize installs and to put all the stuff in a all in one file. If you look at the freshrpms link above, you'll see that in the spec file the process looks much like as in a tarball, with make & make install.
If you know how to program a little exec file that would do the stuff you need, then you can use rpm to pack it and distribute it.
But rpm is not designed to do these things by itself.
So first step would be there : setting the program you need as if you could install it manually by a make install, then make from it an rpm...

BTW, this is by no mean a noob question :]

hth

J
You can lean only on what resists you...
Alex Lavrov
Regular Advisor

Re: RPM question

Well, that's exactly what I'm doing.
I'll use only %files, %pre, %post, %preun and %postun derictives in my spec file.
To unpack files, modify the system configurtaion as installation and deleteing files, modifying the system back as uninstall ...
Let's hope that bash on linux is the same bash we have on HPUX :-)

Thanks you all for your help!