Welcome
Welcome to <strong>The Linux And Unix Menagerie</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

Trying to make an rpm from a tarball.

Any Linux Administration questions and answers

Trying to make an rpm from a tarball.

Postby tiberius61 on Mon Mar 24, 2008 11:39 am

I have a question about creating rpms from a tarball.

I did a full install of cfengine on my admin box and configured it the way I want it to run. Now I am trying to create an rpm, so I can put it out there on all my machines with all MY configuration files, setup the way I want it.

I made a list of all the files, binaries, libraries, shared files, config files, then made a spec file. I tar'ed it all up and then ran:


# rpmbuild -vv -tl cfengine-2.2.3.tar.gz

It gave me the following output:

Processing files: cfengine-2.2.3-0
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
D: execv(/usr/lib/rpm/check-files) pid 27682
D: waitpid(27682) rc 27682 status 100

And NO rpm's.

For the "-vv" output, this isn't a whole lot of information. Can anybody decipher what rpmbuild is trying to tell me is wrong? :?:
tiberius61
 
Posts: 2
Joined: Mon Mar 24, 2008 11:21 am

Postby hotmule on Mon Mar 24, 2008 1:37 pm

Hi,

The output you're getting looks normal -- this is from a "spec file", rather than a tarball, build, but the essence is the same:

rpmbuild -vv -bl openssl.spec

blahblah....
D: execv(/usr/lib/rpm/check-files) pid 1620
D: waitpid(1620) rc 1620 status 100

And that's it.

I think the issue is that you're running it with the -l option and it's only listing out files. If you want it to build a binary rpm, you may need to do

rpmbuild -vv -tb cfengine-2.2.3.tar.gz
or
rpmbuild -vv -ta cfengine-2.2.3.tar.gz (If you want a source RPM, too)

I would leave the -vv out at first though. It some times makes perfectly normal things look like they're failing ;)

If I'm off base on what you're looking for here, just ping back - I check here at least once a day.

Good luck to you!

BTW, if you already have the sources compiled, etc, be sure to remove the %prep, %setup, %build and %install, etc from your spec file. All you really need is %description and %files (along with the other "necessary" headers)

, Mule
hotmule
 
Posts: 12
Joined: Sun Oct 28, 2007 4:49 pm

Postby laum on Mon Mar 24, 2008 9:45 pm

Hey Guys,

Check out our Creating RPMs from installed packages post. That may be kind of what you're shooting for by creating your cfengine RPM of already-built and customized content.

Just change the :

Code: Select all
echo "%files" >>$existing_rpm.spec
rpm -ql $existing_rpm|while read x
do       
       echo "%{prefix}$x" >>$existing_rpm.spec
done


part to

Code: Select all
%files
/your/file/1
/your/file/2


, etc

Hope that helps :)

, Mike
laum
Site Admin
 
Posts: 46
Joined: Sun Oct 14, 2007 7:04 pm

Postby tiberius61 on Tue Mar 25, 2008 12:24 pm

Mike,

Thanks, but I'm not creating an rpm from an rpm install, its from a tar.gz that I compiled myself. I did get a few pointers from your post from a few weeks back, that helped. Mule hit the nail on the head when he informed me I forgot to change the -tl to a -tb when I was through testing. (New job, a lot of new information running through my head. I guess I should take some time to gzip some of it. :) )

I plan on making good use of your post on making packages on sun systems, since I've never done that before. This is going to be fun. Thanks for that post!

Jim
tiberius61
 
Posts: 2
Joined: Mon Mar 24, 2008 11:21 am

Postby laum on Tue Mar 25, 2008 9:50 pm

Hey Jim,

Awesome. I'm glad one of us could help you out :) I know how it is. Every once and a while you just need to step back and let your problems work themselves out while you space out (or work on something else ;)


Take it easy,

, Mike
laum
Site Admin
 
Posts: 46
Joined: Sun Oct 14, 2007 7:04 pm

Postby hotmule on Tue Mar 25, 2008 11:05 pm

Great,

Glad to help out :)

, Mule
hotmule
 
Posts: 12
Joined: Sun Oct 28, 2007 4:49 pm

Re: Trying to make an rpm from a tarball.

Postby nguyentruong on Mon Nov 30, 2009 2:27 am

Hope that helps
----------------------------
tuyen dung | tim viec | viec lam
nguyentruong
 
Posts: 1
Joined: Mon Nov 30, 2009 2:10 am


Return to Linux Administration

Who is online

Users browsing this forum: No registered users and 0 guests

cron