Bug 962837
| Summary: | Export CONFIG_SITE=NONE during building rpms | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Pavel Raiskup <praiskup> |
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | eblake, ffesti, jakub, jzeleny, novyjindrich, packaging-team-maint, pknirsch, pmatilai |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-12-03 07:50:31 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 772999 | ||
Added in rpm-4.11.1-0.rc1.3.fc20. At least for now, rawhide-only. 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}\
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.
(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. Changed to not override CONFIG_SITE if already set in rpm-4.11.1-11.fc21 |
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