auto-import iscsi-initiator-utils-5.0.0.4_446-0 on branch devel from iscsi-initiator-utils-5.0.0.4_446-0.src.rpm
This commit is contained in:
parent
6472ef09e3
commit
8f9cfe4197
@ -1 +1 @@
|
|||||||
linux-iscsi-user-4.0.1.8.tgz
|
open-iscsi-5.0.0.4_446.tar.gz
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
Summary: iSCSI daemon and utility programs
|
Summary: iSCSI daemon and utility programs
|
||||||
Name: iscsi-initiator-utils
|
Name: iscsi-initiator-utils
|
||||||
Version: 4.0.1.8
|
Version: 5.0.0.4_446
|
||||||
Release: 0.1
|
Release: 0
|
||||||
Source0: http://prdownloads.sourceforge.net/linux-iscsi/linux-iscsi-user-%{version}.tgz
|
Source0: http://people.redhat.com/mchristi/iscsi/FC5/open-iscsi/rpm/open-iscsi-%{version}.tar.gz
|
||||||
Patch0: linux-iscsi-4.0.1.8-redhatify.patch
|
Patch0: open-iscsi-5.0.0.4_446-initscript.patch
|
||||||
Patch1: linux-iscsi-4.0.1.8-remove_kerneldeps.patch
|
Patch1: open-iscsi-5.0.0.4_446-rm-rdma.patch
|
||||||
|
Patch2: open-iscsi-5.0.0.4_446-add-iscsi-iname.patch
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: GPL
|
License: GPL
|
||||||
URL: http://linux-iscsi.sourceforge.net/
|
URL: http://www.open-iscsi.org
|
||||||
Buildroot: %{_tmppath}/%{name}-root
|
Buildroot: %{_tmppath}/%{name}-root
|
||||||
BuildRequires: sysfsutils-devel
|
|
||||||
Requires: kernel
|
Requires: kernel
|
||||||
|
BuildRequires: openssl-devel db4-devel
|
||||||
Prereq: /sbin/chkconfig
|
Prereq: /sbin/chkconfig
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
Obsoletes: iscsi
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The iscsi package provides the server daemon for the iSCSI protocol,
|
The iscsi package provides the server daemon for the iSCSI protocol,
|
||||||
@ -23,33 +23,29 @@ Protocol networks.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version} -c
|
%setup -q -n %{name}-%{version} -c
|
||||||
cd linux-iscsi-%{version}
|
cd open-iscsi-%{version}
|
||||||
%patch0 -p1 -b .redhatify
|
%patch0 -p1 -b .initscript
|
||||||
%patch1 -p1 -b .remkdep
|
%patch1 -p1 -b .rm-rdma
|
||||||
|
%patch2 -p1 -b .add-iscsi-iname
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd linux-iscsi-%{version}
|
cd open-iscsi-%{version}
|
||||||
make daemon utils
|
make -C usr
|
||||||
|
make -C utils
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd linux-iscsi-%{version}
|
cd open-iscsi-%{version}
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p $RPM_BUILD_ROOT{/sbin,/dev/iscsi}
|
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/{man1,man5,man8}
|
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||||
install -s -m 755 obj/iscsid obj/utils/iscsi-device obj/utils/iscsi-iname obj/utils/iscsi-ls obj/utils/iscsi-id $RPM_BUILD_ROOT/sbin
|
mkdir -p $RPM_BUILD_ROOT/var/db/iscsi/
|
||||||
# iscsi-mountall is not necessary because we're using _netdev in /etc/fstab
|
install -s -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname $RPM_BUILD_ROOT/sbin
|
||||||
install -m 755 misc/scripts/iscsi-umountall $RPM_BUILD_ROOT/sbin
|
install -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||||
install -m 644 man/iscsi-ls.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
install -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||||
install -m 644 man/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
install -m 755 etc/initd/initd.redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsi
|
||||||
install -m 644 man/iscsi.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5
|
install -m 644 etc/iscsid.conf $RPM_BUILD_ROOT/etc
|
||||||
install -m 644 man/iscsi.bindings.5 $RPM_BUILD_ROOT/%{_mandir}/man5
|
|
||||||
install -m 755 misc/scripts/rc.iscsi $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsi
|
|
||||||
install -m 644 misc/iscsi.conf $RPM_BUILD_ROOT/etc
|
|
||||||
echo 'GenerateName=yes' > initiatorname.iscsi
|
|
||||||
install -m 600 initiatorname.iscsi $RPM_BUILD_ROOT/etc
|
|
||||||
rm -f initiatorname.iscsi
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -66,70 +62,12 @@ fi
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%config /etc/rc.d/init.d/iscsi
|
%config /etc/rc.d/init.d/iscsi
|
||||||
%attr(600,root,root) %config(noreplace) /etc/initiatorname.iscsi
|
%attr(600,root,root) %config(noreplace) /etc/iscsid.conf
|
||||||
%attr(600,root,root) %config(noreplace) /etc/iscsi.conf
|
%doc open-iscsi-%{version}/README
|
||||||
%doc linux-iscsi-%{version}/README
|
%dir /var/db/iscsi
|
||||||
/sbin/*
|
/sbin/*
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jul 19 2004 AJ Lewis <alewis@redhat.com> 4.0.1.8-0.1
|
* Wed Dec 14 2005 Mike Christie <mchristi@redhat.com>
|
||||||
- update to 4.0.1.8 upstream for 2.6 kernels
|
|
||||||
- add iscsi-id to binaries installed
|
|
||||||
|
|
||||||
* Wed Jul 14 2004 AJ Lewis <alewis@redhat.com> 3.6.0.2-0.1
|
|
||||||
- update to 3.6.0.2 upstream
|
|
||||||
- add iscsi-ls to installed binaries
|
|
||||||
- add iscsi-ls.1 manpage to man1
|
|
||||||
- remove /dev/iscsi reference (no longer used)
|
|
||||||
|
|
||||||
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
|
|
||||||
- rebuilt
|
|
||||||
|
|
||||||
* Thu Jun 05 2003 Elliot Lee <sopwith@redhat.com>
|
|
||||||
- rebuilt
|
|
||||||
|
|
||||||
* Mon Feb 03 2003 Michael K. Johnson <johnsonm@redhat.com> 3.1.0.3-3
|
|
||||||
- rebuild, 3.1.0.3-3
|
|
||||||
|
|
||||||
* Mon Nov 11 2002 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- Fixed typo in initscript to allow to function
|
|
||||||
|
|
||||||
* Thu Oct 17 2002 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- update to 3.1.0.3 for draft 16 compliance
|
|
||||||
- /etc/initiatorname.iscsi should be mode 600
|
|
||||||
- C++ all gone, no need for libstdc++ static link
|
|
||||||
|
|
||||||
* Wed Aug 14 2002 Bob Matthews <bmatthews@redhat.com>
|
|
||||||
- fix perms on /etc/iscsi.conf
|
|
||||||
|
|
||||||
* Mon Jul 15 2002 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- add status function
|
|
||||||
|
|
||||||
* Thu May 02 2002 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- hack to link statically against libstdc++ so /sbin does not depend on /usr
|
|
||||||
|
|
||||||
* Wed Apr 10 2002 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- update to 2.1.0.20
|
|
||||||
|
|
||||||
* Fri Oct 26 2001 Than Ngo <than@redhat.com> 2.0.1.8-3
|
|
||||||
- cleanup startup script
|
|
||||||
- add excludearch s390 s390x
|
|
||||||
|
|
||||||
* Tue Aug 28 2001 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- clean up shutdown (#52440)
|
|
||||||
|
|
||||||
* Mon Aug 13 2001 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- update to 2.0.1.8 for draft 6 compliance
|
|
||||||
|
|
||||||
* Mon Aug 13 2001 Bob Matthews <bmatthews@redhat.com>
|
|
||||||
- fix typo in initscripts (#51585)
|
|
||||||
|
|
||||||
* Tue Jul 31 2001 Bill Nottingham <notting@redhat.com>
|
|
||||||
- fix up initscript output (#50502)
|
|
||||||
|
|
||||||
* Wed Jul 25 2001 Jeremy Katz <katzj@redhat.com>
|
|
||||||
- source /etc/init.d/functions in the initscript
|
|
||||||
|
|
||||||
* Tue Jul 24 2001 Michael K. Johnson <johnsonm@redhat.com>
|
|
||||||
- initial packaging
|
- initial packaging
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -Nurp linux-iscsi-4.0.1.8.old/Makefile linux-iscsi-4.0.1.8/Makefile
|
|
||||||
--- linux-iscsi-4.0.1.8.old/Makefile 2004-07-12 05:39:13.000000000 -0500
|
|
||||||
+++ linux-iscsi-4.0.1.8/Makefile 2004-07-19 17:08:03.330528156 -0500
|
|
||||||
@@ -108,7 +108,7 @@ OBJDIR:=$(OBJ)/$(OS)-$(ARCH)/dbg-obj
|
|
||||||
CFLAGS += -g -DDEBUG
|
|
||||||
LDFLAGS += -g
|
|
||||||
else
|
|
||||||
-OBJDIR:=$(OBJ)/$(OS)-$(ARCH)/obj
|
|
||||||
+OBJDIR:=$(OBJ)/obj
|
|
||||||
CFLAGS += -fomit-frame-pointer
|
|
||||||
endif
|
|
||||||
|
|
@ -1,181 +0,0 @@
|
|||||||
diff -Nurp linux-iscsi-4.0.1.8/Makefile linux-iscsi-4.0.1.8-new/Makefile
|
|
||||||
--- linux-iscsi-4.0.1.8/Makefile 2004-07-19 17:13:27.000000000 -0500
|
|
||||||
+++ linux-iscsi-4.0.1.8-new/Makefile 2004-08-13 09:27:48.520196676 -0500
|
|
||||||
@@ -19,7 +19,6 @@
|
|
||||||
OS:=$(shell uname)
|
|
||||||
ARCH:=$(shell uname -m)
|
|
||||||
|
|
||||||
-DRIVER_DIR:=driver
|
|
||||||
DAEMON_DIR:=daemon
|
|
||||||
COMMON_DIR:=common
|
|
||||||
MISC_DIR:=misc
|
|
||||||
@@ -44,52 +43,6 @@ export ROOT
|
|
||||||
BASEDIR:=/
|
|
||||||
export BASEDIR
|
|
||||||
|
|
||||||
-# We need to have the kernel headers installed in order to compile.
|
|
||||||
-# You can specify a TOPDIR for your Linux kernel here, or if you don't
|
|
||||||
-# we'll look for it in a few likely places later.
|
|
||||||
-TOPDIR:=
|
|
||||||
-
|
|
||||||
-# We also need the pathname of the kernel .config file to use.
|
|
||||||
-# You can specify a .config for your Linux kernel here, or if you don't
|
|
||||||
-# we'll look for it in a few likely places later.
|
|
||||||
-KERNEL_CONFIG:=
|
|
||||||
-
|
|
||||||
-# The rest of this Makefile shouldn't need to be modified
|
|
||||||
-
|
|
||||||
-# record the version of the running kernel
|
|
||||||
-KERNEL_VPSE:=$(shell uname -r)
|
|
||||||
-
|
|
||||||
-# Try to find the top of the Linux kernel source tree for the running kernel
|
|
||||||
-ifeq ($(TOPDIR),)
|
|
||||||
- ifeq ($(wildcard /lib/modules/$(KERNEL_VPSE)/build/.),/lib/modules/$(KERNEL_VPSE)/build/.)
|
|
||||||
- TOPDIR:=/lib/modules/$(KERNEL_VPSE)/build
|
|
||||||
- endif
|
|
||||||
- ifeq ($(TOPDIR),)
|
|
||||||
- $(warning Linux kernel source must be installed to compile this code.)
|
|
||||||
- $(error Could not find the top of the linux kernel source tree.)
|
|
||||||
- endif
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
-# record the kernel source version
|
|
||||||
-KERNEL_VERSION:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "VERSION" { print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
|
|
||||||
-KERNEL_PATCHLEVEL:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "PATCHLEVEL" {print $$2}' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
|
|
||||||
-KERNEL_SUBLEVEL:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "SUBLEVEL" {print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
|
|
||||||
-KERNEL_EXTRAVERSION:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "EXTRAVERSION" {print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
|
|
||||||
-KERNEL_SRC_VPSE:=$(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION)
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-# Try to find the kernel's config if the user didn't tell us where to find it.
|
|
||||||
-# People who compile their own kernels will have a .config, as will some
|
|
||||||
-# distributions that only ship one kernel binary, or that use separate
|
|
||||||
-# kernel source for each kernel binary. Redhat uses the same kernel source
|
|
||||||
-# for multiple kernel binaries.
|
|
||||||
-
|
|
||||||
-# the standard config file location is $(TOPDIR)/.config
|
|
||||||
-ifeq ($(wildcard $(TOPDIR)/.config),$(TOPDIR)/.config)
|
|
||||||
- KERNEL_CONFIG:=$(TOPDIR)/.config
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
-
|
|
||||||
# for compiling the daemon and utils
|
|
||||||
CC:=gcc
|
|
||||||
INCLUDE:= -I$(PWD)/include -I$(PWD)/$(LOGIN_DIR) -I$(PWD)/$(AUTH_DIR) -I$(PWD)/$(DISCOVERY_DIR) -I$(PWD)/$(DAEMON_DIR)/include -I$(PWD)/$(MISC_DIR)/include
|
|
||||||
@@ -116,7 +69,7 @@ endif
|
|
||||||
install remove uninstall dirs
|
|
||||||
|
|
||||||
# default target
|
|
||||||
-all:: dirs daemon utils permissions checkkernel checkscsi checkcrypto
|
|
||||||
+all:: dirs daemon utils permissions
|
|
||||||
daemon: dirs $(OBJDIR)/iscsid
|
|
||||||
utils: dirs $(OBJDIR)/$(UTILS_DIR)/iscsi-device $(OBJDIR)/$(UTILS_DIR)/iscsi-iname $(OBJDIR)/$(UTILS_DIR)/iscsi-ls $(OBJDIR)/$(UTILS_DIR)/iscsi-boot/init $(OBJDIR)/$(UTILS_DIR)/iscsi-id
|
|
||||||
|
|
||||||
@@ -127,27 +80,6 @@ export OBJDIR
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
-DRIVER_FILES:= $(DRIVER_DIR)/iscsi-initiator.c
|
|
||||||
-DRIVER_FILES+= $(DRIVER_DIR)/iscsi-attr.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-ioctl.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-network.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-probe.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-portal.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-recovery.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-recv-pdu.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-xmit-pdu.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-session.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-timer.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-task.c \
|
|
||||||
- $(DRIVER_DIR)/iscsi-crc.c \
|
|
||||||
- $(DRIVER_DIR)/Makefile \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi.h \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi-probe.h \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi-session.h \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi-limits.h \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi-task.h \
|
|
||||||
- $(DRIVER_DIR)/include/iscsi-crc.h \
|
|
||||||
-
|
|
||||||
DAEMON_FILES:= $(DAEMON_DIR)/iscsi-bindings.c
|
|
||||||
DAEMON_FILES+= $(DAEMON_DIR)/iscsi-config.c \
|
|
||||||
$(DAEMON_DIR)/iscsid.c \
|
|
||||||
@@ -205,79 +137,6 @@ remove uninstall:
|
|
||||||
@./$(SCRIPT_DIR)/remove.sh
|
|
||||||
|
|
||||||
|
|
||||||
-# warn the user if the running kernel version
|
|
||||||
-# doesn't match the $TOPDIR/Makefile version
|
|
||||||
-checkkernel:
|
|
||||||
- @printf "\nNote: using kernel source from $(TOPDIR)\ncontaining kernel version $(KERNEL_SRC_VPSE)\n\n" | fmt -
|
|
||||||
- @if [ "$(KERNEL_CONFIG)" ] ; then \
|
|
||||||
- printf "Note: using kernel config from $(KERNEL_CONFIG)\n\n" | fmt - ; \
|
|
||||||
- else \
|
|
||||||
- ( printf "Warning: failed to find a kernel config file for $(KERNEL_SRC_VPSE).\n" ; \
|
|
||||||
- printf "The iSCSI kernel module may fail to load or run properly.\n\n"; ) | fmt - ; \
|
|
||||||
- fi
|
|
||||||
- @if [ "$(KERNEL_VERSION).$(KERNEL_PATCHLEVEL)" = "2.4" ] ; then \
|
|
||||||
- ( printf "\nError: this iSCSI driver does not support 2.4 kernels.\n" ; \
|
|
||||||
- printf "You must upgrade your kernel to 2.6 or later\n" ; \
|
|
||||||
- printf "in order to use this driver.\n\n" ; ) | fmt - ; \
|
|
||||||
- exit 1; \
|
|
||||||
- fi
|
|
||||||
- @if [ "$(KERNEL_SRC_VPSE)" != "$(KERNEL_VPSE)" ] ; then\
|
|
||||||
- ( echo "Warning: $(TOPDIR) contains kernel version " ; \
|
|
||||||
- echo "$(KERNEL_SRC_VPSE), but kernel version $(KERNEL_VPSE) ";\
|
|
||||||
- echo "is currently running. This mismatch may prevent the " ; \
|
|
||||||
- echo "iSCSI module from loading on the running kernel due " ; \
|
|
||||||
- echo "to unresolved symbols, or may cause problems during " ; \
|
|
||||||
- echo "the operation of the iSCSI driver. The iSCSI driver " ; \
|
|
||||||
- echo "will be built for kernel version $(KERNEL_SRC_VPSE). "; \
|
|
||||||
- echo "If you wish to build the iSCSI driver for the kernel "; \
|
|
||||||
- echo "that is currently running, you must install the "; \
|
|
||||||
- echo "appropriate kernel source and rebuild the iSCSI " ; \
|
|
||||||
- echo "driver."; ) | fmt - ; \
|
|
||||||
- fi;
|
|
||||||
-
|
|
||||||
-# Error out if there is no scsi support in the kernel
|
|
||||||
-checkscsi:
|
|
||||||
- @if [ -n "$(KERNEL_CONFIG)" ] ; then \
|
|
||||||
- SCSI=`grep 'CONFIG_SCSI=' $(KERNEL_CONFIG)|awk -F'=' '{print $$2}'`; \
|
|
||||||
- if [ "$$SCSI" != "y" -a "$$SCSI" != "m" -a "$$SCSI" != "unknown" ] ; then \
|
|
||||||
- echo ; \
|
|
||||||
- echo "Error: your kernel does not appear to support SCSI." ; \
|
|
||||||
- echo "For iSCSI to function, you must rebuild your kernel " ; \
|
|
||||||
- echo "with either SCSI support compiled into the kernel, " ; \
|
|
||||||
- echo "or with SCSI support as a module." ; \
|
|
||||||
- echo ; \
|
|
||||||
- exit 1;\
|
|
||||||
- fi \
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
-checkcrypto:
|
|
||||||
- @if [ -n "$(KERNEL_CONFIG)" ] ; then \
|
|
||||||
- CRYPTO=`grep 'CONFIG_CRYPTO=' $(KERNEL_CONFIG)|awk -F'=' '{print $$2}'`; \
|
|
||||||
- MD5=`grep 'CONFIG_CRYPTO_MD5=' $(KERNEL_CONFIG)|awk -F'=' '{print $$2}'` ; \
|
|
||||||
- CRC32C=`grep 'CONFIG_CRYPTO_CRC32C=' $(KERNEL_CONFIG)|awk -F'=' '{print $$2}'` ; \
|
|
||||||
- if [ "$$CRYPTO" != "y" -a "$$CRYPTO" != "unknown" ]; then \
|
|
||||||
- echo ; \
|
|
||||||
- echo "Error: your kernel does not appear to support CRYPTO" ; \
|
|
||||||
- echo "API. For iSCSI to function, you must rebuild your " ; \
|
|
||||||
- echo "kernel with CRYPTO API support compiled into the " ; \
|
|
||||||
- echo "kernel." ; \
|
|
||||||
- exit 1;\
|
|
||||||
- elif [ "$$MD5" != "y" -a "$$MD5" != "m" -a "$$MD5" != "unknown" ]; then \
|
|
||||||
- echo; \
|
|
||||||
- echo "Error: your kernel does not appear to support MD5." ; \
|
|
||||||
- echo "For iSCSI to function, you must rebuild your kernel " ; \
|
|
||||||
- echo "with MD5 support compiled into the kernel." ; \
|
|
||||||
- echo ; \
|
|
||||||
- exit 1;\
|
|
||||||
- elif [ "$$CRC32C" != "y" -a "$$CRC32C" != "m" -a "$$CRC32C" != "unknown" ];then \
|
|
||||||
- echo; \
|
|
||||||
- echo "Warning:your kernel does not appear to support CRC." ;\
|
|
||||||
- echo "You will not be able to enable Header and Data Digest" ;\
|
|
||||||
- echo "features of iSCSI driver";\
|
|
||||||
- echo ;\
|
|
||||||
- fi \
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
# compile daemon/utility code and auto-generate dependencies (and make missing prereqs cause a rebuild,
|
|
||||||
# not an error)
|
|
||||||
$(OBJDIR)/%.o : %.c
|
|
470
open-iscsi-5.0.0.4_446-add-iscsi-iname.patch
Normal file
470
open-iscsi-5.0.0.4_446-add-iscsi-iname.patch
Normal file
@ -0,0 +1,470 @@
|
|||||||
|
diff -Naurp open-iscsi/Makefile open-iscsi.work/Makefile
|
||||||
|
--- open-iscsi/Makefile 2005-12-14 20:31:48.000000000 -0600
|
||||||
|
+++ open-iscsi.work/Makefile 2005-12-14 22:16:50.000000000 -0600
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
all:
|
||||||
|
make -C usr
|
||||||
|
make -C kernel
|
||||||
|
+ make -C utils
|
||||||
|
@echo
|
||||||
|
@echo "Compilation complete Output file"
|
||||||
|
@echo "----------------------------------- ----------------"
|
||||||
|
@@ -16,6 +17,7 @@ all:
|
||||||
|
@echo Read README file for detailed information.
|
||||||
|
|
||||||
|
clean:
|
||||||
|
+ make -C utils clean
|
||||||
|
make -C usr clean
|
||||||
|
make -C kernel clean
|
||||||
|
|
||||||
|
diff -Naurp open-iscsi/utils/iscsi-iname.c open-iscsi.work/utils/iscsi-iname.c
|
||||||
|
--- open-iscsi/utils/iscsi-iname.c 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/utils/iscsi-iname.c 2005-12-14 22:16:06.000000000 -0600
|
||||||
|
@@ -0,0 +1,140 @@
|
||||||
|
+/*
|
||||||
|
+ * iSCSI InitiatorName creation utility
|
||||||
|
+ * Copyright (C) 2001 Cisco Systems, Inc.
|
||||||
|
+ * maintained by linux-iscsi-devel@lists.sourceforge.net
|
||||||
|
+ *
|
||||||
|
+ * This program is free software; you can redistribute it and/or modify
|
||||||
|
+ * it under the terms of the GNU General Public License as published
|
||||||
|
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+ * (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This program is distributed in the hope that it will be useful, but
|
||||||
|
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ * General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * See the file COPYING included with this distribution for more details.
|
||||||
|
+ *
|
||||||
|
+ * $Id$
|
||||||
|
+ *
|
||||||
|
+ * iscsi-iname.c - Compute an iSCSI InitiatorName for this host.
|
||||||
|
+ * Note that to ensure uniqueness, the system time is
|
||||||
|
+ * a factor. This name must be cached and only regenerated
|
||||||
|
+ * if there is no cached value.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <stdint.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <sys/utsname.h>
|
||||||
|
+#include <sys/time.h>
|
||||||
|
+
|
||||||
|
+#include "md5.h"
|
||||||
|
+
|
||||||
|
+#define RANDOM_NUM_GENERATOR "/dev/urandom"
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main(int argc, char *argv[])
|
||||||
|
+{
|
||||||
|
+ char iname[256];
|
||||||
|
+ struct timeval time;
|
||||||
|
+ struct utsname system_info;
|
||||||
|
+ long hostid;
|
||||||
|
+ struct MD5Context context;
|
||||||
|
+ unsigned char digest[16];
|
||||||
|
+ unsigned char *bytes = digest;
|
||||||
|
+ unsigned char entropy[16];
|
||||||
|
+ int e;
|
||||||
|
+ int fd;
|
||||||
|
+ char *prefix;
|
||||||
|
+
|
||||||
|
+ /* initialize */
|
||||||
|
+ memset(iname, 0, sizeof (iname));
|
||||||
|
+ memset(digest, 0, sizeof (digest));
|
||||||
|
+ memset(&context, 0, sizeof (context));
|
||||||
|
+ MD5Init(&context);
|
||||||
|
+
|
||||||
|
+ /* take a prefix if given, otherwise use a default. */
|
||||||
|
+ if (argc > 1 && argv[1]) {
|
||||||
|
+ prefix = argv[1];
|
||||||
|
+ if (( strcmp(prefix, "-h") == 0 ) ||
|
||||||
|
+ ( strcmp(prefix, "--help") == 0 )) {
|
||||||
|
+ printf("\nDisplays the iSCSI initiator name\n");
|
||||||
|
+ exit(0);
|
||||||
|
+ } else if ( strcmp(prefix, "-p") == 0 ) {
|
||||||
|
+ prefix = argv[2];
|
||||||
|
+ } else {
|
||||||
|
+ printf("\nUsage: iscsi-iname [-h | --help | "
|
||||||
|
+ "-p <prefix>]\n");
|
||||||
|
+ exit(0);
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ prefix = "iqn.2005-03.com.max:01";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* try to feed some entropy from the pool to MD5 in order to get
|
||||||
|
+ * uniqueness properties
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ if ((fd = open(RANDOM_NUM_GENERATOR, O_RDONLY))) {
|
||||||
|
+ e = read(fd, &entropy, 16);
|
||||||
|
+ if (e >= 1)
|
||||||
|
+ MD5Update(&context, (md5byte *)entropy, e);
|
||||||
|
+ close(fd);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* time the name is created is a factor in order to get
|
||||||
|
+ * uniqueness properties
|
||||||
|
+ */
|
||||||
|
+ if (gettimeofday(&time, NULL) < 0) {
|
||||||
|
+ perror("error: gettimeofday failed");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ MD5Update(&context, (md5byte *) & time.tv_sec, sizeof (time.tv_sec));
|
||||||
|
+ MD5Update(&context, (md5byte *) & time.tv_usec, sizeof (time.tv_usec));
|
||||||
|
+
|
||||||
|
+ /* hostid */
|
||||||
|
+ hostid = gethostid();
|
||||||
|
+ MD5Update(&context, (md5byte *) & hostid, sizeof (hostid));
|
||||||
|
+
|
||||||
|
+ /* get the hostname and system name */
|
||||||
|
+ if (uname(&system_info) < 0) {
|
||||||
|
+ perror("error: uname failed");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ MD5Update(&context, (md5byte *) system_info.sysname,
|
||||||
|
+ sizeof (system_info.sysname));
|
||||||
|
+ MD5Update(&context, (md5byte *) system_info.nodename,
|
||||||
|
+ sizeof (system_info.nodename));
|
||||||
|
+ MD5Update(&context, (md5byte *) system_info.release,
|
||||||
|
+ sizeof (system_info.release));
|
||||||
|
+ MD5Update(&context, (md5byte *) system_info.version,
|
||||||
|
+ sizeof (system_info.version));
|
||||||
|
+ MD5Update(&context, (md5byte *) system_info.machine,
|
||||||
|
+ sizeof (system_info.machine));
|
||||||
|
+
|
||||||
|
+ /* compute the md5 hash of all the bits we just collected */
|
||||||
|
+ MD5Final(digest, &context);
|
||||||
|
+
|
||||||
|
+ /* vary which md5 bytes we pick (though we probably don't need to do
|
||||||
|
+ * this, since hopefully MD5 produces results such that each byte is as
|
||||||
|
+ * good as any other).
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ if ((fd = open(RANDOM_NUM_GENERATOR, O_RDONLY))) {
|
||||||
|
+ if (read(fd, entropy, 1) == 1)
|
||||||
|
+ bytes = &digest[(entropy[0] % (sizeof(digest) - 6))];
|
||||||
|
+ close(fd);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* print the prefix followed by 6 bytes of the MD5 hash */
|
||||||
|
+ sprintf(iname, "%s.%x%x%x%x%x%x", prefix,
|
||||||
|
+ bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5]);
|
||||||
|
+
|
||||||
|
+ iname[sizeof (iname) - 1] = '\0';
|
||||||
|
+ printf("%s\n", iname);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff -Naurp open-iscsi/utils/Makefile open-iscsi.work/utils/Makefile
|
||||||
|
--- open-iscsi/utils/Makefile 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/utils/Makefile 2005-12-14 21:44:39.000000000 -0600
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+# This Makefile will work only with GNU make.
|
||||||
|
+
|
||||||
|
+CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g
|
||||||
|
+PROGRAMS = iscsi-iname
|
||||||
|
+
|
||||||
|
+all: $(PROGRAMS)
|
||||||
|
+
|
||||||
|
+iscsi-iname: md5.o iscsi-iname.o
|
||||||
|
+ $(CC) $^ $(DBM_LIB) -o $@
|
||||||
|
+
|
||||||
|
+clean:
|
||||||
|
+ rm -f *.o $(PROGRAMS)
|
||||||
|
diff -Naurp open-iscsi/utils/md5.c open-iscsi.work/utils/md5.c
|
||||||
|
--- open-iscsi/utils/md5.c 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/utils/md5.c 2005-12-14 22:15:08.000000000 -0600
|
||||||
|
@@ -0,0 +1,242 @@
|
||||||
|
+/*
|
||||||
|
+ * This code implements the MD5 message-digest algorithm.
|
||||||
|
+ * The algorithm is due to Ron Rivest. This code was
|
||||||
|
+ * written by Colin Plumb in 1993, no copyright is claimed.
|
||||||
|
+ * This code is in the public domain; do with it what you wish.
|
||||||
|
+ *
|
||||||
|
+ * Equivalent code is available from RSA Data Security, Inc.
|
||||||
|
+ * This code has been tested against that, and is equivalent,
|
||||||
|
+ * except that you don't need to include two pages of legalese
|
||||||
|
+ * with every copy.
|
||||||
|
+ *
|
||||||
|
+ * To compute the message digest of a chunk of bytes, declare an
|
||||||
|
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
|
||||||
|
+ * needed on buffers full of bytes, and then call MD5Final, which
|
||||||
|
+ * will fill a supplied 16-byte array with the digest.
|
||||||
|
+ *
|
||||||
|
+ * Changed so as no longer to depend on Colin Plumb's `usual.h' header
|
||||||
|
+ * definitions; now uses stuff from dpkg's config.h.
|
||||||
|
+ * - Ian Jackson <ijackson@nyx.cs.du.edu>.
|
||||||
|
+ * Still in the public domain.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <string.h>
|
||||||
|
+
|
||||||
|
+#include "md5.h"
|
||||||
|
+
|
||||||
|
+#if (__BYTE_ORDER == __BIG_ENDIAN)
|
||||||
|
+/*
|
||||||
|
+ * we can compile this away for little endian since
|
||||||
|
+ * it does not do anything on those archs
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+byteSwap(uint32_t * buf, unsigned words)
|
||||||
|
+{
|
||||||
|
+ md5byte *p = (md5byte *) buf;
|
||||||
|
+
|
||||||
|
+ do {
|
||||||
|
+ *buf++ = (uint32_t) ((unsigned) p[3] << 8 | p[2]) << 16 |
|
||||||
|
+ ((unsigned) p[1] << 8 | p[0]);
|
||||||
|
+ p += 4;
|
||||||
|
+ } while (--words);
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+#define byteSwap(buf,words)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
|
||||||
|
+ * initialization constants.
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+MD5Init(struct MD5Context *ctx)
|
||||||
|
+{
|
||||||
|
+ ctx->buf[0] = 0x67452301;
|
||||||
|
+ ctx->buf[1] = 0xefcdab89;
|
||||||
|
+ ctx->buf[2] = 0x98badcfe;
|
||||||
|
+ ctx->buf[3] = 0x10325476;
|
||||||
|
+
|
||||||
|
+ ctx->bytes[0] = 0;
|
||||||
|
+ ctx->bytes[1] = 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Update context to reflect the concatenation of another buffer full
|
||||||
|
+ * of bytes.
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len)
|
||||||
|
+{
|
||||||
|
+ uint32_t t;
|
||||||
|
+
|
||||||
|
+ /* Update byte count */
|
||||||
|
+
|
||||||
|
+ t = ctx->bytes[0];
|
||||||
|
+ if ((ctx->bytes[0] = t + len) < t)
|
||||||
|
+ ctx->bytes[1]++; /* Carry from low to high */
|
||||||
|
+
|
||||||
|
+ t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
|
||||||
|
+ if (t > len) {
|
||||||
|
+ memcpy((md5byte *) ctx->in + 64 - t, buf, len);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ /* First chunk is an odd size */
|
||||||
|
+ memcpy((md5byte *) ctx->in + 64 - t, buf, t);
|
||||||
|
+ byteSwap(ctx->in, 16);
|
||||||
|
+ MD5Transform(ctx->buf, ctx->in);
|
||||||
|
+ buf += t;
|
||||||
|
+ len -= t;
|
||||||
|
+
|
||||||
|
+ /* Process data in 64-byte chunks */
|
||||||
|
+ while (len >= 64) {
|
||||||
|
+ memcpy(ctx->in, buf, 64);
|
||||||
|
+ byteSwap(ctx->in, 16);
|
||||||
|
+ MD5Transform(ctx->buf, ctx->in);
|
||||||
|
+ buf += 64;
|
||||||
|
+ len -= 64;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Handle any remaining bytes of data. */
|
||||||
|
+ memcpy(ctx->in, buf, len);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||||
|
+ * 1 0* (64-bit count of bits processed, MSB-first)
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+MD5Final(md5byte digest[16], struct MD5Context *ctx)
|
||||||
|
+{
|
||||||
|
+ int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
|
||||||
|
+ md5byte *p = (md5byte *) ctx->in + count;
|
||||||
|
+
|
||||||
|
+ /* Set the first char of padding to 0x80. There is always room. */
|
||||||
|
+ *p++ = 0x80;
|
||||||
|
+
|
||||||
|
+ /* Bytes of padding needed to make 56 bytes (-8..55) */
|
||||||
|
+ count = 56 - 1 - count;
|
||||||
|
+
|
||||||
|
+ if (count < 0) { /* Padding forces an extra block */
|
||||||
|
+ memset(p, 0, count + 8);
|
||||||
|
+ byteSwap(ctx->in, 16);
|
||||||
|
+ MD5Transform(ctx->buf, ctx->in);
|
||||||
|
+ p = (md5byte *) ctx->in;
|
||||||
|
+ count = 56;
|
||||||
|
+ }
|
||||||
|
+ memset(p, 0, count);
|
||||||
|
+ byteSwap(ctx->in, 14);
|
||||||
|
+
|
||||||
|
+ /* Append length in bits and transform */
|
||||||
|
+ ctx->in[14] = ctx->bytes[0] << 3;
|
||||||
|
+ ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
|
||||||
|
+ MD5Transform(ctx->buf, ctx->in);
|
||||||
|
+
|
||||||
|
+ byteSwap(ctx->buf, 4);
|
||||||
|
+ memcpy(digest, ctx->buf, 16);
|
||||||
|
+ memset(ctx, 0, sizeof (ctx)); /* In case it's sensitive */
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#ifndef ASM_MD5
|
||||||
|
+
|
||||||
|
+/* The four core functions - F1 is optimized somewhat */
|
||||||
|
+
|
||||||
|
+/* #define F1(x, y, z) (x & y | ~x & z) */
|
||||||
|
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
|
||||||
|
+#define F2(x, y, z) F1(z, x, y)
|
||||||
|
+#define F3(x, y, z) (x ^ y ^ z)
|
||||||
|
+#define F4(x, y, z) (y ^ (x | ~z))
|
||||||
|
+
|
||||||
|
+/* This is the central step in the MD5 algorithm. */
|
||||||
|
+#define MD5STEP(f,w,x,y,z,in,s) \
|
||||||
|
+ (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||||
|
+ * reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||||
|
+ * the data and converts bytes into longwords for this routine.
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+MD5Transform(uint32_t buf[4], uint32_t const in[16])
|
||||||
|
+{
|
||||||
|
+ register uint32_t a, b, c, d;
|
||||||
|
+
|
||||||
|
+ a = buf[0];
|
||||||
|
+ b = buf[1];
|
||||||
|
+ c = buf[2];
|
||||||
|
+ d = buf[3];
|
||||||
|
+
|
||||||
|
+ MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
|
||||||
|
+ MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
|
||||||
|
+ MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
|
||||||
|
+ MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
|
||||||
|
+ MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
|
||||||
|
+ MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
|
||||||
|
+ MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
|
||||||
|
+ MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
|
||||||
|
+ MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
|
||||||
|
+ MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
|
||||||
|
+ MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
|
||||||
|
+ MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
|
||||||
|
+ MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
|
||||||
|
+ MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
|
||||||
|
+ MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
|
||||||
|
+ MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
|
||||||
|
+
|
||||||
|
+ MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
|
||||||
|
+ MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
|
||||||
|
+ MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
|
||||||
|
+ MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
|
||||||
|
+ MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
|
||||||
|
+ MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
|
||||||
|
+ MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
|
||||||
|
+ MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
|
||||||
|
+ MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
|
||||||
|
+ MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
|
||||||
|
+ MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
|
||||||
|
+ MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
|
||||||
|
+ MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
|
||||||
|
+ MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
|
||||||
|
+ MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
|
||||||
|
+ MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
|
||||||
|
+
|
||||||
|
+ MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
|
||||||
|
+ MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
|
||||||
|
+ MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
|
||||||
|
+ MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
|
||||||
|
+ MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
|
||||||
|
+ MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
|
||||||
|
+ MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
|
||||||
|
+ MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
|
||||||
|
+ MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
|
||||||
|
+ MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
|
||||||
|
+ MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
|
||||||
|
+ MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
|
||||||
|
+ MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
|
||||||
|
+ MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
|
||||||
|
+ MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
|
||||||
|
+ MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
|
||||||
|
+
|
||||||
|
+ MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
|
||||||
|
+ MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
|
||||||
|
+ MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
|
||||||
|
+ MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
|
||||||
|
+ MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
|
||||||
|
+ MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
|
||||||
|
+ MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
|
||||||
|
+ MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
|
||||||
|
+ MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
|
||||||
|
+ MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
|
||||||
|
+ MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
|
||||||
|
+ MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
|
||||||
|
+ MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
|
||||||
|
+ MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
|
||||||
|
+ MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
|
||||||
|
+ MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
|
||||||
|
+
|
||||||
|
+ buf[0] += a;
|
||||||
|
+ buf[1] += b;
|
||||||
|
+ buf[2] += c;
|
||||||
|
+ buf[3] += d;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
diff -Naurp open-iscsi/utils/md5.h open-iscsi.work/utils/md5.h
|
||||||
|
--- open-iscsi/utils/md5.h 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/utils/md5.h 2005-12-14 22:14:53.000000000 -0600
|
||||||
|
@@ -0,0 +1,41 @@
|
||||||
|
+/*
|
||||||
|
+ * This is the header file for the MD5 message-digest algorithm.
|
||||||
|
+ * The algorithm is due to Ron Rivest. This code was
|
||||||
|
+ * written by Colin Plumb in 1993, no copyright is claimed.
|
||||||
|
+ * This code is in the public domain; do with it what you wish.
|
||||||
|
+ *
|
||||||
|
+ * Equivalent code is available from RSA Data Security, Inc.
|
||||||
|
+ * This code has been tested against that, and is equivalent,
|
||||||
|
+ * except that you don't need to include two pages of legalese
|
||||||
|
+ * with every copy.
|
||||||
|
+ *
|
||||||
|
+ * To compute the message digest of a chunk of bytes, declare an
|
||||||
|
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
|
||||||
|
+ * needed on buffers full of bytes, and then call MD5Final, which
|
||||||
|
+ * will fill a supplied 16-byte array with the digest.
|
||||||
|
+ *
|
||||||
|
+ * Changed so as no longer to depend on Colin Plumb's `usual.h'
|
||||||
|
+ * header definitions; now uses stuff from dpkg's config.h
|
||||||
|
+ * - Ian Jackson <ijackson@nyx.cs.du.edu>.
|
||||||
|
+ * Still in the public domain.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef MD5_H
|
||||||
|
+#define MD5_H
|
||||||
|
+
|
||||||
|
+#include <stdint.h>
|
||||||
|
+
|
||||||
|
+#define md5byte unsigned char
|
||||||
|
+
|
||||||
|
+struct MD5Context {
|
||||||
|
+ uint32_t buf[4];
|
||||||
|
+ uint32_t bytes[2];
|
||||||
|
+ uint32_t in[16];
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+void MD5Init(struct MD5Context *context);
|
||||||
|
+void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
|
||||||
|
+void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
||||||
|
+void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
|
||||||
|
+
|
||||||
|
+#endif /* !MD5_H */
|
73
open-iscsi-5.0.0.4_446-initscript.patch
Normal file
73
open-iscsi-5.0.0.4_446-initscript.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
diff -aurp open-iscsi/etc/initd/initd.redhat open-iscsi.work/etc/initd/initd.redhat
|
||||||
|
--- open-iscsi/etc/initd/initd.redhat 2005-12-15 00:42:56.000000000 -0600
|
||||||
|
+++ open-iscsi.work/etc/initd/initd.redhat 2005-12-15 00:40:51.000000000 -0600
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
-# chkconfig: - 39 35
|
||||||
|
+# chkconfig: - 13 89
|
||||||
|
# description: Starts and stops the iSCSI initiator
|
||||||
|
#
|
||||||
|
# pidfile: /var/run/iscsid.pid
|
||||||
|
@@ -35,7 +35,7 @@ start_iscsid()
|
||||||
|
TARGETS=`$ISCSIADM -m node | sed 's@\[\(.*\)\] .*@\1@g'`
|
||||||
|
for rec in $TARGETS
|
||||||
|
do
|
||||||
|
- STARTUP=`$ISCSIADM -m node -r $rec | grep "node.conn\[0\].startup" | cut -d' ' -f3`
|
||||||
|
+ STARTUP=`$ISCSIADM -m node -r $rec | grep "node.startup" | cut -d' ' -f3`
|
||||||
|
if [ $STARTUP = "automatic" ]
|
||||||
|
then
|
||||||
|
$ISCSIADM -m node -r $rec -l
|
||||||
|
@@ -62,6 +62,40 @@ stop_iscsid()
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
RETVAL=0
|
||||||
|
+
|
||||||
|
+ # see if we need to generate a unique iSCSI InitiatorName
|
||||||
|
+ # this should only happen if the
|
||||||
|
+ if [ ! -f /etc/initiatorname.iscsi ] ; then
|
||||||
|
+ if [ ! -x /sbin/iscsi-iname ] ; then
|
||||||
|
+ echo "Error: /sbin/iscsi-iname does not exist, driver was not successfully installed"
|
||||||
|
+ exit 1;
|
||||||
|
+ fi
|
||||||
|
+ # Generate a unique InitiatorName and save it
|
||||||
|
+ INAME=`/sbin/iscsi-iname`
|
||||||
|
+ if [ "$INAME" != "" ] ; then
|
||||||
|
+ echo "## DO NOT EDIT OR REMOVE THIS FILE!" > /etc/initiatorname.iscsi
|
||||||
|
+ echo "## If you remove this file, the iSCSI daemon will not start." >> /etc/initiatorname.iscsi
|
||||||
|
+ echo "## If you change the InitiatorName, existing access control lists" >> /etc/initiatorname.iscsi
|
||||||
|
+ echo "## may reject this initiator. The InitiatorName must be unique">> /etc/initiatorname.iscsi
|
||||||
|
+ echo "## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames." >> /etc/initiatorname.iscsi
|
||||||
|
+ printf "InitiatorName=$INAME\n" >> /etc/initiatorname.iscsi
|
||||||
|
+ chmod 600 /etc/initiatorname.iscsi
|
||||||
|
+ else
|
||||||
|
+ echo "Error: failed to generate an iSCSI InitiatorName, driver cannot start."
|
||||||
|
+ echo
|
||||||
|
+ exit 1;
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ # make sure there is a valid InitiatorName for the driver
|
||||||
|
+ if ! grep -q "^InitiatorName=[^ \t\n]" /etc/initiatorname.iscsi ; then
|
||||||
|
+ echo
|
||||||
|
+ echo "Error: /etc/initiatorname.iscsi does not contain a valid InitiatorName."
|
||||||
|
+ echo "The iSCSI driver has not been correctly installed and cannot start."
|
||||||
|
+ echo
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
echo -n "Starting iSCSI initiator service: "
|
||||||
|
PID=`pidofproc $ISCSID`
|
||||||
|
if [ -z $PID ]
|
||||||
|
diff -aurp open-iscsi/etc/iscsid.conf open-iscsi.work/etc/iscsid.conf
|
||||||
|
--- open-iscsi/etc/iscsid.conf 2005-12-14 20:31:48.000000000 -0600
|
||||||
|
+++ open-iscsi.work/etc/iscsid.conf 2005-12-15 00:43:20.000000000 -0600
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
# Could be located at /etc/iscsid.conf or ~/.iscsid.conf
|
||||||
|
#
|
||||||
|
node.active_cnx = 1
|
||||||
|
-node.startup = manual
|
||||||
|
+node.startup = automatic
|
||||||
|
#node.session.auth.username = dima
|
||||||
|
#node.session.auth.password = aloha
|
||||||
|
node.session.timeo.replacement_timeout = 0
|
75
open-iscsi-5.0.0.4_446-rm-rdma.patch
Normal file
75
open-iscsi-5.0.0.4_446-rm-rdma.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
diff -aurp open-iscsi/include/iscsi_if.h open-iscsi.work/include/iscsi_if.h
|
||||||
|
--- open-iscsi/include/iscsi_if.h 2005-12-14 20:31:33.000000000 -0600
|
||||||
|
+++ open-iscsi.work/include/iscsi_if.h 2005-12-15 01:21:31.000000000 -0600
|
||||||
|
@@ -160,9 +160,8 @@ enum iscsi_param {
|
||||||
|
ISCSI_PARAM_ERL = 11,
|
||||||
|
ISCSI_PARAM_IFMARKER_EN = 12,
|
||||||
|
ISCSI_PARAM_OFMARKER_EN = 13,
|
||||||
|
- ISCSI_PARAM_RDMAEXTENSIONS = 14,
|
||||||
|
};
|
||||||
|
-#define ISCSI_PARAM_MAX 15
|
||||||
|
+#define ISCSI_PARAM_MAX 14
|
||||||
|
|
||||||
|
typedef uint64_t iscsi_sessionh_t; /* iSCSI Data-Path session handle */
|
||||||
|
typedef uint64_t iscsi_connh_t; /* iSCSI Data-Path connection handle */
|
||||||
|
diff -aurp open-iscsi/usr/initiator.c open-iscsi.work/usr/initiator.c
|
||||||
|
--- open-iscsi/usr/initiator.c 2005-12-15 01:22:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/usr/initiator.c 2005-12-14 22:27:47.000000000 -0600
|
||||||
|
@@ -437,9 +437,7 @@ __session_conn_create(iscsi_session_t *s
|
||||||
|
conn_rec->address, host);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Set the address family according to the value
|
||||||
|
- that was received from a specific provider */
|
||||||
|
- conn->saddr.ss_family = session->provider->af;
|
||||||
|
+ conn->saddr.ss_family = AF_INET;
|
||||||
|
|
||||||
|
conn->state = STATE_FREE;
|
||||||
|
conn->session = session;
|
||||||
|
@@ -856,10 +854,6 @@ __session_conn_recv_pdu(queue_item_t *it
|
||||||
|
.param = ISCSI_PARAM_OFMARKER_EN,
|
||||||
|
.value = &zero,/* FIXME: session->ofmarker_en */
|
||||||
|
.conn_only = 0,
|
||||||
|
- }, {
|
||||||
|
- .param = ISCSI_PARAM_RDMAEXTENSIONS,
|
||||||
|
- .value = &session->rdma_ext,
|
||||||
|
- .conn_only = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
diff -aurp open-iscsi/usr/ioctl.c open-iscsi.work/usr/ioctl.c
|
||||||
|
--- open-iscsi/usr/ioctl.c 2005-12-15 01:22:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/usr/ioctl.c 2005-12-14 22:27:46.000000000 -0600
|
||||||
|
@@ -404,8 +404,6 @@ ktrans_list(void)
|
||||||
|
strncpy(provider[i].name, ev.r.t_list.elements[i].name,
|
||||||
|
ISCSI_TRANSPORT_NAME_MAXLEN);
|
||||||
|
provider[i].caps = ev.r.t_list.elements[i].caps;
|
||||||
|
- provider[i].af = ev.r.t_list.elements[i].af;
|
||||||
|
- provider[i].rdma = ev.r.t_list.elements[i].rdma;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
diff -aurp open-iscsi/usr/netlink.c open-iscsi.work/usr/netlink.c
|
||||||
|
--- open-iscsi/usr/netlink.c 2005-12-15 01:22:00.000000000 -0600
|
||||||
|
+++ open-iscsi.work/usr/netlink.c 2005-12-14 22:27:48.000000000 -0600
|
||||||
|
@@ -684,20 +684,6 @@ ktrans_list(void)
|
||||||
|
"0x%x");
|
||||||
|
if (err)
|
||||||
|
break;
|
||||||
|
-
|
||||||
|
- sprintf(filename, ISCSI_TRANSPORT_DIR"/%s/af",
|
||||||
|
- provider[i].name);
|
||||||
|
- err = read_transport_file(filename, &provider[i].af,
|
||||||
|
- "%u");
|
||||||
|
- if (err)
|
||||||
|
- break;
|
||||||
|
-
|
||||||
|
- sprintf(filename, ISCSI_TRANSPORT_DIR"/%s/rdma",
|
||||||
|
- provider[i].name);
|
||||||
|
- err = read_transport_file(filename, &provider[i].rdma,
|
||||||
|
- "%u");
|
||||||
|
- if (err)
|
||||||
|
- break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i++; i < n; i++)
|
Loading…
Reference in New Issue
Block a user