[lug] passing config parameters to autoconf during .src.rpm rebuild

Alan Robertson alanr at unix.sh
Sat Aug 17 19:26:35 MDT 2002


D. Stimits wrote:
> When rebuilding a source rpm, if there is an autoconf option (in this 
> case, default user is "nobody", I wish to pass along "--with-user=ups" 
> and "--with-group=ups"), can this be passed along in the --rebuild line? 
> The spec file has "--with-user=nobody" and "--with-group=nobody", I 
> could edit this directly, and create a new package out of that, but I 
> did not want a "non-standard" rpm, so I am hoping there is a simple way 
> to pass along the options to the --rebuild instead. For that matter, I 
> am wondering what means in general are available for passing along 
> changes to options in the --rebuild command.

I don't believe there's anything you can do to do what you want except to 
patch the RPM.

My rpms, by contrast, are configured by configure.  These type of RPMs annoy 
Rob Riggs ;-).  Hi Rob!

The general paradigm for RPMs are that they are made by distros to customize 
someone else's package just for them.  So, they typically just pass fixed 
parameters to configure to make it do what they want.

I distribute my code via RPMs, and I'm not a distro - so my needs are a 
little different.  I don't need to make a package out of someone else's code 
- I own the whole thing.  I don't need patches, etc.  But I would like to be 
able to customize the RPMs we make.

So, the linux-ha software takes whatever you type into configure, it whacks 
into the spec file, so that all your configure options are captured in your 
spec file.

This way you can make custom RPMs to suit your needs.  It kind of annoyed me 
that configure gave you all this wonderful flexibility, and then most RPMs 
turn around and take it away from you...

If you don't know what options you want, we have a script called ConfigureMe 
which figures out how to configure my package for the distro you're running 
on, so it will interoperate (uid #'s, etc.) with the distro you're currently 
running.

So, if you're on Conectiva, it'll use the Conectiva-reserved uids.  If 
you're on SuSE, it'll use the SuSE-reserved uid#s, etc (Red Hat doesn't care 
enough to reserve UIDs for me).

Or, you can make it consistent with your local rules for uid names and 
numbers by running configure with whatever options you want.  Then, when you 
say make rpm, you get the RPM you wanted - not one that Red Hat or SuSE, or 
Conectiva wanted.  Whatver options you give configure, they're saved into 
the spec file.

But, this is not the paradigm that RPM was written for.  It works very well 
to do it this way IMHO, but you won't find very many RPMs that work this way.

	-- Alan Robertson
	   alanr at unix.sh




More information about the LUG mailing list