From 97e8f05dc2493f909345cff9624cdc65b661e97f Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 14 Feb 2023 12:30:18 +0800 Subject: [PATCH] fix: license headers in third-party code (#1259) Signed-off-by: tison --- .github/config/licenserc.yml | 5 +++++ src/common/rand.cc | 5 +++++ src/common/rand.h | 5 +++++ src/common/sha1.cc | 22 ---------------------- src/common/sha1.h | 20 -------------------- src/storage/scripting.cc | 29 ----------------------------- src/types/geohash.cc | 20 -------------------- src/types/geohash.h | 20 -------------------- 8 files changed, 15 insertions(+), 111 deletions(-) diff --git a/.github/config/licenserc.yml b/.github/config/licenserc.yml index 0f0325f5bed..ec82c3212aa 100644 --- a/.github/config/licenserc.yml +++ b/.github/config/licenserc.yml @@ -31,3 +31,8 @@ header: - '**/*.tcl' - '**/*.yml' - '**/*.yaml' + paths-ignore: + - 'src/common/sha1.h' + - 'src/common/sha1.cc' + - 'src/types/geohash.h' + - 'src/types/geohash.cc' diff --git a/src/common/rand.cc b/src/common/rand.cc index dae0fc3fbce..778b0c25866 100644 --- a/src/common/rand.cc +++ b/src/common/rand.cc @@ -18,6 +18,11 @@ * */ +/* + * Rewritten in C++ with constexprs and templates by @tanruixiang in + * https://github.com/apache/incubator-kvrocks/commit/900e0f44781d9459649e9864ba09abe6000ce987 + */ + /* Pseudo random number generation functions derived from the drand48() * function obtained from pysam source code. * diff --git a/src/common/rand.h b/src/common/rand.h index 62b37adb844..4ffdd9bd8bd 100644 --- a/src/common/rand.h +++ b/src/common/rand.h @@ -18,6 +18,11 @@ * */ +/* + * Modified by @PragmaTwice to leverage constexprs over defines in + * https://github.com/apache/incubator-kvrocks/commit/1dcf225acad001175df0ea142b5e498f29d1b18b + */ + /* * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. diff --git a/src/common/sha1.cc b/src/common/sha1.cc index 94aff0c3fb2..97182cfd9c6 100644 --- a/src/common/sha1.cc +++ b/src/common/sha1.cc @@ -1,25 +1,3 @@ -/* - * 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. - * - */ - -/* from valgrind tests */ - /* ================ sha1.c ================ */ /* SHA-1 in C diff --git a/src/common/sha1.h b/src/common/sha1.h index 88124dcee84..19c5d68c66d 100644 --- a/src/common/sha1.h +++ b/src/common/sha1.h @@ -1,23 +1,3 @@ -/* - * 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. - * - */ - #pragma once /* ================ sha1.h ================ */ diff --git a/src/storage/scripting.cc b/src/storage/scripting.cc index 52696a4ae53..bb9a1b3497a 100644 --- a/src/storage/scripting.cc +++ b/src/storage/scripting.cc @@ -18,35 +18,6 @@ * */ -/* - * Copyright (c) 2009-2012, Salvatore Sanfilippo - * 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 Redis 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. - */ - // This file is modified from several source code files about lua scripting of Redis. // See the original code at https://github.com/redis/redis. diff --git a/src/types/geohash.cc b/src/types/geohash.cc index c613abd43ff..583c57c75a0 100644 --- a/src/types/geohash.cc +++ b/src/types/geohash.cc @@ -1,23 +1,3 @@ -/* - * 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. - * - */ - /* * Copyright (c) 2013-2014, yinqiwen * Copyright (c) 2014, Matt Stancliff . diff --git a/src/types/geohash.h b/src/types/geohash.h index 290d290516e..29a8e00fe70 100644 --- a/src/types/geohash.h +++ b/src/types/geohash.h @@ -1,23 +1,3 @@ -/* - * 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. - * - */ - /* * Copyright (c) 2013-2014, yinqiwen * Copyright (c) 2014, Matt Stancliff .