Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13508 - ebuild foo.ebuild rpm fails
Summary: ebuild foo.ebuild rpm fails
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 50316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-08 12:13 UTC by Sven Vermeulen (RETIRED)
Modified: 2011-10-30 22:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2003-01-08 12:13:02 UTC
~# ebuild /usr/portage/app-games/cube/cube-20021020-r1.ebuild

>>> Install cube-20021020-r1 into /var/tmp/portage/cube-20021020-r1/image/
category app-games
strip:
/var/tmp/portage/cube-20021020-r1/image/usr/games/bin/cube_client
/var/tmp/portage/cube-20021020-r1/image/usr/games/bin/cube_server
>>> Completed installing into /var/tmp/portage/cube-20021020-r1/image/

tar: Removing leading `/' from member names
tar (child): /usr/src/redhat/SOURCES/cube-20021020-r1.tar.gz: Cannot open: No
such file or directory
tar (child): Error is not recoverable: exiting now

(Process waits for input)

Making a link from /usr/portage/distfiles to /usr/src/redhat/SOURCES does help
this problem, but fails further with

>>> Completed installing into /var/tmp/portage/cube-20021020-r1/image/

tar: Removing leading `/' from member names
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.5850
+ umask 022
+ cd /usr/src/redhat/BUILD
/var/tmp/rpm-tmp.5850: line 20: cd: /usr/src/redhat/BUILD: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.5850 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.5850 (%prep)
install: cannot stat `/usr/src/redhat/RPMS/i386/cube-20021020-r1.i386.rpm': No
such file or directory


Creating /usr/src/redhat/RPMS/i386 and /usr/src/redhat/BUILD finally gives a
succesfull rpm build. 

So or we make these directories on the Gentoo system, or we make sure these
directories aren't used, but the /var/tmp/blabla is used instead. I would opt
for the second one (or create a /usr/portage/packages/RPMS directorie).
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2003-01-08 13:18:01 UTC
The usage of cube is only as an example. The same happens with other packages as
libxml, apache or abiword.
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-01-08 13:47:55 UTC
do you have alien installed ?
what does this all ?
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-01-08 13:53:19 UTC
there's no need for RPM in none of the listed ebuilds
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2003-01-08 14:40:04 UTC
man ebuild sais:

       rpm    Builds a RedHat RPM package from  the  files  in  the  temporary
              install  directory.   At  the  moment,  the  ebuild's dependency
              information is not incorporated into the RPM.

so I assumed that this was a feature of ebuild (that it could create (binary)
rpm's of any package), not restricted to the packages that require it.

I do not have alien installed, and it seems like I can't either (404 file not
found). I'll check this tomorrowevening with some other mirrors.

If it was never the intent of ebuild to be able to build rpm's for all packages,
then this can be marked as INVALID. However, do note that, by creating these
directories creation of RPMs is succesfull. Always. With all mentioned packages.
Even OpenOffice.org :-)
Comment 5 Pat Double 2003-01-16 11:39:54 UTC
I am having a similar problem and /usr/src/redhat/BUILD and 
/usr/src/redhat/RPMS/i386 are created. I also merged alien, no help. I remerged rpm, 
no help. 
 
Here's what I'm getting at the end (everything before seems to work fine, no errors, 
etc.) 
 
Processing files: mybackup-0.5.1-r0 
Finding  Provides: (using /usr/lib/rpm/find-provides)... 
Finding  Requires: (using /usr/lib/rpm/find-requires)... 
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 
3.0.4-1 
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 
rpmlib(CompressedFileNames) <= 3.0.4-1 
Requires: /bin/bash 
error: /var/tmp/rpm-tmp.96065: Fseek failed: Invalid argument 
 
 
RPM build errors: 
    /var/tmp/rpm-tmp.96065: Fseek failed: Invalid argument 
install: cannot stat `/usr/src/redhat/RPMS/i386/mybackup-0.5.1-r0.i386.rpm': No such 
file or directory 
 
 
Comment 6 Pat Double 2003-01-16 11:49:28 UTC
Additional I should note that instead of processing the files in 
/var/tmp/portage/..../install, it is processing my actual .ebuild, files, etc. 
Comment 7 jbooth 2003-10-10 09:27:50 UTC
This is still broken, dies with a:

>>> Completed installing into /var/tmp/portage/openssh-3.7.1_p2/image/
 
tar: Removing leading `/' from member names
-bb: unknown option
 
!!! ERROR: net-misc/openssh-3.7.1_p2 failed.
!!! Function dyn_rpm, Line 869, Exitcode 1
!!! Failed to integrate rpm spec file

That's because it's running "rpm -bb ..." rather than "rpmbuild -bb ..."
like it should be. Change line 869 to be "rpmbuild" and it now produces rpm
packages.
Comment 8 Ryan Finnie 2004-01-20 20:04:24 UTC
Confirmed.  ebuild foo.ebuild rpm works, but you must edit /usr/lib/portage/bin/ebuild.sh and change "rpm -bb" to "rpmbuild -bb".

Please correct this in portage.
Comment 9 SpanKY gentoo-dev 2004-07-18 22:33:44 UTC
*** Bug 50316 has been marked as a duplicate of this bug. ***
Comment 10 Brian Harring (RETIRED) gentoo-dev 2004-08-16 11:27:09 UTC
Already made it's way into a .51_pre release...