diff options
| -rw-r--r-- | glusterfs.spec.in | 7 | ||||
| -rwxr-xr-x | tests/basic/rpm.t | 35 | 
2 files changed, 35 insertions, 7 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 35dbd687546..8baddb1b306 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -457,7 +457,9 @@ regression testing of Gluster.  %setup -q -n %{name}-%{version}%{?prereltag}  %build -./autogen.sh +# For whatever reason, install-sh is sometimes missing. When this gets fixed, +# there is no need to run ./autogen or have a BuildRequires for automake. +[ -e 'install-sh' -o -e 'install.sh' ] || ./autogen.sh  %configure \          %{?_without_rdma} \          %{?_without_epoll} \ @@ -961,6 +963,9 @@ if [ $1 -ge 1 ]; then  fi  %changelog +* Thu May 22 2014 Niels de Vos <ndevos@redhat.com> +- Almost drop calling ./autogen.sh +  * Fri Apr 25 2014 Kaleb S. KEITHLEY <kkeithle@redhat.com>  - Sync with Fedora spec (#1091392) diff --git a/tests/basic/rpm.t b/tests/basic/rpm.t index a577726a82b..cea56ced6a3 100755 --- a/tests/basic/rpm.t +++ b/tests/basic/rpm.t @@ -52,24 +52,40 @@ REPO=${PWD}  COMMIT=$(git describe)  mkdir rpmbuild-mock.d  pushd rpmbuild-mock.d 2>/dev/null -git clone -q -s file://${REPO} . -git checkout -q -b rpm-test ${COMMIT} + +function git_quiet() { +        git ${@} 2>&1 > /dev/null +} + +TEST git_quiet clone -s file://${REPO} . +TEST git_quiet checkout -b rpm-test ${COMMIT}  # build the glusterfs-*.tar.gz -[ -e configure ] || ./autogen.sh 2>&1 > /dev/null -TEST ./configure --enable-fusermount +function build_srpm_from_tgz() { +        rpmbuild -ts $1 \ +                --define "_srcrpmdir ${PWD}" \ +                --define '_source_payload w9.gzdio' \ +                --define '_source_filedigest_algorithm 1' +} + +TEST ./autogen.sh +TEST ./configure  TEST make dist  # build the glusterfs src.rpm -ls extras -TEST make -C extras/LinuxRPM testsrpm +TEST build_srpm_from_tgz ${PWD}/*.tar.gz  # build for the last two Fedora EPEL releases (x86_64 only)  for MOCK_CONF in $(ls -x1 /etc/mock/*.cfg | egrep -e 'epel-[0-9]+-x86_64.cfg$' | tail -n2)  do  	EPEL_RELEASE=$(basename ${MOCK_CONF} .cfg) +	mkdir -p "${PWD}/mock.d/${EPEL_RELEASE}" +	chgrp mock "${PWD}/mock.d/${EPEL_RELEASE}" +	chmod 0775 "${PWD}/mock.d/${EPEL_RELEASE}" +	MOCK_RESULTDIR="--resultdir ${PWD}/mock.d/${EPEL_RELEASE}"  	# expand the mock command line  	MOCK_CMD="/usr/bin/mock ${MOCK_CLEANUP} \ +		${MOCK_RESULTDIR} \  		-r ${EPEL_RELEASE} --rebuild ${PWD}/*.src.rpm"  	# write the mock command to a file, so that its easier to execute @@ -102,6 +118,13 @@ done  # possible on EPEL-5/6 installations, Fedora 17 and newer have unmet  # dependencies on the build-server :-/ +# logs are archived by Jenkins +if [ -d '/build/install/var' ] +then +        LOGS=$(find mock.d -type f -name '*.log') +        [ -n "${LOGS}" ] && xargs cp --parents ${LOGS} /build/install/var/ +fi +  popd 2>/dev/null  # only remove rpmbuild-mock.d if we're not debugging  [ "${DEBUG}" = "0" ] && rm -rf rpmbuild-mock.d  | 
