Subject: pkg/33293: sysutils/cdbkup has problems with DVDs
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dgriffi@cs.csubak.edu>
List: pkgsrc-bugs
Date: 04/19/2006 23:55:00
>Number:         33293
>Category:       pkg
>Synopsis:       sysutils/cdbkup has problems with DVDs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 19 23:55:00 +0000 2006
>Originator:     David Griffith
>Release:        2.1 i386
>Organization:
>Environment:
NetBSD zaphod 2.1 NetBSD 2.1 (GENERIC) #0: Mon Oct 24 22:35:45 UTC 2005  jmc@faith.netbsd.org:/home/builds/ab/netbsd-2-1-RELEASE/i386/200510241747Z-obj/home/builds/ab/netbsd-2-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386

>Description:
Backing up to DVD:

Immediately, gtar(1) complains the deprecated use of the "l" option and suggests using "--one-file-system" instead.  Then things seem to go fine until it comes time to write out the newly-created tarball to the burner with cdrecord(8).  cdrecord(8) aborts, thus causing cdbkup(1) to also abort.  Here are the two lines of interest.

/usr/pkg/bin/cdrecord: Track 1 has unknown length.
/usr/pkg/bin/cdrecord: Use tsize= option in SAO mode to specify track size.


>How-To-Repeat:
cdbkup 0 -s 4 -l home -S 4200000000 -c none -w /usr/tmp/cdworkdir /dev/rcd0d /usr/home/joe

The home directory in question contains about 20 gigs of stuff.
>Fix:
The following patches seem to fix things completely:

$NetBSD$
--- src/cdappend.in.orig        2006-04-18 23:40:54.000000000 -0700
+++ src/cdappend.in     2006-04-18 23:41:12.000000000 -0700
@@ -101,7 +101,7 @@
 die "Options -b and -r conflict.\n" if( $blank && $recycle);
 
 $mkiso = "@MKISOFS@ -quiet -R -J";
-$cdrec = "@CDRECORD@ -v -data dev=$cddevice speed=$cdspeed";
+$cdrec = "@CDRECORD@ -v -data dev=$cddevice speed=$cdspeed tsize=$cdsize_all";
 
 $tmpimg = "$workdir/$filename";

$NetBSD$
--- src/cdsplit.in.orig 2002-03-06 11:01:23.000000000 -0800
+++ src/cdsplit.in      2006-04-19 00:11:17.000000000 -0700
@@ -125,7 +125,7 @@
 $workdir = "." if ($test && $workdir eq "/tmp/cdworkdir");
 
 $mkiso = "@MKISOFS@ -quiet -R -J";
-$cdrec = "@CDRECORD@ -v -data dev=$cddevice speed=$cdspeed";
+$cdrec = "@CDRECORD@ -v -data dev=$cddevice speed=$cdspeed tsize=$cdsize_all";
 
 $tmpimg = "$workdir/$filename";

$NetBSD$
--- src/cdbkup.in.orig  2002-03-06 11:01:23.000000000 -0800
+++ src/cdbkup.in       2006-04-18 23:48:05.000000000 -0700
@@ -298,12 +298,13 @@
 }
 
 $tarcmd = "cd ".esc_shell($dumpdir)." && $rgnutar -f - -cS";
-$tarcmd .= "l" unless ($crossmp);
 unless( $ziphere) {
        $tarcmd .= "z" if( $compress eq 'gz');
        $tarcmd .= "j" if( $compress eq 'bz2');
 }
 
+$tarcmd .= " --one-file-system" unless ($crossmp);
+
 $tarcmd .= " --listed-incremental=$listed".
        " --label=".esc_shell($datedlabel);
 foreach $exclude (@excludes) {