Bug 146572

Summary: growisofs won't accept long filename list
Product: [Fedora] Fedora Reporter: David A. De Graaf <dad>
Component: dvd+rw-toolsAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-31 10:13:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David A. De Graaf 2005-01-29 22:14:17 UTC
Description of problem: When growisofs is given a long list of full
pathnames (using -graft-points), it fails with errmsg:

  /usr/bin/growisofs: Argument list too long

while mkisofs is perfectly happy with the same list.

Version-Release number of selected component (if applicable):
dvd+rw-tools-5.21.4.10.8-2

How reproducible:
Always fails.

Steps to Reproduce:
1.  Generate a list of filenames for an incremental backup like this:
0       /.autofsck
0       /boot/grub/grub.conf
0       /boot/initrd-2.6.10-1.741_FC3.img
0       /etc/.fstab.hal.1
    ...

2.  Run script:
    growisofs -Z /dev/dvd -dvd-compat -R -J -D -graft-points \
      -allow-leading-dots -joliet-long -l \
      -allow-multidot -max-iso9660-filenames -relaxed-filenames \
      `awk -F '\t' '{ print $2 "=" $2 }' $1`

3.  Note that awk removes the leading digit field and creates lines:
/.autofsck=/.autofsck
   ...
  
Actual results:
If the list is long enough (> 5000 lines) growisofs barfs.

Expected results:
growisofs should be written to accept arbitrarily long file lists


Additional info:
This alternative script works fine:
    grep -v " " $1 | \
    awk -F '\t' '{ print $2 "=" $2 }' - | \
    /usr/bin/mkisofs -quiet \
        -R -D -allow-leading-dots -graft-points -allow-multidot \
        -max-iso9660-filenames -relaxed-filenames -path-list -  |
    /usr/bin/cdrecord -dao -v driveropts=burnfree fs=16m -eject \
        dev=$CDDEV tsize=${SIZE}s - 2> /dev/null 

Ie, mkisofs happily accepts the same very long list of pathnames.
(Note, however, that neither will accept filenames that contain
blanks, but that's separate problem.)

The growisofs man page implies that extra args are merely passed to
mkisofs.

Comment 1 Harald Hoyer 2005-01-31 10:13:53 UTC
Use this parameter and make a file with the filenames

  -path-list file
         A  file containing a list of pathspec directories and filenames
         to be added to the ISO9660 filesystem. This list  of  pathspecs
         are processed after any that appear on the command line. If the
         argument is -, then the list is read from the standard input.


Comment 2 David A. De Graaf 2005-01-31 21:39:53 UTC
Harald:
You're absolutely right.  Thanks for pointing out the right answer.  I
should have realized that giving a long list as arguments encounters
the shell limit, and has nothing to do with growisofs.

Note that I did it right in my cdrecord example.
My brain's on vacation, I guess.