Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-2244

Parsing of "System Environment Variables" field is broken

    XMLWordPrintable

Details

    Description

      The "System Environment Variables" takes a space-separated list of environment variables. This is insufficient, as variables like CPPFLAGS and LDFLAGS often need to be set to values that themselves contain spaces.

      Bamboo attempts to support this with some special-casing of quoted strings, but the quoted-string logic is broken. It avoids splitting on spaces between quotes - any quotes at all, not matching ones. So if I configure this value:

      CPPFLAGS='-I/foo -I/bar' LDFLAGS="-L/baz -L/quux"
      

      then what actually ends up in my build environment is the very malformed:

      CPPFLAGS=-I/home/bamboo/opt/v4l/include -I/home/bamboo/opt/alsa-lib-1.0.15/include -I/home/bamboo/opt/libevent-1.3e/include' LDFLAGS="-L/home/bamboo/opt/alsa-lib-1.0.15/lib -L/home/bamboo/opt/libevent-1.3e/lib
      

      i.e. the variable CPPFLAGS actually contains the string LDFLAGS= in its value.

      Related to this issue is the problem that once you are configuring several environment variables, the single-line edit box quickly becomes unwieldy.

      Both these problems could be fixed by making the environment variables configuration a multi-line textarea, and splitting on newlines.

      Attachments

        Issue Links

          Activity

            People

              kbrazulewicz Krystian Brazulewicz
              1b78f3292624 Max Bowsher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h