Emit explicit error message if user tries to build RPM as root
This commit is contained in:
parent
9fe034f968
commit
56e52fefef
17
mysql.spec
17
mysql.spec
@ -1,6 +1,6 @@
|
|||||||
Name: mysql
|
Name: mysql
|
||||||
Version: 5.1.42
|
Version: 5.1.42
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: MySQL client programs and shared libraries
|
Summary: MySQL client programs and shared libraries
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://www.mysql.com
|
URL: http://www.mysql.com
|
||||||
@ -189,6 +189,17 @@ autoconf
|
|||||||
autoheader
|
autoheader
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
# fail quickly and obviously if user tries to build as root
|
||||||
|
%if %runselftest
|
||||||
|
if [ x"`id -u`" = x0 ]; then
|
||||||
|
echo "mysql'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="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
|
CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
|
||||||
# MySQL 4.1.10 definitely doesn't work under strict aliasing; also,
|
# MySQL 4.1.10 definitely doesn't work under strict aliasing; also,
|
||||||
# gcc 4.1 breaks MySQL 5.0.16 without -fwrapv
|
# gcc 4.1 breaks MySQL 5.0.16 without -fwrapv
|
||||||
@ -655,6 +666,10 @@ fi
|
|||||||
%{_mandir}/man1/mysql_client_test.1*
|
%{_mandir}/man1/mysql_client_test.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 26 2010 Tom Lane <tgl@redhat.com> 5.1.42-6
|
||||||
|
- Emit explicit error message if user tries to build RPM as root
|
||||||
|
Related: #558915
|
||||||
|
|
||||||
* Wed Jan 20 2010 Tom Lane <tgl@redhat.com> 5.1.42-5
|
* Wed Jan 20 2010 Tom Lane <tgl@redhat.com> 5.1.42-5
|
||||||
- Correct Source0: tag and comment to reflect how to get the tarball
|
- Correct Source0: tag and comment to reflect how to get the tarball
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user