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

Re: rpm-3.0 works, rpm-4.0.3 does NOT



On Sun, Jan 27, 2002 at 03:15:39AM -0800, paul company wrote:
> 
> I built and installed rpm-4.0.3 successfully.
> 
> But when I tried to build it as a package, I got the following error:
> 
> ============BEGIN ERROR MESSAGE=================
> # rpm -bp spec.rpm-4.0.3-1
> Executing(%prep): /bin/sh -e /var/local/tmp/rpm-tmp.1314
> + umask 022
> + cd /usr/local/src/sun/BUILD
> + cd /usr/local/src/sun/BUILD
> + rm -rf rpm-4.0.3
> + tar -xvvf /usr/local/src/sun/SOURCES
> tar: Record size = 1 blocks
> tar: Hmm, this doesn't look like a tar archive
> tar: Skipping to next file header
> + cd rpm-4.0.3
> /var/local/tmp/rpm-tmp.1314: rpm-4.0.3: does not exist
> error: Bad exit status from /var/local/tmp/rpm-tmp.1314 (%prep)
> 
> 
> RPM build errors:
>     Bad exit status from /var/local/tmp/rpm-tmp.1314 (%prep)
> =========== END ERROR MESSAGE ===========
> 
> When I use the same spec file with rpm-3.0 everything works fine.
> What generates the rpm-tmp.1314 file?
> It looks like this is the problem.
> Why does it try to "cd" into the same directory twice?
> Why is the tar line incorrect?
> etc. etc.
> 
> Any ideas?
> 
> Also, what's the difference between versions 3.x and versions 4.x?
> 
> Here's my spec file:
> 
> # cat spec.rpm-4.0.3-1
> Summary: Red Hat Package Manager
> Name: rpm
> Version: 4.0.3
> Release: 1
> Copyright: Gnu Public License (GPL)
> Group: Programming
> Source: http://www.rpm.org/
> URL: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-4.0.3.tar.gz

You've used URL: where you meant Source: and vice versa.

> Packager: Paul Company <pjc@noyb.com>
> Requires: popt-1.6.3 gettext-0.10

These are probably wrong as well, you appear to want

	Requires: popt = 1.6.3 gettext = 0.10

> Prefix: /usr/local
> %description
> Red Hat Package Manager
> 
> ## Prep Section
> %prep
> %setup
> 
> ## Build Section
> %build
> configure --prefix=/usr/local
> make
> 
> ## Install Section
> %install
> make install
> 
> ## Clean Section
> %clean
> 
> ## File List Section
> <not listed to save space>%changelog
> * Mon Jun 25 2001 - pjc@noyb.com
> - First attempt to package rpm-4.0.3
> 

Why not start with rpm.spec file and edit to taste? If all you want
is to change --prefix, then
	%define	_prefix	/usr/local
at the top of the spec file is the 1st step.

There are definitely other fiddles that will be needed, however.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





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