From 0a19f86dc867802bbd2901ae3b3dc4762f482d10 Mon Sep 17 00:00:00 2001 From: Diego Nehab <1635557+diegonehab@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:43:10 +0100 Subject: [PATCH] fix: update license/copyright notice in all code --- AUTHORS | 7 ++++ CHANGELOG.md | 1 + Dockerfile | 16 ++++++++++ LICENSE | 4 +-- Makefile | 16 ++++++++++ linux/htif/Makefile | 19 ++++++----- linux/htif/yield.c | 20 +++++++----- linux/rollup/http/echo-dapp/src/config.rs | 22 +++++++------ linux/rollup/http/echo-dapp/src/main.rs | 22 +++++++------ .../http/rollup-http-client/src/client.rs | 22 +++++++------ .../http/rollup-http-client/src/rollup.rs | 22 +++++++------ linux/rollup/http/rollup-http-server/build.rs | 22 +++++++------ .../http/rollup-http-server/src/config.rs | 23 +++++++------ .../rollup-http-server/src/dapp_process.rs | 27 +++++++++------- .../rollup-http-server/src/http_service.rs | 30 ++++++++--------- .../rollup/http/rollup-http-server/src/lib.rs | 28 +++++++++------- .../http/rollup-http-server/src/main.rs | 27 +++++++++------- .../rollup-http-server/src/rollup/bindings.c | 20 +++++++----- .../rollup-http-server/src/rollup/bindings.h | 20 +++++++----- .../http/rollup-http-server/src/rollup/mod.rs | 32 +++++++++---------- .../tests/rollup-http-server-tests.rs | 24 +++++++------- .../tests/rollup_test_bindings.c | 20 +++++++----- .../tests/rollup_test_bindings.h | 26 +++++++++------ linux/rollup/ioctl-echo-loop/Makefile | 19 ++++++----- .../rollup/ioctl-echo-loop/ioctl-echo-loop.c | 20 +++++++----- linux/rollup/rollup/Makefile | 19 ++++++----- linux/rollup/rollup/rollup.cpp | 27 +++++++++------- linux/utils/flashdrive | 20 +++++++----- linux/utils/readbe64 | 20 +++++++----- linux/utils/rollup-init | 25 ++++++++------- linux/utils/writebe64 | 20 +++++++----- skel/opt/cartesi/bin/init | 20 ++++++------ 32 files changed, 395 insertions(+), 265 deletions(-) create mode 100644 AUTHORS mode change 100755 => 100644 linux/utils/flashdrive mode change 100755 => 100644 linux/utils/readbe64 mode change 100755 => 100644 linux/utils/rollup-init mode change 100755 => 100644 linux/utils/writebe64 mode change 100755 => 100644 skel/opt/cartesi/bin/init diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..2880febe --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +Diego Nehab +Eduardo Barthel +Gabriel de Quadros Ligneul +Marcelo Politzer +Marko Atanasievski +Marcos Pernambuco Motta +Victor Fusco diff --git a/CHANGELOG.md b/CHANGELOG.md index dc98b371..d2cf6b5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Cache build in CI - Generate binary deb with tools - Moved sbin/init -> opt/cartesi/sbin/init +- Updated license/copyright notice in all source code ## [0.11.0] - 2023-04-19 ### Changed diff --git a/Dockerfile b/Dockerfile index 06d43b15..477e7569 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,19 @@ +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 +# +# 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 +# +# 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 --platform=linux/riscv64 riscv64/ubuntu:22.04 as sdk ARG LINUX_SOURCES_VERSION=5.15.63-ctsi-2 ARG LINUX_SOURCES_FILEPATH=dep/linux-sources-${LINUX_SOURCES_VERSION}.tar.gz diff --git a/LICENSE b/LICENSE index 341a07c4..d6456956 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,8 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Cartesi Pte. Ltd. - + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 04167601..bfdd099d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,19 @@ +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 +# +# 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 +# +# 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. +# + MAJOR := 0 MINOR := 11 PATCH := 0 diff --git a/linux/htif/Makefile b/linux/htif/Makefile index 835888b6..0208f694 100644 --- a/linux/htif/Makefile +++ b/linux/htif/Makefile @@ -1,14 +1,17 @@ -# Copyright 2019-2020 Cartesi Pte. Ltd. +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 # -# 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 http://www.apache.org/licenses/LICENSE-2.0 +# 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 +# +# 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. +# 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. # UNAME:=$(shell uname) diff --git a/linux/htif/yield.c b/linux/htif/yield.c index a3aa9fc6..6d5002fc 100644 --- a/linux/htif/yield.c +++ b/linux/htif/yield.c @@ -1,16 +1,20 @@ -/* Copyright 2019-2020 Cartesi Pte. Ltd. +/* Copyright Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 * - * 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 http://www.apache.org/licenses/LICENSE-2.0 + * 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 + * + * 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. + * 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. */ + #include #include #include diff --git a/linux/rollup/http/echo-dapp/src/config.rs b/linux/rollup/http/echo-dapp/src/config.rs index 847e6eab..786cc411 100644 --- a/linux/rollup/http/echo-dapp/src/config.rs +++ b/linux/rollup/http/echo-dapp/src/config.rs @@ -1,14 +1,18 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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. +// #[derive(Clone, Debug, PartialEq)] pub struct TestConfig { diff --git a/linux/rollup/http/echo-dapp/src/main.rs b/linux/rollup/http/echo-dapp/src/main.rs index 051b3bf0..038458b5 100644 --- a/linux/rollup/http/echo-dapp/src/main.rs +++ b/linux/rollup/http/echo-dapp/src/main.rs @@ -1,14 +1,18 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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. +// mod config; diff --git a/linux/rollup/http/rollup-http-client/src/client.rs b/linux/rollup/http/rollup-http-client/src/client.rs index c9d715a7..c112d90c 100644 --- a/linux/rollup/http/rollup-http-client/src/client.rs +++ b/linux/rollup/http/rollup-http-client/src/client.rs @@ -1,14 +1,18 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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::rollup::{AdvanceRequest, Exception, IndexResponse, InspectRequest, Notice, Report, RollupRequest, RollupResponse, Voucher}; use serde::{Deserialize, Serialize}; diff --git a/linux/rollup/http/rollup-http-client/src/rollup.rs b/linux/rollup/http/rollup-http-client/src/rollup.rs index aa2f8154..eeef5659 100644 --- a/linux/rollup/http/rollup-http-client/src/rollup.rs +++ b/linux/rollup/http/rollup-http-client/src/rollup.rs @@ -1,14 +1,18 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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, Serialize}; use std::error::Error; diff --git a/linux/rollup/http/rollup-http-server/build.rs b/linux/rollup/http/rollup-http-server/build.rs index 9b6e75c8..37a540fb 100644 --- a/linux/rollup/http/rollup-http-server/build.rs +++ b/linux/rollup/http/rollup-http-server/build.rs @@ -1,14 +1,18 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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. +// extern crate cc; diff --git a/linux/rollup/http/rollup-http-server/src/config.rs b/linux/rollup/http/rollup-http-server/src/config.rs index 9a9e4176..c64478fe 100644 --- a/linux/rollup/http/rollup-http-server/src/config.rs +++ b/linux/rollup/http/rollup-http-server/src/config.rs @@ -1,16 +1,19 @@ -// Copyright 2021 Cartesi Pte. Ltd. -// +// Copyright Cartesi and individual authors (see AUTHORS) // SPDX-License-Identifier: Apache-2.0 -// 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 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. +// 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 +// +// 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. +// -// Http dispatcher application #[derive(Debug, Clone, PartialEq, Eq)] pub struct Config { pub http_address: String, diff --git a/linux/rollup/http/rollup-http-server/src/dapp_process.rs b/linux/rollup/http/rollup-http-server/src/dapp_process.rs index b2bd5cbe..931fce51 100644 --- a/linux/rollup/http/rollup-http-server/src/dapp_process.rs +++ b/linux/rollup/http/rollup-http-server/src/dapp_process.rs @@ -1,15 +1,18 @@ -/* Copyright 2022 Cartesi Pte. Ltd. - * - * 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 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 Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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 std::os::unix::io::RawFd; use std::sync::Arc; diff --git a/linux/rollup/http/rollup-http-server/src/http_service.rs b/linux/rollup/http/rollup-http-server/src/http_service.rs index 4017af49..c650d68a 100644 --- a/linux/rollup/http/rollup-http-server/src/http_service.rs +++ b/linux/rollup/http/rollup-http-server/src/http_service.rs @@ -1,19 +1,19 @@ -/* Copyright 2021-2022 Cartesi Pte. Ltd. - * - * 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 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 Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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. +// -/// Implement http dispatcher http REST api, including -/// voucher/notice/report/finish endpoints, used by the DApp -/// to communicate its output use std::os::unix::io::RawFd; use std::sync::Arc; diff --git a/linux/rollup/http/rollup-http-server/src/lib.rs b/linux/rollup/http/rollup-http-server/src/lib.rs index c357455a..e31fa14e 100644 --- a/linux/rollup/http/rollup-http-server/src/lib.rs +++ b/linux/rollup/http/rollup-http-server/src/lib.rs @@ -1,15 +1,19 @@ -/* Copyright 2021-2022 Cartesi Pte. Ltd. - * - * 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 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 Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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 config; pub mod dapp_process; pub mod http_service; diff --git a/linux/rollup/http/rollup-http-server/src/main.rs b/linux/rollup/http/rollup-http-server/src/main.rs index 753beef1..c38bacea 100644 --- a/linux/rollup/http/rollup-http-server/src/main.rs +++ b/linux/rollup/http/rollup-http-server/src/main.rs @@ -1,15 +1,18 @@ -/* Copyright 2021-2022 Cartesi Pte. Ltd. - * - * 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 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 Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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 std::fs::File; use std::io::ErrorKind; diff --git a/linux/rollup/http/rollup-http-server/src/rollup/bindings.c b/linux/rollup/http/rollup-http-server/src/rollup/bindings.c index e6e90449..b5711272 100644 --- a/linux/rollup/http/rollup-http-server/src/rollup/bindings.c +++ b/linux/rollup/http/rollup-http-server/src/rollup/bindings.c @@ -1,16 +1,20 @@ -/* Copyright 2021 Cartesi Pte. Ltd. +/* Copyright Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 * - * 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 http://www.apache.org/licenses/LICENSE-2.0 + * 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 + * + * 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. + * 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. */ + #include #include "bindings.h" diff --git a/linux/rollup/http/rollup-http-server/src/rollup/bindings.h b/linux/rollup/http/rollup-http-server/src/rollup/bindings.h index 144b4083..1f844185 100644 --- a/linux/rollup/http/rollup-http-server/src/rollup/bindings.h +++ b/linux/rollup/http/rollup-http-server/src/rollup/bindings.h @@ -1,17 +1,21 @@ -/* Copyright 2021 Cartesi Pte. Ltd. +/* Copyright Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 * - * 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 http://www.apache.org/licenses/LICENSE-2.0 + * 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 + * + * 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. + * 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. */ + /* C interfaces that are converted to rust using bindgen (https://github.com/rust-lang/rust-bindgen) * command to generate Rust file from rollup C interface. In case that C rollup bindings are updated, * `bindings.rs` file needs to be regenerated using following procedure: diff --git a/linux/rollup/http/rollup-http-server/src/rollup/mod.rs b/linux/rollup/http/rollup-http-server/src/rollup/mod.rs index e6b4b08d..3104f8af 100644 --- a/linux/rollup/http/rollup-http-server/src/rollup/mod.rs +++ b/linux/rollup/http/rollup-http-server/src/rollup/mod.rs @@ -1,19 +1,19 @@ -/* Copyright 2021 Cartesi Pte. Ltd. - * - * 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 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. - */ - -/// Implements Rust api to use Linux rollup device - -/// Rollup device driver path +// Copyright Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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 const ROLLUP_DEVICE_NAME: &str = "/dev/rollup"; use serde::{Deserialize, Serialize}; diff --git a/linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs b/linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs index f66b9fda..b421ceb3 100644 --- a/linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs +++ b/linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs @@ -1,16 +1,18 @@ -// Copyright (C) 2022 Cartesi Pte. Ltd. +// Copyright Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 // -// 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 http://www.apache.org/licenses/LICENSE-2.0 +// 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 +// +// 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. - -// Run tests with -// USE_ROLLUP_BINDINGS_MOCK=1 cargo test -- --show-output --test-threads=1 extern crate rollup_http_client; extern crate rollup_http_server; diff --git a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c b/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c index a9b22a17..07e93eaa 100644 --- a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c +++ b/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c @@ -1,16 +1,20 @@ -/* Copyright 2022 Cartesi Pte. Ltd. +/* Copyright Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 * - * 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 http://www.apache.org/licenses/LICENSE-2.0 + * 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 + * + * 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. + * 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. */ + #include "rollup_test_bindings.h" // Every uneven request is advance request, diff --git a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h b/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h index 617bd356..50a3e86a 100644 --- a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h +++ b/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h @@ -1,13 +1,19 @@ -// Copyright (C) 2022 Cartesi Pte. Ltd. -// -// 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 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 Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 + * + * 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 + * + * 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. + */ + #ifndef _UAPI_LINUX_CARTESI_ROLLUP_H #define _UAPI_LINUX_CARTESI_ROLLUP_H diff --git a/linux/rollup/ioctl-echo-loop/Makefile b/linux/rollup/ioctl-echo-loop/Makefile index 683791ce..fca91b94 100644 --- a/linux/rollup/ioctl-echo-loop/Makefile +++ b/linux/rollup/ioctl-echo-loop/Makefile @@ -1,14 +1,17 @@ -# Copyright 2019-2020 Cartesi Pte. Ltd. +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 # -# 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 http://www.apache.org/licenses/LICENSE-2.0 +# 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 +# +# 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. +# 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. # UNAME:=$(shell uname) diff --git a/linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c b/linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c index 461ad65c..fa1b7000 100644 --- a/linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c +++ b/linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c @@ -1,16 +1,20 @@ -/* Copyright 2021 Cartesi Pte. Ltd. +/* Copyright Cartesi and individual authors (see AUTHORS) + * SPDX-License-Identifier: Apache-2.0 * - * 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 http://www.apache.org/licenses/LICENSE-2.0 + * 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 + * + * 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. + * 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. */ + #include #include #include diff --git a/linux/rollup/rollup/Makefile b/linux/rollup/rollup/Makefile index f6e78754..13c07b3f 100644 --- a/linux/rollup/rollup/Makefile +++ b/linux/rollup/rollup/Makefile @@ -1,14 +1,17 @@ -# Copyright 2019-2020 Cartesi Pte. Ltd. +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 # -# 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 http://www.apache.org/licenses/LICENSE-2.0 +# 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 +# +# 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. +# 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. # UNAME:=$(shell uname) diff --git a/linux/rollup/rollup/rollup.cpp b/linux/rollup/rollup/rollup.cpp index b6daf881..9b54c82f 100644 --- a/linux/rollup/rollup/rollup.cpp +++ b/linux/rollup/rollup/rollup.cpp @@ -1,15 +1,18 @@ -/* Copyright 2022 Cartesi Pte. Ltd. - * - * 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 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 Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 +// +// 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 +// +// 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. +// #include #include diff --git a/linux/utils/flashdrive b/linux/utils/flashdrive old mode 100755 new mode 100644 index 7469fb46..e5948cb3 --- a/linux/utils/flashdrive +++ b/linux/utils/flashdrive @@ -1,15 +1,19 @@ #!/bin/busybox sh -# Copyright 2019-2020 Cartesi Pte. Ltd. + +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 +# +# 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 # -# 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 http://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. +# 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. # for t in /dev/mtdblock*; do diff --git a/linux/utils/readbe64 b/linux/utils/readbe64 old mode 100755 new mode 100644 index c8c8ce62..1e1944b0 --- a/linux/utils/readbe64 +++ b/linux/utils/readbe64 @@ -1,15 +1,19 @@ #!/usr/bin/lua --- Copyright 2019-2020 Cartesi Pte. Ltd. + +-- Copyright Cartesi and individual authors (see AUTHORS) +-- SPDX-License-Identifier: Apache-2.0 +-- +-- 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 -- --- 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 http://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. +-- 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. -- print((string.unpack(">I8", io.read(8)))) diff --git a/linux/utils/rollup-init b/linux/utils/rollup-init old mode 100755 new mode 100644 index f77f3997..2d5e25e1 --- a/linux/utils/rollup-init +++ b/linux/utils/rollup-init @@ -1,17 +1,20 @@ #!/bin/busybox sh -# Copyright 2022 Cartesi Pte. Ltd. -# + +# Copyright Cartesi and individual authors (see AUTHORS) # SPDX-License-Identifier: Apache-2.0 -# 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 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. - -# Start the rollup-http-server and raise a rollup exception when it exits +# 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 +# +# 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. +# busybox sh -c "/opt/cartesi/bin/rollup-http-server $*" MESSAGE="rollup-http-server exited with $? status" diff --git a/linux/utils/writebe64 b/linux/utils/writebe64 old mode 100755 new mode 100644 index 97ee7369..ef623a4b --- a/linux/utils/writebe64 +++ b/linux/utils/writebe64 @@ -1,15 +1,19 @@ #!/usr/bin/lua --- Copyright 2019-2020 Cartesi Pte. Ltd. + +-- Copyright Cartesi and individual authors (see AUTHORS) +-- SPDX-License-Identifier: Apache-2.0 +-- +-- 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 -- --- 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 http://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. +-- 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. -- local arg = {...} diff --git a/skel/opt/cartesi/bin/init b/skel/opt/cartesi/bin/init old mode 100755 new mode 100644 index 422b06ad..d462a692 --- a/skel/opt/cartesi/bin/init +++ b/skel/opt/cartesi/bin/init @@ -1,19 +1,21 @@ #!/bin/busybox sh -# Copyright 2019 Cartesi Pte. Ltd. +# Copyright Cartesi and individual authors (see AUTHORS) +# SPDX-License-Identifier: Apache-2.0 # -# 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 http://www.apache.org/licenses/LICENSE-2.0 +# 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 +# +# 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. +# 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. # -# rndaddentropy can be in different places, make sure we can find it export PATH=/opt/cartesi/bin:"$PATH" [ ! -f /opt/cartesi/etc/motd -o "$splash" == "no" ] || busybox cat /opt/cartesi/etc/motd