[openfabrics-ewg] [PATCH ofed-1.2 alpha rel] IB/iSER: fix open-iscsi installation
Erez Zilber
erezz at voltaire.com
Tue Feb 13 04:15:43 PST 2007
Vladimir Sokolovsky wrote:
> 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?
>
>
Oops. Here's the missing patch:
--- build_env.sh.orig 2007-02-13 14:12:29.000000000 +0200
+++ build_env.sh 2007-02-13 12:21:28.000000000 +0200
@@ -342,6 +342,8 @@
OPEN_ISCSI_VER=$(rpm --queryformat "[%{VERSION}]" -qp $OPEN_ISCSI_SRC_RPM)
OPEN_ISCSI_REL=$(rpm --queryformat "[%{RELEASE}]" -qp $OPEN_ISCSI_SRC_RPM)
OPEN_ISCSI_VERSION=${OPEN_ISCSI_VER}-${OPEN_ISCSI_REL}
+ OPEN_ISCSI_SUSE_NAME=open-iscsi
+ OPEN_ISCSI_REDHAT_NAME=iscsi-initiator-utils
fi
IB_BONDING_SRC_RPM=$(/bin/ls -1 ${SRPMS}/ib-bonding*src.rpm 2> $NULL)
Thanks,
Erez
More information about the ewg
mailing list