Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# SPDX-FileCopyrightText: 2020 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

allow-mixed-uninlined-format-args = false
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

* @ermo @jplatte @tarkah
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
Expand Down
89 changes: 51 additions & 38 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

name: CI

on:
Expand All @@ -12,46 +15,56 @@ env:
CARGO_TERM_COLOR: always

jobs:
meta:
runs-on: ubuntu-latest
name: Non-code Checks

steps:
- name: Checkout source
uses: actions/checkout@v6

- name: Check for typos
uses: crate-ci/typos@v1.43.5

- name: Check REUSE compliance
uses: fsfe/reuse-action@v6.0.0
build:
runs-on: ubuntu-latest
name: Build & Test Project

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: typos-action
uses: crate-ci/typos@v1.29.3

- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
echo "/usr/lib/llvm-18/bin" >> $GITHUB_PATH
echo "CC=/usr/lib/llvm-18/bin/clang" >> $GITHUB_ENV

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Check Formatting
run: cargo fmt --all -- --check

- name: Cargo Cache
uses: Swatinem/rust-cache@v2

- name: Build project
run: cargo build

- name: Test project
run: cargo test --all

- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
clippy_flags: --workspace --no-deps
filter_mode: nofilter
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout source
uses: actions/checkout@v6

- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
echo "/usr/lib/llvm-18/bin" >> $GITHUB_PATH
echo "CC=/usr/lib/llvm-18/bin/clang" >> $GITHUB_ENV

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Check Formatting
run: cargo fmt --all -- --check

- name: Cargo Cache
uses: Swatinem/rust-cache@v2

- name: Build project
run: cargo build

- name: Test project
run: cargo test --all

- name: Run clippy
uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-check'
clippy_flags: --workspace --no-deps
filter_mode: nofilter
github_token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

name: Release

on:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

/target
/.vscode
target
typos

**/db/**/test.db

Expand Down
3 changes: 3 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

edition = "2024"
max_width = 120
7 changes: 4 additions & 3 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

[default]

[default.extend-words]
Expand All @@ -7,6 +10,4 @@ restat = "restat"
idae = "idae"

[files]
extend-exclude = [
"serpent-style/**/*"
]
extend-exclude = ["serpent-style/**/*"]
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

[workspace]
members = ["boulder", "moss", "libstone", "crates/*"]
default-members = ["moss"]
Expand Down Expand Up @@ -85,7 +88,11 @@ thread-priority = "3.0.0"
tokio = { version = "1.38.0", features = ["full"] }
tokio-util = { version = "0.7.11", features = ["io"] }
tracing = { version = "0.1.41", features = ["attributes"] }
tracing-subscriber = { version = "0.3.19", default-features = false, features = ["ansi", "fmt", "json"] }
tracing-subscriber = { version = "0.3.19", default-features = false, features = [
"ansi",
"fmt",
"json",
] }
triomphe = { version = "0.1.15", default-features = false }
url = { version = "2.5.2", features = ["serde"] }
xxhash-rust = { version = "0.8.11", features = ["xxh3"] }
Expand Down
9 changes: 7 additions & 2 deletions DESIGN-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
---

# How AerynOS delivers software to OS installs

## Software package metadata: manifest.*.bin
Expand All @@ -10,7 +15,7 @@ The `manifest.${ARCH}.bin` files contain all the metadata needed by the AerynOS
> and the stone archive type flag is set to buildmanifest
> sneaksy
> (in fact, our repo format is also just a set of meta payloads in a stone file..)
> but its also strongly typed, fixed headers, version agnostic header unpack and compressed with zstd with CRC checks
> but its also strongly typed, fixed headers, version agnostic header unpack and compressed with zstd with CRC checks
> soo. a little less weak than sounding
> crc is actually xxh64 iirc

Expand All @@ -22,7 +27,7 @@ AerynOS distributes software via its custom `stone` format. This format was expl
> Context: we dont mix layout + metadata (unlike in alpine, where tar records are used for metadata)
> in fact we explicitly separate them
> so a "normal" stone file has a meta payload with strongly typed/tagged key value pairs/sets
> a content payload which is every unique file concatenated into a "megablob" and compressed singly
> a content payload which is every unique file concatenated into a "megablob" and compressed singly
> an index payload which is a jump table into offsets in the unpacked content payload
> to allow the xxhash128 keying
> ie "position one is hash xyz"
Expand Down
11 changes: 11 additions & 0 deletions LICENSES/Zlib.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
zlib License

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
---

# 🛠️ OS Tools - Modern System State Management

## 📦 Core Tools
Expand Down
17 changes: 17 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2026 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

version = 1

# Annotate files that we cannot edit or comment.
# We don't report the initial year for simplicity;
# it is a valid copyright notice anyway.
[[annotations]]
path = [
"Cargo.lock",
"funding.json",
"moss/src/db/*/schema.rs",
"test/**/*.stone",
]
SPDX-FileCopyrightText = "AerynOS Developers"
SPDX-License-Identifier = "MPL-2.0"
2 changes: 2 additions & 0 deletions boot/module/module-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

installkernel() {
return 0
Expand Down
3 changes: 3 additions & 0 deletions boot/moss-fstx.service
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

[Unit]
Description=Moss state rollback
DefaultDependencies=no
Expand Down
2 changes: 2 additions & 0 deletions boot/moss-fstx.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
command -v moss > /dev/null || exit 1
Expand Down
3 changes: 3 additions & 0 deletions boulder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

[package]
name = "boulder"
edition.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions boulder/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0
---

# Boulder

This directory contains the Serpent OS package building tool `boulder`.
Expand Down
5 changes: 4 additions & 1 deletion boulder/boulder-concurrency-test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

name : boulder-concurrency-test
version : 1
release : 1
Expand All @@ -22,7 +25,7 @@ build : |
#!/usr/bin/env bash
#
set -euo pipefail

[[ -f build.log ]] || exit 1
for a b c d e f g h
do
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/autotools.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:

# We default to using CONFIG_SHELL==SHELL=/usr/bin/dash because our tests show that it is around
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/cargo.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- cargo_set_environment:
description: Set environmental variables for Cargo build
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/ccache.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- ccache_zero:
description: Zeroes out the ccache stats
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:

- cmake:
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/meson.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:

- meson:
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/misc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:

- export_docbook_catalogs:
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/ninja.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- ninja:
description: Use ninja, without any additional arguments this will run the default target (likely the build)
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/perl.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2024 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- perl_setup:
description: Create a Makefile with ExtUtils::MakeMaker from stdlib to be used with %make and %make_install macros
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/pgo.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

definitions:
- pgo_stage : "%(pgo_stage)"

Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/python.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:

- python_setup:
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/qt-kde.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- qmake_qt5:
description: Invokes Qt5 with the correct default values
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/actions/ruby.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2025 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

actions:
- gem_build:
description: Build a ruby gem
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/arch/aarch64.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

# Provides -m64 builds for aarch64 build-hosts

definitions:
Expand Down
3 changes: 3 additions & 0 deletions boulder/data/macros/arch/base.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 AerynOS Developers
# SPDX-License-Identifier: MPL-2.0

# Provides core definitions which each profile may override

definitions:
Expand Down
Loading