You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/02/22 15:10:30 UTC
[incubator-pekko] branch main updated: acknowledge smhasher copyright but add apache license header (#159)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new de1a5e3b37 acknowledge smhasher copyright but add apache license header (#159)
de1a5e3b37 is described below
commit de1a5e3b373efb9df361ec5b8412ef3c3d5b259b
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Wed Feb 22 16:10:24 2023 +0100
acknowledge smhasher copyright but add apache license header (#159)
* acknowledge lamp/epfl copyright but add apache license header
* scalafmt
* latest attempt
* Update LICENSE
* add Austin Appleby attribution
* remove debian check
* Update CopyrightHeader.scala
* add source license changes for MurmurHash and introduce more jar specific licenses
* scalafmt
* update comment
---
LICENSE | 8 ++++++++
.../org/apache/pekko/routing/MurmurHash.scala | 14 +++++++++++++
build.sbt | 3 ++-
LICENSE => legal/pekko-actor-jar-license.txt | 8 +++++---
LICENSE => legal/pekko-protobuf-jar-license.txt | 0
LICENSE => legal/pekko-protobuf-v3-jar-license.txt | 4 ++--
project/AddMetaInfLicenseFiles.scala | 24 ++++++++++++++++++++--
project/CopyrightHeader.scala | 22 ++++++++------------
8 files changed, 62 insertions(+), 21 deletions(-)
diff --git a/LICENSE b/LICENSE
index d58aebf02a..9fdbc9c8d2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -202,6 +202,14 @@
---------------
+pekko-actor contains MurmurHash.scala which is derived from MurmurHash3,
+written by Austin Appleby. He has placed his code in the public domain.
+The author has disclaimed copyright to that source code.
+MurmurHash.scala also contains changes made by the Scala-Lang team under an Apache 2.0 license.
+Copyright (c) 2003-2011, LAMP/EPFL
+
+---------------
+
pekko-protobuf contains the sources of Google protobuf 2.5.0 runtime support,
moved into the source package `org.apache.pekko.protobuf` so as to avoid version conflicts.
For license information see COPYING.protobuf
diff --git a/actor/src/main/scala/org/apache/pekko/routing/MurmurHash.scala b/actor/src/main/scala/org/apache/pekko/routing/MurmurHash.scala
index bd6a011754..104b113302 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/MurmurHash.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/MurmurHash.scala
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * license agreements; and to You under the Apache License, version 2.0:
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * This file is part of the Apache Pekko project, derived from Akka.
+ */
+
+//-----------------------------------------------------------------------------
+// MurmurHash3 was written by Austin Appleby, and is placed in the public
+// domain. The author hereby disclaims copyright to this source code.
+//-----------------------------------------------------------------------------
+
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
diff --git a/build.sbt b/build.sbt
index 97498974f7..ed68a14301 100644
--- a/build.sbt
+++ b/build.sbt
@@ -112,6 +112,7 @@ lazy val actor = pekkoModule("actor")
.settings(Dependencies.actor)
.settings(OSGi.actor)
.settings(AutomaticModuleName.settings("pekko.actor"))
+ .settings(AddMetaInfLicenseFiles.actorSettings)
.settings(Compile / unmanagedSourceDirectories += {
val ver = scalaVersion.value.take(4)
(Compile / scalaSource).value.getParentFile / s"scala-$ver"
@@ -355,7 +356,7 @@ lazy val protobuf = pekkoModule("protobuf")
lazy val protobufV3 = pekkoModule("protobuf-v3")
.settings(OSGi.protobufV3)
.settings(AutomaticModuleName.settings("pekko.protobuf.v3"))
- .settings(AddMetaInfLicenseFiles.protobufSettings)
+ .settings(AddMetaInfLicenseFiles.protobufV3Settings)
.enablePlugins(ScaladocNoVerificationOfDiagrams)
.disablePlugins(MimaPlugin)
.settings(
diff --git a/LICENSE b/legal/pekko-actor-jar-license.txt
similarity index 97%
copy from LICENSE
copy to legal/pekko-actor-jar-license.txt
index d58aebf02a..ef6bc1a47a 100644
--- a/LICENSE
+++ b/legal/pekko-actor-jar-license.txt
@@ -202,6 +202,8 @@
---------------
-pekko-protobuf contains the sources of Google protobuf 2.5.0 runtime support,
-moved into the source package `org.apache.pekko.protobuf` so as to avoid version conflicts.
-For license information see COPYING.protobuf
+pekko-actor contains MurmurHash.scala which is derived from MurmurHash3,
+written by Austin Appleby. He has placed his code in the public domain.
+The author has disclaimed copyright to that source code.
+MurmurHash.scala also contains changes made by the Scala-Lang team under an Apache 2.0 license.
+Copyright (c) 2003-2011, LAMP/EPFL
diff --git a/LICENSE b/legal/pekko-protobuf-jar-license.txt
similarity index 100%
copy from LICENSE
copy to legal/pekko-protobuf-jar-license.txt
diff --git a/LICENSE b/legal/pekko-protobuf-v3-jar-license.txt
similarity index 98%
copy from LICENSE
copy to legal/pekko-protobuf-v3-jar-license.txt
index d58aebf02a..94b08c03f7 100644
--- a/LICENSE
+++ b/legal/pekko-protobuf-v3-jar-license.txt
@@ -202,6 +202,6 @@
---------------
-pekko-protobuf contains the sources of Google protobuf 2.5.0 runtime support,
-moved into the source package `org.apache.pekko.protobuf` so as to avoid version conflicts.
+pekko-protobuf-v3 contains the sources of Google protobuf 3.16.1 runtime support,
+moved into the source package `org.apache.pekko.protobufv3.internal` so as to avoid version conflicts.
For license information see COPYING.protobuf
diff --git a/project/AddMetaInfLicenseFiles.scala b/project/AddMetaInfLicenseFiles.scala
index a76aaaa1fe..f156b1a2ee 100644
--- a/project/AddMetaInfLicenseFiles.scala
+++ b/project/AddMetaInfLicenseFiles.scala
@@ -24,11 +24,17 @@ object AddMetaInfLicenseFiles extends AutoPlugin {
apacheSonatypeDisclaimerFile := Some(baseDir.value / "DISCLAIMER"))
/**
- * Settings specific for Pekko protobuf subprojects which require a different license file
+ * Settings specific for Pekko actor subproject which requires a different license file.
+ */
+ lazy val actorSettings = Seq(
+ apacheSonatypeLicenseFile := baseDir.value / "legal" / "pekko-actor-jar-license.txt")
+
+ /**
+ * Settings specific for Pekko protobuf subproject which requires a different license file
* as well as an additional "COPYING.protobuf" file.
*/
lazy val protobufSettings = Seq(
- apacheSonatypeLicenseFile := baseDir.value / "LICENSE") ++ inConfig(Compile)(Seq(
+ apacheSonatypeLicenseFile := baseDir.value / "legal" / "pekko-protobuf-jar-license.txt") ++ inConfig(Compile)(Seq(
resourceGenerators += {
Def.task {
List(
@@ -36,6 +42,20 @@ object AddMetaInfLicenseFiles extends AutoPlugin {
}
}))
+ /**
+ * Settings specific for Pekko protobuf-v3 subproject which requires a different license file
+ * as well as an additional "COPYING.protobuf" file.
+ */
+ lazy val protobufV3Settings = Seq(
+ apacheSonatypeLicenseFile := baseDir.value / "legal" / "pekko-protobuf-v3-jar-license.txt") ++ inConfig(Compile)(
+ Seq(
+ resourceGenerators += {
+ Def.task {
+ List(
+ SonatypeApachePlugin.addFileToMetaInf(resourceManaged.value, baseDir.value / "COPYING.protobuf"))
+ }
+ }))
+
override def trigger = allRequirements
override def requires = SonatypeApachePlugin
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index 4e01c4f6f2..4b58ada295 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -65,9 +65,9 @@ trait CopyrightHeader extends AutoPlugin {
override def apply(text: String, existingText: Option[String]): String = {
val formatted = existingText match {
- case Some(existedText) if isValidCopyRightAnnotated(existedText) =>
+ case Some(existedText) if isValidCopyrightAnnotated(existedText) =>
existedText
- case Some(existedText) if isOnlyLightbendCopyRightAnnotated(existedText) =>
+ case Some(existedText) if isOnlyLightbendOrEpflCopyrightAnnotated(existedText) =>
HeaderCommentStyle.cStyleBlockComment.commentCreator(text, existingText) + NewLine * 2 + existedText
case Some(existedText) =>
throw new IllegalStateException(s"Unable to detect copyright for header:[${existedText}]")
@@ -77,26 +77,22 @@ trait CopyrightHeader extends AutoPlugin {
formatted.trim
}
- private def isApacheCopyRighted(text: String): Boolean =
+ private def isApacheCopyrighted(text: String): Boolean =
StringUtils.containsIgnoreCase(text, "licensed to the apache software foundation (asf)") ||
StringUtils.containsIgnoreCase(text, "www.apache.org/licenses/license-2.0")
- private def isLAMPCopyRighted(text: String): Boolean =
+ private def isLAMPCopyrighted(text: String): Boolean =
StringUtils.containsIgnoreCase(text, "lamp/epfl")
- private def isLightbendCopyRighted(text: String): Boolean =
+ private def isLightbendCopyrighted(text: String): Boolean =
StringUtils.containsIgnoreCase(text, "lightbend inc.")
- private def isDebianCopyRighted(text: String): Boolean =
- StringUtils.containsIgnoreCase(text, "debian.org")
-
- private def isValidCopyRightAnnotated(text: String): Boolean = {
- isApacheCopyRighted(text) || isLAMPCopyRighted(text) || isDebianCopyRighted(text)
+ private def isValidCopyrightAnnotated(text: String): Boolean = {
+ isApacheCopyrighted(text)
}
- private def isOnlyLightbendCopyRightAnnotated(text: String): Boolean = {
- isLightbendCopyRighted(text) && !(isApacheCopyRighted(text) || isLAMPCopyRighted(text) || isDebianCopyRighted(
- text))
+ private def isOnlyLightbendOrEpflCopyrightAnnotated(text: String): Boolean = {
+ (isLightbendCopyrighted(text) || isLAMPCopyrighted(text)) && !isApacheCopyrighted(text)
}
})
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org