Results 1 to 2 of 2

Thread: Bug report : pts_test_installer.php breaks quoted args with internal spaces

  1. #1
    Join Date
    Nov 2012
    Posts
    4

    Default Bug report : pts_test_installer.php breaks quoted args with internal spaces

    There is a bug in the installer wrapper.
    When installing, for example, the sqlite test on CentOS 6, one of the parameters to gcc is:
    "-DPACKAGE_STRING=\"sqlite 3.7.3\""
    After this goes through the wrapper, this becomes two args:
    "-DPACKAGE_STRING=\"sqlite"
    "3.7.3\""
    which predictably fails.


    pts-core/objects/client/pts_test_installer.php at line 481 (in the 4.0 distro)

    479: // Write the main mask for the compiler
    480: file_put_contents($main_compiler,
    481: '#!/bin/bash' . PHP_EOL . 'COMPILER_OPTIONS="$@"' . PHP_EOL . $env_var_check . PHP_EOL . 'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL . $compiler_path . ' $COMPILER_OPTIONS' . PHP_EOL);


    change the final appearance of $COMPILER_OPTIONS to "$@" (with the quotes):

    '#!/bin/bash' . PHP_EOL . 'COMPILER_OPTIONS="$@"' . PHP_EOL . $env_var_check . PHP_EOL . 'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL . $compiler_path . ' "$@"' . PHP_EOL);

    this fixes it with no change in functionality.
    the same issue still exists in the current 4.2 download.

  2. #2

    Default

    Quote Originally Posted by _rubio_ View Post
    There is a bug in the installer wrapper.
    When installing, for example, the sqlite test on CentOS 6, one of the parameters to gcc is:
    "-DPACKAGE_STRING=\"sqlite 3.7.3\""
    After this goes through the wrapper, this becomes two args:
    "-DPACKAGE_STRING=\"sqlite"
    "3.7.3\""
    which predictably fails.


    pts-core/objects/client/pts_test_installer.php at line 481 (in the 4.0 distro)

    479: // Write the main mask for the compiler
    480: file_put_contents($main_compiler,
    481: '#!/bin/bash' . PHP_EOL . 'COMPILER_OPTIONS="$@"' . PHP_EOL . $env_var_check . PHP_EOL . 'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL . $compiler_path . ' $COMPILER_OPTIONS' . PHP_EOL);


    change the final appearance of $COMPILER_OPTIONS to "$@" (with the quotes):

    '#!/bin/bash' . PHP_EOL . 'COMPILER_OPTIONS="$@"' . PHP_EOL . $env_var_check . PHP_EOL . 'echo $COMPILER_OPTIONS >> ' . $mask_dir . $compiler_type . '-options-' . $compiler_name . PHP_EOL . $compiler_path . ' "$@"' . PHP_EOL);

    this fixes it with no change in functionality.
    the same issue still exists in the current 4.2 download.
    Fixed in Git for 4.2, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •