iscsi-initiator-utils/linux-iscsi-4.0.1.8-remove_kerneldeps.patch
cvsdist 6472ef09e3 auto-import changelog data from iscsi-initiator-utils-4.0.1.8-0.1.src.rpm
* Mon Jul 19 2004 AJ Lewis <alewis@redhat.com> 4.0.1.8-0.1
- update to 4.0.1.8 upstream for 2.6 kernels
- add iscsi-id to binaries installed
2004-09-09 06:23:19 +00:00

182 lines
7.8 KiB
Diff

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