From bfd43dc894fcf2cc64ec73e8ea0a779064c47dd4 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 23 May 2016 11:06:38 +0200 Subject: build: include a dummy config.sub and config.guess in releases There is no hard requirement for a config.guess and config.sub script in the release tarball. By passing --build=... and --host=... to ./configure, the scripts are not executed. When doing local builds, the ./autogen.sh script (by running automake) will place a config.guess and config.sub script in the root of the source tree. Upon creation of the release ('make dist') tarball, the scripts are replaced by dummy copies from the build-aux/ directory. The main advantage to not include these scripts in the repository, is that there is no need to track upstream updates for them either. Change-Id: I5e930988a9e849ec5d0c84d2e30e61f2a9685f45 BUG: 1223937 Reported-by: Emmanuel Dreyfus Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/14503 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- glusterfs.spec.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 2f4e94d13cc..ed5b0623a9f 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -190,13 +190,16 @@ BuildRequires: systemd-units Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: bison flex -BuildRequires: gcc make automake libtool +BuildRequires: gcc make libtool BuildRequires: ncurses-devel readline-devel BuildRequires: libxml2-devel openssl-devel BuildRequires: libaio-devel libacl-devel BuildRequires: python-devel BuildRequires: python-ctypes BuildRequires: userspace-rcu-devel >= 0.7 +%if ( 0%{?rhel} && 0%{?rhel} <= 6 ) +BuildRequires: automake +%endif %if ( 0%{?rhel} && 0%{?rhel} <= 5 ) BuildRequires: e2fsprogs-devel %else @@ -575,7 +578,12 @@ CFLAGS=-DUSE_INSECURE_OPENSSL export CFLAGS %endif -./autogen.sh && %configure \ +# RHEL6 and earlier need to manually replace config.guess and config.sub +%if ( 0%{?rhel} && 0%{?rhel} <= 6 ) +./autogen.sh +%endif + +%configure \ %{?_with_cmocka} \ %{?_with_debug} \ %{?_with_tmpfilesdir} \ -- cgit