Skip to content

Commit

Permalink
build: add REUSE Compliance Check
Browse files Browse the repository at this point in the history
In accordance with reuse requirements:
- Place each license file in the LICENSES/ directory
- Add missing SPDX-License-Identifier to files.
- Add .reuse/dep5 to bulk-license files

Fixes: cloud-hypervisor#5887

Signed-off-by: Ruslan Mstoi <[email protected]>
  • Loading branch information
Ruslan Mstoi authored and rbradford committed Apr 19, 2024
1 parent ce29afd commit 5e9886b
Show file tree
Hide file tree
Showing 28 changed files with 72 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/reuse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: REUSE Compliance Check

on: [push, pull_request]

jobs:
reuse:
name: REUSE Compliance Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v3
12 changes: 12 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: cloud-hypervisor
Upstream-Contact: <>
Source: https://www.cloudhypervisor.org

Files: docs/*.md *.md
Copyright: 2024
License: CC-BY-4.0

Files: scripts/* test_data/* *.toml .git* fuzz/Cargo.lock fuzz/.gitignore resources/linux-config-* vmm/src/api/openapi/cloud-hypervisor.yaml CODEOWNERS Cargo.lock
Copyright: 2024
License: Apache-2.0
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/COPYING.docs → LICENSES/CC-BY-4.0.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
The documentation in this directory is covered by the following license:
All documentations (e.g. files with extension `.md`) in this repository is
covered by the following license:

Attribution 4.0 International

Expand Down
2 changes: 2 additions & 0 deletions arch/src/aarch64/uefi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2020 Arm Limited (or its affiliates). All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

use std::io::{Read, Seek, SeekFrom};
use std::os::fd::AsFd;
Expand Down
2 changes: 2 additions & 0 deletions arch/src/x86_64/mpspec.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.

Expand Down
2 changes: 2 additions & 0 deletions block/src/qcow/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

mod qcow_raw_file;
mod raw_file;
Expand Down
2 changes: 2 additions & 0 deletions block/src/qcow/qcow_raw_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use super::RawFile;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
Expand Down
2 changes: 2 additions & 0 deletions block/src/qcow/refcount.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use std::fmt::{self, Display};
use std::io;
Expand Down
2 changes: 2 additions & 0 deletions block/src/qcow/vec_cache.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use std::collections::hash_map::IterMut;
use std::collections::HashMap;
Expand Down
2 changes: 2 additions & 0 deletions devices/src/legacy/cmos.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use libc::{clock_gettime, gmtime_r, timespec, tm, CLOCK_REALTIME};
use std::cmp::min;
Expand Down
2 changes: 2 additions & 0 deletions devices/src/legacy/i8042.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use std::sync::{
atomic::{AtomicBool, Ordering},
Expand Down
2 changes: 2 additions & 0 deletions fuzz/fuzz_targets/qcow.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

#![no_main]
use libfuzzer_sys::fuzz_target;
Expand Down
2 changes: 2 additions & 0 deletions hypervisor/src/arch/aarch64/gic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2022 Arm Limited (or its affiliates). All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

use crate::{CpuState, GicState, HypervisorDeviceError, HypervisorVmError};
use std::any::Any;
Expand Down
2 changes: 2 additions & 0 deletions hypervisor/src/arch/aarch64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright 2022 Arm Limited (or its affiliates). All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

pub mod gic;
2 changes: 2 additions & 0 deletions hypervisor/src/arch/x86/msr_index.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.

Expand Down
2 changes: 2 additions & 0 deletions hypervisor/src/kvm/aarch64/gic/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Copyright 2022 Arm Limited (or its affiliates). All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0

mod dist_regs;
mod icc_regs;
Expand Down
2 changes: 2 additions & 0 deletions net_gen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright TUNTAP, 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
Expand Down
2 changes: 2 additions & 0 deletions pci/src/bus.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use crate::configuration::{
PciBarRegionType, PciBridgeSubclass, PciClassCode, PciConfiguration, PciHeaderType,
Expand Down
2 changes: 2 additions & 0 deletions pci/src/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use crate::device::BarReprogrammingParams;
use crate::{MsixConfig, PciInterruptPin};
Expand Down
2 changes: 2 additions & 0 deletions pci/src/device.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use crate::configuration::{self, PciBarRegionType};
use crate::PciBarConfiguration;
Expand Down
2 changes: 2 additions & 0 deletions pci/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

//! Implements pci devices and busses.
#[macro_use]
Expand Down
2 changes: 2 additions & 0 deletions resources/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright © 2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# When changing this file don't forget to update the tag name in the
Expand Down
2 changes: 2 additions & 0 deletions scripts/prepare_vdpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
sudo apt update
apt-get source linux-image-unsigned-"$(uname -r)"
pushd linux-azure*/drivers/vdpa/vdpa_sim/ || exit
# REUSE-IgnoreStart
cat <<'EOF' >Makefile
# SPDX-License-Identifier: GPL-2.0
obj-m += vdpa_sim.o
obj-m += vdpa_sim_net.o
obj-m += vdpa_sim_blk.o
EOF
# REUSE-IgnoreEnd
make -C /lib/modules/"$(uname -r)"/build M="$PWD"
sudo make -C /lib/modules/"$(uname -r)"/build M="$PWD" modules_install
popd || exit
Expand Down
2 changes: 2 additions & 0 deletions virtio-devices/src/balloon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) 2020 Ant Financial
//
// 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
Expand Down
2 changes: 2 additions & 0 deletions virtio-devices/src/mem.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) 2020 Ant Financial
//
// 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
Expand Down
2 changes: 2 additions & 0 deletions virtio-devices/src/rng.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause

use super::Error as DeviceError;
use super::{
Expand Down

0 comments on commit 5e9886b

Please sign in to comment.