From: Loic Dachary Date: Mon, 23 Mar 2015 20:28:20 +0000 (+0100) Subject: install-deps: support OpenSUSE X-Git-Tag: v9.0.0~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b99c714955c4146fa6233383bd00d3bd189932e0;p=ceph.git install-deps: support OpenSUSE OpenSUSE must be separated as it uses zypper and does not have a functional yum-builddep Signed-off-by: Loic Dachary --- diff --git a/install-deps.sh b/install-deps.sh index 944781e16787..c741425b4c36 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -23,10 +23,14 @@ if test -f /etc/redhat-release ; then $SUDO yum install -y redhat-lsb-core fi -if which apt-get > /dev/null ; then +if type apt-get > /dev/null 2>&1 ; then $SUDO apt-get install -y lsb-release fi +if type zypper > /dev/null 2>&1 ; then + $SUDO zypper --gpg-auto-import-keys --non-interactive install openSUSE-release lsb-release +fi + case $(lsb_release -si) in Ubuntu|Debian|Devuan) $SUDO apt-get install -y dpkg-dev @@ -49,11 +53,8 @@ Ubuntu|Debian|Devuan) packages=$(echo $packages) # change newlines into spaces $SUDO bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -y $packages" ;; -CentOS|Fedora|SUSE*|RedHatEnterpriseServer) +CentOS|Fedora|RedHatEnterpriseServer) case $(lsb_release -si) in - SUSE*) - $SUDO zypper -y yum-utils - ;; Fedora) $SUDO yum install -y yum-utils ;; @@ -73,6 +74,10 @@ CentOS|Fedora|SUSE*|RedHatEnterpriseServer) sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec $SUDO yum-builddep -y $DIR/ceph.spec ;; +*SUSE*) + sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec + $SUDO zypper --non-interactive install $(rpmspec -q --buildrequires $DIR/ceph.spec) + ;; *) echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually." ;;