You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/04/08 02:31:19 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new pull request #4621: Reduce Weasel exceptions

zrhoffman opened a new pull request #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621
 
 
   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   This PR:
   *  Adds the Apache License Version 2.0 to the following files:
       - cron jobs
       - .dependency_license
       - .gitattributes
       - gitignores
       - .mailmap
       - traffic_portal/.jshintrc - It is JSON-C, so it can handle comments
       - traffic_router/core/.pmd
       - traffic_router/core/src/main/conf/COMODOHigh-AssuranceSecureServerCA.crt
   * Removes CSVs, .classpath, .test, and specific TTF files from patterns that Weasel does not check
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - CDN in a Box
   - Traffic Control Client - Python, Java
   - Traffic Monitor
   - Traffic Ops
   - Traffic Ops ORT
   - Traffic Portal
   - Traffic Router
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   - Build affected components
   - Run weasel
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   <!-- If this PR fixes a bug, please list here all of the affected versions - to
   the best of your knowledge. It's also pretty helpful to include a commit hash
   of where 'master' is at the time this PR is opened (if it affects master),
   because what 'master' means will change over time. For example, if this PR
   fixes a bug that's present in master (at commit hash '1df853c8'), in v4.0.0,
   and in the current 4.0.1 Release candidate (e.g. RC1), then this list would
   look like:
   
   - master (1df853c8)
   - 4.0.0
   - 4.0.1 (RC1)
   
   If you don't know what other versions might have this bug, AND don't know how
   to find the commit hash of 'master', then feel free to leave this section
   blank (or, preferably, delete it entirely).
    -->
   Not a bug fix.
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] Only comments are added, no tests are necessary
   - [x] This PR includes documentation
   - [x] An update to CHANGELOG.md is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
rawlinp commented on a change in pull request #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#discussion_r406360738
 
 

 ##########
 File path: vendor/gopkg.in/fsnotify.v1/.gitignore
 ##########
 @@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
 
 Review comment:
   This isn't technically our code since it's a vendored dependency -- are we allowed to add the license here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#discussion_r406380373
 
 

 ##########
 File path: vendor/gopkg.in/fsnotify.v1/.gitignore
 ##########
 @@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
 
 Review comment:
   My mistake, I meant to exclude all vendored files from the gitignore commit, I must have missed one. Needless to say, Weasel doesn't mind if there's no license there. Removed in 2f75f3a3fa.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] rob05c commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
rob05c commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611151862
 
 
   >No I mean exempt as in they aren't legally required to have license headers. I can't remember why I think that, though, so it might be totally wrong.
   
   https://www.apache.org/legal/src-headers.html
   
   > What files in an Apache release do not require a license header?
   > 
   > A file without any degree of creativity in either its literal elements or its structure is not protected by copyright law; therefore, such a file does not require a license header. If in doubt about the extent of the file's creativity, add the license header to the file.
   > 
   > Other files may make sense to have no license header. Three examples are:
   > 
   >     Short informational text files; for example README, INSTALL files. The expectation is that these files make it obvious which product they relate to.
   >     Test data for which the addition of a source header would cause the tests to fail.
   >     'Snippet' files that are combined as form a larger file where the larger file would have duplicate licensing headers.
   > 
   > PMCs should use their judgement, err on having a source header and contact legal-discuss@ if unsure. 
   
   I believe files like .gitignore fall under "without any degree of creativity."
   
   That said, our general policy has been to put license headers in all files that are possible, and since .gitignore and .gitattributes support comments, I'd vote we do, and "err on having a source header."

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611144388
 
 
   No I mean exempt as in they aren't legally required to have license headers. I can't remember why I think that, though, so it might be totally wrong.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-610721558
 
 
   So I'm not sure about this (or it'd be in a review, not a comment) but I *think* that git (`.gitignore`, `.gitkeep`, `.gitattributes` etc.) files are exempt from needing the header.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-610722295
 
 
   They were. .gitattributes was exempt until 7c182b6309, gitignores were exempt until 74169894ab.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] ocket8888 commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611237386
 
 
   I guess I don't care if we add headers to files that don't actually need them. It is good to know that I was right about exemptions, though. Sort of sounds like we don't even need license headers in our TP templates/controllers/services either...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611149999
 
 
   Not exempt. After adding a .gitignore on this branch and running Weasel:
   ```
   Error                                 Unknown! needs-license/.gitignore
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] rob05c commented on a change in pull request #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
rob05c commented on a change in pull request #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#discussion_r406376267
 
 

 ##########
 File path: vendor/gopkg.in/fsnotify.v1/.gitignore
 ##########
 @@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
 
 Review comment:
   Nope. Good catch. We shouldn't be touching vendored stuff, other people's code has its own licensing documentation in LICENSE.
   
   Moreover, touching vendored stuff runs the risk of creating a Derivative Work, which has its own legal and copyright implications and we may or may not have the rights to do. So we should avoid modifying files we don't own if at all possible.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] alficles commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
alficles commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611598894
 
 
   Yeah, the bar for "no degree of creativity" is pretty high, I think. Adding the headers is easy and makes it clear. The first job of the license header is to let people know precisely what rights they do and do not have to use a particular project, file or bit of code. This all looks like progress forward to me.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [trafficcontrol] zrhoffman commented on issue #4621: Reduce Weasel exceptions

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #4621: Reduce Weasel exceptions
URL: https://github.com/apache/trafficcontrol/pull/4621#issuecomment-611212836
 
 
   IMO, "without any degree of creativity" does not cover files with comments, which our repo's root gitignore has.
   
   Licensing gitignores definitely isn't a *must*. That said, there seems to be [a number of repos](https://github.com/search?q=filename:.gitignore+"Apache+License"+org:apache&type=Code) within @apache alone that license their gitignores, [including apache/tomcat](https://github.com/apache/tomcat/blob/master/.gitignore).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services