open-iscsi: fix compilation when openslp is installed.
authorFabio Erculiani <lxnay@sabayon.org>
Tue, 22 Mar 2011 12:02:05 +0000 (13:02 +0100)
committerFabio Erculiani <lxnay@sabayon.org>
Tue, 22 Mar 2011 12:02:05 +0000 (13:02 +0100)
Two main issues:
1. open-iscsi build system, inside Makefile, user target, calls
   ./configure (which is very bad itself) without letting to choose
   configure options. Fixed in:
   open-iscsi-2.0.872-omg-calling-configure.patch
2. when openslp support is automagically enabled, -lslp didn't get
   added to compiler arguments. Fixed in:
   open-iscsi-2.0.872-slp.patch

Peace.

gen_compile.sh
patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch [new file with mode: 0644]
patches/iscsi/2.0-872/open-iscsi-2.0.872-slp.patch [new file with mode: 0644]

index b60b921eb5dd9c47527d205dc96b27cbd38da16d..00b5de94a9c7f3788975a28b2633b1e454020e8f 100755 (executable)
@@ -685,10 +685,15 @@ compile_iscsi() {
                        gen_die "ISCSI directory ${ISCSI_DIR} invalid"
                                print_info 1 'iSCSI: >> Compiling...'
                cd "${TEMP}/${ISCSI_DIR}"
+               apply_patches iscsi ${ISCSI_VER}
 
                # Only build userspace
+               print_info 1 'iSCSI: >> Configuring userspace...'
+               cd utils/open-isns || gen_die 'Could not enter open-isns dir'
+               ./configure --without-slp >> ${LOGFILE} 2>&1 || gen_die 'Could not configure userspace'
+               cd ../.. || gen_die 'wtf?'
                MAKE=${UTILS_MAKE} compile_generic "user" ""
-       
+
                # if kernel modules exist, copy them to initramfs, otherwise it will be compiled into the kernel
                mkdir -p "${TEMP}/initramfs-iscsi-temp/lib/modules/${RELEASE}/kernel/drivers/scsi/"
                for modname in iscsi_tcp libiscsi scsi_transport_iscsi
diff --git a/patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch b/patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch
new file mode 100644 (file)
index 0000000..185f1ac
--- /dev/null
@@ -0,0 +1,11 @@
+--- open-iscsi-2.0-872.orig/Makefile
++++ open-iscsi-2.0-872/Makefile
+@@ -27,7 +27,7 @@ IFACEFILES = etc/iface.example
+ all: user kernel
+ user: ;
+-      cd utils/open-isns; ./configure; $(MAKE)
++      cd utils/open-isns; $(MAKE)
+       $(MAKE) -C utils/sysdeps
+       $(MAKE) -C utils/fwparam_ibft
+       $(MAKE) -C usr
diff --git a/patches/iscsi/2.0-872/open-iscsi-2.0.872-slp.patch b/patches/iscsi/2.0-872/open-iscsi-2.0.872-slp.patch
new file mode 100644 (file)
index 0000000..16658f3
--- /dev/null
@@ -0,0 +1,11 @@
+--- open-iscsi-2.0-872.orig/utils/open-isns/configure.ac
++++ open-iscsi-2.0-872/utils/open-isns/configure.ac
+@@ -79,7 +79,7 @@ AC_ARG_WITH(slp,
+                       WITH_SLP=$withval
+               else
+                       WITH_SLP=yes
+-                      CPPFLAGS="$CPPFLAGS -I${withval}"
++                      CPPFLAGS="$CPPFLAGS -I${withval} -lslp"
+                       LDFLAGS="$LDFLAGS -L${withval}"
+               fi
+       ]