[packages/rpm-build-macros] Actually use the %{_clean_env} in %build and %install
jajcus
jajcus at pld-linux.org
Sat Feb 22 16:56:20 CET 2014
commit dd64e4280f9813bf12dd1864cd021977caaef91f
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Sat Feb 22 16:20:11 2014 +0100
Actually use the %{_clean_env} in %build and %install
Default %{___build_pre} provided in the rpm-build package does
clear some environment variables (locale), but there are other,
that can break build (e.g. $http_proxy may break Python tests using
http://localhost/ URLs).
Version: 1.688
rpm-build-macros.spec | 2 +-
rpm.macros | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 2d8a619..b1230ab 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -5,7 +5,7 @@
%if "%{pld_release}" == "ac"
%define with_rpm4 1
%endif
-%define rpm_macros_rev 1.687
+%define rpm_macros_rev 1.688
%define find_lang_rev 1.36
Summary: PLD Linux RPM build macros
Summary(pl.UTF-8): Makra do budowania pakietów RPM dla Linuksa PLD
diff --git a/rpm.macros b/rpm.macros
index 04b5ce8..b7370d9 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -208,6 +208,16 @@
}
}')
+# override %__spec_build_pre and %__spec_install_pre from macros.rpmbuild
+# adding %{_clean_env}
+%__spec_build_pre %{_clean_env}\
+%{___build_pre}\
+%{nil}
+%__spec_install_pre %{_clean_env}\
+%{___build_pre}\
+%{?buildroot:%{__rm} -rf '%{buildroot}'; %{__mkdir_p} '%{buildroot}'}\
+%{nil}
+
#-----------------------------------------------------------------
%configure2_13 { \
if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/dd64e4280f9813bf12dd1864cd021977caaef91f
More information about the pld-cvs-commit
mailing list