From 1b4e3f339fc0e5f6059c80ba77f66af6cd253c7f Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Mar 15 2013 12:55:24 +0000 Subject: import cdparanoia-10.2-13.el7.src.rpm --- diff --git a/.cdparanoia.metadata b/.cdparanoia.metadata new file mode 100644 index 0000000..0881208 --- /dev/null +++ b/.cdparanoia.metadata @@ -0,0 +1 @@ +1901e20d3a370ca6afa4c76a9ef30d3f03044320 SOURCES/cdparanoia-III-10.2.src.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/cdparanoia-10.2-#463009.patch b/SOURCES/cdparanoia-10.2-#463009.patch new file mode 100644 index 0000000..f89f85d --- /dev/null +++ b/SOURCES/cdparanoia-10.2-#463009.patch @@ -0,0 +1,480 @@ +Index: /trunk/cdparanoia/interface/test_interface.c +=================================================================== +--- /trunk/cdparanoia/interface/test_interface.c (revision 15299) ++++ /trunk/cdparanoia/interface/test_interface.c (revision 15338) +@@ -67,7 +67,7 @@ + + if(beginprivate->last_milliseconds=20; ++ d->private_data->last_milliseconds=20; + else +- d->private->last_milliseconds=sectors; ++ d->private_data->last_milliseconds=sectors; + + #ifdef CDDA_TEST_UNDERRUN +Index: /trunk/cdparanoia/interface/cdda_interface.h +=================================================================== +--- /trunk/cdparanoia/interface/cdda_interface.h (revision 15290) ++++ /trunk/cdparanoia/interface/cdda_interface.h (revision 15338) +@@ -85,5 +85,5 @@ + int is_mmc; + +- cdda_private_data_t *private; ++ cdda_private_data_t *private_data; + void *reserved; + unsigned char inqbytes[4]; +Index: /trunk/cdparanoia/interface/interface.c +=================================================================== +--- /trunk/cdparanoia/interface/interface.c (revision 15314) ++++ /trunk/cdparanoia/interface/interface.c (revision 15338) +@@ -40,7 +40,7 @@ + if(d->cdda_fd!=-1)close(d->cdda_fd); + if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd); +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + +@@ -128,5 +128,5 @@ + } + } +- if(ms)*ms=d->private->last_milliseconds; ++ if(ms)*ms=d->private_data->last_milliseconds; + return(sectors); + } +Index: /trunk/cdparanoia/interface/scsi_interface.c +=================================================================== +--- /trunk/cdparanoia/interface/scsi_interface.c (revision 15314) ++++ /trunk/cdparanoia/interface/scsi_interface.c (revision 15338) +@@ -16,11 +16,11 @@ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; +@@ -97,5 +97,5 @@ + fd_set fdset; + struct timeval tv; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + int flag=0; + +@@ -186,5 +186,5 @@ + int tret1,tret2; + int status = 0; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + long writebytes=SG_OFF+cmd_len+in_size; + +@@ -196,5 +196,5 @@ + memset(sg_hd,0,sizeof(sg_hd)); + memset(sense_buffer,0,SG_MAX_SENSE); +- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size); ++ memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size); + sg_hd->twelve_byte = cmd_len == 12; + sg_hd->result = 0; +@@ -210,5 +210,5 @@ + + if(bytecheck && out_size>in_size){ +- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); ++ memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); + /* the size does not remove cmd_len due to the way the kernel + driver copies buffers */ +@@ -244,5 +244,5 @@ + + sigprocmask (SIG_BLOCK, &(d->sigset), NULL ); +- tret1=clock_gettime(d->private->clock,&tv1); ++ tret1=clock_gettime(d->private_data->clock,&tv1); + errno=0; + status = write(d->cdda_fd, sg_hd, writebytes ); +@@ -290,5 +290,5 @@ + } + +- tret2=clock_gettime(d->private->clock,&tv2); ++ tret2=clock_gettime(d->private_data->clock,&tv2); + errno=0; + status = read(d->cdda_fd, sg_hd, SG_OFF + out_size); +@@ -314,5 +314,5 @@ + long i,flag=0; + for(i=in_size;iprivate->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; +@@ -327,7 +327,7 @@ + errno=0; + if(tret1<0 || tret2<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; + } + return(0); +@@ -348,5 +348,5 @@ + memset(&hdr,0,sizeof(hdr)); + memset(sense,0,sizeof(sense)); +- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size); ++ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size); + + hdr.cmdp = cmd; +@@ -356,5 +356,5 @@ + hdr.timeout = 50000; + hdr.interface_id = 'S'; +- hdr.dxferp = d->private->sg_buffer; ++ hdr.dxferp = d->private_data->sg_buffer; + hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */ + +@@ -401,5 +401,5 @@ + long i,flag=0; + for(i=in_size;iprivate->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; +@@ -413,5 +413,5 @@ + + /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */ +- /* d->private->last_milliseconds = hdr.duration; */ ++ /* d->private_data->last_milliseconds = hdr.duration; */ + + errno = 0; +@@ -446,7 +446,7 @@ + handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense); + +- key = d->private->sg_buffer[2] & 0xf; +- ASC = d->private->sg_buffer[12]; +- ASCQ = d->private->sg_buffer[13]; ++ key = d->private_data->sg_buffer[2] & 0xf; ++ ASC = d->private_data->sg_buffer[12]; ++ ASCQ = d->private_data->sg_buffer[13]; + + if(key == 2 && ASC == 4 && ASCQ == 1) return 0; +@@ -493,5 +493,5 @@ + + { +- unsigned char *b=d->private->sg_buffer; ++ unsigned char *b=d->private_data->sg_buffer; + if(b[0])return(1); /* Handles only up to 256 bytes */ + if(b[6])return(1); /* Handles only up to 256 bytes */ +@@ -605,6 +605,6 @@ + if(mode_sense(d,12,0x01))return(-1); + +- d->orgdens = d->private->sg_buffer[4]; +- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]); ++ d->orgdens = d->private_data->sg_buffer[4]; ++ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]); + } + +@@ -665,6 +665,6 @@ + } + +- first=d->private->sg_buffer[2]; +- last=d->private->sg_buffer[3]; ++ first=d->private_data->sg_buffer[2]; ++ last=d->private_data->sg_buffer[3]; + tracks=last-first+1; + +@@ -684,5 +684,5 @@ + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; +@@ -705,5 +705,5 @@ + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; +@@ -739,5 +739,5 @@ + + /* copy to our structure and convert start sector */ +- tracks = d->private->sg_buffer[1]; ++ tracks = d->private_data->sg_buffer[1]; + if (tracks > MAXTRK) { + cderror(d,"003: CDROM reporting illegal number of tracks\n"); +@@ -755,31 +755,31 @@ + } + +- d->disc_toc[i].bFlags = d->private->sg_buffer[10]; ++ d->disc_toc[i].bFlags = d->private_data->sg_buffer[10]; + d->disc_toc[i].bTrack = i + 1; + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- (((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5])); ++ (((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5])); + } + + d->disc_toc[i].bFlags = 0; + d->disc_toc[i].bTrack = i + 1; +- memcpy (&foo, d->private->sg_buffer+2, 4); +- memcpy (&bar, d->private->sg_buffer+6, 4); ++ memcpy (&foo, d->private_data->sg_buffer+2, 4); ++ memcpy (&bar, d->private_data->sg_buffer+6, 4); + d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) + + be32_to_cpu(bar)); + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- ((((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5]))+ ++ ((((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5]))+ + +- ((((signed char)(d->private->sg_buffer[6])<<24) | +- (d->private->sg_buffer[7]<<16)| +- (d->private->sg_buffer[8]<<8)| +- (d->private->sg_buffer[9])))); ++ ((((signed char)(d->private_data->sg_buffer[6])<<24) | ++ (d->private_data->sg_buffer[7]<<16)| ++ (d->private_data->sg_buffer[8]<<8)| ++ (d->private_data->sg_buffer[9])))); + + +@@ -818,5 +818,5 @@ + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -837,5 +837,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -855,5 +855,5 @@ + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -873,5 +873,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -891,5 +891,5 @@ + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -909,5 +909,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -923,5 +923,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -937,5 +937,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -951,5 +951,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -965,5 +965,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -979,5 +979,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -993,5 +993,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -1027,5 +1027,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -1040,5 +1040,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -1053,5 +1053,5 @@ + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } +@@ -1276,5 +1276,5 @@ + long i; + for(i=2351;i>=0;i--) +- if(d->private->sg_buffer[i]!=(unsigned char)'\177') ++ if(d->private_data->sg_buffer[i]!=(unsigned char)'\177') + return(((i+3)>>2)<<2); + +@@ -1285,5 +1285,5 @@ + long i,flag=0; + for(i=0;i<2352;i++) +- if(d->private->sg_buffer[i]!=0){ ++ if(d->private_data->sg_buffer[i]!=0){ + flag=1; + break; +@@ -1622,5 +1622,5 @@ + if(mode_sense(d,22,0x2A)==0){ + +- b=d->private->sg_buffer; ++ b=d->private_data->sg_buffer; + b+=b[3]+4; + +@@ -1670,5 +1670,5 @@ + return(NULL); + } +- return (d->private->sg_buffer); ++ return (d->private_data->sg_buffer); + } + +@@ -1726,6 +1726,6 @@ + + d->error_retry=1; +- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + d->report_all=1; + return(0); +Index: /trunk/cdparanoia/interface/cooked_interface.c +=================================================================== +--- /trunk/cdparanoia/interface/cooked_interface.c (revision 15202) ++++ /trunk/cdparanoia/interface/cooked_interface.c (revision 15338) +@@ -14,11 +14,11 @@ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; +Index: /trunk/cdparanoia/interface/scan_devices.c +=================================================================== +--- /trunk/cdparanoia/interface/scan_devices.c (revision 15202) ++++ /trunk/cdparanoia/interface/scan_devices.c (revision 15338) +@@ -265,9 +265,9 @@ + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); +@@ -675,13 +675,13 @@ + d->nsectors=-1; + d->messagedest = messagedest; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + if(use_sgio){ + d->interface=SGIO_SCSI; +- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); ++ d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); + g_fd=d->cdda_fd=dup(d->ioctl_fd); + }else{ +@@ -697,6 +697,6 @@ + + /* malloc our big buffer for scsi commands */ +- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + } + +@@ -773,7 +773,7 @@ + if(g_fd!=-1)close(g_fd); + if(d){ +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + free(d); +@@ -822,5 +822,5 @@ + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + d->drive_model=copystring("File based test interface"); + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model); diff --git a/SOURCES/cdparanoia-10.2-endian.patch b/SOURCES/cdparanoia-10.2-endian.patch new file mode 100644 index 0000000..eaed961 --- /dev/null +++ b/SOURCES/cdparanoia-10.2-endian.patch @@ -0,0 +1,12 @@ +diff -up cdparanoia-III-10.2/interface/interface.c.jx cdparanoia-III-10.2/interface/interface.c +--- cdparanoia-III-10.2/interface/interface.c.jx 2009-02-10 14:25:02.000000000 -0500 ++++ cdparanoia-III-10.2/interface/interface.c 2009-02-10 14:25:49.000000000 -0500 +@@ -115,7 +115,7 @@ long cdda_read_timed(cdrom_drive *d, voi + + if(sectors>0){ + /* byteswap? */ +- if(d->bigendianp==-1) /* not determined yet */ ++ if(buffer && d->bigendianp==-1) /* not determined yet */ + d->bigendianp=data_bigendianp(d); + + if(d->bigendianp!=bigendianp()){ diff --git a/SOURCES/cdparanoia-10.2-install.patch b/SOURCES/cdparanoia-10.2-install.patch new file mode 100644 index 0000000..bd43d5e --- /dev/null +++ b/SOURCES/cdparanoia-10.2-install.patch @@ -0,0 +1,50 @@ +diff -Naupr cdparanoia-III-10.2.orig/Makefile.in cdparanoia-III-10.2/Makefile.in +--- cdparanoia-III-10.2.orig/Makefile.in 2008-09-11 22:33:30.000000000 +0200 ++++ cdparanoia-III-10.2/Makefile.in 2008-12-22 22:31:45.578372040 +0100 +@@ -63,28 +63,28 @@ slib: + cd paranoia && $(MAKE) slib + + install: +- $(INSTALL) -d -m 0755 $(BINDIR) +- $(INSTALL) -m 755 $(srcdir)/cdparanoia $(BINDIR) +- $(INSTALL) -d -m 0755 $(MANDIR) +- $(INSTALL) -d -m 0755 $(MANDIR)/man1 +- $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1 +- $(INSTALL) -d -m 0755 $(INCLUDEDIR) +- $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR) +- $(INSTALL) -d -m 0755 $(LIBDIR) +- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR) +- $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR) +- $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR) +- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR) +- $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR) +- $(INSTALL) -m 0644 $(srcdir)/utils.h $(INCLUDEDIR) ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR) ++ $(INSTALL) -m 755 $(srcdir)/cdparanoia $(DESTDIR)$(BINDIR) ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR) ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)/man1 ++ $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1 ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0755 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL) -m 0755 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR) ++ $(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR) + ln -fs libcdda_interface.so.0.$(VERSION) \ +- $(LIBDIR)/libcdda_interface.so.0 ++ $(DESTDIR)$(LIBDIR)/libcdda_interface.so.0 + ln -fs libcdda_interface.so.0.$(VERSION) \ +- $(LIBDIR)/libcdda_interface.so ++ $(DESTDIR)$(LIBDIR)/libcdda_interface.so + ln -fs libcdda_paranoia.so.0.$(VERSION) \ +- $(LIBDIR)/libcdda_paranoia.so.0 ++ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so.0 + ln -fs libcdda_paranoia.so.0.$(VERSION) \ +- $(LIBDIR)/libcdda_paranoia.so ++ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so + + cdparanoia: $(OFILES) $(LIBDEP) + $(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \ diff --git a/SPECS/cdparanoia.spec b/SPECS/cdparanoia.spec new file mode 100644 index 0000000..5fa6bd5 --- /dev/null +++ b/SPECS/cdparanoia.spec @@ -0,0 +1,333 @@ +Summary: Compact Disc Digital Audio (CDDA) extraction tool (or ripper) +Name: cdparanoia +Version: 10.2 +Release: 13%{?dist} +# the app is GPLv2, everything else is LGPLv2 +License: GPLv2 and LGPLv2 +Group: Applications/Multimedia +URL: http://www.xiph.org/paranoia/index.html +Source: http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-%{version}.src.tgz +# Patch from upstream to fix cdda_interface.h C++ incompatibility ("private") +# https://trac.xiph.org/changeset/15338 +# https://bugzilla.redhat.com/show_bug.cgi?id=463009 +Patch0: cdparanoia-10.2-#463009.patch +# #466659 +Patch1: cdparanoia-10.2-endian.patch +Patch2: cdparanoia-10.2-install.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Requires: cdparanoia-libs = %{version}-%{release} +Obsoletes: cdparanoia-III <= alpha9.8 + +%description +Cdparanoia (Paranoia III) reads digital audio directly from a CD, then +writes the data to a file or pipe in WAV, AIFC or raw 16 bit linear +PCM format. Cdparanoia doesn't contain any extra features (like the ones +included in the cdda2wav sampling utility). Instead, cdparanoia's strength +lies in its ability to handle a variety of hardware, including inexpensive +drives prone to misalignment, frame jitter and loss of streaming during +atomic reads. Cdparanoia is also good at reading and repairing data from +damaged CDs. + +%package static +Summary: Development tools for libcdda_paranoia (Paranoia III) +Group: Development/Libraries +Requires: cdparanoia-devel = %{version}-%{release} +License: LGPLv2 + +%description static +The cdparanoia-devel package contains the static libraries needed for +developing applications to read CD Digital Audio disks. + +%package libs +Summary: Libraries for libcdda_paranoia (Paranoia III) +Group: Applications/Multimedia +License: LGPLv2 + +%description libs +The cdparanoia-libs package contains the dynamic libraries needed for +applications which read CD Digital Audio disks. + +%package devel +Summary: Development tools for libcdda_paranoia (Paranoia III) +Group: Development/Libraries +Requires: cdparanoia-libs = %{version}-%{release} +License: LGPLv2 + +%description devel +The cdparanoia-devel package contains the libraries and header files needed +for developing applications to read CD Digital Audio disks. + +%prep +%setup -q -n cdparanoia-III-%{version} +%patch0 -p3 -b .#463009 +%patch1 -p1 -b .endian +%patch2 -p1 -b .install + +%build +%configure --includedir=%{_includedir}/cdda +# Using -O0 is mandatory, the build fails otherwise... +# Also remove many warnings which we are aware of +# Lastly, don't use _smp_mflags since it also makes the build fail +make OPT="$RPM_OPT_FLAGS -O0 -Wno-pointer-sign -Wno-unused" + + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc COPYING* README +%{_bindir}/cdparanoia +%{_mandir}/man1/cdparanoia.1* + +%files libs +%defattr(-,root,root) +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root) +%{_includedir}/cdda/ +%{_libdir}/*.so + +%files static +%defattr(-,root,root) +%{_libdir}/*.a + +%changelog +* Wed Feb 13 2013 Fedora Release Engineering - 10.2-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 10.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 10.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 10.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 05 2010 Adam Jackson 10.2-9 +- Fix packaging typo from -7 + +* Wed Feb 03 2010 Peter Jones - 10.2-8 +- Incorporate changes from Matthias Saou: +- Include install patch, to avoid all of the ugly manual installation. +- Cosmetic fixes (libs group, scriplets, don't mix %%name with hardcode...). + +* Tue Feb 02 2010 Adam Jackson 10.2-7 +- Move static libs to -static subpackage, make it require -devel + +* Tue Dec 8 2009 Matthias Saou 10.2-6 +- Fix all of the problems detected during the review which aren't acceptable + according to the current policies and guidelines (part of #225638). +- Don't prefix summaries with "A" nor suffix them with a dot. +- Move .so symlink to the devel sub-package (#203620). +- Add highest known version to the cdparanoia-III obsoletes. +- Remove incorrect buildroot removal from %%build. +- Use acceptable %%clean section. +- Provide cdparanoia-static in the devel sub-package since the *.a is there. +- Use single-command scriplet syntax for /sbin/ldconfig calls. +- Escape all macros in changelog. +- Include license file since it is present with the sources. + +* Fri Jul 24 2009 Fedora Release Engineering - 10.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 10.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Feb 10 2009 Adam Jackson +- Merge review cleanups (not finished, #225638) + +* Tue Feb 10 2009 Adam Jackson 10.2-3 +- cdparanoia-10.2-endian.patch: Backport a crash fix for host/drive + endianness mismatch. (#466659) + +* Tue Sep 30 2008 Kevin Kofler 10.2-2 +- fix cdda_interface.h C++ incompatibility (patch from upstream) (#463009) + +* Thu Sep 11 2008 Adam Jackson 10.2-1 +- cdparanoia 10.2 + +* Wed Aug 13 2008 Adam Jackson 10.1-1 +- Update to 10.1, just changes the license back. + +* Tue Jul 15 2008 Tom "spot" Callaway 10.0-3 +- fix license tag +- fix headers, setspeed patch to apply with fuzz=0 + +* Thu Jun 19 2008 Adam Jackson 10.0-2 +- cdparanoia 10. + +* Thu Mar 20 2008 Adam Jackson alpha9.8-30 +- Add -Werror-implicit-function-declarations. +- cdparanoia-III-alpha9.8-headers.patch: Fix the resulting errors. + +* Tue Mar 04 2008 Adam Jackson alpha9.8-29 +- cdparanoia-III-alpha9.8.scsi-setspeed.patch: Allow setting the speed of + SCSI CD drives. (#431178) + +* Tue Feb 19 2008 Fedora Release Engineering - alpha9.8-28.2 +- Autorebuild for GCC 4.3 + +* Wed Jul 12 2006 Jesse Keating - alpha9.8-27.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - alpha9.8-27.1 +- bump again for double-long bug on ppc(64) + +* Wed Feb 08 2006 Monty Montgomery - alpha9.8-27 +- rebuilt + +* Tue Feb 07 2006 Jesse Keating - alpha9.8-26.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Sat Oct 15 2005 Florian La Roche +- make sure shared libs are linked against respective other libs + +* Wed Mar 16 2005 Peter Jones alpha9.8-25 +- gcc4 rebuild and CFLAGS change + +* Wed Feb 9 2005 Peter Jones alpha9.8-24.2 +- Rebuild for new toolchain + +* Wed Oct 6 2004 Peter Jones alpha9.8-24 +- workaround for sgio read size issues in newer kernels. + +* Fri Oct 1 2004 Peter Jones alpha9.8-23 +- "This time, with a meaningful changelog" release. Just like -22. +- new SG_IO code in rawhide. This means ripping will no longer use the + "cooked ioctl" mode that it has since we moved to 2.6, instead utilizing + the real scsi-based command set to talk to most drives. This should + result in better error correction handling, and usage of much more + commonly used kernel features. +- environment variable "CDDA_TRANSPORT" added. If you set this to "cooked", + cdparanoia will try to use the "cooked ioctl" mode instead of SCSI/SG_IO + based modes first, and then fall back to SG_IO. +- It'd be good if this got some testing. A prior version of the SG_IO code + was known to fail on some USB drives. This version should mitigate that + quite a bit, but I lack the hardware to test it for sure. + +* Wed Jul 7 2004 Peter Jones alpha9.8-21sgio1 +- a new set of sgio patches + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Tue Feb 17 2004 Peter Jones alpha9.8-20 +- take ownership of %%{_includedir}/cdda + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue May 20 2003 Peter Jones alpha9.8-17 +- typo fix (g_fd -> fd) +- add errno output + +* Tue May 06 2003 Peter Jones alpha9.8-16 +- fix warnings on switches +- use O_EXCL + +* Tue Feb 04 2003 Florian La Roche +- add symlinks to shared libs + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 25 2002 Tim Powers alpha9.8-13 +- fix %%install references in the changelog so that it will rebuild properly + +* Wed Dec 11 2002 Tim Powers alpha9.8-12 +- rebuild on all arches + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Wed Apr 3 2002 Peter Jones alpha9.8-8 +- don't strip, let rpm do that + +* Mon Feb 25 2002 Tim Powers alpha9.8-7 +- fix broken Obsoletes of cdparanoia-devel + +* Thu Dec 6 2001 Peter Jones alpha9.8-6 +- move includes to %%{_includedir}/cdda/ +- add utils.h to %%install +- clean up %%install some. + +* Sun Nov 4 2001 Peter Jones alpha9.8-5 +- make a -libs package which contains the .so files +- make the cdparanoia dependancy towards that, not -devel + +* Thu Aug 2 2001 Peter Jones +- bump the release not to conflict with on in the RH build tree :/ +- reverse devel dependency + +* Wed Aug 1 2001 Peter Jones +- fix %%post and %%postun to only run ldconfig for devel packages + +* Wed Jul 18 2001 Crutcher Dunnavant +- devel now depends on package + +* Wed Mar 28 2001 Peter Jones +- 9.8 release. + +* Tue Feb 27 2001 Karsten Hopp +- fix spelling error in description + +* Thu Dec 7 2000 Crutcher Dunnavant +- rebuild for new tree + +* Fri Jul 21 2000 Trond Eivind Glomsrød +- use %%{_tmppath} + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Wed Jun 06 2000 Preston Brown +- revert name change +- use new rpm macro paths + +* Wed Apr 19 2000 Trond Eivind Glomsrød +- Switched spec file from the one used in Red Hat Linux 6.2, which + also changes the name +- gzip man page + +* Thu Dec 23 1999 Peter Jones +- update package to provide cdparanoia-alpha9.7-2.*.rpm and + cdparanoia-devel-alpha9.7-2.*.rpm. Also, URLs point at xiph.org + like they should. + +* Wed Dec 22 1999 Peter Jones +- updated package for alpha9.7, based on input from: + Monty + David Philippi + +* Mon Apr 12 1999 Michael Maher +- updated pacakge + +* Tue Oct 06 1998 Michael Maher +- updated package + +* Mon Jun 29 1998 Michael Maher +- built package