Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add license headers in all files #212

Closed
giampaolo opened this issue May 23, 2014 · 24 comments
Closed

Add license headers in all files #212

giampaolo opened this issue May 23, 2014 · 24 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on September 29, 2011 18:09:49

Hi, 

I am using psutil in the chromium project. The issue 
https://code.google.com/p/chromium/issues/detail?id=98456 requires all files to 
have proper license headers and the changes should happen in upstream project. 
The example of license headers can be found in 
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/libjpeg/jcapimin.c?view=markup
 The details can be found in 
http://www.chromium.org/developers/adding-3rd-party-libraries .

If you have questions, please let me know.

Thank you.

Original issue: http://code.google.com/p/psutil/issues/detail?id=212

@giampaolo
Copy link
Owner Author

From g.rodola on September 29, 2011 09:15:46

Can you provide a patch?

@giampaolo
Copy link
Owner Author

From [email protected] on September 29, 2011 09:32:16

OK. I tried to modify the setup.py as the first step and the code below passes 
the license check. Does this look OK? If this looks OK, I will modify the rest 
of files and create a patch.

Index: setup.py
===================================================================
--- setup.py    ( revision 1137 )
+++ setup.py    (working copy)
@@ -2,6 +2,9 @@
 #
 # $Id$
 #
+# psutil is distributed under BSD license.
+# Copyright (c) 2009, Jay Loden, Dave Daeschler, Giampaolo Rodola'
+# All rights reserved.

 import sys
 import os

@giampaolo
Copy link
Owner Author

From [email protected] on September 29, 2011 09:40:09

"BSD license" in general is too vague. You should at least say how many 
clauses, but ideally just include the full BSD header.

@giampaolo
Copy link
Owner Author

From [email protected] on September 29, 2011 09:53:43

OK. here you go.

--- setup.py    ( revision 1137 )
+++ setup.py    (working copy)
@@ -2,6 +2,33 @@
 #
 # $Id$
 #
+# psutil is distributed under BSD license reproduced below.
+#
+# Copyright (c) 2009, Jay Loden, Dave Daeschler, Giampaolo Rodola'
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
modification,
+# are permitted provided that the following conditions are met:
+#
+#  * Redistributions of source code must retain the above copyright notice, this
+#    list of conditions and the following disclaimer.
+#  * Redistributions in binary form must reproduce the above copyright notice,
+#    this list of conditions and the following disclaimer in the documentation
+#    and/or other materials provided with the distribution.
+#  * Neither the name of the psutil authors nor the names of its contributors
+#    may be used to endorse or promote products derived from this software without
+#    specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@giampaolo
Copy link
Owner Author

From g.rodola on September 29, 2011 10:05:31

Mmm... why is this necessary?
Is it a Google/Chromium policy not to use anything which does not comply with 
this requirement?
Do you need this because you're going to include only some parts of psutil 
instead of the whole package?

Copying that text everywhere in the source code base is both a maintainance 
burden in case we'll ever change the license, and also unnecessary considering 
we already provide a LICENSE file (which became a semi-standard for any open 
source project).

@giampaolo
Copy link
Owner Author

From [email protected] on September 29, 2011 11:06:52

imasaki, the above patch looks OK to me, in fact the "psutil is distributed 
under BSD license reproduced below." part is not necessary.

In general, yeah, we're adopting a policy enforced by automated scripts to 
verify license of each individual file. This will make it significantly easier 
for Debian, Ubuntu, and other packagers of Chromium code to do an automated 
verification of that info.

Note that it's fine to have a shorter license header like one Chromium uses:

// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Although full license text is even better because it can be recognized by more tools.

Anyway, the point is that LICENSE files can be ambiguous in case a project 
(like Chromium) uses bundled libraries. There is one top-level LICENSE files, 
but libraries in third_party also have their own LICENSE files, and those 
libraries sometimes have their own LICENSE files too. Sometimes people don't 
include LICENSE files, and sometimes they just forget about them.

Scanning individual files seems to be the most reliable way to automate the 
process, and at Chromium scale, with multiple third party libraries, we're 
really looking for more automation.

Please note that what I wrote is more or less the same as 
http://producingoss.com/en/license-quickstart.html#license-quickstart-applying 
, which also says about having some kind of notice in each file.

@giampaolo
Copy link
Owner Author

From g.rodola on September 29, 2011 12:32:37

Does this prevent psutil from being included in chromium project?
Other than chromium project, are you aware of other projects which might be 
limited in a similar manner (distributions, commercial products, etc...)?
If those are not the cases I'd better off leving my source files alone, 
otherwise I think we can include a version of the license as shortened as possible.

@giampaolo
Copy link
Owner Author

From g.rodola on September 29, 2011 12:36:18

What I really mean is: other than chromium, suits and an automated cmdline 
tool, who else are we gonna make happy? =)

@giampaolo
Copy link
Owner Author

From [email protected] on September 29, 2011 13:12:06

Under the new rules ( 
http://www.chromium.org/developers/adding-3rd-party-libraries ) there would be 
problems with including psutil in the Chromium code (I'm not going to say 
impossible, but the intention is to pass this automated check for all new code, 
and fix existing cases too).

@giampaolo
Copy link
Owner Author

From [email protected] on October 04, 2011 16:28:06

Hi, 

Can you let us know what you think?  I can include shorter version like the one below.

# Copyright (c) 2009, Jay Loden, Dave Daeschler, Giampaolo Rodola'  All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

@giampaolo
Copy link
Owner Author

From [email protected] on October 04, 2011 16:55:28

This looks good to me. I think our existing checker should recognize that.

@giampaolo
Copy link
Owner Author

From g.rodola on October 05, 2011 02:41:15

Ok, it is fine with me as well.
Before committing, are you sure it passes all the necessary cmdline checkers?

Labels: -Type-Defect Type-Enhancement

@giampaolo
Copy link
Owner Author

From [email protected] on October 05, 2011 09:43:14

I commented about that in comment #11 right above. Please note that it's going 
to make Chromium's version of licensecheck pass (we have a patch to recognize 
"BSD-like"), but not vanilla Debian's licensecheck for which you'd need full 
BSD license text. Up to you of course. I'm fine with just BSD-like.

@giampaolo
Copy link
Owner Author

From [email protected] on October 05, 2011 10:00:38

This is the patch for this. Please take a look at it.

Thanks.

Attachment: psutil_licence_patch

@giampaolo
Copy link
Owner Author

From [email protected] on October 05, 2011 10:01:08

I made sure this patch passes the licence check.

@giampaolo
Copy link
Owner Author

From g.rodola on October 05, 2011 11:50:13

Committed in r1142 .
I also removed Dave Daeschler from authors as he only contributed a bunch of 
commits when we started developing 2 years ago.
Please let me know if chromium lincence checker now passes.

Labels: Milestone-0.3.1

@giampaolo
Copy link
Owner Author

From [email protected] on October 05, 2011 12:09:26

The following files under examples are failing: 

./examples/disk_usage.py' has non-whitelisted license 'UNKNOWN'
./examples/process_detail.py' has non-whitelisted license 'UNKNOWN'
./examples/iotop.py' has non-whitelisted license 'UNKNOWN'
'./examples/killall.py' has non-whitelisted license 'UNKNOWN

Can you make the same change to these files?

@giampaolo
Copy link
Owner Author

From g.rodola on October 05, 2011 12:13:31

Done in r1143 .

@giampaolo
Copy link
Owner Author

From [email protected] on October 05, 2011 12:55:01

Thanks. It passes now. Thanks for following up. You can close this.

@giampaolo
Copy link
Owner Author

From g.rodola on October 17, 2011 15:38:35

Status: FixedInSVN

@giampaolo
Copy link
Owner Author

From g.rodola on October 21, 2011 16:44:17

Labels: -Milestone-0.3.1

@giampaolo
Copy link
Owner Author

From g.rodola on October 21, 2011 16:45:27

Labels: Milestone-0.4.0

@giampaolo
Copy link
Owner Author

From g.rodola on October 28, 2011 20:44:14

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:03:56

Updated csets after the SVN -> Mercurial migration: r1142 == revision 
524deba8b264 r1143 == revision e7fe7aa77664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant