Bug 235194

Summary: %configure sets too many parameters of configure
Product: [Fedora] Fedora Reporter: Stepan Kasal <kasal>
Component: redhat-rpm-configAssignee: Jon Masters <jcm>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-20 06:04:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Stepan Kasal 2007-04-04 12:58:46 UTC
The expansion of %configure contains this extraordinarily long command:

./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --targe
t=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man

I believe it can be shortened.  For example, --host and --target default to
--build, so we can leave them out.
If a spec file needs to cross-compile, it can call
    %configure --host=something
which is IMHO better than redefining internal macros %{_host} or %{_host_cpu}.

Similarily, we should leave out --exec-prefix, --bindir, etc.  If necessary,
they can be added on the %configure command line.

(OTOH, --build, --prefix, and --sysconfdir are examples of parameters which
should stay, because the GNU default value is not what we need.)

Comment 1 Jeff Johnson 2007-04-04 18:57:09 UTC
Yes, the number of parameters used by %configure can be shortened.

What is there is known to work woth existing (and busted) builds in packaging.

But feel free to change whatever you want. The default in rpm should not be changed,
there is already provision for per-vendor (and per-system and per-monkey) redefinitions.


Comment 2 Panu Matilainen 2007-07-03 11:50:37 UTC
Yup, redhat-rpm-config is the more appropriate component in Fedora space.

Comment 3 Jon Masters 2007-08-20 06:04:51 UTC
I'm not sure this needs to be changed at the moment - can I get an actual
example of a package where this is needed? Please re-open this bug if needed.

We don't really officially support cross-compilation AFAIK, but I would be very
interested in helping towards useful goals like that, given specific needs.