Bug 26210 - rpm --tarbuild vestigial
rpm --tarbuild vestigial
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-02-05 15:46 EST by D. Hugh Redelmeier
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-06 15:41:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description D. Hugh Redelmeier 2001-02-05 15:46:29 EST
In RHL7.0, the rpm(8) lists --tarbuild as a flag but there is no
description of the meaning.  Furthermore, the rpm command seems not to
recognize this flag.  My guess is that the -t option fulfills this
function.  BTW, the -t option is not well described.  How does it determine
which file to use as the spec?  It appears to understand .tgz files (I
tried this), but the manual does not suggest this.
Comment 1 Jeff Johnson 2001-02-07 12:58:15 EST
--tarbuild is identical to other rpm build modes except 
	1) argument is a tar ball
	2) a file with extension *.spec is expected, and silently extracted
	to perform the build.

Te option, if correctly used, should handle variant extensions, as the internal
magic is used to determine operation, not the external extension.

I suspect that you need to install the rpm-build package as well.
Comment 2 D. Hugh Redelmeier 2001-03-25 18:17:32 EST
Please check again.  The rpm man page, in the synopsis, lists:
	rpm [--tarbuild] [tarredsource]+
If I type "rpm --tarbuild rp-pppoe-3.0.tar.gz", I get from rpm 4.02:
	--tarbuild: unknown option
(This is the same message as I get when I try "rpm --unlikelyoption".)

Another brush with this stuff.
I needed to build the Roaring Penguin PPPoE package.  I fetched the tarball.  It
contains two .spec files.  So I tried "rpm -ta rp-pppoe-3.0.tar.gz".  It the
wrong .spec :-(.  I think that it should allow me to specify which one I want OR
build all of them.

None of this matches the synopsis which says:
	rpm [-b|t] [package_spec]+
I think that it should say something like:
	rpm -b [package_spec]+
	rpm -t tarredsource

The documentation is unclear and wrong and the program's behaviour is
counterintuitive so the documentation matters.

Another example: A failed build leave crud around that interferes with the next
build.  Just what does --clean do?  It sounds as if it will only work after a
build completes.  I really need it *before* a build.
Comment 3 Jeff Johnson 2001-03-26 08:53:28 EST
A tarbuild  expects a single *.spec file, having two spec files is asking for
Build rp-pppoe from a spec file using rpm -ba instead.

Yup the doco for rpm sucks.

If you want to clean everything before a build, then you need to run
	rpm --clean --rmsource --force <your_specfile_here>
just before building.
Comment 4 D. Hugh Redelmeier 2001-04-29 12:30:51 EDT
According to my experiments,
         rpm --clean --rmsource --force <your_specfile_here>
only cleans up the source, not the wreckage of a previous build.  This is really
inconvenient.  I infer that it is the responsibility of the .spec file %prep
section to explicitly blow away $RPM_BUILD_ROOT, but only if it isn't /!

rpm -b allows for multiple spec files, why doesn't -t??
Comment 5 Jeff Johnson 2001-07-29 12:22:36 EDT
The usual convention is to clean $RPM_BUILD_ROOT at the
start of %install, not %prep:
	rm -rf ${RPM_BUILD_ROOT}
but this is left to the packager, not rpm.

rpm does guarantee that RPM_BUILD_ROOT is not "/"
oe any of the myriad variant's like /../

Building from a tarball is a hack to extract a single conventionally
named spec file from a tarball, and then run "rpm -ba". I see no
need to implement anything other than what is there now.

Note You need to log in before you can comment on or make changes to this bug.