Files
Echoion/packaging/README.md
T
faumaray 2a533a27f8
Modular container CI / release-build (push) Failing after 12s
Add independent component release architecture
2026-07-29 22:40:35 +03:00

5.0 KiB

Linux installer layout

install.sh and uninstall.sh are copied into each Linux release payload. The installer renders the bot service plus the updater service/timer for user or system systemd scope. tests/installer_test.sh exercises portable installation, service opt-in, rollback, tamper protection, preservation, and purge behavior. System-scoped payloads are normalized to root ownership. Registered-service prefixes require a trusted path not writable by other identities. Purge uses recorded directory identity plus an installer marker before removing custom mutable paths. Install and uninstall also take a nonblocking advisory lock on the prefix directory so concurrent lifecycle operations fail before changing the runtime. Self-contained portable installs add a managed echoion launcher and relative install metadata, allowing a service-free tree to be moved and uninstalled as one directory.

The default installed tree is:

<prefix>/
  current -> versions/<version>
  versions/<version>/
    bin/                echoiond and echoion-updater
    lib/                Core and dynamic dependency closure
    service/            service templates
    share/echoion/      web, config template, CA trust store, licenses, tools
      bootstrap-plugins/ immutable first-party plugin artifacts
    manifest.json
  libexec/updater/<installer-version>/
    bin/echoion-updater stable installer-managed privileged helper
    lib/                private dynamic dependency closure
  config/
    plugins.d/         per-plugin JSON configuration, preserved on upgrade
  state/
    plugins/.managed/  versioned managed plugins and current links
    plugins/data/      plugin-owned persistent data, preserved on upgrade
  cache/  logs/  incoming/
  install.json  .echoion-install
  install.sh  uninstall.sh
  echoion              portable launcher (portable mode)

Payload validation is data-only: the installer runs the bundled Python manifest validator and never executes the daemon, Core, plugins, or updater. The updater also never performs network I/O or starts a service. It consumes bounded typed requests written below state/updates, with a root-owned system timer providing the privileged activation boundary. The timer executes only a fixed versioned helper and private library closure in libexec, never candidate code or libraries below current. Runtime activation remains pending until a daemon health commit. Helper passes inside the durable grace period preserve it and prioritize a matching commit; after the deadline an unconfirmed candidate is rolled back. Retention counts only committed healthy versions in addition to the active release.

First-party URL shorteners ship as immutable bootstrap artifacts in each release. During installation they are copied into state/plugins/.managed/<id>/versions/<plugin-version>/ and a missing current link is initialized. Upgrades add new immutable plugin versions without replacing an existing current selection, per-plugin configuration, or plugin data. The operation is idempotent and participates in installer rollback. The service and portable launcher expose only the active release's bundled shared-library directory through LD_LIBRARY_PATH; release builds keep BUILD_SHARED_LIBS=ON and ECHOION_STATIC_LINK=OFF. Plugin RUNPATHs also resolve the active current/lib closure from managed, portable/manual, and immutable bootstrap locations, with $ORIGIN/lib reserved for plugin-private dependencies. The daemon selects the bundled CA trust store when SSL_CERT_FILE is unset, so HTTPS feeds remain verified on hosts without the builder distribution's OpenSSL directory layout. Installed configurations use the relocatable ./share/echoion/web asset path; systemd units and the portable launcher set the active release as their working directory. An upgrade rewrites only the exact legacy installer default ./web; custom web roots remain untouched and the migration participates in transaction rollback.

Create publishable artifacts from the repository root:

scripts/release.sh --version 2.0.0

For a coordinated pre-publication build, add --void-source ../VoidLibrary and --void-teamspeak-source ../VoidTeamspeak. Container builds mount these explicit source overrides read-only; published releases use the pinned remote versions.

The default command uses the version-pinned release toolchain container and does not start the bot. Installation flags and data layouts are documented in the root README.

The official product workflow passes --skip-component-packages and verifies that every locked component already exists in the signed stable catalog. Each component repository packages and publishes only itself through scripts/release-component.sh; the transaction merges its release into the channel catalog without triggering an Echoion product release. See docs/component-releases.md. scripts/generate-update-feed.py remains available only for an explicit custom direct source; it can produce an Ed25519-signed envelope from a key held outside the repository.