Whirr
  1. Whirr
  2. WHIRR-250

Ensure all libraries in binary distribution have associated licenses where stipulated

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      As pointed out on general@incubator (http://mail-archives.apache.org/mod_mbox/incubator-general/201103.mbox/%3C87aah5g30g.fsf@v35516.1blu.de%3E) we need to make sure that jars in the binary distribution have associated licenses. The upgrade to jclouds beta-9 added/renamed jars.

      1. WHIRR-250.patch
        193 kB
        Tom White
      2. WHIRR-250.patch
        282 kB
        Tom White
      3. WHIRR-250.patch
        292 kB
        Andrei Savu

        Activity

        Hide
        Tom White added a comment -

        If you look in the lib directory of the binary distibution, some libraries don't have an associated license file - either within the JAR itself, or in the lib directory.

        There's some related discussion on WHIRR-100, when we last did this. Basically, every time we add or update a JAR we need to check whether a license file needs adding. It's a manual process, but I don't know a better way.

        Trunk is on a different version of jclouds (beta-9b) to the 0.4.0 branch (beta-9), so I suggest that we fix this on trunk and recut 0.4.0. Otherwise we need to do this process twice, and there seem to be quite a few changes to JARs between these two jclouds releases.

        Also, the naming of the new jclouds provider JARs makes this harder than before, since before all jclouds JARs had a "jclouds" prefix so we only needed one license file. Now they don't have a "jclouds" prefix (e.g. aws-common-1.0-beta-9b.jar) so it's not clear that they are jclouds related, so we need an accompanying file in lib for each one (as I understand it). We might also consider only shipping the jars for the cloud providers that we currently support.

        Show
        Tom White added a comment - If you look in the lib directory of the binary distibution, some libraries don't have an associated license file - either within the JAR itself, or in the lib directory. There's some related discussion on WHIRR-100 , when we last did this. Basically, every time we add or update a JAR we need to check whether a license file needs adding. It's a manual process, but I don't know a better way. Trunk is on a different version of jclouds (beta-9b) to the 0.4.0 branch (beta-9), so I suggest that we fix this on trunk and recut 0.4.0. Otherwise we need to do this process twice, and there seem to be quite a few changes to JARs between these two jclouds releases. Also, the naming of the new jclouds provider JARs makes this harder than before, since before all jclouds JARs had a "jclouds" prefix so we only needed one license file. Now they don't have a "jclouds" prefix (e.g. aws-common-1.0-beta-9b.jar) so it's not clear that they are jclouds related, so we need an accompanying file in lib for each one (as I understand it). We might also consider only shipping the jars for the cloud providers that we currently support.
        Hide
        Tom White added a comment -

        An initial patch - haven't looked at all the jclouds provider libraries yet.

        Show
        Tom White added a comment - An initial patch - haven't looked at all the jclouds provider libraries yet.
        Hide
        Andrei Savu added a comment -

        +1 for shipping only the jars for the cloud providers that we support.

        Show
        Andrei Savu added a comment - +1 for shipping only the jars for the cloud providers that we support.
        Hide
        Tom White added a comment -

        I created http://code.google.com/p/jclouds/issues/detail?id=503 to request that jclouds add LICENSE files to its published JARs.

        Show
        Tom White added a comment - I created http://code.google.com/p/jclouds/issues/detail?id=503 to request that jclouds add LICENSE files to its published JARs.
        Hide
        Tom White added a comment -

        Updated patch to remove unsupported jclouds providers. Each jar in lib either has a license alongside, or inside it. I checked this with:

        mvn -DskipTests clean package assembly:directory
        
        for jar in target/whirr-*-incubating-SNAPSHOT/whirr-*-incubating-SNAPSHOT/lib/*.jar; do
          if [ ! -e lib/$(basename $jar .jar)-LICENSE.txt ]; then
            if ! jar tf $jar | grep -q LICENSE; then
              echo "No LICENSE file for $(basename $jar) (either in or alongside the JAR)"
            fi
          fi
        done
        

        The only exception is aopalliance-1.0.jar (public domain) and the jclouds JARS starting with "jclouds" - these are covered by a single license file.

        Show
        Tom White added a comment - Updated patch to remove unsupported jclouds providers. Each jar in lib either has a license alongside, or inside it. I checked this with: mvn -DskipTests clean package assembly:directory for jar in target/whirr-*-incubating-SNAPSHOT/whirr-*-incubating-SNAPSHOT/lib/*.jar; do if [ ! -e lib/$(basename $jar .jar)-LICENSE.txt ]; then if ! jar tf $jar | grep -q LICENSE; then echo "No LICENSE file for $(basename $jar) (either in or alongside the JAR)" fi fi done The only exception is aopalliance-1.0.jar (public domain) and the jclouds JARS starting with "jclouds" - these are covered by a single license file.
        Hide
        Andrei Savu added a comment -

        +1 (maybe we should create a script with that snippet. It's going to be useful in the following releases)

        Show
        Andrei Savu added a comment - +1 (maybe we should create a script with that snippet. It's going to be useful in the following releases)
        Hide
        Andrei Savu added a comment -

        I've also added cloudservers-uk to the list of supported cloud providers.

        Show
        Andrei Savu added a comment - I've also added cloudservers-uk to the list of supported cloud providers.
        Hide
        Tom White added a comment -

        +1

        Show
        Tom White added a comment - +1
        Hide
        Andrei Savu added a comment -

        I've just committed this. Thanks Tom!

        Show
        Andrei Savu added a comment - I've just committed this. Thanks Tom!

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development