This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 649aed6 Fixes #385: Check that all source files have ASFv2 licence
(#387)
649aed6 is described below
commit 649aed63a3e95b0b84703a32c1ca754d1f4bc77d
Author: Martin Grigorov <[email protected]>
AuthorDate: Mon Jan 5 15:56:22 2026 +0200
Fixes #385: Check that all source files have ASFv2 licence (#387)
---
.github/dependabot.yml | 4 +---
.github/workflows/test-lang-rust-ci.yml | 29 ++++++++++++++--------
avro/src/duration.rs | 1 +
avro/src/serde/mod.rs | 17 +++++++++++++
avro/src/serde/util.rs | 17 +++++++++++++
avro/tests/avro-rs-219.rs | 17 +++++++++++++
avro/tests/avro-rs-285-bytes_deserialization.rs | 17 +++++++++++++
avro/tests/serde_human_readable_false.rs | 17 +++++++++++++
avro/tests/serde_human_readable_true.rs | 17 +++++++++++++
build.sh | 32 +++++++++++++------------
.github/dependabot.yml => licenserc.toml | 25 +++++++------------
11 files changed, 148 insertions(+), 45 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 273a84d..dec3a14 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,4 +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
@@ -15,10 +14,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
+
version: 2
updates:
-
- package-ecosystem: "cargo"
directory: "/"
schedule:
diff --git a/.github/workflows/test-lang-rust-ci.yml
b/.github/workflows/test-lang-rust-ci.yml
index 6c84abe..4665303 100644
--- a/.github/workflows/test-lang-rust-ci.yml
+++ b/.github/workflows/test-lang-rust-ci.yml
@@ -19,9 +19,9 @@ name: Rust Continuous Integration
on:
workflow_dispatch:
push:
- branches: [ main ]
+ branches: [main]
pull_request:
- branches: [ main ]
+ branches: [main]
permissions:
contents: read
@@ -34,15 +34,25 @@ concurrency:
cancel-in-progress: true
jobs:
+ license-check:
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: taiki-e/install-action@v2
+ with:
+ tool: [email protected]
+ - name: Checkout
+ uses: actions/checkout@v6
+ - name: Check License Header
+ run: hawkeye check
ci:
runs-on: ${{ matrix.runner.name }}
strategy:
matrix:
rust:
- - 'stable'
- - 'beta'
- - 'nightly'
- - '1.86.0' # MSRV
+ - "stable"
+ - "beta"
+ - "nightly"
+ - "1.86.0" # MSRV
runner:
- name: ubuntu-24.04
target: x86_64-unknown-linux-gnu
@@ -156,17 +166,17 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- - name: 'Setup Temurin JDK 8, 11, 17 & 21'
+ - name: "Setup Temurin JDK 8, 11, 17 & 21"
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e #
v5.1.0
with:
- distribution: 'temurin'
+ distribution: "temurin"
java-version: |
8
11
17
21
- - name: 'Setup Maven 3.9.9'
+ - name: "Setup Maven 3.9.9"
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 #
v5
with:
maven-version: 3.9.9
@@ -215,7 +225,6 @@ jobs:
Try::Tiny \
inc::Module::Install
-
- name: Perl reads interop files created by Java and Rust
working-directory: main-repo/lang/perl
run: ./build.sh interop-data-test
diff --git a/avro/src/duration.rs b/avro/src/duration.rs
index 4aa6bd5..713c9f8 100644
--- a/avro/src/duration.rs
+++ b/avro/src/duration.rs
@@ -14,6 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
+
/// A struct representing duration that hides the details of endianness and
conversion between
/// platform-native u32 and byte arrays.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
diff --git a/avro/src/serde/mod.rs b/avro/src/serde/mod.rs
index 509d2e5..efd1032 100644
--- a/avro/src/serde/mod.rs
+++ b/avro/src/serde/mod.rs
@@ -1,3 +1,20 @@
+// 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.
+
pub mod de;
pub mod ser;
pub mod ser_schema;
diff --git a/avro/src/serde/util.rs b/avro/src/serde/util.rs
index 55ea2ea..8967161 100644
--- a/avro/src/serde/util.rs
+++ b/avro/src/serde/util.rs
@@ -1,3 +1,20 @@
+// 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.
+
use crate::{Error, error::Details};
use serde::{
Serialize, Serializer,
diff --git a/avro/tests/avro-rs-219.rs b/avro/tests/avro-rs-219.rs
index 3796fbb..34d503f 100644
--- a/avro/tests/avro-rs-219.rs
+++ b/avro/tests/avro-rs-219.rs
@@ -1,3 +1,20 @@
+// 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.
+
use serde::Deserialize;
#[test]
diff --git a/avro/tests/avro-rs-285-bytes_deserialization.rs
b/avro/tests/avro-rs-285-bytes_deserialization.rs
index 1262cea..5ac2688 100644
--- a/avro/tests/avro-rs-285-bytes_deserialization.rs
+++ b/avro/tests/avro-rs-285-bytes_deserialization.rs
@@ -1,3 +1,20 @@
+// 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.
+
use apache_avro_test_helper::TestResult;
use serde::{Deserialize, Serialize};
diff --git a/avro/tests/serde_human_readable_false.rs
b/avro/tests/serde_human_readable_false.rs
index 3095657..8e37b04 100644
--- a/avro/tests/serde_human_readable_false.rs
+++ b/avro/tests/serde_human_readable_false.rs
@@ -1,3 +1,20 @@
+// 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.
+
use apache_avro::{AvroSchema, Schema, SpecificSingleObjectWriter};
use apache_avro_test_helper::TestResult;
use serde::{Deserialize, Serialize};
diff --git a/avro/tests/serde_human_readable_true.rs
b/avro/tests/serde_human_readable_true.rs
index 0b6d665..75a2818 100644
--- a/avro/tests/serde_human_readable_true.rs
+++ b/avro/tests/serde_human_readable_true.rs
@@ -1,3 +1,20 @@
+// 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.
+
use apache_avro::{AvroSchema, Schema, SpecificSingleObjectWriter};
use apache_avro_test_helper::TestResult;
use serde::{Deserialize, Serialize};
diff --git a/build.sh b/build.sh
index 90691be..8b729a9 100755
--- a/build.sh
+++ b/build.sh
@@ -1,21 +1,23 @@
-#!/bin/bash
-
-# 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
+#!/usr/bin/env bash
+#
+# 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
#
-# https://www.apache.org/licenses/LICENSE-2.0
+# 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.
+# 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.
-set -e # exit on error
+set -euo pipefail
build_dir="../../build/rust"
dist_dir="../../dist/rust"
diff --git a/.github/dependabot.yml b/licenserc.toml
similarity index 71%
copy from .github/dependabot.yml
copy to licenserc.toml
index 273a84d..2c153a7 100644
--- a/.github/dependabot.yml
+++ b/licenserc.toml
@@ -1,4 +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
@@ -15,20 +14,12 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
-version: 2
-updates:
-
- - package-ecosystem: "cargo"
- directory: "/"
- schedule:
- interval: "daily"
- open-pull-requests-limit: 20
- commit-message:
- prefix: "chore(deps): "
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
- day: "sunday"
+headerPath = "Apache-2.0-ASF.txt"
+excludes = [
+ "*.stderr",
+ "*.avro",
+ "NOTICE",
+ "README.tpl",
+ ".requirements-precommit.txt"
+]