diff options
author | 2011-06-15 18:27:14 +0000 | |
---|---|---|
committer | 2011-06-15 18:27:14 +0000 | |
commit | 575da58d19b0dd094c6f9a4383569b3105438c0d (patch) | |
tree | 8f23e489981ea8056ad580c814fd5b82c7629edf | |
parent | Version sync b/of sabayon anaconda removal (diff) | |
download | anaconda-overlay-575da58d19b0dd094c6f9a4383569b3105438c0d.tar.gz anaconda-overlay-575da58d19b0dd094c6f9a4383569b3105438c0d.tar.bz2 anaconda-overlay-575da58d19b0dd094c6f9a4383569b3105438c0d.zip |
sys-block/open-iscsi version downgrade
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-2.0.870.3-r1.ebuild | 156 | ||||
-rw-r--r-- | sys-block/open-iscsi/open-iscsi-2.0.872.ebuild | 106 |
2 files changed, 156 insertions, 106 deletions
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.870.3-r1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.870.3-r1.ebuild new file mode 100644 index 0000000..58c35b2 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.870.3-r1.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.870.3-r1.ebuild,v 1.1 2009/10/27 19:47:34 dertobi123 Exp $ + +inherit distutils versionator linux-mod eutils flag-o-matic + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.org/" +MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)" +SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc ~mips" +IUSE="modules utils debug" +DEPEND="virtual/linux-sources app-doc/doxygen" +RDEPEND="virtual/modutils sys-apps/util-linux" + +S="${WORKDIR}/${MY_PV}" + +MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel" +MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})" +BUILD_TARGETS="all" +CONFIG_CHECK="CRYPTO_CRC32C" +ERROR_CFG="open-iscsi needs CRC32C support in your kernel." + +src_unpack() { + unpack ${A} + export EPATCH_OPTS="-d${S}" + if [ $KV_PATCH -lt 15 ]; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + epatch "${FILESDIR}"/CVE-2009-1297.patch + + # add RH patches, we need libiscsi for anaconda + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-update-initscripts-and-docs.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-use-var-for-config.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-use-red-hat-for-name.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-ibft-sysfs.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-print-ibft-net-info.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-only-root-use.patch + epatch "${FILESDIR}"/redhat/iscsi-initiator-utils-start-iscsid.patch + + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-add-libiscsi.patch + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-no-exit.patch + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-ibft-newer-kernel.patch + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-485217.patch + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-fwparam-ppc-crash.patch + epatch "${FILESDIR}"/redhat/${PN}-2.0-870.1-compile-fix.patch + + # >=2.6.36 kernel support + epatch "${FILESDIR}"/${PN}-2.0.870-null-sysfs-str.patch + +} + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + if use modules; then + einfo "Building kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_compile || die "failed to build modules" + fi + + einfo "Building fwparam_ibft" + cd "${S}"/utils/fwparam_ibft && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + + einfo "Building userspace" + cd "${S}"/usr && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + + einfo "Building libiscsi" + cd "${S}"/libiscsi && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + cd "${S}/libiscsi" && \ + distutils_src_compile + + if use utils; then + einfo "Building utils" + cd "${S}"/utils && \ + CFLAGS="" emake OPTFLAGS="${CFLAGS}" \ + || die "emake failed" + fi +} + +src_install() { + if use modules; then + einfo "Installing kernel modules" + export KSRC="${KERNEL_DIR}" + linux-mod_src_install + fi + + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart + + einfo "Installing libiscsi" + dodir /usr/$(get_libdir) + exeinto /usr/$(get_libdir) + doexe "${S}"/libiscsi/libiscsi.so.0 + dosym /usr/$(get_libdir)/libiscsi.so.0 /usr/$(get_libdir)/libiscsi.so + + dodir /usr/include + insinto /usr/include + doins "${S}"/libiscsi/libiscsi.h + + cd "${S}/libiscsi" + distutils_src_install + cd "${S}" + + if use utils; then + einfo "Installing utilities" + dosbin utils/iscsi-iname utils/iscsi_discovery + fi + + einfo "Installing docs" + doman doc/*[1-8] + dodoc README THANKS + docinto test + dodoc test/* + + einfo "Installing configuration" + insinto /etc/iscsi + doins etc/iscsid.conf + + # only contains iscsi initiatorname, no need to update + if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then + doins "${FILESDIR}"/initiatorname.iscsi + fi + + # if there is a special conf.d for this version, use it + # otherwise, use the default: iscsid-conf.d + insinto /etc/conf.d + if [ -e "${FILESDIR}"/iscsid-${PV}.conf.d ]; then + newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid + else + newins "${FILESDIR}"/iscsid-conf.d iscsid + fi + + # same for init.d + if [ -e "${FILESDIR}"/iscsid-${PV}.init.d ]; then + newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid + else + newinitd "${FILESDIR}"/iscsid-init.d iscsid + fi + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.872.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.872.ebuild deleted file mode 100644 index 2ecc799..0000000 --- a/sys-block/open-iscsi/open-iscsi-2.0.872.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 -inherit distutils versionator linux-info eutils flag-o-matic autotools - -DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" -HOMEPAGE="http://www.open-iscsi.org/" -MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)" -SRC_URI="mirror://kernel/linux/kernel/people/mnc/open-iscsi/releases/${MY_PV}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="debug slp" -DEPEND="net-libs/openslp" -RDEPEND="${DEPEND} - sys-apps/util-linux" - -S="${WORKDIR}/${MY_PV}" - -pkg_setup() { - linux-info_pkg_setup - - if [ $KV_PATCH -lt 15 ]; then - die "Sorry, your kernel must be 2.6.16-rc5 or newer!" - fi -} - -src_prepare() { - export EPATCH_OPTS="-d${S}" - epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup.patch - epatch "${FILESDIR}"/${P}-glibc212.patch - epatch "${FILESDIR}"/${P}-slp.patch - epatch "${FILESDIR}"/${P}-omg-calling-configure.patch - - # add RH patches, we need libiscsi for anaconda - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-update-initscripts-and-docs.patch - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-use-var-for-config.patch - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-use-red-hat-for-name.patch - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-add-libiscsi.patch - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-disable-isns-for-lib.patch - epatch "${FILESDIR}"/redhat-${PV}/iscsi-initiator-utils-fix-lib-sysfs-init.patch - - if use slp; then - # workaround bug with lslp - cd "${S}"/utils/open-isns || die - eautoreconf - sed -i "s:-lisns:-lisns -lslp:g" "${S}"/usr/Makefile || die - fi -} - -src_configure() { - einfo "Configuring userpsace" - cd "${S}/utils/open-isns" || die - econf $(use_with slp) || die -} - -src_compile() { - use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI - einfo "Building userspace" - cd "${S}" || die - CFLAGS="" emake OPTFLAGS="${CFLAGS}" user || die "emake failed" -} - -src_install() { - # build system is broken... - emake DESTDIR="${D}" sbindir="/usr/sbin" install_user || die "emake install_user failed" - # this doesn't get installed - dosbin usr/iscsistart - - einfo "Installing configuration" - insinto /etc/iscsi - doins etc/iscsid.conf - newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example - insinto /etc/iscsi/ifaces - doins etc/iface.example - - newconfd "${FILESDIR}"/iscsid-conf.d iscsid - newinitd "${FILESDIR}"/iscsid-2.0.871-r1.init.d iscsid - - keepdir /var/db/iscsi - fperms 700 /var/db/iscsi - fperms 600 /etc/iscsi/iscsid.conf - - einfo "Installing libiscsi" - dodir /usr/$(get_libdir) - exeinto /usr/$(get_libdir) - doexe "${S}"/libiscsi/libiscsi.so.0 - dosym libiscsi.so.0 /usr/$(get_libdir)/libiscsi.so - - dodir /usr/include - insinto /usr/include - doins "${S}"/libiscsi/libiscsi.h - - cd "${S}"/libiscsi || die - distutils_src_install - -} - -pkg_postinst() { - in='/etc/iscsi/initiatorname.iscsi' - if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then - cp -f "${ROOT}${in}.example" "${ROOT}${in}" - fi -} |