29 Commits
Author SHA1 Message Date
Echoion Component Release Bot 1acf261ff5 Feed: EchoionCore stable 2.0.1 2026-08-02 00:27:04 +00:00
Echoion Component Release Bot 62bd981b80 Feed: EchoionApi stable 2.0.1 2026-08-02 00:08:43 +00:00
Echoion Component Release Bot 2bbf1c7c05 Feed: EchoionCore stable 2.0.0 2026-08-01 17:03:09 +00:00
Echoion Component Release Bot 104268864e Feed: EchoionPluginUrlShortenerExternal stable 2.0.0 2026-08-01 16:56:06 +00:00
Echoion Component Release Bot 9241d97666 Feed: EchoionPluginUrlShortenerInternal stable 2.0.0 2026-08-01 16:50:05 +00:00
Echoion Component Release Bot d670d669ec Feed: EchoionStandalone stable 2.0.0 2026-08-01 16:44:20 +00:00
Echoion Component Release Bot a1fe532e68 Feed: EchoionDesktop stable 2.0.0 2026-08-01 16:34:02 +00:00
Echoion Component Release Bot c6cd139d0a Feed: EchoionUpdater stable 2.0.0 2026-08-01 16:28:22 +00:00
Echoion Component Release Bot f731167d3d Feed: EchoionWeb stable 2.0.0 2026-08-01 16:22:45 +00:00
Echoion Component Release Bot ac8cf35901 Feed: EchoionHost stable 2.0.0 2026-08-01 16:16:25 +00:00
Echoion Component Release Bot 17307d952d Feed: EchoionApi stable 2.0.0 2026-08-01 16:10:58 +00:00
Echoion Component Release Bot 835e214d6c Feed: reset pre-final releases for schema 3 2026-08-01 18:16:33 +03:00
Echoion Component Release Bot 5ed13df387 Feed: EchoionPluginUrlShortenerExternal stable 2.0.0 2026-07-30 01:22:47 +00:00
Echoion Component Release Bot a84f02a47c Feed: EchoionPluginUrlShortenerInternal stable 2.0.0 2026-07-30 01:22:07 +00:00
Echoion Component Release Bot 3d0ac0aedc Feed: EchoionCore stable 2.0.0 2026-07-30 01:21:28 +00:00
Echoion Component Release Bot 5a72a12b75 Feed: EchoionStandalone stable 2.0.0 2026-07-30 01:20:11 +00:00
Echoion Component Release Bot f09d4bce45 Feed: EchoionDesktop stable 2.0.0 2026-07-30 01:19:19 +00:00
Echoion Component Release Bot 4e0edea55f Feed: EchoionWeb stable 2.0.0 2026-07-30 01:18:32 +00:00
Echoion Component Release Bot 63bbca8a6f Feed: EchoionHost stable 2.0.0 2026-07-30 01:17:46 +00:00
Echoion Component Release Bot 91e8f9f18b Feed: EchoionUpdater stable 2.0.0 2026-07-30 01:16:32 +00:00
Echoion Component Release Bot 9346f862d9 Feed: EchoionApi stable 2.0.0 2026-07-30 01:09:54 +00:00
Echoion Release Bot 96e9e49027 Feed: nightly 1.0.10-nightly.20260729.29 2026-07-29 02:33:24 +00:00
Echoion Release Bot 2a6bc9af12 Feed: nightly 1.0.10-nightly.20260728.27 2026-07-28 02:33:23 +00:00
Echoion Release Bot 459685bad2 Feed: nightly 1.0.10-nightly.20260727.26 2026-07-27 02:33:20 +00:00
Echoion Release Bot dc93411167 Feed: stable 1.0.9 2026-07-26 15:52:23 +00:00
Echoion Release Bot 52f5a4b69c Feed: stable 1.0.8 2026-07-26 14:23:23 +00:00
Echoion Release Bot 4d7480db22 Feed: stable 1.0.7 2026-07-26 02:44:12 +00:00
Echoion Release Bot b410ff32bf Feed: nightly 0.0.0-nightly.20260726.17 2026-07-26 02:13:51 +00:00
faumaray ca6dceacaf Initialize release feed 2026-07-26 00:23:14 +03:00
105 changed files with 1104 additions and 17232 deletions

No files matched your search

-272
View File
@@ -1,272 +0,0 @@
---
BasedOnStyle: LLVM
AccessModifierOffset: 0
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseArrows: false
AlignCaseColons: false
AlignConsecutiveTableGenBreakingDAGArgColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenCondOperatorColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenDefinitionColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseExpressionOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakAfterReturnType: None
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeConceptDeclarations: Always
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakFunctionDefinitionParameters: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
BreakTemplateDeclarations: MultiLine
ColumnLimit: 80
CommentPragmas: ""
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Always
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: ^"(llvm|llvm-c|clang|clang-c)/
Priority: 2
SortPriority: 0
CaseSensitive: true
- Regex: ^(<|"(gtest|gmock|isl|json)/)
Priority: 3
SortPriority: 0
CaseSensitive: true
- Regex: .*
Priority: 1
SortPriority: 0
CaseSensitive: true
IncludeIsMainRegex: (Test)?$
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: true
IndentCaseBlocks: true
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: true
AtStartOfFile: true
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ""
MacroBlockEnd: ""
MainIncludeChar: AngleBracket
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PPIndentWidth: -1
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDeclarationName: false
AfterFunctionDefinitionName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
ExceptDoubleParentheses: false
InConditionalStatements: false
InCStyleCasts: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
TableGenBreakInsideDAGArg: DontBreak
UseTab: Always
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
-8
View File
@@ -1,8 +0,0 @@
.git
build*
dist
release
EchoionWeb/frontend/node_modules
EchoionWeb/frontend/web-dist
components
docs
-280
View File
@@ -1,280 +0,0 @@
# Echoion releases on Gitea
Echoion release builds run only through `scripts/release.sh`, whose default
mode builds, tests, validates, and packages inside
`containers/release.Dockerfile`. The runner host only checks out sources and
controls Docker; the workflow never starts `echoiond`.
## One-time Gitea setup
The workflows target the standard `ubuntu-24.04` label advertised by a default
Gitea runner. No custom runner label is required. Use one trusted Linux AMD64
runner with capacity set to one so release and feed writes remain serialized
on Gitea versions that do not implement workflow `concurrency`. The job image
needs Bash, Git with SSH-signature support, OpenSSH client tools, Python 3.10
or newer, OpenSSL with Ed25519 support, coreutils, the Docker CLI, and access
to a Docker daemon. The release builder itself remains containerized.
Every workflow starts by running `docker version` and `docker info`. These
commands verify both the Docker client in the `ubuntu-24.04` job image and
access to the daemon before checkout, secrets, or a long release build are
used. A runner installed as a container must have the host socket mounted:
```yaml
services:
runner:
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
```
Leave `container.docker_host` at its generated default (`""`) so `act_runner`
passes the detected Docker endpoint to job containers. Do not set it to `-`,
which explicitly prevents that endpoint from being mounted. Restart the runner
after changing its configuration. `scripts/lib/docker-daemon-path.sh` detects
when commands run inside the job container and translates checked-out paths
through that container's Docker mount table. The release wrapper and
control-plane tests both use it because bind mount paths passed to the socket
are resolved by the runner host daemon, not inside the Actions job container.
The shared `scripts/lib/component-ssh.sh` helper pins the current
`git.faumaray.ru` RSA host key. Its verified fingerprint is
`SHA256:fugBYnqAnqmTLsGpafVgQF9gPQzJqps7uHvs48blg2A`. If the Gitea SSH host key
is intentionally rotated, verify the new fingerprint through an independent
administrator channel and update the shared helper. Component Git commands use
`BatchMode=yes` and strict host
checking, so missing credentials or a changed host key fail instead of waiting
for interactive runner input. Never work around a rotation by disabling strict
host-key checking.
The Docker-capable runner executes only protected `main` pushes, manual runs,
scheduled nightlies, and signed release tags. The container CI workflow does
not run for pull requests because contributor-controlled scripts must not
receive a privileged Docker socket or release checkout credentials. If
pre-merge CI is required, register a separate ephemeral `echoion-pr` runner
without release secrets or host-level Docker access and give it a dedicated
workflow. A global runner such as the default installation shown in Gitea must
only serve repositories you trust: a workflow with Docker-daemon access can
control the runner host.
Enable Actions and configure these secrets:
| Secret | Scope | Purpose |
| --- | --- | --- |
| `RELEASE_CHECKOUT_SSH_KEY` | `Void` organization | Single-line base64 of the release-bot OpenSSH private key used to read every private component/dependency repository and to fast-forward the protected Echoion `release-feed` branch. |
| `RELEASE_BOT_TOKEN` | `Void` organization | PAT owned by a dedicated bot. It needs repository write scope for component releases and package write scope for the public organization registry. It does not need `release-feed` write access. |
| `RELEASE_TAG_ALLOWED_SIGNERS` | `Void` organization | Complete OpenSSH `allowed_signers` lines for maintainers allowed to publish `v*` tags. |
| `RELEASE_FEED_ED25519_PRIVATE_KEY` | `Void` organization | Single-line base64 of the Ed25519 PEM private key that signs component feeds. |
| `RELEASE_FEED_GIT_SIGNING_KEY` | `Void` organization | Single-line base64 of the OpenSSH private key that signs `release-feed` commits. |
| `RELEASE_FEED_ED25519_PUBLIC_KEY` | Echoion repository | PEM public key matching the component-feed signing key. It verifies independently published components without exposing signing authority to the product workflow. |
Encode multiline private keys with `base64 -w0` before storing them. This is a
security requirement: the release scripts reject raw multiline private keys so
runner environment diagnostics cannot disclose them. Keep the public
`RELEASE_TAG_ALLOWED_SIGNERS` and `RELEASE_FEED_ED25519_PUBLIC_KEY` values in
their documented text formats.
Root product checkouts use the public repository over HTTPS with
`persist-credentials: false`.
Independent workflows check out their current repository with Gitea's job
token and the public Echoion release tools over HTTPS; their private
component/dependency reads and `release-feed` push use the pinned SSH helper.
Release API operations use the bot PAT. The component-feed private signing key
must not be present in the Echoion product repository, Git, runner images,
Actions variables, or release assets.
## Independent component repositories
Echoion does not use Git submodules. `components.json` describes the nine
independent repositories: `EchoionApi`, `EchoionHost`, `EchoionCore`,
`EchoionWeb`, `EchoionStandalone`, `EchoionUpdater`, `EchoionDesktop`,
`EchoionPluginUrlShortenerInternal`, and
`EchoionPluginUrlShortenerExternal`. `components.lock.json` is the immutable
release checkout manifest. All Gitea workflows check out the locked revisions
as ordinary SSH repositories before entering Docker.
For a new developer checkout:
```bash
scripts/prepare-release.sh --workspace ..
```
For ordinary development CMake follows each component's `main` branch unless a
`CPM_<Component>_SOURCE` override is supplied. Release builds use the exact
lock. After changing a component, make a signed commit and push it over SSH
first, then refresh and commit the root lock:
```bash
scripts/prepare-release.sh --workspace ..
git add components.lock.json cmake/DependencyLock.cmake
git commit -S -m 'Release: lock Echoion 2.0.0 components'
```
The preparer refuses dirty, inaccessible, missing, non-fast-forward, or
version/tag-inconsistent component repositories, so a lock can never point at
unpublished source. Product version changes are separate: edit only
`project(Echoion VERSION ...)` in root `CMakeLists.txt`; orchestrated component
builds and release overrides inherit that value. A stable or beta release tag
must have the same numeric base as this CMake version, so `v2.0.0` and
`v2.0.0-rc.1` both require `project(Echoion VERSION 2.0.0 ...)`. The release
workflow rejects mismatches before building.
`scripts/prepare-release.sh` regenerates `components.lock.json`. When
VoidLibrary or VoidTeamspeak advances, update its exact pushed commit in
`cmake/DependencyLock.cmake` in the same lock commit.
Nightlies use the newer of the root CMake version and the next patch after the
latest published release. This prevents a stale CMake value from producing a
version rollback while still allowing a single CMake edit to move nightlies to
a newer minor or major release line.
Create an orphan `release-feed` branch containing a tracked `feeds/`
directory, then protect it so only the release bot can push. Protect the `v*`
tag pattern so only the release maintainers represented by
`RELEASE_TAG_ALLOWED_SIGNERS` can create, update, or delete matching tags. The
workflow requires the exact `v*` rule to have an explicit non-empty user or
team allowlist. Configure it under repository **Settings → Tags → Protected
tags**; a similar pattern such as `v*.*` does not satisfy the release check.
Gitea uses the same allowlist for tag creation and later tag changes; when
immutable release tags are required, add a server-side pre-receive policy that
rejects updates and deletion after creation. Protect `main` in the normal way.
The updater source can use the feed base:
```text
https://<gitea>/<owner>/<repo>/raw/branch/release-feed
```
or an exact channel catalog:
```text
https://<gitea>/<owner>/<repo>/raw/branch/release-feed/feeds/stable/catalog.json
```
The catalog resolves immutable component documents under
`feeds/<channel>/<component>/<version>.json` and plugin documents under
`feeds/<channel>/plugins/<plugin-id>/<version>.json`. The embedded updater
accepts legacy signed envelopes but new component and product publications use
envelope schema 3:
the signed document is rendered as indented JSON in `document`, while
`signedPayload` preserves the exact bytes covered by the Ed25519 signature.
Verification rejects any semantic difference between those two representations.
Component and product manifests, plus their corresponding
feeds, attest `buildType: "RelWithDebInfo"`; release tooling rejects any other
build type.
The embedded updater trust configuration is represented by
`.gitea/release-keys/official-update-keys.json`. `scripts/release.sh` validates and
embeds that JSON automatically. Release workflows also pass the HTTPS
channel catalog through `--official-update-feed-url`, so a fresh installation
has a signed official source without operator-side duplication. The v1
`feeds/echoion-runtime.json` feed is not published at the 2.0 cutover; v1
operators must stop their service and run the signed v2 installer manually.
## Stable and beta releases
Create an annotated SSH-signed tag. A version without a prerelease suffix goes
to `stable`; any strict SemVer prerelease goes to `beta`. First set the product
version in the root `CMakeLists.txt`, commit it, and use the same numeric base
for the tag:
```bash
git config gpg.format ssh
git config user.signingkey ~/.ssh/echoion-release-maintainer
git tag -s -a v2.0.0 -m 'Echoion 2.0.0'
test "$(git cat-file -t refs/tags/v2.0.0)" = tag
git push origin v2.0.0
```
The private-key path works without an SSH agent. A `.pub` path may be used
instead when its matching private key is already loaded in `ssh-agent`.
`.gitea/workflows/release.yml` rejects a lightweight tag, a non-SSH
signature, an untrusted signer, a repository without the exact `v*` protected
tag rule and explicit allowlist, a non-SemVer name, an event object unrelated
to the tag, or a checkout whose commit differs from the signed tag target.
Release notes contain the signed tag subject and body but not its SSH signature
armor.
The workflow creates or resumes a draft, replaces incomplete draft assets,
uploads every file in `dist/`, downloads every asset through Gitea, checks
its size and SHA-256, and only then publishes. A rerun against an already
published release is read-only and succeeds only when all remote assets still
match. The signed catalog and all component feeds are committed together after
release publication; a feed failure can therefore be retried without replacing
a published release.
## Nightly releases
`.gitea/workflows/nightly.yml` runs at 02:17 UTC and can also be dispatched
manually. The highest published `vMAJOR.MINOR.PATCH` release supplies the next
patch as `MAJOR.MINOR.(PATCH+1)-nightly.YYYYMMDD.RUN_NUMBER`. With no published
semantic release, nightlies use the root CMake
`project(Echoion VERSION x.y.z)` value without incrementing it. Drafts, failed
publications, and `nightly-*` releases do not affect the base. Nightlies use the
`nightly` channel, publish as prereleases, and keep the newest 14 Gitea
releases. Channel catalogs remain separate, and nightly publication never
advances stable component state. Gitea materializes a missing
`nightly-*` Git tag only when the download-verified draft is published; the
publisher then verifies its commit immediately and never moves an existing tag
whose target differs. Stable and beta publishing require their signed tag to
exist before creating a draft. If `nightly-*` is protected separately, allow
the release bot to create and delete it.
Every rolling catalog and `latest.json` envelope expires 45 days after
generation. Scheduled
nightlies normally refresh it daily. Alert when the feed branch has not
advanced for more than seven days, and treat 30 days without a successful
signing run as urgent.
## Feed key custody and rotation
The active component-feed public key id is
`echoion-component-release-2026-07-30-r2`. The superseded
`echoion-component-release-2026-07-30` key is intentionally absent because its
private material was revoked before any feed publication. The older
`echoion-component-release-2026-07` and `echoion-release-2026-07` keys remain
embedded for compatibility. To rotate,
generate the private key on a trusted operator machine:
```bash
umask 077
openssl genpkey -algorithm ED25519 -out echoion-release-YYYY-MM.pem
openssl pkey -in echoion-release-YYYY-MM.pem -pubout \
-out echoion-release-YYYY-MM.pub.pem
```
The PEM public key contains an RFC 8410 SubjectPublicKeyInfo wrapper. The
`ed25519` field in `release-keys/official-update-keys.json` must instead contain
the standard Base64 encoding of only the raw 32-byte public key. Derive that
value with:
```bash
openssl pkey -pubin -in echoion-release-YYYY-MM.pub.pem -outform DER |
tail -c 32 |
base64 -w0
printf '\n'
```
Add the new public key to official builds before signing any feed with it and
keep the old public key embedded for at least one full update lifetime. Update
the signing key id in component release workflows and replace their private-key
secret only after the build containing both trust roots is installed broadly.
Replace the product workflow's public-key secret at the same cutover.
Immutable version feeds are never rewritten during rotation. Never print the
private key or pass it as a command-line argument.
## Recovery rules
- A failed build creates no Gitea release.
- A failed upload leaves a draft. Rerun the same workflow to replace the
partial draft assets.
- A failed verification never publishes the draft.
- A published release with mismatched assets is immutable; investigate and
create a new version instead of replacing it.
- A failed feed push leaves the published release available but undiscoverable
to auto-update. Rerun the workflow; publication verification is idempotent
and the feed step will run again.
- Never edit `release-feed` manually. The publisher validates immutable
version feeds, replay sequences, and component state before committing the
complete transaction.
@@ -1,3 +0,0 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAqD97/GZ6BJaeQpg6shajRcNhwMzvNZ3SvkQtAu6pxEw=
-----END PUBLIC KEY-----
@@ -1,14 +0,0 @@
[
{
"id": "echoion-release-2026-07",
"ed25519": "qD97/GZ6BJaeQpg6shajRcNhwMzvNZ3SvkQtAu6pxEw="
},
{
"id": "echoion-component-release-2026-07",
"ed25519": "vUZXQXNkY/f/D42z6/dYK8SNxCvXjxYQ8ZCpjecIclk="
},
{
"id": "echoion-component-release-2026-07-30-r2",
"ed25519": "0ioZyP3v38st9qShLG9+gvdM8xd8AgO7UNaP5eeHflk="
}
]
-81
View File
@@ -1,81 +0,0 @@
name: Modular container CI
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
release-build:
runs-on: ubuntu-24.04
steps:
- name: Verify the Docker-capable Gitea runner
shell: bash
run: |
set -euo pipefail
test "$(uname -s)" = Linux
command -v docker
docker version
docker info
- name: Check out public root
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
persist-credentials: false
- name: Verify source-free root and resolve every lock over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
scripts/ci-checkout-components.sh \
"$PWD/components" \
"$PWD/dependencies"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
- name: Build, test, and package without starting Echoion
env:
CI_VERSION: 2.0.0-ci.${{ gitea.run_number }}.${{ gitea.run_attempt }}
run: |
set -euo pipefail
scripts/release.sh \
--version "$CI_VERSION" \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--update-channel beta \
--update-sequence "${{ gitea.run_number }}"
- name: Test release control-plane scripts offline
shell: bash
run: |
set -euo pipefail
bash scripts/tests/test-gitea-tag-verification.sh
bash scripts/tests/test-component-ssh-secrets.sh
. scripts/lib/docker-daemon-path.sh
docker_workspace=$(docker_daemon_path "$PWD")
for test_script in \
scripts/tests/test_package_components.py \
scripts/tests/test_publish_component_feeds.py \
scripts/tests/test_gitea_release.py
do
docker run --rm --network none \
--volume "$docker_workspace:/workspace:ro" \
--workdir /workspace \
echoion-release-builder:gcc-16.1.0 \
python3 "$test_script"
done
-103
View File
@@ -1,103 +0,0 @@
name: Nightly product integration
on:
schedule:
- cron: '17 2 * * *'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: echoion-release-feed
cancel-in-progress: false
jobs:
publish-nightly:
runs-on: ubuntu-24.04
steps:
- name: Verify the Docker-capable Gitea runner
shell: bash
run: |
set -euo pipefail
test "$(uname -s)" = Linux
command -v docker
docker version
docker info
- name: Check out public signed main
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Verify root cutover and check out locked components over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
scripts/ci-checkout-components.sh \
"$PWD/components" \
"$PWD/dependencies"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
- name: Derive nightly identity and URLs
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
API_URL: ${{ gitea.api_url }}
SERVER_URL: ${{ gitea.server_url }}
REPOSITORY: ${{ gitea.repository }}
RUN_NUMBER: ${{ gitea.run_number }}
run: |
set -euo pipefail
date_id=$(date -u +%Y%m%d)
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
version=$(
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
derive-nightly-version \
--owner "$owner" \
--repo "$repo" \
--cmake-file CMakeLists.txt \
--date-id "$date_id" \
--run-number "$RUN_NUMBER"
)
tag="nightly-${date_id}-${RUN_NUMBER}"
python3 scripts/validate-semver.py "$version"
{
printf 'RELEASE_TAG=%s\n' "$tag"
printf 'RELEASE_VERSION=%s\n' "$version"
printf 'RELEASE_CHANNEL=nightly\n'
printf 'RELEASE_SEQUENCE=%s\n' "$RUN_NUMBER"
printf 'RELEASE_ARTIFACT_BASE_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/releases/download/${tag}"
printf 'RELEASE_FEED_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/nightly/catalog.json"
printf 'RELEASE_TARGET=%s\n' "$(git rev-parse HEAD)"
} >>"$GITHUB_ENV"
- name: Build and test all locked repositories in Docker
shell: bash
run: |
set -euo pipefail
scripts/release.sh \
--version "$RELEASE_VERSION" \
--skip-component-packages \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--official-update-feed-url "$RELEASE_FEED_URL" \
--update-channel nightly \
--update-sequence "$RELEASE_SEQUENCE"
-224
View File
@@ -1,224 +0,0 @@
name: Signed modular release
on:
push:
tags:
- v*
permissions:
contents: read
concurrency:
group: echoion-release-feed
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-24.04
steps:
- name: Verify the Docker-capable Gitea runner
shell: bash
run: |
set -euo pipefail
test "$(uname -s)" = Linux
command -v docker
docker version
docker info
- name: Check out the public signed root tag
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ gitea.ref }}
fetch-depth: 0
persist-credentials: false
- name: Reject embedded component sources and gitlinks
shell: bash
run: |
set -euo pipefail
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
python3 - <<'PY'
import json
import pathlib
components = json.loads(pathlib.Path("components.json").read_text())
embedded = [
name for name in components["components"]
if pathlib.Path(name).exists()
]
if embedded:
raise SystemExit(f"embedded component sources: {embedded}")
PY
- name: Check out every locked component and dependency over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: >-
scripts/ci-checkout-components.sh
"$PWD/components"
"$PWD/dependencies"
- name: Verify protected annotated SSH tag and release lock
shell: bash
env:
TAG: ${{ gitea.ref_name }}
EXPECTED_EVENT_SHA: ${{ gitea.sha }}
EXPECTED_REF: ${{ gitea.ref }}
EXPECTED_REF_TYPE: ${{ gitea.ref_type }}
TAG_ALLOWED_SIGNERS: ${{ secrets.RELEASE_TAG_ALLOWED_SIGNERS }}
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
API_URL: ${{ gitea.api_url }}
REPOSITORY: ${{ gitea.repository }}
run: |
set -euo pipefail
test "$EXPECTED_REF_TYPE" = tag
test "$EXPECTED_REF" = "refs/tags/$TAG"
allowed_signers="$RUNNER_TEMP/echoion-release-allowed-signers"
tag_credentials="$RUNNER_TEMP/echoion-release-tag-ssh"
trap 'rm -rf -- "$tag_credentials"; rm -f -- "$allowed_signers"' EXIT
umask 077
printf '%s\n' "$TAG_ALLOWED_SIGNERS" >"$allowed_signers"
test -s "$allowed_signers"
. scripts/lib/component-ssh.sh
echoion_configure_component_ssh \
"$tag_credentials" "$ECHOION_COMPONENT_SSH_KEY"
scripts/restore-gitea-release-tag.sh \
--repository "ssh://gitea@git.faumaray.ru/$REPOSITORY.git" \
--tag "$TAG"
target_commit=$(
scripts/verify-gitea-release-tag.sh \
--tag "$TAG" \
--event-sha "$EXPECTED_EVENT_SHA" \
--allowed-signers "$allowed_signers" \
--notes-output "$RUNNER_TEMP/release-notes.md"
)
printf 'RELEASE_TARGET=%s\n' "$target_commit" >>"$GITHUB_ENV"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
verify-tag-protection \
--owner "$owner" \
--repo "$repo" \
--required-pattern 'v*'
- name: Derive release channel and URLs
shell: bash
env:
TAG: ${{ gitea.ref_name }}
API_URL: ${{ gitea.api_url }}
SERVER_URL: ${{ gitea.server_url }}
REPOSITORY: ${{ gitea.repository }}
RUN_NUMBER: ${{ gitea.run_number }}
run: |
set -euo pipefail
version=${TAG#v}
test "$version" != "$TAG"
python3 scripts/validate-semver.py "$version"
project_version=$(
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
cmake-project-version \
--cmake-file CMakeLists.txt
)
tag_base=${version%%[-+]*}
test "$tag_base" = "$project_version"
channel=stable
prerelease=false
if [[ "$version" == *-* ]]; then
channel=beta
prerelease=true
fi
feed_url="${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/${channel}/catalog.json"
artifact_url="${SERVER_URL}/${REPOSITORY}/releases/download/${TAG}"
{
printf 'RELEASE_TAG=%s\n' "$TAG"
printf 'RELEASE_VERSION=%s\n' "$version"
printf 'RELEASE_CHANNEL=%s\n' "$channel"
printf 'RELEASE_PRERELEASE=%s\n' "$prerelease"
printf 'RELEASE_SEQUENCE=%s\n' "$RUN_NUMBER"
printf 'RELEASE_ARTIFACT_BASE_URL=%s\n' "$artifact_url"
printf 'RELEASE_FEED_URL=%s\n' "$feed_url"
} >>"$GITHUB_ENV"
- name: Check out the protected release-feed branch
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
feed_credentials="$RUNNER_TEMP/echoion-release-feed-ssh"
trap 'rm -rf -- "$feed_credentials"' EXIT
. scripts/lib/component-ssh.sh
echoion_configure_component_ssh \
"$feed_credentials" "$ECHOION_COMPONENT_SSH_KEY"
git clone --filter=blob:none --branch release-feed --single-branch \
ssh://gitea@git.faumaray.ru/Void/Echoion.git feed-state
- name: Verify every locked component was independently published
shell: bash
env:
FEED_PUBLIC_KEY: ${{ secrets.RELEASE_FEED_ED25519_PUBLIC_KEY }}
run: |
set -euo pipefail
feed_key="$RUNNER_TEMP/echoion-feed-ed25519.pub.pem"
trap 'rm -f -- "$feed_key"' EXIT
printf '%s\n' "$FEED_PUBLIC_KEY" >"$feed_key"
chmod 0644 "$feed_key"
openssl pkey -pubin -in "$feed_key" -noout
python3 scripts/verify-locked-component-feeds.py \
--registry components.json \
--lock components.lock.json \
--feed-root feed-state \
--channel "$RELEASE_CHANNEL" \
--key-id "${{ vars.ECHOION_FEED_SIGNING_KEY_ID }}" \
--public-key "$feed_key"
- name: Build, test, and package all locked repositories in Docker
shell: bash
run: |
set -euo pipefail
scripts/release.sh \
--version "$RELEASE_VERSION" \
--skip-component-packages \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--official-update-feed-url "$RELEASE_FEED_URL" \
--update-channel "$RELEASE_CHANNEL" \
--update-sequence "$RELEASE_SEQUENCE"
- name: Create draft, upload, download-verify, and publish
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
API_URL: ${{ gitea.api_url }}
REPOSITORY: ${{ gitea.repository }}
run: |
set -euo pipefail
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
prerelease=()
if [[ "$RELEASE_PRERELEASE" = true ]]; then
prerelease+=(--prerelease)
fi
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
publish \
--owner "$owner" \
--repo "$repo" \
--tag "$RELEASE_TAG" \
--target "$RELEASE_TARGET" \
--name "Echoion $RELEASE_VERSION" \
--body-file "$RUNNER_TEMP/release-notes.md" \
--artifacts dist \
"${prerelease[@]}"
-22
View File
@@ -1,22 +0,0 @@
*build*
!EchoionStandalone/tests/test_update_build_defaults.cpp
release
/dist/
__pycache__/
*.py[cod]
.cache
.idea
.vscode
# Independently cloned component repositories. Their immutable release
# revisions are recorded in components.lock.json.
/EchoionApi/
/EchoionCore/
/EchoionDesktop/
/EchoionHost/
/EchoionStandalone/
/EchoionUpdater/
/EchoionWeb/
/EchoionPluginUrlShortenerInternal/
/EchoionPluginUrlShortenerExternal/
/components/
-58
View File
@@ -1,58 +0,0 @@
# GitLab CI for Echoion.
#
# Requires a runner whose image provides the toolchain the project builds
# with: GCC 16+ (C++26 with experimental reflection, -freflection), CMake
# 4.0+, and the system libraries FFmpeg, SQLite3, OpenSSL, TBB, Qt6 and a
# system Boost (>= 1.87) that matches VoidLibrary — a second, vendored Boost
# in the same process corrupts URL parsing, so the system copy must be used.
# Set the image on the runner or override `image:` below to that container.
stages:
- build
- test
- package
variables:
GIT_SUBMODULE_STRATEGY: recursive
BUILD_DIR: build
CMAKE_BUILD_TYPE: RelWithDebInfo
# Reuse the CMake build tree between jobs on the same ref to skip cold
# reconfigure/rebuild.
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- build/
build:
stage: build
script:
- cmake -S . -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DBUILD_TESTS=ON
- cmake --build "$BUILD_DIR" -j "$(nproc)"
artifacts:
paths:
- build/plugins/echoion_plugin.so
- build/bin/EchoionDesktop
- build/lib/
expire_in: 1 week
test:
stage: test
needs: ["build"]
script:
- ctest --test-dir "$BUILD_DIR" --output-on-failure
# Produce distributable packages only for tagged releases.
package:
stage: package
needs: ["build", "test"]
rules:
- if: '$CI_COMMIT_TAG'
script:
- cd "$BUILD_DIR"
- cpack -G "TGZ;DEB"
artifacts:
paths:
- build/*.tar.gz
- build/*.deb
expire_in: 1 month
-76
View File
@@ -1,76 +0,0 @@
# Changelog
All notable changes to Echoion are documented here. This project adheres to
[Semantic Versioning](https://semver.org/).
## [1.0.0] — 2026-07-04
The first public release of **Echoion**, a modern, gapless music bot for
TeamSpeak. This entry describes the product as shipped, not an incremental
diff.
### Playback
- **Gapless engine with crossfade.** A dual-decoder pipeline pre-warms the
next track while the current one plays, so track boundaries are seamless;
an optional crossfade (`bot.crossfade`) blends the transition.
- **High-quality audio.** 192 kHz stereo internal pipeline feeding
TeamSpeak's native audio system on a steady 20 ms cadence.
- **Loudness normalization.** An optional slow AGC evens out quiet and loud
tracks (`features.normalizeLoudness`, `features.targetLoudnessDb`).
- **Full transport controls.** Play, pause, resume, stop, skip, seek, volume,
shuffle and repeat.
- **SOCKS5-aware streaming.** Under a SOCKS5 proxy, IP-locked YouTube CDN
URLs are transparently downloaded through the proxy (via yt-dlp) and played
from a local file, so geo-blocked deployments still get audio.
### Catalogs & source routing
- **YouTube** via a native innertube player client (fastest path, one HTTP
POST) with yt-dlp as the resolver/fallback and for search.
- **Yandex Music** (native, unofficial API) — full tracks with a Plus OAuth
token; album, playlist and track URLs, plus in-catalog search.
- **Direct audio URLs / radio streams**, plus the wide range of yt-dlp
extractors (SoundCloud, Bandcamp, VK, …) for non-YouTube links.
- **`SourceRouter`** chains the sources with per-source failure cooldowns,
**hedged resolution** (a slow source is raced by the next candidate after
300 ms; first success wins), and a stream-URL cache.
### Commands
- **Play** — `!play` (searches YouTube + Yandex and lets you `!select`),
`!pyt` (YouTube only), `!pya` (Yandex only); a bare URL plays directly.
- **Search** — `!search` (both catalogs), `!youtube`/`!yb` (YouTube),
`!yandex`/`!ya` (Yandex).
- **Radio / autoplay** — `!radio` / `!autoplay [on|off]` keeps the music
going with related tracks (YouTube radio mix or Yandex similar tracks) when
the queue runs dry; the choice is persisted across restarts.
- **Queue & info** — `!queue`, `!np`, `!skip`, `!remove`, `!move`, `!clear`,
`!shuffle`, `!repeat`, `!seek`, `!volume`.
- **History, favorites, stats** — `!history`, `!fav`, `!stats`, rendered with
short links for YouTube tracks.
- **Subscriptions** — `!subscribe` / `!unsubscribe` / `!subscribers` for
per-user whisper delivery.
- **Admin** — `!announce` broadcasts a message to each subscriber exactly
once (restart-safe); `!reload` / `!reloadconfig` hot-reload the bot.
- **Grouped help** — `!help` renders collapsible sections, with the play and
search command families grouped together.
### Persistence
- SQLite-backed history, favorites, playlists, subscriptions and a generic
key/value store; announcements and the autoplay toggle survive restarts.
### Platform
- TeamSpeak 3 / 6 plugin plus a Qt6 desktop client.
- **Hot reload** of the core without disconnecting from the server.
- HTTP and SOCKS5 proxy support applied across every outbound client.
- JSON configuration with hot-reload across the plugin boundary.
### Build & packaging
- C++26 (GCC 16+, experimental reflection), CMake 4.0+, CPack packaging
(TGZ / DEB / RPM on Linux).
[1.0.0]: https://git.faumaray.ru/echoion/echoion/-/releases/1.0.0
-646
View File
@@ -1,646 +0,0 @@
cmake_minimum_required(VERSION 4.0.0)
project(Echoion VERSION 2.0.1 LANGUAGES CXX)
include(GNUInstallDirs)
include(cmake/DependencyLock.cmake)
# The root product version is the only manually edited version. Every
# component project consumes this value when orchestrated by Echoion; their
# standalone fallback is intentionally 0.0.0 and is never used for a product
# release.
set(ECHOION_PRODUCT_VERSION "${PROJECT_VERSION}")
set(ECHOION_COMPONENT_VERSION "${PROJECT_VERSION}")
# Default to a RelWithDebInfo build when the developer/CI did not pick a config.
# Without this, single-config generators leave CMAKE_BUILD_TYPE empty and GCC
# falls back to -O0, so "production" builds shipped unoptimised. Set this before
# any CPMAddPackage() below so fetched dependencies (Void, Boost, quickjs) are
# compiled with the same optimisation level as Echoion itself.
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT _isMultiConfig AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
Debug Release RelWithDebInfo MinSizeRel)
message(STATUS "No CMAKE_BUILD_TYPE set; defaulting to RelWithDebInfo")
endif()
# Use ccache (or sccache) as a compiler launcher when available to speed up
# incremental and clean-from-cache rebuilds. Opt-out with -DECHOION_USE_CCACHE=OFF.
option(ECHOION_USE_CCACHE "Use ccache/sccache compiler launcher if found" ON)
if(ECHOION_USE_CCACHE AND NOT CMAKE_CXX_COMPILER_LAUNCHER)
find_program(ECHOION_CCACHE_PROGRAM NAMES ccache sccache)
if(ECHOION_CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${ECHOION_CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${ECHOION_CCACHE_PROGRAM}")
message(STATUS "Compiler cache enabled: ${ECHOION_CCACHE_PROGRAM}")
endif()
endif()
# Decide linkage before configuring CPM dependencies. Protocol and VoidLibrary
# must be part of the validated echoiond artifact in production, otherwise a
# release could pair a new daemon with an old/incompatible shared library.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(ECHOION_STATIC_LINK "Statically link the GCC runtimes" OFF)
if(ECHOION_STATIC_LINK)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++" CACHE STRING "" FORCE)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
message(STATUS "Static GCC runtime linking enabled")
endif()
# Release artifacts should not expose checkout, dependency, or build-machine
# paths through __FILE__, std::source_location, or optional DWARF data. Keep
# developer builds unchanged so local diagnostics can still use absolute paths;
# scripts/release.sh enables this option for production builds.
option(ECHOION_REPRODUCIBLE_BUILD
"Replace local source/build prefixes in compiler-generated paths" OFF)
if(ECHOION_REPRODUCIBLE_BUILD)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(_echoionPrefixMaps
"${CMAKE_SOURCE_DIR}=Echoion"
"${CMAKE_BINARY_DIR}=EchoionBuild")
if(DEFINED CPM_Void_SOURCE AND NOT CPM_Void_SOURCE STREQUAL "")
list(APPEND _echoionPrefixMaps
"${CPM_Void_SOURCE}=VoidLibrary")
endif()
if(DEFINED CPM_VoidTeamspeak_SOURCE AND
NOT CPM_VoidTeamspeak_SOURCE STREQUAL "")
list(APPEND _echoionPrefixMaps
"${CPM_VoidTeamspeak_SOURCE}=VoidTeamspeak")
endif()
if(DEFINED ECHOION_COMPONENT_WORKSPACE AND
NOT ECHOION_COMPONENT_WORKSPACE STREQUAL "")
list(APPEND _echoionPrefixMaps
"${ECHOION_COMPONENT_WORKSPACE}=EchoionComponents")
endif()
foreach(_echoionPrefixMap IN LISTS _echoionPrefixMaps)
list(APPEND _echoionReproducibleCompilerOptions
"$<$<COMPILE_LANGUAGE:C,CXX>:-ffile-prefix-map=${_echoionPrefixMap}>"
"$<$<COMPILE_LANGUAGE:C,CXX>:-fmacro-prefix-map=${_echoionPrefixMap}>"
"$<$<COMPILE_LANGUAGE:C,CXX>:-fdebug-prefix-map=${_echoionPrefixMap}>")
endforeach()
function(echoion_apply_reproducible_build_options directory)
get_property(_echoionDirectoryTargets
DIRECTORY "${directory}" PROPERTY BUILDSYSTEM_TARGETS)
foreach(_echoionTarget IN LISTS _echoionDirectoryTargets)
get_target_property(_echoionTargetType
"${_echoionTarget}" TYPE)
if(_echoionTargetType MATCHES
"^(EXECUTABLE|STATIC_LIBRARY|SHARED_LIBRARY|MODULE_LIBRARY|OBJECT_LIBRARY)$")
target_compile_options("${_echoionTarget}" PRIVATE
${_echoionReproducibleCompilerOptions})
endif()
endforeach()
get_property(_echoionSubdirectories
DIRECTORY "${directory}" PROPERTY SUBDIRECTORIES)
foreach(_echoionSubdirectory IN LISTS _echoionSubdirectories)
echoion_apply_reproducible_build_options(
"${_echoionSubdirectory}")
endforeach()
endfunction()
message(STATUS "Reproducible compiler path mapping enabled")
else()
message(WARNING
"ECHOION_REPRODUCIBLE_BUILD is not supported by this compiler")
endif()
endif()
# Include CPM
file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.8/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
EXPECTED_HASH SHA256=78ba32abdf798bc616bab7c73aac32a17bbd7b06ad9e26a6add69de8f3ae4791
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
include(cmake/EchoionComponents.cmake)
# Include PackageProject.cmake
CPMAddPackage(
NAME PackageProject.cmake
GITHUB_REPOSITORY TheLartians/PackageProject.cmake
VERSION 1.11.2
)
# VoidLibrary — modular C++26 infrastructure (Json, Logging, Configuration,
# Plugin, Service, Async, Functional, System, Fsm, ...). Echoion's in-house
# infrastructure is migrated onto these Void:: targets.
# For local development against a working copy, configure with
# -DCPM_Void_SOURCE=/path/to/VoidLibrary
# which CPM honours over the git checkout below.
CPMAddPackage(
NAME Void
GIT_REPOSITORY ssh://gitea@git.faumaray.ru/void/voidlibrary.git
# Keep clean/container releases reproducible. CPM_Void_SOURCE still
# overrides this revision for local dependency development.
GIT_TAG ${ECHOION_VOID_REVISION}
OPTIONS
"VOID_ENABLE_TESTING OFF"
)
# Modern native TeamSpeak client library. Local development can point at the
# adjacent history-preserving extraction with:
# -DCPM_VoidTeamspeak_SOURCE=$HOME/Project/Personal/VoidTeamspeak
CPMAddPackage(
NAME VoidTeamspeak
GIT_REPOSITORY ssh://gitea@git.faumaray.ru/void/voidteamspeak.git
# This revision supplies the typed administration API used by Standalone.
GIT_TAG ${ECHOION_VOID_TEAMSPEAK_REVISION}
OPTIONS
"VOID_TEAMSPEAK_BUILD_TESTS OFF"
"VOID_ENABLE_TESTING OFF"
)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_MODULE_MAP_FORMAT "gcc")
set(CXX_SCAN_FOR_MODULES OFF)
# GCC 16+ exposes experimental C++26 reflection (P2996) via -freflection.
# Void's header-only INTERFACE modules (Data/Functional/Core) do not propagate
# this flag, so apply it tree-wide for every echoion target that may include
# <Void/Data/Reflect.hpp>, <Void/Configuration/Bind.hpp>, etc.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
# Guard to C++ only — vendored C dependencies (quickjs) must not see it.
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-freflection>)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-omit-frame-pointer>)
endif()
# Link-time optimisation for Release configs only (keeps Debug builds fast).
# Experimental C++26 reflection (-freflection) is a front-end feature and is
# orthogonal to GCC's LTO, but gate behind an option so it can be disabled if a
# given toolchain rejects the combination.
option(ECHOION_ENABLE_LTO "Enable interprocedural optimisation for Release builds" ON)
if(ECHOION_ENABLE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT _ipoSupported OUTPUT _ipoError LANGUAGES CXX)
if(_ipoSupported)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON)
message(STATUS "Interprocedural optimisation (LTO) enabled for Release")
else()
message(STATUS "IPO/LTO not supported by toolchain: ${_ipoError}")
endif()
endif()
# Unity builds batch translation units to cut compile time. Kept OFF by default
# because reflection TUs and Glaze-heavy headers can blow up unity batch memory;
# enable per-machine with -DECHOION_UNITY_BUILD=ON.
option(ECHOION_UNITY_BUILD "Enable CMake unity (jumbo) builds" OFF)
if(ECHOION_UNITY_BUILD)
set(CMAKE_UNITY_BUILD ON)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 8)
message(STATUS "Unity build enabled (batch size 8)")
endif()
# Enable folder organization in IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Options
option(BUILD_API "Build EchoionApi" ON)
option(BUILD_HOST "Build EchoionHost module loader" ON)
option(BUILD_CORE "Build EchoionCore" ON)
option(BUILD_DESKTOP "Build EchoionDesktop" ON)
option(BUILD_WEB "Build EchoionWeb browser dashboard" ON)
option(BUILD_STANDALONE "Build EchoionStandalone daemon with native TeamSpeak client" ON)
option(BUILD_UPDATER "Build EchoionUpdater lifecycle helper" ON)
option(BUILD_FIRST_PARTY_PLUGINS "Build bundled Echoion extension plugins" ON)
option(BUILD_TESTS "Build tests" OFF)
set(ECHOION_COMPONENT_WORKSPACE
"${CMAKE_CURRENT_SOURCE_DIR}/.."
CACHE PATH "Directory containing permanent Echoion component repositories")
if(BUILD_TESTS)
enable_testing()
endif()
# Find packages
find_package(Threads REQUIRED)
# All component source directories come from CPM. Local development can set
# CPM_<Component>_SOURCE; normal development follows main; release builds use
# exact components.lock.json revisions.
set(ECHOION_ORCHESTRATOR_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
if(BUILD_API)
echoion_add_component(EchoionApi)
endif()
if(BUILD_FIRST_PARTY_PLUGINS)
echoion_add_component(EchoionPluginUrlShortenerInternal)
echoion_add_component(EchoionPluginUrlShortenerExternal)
endif()
if(BUILD_HOST OR BUILD_STANDALONE)
echoion_add_component(EchoionHost)
endif()
if(BUILD_CORE)
echoion_add_component(EchoionCore)
endif()
# EchoionWeb is added after Core so it can reuse the single Boost header
# targets Core discovers. Core owns and starts the web server, so link them
# here (both targets now exist) and flag Core so the wiring compiles in.
if(BUILD_WEB AND BUILD_CORE)
echoion_add_component(EchoionWeb)
if(TARGET EchoionCore AND TARGET EchoionWeb)
target_link_libraries(EchoionCore PRIVATE EchoionWeb)
target_compile_definitions(EchoionCore PRIVATE ECHOION_WITH_WEB)
endif()
endif()
# VoidTeamspeak is resolved above as a regular reusable package. The legacy
# TeamSpeak client plugin and in-tree protocol directories are no longer built.
# The updater is a deliberately small, dynamically linked lifecycle helper.
# It validates and journals local operations but leaves network/feed work to
# the daemon through typed request files. Define it before Standalone so the
# Linux release-staging test can use the real helper binary.
if(BUILD_UPDATER AND UNIX AND NOT APPLE)
echoion_add_component(EchoionUpdater)
endif()
# EchoionStandalone links the host-common loader and native protocol client.
if(BUILD_STANDALONE)
echoion_add_component(EchoionStandalone)
endif()
if(BUILD_DESKTOP)
echoion_add_component(EchoionDesktop)
endif()
# The release install component is deliberately runtime-only. Nested projects
# keep their normal SDK/development install rules, while scripts/release.sh uses
# this component as the single input to dependency collection and packaging.
option(ECHOION_INSTALL_RUNTIME_BUNDLE
"Provide the relocatable Echoion Runtime install component" ON)
if(ECHOION_INSTALL_RUNTIME_BUNDLE)
if(TARGET EchoionStandalone)
if(UNIX AND NOT APPLE)
set_target_properties(EchoionStandalone PROPERTIES
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}"
INSTALL_RPATH_USE_LINK_PATH FALSE)
endif()
install(TARGETS EchoionStandalone
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT Runtime)
endif()
if(TARGET EchoionCore)
if(UNIX AND NOT APPLE)
set_target_properties(EchoionCore PROPERTIES
INSTALL_RPATH "$ORIGIN"
INSTALL_RPATH_USE_LINK_PATH FALSE)
endif()
install(TARGETS EchoionCore
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Runtime)
endif()
if(TARGET EchoionWeb)
install(DIRECTORY "${EchoionWeb_SOURCE_DIR}/frontend/web-dist/"
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion/web"
COMPONENT Runtime)
endif()
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/config.example.json"
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion"
COMPONENT Runtime)
install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/components.json"
"${CMAKE_CURRENT_SOURCE_DIR}/components.lock.json"
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion"
COMPONENT Runtime)
install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion.service.in"
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion-updater.service.in"
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/service/echoion-updater.timer.in"
DESTINATION service
COMPONENT Runtime)
install(PROGRAMS
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/validate-release-manifest.py"
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion/tools"
COMPONENT Runtime)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
DESTINATION "${CMAKE_INSTALL_DATADIR}/echoion/licenses"
RENAME Echoion-LICENSE
COMPONENT Runtime)
endif()
endif()
# Independent component package staging. Each named install component contains
# only that component's first-party payload; release tooling adds its private
# runtime dependency closure and a signed-feed manifest afterwards.
option(ECHOION_INSTALL_COMPONENT_PACKAGES
"Provide one install component for every independently released component"
ON)
if(ECHOION_INSTALL_COMPONENT_PACKAGES)
if(TARGET EchoionApiPluginSdk)
install(TARGETS EchoionApiPluginSdk
ARCHIVE DESTINATION lib
COMPONENT PackageEchoionApi)
install(DIRECTORY "${EchoionApi_SOURCE_DIR}/include/"
DESTINATION include
COMPONENT PackageEchoionApi)
install(FILES
"${EchoionApi_SOURCE_DIR}/abi/echoion-module-v1.json"
DESTINATION abi
COMPONENT PackageEchoionApi)
endif()
if(TARGET EchoionHost)
install(TARGETS EchoionHost
LIBRARY DESTINATION lib
COMPONENT PackageEchoionHost
RUNTIME DESTINATION bin
COMPONENT PackageEchoionHost)
install(FILES "${EchoionHost_SOURCE_DIR}/abi/module.json"
DESTINATION abi
COMPONENT PackageEchoionHost)
endif()
if(TARGET EchoionCore)
install(TARGETS EchoionCore
LIBRARY DESTINATION lib
COMPONENT PackageEchoionCore
RUNTIME DESTINATION bin
COMPONENT PackageEchoionCore)
install(FILES "${EchoionCore_SOURCE_DIR}/abi/module.json"
DESTINATION abi
COMPONENT PackageEchoionCore)
endif()
if(TARGET EchoionWeb)
install(TARGETS EchoionWeb
LIBRARY DESTINATION lib
COMPONENT PackageEchoionWeb
RUNTIME DESTINATION bin
COMPONENT PackageEchoionWeb)
install(FILES "${EchoionWeb_SOURCE_DIR}/abi/module.json"
DESTINATION abi
COMPONENT PackageEchoionWeb)
install(DIRECTORY "${EchoionWeb_SOURCE_DIR}/frontend/web-dist/"
DESTINATION share/echoion/web
COMPONENT PackageEchoionWeb)
endif()
if(TARGET EchoionStandalone)
install(TARGETS EchoionStandalone
RUNTIME DESTINATION bin
COMPONENT PackageEchoionStandalone)
endif()
if(TARGET EchoionUpdater)
install(TARGETS EchoionUpdater
RUNTIME DESTINATION bin
COMPONENT PackageEchoionUpdater)
endif()
if(TARGET EchoionDesktop)
install(TARGETS EchoionDesktop
RUNTIME DESTINATION bin
COMPONENT PackageEchoionDesktop
BUNDLE DESTINATION bin
COMPONENT PackageEchoionDesktop)
if(TARGET Qt6::QXcbIntegrationPlugin)
install(IMPORTED_RUNTIME_ARTIFACTS Qt6::QXcbIntegrationPlugin
LIBRARY DESTINATION plugins/platforms
COMPONENT PackageEchoionDesktop)
endif()
endif()
if(TARGET EchoionUrlShortenerInternalPlugin)
install(TARGETS EchoionUrlShortenerInternalPlugin
LIBRARY DESTINATION lib
COMPONENT PackageEchoionPluginUrlShortenerInternal
RUNTIME DESTINATION lib
COMPONENT PackageEchoionPluginUrlShortenerInternal)
install(FILES
"${EchoionPluginUrlShortenerInternal_SOURCE_DIR}/abi/module.json"
DESTINATION abi
COMPONENT PackageEchoionPluginUrlShortenerInternal)
endif()
if(TARGET EchoionUrlShortenerExternalPlugin)
install(TARGETS EchoionUrlShortenerExternalPlugin
LIBRARY DESTINATION lib
COMPONENT PackageEchoionPluginUrlShortenerExternal
RUNTIME DESTINATION lib
COMPONENT PackageEchoionPluginUrlShortenerExternal)
install(FILES
"${EchoionPluginUrlShortenerExternal_SOURCE_DIR}/abi/module.json"
DESTINATION abi
COMPONENT PackageEchoionPluginUrlShortenerExternal)
endif()
endif()
# Bundling and deployment helpers
# Function to bundle Qt dependencies
function(bundle_qt_dependencies target)
if(NOT TARGET ${target})
return()
endif()
if(WIN32)
find_program(WINDEPLOYQT windeployqt HINTS ${Qt6Core_DIR}/../../../bin)
if(WINDEPLOYQT)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${WINDEPLOYQT}
--dir $<TARGET_FILE_DIR:${target}>/qt_libs
--release
--no-translations
--no-compiler-runtime
--no-opengl-sw
$<TARGET_FILE:${target}>
COMMENT "Bundling Qt dependencies for ${target}"
)
endif()
elseif(APPLE)
find_program(MACDEPLOYQT macdeployqt HINTS ${Qt6Core_DIR}/../../../bin)
if(MACDEPLOYQT)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${MACDEPLOYQT} $<TARGET_FILE:${target}> -always-overwrite
COMMENT "Bundling Qt dependencies for ${target}"
)
endif()
endif()
endfunction()
# Function to install target with its dependencies
function(install_with_dependencies target)
if(NOT TARGET ${target})
return()
endif()
get_target_property(target_type ${target} TYPE)
if(target_type STREQUAL "EXECUTABLE")
install(TARGETS ${target}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# Bundle Qt if needed
get_target_property(linked_libs ${target} LINK_LIBRARIES)
if(linked_libs)
foreach(lib ${linked_libs})
if(lib MATCHES "Qt6::")
bundle_qt_dependencies(${target})
break()
endif()
endforeach()
endif()
elseif(target_type STREQUAL "SHARED_LIBRARY")
install(TARGETS ${target}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
endfunction()
# Apply bundling to targets after all subdirectories are added
if(BUILD_DESKTOP AND TARGET EchoionDesktop)
install_with_dependencies(EchoionDesktop)
endif()
if(BUILD_CORE AND TARGET EchoionCore)
install_with_dependencies(EchoionCore)
endif()
if(BUILD_TESTS AND UNIX)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
add_test(NAME echoion_prepare_release_tests
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_prepare_release.py")
add_test(NAME echoion_component_package_tests
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_package_components.py")
add_test(NAME echoion_component_feed_tests
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_publish_component_feeds.py")
add_test(NAME echoion_independent_component_release_tests
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_independent_component_release.py")
add_test(NAME echoion_prepare_component_release_tests
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test_prepare_component_release.py")
if(NOT COMMAND void_add_tests AND DEFINED Void_SOURCE_DIR)
include("${Void_SOURCE_DIR}/cmake/VoidTesting.cmake")
endif()
if(COMMAND void_add_tests AND
TARGET EchoionHost AND TARGET EchoionCore AND TARGET EchoionWeb AND
TARGET EchoionUrlShortenerInternalPlugin AND
TARGET EchoionUrlShortenerExternalPlugin)
foreach(_echoionTestComponent IN ITEMS
EchoionHost EchoionCore EchoionWeb
EchoionPluginUrlShortenerInternal
EchoionPluginUrlShortenerExternal)
string(JSON _echoionTestComponentVersion GET
"${_echoionComponentLockJson}"
components "${_echoionTestComponent}" componentVersion)
set("_echoionTestVersion${_echoionTestComponent}"
"${_echoionTestComponentVersion}")
endforeach()
add_executable(EchoionModuleTests tests/ModuleDescriptors.cpp)
target_compile_features(EchoionModuleTests PRIVATE cxx_std_26)
target_link_libraries(EchoionModuleTests PRIVATE
Echoion::ApiModuleAbi
Void::Testing
${CMAKE_DL_LIBS})
target_compile_definitions(EchoionModuleTests PRIVATE
"ECHOION_TEST_HOST=\"$<TARGET_FILE:EchoionHost>\""
"ECHOION_TEST_CORE=\"$<TARGET_FILE:EchoionCore>\""
"ECHOION_TEST_WEB=\"$<TARGET_FILE:EchoionWeb>\""
"ECHOION_TEST_PLUGIN_INTERNAL=\"$<TARGET_FILE:EchoionUrlShortenerInternalPlugin>\""
"ECHOION_TEST_PLUGIN_EXTERNAL=\"$<TARGET_FILE:EchoionUrlShortenerExternalPlugin>\""
"ECHOION_TEST_HOST_VERSION=\"${_echoionTestVersionEchoionHost}\""
"ECHOION_TEST_CORE_VERSION=\"${_echoionTestVersionEchoionCore}\""
"ECHOION_TEST_WEB_VERSION=\"${_echoionTestVersionEchoionWeb}\""
"ECHOION_TEST_PLUGIN_INTERNAL_VERSION=\"${_echoionTestVersionEchoionPluginUrlShortenerInternal}\""
"ECHOION_TEST_PLUGIN_EXTERNAL_VERSION=\"${_echoionTestVersionEchoionPluginUrlShortenerExternal}\"")
void_add_tests(EchoionModuleTests)
add_test(NAME echoion_module_descriptor_tests
COMMAND EchoionModuleTests)
endif()
add_test(NAME echoion_release_manifest_packaging_tests
COMMAND bash
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-release-packaging.sh"
"${CMAKE_CURRENT_SOURCE_DIR}"
"${ECHOION_COMPONENT_WORKSPACE}")
add_test(NAME echoion_runtime_dependency_packaging_tests
COMMAND bash
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-runtime-dependencies.sh"
"${CMAKE_CURRENT_SOURCE_DIR}")
add_test(NAME echoion_release_archive_packaging_tests
COMMAND bash
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-release-archive.sh"
"${CMAKE_CURRENT_SOURCE_DIR}")
add_test(NAME echoion_frontend_license_packaging_tests
COMMAND bash
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/tests/test-frontend-licenses.sh"
"${CMAKE_CURRENT_SOURCE_DIR}")
add_test(NAME echoion_installer_packaging_tests
COMMAND bash
"${CMAKE_CURRENT_SOURCE_DIR}/packaging/tests/installer_test.sh")
endif()
# The universal .tar.zst/.run workflow is the supported Linux distribution
# format. Keep legacy CPack available for local Windows/macOS experiments,
# without publishing inaccurate DEB/RPM host-dependency metadata.
option(ECHOION_ENABLE_LEGACY_CPACK "Enable legacy platform packaging" OFF)
if(ECHOION_ENABLE_LEGACY_CPACK)
set(CPACK_PACKAGE_NAME "Echoion")
set(CPACK_PACKAGE_VENDOR "Echoion")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Echoion Music Bot for TeamSpeak")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
if(WIN32)
set(CPACK_GENERATOR "ZIP;NSIS")
set(CPACK_NSIS_DISPLAY_NAME "Echoion Music Bot")
elseif(APPLE)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_VOLUME_NAME "Echoion")
else()
set(CPACK_GENERATOR "TGZ")
endif()
include(CPack)
endif()
if(ECHOION_REPRODUCIBLE_BUILD AND
COMMAND echoion_apply_reproducible_build_options)
echoion_apply_reproducible_build_options("${CMAKE_CURRENT_SOURCE_DIR}")
endif()
# Print configuration summary
message(STATUS "")
message(STATUS "Echoion Configuration:")
message(STATUS " Version: ${PROJECT_VERSION}")
if(DEFINED ECHOION_RUNTIME_VERSION)
message(STATUS " Runtime release version: ${ECHOION_RUNTIME_VERSION}")
endif()
message(STATUS " C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS " Build API: ${BUILD_API}")
message(STATUS " Build Host: ${BUILD_HOST}")
message(STATUS " Build first-party plugins: ${BUILD_FIRST_PARTY_PLUGINS}")
message(STATUS " Build Core: ${BUILD_CORE}")
message(STATUS " Build Desktop: ${BUILD_DESKTOP}")
message(STATUS " Build Web: ${BUILD_WEB}")
message(STATUS " Build Standalone: ${BUILD_STANDALONE}")
message(STATUS " Build Updater: ${BUILD_UPDATER}")
message(STATUS " Build Tests: ${BUILD_TESTS}")
message(STATUS " Static Link: ${ECHOION_STATIC_LINK}")
message(STATUS " Runtime install component: ${ECHOION_INSTALL_RUNTIME_BUNDLE}")
message(STATUS "")
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "To build: cmake --build build")
message(STATUS "To install: cmake --install build --prefix <install_dir>")
message(STATUS "To release: scripts/release.sh --version <version>")
message(STATUS "")
-54
View File
@@ -1,54 +0,0 @@
{
"version": 9,
"cmakeMinimumRequired": {
"major": 4,
"minor": 0,
"patch": 0
},
"configurePresets": [
{
"name": "linux-release",
"displayName": "Linux dynamic runtime release",
"description": "Bot, Core, web dashboard, tests, and a runtime-only install component",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-relwithdebinfo",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build-relwithdebinfo/stage",
"BUILD_SHARED_LIBS": "ON",
"ECHOION_STATIC_LINK": "OFF",
"ECHOION_INSTALL_RUNTIME_BUNDLE": "ON",
"ECHOION_ENABLE_LEGACY_CPACK": "OFF",
"ECHOION_ENABLE_LTO": "ON",
"BUILD_API": "ON",
"BUILD_CORE": "ON",
"BUILD_WEB": "ON",
"ECHOION_BUILD_WEB": "ON",
"BUILD_STANDALONE": "ON",
"BUILD_FIRST_PARTY_PLUGINS": "ON",
"BUILD_DESKTOP": "ON",
"BUILD_TESTS": "ON"
}
}
],
"buildPresets": [
{
"name": "linux-release",
"configurePreset": "linux-release",
"configuration": "RelWithDebInfo"
}
],
"testPresets": [
{
"name": "linux-release",
"configurePreset": "linux-release",
"configuration": "RelWithDebInfo",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error"
}
}
]
}
Vendored
-68
View File
@@ -1,68 +0,0 @@
// Jenkins pipeline for Echoion.
//
// The agent must provide the toolchain the project builds with: GCC 16+
// (C++26 with experimental reflection, -freflection), CMake 4.0+, Node.js
// with npm (the EchoionWeb React/Vite frontend is built during the C++
// build), and the system libraries FFmpeg, SQLite3, OpenSSL, TBB, Qt6 and a
// system Boost (>= 1.87) matching VoidLibrary. A second vendored Boost in the
// same process corrupts URL parsing, so the system copy must be used. Point
// the `agent` at a container/node with that toolchain (e.g. a custom Docker
// image); the `docker` agent below is a template — adjust `image` to yours.
// (Configure with -DECHOION_BUILD_WEB=OFF to skip the frontend if npm is
// unavailable on the agent.)
pipeline {
agent {
docker { image 'echoion/ci:gcc16' args '-u root' }
}
environment {
BUILD_DIR = 'build'
CMAKE_BUILD_TYPE = 'RelWithDebInfo'
}
stages {
stage('Checkout') {
steps {
checkout scm
// Components are independent repositories pinned by immutable
// revisions in components.lock.json. Configure HTTPS
// credentials for git.faumaray.ru on the agent when the
// repositories are private.
sh 'python3 scripts/sync-components.py --update'
}
}
stage('Build') {
steps {
sh '''
cmake -S . -B "$BUILD_DIR" \
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=ON
cmake --build "$BUILD_DIR" -j "$(nproc)"
'''
}
}
stage('Test') {
steps {
sh 'ctest --test-dir "$BUILD_DIR" --output-on-failure'
}
}
stage('Package') {
when { buildingTag() }
steps {
sh 'cd "$BUILD_DIR" && cpack -G "TGZ;DEB"'
}
}
}
post {
success {
archiveArtifacts artifacts: 'build/plugins/echoion_plugin.so, build/bin/EchoionDesktop, build/*.tar.gz, build/*.deb',
allowEmptyArchive: true,
fingerprint: true
}
}
}
-438
View File
@@ -1,438 +0,0 @@
# Echoion Music Bot
A modern music bot for TeamSpeak 3, featuring YouTube integration, playlist support, and hot-reload capabilities.
Release operations are documented in
[Independent component releases](docs/component-releases.md). The explored,
not implemented, paid-binary design is recorded in
[ADR 0001](docs/adr/0001-paid-binary-distribution.md).
## Features
- 🎵 **YouTube Integration** - Play music directly from YouTube URLs or search queries via a native innertube client (fastest path) with yt-dlp as the resolver/fallback
- 🎶 **Two Catalogs** - Search and play from YouTube and Yandex Music (native, full tracks with a Plus token). `!play` searches both; `!pyt`/`!pya` target one. Direct audio URLs / radio streams and other yt-dlp extractors (SoundCloud, Bandcamp, VK, …) also work
- ⚡ **Hedged Resolution** - A slow source is raced by the next candidate after 300ms; first success wins
- 🔁 **Gapless Playback & Crossfade** - The next track's decoder is pre-warmed while the current one plays; optional crossfade (`bot.crossfade`)
- 🔊 **Loudness Normalization** - Optional slow AGC evens out quiet/loud tracks (`features.normalizeLoudness`)
- 📻 **Autoplay / Radio Mode** - When the queue runs dry, `!radio` keeps the music going with related tracks from YouTube or Yandex (`features.autoplay`)
- 💾 **Track Cache** - Downloaded audio is reused across plays and restarts (`advanced.cache*`)
- ⭐ **History & Favorites** - `!history`, `!stats`, `!fav add|list|play` backed by SQLite
- 📋 **Playlist Support** - Queue management with shuffle, repeat, and skip functionality
- 🎧 **High Quality Audio** - 192kHz stereo internal pipeline
- 🔄 **Transactional Updates** - Validate a complete daemon/Core/protocol
release, checkpoint playback, re-exec, reconnect, and restore playback
- ⚙️ **Configurable** - JSON-based configuration system
- 🔊 **TeamSpeak Native** - Uses TeamSpeak's native audio system for best quality
- 🧩 **VoidTeamspeak SDK** - Native protocol support is an independently
consumable modern C++ library rather than an Echoion-internal component
- 🌐 **Public Dashboard** - Current playback plus the complete sanitized
TeamSpeak channel/client tree, with authenticated administration for admins
- 🎬 **VoidWatch Link** - Watch Together is deployed independently from the
`EchoionWatch` repository and linked through `web.watchUrl`
## Building
### Developer requirements
- C++26 compatible compiler with reflections (GCC 16+)
- CMake 4.0+
- Qt6 (only when building the desktop client)
- FFmpeg 5+ (for audio decoding and the modern channel-layout API)
- Boost (system installation preferred; the build vendors one only when absent — mixing a vendored and a system Boost in one process breaks boost.url)
- OpenSSL, libsodium, Opus, FFmpeg, and Boost development packages
### Local build
```bash
cmake -S . -B build -DBUILD_TESTS=ON
cmake --build build -j2
ctest --test-dir build --output-on-failure
```
The supported Linux release is dynamically linked. Static GCC runtime linking
is disabled by default; the release process collects the non-glibc shared
library closure into the bundle and assigns relocatable `$ORIGIN` RUNPATHs.
### Clean containerized Linux release
Docker is the only host requirement for the default release command:
```bash
scripts/release.sh --version 2.0.0
```
When validating coordinated, not-yet-published dependency changes, pass
`--void-source ../VoidLibrary --void-teamspeak-source ../VoidTeamspeak`. The
container builder mounts those source trees read-only and still builds into a
clean directory; normal published releases omit the overrides and use the
version-pinned dependencies.
It builds with a version-pinned GCC 16/FFmpeg 8.0.3 toolchain on Ubuntu 22.04,
runs the C++ and frontend test suites, installs into a clean staging tree,
bundles dynamic dependencies, validates the ELF closure with `readelf`, and
produces both `.tar.zst` and self-extracting `.run` artifacts under `dist/`.
The bot is never initialized or started during release creation. Use `--host`
only on a Debian-family build host with `dpkg-query`, `ldconfig`, and a glibc
ABI no newer than the supported 2.35 floor; incompatible host artifacts are
rejected.
The Linux x86-64 bundle targets glibc 2.35 or newer (Ubuntu 22.04+, Debian 12+,
and current Arch Linux). glibc and the ELF loader come from the target system;
libstdc++, libgcc, FFmpeg, OpenSSL, Opus, and the remaining runtime closure are
carried in `lib/`.
## Configuration
Copy `config.example.json` to your config directory:
- **Linux**: `~/.config/echoion/config.json`
- **Windows**: `%APPDATA%\echoion\config.json`
- **macOS**: `~/Library/Application Support/echoion/config.json`
Edit the configuration file with your server details:
```json
{
"teamspeak": {
"address": "your.server.com",
"port": 9987,
"nickname": "MusicBot",
"serverPassword": ""
}
}
```
## Installation
The `.run` artifact is the recommended installer. It supports system, user,
and portable layouts and never starts the bot unless `--start` is explicitly
supplied.
```bash
# User install; registers a disabled/stopped user service.
./echoion-2.0.0-linux-x86_64.run \
--mode user --non-interactive
# System install and explicit activation.
sudo ./echoion-2.0.0-linux-x86_64.run \
--mode system --register-service system --start --non-interactive
# Fully self-contained portable install, without a service.
./echoion-2.0.0-linux-x86_64.run \
--mode portable --prefix /srv/echoion-portable \
--data-layout self-contained --register-service none --non-interactive
# A portable tree may also register a stable user service.
./echoion-2.0.0-linux-x86_64.run \
--mode portable --prefix "$HOME/echoion-portable" \
--data-layout self-contained --register-service user --non-interactive
```
Portable service registration rejects temporary, world-writable, or
service-inaccessible prefixes, including group/world-writable ancestors. Run
user-service registration as the intended non-root user; root user services are
rejected. Use `--register-service system` with root when a portable tree must
run as a system service. Its complete runtime path must be root-owned and not
writable by the service account. Registration alone performs a daemon reload
and leaves the unit disabled and stopped; add `--start` to enable and start it.
Every installation uses immutable `versions/<version>/` payloads and an atomic
`current` symlink. Configuration is created once and is not overwritten by an
upgrade. The default `self-contained` layout keeps everything needed by the bot
under one prefix:
| Path | Contents |
|---|---|
| `<prefix>/versions/<version>` | immutable executable, Core, shared libraries, web assets, service templates, and manifest |
| `<prefix>/current` | atomic link to the selected immutable version |
| `<prefix>/libexec/updater/<installer-version>` | installer-managed helper plus its private dynamic library closure; never selected through `current` |
| `<prefix>/config` | configuration |
| `<prefix>/state` | identity, database, update journals, and durable state |
| `<prefix>/cache`, `<prefix>/logs`, `<prefix>/incoming` | cache, logs, and operator-supplied local update input |
Select `--data-layout standard` to use conventional external mutable paths:
`$XDG_CONFIG_HOME/echoion`, `$XDG_STATE_HOME/echoion`, and
`$XDG_CACHE_HOME/echoion` for a user service, or `/etc/echoion`,
`/var/lib/echoion`, `/var/cache/echoion`, and `/var/log/echoion` for a system
service. `--config-dir` and `--state-dir` remain available as explicit
overrides.
Echoion 2.0 is a manual migration from v1. Stop the v1 service, download the
signed v2 `.run` installer, and run it against the existing installation. The
installer preserves configuration, identity, database, plugin data, updater
journals, ownership, installation scope, and service mode. It also retains the
complete v1 executable tree and service definition as the legacy rollback
target. There is no v1 feed bridge and v1 cannot auto-update to v2.
A self-contained portable install also creates `<prefix>/echoion`; use that
launcher instead of invoking `current/bin/echoiond` directly. It derives the
config and state paths from its own location, so a stopped, service-free tree
can be moved as one folder and run from the new path. If a portable service was
registered, uninstall or re-register its unit before moving the tree because
systemd stores an absolute executable path.
The installer does not execute `echoiond`, `Echoion.ts`, plugins, or the updater.
Its standalone manifest validator verifies every immutable file, symlink, mode,
and SHA-256 before switching `current`. Service registration renders both the
bot unit and a hardened local updater timer, but leaves them disabled and
stopped unless `--start` is supplied.
### Updates
The daemon resolves one signed, compatible transaction across every installed
server component and managed plugin. A `component-layout` source points either
to a feed base URL or an exact `feeds/<channel>/catalog.json`; a `direct`
source is an explicit custom feed URL. Each policy selects its source and
channel through the `updates` object in `config.json`. Bearer tokens are read
only from named environment variables. Remote custom sources require HTTPS. A
`file://` direct source is accepted only below the installation's managed
`incoming` directory.
The privileged updater helper never downloads content and never launches the
bot. For a system service, the timer executes a fixed root-owned helper bundle
below `<prefix>/libexec/updater/`; both its executable and dynamic libraries are
independent of the candidate-controlled `current` link. The helper consumes fixed-schema local
requests, validates a staged runtime into a new immutable version, atomically
changes `current`, and leaves a durable health journal. The new daemon must run
successfully for 30 seconds before its commit request makes the version healthy.
Helper passes inside the durable grace period leave the candidate pending, and
a matching commit request is processed before rollback. After the deadline, an
unconfirmed candidate is restored to the previous version and recorded as
failed. `retainHealthyVersions` keeps the active version plus the configured
number of previously committed healthy versions; interrupted or failed
candidates do not consume that rollback allowance.
To remove an install, run `<prefix>/uninstall.sh`. Configuration and state are
preserved by default. Add `--purge` to remove directories that this installer
created and marked as dedicated Echoion data. Pre-existing override directories
are preserved and must be removed manually.
To preserve the permissions and UID of an existing TeamSpeak client identity,
export it from TeamSpeak's Identity Manager and import it before first start:
```bash
<prefix>/current/bin/echoiond --import-identity identity.ini \
--state-dir <state-directory>
# Choose a non-default destination or replace an existing identity explicitly:
<prefix>/current/bin/echoiond --import-identity identity.ini \
--identity-path /path/to/identity.txt --force
```
The identity file contains a private key. Keep both the TeamSpeak export and
the converted file private.
## Commands
All commands use the configured prefix (default: `!`)
| Command | Description | Example |
|---------|-------------|---------|
| `!play <query>` | Play a song or add to queue | `!play never gonna give you up` |
| `!pause` | Pause playback | `!pause` |
| `!resume` | Resume playback | `!resume` |
| `!stop` | Stop playback | `!stop` |
| `!skip` | Skip current track | `!skip` |
| `!seek <+/-secs>` | Seek within the track | `!seek +30` |
| `!queue` | Show current queue | `!queue` |
| `!clear` | Clear the queue | `!clear` |
| `!shuffle` | Toggle shuffle mode | `!shuffle` |
| `!repeat` | Toggle repeat mode | `!repeat` |
| `!volume <0-100>` | Set volume | `!volume 50` |
| `!nowplaying` | Show current track | `!nowplaying` |
| `!lyrics` | Show lyrics for the current track (alias `ly`) | `!lyrics` |
| `!search <query>` | Search YouTube + Yandex Music | `!search daft punk` |
| `!youtube <query>` | Search YouTube only (alias `yb`, `yt`) | `!yb daft punk` |
| `!yandex <query>` | Search Yandex Music only (alias `ya`) | `!ya грибы` |
| `!soundcloud <query>` | Search SoundCloud only (alias `sc`) | `!sc lofi beats` |
| `!psc <query>` | Play from SoundCloud only (URL or search) | `!psc flume` |
| `!history [n]` | Recently played tracks | `!history 15` |
| `!stats` | Playback statistics | `!stats` |
| `!fav add\|list\|play <n>` | Manage your favorites | `!fav play 2` |
| `!announce <text>` | **Admin:** message all subscribers once | `!announce New update live!` |
## Architecture
This repository contains orchestration CMake, the component registry and lock,
configuration examples, installer, release packaging, feed publication, and
Gitea workflows. Executables, native modules, the Web module, and first-party
plugins are maintained in independent sibling repositories:
- **EchoionApi** — module contracts, SDK wrappers, and shared API types
- **EchoionHost** — reusable module loading and lifecycle
- **EchoionCore** — playback, commands, RPC, and state; reloadable
- **EchoionWeb** — HTTP backend, dashboard, and frontend assets
- **EchoionStandalone** — stable `echoiond` daemon and orchestration adapter
- **EchoionUpdater** — root-owned generation activation helper
- **EchoionDesktop** — Qt desktop client with its own local update feed
- **EchoionPluginUrlShortenerInternal** and
**EchoionPluginUrlShortenerExternal** — first-party reloadable plugins
`components.json` describes those repositories and
`components.lock.json` records the exact release revisions and artifact
identities. Ordinary development follows component `main`; release builds use
the exact lock. `CPM_<Component>_SOURCE` remains available for a clean local
override. The repositories are ordinary SSH checkouts, not submodules.
The native module ABI is descriptor-based and size-versioned. Implementations
may use C++ standard-library, Qt, `Void::`, exceptions, or RTTI-owned objects
when the producer and consumer contract declares them; the API SDK reuses
VoidLibrary facilities instead of duplicating equivalent Echoion types.
**VoidTeamspeak** remains the independently consumable native TeamSpeak client
library used by the Standalone adapter.
The legacy TeamSpeak client plugin was removed. TeamSpeak protocol behavior is
implemented once in `VoidTeamspeak`; `EchoionStandalone` is Echoion's only host
adapter.
Watch Together is the independent **VoidWatch** product in the sibling
`EchoionWatch` repository. Echoion has no Watch runtime, WebSocket session,
provider resolver, or extra TeamSpeak identity; it only exposes the configured
external link and a temporary `/watch` redirect.
### Audio Flow
```
query → SourceRouter (innertube → Yandex → direct URL → yt-dlp) → PlaybackEngine
(dual AudioDecoder, gapless handoff) → Core → Standalone interface
→ VoidTeamspeak → TeamSpeak
```
Audio is decoded using FFmpeg at 192kHz stereo and emitted in 20ms chunks to
TeamSpeak's Opus voice protocol through the bot's single playback engine and
visible TeamSpeak identity.
## Development
### Development hot reload
The core library can be hot-reloaded without disconnecting from the server:
1. Build the new core: `cmake --build . --target EchoionCore`
2. Replace `Echoion.ts`; the daemon's host watcher reloads it automatically.
This developer-only watcher is enabled for writable build trees. Installed
release payloads are immutable and use installer upgrades plus service restart
instead of writing temporary libraries beside Core.
Protocol or host changes can use the daemon's opt-in transactional re-exec API.
The process must be started with `ECHOION_RELEASE_MANIFEST` set to the absolute
manifest path before a release is staged:
```bash
export ECHOION_RELEASE_MANIFEST="$HOME/echoion/releases/pending-release.json"
# Start the development daemon with its normal --config/--state-dir arguments.
scripts/stage-release.sh "$HOME/echoion/releases" 2.0.0 \
build-release/runtime-stage
```
The staging command rejects unsafe version names and existing release
directories, verifies the bundle's v2 whole-payload manifest, copies the full
runtime tree, and then renames `pending-release.json` into place. The running
daemon validates every declared file in a child process, checkpoints Core
state, disconnects cleanly, and re-execs the staged binary. The installer does
not enable this development watcher; installed upgrades are performed by the
signed updater. Running a new `.run` artifact against the same prefix remains
the offline/manual upgrade path.
### Adding Commands
To add a new command:
1. Create a new command class in `EchoionCore/src/commands/`
2. Inherit from `CommandBase`
3. Register in `CommandManager::initialize()`
Example:
```cpp
class MyCommand : public CommandBase {
public:
MyCommand() : CommandBase("mycommand", "Description") {}
Api::Result<std::string> execute(uint64_t clientId, const std::vector<std::string>& args) override {
return "Hello, World!";
}
};
```
For independently reloadable native extensions, use the trusted plugin ABI
instead of compiling commands into Core. See [Native plugins](docs/plugins.md).
## Packaging and Distribution
The supported Linux distribution path is `scripts/release.sh`. Each release
contains:
- `echoion-<version>-linux-x86_64.tar.zst` with one top-level directory;
- `echoion-<version>-linux-x86_64.run`, which accepts the installer flags above;
- the external v2 manifest and ELF dependency report;
- `SHA256SUMS` for all published artifacts.
Choose the package channel and replay sequence when producing the independent
component artifacts:
```bash
scripts/release.sh --version 2.0.0 \
--update-channel stable --update-sequence 123
```
Official releases package every locked component independently and the root
workflow publishes the signed channel catalog plus immutable component feeds in
one protected `release-feed` commit. `scripts/generate-update-feed.py` is kept
only for explicit custom `direct` sources. It signs exact payload bytes and
never places the private key in the release:
```bash
scripts/generate-update-feed.py \
--artifact dist/echoion-2.0.0-linux-x86_64.tar.zst \
--manifest dist/echoion-2.0.0-linux-x86_64.manifest.json \
--version 2.0.0 \
--url https://updates.example.org/echoion-2.0.0-linux-x86_64.tar.zst \
--sequence 123 \
--output-payload dist/echoion-2.0.0.update-payload.json \
--output-envelope dist/echoion-2.0.0.update.json \
--key-id production-2026 --private-key /secure/echoion-update.pem
```
For example, a plugin feed can be produced independently:
```bash
scripts/generate-update-feed.py \
--component plugin --artifact-id lyrics \
--artifact dist/lyrics-2.0.0.so --version 2.0.0 \
--url https://updates.example.org/plugins/lyrics-2.0.0.so \
--output-payload dist/lyrics-2.0.0.update-payload.json
```
The archive and installer contain the same relocatable dynamic payload. They do
not depend on DEB/RPM metadata or static linking, so one build can be installed
on the supported Ubuntu, Debian, and Arch targets.
When unpacking the `.tar.zst` form directly, preserve the release modes even
under a restrictive shell umask:
```bash
tar --same-permissions --no-same-owner --zstd \
-xf echoion-2.0.0-linux-x86_64.tar.zst
```
### CMake Package Support
The project uses [PackageProject.cmake](https://github.com/TheLartians/PackageProject.cmake) to export CMake targets:
```cmake
find_package(EchoionCore REQUIRED)
target_link_libraries(myapp PRIVATE Echoion::Core)
```
## License
MIT License - See LICENSE file for details
## Credits
- TeamSpeak Systems GmbH for the TeamSpeak SDK
- FFmpeg team for audio decoding
- Glaze library for JSON handling
- PackageProject.cmake for CMake packaging
-153
View File
@@ -1,153 +0,0 @@
# VoidLibrary — work needed to fully migrate Echoion (+ upgrade ideas)
## STATUS (migration complete)
Almost everything below has now landed. Echoion uses Void for **Json, Logging,
Process, Retry, Configuration, EventBus (async), ThreadPool, Cache, Resilience,
BufferPool, Result**, and **glaze is fully removed**. The blockers A1–A6 were all
implemented in VoidLibrary as universal primitives and consumed by Echoion:
- **A1 done** — `Void/Data/Reflect.hpp` now reflects `chrono::duration`,
**`time_point`**, `variant`, `array`, non-string `map`. TrackInfo/RPC/state
serialize via reflection; glaze gone.
- **A2 done** — `Void::EventBus` gained `Mode::Async`; Echoion's bus delegates to it.
- **A3 done** — `Void::Concurrency::ThreadPool` gained bounded queue + `try_submit`
+ rejection stats (Echoion's ConnectionPool deleted).
- **A4 done** — `Void::Containers::Cache` (TTL + policy + stats) added; LruCache deleted.
- **A5 done** — `Void::Resilience` (TokenBucket, **KeyedRateLimiter<Key>**,
CircuitBreaker, ResourceMonitor); Echoion's RateLimiter/CircuitBreaker/
ResourceMonitor deleted.
- **A6 done** — `Void::BufferPool::BufferPool<T>` added; AudioBufferPool wraps it;
bespoke MemoryPool deleted. New `Void::System` metrics (process_memory/cpu) added.
**Remaining:** none from the migration list. `CoreLoader` now uses
`Void::Plugin::PluginManager` with pinned handles, host-side interface
validation, explicit activation readiness, state checkpoint/restore, and
rollback to a reactivated previous Core. Successful and rejected replacement
paths are covered by an end-to-end reload test.
The historical analysis below is retained for reference.
---
## A. Blockers — feature parity VoidLibrary must add
### A1. JSON reflection: native `chrono` / `variant` / `map` / `array` support — HIGHEST IMPACT
**Problem.** `Void/Data/Reflect.hpp` only (de)serializes arithmetic, enum, string,
`optional`, `vector`, string-keyed map, and aggregates. It cannot handle
`std::chrono::duration` / `time_point`, `std::variant`, `std::map` with non-string
keys, or `std::array`. A single such member makes a whole struct non-reflectable.
**Echoion impact.** Forced hand-written `to_json/from_json` for `TrackInfo`, and
`*Json` mirror structs for config. It still blocks **`HotReloadState`** (its
`BotConfig`/`QueueEntry`/`PlaybackState` carry `chrono`) and **RPC** (`RpcRequest`/
`RpcResponse`/`RpcNotification` carry `time_point`).
**Ask.** Built-in reflection handling for:
- `std::chrono::duration<Rep,Period>` → integer count (Meta already exposes
`is_duration_v`), and `time_point` → epoch millis — encoding ideally selectable
via a field attribute (`[[= Json::ChronoAs{Millis}]]`).
- `std::variant` (tagged, or first-that-parses).
- `std::map<K,V>` for non-string keys.
- `std::array<T,N>`.
**Payoff.** Removes essentially all remaining manual serializers and directly
unblocks the HotReloadState + RPC migrations. **Do this first.**
### A2. EventBus: async / queued dispatch mode
**Problem.** `Void::EventBus::publish()` invokes handlers inline (synchronous).
Echoion's bus is async (background thread) because its handlers do **network
broadcasts** (`rpcServer_->broadcastEvent`) and **SQLite writes**
(`database_->recordPlayback`). Sync dispatch would run that I/O on the publisher's
thread (the playback path) → blocking and lock-ordering deadlock risk.
**Ask.** An async dispatch mode (worker thread or `Void::Concurrency::ThreadPool`
backed), e.g. `EventBus(Mode::Async)` with `drain()`/`flush()`, keeping sync as the
default. Optional ordered delivery + coalescing.
**Payoff.** Echoion drops its custom `EventBus` + `GlobalEventBus`.
### A3. ThreadPool: bounded queue + backpressure / rejection
**Problem.** `Void::Concurrency::ThreadPool::submit()` is unbounded. Echoion's
`ConnectionPool` exists specifically for admission control: a bounded queue,
`try_submit()` returning `false` when full (prevents resource exhaustion under RPC
load), plus active / queued / processed / **rejected** stats.
**Ask.** A bounded-capacity option + `try_submit() -> bool` (or `expected`) + basic
counters (pending, active, processed, rejected).
**Payoff.** Echoion drops `ConnectionPool`.
### A4. Cache: TTL + eviction policies + stats
**Problem.** `Void::Containers::LruCache` is capacity-only. Echoion's `LruCache`
has per-entry **TTL** expiry, selectable eviction policy (LRU/LFU/FIFO/TTL), and
**stats** (hits/misses/evictions/inserts/hitRate/memoryUsage) — used for audio and
metadata caching where TTL matters.
**Ask.** A richer cache (or options on `LruCache`): per-entry TTL, pluggable
eviction policy, hit/miss/eviction counters, optional size/memory accounting.
**Payoff.** Echoion drops its `Cache`.
### A5. Resilience primitives — net-new `Void::Resilience` module
None of these exist in Void today; all are standard, broadly useful service
primitives:
- **RateLimiter** — token bucket, per-key, configurable rate + burst, stale-entry
cleanup. (echoion `RateLimiter`)
- **CircuitBreaker** — CLOSED / OPEN / HALF_OPEN, failure threshold, reset timeout,
stats. (echoion `CircuitBreaker`)
- **ResourceMonitor** — memory / CPU / queue-depth sampling with threshold +
pressure callbacks. (echoion `ResourceMonitor`)
### A6. MemoryPool: typed audio-buffer / arena pool
**Problem.** `Void::Containers::Pool` is a slab **object** pool (`acquire()` →
`unique_ptr<T>`). Echoion's `MemoryPool` pools reusable **int16 audio sample
buffers** (grow-on-demand, zero-copy views) on the decode→playback hot path.
**Ask.** A buffer/arena pool variant (pooled contiguous `T` buffers with reuse +
high-water stats), or confirm `Pool<std::vector<int16_t>>` is an acceptable fit.
---
## B. Already replaceable — no VoidLibrary change needed (Echoion-side work only)
- **Plugin loader → `Void::Plugin` (done).** `Loader::reload()` + `Manager` (FileWatcher,
RCU-pinned handles so "work never stops for a reload") + the v2
`serialize_state`/`deserialize_state` C-ABI protocol already cover — and improve
on — Echoion's `CoreLoader`/dylib/`FileWatcher`. The "defer reload until the
current track finishes" behaviour is a policy Echoion can layer on `Manager`.
- **RPC JSON** and **HotReloadState** are blocked *only* by **A1** (plus the Desktop
client moving in lockstep for the RPC wire format).
---
## C. Upgrade ideas (general VoidLibrary improvements)
- **Json:** streaming/SAX parser + incremental serialize for large docs (yt-dlp
`-J` playlist output is often MBs); JSON Pointer / path query (`get_as<T>(path)`);
parse integers without a `double` round-trip; a `from_json` that collects *all*
field errors, not just the first.
- **Json reflection:** read-side key aliases, per-field defaults, and the chrono
encoding attribute from A1.
- **Process:** async/streaming variant (incremental stdout for progress), env-var
and working-directory control, and a kill/signal handle for long-running children.
- **Retry:** jitter (full / decorrelated) on backoff; an overall deadline / retry
budget.
- **Logging:** structured (JSON/logfmt) sink; per-module level sourced from
`Configuration`; a sampling / rate-limited sink; optional console level-split
(info→stdout, error→stderr).
- **Configuration:** typed `get_as<T>` with chrono + byte-size units (Echoion config
uses `"1GB"`, `"30000ms"`).
- **Service:** scoped / child registries; ordered startup with declared dependency
edges.
---
## Priority (by Echoion unblock value)
1. **A1** (JSON chrono/variant) — unblocks RPC + HotReloadState and deletes the
manual serializers. Biggest single win.
2. **A2** (async EventBus) — removes an entire subsystem.
3. **A3 / A4** (ThreadPool backpressure, Cache TTL+stats).
4. **A5** (resilience module).
5. **A6** (audio buffer pool).
-138
View File
@@ -1,138 +0,0 @@
cmake_minimum_required(VERSION 4.0)
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
message(FATAL_ERROR "Component dependency bundling currently supports Linux only")
endif()
foreach(_required IN ITEMS BUNDLE_ROOT PATCHELF_EXECUTABLE)
if(NOT DEFINED ${_required} OR "${${_required}}" STREQUAL "")
message(FATAL_ERROR "${_required} is required")
endif()
endforeach()
if((NOT DEFINED BUNDLE_EXECUTABLES OR BUNDLE_EXECUTABLES STREQUAL "") AND
(NOT DEFINED BUNDLE_LIBRARIES OR BUNDLE_LIBRARIES STREQUAL ""))
message(STATUS "Component has no dynamic runtime payload")
return()
endif()
cmake_path(ABSOLUTE_PATH BUNDLE_ROOT NORMALIZE OUTPUT_VARIABLE _bundle_root)
set(_library_dir "${_bundle_root}/lib")
file(MAKE_DIRECTORY "${_library_dir}")
foreach(_seed IN LISTS BUNDLE_SEED_FILES)
if(NOT IS_ABSOLUTE "${_seed}" OR NOT EXISTS "${_seed}" OR IS_DIRECTORY "${_seed}")
message(FATAL_ERROR "Missing absolute compiler runtime seed: ${_seed}")
endif()
file(COPY "${_seed}" DESTINATION "${_library_dir}" FOLLOW_SYMLINK_CHAIN)
endforeach()
set(_system_dependency_regexes
"^linux-vdso\\.so\\.1$"
"^ld-linux-x86-64\\.so\\.2$"
"^libc\\.so\\.6$"
"^libm\\.so\\.6$"
"^libmvec\\.so\\.1$"
"^libdl\\.so\\.2$"
"^libpthread\\.so\\.0$"
"^librt\\.so\\.1$"
"^libresolv\\.so\\.2$"
"^libutil\\.so\\.1$"
"^libanl\\.so\\.1$"
"^libBrokenLocale\\.so\\.1$"
"^libthread_db\\.so\\.1$")
set(_seed_dependency_regexes
"^libstdc\\+\\+\\.so.*$"
"^libgcc_s\\.so.*$")
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR _resolved
UNRESOLVED_DEPENDENCIES_VAR _unresolved
CONFLICTING_DEPENDENCIES_PREFIX _conflicts
EXECUTABLES ${BUNDLE_EXECUTABLES}
LIBRARIES ${BUNDLE_LIBRARIES}
DIRECTORIES ${BUNDLE_SEARCH_DIRECTORIES}
PRE_EXCLUDE_REGEXES
${_system_dependency_regexes}
${_seed_dependency_regexes})
if(_unresolved)
list(SORT _unresolved)
list(JOIN _unresolved ", " _unresolved_text)
message(FATAL_ERROR "Unresolved component dependencies: ${_unresolved_text}")
endif()
if(_conflicts_FILENAMES)
list(SORT _conflicts_FILENAMES)
list(JOIN _conflicts_FILENAMES ", " _conflict_text)
message(FATAL_ERROR "Conflicting component dependencies: ${_conflict_text}")
endif()
list(REMOVE_DUPLICATES _resolved)
list(SORT _resolved)
foreach(_dependency IN LISTS _resolved)
cmake_path(GET _dependency FILENAME _name)
if(NOT EXISTS "${_library_dir}/${_name}" AND
NOT IS_SYMLINK "${_library_dir}/${_name}")
file(COPY "${_dependency}"
DESTINATION "${_library_dir}"
FOLLOW_SYMLINK_CHAIN)
endif()
endforeach()
function(_echoion_component_is_elf path result)
if(IS_SYMLINK "${path}" OR NOT EXISTS "${path}")
set(${result} FALSE PARENT_SCOPE)
return()
endif()
file(READ "${path}" _magic OFFSET 0 LIMIT 4 HEX)
string(TOLOWER "${_magic}" _magic)
if(_magic STREQUAL "7f454c46")
set(${result} TRUE PARENT_SCOPE)
else()
set(${result} FALSE PARENT_SCOPE)
endif()
endfunction()
file(GLOB_RECURSE _entries LIST_DIRECTORIES FALSE "${_bundle_root}/*")
list(SORT _entries)
foreach(_entry IN LISTS _entries)
_echoion_component_is_elf("${_entry}" _is_elf)
if(NOT _is_elf)
continue()
endif()
cmake_path(RELATIVE_PATH _entry BASE_DIRECTORY "${_bundle_root}"
OUTPUT_VARIABLE _relative)
if(_relative MATCHES "^bin/")
set(_runpath "$ORIGIN/../lib")
elseif(_relative MATCHES "^plugins/[^/]+/")
set(_runpath "$ORIGIN/../../lib")
else()
set(_runpath "$ORIGIN")
endif()
execute_process(
COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath "${_runpath}" "${_entry}"
RESULT_VARIABLE _patch_result
ERROR_VARIABLE _patch_error)
if(NOT _patch_result EQUAL 0)
message(FATAL_ERROR "Cannot set RUNPATH on ${_entry}: ${_patch_error}")
endif()
execute_process(
COMMAND "${PATCHELF_EXECUTABLE}" --print-soname "${_entry}"
RESULT_VARIABLE _soname_result
OUTPUT_VARIABLE _soname
ERROR_VARIABLE _soname_error
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_soname_result EQUAL 0 AND NOT _soname STREQUAL "" AND
_relative MATCHES "^lib/")
if(NOT _soname MATCHES "^[A-Za-z0-9][A-Za-z0-9._+~-]*$")
message(FATAL_ERROR "Unsafe SONAME '${_soname}' in ${_entry}")
endif()
cmake_path(GET _entry FILENAME _entry_name)
if(NOT _entry_name STREQUAL _soname AND
NOT EXISTS "${_library_dir}/${_soname}" AND
NOT IS_SYMLINK "${_library_dir}/${_soname}")
file(CREATE_LINK "${_entry_name}" "${_library_dir}/${_soname}" SYMBOLIC)
endif()
endif()
endforeach()
list(LENGTH _resolved _dependency_count)
message(STATUS "Bundled ${_dependency_count} private component dependencies")
-217
View File
@@ -1,217 +0,0 @@
cmake_minimum_required(VERSION 4.0)
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
message(FATAL_ERROR "Echoion runtime dependency bundling currently supports Linux only")
endif()
if(NOT DEFINED BUNDLE_ROOT OR BUNDLE_ROOT STREQUAL "")
message(FATAL_ERROR "BUNDLE_ROOT must name the staged runtime tree")
endif()
if(NOT DEFINED PATCHELF_EXECUTABLE OR PATCHELF_EXECUTABLE STREQUAL "")
find_program(PATCHELF_EXECUTABLE NAMES patchelf REQUIRED)
endif()
if(NOT DEFINED BUNDLE_SEED_FILES OR BUNDLE_SEED_FILES STREQUAL "")
message(FATAL_ERROR
"BUNDLE_SEED_FILES must contain the exact compiler runtime libraries")
endif()
cmake_path(ABSOLUTE_PATH BUNDLE_ROOT NORMALIZE OUTPUT_VARIABLE _bundle_root)
set(_executable "${_bundle_root}/bin/echoiond")
set(_updater "${_bundle_root}/bin/echoion-updater")
set(_core "${_bundle_root}/lib/Echoion.ts")
set(_library_dir "${_bundle_root}/lib")
if(NOT DEFINED BUNDLE_RESOLVER_EXECUTABLES OR
BUNDLE_RESOLVER_EXECUTABLES STREQUAL "")
if(DEFINED BUNDLE_RESOLVER_EXECUTABLE AND
NOT BUNDLE_RESOLVER_EXECUTABLE STREQUAL "")
set(BUNDLE_RESOLVER_EXECUTABLES "${BUNDLE_RESOLVER_EXECUTABLE}")
else()
set(BUNDLE_RESOLVER_EXECUTABLES "${_executable}")
if(EXISTS "${_updater}")
list(APPEND BUNDLE_RESOLVER_EXECUTABLES "${_updater}")
endif()
endif()
endif()
if(NOT DEFINED BUNDLE_RESOLVER_LIBRARIES OR
BUNDLE_RESOLVER_LIBRARIES STREQUAL "")
set(BUNDLE_RESOLVER_LIBRARIES "${_core}")
endif()
if(NOT EXISTS "${_executable}")
message(FATAL_ERROR "Missing staged daemon: ${_executable}")
endif()
if(NOT EXISTS "${_core}")
message(FATAL_ERROR "Missing staged Core library: ${_core}")
endif()
foreach(_resolver_executable IN LISTS BUNDLE_RESOLVER_EXECUTABLES)
if(NOT IS_ABSOLUTE "${_resolver_executable}" OR
NOT EXISTS "${_resolver_executable}" OR
IS_DIRECTORY "${_resolver_executable}")
message(FATAL_ERROR
"Missing absolute dependency resolver executable: ${_resolver_executable}")
endif()
endforeach()
foreach(_resolver_library IN LISTS BUNDLE_RESOLVER_LIBRARIES)
if(NOT IS_ABSOLUTE "${_resolver_library}" OR
NOT EXISTS "${_resolver_library}" OR
IS_DIRECTORY "${_resolver_library}")
message(FATAL_ERROR
"Missing absolute dependency resolver library: ${_resolver_library}")
endif()
endforeach()
file(MAKE_DIRECTORY "${_library_dir}")
# Linux dependency resolution checks RUNPATH and then ldconfig before consulting
# DIRECTORIES. Seed the exact compiler runtimes into $ORIGIN first so an older
# host libstdc++/libgcc with the same SONAME cannot be selected accidentally.
foreach(_seed IN LISTS BUNDLE_SEED_FILES)
if(NOT IS_ABSOLUTE "${_seed}" OR NOT EXISTS "${_seed}" OR IS_DIRECTORY "${_seed}")
message(FATAL_ERROR "Missing absolute runtime seed: ${_seed}")
endif()
file(COPY "${_seed}"
DESTINATION "${_library_dir}"
FOLLOW_SYMLINK_CHAIN)
endforeach()
# glibc and the ELF loader define the portable ABI floor and must be supplied
# by the target host. Everything else, including libgcc_s and libstdc++, is
# resolved recursively and copied into lib/.
set(_system_dependency_regexes
"^linux-vdso\\.so\\.1$"
"^ld-linux-x86-64\\.so\\.2$"
"^libc\\.so\\.6$"
"^libm\\.so\\.6$"
"^libmvec\\.so\\.1$"
"^libdl\\.so\\.2$"
"^libpthread\\.so\\.0$"
"^librt\\.so\\.1$"
"^libresolv\\.so\\.2$"
"^libutil\\.so\\.1$"
"^libanl\\.so\\.1$"
"^libBrokenLocale\\.so\\.1$"
"^libthread_db\\.so\\.1$")
# These runtimes are explicit, compiler-derived seed files. Never let the
# resolver select a different host copy with the same SONAME through ldconfig.
set(_seed_dependency_regexes
"^libstdc\\+\\+\\.so.*$"
"^libgcc_s\\.so.*$")
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR _resolved_dependencies
UNRESOLVED_DEPENDENCIES_VAR _unresolved_dependencies
CONFLICTING_DEPENDENCIES_PREFIX _conflicts
EXECUTABLES ${BUNDLE_RESOLVER_EXECUTABLES}
LIBRARIES ${BUNDLE_RESOLVER_LIBRARIES}
DIRECTORIES ${BUNDLE_SEARCH_DIRECTORIES}
PRE_EXCLUDE_REGEXES
${_system_dependency_regexes}
${_seed_dependency_regexes})
if(_unresolved_dependencies)
list(SORT _unresolved_dependencies)
list(JOIN _unresolved_dependencies ", " _unresolved_text)
message(FATAL_ERROR "Unresolved runtime dependencies: ${_unresolved_text}")
endif()
if(_conflicts_FILENAMES)
list(SORT _conflicts_FILENAMES)
list(JOIN _conflicts_FILENAMES ", " _conflict_text)
message(FATAL_ERROR "Conflicting runtime dependency names: ${_conflict_text}")
endif()
list(REMOVE_DUPLICATES _resolved_dependencies)
list(SORT _resolved_dependencies)
foreach(_dependency IN LISTS _resolved_dependencies)
if(NOT EXISTS "${_dependency}")
message(FATAL_ERROR "Resolved dependency disappeared: ${_dependency}")
endif()
cmake_path(GET _dependency PARENT_PATH _dependency_directory)
cmake_path(NORMAL_PATH _dependency_directory)
if(_dependency_directory STREQUAL _library_dir)
continue()
endif()
cmake_path(GET _dependency FILENAME _dependency_name)
if(EXISTS "${_library_dir}/${_dependency_name}" OR
IS_SYMLINK "${_library_dir}/${_dependency_name}")
continue()
endif()
file(COPY "${_dependency}"
DESTINATION "${_library_dir}"
FOLLOW_SYMLINK_CHAIN)
endforeach()
function(_echoion_is_elf path result_var)
if(IS_SYMLINK "${path}" OR NOT EXISTS "${path}")
set(${result_var} FALSE PARENT_SCOPE)
return()
endif()
file(READ "${path}" _magic OFFSET 0 LIMIT 4 HEX)
string(TOLOWER "${_magic}" _magic)
if(_magic STREQUAL "7f454c46")
set(${result_var} TRUE PARENT_SCOPE)
else()
set(${result_var} FALSE PARENT_SCOPE)
endif()
endfunction()
# Ensure a SONAME link exists even when CMake resolved a dependency directly to
# its real versioned file instead of the symlink used by DT_NEEDED.
file(GLOB _library_entries LIST_DIRECTORIES FALSE "${_library_dir}/*")
list(SORT _library_entries)
foreach(_entry IN LISTS _library_entries)
_echoion_is_elf("${_entry}" _is_elf)
if(NOT _is_elf)
continue()
endif()
execute_process(
COMMAND "${PATCHELF_EXECUTABLE}" --print-soname "${_entry}"
RESULT_VARIABLE _soname_result
OUTPUT_VARIABLE _soname
ERROR_VARIABLE _soname_error
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _soname_result EQUAL 0)
message(FATAL_ERROR
"Cannot read SONAME from ${_entry}: ${_soname_error}")
endif()
if(NOT _soname STREQUAL "")
if(NOT _soname MATCHES "^[A-Za-z0-9][A-Za-z0-9._+~-]*$")
message(FATAL_ERROR "Unsafe SONAME '${_soname}' in ${_entry}")
endif()
get_filename_component(_entry_name "${_entry}" NAME)
set(_soname_path "${_library_dir}/${_soname}")
if(NOT _entry_name STREQUAL _soname
AND NOT EXISTS "${_soname_path}"
AND NOT IS_SYMLINK "${_soname_path}")
file(CREATE_LINK "${_entry_name}" "${_soname_path}" SYMBOLIC)
endif()
endif()
execute_process(
COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath "$ORIGIN" "${_entry}"
RESULT_VARIABLE _patch_result
ERROR_VARIABLE _patch_error)
if(NOT _patch_result EQUAL 0)
message(FATAL_ERROR "Cannot set RUNPATH on ${_entry}: ${_patch_error}")
endif()
endforeach()
file(GLOB _bundle_executable_entries LIST_DIRECTORIES FALSE
"${_bundle_root}/bin/*")
list(SORT _bundle_executable_entries)
foreach(_entry IN LISTS _bundle_executable_entries)
_echoion_is_elf("${_entry}" _is_elf)
if(NOT _is_elf)
continue()
endif()
execute_process(
COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath "$ORIGIN/../lib" "${_entry}"
RESULT_VARIABLE _patch_executable_result
ERROR_VARIABLE _patch_executable_error)
if(NOT _patch_executable_result EQUAL 0)
message(FATAL_ERROR
"Cannot set RUNPATH on ${_entry}: ${_patch_executable_error}")
endif()
endforeach()
list(LENGTH _resolved_dependencies _dependency_count)
message(STATUS "Bundled ${_dependency_count} resolved runtime dependencies")
-8
View File
@@ -1,8 +0,0 @@
# Immutable dependency revisions used by clean and release builds. Local
# development may still override either package with CPM_<name>_SOURCE.
set(ECHOION_VOID_REVISION
"68d86f76a2b2d36f459f76dd283215fa1d804004"
CACHE STRING "VoidLibrary commit used by Echoion")
set(ECHOION_VOID_TEAMSPEAK_REVISION
"aa5e0add608e43375c890b727dcccf360d91e975"
CACHE STRING "VoidTeamspeak commit used by Echoion")
-136
View File
@@ -1,136 +0,0 @@
include_guard(GLOBAL)
set(ECHOION_COMPONENT_REGISTRY
"${CMAKE_CURRENT_LIST_DIR}/../components.json"
CACHE FILEPATH "Echoion component repository registry")
set(ECHOION_COMPONENT_LOCK
"${CMAKE_CURRENT_LIST_DIR}/../components.lock.json"
CACHE FILEPATH "Echoion component release lock")
option(ECHOION_RELEASE_BUILD
"Resolve Echoion components at exact revisions from components.lock.json"
OFF)
foreach(_echoionComponentFile IN ITEMS
"${ECHOION_COMPONENT_REGISTRY}" "${ECHOION_COMPONENT_LOCK}")
if(NOT EXISTS "${_echoionComponentFile}")
message(FATAL_ERROR
"Echoion component metadata does not exist: "
"${_echoionComponentFile}")
endif()
endforeach()
file(READ "${ECHOION_COMPONENT_REGISTRY}" _echoionComponentRegistryJson)
file(READ "${ECHOION_COMPONENT_LOCK}" _echoionComponentLockJson)
string(JSON _echoionRegistrySchema ERROR_VARIABLE _echoionRegistryError
GET "${_echoionComponentRegistryJson}" schemaVersion)
string(JSON _echoionLockSchema ERROR_VARIABLE _echoionLockError
GET "${_echoionComponentLockJson}" schemaVersion)
if(_echoionRegistryError OR NOT _echoionRegistrySchema EQUAL 1)
message(FATAL_ERROR
"Unsupported Echoion component registry: "
"${ECHOION_COMPONENT_REGISTRY}")
endif()
if(_echoionLockError OR NOT _echoionLockSchema EQUAL 2)
message(FATAL_ERROR
"Unsupported Echoion component lock: ${ECHOION_COMPONENT_LOCK}")
endif()
string(JSON _echoionLockedProductVersion
GET "${_echoionComponentLockJson}" productVersion)
if(ECHOION_RELEASE_BUILD AND
NOT _echoionLockedProductVersion STREQUAL ECHOION_PRODUCT_VERSION)
message(FATAL_ERROR
"components.lock.json productVersion "
"${_echoionLockedProductVersion} does not match root version "
"${ECHOION_PRODUCT_VERSION}")
endif()
function(echoion_add_component component)
string(JSON repository ERROR_VARIABLE repositoryError
GET "${_echoionComponentRegistryJson}"
components "${component}" url)
string(JSON branch ERROR_VARIABLE branchError
GET "${_echoionComponentRegistryJson}"
components "${component}" branch)
if(repositoryError OR branchError OR repository STREQUAL "" OR
branch STREQUAL "")
message(FATAL_ERROR
"Component ${component} is incomplete in "
"${ECHOION_COMPONENT_REGISTRY}")
endif()
set(sourceVariable "CPM_${component}_SOURCE")
if(DEFINED ${sourceVariable} AND
NOT "${${sourceVariable}}" STREQUAL "")
set(revision "${branch}")
message(STATUS
"Echoion component ${component}: local override "
"${${sourceVariable}}")
elseif(ECHOION_RELEASE_BUILD)
string(JSON revision ERROR_VARIABLE revisionError
GET "${_echoionComponentLockJson}"
components "${component}" revision)
if(revisionError OR revision STREQUAL "")
message(FATAL_ERROR
"Component ${component} has no locked release revision")
endif()
message(STATUS
"Echoion component ${component}: locked ${revision}")
else()
set(revision "${branch}")
message(STATUS
"Echoion component ${component}: development ${branch}")
endif()
if(ECHOION_RELEASE_BUILD)
string(JSON componentVersion ERROR_VARIABLE componentVersionError
GET "${_echoionComponentLockJson}"
components "${component}" componentVersion)
if(componentVersionError OR componentVersion STREQUAL "")
message(FATAL_ERROR
"Component ${component} has no locked component version")
endif()
# Component projects intentionally accept ECHOION_PRODUCT_VERSION when
# embedded. Scope the independently derived version to this CPM call;
# the root product version remains unchanged for the next component.
set(ECHOION_PRODUCT_VERSION "${componentVersion}")
set(ECHOION_COMPONENT_VERSION "${componentVersion}")
message(STATUS
"Echoion component ${component}: version ${componentVersion}")
endif()
set(componentOptions "")
string(JSON optionCount ERROR_VARIABLE optionsError
LENGTH "${_echoionComponentRegistryJson}"
components "${component}" buildOptions)
if(NOT optionsError AND optionCount GREATER 0)
math(EXPR optionLast "${optionCount} - 1")
foreach(optionIndex RANGE 0 ${optionLast})
string(JSON optionName MEMBER
"${_echoionComponentRegistryJson}"
components "${component}" buildOptions ${optionIndex})
string(JSON optionValue GET
"${_echoionComponentRegistryJson}"
components "${component}" buildOptions "${optionName}")
list(APPEND componentOptions "${optionName} ${optionValue}")
endforeach()
endif()
if(componentOptions)
CPMAddPackage(
NAME "${component}"
GIT_REPOSITORY "${repository}"
GIT_TAG "${revision}"
OPTIONS ${componentOptions})
else()
CPMAddPackage(
NAME "${component}"
GIT_REPOSITORY "${repository}"
GIT_TAG "${revision}")
endif()
if(DEFINED ${component}_SOURCE_DIR)
set(${component}_SOURCE_DIR "${${component}_SOURCE_DIR}" PARENT_SCOPE)
endif()
endfunction()
-127
View File
@@ -1,127 +0,0 @@
{
"schemaVersion": 1,
"components": {
"EchoionApi": {
"repository": "Void/EchoionApi",
"url": "ssh://gitea@git.faumaray.ru/void/echoionapi.git",
"branch": "main",
"kind": "sdk",
"packageId": "echoion-api",
"activation": "restart-required",
"dependencies": {},
"abiContract": "abi/echoion-module-v1.json",
"buildOptions": {}
},
"EchoionHost": {
"repository": "Void/EchoionHost",
"url": "ssh://gitea@git.faumaray.ru/void/echoionhost.git",
"branch": "main",
"kind": "runtime-module",
"packageId": "echoion-host",
"activation": "restart-required",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"abiContract": "abi/module.json",
"buildOptions": {}
},
"EchoionCore": {
"repository": "Void/EchoionCore",
"url": "ssh://gitea@git.faumaray.ru/void/echoioncore.git",
"branch": "main",
"kind": "runtime-module",
"packageId": "echoion-core",
"activation": "reloadable",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0",
"EchoionWeb": ">=2.0.0 <3.0.0"
},
"abiContract": "abi/module.json",
"buildOptions": {}
},
"EchoionWeb": {
"repository": "Void/EchoionWeb",
"url": "ssh://gitea@git.faumaray.ru/void/echoionweb.git",
"branch": "main",
"kind": "runtime-module",
"packageId": "echoion-web",
"activation": "restart-required",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"abiContract": "abi/module.json",
"buildOptions": {
"ECHOION_BUILD_WEB": "ON"
}
},
"EchoionStandalone": {
"repository": "Void/EchoionStandalone",
"url": "ssh://gitea@git.faumaray.ru/void/echoionstandalone.git",
"branch": "main",
"kind": "executable",
"packageId": "echoion-standalone",
"activation": "restart-required",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0"
},
"abiContract": null,
"buildOptions": {}
},
"EchoionUpdater": {
"repository": "Void/EchoionUpdater",
"url": "ssh://gitea@git.faumaray.ru/void/echoionupdater.git",
"branch": "main",
"kind": "executable",
"packageId": "echoion-updater",
"activation": "restart-required",
"dependencies": {},
"abiContract": null,
"buildOptions": {}
},
"EchoionDesktop": {
"repository": "Void/EchoionDesktop",
"url": "ssh://gitea@git.faumaray.ru/void/echoiondesktop.git",
"branch": "main",
"kind": "desktop",
"packageId": "echoion-desktop",
"activation": "local-restart",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"abiContract": null,
"buildOptions": {}
},
"EchoionPluginUrlShortenerInternal": {
"repository": "Void/EchoionPluginUrlShortenerInternal",
"url": "ssh://gitea@git.faumaray.ru/void/echoionpluginurlshortenerinternal.git",
"branch": "main",
"kind": "plugin",
"packageId": "echoion-plugin-url-shortener-internal",
"activation": "reloadable",
"pluginId": "url-shortener-internal",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"abiContract": "abi/module.json",
"buildOptions": {}
},
"EchoionPluginUrlShortenerExternal": {
"repository": "Void/EchoionPluginUrlShortenerExternal",
"url": "ssh://gitea@git.faumaray.ru/void/echoionpluginurlshortenerexternal.git",
"branch": "main",
"kind": "plugin",
"packageId": "echoion-plugin-url-shortener-external",
"activation": "reloadable",
"pluginId": "url-shortener-external",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"abiContract": "abi/module.json",
"buildOptions": {}
}
}
}
-78
View File
@@ -1,78 +0,0 @@
{
"schemaVersion": 2,
"productVersion": "2.0.1",
"components": {
"EchoionApi": {
"repository": "Void/EchoionApi",
"revision": "e2503244b36281ccd7da7349727197c77dcbeb38",
"componentVersion": "2.0.1",
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"sourceTreeHash": "git-sha1:c674c0bcf291600d413f1ecdce6de75cb7c7fdac",
"artifactIdentity": "echoion-api-2.0.1-linux-x86_64"
},
"EchoionHost": {
"repository": "Void/EchoionHost",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125",
"componentVersion": "2.0.0",
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"sourceTreeHash": "git-sha1:c7f47784ba081ec105694c24c87dfb02b4288f46",
"artifactIdentity": "echoion-host-2.0.0-linux-x86_64"
},
"EchoionCore": {
"repository": "Void/EchoionCore",
"revision": "a6555d4c698d796bf1f8efcd4af1653d7240b043",
"componentVersion": "2.0.1",
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"sourceTreeHash": "git-sha1:ad16aea45f04e28c2f531121bdc472a37f831a53",
"artifactIdentity": "echoion-core-2.0.1-linux-x86_64"
},
"EchoionWeb": {
"repository": "Void/EchoionWeb",
"revision": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584",
"componentVersion": "2.0.0",
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"sourceTreeHash": "git-sha1:652423aadc955886cff70d7881853584a3b5b5ea",
"artifactIdentity": "echoion-web-2.0.0-linux-x86_64"
},
"EchoionStandalone": {
"repository": "Void/EchoionStandalone",
"revision": "8f71775ebdc27469a853a4b39a33fd36ed972347",
"componentVersion": "2.0.0",
"abiHash": null,
"sourceTreeHash": "git-sha1:75869bccff9514ccc1177bdeb7fec98cdba9bd8b",
"artifactIdentity": "echoion-standalone-2.0.0-linux-x86_64"
},
"EchoionUpdater": {
"repository": "Void/EchoionUpdater",
"revision": "adfb06467f64428ce99c5c4bb420edb3cf944f57",
"componentVersion": "2.0.0",
"abiHash": null,
"sourceTreeHash": "git-sha1:d26b41913d08746197c905567f76826df6786d79",
"artifactIdentity": "echoion-updater-2.0.0-linux-x86_64"
},
"EchoionDesktop": {
"repository": "Void/EchoionDesktop",
"revision": "bae23b7abcf8b204b9684af5efb3b75b05b4f851",
"componentVersion": "2.0.0",
"abiHash": null,
"sourceTreeHash": "git-sha1:abaed06e0dda9e20e529d9bfb437fe2643495fdc",
"artifactIdentity": "echoion-desktop-2.0.0-linux-x86_64"
},
"EchoionPluginUrlShortenerInternal": {
"repository": "Void/EchoionPluginUrlShortenerInternal",
"revision": "44f6af37d459395c842d4ab6ba39e3bda81d8b88",
"componentVersion": "2.0.0",
"abiHash": "sha256:40a9d5a3cd47bd0bb02cb38fb530ce0fc0d59f813749565a1d7fcfdabbb53688",
"sourceTreeHash": "git-sha1:eae0a45a00754a4ce2f044dec4bed79de12a7939",
"artifactIdentity": "echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64"
},
"EchoionPluginUrlShortenerExternal": {
"repository": "Void/EchoionPluginUrlShortenerExternal",
"revision": "6a1616aa25fe2747a2c7e38cd08f616b103951b2",
"componentVersion": "2.0.0",
"abiHash": "sha256:6f6e445a86fc6a67e25dbd0e1f583de9f768f6f4ba88ed2f2ffe6d0540eb85ea",
"sourceTreeHash": "git-sha1:933bdb2c1f245523de850e23bf03a1d23d2fb6df",
"artifactIdentity": "echoion-plugin-url-shortener-external-2.0.0-linux-x86_64"
}
}
}
-243
View File
@@ -1,243 +0,0 @@
{
"_schema": "Echoion Music Bot Configuration v3.0",
"_documentation": "https://github.com/faumaray/echoion/wiki/Configuration",
"_format_note": "v3 serializes the config types directly: durations are strings (\"30000ms\", also accepts \"30s\"/\"5m\"/\"1h\"), enums use their names, and the proxy is a nested object (or null). Unknown keys (the _comment fields below) are ignored on load.",
"bot": {
"_section": "Core Bot Settings",
"botName": "Echoion",
"commandPrefix": "!",
"_language": "Default bot language for users who haven't picked one: \"en\" or \"ru\"",
"language": "en",
"defaultVolume": 0.5,
"maxQueueSize": 100,
"_trackTimeout": "How long the engine waits (emitting silence) for a slow stream resolve before skipping the track",
"trackTimeout": "10s",
"_crossfade": "Crossfade between tracks (e.g. \"3s\"); \"0ms\" = plain gapless handoff",
"crossfade": "0ms",
"allowPlaylistImports": true
},
"youtube": {
"_section": "YouTube Integration",
"_apiKey": "Optional: YouTube Data API v3 key for faster searches",
"youtubeApiKey": null,
"_cookies": "Fix 'Sign in to confirm' errors using ONE of these methods:",
"_cookies_method_1": "Path to cookies.txt file (export from browser extension)",
"youtubeCookiesPath": null,
"_cookies_method_2": "Use cookies directly from browser: chrome, firefox, safari, edge",
"cookiesFromBrowser": null,
"_performance": "yt-dlp performance tuning (ytDlpMaxConcurrent capped at 8)",
"ytDlpMaxConcurrent": 4,
"ytDlpAsyncEnabled": true,
"_urlShortening": "Legacy compatibility flag. Used only when the top-level urlShortening section is absent.",
"enableUrlShortening": true
},
"urlShortening": {
"_section": "Provider-neutral URL shortening. The internal provider requires web.publicUrl and is disabled safely when it is empty; external providers do not require web.publicUrl. Failures leave shortenedUrl empty and never change originalUrl.",
"enabled": false,
"provider": "url-shortener-internal",
"sources": ["youtube"],
"timeout": "3s"
},
"plugins": {
"_section": "Per-plugin JSON configuration files. An empty path uses plugins.d beside this file.",
"configDirectory": ""
},
"network": {
"_section": "Network & Proxy Settings",
"_proxy": "Optional proxy for YouTube access. Set to null to disable, or an object: {\"kind\": \"Http\"|\"Socks5\", \"host\": \"...\", \"port\": 1080, \"username\": null, \"password\": null}",
"proxy": null,
"_rpc": "WebSocket RPC server for Desktop/API clients",
"rpcEnabled": true,
"rpcPort": 8765,
"rpcBindAddress": "127.0.0.1"
},
"web": {
"_section": "Browser web interface (EchoionWeb): serves the public dashboard and bridges authenticated browser RPC through /rpc — only this port needs to be reachable; the RPC server can stay on 127.0.0.1.",
"enabled": false,
"port": 8080,
"_bindAddress": "Use 0.0.0.0 to allow access from other machines.",
"bindAddress": "127.0.0.1",
"webRoot": "./web",
"_rpcUrl": "RPC WebSocket URL for the browser. Empty = same-origin /rpc bridge (recommended); an absolute ws:// URL overrides.",
"rpcUrl": "",
"_publicUrl": "Public address users reach the web interface at, e.g. https://bot.example.com. Required when url-shortener-internal is enabled; also used by !help when the web interface is enabled.",
"publicUrl": "",
"_watchUrl": "External VoidWatch deployment linked from Echoion. The retired /watch path redirects here when set.",
"watchUrl": "",
"_nowPlayingVideo": "Allow the Now Playing view to show the current song's video (muted, synced). Users can still disable it locally; set false to turn it off for everyone.",
"nowPlayingVideo": true,
"_trustedProxyCidrs": "Trust X-Forwarded-For only from these immediate proxy CIDRs. Empty ignores it.",
"trustedProxyCidrs": []
},
"sources": {
"_section": "Music source resolution chain (native paths first, proxied yt-dlp last)",
"_order": "Sources are tried in this order. innertube is the native YouTube player API; yandex is native Yandex Music; ytdlp-proxied is the proxied fallback and always works when a proxy is configured.",
"order": ["innertube", "yandex", "direct-url", "ytdlp-direct", "ytdlp-proxied"],
"_failureCooldown": "How long a failing source is skipped before being retried",
"failureCooldown": "5m",
"_hedgeDelay": "Race a second source when the first hasn't answered within this delay (first success wins); \"0ms\" disables",
"hedgeDelay": "300ms",
"_yandex": "Native Yandex Music. Full tracks need an OAuth token from an account with Plus (see yandex-music token guides); without one, yandex URLs fall back to yt-dlp.",
"yandexEnabled": true,
"yandexToken": null,
"_innertube": "Native YouTube player API (fastest path, one HTTP POST). Geo-blocked without a proxy; requireProxy skips it when none is configured.",
"innertubeEnabled": true,
"innertubeRequireProxy": true
},
"teamspeak": {
"_section": "TeamSpeak Server Connection",
"address": "localhost",
"port": 9987,
"serverPassword": "",
"nickname": "EchoionBot",
"_channel": "Default channel configuration",
"defaultChannelId": null,
"channelPassword": null,
"_permissions": "Server group IDs for access control",
"adminGroups": [6, 7],
"djGroups": [8],
"bannedGroups": []
},
"security": {
"_section": "Security & Authentication",
"requireAuthForAdmin": true,
"maxLoginAttempts": 5,
"lockoutDuration": "300000ms",
"sessionTimeout": "3600000ms",
"enableAuditLog": true,
"_api": "API authentication for RPC clients",
"apiKey": null,
"allowCors": false,
"corsOrigins": ["http://localhost:3000"]
},
"features": {
"_section": "Feature Toggles",
"enableHotReload": true,
"enableAutoReload": false,
"enableAutoUpdateCheck": true,
"_playback": "Playback behavior settings",
"autoStartOnSubscribe": true,
"pauseOnEmptySubscribers": true,
"resumeOnSubscriberReturn": true,
"_autoplay": "Radio mode: when the queue runs dry, enqueue tracks related to the last played one",
"autoplay": false,
"_loudness": "Normalize perceived volume across tracks (slow AGC toward the target level)",
"normalizeLoudness": false,
"targetLoudnessDb": -14.0,
"_queue": "Initial queue state on cold start (shuffleMode: off|random, repeatMode: off|all); runtime toggles are not written back",
"shuffleMode": "off",
"repeatMode": "off",
"maxHistorySize": 50,
"_voteSkip": "Votes needed to skip the current track; 0 = majority of online subscribers",
"voteSkipThreshold": 0
},
"licensing": {
"_section": "Short-lived signed lease from the separately deployed EchoionLicensing service. Production release configurations must set required=true.",
"required": false,
"serviceUrl": "https://license.example.com",
"productId": "echoion",
"_activationTokenEnv": "The environment variable contains the activation token; its value is never stored in config or logs.",
"activationTokenEnv": "ECHOION_LICENSE_TOKEN",
"refreshInterval": "6h",
"retryInterval": "5m",
"maximumLeaseLifetime": "24h",
"developmentMode": false,
"developmentKeys": []
},
"updates": {
"_section": "Signed component updates for the runtime bundle, Core, and already-installed managed plugins",
"enabled": true,
"checkInterval": "6h",
"jitter": "30m",
"maintenanceWindowUtc": {
"start": "03:00",
"duration": "2h"
},
"maxRuntimeDeferral": "24h",
"_retainHealthyVersions": "Previous committed healthy versions kept in addition to the active version",
"retainHealthyVersions": 2,
"sources": {
"official": {
"kind": "component-layout",
"_url": "Empty uses the channel catalog embedded by the release build. A component-layout value may be a feed base URL or an exact feeds/<channel>/catalog.json URL.",
"url": "",
"_publicKeys": "Ed25519 trust roots. Empty inherits the official keys embedded by the release build.",
"publicKeys": [],
"allowUnsigned": false,
"_bearerTokenEnv": "Environment variable name only; the token value is never stored in this file or returned to the web UI.",
"bearerTokenEnv": "ECHOION_LICENSE_TOKEN"
}
},
"runtime": {
"enabled": true,
"source": "official",
"channel": "stable",
"autoApply": true
},
"core": {
"enabled": true,
"source": "official",
"channel": "stable",
"autoApply": true
},
"plugins": {
"enabled": true,
"source": "official",
"channel": "stable",
"autoApply": true,
"managedOnly": true,
"overrides": {}
}
},
"logging": {
"_section": "Process logs below the state directory. Split mode writes one exact-level file per severity plus optional all.log; all files rotate as one bounded snapshot.",
"console": true,
"level": "debug",
"splitByLevel": true,
"combined": true,
"_legacyFileName": "Used only when splitByLevel is false.",
"fileName": "echoion.log",
"maxFileSizeBytes": 10485760,
"maxFiles": 10,
"_format": "pattern, json (JSON Lines), or logfmt",
"format": "pattern",
"pattern": "[{time}] [{level}] [{thread}] {file} - {message}",
"_mode": "async, immediate, or buffered",
"mode": "async",
"queueCapacity": 2048,
"_overflowPolicy": "block, drop-newest, or drop-oldest",
"overflowPolicy": "block"
},
"advanced": {
"_section": "Advanced Settings (Modify with caution)",
"_cache": "Local audio track cache (files reused across plays and restarts)",
"cacheEnabled": true,
"cacheMaxSize": "1GB",
"cacheTTL": 86400,
"tempCleanupInterval": 3600
}
}
-209
View File
@@ -1,209 +0,0 @@
FROM ubuntu:22.04@sha256:0d779ea97881505f5ef0039336ee85edba27519bdba968c284c86ee066a973c8 AS gcc-builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GCC_VERSION=16.1.0
ARG GCC_SHA512=b3454958891ab47e1e5b6cb9396c0ad3b04f32fe2a7bf1153a143f21013fdb6b295ca94c98964698a688e4c1d7555ffd8ffbc20187507cce6b1c32cbcc09897a
ARG GCC_BUILD_JOBS=2
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
bison \
build-essential \
ca-certificates \
curl \
file \
flex \
libgmp-dev \
libisl-dev \
libmpc-dev \
libmpfr-dev \
libzstd-dev \
texinfo \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp/gcc
RUN curl -fsSLO \
"https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" \
&& echo "${GCC_SHA512} gcc-${GCC_VERSION}.tar.xz" | sha512sum -c - \
&& tar -xf "gcc-${GCC_VERSION}.tar.xz" \
&& mkdir build \
&& cd build \
&& "../gcc-${GCC_VERSION}/configure" \
--prefix="/opt/gcc-${GCC_VERSION}" \
--disable-bootstrap \
--disable-multilib \
--enable-default-pie \
--enable-default-ssp \
--enable-languages=c,c++ \
--with-system-zlib \
&& make -j"${GCC_BUILD_JOBS}"
RUN cd build \
&& make install-strip \
&& install -d -m 0755 "/opt/gcc-${GCC_VERSION}/share/licenses/gcc" \
&& install -m 0644 \
"../gcc-${GCC_VERSION}/COPYING3" \
"../gcc-${GCC_VERSION}/COPYING.RUNTIME" \
"/opt/gcc-${GCC_VERSION}/share/licenses/gcc/"
FROM ubuntu:22.04@sha256:0d779ea97881505f5ef0039336ee85edba27519bdba968c284c86ee066a973c8 AS release-builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GCC_VERSION=16.1.0
ARG CMAKE_VERSION=4.0.3
ARG CMAKE_SHA256=585ae9e013107bc8e7c7c9ce872cbdcbdff569e675b07ef57aacfb88c886faac
ARG NODE_VERSION=22.17.0
ARG NODE_SHA256=325c0f1261e0c61bcae369a1274028e9cfb7ab7949c05512c5b1e630f7e80e12
ARG FFMPEG_VERSION=8.0.3
ARG FFMPEG_SHA256=6136812ea6d4e68bdba27e33c2a94382711cdf4f8602ffef056ff792bd6f9818
ARG FFMPEG_BUILD_JOBS=2
ARG BOOST_VERSION=1.87.0
ARG BOOST_VERSION_UNDERSCORE=1_87_0
ARG BOOST_SHA256=af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89
ARG BOOST_BUILD_JOBS=2
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
bzip2 \
ca-certificates \
curl \
file \
git \
gzip \
jq \
libarchive-dev \
libcurl4-openssl-dev \
libgmp10 \
libisl23 \
libmpc3 \
libmpfr6 \
libopus-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libtbb-dev \
libzstd1 \
make \
nasm \
ninja-build \
openssh-client \
openssl \
patchelf \
pkg-config \
python3 \
qt6-base-dev \
libqt6websockets6-dev \
tar \
xz-utils \
zstd \
&& rm -rf /var/lib/apt/lists/*
COPY --from=gcc-builder "/opt/gcc-${GCC_VERSION}" "/opt/gcc-${GCC_VERSION}"
RUN curl --retry 5 --retry-delay 2 --retry-all-errors -fsSLO \
"https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" \
&& echo "${CMAKE_SHA256} cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" | sha256sum -c - \
&& tar -xzf "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" \
-C /usr/local --strip-components=1 \
&& rm "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" \
&& curl --retry 5 --retry-delay 2 --retry-all-errors -fsSLO \
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& echo "${NODE_SHA256} node-v${NODE_VERSION}-linux-x64.tar.xz" | sha256sum -c - \
&& tar -xJf "node-v${NODE_VERSION}-linux-x64.tar.xz" \
-C /usr/local --strip-components=1 \
&& rm "node-v${NODE_VERSION}-linux-x64.tar.xz"
ENV GCC_ROOT="/opt/gcc-${GCC_VERSION}"
ENV PATH="${GCC_ROOT}/bin:${PATH}" \
LD_LIBRARY_PATH="${GCC_ROOT}/lib64:${GCC_ROOT}/lib" \
CC="${GCC_ROOT}/bin/gcc" \
CXX="${GCC_ROOT}/bin/g++"
RUN test "$(uname -m)" = x86_64 \
&& gcc --version | grep -F "gcc (GCC) 16.1.0"
RUN curl --retry 5 --retry-delay 2 --retry-all-errors -fsSLO \
"https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz" \
&& echo "${FFMPEG_SHA256} ffmpeg-${FFMPEG_VERSION}.tar.xz" | sha256sum -c - \
&& tar -xJf "ffmpeg-${FFMPEG_VERSION}.tar.xz" \
&& cd "ffmpeg-${FFMPEG_VERSION}" \
&& ./configure \
--prefix="/opt/ffmpeg-${FFMPEG_VERSION}" \
--cc="${CC}" \
--cxx="${CXX}" \
--disable-static \
--enable-shared \
--disable-autodetect \
--disable-programs \
--disable-doc \
--disable-debug \
--disable-avdevice \
--disable-avfilter \
--disable-swscale \
--disable-encoders \
--disable-muxers \
--disable-hwaccels \
--enable-openssl \
&& make -j"${FFMPEG_BUILD_JOBS}" \
&& make install \
&& install -D -m 0644 COPYING.LGPLv2.1 \
"/opt/ffmpeg-${FFMPEG_VERSION}/share/licenses/ffmpeg/COPYING.LGPLv2.1" \
&& cd / \
&& rm -rf \
"ffmpeg-${FFMPEG_VERSION}" \
"ffmpeg-${FFMPEG_VERSION}.tar.xz"
ENV FFMPEG_ROOT="/opt/ffmpeg-${FFMPEG_VERSION}" \
PKG_CONFIG_PATH="/opt/ffmpeg-${FFMPEG_VERSION}/lib/pkgconfig" \
LD_LIBRARY_PATH="/opt/ffmpeg-${FFMPEG_VERSION}/lib:${LD_LIBRARY_PATH}"
RUN test "$(pkg-config --modversion libavcodec)" = 62.11.103 \
&& test "$(pkg-config --modversion libavformat)" = 62.3.103 \
&& test "$(pkg-config --modversion libavutil)" = 60.8.103 \
&& test "$(pkg-config --modversion libswresample)" = 6.1.103
RUN curl --retry 5 --retry-delay 2 --retry-all-errors -fsSLO \
"https://archives.boost.io/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORE}.tar.bz2" \
&& echo "${BOOST_SHA256} boost_${BOOST_VERSION_UNDERSCORE}.tar.bz2" | sha256sum -c - \
&& tar -xjf "boost_${BOOST_VERSION_UNDERSCORE}.tar.bz2" \
&& cd "boost_${BOOST_VERSION_UNDERSCORE}" \
&& ./bootstrap.sh --prefix="/usr" \
&& ./b2 -j"${BOOST_BUILD_JOBS}" \
cxxstd=23 \
link=shared \
runtime-link=shared \
threading=multi \
variant=release \
--with-container \
--with-stacktrace \
--with-system \
--with-thread \
--with-url \
--layout=system \
install \
&& install -D -m 0644 \
LICENSE_1_0.txt \
"/usr/share/licenses/boost/LICENSE_1_0.txt" \
&& cd / \
&& rm -rf \
"boost_${BOOST_VERSION_UNDERSCORE}" \
"boost_${BOOST_VERSION_UNDERSCORE}.tar.bz2"
# Installer regressions exercise root-owned portable service registration and
# validate generated units without booting systemd inside the build container.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
fakeroot \
libgl-dev \
systemd \
&& rm -rf /var/lib/apt/lists/*
ENV BOOST_ROOT="/usr" \
CMAKE_PREFIX_PATH="${FFMPEG_ROOT}"
WORKDIR /workspace
-97
View File
@@ -1,97 +0,0 @@
# ADR 0001: Future paid official-binary distribution
Status: explored, not implemented
## Decision
Keep update metadata public and cryptographically signed. Keep artifact URLs
stable behind the distribution gateway. If paid access is introduced later,
authorize artifact responses at that gateway; do not put credentials or
short-lived signed URLs into immutable feeds.
The future request path is:
```text
billing webhook
-> Echoion entitlement service
-> account/device access token
-> distribution gateway
-> short-lived origin authorization or streamed object response
```
Billing authorization and update integrity are separate:
- The gateway decides whether an account may receive the bytes.
- The updater independently verifies the feed signature, artifact SHA-256,
signed manifest, size, compatibility, and replay sequence.
No billing, account, license, device, or gateway authorization code is part of
the current implementation.
## Current public baseline
Initial component artifacts are mirrored into the public `Void` organization
Generic Package Registry. This keeps downloads public after component
repositories become private and requires no additional storage service.
Gitea package URLs are permanently public while the organization is public;
they cannot later become paywalled without breaking their original access
contract. Introduce the entitlement gateway as the distribution base before
publishing the first paid-only artifact. Existing public versions remain
public, while new signed feed entries may point to the gateway.
## Provider options
### Stripe Billing
Use Stripe subscriptions and Billing Entitlements webhooks while Echoion owns
the entitlement database, account model, tax configuration, support, and
gateway. This provides the most control but also leaves more commerce and
compliance work in Echoion.
- <https://docs.stripe.com/billing/entitlements>
- <https://docs.stripe.com/billing/subscriptions/webhooks>
### Paddle or Lemon Squeezy
Prefer a merchant-of-record provider when supported jurisdictions, tax
collection/remittance, invoices, and payment operations should be delegated.
Echoion still needs a webhook-driven entitlement projection and must treat
webhooks as replayable, out-of-order external events.
- <https://developer.paddle.com/build/subscriptions/provision-access-webhooks/>
- <https://docs.lemonsqueezy.com/help/webhooks>
### Keygen
Consider Keygen in addition to a billing provider when per-device activation,
offline signed licenses, machine limits, or license-policy administration
becomes a product requirement.
- <https://keygen.sh/docs/api/entitlements/>
## Required follow-up decisions
Before implementation, produce a jurisdiction-specific commerce review and
lock these product choices:
- Merchant of record versus Echoion-operated merchant account.
- Monthly, annual, perpetual, trial, and grace-period behavior.
- Device limits, device replacement, account sharing, and offline operation.
- Refund, dispute, chargeback, failed-payment, cancellation, and revocation
timing.
- Availability when billing, entitlement, or gateway dependencies are down.
- Minimal personal data, retention, account deletion, audit history, and
customer-support access.
Webhook handlers must verify provider signatures, persist provider event IDs,
be idempotent, tolerate reordering, and derive access from stored entitlement
state rather than trusting a single webhook delivery.
## Limits
Echoion is public source. A download paywall can control official signed
binaries, automated updates, and paid support, but cannot prevent someone from
building and running the public source. Stronger enforcement would require
moving real product value into private components or a hosted service and is
outside this decision.
-119
View File
@@ -1,119 +0,0 @@
# Independent component releases
Echoion product releases and component releases are deliberately separate.
A component release never edits `components.lock.json`, creates an Echoion
product tag, or starts the Echoion product workflow. The lock is updated only
while preparing a later full Echoion release.
## Published objects
Every runtime component publishes the same verified package to two places:
1. A release in the component's own Gitea repository. This is the provenance
and maintainer-facing release after that repository becomes private.
2. An immutable public distribution key. The default deployment uses the
public `Void` organization Generic Package Registry:
```text
https://git.faumaray.ru/api/packages/Void/generic/<ComponentId>/<version>/<artifact>
```
Gitea packages belong to the organization rather than a repository, so they
remain anonymously downloadable while component repositories and their
native releases are private.
The signed public feed refers only to the distribution URL. It never contains
Gitea credentials, storage credentials, presigned URLs, or private clone URLs.
Private Gitea repositories do not have independently public release units, so
public delivery remains a separate distribution concern.
The organization registry is the no-infrastructure public backend. A future
paid distribution gateway should use a separate permanent origin from its
first published version; immutable feed documents must not have their URLs
rewritten after signing.
## Release transaction
The workflow on a signed `vX.Y.Z` tag publishes stable releases. A prerelease
tag publishes beta. A scheduled run publishes a nightly only when that
component's source SHA differs from its last nightly state.
The shared release tool performs this idempotent transaction:
1. Verify the component tag and derive the required version from the prior
stable feed state and canonical ABI contract.
2. Check out exact dependency revisions from the product dependency snapshot.
3. Configure the component with its own `ECHOION_COMPONENT_VERSION`, build,
test, install, and package it deterministically.
4. Upload with an object-store create precondition and download-verify the
result. An existing object is accepted only when its bytes match.
5. Create or reconcile the component's native Gitea release.
6. Merge that component into the signed channel feed and push one signed
`release-feed` commit.
Gitea 1.25 does not enforce the GitHub Actions `concurrency` and `permissions`
keys. All component release jobs therefore target the dedicated
`echoion-release-serial` runner label. That label must have capacity one.
The feed push is still a compare-and-swap through Git's fast-forward rule, so a
misconfigured second runner fails instead of losing another publication.
## Required configuration
Set `ECHOION_RELEASE_TOOLS_REF` to the full 40-character Echoion commit that
contains the approved release tools. Workflows verify the checkout against the
exact value.
The following Gitea Actions variables are required:
- `ECHOION_RELEASE_TOOLS_REF`
- `ECHOION_DISTRIBUTION_BACKEND`, currently `gitea-generic`
- `ECHOION_DISTRIBUTION_BASE_URL`
- `ECHOION_FEED_BASE_URL`
- `ECHOION_FEED_SIGNING_KEY_ID`
- `COMPONENT_OBJECT_STORAGE_BUCKET` only for the optional `s3` backend
- `COMPONENT_OBJECT_STORAGE_ENDPOINT` when using a non-AWS S3 service
- `COMPONENT_OBJECT_STORAGE_PREFIX`, normally `components`, for S3
- `COMPONENT_OBJECT_STORAGE_REGION` for S3
The following secrets are required once at the `Void` organization level and
are inherited by every component release workflow:
- `RELEASE_CHECKOUT_SSH_KEY` (single-line base64 of an OpenSSH private key with
read access to every private component and dependency repository, plus write
access to Echoion's protected `release-feed` branch)
- `RELEASE_TAG_ALLOWED_SIGNERS`
- `RELEASE_BOT_TOKEN`
- `RELEASE_FEED_ED25519_PRIVATE_KEY` (single-line base64 of the PEM private key)
- `RELEASE_FEED_GIT_SIGNING_KEY` (single-line base64 of the OpenSSH private key)
- `COMPONENT_OBJECT_STORAGE_ACCESS_KEY` only for S3
- `COMPONENT_OBJECT_STORAGE_SECRET_KEY` only for S3
Create single-line private-key values with `base64 -w0`. Raw multiline private
keys are deliberately rejected because some runner versions expose multiline
environment values in job diagnostics.
The Echoion product repository needs only
`RELEASE_FEED_ED25519_PUBLIC_KEY` for feed verification. It must not receive
the component-feed private key.
Use a release-bot PAT limited to repository release and feed publication
operations. Do not share a personal administrator token. Protect `v*` tags and
the Echoion `release-feed` branch, and permit only the release identity to
publish them.
## Manifest schema 3
Independent packages use manifest schema 3. The manifest carries the component
version, product compatibility range, source/tree/ABI identities, exact build
dependency provenance, platform/toolchain contract, activation policy, private
libraries, and file hashes. It does not claim the current Echoion product
version.
The channel catalog is a merge of independently published components. Its
sequence is global and monotonic; each component state also maintains
monotonic per-channel history. Immutable release documents are never replaced
with different artifact or source identities.
Before creating a full Echoion tag, update `components.lock.json` intentionally.
The product workflow verifies every locked component against its signed
immutable feed document before it builds or publishes the product.
View File
Whitespace-only changes.
+143
View File
@@ -0,0 +1,143 @@
{
"document": {
"channel": "stable",
"components": [
{
"activation": "restart-required",
"artifactSha256": "90b803ec157b165563921777c30b1bf8ba3682234386a91a34180add436fb549",
"componentId": "EchoionApi",
"componentVersion": "2.0.1",
"dependencies": {},
"kind": "sdk",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-api/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785629043426
},
{
"activation": "reloadable",
"artifactSha256": "1c73541f321949015a00b3d0f95950307ae250dd321a1bef130feb9c778faf2f",
"componentId": "EchoionCore",
"componentVersion": "2.0.1",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0",
"EchoionWeb": ">=2.0.0 <3.0.0"
},
"kind": "runtime-module",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-core/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785629330370
},
{
"activation": "local-restart",
"artifactSha256": "0309c4d582ad73047764e3d2e36d50d28a6ebbe1b593d9555d21c4fbbcce124e",
"componentId": "EchoionDesktop",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"kind": "desktop",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-desktop/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785601709367
},
{
"activation": "restart-required",
"artifactSha256": "bc31fbad6d3fad7d97bc4b34efa3a40ed47be1307d4d53499a21ce6a800df5b4",
"componentId": "EchoionHost",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"kind": "runtime-module",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-host/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785600666102
},
{
"activation": "reloadable",
"artifactSha256": "8f5f0260c1f4aef2168f484ca26a46bfbab427d119ff72708db4f9d276feb8f6",
"componentId": "EchoionPluginUrlShortenerExternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"kind": "plugin",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/plugins/url-shortener-external/latest.json",
"pluginId": "url-shortener-external",
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785603012932
},
{
"activation": "reloadable",
"artifactSha256": "7270d701882cff77f17259aa0fd614704809a9163d5875c4b27230e72898fb43",
"componentId": "EchoionPluginUrlShortenerInternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"kind": "plugin",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/plugins/url-shortener-internal/latest.json",
"pluginId": "url-shortener-internal",
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785602676757
},
{
"activation": "restart-required",
"artifactSha256": "ba4790e70e529518f0614c89d68cb50603e637fc0188320994eb6ab277a2e847",
"componentId": "EchoionStandalone",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0"
},
"kind": "executable",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-standalone/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785602050791
},
{
"activation": "restart-required",
"artifactSha256": "43ca108a2cac30c111d67eff3c52b0c4245bcb3fe9964daec5bb875d37d9f00b",
"componentId": "EchoionUpdater",
"componentVersion": "2.0.0",
"dependencies": {},
"kind": "executable",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-updater/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785601373042
},
{
"activation": "restart-required",
"artifactSha256": "3e7698709d32851081361c1007dda84908c04b9bdbcb19642c8b90d053227f6f",
"componentId": "EchoionWeb",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"kind": "runtime-module",
"latestUrl": "https://git.faumaray.ru/Void/Echoion/raw/branch/release-feed/feeds/stable/echoion-web/latest.json",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"sequence": 1785600992068
}
],
"document": "echoion-component-catalog",
"expiresAt": "2026-09-16T00:27:04Z",
"generatedAt": "2026-08-02T00:27:04Z",
"schemaVersion": 3,
"sequence": 1785629330370
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "Y8OEVLnsSBPsFfXaeoayl1R-kV0bEb7UYnaOxPkotSp-K4J-28RRvkK0wvgslIzdG723oc3N8_69F7muIDNiCw",
"signedPayload": "eyJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50cyI6W3siYWN0aXZhdGlvbiI6InJlc3RhcnQtcmVxdWlyZWQiLCJhcnRpZmFjdFNoYTI1NiI6IjkwYjgwM2VjMTU3YjE2NTU2MzkyMTc3N2MzMGIxYmY4YmEzNjgyMjM0Mzg2YTkxYTM0MTgwYWRkNDM2ZmI1NDkiLCJjb21wb25lbnRJZCI6IkVjaG9pb25BcGkiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjEiLCJkZXBlbmRlbmNpZXMiOnt9LCJraW5kIjoic2RrIiwibGF0ZXN0VXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvVm9pZC9FY2hvaW9uL3Jhdy9icmFuY2gvcmVsZWFzZS1mZWVkL2ZlZWRzL3N0YWJsZS9lY2hvaW9uLWFwaS9sYXRlc3QuanNvbiIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2VxdWVuY2UiOjE3ODU2MjkwNDM0MjZ9LHsiYWN0aXZhdGlvbiI6InJlbG9hZGFibGUiLCJhcnRpZmFjdFNoYTI1NiI6IjFjNzM1NDFmMzIxOTQ5MDE1YTAwYjNkMGY5NTk1MDMwN2FlMjUwZGQzMjFhMWJlZjEzMGZlYjljNzc4ZmFmMmYiLCJjb21wb25lbnRJZCI6IkVjaG9pb25Db3JlIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4xIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uV2ViIjoiPj0yLjAuMCA8My4wLjAifSwia2luZCI6InJ1bnRpbWUtbW9kdWxlIiwibGF0ZXN0VXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvVm9pZC9FY2hvaW9uL3Jhdy9icmFuY2gvcmVsZWFzZS1mZWVkL2ZlZWRzL3N0YWJsZS9lY2hvaW9uLWNvcmUvbGF0ZXN0Lmpzb24iLCJwbHVnaW5JZCI6bnVsbCwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNlcXVlbmNlIjoxNzg1NjI5MzMwMzcwfSx7ImFjdGl2YXRpb24iOiJsb2NhbC1yZXN0YXJ0IiwiYXJ0aWZhY3RTaGEyNTYiOiIwMzA5YzRkNTgyYWQ3MzA0Nzc2NGUzZDJlMzZkNTBkMjhhNmViYmUxYjU5M2Q5NTU1ZDIxYzRmYmJjY2UxMjRlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uRGVza3RvcCIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsImRlcGVuZGVuY2llcyI6eyJFY2hvaW9uQXBpIjoiPj0yLjAuMCA8My4wLjAifSwia2luZCI6ImRlc2t0b3AiLCJsYXRlc3RVcmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9Wb2lkL0VjaG9pb24vcmF3L2JyYW5jaC9yZWxlYXNlLWZlZWQvZmVlZHMvc3RhYmxlL2VjaG9pb24tZGVza3RvcC9sYXRlc3QuanNvbiIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2VxdWVuY2UiOjE3ODU2MDE3MDkzNjd9LHsiYWN0aXZhdGlvbiI6InJlc3RhcnQtcmVxdWlyZWQiLCJhcnRpZmFjdFNoYTI1NiI6ImJjMzFmYmFkNmQzZmFkN2Q5N2JjNGIzNGVmYTNhNDBlZDQ3YmUxMzA3ZDRkNTM0OTlhMjFjZTZhODAwZGY1YjQiLCJjb21wb25lbnRJZCI6IkVjaG9pb25Ib3N0IiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCJ9LCJraW5kIjoicnVudGltZS1tb2R1bGUiLCJsYXRlc3RVcmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9Wb2lkL0VjaG9pb24vcmF3L2JyYW5jaC9yZWxlYXNlLWZlZWQvZmVlZHMvc3RhYmxlL2VjaG9pb24taG9zdC9sYXRlc3QuanNvbiIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2VxdWVuY2UiOjE3ODU2MDA2NjYxMDJ9LHsiYWN0aXZhdGlvbiI6InJlbG9hZGFibGUiLCJhcnRpZmFjdFNoYTI1NiI6IjhmNWYwMjYwYzFmNGFlZjIxNjhmNDg0Y2EyNmE0NmJmYmFiNDI3ZDExOWZmNzI3MDhkYjRmOWQyNzZmZWI4ZjYiLCJjb21wb25lbnRJZCI6IkVjaG9pb25QbHVnaW5VcmxTaG9ydGVuZXJFeHRlcm5hbCIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsImRlcGVuZGVuY2llcyI6eyJFY2hvaW9uQXBpIjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uQ29yZSI6Ij49Mi4wLjAgPDMuMC4wIn0sImtpbmQiOiJwbHVnaW4iLCJsYXRlc3RVcmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9Wb2lkL0VjaG9pb24vcmF3L2JyYW5jaC9yZWxlYXNlLWZlZWQvZmVlZHMvc3RhYmxlL3BsdWdpbnMvdXJsLXNob3J0ZW5lci1leHRlcm5hbC9sYXRlc3QuanNvbiIsInBsdWdpbklkIjoidXJsLXNob3J0ZW5lci1leHRlcm5hbCIsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzZXF1ZW5jZSI6MTc4NTYwMzAxMjkzMn0seyJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFydGlmYWN0U2hhMjU2IjoiNzI3MGQ3MDE4ODJjZmY3N2YxNzI1OWFhMGZkNjE0NzA0ODA5YTkxNjNkNTg3NWM0YjI3MjMwZTcyODk4ZmI0MyIsImNvbXBvbmVudElkIjoiRWNob2lvblBsdWdpblVybFNob3J0ZW5lckludGVybmFsIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Db3JlIjoiPj0yLjAuMCA8My4wLjAifSwia2luZCI6InBsdWdpbiIsImxhdGVzdFVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L1ZvaWQvRWNob2lvbi9yYXcvYnJhbmNoL3JlbGVhc2UtZmVlZC9mZWVkcy9zdGFibGUvcGx1Z2lucy91cmwtc2hvcnRlbmVyLWludGVybmFsL2xhdGVzdC5qc29uIiwicGx1Z2luSWQiOiJ1cmwtc2hvcnRlbmVyLWludGVybmFsIiwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNlcXVlbmNlIjoxNzg1NjAyNjc2NzU3fSx7ImFjdGl2YXRpb24iOiJyZXN0YXJ0LXJlcXVpcmVkIiwiYXJ0aWZhY3RTaGEyNTYiOiJiYTQ3OTBlNzBlNTI5NTE4ZjA2MTRjODlkNjhjYjUwNjAzZTYzN2ZjMDE4ODMyMDk5NGViNmFiMjc3YTJlODQ3IiwiY29tcG9uZW50SWQiOiJFY2hvaW9uU3RhbmRhbG9uZSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsImRlcGVuZGVuY2llcyI6eyJFY2hvaW9uQXBpIjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uSG9zdCI6Ij49Mi4wLjAgPDMuMC4wIn0sImtpbmQiOiJleGVjdXRhYmxlIiwibGF0ZXN0VXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvVm9pZC9FY2hvaW9uL3Jhdy9icmFuY2gvcmVsZWFzZS1mZWVkL2ZlZWRzL3N0YWJsZS9lY2hvaW9uLXN0YW5kYWxvbmUvbGF0ZXN0Lmpzb24iLCJwbHVnaW5JZCI6bnVsbCwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNlcXVlbmNlIjoxNzg1NjAyMDUwNzkxfSx7ImFjdGl2YXRpb24iOiJyZXN0YXJ0LXJlcXVpcmVkIiwiYXJ0aWZhY3RTaGEyNTYiOiI0M2NhMTA4YTJjYWMzMGMxMTFkNjdlZmYzYzUyYjBjNDI0NWJjYjNmZTk5NjRkYWVjNWJiODc1ZDM3ZDlmMDBiIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uVXBkYXRlciIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsImRlcGVuZGVuY2llcyI6e30sImtpbmQiOiJleGVjdXRhYmxlIiwibGF0ZXN0VXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvVm9pZC9FY2hvaW9uL3Jhdy9icmFuY2gvcmVsZWFzZS1mZWVkL2ZlZWRzL3N0YWJsZS9lY2hvaW9uLXVwZGF0ZXIvbGF0ZXN0Lmpzb24iLCJwbHVnaW5JZCI6bnVsbCwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNlcXVlbmNlIjoxNzg1NjAxMzczMDQyfSx7ImFjdGl2YXRpb24iOiJyZXN0YXJLine truncated
}
+38
View File
@@ -0,0 +1,38 @@
{
"document": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "cf7cf0ad0f9a3bde45ed03d961521e01b687a22d9ee9bc22577b129d2a77aa78",
"name": "echoion-api-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "d8ef06e7dc91ef02a15682fdf9f8b4ed5693088b4980be1424c5a9ff317cef79",
"size": 14334979,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionApi/2.0.0/echoion-api-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-api-2.0.0-linux-x86_64",
"buildDependencies": {},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionApi",
"componentVersion": "2.0.0",
"dependencies": {},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:10:58Z",
"generatedAt": "2026-08-01T16:10:58Z",
"kind": "sdk",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785600365608,
"sourceSha": "847308c16071d579bf75d60a66f45cad385da8dc",
"sourceTreeHash": "git-sha1:cc2d424525291f8d3824444cc256d90099854e4d",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "WGfljWnQ2VDsDwmBsiCr3iKCTc1_l4VGhS5ZEEymTWzAD16wXKcC_dOg1K58EXHukmAnosYf5KFrnLjl6pKRCw",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiY2Y3Y2YwYWQwZjlhM2JkZTQ1ZWQwM2Q5NjE1MjFlMDFiNjg3YTIyZDllZTliYzIyNTc3YjEyOWQyYTc3YWE3OCIsIm5hbWUiOiJlY2hvaW9uLWFwaS0yLjAuMC1saW51eC14ODZfNjQudGFyLnpzdCIsInBhY2thZ2VUeXBlIjoidGFyLnpzdCIsInNoYTI1NiI6ImQ4ZWYwNmU3ZGM5MWVmMDJhMTU2ODJmZGY5ZjhiNGVkNTY5MzA4OGI0OTgwYmUxNDI0YzVhOWZmMzE3Y2VmNzkiLCJzaXplIjoxNDMzNDk3OSwidXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvYXBpL3BhY2thZ2VzL1ZvaWQvZ2VuZXJpYy9FY2hvaW9uQXBpLzIuMC4wL2VjaG9pb24tYXBpLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWFwaS0yLjAuMC1saW51eC14ODZfNjQiLCJidWlsZERlcGVuZGVuY2llcyI6e30sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkFwaSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsImRlcGVuZGVuY2llcyI6e30sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTVUMTY6MTA6NThaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAxVDE2OjEwOjU4WiIsImtpbmQiOiJzZGsiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMDM2NTYwOCwic291cmNlU2hhIjoiODQ3MzA4YzE2MDcxZDU3OWJmNzVkNjBhNjZmNDVjYWQzODVkYThkYyIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6Y2MyZDQyNDUyNTI5MWY4ZDM4MjQ0NDRjYzI1NmQ5MDA5OTg1NGU0ZCIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+38
View File
@@ -0,0 +1,38 @@
{
"document": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "a10b39ef414493c523682072838b12e42bb904c3fc2c695e1d562fb008229348",
"name": "echoion-api-2.0.1-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "90b803ec157b165563921777c30b1bf8ba3682234386a91a34180add436fb549",
"size": 14287422,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionApi/2.0.1/echoion-api-2.0.1-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-api-2.0.1-linux-x86_64",
"buildDependencies": {},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionApi",
"componentVersion": "2.0.1",
"dependencies": {},
"document": "echoion-component-release",
"expiresAt": "2026-09-16T00:08:43Z",
"generatedAt": "2026-08-02T00:08:43Z",
"kind": "sdk",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785629043426,
"sourceSha": "e2503244b36281ccd7da7349727197c77dcbeb38",
"sourceTreeHash": "git-sha1:c674c0bcf291600d413f1ecdce6de75cb7c7fdac",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "P9IpguiICYrTmRgB67Klp6KEUDfRMWHDAbtjG1m7QH4b8gU6UjyFnwKvuOtQZUQ162xLKGWLBi5a1X15QtaKBA",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiYTEwYjM5ZWY0MTQ0OTNjNTIzNjgyMDcyODM4YjEyZTQyYmI5MDRjM2ZjMmM2OTVlMWQ1NjJmYjAwODIyOTM0OCIsIm5hbWUiOiJlY2hvaW9uLWFwaS0yLjAuMS1saW51eC14ODZfNjQudGFyLnpzdCIsInBhY2thZ2VUeXBlIjoidGFyLnpzdCIsInNoYTI1NiI6IjkwYjgwM2VjMTU3YjE2NTU2MzkyMTc3N2MzMGIxYmY4YmEzNjgyMjM0Mzg2YTkxYTM0MTgwYWRkNDM2ZmI1NDkiLCJzaXplIjoxNDI4NzQyMiwidXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvYXBpL3BhY2thZ2VzL1ZvaWQvZ2VuZXJpYy9FY2hvaW9uQXBpLzIuMC4xL2VjaG9pb24tYXBpLTIuMC4xLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWFwaS0yLjAuMS1saW51eC14ODZfNjQiLCJidWlsZERlcGVuZGVuY2llcyI6e30sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkFwaSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMSIsImRlcGVuZGVuY2llcyI6e30sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTZUMDA6MDg6NDNaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAyVDAwOjA4OjQzWiIsImtpbmQiOiJzZGsiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYyOTA0MzQyNiwic291cmNlU2hhIjoiZTI1MDMyNDRiMzYyODFjY2Q3ZGE3MzQ5NzI3MTk3Yzc3ZGNiZWIzOCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6YzY3NGMwYmNmMjkxNjAwZDQxM2YxZWNkY2U2ZGU3NWNiN2M3ZmRhYyIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+38
View File
@@ -0,0 +1,38 @@
{
"document": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "a10b39ef414493c523682072838b12e42bb904c3fc2c695e1d562fb008229348",
"name": "echoion-api-2.0.1-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "90b803ec157b165563921777c30b1bf8ba3682234386a91a34180add436fb549",
"size": 14287422,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionApi/2.0.1/echoion-api-2.0.1-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-api-2.0.1-linux-x86_64",
"buildDependencies": {},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionApi",
"componentVersion": "2.0.1",
"dependencies": {},
"document": "echoion-component-release",
"expiresAt": "2026-09-16T00:08:43Z",
"generatedAt": "2026-08-02T00:08:43Z",
"kind": "sdk",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785629043426,
"sourceSha": "e2503244b36281ccd7da7349727197c77dcbeb38",
"sourceTreeHash": "git-sha1:c674c0bcf291600d413f1ecdce6de75cb7c7fdac",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "P9IpguiICYrTmRgB67Klp6KEUDfRMWHDAbtjG1m7QH4b8gU6UjyFnwKvuOtQZUQ162xLKGWLBi5a1X15QtaKBA",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiYTEwYjM5ZWY0MTQ0OTNjNTIzNjgyMDcyODM4YjEyZTQyYmI5MDRjM2ZjMmM2OTVlMWQ1NjJmYjAwODIyOTM0OCIsIm5hbWUiOiJlY2hvaW9uLWFwaS0yLjAuMS1saW51eC14ODZfNjQudGFyLnpzdCIsInBhY2thZ2VUeXBlIjoidGFyLnpzdCIsInNoYTI1NiI6IjkwYjgwM2VjMTU3YjE2NTU2MzkyMTc3N2MzMGIxYmY4YmEzNjgyMjM0Mzg2YTkxYTM0MTgwYWRkNDM2ZmI1NDkiLCJzaXplIjoxNDI4NzQyMiwidXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvYXBpL3BhY2thZ2VzL1ZvaWQvZ2VuZXJpYy9FY2hvaW9uQXBpLzIuMC4xL2VjaG9pb24tYXBpLTIuMC4xLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWFwaS0yLjAuMS1saW51eC14ODZfNjQiLCJidWlsZERlcGVuZGVuY2llcyI6e30sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkFwaSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMSIsImRlcGVuZGVuY2llcyI6e30sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTZUMDA6MDg6NDNaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAyVDAwOjA4OjQzWiIsImtpbmQiOiJzZGsiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYyOTA0MzQyNiwic291cmNlU2hhIjoiZTI1MDMyNDRiMzYyODFjY2Q3ZGE3MzQ5NzI3MTk3Yzc3ZGNiZWIzOCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6YzY3NGMwYmNmMjkxNjAwZDQxM2YxZWNkY2U2ZGU3NWNiN2M3ZmRhYyIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+58
View File
@@ -0,0 +1,58 @@
{
"document": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "ad9607e71c62d8603ab2cc474e50b90e7370d74672907b896afb404f0c0a1d28",
"name": "echoion-core-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "bc2a08bee0150389516779cf48c6a21449e15d1ec35066735e3f50d04298c218",
"size": 42655618,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionCore/2.0.0/echoion-core-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-core-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionHost": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"componentVersion": "2.0.0",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125"
},
"EchoionWeb": {
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"componentVersion": "2.0.0",
"revision": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionCore",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0",
"EchoionWeb": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T17:03:09Z",
"generatedAt": "2026-08-01T17:03:09Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785603651372,
"sourceSha": "c2ec314eb9cc3b06f7dae7c01cd85be8a22bbfc5",
"sourceTreeHash": "git-sha1:7887ff0ee0be9a8b4f074eae025e758d0b318adf",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "6TzIEBX8Y1UjwxGBLHpQiyn8mBmWYeVcR5Occvh5MWKv4YxGgnozLQzTqxsHYmypaY3FoFwXL6aisYPP30RDBg",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjljYjY2OGUyYTUwMmRjZmUwMmQxNDVlZDYzNjM1ZDYzNjE5NzMyZDc3ZmY1NzQ5Njg1ODM0MzgyNzA1ZThkMjEiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiYWQ5NjA3ZTcxYzYyZDg2MDNhYjJjYzQ3NGU1MGI5MGU3MzcwZDc0NjcyOTA3Yjg5NmFmYjQwNGYwYzBhMWQyOCIsIm5hbWUiOiJlY2hvaW9uLWNvcmUtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiJiYzJhMDhiZWUwMTUwMzg5NTE2Nzc5Y2Y0OGM2YTIxNDQ5ZTE1ZDFlYzM1MDY2NzM1ZTNmNTBkMDQyOThjMjE4Iiwic2l6ZSI6NDI2NTU2MTgsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkNvcmUvMi4wLjAvZWNob2lvbi1jb3JlLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWNvcmUtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifSwiRWNob2lvbkhvc3QiOnsiYWJpSGFzaCI6InNoYTI1Njo4NDUxNzUzNmRiMjk4NTFjYzc4ZWViMDllOGJmM2FhZTcxYTgyZDQyNzcyZmUxZjJhYmQ0ZWRiZjE4M2YyMGZjIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1In0sIkVjaG9pb25XZWIiOnsiYWJpSGFzaCI6InNoYTI1NjplMWY4MjZkZGIwNmNhYWRjMzk0YWY3YTNkYjI3YWYzMjc4OWE3ZTU4MGNkZTZlZTUxNmVkZDBlYmRhMmE1YzlmIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI0MWViZDU5ODhlNGYyMDUyNTY1OWM0YjY0YTBkMWM5YWRiNGI3NTg0In19LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25Db3JlIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uV2ViIjoiPj0yLjAuMCA8My4wLjAifSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNVQxNzowMzowOVoiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDFUMTc6MDM6MDlaIiwia2luZCI6InJ1bnRpbWUtbW9kdWxlIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2NoZW1hVmVyc2lvbiI6Mywic2VxdWVuY2UiOjE3ODU2MDM2NTEzNzIsInNvdXJjZVNoYSI6ImMyZWMzMTRlYjljYzNiMDZmN2RhZTdjMDFjZDg1YmU4YTIyYmJmYzUiLCJzb3VyY2VUcmVlSGFzaCI6ImdpdC1zaGExOjc4ODdmZjBlZTBiZTlhOGI0ZjA3NGVhZTAyNWU3NThkMGIzMThhZGYiLCJ0b29sY2hhaW5Db250cmFjdCI6ImxpbnV4LXg4Nl82NC1nbGliYy0yLjM1LWN4eDI2In0K"
}
+58
View File
@@ -0,0 +1,58 @@
{
"document": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "4f32f9c3ebc67270594945a4b5c2666c5d14036ddf533dc98e2f2ba0de57b07d",
"name": "echoion-core-2.0.1-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "1c73541f321949015a00b3d0f95950307ae250dd321a1bef130feb9c778faf2f",
"size": 43783699,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionCore/2.0.1/echoion-core-2.0.1-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-core-2.0.1-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.1",
"revision": "e2503244b36281ccd7da7349727197c77dcbeb38"
},
"EchoionHost": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"componentVersion": "2.0.0",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125"
},
"EchoionWeb": {
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"componentVersion": "2.0.0",
"revision": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionCore",
"componentVersion": "2.0.1",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0",
"EchoionWeb": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-16T00:27:04Z",
"generatedAt": "2026-08-02T00:27:04Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785629330370,
"sourceSha": "a6555d4c698d796bf1f8efcd4af1653d7240b043",
"sourceTreeHash": "git-sha1:ad16aea45f04e28c2f531121bdc472a37f831a53",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "JVN3G1ZAEZ1v0ZMbJRcqKR5Z3q6w_Zhnfz0cWc739JJL_gXEZsEVrYhLIVhcfzObAPHTaGYtcunMYYpOzclDCQ",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjljYjY2OGUyYTUwMmRjZmUwMmQxNDVlZDYzNjM1ZDYzNjE5NzMyZDc3ZmY1NzQ5Njg1ODM0MzgyNzA1ZThkMjEiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNGYzMmY5YzNlYmM2NzI3MDU5NDk0NWE0YjVjMjY2NmM1ZDE0MDM2ZGRmNTMzZGM5OGUyZjJiYTBkZTU3YjA3ZCIsIm5hbWUiOiJlY2hvaW9uLWNvcmUtMi4wLjEtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiIxYzczNTQxZjMyMTk0OTAxNWEwMGIzZDBmOTU5NTAzMDdhZTI1MGRkMzIxYTFiZWYxMzBmZWI5Yzc3OGZhZjJmIiwic2l6ZSI6NDM3ODM2OTksInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkNvcmUvMi4wLjEvZWNob2lvbi1jb3JlLTIuMC4xLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWNvcmUtMi4wLjEtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjEiLCJyZXZpc2lvbiI6ImUyNTAzMjQ0YjM2MjgxY2NkN2RhNzM0OTcyNzE5N2M3N2RjYmViMzgifSwiRWNob2lvbkhvc3QiOnsiYWJpSGFzaCI6InNoYTI1Njo4NDUxNzUzNmRiMjk4NTFjYzc4ZWViMDllOGJmM2FhZTcxYTgyZDQyNzcyZmUxZjJhYmQ0ZWRiZjE4M2YyMGZjIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1In0sIkVjaG9pb25XZWIiOnsiYWJpSGFzaCI6InNoYTI1NjplMWY4MjZkZGIwNmNhYWRjMzk0YWY3YTNkYjI3YWYzMjc4OWE3ZTU4MGNkZTZlZTUxNmVkZDBlYmRhMmE1YzlmIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI0MWViZDU5ODhlNGYyMDUyNTY1OWM0YjY0YTBkMWM5YWRiNGI3NTg0In19LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25Db3JlIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4xIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uV2ViIjoiPj0yLjAuMCA8My4wLjAifSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNlQwMDoyNzowNFoiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDJUMDA6Mjc6MDRaIiwia2luZCI6InJ1bnRpbWUtbW9kdWxlIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2NoZW1hVmVyc2lvbiI6Mywic2VxdWVuY2UiOjE3ODU2MjkzMzAzNzAsInNvdXJjZVNoYSI6ImE2NTU1ZDRjNjk4ZDc5NmJmMWY4ZWZjZDRhZjE2NTNkNzI0MGIwNDMiLCJzb3VyY2VUcmVlSGFzaCI6ImdpdC1zaGExOmFkMTZhZWE0NWYwNGUyOGMyZjUzMTEyMWJkYzQ3MmEzN2Y4MzFhNTMiLCJ0b29sY2hhaW5Db250cmFjdCI6ImxpbnV4LXg4Nl82NC1nbGliYy0yLjM1LWN4eDI2In0K"
}
+58
View File
@@ -0,0 +1,58 @@
{
"document": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "4f32f9c3ebc67270594945a4b5c2666c5d14036ddf533dc98e2f2ba0de57b07d",
"name": "echoion-core-2.0.1-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "1c73541f321949015a00b3d0f95950307ae250dd321a1bef130feb9c778faf2f",
"size": 43783699,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionCore/2.0.1/echoion-core-2.0.1-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-core-2.0.1-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.1",
"revision": "e2503244b36281ccd7da7349727197c77dcbeb38"
},
"EchoionHost": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"componentVersion": "2.0.0",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125"
},
"EchoionWeb": {
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"componentVersion": "2.0.0",
"revision": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionCore",
"componentVersion": "2.0.1",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0",
"EchoionWeb": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-16T00:27:04Z",
"generatedAt": "2026-08-02T00:27:04Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785629330370,
"sourceSha": "a6555d4c698d796bf1f8efcd4af1653d7240b043",
"sourceTreeHash": "git-sha1:ad16aea45f04e28c2f531121bdc472a37f831a53",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "JVN3G1ZAEZ1v0ZMbJRcqKR5Z3q6w_Zhnfz0cWc739JJL_gXEZsEVrYhLIVhcfzObAPHTaGYtcunMYYpOzclDCQ",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjljYjY2OGUyYTUwMmRjZmUwMmQxNDVlZDYzNjM1ZDYzNjE5NzMyZDc3ZmY1NzQ5Njg1ODM0MzgyNzA1ZThkMjEiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNGYzMmY5YzNlYmM2NzI3MDU5NDk0NWE0YjVjMjY2NmM1ZDE0MDM2ZGRmNTMzZGM5OGUyZjJiYTBkZTU3YjA3ZCIsIm5hbWUiOiJlY2hvaW9uLWNvcmUtMi4wLjEtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiIxYzczNTQxZjMyMTk0OTAxNWEwMGIzZDBmOTU5NTAzMDdhZTI1MGRkMzIxYTFiZWYxMzBmZWI5Yzc3OGZhZjJmIiwic2l6ZSI6NDM3ODM2OTksInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkNvcmUvMi4wLjEvZWNob2lvbi1jb3JlLTIuMC4xLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWNvcmUtMi4wLjEtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjEiLCJyZXZpc2lvbiI6ImUyNTAzMjQ0YjM2MjgxY2NkN2RhNzM0OTcyNzE5N2M3N2RjYmViMzgifSwiRWNob2lvbkhvc3QiOnsiYWJpSGFzaCI6InNoYTI1Njo4NDUxNzUzNmRiMjk4NTFjYzc4ZWViMDllOGJmM2FhZTcxYTgyZDQyNzcyZmUxZjJhYmQ0ZWRiZjE4M2YyMGZjIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1In0sIkVjaG9pb25XZWIiOnsiYWJpSGFzaCI6InNoYTI1NjplMWY4MjZkZGIwNmNhYWRjMzk0YWY3YTNkYjI3YWYzMjc4OWE3ZTU4MGNkZTZlZTUxNmVkZDBlYmRhMmE1YzlmIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI0MWViZDU5ODhlNGYyMDUyNTY1OWM0YjY0YTBkMWM5YWRiNGI3NTg0In19LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25Db3JlIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4xIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAiLCJFY2hvaW9uV2ViIjoiPj0yLjAuMCA8My4wLjAifSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNlQwMDoyNzowNFoiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDJUMDA6Mjc6MDRaIiwia2luZCI6InJ1bnRpbWUtbW9kdWxlIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2NoZW1hVmVyc2lvbiI6Mywic2VxdWVuY2UiOjE3ODU2MjkzMzAzNzAsInNvdXJjZVNoYSI6ImE2NTU1ZDRjNjk4ZDc5NmJmMWY4ZWZjZDRhZjE2NTNkNzI0MGIwNDMiLCJzb3VyY2VUcmVlSGFzaCI6ImdpdC1zaGExOmFkMTZhZWE0NWYwNGUyOGMyZjUzMTEyMWJkYzQ3MmEzN2Y4MzFhNTMiLCJ0b29sY2hhaW5Db250cmFjdCI6ImxpbnV4LXg4Nl82NC1nbGliYy0yLjM1LWN4eDI2In0K"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": null,
"activation": "local-restart",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "1e02c4294f619161524b51754d0fee3264f183dfe15cdb069db11f686b35bb9d",
"name": "echoion-desktop-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "0309c4d582ad73047764e3d2e36d50d28a6ebbe1b593d9555d21c4fbbcce124e",
"size": 15712357,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionDesktop/2.0.0/echoion-desktop-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-desktop-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionDesktop",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:34:02Z",
"generatedAt": "2026-08-01T16:34:02Z",
"kind": "desktop",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785601709367,
"sourceSha": "bae23b7abcf8b204b9684af5efb3b75b05b4f851",
"sourceTreeHash": "git-sha1:abaed06e0dda9e20e529d9bfb437fe2643495fdc",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "3ZewwSD1ZN_9Hk-sBOLP2r0_xe-4RkSSLpKCDzP5MO5wOFEAc_oLnrBHxgq0G93DXIEt_6eh5hx3J9ec2GXKCA",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoibG9jYWwtcmVzdGFydCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMWUwMmM0Mjk0ZjYxOTE2MTUyNGI1MTc1NGQwZmVlMzI2NGYxODNkZmUxNWNkYjA2OWRiMTFmNjg2YjM1YmI5ZCIsIm5hbWUiOiJlY2hvaW9uLWRlc2t0b3AtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiIwMzA5YzRkNTgyYWQ3MzA0Nzc2NGUzZDJlMzZkNTBkMjhhNmViYmUxYjU5M2Q5NTU1ZDIxYzRmYmJjY2UxMjRlIiwic2l6ZSI6MTU3MTIzNTcsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkRlc2t0b3AvMi4wLjAvZWNob2lvbi1kZXNrdG9wLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWRlc2t0b3AtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifX0sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkRlc2t0b3AiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIn0sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTVUMTY6MzQ6MDJaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAxVDE2OjM0OjAyWiIsImtpbmQiOiJkZXNrdG9wIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2NoZW1hVmVyc2lvbiI6Mywic2VxdWVuY2UiOjE3ODU2MDE3MDkzNjcsInNvdXJjZVNoYSI6ImJhZTIzYjdhYmNmOGIyMDRiOTY4NGFmNWVmYjNiNzViMDViNGY4NTEiLCJzb3VyY2VUcmVlSGFzaCI6ImdpdC1zaGExOmFiYWVkMDZlMGRkYTllMjBlNTI5ZDliZmI0MzdmZTI2NDM0OTVmZGMiLCJ0b29sY2hhaW5Db250cmFjdCI6ImxpbnV4LXg4Nl82NC1nbGliYy0yLjM1LWN4eDI2In0K"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": null,
"activation": "local-restart",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "1e02c4294f619161524b51754d0fee3264f183dfe15cdb069db11f686b35bb9d",
"name": "echoion-desktop-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "0309c4d582ad73047764e3d2e36d50d28a6ebbe1b593d9555d21c4fbbcce124e",
"size": 15712357,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionDesktop/2.0.0/echoion-desktop-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-desktop-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionDesktop",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:34:02Z",
"generatedAt": "2026-08-01T16:34:02Z",
"kind": "desktop",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785601709367,
"sourceSha": "bae23b7abcf8b204b9684af5efb3b75b05b4f851",
"sourceTreeHash": "git-sha1:abaed06e0dda9e20e529d9bfb437fe2643495fdc",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "3ZewwSD1ZN_9Hk-sBOLP2r0_xe-4RkSSLpKCDzP5MO5wOFEAc_oLnrBHxgq0G93DXIEt_6eh5hx3J9ec2GXKCA",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoibG9jYWwtcmVzdGFydCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMWUwMmM0Mjk0ZjYxOTE2MTUyNGI1MTc1NGQwZmVlMzI2NGYxODNkZmUxNWNkYjA2OWRiMTFmNjg2YjM1YmI5ZCIsIm5hbWUiOiJlY2hvaW9uLWRlc2t0b3AtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiIwMzA5YzRkNTgyYWQ3MzA0Nzc2NGUzZDJlMzZkNTBkMjhhNmViYmUxYjU5M2Q5NTU1ZDIxYzRmYmJjY2UxMjRlIiwic2l6ZSI6MTU3MTIzNTcsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkRlc2t0b3AvMi4wLjAvZWNob2lvbi1kZXNrdG9wLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWRlc2t0b3AtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifX0sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkRlc2t0b3AiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIn0sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTVUMTY6MzQ6MDJaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAxVDE2OjM0OjAyWiIsImtpbmQiOiJkZXNrdG9wIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjpudWxsLCJwcm9kdWN0Q29tcGF0aWJpbGl0eSI6Ij49Mi4wLjAgPDMuMC4wIiwic2NoZW1hVmVyc2lvbiI6Mywic2VxdWVuY2UiOjE3ODU2MDE3MDkzNjcsInNvdXJjZVNoYSI6ImJhZTIzYjdhYmNmOGIyMDRiOTY4NGFmNWVmYjNiNzViMDViNGY4NTEiLCJzb3VyY2VUcmVlSGFzaCI6ImdpdC1zaGExOmFiYWVkMDZlMGRkYTllMjBlNTI5ZDliZmI0MzdmZTI2NDM0OTVmZGMiLCJ0b29sY2hhaW5Db250cmFjdCI6ImxpbnV4LXg4Nl82NC1nbGliYy0yLjM1LWN4eDI2In0K"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "20a6b4d85187eba96de7391109379e5edb6abbefb6644623a57920d29806071e",
"name": "echoion-host-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "bc31fbad6d3fad7d97bc4b34efa3a40ed47be1307d4d53499a21ce6a800df5b4",
"size": 15291189,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionHost/2.0.0/echoion-host-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-host-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionHost",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:16:24Z",
"generatedAt": "2026-08-01T16:16:24Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785600666102,
"sourceSha": "a1d02147966a3c2c5f27f27d97179c22f49c9125",
"sourceTreeHash": "git-sha1:c7f47784ba081ec105694c24c87dfb02b4288f46",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "hyXRaGsKDns7uEJOpavmxEegT5QBYUd-6RQJXyIEg14baEF_eovIlAbzlirIMaOx3r8adqHVJqs1MIzOki7KCw",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2Ojg0NTE3NTM2ZGIyOTg1MWNjNzhlZWIwOWU4YmYzYWFlNzFhODJkNDI3NzJmZTFmMmFiZDRlZGJmMTgzZjIwZmMiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMjBhNmI0ZDg1MTg3ZWJhOTZkZTczOTExMDkzNzllNWVkYjZhYmJlZmI2NjQ0NjIzYTU3OTIwZDI5ODA2MDcxZSIsIm5hbWUiOiJlY2hvaW9uLWhvc3QtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiJiYzMxZmJhZDZkM2ZhZDdkOTdiYzRiMzRlZmEzYTQwZWQ0N2JlMTMwN2Q0ZDUzNDk5YTIxY2U2YTgwMGRmNWI0Iiwic2l6ZSI6MTUyOTExODksInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkhvc3QvMi4wLjAvZWNob2lvbi1ob3N0LTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWhvc3QtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifX0sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkhvc3QiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIn0sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTVUMTY6MTY6MjRaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAxVDE2OjE2OjI0WiIsImtpbmQiOiJydW50aW1lLW1vZHVsZSIsInBsYXRmb3JtIjoibGludXgiLCJwbHVnaW5JZCI6bnVsbCwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNjaGVtYVZlcnNpb24iOjMsInNlcXVlbmNlIjoxNzg1NjAwNjY2MTAyLCJzb3VyY2VTaGEiOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1Iiwic291cmNlVHJlZUhhc2giOiJnaXQtc2hhMTpjN2Y0Nzc4NGJhMDgxZWMxMDU2OTRjMjRjODdkZmIwMmI0Mjg4ZjQ2IiwidG9vbGNoYWluQ29udHJhY3QiOiJsaW51eC14ODZfNjQtZ2xpYmMtMi4zNS1jeHgyNiJ9Cg"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "20a6b4d85187eba96de7391109379e5edb6abbefb6644623a57920d29806071e",
"name": "echoion-host-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "bc31fbad6d3fad7d97bc4b34efa3a40ed47be1307d4d53499a21ce6a800df5b4",
"size": 15291189,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionHost/2.0.0/echoion-host-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-host-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionHost",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:16:24Z",
"generatedAt": "2026-08-01T16:16:24Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785600666102,
"sourceSha": "a1d02147966a3c2c5f27f27d97179c22f49c9125",
"sourceTreeHash": "git-sha1:c7f47784ba081ec105694c24c87dfb02b4288f46",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "hyXRaGsKDns7uEJOpavmxEegT5QBYUd-6RQJXyIEg14baEF_eovIlAbzlirIMaOx3r8adqHVJqs1MIzOki7KCw",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2Ojg0NTE3NTM2ZGIyOTg1MWNjNzhlZWIwOWU4YmYzYWFlNzFhODJkNDI3NzJmZTFmMmFiZDRlZGJmMTgzZjIwZmMiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMjBhNmI0ZDg1MTg3ZWJhOTZkZTczOTExMDkzNzllNWVkYjZhYmJlZmI2NjQ0NjIzYTU3OTIwZDI5ODA2MDcxZSIsIm5hbWUiOiJlY2hvaW9uLWhvc3QtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiJiYzMxZmJhZDZkM2ZhZDdkOTdiYzRiMzRlZmEzYTQwZWQ0N2JlMTMwN2Q0ZDUzNDk5YTIxY2U2YTgwMGRmNWI0Iiwic2l6ZSI6MTUyOTExODksInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvbkhvc3QvMi4wLjAvZWNob2lvbi1ob3N0LTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLWhvc3QtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifX0sImJ1aWxkVHlwZSI6IlJlbFdpdGhEZWJJbmZvIiwiY2hhbm5lbCI6InN0YWJsZSIsImNvbXBvbmVudElkIjoiRWNob2lvbkhvc3QiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIn0sImRvY3VtZW50IjoiZWNob2lvbi1jb21wb25lbnQtcmVsZWFzZSIsImV4cGlyZXNBdCI6IjIwMjYtMDktMTVUMTY6MTY6MjRaIiwiZ2VuZXJhdGVkQXQiOiIyMDI2LTA4LTAxVDE2OjE2OjI0WiIsImtpbmQiOiJydW50aW1lLW1vZHVsZSIsInBsYXRmb3JtIjoibGludXgiLCJwbHVnaW5JZCI6bnVsbCwicHJvZHVjdENvbXBhdGliaWxpdHkiOiI-PTIuMC4wIDwzLjAuMCIsInNjaGVtYVZlcnNpb24iOjMsInNlcXVlbmNlIjoxNzg1NjAwNjY2MTAyLCJzb3VyY2VTaGEiOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1Iiwic291cmNlVHJlZUhhc2giOiJnaXQtc2hhMTpjN2Y0Nzc4NGJhMDgxZWMxMDU2OTRjMjRjODdkZmIwMmI0Mjg4ZjQ2IiwidG9vbGNoYWluQ29udHJhY3QiOiJsaW51eC14ODZfNjQtZ2xpYmMtMi4zNS1jeHgyNiJ9Cg"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": null,
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "bc4815790f2153425394d81b5a5f3d8cdec7d44d1827ec35068ee87c825fa991",
"name": "echoion-standalone-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "ba4790e70e529518f0614c89d68cb50603e637fc0188320994eb6ab277a2e847",
"size": 25864912,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionStandalone/2.0.0/echoion-standalone-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-standalone-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionHost": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"componentVersion": "2.0.0",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionStandalone",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:44:20Z",
"generatedAt": "2026-08-01T16:44:20Z",
"kind": "executable",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785602050791,
"sourceSha": "8f71775ebdc27469a853a4b39a33fd36ed972347",
"sourceTreeHash": "git-sha1:75869bccff9514ccc1177bdeb7fec98cdba9bd8b",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "e7nFFCsdUFNLpt-0spUvMZucJFHta8nlqby0LnMFt6WecMRF7_joZ9kMTNWTKEF8EnnvfJjkcQAYFqupkGHYBw",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiYmM0ODE1NzkwZjIxNTM0MjUzOTRkODFiNWE1ZjNkOGNkZWM3ZDQ0ZDE4MjdlYzM1MDY4ZWU4N2M4MjVmYTk5MSIsIm5hbWUiOiJlY2hvaW9uLXN0YW5kYWxvbmUtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiJiYTQ3OTBlNzBlNTI5NTE4ZjA2MTRjODlkNjhjYjUwNjAzZTYzN2ZjMDE4ODMyMDk5NGViNmFiMjc3YTJlODQ3Iiwic2l6ZSI6MjU4NjQ5MTIsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvblN0YW5kYWxvbmUvMi4wLjAvZWNob2lvbi1zdGFuZGFsb25lLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXN0YW5kYWxvbmUtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifSwiRWNob2lvbkhvc3QiOnsiYWJpSGFzaCI6InNoYTI1Njo4NDUxNzUzNmRiMjk4NTFjYzc4ZWViMDllOGJmM2FhZTcxYTgyZDQyNzcyZmUxZjJhYmQ0ZWRiZjE4M2YyMGZjIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1In19LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25TdGFuZGFsb25lIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAifSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNVQxNjo0NDoyMFoiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDFUMTY6NDQ6MjBaIiwia2luZCI6ImV4ZWN1dGFibGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMjA1MDc5MSwic291cmNlU2hhIjoiOGY3MTc3NWViZGMyNzQ2OWE4NTNhNGIzOWEzM2ZkMzZlZDk3MjM0NyIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6NzU4NjliY2NmZjk1MTRjY2MxMTc3YmRlYjdmZWM5OGNkYmE5YmQ4YiIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": null,
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "bc4815790f2153425394d81b5a5f3d8cdec7d44d1827ec35068ee87c825fa991",
"name": "echoion-standalone-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "ba4790e70e529518f0614c89d68cb50603e637fc0188320994eb6ab277a2e847",
"size": 25864912,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionStandalone/2.0.0/echoion-standalone-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-standalone-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionHost": {
"abiHash": "sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc",
"componentVersion": "2.0.0",
"revision": "a1d02147966a3c2c5f27f27d97179c22f49c9125"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionStandalone",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionHost": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:44:20Z",
"generatedAt": "2026-08-01T16:44:20Z",
"kind": "executable",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785602050791,
"sourceSha": "8f71775ebdc27469a853a4b39a33fd36ed972347",
"sourceTreeHash": "git-sha1:75869bccff9514ccc1177bdeb7fec98cdba9bd8b",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "e7nFFCsdUFNLpt-0spUvMZucJFHta8nlqby0LnMFt6WecMRF7_joZ9kMTNWTKEF8EnnvfJjkcQAYFqupkGHYBw",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiYmM0ODE1NzkwZjIxNTM0MjUzOTRkODFiNWE1ZjNkOGNkZWM3ZDQ0ZDE4MjdlYzM1MDY4ZWU4N2M4MjVmYTk5MSIsIm5hbWUiOiJlY2hvaW9uLXN0YW5kYWxvbmUtMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiJiYTQ3OTBlNzBlNTI5NTE4ZjA2MTRjODlkNjhjYjUwNjAzZTYzN2ZjMDE4ODMyMDk5NGViNmFiMjc3YTJlODQ3Iiwic2l6ZSI6MjU4NjQ5MTIsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvblN0YW5kYWxvbmUvMi4wLjAvZWNob2lvbi1zdGFuZGFsb25lLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXN0YW5kYWxvbmUtMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6eyJhYmlIYXNoIjoic2hhMjU2OmQ1MDI5M2QzNDVhOTdlNTJmOTg0NDA4OGJkZDQyMjc3ZjU2NmJjODE1YTIxYjc2MzZkM2UwNTNmMDZjNmMxMTMiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJyZXZpc2lvbiI6Ijg0NzMwOGMxNjA3MWQ1NzliZjc1ZDYwYTY2ZjQ1Y2FkMzg1ZGE4ZGMifSwiRWNob2lvbkhvc3QiOnsiYWJpSGFzaCI6InNoYTI1Njo4NDUxNzUzNmRiMjk4NTFjYzc4ZWViMDllOGJmM2FhZTcxYTgyZDQyNzcyZmUxZjJhYmQ0ZWRiZjE4M2YyMGZjIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiJhMWQwMjE0Nzk2NmEzYzJjNWYyN2YyN2Q5NzE3OWMyMmY0OWM5MTI1In19LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25TdGFuZGFsb25lIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCIsIkVjaG9pb25Ib3N0IjoiPj0yLjAuMCA8My4wLjAifSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNVQxNjo0NDoyMFoiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDFUMTY6NDQ6MjBaIiwia2luZCI6ImV4ZWN1dGFibGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMjA1MDc5MSwic291cmNlU2hhIjoiOGY3MTc3NWViZGMyNzQ2OWE4NTNhNGIzOWEzM2ZkMzZlZDk3MjM0NyIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6NzU4NjliY2NmZjk1MTRjY2MxMTc3YmRlYjdmZWM5OGNkYmE5YmQ4YiIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+38
View File
@@ -0,0 +1,38 @@
{
"document": {
"abiHash": null,
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "111c386352fe2b3e9fb48bd4677dc221cf4827b614e6d8b00e4865fcd186e7c4",
"name": "echoion-updater-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "43ca108a2cac30c111d67eff3c52b0c4245bcb3fe9964daec5bb875d37d9f00b",
"size": 15715575,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionUpdater/2.0.0/echoion-updater-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-updater-2.0.0-linux-x86_64",
"buildDependencies": {},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionUpdater",
"componentVersion": "2.0.0",
"dependencies": {},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:28:22Z",
"generatedAt": "2026-08-01T16:28:22Z",
"kind": "executable",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785601373042,
"sourceSha": "adfb06467f64428ce99c5c4bb420edb3cf944f57",
"sourceTreeHash": "git-sha1:d26b41913d08746197c905567f76826df6786d79",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "O8gT8kGBgrez88l_SDs2GPfllkZqB07N63TSKDDCZLGsqIkJ_vd5Rc_VfQuAiUFyoe-eS5ZUyA_atfG_znIDAw",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMTExYzM4NjM1MmZlMmIzZTlmYjQ4YmQ0Njc3ZGMyMjFjZjQ4MjdiNjE0ZTZkOGIwMGU0ODY1ZmNkMTg2ZTdjNCIsIm5hbWUiOiJlY2hvaW9uLXVwZGF0ZXItMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiI0M2NhMTA4YTJjYWMzMGMxMTFkNjdlZmYzYzUyYjBjNDI0NWJjYjNmZTk5NjRkYWVjNWJiODc1ZDM3ZDlmMDBiIiwic2l6ZSI6MTU3MTU1NzUsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvblVwZGF0ZXIvMi4wLjAvZWNob2lvbi11cGRhdGVyLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXVwZGF0ZXItMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnt9LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25VcGRhdGVyIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7fSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNVQxNjoyODoyMloiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDFUMTY6Mjg6MjJaIiwia2luZCI6ImV4ZWN1dGFibGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMTM3MzA0Miwic291cmNlU2hhIjoiYWRmYjA2NDY3ZjY0NDI4Y2U5OWM1YzRiYjQyMGVkYjNjZjk0NGY1NyIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6ZDI2YjQxOTEzZDA4NzQ2MTk3YzkwNTU2N2Y3NjgyNmRmNjc4NmQ3OSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+38
View File
@@ -0,0 +1,38 @@
{
"document": {
"abiHash": null,
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "111c386352fe2b3e9fb48bd4677dc221cf4827b614e6d8b00e4865fcd186e7c4",
"name": "echoion-updater-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "43ca108a2cac30c111d67eff3c52b0c4245bcb3fe9964daec5bb875d37d9f00b",
"size": 15715575,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionUpdater/2.0.0/echoion-updater-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-updater-2.0.0-linux-x86_64",
"buildDependencies": {},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionUpdater",
"componentVersion": "2.0.0",
"dependencies": {},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:28:22Z",
"generatedAt": "2026-08-01T16:28:22Z",
"kind": "executable",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785601373042,
"sourceSha": "adfb06467f64428ce99c5c4bb420edb3cf944f57",
"sourceTreeHash": "git-sha1:d26b41913d08746197c905567f76826df6786d79",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "O8gT8kGBgrez88l_SDs2GPfllkZqB07N63TSKDDCZLGsqIkJ_vd5Rc_VfQuAiUFyoe-eS5ZUyA_atfG_znIDAw",
"signedPayload": "eyJhYmlIYXNoIjpudWxsLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiMTExYzM4NjM1MmZlMmIzZTlmYjQ4YmQ0Njc3ZGMyMjFjZjQ4MjdiNjE0ZTZkOGIwMGU0ODY1ZmNkMTg2ZTdjNCIsIm5hbWUiOiJlY2hvaW9uLXVwZGF0ZXItMi4wLjAtbGludXgteDg2XzY0LnRhci56c3QiLCJwYWNrYWdlVHlwZSI6InRhci56c3QiLCJzaGEyNTYiOiI0M2NhMTA4YTJjYWMzMGMxMTFkNjdlZmYzYzUyYjBjNDI0NWJjYjNmZTk5NjRkYWVjNWJiODc1ZDM3ZDlmMDBiIiwic2l6ZSI6MTU3MTU1NzUsInVybCI6Imh0dHBzOi8vZ2l0LmZhdW1hcmF5LnJ1L2FwaS9wYWNrYWdlcy9Wb2lkL2dlbmVyaWMvRWNob2lvblVwZGF0ZXIvMi4wLjAvZWNob2lvbi11cGRhdGVyLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXVwZGF0ZXItMi4wLjAtbGludXgteDg2XzY0IiwiYnVpbGREZXBlbmRlbmNpZXMiOnt9LCJidWlsZFR5cGUiOiJSZWxXaXRoRGViSW5mbyIsImNoYW5uZWwiOiJzdGFibGUiLCJjb21wb25lbnRJZCI6IkVjaG9pb25VcGRhdGVyIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7fSwiZG9jdW1lbnQiOiJlY2hvaW9uLWNvbXBvbmVudC1yZWxlYXNlIiwiZXhwaXJlc0F0IjoiMjAyNi0wOS0xNVQxNjoyODoyMloiLCJnZW5lcmF0ZWRBdCI6IjIwMjYtMDgtMDFUMTY6Mjg6MjJaIiwia2luZCI6ImV4ZWN1dGFibGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMTM3MzA0Miwic291cmNlU2hhIjoiYWRmYjA2NDY3ZjY0NDI4Y2U5OWM1YzRiYjQyMGVkYjNjZjk0NGY1NyIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6ZDI2YjQxOTEzZDA4NzQ2MTk3YzkwNTU2N2Y3NjgyNmRmNjc4NmQ3OSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "498e5430b8278f1dedfc20d079719ba0c9673d479d79179317733530269f5aac",
"name": "echoion-web-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "3e7698709d32851081361c1007dda84908c04b9bdbcb19642c8b90d053227f6f",
"size": 17163169,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionWeb/2.0.0/echoion-web-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-web-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionWeb",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:22:44Z",
"generatedAt": "2026-08-01T16:22:44Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785600992068,
"sourceSha": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584",
"sourceTreeHash": "git-sha1:652423aadc955886cff70d7881853584a3b5b5ea",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "doT2UQyeoB3vMiQbGLJAgNlySN1ltjaXzmadryxxziTU9rQ6p3p3T3eNUHIn_ut4Ui2KD2fZGszDPpssP9faBg",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OmUxZjgyNmRkYjA2Y2FhZGMzOTRhZjdhM2RiMjdhZjMyNzg5YTdlNTgwY2RlNmVlNTE2ZWRkMGViZGEyYTVjOWYiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNDk4ZTU0MzBiODI3OGYxZGVkZmMyMGQwNzk3MTliYTBjOTY3M2Q0NzlkNzkxNzkzMTc3MzM1MzAyNjlmNWFhYyIsIm5hbWUiOiJlY2hvaW9uLXdlYi0yLjAuMC1saW51eC14ODZfNjQudGFyLnpzdCIsInBhY2thZ2VUeXBlIjoidGFyLnpzdCIsInNoYTI1NiI6IjNlNzY5ODcwOWQzMjg1MTA4MTM2MWMxMDA3ZGRhODQ5MDhjMDRiOWJkYmNiMTk2NDJjOGI5MGQwNTMyMjdmNmYiLCJzaXplIjoxNzE2MzE2OSwidXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvYXBpL3BhY2thZ2VzL1ZvaWQvZ2VuZXJpYy9FY2hvaW9uV2ViLzIuMC4wL2VjaG9pb24td2ViLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXdlYi0yLjAuMC1saW51eC14ODZfNjQiLCJidWlsZERlcGVuZGVuY2llcyI6eyJFY2hvaW9uQXBpIjp7ImFiaUhhc2giOiJzaGEyNTY6ZDUwMjkzZDM0NWE5N2U1MmY5ODQ0MDg4YmRkNDIyNzdmNTY2YmM4MTVhMjFiNzYzNmQzZTA1M2YwNmM2YzExMyIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiODQ3MzA4YzE2MDcxZDU3OWJmNzVkNjBhNjZmNDVjYWQzODVkYThkYyJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uV2ViIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjIyOjQ0WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjoyMjo0NFoiLCJraW5kIjoicnVudGltZS1tb2R1bGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMDk5MjA2OCwic291cmNlU2hhIjoiNDFlYmQ1OTg4ZTRmMjA1MjU2NTljNGI2NGEwZDFjOWFkYjRiNzU4NCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6NjUyNDIzYWFkYzk1NTg4NmNmZjcwZDc4ODE4NTM1ODRhM2I1YjVlYSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
+46
View File
@@ -0,0 +1,46 @@
{
"document": {
"abiHash": "sha256:e1f826ddb06caadc394af7a3db27af32789a7e580cde6ee516edd0ebda2a5c9f",
"activation": "restart-required",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "498e5430b8278f1dedfc20d079719ba0c9673d479d79179317733530269f5aac",
"name": "echoion-web-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "3e7698709d32851081361c1007dda84908c04b9bdbcb19642c8b90d053227f6f",
"size": 17163169,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionWeb/2.0.0/echoion-web-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-web-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionWeb",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:22:44Z",
"generatedAt": "2026-08-01T16:22:44Z",
"kind": "runtime-module",
"platform": "linux",
"pluginId": null,
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785600992068,
"sourceSha": "41ebd5988e4f20525659c4b64a0d1c9adb4b7584",
"sourceTreeHash": "git-sha1:652423aadc955886cff70d7881853584a3b5b5ea",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "doT2UQyeoB3vMiQbGLJAgNlySN1ltjaXzmadryxxziTU9rQ6p3p3T3eNUHIn_ut4Ui2KD2fZGszDPpssP9faBg",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OmUxZjgyNmRkYjA2Y2FhZGMzOTRhZjdhM2RiMjdhZjMyNzg5YTdlNTgwY2RlNmVlNTE2ZWRkMGViZGEyYTVjOWYiLCJhY3RpdmF0aW9uIjoicmVzdGFydC1yZXF1aXJlZCIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNDk4ZTU0MzBiODI3OGYxZGVkZmMyMGQwNzk3MTliYTBjOTY3M2Q0NzlkNzkxNzkzMTc3MzM1MzAyNjlmNWFhYyIsIm5hbWUiOiJlY2hvaW9uLXdlYi0yLjAuMC1saW51eC14ODZfNjQudGFyLnpzdCIsInBhY2thZ2VUeXBlIjoidGFyLnpzdCIsInNoYTI1NiI6IjNlNzY5ODcwOWQzMjg1MTA4MTM2MWMxMDA3ZGRhODQ5MDhjMDRiOWJkYmNiMTk2NDJjOGI5MGQwNTMyMjdmNmYiLCJzaXplIjoxNzE2MzE2OSwidXJsIjoiaHR0cHM6Ly9naXQuZmF1bWFyYXkucnUvYXBpL3BhY2thZ2VzL1ZvaWQvZ2VuZXJpYy9FY2hvaW9uV2ViLzIuMC4wL2VjaG9pb24td2ViLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXdlYi0yLjAuMC1saW51eC14ODZfNjQiLCJidWlsZERlcGVuZGVuY2llcyI6eyJFY2hvaW9uQXBpIjp7ImFiaUhhc2giOiJzaGEyNTY6ZDUwMjkzZDM0NWE5N2U1MmY5ODQ0MDg4YmRkNDIyNzdmNTY2YmM4MTVhMjFiNzYzNmQzZTA1M2YwNmM2YzExMyIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiODQ3MzA4YzE2MDcxZDU3OWJmNzVkNjBhNjZmNDVjYWQzODVkYThkYyJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uV2ViIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwiZGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjIyOjQ0WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjoyMjo0NFoiLCJraW5kIjoicnVudGltZS1tb2R1bGUiLCJwbGF0Zm9ybSI6ImxpbnV4IiwicGx1Z2luSWQiOm51bGwsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMDk5MjA2OCwic291cmNlU2hhIjoiNDFlYmQ1OTg4ZTRmMjA1MjU2NTljNGI2NGEwZDFjOWFkYjRiNzU4NCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6NjUyNDIzYWFkYzk1NTg4NmNmZjcwZDc4ODE4NTM1ODRhM2I1YjVlYSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": "sha256:6f6e445a86fc6a67e25dbd0e1f583de9f768f6f4ba88ed2f2ffe6d0540eb85ea",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "5f96dd902fcbad964aed732782a50758f983c4f4e66f0d1521009c1cfea0a861",
"name": "echoion-plugin-url-shortener-external-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "8f5f0260c1f4aef2168f484ca26a46bfbab427d119ff72708db4f9d276feb8f6",
"size": 16295293,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionPluginUrlShortenerExternal/2.0.0/echoion-plugin-url-shortener-external-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-plugin-url-shortener-external-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionCore": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"componentVersion": "2.0.0",
"revision": "c2ec314eb9cc3b06f7dae7c01cd85be8a22bbfc5"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionPluginUrlShortenerExternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:56:06Z",
"generatedAt": "2026-08-01T16:56:06Z",
"kind": "plugin",
"platform": "linux",
"pluginId": "url-shortener-external",
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785603012932,
"sourceSha": "6a1616aa25fe2747a2c7e38cd08f616b103951b2",
"sourceTreeHash": "git-sha1:933bdb2c1f245523de850e23bf03a1d23d2fb6df",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "CH2kNrbfc48y0_pIi_J04CMixDkgvRihPDWtpnKSjgiSL8j_VklwP5ooT6Uw2qCHL-xm4WOeHMXHsWXxvQviDQ",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjZmNmU0NDVhODZmYzZhNjdlMjVkYmQwZTFmNTgzZGU5Zjc2OGY2ZjRiYTg4ZWQyZjJmZmU2ZDA1NDBlYjg1ZWEiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNWY5NmRkOTAyZmNiYWQ5NjRhZWQ3MzI3ODJhNTA3NThmOTgzYzRmNGU2NmYwZDE1MjEwMDljMWNmZWEwYTg2MSIsIm5hbWUiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0IiwicGFja2FnZVR5cGUiOiJ0YXIuenN0Iiwic2hhMjU2IjoiOGY1ZjAyNjBjMWY0YWVmMjE2OGY0ODRjYTI2YTQ2YmZiYWI0MjdkMTE5ZmY3MjcwOGRiNGY5ZDI3NmZlYjhmNiIsInNpemUiOjE2Mjk1MjkzLCJ1cmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9hcGkvcGFja2FnZXMvVm9pZC9nZW5lcmljL0VjaG9pb25QbHVnaW5VcmxTaG9ydGVuZXJFeHRlcm5hbC8yLjAuMC9lY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NCIsImJ1aWxkRGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOnsiYWJpSGFzaCI6InNoYTI1NjpkNTAyOTNkMzQ1YTk3ZTUyZjk4NDQwODhiZGQ0MjI3N2Y1NjZiYzgxNWEyMWI3NjM2ZDNlMDUzZjA2YzZjMTEzIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI4NDczMDhjMTYwNzFkNTc5YmY3NWQ2MGE2NmY0NWNhZDM4NWRhOGRjIn0sIkVjaG9pb25Db3JlIjp7ImFiaUhhc2giOiJzaGEyNTY6OWNiNjY4ZTJhNTAyZGNmZTAyZDE0NWVkNjM2MzVkNjM2MTk3MzJkNzdmZjU3NDk2ODU4MzQzODI3MDVlOGQyMSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiYzJlYzMxNGViOWNjM2IwNmY3ZGFlN2MwMWNkODViZThhMjJiYmZjNSJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uUGx1Z2luVXJsU2hvcnRlbmVyRXh0ZXJuYWwiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIiwiRWNob2lvbkNvcmUiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjU2OjA2WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjo1NjowNloiLCJraW5kIjoicGx1Z2luIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjoidXJsLXNob3J0ZW5lci1leHRlcm5hbCIsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMzAxMjkzMiwic291cmNlU2hhIjoiNmExNjE2YWEyNWZlMjc0N2EyYzdlMzhjZDA4ZjYxNmIxMDM5NTFiMiIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6OTMzYmRiMmMxZjI0NTUyM2RlODUwZTIzYmYwM2ExZDIzZDJmYjZkZiIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": "sha256:6f6e445a86fc6a67e25dbd0e1f583de9f768f6f4ba88ed2f2ffe6d0540eb85ea",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "5f96dd902fcbad964aed732782a50758f983c4f4e66f0d1521009c1cfea0a861",
"name": "echoion-plugin-url-shortener-external-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "8f5f0260c1f4aef2168f484ca26a46bfbab427d119ff72708db4f9d276feb8f6",
"size": 16295293,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionPluginUrlShortenerExternal/2.0.0/echoion-plugin-url-shortener-external-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-plugin-url-shortener-external-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionCore": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"componentVersion": "2.0.0",
"revision": "c2ec314eb9cc3b06f7dae7c01cd85be8a22bbfc5"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionPluginUrlShortenerExternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:56:06Z",
"generatedAt": "2026-08-01T16:56:06Z",
"kind": "plugin",
"platform": "linux",
"pluginId": "url-shortener-external",
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785603012932,
"sourceSha": "6a1616aa25fe2747a2c7e38cd08f616b103951b2",
"sourceTreeHash": "git-sha1:933bdb2c1f245523de850e23bf03a1d23d2fb6df",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "CH2kNrbfc48y0_pIi_J04CMixDkgvRihPDWtpnKSjgiSL8j_VklwP5ooT6Uw2qCHL-xm4WOeHMXHsWXxvQviDQ",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjZmNmU0NDVhODZmYzZhNjdlMjVkYmQwZTFmNTgzZGU5Zjc2OGY2ZjRiYTg4ZWQyZjJmZmU2ZDA1NDBlYjg1ZWEiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiNWY5NmRkOTAyZmNiYWQ5NjRhZWQ3MzI3ODJhNTA3NThmOTgzYzRmNGU2NmYwZDE1MjEwMDljMWNmZWEwYTg2MSIsIm5hbWUiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0IiwicGFja2FnZVR5cGUiOiJ0YXIuenN0Iiwic2hhMjU2IjoiOGY1ZjAyNjBjMWY0YWVmMjE2OGY0ODRjYTI2YTQ2YmZiYWI0MjdkMTE5ZmY3MjcwOGRiNGY5ZDI3NmZlYjhmNiIsInNpemUiOjE2Mjk1MjkzLCJ1cmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9hcGkvcGFja2FnZXMvVm9pZC9nZW5lcmljL0VjaG9pb25QbHVnaW5VcmxTaG9ydGVuZXJFeHRlcm5hbC8yLjAuMC9lY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWV4dGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NCIsImJ1aWxkRGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOnsiYWJpSGFzaCI6InNoYTI1NjpkNTAyOTNkMzQ1YTk3ZTUyZjk4NDQwODhiZGQ0MjI3N2Y1NjZiYzgxNWEyMWI3NjM2ZDNlMDUzZjA2YzZjMTEzIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI4NDczMDhjMTYwNzFkNTc5YmY3NWQ2MGE2NmY0NWNhZDM4NWRhOGRjIn0sIkVjaG9pb25Db3JlIjp7ImFiaUhhc2giOiJzaGEyNTY6OWNiNjY4ZTJhNTAyZGNmZTAyZDE0NWVkNjM2MzVkNjM2MTk3MzJkNzdmZjU3NDk2ODU4MzQzODI3MDVlOGQyMSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiYzJlYzMxNGViOWNjM2IwNmY3ZGFlN2MwMWNkODViZThhMjJiYmZjNSJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uUGx1Z2luVXJsU2hvcnRlbmVyRXh0ZXJuYWwiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIiwiRWNob2lvbkNvcmUiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjU2OjA2WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjo1NjowNloiLCJraW5kIjoicGx1Z2luIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjoidXJsLXNob3J0ZW5lci1leHRlcm5hbCIsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMzAxMjkzMiwic291cmNlU2hhIjoiNmExNjE2YWEyNWZlMjc0N2EyYzdlMzhjZDA4ZjYxNmIxMDM5NTFiMiIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6OTMzYmRiMmMxZjI0NTUyM2RlODUwZTIzYmYwM2ExZDIzZDJmYjZkZiIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": "sha256:40a9d5a3cd47bd0bb02cb38fb530ce0fc0d59f813749565a1d7fcfdabbb53688",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "969d28439a2c27ec2a4f49c36abf90e69e3021df59eb90fe12133a785e28ca64",
"name": "echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "7270d701882cff77f17259aa0fd614704809a9163d5875c4b27230e72898fb43",
"size": 15558144,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionPluginUrlShortenerInternal/2.0.0/echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionCore": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"componentVersion": "2.0.0",
"revision": "c2ec314eb9cc3b06f7dae7c01cd85be8a22bbfc5"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionPluginUrlShortenerInternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:50:05Z",
"generatedAt": "2026-08-01T16:50:05Z",
"kind": "plugin",
"platform": "linux",
"pluginId": "url-shortener-internal",
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785602676757,
"sourceSha": "44f6af37d459395c842d4ab6ba39e3bda81d8b88",
"sourceTreeHash": "git-sha1:eae0a45a00754a4ce2f044dec4bed79de12a7939",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "4hW2Ycn66WgttLbMnqoJnQx0DIsdJ3NLLo4DVt9tZN3119YMrslyZcBJ-soS2thPKrMcsqvfw2le1PAffT36Bw",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjQwYTlkNWEzY2Q0N2JkMGJiMDJjYjM4ZmI1MzBjZTBmYzBkNTlmODEzNzQ5NTY1YTFkN2ZjZmRhYmJiNTM2ODgiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiOTY5ZDI4NDM5YTJjMjdlYzJhNGY0OWMzNmFiZjkwZTY5ZTMwMjFkZjU5ZWI5MGZlMTIxMzNhNzg1ZTI4Y2E2NCIsIm5hbWUiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0IiwicGFja2FnZVR5cGUiOiJ0YXIuenN0Iiwic2hhMjU2IjoiNzI3MGQ3MDE4ODJjZmY3N2YxNzI1OWFhMGZkNjE0NzA0ODA5YTkxNjNkNTg3NWM0YjI3MjMwZTcyODk4ZmI0MyIsInNpemUiOjE1NTU4MTQ0LCJ1cmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9hcGkvcGFja2FnZXMvVm9pZC9nZW5lcmljL0VjaG9pb25QbHVnaW5VcmxTaG9ydGVuZXJJbnRlcm5hbC8yLjAuMC9lY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NCIsImJ1aWxkRGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOnsiYWJpSGFzaCI6InNoYTI1NjpkNTAyOTNkMzQ1YTk3ZTUyZjk4NDQwODhiZGQ0MjI3N2Y1NjZiYzgxNWEyMWI3NjM2ZDNlMDUzZjA2YzZjMTEzIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI4NDczMDhjMTYwNzFkNTc5YmY3NWQ2MGE2NmY0NWNhZDM4NWRhOGRjIn0sIkVjaG9pb25Db3JlIjp7ImFiaUhhc2giOiJzaGEyNTY6OWNiNjY4ZTJhNTAyZGNmZTAyZDE0NWVkNjM2MzVkNjM2MTk3MzJkNzdmZjU3NDk2ODU4MzQzODI3MDVlOGQyMSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiYzJlYzMxNGViOWNjM2IwNmY3ZGFlN2MwMWNkODViZThhMjJiYmZjNSJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uUGx1Z2luVXJsU2hvcnRlbmVySW50ZXJuYWwiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIiwiRWNob2lvbkNvcmUiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjUwOjA1WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjo1MDowNVoiLCJraW5kIjoicGx1Z2luIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjoidXJsLXNob3J0ZW5lci1pbnRlcm5hbCIsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMjY3Njc1Nywic291cmNlU2hhIjoiNDRmNmFmMzdkNDU5Mzk1Yzg0MmQ0YWI2YmEzOWUzYmRhODFkOGI4OCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6ZWFlMGE0NWEwMDc1NGE0Y2UyZjA0NGRlYzRiZWQ3OWRlMTJhNzkzOSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
@@ -0,0 +1,52 @@
{
"document": {
"abiHash": "sha256:40a9d5a3cd47bd0bb02cb38fb530ce0fc0d59f813749565a1d7fcfdabbb53688",
"activation": "reloadable",
"architecture": "x86_64",
"artifact": {
"manifestSha256": "969d28439a2c27ec2a4f49c36abf90e69e3021df59eb90fe12133a785e28ca64",
"name": "echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64.tar.zst",
"packageType": "tar.zst",
"sha256": "7270d701882cff77f17259aa0fd614704809a9163d5875c4b27230e72898fb43",
"size": 15558144,
"url": "https://git.faumaray.ru/api/packages/Void/generic/EchoionPluginUrlShortenerInternal/2.0.0/echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64.tar.zst"
},
"artifactIdentity": "echoion-plugin-url-shortener-internal-2.0.0-linux-x86_64",
"buildDependencies": {
"EchoionApi": {
"abiHash": "sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113",
"componentVersion": "2.0.0",
"revision": "847308c16071d579bf75d60a66f45cad385da8dc"
},
"EchoionCore": {
"abiHash": "sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21",
"componentVersion": "2.0.0",
"revision": "c2ec314eb9cc3b06f7dae7c01cd85be8a22bbfc5"
}
},
"buildType": "RelWithDebInfo",
"channel": "stable",
"componentId": "EchoionPluginUrlShortenerInternal",
"componentVersion": "2.0.0",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0",
"EchoionCore": ">=2.0.0 <3.0.0"
},
"document": "echoion-component-release",
"expiresAt": "2026-09-15T16:50:05Z",
"generatedAt": "2026-08-01T16:50:05Z",
"kind": "plugin",
"platform": "linux",
"pluginId": "url-shortener-internal",
"productCompatibility": ">=2.0.0 <3.0.0",
"schemaVersion": 3,
"sequence": 1785602676757,
"sourceSha": "44f6af37d459395c842d4ab6ba39e3bda81d8b88",
"sourceTreeHash": "git-sha1:eae0a45a00754a4ce2f044dec4bed79de12a7939",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26"
},
"keyId": "echoion-component-release-2026-07-30-r2",
"schemaVersion": 3,
"signature": "4hW2Ycn66WgttLbMnqoJnQx0DIsdJ3NLLo4DVt9tZN3119YMrslyZcBJ-soS2thPKrMcsqvfw2le1PAffT36Bw",
"signedPayload": "eyJhYmlIYXNoIjoic2hhMjU2OjQwYTlkNWEzY2Q0N2JkMGJiMDJjYjM4ZmI1MzBjZTBmYzBkNTlmODEzNzQ5NTY1YTFkN2ZjZmRhYmJiNTM2ODgiLCJhY3RpdmF0aW9uIjoicmVsb2FkYWJsZSIsImFyY2hpdGVjdHVyZSI6Ing4Nl82NCIsImFydGlmYWN0Ijp7Im1hbmlmZXN0U2hhMjU2IjoiOTY5ZDI4NDM5YTJjMjdlYzJhNGY0OWMzNmFiZjkwZTY5ZTMwMjFkZjU5ZWI5MGZlMTIxMzNhNzg1ZTI4Y2E2NCIsIm5hbWUiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0IiwicGFja2FnZVR5cGUiOiJ0YXIuenN0Iiwic2hhMjU2IjoiNzI3MGQ3MDE4ODJjZmY3N2YxNzI1OWFhMGZkNjE0NzA0ODA5YTkxNjNkNTg3NWM0YjI3MjMwZTcyODk4ZmI0MyIsInNpemUiOjE1NTU4MTQ0LCJ1cmwiOiJodHRwczovL2dpdC5mYXVtYXJheS5ydS9hcGkvcGFja2FnZXMvVm9pZC9nZW5lcmljL0VjaG9pb25QbHVnaW5VcmxTaG9ydGVuZXJJbnRlcm5hbC8yLjAuMC9lY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NC50YXIuenN0In0sImFydGlmYWN0SWRlbnRpdHkiOiJlY2hvaW9uLXBsdWdpbi11cmwtc2hvcnRlbmVyLWludGVybmFsLTIuMC4wLWxpbnV4LXg4Nl82NCIsImJ1aWxkRGVwZW5kZW5jaWVzIjp7IkVjaG9pb25BcGkiOnsiYWJpSGFzaCI6InNoYTI1NjpkNTAyOTNkMzQ1YTk3ZTUyZjk4NDQwODhiZGQ0MjI3N2Y1NjZiYzgxNWEyMWI3NjM2ZDNlMDUzZjA2YzZjMTEzIiwiY29tcG9uZW50VmVyc2lvbiI6IjIuMC4wIiwicmV2aXNpb24iOiI4NDczMDhjMTYwNzFkNTc5YmY3NWQ2MGE2NmY0NWNhZDM4NWRhOGRjIn0sIkVjaG9pb25Db3JlIjp7ImFiaUhhc2giOiJzaGEyNTY6OWNiNjY4ZTJhNTAyZGNmZTAyZDE0NWVkNjM2MzVkNjM2MTk3MzJkNzdmZjU3NDk2ODU4MzQzODI3MDVlOGQyMSIsImNvbXBvbmVudFZlcnNpb24iOiIyLjAuMCIsInJldmlzaW9uIjoiYzJlYzMxNGViOWNjM2IwNmY3ZGFlN2MwMWNkODViZThhMjJiYmZjNSJ9fSwiYnVpbGRUeXBlIjoiUmVsV2l0aERlYkluZm8iLCJjaGFubmVsIjoic3RhYmxlIiwiY29tcG9uZW50SWQiOiJFY2hvaW9uUGx1Z2luVXJsU2hvcnRlbmVySW50ZXJuYWwiLCJjb21wb25lbnRWZXJzaW9uIjoiMi4wLjAiLCJkZXBlbmRlbmNpZXMiOnsiRWNob2lvbkFwaSI6Ij49Mi4wLjAgPDMuMC4wIiwiRWNob2lvbkNvcmUiOiI-PTIuMC4wIDwzLjAuMCJ9LCJkb2N1bWVudCI6ImVjaG9pb24tY29tcG9uZW50LXJlbGVhc2UiLCJleHBpcmVzQXQiOiIyMDI2LTA5LTE1VDE2OjUwOjA1WiIsImdlbmVyYXRlZEF0IjoiMjAyNi0wOC0wMVQxNjo1MDowNVoiLCJraW5kIjoicGx1Z2luIiwicGxhdGZvcm0iOiJsaW51eCIsInBsdWdpbklkIjoidXJsLXNob3J0ZW5lci1pbnRlcm5hbCIsInByb2R1Y3RDb21wYXRpYmlsaXR5IjoiPj0yLjAuMCA8My4wLjAiLCJzY2hlbWFWZXJzaW9uIjozLCJzZXF1ZW5jZSI6MTc4NTYwMjY3Njc1Nywic291cmNlU2hhIjoiNDRmNmFmMzdkNDU5Mzk1Yzg0MmQ0YWI2YmEzOWUzYmRhODFkOGI4OCIsInNvdXJjZVRyZWVIYXNoIjoiZ2l0LXNoYTE6ZWFlMGE0NWEwMDc1NGE0Y2UyZjA0NGRlYzRiZWQ3OWRlMTJhNzkzOSIsInRvb2xjaGFpbkNvbnRyYWN0IjoibGludXgteDg2XzY0LWdsaWJjLTIuMzUtY3h4MjYifQo"
}
-98
View File
@@ -1,98 +0,0 @@
# 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:
```text
<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:
```bash
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.
-2260
View File
File diff suppressed because it is too large. Load diff
@@ -1,13 +0,0 @@
[Unit]
Description=Publish locally staged Echoion runtime updates
After=local-fs.target
[Service]
Type=oneshot
@SERVICE_IDENTITY@
@UPDATER_WORKING_DIRECTORY@
@UPDATER_EXEC_START@
@UPDATER_HARDENING@
NoNewPrivileges=true
PrivateTmp=true
UMask=0077
@@ -1,12 +0,0 @@
[Unit]
Description=Process staged Echoion runtime update requests
[Timer]
OnBootSec=2m
OnUnitActiveSec=5m
RandomizedDelaySec=30s
Persistent=true
Unit=echoion-updater.service
[Install]
@INSTALL_TARGET@
-22
View File
@@ -1,22 +0,0 @@
[Unit]
Description=Echoion Music Bot
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
@SERVICE_IDENTITY@
@WORKING_DIRECTORY@
@ENVIRONMENT_HOME@
@ENVIRONMENT_CORE@
@ENVIRONMENT_LIBRARY_PATH@
@ENVIRONMENT_STATE@
@ENVIRONMENT_INCOMING@
@EXEC_START@
Restart=on-failure
RestartSec=5s
LimitNOFILE=65536
UMask=0077
[Install]
@INSTALL_TARGET@
File diff suppressed because it is too large. Load diff
-402
View File
@@ -1,402 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PROGRAM=${0##*/}
SERVICE_NAME=echoion.service
UPDATER_SERVICE_NAME=echoion-updater.service
UPDATER_TIMER_NAME=echoion-updater.timer
SERVICE_USER=echoion
RECORD_NAME=.echoion-install
JSON_RECORD_NAME=install.json
MANAGED_MARKER=.echoion-managed
die() {
printf '%s: %s\n' "$PROGRAM" "$*" >&2
exit 1
}
warn() {
printf '%s: warning: %s\n' "$PROGRAM" "$*" >&2
}
usage() {
cat <<'EOF'
Usage: uninstall.sh [--purge] [--non-interactive]
Remove the Echoion runtime and its matching registered service. Configuration
and state are preserved unless --purge is explicitly supplied.
EOF
}
sha256_file() {
local result
result=$(sha256sum -- "$1")
printf '%s\n' "${result%% *}"
}
systemctl_for() {
local scope=$1
shift
if [[ $scope == user ]]; then
systemctl --user "$@"
else
systemctl "$@"
fi
}
acquire_prefix_lock() {
local lock_prefix=$1
command -v flock >/dev/null 2>&1 || die "flock is required for safe uninstallation"
exec {UNINSTALL_LOCK_FD}< "$lock_prefix"
flock -n "$UNINSTALL_LOCK_FD" || die "another Echoion install or uninstall is active for '$lock_prefix'"
}
safe_unit_path() {
local scope=$1
local unit=$2
[[ $unit == /* && $unit != *'/../'* && $unit != *'/./'* ]] || return 1
case $scope:$unit in
system:/etc/systemd/system/echoion.service) return 0 ;;
system:/etc/systemd/system/echoion-updater.service) return 0 ;;
system:/etc/systemd/system/echoion-updater.timer) return 0 ;;
user:/*/systemd/user/echoion.service) return 0 ;;
user:/*/systemd/user/echoion-updater.service) return 0 ;;
user:/*/systemd/user/echoion-updater.timer) return 0 ;;
*) return 1 ;;
esac
}
safe_purge_path() {
local path=$1
local prefix=$2
[[ $path == /* && $path != / ]] || return 1
local relative=${path#/}
[[ $relative == */* ]] || return 1
case $path in
/etc | /var | /home | /root | /usr | /usr/local | /opt | /tmp | /var/tmp | /run)
return 1
;;
esac
case $path in
"$prefix" | "$prefix/current" | "$prefix/current"/* | "$prefix/versions" | "$prefix/versions"/*)
return 1
;;
esac
return 0
}
validate_managed_purge_path() {
local kind=$1
local path=$2
local safety_prefix=$3
local marker_prefix=$4
local install_id=$5
local allowed=$6
local expected_device=$7
local expected_inode=$8
local expected_uid=$9
local expected_gid=${10}
local expected_hash=${11}
local marker=$path/$MANAGED_MARKER
local device inode uid gid
[[ $allowed == 1 ]] || die "$kind directory is not marked as installer-owned: '$path'"
safe_purge_path "$path" "$safety_prefix" || die "refusing unsafe purge path '$path'"
if [[ ! -e $path && ! -L $path ]]; then
return 0
fi
[[ -d $path && ! -L $path ]] || die "$kind purge path is not a real directory: '$path'"
[[ $expected_device =~ ^[0-9]+$ && $expected_inode =~ ^[0-9]+$ &&
$expected_uid =~ ^[0-9]+$ && $expected_gid =~ ^[0-9]+$ && -n $expected_hash ]] ||
die "$kind purge identity is incomplete"
device=$(stat -c '%d' -- "$path")
inode=$(stat -c '%i' -- "$path")
uid=$(stat -c '%u' -- "$path")
gid=$(stat -c '%g' -- "$path")
[[ $device == "$expected_device" && $inode == "$expected_inode" &&
$uid == "$expected_uid" && $gid == "$expected_gid" ]] ||
die "$kind directory identity changed; refusing purge: '$path'"
[[ -f $marker && ! -L $marker ]] || die "$kind ownership marker is missing: '$marker'"
[[ $(sha256_file "$marker") == "$expected_hash" ]] ||
die "$kind ownership marker changed: '$marker'"
grep -Fx -- "install_id=$install_id" "$marker" >/dev/null ||
die "$kind ownership marker has the wrong install identity"
grep -Fx -- "prefix=$marker_prefix" "$marker" >/dev/null ||
die "$kind ownership marker belongs to another prefix"
}
purge=0
while [[ $# -gt 0 ]]; do
case $1 in
--purge) purge=1 ;;
--non-interactive) ;;
-h | --help)
usage
exit 0
;;
*) die "unknown option: $1" ;;
esac
shift
done
SCRIPT_DIR=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
prefix=$SCRIPT_DIR
[[ $prefix != / ]] || die "refusing to uninstall from the filesystem root"
acquire_prefix_lock "$prefix"
record=$prefix/$RECORD_NAME
[[ -f $record ]] || die "install record is missing: $record"
record_prefix=
relocatable=0
service_scope=none
service_unit=
service_unit_sha256=
updater_service_unit=
updater_service_unit_sha256=
updater_timer_unit=
updater_timer_unit_sha256=
updater_helper=
updater_helper_sha256=
config_dir=
state_dir=
cache_dir=
logs_dir=
incoming_dir=
mode=
data_layout=
launcher=
launcher_sha256=
created_system_user=0
service_uid=
service_gid=
install_id=
config_purge_allowed=0
config_dir_device=
config_dir_inode=
config_dir_uid=
config_dir_gid=
config_marker_sha256=
state_purge_allowed=0
state_dir_device=
state_dir_inode=
state_dir_uid=
state_dir_gid=
state_marker_sha256=
key=
value=
while IFS='=' read -r key value; do
case $key in
prefix) record_prefix=$value ;;
relocatable) relocatable=$value ;;
service_scope) service_scope=$value ;;
service_unit) service_unit=$value ;;
service_unit_sha256) service_unit_sha256=$value ;;
updater_service_unit) updater_service_unit=$value ;;
updater_service_unit_sha256) updater_service_unit_sha256=$value ;;
updater_timer_unit) updater_timer_unit=$value ;;
updater_timer_unit_sha256) updater_timer_unit_sha256=$value ;;
updater_helper) updater_helper=$value ;;
updater_helper_sha256) updater_helper_sha256=$value ;;
config_dir) config_dir=$value ;;
state_dir) state_dir=$value ;;
cache_dir) cache_dir=$value ;;
logs_dir) logs_dir=$value ;;
incoming_dir) incoming_dir=$value ;;
mode) mode=$value ;;
data_layout) data_layout=$value ;;
launcher) launcher=$value ;;
launcher_sha256) launcher_sha256=$value ;;
created_system_user) created_system_user=$value ;;
service_uid) service_uid=$value ;;
service_gid) service_gid=$value ;;
install_id) install_id=$value ;;
config_purge_allowed) config_purge_allowed=$value ;;
config_dir_device) config_dir_device=$value ;;
config_dir_inode) config_dir_inode=$value ;;
config_dir_uid) config_dir_uid=$value ;;
config_dir_gid) config_dir_gid=$value ;;
config_marker_sha256) config_marker_sha256=$value ;;
state_purge_allowed) state_purge_allowed=$value ;;
state_dir_device) state_dir_device=$value ;;
state_dir_inode) state_dir_inode=$value ;;
state_dir_uid) state_dir_uid=$value ;;
state_dir_gid) state_dir_gid=$value ;;
state_marker_sha256) state_marker_sha256=$value ;;
esac
done < "$record"
case $relocatable in
0)
[[ $record_prefix == "$prefix" ]] ||
die "install record belongs to '$record_prefix', not '$prefix'"
;;
1)
[[ $record_prefix == . && $mode == portable && $data_layout == self-contained ]] ||
die "relocatable install record is incomplete or unsafe"
[[ $config_dir == config && ( $state_dir == state || $state_dir == data ) ]] ||
die "relocatable install record has unsafe mutable paths"
config_dir=$prefix/config
state_dir=$prefix/$state_dir
if [[ -n $cache_dir || -n $logs_dir || -n $incoming_dir ]]; then
[[ $cache_dir == cache && $logs_dir == logs && $incoming_dir == incoming ]] ||
die "relocatable install record has unsafe auxiliary paths"
cache_dir=$prefix/cache
logs_dir=$prefix/logs
incoming_dir=$prefix/incoming
fi
;;
*) die "install record has an invalid relocatable value" ;;
esac
case $service_scope in
none | user | system) ;;
*) die "install record has an invalid service scope" ;;
esac
case $created_system_user in
0 | 1) ;;
*) die "install record has an invalid created_system_user value" ;;
esac
if [[ $service_scope == system || $mode == system || $created_system_user == 1 ]]; then
[[ ${EUID:-$(id -u)} -eq 0 ]] || die "uninstalling the system service requires root"
fi
# Complete every destructive preflight before stopping the service or removing
# any files, so a refused purge leaves the installation fully retryable.
if [[ $service_scope != none ]]; then
[[ -n $service_unit && -n $service_unit_sha256 ]] || die "service record is incomplete"
safe_unit_path "$service_scope" "$service_unit" || die "service record has an unsafe unit path"
[[ -f $service_unit ]] || die "registered service unit is missing: $service_unit"
[[ $(sha256_file "$service_unit") == "$service_unit_sha256" ]] ||
die "service unit was modified; refusing to remove it: $service_unit"
for updater_record in service timer; do
if [[ $updater_record == service ]]; then
updater_unit=$updater_service_unit
updater_hash=$updater_service_unit_sha256
else
updater_unit=$updater_timer_unit
updater_hash=$updater_timer_unit_sha256
fi
if [[ -n $updater_unit || -n $updater_hash ]]; then
[[ -n $updater_unit && -n $updater_hash ]] ||
die "updater $updater_record record is incomplete"
safe_unit_path "$service_scope" "$updater_unit" ||
die "updater $updater_record record has an unsafe unit path"
[[ -f $updater_unit ]] ||
die "registered updater unit is missing: $updater_unit"
[[ $(sha256_file "$updater_unit") == "$updater_hash" ]] ||
die "updater unit was modified; refusing to remove it: $updater_unit"
fi
done
fi
updater_helper_path=
updater_bundle_path=
if [[ -n $updater_helper ]]; then
[[ $updater_helper =~ ^libexec/updater/[A-Za-z0-9][A-Za-z0-9._-]{0,63}/bin/echoion-updater$ &&
$updater_helper_sha256 =~ ^[0-9a-f]{64}$ ]] ||
die "privileged updater helper record is incomplete or unsafe"
updater_helper_path=$prefix/$updater_helper
updater_bundle_path=$prefix/${updater_helper%/bin/echoion-updater}
[[ -d $updater_bundle_path && ! -L $updater_bundle_path ]] ||
die "recorded privileged updater bundle is missing or unsafe: $updater_bundle_path"
[[ -f $updater_helper_path && ! -L $updater_helper_path &&
-x $updater_helper_path ]] ||
die "recorded privileged updater helper is missing or unsafe: $updater_helper_path"
[[ $(sha256_file "$updater_helper_path") == "$updater_helper_sha256" ]] ||
die "privileged updater helper was modified; refusing to remove it: $updater_helper_path"
elif [[ -n $updater_helper_sha256 ]]; then
die "privileged updater helper record is incomplete"
fi
launcher_path=
if [[ -n $launcher ]]; then
[[ $launcher == echoion && $launcher_sha256 =~ ^[0-9a-f]{64}$ ]] ||
die "portable launcher record is incomplete or unsafe"
launcher_path=$prefix/$launcher
[[ -f $launcher_path && ! -L $launcher_path && -x $launcher_path ]] ||
die "recorded portable launcher is missing or unsafe: $launcher_path"
[[ $(sha256_file "$launcher_path") == "$launcher_sha256" ]] ||
die "portable launcher was modified; refusing to remove it: $launcher_path"
elif [[ -n $launcher_sha256 ]]; then
die "portable launcher record is incomplete"
fi
if [[ -e $prefix/current && ! -L $prefix/current ]]; then
die "current is not a symlink; refusing to remove runtime files"
fi
if [[ $purge -eq 1 ]]; then
[[ $install_id =~ ^[A-Za-z0-9-]{16,64}$ ]] || die "install record has no safe install identity"
[[ -n $config_dir && -n $state_dir ]] || die "install record has an empty purge path"
validate_managed_purge_path config "$config_dir" "$prefix" "$record_prefix" "$install_id" \
"$config_purge_allowed" "$config_dir_device" "$config_dir_inode" \
"$config_dir_uid" "$config_dir_gid" "$config_marker_sha256"
validate_managed_purge_path state "$state_dir" "$prefix" "$record_prefix" "$install_id" \
"$state_purge_allowed" "$state_dir_device" "$state_dir_inode" \
"$state_dir_uid" "$state_dir_gid" "$state_marker_sha256"
fi
service_account_present=0
if [[ $purge -eq 1 && $created_system_user == 1 ]]; then
[[ $service_uid =~ ^[0-9]+$ && $service_gid =~ ^[0-9]+$ ]] ||
die "installer-created service account record has no uid/gid identity"
if id -u "$SERVICE_USER" >/dev/null 2>&1; then
[[ $(id -u "$SERVICE_USER") -eq $service_uid &&
$(id -g "$SERVICE_USER") -eq $service_gid ]] ||
die "the recorded $SERVICE_USER account was deleted or replaced"
service_account_present=1
fi
fi
if [[ $service_scope != none ]]; then
service_names=("$SERVICE_NAME")
[[ -z $updater_timer_unit ]] || service_names+=("$UPDATER_TIMER_NAME")
if [[ -n $updater_service_unit ]] &&
! systemctl_for "$service_scope" stop "$UPDATER_SERVICE_NAME"; then
die "could not stop $UPDATER_SERVICE_NAME; runtime was not removed"
fi
if ! systemctl_for "$service_scope" disable --now "${service_names[@]}"; then
die "could not stop and disable $SERVICE_NAME; runtime was not removed"
fi
fi
rm -f -- "$prefix/current"
rm -rf -- "$prefix/versions"
[[ -z $updater_bundle_path ]] || rm -rf -- "$updater_bundle_path"
rmdir -- "$prefix/libexec/updater" "$prefix/libexec" 2>/dev/null || true
if [[ $purge -eq 1 ]]; then
if [[ $config_dir == "$state_dir" ]]; then
rm -rf -- "$config_dir"
else
rm -rf -- "$config_dir" "$state_dir"
fi
if [[ $data_layout == self-contained ]]; then
for auxiliary in "$cache_dir" "$logs_dir" "$incoming_dir"; do
[[ -z $auxiliary || $auxiliary == "$prefix/cache" ||
$auxiliary == "$prefix/logs" || $auxiliary == "$prefix/incoming" ]] ||
die "refusing unsafe self-contained auxiliary path: '$auxiliary'"
[[ -z $auxiliary ]] || rm -rf -- "$auxiliary"
done
fi
fi
if [[ $purge -eq 1 && $created_system_user == 1 && $service_account_present -eq 1 ]]; then
userdel "$SERVICE_USER"
fi
if [[ $service_scope != none ]]; then
rm -f -- "$service_unit"
[[ -z $updater_service_unit ]] || rm -f -- "$updater_service_unit"
[[ -z $updater_timer_unit ]] || rm -f -- "$updater_timer_unit"
systemctl_for "$service_scope" daemon-reload || warn "systemd daemon-reload failed"
fi
[[ -z $launcher_path ]] || rm -f -- "$launcher_path"
rm -f -- "$record" "$prefix/$JSON_RECORD_NAME" "$prefix/install.sh" "$prefix/uninstall.sh"
rmdir -- "$prefix" 2>/dev/null || true
printf 'Echoion runtime removed from %s.\n' "$prefix"
if [[ $purge -eq 0 ]]; then
printf 'Configuration and state were preserved:\n %s\n %s\n' "$config_dir" "$state_dir"
fi
-80
View File
@@ -1,80 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if (($# < 1 || $# > 2)); then
echo "usage: $0 COMPONENT_WORKSPACE [DEPENDENCY_WORKSPACE]" >&2
exit 2
fi
if [[ -z ${ECHOION_COMPONENT_SSH_KEY:-} ]]; then
echo "ECHOION_COMPONENT_SSH_KEY is required" >&2
exit 2
fi
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
# shellcheck source=scripts/lib/component-ssh.sh
source "$script_dir/lib/component-ssh.sh"
workspace=$(realpath -m -- "$1")
dependency_workspace=
if (($# == 2)); then
dependency_workspace=$(realpath -m -- "$2")
fi
credential_dir=$(mktemp -d)
cleanup() {
rm -rf -- "$credential_dir"
}
trap cleanup EXIT
umask 077
echoion_configure_component_ssh \
"$credential_dir" "$ECHOION_COMPONENT_SSH_KEY"
python3 "$script_dir/sync-components.py" \
--workspace "$workspace" \
--update
if [[ -n $dependency_workspace ]]; then
mkdir -p "$dependency_workspace"
while IFS=$'\t' read -r dependency repository revision; do
destination="$dependency_workspace/$dependency"
if [[ -e $destination && ! -d $destination/.git ]]; then
echo "dependency destination is not a Git repository: $destination" >&2
exit 1
fi
if [[ ! -d $destination/.git ]]; then
git clone --filter=blob:none --no-checkout \
"$repository" "$destination"
fi
git -C "$destination" remote set-url origin "$repository"
git -C "$destination" fetch --prune origin main
git -C "$destination" cat-file -e "$revision^{commit}"
git -C "$destination" checkout --detach "$revision"
git -C "$destination" diff --quiet
git -C "$destination" diff --cached --quiet
test "$(git -C "$destination" rev-parse HEAD)" = "$revision"
done < <(
python3 - "$script_dir/../cmake/DependencyLock.cmake" <<'PY'
import pathlib
import re
import sys
text = pathlib.Path(sys.argv[1]).read_text(encoding="utf-8")
repositories = {
"VoidLibrary": (
"ssh://gitea@git.faumaray.ru/void/voidlibrary.git",
"ECHOION_VOID_REVISION",
),
"VoidTeamspeak": (
"ssh://gitea@git.faumaray.ru/void/voidteamspeak.git",
"ECHOION_VOID_TEAMSPEAK_REVISION",
),
}
for name, (repository, variable) in repositories.items():
match = re.search(
rf'set\({variable}\s+"([0-9a-f]{{40}})"',
text,
re.MULTILINE,
)
if match is None:
raise SystemExit(f"missing exact {variable} in dependency lock")
print(name, repository, match.group(1), sep="\t")
PY
)
fi
-273
View File
@@ -1,273 +0,0 @@
#!/usr/bin/env python3
"""Collect deterministic license notices from an installed npm dependency tree."""
from __future__ import annotations
import argparse
import json
import os
from pathlib import Path
import re
import shutil
import stat
import sys
import tempfile
from typing import Any
from urllib.parse import quote
NOTICE_FILE_PATTERN = re.compile(
r"^(?:licen[cs]e|copying|notice|copyright)(?:$|[._-].*)",
re.IGNORECASE,
)
class CollectionError(RuntimeError):
"""Raised when dependency metadata cannot produce a trustworthy notice."""
def is_package_root(package_json: Path, node_modules: Path) -> bool:
relative_parts = package_json.parent.relative_to(node_modules).parts
node_modules_indices = [
index
for index, component in enumerate(relative_parts)
if component == "node_modules"
]
package_start = node_modules_indices[-1] + 1 if node_modules_indices else 0
package_parts = relative_parts[package_start:]
if len(package_parts) == 1:
return not package_parts[0].startswith("@")
return (
len(package_parts) == 2
and package_parts[0].startswith("@")
and len(package_parts[0]) > 1
)
def package_json_files(node_modules: Path) -> list[Path]:
def fail_walk(error: OSError) -> None:
raise CollectionError(f"cannot scan {error.filename}: {error.strerror}")
package_files: list[Path] = []
for directory, child_directories, filenames in os.walk(
node_modules, followlinks=False, onerror=fail_walk
):
child_directories.sort()
filenames.sort()
if "package.json" not in filenames:
continue
candidate = Path(directory, "package.json")
if not stat.S_ISREG(candidate.lstat().st_mode):
continue
if is_package_root(candidate, node_modules):
package_files.append(candidate)
return package_files
def require_metadata_text(metadata: dict[str, Any], field: str, source: Path) -> str:
value = metadata.get(field)
if not isinstance(value, str) or not value.strip():
raise CollectionError(f"{source}: {field!r} must be a non-empty string")
value = value.strip()
if any(ord(character) < 32 or ord(character) == 127 for character in value):
raise CollectionError(f"{source}: {field!r} contains control characters")
return value
def require_plain_text(value: Any, description: str, source: Path) -> str:
if not isinstance(value, str) or not value.strip():
raise CollectionError(f"{source}: {description} must be a non-empty string")
value = value.strip()
if any(ord(character) < 32 or ord(character) == 127 for character in value):
raise CollectionError(f"{source}: {description} contains control characters")
return value
def validate_package_name(name: str, source: Path) -> None:
components = name.split("/")
valid_scope = (
len(components) == 2
and components[0].startswith("@")
and len(components[0]) > 1
)
if not (len(components) == 1 and not name.startswith("@")) and not valid_scope:
raise CollectionError(f"{source}: invalid npm package name {name!r}")
if any(component in {"", ".", ".."} for component in components):
raise CollectionError(f"{source}: invalid npm package name {name!r}")
if "\\" in name:
raise CollectionError(f"{source}: invalid npm package name {name!r}")
def describe_license_entry(value: Any, source: Path) -> str:
if isinstance(value, str):
return require_plain_text(value, "license", source)
if isinstance(value, dict):
description = require_plain_text(
value.get("type"), "license object type", source
)
license_url = value.get("url")
if license_url is not None:
description += (
f" ({require_plain_text(license_url, 'license URL', source)})"
)
return description
raise CollectionError(f"{source}: license metadata has an unsupported form")
def declared_license(metadata: dict[str, Any], source: Path) -> str:
if "license" in metadata:
return describe_license_entry(metadata["license"], source)
legacy_licenses = metadata.get("licenses")
if not isinstance(legacy_licenses, list) or not legacy_licenses:
raise CollectionError(f"{source}: package has no declared license")
descriptions = sorted(
{describe_license_entry(value, source) for value in legacy_licenses}
)
return "; ".join(descriptions)
def notice_files(package_root: Path) -> dict[str, bytes]:
notices: dict[str, bytes] = {}
with os.scandir(package_root) as entries:
for entry in sorted(entries, key=lambda candidate: candidate.name):
if not NOTICE_FILE_PATTERN.match(entry.name):
continue
if not entry.is_file(follow_symlinks=False):
continue
notices[entry.name] = Path(entry.path).read_bytes()
return notices
def output_component(value: str, *, safe: str) -> str:
return quote(value, safe=safe)
def collect(node_modules: Path, destination: Path) -> int:
if not node_modules.is_dir():
raise CollectionError(f"node_modules directory does not exist: {node_modules}")
packages: dict[tuple[str, str], tuple[str, dict[str, bytes], Path]] = {}
for package_file in package_json_files(node_modules):
try:
metadata = json.loads(package_file.read_text(encoding="utf-8"))
except (OSError, UnicodeError, json.JSONDecodeError) as error:
raise CollectionError(f"cannot read {package_file}: {error}") from error
if not isinstance(metadata, dict):
raise CollectionError(f"{package_file}: package metadata must be an object")
name = require_metadata_text(metadata, "name", package_file)
version = require_metadata_text(metadata, "version", package_file)
validate_package_name(name, package_file)
license_description = declared_license(metadata, package_file)
notices = notice_files(package_file.parent)
key = (name, version)
previous = packages.get(key)
if previous is not None:
previous_license, previous_notices, previous_source = previous
if previous_license != license_description or previous_notices != notices:
raise CollectionError(
f"conflicting contents for {name}@{version}: "
f"{previous_source} and {package_file}"
)
continue
packages[key] = (license_description, notices, package_file)
if not packages:
raise CollectionError(f"no npm packages found below {node_modules}")
destination_parent = destination.parent
destination_parent.mkdir(parents=True, exist_ok=True)
temporary = Path(
tempfile.mkdtemp(prefix=f".{destination.name}.", dir=destination_parent)
)
try:
temporary.chmod(0o755)
notice_lines = [
"Echoion frontend third-party notices",
"",
"Generated from the installed npm dependency tree.",
"Packages are sorted by name and version.",
"",
]
output_directories: set[str] = set()
for (name, version), (license_description, notices, _) in sorted(
packages.items()
):
directory_name = (
output_component(name, safe="@._+-")
+ "@"
+ output_component(version, safe="._+-")
)
if directory_name in output_directories:
raise CollectionError(
f"output-name collision while collecting {name}@{version}"
)
output_directories.add(directory_name)
package_destination = temporary / directory_name
package_destination.mkdir(mode=0o755)
package_destination.chmod(0o755)
copied_files: list[str] = []
for filename, contents in sorted(notices.items()):
output_name = output_component(filename, safe="._+-")
target = package_destination / output_name
target.write_bytes(contents)
target.chmod(0o644)
copied_files.append(f"{directory_name}/{output_name}")
notice_lines.append(f"Package: {name}@{version}")
notice_lines.append(f"Declared license: {license_description}")
if copied_files:
notice_lines.append("Notice files:")
notice_lines.extend(f" {filename}" for filename in copied_files)
else:
notice_lines.append("Notice files: none published at package root")
notice_lines.append("")
notices_path = temporary / "THIRD-PARTY-NOTICES.txt"
notices_path.write_text("\n".join(notice_lines), encoding="utf-8", newline="\n")
notices_path.chmod(0o644)
if destination.is_symlink() or (
destination.exists() and not destination.is_dir()
):
raise CollectionError(
f"destination is not a regular directory: {destination}"
)
if destination.exists():
shutil.rmtree(destination)
os.replace(temporary, destination)
except BaseException:
shutil.rmtree(temporary, ignore_errors=True)
raise
return len(packages)
def parse_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="collect npm dependency licenses for an Echoion release"
)
parser.add_argument("--node-modules", required=True, type=Path)
parser.add_argument("--output", required=True, type=Path)
return parser.parse_args()
def main() -> int:
arguments = parse_arguments()
try:
count = collect(
arguments.node_modules.resolve(),
Path(os.path.abspath(arguments.output)),
)
except (CollectionError, OSError) as error:
print(f"collect-frontend-licenses: {error}", file=sys.stderr)
return 2
print(f"Collected notices for {count} frontend npm packages.")
return 0
if __name__ == "__main__":
raise SystemExit(main())
-27
View File
@@ -1,27 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 1 ]]; then
echo "usage: $0 BUILD_DIR" >&2
exit 2
fi
cache=$(realpath -e -- "$1/CMakeCache.txt")
compiler=
while IFS= read -r line; do
case $line in
CMAKE_CXX_COMPILER:FILEPATH=* | CMAKE_CXX_COMPILER:STRING=*)
[[ -z $compiler ]] || {
echo "duplicate CMAKE_CXX_COMPILER entries in $cache" >&2
exit 2
}
compiler=${line#*=}
;;
esac
done <"$cache"
[[ $compiler == /* && -x $compiler ]] || {
echo "CMake cache has no executable absolute C++ compiler: $cache" >&2
exit 2
}
realpath -e -- "$compiler"
-210
View File
@@ -1,210 +0,0 @@
#!/usr/bin/env python3
"""Generate Echoion's deterministic v2 immutable-payload manifest."""
from __future__ import annotations
import argparse
import hashlib
import json
import os
from pathlib import Path, PurePosixPath
import re
import stat
import tempfile
VERSION_PATTERN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")
IMMUTABLE_ROOTS = ("bin", "lib", "service", "share")
UNSAFE_WRITABLE_MODE = stat.S_IWGRP | stat.S_IWOTH
def sha256(path: Path) -> str:
digest = hashlib.sha256()
with path.open("rb") as source:
for block in iter(lambda: source.read(1024 * 1024), b""):
digest.update(block)
return digest.hexdigest()
def safe_symlink_target(root: Path, path: Path) -> str:
target = os.readlink(path)
target_path = PurePosixPath(target)
target_components = target.split("/")
if (
not target
or target_path.is_absolute()
or any(component in ("", ".", "..") for component in target_components)
):
raise ValueError(f"unsafe symlink target for {path}: {target!r}")
try:
resolved = path.resolve(strict=True)
resolved.relative_to(root)
except (FileNotFoundError, RuntimeError, ValueError) as error:
raise ValueError(f"symlink escapes the payload or is dangling: {path}") from error
return target
def reject_unsafe_writable_mode(path: Path, metadata: os.stat_result) -> None:
if metadata.st_mode & UNSAFE_WRITABLE_MODE:
raise ValueError(f"immutable payload path is group- or world-writable: {path}")
def collect_entries(root: Path) -> list[dict[str, object]]:
entries: list[dict[str, object]] = []
root_metadata = root.lstat()
if not stat.S_ISDIR(root_metadata.st_mode) or root.is_symlink():
raise ValueError(f"immutable payload root is not a directory: {root}")
reject_unsafe_writable_mode(root, root_metadata)
pending = [root / name for name in IMMUTABLE_ROOTS]
for directory in pending:
try:
metadata = directory.lstat()
except FileNotFoundError as error:
raise ValueError(
f"missing immutable payload directory: {directory}"
) from error
if not stat.S_ISDIR(metadata.st_mode) or directory.is_symlink():
raise ValueError(f"missing immutable payload directory: {directory}")
reject_unsafe_writable_mode(directory, metadata)
while pending:
directory = pending.pop()
with os.scandir(directory) as iterator:
children = sorted(iterator, key=lambda item: item.name)
for child in children:
path = Path(child.path)
relative = path.relative_to(root).as_posix()
metadata = path.lstat()
if stat.S_ISLNK(metadata.st_mode):
entries.append(
{
"path": relative,
"type": "symlink",
"target": safe_symlink_target(root, path),
}
)
elif stat.S_ISDIR(metadata.st_mode):
reject_unsafe_writable_mode(path, metadata)
pending.append(path)
elif stat.S_ISREG(metadata.st_mode):
reject_unsafe_writable_mode(path, metadata)
if metadata.st_size > (1 << 53) - 1:
raise ValueError(f"payload file is too large for the manifest: {path}")
entries.append(
{
"path": relative,
"type": "file",
"size": metadata.st_size,
"sha256": sha256(path),
"mode": f"{stat.S_IMODE(metadata.st_mode):04o}",
}
)
else:
raise ValueError(f"unsupported special file in payload: {path}")
entries.sort(key=lambda entry: str(entry["path"]))
return entries
def write_manifest(
root: Path,
version: str,
build_type: str,
build_signature: str,
output: Path,
) -> None:
entries = collect_entries(root)
regular_files = {
str(entry["path"]) for entry in entries if entry["type"] == "file"
}
executable = "bin/echoiond"
updater = "bin/echoion-updater"
core = "lib/Echoion.ts"
web_index = "share/echoion/web/index.html"
required_support = (
"share/echoion/config.example.json",
"share/echoion/tools/validate-release-manifest.py",
"service/echoion.service.in",
"service/echoion-updater.service.in",
"service/echoion-updater.timer.in",
)
for description, required in (
("executable", executable),
("updater", updater),
("Core library", core),
("web dashboard entry point", web_index),
):
if required not in regular_files:
raise ValueError(f"manifest {description} is missing: {required}")
for required in required_support:
if required not in regular_files:
raise ValueError(f"manifest installer support file is missing: {required}")
for required in (executable, updater):
if not os.access(root / required, os.X_OK):
raise ValueError(f"manifest executable is not executable: {required}")
manifest = {
"schemaVersion": 2,
"version": version,
"buildType": build_type,
"buildSignature": build_signature,
"executable": executable,
"updater": updater,
"core": core,
"files": entries,
}
output.parent.mkdir(parents=True, exist_ok=True)
descriptor, temporary_name = tempfile.mkstemp(
prefix=f".{output.name}.", dir=output.parent
)
try:
with os.fdopen(descriptor, "w", encoding="utf-8", newline="\n") as stream:
json.dump(manifest, stream, ensure_ascii=False, indent=2)
stream.write("\n")
os.chmod(temporary_name, 0o644)
os.replace(temporary_name, output)
except BaseException:
try:
os.unlink(temporary_name)
except FileNotFoundError:
pass
raise
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--root", required=True, type=Path)
parser.add_argument("--version", required=True)
parser.add_argument(
"--build-type",
choices=("RelWithDebInfo",),
default="RelWithDebInfo",
)
parser.add_argument("--build-signature")
parser.add_argument("--output", type=Path)
arguments = parser.parse_args()
if not VERSION_PATTERN.fullmatch(arguments.version):
parser.error("version must contain only letters, digits, dot, underscore, or dash")
root = arguments.root.resolve(strict=True)
output = arguments.output or root / "manifest.json"
build_signature = arguments.build_signature or f"development:{arguments.version}"
if (
not build_signature
or len(build_signature) > 256
or any(character in build_signature for character in "\r\n\0")
):
parser.error("build signature must be 1-256 characters without controls")
write_manifest(
root,
arguments.version,
arguments.build_type,
build_signature,
output,
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
-333
View File
@@ -1,333 +0,0 @@
#!/usr/bin/env python3
"""Generate an Echoion component feed payload and optional signature envelope."""
from __future__ import annotations
import argparse
import base64
from datetime import datetime, timedelta, timezone
import hashlib
import json
import os
from pathlib import Path
import re
import stat
import subprocess
import tempfile
from typing import NoReturn
SAFE_TOKEN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$")
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)"
r"(?:-((?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)"
r"(?:\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?"
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
def fail(message: str) -> NoReturn:
raise SystemExit(f"generate-update-feed: {message}")
def regular_file(path: Path, description: str) -> Path:
try:
metadata = path.lstat()
except OSError as error:
fail(f"cannot inspect {description} {path}: {error}")
if not stat.S_ISREG(metadata.st_mode) or path.is_symlink():
fail(f"{description} is not a regular file: {path}")
return path.resolve(strict=True)
def digest(path: Path) -> str:
result = hashlib.sha256()
with path.open("rb") as stream:
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
result.update(chunk)
return result.hexdigest()
def timestamp(value: str, label: str) -> datetime:
if not re.fullmatch(r"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z", value):
fail(f"{label} must use UTC YYYY-MM-DDTHH:MM:SSZ format")
try:
return datetime.strptime(value, "%Y-%m-%dT%H:%M:%SZ").replace(
tzinfo=timezone.utc
)
except ValueError as error:
fail(f"invalid {label}: {error}")
def format_timestamp(value: datetime) -> str:
return value.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
def parse_contract(values: list[str], label: str) -> dict[str, str]:
result: dict[str, str] = {}
for value in values:
name, separator, contract = value.partition("=")
if (
not separator
or not SAFE_TOKEN.fullmatch(name)
or not contract
or any(character in contract for character in "\r\n\0")
or name in result
):
fail(f"invalid or duplicate {label}: {value!r}")
result[name] = contract
return dict(sorted(result.items()))
def atomic_write(path: Path, content: bytes, mode: int = 0o644) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
descriptor, temporary_name = tempfile.mkstemp(
prefix=f".{path.name}.", dir=path.parent
)
temporary = Path(temporary_name)
try:
os.fchmod(descriptor, mode)
with os.fdopen(descriptor, "wb", closefd=True) as stream:
descriptor = -1
stream.write(content)
stream.flush()
os.fsync(stream.fileno())
os.replace(temporary, path)
directory = os.open(path.parent, os.O_RDONLY | os.O_DIRECTORY)
try:
os.fsync(directory)
finally:
os.close(directory)
finally:
if descriptor >= 0:
os.close(descriptor)
temporary.unlink(missing_ok=True)
def urlsafe(data: bytes) -> str:
return base64.urlsafe_b64encode(data).rstrip(b"=").decode("ascii")
def sign_payload(payload: Path, private_key: Path) -> bytes:
with tempfile.NamedTemporaryFile(prefix="echoion-feed-signature.") as signature:
command = [
"openssl",
"pkeyutl",
"-sign",
"-rawin",
"-inkey",
os.fspath(private_key),
"-in",
os.fspath(payload),
"-out",
signature.name,
]
try:
completed = subprocess.run(
command,
check=False,
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except FileNotFoundError:
fail("openssl is required to sign an update feed")
if completed.returncode != 0:
detail = completed.stderr.decode("utf-8", errors="replace").strip()
fail(f"OpenSSL could not sign the feed: {detail}")
value = Path(signature.name).read_bytes()
if len(value) != 64:
fail(f"OpenSSL returned an invalid Ed25519 signature size: {len(value)}")
return value
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--artifact", type=Path, required=True)
parser.add_argument("--manifest", type=Path)
parser.add_argument("--component", default="runtime")
parser.add_argument("--artifact-id", default="")
parser.add_argument("--package-type")
parser.add_argument("--version", required=True)
parser.add_argument("--url", required=True)
parser.add_argument("--channel", default="stable")
parser.add_argument("--feed-id", default="echoion-runtime")
parser.add_argument("--sequence", type=int)
parser.add_argument("--generated-at")
parser.add_argument("--expires-at")
parser.add_argument("--valid-days", type=int, default=30)
parser.add_argument("--cohort", default="linux-glibc-2.35")
parser.add_argument("--platform", default="linux")
parser.add_argument("--architecture", default="x86_64")
parser.add_argument("--version-contract", action="append", default=[])
parser.add_argument("--exact-contract", action="append", default=[])
parser.add_argument("--output-payload", type=Path, required=True)
parser.add_argument("--output-envelope", type=Path)
parser.add_argument("--key-id")
parser.add_argument("--private-key", type=Path)
arguments = parser.parse_args()
for label, value in (
("feed id", arguments.feed_id),
("component", arguments.component),
("channel", arguments.channel),
("cohort", arguments.cohort),
("platform", arguments.platform),
("architecture", arguments.architecture),
):
if not SAFE_TOKEN.fullmatch(value):
fail(f"invalid {label}: {value!r}")
if arguments.artifact_id and not SAFE_TOKEN.fullmatch(arguments.artifact_id):
fail(f"invalid artifact id: {arguments.artifact_id!r}")
package_type = arguments.package_type or (
"tar.zst"
if arguments.component in {"runtime", "executable"}
else "shared-library"
)
if not SAFE_TOKEN.fullmatch(package_type):
fail(f"invalid package type: {package_type!r}")
if arguments.component in {"plugin", "plugins"} and not arguments.artifact_id:
fail("plugin feeds require --artifact-id")
if not SEMVER.fullmatch(arguments.version):
fail(f"version is not strict SemVer: {arguments.version!r}")
if not arguments.url or any(
character in arguments.url for character in "\r\n\0"
):
fail("artifact URL is empty or contains a control character")
if arguments.valid_days < 1 or arguments.valid_days > 365:
fail("--valid-days must be between 1 and 365")
artifact = regular_file(arguments.artifact, f"{arguments.component} artifact")
manifest_path = (
regular_file(arguments.manifest, "release manifest")
if arguments.manifest
else None
)
if arguments.component in {"runtime", "executable"}:
if manifest_path is None:
fail("runtime feeds require --manifest")
try:
with manifest_path.open(encoding="utf-8") as stream:
manifest = json.load(stream)
except (OSError, json.JSONDecodeError) as error:
fail(f"cannot parse release manifest: {error}")
if (
not isinstance(manifest, dict)
or manifest.get("schemaVersion") != 2
or manifest.get("version") != arguments.version
or manifest.get("buildType") != "RelWithDebInfo"
or not isinstance(manifest.get("buildSignature"), str)
or not manifest["buildSignature"]
or len(manifest["buildSignature"]) > 256
or any(
character in manifest["buildSignature"] for character in "\r\n\0"
)
):
fail(
"release manifest schema/version/build type/signature does not match the feed"
)
source_epoch = os.environ.get("SOURCE_DATE_EPOCH")
if arguments.generated_at:
generated = timestamp(arguments.generated_at, "generated timestamp")
elif source_epoch is not None and source_epoch.isdigit():
generated = datetime.fromtimestamp(int(source_epoch), timezone.utc)
else:
generated = datetime.now(timezone.utc).replace(microsecond=0)
expires = (
timestamp(arguments.expires_at, "expiry timestamp")
if arguments.expires_at
else generated + timedelta(days=arguments.valid_days)
)
if expires <= generated:
fail("feed expiry must be after its generated timestamp")
sequence = arguments.sequence
if sequence is None:
sequence = int(generated.timestamp())
if sequence < 0 or sequence > (1 << 64) - 1:
fail("feed sequence is outside the uint64 range")
release = {
"component": arguments.component,
"artifactId": arguments.artifact_id,
"channel": arguments.channel,
"version": arguments.version,
"cohort": arguments.cohort,
"platform": arguments.platform,
"arch": arguments.architecture,
"url": arguments.url,
"size": artifact.stat().st_size,
"sha256": digest(artifact),
"packageType": package_type,
"compatibility": {
"versionContracts": parse_contract(
arguments.version_contract, "version contract"
),
"exactContracts": parse_contract(
arguments.exact_contract, "exact contract"
),
},
}
if manifest_path is not None:
release["releaseManifestSha256"] = digest(manifest_path)
release["buildType"] = manifest["buildType"]
release["buildSignature"] = manifest["buildSignature"]
payload_document = {
"schemaVersion": 1,
"feedId": arguments.feed_id,
"sequence": sequence,
"generatedAt": format_timestamp(generated),
"expiresAt": format_timestamp(expires),
"releases": [release],
}
payload = (
json.dumps(payload_document, ensure_ascii=False, indent=2).encode("utf-8")
+ b"\n"
)
output_payload = arguments.output_payload.resolve()
forbidden = {artifact}
if manifest_path is not None:
forbidden.add(manifest_path)
if arguments.private_key:
private_key = regular_file(arguments.private_key, "Ed25519 private key")
if private_key.stat().st_mode & 0o077:
fail("Ed25519 private key must not be accessible by group or others")
forbidden.add(private_key)
else:
private_key = None
if output_payload in forbidden:
fail("output payload would overwrite an input file")
atomic_write(output_payload, payload)
signing_requested = any(
value is not None
for value in (arguments.output_envelope, arguments.key_id, private_key)
)
if not signing_requested:
return
if not arguments.output_envelope or not arguments.key_id or not private_key:
fail("--output-envelope, --key-id, and --private-key are required together")
if not SAFE_TOKEN.fullmatch(arguments.key_id):
fail(f"invalid signing key id: {arguments.key_id!r}")
output_envelope = arguments.output_envelope.resolve()
if output_envelope in forbidden or output_envelope == output_payload:
fail("output envelope would overwrite an input or payload file")
signature = sign_payload(output_payload, private_key)
envelope = {
"schemaVersion": 3,
"keyId": arguments.key_id,
"document": payload_document,
"signedPayload": urlsafe(payload),
"signature": urlsafe(signature),
}
atomic_write(
output_envelope,
json.dumps(envelope, ensure_ascii=False, indent=2).encode("utf-8") + b"\n",
)
if __name__ == "__main__":
main()
-818
View File
@@ -1,818 +0,0 @@
#!/usr/bin/env python3
"""Publish verified, idempotent Gitea releases and prune old nightlies."""
from __future__ import annotations
import argparse
from datetime import datetime
import hashlib
import http.client
import json
import mimetypes
import os
from pathlib import Path
import re
import secrets
import stat
import sys
import time
from typing import Any, NoReturn
from urllib.error import HTTPError, URLError
from urllib.parse import quote, urlencode, urljoin, urlsplit
from urllib.request import HTTPRedirectHandler, Request, build_opener
MAX_JSON_BYTES = 8 * 1024 * 1024
UPLOAD_CHUNK_BYTES = 1024 * 1024
SAFE_NAME = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+-]{0,255}$")
RELEASE_TAG_VERSION = re.compile(
r"^v(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)"
r"(?:-((?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)"
r"(?:\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?"
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
CMAKE_PROJECT_VERSION = re.compile(
r"\bproject\s*\(\s*Echoion\b[^)]*?\bVERSION\s+"
r"(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)(?=\s|\))",
re.IGNORECASE | re.DOTALL,
)
MAX_CMAKE_BYTES = 1024 * 1024
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, *_args: Any, **_kwargs: Any) -> None:
return None
def fail(message: str) -> NoReturn:
raise SystemExit(f"gitea-release: {message}")
def sha256(path: Path) -> str:
digest = hashlib.sha256()
with path.open("rb") as stream:
for chunk in iter(lambda: stream.read(UPLOAD_CHUNK_BYTES), b""):
digest.update(chunk)
return digest.hexdigest()
def validate_regular_file(path: Path) -> Path:
try:
metadata = path.lstat()
except OSError as error:
fail(f"cannot inspect artifact {path}: {error}")
if not stat.S_ISREG(metadata.st_mode) or path.is_symlink():
fail(f"artifact is not a regular file: {path}")
if not SAFE_NAME.fullmatch(path.name):
fail(f"artifact has an unsafe filename: {path}")
return path.resolve(strict=True)
class GiteaApi:
def __init__(
self,
base_url: str,
token: str,
*,
allow_http: bool = False,
timeout_seconds: int = 120,
) -> None:
self.base_url = base_url.rstrip("/") + "/"
parsed = urlsplit(self.base_url)
loopback = parsed.hostname in {"127.0.0.1", "::1", "localhost"}
if parsed.scheme != "https" and not (
allow_http and parsed.scheme == "http" and loopback
):
fail("the Gitea API URL must use HTTPS")
if (
not parsed.hostname
or parsed.username
or parsed.password
or parsed.query
or parsed.fragment
):
fail("the Gitea API URL is malformed or contains credentials")
if not token or any(character in token for character in "\r\n\0"):
fail("the release token is empty or contains a control character")
self._parsed = parsed
self._token = token
self._timeout_seconds = timeout_seconds
self._opener = build_opener(NoRedirect)
def url(self, path: str) -> str:
return urljoin(self.base_url, path.lstrip("/"))
@property
def headers(self) -> dict[str, str]:
return {
"Accept": "application/json",
"Authorization": f"token {self._token}",
"User-Agent": "echoion-gitea-release/1",
}
def request_json(
self,
method: str,
path: str,
document: dict[str, Any] | None = None,
*,
allowed_statuses: tuple[int, ...] = (200,),
) -> tuple[int, Any | None]:
body = None
headers = self.headers
if document is not None:
body = json.dumps(document, separators=(",", ":")).encode("utf-8")
headers = {**headers, "Content-Type": "application/json"}
request = Request(self.url(path), data=body, headers=headers, method=method)
try:
with self._opener.open(request, timeout=self._timeout_seconds) as response:
status = response.status
content = response.read(MAX_JSON_BYTES + 1)
except HTTPError as error:
status = error.code
content = error.read(64 * 1024)
except (OSError, URLError) as error:
fail(f"{method} {path} failed: {error}")
if status not in allowed_statuses:
detail = content.decode("utf-8", errors="replace").strip()
fail(f"{method} {path} returned HTTP {status}: {detail[:1000]}")
if len(content) > MAX_JSON_BYTES:
fail(f"{method} {path} returned an oversized JSON response")
if not content:
return status, None
try:
return status, json.loads(content)
except json.JSONDecodeError as error:
fail(f"{method} {path} returned invalid JSON: {error}")
def upload_asset(self, release_id: int, artifact: Path) -> dict[str, Any]:
boundary = f"echoion-{secrets.token_hex(24)}"
mime_type = mimetypes.guess_type(artifact.name)[0] or "application/octet-stream"
prefix = (
f"--{boundary}\r\n"
f'Content-Disposition: form-data; name="attachment"; '
f'filename="{artifact.name}"\r\n'
f"Content-Type: {mime_type}\r\n\r\n"
).encode("utf-8")
suffix = f"\r\n--{boundary}--\r\n".encode("ascii")
content_length = len(prefix) + artifact.stat().st_size + len(suffix)
query = urlencode({"name": artifact.name})
relative = (
f"repos/{quote_owner(self.owner)}/{quote_owner(self.repo)}/releases/"
f"{release_id}/assets?{query}"
)
target = urlsplit(self.url(relative))
connection_type = (
http.client.HTTPSConnection
if target.scheme == "https"
else http.client.HTTPConnection
)
connection = connection_type(
target.hostname,
target.port,
timeout=self._timeout_seconds,
)
try:
request_target = target.path + (f"?{target.query}" if target.query else "")
connection.putrequest("POST", request_target)
for name, value in self.headers.items():
connection.putheader(name, value)
connection.putheader("Content-Type", f"multipart/form-data; boundary={boundary}")
connection.putheader("Content-Length", str(content_length))
connection.endheaders()
connection.send(prefix)
with artifact.open("rb") as stream:
for chunk in iter(lambda: stream.read(UPLOAD_CHUNK_BYTES), b""):
connection.send(chunk)
connection.send(suffix)
response = connection.getresponse()
content = response.read(MAX_JSON_BYTES + 1)
status = response.status
except OSError as error:
fail(f"uploading {artifact.name} failed: {error}")
finally:
connection.close()
if status != 201:
detail = content.decode("utf-8", errors="replace").strip()
fail(f"uploading {artifact.name} returned HTTP {status}: {detail[:1000]}")
if len(content) > MAX_JSON_BYTES:
fail(f"uploading {artifact.name} returned oversized JSON")
try:
result = json.loads(content)
except json.JSONDecodeError as error:
fail(f"uploading {artifact.name} returned invalid JSON: {error}")
if not isinstance(result, dict):
fail(f"uploading {artifact.name} returned an invalid asset")
return result
def bind_repository(self, owner: str, repo: str) -> None:
self.owner = owner
self.repo = repo
def remote_sha256(self, download_url: str) -> tuple[int, str]:
target = urljoin(self.base_url, download_url)
parsed = urlsplit(target)
base = self._parsed
parsed_port = parsed.port or (443 if parsed.scheme == "https" else 80)
base_port = base.port or (443 if base.scheme == "https" else 80)
if (
parsed.scheme != base.scheme
or parsed.hostname != base.hostname
or parsed_port != base_port
or parsed.username
or parsed.password
or parsed.fragment
):
fail(f"Gitea returned an untrusted asset URL: {download_url!r}")
request = Request(target, headers=self.headers, method="GET")
for attempt in range(4):
result = hashlib.sha256()
size = 0
try:
with self._opener.open(
request, timeout=self._timeout_seconds
) as response:
if response.status != 200:
fail(
"downloading an asset returned "
f"HTTP {response.status}"
)
while chunk := response.read(UPLOAD_CHUNK_BYTES):
size += len(chunk)
result.update(chunk)
return size, result.hexdigest()
except HTTPError as error:
fail(f"downloading an asset for verification failed: {error}")
except (OSError, URLError) as error:
if attempt == 3:
fail(
"downloading an asset for verification failed "
f"after retries: {error}"
)
time.sleep(2**attempt)
raise AssertionError("unreachable")
def quote_owner(value: str) -> str:
if not SAFE_NAME.fullmatch(value):
fail(f"invalid repository name: {value!r}")
return quote(value, safe="")
def repository_path(owner: str, repo: str) -> str:
return f"repos/{quote_owner(owner)}/{quote_owner(repo)}"
def load_artifacts(directory: Path) -> dict[str, Path]:
try:
entries = [entry for entry in directory.rglob("*") if entry.is_file()]
except OSError as error:
fail(f"cannot enumerate artifact directory {directory}: {error}")
artifacts: dict[str, Path] = {}
for entry in sorted(entries, key=lambda value: value.name):
path = validate_regular_file(entry)
if path.name in artifacts:
fail(f"duplicate artifact filename: {path.name}")
artifacts[path.name] = path
if not artifacts:
fail("the artifact directory is empty")
return artifacts
def release_body(arguments: argparse.Namespace) -> str:
if arguments.body_file is None:
body = arguments.body
if "\0" in body or len(body.encode("utf-8")) > 1024 * 1024:
fail("the release body is invalid or too large")
return body
path = validate_regular_file(arguments.body_file)
if path.stat().st_size > 1024 * 1024:
fail("the release body file is too large")
try:
body = path.read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError) as error:
fail(f"cannot read release body file {path}: {error}")
if "\0" in body:
fail("the release body contains a NUL byte")
return body
def release_assets(release: dict[str, Any]) -> list[dict[str, Any]]:
assets = release.get("assets", [])
if not isinstance(assets, list) or not all(isinstance(asset, dict) for asset in assets):
fail("Gitea returned an invalid release asset list")
return assets
def verify_asset_metadata(
release: dict[str, Any], artifacts: dict[str, Path]
) -> dict[str, dict[str, Any]]:
remote: dict[str, dict[str, Any]] = {}
for asset in release_assets(release):
name = asset.get("name")
if not isinstance(name, str) or not name or name in remote:
fail("Gitea returned missing or duplicate release asset names")
remote[name] = asset
if set(remote) != set(artifacts):
missing = sorted(set(artifacts) - set(remote))
extra = sorted(set(remote) - set(artifacts))
fail(f"release asset set mismatch (missing={missing}, extra={extra})")
for name, path in artifacts.items():
asset = remote[name]
expected_size = path.stat().st_size
if asset.get("size") != expected_size:
fail(f"Gitea metadata size mismatch for {name}")
return remote
def verify_assets(
api: GiteaApi,
release: dict[str, Any],
artifacts: dict[str, Path],
) -> None:
remote = verify_asset_metadata(release, artifacts)
for name, path in artifacts.items():
asset = remote[name]
download_url = asset.get("browser_download_url")
if not isinstance(download_url, str) or not download_url:
fail(f"Gitea returned no download URL for {name}")
expected_size = path.stat().st_size
actual_size, actual_hash = api.remote_sha256(download_url)
if actual_size != expected_size or actual_hash != sha256(path):
fail(f"download verification failed for {name}")
def verify_release_metadata(
release: dict[str, Any],
*,
tag: str,
name: str,
body: str,
prerelease: bool,
) -> None:
expected = {
"tag_name": tag,
"name": name,
"body": body,
"prerelease": prerelease,
}
mismatched = [field for field, value in expected.items() if release.get(field) != value]
if mismatched:
fail(f"release metadata mismatch: {', '.join(mismatched)}")
def verify_tag_target(
api: GiteaApi, base: str, tag: str, expected_commit: str
) -> None:
if not tag_target_exists(api, base, tag, expected_commit):
fail("the release tag does not exist")
def validate_tag_target(document: Any, expected_commit: str) -> None:
if (
not isinstance(document, dict)
or not isinstance(document.get("commit"), dict)
or document["commit"].get("sha") != expected_commit
):
fail("the release tag does not target the requested commit")
def tag_target_exists(
api: GiteaApi,
base: str,
tag: str,
expected_commit: str,
) -> bool:
tag_path = quote(tag, safe="")
status, document = api.request_json(
"GET",
f"{base}/tags/{tag_path}",
allowed_statuses=(200, 404),
)
if status == 404:
return False
validate_tag_target(document, expected_commit)
return True
def publish(arguments: argparse.Namespace, api: GiteaApi) -> None:
owner = arguments.owner
repo = arguments.repo
api.bind_repository(owner, repo)
base = repository_path(owner, repo)
artifacts = load_artifacts(arguments.artifacts)
body = release_body(arguments)
tag = arguments.tag
if not SAFE_NAME.fullmatch(tag):
fail("the release tag is invalid")
if not re.fullmatch(r"(?:[0-9a-f]{40}|[0-9a-f]{64})", arguments.target):
fail("the release target must be a full commit object id")
if (
not arguments.name
or len(arguments.name) > 255
or any(character in arguments.name for character in "\r\n\0")
):
fail("the release name is invalid")
is_nightly = arguments.prerelease and tag.startswith("nightly-")
if arguments.allow_missing_draft_tag and not is_nightly:
fail("--allow-missing-draft-tag is restricted to nightly-* prereleases")
tag_exists = tag_target_exists(
api,
base,
tag,
arguments.target,
)
if not tag_exists and not is_nightly:
fail("the release tag does not exist")
tag_path = quote(tag, safe="")
status, release = api.request_json(
"GET",
f"{base}/releases/tags/{tag_path}",
allowed_statuses=(200, 404),
)
if status == 404:
_, release = api.request_json(
"POST",
f"{base}/releases",
{
"tag_name": tag,
"target_commitish": arguments.target,
"name": arguments.name,
"body": body,
"draft": True,
"prerelease": arguments.prerelease,
},
allowed_statuses=(201,),
)
if not isinstance(release, dict) or not isinstance(release.get("id"), int):
fail("Gitea returned an invalid release")
if release.get("tag_name") != tag:
fail("Gitea returned a release for the wrong tag")
release_id = release["id"]
if not release.get("draft", False):
if not tag_exists:
fail("a published release has no Git tag")
verify_release_metadata(
release,
tag=tag,
name=arguments.name,
body=body,
prerelease=arguments.prerelease,
)
verify_assets(api, release, artifacts)
print(f"release {tag} is already published and verified")
return
api.request_json(
"PATCH",
f"{base}/releases/{release_id}",
{
"name": arguments.name,
"body": body,
"draft": True,
"prerelease": arguments.prerelease,
"target_commitish": arguments.target,
},
allowed_statuses=(200,),
)
for asset in release_assets(release):
asset_id = asset.get("id")
if not isinstance(asset_id, int):
fail("Gitea returned an invalid release asset id")
api.request_json(
"DELETE",
f"{base}/releases/{release_id}/assets/{asset_id}",
allowed_statuses=(204, 404),
)
for artifact in artifacts.values():
api.upload_asset(release_id, artifact)
_, release = api.request_json(
"GET", f"{base}/releases/{release_id}", allowed_statuses=(200,)
)
if not isinstance(release, dict):
fail("Gitea returned an invalid release after upload")
verify_release_metadata(
release,
tag=tag,
name=arguments.name,
body=body,
prerelease=arguments.prerelease,
)
# Gitea deliberately returns 404 for draft download URLs to Actions task
# tokens, even when that task created the release. Validate the complete
# asset set and sizes while the release is private, then publish briefly
# for byte-for-byte download verification. A failed verification is moved
# back to draft before the error is reported.
verify_asset_metadata(release, artifacts)
_, release = api.request_json(
"PATCH",
f"{base}/releases/{release_id}",
{
"name": arguments.name,
"body": body,
"draft": False,
"prerelease": arguments.prerelease,
"target_commitish": arguments.target,
},
allowed_statuses=(200,),
)
if not isinstance(release, dict) or release.get("draft", True):
fail("Gitea did not publish the verified draft")
verify_release_metadata(
release,
tag=tag,
name=arguments.name,
body=body,
prerelease=arguments.prerelease,
)
try:
verify_assets(api, release, artifacts)
except SystemExit:
try:
api.request_json(
"PATCH",
f"{base}/releases/{release_id}",
{
"name": arguments.name,
"body": body,
"draft": True,
"prerelease": arguments.prerelease,
"target_commitish": arguments.target,
},
allowed_statuses=(200,),
)
except SystemExit:
pass
raise
verify_tag_target(api, base, tag, arguments.target)
print(f"published and verified release {tag} with {len(artifacts)} assets")
def prune_nightlies(arguments: argparse.Namespace, api: GiteaApi) -> None:
base = repository_path(arguments.owner, arguments.repo)
releases = list_releases(api, base)
nightlies = [
release
for release in releases
if release.get("prerelease") is True
and isinstance(release.get("tag_name"), str)
and release["tag_name"].startswith(arguments.tag_prefix)
]
nightlies.sort(
key=lambda release: (
str(release.get("published_at") or release.get("created_at") or ""),
int(release.get("id", -1)),
),
reverse=True,
)
release_ids: set[int] = set()
for release in nightlies:
release_id = release.get("id")
if not isinstance(release_id, int) or release_id in release_ids:
fail("Gitea returned a missing or duplicate nightly release id")
release_ids.add(release_id)
protected = [
release
for release in nightlies
if release["tag_name"] == arguments.protect_tag
]
if len(protected) > 1:
fail("Gitea returned duplicate releases for the protected nightly tag")
ordered_to_keep = [
*protected,
*[
release
for release in nightlies
if not protected or release["id"] != protected[0]["id"]
],
]
retained_ids = {
release["id"] for release in ordered_to_keep[: arguments.keep]
}
deleted = 0
for release in nightlies:
tag = release["tag_name"]
release_id = release["id"]
if release_id in retained_ids:
continue
api.request_json(
"DELETE",
f"{base}/tags/{quote(tag, safe='')}",
allowed_statuses=(204, 404),
)
api.request_json(
"DELETE",
f"{base}/releases/{release_id}",
allowed_statuses=(204, 404),
)
deleted += 1
print(f"kept {len(retained_ids)} nightly releases and deleted {deleted}")
def verify_tag_protection(arguments: argparse.Namespace, api: GiteaApi) -> None:
base = repository_path(arguments.owner, arguments.repo)
_, protections = api.request_json(
"GET", f"{base}/tag_protections", allowed_statuses=(200,)
)
if not isinstance(protections, list) or not all(
isinstance(protection, dict) for protection in protections
):
fail("Gitea returned an invalid tag-protection list")
matches = [
protection
for protection in protections
if protection.get("name_pattern") == arguments.required_pattern
]
if not matches:
fail(f"required protected tag pattern is missing: {arguments.required_pattern}")
if len(matches) != 1:
fail(
"required protected tag pattern is ambiguous: "
f"{arguments.required_pattern}"
)
protection = matches[0]
users = protection.get("whitelist_usernames")
teams = protection.get("whitelist_teams")
if (
not isinstance(users, list)
or not all(isinstance(value, str) and value for value in users)
or not isinstance(teams, list)
or not all(isinstance(value, str) and value for value in teams)
):
fail("Gitea returned an invalid protected-tag allowlist")
if not users and not teams:
fail("the required protected tag pattern has an empty allowlist")
print(
f"verified protected tag pattern {arguments.required_pattern} "
f"(users={len(users)}, teams={len(teams)})"
)
def list_releases(api: GiteaApi, base: str) -> list[dict[str, Any]]:
releases: list[dict[str, Any]] = []
page = 1
while True:
query = urlencode({"limit": 50, "page": page})
_, batch = api.request_json(
"GET", f"{base}/releases?{query}", allowed_statuses=(200,)
)
if not isinstance(batch, list) or not all(
isinstance(release, dict) for release in batch
):
fail("Gitea returned an invalid release page")
releases.extend(batch)
if len(batch) < 50:
return releases
page += 1
if page > 1000:
fail("Gitea release pagination exceeded the safety limit")
def cmake_project_version(path: Path) -> tuple[int, int, int]:
try:
metadata = path.lstat()
if (
not stat.S_ISREG(metadata.st_mode)
or path.is_symlink()
or metadata.st_size > MAX_CMAKE_BYTES
):
fail("the CMake project file must be a small regular file")
content = path.read_text(encoding="utf-8")
except (OSError, UnicodeError) as error:
fail(f"cannot read the CMake project version: {error}")
matches = CMAKE_PROJECT_VERSION.findall(content)
if len(matches) != 1:
fail("the CMake project file must declare one Echoion x.y.z version")
major, minor, patch = matches[0]
return int(major), int(minor), int(patch)
def derive_nightly_version(arguments: argparse.Namespace, api: GiteaApi) -> None:
if not re.fullmatch(r"[0-9]{8}", arguments.date_id):
fail("--date-id must use UTC YYYYMMDD format")
try:
datetime.strptime(arguments.date_id, "%Y%m%d")
except ValueError as error:
fail(f"--date-id is not a valid calendar date: {error}")
if not re.fullmatch(r"[1-9][0-9]*", arguments.run_number):
fail("--run-number must be a positive integer")
base = repository_path(arguments.owner, arguments.repo)
released_versions: list[tuple[int, int, int]] = []
for release in list_releases(api, base):
if (
release.get("draft") is not False
or not isinstance(release.get("published_at"), str)
or not release["published_at"]
):
continue
tag = release.get("tag_name")
match = (
RELEASE_TAG_VERSION.fullmatch(tag)
if isinstance(tag, str)
else None
)
if match is not None:
released_versions.append(
(int(match.group(1)), int(match.group(2)), int(match.group(3)))
)
cmake_version = cmake_project_version(arguments.cmake_file)
next_released_version = cmake_version
if released_versions:
major, minor, patch = max(released_versions)
next_released_version = major, minor, patch + 1
major, minor, patch = max(cmake_version, next_released_version)
version = (
f"{major}.{minor}.{patch}-nightly."
f"{arguments.date_id}.{arguments.run_number}"
)
print(version)
def parser() -> argparse.ArgumentParser:
result = argparse.ArgumentParser(description=__doc__)
result.add_argument("--api-url", required=True)
result.add_argument("--token-env", default="GITEA_RELEASE_TOKEN")
result.add_argument("--allow-http", action="store_true", help=argparse.SUPPRESS)
subparsers = result.add_subparsers(dest="command", required=True)
publish_parser = subparsers.add_parser("publish")
publish_parser.add_argument("--owner", required=True)
publish_parser.add_argument("--repo", required=True)
publish_parser.add_argument("--tag", required=True)
publish_parser.add_argument("--target", required=True)
publish_parser.add_argument("--name", required=True)
body_group = publish_parser.add_mutually_exclusive_group()
body_group.add_argument("--body", default="")
body_group.add_argument("--body-file", type=Path)
publish_parser.add_argument("--artifacts", type=Path, required=True)
publish_parser.add_argument("--prerelease", action="store_true")
publish_parser.add_argument(
"--allow-missing-draft-tag",
action="store_true",
help="declare that a nightly-* tag may be created with its verified draft",
)
prune_parser = subparsers.add_parser("prune-nightlies")
prune_parser.add_argument("--owner", required=True)
prune_parser.add_argument("--repo", required=True)
prune_parser.add_argument("--tag-prefix", default="nightly-")
prune_parser.add_argument("--keep", type=int, default=14)
prune_parser.add_argument("--protect-tag", default="")
protection_parser = subparsers.add_parser("verify-tag-protection")
protection_parser.add_argument("--owner", required=True)
protection_parser.add_argument("--repo", required=True)
protection_parser.add_argument("--required-pattern", default="v*")
nightly_version_parser = subparsers.add_parser("derive-nightly-version")
nightly_version_parser.add_argument("--owner", required=True)
nightly_version_parser.add_argument("--repo", required=True)
nightly_version_parser.add_argument("--cmake-file", type=Path, required=True)
nightly_version_parser.add_argument("--date-id", required=True)
nightly_version_parser.add_argument("--run-number", required=True)
project_version_parser = subparsers.add_parser("cmake-project-version")
project_version_parser.add_argument(
"--cmake-file", type=Path, required=True
)
return result
def main() -> None:
arguments = parser().parse_args()
if arguments.command == "cmake-project-version":
print(".".join(map(str, cmake_project_version(arguments.cmake_file))))
return
if arguments.command == "prune-nightlies" and arguments.keep < 1:
fail("--keep must be positive")
if arguments.command == "prune-nightlies":
if not SAFE_NAME.fullmatch(arguments.tag_prefix):
fail("--tag-prefix must be a non-empty safe tag prefix")
if (
arguments.protect_tag
and not arguments.protect_tag.startswith(arguments.tag_prefix)
):
fail("--protect-tag must start with --tag-prefix")
token = os.environ.get(arguments.token_env, "")
api = GiteaApi(arguments.api_url, token, allow_http=arguments.allow_http)
if arguments.command == "publish":
publish(arguments, api)
elif arguments.command == "prune-nightlies":
prune_nightlies(arguments, api)
elif arguments.command == "verify-tag-protection":
verify_tag_protection(arguments, api)
else:
derive_nightly_version(arguments, api)
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
sys.exit(130)
-56
View File
@@ -1,56 +0,0 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# Keep the Gitea SSH trust root in one place for every non-interactive
# component/dependency checkout. Rotate this only after independently
# verifying the replacement server fingerprint.
readonly ECHOION_GITEA_SSH_RSA_HOST_KEY='git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw=='
echoion_decode_base64_secret() {
if (($# != 2)); then
echo "usage: echoion_decode_base64_secret BASE64 OUTPUT" >&2
return 2
fi
local encoded=$1
local output=$2
if [[ -z $encoded || $encoded == *[!A-Za-z0-9+/=]* ]]; then
echo "release secret is not single-line base64" >&2
return 2
fi
if ! printf '%s' "$encoded" | base64 --decode >"$output"; then
rm -f -- "$output"
echo "release secret is not valid base64" >&2
return 2
fi
if [[ ! -s $output ]]; then
rm -f -- "$output"
echo "decoded release secret is empty" >&2
return 2
fi
chmod 0600 "$output"
}
echoion_configure_component_ssh() {
if (($# != 2)); then
echo "usage: echoion_configure_component_ssh CREDENTIAL_DIR PRIVATE_KEY_BASE64" >&2
return 2
fi
local credential_dir=$1
local private_key_base64=$2
local ssh_key="$credential_dir/component-ssh-key"
local known_hosts="$credential_dir/component-known-hosts"
mkdir -p -- "$credential_dir"
chmod 0700 "$credential_dir"
echoion_decode_base64_secret "$private_key_base64" "$ssh_key"
printf '%s\n' "$ECHOION_GITEA_SSH_RSA_HOST_KEY" >"$known_hosts"
chmod 0600 "$known_hosts"
ssh-keygen -y -f "$ssh_key" >/dev/null
printf -v GIT_SSH_COMMAND \
'ssh -i %q -o IdentitiesOnly=yes -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=%q' \
"$ssh_key" "$known_hosts"
export GIT_SSH_COMMAND
}
-56
View File
@@ -1,56 +0,0 @@
#!/usr/bin/env bash
# Translate a path visible inside a containerized CI job into the source path
# understood by the Docker daemon. On a regular host this returns the input
# unchanged.
docker_daemon_path() {
local path=$1
local container_reference=${ECHOION_DOCKER_CONTAINER_ID:-}
local mount_data=
local mount_source mount_destination
local best_source='' best_destination=''
if [[ -z $container_reference ]]; then
container_reference=${JOB_CONTAINER_NAME:-${HOSTNAME:-}}
fi
if [[ -n ${ECHOION_DOCKER_CONTAINER_ID:-} ||
-f /.dockerenv || -f /run/.containerenv ]]; then
if [[ -n $container_reference ]]; then
mount_data=$(
docker inspect \
--format '{{range .Mounts}}{{printf "%s\t%s\n" .Source .Destination}}{{end}}' \
"$container_reference" 2>/dev/null || true
)
fi
fi
while IFS=$'\t' read -r mount_source mount_destination; do
[[ -n $mount_source && -n $mount_destination ]] || continue
case $path in
"$mount_destination"|"$mount_destination"/*)
if ((${#mount_destination} > ${#best_destination})); then
best_source=$mount_source
best_destination=$mount_destination
fi
;;
*)
if [[ $mount_destination == / && $path == /* ]]; then
best_source=$mount_source
best_destination=$mount_destination
fi
;;
esac
done <<<"$mount_data"
if [[ -z $best_destination ]]; then
printf '%s\n' "$path"
elif [[ $path == "$best_destination" ]]; then
printf '%s\n' "$best_source"
elif [[ $best_destination == / ]]; then
printf '%s/%s\n' "${best_source%/}" "${path#/}"
else
printf '%s/%s\n' \
"${best_source%/}" "${path#"$best_destination"/}"
fi
}
-212
View File
@@ -1,212 +0,0 @@
#!/usr/bin/env python3
"""Create one deterministic, product-independent Echoion component package."""
from __future__ import annotations
import argparse
import importlib.util
import json
import os
from pathlib import Path
import re
import shutil
import subprocess
import tempfile
from types import ModuleType
from typing import Any, NoReturn
GIT_SHA = re.compile(r"^[0-9a-f]{40}$")
HASH = re.compile(r"^(?:sha256:[0-9a-f]{64}|git-sha1:[0-9a-f]{40})$")
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?"
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
TOKEN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$")
RELEASE_BUILD_TYPE = "RelWithDebInfo"
def fail(message: str) -> NoReturn:
raise SystemExit(f"package-component: {message}")
def load_packaging_helpers() -> ModuleType:
path = Path(__file__).with_name("package-components.py")
specification = importlib.util.spec_from_file_location(
"echoion_package_components", path
)
if specification is None or specification.loader is None:
fail(f"cannot load shared packaging helpers from {path}")
module = importlib.util.module_from_spec(specification)
specification.loader.exec_module(module)
return module
def load_json_object(path: Path, label: str) -> dict[str, Any]:
try:
value = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeError, json.JSONDecodeError) as error:
fail(f"cannot read {label} {path}: {error}")
if not isinstance(value, dict):
fail(f"{label} must be a JSON object")
return value
def require_debug_information(root: Path) -> None:
readelf = shutil.which("readelf")
if readelf is None:
fail("readelf is required to verify RelWithDebInfo artifacts")
for path in sorted(root.rglob("*")):
if path.is_symlink() or not path.is_file():
continue
try:
with path.open("rb") as stream:
is_elf = stream.read(4) == b"\x7fELF"
except OSError as error:
fail(f"cannot inspect {path}: {error}")
if not is_elf:
continue
completed = subprocess.run(
[readelf, "-SW", os.fspath(path)],
check=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
env={**os.environ, "LC_ALL": "C"},
)
if completed.returncode != 0:
message = completed.stderr.strip() or completed.stdout.strip()
fail(f"readelf failed for {path.relative_to(root)}: {message}")
if re.search(r"\]\s+\.(?:z)?debug_info\s", completed.stdout) is None:
fail(
f"ELF {path.relative_to(root)} has no debug information; "
f"expected a {RELEASE_BUILD_TYPE} artifact"
)
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, default=Path("components.json"))
parser.add_argument("--component", required=True)
parser.add_argument("--package-root", type=Path, required=True)
parser.add_argument("--output", type=Path, required=True)
parser.add_argument("--component-version", required=True)
parser.add_argument(
"--product-compatibility", default=">=2.0.0 <3.0.0"
)
parser.add_argument("--source-sha", required=True)
parser.add_argument("--source-tree-hash", required=True)
parser.add_argument("--abi-hash")
parser.add_argument("--build-dependencies", type=Path)
parser.add_argument(
"--build-type", choices=(RELEASE_BUILD_TYPE,), required=True
)
parser.add_argument("--platform", default="linux")
parser.add_argument("--architecture", default="x86_64")
parser.add_argument(
"--toolchain-contract",
default="linux-x86_64-glibc-2.35-cxx26",
)
arguments = parser.parse_args()
if not TOKEN.fullmatch(arguments.component):
fail("invalid component ID")
if not SEMVER.fullmatch(arguments.component_version):
fail("--component-version must be canonical SemVer")
if (
not arguments.product_compatibility
or len(arguments.product_compatibility) > 256
or any(
character in arguments.product_compatibility
for character in "\r\n\0"
)
):
fail("--product-compatibility is invalid")
if not GIT_SHA.fullmatch(arguments.source_sha):
fail("--source-sha must be a full lowercase Git SHA")
if not HASH.fullmatch(arguments.source_tree_hash):
fail("--source-tree-hash must be a supported content hash")
if arguments.abi_hash is not None and not re.fullmatch(
r"sha256:[0-9a-f]{64}", arguments.abi_hash
):
fail("--abi-hash must be a SHA-256 hash")
for label, value in (
("--platform", arguments.platform),
("--architecture", arguments.architecture),
("--toolchain-contract", arguments.toolchain_contract),
):
if not TOKEN.fullmatch(value):
fail(f"{label} is invalid")
registry = load_json_object(arguments.registry, "component registry")
definitions = registry.get("components")
if registry.get("schemaVersion") != 1 or not isinstance(definitions, dict):
fail("unsupported component registry schema")
definition = definitions.get(arguments.component)
if not isinstance(definition, dict):
fail(f"component is not registered: {arguments.component}")
package_id = definition.get("packageId")
if not isinstance(package_id, str) or not TOKEN.fullmatch(package_id):
fail("registered packageId is invalid")
build_dependencies: dict[str, Any] = {}
if arguments.build_dependencies is not None:
build_dependencies = load_json_object(
arguments.build_dependencies, "build dependency provenance"
)
package_root = arguments.package_root.resolve(strict=True)
if package_root.is_symlink() or not package_root.is_dir():
fail("--package-root must be a real directory")
require_debug_information(package_root)
output = arguments.output.resolve()
output.mkdir(parents=True, exist_ok=True)
epoch_value = os.environ.get("SOURCE_DATE_EPOCH", "0")
if not epoch_value.isdigit():
fail("SOURCE_DATE_EPOCH must be a non-negative integer")
helpers = load_packaging_helpers()
artifact_identity = (
f"{package_id}-{arguments.component_version}-"
f"{arguments.platform}-{arguments.architecture}"
)
with tempfile.TemporaryDirectory(
prefix=".component-package.", dir=output
) as temporary:
staged = Path(temporary) / artifact_identity
shutil.copytree(package_root, staged, symlinks=True)
files = helpers.validate_tree(staged)
manifest = {
"schemaVersion": 3,
"componentId": arguments.component,
"packageId": package_id,
"kind": definition["kind"],
"productCompatibility": arguments.product_compatibility,
"componentVersion": arguments.component_version,
"sourceSha": arguments.source_sha,
"sourceTreeHash": arguments.source_tree_hash,
"abiHash": arguments.abi_hash,
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"buildDependencies": build_dependencies,
"buildType": arguments.build_type,
"platform": arguments.platform,
"architecture": arguments.architecture,
"toolchainContract": arguments.toolchain_contract,
"artifactIdentity": artifact_identity,
"privateLibraries": helpers.private_libraries(staged),
"files": files,
}
manifest_bytes = helpers.canonical(manifest)
(staged / "manifest.json").write_bytes(manifest_bytes)
archive = output / f"{artifact_identity}.tar.zst"
helpers.create_archive(staged, archive, int(epoch_value))
manifest_path = output / f"{artifact_identity}.manifest.json"
manifest_path.write_bytes(manifest_bytes)
print(f"packaged {arguments.component}: {archive.name}")
if __name__ == "__main__":
main()
-287
View File
@@ -1,287 +0,0 @@
#!/usr/bin/env python3
"""Create deterministic independent Echoion component tar.zst packages."""
from __future__ import annotations
import argparse
import hashlib
import json
import os
from pathlib import Path, PurePosixPath
import re
import shutil
import stat
import subprocess
import tempfile
from typing import Any, NoReturn
CHANNELS = {"stable", "beta", "nightly"}
RELEASE_BUILD_TYPE = "RelWithDebInfo"
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
def fail(message: str) -> NoReturn:
raise SystemExit(f"package-components: {message}")
def load_object(path: Path, label: str) -> dict[str, Any]:
try:
document = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeError, json.JSONDecodeError) as error:
fail(f"cannot read {label} {path}: {error}")
if not isinstance(document, dict):
fail(f"{label} must be a JSON object")
return document
def canonical(document: Any) -> bytes:
return (
json.dumps(
document,
ensure_ascii=False,
allow_nan=False,
sort_keys=True,
separators=(",", ":"),
).encode("utf-8")
+ b"\n"
)
def digest(path: Path) -> str:
value = hashlib.sha256()
with path.open("rb") as stream:
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
value.update(chunk)
return value.hexdigest()
def component_version(stable: str, channel: str, sequence: int) -> str:
if not SEMVER.fullmatch(stable):
fail(f"locked component version is not stable SemVer: {stable!r}")
if channel == "stable":
return stable
return f"{stable}-{channel}.{sequence}"
def validate_tree(root: Path) -> list[dict[str, Any]]:
files: list[dict[str, Any]] = []
if root.is_symlink() or not root.is_dir():
fail(f"component staging root is not a directory: {root}")
for path in sorted(root.rglob("*")):
relative = path.relative_to(root)
pure = PurePosixPath(relative.as_posix())
if pure.is_absolute() or ".." in pure.parts:
fail(f"unsafe package path: {relative}")
metadata = path.lstat()
if stat.S_ISDIR(metadata.st_mode):
if path.is_symlink():
fail(f"directory symlink is forbidden: {relative}")
continue
if stat.S_ISLNK(metadata.st_mode):
target = os.readlink(path)
target_path = PurePosixPath(target)
if not target or target_path.is_absolute() or ".." in target_path.parts:
fail(f"unsafe package symlink: {relative} -> {target}")
try:
path.resolve(strict=True).relative_to(root.resolve(strict=True))
except (OSError, RuntimeError, ValueError):
fail(f"package symlink escapes or is dangling: {relative}")
files.append(
{
"path": relative.as_posix(),
"type": "symlink",
"target": target,
}
)
continue
if not stat.S_ISREG(metadata.st_mode):
fail(f"non-regular package entry: {relative}")
files.append(
{
"path": relative.as_posix(),
"type": "file",
"size": metadata.st_size,
"sha256": digest(path),
"mode": stat.S_IMODE(metadata.st_mode),
}
)
if not files:
fail(f"component staging tree is empty: {root}")
return files
def is_elf(path: Path) -> bool:
if path.is_symlink() or not path.is_file():
return False
with path.open("rb") as stream:
return stream.read(4) == b"\x7fELF"
def private_libraries(root: Path) -> list[str]:
return sorted(
path.relative_to(root).as_posix()
for path in root.rglob("*")
if path.parent.name == "lib" and is_elf(path)
)
def create_archive(source: Path, destination: Path, epoch: int) -> None:
destination.parent.mkdir(parents=True, exist_ok=True)
temporary = destination.with_name(f".{destination.name}.tmp")
temporary.unlink(missing_ok=True)
tar = subprocess.Popen(
[
"tar",
"--sort=name",
"--format=gnu",
f"--mtime=@{epoch}",
"--owner=0",
"--group=0",
"--numeric-owner",
"-C",
os.fspath(source),
"-cf",
"-",
".",
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
assert tar.stdout is not None
compressed = subprocess.run(
["zstd", "-19", "--threads=1", "-q", "-o", os.fspath(temporary)],
stdin=tar.stdout,
check=False,
stderr=subprocess.PIPE,
)
tar.stdout.close()
tar_stderr = tar.stderr.read() if tar.stderr else b""
tar_result = tar.wait()
if tar_result != 0 or compressed.returncode != 0:
temporary.unlink(missing_ok=True)
detail = (
tar_stderr + b"\n" + compressed.stderr
).decode("utf-8", errors="replace").strip()
fail(f"cannot create {destination.name}: {detail}")
os.replace(temporary, destination)
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, default=Path("components.json"))
parser.add_argument(
"--lock", type=Path, default=Path("components.lock.json")
)
parser.add_argument("--staging-root", type=Path, required=True)
parser.add_argument("--output", type=Path, required=True)
parser.add_argument("--channel", choices=sorted(CHANNELS), default="stable")
parser.add_argument("--sequence", type=int, required=True)
parser.add_argument("--product-version", required=True)
parser.add_argument(
"--build-type", choices=(RELEASE_BUILD_TYPE,), required=True
)
parser.add_argument(
"--toolchain-contract",
default="linux-x86_64-glibc-2.35-cxx26",
)
arguments = parser.parse_args()
if arguments.sequence < 1:
fail("--sequence must be positive")
product_match = SEMVER.fullmatch(arguments.product_version)
if product_match is None:
fail("--product-version must be canonical SemVer")
registry = load_object(arguments.registry, "component registry")
lock = load_object(arguments.lock, "component lock")
if registry.get("schemaVersion") != 1 or lock.get("schemaVersion") != 2:
fail("unsupported component registry or lock schema")
definitions = registry.get("components")
locked_components = lock.get("components")
if (
not isinstance(definitions, dict)
or not isinstance(locked_components, dict)
or set(definitions) != set(locked_components)
):
fail("component registry and lock do not match")
locked_product_match = SEMVER.fullmatch(str(lock.get("productVersion", "")))
if locked_product_match is None or "-" in str(lock["productVersion"]):
fail("locked productVersion must be stable SemVer")
locked_tuple = tuple(int(value) for value in locked_product_match.groups()[:3])
product_tuple = tuple(int(value) for value in product_match.groups()[:3])
if arguments.channel == "stable":
if arguments.product_version != lock["productVersion"]:
fail("stable product version does not match the lock")
elif (
product_tuple[:2] != locked_tuple[:2]
or product_tuple[2] not in (locked_tuple[2], locked_tuple[2] + 1)
):
fail("prerelease product version is not the locked or next patch line")
staging_root = arguments.staging_root.resolve(strict=True)
output = arguments.output.resolve()
output.mkdir(parents=True, exist_ok=True)
epoch_value = os.environ.get("SOURCE_DATE_EPOCH", "0")
if not epoch_value.isdigit():
fail("SOURCE_DATE_EPOCH must be a non-negative integer")
epoch = int(epoch_value)
with tempfile.TemporaryDirectory(
prefix=".component-packages.", dir=output
) as temporary:
work_root = Path(temporary)
for component_id in sorted(definitions):
definition = definitions[component_id]
locked = locked_components[component_id]
package_id = definition["packageId"]
source = staging_root / package_id
version = component_version(
locked["componentVersion"],
arguments.channel,
arguments.sequence,
)
artifact_identity = (
f"{package_id}-{version}-linux-x86_64"
)
if (
arguments.channel == "stable"
and artifact_identity != locked["artifactIdentity"]
):
fail(f"artifact identity mismatch for {component_id}")
package_root = work_root / artifact_identity
shutil.copytree(source, package_root, symlinks=True)
files = validate_tree(package_root)
manifest = {
"schemaVersion": 1,
"componentId": component_id,
"packageId": package_id,
"kind": definition["kind"],
"productVersion": arguments.product_version,
"componentVersion": version,
"sourceSha": locked["revision"],
"sourceTreeHash": locked["sourceTreeHash"],
"abiHash": locked["abiHash"],
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"buildType": arguments.build_type,
"platform": "linux",
"architecture": "x86_64",
"toolchainContract": arguments.toolchain_contract,
"artifactIdentity": artifact_identity,
"privateLibraries": private_libraries(package_root),
"files": files,
}
manifest_bytes = canonical(manifest)
(package_root / "manifest.json").write_bytes(manifest_bytes)
archive = output / f"{artifact_identity}.tar.zst"
create_archive(package_root, archive, epoch)
(output / f"{artifact_identity}.manifest.json").write_bytes(
manifest_bytes
)
print(f"packaged {component_id}: {archive.name}")
if __name__ == "__main__":
main()
-107
View File
@@ -1,107 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 6 ]]; then
echo "usage: $0 STAGE ARTIFACT_BASE SOURCE_DATE_EPOCH ARCHIVE INSTALLER WORK_DIR" >&2
exit 2
fi
stage=$(realpath -e -- "$1")
artifact_base=$2
source_date_epoch=$3
archive=$(realpath -m -- "$4")
installer=$(realpath -m -- "$5")
work_dir=$(realpath -m -- "$6")
[[ $artifact_base =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$ ]] || {
echo "invalid artifact base: $artifact_base" >&2
exit 2
}
[[ $source_date_epoch =~ ^[0-9]+$ ]] || {
echo "SOURCE_DATE_EPOCH must be a non-negative integer" >&2
exit 2
}
[[ -x $stage/install.sh && -x $stage/uninstall.sh ]] || {
echo "stage is missing executable installer helpers" >&2
exit 2
}
[[ -f $stage/manifest.json && -x $stage/bin/echoiond &&
-x $stage/bin/echoion-updater && -f $stage/lib/Echoion.ts ]] || {
echo "stage is missing required Echoion payload files" >&2
exit 2
}
mkdir -p -- "$(dirname -- "$archive")" "$(dirname -- "$installer")" "$work_dir"
archive_tmp="$(dirname -- "$archive")/.$(basename -- "$archive").tmp.$$"
installer_tmp="$(dirname -- "$installer")/.$(basename -- "$installer").tmp.$$"
gzip_payload="$work_dir/$artifact_base.tar.gz.$$"
header="$work_dir/$artifact_base.run-header.$$"
cleanup() {
rm -f -- "$archive_tmp" "$installer_tmp" "$gzip_payload" "$header"
}
trap cleanup EXIT
tar_options=(
--sort=name
"--mtime=@$source_date_epoch"
--owner=0
--group=0
--numeric-owner
--format=posix
'--pax-option=delete=atime,delete=ctime'
)
tar -C "$stage" "${tar_options[@]}" \
--transform="s,^\\.$,$artifact_base," \
--transform="s,^\\./,$artifact_base/," \
-cf - . |
zstd -T1 -19 --no-progress -o "$archive_tmp"
chmod 0644 "$archive_tmp"
mv -f -- "$archive_tmp" "$archive"
tar -C "$stage" "${tar_options[@]}" -cf - . | gzip -n -9 >"$gzip_payload"
cat >"$header" <<'RUN_HEADER'
#!/bin/sh
set -eu
self=$0
case $self in
/*) ;;
*/*)
self_directory=$(CDPATH= cd -P -- "$(dirname -- "$self")" && pwd -P)
self=$self_directory/$(basename -- "$self")
;;
*)
self=$(command -v "$self") || {
echo "Cannot locate Echoion installer: $0" >&2
exit 2
}
case $self in
/*) ;;
*) self=$(pwd)/$self ;;
esac
;;
esac
temporary=$(mktemp -d "${TMPDIR:-/tmp}/echoion-installer.XXXXXX")
cleanup() {
rm -rf -- "$temporary"
}
trap cleanup EXIT
trap 'exit 129' HUP
trap 'exit 130' INT
trap 'exit 143' TERM
payload_line=$(awk '/^__ECHOION_PAYLOAD_BELOW__$/ { print NR + 1; exit }' "$self")
if [ -z "$payload_line" ]; then
echo "Echoion installer payload marker is missing" >&2
exit 2
fi
tail -n "+$payload_line" "$self" |
tar --same-permissions --no-same-owner -xzf - -C "$temporary"
"$temporary/install.sh" "$@"
exit 0
__ECHOION_PAYLOAD_BELOW__
RUN_HEADER
cat "$header" "$gzip_payload" >"$installer_tmp"
chmod 0755 "$installer_tmp"
mv -f -- "$installer_tmp" "$installer"
trap - EXIT
-267
View File
@@ -1,267 +0,0 @@
#!/usr/bin/env python3
"""Validate and derive one component's independent release identity."""
from __future__ import annotations
import argparse
import hashlib
import json
from pathlib import Path
import re
import subprocess
import sys
from typing import Any, NoReturn
SEMVER = re.compile(
r"^(?P<major>0|[1-9][0-9]*)\."
r"(?P<minor>0|[1-9][0-9]*)\."
r"(?P<patch>0|[1-9][0-9]*)$"
)
RELEASE_VERSION = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
def fail(message: str) -> NoReturn:
raise SystemExit(f"prepare-component-release: {message}")
def canonical(value: Any) -> bytes:
return (
json.dumps(
value,
ensure_ascii=False,
allow_nan=False,
sort_keys=True,
separators=(",", ":"),
).encode("utf-8")
+ b"\n"
)
def load_object(path: Path, label: str) -> dict[str, Any]:
try:
value = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeError, json.JSONDecodeError) as error:
fail(f"cannot read {label} {path}: {error}")
if not isinstance(value, dict):
fail(f"{label} must be a JSON object")
return value
def git(repository: Path, *arguments: str) -> str:
try:
return subprocess.check_output(
["git", "-C", str(repository), *arguments],
text=True,
stderr=subprocess.STDOUT,
).strip()
except (OSError, subprocess.CalledProcessError) as error:
detail = getattr(error, "output", "") or str(error)
fail(f"git {' '.join(arguments)} failed: {detail.strip()}")
def read_contract(repository: Path, revision: str, relative: str) -> Any:
raw = git(repository, "show", f"{revision}:{relative}")
try:
value = json.loads(raw)
except json.JSONDecodeError as error:
fail(f"{relative} at {revision} is invalid JSON: {error}")
if not isinstance(value, dict) or value.get("schemaVersion") != 1:
fail(f"{relative} at {revision} has an unsupported ABI schema")
return value
def compatible_append(old: Any, new: Any) -> bool:
if type(old) is not type(new):
return False
if isinstance(old, dict):
return all(
key in new and compatible_append(value, new[key])
for key, value in old.items()
)
if isinstance(old, list):
return len(new) >= len(old) and all(
compatible_append(value, new[index])
for index, value in enumerate(old)
)
return old == new
def change_classification(old: Any, new: Any) -> str:
if canonical(old) == canonical(new):
return "patch"
return "minor" if compatible_append(old, new) else "major"
def bump(version: str, change: str) -> str:
match = SEMVER.fullmatch(version)
if match is None:
fail(f"previous stable version is invalid: {version!r}")
major = int(match.group("major"))
minor = int(match.group("minor"))
patch = int(match.group("patch"))
if change == "patch":
return f"{major}.{minor}.{patch + 1}"
if change == "minor":
return f"{major}.{minor + 1}.0"
if change == "major":
return f"{major + 1}.0.0"
raise AssertionError(change)
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, required=True)
parser.add_argument("--configuration", type=Path, required=True)
parser.add_argument("--repository", type=Path, required=True)
parser.add_argument("--feed-root", type=Path, required=True)
parser.add_argument(
"--channel", choices=("stable", "beta", "nightly"), required=True
)
parser.add_argument("--requested-version")
parser.add_argument("--nightly-sequence")
parser.add_argument("--output", type=Path)
arguments = parser.parse_args()
registry = load_object(arguments.registry, "component registry")
configuration = load_object(
arguments.configuration, "component release configuration"
)
definitions = registry.get("components")
if registry.get("schemaVersion") != 1 or not isinstance(definitions, dict):
fail("unsupported component registry schema")
if configuration.get("schemaVersion") != 1:
fail("unsupported component release configuration schema")
component_id = configuration.get("componentId")
definition = definitions.get(component_id)
if not isinstance(component_id, str) or not isinstance(definition, dict):
fail("configured component is not present in the registry")
compatibility = configuration.get("productCompatibility")
if not isinstance(compatibility, str) or not compatibility:
fail("productCompatibility is required")
if not isinstance(configuration.get("cmakeOptions"), dict):
fail("cmakeOptions must be an object")
repository = arguments.repository.resolve(strict=True)
if git(
repository,
"status",
"--porcelain",
"--untracked-files=all",
"--",
".",
":(exclude).echoion-release-tools",
":(exclude).echoion-release-tools/**",
):
fail("component repository must be clean")
source_sha = git(repository, "rev-parse", "HEAD")
source_tree = git(repository, "rev-parse", "HEAD^{tree}")
state_path = (
arguments.feed_root
/ "state"
/ "components"
/ f"{component_id}.json"
)
state = (
load_object(state_path, "component state")
if state_path.exists()
else {}
)
channels = state.get("channels", {})
if not isinstance(channels, dict):
fail("component state channels must be an object")
channel_state = channels.get(arguments.channel, {})
if not isinstance(channel_state, dict):
fail("component channel state must be an object")
if channel_state.get("sourceSha") == source_sha:
if arguments.channel == "nightly":
print("component source is already published in nightly")
return 3
fail(f"component source is already published in {arguments.channel}")
previous_version = state.get("semVer")
previous_sha = state.get("lastSourceSha")
contract_path = definition.get("abiContract")
abi_hash = None
if contract_path is not None:
if not isinstance(contract_path, str) or not contract_path:
fail("registered ABI contract path is invalid")
current_contract = read_contract(repository, source_sha, contract_path)
abi_hash = "sha256:" + hashlib.sha256(
canonical(current_contract)
).hexdigest()
else:
current_contract = None
if previous_version is None:
expected_stable = "2.0.0"
change = "initial"
else:
if not isinstance(previous_sha, str) or not re.fullmatch(
r"[0-9a-f]{40}", previous_sha
):
fail("stable component state has no valid source SHA")
if previous_sha == source_sha:
fail("unchanged source cannot produce another release")
if current_contract is None:
change = "patch"
else:
previous_contract = read_contract(
repository, previous_sha, contract_path
)
change = change_classification(
previous_contract, current_contract
)
expected_stable = bump(str(previous_version), change)
if arguments.channel == "nightly":
if not arguments.nightly_sequence or not re.fullmatch(
r"[0-9]+", arguments.nightly_sequence
):
fail("--nightly-sequence must be a positive integer")
version = f"{expected_stable}-nightly.{arguments.nightly_sequence}"
else:
requested = arguments.requested_version
if not isinstance(requested, str) or not RELEASE_VERSION.fullmatch(
requested
):
fail("--requested-version must be canonical SemVer")
requested_base = requested.split("-", 1)[0]
if requested_base != expected_stable:
fail(
f"{change} change requires version {expected_stable}; "
f"received {requested}"
)
if arguments.channel == "stable" and "-" in requested:
fail("stable release version must not have a prerelease suffix")
if arguments.channel == "beta" and "-" not in requested:
fail("beta release version must have a prerelease suffix")
version = requested
result = {
"schemaVersion": 1,
"componentId": component_id,
"channel": arguments.channel,
"componentVersion": version,
"productCompatibility": compatibility,
"sourceSha": source_sha,
"sourceTreeHash": f"git-sha1:{source_tree}",
"abiHash": abi_hash,
"change": change,
}
encoded = canonical(result)
if arguments.output is None:
sys.stdout.buffer.write(encoded)
else:
temporary = arguments.output.with_name(arguments.output.name + ".tmp")
temporary.write_bytes(encoded)
temporary.replace(arguments.output)
return 0
if __name__ == "__main__":
raise SystemExit(main())
-22
View File
@@ -1,22 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
root_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
credential_dir=
cleanup() {
if [[ -n $credential_dir ]]; then
rm -rf -- "$credential_dir"
fi
}
trap cleanup EXIT
if [[ -n ${ECHOION_COMPONENT_SSH_KEY:-} ]]; then
# shellcheck source=scripts/lib/component-ssh.sh
source "$root_dir/scripts/lib/component-ssh.sh"
credential_dir=$(mktemp -d)
umask 077
echoion_configure_component_ssh \
"$credential_dir" "$ECHOION_COMPONENT_SSH_KEY"
fi
python3 "${root_dir}/scripts/prepare_release.py" "$@"
-348
View File
@@ -1,348 +0,0 @@
#!/usr/bin/env python3
"""Resolve component main branches and write the canonical release lock."""
from __future__ import annotations
import argparse
import hashlib
import json
import re
import subprocess
import sys
from pathlib import Path
from typing import Any
SEMVER_RE = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$"
)
PROJECT_RE = re.compile(
r"\bproject\s*\(\s*Echoion\s+VERSION\s+"
r"([0-9]+\.[0-9]+\.[0-9]+)\b",
re.IGNORECASE | re.MULTILINE,
)
class ReleaseError(RuntimeError):
"""Release preparation validation failed."""
def command(*args: str, cwd: Path | None = None) -> str:
try:
return subprocess.check_output(
args,
cwd=cwd,
text=True,
stderr=subprocess.STDOUT,
).strip()
except (OSError, subprocess.CalledProcessError) as error:
detail = getattr(error, "output", "") or str(error)
raise ReleaseError(
f"command failed: {' '.join(args)}: {detail.strip()}"
) from error
def remote_tag_commit(tag_output: str, tag: str) -> str | None:
if not tag_output:
return None
direct_ref = f"refs/tags/{tag}"
peeled_ref = f"{direct_ref}^{{}}"
revisions: dict[str, str] = {}
for line in tag_output.splitlines():
fields = line.split()
if len(fields) != 2:
raise ReleaseError(f"invalid ls-remote output for tag {tag}")
revision, reference = fields
if reference in (direct_ref, peeled_ref):
revisions[reference] = revision
if peeled_ref in revisions:
return revisions[peeled_ref]
if direct_ref in revisions:
return revisions[direct_ref]
raise ReleaseError(f"ls-remote did not return the requested tag {tag}")
def root_product_version(cmake_text: str) -> str:
matches = PROJECT_RE.findall(cmake_text)
if len(matches) != 1:
raise ReleaseError(
"root CMakeLists.txt must contain exactly one "
"project(Echoion VERSION x.y.z)"
)
version = matches[0]
if not SEMVER_RE.fullmatch(version):
raise ReleaseError(f"root product version is not stable SemVer: {version}")
return version
def canonical_json(value: Any) -> bytes:
return (
json.dumps(
value,
ensure_ascii=False,
separators=(",", ":"),
sort_keys=True,
)
+ "\n"
).encode()
def contract_hash(value: Any) -> str:
return "sha256:" + hashlib.sha256(canonical_json(value)).hexdigest()
def compatible_append(old: Any, new: Any) -> bool:
if isinstance(old, dict) and isinstance(new, dict):
return all(
key in new and compatible_append(value, new[key])
for key, value in old.items()
)
if isinstance(old, list) and isinstance(new, list):
return len(new) >= len(old) and all(
compatible_append(value, new[index])
for index, value in enumerate(old)
)
return type(old) is type(new) and old == new
def classify_contract(old: Any, new: Any) -> str:
if canonical_json(old) == canonical_json(new):
return "identical"
if compatible_append(old, new):
return "compatible"
return "breaking"
def bump_version(version: str, change: str) -> str:
match = SEMVER_RE.fullmatch(version)
if not match:
raise ReleaseError(f"invalid prior component version: {version}")
major, minor, patch = map(int, match.groups())
if change == "breaking":
return f"{major + 1}.0.0"
if change == "compatible":
return f"{major}.{minor + 1}.0"
if change == "implementation":
return f"{major}.{minor}.{patch + 1}"
raise ReleaseError(f"unsupported version change: {change}")
def read_contract(repo: Path, revision: str, relative_path: str) -> Any:
raw = command("git", "show", f"{revision}:{relative_path}", cwd=repo)
try:
return json.loads(raw)
except json.JSONDecodeError as error:
raise ReleaseError(
f"{repo.name}:{relative_path} is not valid JSON at {revision}"
) from error
def derive_component_version(
previous: dict[str, Any] | None,
revision: str,
current_contract: Any | None,
previous_contract: Any | None,
) -> str:
if previous is None:
return "2.0.0"
previous_version = previous["componentVersion"]
if previous["revision"] == revision:
return previous_version
if current_contract is None:
return bump_version(previous_version, "implementation")
classification = classify_contract(previous_contract, current_contract)
if classification == "identical":
classification = "implementation"
return bump_version(previous_version, classification)
def normalize_remote(url: str) -> str:
return url.removesuffix("/").removesuffix(".git").lower()
def resolve_component(
component_id: str,
definition: dict[str, Any],
previous: dict[str, Any] | None,
workspace: Path,
product_version: str,
initial_modular_release: bool,
) -> dict[str, Any]:
repository = definition["repository"]
url = definition["url"]
branch = definition.get("branch", "main")
repo = workspace / component_id
if not (repo / ".git").is_dir():
raise ReleaseError(
f"component repository is missing: {repo}; "
"run scripts/sync-components.py first"
)
if command("git", "status", "--porcelain", cwd=repo):
raise ReleaseError(f"refusing dirty component repository: {repo}")
origin = command("git", "remote", "get-url", "origin", cwd=repo)
if normalize_remote(origin) != normalize_remote(url):
raise ReleaseError(
f"{component_id} origin mismatch: expected {url}, found {origin}"
)
remote_line = command("git", "ls-remote", url, f"refs/heads/{branch}")
fields = remote_line.split()
if len(fields) != 2:
raise ReleaseError(
f"{component_id} has no accessible {branch} branch at {url}"
)
revision = fields[0]
command("git", "fetch", "--quiet", "origin", branch, cwd=repo)
command("git", "cat-file", "-e", f"{revision}^{{commit}}", cwd=repo)
head = command("git", "rev-parse", "HEAD", cwd=repo)
if head != revision:
merge_base = command("git", "merge-base", "HEAD", revision, cwd=repo)
relation = "behind" if merge_base == head else "non-fast-forward"
raise ReleaseError(
f"{component_id} local HEAD is {relation}; "
f"expected current {branch} {revision}, found {head}"
)
tree = command("git", "rev-parse", f"{revision}^{{tree}}", cwd=repo)
contract_path = definition.get("abiContract")
current_contract = (
read_contract(repo, revision, contract_path)
if contract_path is not None
else None
)
previous_contract = None
if (
current_contract is not None
and previous is not None
and previous.get("revision")
):
try:
previous_contract = read_contract(
repo, previous["revision"], contract_path
)
except ReleaseError:
previous_contract = {}
version = (
"2.0.0"
if initial_modular_release
else derive_component_version(
previous,
revision,
current_contract,
previous_contract,
)
)
expected_tag = f"v{version}"
tag_output = command(
"git",
"ls-remote",
"--tags",
url,
f"refs/tags/{expected_tag}",
f"refs/tags/{expected_tag}^{{}}",
)
tag_revision = remote_tag_commit(tag_output, expected_tag)
if tag_revision is not None:
if tag_revision != revision:
raise ReleaseError(
f"{component_id} tag {expected_tag} points at "
f"{tag_revision}, not {revision}"
)
abi_hash = (
contract_hash(current_contract) if current_contract is not None else None
)
package_id = definition["packageId"]
return {
"repository": repository,
"revision": revision,
"componentVersion": version,
"abiHash": abi_hash,
"sourceTreeHash": f"git-sha1:{tree}",
"artifactIdentity": (
f"{package_id}-{version}-linux-x86_64"
),
}
def prepare(root: Path, workspace: Path, check: bool) -> dict[str, Any]:
version = root_product_version((root / "CMakeLists.txt").read_text())
registry_path = root / "components.json"
lock_path = root / "components.lock.json"
registry = json.loads(registry_path.read_text())
previous_lock = json.loads(lock_path.read_text()) if lock_path.exists() else {}
if registry.get("schemaVersion") != 1:
raise ReleaseError("unsupported components.json schema")
if previous_lock and previous_lock.get("schemaVersion") != 2:
raise ReleaseError("unsupported components.lock.json schema")
previous_product_version = previous_lock.get("productVersion")
if previous_product_version is None and version != "2.0.0":
raise ReleaseError(
"the first modular release must use root product version 2.0.0"
)
initial_modular_release = (
version == "2.0.0"
and previous_product_version in (None, "2.0.0")
)
previous_components = previous_lock.get("components", {})
components = {
component_id: resolve_component(
component_id,
definition,
previous_components.get(component_id),
workspace,
version,
initial_modular_release,
)
for component_id, definition in registry["components"].items()
}
result = {
"schemaVersion": 2,
"productVersion": version,
"components": components,
}
rendered = json.dumps(result, indent=2, ensure_ascii=False) + "\n"
if check:
if not lock_path.exists() or lock_path.read_text() != rendered:
raise ReleaseError("components.lock.json is not canonical or current")
else:
temporary = lock_path.with_suffix(".json.tmp")
temporary.write_text(rendered)
temporary.replace(lock_path)
return result
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
"--workspace",
type=Path,
help="directory containing permanent component repositories",
)
parser.add_argument(
"--check",
action="store_true",
help="validate that components.lock.json is already current",
)
args = parser.parse_args()
root = Path(__file__).resolve().parents[1]
workspace = (args.workspace or root.parent).resolve()
try:
result = prepare(root, workspace, args.check)
except ReleaseError as error:
print(f"prepare-release: {error}", file=sys.stderr)
return 1
print(
f"prepared Echoion {result['productVersion']} with "
f"{len(result['components'])} locked components"
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
-626
View File
@@ -1,626 +0,0 @@
#!/usr/bin/env python3
"""Publish Echoion's signed channel catalog and per-component feeds."""
from __future__ import annotations
import argparse
import base64
from datetime import datetime, timedelta, timezone
import hashlib
import json
import os
from pathlib import Path
import re
import stat
import subprocess
import tempfile
from typing import Any, NoReturn
from urllib.parse import quote, urlsplit
CHANNELS = {"stable", "beta", "nightly"}
SHA256 = re.compile(r"^[0-9a-f]{64}$")
GIT_SHA = re.compile(r"^[0-9a-f]{40}$")
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
TOKEN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$")
def fail(message: str) -> NoReturn:
raise SystemExit(f"publish-component-feeds: {message}")
def canonical(document: Any) -> bytes:
return (
json.dumps(
document,
ensure_ascii=False,
allow_nan=False,
sort_keys=True,
separators=(",", ":"),
).encode("utf-8")
+ b"\n"
)
def readable(document: Any) -> bytes:
return (
json.dumps(
document,
ensure_ascii=False,
allow_nan=False,
sort_keys=True,
indent=2,
).encode("utf-8")
+ b"\n"
)
def load_object(path: Path, label: str) -> dict[str, Any]:
try:
document = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeError, json.JSONDecodeError) as error:
fail(f"cannot read {label} {path}: {error}")
if not isinstance(document, dict):
fail(f"{label} must be a JSON object: {path}")
return document
def regular_file(path: Path, label: str, *, private: bool = False) -> Path:
try:
metadata = path.lstat()
except OSError as error:
fail(f"cannot inspect {label} {path}: {error}")
if not stat.S_ISREG(metadata.st_mode) or path.is_symlink():
fail(f"{label} is not a regular file: {path}")
if private and metadata.st_mode & 0o077:
fail(f"{label} must not be accessible by group or others")
return path.resolve(strict=True)
def digest(path: Path) -> str:
value = hashlib.sha256()
with path.open("rb") as stream:
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
value.update(chunk)
return value.hexdigest()
def parse_time(value: str | None) -> datetime:
if value is None:
source_epoch = os.environ.get("SOURCE_DATE_EPOCH")
if source_epoch and source_epoch.isdigit():
return datetime.fromtimestamp(int(source_epoch), timezone.utc)
return datetime.now(timezone.utc).replace(microsecond=0)
try:
parsed = datetime.strptime(value, "%Y-%m-%dT%H:%M:%SZ")
except ValueError:
fail("--generated-at must use UTC YYYY-MM-DDTHH:MM:SSZ")
return parsed.replace(tzinfo=timezone.utc)
def format_time(value: datetime) -> str:
return value.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
def run_openssl(arguments: list[str], label: str) -> None:
try:
completed = subprocess.run(
["openssl", *arguments],
check=False,
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except FileNotFoundError:
fail("openssl is required to sign component feeds")
if completed.returncode != 0:
detail = completed.stderr.decode("utf-8", errors="replace").strip()
fail(f"OpenSSL could not {label}: {detail}")
class Signer:
def __init__(self, private_key: Path, key_id: str) -> None:
self.private_key = regular_file(private_key, "private key", private=True)
self.key_id = key_id
self.temporary = tempfile.TemporaryDirectory(
prefix="echoion-component-feed."
)
self.directory = Path(self.temporary.name)
self.public_key = self.directory / "public.pem"
run_openssl(
[
"pkey",
"-in",
os.fspath(self.private_key),
"-pubout",
"-out",
os.fspath(self.public_key),
],
"derive the feed public key",
)
def close(self) -> None:
self.temporary.cleanup()
def envelope(self, payload: dict[str, Any]) -> bytes:
payload_bytes = canonical(payload)
payload_path = self.directory / "payload.json"
signature_path = self.directory / "signature.bin"
payload_path.write_bytes(payload_bytes)
run_openssl(
[
"pkeyutl",
"-sign",
"-rawin",
"-inkey",
os.fspath(self.private_key),
"-in",
os.fspath(payload_path),
"-out",
os.fspath(signature_path),
],
"sign a component feed",
)
signature = signature_path.read_bytes()
if len(signature) != 64:
fail("OpenSSL returned a non-Ed25519 signature")
return readable(
{
"schemaVersion": 3,
"keyId": self.key_id,
"document": payload,
"signedPayload": base64.urlsafe_b64encode(payload_bytes)
.rstrip(b"=")
.decode("ascii"),
"signature": base64.urlsafe_b64encode(signature)
.rstrip(b"=")
.decode("ascii"),
}
)
def verify(self, envelope_bytes: bytes, label: str) -> dict[str, Any]:
try:
envelope = json.loads(envelope_bytes)
schema = envelope.get("schemaVersion")
if schema == 2:
encoded_payload = envelope["payload"]
displayed_document = None
elif schema == 3:
encoded_payload = envelope["signedPayload"]
displayed_document = envelope["document"]
if not isinstance(displayed_document, dict):
raise TypeError("document is not an object")
else:
raise ValueError("unsupported envelope schema")
payload = base64.urlsafe_b64decode(
str(encoded_payload) + "=" * (-len(encoded_payload) % 4)
)
signature = base64.urlsafe_b64decode(
str(envelope["signature"])
+ "=" * (-len(envelope["signature"]) % 4)
)
except (KeyError, ValueError, TypeError, json.JSONDecodeError) as error:
fail(f"invalid existing {label}: {error}")
if (
envelope.get("keyId") != self.key_id
or len(signature) != 64
):
fail(f"existing {label} has the wrong schema, key, or signature")
if displayed_document is not None and canonical(displayed_document) != payload:
fail(f"existing {label} readable document differs from signed payload")
payload_path = self.directory / "verify-payload.json"
signature_path = self.directory / "verify-signature.bin"
payload_path.write_bytes(payload)
signature_path.write_bytes(signature)
run_openssl(
[
"pkeyutl",
"-verify",
"-rawin",
"-pubin",
"-inkey",
os.fspath(self.public_key),
"-in",
os.fspath(payload_path),
"-sigfile",
os.fspath(signature_path),
],
f"verify existing {label}",
)
try:
document = json.loads(payload)
except (UnicodeError, json.JSONDecodeError) as error:
fail(f"invalid existing {label} payload: {error}")
if not isinstance(document, dict):
fail(f"existing {label} payload is not an object")
return document
class PublicKeyVerifier:
verify = Signer.verify
def __init__(self, public_key: Path, key_id: str) -> None:
self.public_key = regular_file(public_key, "public key")
self.key_id = key_id
self.temporary = tempfile.TemporaryDirectory(
prefix="echoion-component-feed-verify."
)
self.directory = Path(self.temporary.name)
run_openssl(
[
"pkey",
"-pubin",
"-in",
os.fspath(self.public_key),
"-noout",
],
"validate the feed public key",
)
def close(self) -> None:
self.temporary.cleanup()
def validate_https(value: str, label: str) -> str:
parsed = urlsplit(value)
if (
parsed.scheme != "https"
or not parsed.hostname
or parsed.username
or parsed.password
or parsed.query
or parsed.fragment
):
fail(f"{label} must be a credential-free HTTPS base URL")
return value.rstrip("/")
def component_path(registry: dict[str, Any], component_id: str) -> Path:
entry = registry["components"][component_id]
if entry["kind"] == "plugin":
return Path("plugins") / entry["pluginId"]
return Path(entry["packageId"])
def channel_version(stable: str, channel: str, sequence: int) -> str:
if not SEMVER.fullmatch(stable) or "-" in stable:
fail(f"locked component version is not stable SemVer: {stable!r}")
if channel == "stable":
return stable
return f"{stable}-{channel}.{sequence}"
def validate_metadata(
registry: dict[str, Any], lock: dict[str, Any]
) -> list[str]:
if registry.get("schemaVersion") != 1 or lock.get("schemaVersion") != 2:
fail("unsupported component registry or lock schema")
registry_components = registry.get("components")
lock_components = lock.get("components")
if not isinstance(registry_components, dict) or not isinstance(
lock_components, dict
):
fail("component metadata has no components object")
if set(registry_components) != set(lock_components):
fail("component registry and lock contain different component IDs")
if not SEMVER.fullmatch(str(lock.get("productVersion", ""))):
fail("lock productVersion is not stable SemVer")
for component_id in sorted(registry_components):
if not TOKEN.fullmatch(component_id):
fail(f"invalid component ID: {component_id!r}")
definition = registry_components[component_id]
locked = lock_components[component_id]
if definition.get("repository") != locked.get("repository"):
fail(f"repository mismatch for {component_id}")
if not GIT_SHA.fullmatch(str(locked.get("revision", ""))):
fail(f"invalid source revision for {component_id}")
if definition.get("kind") == "plugin" and not TOKEN.fullmatch(
str(definition.get("pluginId", ""))
):
fail(f"invalid plugin ID for {component_id}")
return sorted(registry_components)
def load_packages(
artifacts: Path,
registry: dict[str, Any],
lock: dict[str, Any],
component_ids: list[str],
channel: str,
sequence: int,
) -> dict[str, tuple[Path, dict[str, Any]]]:
packages: dict[str, tuple[Path, dict[str, Any]]] = {}
for manifest_path in sorted(artifacts.glob("*.manifest.json")):
manifest = load_object(manifest_path, "component package manifest")
component_id = manifest.get("componentId")
if component_id not in registry["components"]:
fail(f"manifest has unknown componentId: {component_id!r}")
if component_id in packages:
fail(f"duplicate package manifest for {component_id}")
expected_version = channel_version(
lock["components"][component_id]["componentVersion"],
channel,
sequence,
)
expected = {
"schemaVersion": 1,
"componentId": component_id,
"packageId": registry["components"][component_id]["packageId"],
"kind": registry["components"][component_id]["kind"],
"productVersion": manifest.get("productVersion"),
"componentVersion": expected_version,
"sourceSha": lock["components"][component_id]["revision"],
"sourceTreeHash": lock["components"][component_id]["sourceTreeHash"],
"abiHash": lock["components"][component_id]["abiHash"],
"activation": registry["components"][component_id]["activation"],
"dependencies": registry["components"][component_id][
"dependencies"
],
"platform": "linux",
"architecture": "x86_64",
"buildType": "RelWithDebInfo",
}
for field, value in expected.items():
if manifest.get(field) != value:
fail(
f"{component_id} manifest {field} does not match the lock"
)
archive = manifest_path.with_name(
manifest_path.name.removesuffix(".manifest.json") + ".tar.zst"
)
packages[component_id] = (
regular_file(archive, f"{component_id} package"),
manifest,
)
missing = set(component_ids) - set(packages)
if missing:
fail(f"missing package manifests: {', '.join(sorted(missing))}")
return packages
def atomic_write(path: Path, content: bytes) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
descriptor, temporary_name = tempfile.mkstemp(
prefix=f".{path.name}.", dir=path.parent
)
temporary = Path(temporary_name)
try:
os.fchmod(descriptor, 0o644)
with os.fdopen(descriptor, "wb", closefd=True) as stream:
descriptor = -1
stream.write(content)
stream.flush()
os.fsync(stream.fileno())
os.replace(temporary, path)
finally:
if descriptor >= 0:
os.close(descriptor)
temporary.unlink(missing_ok=True)
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, default=Path("components.json"))
parser.add_argument(
"--lock", type=Path, default=Path("components.lock.json")
)
parser.add_argument("--artifacts", type=Path, required=True)
parser.add_argument("--feed-root", type=Path, required=True)
parser.add_argument("--base-url", required=True)
parser.add_argument("--artifact-base-url", required=True)
parser.add_argument("--channel", choices=sorted(CHANNELS), required=True)
parser.add_argument("--sequence", type=int, required=True)
parser.add_argument("--generated-at")
parser.add_argument("--valid-days", type=int, default=45)
parser.add_argument("--key-id", required=True)
parser.add_argument("--private-key", type=Path, required=True)
arguments = parser.parse_args()
if not TOKEN.fullmatch(arguments.key_id):
fail("invalid key ID")
if arguments.sequence < 1 or arguments.sequence > (1 << 63) - 1:
fail("--sequence must be between 1 and 2^63-1")
if arguments.valid_days < 1 or arguments.valid_days > 365:
fail("--valid-days must be between 1 and 365")
base_url = validate_https(arguments.base_url, "--base-url")
artifact_base_url = validate_https(
arguments.artifact_base_url, "--artifact-base-url"
)
registry = load_object(arguments.registry, "component registry")
lock = load_object(arguments.lock, "component lock")
component_ids = validate_metadata(registry, lock)
artifacts = arguments.artifacts.resolve(strict=True)
packages = load_packages(
artifacts,
registry,
lock,
component_ids,
arguments.channel,
arguments.sequence,
)
product_versions = {
manifest["productVersion"] for _, manifest in packages.values()
}
if len(product_versions) != 1:
fail("component package manifests disagree on productVersion")
product_version = product_versions.pop()
if not isinstance(product_version, str) or not SEMVER.fullmatch(
product_version
):
fail("component package productVersion is not canonical SemVer")
generated = parse_time(arguments.generated_at)
expires = generated + timedelta(days=arguments.valid_days)
generated_at = format_time(generated)
expires_at = format_time(expires)
feed_root = arguments.feed_root.resolve()
signer = Signer(arguments.private_key, arguments.key_id)
writes: dict[Path, bytes] = {}
catalog_components: list[dict[str, Any]] = []
try:
for component_id in component_ids:
definition = registry["components"][component_id]
locked = lock["components"][component_id]
archive, manifest = packages[component_id]
version = manifest["componentVersion"]
archive_sha = digest(archive)
manifest_sha = hashlib.sha256(canonical(manifest)).hexdigest()
state_path = (
feed_root / "state" / "components" / f"{component_id}.json"
)
state = (
load_object(state_path, "component state")
if state_path.exists()
else {
"schemaVersion": 1,
"componentId": component_id,
"channels": {},
}
)
channels = state.setdefault("channels", {})
old_channel = channels.get(arguments.channel, {})
old_sequence = old_channel.get("sequence", 0)
if not isinstance(old_sequence, int) or old_sequence >= arguments.sequence:
fail(
f"{component_id} {arguments.channel} sequence is not monotonic"
)
if arguments.channel == "stable":
if (
state.get("lastSourceSha") == locked["revision"]
and state.get("artifactHash") not in (None, archive_sha)
):
fail(
f"{component_id} changed artifact for an unchanged source SHA"
)
state.update(
{
"lastSourceSha": locked["revision"],
"semVer": version,
"abiSchema": locked["abiHash"],
"artifactHash": archive_sha,
"sequence": arguments.sequence,
}
)
channels[arguments.channel] = {
"version": version,
"artifactHash": archive_sha,
"sequence": arguments.sequence,
}
state_bytes = canonical(state)
relative = component_path(registry, component_id)
version_path = (
feed_root
/ "feeds"
/ arguments.channel
/ relative
/ f"{version}.json"
)
latest_path = version_path.with_name("latest.json")
artifact_name = archive.name
artifact = {
"name": artifact_name,
"url": f"{artifact_base_url}/{quote(artifact_name)}",
"sha256": archive_sha,
"size": archive.stat().st_size,
"manifestSha256": manifest_sha,
"packageType": "tar.zst",
}
payload = {
"schemaVersion": 2,
"document": "echoion-component-release",
"channel": arguments.channel,
"sequence": arguments.sequence,
"generatedAt": generated_at,
"expiresAt": expires_at,
"productVersion": product_version,
"componentId": component_id,
"pluginId": definition.get("pluginId"),
"kind": definition["kind"],
"componentVersion": version,
"sourceSha": locked["revision"],
"sourceTreeHash": locked["sourceTreeHash"],
"abiHash": locked["abiHash"],
"artifactIdentity": manifest["artifactIdentity"],
"activation": definition["activation"],
"platform": manifest["platform"],
"architecture": manifest["architecture"],
"buildType": manifest["buildType"],
"toolchainContract": manifest["toolchainContract"],
"dependencies": definition["dependencies"],
"artifact": artifact,
}
envelope = signer.envelope(payload)
if version_path.exists():
existing = signer.verify(
version_path.read_bytes(), f"{component_id} version feed"
)
immutable_fields = (
"channel",
"productVersion",
"componentId",
"componentVersion",
"sourceSha",
"sourceTreeHash",
"abiHash",
"artifactIdentity",
"activation",
"platform",
"architecture",
"buildType",
"toolchainContract",
"dependencies",
"artifact",
)
if any(existing.get(field) != payload.get(field) for field in immutable_fields):
fail(f"immutable version feed conflict: {version_path}")
else:
writes[version_path] = envelope
writes[latest_path] = envelope
writes[state_path] = state_bytes
relative_url = relative.as_posix()
catalog_components.append(
{
"componentId": component_id,
"pluginId": definition.get("pluginId"),
"kind": definition["kind"],
"componentVersion": version,
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"sequence": arguments.sequence,
"latestUrl": (
f"{base_url}/feeds/{arguments.channel}/"
f"{relative_url}/latest.json"
),
"artifactSha256": archive_sha,
}
)
catalog_payload = {
"schemaVersion": 2,
"document": "echoion-component-catalog",
"channel": arguments.channel,
"sequence": arguments.sequence,
"generatedAt": generated_at,
"expiresAt": expires_at,
"productVersion": product_version,
"components": catalog_components,
}
writes[
feed_root / "feeds" / arguments.channel / "catalog.json"
] = signer.envelope(catalog_payload)
for path, content in sorted(writes.items()):
atomic_write(path, content)
finally:
signer.close()
print(
f"published {len(component_ids)} {arguments.channel} component feeds "
f"at sequence {arguments.sequence}"
)
if __name__ == "__main__":
main()
-341
View File
@@ -1,341 +0,0 @@
#!/usr/bin/env python3
"""Merge one signed independent component release into an Echoion feed."""
from __future__ import annotations
import argparse
import hashlib
import importlib.util
from pathlib import Path
import re
from types import ModuleType
from typing import Any, NoReturn
from urllib.parse import quote
GIT_SHA = re.compile(r"^[0-9a-f]{40}$")
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
r"(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?"
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
def fail(message: str) -> NoReturn:
raise SystemExit(f"publish-component-release: {message}")
def load_feed_helpers() -> ModuleType:
path = Path(__file__).with_name("publish-component-feeds.py")
specification = importlib.util.spec_from_file_location(
"echoion_publish_component_feeds", path
)
if specification is None or specification.loader is None:
fail(f"cannot load shared feed helpers from {path}")
module = importlib.util.module_from_spec(specification)
specification.loader.exec_module(module)
return module
def validate_manifest(
helpers: ModuleType,
manifest: dict[str, Any],
definition: dict[str, Any],
component_id: str,
) -> None:
expected = {
"schemaVersion": 3,
"componentId": component_id,
"packageId": definition["packageId"],
"kind": definition["kind"],
"activation": definition["activation"],
"dependencies": definition["dependencies"],
}
for field, value in expected.items():
if manifest.get(field) != value:
fail(f"manifest {field} does not match the registry")
if not SEMVER.fullmatch(str(manifest.get("componentVersion", ""))):
fail("manifest componentVersion is not canonical SemVer")
if not GIT_SHA.fullmatch(str(manifest.get("sourceSha", ""))):
fail("manifest sourceSha is invalid")
if not re.fullmatch(
r"(?:git-sha1:[0-9a-f]{40}|sha256:[0-9a-f]{64})",
str(manifest.get("sourceTreeHash", "")),
):
fail("manifest sourceTreeHash is invalid")
abi_hash = manifest.get("abiHash")
if abi_hash is not None and not re.fullmatch(
r"sha256:[0-9a-f]{64}", str(abi_hash)
):
fail("manifest abiHash is invalid")
compatibility = manifest.get("productCompatibility")
if not isinstance(compatibility, str) or not compatibility:
fail("manifest productCompatibility is missing")
if not isinstance(manifest.get("buildDependencies"), dict):
fail("manifest buildDependencies must be an object")
if manifest.get("buildType") != "RelWithDebInfo":
fail("manifest buildType must be RelWithDebInfo")
for field in (
"artifactIdentity",
"platform",
"architecture",
"toolchainContract",
):
if not isinstance(manifest.get(field), str) or not manifest[field]:
fail(f"manifest {field} is missing")
if manifest["artifactIdentity"] != (
f"{manifest['packageId']}-{manifest['componentVersion']}-"
f"{manifest['platform']}-{manifest['architecture']}"
):
fail("manifest artifactIdentity is inconsistent")
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, default=Path("components.json"))
parser.add_argument("--component", required=True)
parser.add_argument("--manifest", type=Path, required=True)
parser.add_argument("--archive", type=Path, required=True)
parser.add_argument("--feed-root", type=Path, required=True)
parser.add_argument("--base-url", required=True)
parser.add_argument("--artifact-base-url", required=True)
parser.add_argument(
"--channel", choices=("stable", "beta", "nightly"), required=True
)
parser.add_argument("--sequence", type=int, required=True)
parser.add_argument("--generated-at")
parser.add_argument("--valid-days", type=int, default=45)
parser.add_argument("--key-id", required=True)
parser.add_argument("--private-key", type=Path, required=True)
arguments = parser.parse_args()
helpers = load_feed_helpers()
if not helpers.TOKEN.fullmatch(arguments.component):
fail("invalid component ID")
if not helpers.TOKEN.fullmatch(arguments.key_id):
fail("invalid key ID")
if arguments.sequence < 1 or arguments.sequence > (1 << 63) - 1:
fail("--sequence must be between 1 and 2^63-1")
if arguments.valid_days < 1 or arguments.valid_days > 365:
fail("--valid-days must be between 1 and 365")
base_url = helpers.validate_https(arguments.base_url, "--base-url")
artifact_base_url = helpers.validate_https(
arguments.artifact_base_url, "--artifact-base-url"
)
registry = helpers.load_object(arguments.registry, "component registry")
definitions = registry.get("components")
if registry.get("schemaVersion") != 1 or not isinstance(definitions, dict):
fail("unsupported component registry schema")
definition = definitions.get(arguments.component)
if not isinstance(definition, dict):
fail(f"component is not registered: {arguments.component}")
manifest_path = helpers.regular_file(
arguments.manifest, "component package manifest"
)
archive = helpers.regular_file(arguments.archive, "component package")
manifest = helpers.load_object(manifest_path, "component package manifest")
validate_manifest(helpers, manifest, definition, arguments.component)
expected_archive = f"{manifest['artifactIdentity']}.tar.zst"
if archive.name != expected_archive:
fail(f"archive must be named {expected_archive}")
version = manifest["componentVersion"]
if arguments.channel == "stable" and "-" in version:
fail("stable releases must not use a prerelease version")
if arguments.channel == "beta" and "-" not in version:
fail("beta releases must use a prerelease version")
if arguments.channel == "nightly" and "-nightly." not in version:
fail("nightly releases must use a -nightly.N version")
generated = helpers.parse_time(arguments.generated_at)
generated_at = helpers.format_time(generated)
expires_at = helpers.format_time(
generated + helpers.timedelta(days=arguments.valid_days)
)
feed_root = arguments.feed_root.resolve()
signer = helpers.Signer(arguments.private_key, arguments.key_id)
writes: dict[Path, bytes] = {}
try:
archive_sha = helpers.digest(archive)
manifest_sha = hashlib.sha256(helpers.canonical(manifest)).hexdigest()
state_path = (
feed_root
/ "state"
/ "components"
/ f"{arguments.component}.json"
)
state = (
helpers.load_object(state_path, "component state")
if state_path.exists()
else {
"schemaVersion": 2,
"componentId": arguments.component,
"channels": {},
}
)
channels = state.setdefault("channels", {})
old_channel = channels.get(arguments.channel, {})
old_sequence = old_channel.get("sequence", 0)
if not isinstance(old_sequence, int) or old_sequence >= arguments.sequence:
fail(
f"{arguments.component} {arguments.channel} sequence "
"is not monotonic"
)
if arguments.channel == "stable":
if (
state.get("lastSourceSha") == manifest["sourceSha"]
and state.get("artifactHash") not in (None, archive_sha)
):
fail("changed artifact for an unchanged source SHA")
state.update(
{
"lastSourceSha": manifest["sourceSha"],
"semVer": version,
"abiSchema": manifest["abiHash"],
"artifactHash": archive_sha,
"sequence": arguments.sequence,
}
)
channels[arguments.channel] = {
"version": version,
"artifactHash": archive_sha,
"sourceSha": manifest["sourceSha"],
"sequence": arguments.sequence,
}
relative = helpers.component_path(registry, arguments.component)
version_path = (
feed_root
/ "feeds"
/ arguments.channel
/ relative
/ f"{version}.json"
)
latest_path = version_path.with_name("latest.json")
artifact_url = (
f"{artifact_base_url}/{quote(arguments.component, safe='')}/"
f"{quote(version, safe='')}/{quote(archive.name, safe='')}"
)
artifact = {
"name": archive.name,
"url": artifact_url,
"sha256": archive_sha,
"size": archive.stat().st_size,
"manifestSha256": manifest_sha,
"packageType": "tar.zst",
}
payload = {
"schemaVersion": 3,
"document": "echoion-component-release",
"channel": arguments.channel,
"sequence": arguments.sequence,
"generatedAt": generated_at,
"expiresAt": expires_at,
"productCompatibility": manifest["productCompatibility"],
"componentId": arguments.component,
"pluginId": definition.get("pluginId"),
"kind": definition["kind"],
"componentVersion": version,
"sourceSha": manifest["sourceSha"],
"sourceTreeHash": manifest["sourceTreeHash"],
"abiHash": manifest["abiHash"],
"artifactIdentity": manifest["artifactIdentity"],
"activation": definition["activation"],
"platform": manifest["platform"],
"architecture": manifest["architecture"],
"toolchainContract": manifest["toolchainContract"],
"dependencies": definition["dependencies"],
"buildDependencies": manifest["buildDependencies"],
"buildType": manifest["buildType"],
"artifact": artifact,
}
envelope = signer.envelope(payload)
if version_path.exists():
existing = signer.verify(
version_path.read_bytes(),
f"{arguments.component} version feed",
)
immutable = {
key: value
for key, value in payload.items()
if key not in {"generatedAt", "expiresAt", "sequence"}
}
if any(existing.get(key) != value for key, value in immutable.items()):
fail(f"immutable version feed conflict: {version_path}")
else:
writes[version_path] = envelope
writes[latest_path] = envelope
writes[state_path] = helpers.canonical(state)
catalog_path = (
feed_root / "feeds" / arguments.channel / "catalog.json"
)
old_components: list[dict[str, Any]] = []
if catalog_path.exists():
old_catalog = signer.verify(
catalog_path.read_bytes(), f"{arguments.channel} catalog"
)
if (
old_catalog.get("document") != "echoion-component-catalog"
or old_catalog.get("channel") != arguments.channel
):
fail("existing catalog has the wrong document or channel")
old_catalog_sequence = old_catalog.get("sequence", 0)
if (
not isinstance(old_catalog_sequence, int)
or old_catalog_sequence >= arguments.sequence
):
fail("catalog sequence is not monotonic")
existing_components = old_catalog.get("components")
if not isinstance(existing_components, list):
fail("existing catalog components must be an array")
old_components = [
item
for item in existing_components
if isinstance(item, dict)
and item.get("componentId") != arguments.component
]
relative_url = relative.as_posix()
old_components.append(
{
"componentId": arguments.component,
"pluginId": definition.get("pluginId"),
"kind": definition["kind"],
"componentVersion": version,
"productCompatibility": manifest["productCompatibility"],
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"sequence": arguments.sequence,
"latestUrl": (
f"{base_url}/feeds/{arguments.channel}/"
f"{relative_url}/latest.json"
),
"artifactSha256": archive_sha,
}
)
old_components.sort(key=lambda item: str(item.get("componentId", "")))
catalog = {
"schemaVersion": 3,
"document": "echoion-component-catalog",
"channel": arguments.channel,
"sequence": arguments.sequence,
"generatedAt": generated_at,
"expiresAt": expires_at,
"components": old_components,
}
writes[catalog_path] = signer.envelope(catalog)
for path, content in sorted(writes.items()):
helpers.atomic_write(path, content)
finally:
signer.close()
print(
f"published {arguments.component} {arguments.channel} "
f"at sequence {arguments.sequence}"
)
if __name__ == "__main__":
main()
-425
View File
@@ -1,425 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "usage: $0 COMPONENT_RELEASE_JSON" >&2
exit 2
}
(($# == 1)) || usage
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
root=$(cd -- "$script_dir/.." && pwd -P)
source_root=$(pwd -P)
configuration=$(realpath -- "$1")
# shellcheck source=scripts/lib/component-ssh.sh
source "$script_dir/lib/component-ssh.sh"
required_commands=(
base64
cmake
cmp
ctest
curl
find
git
jq
ninja
openssl
python3
realpath
ssh
ssh-keygen
zstd
)
for command_name in "${required_commands[@]}"; do
command -v "$command_name" >/dev/null ||
{
echo "release-component: missing command: $command_name" >&2
exit 2
}
done
required_environment=(
ECHOION_COMPONENT_SSH_KEY
ECHOION_DISTRIBUTION_BASE_URL
ECHOION_FEED_BASE_URL
ECHOION_FEED_COMMIT_SIGNING_KEY
ECHOION_FEED_PRIVATE_KEY
ECHOION_FEED_REPOSITORY
ECHOION_FEED_SIGNING_KEY_ID
ECHOION_RELEASE_TAG_ALLOWED_SIGNERS
GITEA_API_URL
GITEA_RELEASE_TOKEN
GITEA_REPOSITORY
)
for variable in "${required_environment[@]}"; do
if [[ -z ${!variable:-} ]]; then
echo "release-component: $variable is required" >&2
exit 2
fi
done
distribution_backend=${ECHOION_DISTRIBUTION_BACKEND:-s3}
case "$distribution_backend" in
gitea-generic)
if [[ $GITEA_API_URL != */api/v1 ]]; then
echo "release-component: GITEA_API_URL must end in /api/v1" >&2
exit 2
fi
gitea_root=${GITEA_API_URL%/api/v1}
if [[ $ECHOION_DISTRIBUTION_BASE_URL != \
"$gitea_root"/api/packages/*/generic ]]; then
echo "release-component: Gitea distribution URL must use the configured Gitea package registry" >&2
exit 2
fi
;;
s3)
command -v aws >/dev/null ||
{
echo "release-component: missing command: aws" >&2
exit 2
}
if [[ -z ${ECHOION_OBJECT_STORAGE_BUCKET:-} ]]; then
echo "release-component: ECHOION_OBJECT_STORAGE_BUCKET is required for the S3 backend" >&2
exit 2
fi
;;
*)
echo "release-component: unsupported distribution backend: $distribution_backend" >&2
exit 2
;;
esac
component_id=$(jq -er '
if .schemaVersion == 1 and
(.componentId | type == "string" and length > 0) and
(.productCompatibility | type == "string" and length > 0) and
(.cmakeOptions | type == "object")
then .componentId
else error("invalid component release configuration")
end
' "$configuration")
if [[ ! $component_id =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$ ]]; then
echo "release-component: invalid component ID" >&2
exit 2
fi
repository_name=${GITEA_REPOSITORY#*/}
if [[ $GITEA_REPOSITORY != */* || -z $repository_name ]]; then
echo "release-component: GITEA_REPOSITORY must be owner/name" >&2
exit 2
fi
work_root=${RUNNER_TEMP:-"$source_root/.component-release"}
work_root=$(realpath -m -- "$work_root/echoion-$component_id")
components="$work_root/components"
dependencies="$work_root/dependencies"
build="$work_root/build"
install_root="$work_root/install"
dist="$work_root/dist"
feed_state="$work_root/feed-state"
secrets_dir="$work_root/secrets"
mkdir -p "$work_root"
rm -rf -- "$components" "$dependencies" "$build" "$install_root" "$dist" \
"$feed_state" "$secrets_dir"
mkdir -p "$secrets_dir"
chmod 0700 "$secrets_dir"
cleanup() {
rm -rf -- "$secrets_dir"
}
trap cleanup EXIT
umask 077
feed_key="$secrets_dir/feed-ed25519.pem"
commit_key="$secrets_dir/feed-commit-key"
allowed_signers="$secrets_dir/tag-allowed-signers"
echoion_decode_base64_secret "$ECHOION_FEED_PRIVATE_KEY" "$feed_key"
echoion_decode_base64_secret "$ECHOION_FEED_COMMIT_SIGNING_KEY" "$commit_key"
printf '%s\n' "$ECHOION_RELEASE_TAG_ALLOWED_SIGNERS" >"$allowed_signers"
chmod 0600 "$feed_key" "$commit_key" "$allowed_signers"
echoion_configure_component_ssh \
"$secrets_dir" "$ECHOION_COMPONENT_SSH_KEY"
openssl pkey -in "$feed_key" -noout
git clone --filter=blob:none --branch release-feed --single-branch \
"$ECHOION_FEED_REPOSITORY" "$feed_state"
event=${GITEA_EVENT_NAME:-push}
sequence=$(python3 -c 'import time; print(time.time_ns() // 1_000_000)')
if [[ $event == schedule ]]; then
channel=nightly
release_tag="nightly-$(date -u +%Y%m%d)-${GITEA_RUN_NUMBER:-$sequence}"
requested_arguments=(--nightly-sequence "$sequence")
else
release_tag=${GITEA_REF_NAME:-}
if [[ -z $release_tag || $release_tag != v* ]]; then
echo "release-component: a v* tag is required" >&2
exit 2
fi
version_from_tag=${release_tag#v}
if [[ $version_from_tag == *-* ]]; then
channel=beta
else
channel=stable
fi
requested_arguments=(--requested-version "$version_from_tag")
"$script_dir/restore-gitea-release-tag.sh" \
--repository "ssh://gitea@git.faumaray.ru/$GITEA_REPOSITORY.git" \
--tag "$release_tag"
"$script_dir/verify-gitea-release-tag.sh" \
--tag "$release_tag" \
--event-sha "${GITEA_SHA:-$(git rev-parse HEAD)}" \
--allowed-signers "$allowed_signers" \
--notes-output "$work_root/release-notes.md" >/dev/null
fi
metadata="$work_root/release-metadata.json"
set +e
python3 "$script_dir/prepare-component-release.py" \
--registry "$root/components.json" \
--configuration "$configuration" \
--repository "$source_root" \
--feed-root "$feed_state" \
--channel "$channel" \
"${requested_arguments[@]}" \
--output "$metadata"
prepare_status=$?
set -e
if ((prepare_status == 3)) && [[ $channel == nightly ]]; then
echo "release-component: $component_id has no unpublished nightly source"
exit 0
fi
((prepare_status == 0)) || exit "$prepare_status"
component_version=$(jq -er .componentVersion "$metadata")
source_sha=$(jq -er .sourceSha "$metadata")
source_tree_hash=$(jq -er .sourceTreeHash "$metadata")
product_compatibility=$(jq -er .productCompatibility "$metadata")
abi_hash=$(jq -r '.abiHash // empty' "$metadata")
product_version=$(python3 - "$root/CMakeLists.txt" <<'PY'
import pathlib
import re
import sys
source = pathlib.Path(sys.argv[1]).read_text(encoding="utf-8")
match = re.search(
r"(?m)^project\(Echoion[ \t]+VERSION[ \t]+"
r"([0-9]+\.[0-9]+\.[0-9]+)[ \t]+LANGUAGES[ \t]+CXX\)$",
source,
)
if match is None:
raise SystemExit("release-component: cannot read Echoion product version")
print(match.group(1))
PY
)
ECHOION_COMPONENT_SSH_KEY=$ECHOION_COMPONENT_SSH_KEY \
"$script_dir/ci-checkout-components.sh" "$components" "$dependencies"
build_dependencies="$work_root/build-dependencies.json"
python3 - "$root/components.json" "$root/components.lock.json" \
"$component_id" "$build_dependencies" <<'PY'
import json
import pathlib
import sys
registry = json.loads(pathlib.Path(sys.argv[1]).read_text())
lock = json.loads(pathlib.Path(sys.argv[2]).read_text())
component = registry["components"][sys.argv[3]]
result = {}
for dependency in component["dependencies"]:
value = lock["components"][dependency]
result[dependency] = {
"componentVersion": value["componentVersion"],
"revision": value["revision"],
"abiHash": value["abiHash"],
}
pathlib.Path(sys.argv[4]).write_text(
json.dumps(result, sort_keys=True, separators=(",", ":")) + "\n"
)
PY
cmake_arguments=(
-S "$source_root"
-B "$build"
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX="$install_root"
-DECHOION_COMPONENT_VERSION="$component_version"
-DECHOION_PRODUCT_VERSION="$product_version"
-DCPM_Void_SOURCE="$dependencies/VoidLibrary"
-DCPM_VoidTeamspeak_SOURCE="$dependencies/VoidTeamspeak"
)
while IFS= read -r dependency; do
cmake_arguments+=("-DCPM_${dependency}_SOURCE=$components/$dependency")
done < <(jq -r --arg id "$component_id" '
.components[$id].dependencies | keys[]
' "$root/components.json")
while IFS=$'\t' read -r option value; do
cmake_arguments+=("-D${option}=${value}")
done < <(jq -r '.cmakeOptions | to_entries[] | [.key, .value] | @tsv' \
"$configuration")
component_prefix_maps=(
"$source_root=$component_id"
"$build=${component_id}Build"
"$components=EchoionComponents"
"$dependencies=EchoionDependencies"
)
component_c_flags=${CFLAGS:-}
component_cxx_flags=${CXXFLAGS:-}
for component_prefix_map in "${component_prefix_maps[@]}"; do
component_c_flags+=" -ffile-prefix-map=$component_prefix_map"
component_c_flags+=" -fmacro-prefix-map=$component_prefix_map"
component_c_flags+=" -fdebug-prefix-map=$component_prefix_map"
component_cxx_flags+=" -ffile-prefix-map=$component_prefix_map"
component_cxx_flags+=" -fmacro-prefix-map=$component_prefix_map"
component_cxx_flags+=" -fdebug-prefix-map=$component_prefix_map"
done
CFLAGS="$component_c_flags" CXXFLAGS="$component_cxx_flags" \
cmake "${cmake_arguments[@]}"
cmake --build "$build" --config RelWithDebInfo --parallel
ctest --test-dir "$build" --build-config RelWithDebInfo --output-on-failure
cmake --install "$build" --config RelWithDebInfo
package_arguments=(
--registry "$root/components.json"
--component "$component_id"
--package-root "$install_root"
--output "$dist"
--component-version "$component_version"
--product-compatibility "$product_compatibility"
--source-sha "$source_sha"
--source-tree-hash "$source_tree_hash"
--build-dependencies "$build_dependencies"
--build-type RelWithDebInfo
)
if [[ -n $abi_hash ]]; then
package_arguments+=(--abi-hash "$abi_hash")
fi
SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) \
python3 "$script_dir/package-component.py" "${package_arguments[@]}"
manifest=$(find "$dist" -maxdepth 1 -type f -name '*.manifest.json' -print)
archive=$(find "$dist" -maxdepth 1 -type f -name '*.tar.zst' -print)
[[ -f $manifest && -f $archive ]] ||
{
echo "release-component: packaging did not produce one release" >&2
exit 1
}
artifact_name=$(basename "$archive")
verified="$work_root/verified-archive"
if [[ $distribution_backend == gitea-generic ]]; then
artifact_url="${ECHOION_DISTRIBUTION_BASE_URL%/}/$component_id/$component_version/$artifact_name"
upload_response="$work_root/gitea-package-upload-response"
upload_status=$(
curl --silent --show-error \
--output "$upload_response" \
--write-out '%{http_code}' \
--header "Authorization: token $GITEA_RELEASE_TOKEN" \
--upload-file "$archive" \
"$artifact_url"
)
if [[ $upload_status != 201 && $upload_status != 409 ]]; then
echo "release-component: Gitea package upload failed with HTTP $upload_status" >&2
exit 1
fi
curl --fail --silent --show-error \
--header "Authorization: token $GITEA_RELEASE_TOKEN" \
--output "$verified" \
"$artifact_url"
cmp -- "$archive" "$verified" ||
{
echo "release-component: immutable package conflict: $artifact_url" >&2
exit 1
}
else
object_key="${ECHOION_OBJECT_STORAGE_PREFIX:-components}/$component_id/$component_version/$artifact_name"
aws_arguments=()
if [[ -n ${ECHOION_OBJECT_STORAGE_ENDPOINT:-} ]]; then
aws_arguments+=(--endpoint-url "$ECHOION_OBJECT_STORAGE_ENDPOINT")
fi
set +e
aws "${aws_arguments[@]}" s3api put-object \
--bucket "$ECHOION_OBJECT_STORAGE_BUCKET" \
--key "$object_key" \
--body "$archive" \
--if-none-match '*' >/dev/null
upload_status=$?
set -e
if ((upload_status != 0)); then
existing="$work_root/existing-archive"
aws "${aws_arguments[@]}" s3api get-object \
--bucket "$ECHOION_OBJECT_STORAGE_BUCKET" \
--key "$object_key" "$existing" >/dev/null
cmp -- "$archive" "$existing" ||
{
echo "release-component: immutable object conflict: $object_key" >&2
exit 1
}
fi
aws "${aws_arguments[@]}" s3api get-object \
--bucket "$ECHOION_OBJECT_STORAGE_BUCKET" \
--key "$object_key" "$verified" >/dev/null
cmp -- "$archive" "$verified"
fi
if [[ $channel == nightly ]]; then
printf 'Automated %s nightly from %s.\n' "$component_id" "$source_sha" \
>"$work_root/release-notes.md"
fi
owner=${GITEA_REPOSITORY%%/*}
prerelease=()
if [[ $channel != stable ]]; then
prerelease+=(--prerelease)
fi
missing_tag=()
if [[ $channel == nightly ]]; then
missing_tag+=(--allow-missing-draft-tag)
fi
python3 "$script_dir/gitea_release.py" \
--api-url "$GITEA_API_URL" \
publish \
--owner "$owner" \
--repo "$repository_name" \
--tag "$release_tag" \
--target "$source_sha" \
--name "$component_id $component_version" \
--body-file "$work_root/release-notes.md" \
--artifacts "$dist" \
"${prerelease[@]}" \
"${missing_tag[@]}"
python3 "$script_dir/publish-component-release.py" \
--registry "$root/components.json" \
--component "$component_id" \
--manifest "$manifest" \
--archive "$archive" \
--feed-root "$feed_state" \
--base-url "$ECHOION_FEED_BASE_URL" \
--artifact-base-url "$ECHOION_DISTRIBUTION_BASE_URL" \
--channel "$channel" \
--sequence "$sequence" \
--valid-days 45 \
--key-id "$ECHOION_FEED_SIGNING_KEY_ID" \
--private-key "$feed_key"
git -C "$feed_state" config user.name 'Echoion Component Release Bot'
git -C "$feed_state" config user.email 'release-bot@echoion.invalid'
git -C "$feed_state" config gpg.format ssh
git -C "$feed_state" config user.signingkey "$commit_key"
git -C "$feed_state" config commit.gpgsign true
git -C "$feed_state" add feeds state
if ! git -C "$feed_state" diff --cached --quiet; then
git -C "$feed_state" commit -S -m \
"Feed: $component_id $channel $component_version"
git -C "$feed_state" cat-file commit HEAD | grep -q '^gpgsig '
git -C "$feed_state" push origin HEAD:release-feed
fi
git -C "$root" diff --exit-code -- components.lock.json
echo "release-component: published $component_id $component_version"
-715
View File
@@ -1,715 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<'EOF'
usage: scripts/release.sh --version VERSION [options]
Options:
--build-dir DIR Clean build directory (default: build-relwithdebinfo)
--dist-dir DIR Release output directory (default: dist)
--jobs N Parallel build jobs
--skip-tests Skip CTest and frontend tests
--skip-component-packages
Build only the Echoion product artifacts; component
packages are published by their own repositories
--no-clean Reuse the configured build directory
--update-channel NAME
Component package channel (default: stable)
--update-sequence N
Monotonic component sequence (default: SOURCE_DATE_EPOCH)
--official-update-feed-url URL
HTTPS channel catalog embedded as the official default
--void-source DIR Use an explicit VoidLibrary source tree
--void-teamspeak-source DIR
Use an explicit VoidTeamspeak source tree
--component-workspace DIR
Directory containing the nine permanent component repos
(default: parent of this Echoion checkout)
--container Build with containers/release.Dockerfile (the default)
--host Explicitly build directly on this host
-h, --help Show this help
The release process never starts echoiond. Runtime validation uses readelf.
EOF
}
die() {
echo "release: $*" >&2
exit 2
}
canonical_release_version() {
local value=$1
local prerelease identifier
if [[ ! $value =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$ ]]; then
return 1
fi
prerelease=${BASH_REMATCH[5]:-}
while [[ -n $prerelease ]]; do
if [[ $prerelease == *.* ]]; then
identifier=${prerelease%%.*}
prerelease=${prerelease#*.}
else
identifier=$prerelease
prerelease=
fi
[[ ! $identifier =~ ^0[0-9]+$ ]] || return 1
done
return 0
}
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
source_dir=$(cd -- "$script_dir/.." && pwd -P)
# shellcheck source-path=SCRIPTDIR
# shellcheck source=lib/docker-daemon-path.sh
source "$script_dir/lib/docker-daemon-path.sh"
version=
build_dir="$source_dir/build-relwithdebinfo"
dist_dir="$source_dir/dist"
jobs=
run_tests=1
clean_build=1
package_components=1
use_container=1
update_channel=stable
update_sequence=
official_update_feed_url=
void_source=
void_teamspeak_source=
component_workspace=$(dirname -- "$source_dir")
while (($#)); do
case $1 in
--version)
(($# >= 2)) || die "--version requires a value"
version=$2
shift 2
;;
--build-dir)
(($# >= 2)) || die "--build-dir requires a value"
build_dir=$2
shift 2
;;
--dist-dir)
(($# >= 2)) || die "--dist-dir requires a value"
dist_dir=$2
shift 2
;;
--jobs)
(($# >= 2)) || die "--jobs requires a value"
jobs=$2
shift 2
;;
--skip-tests)
run_tests=0
shift
;;
--skip-component-packages)
package_components=0
shift
;;
--no-clean)
clean_build=0
shift
;;
--update-channel)
(($# >= 2)) || die "--update-channel requires a value"
update_channel=$2
shift 2
;;
--update-sequence)
(($# >= 2)) || die "--update-sequence requires a value"
update_sequence=$2
shift 2
;;
--official-update-feed-url)
(($# >= 2)) || die "--official-update-feed-url requires a value"
official_update_feed_url=$2
shift 2
;;
--void-source)
(($# >= 2)) || die "--void-source requires a value"
void_source=$2
shift 2
;;
--void-teamspeak-source)
(($# >= 2)) || die "--void-teamspeak-source requires a value"
void_teamspeak_source=$2
shift 2
;;
--component-workspace)
(($# >= 2)) || die "--component-workspace requires a value"
component_workspace=$2
shift 2
;;
--container)
use_container=1
shift
;;
--host)
use_container=0
shift
;;
-h|--help)
usage
exit 0
;;
*)
die "unknown argument: $1"
;;
esac
done
[[ $version =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ ]] ||
die "--version must contain only letters, digits, dot, underscore, or dash"
canonical_release_version "$version" ||
die "--version must be canonical Semantic Versioning 2.0.0"
if [[ -n $jobs && ! $jobs =~ ^[1-9][0-9]*$ ]]; then
die "--jobs must be a positive integer"
fi
[[ $update_channel =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,255}$ ]] ||
die "--update-channel contains unsupported characters"
[[ -z $update_sequence || $update_sequence =~ ^[0-9]+$ ]] ||
die "--update-sequence must be a non-negative integer"
[[ -z $official_update_feed_url ||
$official_update_feed_url == https://* ]] ||
die "--official-update-feed-url must use HTTPS"
build_dir=$(realpath -m -- "$build_dir")
dist_dir=$(realpath -m -- "$dist_dir")
component_workspace=$(realpath -e -- "$component_workspace")
if [[ -n $void_source ]]; then
void_source=$(realpath -e -- "$void_source")
[[ -d $void_source && -f $void_source/CMakeLists.txt ]] ||
die "--void-source must name a VoidLibrary source directory"
fi
if [[ -n $void_teamspeak_source ]]; then
void_teamspeak_source=$(realpath -e -- "$void_teamspeak_source")
[[ -d $void_teamspeak_source && -f $void_teamspeak_source/CMakeLists.txt ]] ||
die "--void-teamspeak-source must name a VoidTeamspeak source directory"
fi
component_ids=(
EchoionApi
EchoionCore
EchoionDesktop
EchoionHost
EchoionPluginUrlShortenerExternal
EchoionPluginUrlShortenerInternal
EchoionStandalone
EchoionUpdater
EchoionWeb
)
for component_id in "${component_ids[@]}"; do
[[ -f $component_workspace/$component_id/CMakeLists.txt &&
-d $component_workspace/$component_id/.git ]] ||
die "missing permanent component repository: $component_workspace/$component_id"
done
container_path() {
local path=$1
case $path in
"$source_dir") echo /workspace ;;
"$source_dir"/*) echo "/workspace/${path#"$source_dir"/}" ;;
*) die "container build and dist directories must be inside $source_dir" ;;
esac
}
if ((use_container)); then
command -v docker >/dev/null || die "docker is required for --container"
container_build_dir=$(container_path "$build_dir")
container_dist_dir=$(container_path "$dist_dir")
docker_source_dir=$(docker_daemon_path "$source_dir")
image="echoion-release-builder:gcc-16.1.0"
proxy_build_args=()
proxy_run_args=()
for proxy_name in HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; do
if [[ -n ${!proxy_name:-} ]]; then
# Docker treats these predefined build arguments specially: their
# values are inherited without being recorded in the image history.
proxy_build_args+=(--build-arg "$proxy_name")
proxy_run_args+=(--env "$proxy_name")
fi
done
docker build \
"${proxy_build_args[@]}" \
--platform linux/amd64 \
--file "$source_dir/containers/release.Dockerfile" \
--tag "$image" \
"$source_dir"
container_args=(
--rm
--user "$(id -u):$(id -g)"
--volume "$docker_source_dir:/workspace"
--workdir /workspace
--env HOME=/tmp/echoion-release-home
--env npm_config_cache=/tmp/echoion-npm-cache
)
for component_id in "${component_ids[@]}"; do
docker_component_source=$(
docker_daemon_path "$component_workspace/$component_id"
)
container_args+=(
--volume
"$docker_component_source:/workspace-components/$component_id"
)
done
container_args+=("${proxy_run_args[@]}")
if [[ -n $void_source ]]; then
docker_void_source=$(docker_daemon_path "$void_source")
container_args+=(
--volume "$docker_void_source:/workspace-deps/VoidLibrary:ro"
)
fi
if [[ -n $void_teamspeak_source ]]; then
docker_void_teamspeak_source=$(docker_daemon_path "$void_teamspeak_source")
container_args+=(
--volume "$docker_void_teamspeak_source:/workspace-deps/VoidTeamspeak:ro"
)
fi
if [[ -n ${SOURCE_DATE_EPOCH:-} ]]; then
container_args+=(--env "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH")
fi
release_args=(
--host
--version "$version"
--build-dir "$container_build_dir"
--dist-dir "$container_dist_dir"
--component-workspace /workspace-components
)
[[ -n $jobs ]] && release_args+=(--jobs "$jobs")
((run_tests)) || release_args+=(--skip-tests)
((package_components)) || release_args+=(--skip-component-packages)
((clean_build)) || release_args+=(--no-clean)
[[ -z $void_source ]] ||
release_args+=(--void-source /workspace-deps/VoidLibrary)
[[ -z $void_teamspeak_source ]] ||
release_args+=(--void-teamspeak-source /workspace-deps/VoidTeamspeak)
release_args+=(--update-channel "$update_channel")
[[ -z $update_sequence ]] ||
release_args+=(--update-sequence "$update_sequence")
[[ -z $official_update_feed_url ]] ||
release_args+=(
--official-update-feed-url "$official_update_feed_url"
)
if [[ $docker_source_dir != "$source_dir" ]]; then
echo "release: mapped container workspace through the Docker daemon mount table"
fi
docker run --rm --platform linux/amd64 \
--volume "$docker_source_dir:/workspace:ro" \
"$image" \
test -x /workspace/scripts/release.sh ||
die "Docker daemon cannot access the checked-out source tree"
docker run --platform linux/amd64 "${container_args[@]}" "$image" \
bash scripts/release.sh "${release_args[@]}"
exit
fi
case "$(uname -s)/$(uname -m)" in
Linux/x86_64|Linux/amd64) ;;
*) die "host release builds require Linux x86_64; use the amd64 container builder" ;;
esac
required_commands=(
cmake file ninja npm python3 patchelf readelf tar zstd gzip sha256sum openssl
dpkg-query ldconfig
)
for command_name in "${required_commands[@]}"; do
command -v "$command_name" >/dev/null || die "required command not found: $command_name"
done
python3 "$source_dir/scripts/validate-semver.py" "$version" ||
die "--version must be canonical Semantic Versioning 2.0.0"
[[ -x $source_dir/packaging/install.sh ]] ||
die "installer source is missing: packaging/install.sh"
[[ -x $source_dir/packaging/uninstall.sh ]] ||
die "uninstaller source is missing: packaging/uninstall.sh"
[[ -f $source_dir/packaging/service/echoion.service.in ]] ||
die "service template is missing: packaging/service/echoion.service.in"
if [[ -z ${SOURCE_DATE_EPOCH:-} ]]; then
SOURCE_DATE_EPOCH=$(git -C "$source_dir" log -1 --format=%ct 2>/dev/null || true)
[[ $SOURCE_DATE_EPOCH =~ ^[0-9]+$ ]] || SOURCE_DATE_EPOCH=0
fi
export SOURCE_DATE_EPOCH
source_revision=$(git -C "$source_dir" rev-parse HEAD) ||
die "cannot determine release source revision"
lock_digest=$(sha256sum "$source_dir/components.lock.json") ||
die "cannot hash components.lock.json"
lock_digest=${lock_digest%% *}
build_signature="echoion:${version}:${source_revision}:${lock_digest}"
license_root_key_id=${ECHOION_LICENSE_ROOT_KEY_ID:-}
license_root_public_key=${ECHOION_LICENSE_ROOT_PUBLIC_KEY:-}
if [[ -n $license_root_key_id || -n $license_root_public_key ]]; then
[[ -n $license_root_key_id && -n $license_root_public_key ]] ||
die "both ECHOION_LICENSE_ROOT_KEY_ID and ECHOION_LICENSE_ROOT_PUBLIC_KEY are required"
fi
safe_remove_tree() {
local path=$1
case $path in
"$source_dir"/build*|/tmp/*) ;;
*) die "refusing to clean non-build path outside source build*/ or /tmp: $path" ;;
esac
rm -rf -- "$path"
}
if ((clean_build)); then
safe_remove_tree "$build_dir"
fi
mkdir -p "$build_dir"
configure_args=(
--preset linux-release
-B "$build_dir"
-DBUILD_SHARED_LIBS=ON
-DECHOION_STATIC_LINK=OFF
-DECHOION_RELEASE_BUILD=ON
-DECHOION_REPRODUCIBLE_BUILD=ON
"-DECHOION_RELEASE_VERSION=$version"
"-DECHOION_RUNTIME_VERSION=$version"
"-DECHOION_BUILD_SIGNATURE=$build_signature"
"-DECHOION_TOOLCHAIN_ABI=linux-x86_64-glibc-2.35-cxx26"
"-DECHOION_COMPONENT_WORKSPACE=$component_workspace"
)
if [[ -n $license_root_key_id ]]; then
configure_args+=(
"-DECHOION_LICENSE_ROOT_KEY_ID=$license_root_key_id"
"-DECHOION_LICENSE_ROOT_PUBLIC_KEY=$license_root_public_key"
)
fi
for component_id in "${component_ids[@]}"; do
configure_args+=(
"-DCPM_${component_id}_SOURCE=$component_workspace/$component_id"
)
done
official_update_keys="$source_dir/.gitea/release-keys/official-update-keys.json"
[[ -f $official_update_keys ]] ||
die "official update trust store is missing: $official_update_keys"
official_update_keys_json=$(
python3 -c \
'import json,sys; print(json.dumps(json.load(open(sys.argv[1], encoding="utf-8")), separators=(",", ":")))' \
"$official_update_keys"
) || die "official update trust store is invalid"
configure_args+=(
"-DECHOION_UPDATE_PUBLIC_KEYS_JSON=$official_update_keys_json"
"-DECHOION_UPDATE_FEED_URL=$official_update_feed_url"
)
[[ -z $void_source ]] ||
configure_args+=("-DCPM_Void_SOURCE=$void_source")
[[ -z $void_teamspeak_source ]] ||
configure_args+=("-DCPM_VoidTeamspeak_SOURCE=$void_teamspeak_source")
web_frontend="$component_workspace/EchoionWeb/frontend"
npm --prefix "$web_frontend" ci --no-audit --no-fund
cmake -E rm -rf "$web_frontend/web-dist"
release_prefix_maps=(
"$source_dir=Echoion"
"$build_dir=EchoionBuild"
"$component_workspace=EchoionComponents"
)
[[ -z $void_source ]] ||
release_prefix_maps+=("$void_source=VoidLibrary")
[[ -z $void_teamspeak_source ]] ||
release_prefix_maps+=("$void_teamspeak_source=VoidTeamspeak")
release_c_flags=${CFLAGS:-}
release_cxx_flags=${CXXFLAGS:-}
for release_prefix_map in "${release_prefix_maps[@]}"; do
release_c_flags+=" -ffile-prefix-map=$release_prefix_map"
release_c_flags+=" -fmacro-prefix-map=$release_prefix_map"
release_c_flags+=" -fdebug-prefix-map=$release_prefix_map"
release_cxx_flags+=" -ffile-prefix-map=$release_prefix_map"
release_cxx_flags+=" -fmacro-prefix-map=$release_prefix_map"
release_cxx_flags+=" -fdebug-prefix-map=$release_prefix_map"
done
(
cd "$source_dir"
CFLAGS="$release_c_flags" CXXFLAGS="$release_cxx_flags" \
cmake "${configure_args[@]}"
)
build_args=(--build "$build_dir" --config RelWithDebInfo)
[[ -n $jobs ]] && build_args+=(--parallel "$jobs")
cmake "${build_args[@]}"
if ((run_tests)); then
ctest --test-dir "$build_dir" --build-config RelWithDebInfo --output-on-failure
npm --prefix "$web_frontend" test
npm --prefix "$web_frontend" run i18n:check
fi
stage="$build_dir/runtime-stage"
safe_remove_tree "$stage"
cmake --install "$build_dir" \
--config RelWithDebInfo \
--component Runtime \
--prefix "$stage"
certificate_bundle=${ECHOION_CA_BUNDLE:-/etc/ssl/certs/ca-certificates.crt}
[[ -s $certificate_bundle ]] ||
die "TLS certificate bundle is missing or empty: $certificate_bundle"
install -D -m 0644 -- "$certificate_bundle" \
"$stage/share/echoion/certs/ca-certificates.crt"
mapfile -t library_directories < <(
find "$build_dir" -type f \( -name '*.so' -o -name '*.so.*' -o -name '*.ts' \) \
-printf '%h\n' | LC_ALL=C sort -u
)
library_directories+=("$stage/lib")
cxx_compiler=$("$source_dir/scripts/configured-cxx-compiler.sh" "$build_dir")
compiler_runtime_files=()
for runtime_name in libstdc++.so.6 libgcc_s.so.1; do
runtime_path=$(
"$cxx_compiler" -print-file-name="$runtime_name"
) || die "cannot locate $runtime_name with $cxx_compiler"
[[ $runtime_path == /* && -f $runtime_path ]] ||
die "$cxx_compiler did not return an existing absolute path for $runtime_name"
compiler_runtime_files+=("$runtime_path")
library_directories+=("$(dirname -- "$runtime_path")")
done
search_directories=$(IFS=';'; echo "${library_directories[*]}")
compiler_runtimes=$(IFS=';'; echo "${compiler_runtime_files[*]}")
resolver_libraries=("$build_dir/lib/Echoion.ts")
if [[ -d $stage/share/echoion/bootstrap-plugins ]]; then
while IFS= read -r -d '' plugin_library; do
resolver_libraries+=("$plugin_library")
done < <(
find "$stage/share/echoion/bootstrap-plugins" -type f -name '*.so' \
-print0 | LC_ALL=C sort -z
)
fi
resolver_library_list=$(IFS=';'; echo "${resolver_libraries[*]}")
cmake \
"-DBUNDLE_ROOT=$stage" \
"-DBUNDLE_RESOLVER_EXECUTABLES=$build_dir/bin/echoiond;$build_dir/bin/echoion-updater" \
"-DBUNDLE_RESOLVER_LIBRARIES=$resolver_library_list" \
"-DBUNDLE_SEARCH_DIRECTORIES=$search_directories" \
"-DBUNDLE_SEED_FILES=$compiler_runtimes" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_dir/cmake/BundleRuntimeDependencies.cmake"
# Bootstrap plugins are copied into writable managed-plugin state by the
# installer. Search the active release closure from managed, portable/manual,
# and immutable bootstrap locations, then allow plugin-private dependencies.
# shellcheck disable=SC2016 # Dynamic linker token, not a shell variable.
plugin_runpath='$ORIGIN/../../../../../../current/lib:$ORIGIN/../../current/lib:$ORIGIN/lib'
for plugin_library in "${resolver_libraries[@]:1}"; do
patchelf --set-rpath "$plugin_runpath" "$plugin_library"
done
dependency_report="$build_dir/dependency-report.txt"
elf_validation_args=(
--root "$stage"
--report "$dependency_report"
--max-glibc 2.35
--require-first-party-debug-info
--forbid-content-prefix "$source_dir"
--forbid-content-prefix "$build_dir"
)
[[ -z $void_source ]] ||
elf_validation_args+=(--forbid-content-prefix "$void_source")
[[ -z $void_teamspeak_source ]] ||
elf_validation_args+=(--forbid-content-prefix "$void_teamspeak_source")
python3 "$source_dir/scripts/validate-release-elf.py" \
"${elf_validation_args[@]}"
collect_licenses() {
local destination=$1
local candidate relative package_name license_name digest target package source_path soname
local -a license_roots=(
"$component_workspace/EchoionApi"
"$component_workspace/EchoionCore"
"$component_workspace/EchoionHost"
"$component_workspace/EchoionStandalone"
"$component_workspace/EchoionWeb"
"$component_workspace/EchoionUpdater"
"$component_workspace/EchoionDesktop"
"$component_workspace/EchoionPluginUrlShortenerInternal"
"$component_workspace/EchoionPluginUrlShortenerExternal"
"$build_dir/_deps"
)
if [[ -n ${GCC_ROOT:-} && -d $GCC_ROOT/share/licenses ]]; then
license_roots+=("$GCC_ROOT/share/licenses")
fi
if [[ -n ${BOOST_ROOT:-} && -d $BOOST_ROOT/share/licenses ]]; then
license_roots+=("$BOOST_ROOT/share/licenses")
fi
if [[ -n ${FFMPEG_ROOT:-} && -d $FFMPEG_ROOT/share/licenses ]]; then
license_roots+=("$FFMPEG_ROOT/share/licenses")
fi
mkdir -p "$destination"
for source_path in "${license_roots[@]}"; do
[[ -d $source_path ]] || continue
while IFS= read -r -d '' candidate; do
relative=${candidate#"$source_path"/}
if [[ $relative == */* ]]; then
package_name=${relative%%/*}
else
package_name=$(basename -- "$source_path")
fi
license_name=$(basename -- "$candidate")
package_name=${package_name//[^A-Za-z0-9._+-]/_}
license_name=${license_name//[^A-Za-z0-9._+-]/_}
digest=$(sha256sum "$candidate" | cut -c1-12)
target="$destination/${package_name}--${license_name}--${digest}"
install -m 0644 -- "$candidate" "$target"
done < <(
find "$source_path" -maxdepth 5 -type f \
\( -iname 'LICENSE' -o -iname 'LICENSE.txt' -o \
-iname 'LICENSE.md' -o -iname 'LICENSE.rst' -o \
-iname 'LICENSE-*' -o -iname 'LICENSE_*' -o \
-iname 'COPYING' -o -iname 'COPYING.*' -o \
-iname 'NOTICE' -o -iname 'NOTICE.*' -o \
-iname 'COPYRIGHT' -o -iname 'COPYRIGHT.*' \) \
-not -path '*/node_modules/*' -not -path '*/.git/*' \
-print0 | LC_ALL=C sort -z
)
done
if command -v dpkg-query >/dev/null && command -v ldconfig >/dev/null; then
while IFS= read -r soname; do
[[ -n $soname ]] || continue
source_path=$(ldconfig -p 2>/dev/null |
awk -v name="$soname" '
$1 == name && !path { path = $NF }
END { if (path) print path }
')
[[ -n $source_path ]] || continue
package=$(dpkg-query -S "$(readlink -f -- "$source_path")" 2>/dev/null |
sed -n '1s/: .*//p') || package=
[[ -n $package ]] || continue
package=${package%%:*}
candidate="/usr/share/doc/${package}/copyright"
[[ -f $candidate ]] || continue
install -m 0644 -- "$candidate" "$destination/${package}--copyright"
done < <(
find "$stage/lib" -maxdepth 1 \( -type f -o -type l \) \
-printf '%f\n' | LC_ALL=C sort -u
)
fi
candidate=/usr/share/doc/ca-certificates/copyright
if [[ -f $candidate ]]; then
install -m 0644 -- "$candidate" \
"$destination/ca-certificates--copyright"
fi
}
collect_licenses "$stage/share/echoion/licenses"
python3 "$source_dir/scripts/collect-frontend-licenses.py" \
--node-modules "$web_frontend/node_modules" \
--output "$stage/share/echoion/licenses/frontend"
python3 "$source_dir/scripts/generate-release-manifest.py" \
--root "$stage" \
--version "$version" \
--build-type RelWithDebInfo \
--build-signature "$build_signature" \
--output "$stage/manifest.json"
# Installer helpers are mutable prefix-level files and intentionally are not
# included in manifest.files. They are added only after the immutable manifest.
install -m 0755 "$source_dir/packaging/install.sh" "$stage/install.sh"
install -m 0755 "$source_dir/packaging/uninstall.sh" "$stage/uninstall.sh"
mkdir -p "$dist_dir"
component_stage_root="$build_dir/component-staging"
if ((package_components)); then
safe_remove_tree "$component_stage_root"
mkdir -p "$component_stage_root"
while IFS=$'\t' read -r component_id package_id; do
component_root="$component_stage_root/$package_id"
cmake --install "$build_dir" \
--config RelWithDebInfo \
--component "Package${component_id}" \
--prefix "$component_root"
component_executables=()
component_libraries=()
while IFS= read -r -d '' component_elf; do
case $(file --brief --mime-type "$component_elf") in
application/x-executable|application/x-pie-executable|application/x-sharedlib) ;;
*) continue ;;
esac
case ${component_elf#"$component_root"/} in
bin/*) component_executables+=("$component_elf") ;;
*) component_libraries+=("$component_elf") ;;
esac
done < <(
find "$component_root" -type f -print0 | LC_ALL=C sort -z
)
if ((${#component_executables[@]} || ${#component_libraries[@]})); then
component_executable_list=$(
IFS=';'
echo "${component_executables[*]}"
)
component_library_list=$(
IFS=';'
echo "${component_libraries[*]}"
)
cmake \
"-DBUNDLE_ROOT=$component_root" \
"-DBUNDLE_EXECUTABLES=$component_executable_list" \
"-DBUNDLE_LIBRARIES=$component_library_list" \
"-DBUNDLE_SEARCH_DIRECTORIES=$search_directories" \
"-DBUNDLE_SEED_FILES=$compiler_runtimes" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_dir/cmake/BundleComponentDependencies.cmake"
fi
done < <(
python3 -c \
'import json,sys; data=json.load(open(sys.argv[1], encoding="utf-8"))["components"]; [print(name, data[name]["packageId"], sep="\t") for name in sorted(data)]' \
"$source_dir/components.json"
)
fi
artifact_base="echoion-${version}-linux-x86_64"
archive="$dist_dir/$artifact_base.tar.zst"
installer="$dist_dir/$artifact_base.run"
external_manifest="$dist_dir/$artifact_base.manifest.json"
external_report="$dist_dir/$artifact_base.dependencies.txt"
component_dist="$dist_dir/components"
rm -f -- \
"$archive" "$archive.tmp" \
"$installer" "$installer.tmp" \
"$external_manifest" "$external_report" \
"$dist_dir/SHA256SUMS"
cmake -E rm -rf "$component_dist"
bash "$source_dir/scripts/package-release-payload.sh" \
"$stage" "$artifact_base" "$SOURCE_DATE_EPOCH" \
"$archive" "$installer" "$build_dir"
install -m 0644 "$stage/manifest.json" "$external_manifest"
install -m 0644 "$dependency_report" "$external_report"
if ((package_components)); then
component_sequence=${update_sequence:-$SOURCE_DATE_EPOCH}
if [[ $component_sequence == 0 ]]; then
component_sequence=1
fi
python3 "$source_dir/scripts/package-components.py" \
--registry "$source_dir/components.json" \
--lock "$source_dir/components.lock.json" \
--staging-root "$component_stage_root" \
--output "$component_dist" \
--channel "$update_channel" \
--sequence "$component_sequence" \
--product-version "$version" \
--build-type RelWithDebInfo \
--toolchain-contract linux-x86_64-glibc-2.35-cxx26
fi
(
cd "$dist_dir"
mapfile -t checksum_files < <(
find . -type f ! -name SHA256SUMS -printf '%P\n' |
LC_ALL=C sort
)
sha256sum "${checksum_files[@]}" >SHA256SUMS
)
echo "Release created without starting Echoion:"
echo " $archive"
echo " $installer"
echo " $external_manifest"
echo " $external_report"
((package_components)) && echo " $component_dist"
echo " $dist_dir/SHA256SUMS"
-49
View File
@@ -1,49 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
printf '%s\n' \
'Usage: restore-gitea-release-tag.sh --repository URL --tag TAG'
}
repository=
tag=
while (($# > 0)); do
case "$1" in
--repository)
repository=${2-}
shift 2
;;
--tag)
tag=${2-}
shift 2
;;
--help|-h)
usage
exit 0
;;
*)
printf 'restore-gitea-release-tag: unknown argument: %s\n' "$1" >&2
usage >&2
exit 2
;;
esac
done
if [[ -z $repository || $repository == -* || -z $tag ]]; then
usage >&2
exit 2
fi
tag_ref="refs/tags/$tag"
if ! git check-ref-format "$tag_ref"; then
printf '%s\n' 'restore-gitea-release-tag: invalid tag name' >&2
exit 1
fi
# actions/checkout can replace an annotated tag with a lightweight local ref
# when Gitea reports the target commit as the workflow event SHA. Fetch the
# exact remote tag object before performing signature verification.
git fetch --force --no-tags "$repository" "+$tag_ref:$tag_ref"
-97
View File
@@ -1,97 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
if [[ $# -lt 3 || $# -gt 4 ]]; then
echo "usage: $0 RELEASE_ROOT VERSION BUNDLE_ROOT [MANIFEST]" >&2
exit 2
fi
release_root=$(realpath -m -- "$1")
version=$2
bundle_root=$(realpath -e -- "$3")
manifest=${4:-"$release_root/pending-release.json"}
manifest=$(realpath -m -- "$manifest")
if [[ ! $version =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ ]]; then
echo "invalid release version: $version" >&2
exit 2
fi
if [[ $bundle_root == "$release_root" ||
$bundle_root == "$release_root"/* ||
$release_root == "$bundle_root"/* ]]; then
echo "bundle root and release root must not overlap" >&2
exit 2
fi
if [[ $(dirname -- "$manifest") != "$release_root" ]]; then
echo "pending manifest must be written directly below the release root" >&2
exit 2
fi
if [[ ! -x $bundle_root/bin/echoiond ]]; then
echo "echoiond is missing or not executable: $bundle_root/bin/echoiond" >&2
exit 2
fi
if [[ ! -x $bundle_root/bin/echoion-updater ]]; then
echo "updater is missing or not executable: $bundle_root/bin/echoion-updater" >&2
exit 2
fi
if [[ ! -f $bundle_root/lib/Echoion.ts ]]; then
echo "Core library is missing: $bundle_root/lib/Echoion.ts" >&2
exit 2
fi
if [[ ! -f $bundle_root/manifest.json ]]; then
echo "v2 release manifest is missing: $bundle_root/manifest.json" >&2
exit 2
fi
mkdir -p -- "$release_root" "$(dirname -- "$manifest")"
staging="$release_root/.staging-$version-$$"
destination="$release_root/$version"
manifest_tmp="$(dirname -- "$manifest")/.$(basename -- "$manifest").tmp.$$"
version_lock="$release_root/.stage-$version.lock"
destination_created=0
manifest_published=0
lock_acquired=0
cleanup() {
rm -rf -- "$staging"
rm -f -- "$manifest_tmp"
if ((destination_created && !manifest_published)); then
rm -rf -- "$destination"
fi
if ((lock_acquired)); then
rmdir -- "$version_lock" 2>/dev/null || true
fi
}
trap cleanup EXIT
if ! mkdir -- "$version_lock"; then
echo "release staging is already active for version $version" >&2
exit 2
fi
lock_acquired=1
if [[ -e $destination ]]; then
echo "release already exists: $destination" >&2
exit 2
fi
mkdir -m 0755 -- "$staging"
cp -a -- "$bundle_root/." "$staging/"
python3 "$script_dir/validate-release-manifest.py" \
--root "$staging" \
--version "$version" \
--pending-output "$manifest_tmp"
mv -T -- "$staging" "$destination"
destination_created=1
mv -f -- "$manifest_tmp" "$manifest"
manifest_published=1
rmdir -- "$version_lock"
lock_acquired=0
trap - EXIT
echo "staged release $version"
echo "payload: $destination"
echo "manifest: $manifest"
-89
View File
@@ -1,89 +0,0 @@
#!/usr/bin/env python3
"""Create or synchronize permanent Echoion component working copies."""
from __future__ import annotations
import argparse
import json
import subprocess
from pathlib import Path
def run(*args: str, cwd: Path | None = None) -> None:
subprocess.run(args, cwd=cwd, check=True)
def output(*args: str, cwd: Path) -> str:
return subprocess.check_output(args, cwd=cwd, text=True).strip()
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
"--workspace",
type=Path,
help="component checkout directory (default: parent of Echoion root)",
)
parser.add_argument(
"--update",
action="store_true",
help="fetch and check out exact revisions from components.lock.json",
)
parser.add_argument(
"--record",
action="store_true",
help="prepare and record a complete canonical release lock",
)
args = parser.parse_args()
if args.update and args.record:
parser.error("--update and --record are mutually exclusive")
root = Path(__file__).resolve().parents[1]
workspace = (args.workspace or root.parent).resolve()
registry = json.loads((root / "components.json").read_text())
lock = json.loads((root / "components.lock.json").read_text())
if registry.get("schemaVersion") != 1:
raise SystemExit("unsupported components.json schema")
if lock.get("schemaVersion") != 2:
raise SystemExit("unsupported components.lock.json schema")
if args.record:
run(
str(root / "scripts" / "prepare-release.sh"),
"--workspace",
str(workspace),
cwd=root,
)
return 0
for name, component in registry["components"].items():
destination = workspace / name
revision = (
lock["components"][name]["revision"]
if args.update
else component.get("branch", "main")
)
if not destination.exists():
run(
"git",
"clone",
"--branch",
component.get("branch", "main"),
component["url"],
str(destination),
)
elif not (destination / ".git").exists():
raise SystemExit(f"{destination} exists but is not a Git repository")
if not args.update:
continue
if output("git", "status", "--porcelain", cwd=destination):
raise SystemExit(f"refusing to update dirty repository: {destination}")
run("git", "fetch", "origin", revision, cwd=destination)
run("git", "checkout", "--detach", revision, cwd=destination)
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -1,38 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
# shellcheck source=scripts/lib/component-ssh.sh
source "$root/scripts/lib/component-ssh.sh"
temporary=$(mktemp -d)
trap 'rm -rf -- "$temporary"' EXIT
ssh-keygen -q -t ed25519 -N '' -f "$temporary/source-key"
encoded=$(base64 -w0 "$temporary/source-key")
echoion_decode_base64_secret "$encoded" "$temporary/decoded-key"
cmp -- "$temporary/source-key" "$temporary/decoded-key"
echoion_configure_component_ssh "$temporary/credentials" "$encoded"
expected_public=$(ssh-keygen -y -f "$temporary/source-key")
actual_public=$(ssh-keygen -y -f "$temporary/credentials/component-ssh-key")
test "$actual_public" = "$expected_public"
test -n "$GIT_SSH_COMMAND"
if echoion_decode_base64_secret \
"$(<"$temporary/source-key")" "$temporary/rejected-raw-key" \
>/dev/null 2>&1
then
echo "raw multiline private key was accepted" >&2
exit 1
fi
if echoion_decode_base64_secret 'not-base64!' "$temporary/rejected-invalid-key" \
>/dev/null 2>&1
then
echo "invalid base64 private key was accepted" >&2
exit 1
fi
echo "component SSH secret encoding tests passed"
-134
View File
@@ -1,134 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 1 ]]; then
echo "usage: $0 SOURCE_ROOT" >&2
exit 2
fi
source_root=$(realpath -e -- "$1")
temporary=$(mktemp -d "${TMPDIR:-/tmp}/echoion-frontend-licenses.XXXXXX")
trap 'rm -rf -- "$temporary"' EXIT
node_modules="$temporary/node_modules"
mkdir -p \
"$node_modules/plain/docs" \
"$node_modules/@scope/example" \
"$node_modules/parent/node_modules/duplicate" \
"$node_modules/second/node_modules/duplicate" \
"$node_modules/no-notice"
printf '%s\n' \
'{"name":"plain","version":"1.2.3","license":"MIT"}' \
>"$node_modules/plain/package.json"
printf '%s\n' 'plain license' >"$node_modules/plain/LICENSE"
printf '%s\n' 'ignored nested file' >"$node_modules/plain/docs/LICENSE"
printf '%s\n' '{"name":"not-a-package-root"}' \
>"$node_modules/plain/docs/package.json"
printf '%s\n' \
'{"name":"@scope/example","version":"2.0.0-beta.1","license":"Apache-2.0"}' \
>"$node_modules/@scope/example/package.json"
printf '%s\n' 'scoped license' >"$node_modules/@scope/example/LICENCE.md"
printf '%s\n' 'scoped notice' >"$node_modules/@scope/example/NOTICE-extra"
for package_root in \
"$node_modules/parent/node_modules/duplicate" \
"$node_modules/second/node_modules/duplicate"; do
printf '%s\n' \
'{"name":"duplicate","version":"3.4.5","licenses":[{"type":"BSD-2-Clause"}]}' \
>"$package_root/package.json"
printf '%s\n' 'duplicate copying' >"$package_root/COPYING.txt"
done
printf '%s\n' \
'{"name":"no-notice","version":"4.0.0","license":"ISC"}' \
>"$node_modules/no-notice/package.json"
output_one="$temporary/output-one"
output_two="$temporary/output-two"
(
umask 077
python3 "$source_root/scripts/collect-frontend-licenses.py" \
--node-modules "$node_modules" \
--output "$output_one"
)
python3 "$source_root/scripts/collect-frontend-licenses.py" \
--node-modules "$node_modules" \
--output "$output_two"
diff -r -- "$output_one" "$output_two"
[[ -f $output_one/plain@1.2.3/LICENSE ]]
[[ ! -e $output_one/plain@1.2.3/docs ]]
[[ -f $output_one/@scope%2Fexample@2.0.0-beta.1/LICENCE.md ]]
[[ -f $output_one/@scope%2Fexample@2.0.0-beta.1/NOTICE-extra ]]
[[ -f $output_one/duplicate@3.4.5/COPYING.txt ]]
[[ -d $output_one/no-notice@4.0.0 ]]
if find "$output_one" -type d ! -perm 0755 -print -quit | grep -q .; then
echo "license collection created a directory with an unstable mode" >&2
exit 1
fi
if find "$output_one" -type f ! -perm 0644 -print -quit | grep -q .; then
echo "license collection created a file with an unstable mode" >&2
exit 1
fi
python3 - "$output_one/THIRD-PARTY-NOTICES.txt" <<'PY'
from pathlib import Path
import sys
contents = Path(sys.argv[1]).read_text(encoding="utf-8")
packages = [
line.removeprefix("Package: ")
for line in contents.splitlines()
if line.startswith("Package: ")
]
assert packages == sorted(packages)
assert packages == [
"@scope/example@2.0.0-beta.1",
"duplicate@3.4.5",
"no-notice@4.0.0",
"plain@1.2.3",
]
assert contents.count("Package: duplicate@3.4.5") == 1
assert "Declared license: BSD-2-Clause" in contents
assert "Notice files: none published at package root" in contents
assert "@scope%2Fexample@2.0.0-beta.1/NOTICE-extra" in contents
PY
mkdir -p "$temporary/malformed/node_modules/bad"
printf '%s\n' '{"name":"bad","version":"1.0.0"}' \
>"$temporary/malformed/node_modules/bad/package.json"
error_file="$temporary/malformed.error"
if python3 "$source_root/scripts/collect-frontend-licenses.py" \
--node-modules "$temporary/malformed/node_modules" \
--output "$temporary/malformed-output" \
>/dev/null 2>"$error_file"; then
echo "package without license metadata unexpectedly passed" >&2
exit 1
fi
grep -Fq 'package has no declared license' "$error_file"
mkdir -p \
"$temporary/conflict/node_modules/first/node_modules/same" \
"$temporary/conflict/node_modules/second/node_modules/same"
for package_root in \
"$temporary/conflict/node_modules/first/node_modules/same" \
"$temporary/conflict/node_modules/second/node_modules/same"; do
printf '%s\n' \
'{"name":"same","version":"1.0.0","license":"MIT"}' \
>"$package_root/package.json"
done
printf '%s\n' first \
>"$temporary/conflict/node_modules/first/node_modules/same/LICENSE"
printf '%s\n' second \
>"$temporary/conflict/node_modules/second/node_modules/same/LICENSE"
if python3 "$source_root/scripts/collect-frontend-licenses.py" \
--node-modules "$temporary/conflict/node_modules" \
--output "$temporary/conflict-output" >/dev/null 2>&1; then
echo "conflicting duplicate package contents unexpectedly passed" >&2
exit 1
fi
echo "frontend npm license collection regressions passed"
@@ -1,137 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
verifier="$root/scripts/verify-gitea-release-tag.sh"
restorer="$root/scripts/restore-gitea-release-tag.sh"
temporary=$(mktemp -d)
trap 'rm -rf -- "$temporary"' EXIT
repository="$temporary/repository"
mkdir -p "$repository"
git -C "$repository" init -q -b main
git -C "$repository" config user.name 'Echoion Release Test'
git -C "$repository" config user.email 'release-test@echoion.invalid'
ssh-keygen -q -t ed25519 -N '' -f "$temporary/release-key"
git -C "$repository" config gpg.format ssh
git -C "$repository" config user.signingkey "$temporary/release-key"
printf '%s\n' test >"$repository/source.txt"
git -C "$repository" add source.txt
git -C "$repository" commit -q -m 'Test release source'
git -C "$repository" tag -s -a v1.2.3 \
-m 'Echoion 1.2.3' \
-m $'First release-note paragraph.\n\nSecond paragraph.'
git -C "$repository" switch -q --detach v1.2.3
principal='release-test@echoion.invalid'
printf '%s %s\n' "$principal" "$(<"$temporary/release-key.pub")" \
>"$temporary/allowed-signers"
tag_object=$(git -C "$repository" rev-parse 'refs/tags/v1.2.3^{tag}')
target_commit=$(git -C "$repository" rev-parse 'refs/tags/v1.2.3^{}')
remote="$temporary/remote.git"
git clone -q --bare "$repository" "$remote"
# Reproduce actions/checkout replacing the annotated tag object with the
# workflow event's target commit, then restore the authoritative remote ref.
git -C "$repository" update-ref refs/tags/v1.2.3 "$target_commit"
test "$(git -C "$repository" cat-file -t refs/tags/v1.2.3)" = commit
(
cd "$repository"
"$restorer" --repository "$remote" --tag v1.2.3
)
test "$(git -C "$repository" rev-parse refs/tags/v1.2.3)" = "$tag_object"
actual_target=$(
cd "$repository"
"$verifier" \
--tag v1.2.3 \
--event-sha "$tag_object" \
--allowed-signers "$temporary/allowed-signers" \
--notes-output "$temporary/notes.md"
)
test "$actual_target" = "$target_commit"
grep -Fqx 'Echoion 1.2.3' "$temporary/notes.md"
grep -Fqx 'First release-note paragraph.' "$temporary/notes.md"
grep -Fqx 'Second paragraph.' "$temporary/notes.md"
if grep -Fq -- 'SSH SIGNATURE' "$temporary/notes.md"; then
printf '%s\n' 'release notes contain the SSH signature' >&2
exit 1
fi
# Git 2.34 can underflow while formatting %(contents:body) for an SSH-signed
# tag with only a subject. Subject-only release notes must remain supported.
git -C "$repository" switch -q main
git -C "$repository" tag -s -a v1.2.4 -m 'Echoion 1.2.4'
subject_only_tag=$(git -C "$repository" rev-parse 'refs/tags/v1.2.4^{tag}')
(
cd "$repository"
"$verifier" \
--tag v1.2.4 \
--event-sha "$subject_only_tag" \
--allowed-signers "$temporary/allowed-signers" \
--notes-output "$temporary/subject-only-notes.md" \
>/dev/null
)
test "$(<"$temporary/subject-only-notes.md")" = 'Echoion 1.2.4'
(
cd "$repository"
"$verifier" \
--tag v1.2.3 \
--event-sha "$target_commit" \
--allowed-signers "$temporary/allowed-signers" \
--notes-output "$temporary/notes-from-commit.md" \
>/dev/null
)
if (
cd "$repository"
"$verifier" \
--tag v1.2.3 \
--event-sha 0000000000000000000000000000000000000000 \
--allowed-signers "$temporary/allowed-signers" \
--notes-output "$temporary/rejected-notes.md" \
>/dev/null 2>&1
); then
printf '%s\n' 'mismatched event SHA was accepted' >&2
exit 1
fi
printf '%s\n' 'other@example.invalid ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA' \
>"$temporary/untrusted-signers"
if (
cd "$repository"
"$verifier" \
--tag v1.2.3 \
--event-sha "$target_commit" \
--allowed-signers "$temporary/untrusted-signers" \
--notes-output "$temporary/untrusted-notes.md" \
>/dev/null 2>&1
); then
printf '%s\n' 'untrusted SSH signer was accepted' >&2
exit 1
fi
git -C "$repository" tag lightweight "$target_commit"
lightweight_error="$temporary/lightweight-error.txt"
if (
cd "$repository"
"$verifier" \
--tag lightweight \
--event-sha "$target_commit" \
--allowed-signers "$temporary/allowed-signers" \
--notes-output "$temporary/lightweight-notes.md" \
>/dev/null 2>"$lightweight_error"
); then
printf '%s\n' 'lightweight tag was accepted' >&2
exit 1
fi
grep -Fqx \
'verify-gitea-release-tag: lightweight tags are not allowed; create a signed annotated tag' \
"$lightweight_error"
printf '%s\n' 'Gitea signed-tag verification tests passed'
-193
View File
@@ -1,193 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 1 ]]; then
echo "usage: $0 SOURCE_ROOT" >&2
exit 2
fi
source_root=$(realpath -e -- "$1")
temporary=$(mktemp -d "${TMPDIR:-/tmp}/echoion-release-archive.XXXXXX")
trap 'rm -rf -- "$temporary"' EXIT
stage="$temporary/stage"
mkdir -p "$stage/bin" "$stage/lib"
install -m 0755 /bin/true "$stage/bin/echoiond"
install -m 0755 /bin/true "$stage/bin/echoion-updater"
install -m 0644 /bin/true "$stage/lib/Echoion.ts"
printf '%s\n' \
'{"schemaVersion":2,"version":"1.2.3","buildType":"RelWithDebInfo","buildSignature":"test:1.2.3"}' \
>"$stage/manifest.json"
cat >"$stage/install.sh" <<'INSTALL'
#!/bin/sh
set -eu
payload_root=$(CDPATH= cd -P -- "$(dirname -- "$0")" && pwd -P)
[ "$(stat -c '%a' -- "$payload_root/bin/echoiond")" = 755 ]
[ "$(stat -c '%a' -- "$payload_root/lib/Echoion.ts")" = 644 ]
[ "$1" = --record ]
record=$2
shift 2
printf '%s\n' "$@" >"$record"
INSTALL
printf '%s\n' '#!/bin/sh' 'exit 0' >"$stage/uninstall.sh"
chmod 0755 "$stage/install.sh" "$stage/uninstall.sh"
base=echoion-1.2.3-linux-x86_64
archive_one="$temporary/one.tar.zst"
installer_one="$temporary/one.run"
archive_two="$temporary/two.tar.zst"
installer_two="$temporary/two.run"
bash "$source_root/scripts/package-release-payload.sh" \
"$stage" "$base" 1700000000 "$archive_one" "$installer_one" "$temporary"
bash "$source_root/scripts/package-release-payload.sh" \
"$stage" "$base" 1700000000 "$archive_two" "$installer_two" "$temporary"
cmp "$archive_one" "$archive_two"
cmp "$installer_one" "$installer_two"
[[ $(stat -c '%a' -- "$archive_one") == 644 ]]
[[ $(stat -c '%a' -- "$archive_two") == 644 ]]
[[ $(stat -c '%a' -- "$installer_one") == 755 ]]
[[ $(stat -c '%a' -- "$installer_two") == 755 ]]
feed_payload="$temporary/update-payload.json"
core_feed_payload="$temporary/core-update-payload.json"
plugin_feed_payload="$temporary/plugin-update-payload.json"
feed_envelope="$temporary/update-envelope.json"
private_key="$temporary/update-private.pem"
public_key="$temporary/update-public.pem"
signature="$temporary/update-signature.bin"
SOURCE_DATE_EPOCH=1700000000 python3 \
"$source_root/scripts/generate-update-feed.py" \
--artifact "$archive_one" \
--manifest "$stage/manifest.json" \
--version 1.2.3 \
--url https://updates.example.invalid/echoion-1.2.3-linux-x86_64.tar.zst \
--channel beta \
--feed-id echoion-test \
--sequence 42 \
--output-payload "$feed_payload"
python3 - "$feed_payload" "$archive_one" "$stage/manifest.json" <<'PY'
import hashlib
import json
from pathlib import Path
import sys
payload = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
artifact = Path(sys.argv[2])
manifest = Path(sys.argv[3])
release = payload["releases"][0]
assert payload["schemaVersion"] == 1
assert payload["releases"][0]["buildType"] == "RelWithDebInfo"
assert payload["releases"][0]["buildSignature"] == "test:1.2.3"
assert payload["feedId"] == "echoion-test"
assert payload["sequence"] == 42
assert release["component"] == "runtime"
assert release["artifactId"] == ""
assert release["channel"] == "beta"
assert release["packageType"] == "tar.zst"
assert release["size"] == artifact.stat().st_size
assert release["sha256"] == hashlib.sha256(artifact.read_bytes()).hexdigest()
assert release["releaseManifestSha256"] == hashlib.sha256(
manifest.read_bytes()
).hexdigest()
PY
SOURCE_DATE_EPOCH=1700000000 python3 \
"$source_root/scripts/generate-update-feed.py" \
--artifact "$stage/lib/Echoion.ts" \
--component core \
--version 1.2.3 \
--url https://updates.example.invalid/Echoion-1.2.3.so \
--feed-id echoion-core-test \
--sequence 43 \
--output-payload "$core_feed_payload"
SOURCE_DATE_EPOCH=1700000000 python3 \
"$source_root/scripts/generate-update-feed.py" \
--artifact "$stage/lib/Echoion.ts" \
--component plugin \
--artifact-id lyrics \
--version 2.3.4 \
--url https://updates.example.invalid/lyrics-2.3.4.so \
--feed-id echoion-plugin-test \
--sequence 44 \
--output-payload "$plugin_feed_payload"
python3 - "$core_feed_payload" "$plugin_feed_payload" <<'PY'
import json
from pathlib import Path
import sys
core = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))["releases"][0]
plugin = json.loads(Path(sys.argv[2]).read_text(encoding="utf-8"))["releases"][0]
assert core["component"] == "core"
assert core["artifactId"] == ""
assert core["packageType"] == "shared-library"
assert "releaseManifestSha256" not in core
assert plugin["component"] == "plugin"
assert plugin["artifactId"] == "lyrics"
assert plugin["packageType"] == "shared-library"
assert "releaseManifestSha256" not in plugin
PY
openssl genpkey -algorithm ED25519 -out "$private_key" >/dev/null 2>&1
SOURCE_DATE_EPOCH=1700000000 python3 \
"$source_root/scripts/generate-update-feed.py" \
--artifact "$archive_one" \
--manifest "$stage/manifest.json" \
--version 1.2.3 \
--url https://updates.example.invalid/echoion-1.2.3-linux-x86_64.tar.zst \
--sequence 42 \
--output-payload "$feed_payload" \
--output-envelope "$feed_envelope" \
--key-id test-key \
--private-key "$private_key"
python3 - "$feed_payload" "$feed_envelope" "$signature" <<'PY'
import base64
import json
from pathlib import Path
import sys
payload = Path(sys.argv[1]).read_bytes()
envelope = json.loads(Path(sys.argv[2]).read_text(encoding="utf-8"))
def decode(value: str) -> bytes:
return base64.urlsafe_b64decode(value + "=" * (-len(value) % 4))
assert envelope["schemaVersion"] == 3
assert envelope["keyId"] == "test-key"
assert envelope["document"] == json.loads(payload)
assert decode(envelope["signedPayload"]) == payload
Path(sys.argv[3]).write_bytes(decode(envelope["signature"]))
PY
openssl pkey -in "$private_key" -pubout -out "$public_key" >/dev/null 2>&1
openssl pkeyutl -verify -rawin -pubin -inkey "$public_key" \
-in "$feed_payload" -sigfile "$signature" >/dev/null
mapfile -t members < <(tar --zstd -tf "$archive_one")
((${#members[@]} > 0))
for member in "${members[@]}"; do
[[ $member == "$base" || $member == "$base/"* ]] || {
echo "archive member escaped top-level directory: $member" >&2
exit 1
}
done
printf '%s\n' "${members[@]}" | grep -Fx "$base/bin/echoiond"
record="$temporary/installer-arguments"
(
umask 077
"$installer_one" --record "$record" alpha 'two words'
)
printf '%s\n' alpha 'two words' >"$temporary/expected-arguments"
cmp "$temporary/expected-arguments" "$record"
path_installer_directory="$temporary/path-installer"
mkdir "$path_installer_directory"
install -m 0755 "$installer_one" "$path_installer_directory/echoion-installer"
path_record="$temporary/path-installer-arguments"
(
cd /
PATH="$path_installer_directory:$PATH" \
echoion-installer --record "$path_record" alpha 'two words'
)
cmp "$temporary/expected-arguments" "$path_record"
echo "release archive layout and .run regressions passed"
-273
View File
@@ -1,273 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 2 ]]; then
echo "usage: $0 SOURCE_ROOT COMPONENT_WORKSPACE" >&2
exit 2
fi
source_root=$(realpath -e -- "$1")
component_workspace=$(realpath -e -- "$2")
temporary=$(mktemp -d "${TMPDIR:-/tmp}/echoion-release-packaging.XXXXXX")
trap 'rm -rf -- "$temporary"' EXIT
for version in 0.0.0 1.2.3 1.2.3-rc.1 10.20.30-beta.2; do
python3 "$source_root/scripts/validate-semver.py" "$version"
done
for version in 01.2.3 1.2 1.2.3-01 not-a-version; do
if python3 "$source_root/scripts/validate-semver.py" "$version" \
>/dev/null 2>&1; then
echo "invalid SemVer unexpectedly accepted: $version" >&2
exit 1
fi
done
for version in 01.2.3 1.2.3-01; do
release_error="$temporary/release-version-$version.error"
if "$source_root/scripts/release.sh" \
--version "$version" \
--build-dir "$temporary/build" \
--dist-dir "$temporary/dist" \
>/dev/null 2>"$release_error"; then
echo "release unexpectedly accepted a non-canonical version: $version" >&2
exit 1
fi
grep -q 'canonical Semantic Versioning' "$release_error"
done
if "$source_root/scripts/release.sh" \
--version 1.2.3+build \
--build-dir "$temporary/build" \
--dist-dir "$temporary/dist" \
>/dev/null 2>&1; then
echo "release unexpectedly accepted SemVer build metadata" >&2
exit 1
fi
pythonless_path="$temporary/pythonless-path"
mkdir "$pythonless_path"
for command_name in bash dirname id realpath; do
ln -s "$(command -v "$command_name")" "$pythonless_path/$command_name"
done
ln -s "$(type -P true)" "$pythonless_path/docker"
if PATH="$pythonless_path" command -v python3 >/dev/null; then
echo "Python unexpectedly exists in the container-host test PATH" >&2
exit 1
fi
PATH="$pythonless_path" "$source_root/scripts/release.sh" \
--version 1.2.3-rc.1 \
--build-dir "$source_root/build-pythonless-container-probe" \
--dist-dir "$source_root/dist-pythonless-container-probe" \
--component-workspace "$component_workspace" \
--skip-tests
bundle="$temporary/bundle"
mkdir -p \
"$bundle/bin" \
"$bundle/lib" \
"$bundle/service" \
"$bundle/share/echoion/certs" \
"$bundle/share/echoion/web" \
"$bundle/share/echoion/tools"
install -m 0755 /bin/true "$bundle/bin/echoiond"
install -m 0755 /bin/true "$bundle/bin/echoion-updater"
install -m 0644 /bin/true "$bundle/lib/Echoion.ts"
printf '%s\n' '<!doctype html><title>Echoion</title>' \
>"$bundle/share/echoion/web/index.html"
printf '%s\n' '[Service]' >"$bundle/service/echoion.service.in"
printf '%s\n' '[Service]' >"$bundle/service/echoion-updater.service.in"
printf '%s\n' '[Timer]' >"$bundle/service/echoion-updater.timer.in"
printf '%s\n' '{}' >"$bundle/share/echoion/config.example.json"
printf '%s\n' 'test trust bundle' \
>"$bundle/share/echoion/certs/ca-certificates.crt"
install -m 0755 "$source_root/scripts/validate-release-manifest.py" \
"$bundle/share/echoion/tools/validate-release-manifest.py"
ln -s Echoion.ts "$bundle/lib/Echoion-current.ts"
python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$bundle" --version 1.2.3 --build-type RelWithDebInfo
cp "$bundle/manifest.json" "$temporary/manifest.first.json"
python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$bundle" --version 1.2.3 --build-type RelWithDebInfo
cmp "$temporary/manifest.first.json" "$bundle/manifest.json"
unsafe_file_mode="$temporary/unsafe-file-mode"
cp -a "$bundle" "$unsafe_file_mode"
chmod 0666 "$unsafe_file_mode/lib/Echoion.ts"
if python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$unsafe_file_mode" --version 1.2.3 \
--build-type RelWithDebInfo >/dev/null 2>&1; then
echo "world-writable payload file unexpectedly entered manifest" >&2
exit 1
fi
unsafe_directory_mode="$temporary/unsafe-directory-mode"
cp -a "$bundle" "$unsafe_directory_mode"
chmod 0777 "$unsafe_directory_mode/lib"
if python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$unsafe_directory_mode" --version 1.2.3 \
--build-type RelWithDebInfo >/dev/null 2>&1; then
echo "world-writable payload directory unexpectedly entered manifest" >&2
exit 1
fi
python3 - "$bundle/manifest.json" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as stream:
manifest = json.load(stream)
assert manifest["schemaVersion"] == 2
assert manifest["version"] == "1.2.3"
assert manifest["buildType"] == "RelWithDebInfo"
assert manifest["executable"] == "bin/echoiond"
assert manifest["updater"] == "bin/echoion-updater"
assert manifest["core"] == "lib/Echoion.ts"
paths = [entry["path"] for entry in manifest["files"]]
assert paths == sorted(paths)
assert "share/echoion/web/index.html" in paths
assert "share/echoion/certs/ca-certificates.crt" in paths
link = next(entry for entry in manifest["files"] if entry["path"].endswith("current.ts"))
assert link == {
"path": "lib/Echoion-current.ts",
"type": "symlink",
"target": "Echoion.ts",
}
for entry in manifest["files"]:
if entry["type"] == "file":
assert set(entry) == {"path", "type", "size", "sha256", "mode"}
assert len(entry["sha256"]) == 64
assert len(entry["mode"]) == 4
PY
printf '%s\n' '#!/bin/sh' 'exit 0' >"$bundle/install.sh"
printf '%s\n' '#!/bin/sh' 'exit 0' >"$bundle/uninstall.sh"
chmod 0755 "$bundle/install.sh" "$bundle/uninstall.sh"
for overlapping_release_root in "$bundle" "$bundle/releases"; do
if bash "$source_root/scripts/stage-release.sh" \
"$overlapping_release_root" 1.2.3 "$bundle" >/dev/null 2>&1; then
echo "overlapping bundle/release roots unexpectedly staged" >&2
exit 1
fi
done
overlap_parent="$temporary/overlap-parent"
mkdir "$overlap_parent"
cp -a "$bundle" "$overlap_parent/bundle"
if bash "$source_root/scripts/stage-release.sh" \
"$overlap_parent" 1.2.3 "$overlap_parent/bundle" >/dev/null 2>&1; then
echo "release root containing bundle root unexpectedly staged" >&2
exit 1
fi
release_root="$temporary/releases"
bash "$source_root/scripts/stage-release.sh" \
"$release_root" 1.2.3 "$bundle"
[[ -x $release_root/1.2.3/bin/echoiond ]]
[[ -L $release_root/1.2.3/lib/Echoion-current.ts ]]
[[ -x $release_root/1.2.3/install.sh ]]
python3 - "$release_root/pending-release.json" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as stream:
manifest = json.load(stream)
assert manifest["executable"] == "1.2.3/bin/echoiond"
assert manifest["core"] == "1.2.3/lib/Echoion.ts"
assert all(entry["path"].startswith("1.2.3/") for entry in manifest["files"])
assert not any(entry["path"].endswith("install.sh") for entry in manifest["files"])
PY
tampered="$temporary/tampered"
cp -a "$bundle" "$tampered"
python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$tampered" --version 1.2.4 --build-type RelWithDebInfo
printf '%s\n' tampered >>"$tampered/lib/Echoion.ts"
if bash "$source_root/scripts/stage-release.sh" \
"$release_root" 1.2.4 "$tampered" >/dev/null 2>&1; then
echo "tampered payload unexpectedly staged" >&2
exit 1
fi
rogue="$temporary/rogue"
cp -a "$bundle" "$rogue"
python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$rogue" --version 1.2.6 --build-type RelWithDebInfo
printf '%s\n' rogue >"$rogue/lib/rogue.so"
if bash "$source_root/scripts/stage-release.sh" \
"$release_root" 1.2.6 "$rogue" >/dev/null 2>&1; then
echo "undeclared immutable payload file unexpectedly staged" >&2
exit 1
fi
[[ ! -e $release_root/1.2.6 ]]
outside_entry="$temporary/outside-entry"
cp -a "$bundle" "$outside_entry"
python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$outside_entry" --version 1.2.8 --build-type RelWithDebInfo
printf '%s\n' outside >"$outside_entry/outside.dat"
python3 - "$outside_entry/manifest.json" "$outside_entry/outside.dat" <<'PY'
import hashlib
import json
from pathlib import Path
import stat
import sys
manifest_path = Path(sys.argv[1])
outside = Path(sys.argv[2])
with manifest_path.open(encoding="utf-8") as stream:
manifest = json.load(stream)
metadata = outside.stat()
manifest["files"].append(
{
"path": "outside.dat",
"type": "file",
"size": metadata.st_size,
"sha256": hashlib.sha256(outside.read_bytes()).hexdigest(),
"mode": f"{stat.S_IMODE(metadata.st_mode):04o}",
}
)
with manifest_path.open("w", encoding="utf-8", newline="\n") as stream:
json.dump(manifest, stream, indent=2)
stream.write("\n")
PY
if bash "$source_root/scripts/stage-release.sh" \
"$release_root" 1.2.8 "$outside_entry" >/dev/null 2>&1; then
echo "manifest entry outside immutable roots unexpectedly staged" >&2
exit 1
fi
[[ ! -e $release_root/1.2.8 ]]
mkdir "$release_root/.stage-1.2.7.lock"
lock_error="$temporary/stage-lock.error"
if bash "$source_root/scripts/stage-release.sh" \
"$release_root" 1.2.7 "$bundle" > /dev/null 2>"$lock_error"; then
echo "concurrent same-version staging unexpectedly acquired the lock" >&2
exit 1
fi
grep -q 'release staging is already active' "$lock_error"
[[ ! -e $release_root/1.2.7 ]]
rmdir "$release_root/.stage-1.2.7.lock"
if find "$release_root" -mindepth 2 -name '.staging-*' | grep -q .; then
echo "staging directory was nested below a published release" >&2
exit 1
fi
unsafe="$temporary/unsafe"
cp -a "$bundle" "$unsafe"
rm "$unsafe/lib/Echoion-current.ts"
ln -s ../bin/echoiond "$unsafe/lib/Echoion-current.ts"
if python3 "$source_root/scripts/generate-release-manifest.py" \
--root "$unsafe" --version 1.2.5 \
--build-type RelWithDebInfo >/dev/null 2>&1; then
echo "unsafe symlink unexpectedly entered manifest" >&2
exit 1
fi
if bash "$source_root/scripts/stage-release.sh" \
"$release_root" '../unsafe' "$bundle" >/dev/null 2>&1; then
echo "unsafe version unexpectedly staged" >&2
exit 1
fi
echo "release manifest and staging regressions passed"
-345
View File
@@ -1,345 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# != 1 ]]; then
echo "usage: $0 SOURCE_ROOT" >&2
exit 2
fi
source_root=$(realpath -e -- "$1")
for command_name in cmake ldd patchelf readelf python3 strip; do
command -v "$command_name" >/dev/null || {
echo "missing test command: $command_name" >&2
exit 2
}
done
c_compiler_name=${CC:-cc}
c_compiler_path=$(command -v -- "$c_compiler_name") || {
echo "missing test C compiler: $c_compiler_name" >&2
exit 2
}
c_compiler=$(realpath -e -- "$c_compiler_path")
cxx_compiler_name=${CXX:-c++}
cxx_compiler_path=$(command -v -- "$cxx_compiler_name") || {
echo "missing test C++ compiler: $cxx_compiler_name" >&2
exit 2
}
cxx_compiler=$(realpath -e -- "$cxx_compiler_path")
temporary=$(mktemp -d "${TMPDIR:-/tmp}/echoion-runtime-deps.XXXXXX")
trap 'rm -rf -- "$temporary"' EXIT
configured_build="$temporary/configured-build"
mkdir -p "$configured_build"
printf 'CMAKE_CXX_COMPILER:FILEPATH=%s\n' "$cxx_compiler" \
>"$configured_build/CMakeCache.txt"
queried_compiler=$(CXX=/bin/false \
"$source_root/scripts/configured-cxx-compiler.sh" "$configured_build")
[[ $queried_compiler == "$cxx_compiler" ]] || {
echo "runtime compiler query followed CXX instead of the configured cache" >&2
exit 1
}
preferred_lib="$temporary/preferred-lib"
other_lib="$temporary/other-lib"
bundle="$temporary/bundle"
resolver="$temporary/resolver"
seed_lib="$temporary/seed-lib"
mkdir -p \
"$preferred_lib" \
"$other_lib" \
"$resolver" \
"$seed_lib" \
"$bundle/bin" \
"$bundle/lib" \
"$bundle/service" \
"$bundle/share/echoion/web" \
"$bundle/share/echoion/bootstrap-plugins/fixture-shortener/1.0.0"
cat >"$temporary/dependency.c" <<'C'
int echoion_dependency(void) { return 42; }
__attribute__((used, section(".echoion_variant")))
static const char echoion_variant[] = ECHOION_VARIANT;
C
cat >"$temporary/core.c" <<'C'
extern int echoion_dependency(void);
extern int echoion_compiler_runtime(void);
__attribute__((used))
static const char echoion_forbidden_path[] =
"/tmp/echoion-forbidden-build-path/source.cpp";
int echoion_core(void) {
return echoion_dependency() + echoion_compiler_runtime();
}
C
cat >"$temporary/main.c" <<'C'
int main(void) { return 0; }
C
cat >"$temporary/compiler-runtime.c" <<'C'
int echoion_compiler_runtime(void) { return 7; }
__attribute__((used, section(".echoion_compiler_variant")))
static const char echoion_compiler_variant[] = ECHOION_VARIANT;
C
cat >"$temporary/plugin.c" <<'C'
extern int echoion_dependency(void);
__attribute__((used))
static const char echoion_plugin_forbidden_path[] =
"/tmp/echoion-plugin-forbidden-build-path/plugin.c";
int echoion_plugin(void) { return echoion_dependency(); }
C
for variant in preferred other; do
case $variant in
preferred) variant_lib=$preferred_lib ;;
other) variant_lib=$other_lib ;;
esac
"$c_compiler" -g -fPIC -shared "$temporary/dependency.c" \
'-DECHOION_VARIANT="'"$variant"'-runtime"' \
-Wl,-soname,libechoion-dependency.so.1 \
-o "$variant_lib/libechoion-dependency.so.1.2.3"
ln -s libechoion-dependency.so.1.2.3 \
"$variant_lib/libechoion-dependency.so.1"
ln -s libechoion-dependency.so.1 \
"$variant_lib/libechoion-dependency.so"
done
for variant in seeded resolver; do
case $variant in
seeded)
variant_lib=$seed_lib
variant_version=100
;;
resolver)
variant_lib=$preferred_lib
variant_version=200
;;
esac
"$c_compiler" -fPIC -shared "$temporary/compiler-runtime.c" \
'-DECHOION_VARIANT="'"$variant"'-compiler-runtime"' \
-Wl,-soname,libstdc++.so.6 \
-o "$variant_lib/libstdc++.so.6.0.$variant_version"
ln -s "libstdc++.so.6.0.$variant_version" \
"$variant_lib/libstdc++.so.6"
done
resolver_core="$resolver/Echoion.ts"
"$c_compiler" -g -fPIC -shared "$temporary/core.c" \
-L"$preferred_lib" -lechoion-dependency \
-Wl,-l:libstdc++.so.6 \
-Wl,-soname,Echoion.ts \
-Wl,-rpath,"$preferred_lib" \
-o "$resolver_core"
install -m 0644 "$resolver_core" "$bundle/lib/Echoion.ts"
patchelf --set-rpath "\$ORIGIN" "$bundle/lib/Echoion.ts"
bundle_plugin="$bundle/share/echoion/bootstrap-plugins/fixture-shortener/1.0.0/fixture-shortener.so"
"$c_compiler" -g -fPIC -shared "$temporary/plugin.c" \
-L"$preferred_lib" -lechoion-dependency \
-Wl,-rpath,"$preferred_lib" \
-o "$bundle_plugin"
"$c_compiler" -g "$temporary/main.c" -o "$bundle/bin/echoiond"
install -m 0755 "$bundle/bin/echoiond" "$bundle/bin/echoion-updater"
printf '%s\n' '[Service]' >"$bundle/service/echoion.service.in"
printf '%s\n' '<!doctype html><title>Echoion</title>' \
>"$bundle/share/echoion/web/index.html"
cmake \
"-DBUNDLE_ROOT=$bundle" \
"-DBUNDLE_RESOLVER_LIBRARIES=$resolver_core;$bundle_plugin" \
"-DBUNDLE_SEARCH_DIRECTORIES=$other_lib" \
"-DBUNDLE_SEED_FILES=$seed_lib/libstdc++.so.6" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_root/cmake/BundleRuntimeDependencies.cmake"
plugin_runpath="\$ORIGIN/../../../../../../current/lib:\$ORIGIN/../../current/lib:\$ORIGIN/lib"
patchelf --set-rpath "$plugin_runpath" "$bundle_plugin"
python3 - "$source_root/scripts/validate-release-elf.py" <<'PY'
import importlib.util
from pathlib import Path
import sys
module_path = Path(sys.argv[1])
spec = importlib.util.spec_from_file_location("validate_release_elf", module_path)
assert spec is not None and spec.loader is not None
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
fixture = """
Version needs section '.gnu.version_r' contains 2 entries:
000000: Version: 1 File: libm.so.6 Cnt: 1
0x0010: Name: GLIBC_9.99 Flags: none Version: 4
0x0020: Version: 1 File: libc.so.6 Cnt: 3
0x0030: Name: GLIBC_2.17 Flags: none Version: 3
0x0040: Name: GLIBC_2.36 Flags: none Version: 2
0x0050: Name: GLIBC_ABI_DT_RELR Flags: none Version: 1
"""
assert module.required_glibc_versions(fixture) == {(2, 17), (2, 36), (9, 99)}
assert module.parse_version("2.35") == (2, 35)
assert module.is_system_dependency("libc.so.6")
assert module.is_system_dependency("libm.so.6")
assert not module.is_system_dependency("libc.so.evil")
assert not module.is_system_dependency("libm.so.99")
root = Path("/release")
plugins = {
root / "share/echoion/bootstrap-plugins/example/1.0.0/example.so"
}
assert module.is_first_party_payload(root / "bin/echoiond", root, plugins)
assert module.is_first_party_payload(root / "lib/Echoion.ts", root, plugins)
assert module.is_first_party_payload(root / "lib/libechoion-host.so.2.0.0", root, plugins)
assert module.is_first_party_payload(root / "lib/libVoid_Plugin.so", root, plugins)
assert module.is_first_party_payload(root / "lib/libVoidTeamspeak.so", root, plugins)
assert module.is_first_party_payload(next(iter(plugins)), root, plugins)
assert not module.is_first_party_payload(root / "lib/libacl.so.1.1.2301", root, plugins)
assert not module.is_first_party_payload(root / "lib/libqjs.so.0.11.0", root, plugins)
unknown_abi = """
Version needs section '.gnu.version_r' contains 1 entry:
000000: Version: 1 File: libc.so.6 Cnt: 1
0x0010: Name: GLIBC_ABI_FUTURE Flags: none Version: 1
"""
try:
module.required_glibc_versions(unknown_abi)
except ValueError as error:
assert "unknown GLIBC ABI requirement" in str(error)
else:
raise AssertionError("unknown GLIBC ABI requirement was accepted")
PY
evil_bundle="$temporary/evil-bundle"
evil_build="$temporary/evil-build"
cp -a -- "$bundle" "$evil_bundle"
mkdir "$evil_build"
cat >"$temporary/evil-dependency.c" <<'C'
int echoion_evil_dependency(void) { return 13; }
C
cat >"$temporary/evil-user.c" <<'C'
extern int echoion_evil_dependency(void);
int echoion_evil_user(void) { return echoion_evil_dependency(); }
C
"$c_compiler" -fPIC -shared "$temporary/evil-dependency.c" \
-Wl,-soname,libc.so.evil -o "$evil_build/libc.so.evil"
"$c_compiler" -fPIC -shared "$temporary/evil-user.c" \
-L"$evil_build" -Wl,-l:libc.so.evil -Wl,-rpath,"$evil_build" \
-o "$evil_build/libevil-user.so"
rm "$evil_build/libc.so.evil"
if cmake \
"-DBUNDLE_ROOT=$evil_bundle" \
"-DBUNDLE_RESOLVER_LIBRARIES=$evil_build/libevil-user.so" \
"-DBUNDLE_SEARCH_DIRECTORIES=$other_lib" \
"-DBUNDLE_SEED_FILES=$seed_lib/libstdc++.so.6" \
"-DPATCHELF_EXECUTABLE=$(command -v patchelf)" \
-P "$source_root/cmake/BundleRuntimeDependencies.cmake" \
>/dev/null 2>&1; then
echo "fake glibc-like SONAME was treated as a system dependency" >&2
exit 1
fi
report="$temporary/dependencies.txt"
python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" --max-glibc 2.35 --report "$report"
python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" --require-first-party-debug-info >/dev/null
cp "$bundle/lib/Echoion.ts" "$temporary/Echoion.ts.debug"
strip --strip-debug "$bundle/lib/Echoion.ts"
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" --require-first-party-debug-info >/dev/null 2>&1; then
echo "first-party ELF without debug information passed validation" >&2
exit 1
fi
install -m 0644 "$temporary/Echoion.ts.debug" "$bundle/lib/Echoion.ts"
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" \
--forbid-content-prefix /tmp/echoion-forbidden-build-path \
>/dev/null 2>&1; then
echo "embedded build/source path unexpectedly passed validation" >&2
exit 1
fi
grep -F $'NEEDED\tlib/Echoion.ts\tlibechoion-dependency.so.1\tbundled' "$report"
grep -F $'NEEDED\tbin/echoiond\tlibc.so.6\tsystem' "$report"
grep -F \
$'ELF\tshare/echoion/bootstrap-plugins/fixture-shortener/1.0.0/fixture-shortener.so\tRUNPATH=$ORIGIN/../../../../../../current/lib:$ORIGIN/../../current/lib:$ORIGIN/lib' \
"$report"
grep -F $'NEEDED\tshare/echoion/bootstrap-plugins/fixture-shortener/1.0.0/fixture-shortener.so\tlibechoion-dependency.so.1\tbundled' "$report"
installed="$temporary/installed"
managed_plugin="$installed/state/plugins/.managed/fixture-shortener/versions/1.0.0/fixture-shortener.so"
portable_plugin="$installed/state/plugins/fixture-shortener.so"
mkdir -p "$installed/current/lib" "$(dirname -- "$managed_plugin")" \
"$(dirname -- "$portable_plugin")"
cp -a "$bundle/lib/." "$installed/current/lib/"
cp "$bundle_plugin" "$managed_plugin"
cp "$bundle_plugin" "$portable_plugin"
for installed_plugin in "$managed_plugin" "$portable_plugin"; do
ldd_report="$temporary/$(basename -- "$(dirname -- "$installed_plugin")").ldd"
env -u LD_LIBRARY_PATH ldd "$installed_plugin" >"$ldd_report" 2>&1
resolved_dependency=$(awk '
$1 == "libechoion-dependency.so.1" && $2 == "=>" {
print $3
exit
}
' "$ldd_report")
[[ -n $resolved_dependency ]]
[[ $(realpath -e -- "$resolved_dependency") == \
$(realpath -e -- "$installed/current/lib/libechoion-dependency.so.1") ]]
if grep -Fq 'not found' "$ldd_report"; then
echo "installed plugin did not resolve its bundled dependency closure" >&2
cat "$ldd_report" >&2
exit 1
fi
done
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" \
--forbid-content-prefix /tmp/echoion-plugin-forbidden-build-path \
>/dev/null 2>&1; then
echo "embedded plugin build/source path unexpectedly passed validation" >&2
exit 1
fi
[[ -L $bundle/lib/libechoion-dependency.so.1 ]]
[[ $(readlink "$bundle/lib/libechoion-dependency.so.1") != /* ]]
[[ -f $bundle/lib/libechoion-dependency.so.1.2.3 ]]
readelf -p .echoion_variant \
"$bundle/lib/libechoion-dependency.so.1.2.3" | grep -F preferred-runtime
if readelf -p .echoion_variant \
"$bundle/lib/libechoion-dependency.so.1.2.3" | grep -Fq other-runtime; then
echo "search-directory runtime replaced the exact build resolver runtime" >&2
exit 1
fi
readelf -p .echoion_compiler_variant \
"$bundle/lib/libstdc++.so.6.0.100" | grep -F seeded-compiler-runtime
if find "$bundle/lib" -maxdepth 1 -name 'libstdc++.so.6.0.200' | grep -q .; then
echo "resolver compiler runtime leaked beside the exact seed" >&2
exit 1
fi
if find "$bundle/lib" -maxdepth 1 -name 'libc.so*' | grep -q .; then
echo "glibc was unexpectedly bundled" >&2
exit 1
fi
patchelf --set-rpath "\$ORIGIN" "$bundle_plugin"
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" >/dev/null 2>&1; then
echo "incorrect bootstrap plugin RUNPATH unexpectedly passed validation" >&2
exit 1
fi
patchelf --set-rpath "$plugin_runpath" "$bundle_plugin"
patchelf --set-rpath /tmp/unsafe-build-path "$bundle/lib/Echoion.ts"
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" >/dev/null 2>&1; then
echo "absolute Core RUNPATH unexpectedly passed validation" >&2
exit 1
fi
patchelf --set-rpath "\$ORIGIN" "$bundle/lib/Echoion.ts"
python3 - "$bundle/lib/Echoion.ts" <<'PY'
import sys
with open(sys.argv[1], "r+b") as stream:
stream.seek(18)
stream.write(b"\xb7\x00") # EM_AARCH64 in a little-endian ELF header.
PY
if python3 "$source_root/scripts/validate-release-elf.py" \
--root "$bundle" >/dev/null 2>&1; then
echo "non-x86-64 Core unexpectedly passed validation" >&2
exit 1
fi
echo "runtime dependency bundling regressions passed"
-779
View File
@@ -1,779 +0,0 @@
#!/usr/bin/env python3
"""Offline regression tests for scripts/gitea_release.py."""
from __future__ import annotations
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import json
import os
from pathlib import Path
import re
import subprocess
import tempfile
import threading
import unittest
from urllib.parse import parse_qs, unquote, urlsplit
SOURCE_ROOT = Path(__file__).resolve().parents[2]
SCRIPT = SOURCE_ROOT / "scripts" / "gitea_release.py"
class State:
def __init__(self) -> None:
self.releases: dict[int, dict] = {}
self.tags: dict[str, str] = {}
self.assets: dict[int, bytes] = {}
self.next_release = 1
self.next_asset = 1
self.tag_creations = 0
self.uploads = 0
self.upload_attempts = 0
self.fail_upload_attempt: int | None = None
self.downloads = 0
self.draft_download_attempts = 0
self.transient_download_failures = 0
self.tag_protections = [
{
"id": 1,
"name_pattern": "v*",
"whitelist_usernames": ["release-maintainer"],
"whitelist_teams": [],
}
]
def release_document(self, release_id: int, server: ThreadingHTTPServer) -> dict:
release = dict(self.releases[release_id])
release["assets"] = [
{
"id": asset["id"],
"name": asset["name"],
"size": len(self.assets[asset["id"]]),
"browser_download_url": (
f"http://127.0.0.1:{server.server_port}/downloads/"
f"{asset['id']}/{asset['name']}"
),
}
for asset in release.get("assets", [])
]
return release
class Handler(BaseHTTPRequestHandler):
server: "Server"
def log_message(self, *_args: object) -> None:
pass
def json_response(self, status: int, document: object) -> None:
body = json.dumps(document).encode("utf-8")
self.send_response(status)
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def empty_response(self, status: int) -> None:
self.send_response(status)
self.send_header("Content-Length", "0")
self.end_headers()
def read_json(self) -> dict:
size = int(self.headers["Content-Length"])
return json.loads(self.rfile.read(size))
def do_GET(self) -> None:
target = urlsplit(self.path)
if target.path.startswith("/downloads/"):
if self.server.state.transient_download_failures:
self.server.state.transient_download_failures -= 1
self.close_connection = True
return
asset_id = int(target.path.split("/")[2])
if any(
release["draft"]
and any(asset["id"] == asset_id for asset in release["assets"])
for release in self.server.state.releases.values()
):
self.server.state.draft_download_attempts += 1
self.json_response(404, {"message": "not found"})
return
body = self.server.state.assets[asset_id]
self.server.state.downloads += 1
self.send_response(200)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
return
tag_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/tags/(.+)", target.path
)
if tag_match:
tag = unquote(tag_match.group(1))
for release_id, release in self.server.state.releases.items():
if release["tag_name"] == tag:
self.json_response(
200,
self.server.state.release_document(release_id, self.server),
)
return
self.json_response(404, {"message": "not found"})
return
repository_tag_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/tags/(.+)", target.path
)
if repository_tag_match:
tag = unquote(repository_tag_match.group(1))
if tag in self.server.state.tags:
self.json_response(
200,
{
"name": tag,
"commit": {"sha": self.server.state.tags[tag]},
},
)
return
self.json_response(404, {"message": "not found"})
return
release_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/([0-9]+)", target.path
)
if release_match:
release_id = int(release_match.group(1))
self.json_response(
200, self.server.state.release_document(release_id, self.server)
)
return
if target.path == "/api/v1/repos/Void/Echoion/releases":
releases = [
self.server.state.release_document(release_id, self.server)
for release_id in sorted(self.server.state.releases, reverse=True)
]
self.json_response(200, releases)
return
if target.path == "/api/v1/repos/Void/Echoion/tag_protections":
self.json_response(200, self.server.state.tag_protections)
return
self.json_response(404, {"message": "unknown route"})
def do_POST(self) -> None:
target = urlsplit(self.path)
if target.path == "/api/v1/repos/Void/Echoion/releases":
document = self.read_json()
release_id = self.server.state.next_release
self.server.state.next_release += 1
self.server.state.releases[release_id] = {
**document,
"id": release_id,
"assets": [],
"created_at": f"2026-07-{release_id:02d}T00:00:00Z",
"published_at": None,
}
self.json_response(
201, self.server.state.release_document(release_id, self.server)
)
return
asset_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/([0-9]+)/assets", target.path
)
if asset_match:
release_id = int(asset_match.group(1))
filename = parse_qs(target.query)["name"][0]
content_type = self.headers["Content-Type"]
boundary = content_type.partition("boundary=")[2].encode("ascii")
body = self.rfile.read(int(self.headers["Content-Length"]))
payload = body.split(b"\r\n\r\n", 1)[1].rsplit(
b"\r\n--" + boundary, 1
)[0]
self.server.state.upload_attempts += 1
if (
self.server.state.fail_upload_attempt
== self.server.state.upload_attempts
):
self.json_response(500, {"message": "injected upload failure"})
return
asset_id = self.server.state.next_asset
self.server.state.next_asset += 1
self.server.state.assets[asset_id] = payload
self.server.state.releases[release_id]["assets"].append(
{"id": asset_id, "name": filename}
)
self.server.state.uploads += 1
document = self.server.state.release_document(release_id, self.server)[
"assets"
][-1]
self.json_response(201, document)
return
self.json_response(404, {"message": "unknown route"})
def do_PATCH(self) -> None:
target = urlsplit(self.path)
match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/([0-9]+)", target.path
)
if not match:
self.json_response(404, {"message": "unknown route"})
return
release_id = int(match.group(1))
release = self.server.state.releases[release_id]
document = self.read_json()
if release["draft"] and document.get("draft") is False:
tag = release["tag_name"]
if tag not in self.server.state.tags:
self.server.state.tags[tag] = document["target_commitish"]
self.server.state.tag_creations += 1
release.update(document)
if not release["draft"]:
self.server.state.releases[release_id]["published_at"] = (
"2026-07-22T00:00:00Z"
)
self.json_response(
200, self.server.state.release_document(release_id, self.server)
)
def do_DELETE(self) -> None:
target = urlsplit(self.path)
tag_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/tags/(.+)", target.path
)
if tag_match:
tag = unquote(tag_match.group(1))
if tag not in self.server.state.tags:
self.empty_response(404)
return
del self.server.state.tags[tag]
self.empty_response(204)
return
asset_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/([0-9]+)/assets/([0-9]+)",
target.path,
)
if asset_match:
release_id = int(asset_match.group(1))
asset_id = int(asset_match.group(2))
del self.server.state.assets[asset_id]
self.server.state.releases[release_id]["assets"] = [
asset
for asset in self.server.state.releases[release_id]["assets"]
if asset["id"] != asset_id
]
self.empty_response(204)
return
release_match = re.fullmatch(
r"/api/v1/repos/Void/Echoion/releases/([0-9]+)", target.path
)
if release_match:
del self.server.state.releases[int(release_match.group(1))]
self.empty_response(204)
return
self.json_response(404, {"message": "unknown route"})
class Server(ThreadingHTTPServer):
def __init__(self) -> None:
super().__init__(("127.0.0.1", 0), Handler)
self.state = State()
class GiteaReleaseTest(unittest.TestCase):
def setUp(self) -> None:
self.server = Server()
self.thread = threading.Thread(target=self.server.serve_forever, daemon=True)
self.thread.start()
self.temporary = tempfile.TemporaryDirectory()
def tearDown(self) -> None:
self.server.shutdown()
self.server.server_close()
self.thread.join()
self.temporary.cleanup()
def run_script(self, *arguments: str, check: bool = True) -> subprocess.CompletedProcess:
environment = {
**os.environ,
"TEST_GITEA_TOKEN": "test-token",
"NO_PROXY": "127.0.0.1,localhost",
"no_proxy": "127.0.0.1,localhost",
}
command = [
os.fspath(SCRIPT),
"--api-url",
f"http://127.0.0.1:{self.server.server_port}/api/v1",
"--token-env",
"TEST_GITEA_TOKEN",
"--allow-http",
*arguments,
]
completed = subprocess.run(
command,
check=False,
env=environment,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
if check and completed.returncode != 0:
self.fail(
f"gitea_release.py failed with {completed.returncode}:\n"
f"stdout: {completed.stdout}\nstderr: {completed.stderr}"
)
return completed
def test_publish_is_verified_and_idempotent(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "one.bin").write_bytes(b"first")
Path(artifacts, "two.bin").write_bytes(b"second")
arguments = (
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"v1.2.3",
"--target",
"0123456789abcdef0123456789abcdef01234567",
"--name",
"Echoion 1.2.3",
"--body",
"test release",
"--artifacts",
os.fspath(artifacts),
)
self.server.state.tags["v1.2.3"] = (
"0123456789abcdef0123456789abcdef01234567"
)
self.run_script(*arguments)
self.assertFalse(self.server.state.releases[1]["draft"])
self.assertEqual(self.server.state.uploads, 2)
self.assertEqual(self.server.state.downloads, 2)
self.assertEqual(self.server.state.draft_download_attempts, 0)
self.run_script(*arguments)
self.assertEqual(self.server.state.uploads, 2)
self.assertEqual(self.server.state.downloads, 4)
Path(artifacts, "one.bin").write_bytes(b"FIRST")
failed = self.run_script(*arguments, check=False)
self.assertNotEqual(failed.returncode, 0)
self.assertIn("download verification failed", failed.stderr)
self.assertEqual(self.server.state.uploads, 2)
def test_publish_retries_a_transient_download_failure(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "one.bin").write_bytes(b"first")
target = "0123456789abcdef0123456789abcdef01234567"
self.server.state.tags["v1.2.3"] = target
self.server.state.transient_download_failures = 1
self.run_script(
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"v1.2.3",
"--target",
target,
"--name",
"Echoion 1.2.3",
"--body",
"test release",
"--artifacts",
os.fspath(artifacts),
)
self.assertEqual(self.server.state.transient_download_failures, 0)
self.assertEqual(self.server.state.downloads, 1)
def test_publish_creates_a_missing_nightly_tag_idempotently(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "nightly.bin").write_bytes(b"nightly")
target = "23456789abcdef0123456789abcdef0123456789"
arguments = (
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"nightly-20260726-13",
"--target",
target,
"--name",
"Echoion nightly",
"--artifacts",
os.fspath(artifacts),
"--prerelease",
)
self.run_script(*arguments)
self.assertEqual(
self.server.state.tags["nightly-20260726-13"],
target,
)
self.assertEqual(self.server.state.tag_creations, 1)
self.run_script(*arguments)
self.assertEqual(self.server.state.tag_creations, 1)
def test_publish_requires_an_existing_tag_by_default(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "stable.bin").write_bytes(b"stable")
failed = self.run_script(
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"v9.9.9",
"--target",
"3456789abcdef0123456789abcdef0123456789a",
"--name",
"Echoion 9.9.9",
"--artifacts",
os.fspath(artifacts),
check=False,
)
self.assertNotEqual(failed.returncode, 0)
self.assertIn("release tag does not exist", failed.stderr)
self.assertFalse(self.server.state.releases)
self.assertFalse(self.server.state.tags)
def test_missing_tag_exception_is_restricted_to_nightlies(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "beta.bin").write_bytes(b"beta")
failed = self.run_script(
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"v9.9.9-beta.1",
"--target",
"456789abcdef0123456789abcdef0123456789ab",
"--name",
"Echoion 9.9.9 beta 1",
"--artifacts",
os.fspath(artifacts),
"--allow-missing-draft-tag",
"--prerelease",
check=False,
)
self.assertNotEqual(failed.returncode, 0)
self.assertIn("restricted to nightly-*", failed.stderr)
self.assertFalse(self.server.state.releases)
self.assertFalse(self.server.state.tags)
def test_publish_never_moves_an_existing_tag(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "nightly.bin").write_bytes(b"nightly")
tag = "nightly-20260726-14"
existing_target = "456789abcdef0123456789abcdef0123456789ab"
requested_target = "56789abcdef0123456789abcdef0123456789abc"
self.server.state.tags[tag] = existing_target
failed = self.run_script(
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
tag,
"--target",
requested_target,
"--name",
"Echoion nightly",
"--artifacts",
os.fspath(artifacts),
"--allow-missing-draft-tag",
"--prerelease",
check=False,
)
self.assertNotEqual(failed.returncode, 0)
self.assertIn("tag does not target", failed.stderr)
self.assertEqual(self.server.state.tags[tag], existing_target)
self.assertFalse(self.server.state.releases)
def test_prune_keeps_fourteen_newest_nightlies(self) -> None:
for index in range(1, 17):
self.server.state.releases[index] = {
"id": index,
"tag_name": f"nightly-202607{index:02d}-1",
"prerelease": True,
"draft": False,
"assets": [],
"created_at": f"2026-07-{index:02d}T00:00:00Z",
"published_at": f"2026-07-{index:02d}T00:00:00Z",
}
self.server.state.next_release = 17
self.run_script(
"prune-nightlies",
"--owner",
"Void",
"--repo",
"Echoion",
"--keep",
"14",
"--protect-tag",
"nightly-20260716-1",
)
self.assertEqual(len(self.server.state.releases), 14)
self.assertNotIn(1, self.server.state.releases)
self.assertNotIn(2, self.server.state.releases)
def test_prune_counts_an_old_protected_nightly_within_retention(self) -> None:
for index in range(1, 17):
self.server.state.releases[index] = {
"id": index,
"tag_name": f"nightly-202607{index:02d}-1",
"prerelease": True,
"draft": False,
"assets": [],
"created_at": f"2026-07-{index:02d}T00:00:00Z",
"published_at": f"2026-07-{index:02d}T00:00:00Z",
}
self.server.state.next_release = 17
self.run_script(
"prune-nightlies",
"--owner",
"Void",
"--repo",
"Echoion",
"--keep",
"14",
"--protect-tag",
"nightly-20260701-1",
)
self.assertEqual(len(self.server.state.releases), 14)
self.assertIn(1, self.server.state.releases)
self.assertNotIn(2, self.server.state.releases)
self.assertNotIn(3, self.server.state.releases)
def test_rerun_recovers_an_incomplete_draft(self) -> None:
artifacts = Path(self.temporary.name, "artifacts")
artifacts.mkdir()
Path(artifacts, "one.bin").write_bytes(b"first")
Path(artifacts, "two.bin").write_bytes(b"second")
arguments = (
"publish",
"--owner",
"Void",
"--repo",
"Echoion",
"--tag",
"v2.0.0",
"--target",
"89abcdef0123456789abcdef0123456789abcdef",
"--name",
"Echoion 2.0.0",
"--artifacts",
os.fspath(artifacts),
)
self.server.state.tags["v2.0.0"] = (
"89abcdef0123456789abcdef0123456789abcdef"
)
self.server.state.fail_upload_attempt = 2
failed = self.run_script(*arguments, check=False)
self.assertNotEqual(failed.returncode, 0)
self.assertTrue(self.server.state.releases[1]["draft"])
self.assertEqual(len(self.server.state.releases[1]["assets"]), 1)
self.server.state.fail_upload_attempt = None
self.run_script(*arguments)
self.assertFalse(self.server.state.releases[1]["draft"])
self.assertEqual(len(self.server.state.releases[1]["assets"]), 2)
self.assertEqual(self.server.state.uploads, 3)
def test_required_tag_protection_is_verified(self) -> None:
completed = self.run_script(
"verify-tag-protection",
"--owner",
"Void",
"--repo",
"Echoion",
"--required-pattern",
"v*",
)
self.assertIn("verified protected tag pattern", completed.stdout)
self.server.state.tag_protections[0]["whitelist_usernames"] = []
rejected = self.run_script(
"verify-tag-protection",
"--owner",
"Void",
"--repo",
"Echoion",
"--required-pattern",
"v*",
check=False,
)
self.assertNotEqual(rejected.returncode, 0)
self.assertIn("empty allowlist", rejected.stderr)
def test_nightly_version_uses_next_patch_after_published_release(self) -> None:
cmake_file = Path(self.temporary.name, "CMakeLists.txt")
cmake_file.write_text(
"project(Echoion VERSION 1.0.0 LANGUAGES CXX)\n",
encoding="utf-8",
)
releases = [
("v1.9.9", False, "2026-07-20T00:00:00Z"),
("v2.4.0-beta.1", False, "2026-07-19T00:00:00Z"),
("v9.0.0", True, None),
("nightly-20260726-16", False, "2026-07-26T00:00:00Z"),
]
for release_id, (tag, draft, published_at) in enumerate(releases, 1):
self.server.state.releases[release_id] = {
"id": release_id,
"tag_name": tag,
"target_commitish": "0123456789abcdef0123456789abcdef01234567",
"name": tag,
"body": "",
"prerelease": "-" in tag,
"draft": draft,
"assets": [],
"created_at": f"2026-07-{release_id:02d}T00:00:00Z",
"published_at": published_at,
}
completed = self.run_script(
"derive-nightly-version",
"--owner",
"Void",
"--repo",
"Echoion",
"--cmake-file",
os.fspath(cmake_file),
"--date-id",
"20260726",
"--run-number",
"17",
)
self.assertEqual(
completed.stdout.strip(),
"2.4.1-nightly.20260726.17",
)
def test_nightly_version_falls_back_to_root_cmake_version(self) -> None:
cmake_file = Path(self.temporary.name, "CMakeLists.txt")
cmake_file.write_text(
"cmake_minimum_required(VERSION 4.0)\n"
"project(\n"
" Echoion\n"
" VERSION 3.2.1\n"
" LANGUAGES CXX\n"
")\n",
encoding="utf-8",
)
self.server.state.releases[1] = {
"id": 1,
"tag_name": "nightly-20260726-16",
"target_commitish": "0123456789abcdef0123456789abcdef01234567",
"name": "nightly",
"body": "",
"prerelease": True,
"draft": False,
"assets": [],
"created_at": "2026-07-26T00:00:00Z",
"published_at": "2026-07-26T00:00:00Z",
}
self.server.state.releases[2] = {
"id": 2,
"tag_name": "v9.0.0",
"target_commitish": "0123456789abcdef0123456789abcdef01234567",
"name": "failed draft",
"body": "",
"prerelease": False,
"draft": True,
"assets": [],
"created_at": "2026-07-26T00:00:00Z",
"published_at": None,
}
completed = self.run_script(
"derive-nightly-version",
"--owner",
"Void",
"--repo",
"Echoion",
"--cmake-file",
os.fspath(cmake_file),
"--date-id",
"20260727",
"--run-number",
"18",
)
self.assertEqual(
completed.stdout.strip(),
"3.2.1-nightly.20260727.18",
)
def test_nightly_version_prefers_newer_root_cmake_version(self) -> None:
cmake_file = Path(self.temporary.name, "CMakeLists.txt")
cmake_file.write_text(
"project(Echoion VERSION 3.0.0 LANGUAGES CXX)\n",
encoding="utf-8",
)
self.server.state.releases[1] = {
"id": 1,
"tag_name": "v2.4.0",
"target_commitish": "0123456789abcdef0123456789abcdef01234567",
"name": "Echoion 2.4.0",
"body": "",
"prerelease": False,
"draft": False,
"assets": [],
"created_at": "2026-07-26T00:00:00Z",
"published_at": "2026-07-26T00:00:00Z",
}
completed = self.run_script(
"derive-nightly-version",
"--owner",
"Void",
"--repo",
"Echoion",
"--cmake-file",
os.fspath(cmake_file),
"--date-id",
"20260728",
"--run-number",
"19",
)
self.assertEqual(
completed.stdout.strip(),
"3.0.0-nightly.20260728.19",
)
def test_root_cmake_project_version_command(self) -> None:
cmake_file = Path(self.temporary.name, "CMakeLists.txt")
cmake_file.write_text(
"project(Echoion VERSION 4.5.6 LANGUAGES CXX)\n",
encoding="utf-8",
)
completed = self.run_script(
"cmake-project-version",
"--cmake-file",
os.fspath(cmake_file),
)
self.assertEqual(completed.stdout.strip(), "4.5.6")
if __name__ == "__main__":
unittest.main()
@@ -1,345 +0,0 @@
#!/usr/bin/env python3
"""Offline tests for product-independent component release transactions."""
from __future__ import annotations
import base64
import importlib.util
import json
import os
from pathlib import Path
import shutil
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[2]
PACKAGE = ROOT / "scripts" / "package-component.py"
PUBLISH = ROOT / "scripts" / "publish-component-release.py"
VERIFY = ROOT / "scripts" / "verify-locked-component-feeds.py"
VERIFY_RELWITHDEBINFO = ROOT / "scripts" / "verify-relwithdebinfo.py"
class IndependentComponentReleaseTests(unittest.TestCase):
def setUp(self) -> None:
self.temporary = tempfile.TemporaryDirectory(
prefix="echoion-independent-component."
)
self.root = Path(self.temporary.name)
self.registry = self.root / "components.json"
self.output = self.root / "dist"
self.feed = self.root / "feed"
self.key = self.root / "key.pem"
self.public_key = self.root / "public.pem"
self.registry.write_text(
json.dumps(
{
"schemaVersion": 1,
"components": {
"EchoionApi": {
"repository": "Void/EchoionApi",
"packageId": "echoion-api",
"kind": "sdk",
"activation": "restart-required",
"dependencies": {},
},
"EchoionWeb": {
"repository": "Void/EchoionWeb",
"packageId": "echoion-web",
"kind": "runtime-module",
"activation": "restart-required",
"dependencies": {
"EchoionApi": ">=2.0.0 <3.0.0"
},
},
},
}
)
)
subprocess.run(
[
"openssl",
"genpkey",
"-algorithm",
"ED25519",
"-out",
str(self.key),
],
check=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
self.key.chmod(0o600)
subprocess.run(
[
"openssl",
"pkey",
"-in",
str(self.key),
"-pubout",
"-out",
str(self.public_key),
],
check=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
def tearDown(self) -> None:
self.temporary.cleanup()
def test_component_elf_requires_debug_information(self) -> None:
compiler = shutil.which("cc")
if compiler is None:
self.skipTest("C compiler is unavailable")
specification = importlib.util.spec_from_file_location(
"echoion_package_component", PACKAGE
)
self.assertIsNotNone(specification)
self.assertIsNotNone(specification.loader)
module = importlib.util.module_from_spec(specification)
specification.loader.exec_module(module)
package_root = self.root / "elf-stage"
package_root.mkdir()
source = self.root / "fixture.c"
executable = package_root / "fixture"
source.write_text("int main(void) { return 0; }\n")
subprocess.run(
[compiler, "-O2", "-g0", str(source), "-o", str(executable)],
check=True,
)
with self.assertRaisesRegex(SystemExit, "has no debug information"):
module.require_debug_information(package_root)
rejected = subprocess.run(
[str(VERIFY_RELWITHDEBINFO), "--root", str(package_root)],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
self.assertNotEqual(rejected.returncode, 0)
self.assertIn("has no debug information", rejected.stderr)
subprocess.run(
[compiler, "-O2", "-g", str(source), "-o", str(executable)],
check=True,
)
module.require_debug_information(package_root)
accepted = subprocess.run(
[str(VERIFY_RELWITHDEBINFO), "--root", str(package_root)],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
self.assertEqual(accepted.returncode, 0, accepted.stderr)
def package(self, component: str, package_id: str, version: str) -> tuple[Path, Path]:
package_root = self.root / f"stage-{component}"
package_root.mkdir()
(package_root / "payload.txt").write_text(component)
environment = os.environ.copy()
environment["SOURCE_DATE_EPOCH"] = "100"
result = subprocess.run(
[
str(PACKAGE),
"--registry",
str(self.registry),
"--component",
component,
"--package-root",
str(package_root),
"--output",
str(self.output),
"--component-version",
version,
"--source-sha",
("1" if component == "EchoionApi" else "2") * 40,
"--source-tree-hash",
"git-sha1:" + ("3" if component == "EchoionApi" else "4") * 40,
"--abi-hash",
"sha256:" + ("5" if component == "EchoionApi" else "6") * 64,
"--build-type",
"RelWithDebInfo",
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=environment,
)
self.assertEqual(result.returncode, 0, result.stderr)
stem = f"{package_id}-{version}-linux-x86_64"
return (
self.output / f"{stem}.manifest.json",
self.output / f"{stem}.tar.zst",
)
def publish(
self,
component: str,
manifest: Path,
archive: Path,
sequence: int,
) -> subprocess.CompletedProcess[str]:
return subprocess.run(
[
str(PUBLISH),
"--registry",
str(self.registry),
"--component",
component,
"--manifest",
str(manifest),
"--archive",
str(archive),
"--feed-root",
str(self.feed),
"--base-url",
"https://updates.example.test/echoion",
"--artifact-base-url",
"https://downloads.example.test/components",
"--channel",
"stable",
"--sequence",
str(sequence),
"--generated-at",
"2026-07-29T12:00:00Z",
"--key-id",
"test-key",
"--private-key",
str(self.key),
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
@staticmethod
def payload(path: Path) -> dict[str, object]:
envelope = json.loads(path.read_text())
if envelope["schemaVersion"] == 3:
encoded = envelope["signedPayload"]
document = envelope["document"]
else:
encoded = envelope["payload"]
document = None
raw = base64.urlsafe_b64decode(encoded + "=" * (-len(encoded) % 4))
payload = json.loads(raw)
if document is not None and document != payload:
raise AssertionError("readable document differs from signed payload")
return payload
def test_single_component_publication_merges_catalog(self) -> None:
api_manifest, api_archive = self.package(
"EchoionApi", "echoion-api", "2.1.0"
)
api_result = self.publish(
"EchoionApi", api_manifest, api_archive, 100
)
self.assertEqual(api_result.returncode, 0, api_result.stderr)
web_manifest, web_archive = self.package(
"EchoionWeb", "echoion-web", "2.0.1"
)
web_result = self.publish(
"EchoionWeb", web_manifest, web_archive, 101
)
self.assertEqual(web_result.returncode, 0, web_result.stderr)
catalog = self.payload(self.feed / "feeds/stable/catalog.json")
self.assertEqual(
[item["componentId"] for item in catalog["components"]],
["EchoionApi", "EchoionWeb"],
)
api = self.payload(
self.feed / "feeds/stable/echoion-api/2.1.0.json"
)
self.assertNotIn("productVersion", api)
for private_field in (
"repository",
"repositoryUrl",
"cloneUrl",
"giteaReleaseUrl",
):
self.assertNotIn(private_field, api)
self.assertEqual(api["productCompatibility"], ">=2.0.0 <3.0.0")
self.assertEqual(api["buildType"], "RelWithDebInfo")
self.assertEqual(
api["artifact"]["url"],
"https://downloads.example.test/components/"
"EchoionApi/2.1.0/echoion-api-2.1.0-linux-x86_64.tar.zst",
)
def test_rejects_replay_without_mutating_lock(self) -> None:
manifest, archive = self.package(
"EchoionApi", "echoion-api", "2.0.1"
)
first = self.publish("EchoionApi", manifest, archive, 200)
self.assertEqual(first.returncode, 0, first.stderr)
replay = self.publish("EchoionApi", manifest, archive, 200)
self.assertNotEqual(replay.returncode, 0)
self.assertIn("sequence is not monotonic", replay.stderr)
def test_product_lock_verifies_against_independent_feeds(self) -> None:
manifests: dict[str, Path] = {}
for sequence, component, package_id, version in (
(300, "EchoionApi", "echoion-api", "2.1.0"),
(301, "EchoionWeb", "echoion-web", "2.0.1"),
):
manifest, archive = self.package(
component, package_id, version
)
result = self.publish(component, manifest, archive, sequence)
self.assertEqual(result.returncode, 0, result.stderr)
manifests[component] = manifest
locked: dict[str, object] = {}
for component, manifest_path in manifests.items():
manifest = json.loads(manifest_path.read_text())
locked[component] = {
"componentVersion": manifest["componentVersion"],
"revision": manifest["sourceSha"],
"sourceTreeHash": manifest["sourceTreeHash"],
"abiHash": manifest["abiHash"],
"artifactIdentity": manifest["artifactIdentity"],
}
lock = self.root / "components.lock.json"
lock.write_text(
json.dumps(
{
"schemaVersion": 2,
"productVersion": "2.0.0",
"components": locked,
}
)
)
result = subprocess.run(
[
str(VERIFY),
"--registry",
str(self.registry),
"--lock",
str(lock),
"--feed-root",
str(self.feed),
"--channel",
"stable",
"--key-id",
"test-key",
"--public-key",
str(self.public_key),
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn("verified 2 locked components", result.stdout)
if __name__ == "__main__":
unittest.main()
-104
View File
@@ -1,104 +0,0 @@
#!/usr/bin/env python3
"""Offline tests for deterministic independent component packages."""
from __future__ import annotations
import json
import os
from pathlib import Path
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[2]
SCRIPT = ROOT / "scripts" / "package-components.py"
class PackageComponentsTests(unittest.TestCase):
def test_packages_every_locked_component(self) -> None:
with tempfile.TemporaryDirectory(
prefix="echoion-package-components."
) as directory:
root = Path(directory)
staging = root / "staging"
output = root / "dist"
(staging / "echoion-api/include").mkdir(parents=True)
(staging / "echoion-api/include/api.hpp").write_text("api")
registry = {
"schemaVersion": 1,
"components": {
"EchoionApi": {
"repository": "Void/EchoionApi",
"kind": "sdk",
"packageId": "echoion-api",
"activation": "restart-required",
"dependencies": {},
}
},
}
lock = {
"schemaVersion": 2,
"productVersion": "2.0.0",
"components": {
"EchoionApi": {
"repository": "Void/EchoionApi",
"revision": "1" * 40,
"componentVersion": "2.0.0",
"abiHash": "sha256:" + "2" * 64,
"sourceTreeHash": "git-sha1:" + "3" * 40,
"artifactIdentity": (
"echoion-api-2.0.0-linux-x86_64"
),
}
},
}
registry_path = root / "components.json"
lock_path = root / "components.lock.json"
registry_path.write_text(json.dumps(registry))
lock_path.write_text(json.dumps(lock))
environment = os.environ.copy()
environment["SOURCE_DATE_EPOCH"] = "100"
result = subprocess.run(
[
str(SCRIPT),
"--registry",
str(registry_path),
"--lock",
str(lock_path),
"--staging-root",
str(staging),
"--output",
str(output),
"--channel",
"stable",
"--sequence",
"100",
"--product-version",
"2.0.0",
"--build-type",
"RelWithDebInfo",
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=environment,
)
self.assertEqual(result.returncode, 0, result.stderr)
manifest_path = (
output
/ "echoion-api-2.0.0-linux-x86_64.manifest.json"
)
manifest = json.loads(manifest_path.read_text())
self.assertEqual(manifest["componentId"], "EchoionApi")
self.assertEqual(manifest["buildType"], "RelWithDebInfo")
self.assertTrue(
(
output / "echoion-api-2.0.0-linux-x86_64.tar.zst"
).is_file()
)
if __name__ == "__main__":
unittest.main()
@@ -1,180 +0,0 @@
#!/usr/bin/env python3
"""Tests for independent component version derivation."""
from __future__ import annotations
import json
from pathlib import Path
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[2]
SCRIPT = ROOT / "scripts" / "prepare-component-release.py"
class PrepareComponentReleaseTests(unittest.TestCase):
def setUp(self) -> None:
self.temporary = tempfile.TemporaryDirectory(
prefix="echoion-prepare-component."
)
self.root = Path(self.temporary.name)
self.repo = self.root / "repo"
self.feed = self.root / "feed"
self.repo.mkdir()
subprocess.run(
["git", "init", "-b", "main"],
cwd=self.repo,
check=True,
stdout=subprocess.DEVNULL,
)
subprocess.run(
["git", "config", "user.email", "test@example.invalid"],
cwd=self.repo,
check=True,
)
subprocess.run(
["git", "config", "user.name", "Test"],
cwd=self.repo,
check=True,
)
(self.repo / "abi").mkdir()
self.contract = self.repo / "abi/module.json"
self.contract.write_text(
json.dumps({"schemaVersion": 1, "functions": ["create"]})
)
self.commit("initial")
self.initial_sha = self.git("rev-parse", "HEAD")
self.registry = self.root / "components.json"
self.registry.write_text(
json.dumps(
{
"schemaVersion": 1,
"components": {
"EchoionExample": {
"repository": "Void/EchoionExample",
"packageId": "echoion-example",
"kind": "runtime-module",
"activation": "restart-required",
"dependencies": {},
"abiContract": "abi/module.json",
}
},
}
)
)
self.configuration = self.root / "component.release.json"
self.configuration.write_text(
json.dumps(
{
"schemaVersion": 1,
"componentId": "EchoionExample",
"productCompatibility": ">=2.0.0 <3.0.0",
"cmakeOptions": {},
}
)
)
def tearDown(self) -> None:
self.temporary.cleanup()
def git(self, *arguments: str) -> str:
return subprocess.check_output(
["git", *arguments], cwd=self.repo, text=True
).strip()
def commit(self, message: str) -> None:
subprocess.run(["git", "add", "."], cwd=self.repo, check=True)
subprocess.run(
["git", "commit", "-m", message],
cwd=self.repo,
check=True,
stdout=subprocess.DEVNULL,
)
def state(self, version: str) -> None:
path = self.feed / "state/components/EchoionExample.json"
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(
json.dumps(
{
"schemaVersion": 2,
"componentId": "EchoionExample",
"lastSourceSha": self.initial_sha,
"semVer": version,
"channels": {},
}
)
)
def run_prepare(
self, version: str
) -> subprocess.CompletedProcess[str]:
return subprocess.run(
[
str(SCRIPT),
"--registry",
str(self.registry),
"--configuration",
str(self.configuration),
"--repository",
str(self.repo),
"--feed-root",
str(self.feed),
"--channel",
"stable",
"--requested-version",
version,
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
def test_initial_component_starts_at_2_0_0(self) -> None:
result = self.run_prepare("2.0.0")
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(json.loads(result.stdout)["change"], "initial")
def test_ci_release_tools_checkout_is_not_component_source(self) -> None:
tools = self.repo / ".echoion-release-tools"
tools.mkdir()
(tools / "release-helper.sh").write_text("#!/bin/sh\n")
result = self.run_prepare("2.0.0")
self.assertEqual(result.returncode, 0, result.stderr)
def test_other_untracked_files_make_component_dirty(self) -> None:
(self.repo / "unexpected.txt").write_text("unexpected\n")
result = self.run_prepare("2.0.0")
self.assertNotEqual(result.returncode, 0)
self.assertIn("component repository must be clean", result.stderr)
def test_append_only_contract_change_requires_minor(self) -> None:
self.state("2.0.0")
self.contract.write_text(
json.dumps(
{"schemaVersion": 1, "functions": ["create", "destroy"]}
)
)
self.commit("append")
rejected = self.run_prepare("2.0.1")
self.assertNotEqual(rejected.returncode, 0)
accepted = self.run_prepare("2.1.0")
self.assertEqual(accepted.returncode, 0, accepted.stderr)
self.assertEqual(json.loads(accepted.stdout)["change"], "minor")
def test_reordered_contract_requires_major(self) -> None:
self.state("2.2.0")
self.contract.write_text(
json.dumps({"schemaVersion": 1, "functions": ["destroy", "create"]})
)
self.commit("breaking")
accepted = self.run_prepare("3.0.0")
self.assertEqual(accepted.returncode, 0, accepted.stderr)
self.assertEqual(json.loads(accepted.stdout)["change"], "major")
if __name__ == "__main__":
unittest.main()
-119
View File
@@ -1,119 +0,0 @@
#!/usr/bin/env python3
from __future__ import annotations
import importlib.util
import unittest
from pathlib import Path
SCRIPT = Path(__file__).resolve().parents[1] / "prepare_release.py"
SPEC = importlib.util.spec_from_file_location("prepare_release", SCRIPT)
assert SPEC is not None and SPEC.loader is not None
MODULE = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(MODULE)
class PrepareReleaseTests(unittest.TestCase):
def test_remote_tag_commit_accepts_lightweight_tag(self) -> None:
revision = "a" * 40
self.assertEqual(
MODULE.remote_tag_commit(
f"{revision}\trefs/tags/v2.0.0", "v2.0.0"
),
revision,
)
def test_remote_tag_commit_peels_signed_annotated_tag(self) -> None:
tag_object = "a" * 40
revision = "b" * 40
self.assertEqual(
MODULE.remote_tag_commit(
f"{tag_object}\trefs/tags/v2.0.0\n"
f"{revision}\trefs/tags/v2.0.0^{{}}",
"v2.0.0",
),
revision,
)
def test_root_version_is_the_only_product_version(self) -> None:
self.assertEqual(
MODULE.root_product_version(
"cmake_minimum_required(VERSION 4.0)\n"
"project(Echoion VERSION 2.0.0 LANGUAGES CXX)\n"
),
"2.0.0",
)
def test_duplicate_root_version_is_rejected(self) -> None:
with self.assertRaises(MODULE.ReleaseError):
MODULE.root_product_version(
"project(Echoion VERSION 2.0.0)\n"
"project(Echoion VERSION 2.0.1)\n"
)
def test_contract_classification(self) -> None:
original = {"descriptor": {"fields": ["id", "version"]}}
self.assertEqual(
MODULE.classify_contract(original, original), "identical"
)
self.assertEqual(
MODULE.classify_contract(
original,
{"descriptor": {"fields": ["id", "version", "health"]}},
),
"compatible",
)
self.assertEqual(
MODULE.classify_contract(
original,
{"descriptor": {"fields": ["version", "id"]}},
),
"breaking",
)
def test_component_version_derivation(self) -> None:
previous = {
"revision": "a" * 40,
"componentVersion": "2.3.4",
}
self.assertEqual(
MODULE.derive_component_version(
previous, "a" * 40, None, None
),
"2.3.4",
)
self.assertEqual(
MODULE.derive_component_version(
previous, "b" * 40, None, None
),
"2.3.5",
)
self.assertEqual(
MODULE.derive_component_version(
previous,
"b" * 40,
{"fields": ["a", "b"]},
{"fields": ["a"]},
),
"2.4.0",
)
self.assertEqual(
MODULE.derive_component_version(
previous,
"b" * 40,
{"fields": ["b"]},
{"fields": ["a"]},
),
"3.0.0",
)
def test_contract_hash_is_canonical(self) -> None:
self.assertEqual(
MODULE.contract_hash({"b": 2, "a": 1}),
MODULE.contract_hash({"a": 1, "b": 2}),
)
if __name__ == "__main__":
unittest.main()
@@ -1,271 +0,0 @@
#!/usr/bin/env python3
"""Offline tests for signed channel-separated component feed publication."""
from __future__ import annotations
import base64
import json
from pathlib import Path
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[2]
SCRIPT = ROOT / "scripts" / "publish-component-feeds.py"
class ComponentFeedTests(unittest.TestCase):
def setUp(self) -> None:
self.temporary = tempfile.TemporaryDirectory(
prefix="echoion-component-feed-test."
)
self.root = Path(self.temporary.name)
self.artifacts = self.root / "artifacts"
self.feeds = self.root / "feed"
self.artifacts.mkdir()
self.key = self.root / "feed-key.pem"
subprocess.run(
[
"openssl",
"genpkey",
"-algorithm",
"ED25519",
"-out",
str(self.key),
],
check=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
self.key.chmod(0o600)
components = {
"EchoionApi": {
"repository": "Void/EchoionApi",
"packageId": "echoion-api",
"kind": "sdk",
"activation": "restart-required",
"dependencies": {},
},
"EchoionPluginExample": {
"repository": "Void/EchoionPluginExample",
"packageId": "echoion-plugin-example",
"pluginId": "example",
"kind": "plugin",
"activation": "reloadable",
"dependencies": {"EchoionApi": ">=2.0.0 <3.0.0"},
},
}
self.registry = {"schemaVersion": 1, "components": components}
locked = {}
for index, component_id in enumerate(components, start=1):
locked[component_id] = {
"repository": components[component_id]["repository"],
"revision": f"{index:040x}",
"componentVersion": "2.0.0",
"abiHash": f"sha256:{index:064x}",
"sourceTreeHash": f"git-sha1:{index + 10:040x}",
"artifactIdentity": (
f"{components[component_id]['packageId']}-"
"2.0.0-linux-x86_64"
),
}
self.lock = {
"schemaVersion": 2,
"productVersion": "2.0.0",
"components": locked,
}
self.registry_path = self.root / "components.json"
self.lock_path = self.root / "components.lock.json"
self.registry_path.write_text(json.dumps(self.registry))
self.lock_path.write_text(json.dumps(self.lock))
def tearDown(self) -> None:
self.temporary.cleanup()
def write_packages(self, channel: str, sequence: int) -> None:
for component_id, definition in self.registry["components"].items():
version = "2.0.0"
if channel != "stable":
version += f"-{channel}.{sequence}"
stem = (
f"{definition['packageId']}-{version}-linux-x86_64"
)
archive = self.artifacts / f"{stem}.tar.zst"
archive.write_bytes(f"{component_id}:{channel}:{sequence}".encode())
locked = self.lock["components"][component_id]
manifest = {
"schemaVersion": 1,
"componentId": component_id,
"packageId": definition["packageId"],
"kind": definition["kind"],
"productVersion": "2.0.0",
"componentVersion": version,
"sourceSha": locked["revision"],
"sourceTreeHash": locked["sourceTreeHash"],
"abiHash": locked["abiHash"],
"artifactIdentity": stem,
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"platform": "linux",
"architecture": "x86_64",
"buildType": "RelWithDebInfo",
"toolchainContract": "linux-x86_64-glibc-2.35-cxx26",
}
(self.artifacts / f"{stem}.manifest.json").write_text(
json.dumps(manifest)
)
def publish(
self, channel: str, sequence: int, *, expect_success: bool = True
) -> subprocess.CompletedProcess[str]:
result = subprocess.run(
[
str(SCRIPT),
"--registry",
str(self.registry_path),
"--lock",
str(self.lock_path),
"--artifacts",
str(self.artifacts),
"--feed-root",
str(self.feeds),
"--base-url",
"https://updates.example.test/echoion",
"--artifact-base-url",
"https://updates.example.test/releases/v2.0.0",
"--channel",
channel,
"--sequence",
str(sequence),
"--generated-at",
"2026-07-28T12:00:00Z",
"--key-id",
"test-key",
"--private-key",
str(self.key),
],
check=False,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
if expect_success and result.returncode != 0:
self.fail(result.stderr)
return result
@staticmethod
def payload(path: Path) -> dict[str, object]:
envelope = json.loads(path.read_text())
if envelope["schemaVersion"] == 3:
encoded = envelope["signedPayload"]
document = envelope["document"]
else:
encoded = envelope["payload"]
document = None
decoded = base64.urlsafe_b64decode(encoded + "=" * (-len(encoded) % 4))
payload = json.loads(decoded)
if document is not None and document != payload:
raise AssertionError("readable document differs from signed payload")
return payload
def test_stable_layout_and_catalog(self) -> None:
self.write_packages("stable", 100)
self.publish("stable", 100)
catalog_path = self.feeds / "feeds/stable/catalog.json"
catalog_text = catalog_path.read_text()
catalog_envelope = json.loads(catalog_text)
self.assertTrue(catalog_text.startswith("{\n"))
self.assertIn('\n "document": {\n', catalog_text)
self.assertEqual(catalog_envelope["schemaVersion"], 3)
self.assertEqual(catalog_envelope["keyId"], "test-key")
catalog = self.payload(catalog_path)
self.assertEqual(len(catalog["components"]), 2)
self.assertTrue(
(self.feeds / "feeds/stable/echoion-api/2.0.0.json").is_file()
)
self.assertTrue(
(
self.feeds
/ "feeds/stable/plugins/example/2.0.0.json"
).is_file()
)
state = json.loads(
(
self.feeds
/ "state/components/EchoionPluginExample.json"
).read_text()
)
self.assertEqual(state["semVer"], "2.0.0")
self.assertEqual(state["sequence"], 100)
release = self.payload(
self.feeds / "feeds/stable/echoion-api/2.0.0.json"
)
self.assertEqual(release["artifactIdentity"], "echoion-api-2.0.0-linux-x86_64")
self.assertEqual(release["platform"], "linux")
self.assertEqual(release["architecture"], "x86_64")
self.assertEqual(release["buildType"], "RelWithDebInfo")
self.assertEqual(
release["toolchainContract"],
"linux-x86_64-glibc-2.35-cxx26",
)
def test_rejects_replay_and_immutable_artifact_change(self) -> None:
self.write_packages("stable", 100)
self.publish("stable", 100)
replay = self.publish("stable", 100, expect_success=False)
self.assertNotEqual(replay.returncode, 0)
for archive in self.artifacts.glob("*.tar.zst"):
archive.write_bytes(archive.read_bytes() + b"changed")
conflict = self.publish("stable", 101, expect_success=False)
self.assertNotEqual(conflict.returncode, 0)
self.assertIn("unchanged source SHA", conflict.stderr)
def test_rejects_tampered_readable_document(self) -> None:
self.write_packages("stable", 100)
self.publish("stable", 100)
release_path = (
self.feeds / "feeds/stable/echoion-api/2.0.0.json"
)
envelope = json.loads(release_path.read_text())
envelope["document"]["sequence"] = 101
release_path.write_text(json.dumps(envelope))
rejected = self.publish("stable", 101, expect_success=False)
self.assertNotEqual(rejected.returncode, 0)
self.assertIn(
"readable document differs from signed payload", rejected.stderr
)
def test_beta_does_not_advance_stable_state(self) -> None:
self.write_packages("stable", 100)
self.publish("stable", 100)
for path in self.artifacts.iterdir():
path.unlink()
self.write_packages("beta", 200)
self.publish("beta", 200)
state = json.loads(
(
self.feeds / "state/components/EchoionApi.json"
).read_text()
)
self.assertEqual(state["semVer"], "2.0.0")
self.assertEqual(state["sequence"], 100)
self.assertEqual(state["channels"]["beta"]["version"], "2.0.0-beta.200")
beta_release = self.payload(
self.feeds
/ "feeds/beta/echoion-api/2.0.0-beta.200.json"
)
self.assertEqual(
beta_release["artifactIdentity"],
"echoion-api-2.0.0-beta.200-linux-x86_64",
)
self.assertTrue(
(
self.feeds
/ "feeds/beta/echoion-api/2.0.0-beta.200.json"
).is_file()
)
if __name__ == "__main__":
unittest.main()
-385
View File
@@ -1,385 +0,0 @@
#!/usr/bin/env python3
"""Validate a relocatable Linux ELF closure without executing its binaries."""
from __future__ import annotations
import argparse
import os
from pathlib import Path, PurePosixPath
import re
import shutil
import subprocess
import tempfile
SYSTEM_DEPENDENCIES = tuple(
re.compile(pattern)
for pattern in (
r"^linux-vdso\.so\.1$",
r"^ld-linux-x86-64\.so\.2$",
r"^libc\.so\.6$",
r"^libm\.so\.6$",
r"^libmvec\.so\.1$",
r"^libdl\.so\.2$",
r"^libpthread\.so\.0$",
r"^librt\.so\.1$",
r"^libresolv\.so\.2$",
r"^libutil\.so\.1$",
r"^libanl\.so\.1$",
r"^libBrokenLocale\.so\.1$",
r"^libthread_db\.so\.1$",
)
)
NEEDED_PATTERN = re.compile(r"\(NEEDED\).*Shared library: \[([^]]+)]")
RUNPATH_PATTERN = re.compile(r"\((?:RPATH|RUNPATH)\).*Library r(?:un)?path: \[([^]]*)]")
INTERPRETER_PATTERN = re.compile(r"Requesting program interpreter: ([^]]+)]")
GLIBC_NAME_PATTERN = re.compile(r"\bName: (GLIBC_[A-Za-z0-9_.]+)\b")
GLIBC_VERSION_PATTERN = re.compile(r"^GLIBC_(\d+)\.(\d+)(?:\.(\d+))?$")
GLIBC_ABI_MINIMUMS = {"GLIBC_ABI_DT_RELR": (2, 36)}
PLUGIN_IDENTIFIER_PATTERN = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")
PLUGIN_VERSION_PATTERN = re.compile(
r"^(?:0|[1-9][0-9]*)\."
r"(?:0|[1-9][0-9]*)\."
r"(?:0|[1-9][0-9]*)"
r"(?:-(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)"
r"(?:\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*)?$"
)
PLUGIN_RUNPATH = (
"$ORIGIN/../../../../../../current/lib:"
"$ORIGIN/../../current/lib:"
"$ORIGIN/lib"
)
FIRST_PARTY_LIBRARY_PATTERN = re.compile(
r"^(?:Echoion\.ts|libechoion-[A-Za-z0-9_.-]+\.so(?:\..*)?|"
r"libVoidTeamspeak\.so(?:\..*)?|libVoid_[A-Za-z0-9_.-]+\.so(?:\..*)?)$"
)
def parse_version(value: str) -> tuple[int, ...]:
if not re.fullmatch(r"\d+(?:\.\d+){1,2}", value):
raise ValueError(f"invalid ABI version: {value!r}")
return tuple(int(component) for component in value.split("."))
def required_glibc_versions(version_info: str) -> set[tuple[int, ...]]:
versions: set[tuple[int, ...]] = set()
in_needs = False
for line in version_info.splitlines():
if line.startswith("Version needs section"):
in_needs = True
continue
if in_needs and line.startswith("Version "):
break
if not in_needs:
continue
name_match = GLIBC_NAME_PATTERN.search(line)
if name_match is None:
continue
name = name_match.group(1)
if name in GLIBC_ABI_MINIMUMS:
versions.add(GLIBC_ABI_MINIMUMS[name])
elif name.startswith("GLIBC_ABI_"):
raise ValueError(f"unknown GLIBC ABI requirement: {name}")
elif version_match := GLIBC_VERSION_PATTERN.fullmatch(name):
versions.add(
tuple(
int(component)
for component in version_match.groups()
if component is not None
)
)
return versions
def command_output(arguments: list[str]) -> str:
environment = os.environ.copy()
environment["LC_ALL"] = "C"
completed = subprocess.run(
arguments,
check=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
env=environment,
)
if completed.returncode != 0:
message = completed.stderr.strip() or completed.stdout.strip()
raise ValueError(f"{' '.join(arguments)} failed: {message}")
return completed.stdout
def is_elf(path: Path) -> bool:
with path.open("rb") as stream:
return stream.read(4) == b"\x7fELF"
def is_system_dependency(name: str) -> bool:
return any(pattern.fullmatch(name) for pattern in SYSTEM_DEPENDENCIES)
def is_first_party_payload(path: Path, root: Path, plugin_files: set[Path]) -> bool:
if path in plugin_files or path.parent == root / "bin":
return True
return (
path.parent == root / "lib"
and FIRST_PARTY_LIBRARY_PATTERN.fullmatch(path.name) is not None
)
def ensure_inside(path: Path, directory: Path, description: str) -> None:
try:
path.resolve(strict=True).relative_to(directory)
except (FileNotFoundError, RuntimeError, ValueError) as error:
raise ValueError(f"{description} escapes the bundle or is dangling: {path}") from error
def validate_symlinks(library_dir: Path) -> None:
for path in sorted(library_dir.iterdir()):
if not path.is_symlink():
continue
target = os.readlink(path)
pure_target = PurePosixPath(target)
if not target or pure_target.is_absolute() or ".." in pure_target.parts:
raise ValueError(f"unsafe library symlink: {path.name} -> {target}")
ensure_inside(path, library_dir, "library symlink")
def bootstrap_plugin_libraries(root: Path) -> list[Path]:
plugin_root = root / "share/echoion/bootstrap-plugins"
if not plugin_root.exists() and not plugin_root.is_symlink():
return []
if plugin_root.is_symlink() or not plugin_root.is_dir():
raise ValueError(
f"bootstrap plugin root is not a real directory: {plugin_root}"
)
libraries: list[Path] = []
for plugin_directory in sorted(plugin_root.iterdir()):
plugin_id = plugin_directory.name
if (
plugin_directory.is_symlink()
or not plugin_directory.is_dir()
or PLUGIN_IDENTIFIER_PATTERN.fullmatch(plugin_id) is None
):
raise ValueError(f"invalid bootstrap plugin directory: {plugin_directory}")
versions = sorted(plugin_directory.iterdir())
if len(versions) != 1:
raise ValueError(
f"bootstrap plugin {plugin_id!r} must contain exactly one version"
)
version_directory = versions[0]
if (
version_directory.is_symlink()
or not version_directory.is_dir()
or len(version_directory.name) > 64
or PLUGIN_VERSION_PATTERN.fullmatch(version_directory.name) is None
):
raise ValueError(
f"invalid bootstrap plugin version: {version_directory}"
)
expected = version_directory / f"{plugin_id}.so"
entries = sorted(version_directory.iterdir())
if entries != [expected]:
raise ValueError(
f"bootstrap plugin {plugin_id!r} version "
f"{version_directory.name!r} has unexpected files"
)
if expected.is_symlink() or not expected.is_file() or not is_elf(expected):
raise ValueError(f"missing regular bootstrap plugin ELF: {expected}")
libraries.append(expected)
return libraries
def validate(
root: Path,
maximum_glibc: tuple[int, ...] | None = None,
forbidden_content_prefixes: tuple[bytes, ...] = (),
require_first_party_debug_info: bool = False,
) -> list[str]:
executable = root / "bin/echoiond"
updater = root / "bin/echoion-updater"
core = root / "lib/Echoion.ts"
executable_dir = (root / "bin").resolve(strict=True)
library_dir = (root / "lib").resolve(strict=True)
for required in (executable, updater, core):
if not required.is_file() or required.is_symlink() or not is_elf(required):
raise ValueError(f"missing regular ELF payload: {required}")
validate_symlinks(library_dir)
elf_files: list[Path] = []
for path in sorted(executable_dir.iterdir()):
if path.is_symlink() or not path.is_file() or not is_elf(path):
raise ValueError(f"unexpected non-ELF entry in bin/: {path}")
elf_files.append(path)
for path in sorted(library_dir.iterdir()):
if path.is_symlink():
continue
if not path.is_file() or not is_elf(path):
raise ValueError(f"unexpected non-ELF entry in lib/: {path}")
elf_files.append(path)
plugin_files = set(bootstrap_plugin_libraries(root))
elf_files.extend(sorted(plugin_files))
report: list[str] = []
for path in elf_files:
relative = path.relative_to(root).as_posix()
contents = path.read_bytes()
for prefix in forbidden_content_prefixes:
if prefix in contents:
rendered = os.fsdecode(prefix)
raise ValueError(
f"{relative} embeds forbidden build/source path: {rendered}"
)
header = command_output(["readelf", "-hW", os.fspath(path)])
if not re.search(r"^\s*Class:\s+ELF64\s*$", header, re.MULTILINE):
raise ValueError(f"{relative} is not a 64-bit ELF")
if not re.search(
r"^\s*Machine:\s+Advanced Micro Devices X86-64\s*$",
header,
re.MULTILINE,
):
raise ValueError(f"{relative} is not an x86-64 ELF")
if require_first_party_debug_info and is_first_party_payload(
path, root, plugin_files
):
sections = command_output(["readelf", "-SW", os.fspath(path)])
if re.search(r"\]\s+\.(?:z)?debug_info\s", sections) is None:
raise ValueError(
f"{relative} has no debug information; expected a "
"first-party RelWithDebInfo artifact"
)
report.append(f"DEBUG\t{relative}\tFIRST_PARTY=verified")
dynamic = command_output(["readelf", "-dW", os.fspath(path)])
runpaths = RUNPATH_PATTERN.findall(dynamic)
if path in plugin_files:
expected_runpath = PLUGIN_RUNPATH
elif path.parent == executable_dir:
expected_runpath = "$ORIGIN/../lib"
else:
expected_runpath = "$ORIGIN"
if runpaths != [expected_runpath]:
raise ValueError(
f"{relative} RUNPATH must be {expected_runpath!r}, got {runpaths!r}"
)
report.append(f"ELF\t{relative}\tRUNPATH={expected_runpath}")
for needed in NEEDED_PATTERN.findall(dynamic):
if "/" in needed or needed in ("", ".", ".."):
raise ValueError(f"unsafe DT_NEEDED entry in {relative}: {needed!r}")
if is_system_dependency(needed):
location = "system"
else:
dependency = library_dir / needed
if not dependency.exists():
raise ValueError(f"unresolved DT_NEEDED in {relative}: {needed}")
ensure_inside(dependency, library_dir, "DT_NEEDED dependency")
location = "bundled"
report.append(f"NEEDED\t{relative}\t{needed}\t{location}")
version_info = command_output(
["readelf", "--version-info", "-W", os.fspath(path)]
)
glibc_versions = required_glibc_versions(version_info)
if maximum_glibc is not None:
incompatible = sorted(
version for version in glibc_versions if version > maximum_glibc
)
if incompatible:
rendered = ", ".join(
".".join(map(str, version)) for version in incompatible
)
maximum = ".".join(map(str, maximum_glibc))
raise ValueError(
f"{relative} requires GLIBC newer than {maximum}: {rendered}"
)
if glibc_versions:
newest = ".".join(map(str, max(glibc_versions)))
report.append(f"ABI\t{relative}\tGLIBC_MAX={newest}")
if path.parent == executable_dir:
program_headers = command_output(["readelf", "-lW", os.fspath(path)])
interpreter_match = INTERPRETER_PATTERN.search(program_headers)
if interpreter_match is None:
raise ValueError(f"{relative} has no ELF interpreter")
interpreter = interpreter_match.group(1)
if not re.fullmatch(
r"/(?:[^/]+/)*(?:ld-linux[^/]*\.so[^/]*|ld64\.so[^/]*)",
interpreter,
):
raise ValueError(f"unexpected ELF interpreter in {relative}: {interpreter}")
report.append(f"INTERPRETER\t{relative}\t{interpreter}\tsystem")
return sorted(report)
def write_report(lines: list[str], output: Path) -> None:
output.parent.mkdir(parents=True, exist_ok=True)
descriptor, temporary_name = tempfile.mkstemp(
prefix=f".{output.name}.", dir=output.parent
)
try:
with os.fdopen(descriptor, "w", encoding="utf-8", newline="\n") as stream:
stream.write("# Echoion runtime dependency report\n")
stream.write("# Generated with readelf; no payload executable was run.\n")
for line in lines:
stream.write(f"{line}\n")
os.chmod(temporary_name, 0o644)
os.replace(temporary_name, output)
except BaseException:
try:
os.unlink(temporary_name)
except FileNotFoundError:
pass
raise
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--root", required=True, type=Path)
parser.add_argument("--report", type=Path)
parser.add_argument("--max-glibc", type=parse_version)
parser.add_argument(
"--require-first-party-debug-info",
action="store_true",
help=(
"reject Echoion, VoidLibrary, VoidTeamspeak, and bundled plugin "
"payloads without DWARF debug information; redistributed system "
"libraries are exempt"
),
)
parser.add_argument(
"--forbid-content-prefix",
action="append",
default=[],
help="reject ELF files containing this build/source path (repeatable)",
)
arguments = parser.parse_args()
if shutil.which("readelf") is None:
parser.error("readelf is required")
try:
root = arguments.root.resolve(strict=True)
forbidden_content_prefixes = tuple(
os.fsencode(prefix)
for prefix in arguments.forbid_content_prefix
if prefix
)
report = validate(
root,
arguments.max_glibc,
forbidden_content_prefixes,
arguments.require_first_party_debug_info,
)
except (OSError, ValueError) as error:
parser.error(str(error))
if arguments.report:
write_report(report, arguments.report)
if arguments.require_first_party_debug_info:
verified = sum(line.startswith("DEBUG\t") for line in report)
print(f"verified debug information in {verified} first-party ELF files")
else:
print("\n".join(report))
return 0
if __name__ == "__main__":
raise SystemExit(main())
-251
View File
@@ -1,251 +0,0 @@
#!/usr/bin/env python3
"""Validate an Echoion release tree without executing payload binaries."""
from __future__ import annotations
import argparse
import hashlib
import json
import os
from pathlib import Path, PurePosixPath
import stat
import tempfile
IMMUTABLE_ROOTS = ("bin", "lib", "service", "share")
UNSAFE_WRITABLE_MODE = stat.S_IWGRP | stat.S_IWOTH
def sha256(path: Path) -> str:
digest = hashlib.sha256()
with path.open("rb") as source:
for block in iter(lambda: source.read(1024 * 1024), b""):
digest.update(block)
return digest.hexdigest()
def reject_unsafe_writable_mode(path: Path, metadata: os.stat_result) -> None:
if metadata.st_mode & UNSAFE_WRITABLE_MODE:
raise ValueError(
f"immutable payload path is group- or world-writable: {path}"
)
def safe_relative_path(value: object) -> PurePosixPath:
if not isinstance(value, str):
raise ValueError("manifest file entry has no string path")
relative = PurePosixPath(value)
if (
relative.is_absolute()
or not relative.parts
or relative.as_posix() != value
or any(component in ("", ".", "..") for component in value.split("/"))
or relative.parts[0] not in IMMUTABLE_ROOTS
):
raise ValueError(f"unsafe manifest path: {value!r}")
return relative
def collect_actual_entries(root: Path) -> set[str]:
root_metadata = root.lstat()
if not stat.S_ISDIR(root_metadata.st_mode) or root.is_symlink():
raise ValueError(f"immutable payload root is not a directory: {root}")
reject_unsafe_writable_mode(root, root_metadata)
actual: set[str] = set()
pending = [root / name for name in IMMUTABLE_ROOTS]
for directory in pending:
try:
metadata = directory.lstat()
except FileNotFoundError as error:
raise ValueError(
f"missing immutable payload directory: {directory}"
) from error
if not stat.S_ISDIR(metadata.st_mode) or directory.is_symlink():
raise ValueError(f"missing immutable payload directory: {directory}")
reject_unsafe_writable_mode(directory, metadata)
while pending:
directory = pending.pop()
with os.scandir(directory) as iterator:
children = sorted(iterator, key=lambda item: item.name)
for child in children:
path = Path(child.path)
relative = path.relative_to(root).as_posix()
metadata = path.lstat()
if stat.S_ISDIR(metadata.st_mode):
if path.is_symlink():
raise ValueError(f"directory symlink is not allowed: {path}")
reject_unsafe_writable_mode(path, metadata)
pending.append(path)
elif stat.S_ISREG(metadata.st_mode):
reject_unsafe_writable_mode(path, metadata)
actual.add(relative)
elif stat.S_ISLNK(metadata.st_mode):
actual.add(relative)
else:
raise ValueError(f"unsupported special file in payload: {path}")
return actual
def load_and_validate(root: Path, expected_version: str | None = None) -> dict:
manifest_path = root / "manifest.json"
with manifest_path.open("r", encoding="utf-8") as stream:
manifest = json.load(stream)
if not isinstance(manifest, dict) or manifest.get("schemaVersion") != 2:
raise ValueError("release manifest must use schemaVersion 2")
version = manifest.get("version")
if not isinstance(version, str) or not version:
raise ValueError("release manifest has no version")
if expected_version is not None and version != expected_version:
raise ValueError(
f"release version mismatch: expected {expected_version!r}, got {version!r}"
)
if manifest.get("buildType") != "RelWithDebInfo":
raise ValueError("release manifest buildType must be RelWithDebInfo")
build_signature = manifest.get("buildSignature")
if (
not isinstance(build_signature, str)
or not build_signature
or len(build_signature) > 256
or any(character in build_signature for character in "\r\n\0")
):
raise ValueError("release manifest has no valid build signature")
entries = manifest.get("files")
if not isinstance(entries, list):
raise ValueError("release manifest files must be an array")
actual = collect_actual_entries(root)
seen: set[str] = set()
entry_types: dict[str, str] = {}
for entry in entries:
if not isinstance(entry, dict):
raise ValueError("invalid release manifest file entry")
relative = safe_relative_path(entry.get("path"))
relative_text = relative.as_posix()
if relative_text in seen:
raise ValueError(f"duplicate manifest path: {relative_text}")
seen.add(relative_text)
path = root.joinpath(*relative.parts)
try:
metadata = path.lstat()
except FileNotFoundError as error:
raise ValueError(f"manifest entry is missing: {relative_text}") from error
entry_type = entry.get("type")
if entry_type == "file":
if not stat.S_ISREG(metadata.st_mode):
raise ValueError(f"manifest regular file is missing: {relative_text}")
reject_unsafe_writable_mode(path, metadata)
if metadata.st_size != entry.get("size") or sha256(path) != entry.get(
"sha256"
):
raise ValueError(f"manifest file verification failed: {relative_text}")
mode = f"{stat.S_IMODE(metadata.st_mode):04o}"
if mode != entry.get("mode"):
raise ValueError(f"manifest mode verification failed: {relative_text}")
elif entry_type == "symlink":
if not stat.S_ISLNK(metadata.st_mode):
raise ValueError(f"manifest symlink is missing: {relative_text}")
target = entry.get("target")
if not isinstance(target, str):
raise ValueError(f"invalid manifest symlink target: {relative_text}")
target_path = PurePosixPath(target)
if (
not target
or target_path.is_absolute()
or any(component in ("", ".", "..") for component in target.split("/"))
or os.readlink(path) != target
):
raise ValueError(f"unsafe manifest symlink target: {relative_text}")
try:
path.resolve(strict=True).relative_to(root)
except (FileNotFoundError, RuntimeError, ValueError) as error:
raise ValueError(
f"manifest symlink escapes release root: {relative_text}"
) from error
else:
raise ValueError(f"invalid manifest entry type: {entry_type!r}")
entry_types[relative_text] = entry_type
if seen != actual:
details = []
if undeclared := sorted(actual - seen):
details.append("undeclared=" + ",".join(undeclared))
if missing := sorted(seen - actual):
details.append("missing=" + ",".join(missing))
raise ValueError("immutable payload coverage mismatch: " + "; ".join(details))
required = {
"executable": "bin/echoiond",
"updater": "bin/echoion-updater",
"core": "lib/Echoion.ts",
"web dashboard": "share/echoion/web/index.html",
"configuration template": "share/echoion/config.example.json",
"TLS trust bundle": "share/echoion/certs/ca-certificates.crt",
"manifest validator": "share/echoion/tools/validate-release-manifest.py",
"service template": "service/echoion.service.in",
"updater service template": "service/echoion-updater.service.in",
"updater timer template": "service/echoion-updater.timer.in",
}
if manifest.get("executable") != required["executable"]:
raise ValueError("manifest executable has a non-canonical path")
if manifest.get("updater") != required["updater"]:
raise ValueError("manifest updater has a non-canonical path")
if manifest.get("core") != required["core"]:
raise ValueError("manifest core has a non-canonical path")
for description, path in required.items():
if entry_types.get(path) != "file":
raise ValueError(f"manifest {description} is not declared as a file")
for description in ("executable", "updater"):
executable = root / required[description]
if stat.S_IMODE(executable.stat().st_mode) & 0o111 == 0:
raise ValueError(f"manifest {description} is not executable")
return manifest
def write_pending(manifest: dict, version: str, output: Path) -> None:
prefix = f"{version}/"
pending = dict(manifest)
pending["executable"] = prefix + str(manifest["executable"])
pending["updater"] = prefix + str(manifest["updater"])
pending["core"] = prefix + str(manifest["core"])
pending["files"] = [
dict(entry, path=prefix + str(entry["path"])) for entry in manifest["files"]
]
output.parent.mkdir(parents=True, exist_ok=True)
descriptor, temporary_name = tempfile.mkstemp(
prefix=f".{output.name}.", dir=output.parent
)
try:
with os.fdopen(descriptor, "w", encoding="utf-8", newline="\n") as stream:
json.dump(pending, stream, ensure_ascii=False, indent=2)
stream.write("\n")
os.chmod(temporary_name, 0o644)
os.replace(temporary_name, output)
except BaseException:
try:
os.unlink(temporary_name)
except FileNotFoundError:
pass
raise
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--root", required=True, type=Path)
parser.add_argument("--version")
parser.add_argument("--pending-output", type=Path)
arguments = parser.parse_args()
try:
root = arguments.root.resolve(strict=True)
manifest = load_and_validate(root, arguments.version)
if arguments.pending_output is not None:
write_pending(manifest, str(manifest["version"]), arguments.pending_output)
except (OSError, ValueError, json.JSONDecodeError) as error:
parser.error(str(error))
return 0
if __name__ == "__main__":
raise SystemExit(main())
-34
View File
@@ -1,34 +0,0 @@
#!/usr/bin/env python3
"""Validate one canonical Semantic Versioning 2.0.0 value."""
from __future__ import annotations
import re
import sys
SEMVER = re.compile(
r"^(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)\."
r"(0|[1-9][0-9]*)"
r"(?:-((?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)"
r"(?:\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*))?"
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$"
)
def main() -> int:
if len(sys.argv) != 2:
print("usage: validate-semver.py VERSION", file=sys.stderr)
return 2
if not SEMVER.fullmatch(sys.argv[1]):
print(
f"validate-semver: version is not canonical SemVer: {sys.argv[1]!r}",
file=sys.stderr,
)
return 1
return 0
if __name__ == "__main__":
raise SystemExit(main())
-155
View File
@@ -1,155 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
printf '%s\n' \
'Usage: verify-gitea-release-tag.sh --tag TAG --event-sha SHA' \
' --allowed-signers FILE --notes-output FILE'
}
tag=
event_sha=
allowed_signers=
notes_output=
while (($# > 0)); do
case "$1" in
--tag)
tag=${2-}
shift 2
;;
--event-sha)
event_sha=${2-}
shift 2
;;
--allowed-signers)
allowed_signers=${2-}
shift 2
;;
--notes-output)
notes_output=${2-}
shift 2
;;
--help|-h)
usage
exit 0
;;
*)
printf 'verify-gitea-release-tag: unknown argument: %s\n' "$1" >&2
usage >&2
exit 2
;;
esac
done
if [[ -z "$tag" || -z "$event_sha" || -z "$allowed_signers" ||
-z "$notes_output" ]]; then
usage >&2
exit 2
fi
if [[ ! "$event_sha" =~ ^([0-9a-f]{40}|[0-9a-f]{64})$ ]]; then
printf '%s\n' \
'verify-gitea-release-tag: event SHA is not a full object id' >&2
exit 1
fi
if ! git check-ref-format "refs/tags/$tag"; then
printf '%s\n' 'verify-gitea-release-tag: invalid tag name' >&2
exit 1
fi
if [[ ! -f "$allowed_signers" || -L "$allowed_signers" ||
! -s "$allowed_signers" ]]; then
printf '%s\n' \
'verify-gitea-release-tag: allowed signers must be a non-empty regular file' \
>&2
exit 1
fi
tag_ref="refs/tags/$tag"
if ! tag_object=$(git rev-parse --verify "$tag_ref"); then
printf '%s\n' \
'verify-gitea-release-tag: tag ref does not exist' >&2
exit 1
fi
if [[ "$(git cat-file -t "$tag_object")" != tag ]]; then
printf '%s\n' \
'verify-gitea-release-tag: lightweight tags are not allowed; create a signed annotated tag' \
>&2
exit 1
fi
tag_target=$(
git cat-file tag "$tag_object" |
sed -n '1s/^object //p'
)
target_type=$(
git cat-file tag "$tag_object" |
sed -n '2s/^type //p'
)
if [[ "$target_type" != commit ||
! "$tag_target" =~ ^([0-9a-f]{40}|[0-9a-f]{64})$ ]]; then
printf '%s\n' \
'verify-gitea-release-tag: annotated tag must directly target a commit' >&2
exit 1
fi
git cat-file -e "$tag_target^{commit}"
if ! git cat-file tag "$tag_object" |
grep -q '^-----BEGIN SSH SIGNATURE-----$'; then
printf '%s\n' \
'verify-gitea-release-tag: annotated tag must use an SSH signature' >&2
exit 1
fi
git -c gpg.ssh.allowedSignersFile="$allowed_signers" \
verify-tag "$tag_ref" >&2
checked_out_commit=$(git rev-parse --verify 'HEAD^{commit}')
if [[ "$checked_out_commit" != "$tag_target" ]]; then
printf '%s\n' \
'verify-gitea-release-tag: checkout HEAD differs from the tag target' >&2
exit 1
fi
if [[ "$event_sha" != "$tag_object" && "$event_sha" != "$tag_target" ]]; then
printf '%s\n' \
'verify-gitea-release-tag: event SHA differs from the tag and target objects' \
>&2
exit 1
fi
python3 - "$tag_object" "$notes_output" <<'PY'
from pathlib import Path
import subprocess
import sys
def fail(message: str) -> None:
print(f"verify-gitea-release-tag: {message}", file=sys.stderr)
raise SystemExit(1)
tag = subprocess.run(
["git", "cat-file", "tag", sys.argv[1]],
check=True,
stdout=subprocess.PIPE,
).stdout
try:
_, message = tag.split(b"\n\n", 1)
except ValueError:
fail("annotated tag has no release-note subject")
marker = b"\n-----BEGIN SSH SIGNATURE-----\n"
signature_offset = message.rfind(marker)
if signature_offset < 0:
fail("annotated tag must use an SSH signature")
notes = message[:signature_offset]
try:
text = notes.decode("utf-8").rstrip("\n")
except UnicodeDecodeError:
fail("release notes are not valid UTF-8")
if not text or not text.splitlines()[0]:
fail("annotated tag has no release-note subject")
Path(sys.argv[2]).write_text(text + "\n", encoding="utf-8")
PY
printf '%s\n' "$tag_target"
-147
View File
@@ -1,147 +0,0 @@
#!/usr/bin/env python3
"""Verify that a product lock is fully represented by signed component feeds."""
from __future__ import annotations
import argparse
import importlib.util
from pathlib import Path
import re
from types import ModuleType
from typing import Any, NoReturn
def fail(message: str) -> NoReturn:
raise SystemExit(f"verify-locked-component-feeds: {message}")
def load_helpers() -> ModuleType:
path = Path(__file__).with_name("publish-component-feeds.py")
specification = importlib.util.spec_from_file_location(
"echoion_verify_component_feeds", path
)
if specification is None or specification.loader is None:
fail(f"cannot load shared feed helpers from {path}")
module = importlib.util.module_from_spec(specification)
specification.loader.exec_module(module)
return module
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--registry", type=Path, default=Path("components.json"))
parser.add_argument(
"--lock", type=Path, default=Path("components.lock.json")
)
parser.add_argument("--feed-root", type=Path, required=True)
parser.add_argument(
"--channel", choices=("stable", "beta", "nightly"), default="stable"
)
parser.add_argument("--key-id", required=True)
parser.add_argument("--public-key", type=Path, required=True)
arguments = parser.parse_args()
helpers = load_helpers()
registry = helpers.load_object(arguments.registry, "component registry")
lock = helpers.load_object(arguments.lock, "component lock")
definitions = registry.get("components")
locked = lock.get("components")
if (
registry.get("schemaVersion") != 1
or lock.get("schemaVersion") != 2
or not isinstance(definitions, dict)
or not isinstance(locked, dict)
or set(definitions) != set(locked)
):
fail("unsupported or inconsistent component metadata")
feed_root = arguments.feed_root.resolve(strict=True)
verifier = helpers.PublicKeyVerifier(
arguments.public_key, arguments.key_id
)
try:
catalog_path = (
feed_root / "feeds" / arguments.channel / "catalog.json"
)
catalog = verifier.verify(
catalog_path.read_bytes(), f"{arguments.channel} catalog"
)
if (
catalog.get("schemaVersion") != 3
or catalog.get("document") != "echoion-component-catalog"
or catalog.get("channel") != arguments.channel
):
fail("catalog is not an independent component catalog")
entries = catalog.get("components")
if not isinstance(entries, list):
fail("catalog components must be an array")
catalog_by_id: dict[str, dict[str, Any]] = {}
for entry in entries:
if not isinstance(entry, dict):
fail("catalog component entry must be an object")
component_id = entry.get("componentId")
if (
not isinstance(component_id, str)
or component_id in catalog_by_id
):
fail("catalog contains an invalid or duplicate component ID")
catalog_by_id[component_id] = entry
for component_id in sorted(definitions):
definition = definitions[component_id]
expected = locked[component_id]
entry = catalog_by_id.get(component_id)
if entry is None:
fail(f"catalog is missing locked component {component_id}")
if entry.get("componentVersion") != expected["componentVersion"]:
fail(f"catalog version mismatch for {component_id}")
relative = helpers.component_path(registry, component_id)
release_path = (
feed_root
/ "feeds"
/ arguments.channel
/ relative
/ f"{expected['componentVersion']}.json"
)
release = verifier.verify(
release_path.read_bytes(), f"{component_id} release"
)
required = {
"schemaVersion": 3,
"document": "echoion-component-release",
"channel": arguments.channel,
"componentId": component_id,
"componentVersion": expected["componentVersion"],
"sourceSha": expected["revision"],
"sourceTreeHash": expected["sourceTreeHash"],
"abiHash": expected["abiHash"],
"artifactIdentity": expected["artifactIdentity"],
"activation": definition["activation"],
"dependencies": definition["dependencies"],
"buildType": "RelWithDebInfo",
}
for field, value in required.items():
if release.get(field) != value:
fail(f"{component_id} release {field} does not match lock")
artifact = release.get("artifact")
if (
not isinstance(artifact, dict)
or not re.fullmatch(
r"[0-9a-f]{64}", str(artifact.get("sha256", ""))
)
or not str(artifact.get("url", "")).startswith("https://")
):
fail(f"{component_id} release artifact is invalid")
except OSError as error:
fail(f"cannot read component feed: {error}")
finally:
verifier.close()
print(
f"verified {len(definitions)} locked components in "
f"{arguments.channel}"
)
if __name__ == "__main__":
main()
-70
View File
@@ -1,70 +0,0 @@
#!/usr/bin/env python3
"""Reject release trees containing ELF files without debug information."""
from __future__ import annotations
import argparse
import os
from pathlib import Path
import re
import shutil
import subprocess
DEBUG_SECTION = re.compile(r"\]\s+\.(?:z)?debug_info\s")
def is_elf(path: Path) -> bool:
with path.open("rb") as stream:
return stream.read(4) == b"\x7fELF"
def verify(root: Path) -> int:
readelf = shutil.which("readelf")
if readelf is None:
raise ValueError("readelf is required")
verified = 0
for path in sorted(root.rglob("*")):
if path.is_symlink() or not path.is_file() or not is_elf(path):
continue
completed = subprocess.run(
[readelf, "-SW", os.fspath(path)],
check=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
env={**os.environ, "LC_ALL": "C"},
)
if completed.returncode != 0:
message = completed.stderr.strip() or completed.stdout.strip()
raise ValueError(
f"readelf failed for {path.relative_to(root)}: {message}"
)
if DEBUG_SECTION.search(completed.stdout) is None:
raise ValueError(
f"ELF {path.relative_to(root)} has no debug information; "
"expected a RelWithDebInfo artifact"
)
verified += 1
if verified == 0:
raise ValueError("release tree contains no ELF files to verify")
return verified
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--root", required=True, type=Path)
arguments = parser.parse_args()
try:
root = arguments.root.resolve(strict=True)
if root.is_symlink() or not root.is_dir():
raise ValueError("--root must be a real directory")
verified = verify(root)
except (OSError, ValueError) as error:
parser.error(str(error))
print(f"verified debug information in {verified} ELF files")
return 0
if __name__ == "__main__":
raise SystemExit(main())
+1
View File
@@ -0,0 +1 @@
{"abiSchema":"sha256:d50293d345a97e52f9844088bdd42277f566bc815a21b7636d3e053f06c6c113","artifactHash":"90b803ec157b165563921777c30b1bf8ba3682234386a91a34180add436fb549","channels":{"stable":{"artifactHash":"90b803ec157b165563921777c30b1bf8ba3682234386a91a34180add436fb549","sequence":1785629043426,"sourceSha":"e2503244b36281ccd7da7349727197c77dcbeb38","version":"2.0.1"}},"componentId":"EchoionApi","lastSourceSha":"e2503244b36281ccd7da7349727197c77dcbeb38","schemaVersion":2,"semVer":"2.0.1","sequence":1785629043426}
+1
View File
@@ -0,0 +1 @@
{"abiSchema":"sha256:9cb668e2a502dcfe02d145ed63635d63619732d77ff5749685834382705e8d21","artifactHash":"1c73541f321949015a00b3d0f95950307ae250dd321a1bef130feb9c778faf2f","channels":{"stable":{"artifactHash":"1c73541f321949015a00b3d0f95950307ae250dd321a1bef130feb9c778faf2f","sequence":1785629330370,"sourceSha":"a6555d4c698d796bf1f8efcd4af1653d7240b043","version":"2.0.1"}},"componentId":"EchoionCore","lastSourceSha":"a6555d4c698d796bf1f8efcd4af1653d7240b043","schemaVersion":2,"semVer":"2.0.1","sequence":1785629330370}
+1
View File
@@ -0,0 +1 @@
{"abiSchema":null,"artifactHash":"0309c4d582ad73047764e3d2e36d50d28a6ebbe1b593d9555d21c4fbbcce124e","channels":{"stable":{"artifactHash":"0309c4d582ad73047764e3d2e36d50d28a6ebbe1b593d9555d21c4fbbcce124e","sequence":1785601709367,"sourceSha":"bae23b7abcf8b204b9684af5efb3b75b05b4f851","version":"2.0.0"}},"componentId":"EchoionDesktop","lastSourceSha":"bae23b7abcf8b204b9684af5efb3b75b05b4f851","schemaVersion":2,"semVer":"2.0.0","sequence":1785601709367}
+1
View File
@@ -0,0 +1 @@
{"abiSchema":"sha256:84517536db29851cc78eeb09e8bf3aae71a82d42772fe1f2abd4edbf183f20fc","artifactHash":"bc31fbad6d3fad7d97bc4b34efa3a40ed47be1307d4d53499a21ce6a800df5b4","channels":{"stable":{"artifactHash":"bc31fbad6d3fad7d97bc4b34efa3a40ed47be1307d4d53499a21ce6a800df5b4","sequence":1785600666102,"sourceSha":"a1d02147966a3c2c5f27f27d97179c22f49c9125","version":"2.0.0"}},"componentId":"EchoionHost","lastSourceSha":"a1d02147966a3c2c5f27f27d97179c22f49c9125","schemaVersion":2,"semVer":"2.0.0","sequence":1785600666102}
@@ -0,0 +1 @@
{"abiSchema":"sha256:6f6e445a86fc6a67e25dbd0e1f583de9f768f6f4ba88ed2f2ffe6d0540eb85ea","artifactHash":"8f5f0260c1f4aef2168f484ca26a46bfbab427d119ff72708db4f9d276feb8f6","channels":{"stable":{"artifactHash":"8f5f0260c1f4aef2168f484ca26a46bfbab427d119ff72708db4f9d276feb8f6","sequence":1785603012932,"sourceSha":"6a1616aa25fe2747a2c7e38cd08f616b103951b2","version":"2.0.0"}},"componentId":"EchoionPluginUrlShortenerExternal","lastSourceSha":"6a1616aa25fe2747a2c7e38cd08f616b103951b2","schemaVersion":2,"semVer":"2.0.0","sequence":1785603012932}
@@ -0,0 +1 @@
{"abiSchema":"sha256:40a9d5a3cd47bd0bb02cb38fb530ce0fc0d59f813749565a1d7fcfdabbb53688","artifactHash":"7270d701882cff77f17259aa0fd614704809a9163d5875c4b27230e72898fb43","channels":{"stable":{"artifactHash":"7270d701882cff77f17259aa0fd614704809a9163d5875c4b27230e72898fb43","sequence":1785602676757,"sourceSha":"44f6af37d459395c842d4ab6ba39e3bda81d8b88","version":"2.0.0"}},"componentId":"EchoionPluginUrlShortenerInternal","lastSourceSha":"44f6af37d459395c842d4ab6ba39e3bda81d8b88","schemaVersion":2,"semVer":"2.0.0","sequence":1785602676757}
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff. Show more