Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 198672 - userspace cdemu - keywording
Summary: userspace cdemu - keywording
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Marcelo Goes (RETIRED)
URL: http://cdemu.kabelkaos.net/
Whiteboard:
Keywords: EBUILD
: 159015 203736 209874 227027 (view as bug list)
Depends on: 222905
Blocks: 159015
  Show dependency tree
 
Reported: 2007-11-10 13:17 UTC by Daniel Lin
Modified: 2010-01-09 21:11 UTC (History)
21 users (show)

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


Attachments
app-cdr/vhba-module-2007.08.23.ebuild (vhba-module-2007.08.23.ebuild,610 bytes, text/plain)
2007-11-10 13:18 UTC, Daniel Lin
Details
app-cdr/libmirage-2007.08.23.ebuild (libmirage-2007.08.23.ebuild,690 bytes, text/plain)
2007-11-10 13:19 UTC, Daniel Lin
Details
app-cdr/cdemu-daemon-2007.08.23.ebuild (cdemu-daemon-2007.08.23.ebuild,1.17 KB, text/plain)
2007-11-10 13:20 UTC, Daniel Lin
Details
app-cdr/cdemu-daemon/files/cdemu-daemon.conf.d (cdemu-daemon.conf.d,151 bytes, text/plain)
2007-11-10 13:21 UTC, Daniel Lin
Details
app-cdr/cdemu-daemon/files/cdemu-daemon.init.d (cdemu-daemon.init.d,983 bytes, text/plain)
2007-11-10 13:21 UTC, Daniel Lin
Details
app-cdr/cdemu-client-2007.08.23 (cdemu-client-2007.08.23.ebuild,730 bytes, text/plain)
2007-11-10 13:22 UTC, Daniel Lin
Details
app-cdr/gcdemu-2007.08.23 (gcdemu-2007.08.23.ebuild,855 bytes, text/plain)
2007-11-10 13:23 UTC, Daniel Lin
Details
app-cdr/vhba-module-2007.08.23.ebuild (vhba-module-2007.08.23.ebuild,710 bytes, text/plain)
2007-11-29 06:10 UTC, Daniel Lin
Details
app-cdr/cdemu-daemon-2007.08.23.ebuild (cdemu-daemon-2007.08.23.ebuild,1.20 KB, text/plain)
2007-11-30 18:54 UTC, Daniel Lin
Details
app-cdr/cdemu-1.0.0 ebuild (cdemu-client) (cdemu-1.0.0.ebuild,615 bytes, text/plain)
2008-01-01 20:51 UTC, Jan Bessai
Details
app-cdr/cdemud-1.0.0 ebuild (cdemu-daemon) (cdemud-1.0.0.ebuild,1.57 KB, text/plain)
2008-01-01 20:53 UTC, Jan Bessai
Details
app-cdr/gcdemu-1.0.0 ebuild (gcdemu-1.0.0.ebuild,716 bytes, text/plain)
2008-01-01 20:54 UTC, Jan Bessai
Details
dev-libs/libmirage-1.0.0 ebuild (libmirage-1.0.0.ebuild,771 bytes, text/plain)
2008-01-01 20:55 UTC, Jan Bessai
Details
sys-fs/vhba-1.0.0 ebuild (vhba-1.0.0.ebuild,1.37 KB, text/plain)
2008-01-01 20:56 UTC, Jan Bessai
Details
cdemu daemon init file (updated) (cdemud.init.d,986 bytes, text/plain)
2008-01-01 20:57 UTC, Jan Bessai
Details
cdemu daemon config file (updated) (cdemud.conf.d,151 bytes, text/plain)
2008-01-01 20:57 UTC, Jan Bessai
Details
cdemud.conf.d alsa->ALSA fixed (cdemud.conf.d,152 bytes, text/plain)
2008-01-04 13:17 UTC, Jan Bessai
Details
cdemud.init.d alsa->ALSA fixed (cdemud.init.d,986 bytes, text/plain)
2008-01-04 13:17 UTC, Jan Bessai
Details
Patch for vhba makefile (makefile.patch,778 bytes, patch)
2008-01-10 23:15 UTC, Pham Ngoc Hai
Details | Diff
patch for vhba to work with kernel >= 2.6.23 (scatterlist.patch,583 bytes, patch)
2008-01-10 23:16 UTC, Pham Ngoc Hai
Details | Diff
New vhba-1.0.0.ebuild with patchs (vhba-1.0.0.ebuild,1.70 KB, text/plain)
2008-01-10 23:19 UTC, Pham Ngoc Hai
Details
dev-libs/libmirage-1.0.0 ebuild - added whitespace to satisfy paludis (libmirage-1.0.0.ebuild,772 bytes, text/plain)
2008-02-11 13:59 UTC, Petr Sýkora
Details
Patch to make vhba-1.0.0 compiled with kernel 2.6.25 (scsicmnd.patch,2.67 KB, text/plain)
2008-03-04 18:19 UTC, Pham Ngoc Hai
Details
New ebuild for the scsi_cmnd patch (kernel 2.6.25) (vhba-1.0.0.ebuild,2.02 KB, text/plain)
2008-03-04 18:22 UTC, Pham Ngoc Hai
Details
vhba ebuild, kernel version corrected (vhba-1.0.0.ebuild,2.02 KB, text/plain)
2008-03-15 17:47 UTC, Ambroz Bizjak
Details
Ebuild for sys-fs/vhba version 1.1.0 (vhba-1.1.0.ebuild,1.42 KB, text/plain)
2008-07-03 23:12 UTC, Pham Ngoc Hai
Details
fix kernel version detection (vhba-1.1.0.ebuild,1.47 KB, patch)
2008-07-16 11:14 UTC, Ambroz Bizjak
Details | Diff
svn-based patch (scatterlist-fix.patch,1.04 KB, patch)
2008-07-16 11:45 UTC, Rafał Mużyło
Details | Diff
remove invasive api tester (vhba-1.1.0-api.patch,1.17 KB, patch)
2008-07-16 13:44 UTC, Ambroz Bizjak
Details | Diff
vhba 1.1.0 ebuild - kernel version detection, remove 'kat' (vhba-1.1.0.ebuild,1.55 KB, text/plain)
2008-07-16 13:53 UTC, Ambroz Bizjak
Details
cdemud-init.d-v1.1.0 (cdemud,882 bytes, text/plain)
2008-07-21 09:24 UTC, Geert Vanhaute
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Lin 2007-11-10 13:17:21 UTC
CDemu-0.8 hasn't worked out-of-the-box with latest Linux kernel for a long time...
Userspace CDemu brings improvements like
- stabler kernel driver, supporting HAL notifications etc.
- all CD image reading done in userspace

Reproducible: Always

Steps to Reproduce:
Comment 1 Daniel Lin 2007-11-10 13:18:26 UTC
Created attachment 135631 [details]
app-cdr/vhba-module-2007.08.23.ebuild

Kernel-side driver for userspace CDemu
Comment 2 Daniel Lin 2007-11-10 13:19:21 UTC
Created attachment 135633 [details]
app-cdr/libmirage-2007.08.23.ebuild

Library for CD image reading
Comment 3 Daniel Lin 2007-11-10 13:20:30 UTC
Created attachment 135634 [details]
app-cdr/cdemu-daemon-2007.08.23.ebuild

CDemu userspace daemon, which manages CD images
Comment 4 Daniel Lin 2007-11-10 13:21:17 UTC
Created attachment 135635 [details]
app-cdr/cdemu-daemon/files/cdemu-daemon.conf.d

Configuration for cdemu-daemon rcscript
Comment 5 Daniel Lin 2007-11-10 13:21:59 UTC
Created attachment 135637 [details]
app-cdr/cdemu-daemon/files/cdemu-daemon.init.d

Executable for cdemu-daemon rcscript
Comment 6 Daniel Lin 2007-11-10 13:22:40 UTC
Created attachment 135638 [details]
app-cdr/cdemu-client-2007.08.23

Command-line client to control cdemu-daemon
Comment 7 Daniel Lin 2007-11-10 13:23:17 UTC
Created attachment 135639 [details]
app-cdr/gcdemu-2007.08.23

GNOME applet and GUI to control cdemu-daemon
Comment 8 Daniel Fullmer 2007-11-24 02:31:09 UTC
Everything compiles and seems to run great.
Thanks for the ebuilds!
Comment 9 Sebastian Stammler 2007-11-27 22:40:19 UTC
hi, works great here with amd64, so you can add ~amd64 to the keywords!

hmm, could you add vhba-module as runtime depency to the daemon? and perhaps in the vhba ebuild a check for the kernel option BLK_DEV_SR...i first compiled vhba and my device just wasn't created in the /dev dir...after some minutes i recognized that i need the scsi cd module (SR, which i hadn't compiled...why ever ;) ). the problem i see is, that there's no error message in /var/log/messages or dmesg if sr isn't present.
thank you! sebastian
Comment 10 Daniel Lin 2007-11-29 06:10:07 UTC
Created attachment 137297 [details]
app-cdr/vhba-module-2007.08.23.ebuild

Check for CONFIG_BLK_DEV_SR before compiling.
Comment 11 Daniel Lin 2007-11-30 18:54:13 UTC
Created attachment 137402 [details]
app-cdr/cdemu-daemon-2007.08.23.ebuild

Oh, duh... add app-cdr/vhba-module to DEPEND.
Comment 12 Rafał Mużyło 2007-12-19 09:11:27 UTC
A small fix seems to be required in cdemu-daemon.init.d:
start-stop-daemon needs --oknodo parameter or else this script fails.
Comment 13 Rafał Mużyło 2007-12-22 18:46:56 UTC
Well, I was wrong. It's not --oknodo that solves any problem, cause in fact it does not.
The probles came from /etc/conf.d file.
CDEMUD_BACKEND=alsa
should actually be
CDEMUD_BACKEND=ALSA
otherwise daemon fails.
I'm not sure whether it's my problem with alsa or a case of wrong documentation.
Comment 14 Jan Bessai 2007-12-30 03:08:22 UTC
*** Bug 203736 has been marked as a duplicate of this bug. ***
Comment 15 Jan Bessai 2007-12-30 03:48:55 UTC
Hi,
I've created my own ebuilds for cdemu-1.0.0 before I've seen and checked out yours ( see Bug 203736 ).
Some ideas I had:
- Maybe renaming the client to cdemu-1.0.0.ebuild would be convenient. This could avoid blockages with cdemu-0.8 and make updating easier.
- cdemu-daemon could simply be named cdemud, like the executable. That's shorter and less confusing.
- libmirage should have an useflag for advanced developer documentation, like it is provided in it's makefile.
- libmirage also depends on >=sys-devel/flex-2.5.33 and sys-devel/bison .
- The vhba module should create a new udev rule and group, so users can start the daemon themselves. This way the initscript and the new config file become redundant and alsa problems are avoided, too. Users can start their own daemons in local mode, which is more scalable and more close to intention of the documentation at http://cdemu.sourceforge.net/pkg_daemon.php. Alsa is automatically detected by the makefile of cdemu-daemon, so there's no need to change it's behaviour with useflags.
- Some of your ebuilds are missing RDEPEND.
- Why did you rename and repack the Sourceforge files? This will make updating more complicated

Greetings,
 Jan
Comment 16 Daniel Lin 2007-12-31 16:43:34 UTC
(In reply to comment #15)
> Hi,
> I've created my own ebuilds for cdemu-1.0.0 before I've seen and checked out
> yours ( see Bug 203736 ).
> Some ideas I had:
> - Maybe renaming the client to cdemu-1.0.0.ebuild would be convenient. This
> could avoid blockages with cdemu-0.8 and make updating easier.
> - cdemu-daemon could simply be named cdemud, like the executable. That's
> shorter and less confusing.
> - libmirage should have an useflag for advanced developer documentation, like
> it is provided in it's makefile.
> - libmirage also depends on >=sys-devel/flex-2.5.33 and sys-devel/bison .

Sounds reasonable.

> - The vhba module should create a new udev rule and group, so users can start
> the daemon themselves. This way the initscript and the new config file become
> redundant and alsa problems are avoided, too. Users can start their own daemons
> in local mode, which is more scalable and more close to intention of the
> documentation at http://cdemu.sourceforge.net/pkg_daemon.php. Alsa is
> automatically detected by the makefile of cdemu-daemon, so there's no need to
> change it's behaviour with useflags.

Ebuilds changing compilation behavior based on auto-detected options is a no-no.

> - Some of your ebuilds are missing RDEPEND.

Okay.  I keep forgetting that it's "required" now.

> - Why did you rename and repack the Sourceforge files? This will make updating
> more complicated

I didn't.  That was the latest work of the upstream developer at the time.  The Sourceforge files were finally brought up to date last week.
Comment 17 Jan Bessai 2008-01-01 20:51:31 UTC
Created attachment 139813 [details]
app-cdr/cdemu-1.0.0 ebuild (cdemu-client)
Comment 18 Jan Bessai 2008-01-01 20:53:07 UTC
Created attachment 139815 [details]
app-cdr/cdemud-1.0.0 ebuild (cdemu-daemon)
Comment 19 Jan Bessai 2008-01-01 20:54:46 UTC
Created attachment 139817 [details]
app-cdr/gcdemu-1.0.0 ebuild
Comment 20 Jan Bessai 2008-01-01 20:55:36 UTC
Created attachment 139819 [details]
dev-libs/libmirage-1.0.0 ebuild
Comment 21 Jan Bessai 2008-01-01 20:56:10 UTC
Created attachment 139821 [details]
sys-fs/vhba-1.0.0 ebuild
Comment 22 Jan Bessai 2008-01-01 20:57:15 UTC
Created attachment 139822 [details]
cdemu daemon init file (updated)
Comment 23 Jan Bessai 2008-01-01 20:57:48 UTC
Created attachment 139823 [details]
cdemu daemon config file (updated)
Comment 24 Jan Bessai 2008-01-01 20:59:22 UTC
Updated all ebuilds as discussed before.
Comment 25 Jan Bessai 2008-01-04 13:07:50 UTC
Comment on attachment 139823 [details]
cdemu daemon config file (updated)

><HTML><HEAD/><BODY><PRE># Config file for /etc/init.d/cdemu-daemon
>
>CDEMUD_DEVICES=1
>#ifndef ALSA
>CDEMUD_BACKEND=null
>#else
>CDEMUD_BACKEND=ALSA
>CDEMUD_AUDIODEV=default
>#endif
></PRE></BODY></HTML>
Comment 26 Jan Bessai 2008-01-04 13:17:25 UTC
Created attachment 140056 [details]
cdemud.conf.d alsa->ALSA fixed
Comment 27 Jan Bessai 2008-01-04 13:17:58 UTC
Created attachment 140058 [details]
cdemud.init.d alsa->ALSA fixed
Comment 28 Pham Ngoc Hai 2008-01-10 23:15:06 UTC
Created attachment 140640 [details, diff]
Patch for vhba makefile

Patch for vhba-1.0.0 Makefile to use EXTRA_CFLAGS and correct MAKE value
Comment 29 Pham Ngoc Hai 2008-01-10 23:16:58 UTC
Created attachment 140642 [details, diff]
patch for vhba to work with kernel >= 2.6.23 

This is my patch to make vhba-module compiled with kernel
>= 2.6.23 with commit
18dabf473e15850c0dbc8ff13ac1e2806d542c15
If you got error like:
error: 'struct scatterlist' has no member named 'page'
then this patch is for you.
Tested with kernel 2.6.24-rc4 on x86_64 arch
Comment 30 Pham Ngoc Hai 2008-01-10 23:19:13 UTC
Created attachment 140643 [details]
New vhba-1.0.0.ebuild with patchs

This is a modified version of Jan Bessai's ebuild with patches applied.
Comment 31 Rafał Mużyło 2008-01-27 23:57:57 UTC
One minor annoyance with 1.0.0 version, compared to 2007.08.23 versions.
It's mentioned in the docs, but still blindsided me.
If you run CDemud by initscript, now you have add `-b system` while calling cdemu.
That was not needed before.
Comment 32 Petr Sýkora 2008-02-11 13:55:16 UTC
Paludis requires whitespace after ( in DEPEND, this is not met in libmirage-1.0.0.ebuild. 
Comment 33 Petr Sýkora 2008-02-11 13:59:03 UTC
Created attachment 143207 [details]
dev-libs/libmirage-1.0.0 ebuild - added whitespace to satisfy paludis

Paludis requires whitespace after ( in DEPEND, this is not met in
libmirage-1.0.0.ebuild.
Sorry for double post, I'm new to using this bugzilla.
Comment 34 Dirk Best 2008-02-11 17:40:22 UTC
Compiling of the kernel module fails here with:

>>> Compiling source in /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 ...
 * Preparing vhba module
make -C /lib/modules/`uname -r`/build M=/var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 clean
make -C /lib/modules/`uname -r`/build M=/var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 modules
make[1]: Entering directory `/usr/src/linux-2.6.23-gentoo-r6'
make[1]: Entering directory `/usr/src/linux-2.6.23-gentoo-r6'
make[1]: Leaving directory `/usr/src/linux-2.6.23-gentoo-r6'
rm -fr vhba-module-1.0.0    
  CC [M]  /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0/vhba.o
/bin/sh: /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0/.tmp_versions/vhba.mod: No such file or directory
  Building modules, stage 2.
  MODPOST 0 modules

I'm trying the older ebuild now.
Comment 35 Dirk Best 2008-02-11 17:51:26 UTC
The older ebuild works fine.
Comment 36 Dirk Best 2008-02-11 17:57:49 UTC
Okay, not exactly fine, it installed the module into the wrong directory:

# ls /lib/modules/
2.6.19-gentoo-r5  2.6.23-gentoo-r6  block
Comment 37 Dirk Best 2008-02-11 18:50:09 UTC
And on a modprobe I get

MCE: The hardware reports a non fatal, correctable incident occurred on CPU 0.
Bank 2: 940040000000017a
scsi0 : vhba
WARNING: at kernel/softirq.c:139 local_bh_enable()
 [<c0121ddd>] local_bh_enable+0x7d/0xa0
 [<f8de80a1>] init_module+0x2450a1/0x245f70 [vhba]
 [<c02dada0>] scsi_done+0x0/0x20
 [<f8de8de7>] init_module+0x245de7/0x245f70 [vhba]
 [<c02db2c4>] scsi_dispatch_cmd+0x104/0x250
 [<c02e0497>] scsi_request_fn+0x177/0x330
 [<c0227ef5>] __generic_unplug_device+0x25/0x30
 [<c0227f5b>] blk_execute_rq_nowait+0x5b/0xc0
 [<c0228026>] blk_execute_rq+0x66/0xc0
 [<c0227430>] blk_end_sync_rq+0x0/0x30
 [<c0230030>] cfq_set_request+0x0/0x330
 [<c02dfea5>] scsi_execute+0xe5/0x120
 [<c02dff59>] scsi_execute_req+0x79/0xf0
 [<c02e1319>] scsi_probe_and_add_lun+0x1c9/0x940
 [<c03f666f>] klist_add_tail+0xf/0x40
 [<c02b0e0d>] device_add+0x3d/0x4b0
 [<c02b02ae>] get_device+0xe/0x20
 [<c02e1e01>] scsi_alloc_target+0x231/0x390
 [<c02e2b3b>] __scsi_add_device+0xcb/0xd0
 [<c02e2c18>] scsi_add_device+0x18/0x30
 [<f8de8d78>] init_module+0x245d78/0x245f70 [vhba]
 [<f8de8ce0>] init_module+0x245ce0/0x245f70 [vhba]
 [<c012c060>] run_workqueue+0x80/0x130
 [<c012c7e0>] worker_thread+0x0/0x100
 [<c012c87d>] worker_thread+0x9d/0x100
 [<c012f820>] autoremove_wake_function+0x0/0x50
 [<c012c7e0>] worker_thread+0x0/0x100
 [<c012f512>] kthread+0x42/0x70
 [<c012f4d0>] kthread+0x0/0x70
 [<c0104c6f>] kernel_thread_helper+0x7/0x18
 =======================
scsi 0:0:0:0: CD-ROM            CDEmu    Virt. CD/DVD-ROM 0.01 PQ: 0 ANSI: 0
scsi 0:0:0:0: Attached scsi generic sg0 type 5
scsi 0:0:1:0: CD-ROM            CDEmu    Virt. CD/DVD-ROM 0.01 PQ: 0 ANSI: 0
scsi 0:0:1:0: Attached scsi generic sg1 type 5

And when I try to mount /dev/sg0 to /mnt/drive I get (after mounting an image with cdemu, this seems to work and cdemu status displays it correctly):

mount: /dev/sg0 is not a block device
Comment 38 Dirk Best 2008-02-11 18:58:57 UTC
Previous error was caused by not having SCSI CD-ROM support in kernel, looks like the ebuild isn't verifying this correctly.
Comment 39 Jan Bessai 2008-02-11 20:25:54 UTC
It does check that, it just warns instead of failing completely.
Comment 40 Marcel Schmedes 2008-02-22 00:26:40 UTC
Hi,
vhba, cdemud, cdemu and gcdemu working out of the Box with newest ebuilds.
But I get a Kernel Warning if loading vhba (see below):
Kernel is 2.6.23-tuxonice-r6, some CONFIG:
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
-------------------
Any Ideas on this warning?
--------------------------
scsi4 : vhba
WARNING: at kernel/softirq.c:139 local_bh_enable()
 [<c011de7a>] local_bh_enable+0x3c/0x8c
 [<f8e8806a>] 0xf8e8806a
 [<c0235352>] scsi_done+0x0/0x16
 [<f8e88b2f>] 0xf8e88b2f
 [<c0235820>] scsi_dispatch_cmd+0x178/0x1c7
 [<c0239d66>] scsi_request_fn+0x22f/0x2fb
 [<c01cffa8>] blk_remove_plug+0x4e/0x5a
 [<c01cffd1>] __generic_unplug_device+0x1d/0x1f
 [<c01d004e>] blk_execute_rq_nowait+0x7b/0x9f
 [<c01d00eb>] blk_execute_rq+0x79/0x93
 [<c01cf6d8>] blk_end_sync_rq+0x0/0x23
 [<c01d50c4>] cfq_set_request+0x0/0x302
 [<c023947a>] scsi_execute+0xc8/0xdb
 [<c0239544>] scsi_execute_req+0xb7/0xd5
 [<c023a56d>] scsi_probe_and_add_lun+0x1ab/0x7d3
 [<c03118f0>] klist_add_tail+0xf/0x3f
 [<c023ce6e>] spi_device_match+0xa/0x4f
 [<c023295e>] attribute_container_device_trigger+0x7e/0x86
 [<c0232bb7>] transport_setup_classdev+0x0/0x1a
 [<c01d7273>] kobject_get+0xf/0x13
 [<c022e2f8>] get_device+0xe/0x14
 [<c023af37>] scsi_alloc_target+0x299/0x347
 [<f8e88a77>] 0xf8e88a77
 [<c023b9a6>] __scsi_add_device+0x90/0xb3
 [<c023ba87>] scsi_add_device+0x18/0x2a
 [<f8e88aeb>] 0xf8e88aeb
 [<c01262ff>] run_workqueue+0x8c/0x128
 [<c01268f2>] worker_thread+0x0/0xbe
 [<c01269a4>] worker_thread+0xb2/0xbe
 [<c0128f37>] autoremove_wake_function+0x0/0x35
 [<c0128e7e>] kthread+0x36/0x5c
 [<c0128e48>] kthread+0x0/0x5c
 [<c01048c7>] kernel_thread_helper+0x7/0x10
 =======================
scsi 4:0:0:0: CD-ROM            CDEmu    Virt. CD/DVD-ROM 0.01 PQ: 0 ANSI: 0
sr1: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
sr 4:0:0:0: Attached scsi CD-ROM sr1
Comment 41 Pham Ngoc Hai 2008-03-04 18:19:47 UTC
Created attachment 145284 [details]
Patch to make vhba-1.0.0 compiled with kernel 2.6.25

Patch the following errors:
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:484: error: ‘struct scsi_cmnd’ has no member named ‘request_bufflen’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:488: error: ‘struct scsi_cmnd’ has no member named ‘request_bufflen’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:490: error: ‘struct scsi_cmnd’ has no member named ‘request_bufflen’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:491: error: ‘struct scsi_cmnd’ has no member named ‘request_bufflen’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:496: error: ‘struct scsi_cmnd’ has no member named ‘use_sg’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:500: error: ‘struct scsi_cmnd’ has no member named ‘request_buffer’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:510: error: ‘struct scsi_cmnd’ has no member named ‘use_sg’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:523: error: ‘struct scatterlist’ has no member named ‘page’
/setup/work/cdemu-1.0/vhba-module-org/vhba.c:537: error: ‘struct scsi_cmnd’ has no member named ‘request_buffer’
Comment 42 Pham Ngoc Hai 2008-03-04 18:22:35 UTC
Created attachment 145286 [details]
New ebuild for the scsi_cmnd patch (kernel 2.6.25)

This ebuild uses scatterlist and scsicmnd patch, vhba now compiles with kernel 2.6.25
Comment 43 Vlad 2008-03-14 09:04:33 UTC
I'm using two patches for libmirage, see link below for details.
http://sourceforge.net/mailarchive/forum.php?thread_name=47779E2D.3030201%40cs.tu-berlin.de&forum_name=cdemu-devel
Comment 44 Rafał Mużyło 2008-03-14 14:41:51 UTC
There's one more thing that should be patched in Makefile.
It uses `uname -r` to determine dir where module should be installed.
In most cases it works just fine, but is broken i.e. when you run `module-rebuild rebuild`.
Comment 45 Ambroz Bizjak 2008-03-15 17:47:47 UTC
Created attachment 146241 [details]
vhba ebuild, kernel version corrected

This ebuild makes the module build with the correct kernel.
Comment 46 Marcelo Goes (RETIRED) gentoo-dev 2008-05-17 00:52:51 UTC
Hello guys,

I cleaned up the ebuilds and added them to my overlay.
http://dev.gentoo.org/~vanquirius/overlay/vanquirius

Ebuilds:
app-cdr/cdemu
app-cdr/cdemud
app-cdr/gcdemu
dev-libs/libmirage
sys-fs/vhba

They all emerge and install fine. I am, however, having problems to get cdemu running properly. I start the cdemud daemon and here is what I get when I try to run cdemu:

$ cdemu status
ERROR: Failed to connect to CDEmu daemon: org.freedesktop.DBus.Error.ServiceUnknown: The name net.sf.cdemu.CDEMUD_Daemon was not provided by any .service files
ERROR: Failed to connect to daemon!
Comment 47 Marcelo Goes (RETIRED) gentoo-dev 2008-05-17 00:53:56 UTC
*** Bug 209874 has been marked as a duplicate of this bug. ***
Comment 48 Sebastian Stammler 2008-05-17 01:30:23 UTC
try cdemu -b system status/...
Comment 49 SpanKY gentoo-dev 2008-05-17 13:57:16 UTC
Marcelo: if you're interested in taking over all the cdemu packages (punting/whatever), feel free
Comment 50 Pham Ngoc Hai 2008-05-18 11:05:06 UTC
Those patches for vhba still work for kernel 2.6.26-rc2.
Comment 51 Marcelo Goes (RETIRED) gentoo-dev 2008-05-20 02:35:04 UTC
Alright, got cdemu working fine in my box. I added dev-libs/libmirage, sys-fs/vhba, app-cdr/cdemud and app-cdr/gcdemu to the tree and bumped app-cdr/cdemu to 1.0.0 in cvs.

amd64, hppa and ppc: given that there has been substantial change to cdemu, I dropped your keywords. If you would like, please test and re-add your keywords.

Many thanks,
Marcelo
Comment 52 Marcelo Goes (RETIRED) gentoo-dev 2008-05-20 02:37:18 UTC
*** Bug 159015 has been marked as a duplicate of this bug. ***
Comment 53 Sebastian Stammler 2008-05-20 12:20:13 UTC
@Marcelo:
I can confirm that this ebuild(s) work well on amd64. I use kernel version 2.6.24-gentoo-r3 .
Comment 54 Adam Van Ymeren 2008-05-30 01:01:40 UTC
cdemu is working fine on amd64 for me too.

kernel 2-6.24-gentoo-r8
Comment 55 Jan Buecken 2008-06-04 10:27:19 UTC
Confirming that cdemu(d)-1.0.0 with vhba-1.0.0 works on my amd64 system, with kernel 2.6.25

greetings
Jan
Comment 56 Marcelo Goes (RETIRED) gentoo-dev 2008-06-15 03:52:25 UTC
*** Bug 227027 has been marked as a duplicate of this bug. ***
Comment 57 haarp 2008-06-20 21:22:17 UTC
Same here. I think it's time to add ~amd64
Comment 58 Santiago M. Mola (RETIRED) gentoo-dev 2008-06-26 14:08:39 UTC
Added ~amd64 keyword to all of them.
Comment 59 haarp 2008-06-26 15:21:01 UTC
Thanks. Working beautifully here.
Comment 60 Richard Hendrikse 2008-07-02 12:04:47 UTC
(In reply to comment #34)
> Compiling of the kernel module fails here with:
> 
> >>> Compiling source in /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 ...
>  * Preparing vhba module
> make -C /lib/modules/`uname -r`/build
> M=/var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 clean
> make -C /lib/modules/`uname -r`/build
> M=/var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0 modules
> make[1]: Entering directory `/usr/src/linux-2.6.23-gentoo-r6'
> make[1]: Entering directory `/usr/src/linux-2.6.23-gentoo-r6'
> make[1]: Leaving directory `/usr/src/linux-2.6.23-gentoo-r6'
> rm -fr vhba-module-1.0.0    
>   CC [M]  /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0/vhba.o
> /bin/sh:
> /var/tmp/portage/sys-fs/vhba-1.0.0/work/vhba-module-1.0.0/.tmp_versions/vhba.mod:
> No such file or directory
>   Building modules, stage 2.
>   MODPOST 0 modules
> 
> I'm trying the older ebuild now.
> 

I'm having the same problem on my x86_64 dualcore system. apparently, the module is cleaned after building, before it can be moved elsewhere, so the merging fails until "MAKEOPTS=-j1" is used. (-j3 is my system default)
Comment 61 Pham Ngoc Hai 2008-07-03 23:12:17 UTC
Created attachment 159468 [details]
Ebuild for sys-fs/vhba version 1.1.0

The new version (1.1.0) of cdemu has come out a few days ago.
The new vhba module comes with a bash script to check the kernel version so we dont need to patch the module any more.
All the other related packages like libmirage, cdemu, cdemud are just version bump so just change the ebuild file names will do.
Comment 62 Rafał Mużyło 2008-07-14 12:50:34 UTC
There's a little patch to vhba on Sourceforge mailing list,
that probably should be applied (http://sourceforge.net/mailarchive/forum.php?thread_name=4871427E.6060105%40kabelkaos.net&forum_name=cdemu-devel)
Comment 63 Rafał Mużyło 2008-07-14 13:38:44 UTC
Two corrections:
1. that patch on the list is not quite correct, better to use the version that went into svn
2. cdemud ebuild needs some fixes: ALSA is now incorrect (it's alsa now),
'-s' option for the deamon is no more, it uses libao now (and that's a hard dependency)
Comment 64 Marcelo Goes (RETIRED) gentoo-dev 2008-07-16 00:59:36 UTC
Thanks, vhba-1.1.0 in cvs.
Rafał, would you mind posting the correct patch here?

(Guys, for other cdemu issues, please open a new bug...)

Cheers!
Comment 65 Dirk Best 2008-07-16 07:35:30 UTC
I'm getting this error now:

  CC [M]  /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.o
/var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:35:24: error: kernel.api.h: No such file or directory

It looks like it deletes this file, a coupe of lines before that:

make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r4'
rm -fr vhba-module-1.1.0 kernel.api.h
Comment 66 Ambroz Bizjak 2008-07-16 11:14:23 UTC
Created attachment 160539 [details, diff]
fix kernel version detection

Again, vhba-1.1.0 (the one in portage) doesn't compile against the proper kernel (always against the running one). I'm attaching a fixed ebuild. This one also does not check config options twice.
Comment 67 Rafał Mużyło 2008-07-16 11:45:40 UTC
Created attachment 160544 [details, diff]
svn-based patch

Well, I used this patch.
It worked with gentoo-sources 2.6.25-r4
Comment 68 Ambroz Bizjak 2008-07-16 13:44:38 UTC
Created attachment 160555 [details, diff]
remove invasive api tester

This patch removes the use of the invasive 'kat' api tester and instead adds a simple version check. The 'kat' way has a race condition in the build system and may cause a random compilation failure when using -j3. This makes the patch by Rafa? unneeded.
Comment 69 Ambroz Bizjak 2008-07-16 13:53:53 UTC
Created attachment 160556 [details]
vhba 1.1.0 ebuild - kernel version detection, remove 'kat'

this ebuild includes proper kernel version detection and also adds applying my previous patch that removes 'kat'
Comment 70 haarp 2008-07-18 12:44:50 UTC
(In reply to comment #65)
> I'm getting this error now:
> 
>   CC [M]  /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.o
> /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:35:24: error:
> kernel.api.h: No such file or directory
> 
> It looks like it deletes this file, a coupe of lines before that:
> 
> make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r4'
> rm -fr vhba-module-1.1.0 kernel.api.h
> 

Same problem here. Using kernel gentoo-2.6.26.
Stopping the the merge right after it deletes the file and copying it back from a backup, then resuming the merge works flawlessly.
Comment 71 Tobias Jakobi 2008-07-18 23:34:13 UTC
W00t, didn't notice version 1.1.0 of cdemu is already out!

Any news when we'll see that in portage?

Greets,
Tobias
Comment 72 Geert Vanhaute 2008-07-20 19:48:56 UTC
(In reply to comment #71)
> W00t, didn't notice version 1.1.0 of cdemu is already out!
> 
> Any news when we'll see that in portage?
> 
> Greets,
> Tobias
> 
Renaming the ebuilds above does the trick, but I had to change version 1.0.0 by ${PV} in the ebuild of gcdemu.
Comment 73 Geert Vanhaute 2008-07-21 09:22:23 UTC
(In reply to comment #72)
> Renaming the ebuilds above does the trick, but I had to change version 1.0.0 by
> ${PV} in the ebuild of gcdemu.
> 
Oops, it seems like I was too quick. Minor adjustments to be made.
I used the gcdemu from portage and renamed it. I had to change the version from 1.0.0 to ${PV} but I also had to add before the line einfo:
 gnome2_pkg_postinst

Also, the file /etc/init.d/cdemud had to be changed as options of cdemud apparently changed.
Comment 74 Geert Vanhaute 2008-07-21 09:24:11 UTC
Created attachment 160982 [details]
cdemud-init.d-v1.1.0

The /etc/init.d/cdemud file with changed options
Please feel free to correct
Comment 75 Marcel Schmedes 2008-07-27 13:47:26 UTC
I just want to mention that the Bug I speak about in Comment #40 is still there with new kernel and vhba, so I opened a new Bug:
http://bugs.gentoo.org/show_bug.cgi?id=233102
Comment 76 Rafał Mużyło 2008-08-04 15:19:44 UTC
In comment 63 I said that there's a hard
dependency on libao now, but somehow people missed
that when they added cdemud 1.1.0 to the tree.
Comment 77 Jeroen Roovers gentoo-dev 2008-08-04 20:38:27 UTC
Please file a keywording bug when all these problems have been ironed out.
Comment 78 Ambroz Bizjak 2009-02-13 18:19:09 UTC
These fixes have been here for months and are still not in portage. I suppose a new maintainer is needed?
Comment 79 Peter Volkov (RETIRED) gentoo-dev 2010-01-09 21:11:53 UTC
This bug is dead. For keywording clone bug 300331 was created. If some problems reported here still exist in the recent versions of software, please, open new bug(s). This one is dead.