From 0cabddbff74c6cd5d66e9931e86f85b5aac55f4f Mon Sep 17 00:00:00 2001 From: Alexey Polyudov Date: Thu, 4 Jun 2020 13:43:50 -0700 Subject: [PATCH 1/4] Update helper scripts Signed-off-by: Alexey Polyudov Change-Id: Ibaa0221a6cf55775f882d7888272e317ae3e2298 --- script/handle_oss.sh | 2 ++ script/oss.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/script/handle_oss.sh b/script/handle_oss.sh index 68d3e1af..8c5dfdad 100755 --- a/script/handle_oss.sh +++ b/script/handle_oss.sh @@ -18,3 +18,5 @@ ./oss.py --all --no-subst --fix-oss-headers . ./oss.py --all --google3-filter --no-subst --fix-oss-headers --no-recurse .. ./oss.py --google3-filter --fix-oss-headers --proto-lite-runtime .. +cd .. +/google/bin/releases/opensource/thirdparty/cross/cross . diff --git a/script/oss.py b/script/oss.py index e05dcc1b..bcf835bf 100755 --- a/script/oss.py +++ b/script/oss.py @@ -1,5 +1,20 @@ #!/usr/bin/python3 +# Copyright 2020 Google LLC +# +# Licensed 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 +# +# https://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. + + import argparse import os import shutil From f307784c97c6916a489ade9980750e2559dfaf0f Mon Sep 17 00:00:00 2001 From: Alexey Polyudov Date: Thu, 4 Jun 2020 15:03:55 -0700 Subject: [PATCH 2/4] Add OSS mandatory file Signed-off-by: Alexey Polyudov Change-Id: I2068d59ffaf55c80a66ff9068f678a6b080b5a1a --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..939e5341 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google.com/conduct/). From f4007e63ceb819430a0ac6abcc206d3de21113ec Mon Sep 17 00:00:00 2001 From: Alexey Polyudov Date: Thu, 4 Jun 2020 15:25:44 -0700 Subject: [PATCH 3/4] Improve copyrihgt header detection Signed-off-by: Alexey Polyudov Change-Id: Ib1c0928bc1323dc9b76e0f1fc64d4cb50b520ea6 --- script/oss.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/script/oss.py b/script/oss.py index bcf835bf..cd0199d8 100755 --- a/script/oss.py +++ b/script/oss.py @@ -17,6 +17,7 @@ import argparse import os +import re import shutil import sys @@ -34,6 +35,8 @@ 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.""".split("\n") +headline_match=".*Copyright [0-9,\- ]+ Google.*" + MISSING = 0 HEADLINE = 1 PARTIAL = 2 @@ -41,20 +44,24 @@ FULL = 3 def has_copyright(lines, max_lookup=3): pos = 0 + result = MISSING + headline = re.compile(headline_match) for line in lines: pos += 1 # points to the next line - if line.find(copy_header[0]) >= 0: + if headline.match(line) != None: + result = HEADLINE break if pos > max_lookup: - return MISSING - - result = HEADLINE + return result for line in copy_header[1:]: + if pos >= len(lines): + return result if lines[pos].find(line) < 0: return result else: result = PARTIAL + pos += 1 return FULL From c3484b01c830d24e9abe9468ce5c236b9cad5d25 Mon Sep 17 00:00:00 2001 From: Alexey Polyudov Date: Thu, 4 Jun 2020 23:16:55 -0700 Subject: [PATCH 4/4] Switch internal URLs to public Signed-off-by: Alexey Polyudov Change-Id: I1560870c3cf61256a6a28bd9aef42f0e3bc33d28 --- .gitmodules | 2 +- third_party/ukey2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 92e5c3e7..ee1e4011 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "third_party/ukey2"] path = third_party/ukey2 - url = sso://team/nearby-eng/ukey2 + url = https://github.com/apolyudov/ukey2 branch = master [submodule "third_party/protobuf"] path = third_party/protobuf diff --git a/third_party/ukey2 b/third_party/ukey2 index 2fc30c88..5695ef20 160000 --- a/third_party/ukey2 +++ b/third_party/ukey2 @@ -1 +1 @@ -Subproject commit 2fc30c8894da17442c476d9416b5a811bfe88e32 +Subproject commit 5695ef2050b993e8034befcb874097be3867ab97