update doc structure
This commit is contained in:
@@ -101,9 +101,9 @@ def run(args):
|
||||
for profile in ('cli', 'development', 'recovery'):
|
||||
root = (project / f'out/rootfs-{profile}.tar').resolve(strict=True).parent
|
||||
shutil.copyfile(root / 'packages.json', output / f'packages-{profile}.json')
|
||||
shutil.copyfile(project / 'docs/releases.md', output / 'RELEASE-VERIFICATION.md')
|
||||
shutil.copyfile(project / 'docs/internal-storage.md', output / 'INSTALLATION.md')
|
||||
shutil.copyfile(project / 'docs/eeprom.md', output / 'EEPROM.md')
|
||||
shutil.copyfile(project / 'fds-os.wiki/Releases.md', output / 'RELEASE-VERIFICATION.md')
|
||||
shutil.copyfile(project / 'fds-os.wiki/Internal-Storage.md', output / 'INSTALLATION.md')
|
||||
shutil.copyfile(project / 'fds-os.wiki/EEPROM.md', output / 'EEPROM.md')
|
||||
shutil.copyfile(project / 'tools/release-readme.md', output / 'README.md')
|
||||
shutil.copyfile(project / 'LICENSE', output / 'LICENSE')
|
||||
subprocess.run([str(signer), 'public-key', str(key), str(output / 'signer.pub')], check=True)
|
||||
|
||||
@@ -3,7 +3,7 @@ source "$(dirname -- "${BASH_SOURCE[0]}")/lib.sh"
|
||||
[[ $# == 0 || ( $# == 1 && $1 == --install-deps ) ]] || die 'Usage: tools/bootstrap-host [--install-deps]'
|
||||
[[ $(uname -s) == Linux && $(uname -m) == x86_64 ]] || die 'M0 requires an x86_64 Linux build host'
|
||||
source /etc/os-release
|
||||
[[ $ID == arch ]] || die 'M0 bootstrap supports Arch Linux; see docs/developer/build-host.md'
|
||||
[[ $ID == arch ]] || die 'M0 bootstrap supports Arch Linux; see fds-os.wiki/Developer-Build-Host.md'
|
||||
(( EUID != 0 )) || die 'Run as a normal user, not root'
|
||||
[[ ! $FDS_ROOT =~ [[:space:]] ]] || die 'xbps-src requires a checkout path without whitespace'
|
||||
if [[ ${1:-} == --install-deps ]]; then
|
||||
@@ -17,6 +17,11 @@ done
|
||||
# Fail before downloading if unprivileged build containers cannot run.
|
||||
bwrap --ro-bind / / --unshare-user --uid 0 --gid 0 true || die 'bubblewrap user namespaces are unavailable'
|
||||
cd "$FDS_ROOT"
|
||||
if [[ ! -f fds-os.wiki/Home.md ]]; then
|
||||
[[ ${FDS_OFFLINE:-0} != 1 ]] || die 'Frozen inputs are missing fds-os.wiki/Home.md'
|
||||
git submodule update --init fds-os.wiki
|
||||
[[ -f fds-os.wiki/Home.md ]] || die 'Documentation submodule is missing Home.md'
|
||||
fi
|
||||
mkdir -p out/downloads out/logs .host
|
||||
if [[ ${FDS_OFFLINE:-0} != 1 ]]; then
|
||||
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=60 submodule update --init --depth 1 vendor/void-packages
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ input="$FDS_VOID/hostdir/sources/fds-dasungd-${fds_version}"
|
||||
mkdir -p "$input"
|
||||
cp -- "$binary" "$input/dasungd"
|
||||
cp rust/dasungd/LICENSE rust/dasungd/profiles/paperlike13k-37hz.edid "$input/"
|
||||
cp docs/dasung.md "$input/"
|
||||
cp fds-os.wiki/Dasung.md "$input/dasung.md"
|
||||
# Cargo's vendored libusb license accompanies the static binary.
|
||||
fds_cargo_home=${CARGO_HOME:-$HOME/.cargo}
|
||||
license=$(find "$fds_cargo_home/registry/src" -path '*/libusb1-sys-0.7.0/libusb/COPYING' -print -quit)
|
||||
|
||||
+4
-4
@@ -48,9 +48,9 @@ tools/in-void env XBPS_ARCH=aarch64 XBPS_TARGET_ARCH=aarch64 \
|
||||
-R "$repository" \
|
||||
-R "$FDS_ROOT/out/packages" -SyU --reproducible "${packages[@]}"
|
||||
printf '%s\n' "$profile" >"$root/usr/share/fds/image-profile"
|
||||
install -Dm644 docs/internal-storage.md "$root/usr/share/doc/fds/internal-storage.md"
|
||||
install -Dm644 docs/recovery.md "$root/usr/share/doc/fds/recovery.md"
|
||||
install -Dm644 docs/releases.md "$root/usr/share/doc/fds/releases.md"
|
||||
install -Dm644 fds-os.wiki/Internal-Storage.md "$root/usr/share/doc/fds/internal-storage.md"
|
||||
install -Dm644 fds-os.wiki/Recovery.md "$root/usr/share/doc/fds/recovery.md"
|
||||
install -Dm644 fds-os.wiki/Releases.md "$root/usr/share/doc/fds/releases.md"
|
||||
install -Dm644 tools/capture-hardware "$root/usr/share/fds/capture-hardware"
|
||||
python3 tools/rootfs-audit "$root" --unconfigured
|
||||
epoch=$(git -C "$FDS_VOID" show -s --format=%ct HEAD)
|
||||
@@ -79,7 +79,7 @@ find packages/fds-base packages/fds-base-files packages/fds-init packages/fds-cl
|
||||
xargs -0 sha256sum >"$work/build-inputs.sha256"
|
||||
sha256sum image/base-packages.list tools/{build-rootfs,build-base-packages,build-fds,build-fds-package,build-kernel,in-void,in-rootfs,rootfs-namespace,finalize-rootfs,rootfs-audit,rootfs-archive,rootfs-runtime-check,rootfs-layout,rootfs_lib.py,lib.sh} \
|
||||
>>"$work/build-inputs.sha256"
|
||||
sha256sum docs/recovery.md docs/internal-storage.md docs/releases.md tools/capture-hardware tools/rust-notices tools/cargo-build .cargo/config.toml >>"$work/build-inputs.sha256"
|
||||
sha256sum fds-os.wiki/Recovery.md fds-os.wiki/Internal-Storage.md fds-os.wiki/Releases.md tools/capture-hardware tools/rust-notices tools/cargo-build .cargo/config.toml >>"$work/build-inputs.sha256"
|
||||
cp out/manifests/fds-tools*.sha256 "$work/"
|
||||
# The versioned build directory is the authoritative result; stable links are
|
||||
# convenience pointers. Rename the archive last, after every acceptance check.
|
||||
|
||||
@@ -5,7 +5,7 @@ set -euo pipefail
|
||||
(( EUID != 0 )) || { printf 'Build as an ordinary user\n' >&2; exit 2; }
|
||||
cd "$(dirname -- "${BASH_SOURCE[0]}")/.."
|
||||
for tool in makepkg pacman cargo rustc python3 git; do
|
||||
command -v "$tool" >/dev/null || { printf 'Missing %s; see docs/workstation.md\n' "$tool" >&2; exit 1; }
|
||||
command -v "$tool" >/dev/null || { printf 'Missing %s; see fds-os.wiki/Workstation.md\n' "$tool" >&2; exit 1; }
|
||||
done
|
||||
export FDS_SOURCE_DIR="$PWD"
|
||||
mkdir -p out/workstation out/workstation-package
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ from fds_version import version, validate
|
||||
project = Path(__file__).resolve().parents[1]
|
||||
OWNED = ('.cargo', '.gitignore', '.gitmodules', 'AGENTS.md', 'Cargo.lock',
|
||||
'Cargo.toml', 'LICENSE', 'Makefile', 'README.md', 'VOID_PACKAGES_COMMIT',
|
||||
'config', 'docs', 'examples', 'image', 'packaging', 'packages', 'profiles', 'rust-toolchain.toml',
|
||||
'config', 'fds-os.wiki', 'examples', 'image', 'packaging', 'packages', 'profiles', 'rust-toolchain.toml',
|
||||
'rust', 's6', 'tests', 'tools')
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def copy(source, destination):
|
||||
destination.parent.mkdir(parents=True, exist_ok=True)
|
||||
if source.is_dir() and not source.is_symlink():
|
||||
shutil.copytree(source, destination, symlinks=True,
|
||||
ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
|
||||
ignore=shutil.ignore_patterns('.git', '__pycache__', '*.pyc'))
|
||||
else:
|
||||
shutil.copy2(source, destination, follow_symlinks=False)
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ FDS_VOID="$FDS_ROOT/.host/void-packages"
|
||||
FDS_XBPS="$FDS_ROOT/.host/xbps/usr/bin"
|
||||
|
||||
die() { printf 'ERROR: %s\n' "$*" >&2; exit 1; }
|
||||
need() { command -v "$1" >/dev/null || die "Missing host command: $1 (see docs/developer/build-host.md)"; }
|
||||
need() { command -v "$1" >/dev/null || die "Missing host command: $1 (see fds-os.wiki/Developer-Build-Host.md)"; }
|
||||
|
||||
check_void_source() {
|
||||
local pin actual
|
||||
|
||||
@@ -46,11 +46,11 @@ tar --extract --zstd --same-permissions --no-same-owner \
|
||||
--file fds-source-0.1.0.tar.zst --directory source
|
||||
```
|
||||
|
||||
Start with [the project overview](source/README.md),
|
||||
[installation](source/docs/internal-storage.md), and
|
||||
[everyday cartridge use](source/docs/cartridges.md). The copied standalone guides
|
||||
retain their source-relative cross-references; the copies under `source/docs/`
|
||||
provide the complete linked documentation.
|
||||
Start with [the project overview](source/fds-os.wiki/Overview.md),
|
||||
[installation](source/fds-os.wiki/Internal-Storage.md), and
|
||||
[everyday cartridge use](source/fds-os.wiki/Cartridges.md). The complete manual is included under `source/fds-os.wiki/`. Page links use
|
||||
Gitea wiki names: for offline reading, open the corresponding `.md` file in
|
||||
that directory. The standalone guides are copies from the same wiki snapshot.
|
||||
|
||||
## Rebuild from the preserved inputs
|
||||
|
||||
@@ -75,5 +75,5 @@ Use new directories and paths without whitespace. The restored build has its
|
||||
recorded modes preserved by `--same-permissions`; `--no-same-owner` keeps the
|
||||
files owned by the ordinary build user. Its compiler and package environment use
|
||||
their own caches and have no network access. Host prerequisites and additional comparison
|
||||
instructions are in [Offline rebuilds](source/docs/developer/reproducible-builds.md).
|
||||
instructions are in [Offline rebuilds](source/fds-os.wiki/Developer-Reproducible-Builds.md).
|
||||
The private signing key is not included in this release or its input archive.
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ source "$(dirname -- "${BASH_SOURCE[0]}")/lib.sh"
|
||||
[[ $# == 0 ]] || die 'Usage: tools/run-system-vm'
|
||||
cd "$FDS_ROOT"
|
||||
for file in out/kernel/boot/kernel_2712.img out/fds-initramfs.img out/fds-system-cli.img; do
|
||||
[[ -s $file ]] || die "Build required input first: $file (see docs/developer/boot.md)"
|
||||
[[ -s $file ]] || die "Build required input first: $file (see fds-os.wiki/Developer-Boot.md)"
|
||||
done
|
||||
printf 'FDS user console VM. Press Ctrl-a, then x to close it. Temporary home is discarded.\n'
|
||||
exec tools/in-void qemu-system-aarch64 \
|
||||
|
||||
Reference in New Issue
Block a user