BoxGrinder Build
  1. BoxGrinder Build
  2. BGBUILD-210

In Fedora 14 parameters are not being expanded, and cause early string truncation.

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.9.2
    • Component/s: Core
    • Labels:
    • Environment:
      ALL
    • Workaround Description:
      Hide

      For test day volunteers:
      <msavy> edit boxgrinder-appliances/testing-appliances/modular-appls/_test_base.appl, comment out (or remove) line 13. Note this in your references, and see if you can build successfully from this point

      Otherwise:
      None, wait for fix.

      Show
      For test day volunteers: <msavy> edit boxgrinder-appliances/testing-appliances/modular-appls/_test_base.appl, comment out (or remove) line 13. Note this in your references, and see if you can build successfully from this point Otherwise: None, wait for fix.
    • Steps to Reproduce:
      Hide

      Build modular test appliances, error emanates from boxgrinder-appliances/testing-appliances/modular-appls/_repos_boxgrinder_permanent_noarch.appl

      https://github.com/msavy/boxgrinder-appliances/blob/master/testing-appliances/modular-appls/_repos_boxgrinder_permanent_noarch.appl

      Show
      Build modular test appliances, error emanates from boxgrinder-appliances/testing-appliances/modular-appls/_repos_boxgrinder_permanent_noarch.appl https://github.com/msavy/boxgrinder-appliances/blob/master/testing-appliances/modular-appls/_repos_boxgrinder_permanent_noarch.appl
    • Similar Issues:
      Show 10 results 

      Description

      Test Day volunteer verdurin triggered this issue when doing the modular appliances test-build https://fedoraproject.org/wiki/QA:TestCase_boxgrinder_modular_test_appliances_build.

      Paths that utilise parameters such as #BASE_ARCH# cause string truncation, so http://example.com/#BASE_ARCH/#SOMETHING#/blah becomes http://example.com, and hence the repo metadata isn't found.

      This happens in all revisions of Fedora. It was previously (incorrectly) thought to be F14 only, but this was due to a tester accidentally forgetting to update to 0.9.1 and using 0.9.0 before the new parser.

      See comments section for reason for this new problem.

        Activity

        Hide
        Marc Savy
        added a comment - - edited

        TestDay User bertux (https://fedoraproject.org/wiki/User:Bertux) reproduced this issue multiple times under Fedora 15.

        Log Output:
        https://gist.github.com/947582

        All installed RPMs:
        https://gist.github.com/947580

        Dodgy yum config

        [boxgrinder-boxgrinder-ci-noarch]
        name=boxgrinder-ci-noarch
        baseurl=http://repo.ci.boxgrinder.org/
        enabled=1
        
        Show
        Marc Savy
        added a comment - - edited TestDay User bertux ( https://fedoraproject.org/wiki/User:Bertux ) reproduced this issue multiple times under Fedora 15 . Log Output: https://gist.github.com/947582 All installed RPMs: https://gist.github.com/947580 Dodgy yum config [boxgrinder-boxgrinder-ci-noarch] name=boxgrinder-ci-noarch baseurl=http: //repo.ci.boxgrinder.org/ enabled=1
        Hide
        Marc Savy
        added a comment -

        I believe this issue is a manifestation of the fact we have been using the YAML comment symbol (#) to indicate our variables. According to the YAML spec (http://www.yaml.org/spec/1.2/spec.html) this should result in the rest of the line (up until the new-line symbol) being ignored.

        For some reason the in-build YAML parser was handling this differently, perhaps auto-escaping the # characters in strings. However, when we switched over to the Kwalify parser in 0.9.1 it seems to have manifested and is nuking the string after the #.

        The most sensible solution is probably to change to a different character to delimit our variables, for instance use a modified version of the YUM-style $.

        $os$ or $base_arch$

        The main problem is how to handle existing appliances. Ideas:

        • Simply to pass it through a scanner that converts any # in a file to $ where it matches our patterns
        • Make this a "breaking" fix (not ideal)
        Show
        Marc Savy
        added a comment - I believe this issue is a manifestation of the fact we have been using the YAML comment symbol (#) to indicate our variables. According to the YAML spec ( http://www.yaml.org/spec/1.2/spec.html ) this should result in the rest of the line (up until the new-line symbol) being ignored. For some reason the in-build YAML parser was handling this differently, perhaps auto-escaping the # characters in strings. However, when we switched over to the Kwalify parser in 0.9.1 it seems to have manifested and is nuking the string after the #. The most sensible solution is probably to change to a different character to delimit our variables, for instance use a modified version of the YUM-style $. $os$ or $base_arch$ The main problem is how to handle existing appliances. Ideas: Simply to pass it through a scanner that converts any # in a file to $ where it matches our patterns Make this a "breaking" fix (not ideal)
        Hide
        Marek Goldmann
        added a comment -

        More investigation:

        irb(main):014:0* Kwalify::Yaml.load("abc: asd#ARCH#fds")
        => {"abc"=>"asd"}
        irb(main):015:0> YAML.load("abc: asd#ARCH#fds")
        => {"abc"=>"asd#ARCH#fds"}
        

        It seems that Kwalify yaml reader is different than built-in.

        Show
        Marek Goldmann
        added a comment - More investigation: irb(main):014:0* Kwalify::Yaml.load( "abc: asd#ARCH#fds" ) => { "abc" => "asd" } irb(main):015:0> YAML.load( "abc: asd#ARCH#fds" ) => { "abc" => "asd#ARCH#fds" } It seems that Kwalify yaml reader is different than built-in.
        Hide
        Marek Goldmann
        added a comment -

        Fixed (not completely) here: https://github.com/boxgrinder/boxgrinder-core/commit/7f09e2ebb206d9f11a76e53c77c4e2a55ef93cad

        If the repo URL contains variables - it must be quoted. This note will be added to docs: http://boxgrinder.org/tutorials/appliance-definition/

        BAD:

        repos:
          - name: "boxgrinder-ci-noarch"
            baseurl: http://repo.ci.boxgrinder.org/#OS_NAME#/#OS_VERSION#/RPMS/
        

        GOOD:

        repos:
          - name: "boxgrinder-ci-noarch"
            baseurl: "http://repo.ci.boxgrinder.org/#OS_NAME#/#OS_VERSION#/RPMS/"
        
        Show
        Marek Goldmann
        added a comment - Fixed (not completely) here: https://github.com/boxgrinder/boxgrinder-core/commit/7f09e2ebb206d9f11a76e53c77c4e2a55ef93cad If the repo URL contains variables - it must be quoted . This note will be added to docs: http://boxgrinder.org/tutorials/appliance-definition/ BAD: repos: - name: "boxgrinder-ci-noarch" baseurl: http: //repo.ci.boxgrinder.org/#OS_NAME#/#OS_VERSION#/RPMS/ GOOD: repos: - name: "boxgrinder-ci-noarch" baseurl: "http: //repo.ci.boxgrinder.org/#OS_NAME#/#OS_VERSION#/RPMS/"
        Show
        Marek Goldmann
        added a comment - Updated: http://boxgrinder.org/tutorials/appliance-definition-parameters/
        Hide
        Marc Savy
        added a comment -

        Changed the testing appliances to quoted string

        Show
        Marc Savy
        added a comment - Changed the testing appliances to quoted string
        Hide
        Marc Savy
        added a comment -

        This seems to fix the issue, although I'm not sure if we should really use the YAML comment for any of our syntax. I'll close the issue, hopefully we can come back to it later. The Kwalify parser gives us line-numbers which is far more useful to the user.

        Show
        Marc Savy
        added a comment - This seems to fix the issue, although I'm not sure if we should really use the YAML comment for any of our syntax. I'll close the issue, hopefully we can come back to it later. The Kwalify parser gives us line-numbers which is far more useful to the user.

          People

          • Assignee:
            Marek Goldmann
            Reporter:
            Marc Savy
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: