Re: Newbie trying to build a binary RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




This is a trememdous tutorial.  Very thorough and easy to read.

Using this tutorial I've been able to make some progress. Once this is done, I think I will be a bit embarassed at how not very hard it really is. But anyway...

I now have the following spec file:

Summary: A SIP-based softphone for the Linux Operating System
Name: cornfedsipua
Version: 0.9.1
Release: 1
Copyright: Free for non-commercial use
Group: Applications/Communications
Source: %{name}-src-%{version}.tar.gz
BuildRoot: %{_tmppath}
%description
The Cornfed SIP User Agent is a Session Initiation Protocol (SIP) based
softphone for your IBM-compatible Personal Computer running the Linux
Operating System. The Cornfed SIP User Agent allows you to make Internet
phone calls using an Open Sound System (OSS) or Advanced Linux Sound
Architecture (ALSA) sound card with speakers and microphone as your
telephone handset.
%prep
%setup -q -n sip
%build
make
%install
rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/cornfed
install -m 544 sip/wav/ring.wav $RPM_BUILD_ROOT/etc/cornfed
install sip/gnome/sip $RPM_BUILD_ROOT/usr/bin/sip
install sip/cli/sip $RPM_BUILD_ROOT/usr/bin/sip_cli
%clean
rm -fr $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/bin/sip
/usr/bin/sip_cli
/etc/cornfed/ring.wav

When I run this .spec file from the SPEC directory of my $HOME/rpmbuild %_topdir, the application is unpacked and builds fine. When I get to the %install stanza, I get the following output:

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.9826
+ umask 022
+ cd /home/fwmiller/rpmbuild/BUILD
+ cd sip
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -fr /var/tmp
rm: cannot remove `/var/tmp': Permission denied
error: Bad exit status from /var/tmp/rpm-tmp.9826 (%install)


RPM build errors:
   Bad exit status from /var/tmp/rpm-tmp.9826 (%install)

It looks like the install stanza is trying to work with /var/tmp rather than $RPM_BUILD_ROOT. How can I get this behavior to change?

Thanks,
FM



Dax Kelson wrote:

On Wed, 2005-06-15 at 21:27 -0400, Frank W. Miller wrote:

That's it, really simple. I have no idea why I need to do all this in the /var/tmp directory or do the build automatically or anything else. Also, I'm trying to figure out if there is a book or something that explains how this RPM thing works something like the O'Reilly book for Make. The documentation that I've found to date just doesn't seem to talk about all the nuances of protections and build directories and all that in any kind of easy to understand form.

Thanks for any help you can render on this!
FM

Frank, may I suggest the Guru Labs RPM documentation. It explains the
whole process from a high level on down to important nuances. It has an
illustration that lays out the build process and (uniquely) includes a
48 page lab exercise that walks you through several tasks ranging from
simple SRPMs rebuilding to advanced packaging techniques.

The RPM documentation is a freely available, creative commons licensed
sample from our library of Linux related courseware.

You can find it here:

http://www.gurulabs.com/goodies/guru+guides.php

Dax Kelson
Guru Labs



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux