Hello, Here is a patch to have the files used in the Texinfo source archive quoted in the call to tar. I tried to mimic what is done for the other $cmd that are eval'ed to have proper quoting. I also kept the ls -d to detect the files and add a read in the middle to quote.
-- Pat
diff --git a/ChangeLog b/ChangeLog index da748f4f3d..1c78751c02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-01-27 Patrice Dumas <[email protected]> + + gendocs: quote source files in tar call + * build-aux/gendocs.sh: quote $source_extra and re-read the source + files list to quote files. Construct the tar command as a variable and + use eval to run. + 2024-01-27 Patrice Dumas <[email protected]> gendocs: fix --no-html diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh index 779b4840e5..e6970c49fd 100755 --- a/build-aux/gendocs.sh +++ b/build-aux/gendocs.sh @@ -417,8 +417,15 @@ printf "\nMaking .tar.gz for sources...\n" d=`dirname $srcfile` ( cd "$d" - srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true - tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles + src_list=`ls -d *.texinfo *.texi *.txi *.eps "$source_extra" 2>/dev/null` || true + srcfiles= + while read -r src_file ; do + srcfiles="$srcfiles '$src_file'" + done <<EOF +$src_list +EOF + tar_cmd="tar czfh \"$abs_outdir/$PACKAGE.texi.tar.gz\" $srcfiles" + eval "$tar_cmd" ls -l "$abs_outdir/$PACKAGE.texi.tar.gz" ) texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
