Opened 15 years ago

Closed 13 years ago

#1499 closed defect (fixed)

Obsolete DEFAULT_CDROM_DEVICE for (Open)Solaris

Reported by: ptecza@… Owned by: diego@…
Priority: normal Component: build system
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

DEFAULT_CDROM_DEVICE=/vol/dev/aliases/cdrom0 is obsolete for (Open)Solaris.
Actually you should set DEFAULT_CDROM_DEVICE=/cdrom/cdrom0.

It's because now (Open)Solaris uses HAL instead of vold daemon, so logical
device names for removable media under the /vol directory, such as
/vol/dev/aliases/..., are no longer provided. It's official information.
You can check it on the Sun Docs site:

http://docs.sun.com/app/docs/doc/819-2183/6n4g726uc?a=view

Here are error messages on my OpenSolaris box when I try to play DVD:

$ mplayer dvd://
MPlayer SVN-r29378-3.4.3 (C) 2000-2009 MPlayer Team

Playing dvd://.
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdread: Can't stat /vol/dev/aliases/cdrom0
No such file or directory
libdvdread: Could not open /vol/dev/aliases/cdrom0
Couldn't open DVD device: /vol/dev/aliases/cdrom0 (No such file or directory)
No stream found to handle url dvd://
Select error: Bad file number

Exiting... (End of file)

$ ls -l /vol/dev/aliases/cdrom0
ls: cannot access /vol/dev/aliases/cdrom0: No such file or directory
$ ls -l /vol/dev/aliases/
ls: cannot access /vol/dev/aliases/: No such file or directory
$ ls -l /vol/dev/
ls: cannot access /vol/dev/: No such file or directory
$ ls -l /vol/
ls: cannot access /vol/: No such file or directory

Below are details about my OpenSolaris version. Please note that
it's the latest OpenSolaris 2009.06:

$ uname -a
SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris

Attachments (3)

osol-default-cdrom-device.patch (362 bytes ) - added by ptecza@… 15 years ago.
Set up-to-date (Open)Solaris DEFAULT_CDROM_DEVICE
osol-default-cdrom-device2.patch (683 bytes ) - added by ptecza@… 15 years ago.
Setting DEFAULT_CDROM_DEVICE both for new and older Solaris systems
configure.patch (551 bytes ) - added by ptecza@… 15 years ago.
This time checking Solaris version

Download all attachments as: .zip

Change History (18)

by ptecza@…, 15 years ago

Set up-to-date (Open)Solaris DEFAULT_CDROM_DEVICE

comment:1 by ptecza@…, 15 years ago

comment:2 by diego@…, 15 years ago

Status: newassigned

I don't think dropping support for older Solaris systems is a good solution. Please try to come up with something backwards-compatible.

comment:3 by ptecza@…, 15 years ago

(In reply to comment #2)

I don't think dropping support for older Solaris systems is a good solution.
Please try to come up with something backwards-compatible.

Ups! I didn't think about it :D But I'm afraid that my experiences with
autotools is not sufficient... Probably configure script should do testing
whether file /vol/dev/aliases/cdrom0 exists for SunOS platform. If not,
then it should set DEFAULT_CDROM_DEVICE=/cdrom/cdrom0. Am I right? :)

comment:4 by diego@…, 15 years ago

rep_platform: PC (x86 with MMX)All

(In reply to comment #3)

(In reply to comment #2)

I don't think dropping support for older Solaris systems is a good solution.
Please try to come up with something backwards-compatible.

Ups! I didn't think about it :D But I'm afraid that my experiences with
autotools is not sufficient...

Luckily, we do not use auto*.

Probably configure script should do testing
whether file /vol/dev/aliases/cdrom0 exists for SunOS platform. If not,
then it should set DEFAULT_CDROM_DEVICE=/cdrom/cdrom0. Am I right? :)

Rather, it should test for the new standard and fall back on the old one. Have a look at configure around line 5760. If you know a minimal bit of shell programming, you should be able to figure it out. I do not have a Solaris system, so I cannot do this myself.

comment:5 by ptecza@…, 15 years ago

(In reply to comment #4)

(In reply to comment #3)

(In reply to comment #2)

I don't think dropping support for older Solaris systems is a good solution.
Please try to come up with something backwards-compatible.

Ups! I didn't think about it :D But I'm afraid that my experiences with
autotools is not sufficient...

Luckily, we do not use auto*.

Good news! ;)

Probably configure script should do testing
whether file /vol/dev/aliases/cdrom0 exists for SunOS platform. If not,
then it should set DEFAULT_CDROM_DEVICE=/cdrom/cdrom0. Am I right? :)

Rather, it should test for the new standard and fall back on the old one. Have
a look at configure around line 5760. If you know a minimal bit of shell
programming, you should be able to figure it out. I do not have a Solaris
system, so I cannot do this myself.

Thanks for the hint, Diego! I'll try to do it.

by ptecza@…, 15 years ago

Setting DEFAULT_CDROM_DEVICE both for new and older Solaris systems

comment:6 by ptecza@…, 15 years ago

comment:7 by ptecza@…, 15 years ago

(In reply to comment #5)

Rather, it should test for the new standard and fall back on the old one. Have
a look at configure around line 5760. If you know a minimal bit of shell
programming, you should be able to figure it out. I do not have a Solaris
system, so I cannot do this myself.

Thanks for the hint, Diego! I'll try to do it.

The new patch is ready! I hope it's OK :)

comment:8 by diego@…, 15 years ago

Resolution: fixed
Status: assignedclosed

I applied a slightly modified version of your patch, thanks.

comment:9 by ptecza@…, 15 years ago

(In reply to comment #8)

I applied a slightly modified version of your patch, thanks.

Thank you very much!

BTW, I was thinking about very similar patch too, but finally
I chose version with "if ... else ... fi", because it's more
easy to understand :)

comment:10 by diego@…, 15 years ago

(In reply to comment #9)

BTW, I was thinking about very similar patch too, but finally
I chose version with "if ... else ... fi", because it's more
easy to understand :)

There is no way to understand MPlayer's configure if you are unfamiliar with && and
constructs.

comment:11 by ptecza@…, 15 years ago

(In reply to comment #10)

(In reply to comment #9)

BTW, I was thinking about very similar patch too, but finally
I chose version with "if ... else ... fi", because it's more
easy to understand :)

There is no way to understand MPlayer's configure if you are unfamiliar with &&

and
constructs.
OK, next patch will be with && or
operators ;)

comment:12 by ptecza@…, 15 years ago

Resolution: fixed
Status: closedreopened

(In reply to comment #8)

I applied a slightly modified version of your patch, thanks.

Diego, I'm so sorry for confusing, but I have to reopen that bug.

I've just noticed that my patch works well only if I have a disk in
a CD/DVD drive :D It's because /cdrom/cdrom0 symlink is created
dynamically when OpenSolaris user inserts a disk.

So we need to check whether volfs file system exists on building host.
Maybe we should test only /vol/dev/aliases/ directory? I'm not sure,
because I don't have Solaris system. I only use OpenSolaris. But I can
ask more advanced Polish Solaris users.

by ptecza@…, 15 years ago

Attachment: configure.patch added

This time checking Solaris version

comment:13 by ptecza@…, 15 years ago

comment:14 by ptecza@…, 15 years ago

(In reply to comment #12)

So we need to check whether volfs file system exists on building host.
Maybe we should test only /vol/dev/aliases/ directory? I'm not sure,
because I don't have Solaris system. I only use OpenSolaris. But I can
ask more advanced Polish Solaris users.

More experienced Solaris users say that's better to check system version. For Solaris 5.10 and older we still can set DEFAULT_CDROM_DEVICE=/vol/dev/aliases/cdrom0. But for the latest Solaris 5.11 and also OpenSolaris we should set DEFAULT_CDROM_DEVICE=/cdrom/cdrom0. Please look at the newest patch of mine.

comment:15 by diego@…, 13 years ago

Resolution: fixed
Status: reopenedclosed

Patch applied in revision r33890

Note: See TracTickets for help on using tickets.