Add copyright file in debian rootfs
the format might be different, but we want rootfs to include license
info
Bug: 374200355
Test: build
Change-Id: I8ac142dd528d881256c17ebe371a53e919f40238
diff --git a/build/debian/build.sh b/build/debian/build.sh
index 5829ecc..b4436c1 100755
--- a/build/debian/build.sh
+++ b/build/debian/build.sh
@@ -104,6 +104,7 @@
source "$HOME"/.cargo/env
rustup target add "${arch}"-unknown-linux-gnu
+ cargo install cargo-license
}
download_debian_cloud_image() {
@@ -124,6 +125,9 @@
mkdir -p "${dst}/files/usr/local/bin/$1"
cp "${workdir}/$1/${arch}-unknown-linux-gnu/debug/$1" "${dst}/files/usr/local/bin/$1/AVF"
chmod 777 "${dst}/files/usr/local/bin/$1/AVF"
+
+ mkdir -p "${dst}/files/usr/share/doc/$1"
+ cargo license > "${dst}/files/usr/share/doc/$1/copyright"
popd > /dev/null
}
@@ -140,6 +144,8 @@
mkdir -p "${dst}/files/usr/local/bin/ttyd"
cp /tmp/stage/${arch}-linux-musl/bin/ttyd "${dst}/files/usr/local/bin/ttyd/AVF"
chmod 777 "${dst}/files/usr/local/bin/ttyd/AVF"
+ mkdir -p "${dst}/files/usr/share/doc/ttyd"
+ cp LICENSE "${dst}/files/usr/share/doc/ttyd/copyright"
popd > /dev/null
popd > /dev/null
}
diff --git a/guest/forwarder_guest/Cargo.toml b/guest/forwarder_guest/Cargo.toml
index 65f57cf..ce50e4c 100644
--- a/guest/forwarder_guest/Cargo.toml
+++ b/guest/forwarder_guest/Cargo.toml
@@ -2,6 +2,7 @@
name = "forwarder_guest"
version = "0.1.0"
edition = "2021"
+license = "Apache-2.0"
[dependencies]
clap = { version = "4.5.19", features = ["derive"] }
diff --git a/guest/forwarder_guest_launcher/Cargo.toml b/guest/forwarder_guest_launcher/Cargo.toml
index 03d3f7f..b7f9eaf 100644
--- a/guest/forwarder_guest_launcher/Cargo.toml
+++ b/guest/forwarder_guest_launcher/Cargo.toml
@@ -2,6 +2,7 @@
name = "forwarder_guest_launcher"
version = "0.1.0"
edition = "2021"
+license = "Apache-2.0"
[dependencies]
anyhow = "1.0.91"
diff --git a/guest/ip_addr_reporter/Cargo.toml b/guest/ip_addr_reporter/Cargo.toml
index e255eaf..57fc0d3 100644
--- a/guest/ip_addr_reporter/Cargo.toml
+++ b/guest/ip_addr_reporter/Cargo.toml
@@ -2,6 +2,7 @@
name = "ip_addr_reporter"
version = "0.1.0"
edition = "2021"
+license = "Apache-2.0"
[dependencies]
netdev = "0.31.0"