diff --git a/bindep.txt b/bindep.txt index 80ce1bf915..1d65d3ff87 100644 --- a/bindep.txt +++ b/bindep.txt @@ -6,15 +6,22 @@ gcc [platform:rpm] gettext [!platform:suse] gettext-runtime [platform:suse] liberasurecode-dev [platform:dpkg] -liberasurecode-devel [platform:rpm] +# There's no library in CentOS 7 but Fedora and openSUSE have it. +liberasurecode-devel [platform:rpm !platform:centos] libffi-dev [platform:dpkg] libffi-devel [platform:rpm] memcached python-dev [platform:dpkg] python-devel [platform:rpm] python3-dev [platform:dpkg] -python34-devel [platform:redhat] -python3-devel [platfrom:suse] +python3-devel [platform:fedora platform:suse] +# python3-devel does not pull in the python3 package on openSUSE so +# we need to be explicit. The python3 package contains the XML module +# which is required by a python3 virtualenv. Similarly, in python2, +# the XML module is located in python-xml which is not pulled in +# by python-devel as well. See https://bugzilla.suse.com/show_bug.cgi?id=1046990 +python3 [platform:suse] +python-xml [platform:suse] rsync xfsprogs libssl-dev [platform:dpkg] diff --git a/tools/test-setup.sh b/tools/test-setup.sh index e8f2e944c3..efed6f01e0 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -12,3 +12,19 @@ truncate -s 1GB $HOME/1G_xfs_file mkdir -p $HOME/xfstmp sudo mount -o loop,noatime,nodiratime $HOME/1G_xfs_file $HOME/xfstmp sudo chmod 777 $HOME/xfstmp + +# Install liberasurecode-devel for CentOS from RDO repository. + +function is_rhel7 { + [ -f /usr/bin/yum ] && \ + cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \ + cat /etc/*release | grep -q 'release 7' +} + + +if is_rhel7; then + # Install CentOS OpenStack repos so that we have access to some extra + # packages. + sudo yum install -y centos-release-openstack-pike + sudo yum install -y liberasurecode-devel +fi