Package: live-build Version: 3.0_a31-1-12-gb820153 Severity: normal
in case those variables contain ( or ), see attached patch for the fix -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing'), (600, 'unstable'), (300, 'experimental'), (100, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
>From b820153c9cee6666d7875657a4ada04859cccaf1 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko <deb...@onerussian.com> Date: Thu, 22 Sep 2011 15:02:32 -0400 Subject: [PATCH] ENH Enclose shell variables in "" (escaped) while evaluating for the length Otherwise having () in the names would cause script to crash with /usr/share/live/build/functions/defaults.sh: eval: line 1200: syntax error near unexpected token `( --- functions/defaults.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index 796724e..53c7af9 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -1218,22 +1218,22 @@ Check_defaults () ;; esac - if [ "$(echo ${LB_ISO_APPLICATION} | wc -c)" -gt 128 ] + if [ "$(echo \"${LB_ISO_APPLICATION}\" | wc -c)" -gt 128 ] then Echo_warning "You have specified a value of LB_ISO_APPLICATION that is too long; the maximum length is 128 characters." fi - if [ "$(echo ${LB_ISO_PREPARER} | wc -c)" -gt 128 ] + if [ "$(echo \"${LB_ISO_PREPARER}\" | wc -c)" -gt 128 ] then Echo_warning "You have specified a value of LB_ISO_PREPARER that is too long; the maximum length is 128 characters." fi - if [ "$(echo ${LB_ISO_PUBLISHER} | wc -c)" -gt 128 ] + if [ "$(echo \"${LB_ISO_PUBLISHER}\" | wc -c)" -gt 128 ] then Echo_warning "You have specified a value of LB_ISO_PUBLISHER that is too long; the maximum length is 128 characters." fi - if [ "$(eval "echo ${LB_ISO_VOLUME}" | wc -c)" -gt 32 ] + if [ "$(eval "echo \"${LB_ISO_VOLUME}\"" | wc -c)" -gt 32 ] then Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters." fi -- 1.7.5.4