[openfabrics-ewg] [PATCH ofed-1.2 alpha rel] IB/iSER: fix open-iscsi installation
Vladimir Sokolovsky
vlad at mellanox.co.il
Tue Feb 13 04:08:32 PST 2007
On Tue, 2007-02-13 at 13:07 +0200, Erez Zilber wrote:
> Vlad,
>
> The following patch fixes the installation of the open-iscsi package. Unlike other rpms, the open-iscsi-generic src rpm generates 2 binary rpms:
>
> * open-iscsi - for SuSE
> * iscsi-initiator-utils - for RedHat
>
> Therefore, the distro type should be checked before copying/installing this package.
>
> --- build.sh.orig 2007-02-13 11:26:44.000000000 +0200
> +++ build.sh 2007-02-13 11:45:19.000000000 +0200
> @@ -327,7 +327,19 @@
> fi
> ex rpmbuild --rebuild --define \'_topdir ${RPM_DIR}\' ${OPEN_ISCSI_SRC_RPM}
>
> - ex "$MV -f ${RPM_DIR}/RPMS/$build_arch/${OPEN_ISCSI_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm $RPMS"
> + case ${DISTRIBUTION} in
> + SuSE)
> + ex "$MV -f ${RPM_DIR}/RPMS/$build_arch/${OPEN_ISCSI_SUSE_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm $RPMS"
> + ;;
> + redhat)
> + ex "$MV -f ${RPM_DIR}/RPMS/$build_arch/${OPEN_ISCSI_REDHAT_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm $RPMS"
> + ;;
> + *)
> + err_echo "Distribution ${DISTRIBUTION} is not supported by open-iscsi over iSER"
> + return 1
> + ;;
> + esac
> +
> let BUILD_COUNTER++
>
> return 0
> --- install.sh.orig 2007-02-13 12:04:27.000000000 +0200
> +++ install.sh 2007-02-13 12:09:18.000000000 +0200
> @@ -317,7 +317,18 @@
> fi
> ;;
> open-iscsi)
> - [ ! -f ${RPMS}/${OPEN_ISCSI_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ] && return 1
> + case ${DISTRIBUTION} in
> + SuSE)
> + [ ! -f ${RPMS}/${OPEN_ISCSI_SUSE_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ] && return 1
> + ;;
> + redhat)
> + [ ! -f ${RPMS}/${OPEN_ISCSI_REDHAT_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ] && return 1
> + ;;
> + *)
> + err_echo "Distribution ${DISTRIBUTION} is not supported by open-iscsi over iSER"
> + return 1
> + ;;
> + esac
> ;;
> ib-bonding)
> [ "$DISTRIBUTION" == "redhat" ] &&
> @@ -942,14 +953,28 @@
> # return 2
> # fi
>
> - if [ -f ${RPMS}/${OPEN_ISCSI_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ]; then
> - ex "$RPM -Uhv ${RPMS}/${OPEN_ISCSI_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm"
> - else
> - err_echo "${OPEN_ISCSI_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm not found under ${RPMS}."
> - fi
> + case ${DISTRIBUTION} in
> + SuSE)
> + if [ -f ${RPMS}/${OPEN_ISCSI_SUSE_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ]; then
> + ex "$RPM -Uhv ${RPMS}/${OPEN_ISCSI_SUSE_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm"
> + else
> + err_echo "${OPEN_ISCSI_SUSE_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm not found under ${RPMS}."
> + fi
> + ;;
> + redhat)
> + if [ -f ${RPMS}/${OPEN_ISCSI_REDHAT_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm ]; then
> + ex "$RPM -Uhv ${RPMS}/${OPEN_ISCSI_REDHAT_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm"
> + else
> + err_echo "${OPEN_ISCSI_REDHAT_NAME}-${OPEN_ISCSI_VERSION}.${build_arch}.rpm not found under ${RPMS}."
> + fi
> + ;;
> + *)
> + err_echo "Distribution ${DISTRIBUTION} is not supported by open-iscsi over iSER"
> + return 1
> + ;;
> + esac
>
> return 0
> -
> }
>
> ofed-docs()
>
Erez,
I don't see that you define OPEN_ISCSI_SUSE_NAME and OPEN_ISCSI_REDHAT_NAME variables.
Did I missed something?
--
Vladimir Sokolovsky <vlad at mellanox.co.il>
Mellanox Technologies Ltd.
More information about the ewg
mailing list