ports/151677: [audio/cuetools] Fix filename handling for extras/cuetag.sh
Nicole Reid
root at cooltrainer.org
Sun Oct 24 08:00:17 UTC 2010
>Number: 151677
>Category: ports
>Synopsis: [audio/cuetools] Fix filename handling for extras/cuetag.sh
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 24 08:00:16 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Nicole Reid
>Release:
>Organization:
>Environment:
>Description:
The extras/cuetag.sh script in this port doesn't escape filenames properly.
There's an open bug for this on the project tracker (http://developer.berlios.de/bugs/?func=detailbug&bug_id=10401&group_id=2130) untouched for nearly four years, so a patch here in Ports is probably the only way we'll see a fix, as evidenced by the existing patch chasing a FLAC command syntax change.
Also touch up a typo while we're here :)
>How-To-Repeat:
Try to run /usr/local/share/examples/cuetools/cuetag.sh on any cue sheet with a spaced file name.
>Fix:
--- cuetools.orig/files/patch-extras_cuetag.sh 2010-10-24 03:16:03.895004790 -0400
+++ cuetools/files/patch-extras_cuetag.sh 2010-10-24 03:20:58.637410871 -0400
@@ -1,5 +1,5 @@
---- extras/cuetag.sh.orig 2008-11-28 00:41:26.000000000 +0300
-+++ extras/cuetag.sh 2008-11-28 00:41:32.000000000 +0300
+--- extras/cuetag.sh.orig 2006-02-14 19:10:02.000000000 -0500
++++ extras/cuetag.sh 2010-10-24 03:20:01.349578391 -0400
@@ -18,7 +18,7 @@
{
# FLAC tagging
@@ -9,3 +9,47 @@
# Ogg Vorbis tagging
# -w overwrites existing comments
+@@ -63,7 +63,7 @@
+ (for field in $fields; do
+ value=""
+ for conv in `eval echo \\$$field`; do
+- value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file`
++ value=`$CUEPRINT -n $1 -t "$conv\n" "$cue_file"`
+
+ if [ -n "$value" ]; then
+ echo "$field=$value"
+@@ -96,7 +96,7 @@
+ for field in $fields; do
+ value=""
+ for conv in `eval echo \\$$field`; do
+- value=`$CUEPRINT -n $1 -t "$conv\n" $cue_file`
++ value=`$CUEPRINT -n $1 -t "$conv\n" "$cue_file"`
+
+ if [ -n "$value" ]; then
+ break
+@@ -141,14 +141,14 @@
+ cue_file=$1
+ shift
+
+- ntrack=`cueprint -d '%N' $cue_file`
++ ntrack=`cueprint -d '%N' "$cue_file"`
+ trackno=1
+
+ if [ $# -ne $ntrack ]; then
+ echo "warning: number of files does not match number of tracks"
+ fi
+
+- for file in $@; do
++ for file in "$@"; do
+ case $file in
+ *.[Ff][Ll][Aa][Cc])
+ vorbis $trackno "$file"
+@@ -160,7 +160,7 @@
+ id3 $trackno "$file"
+ ;;
+ *)
+- echo "$file: uknown file type"
++ echo "$file: unknown file type"
+ ;;
+ esac
+ trackno=$(($trackno + 1))
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list