[Pkg-opt-media-team] [SCM] cdparanoia packaging branch, master, updated. debian/3.10.2+debian-10-5-gd415f2c
TANIGUCHI Takaki
takaki at asis.media-as.org
Wed Apr 11 01:43:52 UTC 2012
The following commit has been merged in the master branch:
commit 8a23d091533fb60b7c584e82750ff7ddcb18c0fa
Author: Adam D. Barratt <adam at adam-barratt.org.uk>
Date: Wed Feb 29 18:34:44 2012 +0000
Imported Debian patch 3.10.2+debian-10.1
diff --git a/debian/changelog b/debian/changelog
index 60ea379..48011f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+cdparanoia (3.10.2+debian-10.1) unstable; urgency=medium
+
+ * Non-maintainer upload with maintainer's consent.
+ * Urgency "medium" for transition-related RC bug fix.
+ * Fix FTBFS on kfreebsd caused by libcam API changes. (Closes: #660403)
+
+ -- Adam D. Barratt <adam at adam-barratt.org.uk> Wed, 29 Feb 2012 18:34:44 +0000
+
cdparanoia (3.10.2+debian-10) unstable; urgency=low
[ Rogério Brito ]
diff --git a/debian/patches/05-kfreebsd.patch b/debian/patches/05-kfreebsd.patch
index 0e1a53f..c328eca 100644
--- a/debian/patches/05-kfreebsd.patch
+++ b/debian/patches/05-kfreebsd.patch
@@ -686,7 +686,7 @@ Description: Added support for GNU/kFreeBSD.
/* process a complete scsi command. */
static int sg2_handle_scsi_cmd(cdrom_drive *d,
unsigned char *cmd,
-@@ -432,6 +455,88 @@
+@@ -432,6 +455,91 @@
return sg2_handle_scsi_cmd(d,cmd,cmd_len,in_size,out_size,bytefill,bytecheck,sense);
}
@@ -740,8 +740,11 @@ Description: Added support for GNU/kFreeBSD.
+ return TR_EREAD;
+ }
+
-+ if (d->private_data->ccb->csio.sense_data.error_code & SSD_ERRCODE) {
-+ switch (d->private_data->ccb->csio.sense_data.flags & SSD_KEY) {
++ int errorCode, senseKey, addSenseCode, addSenseCodeQual;
++ scsi_extract_sense( &(d->private_data->ccb->csio.sense_data), &errorCode, &senseKey, &addSenseCode,
++ &addSenseCodeQual );
++ if (errorCode) {
++ switch (senseKey) {
+ case SSD_KEY_NO_SENSE:
+ errno = EIO;
+ return TR_UNKNOWN;
@@ -752,8 +755,8 @@ Description: Added support for GNU/kFreeBSD.
+ return TR_BUSY;
+ case SSD_KEY_MEDIUM_ERROR:
+ errno = EIO;
-+ if (d->private_data->ccb->csio.sense_data.add_sense_code == 0x0c &&
-+ d->private_data->ccb->csio.sense_data.add_sense_code_qual == 0x09)
++ if (addSenseCode == 0x0c &&
++ addSenseCodeQual == 0x09)
+ return TR_STREAMING;
+ else
+ return TR_MEDIUM;
@@ -813,34 +816,43 @@ Description: Added support for GNU/kFreeBSD.
static int mode_sense_atapi(cdrom_drive *d,int size,int page){
unsigned char sense[SG_MAX_SENSE];
-@@ -1080,9 +1209,15 @@
+@@ -1080,10 +1210,20 @@
+ sprintf(b,"scsi_read error: sector=%ld length=%ld retry=%d\n",
begin,sectors,retry_count);
cdmessage(d,b);
- sprintf(b," Sense key: %x ASC: %x ASCQ: %x\n",
+#if defined(__linux__)
+ sprintf(b," Sense key: %x ASC: %x ASCQ: %x\n",
(int)(sense[2]&0xf),
(int)(sense[12]),
(int)(sense[13]));
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+ d->private_data->ccb->csio.sense_data.flags & SSD_KEY,
-+ d->private_data->ccb->csio.sense_data.add_sense_code,
-+ d->private_data->ccb->csio.sense_data.add_sense_code_qual);
++ int errorCode, senseKey, addSenseCode, addSenseCodeQual;
++ scsi_extract_sense( &(d->private_data->ccb->csio.sense_data), &errorCode, &senseKey, &addSenseCode,
++ &addSenseCodeQual );
++ sprintf(b," Sense key: %x ASC: %x ASCQ: %x\n",
++ senseKey,
++ addSenseCode,
++ addSenseCodeQual);
+#endif
cdmessage(d,b);
sprintf(b," Transport error: %s\n",strerror_tr[err]);
cdmessage(d,b);
-@@ -1092,9 +1227,15 @@
+@@ -1092,10 +1228,19 @@
+
fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n",
begin,sectors,retry_count);
- fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
+#if defined(__linux__)
+ fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
(int)(sense[2]&0xf),
(int)(sense[12]),
(int)(sense[13]));
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+ d->private_data->ccb->csio.sense_data.flags & SSD_KEY,
-+ d->private_data->ccb->csio.sense_data.add_sense_code,
-+ d->private_data->ccb->csio.sense_data.add_sense_code_qual);
++ scsi_extract_sense( &(d->private_data->ccb->csio.sense_data), &errorCode, &senseKey, &addSenseCode,
++ &addSenseCodeQual );
++ fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
++ senseKey,
++ addSenseCode,
++ addSenseCodeQual);
+#endif
fprintf(stderr," Transport error: %s\n",strerror_tr[err]);
fprintf(stderr," System error: %s\n",strerror(errno));
diff --git a/debian/patches/cdparanoia_memleak_fix.patch b/debian/patches/cdparanoia_memleak_fix.patch
deleted file mode 100644
index b710681..0000000
--- a/debian/patches/cdparanoia_memleak_fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Author: Billy Donahue <billy.donahue at gmail.com>
-Reviewed-By: Rogério Theodoro de Brito <rbrito at ime.usp.br>
-Subject: Fix memory leak in cdparanoia's scanning of devices
-Bug-Debian: http://bugs.debian.org/245167
-Last-Updated: 2010-11-09
-
---- a/interface/scan_devices.c
-+++ b/interface/scan_devices.c
-@@ -97,6 +97,8 @@
- return(d);
- idmessage(messagedest,messages,"",NULL);
- #endif
-+
-+ free(buffer);
- }
- }else{
- /* Name. Go for it. */
diff --git a/debian/patches/cdparanoia_optimize_scan.patch b/debian/patches/cdparanoia_optimize_scan.patch
deleted file mode 100644
index 7178d0f..0000000
--- a/debian/patches/cdparanoia_optimize_scan.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Author: Billy Donahue <billy.donahue at gmail.com>
-Reviewed-By: Rogério Theodoro de Brito <rbrito at ime.usp.br>
-Subject: Small optimization to cdparanoia's scanning of devices
-Bug-Debian: http://bugs.debian.org/245167
-Last-Updated: 2010-11-09
-
---- a/interface/scan_devices.c
-+++ b/interface/scan_devices.c
-@@ -80,25 +80,25 @@
- /* is it a name or a pattern? */
- char *pos;
- if((pos=strchr(cdrom_devices[i],'?'))){
-- int j;
-- /* try first eight of each device */
-- for(j=0;j<4;j++){
-+ const char suffixes[] = "0a1b2c3d";
-+ int j=0;
-+ /* try each suffix for each device pattern */
-+ while (suffixes[j]) {
- char *buffer=copystring(cdrom_devices[i]);
-
- /* number, then letter */
--
-- buffer[pos-(cdrom_devices[i])]=j+48;
-+ buffer[pos-(cdrom_devices[i])]=suffixes[j];
- if((d=cdda_identify(buffer,messagedest,messages)))
- return(d);
- idmessage(messagedest,messages,"",NULL);
--#if defined(__linux__)
-- buffer[pos-(cdrom_devices[i])]=j+97;
-- if((d=cdda_identify(buffer,messagedest,messages)))
-- return(d);
-- idmessage(messagedest,messages,"",NULL);
--#endif
-
- free(buffer);
-+
-+#if defined(__linux__)
-+ j++;
-+#else
-+ j+=2; /* If we're not running Linux, skip letters. */
-+#endif
- }
- }else{
- /* Name. Go for it. */
diff --git a/debian/patches/series b/debian/patches/series
index 8e866a3..a99f7fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,5 +6,3 @@
06-autoconf.patch
07-jpmanfix.patch
cdparanoia-force-progress-bar.diff
-cdparanoia_memleak_fix.patch
-cdparanoia_optimize_scan.patch
--
cdparanoia packaging
More information about the Pkg-opt-media-team
mailing list