You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Gary Funck <ga...@intrepid.com> on 2004/12/27 09:58:13 UTC

rpmbuild -tb doesn't run make test?

Following the brief instructions on building an RPM of SA 3.0.2, I tried
the following:

% rpmbuild -tb
'.cpan/sources/authors/id/F/FE/FELICITY/Mail-SpamAssassin-3.0.2.tar.gz'

where the tarball had been downloaded previously via a CPAN 'get' command.

It ran to completion, and built three RPM's:

perl-Mail-SpamAssassin-3.0.2-1.i386.rpm
spamassassin-tools-3.0.2-1.i386.rpm
spamassassin-3.0.2-1.i386.rpm

However, I was halfway expecting that I'd be asked for various configuration
options, and that 'make test' would run.

Is this the expected behavior?



Re: rpmbuild -tb doesn't run make test?

Posted by Theo Van Dinter <fe...@kluge.net>.
On Mon, Dec 27, 2004 at 11:26:01AM -0800, Gary Funck wrote:
> OK. If I want to do some initial configuration, and create
> an RPM from the result, should I first modify the files as
> required, do a make, then make test, and then create a tar
> file from the resulting build directory, and then run
> rpmbould -tb <new_tar_file>.tgz to get the desired result?

I'm not sure what you're asking here.  What exactly is your "desired result"?

If you want the rpmbuild to do a "make test", you can modify the spec
file to do that pretty easily.  The tarball that's typically used is
the result of "make dist" from the subversion working copy, BTW.  I wouldn't
bother with tarring up a working directory then doing a build, the rpm is
simple going to do the build over.

If you want your RPM to also include your own configuration, you can do that,
but you'll probably need to modify the spec file a bit.  I'd create the
configs as extra source files and copy them into place during the install
phase.

-- 
Randomly Generated Tagline:
"Neil hasn't locked and loaded anything other than a floppy disk."
         - Unknown at Collective Technologies Hiring Weekend (4/29/2000)

RE: rpmbuild -tb doesn't run make test?

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Monday, December 27, 2004 11:26 AM -0800 Gary Funck 
<ga...@intrepid.com> wrote:

> OK. If I want to do some initial configuration, and create
> an RPM from the result, should I first modify the files as
> required, do a make, then make test, and then create a tar
> file from the resulting build directory, and then run
> rpmbould -tb <new_tar_file>.tgz to get the desired result?

Unpack just the spec file from the tarball, and put it in your SPECS 
directory. Put the tarball in the SOURCES directory. Edit the spec file as 
desired, then run "rpmbuild -ba spamassassin.spec". The "-ta" option does 
something similar, unpacking the spec file to a temp directory and then 
cascading to the "-ba" process.

(Remember to package as a mortal. Packaging RPM's as root can be dangerous. 
An error in a spec file can do a lot of damage, like "clean" your real 
root.)

RE: rpmbuild -tb doesn't run make test?

Posted by Gary Funck <ga...@intrepid.com>.
y

> -----Original Message-----
> From: Theo Van Dinter [mailto:felicity@kluge.net]
> Sent: Monday, December 27, 2004 8:32 AM
[...]
> 
> Building an RPM isn't an interactive experience, so it doesn't ask
> you anything.  As for "make test", that's not usual during an RPM
> build either.
> 
> It sounds like you expect rpmbuild to do roughly the same operations as
> the CPAN module would do, but that's not what happens.

OK. If I want to do some initial configuration, and create
an RPM from the result, should I first modify the files as
required, do a make, then make test, and then create a tar
file from the resulting build directory, and then run
rpmbould -tb <new_tar_file>.tgz to get the desired result?


Re: rpmbuild -tb doesn't run make test?

Posted by Theo Van Dinter <fe...@kluge.net>.
On Mon, Dec 27, 2004 at 12:58:13AM -0800, Gary Funck wrote:
> However, I was halfway expecting that I'd be asked for various configuration
> options, and that 'make test' would run.
> 
> Is this the expected behavior?

Building an RPM isn't an interactive experience, so it doesn't ask
you anything.  As for "make test", that's not usual during an RPM
build either.

It sounds like you expect rpmbuild to do roughly the same operations as
the CPAN module would do, but that's not what happens.

-- 
Randomly Generated Tagline:
"Photons have mass?  I didn't know they were Catholic!" - Unknown