Skip site navigation (1)Skip section navigation (2)

ports/133413: [patch] sysutils/libcdio 0.78.2 is broken for CDROMs that don't support media-changed notification.

From:baileygeoff@telus.net
Date:Sun, 5 Apr 2009 22:34:45 -0700 (PDT)
Subject:[patch] sysctls/libcdio-0.78.2 is broken for CDROM's that don't support media-changed notification.
Send-pr version:3.113

Number:133413
Category:ports
Synopsis:[patch] sysutils/libcdio 0.78.2 is broken for CDROMs that don't support media-changed notification.
Severity:serious
Priority:medium
Responsible:arved@FreeBSD.org
State:feedback
Class:change-request
Arrival-Date:Mon Apr 06 06:00:05 UTC 2009
Closed-Date:
Last-Modified:Sun Nov 8 09:00:11 UTC 2009
Originator:Geoff Bailey <baileygeoff@telus.net>
Release:FreeBSD 7.1-RELEASE i386

Organization:
 
Environment:
sysctls/libcdio-0.78.2_2 used by multimedia/audacious-1.5.1_3
System: FreeBSD uzyod 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Description:
1. The function get_media_changed_freebsd(), in lib/driver/FreeBSD/freebsd.c,
returns DRIVER_OP_UNSUPPORTED for my NEC-28D CDROM device. The lshal program
shows: 'storage.cdrom.support_media_changed = false' for this device.

This causes the Audacious Media Player's cdaudio-ng plugin to only load the
first track of a CD in the playlist.

The problem is solved if this function returns 0 (not changed) for
unsupported devices instead of DRIVER_OP_UNSUPPORTED. While the player
may not be able to detect media changes under these circumstances, it
at least remains functional for older drives.

I have attached 'patch-lib_driver_FreeBSD_freebsd.c' which makes the
the requested change. It also adds a few lines to set access_mode='ioctl'
if the atapi (/dev/acd0) driver is being used by the the application.

2. The read_audio_sectors_freebsd_ioctl() function, in
lib/driver/FreeBSD/freebsd_ioctl.c, calls the CDIOCREADAUDIO ioctl, which
has been deprecated for some time. However, this call can be easily replaced
with a CDRIOCSETBLOCKSIZE ioctl call followed by a pread() call.

Since the atapicd driver is in the generic kernel and the atapicam
driver module must be explicitly loaded, this simple fix to the atapi
ioctl interface will allow programs (such as Audacious) to function
'out of the box'.

I have attached 'patch-lib_driver_FreeBSD_freebsd_ioctl.c' which makes
the requested changes.
How-To-Repeat:
 
Fix:
please see atached patches:
'patch-lib_driver_FreeBSD_freebsd.c'
'patch-lib_driver_FreeBSD_freebsd_ioctl.c'
Release-Note:
 
Audit-Trail:
Responsible Changed
From-To:freebsd-ports-bugs->mich
By:pav
When:Thu Apr 30 11:22:56 UTC 2009
Why:Over to maintainer

Responsible Changed
From-To:mich->freebsd-ports-bugs
By:mich
When:Tue Oct 20 16:55:32 UTC 2009
Why:No longer maintaining this port

State Changed
From-To:open->feedback
By:arved
When:Sun Nov 8 08:06:41 UTC 2009
Why:Taking over, i am the new, old maintainer
Geoff,
The patches were not attached to the PR, can you send them to me?
Did you report this issue upstream?

Responsible Changed
From-To:freebsd-ports-bugs->arved
By:arved
When:Sun Nov 8 08:06:41 UTC 2009
Why:Taking over, i am the new, old maintainer
Geoff,
The patches were not attached to the PR, can you send them to me?
Did you report this issue upstream?

Reply via E-mail
From:Tilman Linneweh <arved@FreeBSD.org>
Date:Sun, 08 Nov 2009 09:17:53 +0100
arved@FreeBSD.org wrote:

> Geoff,
> The patches were not attached to the PR, can you send them to me?
> Did you report this issue upstream?

Never mind, i saw that you reported them to the libcdio Mailinglist.

Reply via E-mail
From:Tilman Linneweh <arved@FreeBSD.org>
Date:Sun, 08 Nov 2009 09:55:36 +0100
This is a multi-part message in MIME format.


Tilman Linneweh wrote:
> > Geoff,
> > The patches were not attached to the PR, can you send them to me?
> > Did you report this issue upstream?
>
> Never mind, i saw that you reported them to the libcdio Mailinglist.

Here is an update to 0.82.Please test!

It will be committed after FreeBSD 8.0 Release.



? .Makefile.swp
? .pkg-plist.swp
? 136259
? libcdio-0.82.patch
? pr-patch
? work
Download patch-1.diff
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/libcdio/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile     7 Nov 2009 23:58:37 -0000       1.29
+++ Makefile     8 Nov 2009 08:52:54 -0000
@@ -5,8 +5,7 @@
 # $FreeBSD: ports/sysutils/libcdio/Makefile,v 1.29 2009/11/07 23:58:37 arved Exp $
 
 PORTNAME=       libcdio
-PORTVERSION=    0.78.2
-PORTREVISION=   3
+PORTVERSION=    0.82
 CATEGORIES=     sysutils
 MASTER_SITES=   ${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=     libcdio
@@ -26,6 +25,7 @@
                         --with-libiconv-prefix=${LOCALBASE} \
 USE_PERL5_BUILD=yes
 CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -liconv"
+MAN1=   cd-drive.1 cd-info.1 iso-read.1 iso-info.1 cd-read.1
 
 INFO=           libcdio
 
@@ -36,8 +36,11 @@
 .ifdef(WITH_PARANOIA)
 LIB_DEPENDS+=   cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia
 PLIST_SUB+=     PARANOIA=""
-MANLANG=        "" ja
-MAN1=   cd-paranoia.1
+_MANLANG=       "" ja
+_MAN1=  cd-paranoia.1
+.for lang in ${_MANLANG}
+_MANPAGES+=     ${_MAN1:S%^%${MAN1PREFIX}/man/${lang}/man1/%}
+.endfor
 .else
 CONFIGURE_ARGS+=        --without-cd-paranoia
 PLIST_SUB+=     PARANOIA="@comment "
@@ -46,7 +49,7 @@
 post-patch:
 .ifdef(WITH_PARANOIA)
         ${REINPLACE_CMD} -e 's|/jp/man1|/ja/man1|' \
-                 ${WRKSRC}/src/cd-paranoia/doc/jp/Makefile.in
+                ${WRKSRC}/src/cd-paranoia/doc/ja/Makefile.in
 .else
         ${REINPLACE_CMD} -e 's|libcdio_paranoia.pc||; s|libcdio_cdda.pc||' \
                  ${WRKSRC}/Makefile.in
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/sysutils/libcdio/distinfo,v
retrieving revision 1.12
diff -u -r1.12 distinfo
--- distinfo     8 Apr 2008 09:11:20 -0000       1.12
+++ distinfo     8 Nov 2009 08:52:54 -0000
@@ -1,3 +1,3 @@
-MD5 (libcdio-0.78.2.tar.gz) = a6b73300d1247012a1b1246d935ac0d3
-SHA256 (libcdio-0.78.2.tar.gz) = 2792e4133a89b254644ffe526c8eab785e1de3078d3a9c1ec03653247700ebde
-SIZE (libcdio-0.78.2.tar.gz) = 2024218
+MD5 (libcdio-0.82.tar.gz) = 1c29b18e01ab2b966162bc727bf3c360
+SHA256 (libcdio-0.82.tar.gz) = 1acb3de8e0927906ade7a34c5853173d3068b87b02dfba80d0bf11e47f0b5d39
+SIZE (libcdio-0.82.tar.gz) = 2240599
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/sysutils/libcdio/pkg-plist,v
retrieving revision 1.17
diff -u -r1.17 pkg-plist
--- pkg-plist    8 Apr 2008 09:11:20 -0000       1.17
+++ pkg-plist    8 Nov 2009 08:52:54 -0000
@@ -49,7 +49,7 @@
 lib/libcdio.a
 lib/libcdio.la
 lib/libcdio.so
-lib/libcdio.so.8
+lib/libcdio.so.12
 lib/libcdio++.a
 lib/libcdio++.la
 lib/libcdio++.so
@@ -65,7 +65,7 @@
 lib/libiso9660.a
 lib/libiso9660.la
 lib/libiso9660.so
-lib/libiso9660.so.5
+lib/libiso9660.so.7
 lib/libiso9660++.a
 lib/libiso9660++.la
 lib/libiso9660++.so
@@ -77,6 +77,9 @@
 libdata/pkgconfig/libcdio.pc
 %%PARANOIA%%libdata/pkgconfig/libcdio_cdda.pc
 %%PARANOIA%%libdata/pkgconfig/libcdio_paranoia.pc
+libdata/pkgconfig/libudf.pc
+libdata/pkgconfig/libcdio++.pc
+libdata/pkgconfig/libiso9660++.pc
 libdata/pkgconfig/libiso9660.pc
 @dirrm include/cdio
 @dirrm include/cdio++
Index: files/patch-lib_driver_FreeBSD_freebsd.c
===================================================================
RCS file: files/patch-lib_driver_FreeBSD_freebsd.c
diff -N files/patch-lib_driver_FreeBSD_freebsd.c
--- files/patch-lib_driver_FreeBSD_freebsd.c     2 Jan 2008 13:51:57 -0000       1.1
+++ /dev/null    1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-
-$FreeBSD: ports/sysutils/libcdio/files/patch-lib_driver_FreeBSD_freebsd.c,v 1.1 2008/01/02 13:51:57 mich Exp $
-
---- lib/driver/FreeBSD/freebsd.c.orig
-+++ lib/driver/FreeBSD/freebsd.c
-@@ -743,6 +743,27 @@
- #endif /*HAVE_FREEBSD_CDROM*/
- }
- 
-+/*! Find out if media has changed since the last call.  @param
-+  p_user_data the environment of the CD object to be acted upon.
-+  @return 1 if media has changed since last call, 0 if not. Error
-+  return codes are the same as driver_return_code_t
-+   */
-+int
-+get_media_changed_freebsd (const void *p_user_data)
-+{
-+#ifdef HAVE_FREEBSD_CDROM
-+  const _img_private_t *p_env = p_user_data;
-+  if ( p_env->access_mode == _AM_CAM ) {
-+    return mmc_get_media_changed( p_env->gen.cdio );
-+  }
-+  else
-+    return DRIVER_OP_UNSUPPORTED;
-+#else 
-+  return DRIVER_OP_NO_DRIVER;
-+#endif /*HAVE_FREEBSD_CDROM*/
-+}
-+
-+
- /*!
-   Initialization routine. This is the only thing that doesn't
-   get called via a function pointer. In fact *we* are the
-@@ -790,6 +811,7 @@
-     .get_discmode           = get_discmode_generic,
-     .get_drive_cap          = get_drive_cap_freebsd,
-     .get_first_track_num    = get_first_track_num_generic,
-+    .get_media_changed      = get_media_changed_freebsd,
-     .get_mcn                = get_mcn_freebsd,
-     .get_num_tracks         = get_num_tracks_generic,
-     .get_track_channels     = get_track_channels_generic,
Index: files/patch-lib_driver_FreeBSD_freebsd.h
===================================================================
RCS file: files/patch-lib_driver_FreeBSD_freebsd.h
diff -N files/patch-lib_driver_FreeBSD_freebsd.h
--- files/patch-lib_driver_FreeBSD_freebsd.h     2 Jan 2008 13:51:57 -0000       1.1
+++ /dev/null    1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/sysutils/libcdio/files/patch-lib_driver_FreeBSD_freebsd.h,v 1.1 2008/01/02 13:51:57 mich Exp $
-
---- lib/driver/FreeBSD/freebsd.h.orig
-+++ lib/driver/FreeBSD/freebsd.h
-@@ -158,6 +158,8 @@
-                                cdio_drive_write_cap_t *p_write_cap,
-                                cdio_drive_misc_cap_t  *p_misc_cap);
- 
-+int get_media_changed_freebsd (const void *p_user_data);
-+
- char *get_mcn_freebsd_ioctl (const _img_private_t *p_env);
- 
- void free_freebsd_cam (void *obj);
Index: files/patch-src_cd-drive.c
===================================================================
RCS file: files/patch-src_cd-drive.c
diff -N files/patch-src_cd-drive.c
--- files/patch-src_cd-drive.c   12 Mar 2007 14:19:39 -0000      1.1
+++ /dev/null    1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/sysutils/libcdio/files/patch-src_cd-drive.c,v 1.1 2007/03/12 14:19:39 mich Exp $
-
---- src/cd-drive.c.orig
-+++ src/cd-drive.c
-@@ -28,7 +28,7 @@
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
--#include <getopt.h>
-+#include "getopt.h"
- #include <cdio/cdio.h>
- #include <cdio/mmc.h>
- 




Unformatted:
 
Submit Followup | Raw PR | Find another PR