Kafka
  1. Kafka
  2. KAFKA-141

Check and make sure that the files that have been donated have been updated to reflect the new ASF copyright

    Details

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

      Description

      Check and make sure that the files that have been donated have been updated to reflect the new ASF copyright

      1. rat.out
        346 kB
        Chris Burroughs
      2. patch.licence
        10 kB
        Lorenzo Alberton
      3. KAFKA-141-cpp.patch
        1.24 MB
        Neha Narkhede
      4. KAFKA-141.patch
        2 kB
        Neha Narkhede
      5. KAFKA-141.patch
        107 kB
        Neha Narkhede
      6. KAFKA-141.patch
        92 kB
        Neha Narkhede
      7. kafka-0.7-RC1-rat.report
        311 kB
        Neha Narkhede
      8. kafka-0.7.0-RC1.rat
        255 kB
        Neha Narkhede
      9. cpp-license.patch
        1.23 MB
        Lorenzo Alberton

        Activity

        Hide
        Jun Rao added a comment -

        For ASF copyright, I guess we only care about java/scala source files, not other configuration, script files. Is that correct?

        Show
        Jun Rao added a comment - For ASF copyright, I guess we only care about java/scala source files, not other configuration, script files. Is that correct?
        Hide
        Henry Saputra added a comment -

        I think have changed the old style of ASF license but have not added one to the files that didnt have one before.

        Show
        Henry Saputra added a comment - I think have changed the old style of ASF license but have not added one to the files that didnt have one before.
        Hide
        Alan Cabrera added a comment -

        You'd be surprised at what has to have the ASF header. We need to run rat.

        Show
        Alan Cabrera added a comment - You'd be surprised at what has to have the ASF header. We need to run rat.
        Hide
        Chris Burroughs added a comment -

        Could not get the excludes to work, but a sample RAT run is attached.

        Show
        Chris Burroughs added a comment - Could not get the excludes to work, but a sample RAT run is attached.
        Hide
        Neha Narkhede added a comment -

        Ran RAT on a fresh checkout of Kafka. It complains the following didn't have the Apache header -

        1. most clients
        2. all files in config and bin
        3. Some tests. Attaching a patch for that
        4. perf directory. https://issues.apache.org/jira/browse/KAFKA-149 is filed to delete this.

        We still haven't heard back about whether 1 & 3 should have the header or not ?

        Show
        Neha Narkhede added a comment - Ran RAT on a fresh checkout of Kafka. It complains the following didn't have the Apache header - 1. most clients 2. all files in config and bin 3. Some tests. Attaching a patch for that 4. perf directory. https://issues.apache.org/jira/browse/KAFKA-149 is filed to delete this. We still haven't heard back about whether 1 & 3 should have the header or not ?
        Hide
        Jun Rao added a comment -

        +1 on the patch that fixes the tests.

        Show
        Jun Rao added a comment - +1 on the patch that fixes the tests.
        Hide
        Neha Narkhede added a comment -

        Attaching an updated patch, where I've added the ASF header to all files, except a few ones in the clients directory.

        Also, attaching an updated rat output.

        I hope owners of the clients can step up and clean their files to replace their custom headers with ASF headers

        Show
        Neha Narkhede added a comment - Attaching an updated patch, where I've added the ASF header to all files, except a few ones in the clients directory. Also, attaching an updated rat output. I hope owners of the clients can step up and clean their files to replace their custom headers with ASF headers
        Hide
        Joel Koshy added a comment -

        That's a big patch

        The hashbangs do need to be on the first line of the file, so we'll need to move the header after #! if present.

        There is something weird with the cs files: the original files have a BOM (http://en.wikipedia.org/wiki/Byte_order_mark) in them, which is visible with a hexdump of the original file. If you apply this patch, and open the patched cs file with vim/more/less there is a visible <FEFF>, which is another BOM. Since it is not at the beginning of the file it is visible and may cause compilation issues.

        Show
        Joel Koshy added a comment - That's a big patch The hashbangs do need to be on the first line of the file, so we'll need to move the header after #! if present. There is something weird with the cs files: the original files have a BOM ( http://en.wikipedia.org/wiki/Byte_order_mark ) in them, which is visible with a hexdump of the original file. If you apply this patch, and open the patched cs file with vim/more/less there is a visible <FEFF>, which is another BOM. Since it is not at the beginning of the file it is visible and may cause compilation issues.
        Hide
        Neha Narkhede added a comment -

        Good catch, Joel. I corrected the .sh files and reverted the csharp files. I think those client owners can help cleaning up their code, since they best understand it.

        Show
        Neha Narkhede added a comment - Good catch, Joel. I corrected the .sh files and reverted the csharp files. I think those client owners can help cleaning up their code, since they best understand it.
        Hide
        Lorenzo Alberton added a comment - - edited

        Added patch to fix the Apache license for the C++ client. Alternatively to the patch, you can apply the following steps (comments have *** before them):

            • When in the kafka root
            • Remove autogen files

        rm -rfv clients/cpp/

        {build-aux,aclocal.m4,Makefile.in,configure}
            • Apply patch for readme

        diff --git a/clients/cpp/README.md b/clients/cpp/README.md
        index e0bcd50..33f69f1 100644
        — a/clients/cpp/README.md
        +++ b/clients/cpp/README.md
        @@ -10,6 +10,7 @@ http://gcc.gnu.org/
        http://www.boost.org/

        ```bash
        +./autoconf.sh
        ./configure
        ```

            • And then make a file called clients/cpp/autoconf.sh with the contents

        #!/bin/sh

        1. We need libtool for ./configure && make && make install stage
          command -v libtool
          if [ $? -ne 0 ]; then
          echo "autoconf.sh: error: unable to locate libtool"
          exit 1
          fi
        1. We need autoreconf to build the ./configure script
          command -v autoreconf
          if [ $? -ne 0 ]; then
          echo "autoconf.sh: error: unable to locate autoreconf"
          exit 1
          fi

        mkdir -p ./build-aux/m4
        autoreconf --verbose --force --install

            • Finally make the file executable

        chmod +x clients/cpp/autoconf.sh

        Show
        Lorenzo Alberton added a comment - - edited Added patch to fix the Apache license for the C++ client. Alternatively to the patch, you can apply the following steps (comments have *** before them): When in the kafka root Remove autogen files rm -rfv clients/cpp/ {build-aux,aclocal.m4,Makefile.in,configure} Apply patch for readme diff --git a/clients/cpp/README.md b/clients/cpp/README.md index e0bcd50..33f69f1 100644 — a/clients/cpp/README.md +++ b/clients/cpp/README.md @@ -10,6 +10,7 @@ http://gcc.gnu.org/ http://www.boost.org/ ```bash +./autoconf.sh ./configure ``` And then make a file called clients/cpp/autoconf.sh with the contents #!/bin/sh We need libtool for ./configure && make && make install stage command -v libtool if [ $? -ne 0 ]; then echo "autoconf.sh: error: unable to locate libtool" exit 1 fi We need autoreconf to build the ./configure script command -v autoreconf if [ $? -ne 0 ]; then echo "autoconf.sh: error: unable to locate autoreconf" exit 1 fi mkdir -p ./build-aux/m4 autoreconf --verbose --force --install Finally make the file executable chmod +x clients/cpp/autoconf.sh
        Hide
        Neha Narkhede added a comment -

        -1

        The license header is missing in atleast the following files -

        clients/cpp/src/tests/encoder_helper_tests.cpp
        clients/cpp/src/tests/encoder_tests.cpp
        clients/cpp/src/tests/producer_tests.cpp
        clients/cpp/src/encoder_helper.hpp
        clients/cpp/src/producer.cpp
        clients/cpp/src/encoder.hpp
        clients/cpp/src/producer.hpp
        clients/cpp/src/example.cpp

        Please make sure all the files in the cpp directory have the Apache license header.

        Show
        Neha Narkhede added a comment - -1 The license header is missing in atleast the following files - clients/cpp/src/tests/encoder_helper_tests.cpp clients/cpp/src/tests/encoder_tests.cpp clients/cpp/src/tests/producer_tests.cpp clients/cpp/src/encoder_helper.hpp clients/cpp/src/producer.cpp clients/cpp/src/encoder.hpp clients/cpp/src/producer.hpp clients/cpp/src/example.cpp Please make sure all the files in the cpp directory have the Apache license header.
        Hide
        Neha Narkhede added a comment -

        Taking Lorenzo's patch and fixing the remaining files to add the Apache license header to it.

        Show
        Neha Narkhede added a comment - Taking Lorenzo's patch and fixing the remaining files to add the Apache license header to it.
        Hide
        Jun Rao added a comment -

        +1 on KAFKA-141-cpp.patch

        Show
        Jun Rao added a comment - +1 on KAFKA-141 -cpp.patch
        Hide
        Neha Narkhede added a comment -

        Thanks. Just committed this and resolved the ticket

        Show
        Neha Narkhede added a comment - Thanks. Just committed this and resolved the ticket
        Hide
        Lorenzo Alberton added a comment -

        Patch to add license to all files

        Show
        Lorenzo Alberton added a comment - Patch to add license to all files
        Hide
        Lorenzo Alberton added a comment -

        oh, I didn't notice you already fixed the files. Ignore the latest patch.

        Show
        Lorenzo Alberton added a comment - oh, I didn't notice you already fixed the files. Ignore the latest patch.

          People

          • Assignee:
            Neha Narkhede
            Reporter:
            Alan Cabrera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development