Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278589 - sys-block/open-iscsi-2.0.871 version bump (supports kernels >2.6.28 and newer)
Summary: sys-block/open-iscsi-2.0.871 version bump (supports kernels >2.6.28 and newer)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Mike Doty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-21 16:04 UTC by Evan Borgstrom
Modified: 2009-11-20 11:34 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch open-iscsi-2.0.870.3 → open-iscsi-2.0.871 (open-iscsi-modules-and-examplefile.patch,1.64 KB, patch)
2009-07-29 06:49 UTC, Elias Probst
Details | Diff
open-iscsi-2.0.871.ebuild.patch (open-iscsi-2.0.871.ebuild.patch,2.46 KB, patch)
2009-10-05 22:09 UTC, Stefan Behte (RETIRED)
Details | Diff
open-iscsi-2.0.871.ebuild with CVE-2009-1297 patch (open-iscsi-2.0.871.ebuild,3.08 KB, text/plain)
2009-10-26 22:23 UTC, Stefan Behte (RETIRED)
Details
CVE-2009-1297.patch (CVE-2009-1297.patch,798 bytes, text/plain)
2009-10-26 22:23 UTC, Stefan Behte (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Borgstrom 2009-07-21 16:04:15 UTC
The build system in open-iscsi 2.0.871 was changed slightly, kernel & user were broken out, and the ebuild needs to be updated slightly to compile the new version.

--- /usr/portage/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild	2009-06-21 17:08:06.000000000 -0400
+++ open-iscsi-2.0.871.ebuild	2009-07-21 11:37:12.577917416 -0400
@@ -49,8 +49,8 @@
 		|| die "emake failed"
 
 	einfo "Building userspace"
-	cd "${S}"/usr && \
-	CFLAGS="" emake OPTFLAGS="${CFLAGS}" \
+	cd "${S}" && \
+	CFLAGS="" emake OPTFLAGS="${CFLAGS}" user \
 		|| die "emake failed"
 
 	if use utils; then


Reproducible: Always
Comment 1 Elias Probst 2009-07-29 04:45:12 UTC
Just installed sys-block/open-iscsi-2.0.871 here and noticed the initscript still needs some work:

>>>
ebegin "Loading iSCSI modules"
do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
ret=$?
    if [ $ret -ne 0 ]; then
    eend 1
    return 1
fi
<<<

This assumes the package was built with USE="modules", but if you have builtin iSCSI Kernel-Support, this won't work.
Is there a better way to do module loading in an initscript? Something like "load modules if CONFIG_FOO is not in kernel config"?

Just uncommented this for now to get it working here but a more elegant solution should be found.
Comment 2 Elias Probst 2009-07-29 04:55:12 UTC
Furthermore the file ${S}/etc/iface.example isn't installed.

According to the official documentation (README) it should be put into /etc/iscsi/ifaces/iface.example.
Comment 3 Elias Probst 2009-07-29 05:58:35 UTC
There's a problem about the module thing:
If open-iscsi is built with USE="-modules", it still needs some options in the kernel to be built as module [1], otherwise iscsid won't start due to missing version information in /sys/module/scsi_transport_iscsi/version

So as long as the open-iscsi devs haven't fixed this, we should check for this options in the kernel to be set to =M when USE="-modules".
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_ISCSI_TCP=y

[1] http://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966?#fd6a4ba0c8e91966
Comment 4 Elias Probst 2009-07-29 06:49:25 UTC
Created attachment 199508 [details, diff]
Patch open-iscsi-2.0.870.3 &#8594; open-iscsi-2.0.871

This patch:
- adds a check to make sure, the needed iSCSI Kernel config options are built as module
- adds the installation of /etc/iscsi/iface/iface.example
- includes the changes to the 'emake' process from the 1st post
Comment 5 Elias Probst 2009-08-14 22:34:40 UTC
Running open-iscsi-2.0.871 now since more than 2 weeks on a production server and it worked great so far.

Could anyone put this into the tree as ~amd64?

Thanks a lot!
Comment 6 Stefan Behte (RETIRED) gentoo-dev Security 2009-09-13 19:54:08 UTC
It did not warn me about missing modules:

USE="modules" ebuild open-iscsi-2.0.871.ebuild merge
[...]
 * Updating module dependencies for 2.6.30-gentoo-r6 ...
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_segment_done
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_segment_seek_sg
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_segment_unmap
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_hdr_recv_prep
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_cleanup_task
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_setup
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_r2tpool_alloc
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_r2tpool_free
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_task_xmit
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_recv_skb
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_segment_init_linear
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_get_stats
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_task_init
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_dgst_header
WARNING: //lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko needs unknown symbol iscsi_tcp_conn_teardown                                                                                         [ ok ]
 * Adding module to moduledb.
>>> sys-block/open-iscsi-2.0.871 merged.



# /etc/init.d/iscsid start
 * Caching service dependencies ...                                                                                                                                                                           [ ok ]
 * Checking open-iSCSI configuration ...
 * /etc/iscsi/initiatorname.iscsi should contain a string with your initiatior name.
 * Creating InitiatorName iqn.2009-09.dd.flatline:openiscsi-851fc12840a957433447db41a3df1d42 in /etc/iscsi/initiatorname.iscsi ...                                                                            [ ok ]
 * Loading iSCSI modules ...
 * Loading libiscsi ...                                                                                                                                                                                       [ ok ]
 * Loading scsi_transport_iscsi ...                                                                                                                                                                           [ ok ]
 * Loading iscsi_tcp ...
FATAL: Error inserting iscsi_tcp (/lib/modules/2.6.30-gentoo-r6/kernel/drivers/scsi/iscsi_tcp.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                 [ !! ]
Comment 7 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-04 19:42:06 UTC
Elias, your change: 'CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"' prevent us from building modules from the open-iscsi package (and we still need to check for CRYPTO_CRC32C).
IMHO building modules from open-iscsi is a really bad idea, every time you update your kernel, you will have to rebuild open-iscsi - which often fails as older versions usually do not build against newer kernels. The best way is to use modules from the kernel and only build userspace tools, as the interface won't change too often (if at all).
Comment 8 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-05 21:54:12 UTC
Sorry, I didn't see it yesterday: you're using CONFIG_CHECK_MODULES and CONFIG_CHECK correctly, of course (I accidentally read CONFIG_CHECK twice).
Comment 9 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-05 22:09:52 UTC
Created attachment 206196 [details, diff]
open-iscsi-2.0.871.ebuild.patch

- Included Elias patches
- excluded some more compiler stuff which is unnecessary now
- removing support for module building as IMHO keeping it would cause many headaches on our users and there
- only compiling userspace/utils is possible now, this will allow painless updates of the kernel (that has the needed modules) without bumping the open-iscsi ebuild
Comment 10 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-05 22:14:51 UTC
Elias: we might want to look into the problem of comment #1 when 2.0.872 is out, I guess we will also have to look at http://git.kernel.org/?p=linux/kernel/git/mnc/open-iscsi.git;a=commit;h=dd61cb863559297b89b5b41f7320760372883b1c
Comment 11 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-26 22:23:34 UTC
Created attachment 208369 [details]
open-iscsi-2.0.871.ebuild with CVE-2009-1297 patch
Comment 12 Stefan Behte (RETIRED) gentoo-dev Security 2009-10-26 22:23:53 UTC
Created attachment 208370 [details]
CVE-2009-1297.patch
Comment 13 Tobias Scherbaum (RETIRED) gentoo-dev 2009-10-28 16:48:02 UTC
(In reply to comment #11)
> Created an attachment (id=208369) [details]
> open-iscsi-2.0.871.ebuild with CVE-2009-1297 patch
> 

In CVS.