Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-17352

Fix hbase-assembly build with bash 4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.4.0, 1.2.6, 1.3.2, 1.1.11, 2.0.0
    • None
    • None
    • Reviewed

    Description

      hbase-assembly fails to build with bash 4.

      [DEBUG] Executing command line: [env, bash, -c, cat maven-shared-archive-resources/META-INF/NOTICE \
                        `find /Users/jg/github/hbase/hbase-assembly/target/dependency -iname NOTICE -or -iname NOTICE.txt` \]
      
      [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (concat-NOTICE-files) on project hbase-assembly: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (concat-NOTICE-files) on project hbase-assembly: Command execution failed.
      

      The error is caused by the trailing backslash in the bash command for concat-NOTICE-files. You can see the behavioral difference between bash 3 and 4 with the following snippet.

      $ # Using bash 3
      $ /bin/bash -c 'cat <(echo foo) \' && echo good || echo bad
      foo
      good
      
      $ # Using bash 4
      $ /usr/local/bin/bash -c 'cat <(echo foo) \' && echo good || echo bad
      foo
      cat: \: No such file or directory
      bad
      

      Attachments

        1. HBASE-17352.patch
          1.0 kB
          Junegunn Choi

        Activity

          People

            junegunn Junegunn Choi
            junegunn Junegunn Choi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: