chadtmiller.com/monolith
An atproto PDS
0
0
Monolith is licensed MIT or Apache-2.0
.changeset/licensed-mit-or-apache.mdnew+7−0
| @@ -0,0 +1,7 @@ | ||
--- | ||
default: patch | ||
--- | ||
| ||
# Monolith is licensed MIT or Apache-2.0 | ||
| ||
Monolith may be used, changed and shared under the MIT license or the Apache License 2.0, at your option. Both are in the binary's archive and in the image, at `/usr/share/doc/monolith/`, whose `org.opencontainers.image.licenses` label names them. The specifications vendored under `spec/` keep their own licenses. | ||
.knotless/workflows/release.yml+3−2
| @@ -83,10 +83,11 @@ steps: | ||
fi | ||
command -v jq > /dev/null || { apt-get update -qq && apt-get install -y -qq --no-install-recommends jq > /dev/null; } | ||
rm -rf target/release-files && mkdir -p target/release-files | ||
# The binary, as getting-started.md downloads and checks it. | ||
# The binary and its licenses, as getting-started.md downloads and checks it. | ||
name=pds-$version-x86_64-linux.tar.gz | ||
epoch=$(git log -1 --format=%ct HEAD) | ||
tar -C target/release -cf - --sort=name --mtime="@$epoch" --owner=0 --group=0 --numeric-owner pds | | ||
tar -cf - --sort=name --mtime="@$epoch" --owner=0 --group=0 --numeric-owner \ | ||
-C target/release pds -C "$PWD" LICENSE-APACHE LICENSE-MIT | | ||
gzip -9n > "target/release-files/$name" | ||
(cd target/release-files && sha256sum "$name" > "$name.sha256" && cat "$name.sha256") | ||
# The image. | ||
.knotless/image.sh+5−2
| @@ -30,10 +30,12 @@ jq -e '.mediaType == "application/vnd.oci.image.manifest.v1+json" | ||
| ||
# The layer: what the Dockerfile's last stage adds to the base. Its | ||
# /etc/passwd and /etc/group are the base's with the user pds, 10001, and | ||
# its group, as the Dockerfile's groupadd and useradd make them. | ||
# its group, as the Dockerfile's groupadd and useradd make them; the | ||
# licenses are the repository's, beside this script. | ||
root="$work/root" | ||
mkdir -p "$root/usr/local/bin" "$root/data" | ||
mkdir -p "$root/usr/local/bin" "$root/usr/share/doc/monolith" "$root/data" | ||
install -m 755 "$bin" "$root/usr/local/bin/pds" | ||
install -m 644 "$(dirname "$0")/../LICENSE-APACHE" "$(dirname "$0")/../LICENSE-MIT" "$root/usr/share/doc/monolith/" | ||
for layer in $(jq -r '.layers[].digest' "$manifest"); do | ||
tar -xzf "$(blob "$layer")" -C "$root" --wildcards 'etc/passwd' 'etc/group' 2>/dev/null || true | ||
done | ||
| @@ -61,6 +63,7 @@ jq --arg diff "sha256:$diff_id" --arg created "$created" \ | ||
| .config.Cmd = ["serve"] | ||
| .config.Labels = (.config.Labels // {}) + { | ||
"org.opencontainers.image.title": "monolith", | ||
"org.opencontainers.image.licenses": "MIT OR Apache-2.0", | ||
"org.opencontainers.image.version": $version, | ||
"org.opencontainers.image.revision": $commit, | ||
"org.opencontainers.image.source": "https://knotless.dev/chadtmiller.com/monolith", | ||
crates/pds/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
tikv-jemallocator.workspace = true | ||
crates/pds-cli/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-cli" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
pds-lexicon.workspace = true | ||
crates/pds-lexicon/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-lexicon" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
pds-repo.workspace = true | ||
crates/pds-repo/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-repo" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
base64.workspace = true | ||
crates/pds-server/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-server" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
pds-lexicon.workspace = true | ||
crates/pds-space/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-space" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
pds-repo.workspace = true | ||
crates/pds-store/Cargo.toml+1−0
| @@ -3,6 +3,7 @@ name = "pds-store" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
license.workspace = true | ||
| ||
[dependencies] | ||
serde_json.workspace = true | ||