avatar
Rosa has added 79f96a1e59
initial: add from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,2 @@
1
sources:
2
  "cdparanoia-III-10.2.src.tgz": 1901e20d3a370ca6afa4c76a9ef30d3f03044320
view file @ 79f96a1e59
... ... --- /dev/null
... ... +++ b/cdparanoia-III-10.2-format-security.patch
... ... @@ -0,0 +1,15 @@
1
--- cdparanoia-III-10.2/main.c.orig	2009-02-15 12:56:13.000000000 +0000
2
+++ cdparanoia-III-10.2/main.c	2009-02-15 12:56:47.000000000 +0000
3
@@ -588,10 +588,10 @@
4
 	    buffer[aheadposition+19]='>';
5
 	}
6
    
7
-	fprintf(stderr,buffer);
8
+	fprintf(stderr,"%s",buffer);
9
        
10
 	if (logfile != NULL && function==-1) {
11
-	  fprintf(logfile,buffer+1);
12
+	  fprintf(logfile,"%s",buffer+1);
13
 	  fprintf(logfile,"\n\n");
14
 	  fflush(logfile);
15
 	}
view file @ 79f96a1e59
... ... --- /dev/null
... ... +++ b/cdparanoia-III-10.2-gcc43.patch
... ... @@ -0,0 +1,576 @@
1
diff -urp cdparanoia-III-10.2.orig/interface/cdda_interface.h cdparanoia-III-10.2/interface/cdda_interface.h
2
--- cdparanoia-III-10.2.orig/interface/cdda_interface.h	2008-09-11 11:43:52.000000000 +0100
3
+++ cdparanoia-III-10.2/interface/cdda_interface.h	2008-09-25 00:18:02.000000000 +0100
4
@@ -84,7 +84,7 @@ typedef struct cdrom_drive{
5
   int is_atapi;
6
   int is_mmc;
7
 
8
-  cdda_private_data_t *private;
9
+  cdda_private_data_t *private_data;
10
   void         *reserved;
11
   unsigned char inqbytes[4];
12
 
13
diff -urp cdparanoia-III-10.2.orig/interface/cooked_interface.c cdparanoia-III-10.2/interface/cooked_interface.c
14
--- cdparanoia-III-10.2.orig/interface/cooked_interface.c	2008-08-26 10:55:22.000000000 +0100
15
+++ cdparanoia-III-10.2/interface/cooked_interface.c	2008-09-25 00:19:21.000000000 +0100
16
@@ -13,13 +13,13 @@
17
 static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
18
   struct timespec tv1;
19
   struct timespec tv2;
20
-  int ret1=clock_gettime(d->private->clock,&tv1);
21
+  int ret1=clock_gettime(d->private_data->clock,&tv1);
22
   int ret2=ioctl(fd, command,arg);
23
-  int ret3=clock_gettime(d->private->clock,&tv2);
24
+  int ret3=clock_gettime(d->private_data->clock,&tv2);
25
   if(ret1<0 || ret3<0){
26
-    d->private->last_milliseconds=-1;
27
+    d->private_data->last_milliseconds=-1;
28
   }else{
29
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
30
+    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
31
   }
32
   return ret2;
33
 }
34
diff -urp cdparanoia-III-10.2.orig/interface/interface.c cdparanoia-III-10.2/interface/interface.c
35
--- cdparanoia-III-10.2.orig/interface/interface.c	2008-09-11 11:43:52.000000000 +0100
36
+++ cdparanoia-III-10.2/interface/interface.c	2008-09-25 00:19:47.000000000 +0100
37
@@ -39,9 +39,9 @@ int cdda_close(cdrom_drive *d){
38
     if(d->drive_model)free(d->drive_model);
39
     if(d->cdda_fd!=-1)close(d->cdda_fd);
40
     if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
41
-    if(d->private){
42
-      if(d->private->sg_hd)free(d->private->sg_hd);
43
-      free(d->private);
44
+    if(d->private_data){
45
+      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
46
+      free(d->private_data);
47
     }
48
 
49
     free(d);
50
@@ -127,7 +127,7 @@ long cdda_read_timed(cdrom_drive *d, voi
51
 	}
52
       }	
53
     }
54
-    if(ms)*ms=d->private->last_milliseconds;
55
+    if(ms)*ms=d->private_data->last_milliseconds;
56
     return(sectors);
57
   }
58
   
59
diff -urp cdparanoia-III-10.2.orig/interface/scan_devices.c cdparanoia-III-10.2/interface/scan_devices.c
60
--- cdparanoia-III-10.2.orig/interface/scan_devices.c	2008-08-26 10:55:22.000000000 +0100
61
+++ cdparanoia-III-10.2/interface/scan_devices.c	2008-09-25 00:20:35.000000000 +0100
62
@@ -264,11 +264,11 @@ cdrom_drive *cdda_identify_cooked(const 
63
   d->interface=COOKED_IOCTL;
64
   d->bigendianp=-1; /* We don't know yet... */
65
   d->nsectors=-1;
66
-  d->private=calloc(1,sizeof(*d->private));
67
+  d->private_data=calloc(1,sizeof(*d->private_data));
68
   {
69
     /* goddamnit */
70
     struct timespec tv;
71
-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
72
+    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
73
   }
74
   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
75
   return(d);
76
@@ -674,15 +674,15 @@ cdrom_drive *cdda_identify_scsi(const ch
77
   d->bigendianp=-1; /* We don't know yet... */
78
   d->nsectors=-1;
79
   d->messagedest = messagedest;
80
-  d->private=calloc(1,sizeof(*d->private));
81
+  d->private_data=calloc(1,sizeof(*d->private_data));
82
   {
83
     /* goddamnit */
84
     struct timespec tv;
85
-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
86
+    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
87
   }
88
   if(use_sgio){
89
     d->interface=SGIO_SCSI;
90
-    d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
91
+    d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
92
     g_fd=d->cdda_fd=dup(d->ioctl_fd);
93
   }else{
94
     version=verify_SG_version(d,messagedest,messages);
95
@@ -696,8 +696,8 @@ cdrom_drive *cdda_identify_scsi(const ch
96
     }
97
 
98
     /* malloc our big buffer for scsi commands */
99
-    d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
100
-    d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
101
+    d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
102
+    d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
103
   }
104
 
105
   {
106
@@ -772,9 +772,9 @@ cdda_identify_scsi_fail:
107
   if(i_fd!=-1)close(i_fd);
108
   if(g_fd!=-1)close(g_fd);
109
   if(d){
110
-    if(d->private){
111
-      if(d->private->sg_hd)free(d->private->sg_hd);
112
-      free(d->private);
113
+    if(d->private_data){
114
+      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
115
+      free(d->private_data);
116
     }
117
     free(d);
118
   }
119
@@ -821,7 +821,7 @@ cdrom_drive *cdda_identify_test(const ch
120
   d->interface=TEST_INTERFACE;
121
   d->bigendianp=-1; /* We don't know yet... */
122
   d->nsectors=-1;
123
-  d->private=calloc(1,sizeof(*d->private));
124
+  d->private_data=calloc(1,sizeof(*d->private_data));
125
   d->drive_model=copystring("File based test interface");
126
   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
127
   
128
diff -urp cdparanoia-III-10.2.orig/interface/scsi_interface.c cdparanoia-III-10.2/interface/scsi_interface.c
129
--- cdparanoia-III-10.2.orig/interface/scsi_interface.c	2008-09-11 21:33:30.000000000 +0100
130
+++ cdparanoia-III-10.2/interface/scsi_interface.c	2008-09-25 00:22:40.000000000 +0100
131
@@ -15,13 +15,13 @@
132
 static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
133
   struct timespec tv1;
134
   struct timespec tv2;
135
-  int ret1=clock_gettime(d->private->clock,&tv1);
136
+  int ret1=clock_gettime(d->private_data->clock,&tv1);
137
   int ret2=ioctl(fd, command,arg);
138
-  int ret3=clock_gettime(d->private->clock,&tv2);
139
+  int ret3=clock_gettime(d->private_data->clock,&tv2);
140
   if(ret1<0 || ret3<0){
141
-    d->private->last_milliseconds=-1;
142
+    d->private_data->last_milliseconds=-1;
143
   }else{
144
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
145
+    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
146
   }
147
   return ret2;
148
 }
149
@@ -96,7 +96,7 @@ static void tweak_SG_buffer(cdrom_drive 
150
 static void clear_garbage(cdrom_drive *d){
151
   fd_set fdset;
152
   struct timeval tv;
153
-  struct sg_header *sg_hd=d->private->sg_hd;
154
+  struct sg_header *sg_hd=d->private_data->sg_hd;
155
   int flag=0;
156
 
157
   /* clear out any possibly preexisting garbage */
158
@@ -185,7 +185,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
159
   struct timespec tv2;
160
   int tret1,tret2;
161
   int status = 0;
162
-  struct sg_header *sg_hd=d->private->sg_hd;
163
+  struct sg_header *sg_hd=d->private_data->sg_hd;
164
   long writebytes=SG_OFF+cmd_len+in_size;
165
 
166
   /* generic scsi device services */
167
@@ -195,7 +195,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
168
 
169
   memset(sg_hd,0,sizeof(sg_hd)); 
170
   memset(sense_buffer,0,SG_MAX_SENSE); 
171
-  memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
172
+  memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size);
173
   sg_hd->twelve_byte = cmd_len == 12;
174
   sg_hd->result = 0;
175
   sg_hd->reply_len = SG_OFF + out_size;
176
@@ -209,7 +209,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
177
      tell if the command failed.  Scared yet? */
178
 
179
   if(bytecheck && out_size>in_size){
180
-    memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
181
+    memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
182
     /* the size does not remove cmd_len due to the way the kernel
183
        driver copies buffers */
184
     writebytes+=(out_size-in_size);
185
@@ -243,7 +243,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
186
   }
187
 
188
   sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
189
-  tret1=clock_gettime(d->private->clock,&tv1);  
190
+  tret1=clock_gettime(d->private_data->clock,&tv1);  
191
   errno=0;
192
   status = write(d->cdda_fd, sg_hd, writebytes );
193
 
194
@@ -289,7 +289,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
195
     }
196
   }
197
 
198
-  tret2=clock_gettime(d->private->clock,&tv2);  
199
+  tret2=clock_gettime(d->private_data->clock,&tv2);  
200
   errno=0;
201
   status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
202
   sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
203
@@ -313,7 +313,7 @@ static int sg2_handle_scsi_cmd(cdrom_dri
204
   if(bytecheck && in_size+cmd_len<out_size){
205
     long i,flag=0;
206
     for(i=in_size;i<out_size;i++)
207
-      if(d->private->sg_buffer[i]!=bytefill){
208
+      if(d->private_data->sg_buffer[i]!=bytefill){
209
 	flag=1;
210
 	break;
211
       }
212
@@ -326,9 +326,9 @@ static int sg2_handle_scsi_cmd(cdrom_dri
213
 
214
   errno=0;
215
   if(tret1<0 || tret2<0){
216
-    d->private->last_milliseconds=-1;
217
+    d->private_data->last_milliseconds=-1;
218
   }else{
219
-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
220
+    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
221
   }
222
   return(0);
223
 }
224
@@ -347,7 +347,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr
225
 
226
   memset(&hdr,0,sizeof(hdr));
227
   memset(sense,0,sizeof(sense));
228
-  memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
229
+  memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
230
 
231
   hdr.cmdp = cmd;
232
   hdr.cmd_len = cmd_len;
233
@@ -355,7 +355,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr
234
   hdr.mx_sb_len = SG_MAX_SENSE;
235
   hdr.timeout = 50000;
236
   hdr.interface_id = 'S';
237
-  hdr.dxferp =  d->private->sg_buffer;
238
+  hdr.dxferp =  d->private_data->sg_buffer;
239
   hdr.flags = SG_FLAG_DIRECT_IO;  /* direct IO if we can get it */
240
 
241
   /* scary buffer fill hack */
242
@@ -400,7 +400,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr
243
   if(bytecheck && in_size<out_size){
244
     long i,flag=0;
245
     for(i=in_size;i<out_size;i++)
246
-      if(d->private->sg_buffer[i]!=bytefill){
247
+      if(d->private_data->sg_buffer[i]!=bytefill){
248
 	flag=1;
249
 	break;
250
       }
251
@@ -412,7 +412,7 @@ static int sgio_handle_scsi_cmd(cdrom_dr
252
   }
253
 
254
   /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
255
-  /* d->private->last_milliseconds = hdr.duration; */
256
+  /* d->private_data->last_milliseconds = hdr.duration; */
257
 
258
   errno = 0;
259
   return 0;
260
@@ -445,9 +445,9 @@ static int test_unit_ready(cdrom_drive *
261
 
262
   handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
263
 
264
-  key = d->private->sg_buffer[2] & 0xf;
265
-  ASC = d->private->sg_buffer[12];
266
-  ASCQ = d->private->sg_buffer[13];
267
+  key = d->private_data->sg_buffer[2] & 0xf;
268
+  ASC = d->private_data->sg_buffer[12];
269
+  ASCQ = d->private_data->sg_buffer[13];
270
   
271
   if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
272
   return 1;
273
@@ -492,7 +492,7 @@ static int mode_sense_atapi(cdrom_drive 
274
   if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
275
 
276
   {
277
-    unsigned char *b=d->private->sg_buffer;
278
+    unsigned char *b=d->private_data->sg_buffer;
279
     if(b[0])return(1); /* Handles only up to 256 bytes */
280
     if(b[6])return(1); /* Handles only up to 256 bytes */
281
 
282
@@ -604,8 +604,8 @@ static int mode_select(cdrom_drive *d,in
283
 static unsigned int get_orig_sectorsize(cdrom_drive *d){
284
   if(mode_sense(d,12,0x01))return(-1);
285
 
286
-  d->orgdens = d->private->sg_buffer[4];
287
-  return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
288
+  d->orgdens = d->private_data->sg_buffer[4];
289
+  return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
290
 }
291
 
292
 /* switch CDROM scsi drives to given sector size  */
293
@@ -664,8 +664,8 @@ static int scsi_read_toc (cdrom_drive *d
294
     return(-4);
295
   }
296
 
297
-  first=d->private->sg_buffer[2];
298
-  last=d->private->sg_buffer[3];
299
+  first=d->private_data->sg_buffer[2];
300
+  last=d->private_data->sg_buffer[3];
301
   tracks=last-first+1;
302
 
303
   if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
304
@@ -683,7 +683,7 @@ static int scsi_read_toc (cdrom_drive *d
305
       return(-5);
306
     }
307
     {
308
-      scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
309
+      scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
310
 
311
       d->disc_toc[i-first].bFlags=toc->bFlags;
312
       d->disc_toc[i-first].bTrack=i;
313
@@ -704,7 +704,7 @@ static int scsi_read_toc (cdrom_drive *d
314
     return(-2);
315
   }
316
   {
317
-    scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
318
+    scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
319
     
320
     d->disc_toc[i-first].bFlags=toc->bFlags;
321
     d->disc_toc[i-first].bTrack=0xAA;
322
@@ -738,7 +738,7 @@ static int scsi_read_toc2 (cdrom_drive *
323
   }
324
 
325
   /* copy to our structure and convert start sector */
326
-  tracks = d->private->sg_buffer[1];
327
+  tracks = d->private_data->sg_buffer[1];
328
   if (tracks > MAXTRK) {
329
     cderror(d,"003: CDROM reporting illegal number of tracks\n");
330
     return(-3);
331
@@ -754,33 +754,33 @@ static int scsi_read_toc2 (cdrom_drive *
332
       return(-5);
333
     }
334
     
335
-    d->disc_toc[i].bFlags = d->private->sg_buffer[10];
336
+    d->disc_toc[i].bFlags = d->private_data->sg_buffer[10];
337
     d->disc_toc[i].bTrack = i + 1;
338
 
339
     d->disc_toc[i].dwStartSector= d->adjust_ssize * 
340
-	(((signed char)(d->private->sg_buffer[2])<<24) | 
341
-	 (d->private->sg_buffer[3]<<16)|
342
-	 (d->private->sg_buffer[4]<<8)|
343
-	 (d->private->sg_buffer[5]));
344
+	(((signed char)(d->private_data->sg_buffer[2])<<24) | 
345
+	 (d->private_data->sg_buffer[3]<<16)|
346
+	 (d->private_data->sg_buffer[4]<<8)|
347
+	 (d->private_data->sg_buffer[5]));
348
   }
349
 
350
   d->disc_toc[i].bFlags = 0;
351
   d->disc_toc[i].bTrack = i + 1;
352
-  memcpy (&foo, d->private->sg_buffer+2, 4);
353
-  memcpy (&bar, d->private->sg_buffer+6, 4);
354
+  memcpy (&foo, d->private_data->sg_buffer+2, 4);
355
+  memcpy (&bar, d->private_data->sg_buffer+6, 4);
356
   d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
357
 						    be32_to_cpu(bar));
358
 
359
   d->disc_toc[i].dwStartSector= d->adjust_ssize * 
360
-    ((((signed char)(d->private->sg_buffer[2])<<24) | 
361
-      (d->private->sg_buffer[3]<<16)|
362
-      (d->private->sg_buffer[4]<<8)|
363
-      (d->private->sg_buffer[5]))+
364
+    ((((signed char)(d->private_data->sg_buffer[2])<<24) | 
365
+      (d->private_data->sg_buffer[3]<<16)|
366
+      (d->private_data->sg_buffer[4]<<8)|
367
+      (d->private_data->sg_buffer[5]))+
368
      
369
-     ((((signed char)(d->private->sg_buffer[6])<<24) | 
370
-       (d->private->sg_buffer[7]<<16)|
371
-       (d->private->sg_buffer[8]<<8)|
372
-       (d->private->sg_buffer[9]))));
373
+     ((((signed char)(d->private_data->sg_buffer[6])<<24) | 
374
+       (d->private_data->sg_buffer[7]<<16)|
375
+       (d->private_data->sg_buffer[8]<<8)|
376
+       (d->private_data->sg_buffer[9]))));
377
 
378
 
379
   d->cd_extra = FixupTOC(d,tracks+1);
380
@@ -817,7 +817,7 @@ static int i_read_28 (cdrom_drive *d, vo
381
   cmd[8] = sectors;
382
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
383
     return(ret);
384
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
385
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
386
   return(0);
387
 }
388
 
389
@@ -836,7 +836,7 @@ static int i_read_A8 (cdrom_drive *d, vo
390
   cmd[9] = sectors;
391
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
392
     return(ret);
393
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
394
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
395
   return(0);
396
 }
397
 
398
@@ -854,7 +854,7 @@ static int i_read_D4_10 (cdrom_drive *d,
399
   cmd[8] = sectors;
400
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
401
     return(ret);
402
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
403
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
404
   return(0);
405
 }
406
 
407
@@ -872,7 +872,7 @@ static int i_read_D4_12 (cdrom_drive *d,
408
   cmd[9] = sectors;
409
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
410
     return(ret);
411
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
412
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
413
   return(0);
414
 }
415
 
416
@@ -890,7 +890,7 @@ static int i_read_D5 (cdrom_drive *d, vo
417
   cmd[8] = sectors;
418
   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
419
     return(ret);
420
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
421
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
422
   return(0);
423
 }
424
 
425
@@ -908,7 +908,7 @@ static int i_read_D8 (cdrom_drive *d, vo
426
   cmd[9] = sectors;
427
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
428
     return(ret);
429
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
430
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
431
   return(0);
432
 }
433
 
434
@@ -922,7 +922,7 @@ static int i_read_mmc (cdrom_drive *d, v
435
   cmd[8] = sectors;
436
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
437
     return(ret);
438
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
439
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
440
   return(0);
441
 }
442
 
443
@@ -936,7 +936,7 @@ static int i_read_mmcB (cdrom_drive *d, 
444
   cmd[8] = sectors;
445
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
446
     return(ret);
447
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
448
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
449
   return(0);
450
 }
451
 
452
@@ -950,7 +950,7 @@ static int i_read_mmc2 (cdrom_drive *d, 
453
   cmd[8] = sectors;
454
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
455
     return(ret);
456
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
457
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
458
   return(0);
459
 }
460
 
461
@@ -964,7 +964,7 @@ static int i_read_mmc2B (cdrom_drive *d,
462
   cmd[8] = sectors;
463
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
464
     return(ret);
465
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
466
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
467
   return(0);
468
 }
469
 
470
@@ -978,7 +978,7 @@ static int i_read_mmc3 (cdrom_drive *d, 
471
   cmd[8] = sectors;
472
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
473
     return(ret);
474
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
475
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
476
   return(0);
477
 }
478
 
479
@@ -992,7 +992,7 @@ static int i_read_mmc3B (cdrom_drive *d,
480
   cmd[8] = sectors;
481
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
482
     return(ret);
483
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
484
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
485
   return(0);
486
 }
487
 
488
@@ -1026,7 +1026,7 @@ static int i_read_msf (cdrom_drive *d, v
489
 
490
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
491
     return(ret);
492
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
493
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
494
   return(0);
495
 }
496
 
497
@@ -1039,7 +1039,7 @@ static int i_read_msf2 (cdrom_drive *d, 
498
 
499
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
500
     return(ret);
501
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
502
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
503
   return(0);
504
 }
505
 
506
@@ -1052,7 +1052,7 @@ static int i_read_msf3 (cdrom_drive *d, 
507
   
508
   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
509
     return(ret);
510
-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
511
+  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
512
   return(0);
513
 }
514
 
515
@@ -1275,7 +1275,7 @@ long scsi_read_msf3 (cdrom_drive *d, voi
516
 static int count_2352_bytes(cdrom_drive *d){
517
   long i;
518
   for(i=2351;i>=0;i--)
519
-    if(d->private->sg_buffer[i]!=(unsigned char)'\177')
520
+    if(d->private_data->sg_buffer[i]!=(unsigned char)'\177')
521
       return(((i+3)>>2)<<2);
522
 
523
   return(0);
524
@@ -1284,7 +1284,7 @@ static int count_2352_bytes(cdrom_drive 
525
 static int verify_nonzero(cdrom_drive *d){
526
   long i,flag=0;
527
   for(i=0;i<2352;i++)
528
-    if(d->private->sg_buffer[i]!=0){
529
+    if(d->private_data->sg_buffer[i]!=0){
530
       flag=1;
531
       break;
532
     }
533
@@ -1625,7 +1625,7 @@ static int check_mmc(cdrom_drive *d){
534
   d->is_mmc=0;
535
   if(mode_sense(d,22,0x2A)==0){
536
   
537
-    b=d->private->sg_buffer;
538
+    b=d->private_data->sg_buffer;
539
     b+=b[3]+4;
540
     
541
     if((b[0]&0x3F)==0x2A){
542
@@ -1673,7 +1673,7 @@ unsigned char *scsi_inquiry(cdrom_drive 
543
     cderror(d,"008: Unable to identify CDROM model\n");
544
     return(NULL);
545
   }
546
-  return (d->private->sg_buffer);
547
+  return (d->private_data->sg_buffer);
548
 }
549
 
550
 int scsi_init_drive(cdrom_drive *d){
551
@@ -1742,8 +1742,8 @@ int scsi_init_drive(cdrom_drive *d){
552
   check_cache(d);
553
 
554
   d->error_retry=1;
555
-  d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
556
-  d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
557
+  d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
558
+  d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
559
   d->report_all=1;
560
   return(0);
561
 }
562
diff -urp cdparanoia-III-10.2.orig/interface/test_interface.c cdparanoia-III-10.2/interface/test_interface.c
563
--- cdparanoia-III-10.2.orig/interface/test_interface.c	2008-09-11 21:33:30.000000000 +0100
564
+++ cdparanoia-III-10.2/interface/test_interface.c	2008-09-25 00:22:46.000000000 +0100
565
@@ -66,9 +66,9 @@ static long test_read(cdrom_drive *d, vo
566
   if(!fd)fd=fdopen(d->cdda_fd,"r");
567
 
568
   if(begin<lastread)
569
-    d->private->last_milliseconds=20;
570
+    d->private_data->last_milliseconds=20;
571
   else
572
-    d->private->last_milliseconds=sectors;
573
+    d->private_data->last_milliseconds=sectors;
574
 
575
 #ifdef CDDA_TEST_UNDERRUN
576
   sectors-=1;
view file @ 79f96a1e59
... ... --- /dev/null
... ... +++ b/cdparanoia-III-alpha9.8-includes.patch
... ... @@ -0,0 +1,20 @@
1
--- cdparanoia-III-10.2/paranoia/gap.c.includes	2009-02-15 12:48:55.000000000 +0000
2
+++ cdparanoia-III-10.2/paranoia/gap.c	2009-02-15 12:49:39.000000000 +0000
3
@@ -6,6 +6,7 @@
4
  *
5
  ***/
6
 
7
+#include <string.h>
8
 #include "p_block.h"
9
 #include "cdda_paranoia.h"
10
 #include "gap.h"
11
--- cdparanoia-III-10.2/header.c.includes	2009-02-15 12:49:19.000000000 +0000
12
+++ cdparanoia-III-10.2/header.c	2009-02-15 12:49:39.000000000 +0000
13
@@ -10,6 +10,7 @@
14
 #include <unistd.h>
15
 #include <stdlib.h>
16
 #include <stdio.h>
17
+#include <stdlib.h>
18
 #include <string.h>
19
 
20
 static void PutNum(long num,int f,int endianness,int bytes){
view file @ 79f96a1e59
... ... --- /dev/null
... ... +++ b/cdparanoia.spec
... ... @@ -0,0 +1,209 @@
1
%define	name	cdparanoia
2
%define	major	0
3
%define	version	10.2
4
%define	release %mkrel 8
5
%define	fullname %{name}-III-%version
6
7
%define	libname		%mklibname cdda %{major}
8
%define develname	%mklibname cdda -d
9
10
Summary:	Utility to copy digital audio CDs
11
Name:		%{name}
12
Version:	%{version}
13
Release:	%{release}
14
Epoch:		1
15
Source0:	http://downloads.xiph.org/releases/cdparanoia/%{fullname}.src.tgz
16
Patch0:		cdparanoia-III-alpha9.8-includes.patch
17
Patch1:		cdparanoia-III-10.2-gcc43.patch
18
Patch2:		cdparanoia-III-10.2-format-security.patch
19
URL:		http://www.xiph.org/paranoia/ 
20
License:	GPLv2+ and LGPLv2+
21
Group:		Sound
22
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
23
24
%description
25
This CDDA reader distribution ('cdparanoia') reads audio from the CDROM
26
directly as data, with no analog step between, and writes the data to a file
27
or pipe as .wav, .aifc or as raw 16 bit linear PCM.
28
29
cdparanoia is a complete rewrite of Heiko Eissfeldt's 'cdda2wav' program,
30
and generally is much better at succeeding to read difficult discs with
31
cheap drives.
32
33
%package -n	%{libname}
34
Summary:	Libraries for cdparanoia
35
Group:		Sound
36
37
%description -n	%{libname}
38
This is the development libraries for cdparanoia. cdparanoia is a complete
39
rewrite of Heiko Eissfeldt's 'cdda2wav' program, and generally is much better 
40
at succeeding to read difficult discs with cheap drives.
41
42
%package -n	%{develname}
43
Summary:	Development libraries for cdparanoia
44
Group:		Development/C
45
Provides:	libcdda-devel = %epoch:%{version}
46
Provides:	cdda-devel = %epoch:%{version}
47
Requires:	%{libname} = %epoch:%{version}
48
Obsoletes:	%{mklibname cdda 0 -d}
49
50
%description -n	%{develname}
51
This is the development libraries for cdparanoia. cdparanoia is a complete
52
rewrite of Heiko Eissfeldt's 'cdda2wav' program, and generally is much better 
53
at succeeding to read difficult discs with cheap drives.
54
55
%prep
56
%setup -q -n %{fullname}
57
%patch0 -p1 -b .includes
58
%patch1 -p1 -b .gcc43
59
%patch2 -p1 -b .fs
60
61
autoconf
62
63
%build
64
rm -rf $RPM_BUILD_ROOT
65
%configure2_5x --libdir=%{_libdir}/cdparanoia
66
# (gb) don't use fortify, this package has ugly abuse of memcpy() that we can't cope with if it's a macro
67
# XXX would be better to define scsi cmds constants instead...
68
export RPM_OPT_FLAGS="$(echo %optflags |sed s/-D_FORTIFY_SOURCE=.//|sed s/-Wp,//)"
69
make OPT="-fsigned-char -finline-functions -Dsize16='short' -Dsize32='int' $RPM_OPT_FLAGS"
70
71
%clean
72
rm -rf $RPM_BUILD_ROOT
73
74
%install
75
rm -rf $RPM_BUILD_ROOT
76
mkdir -p $RPM_BUILD_ROOT%{_bindir}
77
mkdir -p $RPM_BUILD_ROOT%{_docdir}
78
mkdir -p $RPM_BUILD_ROOT%{_includedir}
79
mkdir -p $RPM_BUILD_ROOT%{_libdir}
80
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
81
82
%makeinstall \
83
	BINDIR=$RPM_BUILD_ROOT%{_bindir} \
84
	INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir} \
85
	LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
86
	MANDIR=$RPM_BUILD_ROOT%{_mandir}
87
88
install -m644 cdparanoia.1 $RPM_BUILD_ROOT%{_mandir}/man1/
89
90
%if %mdkversion < 200900
91
%post -n %{libname} -p /sbin/ldconfig
92
%postun -n %{libname} -p /sbin/ldconfig
93
%endif
94
95
%files
96
%defattr(644,root,root,755)
97
%doc README 
98
%attr(755,root,root) %{_bindir}/cdparanoia
99
%attr(644,root,root) %{_mandir}/man1/cdparanoia.1*
100
101
%files -n %{libname}
102
%defattr(644,root,root,755)
103
%{_libdir}/*.so.*
104
105
%files -n %{develname}
106
%defattr(-,root,root)
107
%{_includedir}/*
108
%{_libdir}/*.a
109
%{_libdir}/*.so
110
111
112
113
%changelog
114
* Tue May 03 2011 Oden Eriksson <oeriksson@mandriva.com> 1:10.2-8mdv2011.0
115
+ Revision: 663360
116
- mass rebuild
117
118
* Tue Nov 30 2010 Oden Eriksson <oeriksson@mandriva.com> 1:10.2-7mdv2011.0
119
+ Revision: 603820
120
- rebuild
121
122
* Wed Apr 28 2010 Christophe Fergeau <cfergeau@mandriva.com> 1:10.2-6mdv2010.1
123
+ Revision: 540305
124
- rebuild so that shared libraries are properly stripped again
125
126
* Wed Apr 28 2010 Christophe Fergeau <cfergeau@mandriva.com> 1:10.2-5mdv2010.1
127
+ Revision: 540012
128
- rebuild so that shared libraries are properly stripped again
129
130
* Mon Mar 15 2010 Oden Eriksson <oeriksson@mandriva.com> 1:10.2-4mdv2010.1
131
+ Revision: 520019
132
- rebuilt for 2010.1
133
134
* Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 1:10.2-3mdv2010.0
135
+ Revision: 413225
136
- rebuild
137
138
* Sun Feb 15 2009 Colin Guthrie <cguthrie@mandriva.org> 1:10.2-2mdv2009.1
139
+ Revision: 340502
140
- Drop cputoolize patch (it seems to break things)
141
- Rediff includes patch for new fuzz policy
142
- Add patch from Gentoo for gcc43 (gtbz#238378)
143
- Fix format-security issues
144
145
* Thu Oct 16 2008 Götz Waschk <waschk@mandriva.org> 1:10.2-1mdv2009.1
146
+ Revision: 294213
147
- new version
148
149
* Thu Oct 16 2008 Götz Waschk <waschk@mandriva.org> 1:10.1-1mdv2009.1
150
+ Revision: 294200
151
- new version
152
- fix source URL
153
154
* Thu Aug 07 2008 Götz Waschk <waschk@mandriva.org> 1:10.1-1mdv2009.0
155
+ Revision: 266441
156
- new version
157
- update license
158
159
* Wed Aug 06 2008 Thierry Vignaud <tv@mandriva.org> 1:10.0-2mdv2009.0
160
+ Revision: 264345
161
- rebuild early 2009.0 package (before pixel changes)
162
163
* Tue Jun 10 2008 Götz Waschk <waschk@mandriva.org> 1:10.0-1mdv2009.0
164
+ Revision: 217475
165
- new version
166
- drop patch 2
167
- update license
168
- use the right configure macro
169
- get rid of the roman version number
170
171
  + Pixel <pixel@mandriva.com>
172
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers
173
174
* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> IIIa9.8-13mdv2008.1
175
+ Revision: 136289
176
- restore BuildRoot
177
178
  + Thierry Vignaud <tv@mandriva.org>
179
    - kill re-definition of %%buildroot on Pixel's request
180
181
* Sun Sep 09 2007 Adam Williamson <awilliamson@mandriva.org> IIIa9.8-13mdv2008.0
182
+ Revision: 83222
183
- rebuild for 2008
184
- don't package license
185
- drop unneeded Buildrequires autoconf2.1
186
- Fedora license policy
187
- new devel policy
188
189
190
* Fri Jan 12 2007 Götz Waschk <waschk@mandriva.org> IIIa9.8-12mdv2007.0
191
+ Revision: 108123
192
- Import cdparanoia
193
194
* Fri Jan 12 2007 Götz Waschk <waschk@mandriva.org> IIIa9.8-12mdv2007.1
195
- Rebuild
196
197
* Tue Mar 21 2006 Gtz Waschk <waschk@mandriva.org> IIIa9.8-11mdk
198
* Tue Mar 21 2006 Götz Waschk <waschk@mandriva.org> IIIa9.8-11mdk
199
- Rebuild
200
- use mkrel
201
202
* Thu Aug 18 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 9.8-10mdk
203
- don't build with fortify
204
205
* Wed Jun 09 2004 Per yvind Karlsen <peroyvind@linux-mandrake.com> IIIa9.8-9mdk
206
- fix gcc-3.4 build (P2)
207
- buildrequires
208
- cosmetics
209

Comments