Bug 962837 - Export CONFIG_SITE=NONE during building rpms
Summary: Export CONFIG_SITE=NONE during building rpms
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 772999
TreeView+ depends on / blocked
 
Reported: 2013-05-14 14:38 UTC by Pavel Raiskup
Modified: 2013-12-03 07:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-03 07:50:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2013-05-14 14:38:33 UTC
Hi, would there be possible to apply something like this patch?

diff --git a/macros.in b/macros.in
index 9ca1b5e..0cc97dc 100644
--- a/macros.in
+++ b/macros.in
@@ -649,6 +649,8 @@ package or when debugging this package.\
   export CLASSPATH}\
   PKG_CONFIG_PATH=\"%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
   export PKG_CONFIG_PATH\
+  CONFIG_SITE=NONE\
+  export CONFIG_SITE\
   \
   %{verbose:set -x}%{!verbose:exec > /dev/null}\
   umask 022\

--------

This would enable me to install '/usr/share/config.site' file in autoconf (as
described in bug #772999) and all Fedora's builds would stay untouched by this
change.  The config.site file is useful for hand-builds - many things that are
solved by %configure macro can be handled for hand builds using the config.site
file.

Pavel

Comment 1 Panu Matilainen 2013-06-11 12:27:38 UTC
Added in rpm-4.11.1-0.rc1.3.fc20. At least for now, rawhide-only.

Comment 2 Pavel Raiskup 2013-11-20 08:45:03 UTC
I'd like to request one slight improvement - to not redefine CONFIG_SITE in
case it is already defined.

Consider that you want to let your compiler know if it is run from
./configure script during rpmbuild (compiler may be run from multiple places
in spec otherwise, especially by make command).  The config.site would be very
useful place to export some variable for that.

diff --git a/macros.in b/macros.in
index e073048..b0c6d6f 100644
--- a/macros.in
+++ b/macros.in
@@ -654,7 +654,7 @@ package or when debugging this package.\
   export CLASSPATH}\
   PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
   export PKG_CONFIG_PATH\
-  CONFIG_SITE=NONE\
+  : ${CONFIG_SITE:=NONE}\
   export CONFIG_SITE\
   \
   %{verbose:set -x}%{!verbose:exec > /dev/null}\

Comment 3 Panu Matilainen 2013-11-27 07:27:07 UTC
Seems reasonable.

I had to look up the meaning of ": ${FOO:=BAR}" syntax though :) I'd rather go with the "CONFIG_SITE=${CONFIG_SITE:-NONE}" syntax if only for consistency with what is used elsewhere in macros.

Comment 4 Pavel Raiskup 2013-11-27 11:55:31 UTC
(In reply to Panu Matilainen from comment #3)
> I had to look up the meaning of ": ${FOO:=BAR}" syntax though :) I'd rather
> go with the "CONFIG_SITE=${CONFIG_SITE:-NONE}" syntax if only for
> consistency with what is used elsewhere in macros.

Yes, it does not matter.  Thanks.

Comment 5 Panu Matilainen 2013-12-03 07:50:31 UTC
Changed to not override CONFIG_SITE if already set in rpm-4.11.1-11.fc21


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