Your message dated Sun, 02 Mar 2008 18:02:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#467075: fixed in dvdbackup 0.1.1-11
has caused the Debian Bug report #467075,
regarding dvdbackup - read dvd with broken ifo/bup files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
467075: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467075
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: dvdbackup
Version: 0.1.1-10

The attached patch makes it possible to read recent dvds which contains
half broken IFO and full broken BUP files.

Half broken IFO files: Wrong filesize in the UDF. Fixed by using
ifoOpen and the filesize from the open dvd file handle. libdvdread was
fixed recently to update that size to a sane value.

Full broken BUP files: Missing or completely bogus sizes/contents. Fixed
by always recreating it from the corresponding IFO file.

It have one problem. If the IFO file is in fact bogus in a way
libdvdread would reject it, it bails out.

Bastian

-- 
Many Myths are based on truth
                -- Spock, "The Way to Eden",  stardate 5832.3
diff -ur t/dvdbackup-0.1.1/src/dvdbackup.c dvdbackup-0.1.1/src/dvdbackup.c
--- t/dvdbackup-0.1.1/src/dvdbackup.c   2008-02-22 20:09:31.000000000 +0100
+++ dvdbackup-0.1.1/src/dvdbackup.c     2008-02-22 21:03:34.000000000 +0100
@@ -48,7 +48,6 @@
 typedef struct {
   int          size_ifo;
   int          size_menu;
-  int          size_bup;
   int          number_of_vob_files;
   int          size_vob[10];
 } title_set_t;
@@ -1252,7 +1251,7 @@
 int DVDCopyIfoBup (dvd_reader_t * dvd, title_set_info_t * title_set_info, int 
title_set, char * targetdir,char * title_name) {
 
        /* Temp filename,dirname */
-       char targetname[PATH_MAX];
+       char targetname_ifo[PATH_MAX], targetname_bup[PATH_MAX];
        struct stat fileinfo;
 
        /* Write buffer */
@@ -1261,12 +1260,12 @@
        unsigned char buffy; /* :-) */
 
        /* File Handler */
-       int streamout;
+       int streamout_ifo = -1, streamout_bup = -1;
 
-       int size;
+       int size, ret = 1;
 
        /* DVD handler */
-       dvd_file_t   *  dvd_file=NULL;
+       ifo_handle_t *  ifo_file = NULL;
 
 
        if (title_set_info->number_of_title_sets + 1 < title_set) {
@@ -1276,7 +1275,6 @@
        if (title_set_info->title_set[title_set].size_ifo == 0 ) {
                return(0);
        } else {
-               size = title_set_info->title_set[title_set].size_ifo;
                if (title_set_info->title_set[title_set].size_ifo%2048 != 0) {
                        fprintf(stderr, "The IFO of title set %d doesn't have a 
valid DVD size\n", title_set);
                        return(1);
@@ -1286,146 +1284,80 @@
        /* Create VIDEO_TS.IFO or VTS_XX_0.IFO */
 
        if (title_set == 0) {
-               sprintf(targetname,"%s/%s/VIDEO_TS/VIDEO_TS.IFO",targetdir, 
title_name);
+               sprintf(targetname_ifo,"%s/%s/VIDEO_TS/VIDEO_TS.IFO",targetdir, 
title_name);
+               sprintf(targetname_bup,"%s/%s/VIDEO_TS/VIDEO_TS.BUP",targetdir, 
title_name);
        } else {
-               sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_0.IFO",targetdir, 
title_name, title_set);
+               
sprintf(targetname_ifo,"%s/%s/VIDEO_TS/VTS_%02i_0.IFO",targetdir, title_name, 
title_set);
+               
sprintf(targetname_bup,"%s/%s/VIDEO_TS/VTS_%02i_0.BUP",targetdir, title_name, 
title_set);
        }
 
-       if (stat(targetname, &fileinfo) == 0) {
-               fprintf(stderr, "The IFO file %s exists will try to over write 
it.\n", targetname);
+       if (stat(targetname_ifo, &fileinfo) == 0) {
+               fprintf(stderr, "The IFO file %s exists will try to over write 
it.\n", targetname_ifo);
                if (! S_ISREG(fileinfo.st_mode)) {
-                       fprintf(stderr,"The IFO %s file is not valid, it may be 
a directory\n", targetname);
-                       return(1);
-               } else {
-                       if ((streamout = open(targetname, O_WRONLY | O_TRUNC, 
0666)) == -1) {
-                               fprintf(stderr, "Error opening %s\n", 
targetname);
-                               perror("");
-                               return(1);
-                       }
-               }
-       } else {
-               if ((streamout = open(targetname, O_WRONLY | O_CREAT, 0666)) == 
-1) {
-                       fprintf(stderr, "Error creating %s\n", targetname);
-                       perror("");
+                       fprintf(stderr,"The IFO %s file is not valid, it may be 
a directory\n", targetname_ifo);
                        return(1);
                }
        }
 
-       /* Copy VIDEO_TS.IFO, since it's a small file try to copy it in one 
shot */
-
-
-       if ((buffer = (unsigned char *)malloc(size * sizeof(buffy))) == NULL) {
-               fprintf(stderr, "Out of memory copying %s\n", targetname);
-               close(streamout);
-               return(1);
-       }
-
-
-       if ((dvd_file = DVDOpenFile(dvd, title_set, DVD_READ_INFO_FILE))== 0) {
-               fprintf(stderr, "Failed opening IFO for title set %d\n", 
title_set);
-               free(buffer);
-               close(streamout);
-               return(1);
-       }
-
-       if ( DVDReadBytes(dvd_file,buffer,size) != size) {
-               fprintf(stderr, "Error reading IFO for title set %d\n", 
title_set);
-               free(buffer);
-               DVDCloseFile(dvd_file);
-               close(streamout);
-               return(1);
+       if (stat(targetname_bup, &fileinfo) == 0) {
+               fprintf(stderr, "The BUP file %s exists will try to over write 
it.\n", targetname_bup);
+               if (! S_ISREG(fileinfo.st_mode)) {
+                       fprintf(stderr,"The BUP %s file is not valid, it may be 
a directory\n", targetname_bup);
+                       return(1);
+               }
        }
 
-       DVDCloseFile(dvd_file);
-
-       if (write(streamout,buffer,size) != size) {
-               fprintf(stderr, "Error writing %s\n",targetname);
-               free(buffer);
-               close(streamout);
-               return(1);
+       if ((streamout_ifo = open(targetname_ifo, O_WRONLY | O_CREAT | O_TRUNC, 
0666)) == -1) {
+               fprintf(stderr, "Error creating %s\n", targetname_ifo);
+               perror("");
+               goto error;
        }
 
-       free(buffer);
-       close(streamout);
-
-
-       /* Create VIDEO_TS.BUP or VTS_XX_0.BUP */
-
-       if (title_set == 0) {
-               sprintf(targetname,"%s/%s/VIDEO_TS/VIDEO_TS.BUP",targetdir, 
title_name);
-       } else {
-               sprintf(targetname,"%s/%s/VIDEO_TS/VTS_%02i_0.BUP",targetdir, 
title_name, title_set);
+       if ((streamout_bup = open(targetname_bup, O_WRONLY | O_CREAT | O_TRUNC, 
0666)) == -1) {
+               fprintf(stderr, "Error creating %s\n", targetname_bup);
+               perror("");
+               goto error;
        }
 
+       /* Copy VIDEO_TS.IFO, since it's a small file try to copy it in one 
shot */
 
-       if (title_set_info->title_set[title_set].size_bup == 0 ) {
-               return(0);
-       } else {
-               size = title_set_info->title_set[title_set].size_bup;
-               if (title_set_info->title_set[title_set].size_bup%2048 != 0) {
-                       fprintf(stderr, "The BUP of title set %d doesn't have a 
valid DVD size\n", title_set);
-                       return(1);
-               }
+       if ((ifo_file = ifoOpen(dvd, title_set))== 0) {
+               fprintf(stderr, "Failed opening IFO for title set %d\n", 
title_set);
+               goto error;
        }
 
+       size = DVDFileSize(ifo_file->file) * DVD_VIDEO_LB_LEN;
 
-       if (stat(targetname, &fileinfo) == 0) {
-               fprintf(stderr, "The BUP file %s exists will try to over write 
it.\n", targetname);
-               if (! S_ISREG(fileinfo.st_mode)) {
-                       fprintf(stderr,"The BUP %s file is not valid, it may be 
a directory\n", targetname);
-                       return(1);
-               } else {
-                       if ((streamout = open(targetname, O_WRONLY | O_TRUNC, 
0666)) == -1) {
-                               fprintf(stderr, "Error opening %s\n", 
targetname);
-                               perror("");
-                               return(1);
-                       }
-               }
-       } else {
-               if ((streamout = open(targetname, O_WRONLY | O_CREAT, 0666)) == 
-1) {
-                       fprintf(stderr, "Error creating %s\n", targetname);
-                       perror("");
-                       return(1);
-               }
+       if ((buffer = (unsigned char *)malloc(size * sizeof(buffy))) == NULL) {
+               perror("");
+               goto error;
        }
 
+       DVDFileSeek(ifo_file->file, 0);
 
-
-       /* Copy VIDEO_TS.BUP or VTS_XX_0.BUP, since it's a small file try to 
copy it in one shot */
-
-       if ((buffer = (unsigned char *)malloc(size * sizeof(buffy))) == NULL) {
-               fprintf(stderr, "Out of memory copying %s\n", targetname);
-               close(streamout);
-               return(1);
+       if (DVDReadBytes(ifo_file->file,buffer,size) != size) {
+               fprintf(stderr, "Error reading IFO for title set %d\n", 
title_set);
+               goto error;
        }
 
 
-       if ((dvd_file = DVDOpenFile(dvd, title_set, 
DVD_READ_INFO_BACKUP_FILE))== 0) {
-               fprintf(stderr, "Failed opening BUP for title set %d\n", 
title_set);
-               free(buffer);
-               close(streamout);
-               return(1);
+       if (write(streamout_ifo,buffer,size) != size) {
+               fprintf(stderr, "Error writing %s\n",targetname_ifo);
+               goto error;
        }
 
-       if ( DVDReadBytes(dvd_file,buffer,size) != size) {
-               fprintf(stderr, "Error reading BUP for title set %d\n", 
title_set);
-               free(buffer);
-               DVDCloseFile(dvd_file);
-               close(streamout);
-               return(1);
+       if (write(streamout_bup,buffer,size) != size) {
+               fprintf(stderr, "Error writing %s\n",targetname_bup);
+               goto error;
        }
 
-       DVDCloseFile(dvd_file);
-
-       if (write(streamout,buffer,size) != size) {
-               fprintf(stderr, "Error writing %s\n", targetname);
-               free(buffer);
-               close(streamout);
-               return(1);
-       }
+       ret = 0;
 
+error:
+       ifoClose(ifo_file);
        free(buffer);
-       close(streamout);
+       close(streamout_ifo);
+       close(streamout_bup);
 
        return(0);
 }
@@ -1659,21 +1591,6 @@
                title_set_info->title_set[0].size_menu = 0 ;
        }
 
-       /* Find VIDEO_TS.BUP if present */
-
-       if (DVDFileStat(_dvd, 0, DVD_READ_INFO_BACKUP_FILE, &statbuf) != -1) {
-               title_set_info->title_set[0].size_bup = statbuf.size;
-
-       } else {
-               DVDFreeTitleSetInfo(title_set_info);
-               return(0);
-       }
-
-       if (title_set_info->title_set[0].size_ifo != 
title_set_info->title_set[0].size_bup) {
-               fprintf(stderr,"BUP and IFO size not the same be warened!\n");
-       }
-
-
        /* Take care of the titles which we don't have in VMG */
 
        title_set_info->title_set[0].number_of_vob_files = 0;
@@ -1682,7 +1599,7 @@
 
        if ( verbose > 0 ){
                fprintf(stderr,"\n\n\nFile sizes for Title set 0 
VIDEO_TS.XXX\n");
-               fprintf(stderr,"IFO = %d, MENU_VOB = %d, BUP = 
%d\n",title_set_info->title_set[0].size_ifo, 
title_set_info->title_set[0].size_menu, title_set_info->title_set[0].size_bup );
+               fprintf(stderr,"IFO = %d, MENU_VOB = 
%d\n",title_set_info->title_set[0].size_ifo, 
title_set_info->title_set[0].size_menu);
 
        }
 
@@ -1737,31 +1654,12 @@
                        }
 
 
-                       if ( DVDFileStat(_dvd, counter + 1, 
DVD_READ_INFO_BACKUP_FILE, &statbuf) != -1) {
-                               title_set_info->title_set[counter + 1].size_bup 
= statbuf.size;
-                       } else {
-                               DVDFreeTitleSetInfo(title_set_info);
-                               return(0);
-                       }
-
-                       if (title_set_info->title_set[counter +1].size_ifo != 
title_set_info->title_set[counter + 1].size_bup) {
-                               fprintf(stderr,"BUP and IFO size for fileset %d 
is not the same be warened!\n", counter + 1);
-                       }
-
-
-
-                       if ( verbose > 1 ){
-                               fprintf(stderr,"After Menu Title BUP check\n");
-                       }
-
-
                        if ( verbose > 0 ) {
                                fprintf(stderr,"\n\n\nFile sizes for Title set 
%d i.e.VTS_%02d_X.XXX\n", counter + 1, counter + 1);
                                fprintf(stderr,"IFO: %d, MENU: %d\n", 
title_set_info->title_set[counter +1].size_ifo, 
title_set_info->title_set[counter +1].size_menu);
                                for (i = 0; i < 
title_set_info->title_set[counter + 1].number_of_vob_files ; i++) {
                                        fprintf(stderr, "VOB %d is %d\n", i + 
1, title_set_info->title_set[counter + 1].size_vob[i]);
                                }
-                               fprintf(stderr,"BUP: 
%d\n",title_set_info->title_set[counter +1].size_bup);
                        }
 
                        if ( verbose > 1 ){
@@ -2120,8 +2018,6 @@
                fprintf(stdout,"\tVIDEO_TS.VOB\t%i\n", 
title_set_info->title_set[0].size_menu);
        }
 
-       fprintf(stdout,"\tVIDEO_TS.BUP\t%i\n", 
title_set_info->title_set[0].size_bup);
-
        for( i = 0 ; i < title_set_info->number_of_title_sets ; i++) {
                fprintf(stdout,"\tVTS_%02i_0.IFO\t%i\n", i + 1, 
title_set_info->title_set[i + 1].size_ifo);
                if (title_set_info->title_set[i + 1].size_menu != 0 ) {
@@ -2132,7 +2028,6 @@
                                fprintf(stdout,"\tVTS_%02i_%i.VOB\t%i\n", i + 
1, f + 1, title_set_info->title_set[i + 1].size_vob[f]);
                        }
                }
-               fprintf(stdout,"\tVTS_%02i_0.BUP\t%i\n", i + 1, 
title_set_info->title_set[i + 1].size_bup);
        }
 
        fprintf(stdout,"\n\nMain feature:\n");

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: dvdbackup
Source-Version: 0.1.1-11

We believe that the bug you reported is fixed in the latest version of
dvdbackup, which is due to be installed in the Debian FTP archive:

dvdbackup-dbg_0.1.1-11_i386.deb
  to pool/main/d/dvdbackup/dvdbackup-dbg_0.1.1-11_i386.deb
dvdbackup_0.1.1-11.diff.gz
  to pool/main/d/dvdbackup/dvdbackup_0.1.1-11.diff.gz
dvdbackup_0.1.1-11.dsc
  to pool/main/d/dvdbackup/dvdbackup_0.1.1-11.dsc
dvdbackup_0.1.1-11_i386.deb
  to pool/main/d/dvdbackup/dvdbackup_0.1.1-11_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stephen Gran <[EMAIL PROTECTED]> (supplier of updated dvdbackup package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 02 Mar 2008 17:44:38 +0000
Source: dvdbackup
Binary: dvdbackup dvdbackup-dbg
Architecture: source i386
Version: 0.1.1-11
Distribution: unstable
Urgency: low
Maintainer: Stephen Gran <[EMAIL PROTECTED]>
Changed-By: Stephen Gran <[EMAIL PROTECTED]>
Description: 
 dvdbackup  - tool to rip DVD's from the command line
 dvdbackup-dbg - debug files for dvdbackup
Closes: 415770 419670 463179 467075
Changes: 
 dvdbackup (0.1.1-11) unstable; urgency=low
 .
   * dvdbackup-dbg Depends on dvdbackup (closes: #463179)
   * s/mkisofs/genisoimage/g (closes: #415770)
   * Handle short reads from DVDReadBlocks (closes: #419670)
   * Handle broken ifo/bup files (closes: #467075)
   * Modify Build-Depends to not use the -1 revision
   * Update Standards Version (no changes)
Files: 
 dc6881915d8af1f8e7c8885ec2a0fce5 609 utils optional dvdbackup_0.1.1-11.dsc
 39f24c3494ef6f7ef9c2fb6ef4abd799 15479 utils optional 
dvdbackup_0.1.1-11.diff.gz
 b4bd8efeb40f428b8de0609047e58b75 20408 utils optional 
dvdbackup_0.1.1-11_i386.deb
 053ba2b0d41c1cab8019156ffb9135a4 23870 utils extra 
dvdbackup-dbg_0.1.1-11_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHyueySYIMHOpZA44RAmZ9AKDX0hE9d6k7/YiGv/MMfJTR13Hd3ACgrQP8
QCmoNaBREs8Yz3z5B0CMmp0=
=5Xjb
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to