rpms/postgresql/devel postgresql.spec,1.129,1.130
Tom Lane
tgl at fedoraproject.org
Tue Jan 26 18:29:52 UTC 2010
Author: tgl
Update of /cvs/pkgs/rpms/postgresql/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv529
Modified Files:
postgresql.spec
Log Message:
Emit explicit error message if user tries to build RPM as root
Index: postgresql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/devel/postgresql.spec,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -p -r1.129 -r1.130
--- postgresql.spec 20 Jan 2010 22:34:36 -0000 1.129
+++ postgresql.spec 26 Jan 2010 18:29:52 -0000 1.130
@@ -53,7 +53,7 @@ Summary: PostgreSQL client programs
Name: postgresql
%global majorversion 8.4
Version: 8.4.2
-Release: 5%{?dist}
+Release: 6%{?dist}
# PostgreSQL calls their license simplified BSD, but the requirements are
# more similar to other MIT licenses.
License: MIT
@@ -287,6 +287,16 @@ cp -p %{SOURCE1} .
%build
+# fail quickly and obviously if user tries to build as root
+%if %runselftest
+ if [ x"`id -u`" = x0 ]; then
+ echo "postgresql's regression tests fail if run as root."
+ echo "If you really need to build the RPM as root, use"
+ echo "--define='runselftest 0' to skip the regression tests."
+ exit 1
+ fi
+%endif
+
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
# Strip out -ffast-math from CFLAGS....
@@ -701,6 +711,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Tue Jan 26 2010 Tom Lane <tgl at redhat.com> 8.4.2-6
+- Emit explicit error message if user tries to build RPM as root
+Related: #558921
+
* Wed Jan 20 2010 Tom Lane <tgl at redhat.com> 8.4.2-5
- Latest version of systemtap needs the probes.o file to be built again
Resolves: #557266
More information about the scm-commits
mailing list