nikademus79 / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Add license headers in all files #212

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 

I am using psutil in the chromium project. The issue 
http://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?v
iew=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 reported on code.google.com by imas...@chromium.org on 29 Sep 2011 at 4:09

GoogleCodeExporter commented 8 years ago
Can you provide a patch?

Original comment by g.rodola on 29 Sep 2011 at 4:15

GoogleCodeExporter commented 8 years ago
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

Original comment by imas...@chromium.org on 29 Sep 2011 at 4:32

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

Original comment by phajdan.jr@chromium.org on 29 Sep 2011 at 4:40

GoogleCodeExporter commented 8 years ago
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.

Original comment by imas...@chromium.org on 29 Sep 2011 at 4:53

GoogleCodeExporter commented 8 years ago
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).

Original comment by g.rodola on 29 Sep 2011 at 5:05

GoogleCodeExporter commented 8 years ago
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.

Original comment by phajdan.jr@chromium.org on 29 Sep 2011 at 6:06

GoogleCodeExporter commented 8 years ago
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.

Original comment by g.rodola on 29 Sep 2011 at 7:32

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

Original comment by g.rodola on 29 Sep 2011 at 7:36

GoogleCodeExporter commented 8 years ago
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).

Original comment by phajdan.jr@chromium.org on 29 Sep 2011 at 8:12

GoogleCodeExporter commented 8 years ago
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.

Original comment by imas...@google.com on 4 Oct 2011 at 11:28

GoogleCodeExporter commented 8 years ago
This looks good to me. I think our existing checker should recognize that.

Original comment by phajdan.jr@chromium.org on 4 Oct 2011 at 11:55

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

Original comment by g.rodola on 5 Oct 2011 at 9:41

GoogleCodeExporter commented 8 years ago
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.

Original comment by phajdan.jr@chromium.org on 5 Oct 2011 at 4:43

GoogleCodeExporter commented 8 years ago
This is the patch for this. Please take a look at it.

Thanks.

Original comment by imas...@chromium.org on 5 Oct 2011 at 5:00

Attachments:

GoogleCodeExporter commented 8 years ago
I made sure this patch passes the licence check.

Original comment by imas...@chromium.org on 5 Oct 2011 at 5:01

GoogleCodeExporter commented 8 years ago
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.

Original comment by g.rodola on 5 Oct 2011 at 6:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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?

Original comment by imas...@chromium.org on 5 Oct 2011 at 7:09

GoogleCodeExporter commented 8 years ago
Done in r1143.

Original comment by g.rodola on 5 Oct 2011 at 7:13

GoogleCodeExporter commented 8 years ago
Thanks. It passes now. Thanks for following up. You can close this.

Original comment by imas...@chromium.org on 5 Oct 2011 at 7:55

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 17 Oct 2011 at 10:38

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 21 Oct 2011 at 11:44

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 21 Oct 2011 at 11:45

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 29 Oct 2011 at 3:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r1142 == revision 524deba8b264
r1143 == revision e7fe7aa77664

Original comment by g.rodola on 2 Mar 2013 at 12:03