summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extras/LinuxRPM/Makefile.am2
-rw-r--r--glusterfs.spec.in10
-rwxr-xr-xtests/basic/rpm.t7
-rw-r--r--tests/include.rc20
4 files changed, 33 insertions, 6 deletions
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am
index 7a3107aabb7..3c867fe275e 100644
--- a/extras/LinuxRPM/Makefile.am
+++ b/extras/LinuxRPM/Makefile.am
@@ -28,7 +28,6 @@ prep::
echo "copying glusterfs rpm files from local cache..." ; \
mkdir -p ./rpmbuild/SOURCES; \
cp /d/cache/glusterfs/* ./rpmbuild/SOURCES/ ; \
- touch /d/cache/.gluster ; \
elif [ -x /usr/bin/git ]; then \
echo "fetching glusterfs rpm files from fedora git repo..."; \
cd ./rpmbuild && git clone git://pkgs.fedoraproject.org/glusterfs.git > /dev/null && mv glusterfs SOURCES; \
@@ -46,7 +45,6 @@ prep::
@if [ -d /d/cache -a -f /d/cache/$(GRIZZLY_TAR) -a -d ./rpmbuild/SOURCES ]; then \
echo "copying swift source tarball from local cache..." ; \
cp /d/cache/$(GRIZZLY_TAR) ./rpmbuild/SOURCES/ ; \
- touch /d/cache/.swift ; \
elif [ -x /usr/bin/curl -a -d ./rpmbuild/SOURCES ]; then \
echo "fetching swift from launchpad.net..." ; \
cd ./rpmbuild/SOURCES && /usr/bin/curl -sOL $(GRIZZLY_URL) ; \
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 1923b0f2715..4637b978f4b 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -261,6 +261,9 @@ This package provides the glusterfs server daemon.
%package resource-agents
Summary: OCF Resource Agents for GlusterFS
License: GPLv3+
+%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
+BuildArch: noarch
+%endif
# this Group handling comes from the Fedora resource-agents package
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
Group: System Environment/Base
@@ -364,6 +367,7 @@ Patch20: 0001-Use-updated-parallel-install-versions-of-epel-packag.patc
Patch21: 0002-Add-fixes-for-building-the-doc-package.patch
Patch22: glusterfs-3.3.1.swift.constraints.backport-1.7.4.patch
Patch23: glusterfs-3.4.0.swift.egginfo-grizzly.patch
+Patch24: 0002-Add-fixes-for-building-the-doc-package.patch.180
#BuildRoot: %(mktemp -ud %{_tmppath}/swift-%{SWIFTVER}-%{release}-XXXXXX)
%if 0%{?_with_systemd:1}
@@ -545,11 +549,15 @@ storage costs.
%patch1 -p0
%endif
cd swift-%{SWIFTVER}
-%if "%{SWIFTVER}" == "1.7.4"
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
%patch20 -p1
+%if "%{SWIFTVER}" == "1.7.4"
%patch21 -p1
+%else
+%patch24 -p1
%endif
+%endif
+%if "%{SWIFTVER}" == "1.7.4"
%patch22 -p1
%else
%patch23 -p1
diff --git a/tests/basic/rpm.t b/tests/basic/rpm.t
index 560d9f8b81b..15963e190e1 100755
--- a/tests/basic/rpm.t
+++ b/tests/basic/rpm.t
@@ -58,6 +58,8 @@ chmod g=rwx ${RESULT_DIR}
chown :mock ${RESULT_DIR}
# build for the last two Fedora EPEL releases (x86_64 only)
+# TAP/Prove aren't smart about loops
+TESTS_EXPECTED_IN_LOOP=2
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)
@@ -80,13 +82,14 @@ EOF
if (groups | grep -q mock)
then
# the current user is in group 'mock'
- TEST ${RESULT_DIR}/${EPEL_RELEASE}/mock.sh
+ RUNMOCK="${RESULT_DIR}/${EPEL_RELEASE}/mock.sh"
else
# switch to the user called 'mock'
chown mock:mock ${RESULT_DIR}/${EPEL_RELEASE}
# "su" might not work, using sudo instead
- TEST sudo -u mock -E ${RESULT_DIR}/${EPEL_RELEASE}/mock.sh
+ RUNMOCK="sudo -u mock -E ${RESULT_DIR}/${EPEL_RELEASE}/mock.sh"
fi
+ TEST_IN_LOOP ${RUNMOCK}
done
# we could build for the last two Fedora releases too, but that is not
diff --git a/tests/include.rc b/tests/include.rc
index 4008ad36f0c..bb541eaa1e4 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -14,7 +14,17 @@ mkdir -p $B0;
mkdir -p $M0 $M1;
mkdir -p $N0 $N1;
-testcnt=`egrep '^[[:space:]]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)' $0 | wc -l`;
+testcnt=`egrep '^[[:space:]]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)[[:space:]]' $0 | wc -l`
+expect_tests=`egrep '^[[:space:]]*TESTS_EXPECTED_IN_LOOP[[:space:]]*' $0`
+
+x_ifs=$IFS
+IFS=$'\n'
+for line in $expect_tests; do
+ expect_tests=`echo $line | cut -f 2 -d =`
+ testcnt=`expr $testcnt + $expect_tests`
+done
+IFS=$x_ifs
+
echo 1..$testcnt
t=1
@@ -164,6 +174,13 @@ function SKIP_TESTS()
}
+function _TEST_IN_LOOP()
+{
+ testcnt=`expr $testcnt + 1`;
+ _TEST $@
+}
+
+
function cleanup()
{
killall -15 glusterfs glusterfsd glusterd 2>/dev/null || true;
@@ -224,4 +241,5 @@ alias EXPECT='_EXPECT $LINENO'
alias TEST='_TEST $LINENO'
alias EXPECT_WITHIN='_EXPECT_WITHIN $LINENO'
alias EXPECT_KEYWORD='_EXPECT_KEYWORD $LINENO'
+alias TEST_IN_LOOP='_TEST_IN_LOOP $LINENO'
shopt -s expand_aliases