Skip to content

Commit 81441e8

Browse files
committed
chore(synapse): merge upstream i18n changes, update s9pk.mk to hello-world, drop riscv
2 parents 36a0fd2 + 431dd1e commit 81441e8

File tree

21 files changed

+590
-120
lines changed

21 files changed

+590
-120
lines changed

.github/workflows/buildService.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
paths-ignore: ['*.md']
1010
branches: ['main', 'master', 'update/040']
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build:
18+
if: github.event.pull_request.draft == false
1419
uses: start9labs/shared-workflows/.github/workflows/buildService.yml@master
1520
# with:
1621
# FREE_DISK_SPACE: true

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
SYNAPSE_ADMIN_VERSION = v0.11.1-etke50
2-
SYNAPSE_ADMIN_CHECKSUM = c2a6888db6e4ac2766f17be2bc703d284a7e5f6e8af1c1a7fda0af9ae44e06aa
1+
ARCHES := x86 arm
32

43
include s9pk.mk
54

5+
SYNAPSE_ADMIN_VERSION = v0.11.1-etke50
6+
SYNAPSE_ADMIN_CHECKSUM = c2a6888db6e4ac2766f17be2bc703d284a7e5f6e8af1c1a7fda0af9ae44e06aa
7+
68
# Add synapse-admin as additional prerequisite for s9pk targets
79
$(BASE_NAME).s9pk: assets/synapse-admin
810
$(BASE_NAME)_%.s9pk: assets/synapse-admin

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"check": "tsc --noEmit"
77
},
88
"dependencies": {
9-
"@start9labs/start-sdk": "^0.4.0-beta.48"
9+
"@start9labs/start-sdk": "0.4.0-beta.48"
1010
},
1111
"devDependencies": {
1212
"@types/node": "^22.19.0",

s9pk.mk

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
PACKAGE_ID := $(shell awk -F"'" '/id:/ {print $$2}' startos/manifest.ts)
1+
# ** Plumbing. DO NOT EDIT **.
2+
# This file is imported by ./Makefile. Make edits there
3+
4+
PACKAGE_ID := $(shell awk -F"'" '/id:/ {print $$2}' startos/manifest/index.ts)
25
INGREDIENTS := $(shell start-cli s9pk list-ingredients 2>/dev/null)
3-
ALL_ARCHES ?= x86 arm riscv
4-
ALL_TARGETS ?= all_arches
6+
ARCHES ?= x86 arm riscv
7+
TARGETS ?= arches
58
ifdef VARIANT
69
BASE_NAME := $(PACKAGE_ID)_$(VARIANT)
710
else
811
BASE_NAME := $(PACKAGE_ID)
912
endif
1013

11-
.PHONY: all all_arches aarch64 x86_64 riscv64 arm arm64 x86 riscv arch/* clean install check-deps check-init package ingredients
14+
.PHONY: all arches aarch64 x86_64 riscv64 arm arm64 x86 riscv arch/* clean install check-deps check-init package ingredients
1215
.DELETE_ON_ERROR:
1316
.SECONDARY:
1417

@@ -33,9 +36,9 @@ define SUMMARY
3336
echo ""
3437
endef
3538

36-
all: $(ALL_TARGETS)
39+
all: $(TARGETS)
3740

38-
all_arches: $(ALL_ARCHES)
41+
arches: $(ARCHES)
3942

4043
universal: $(BASE_NAME).s9pk
4144
$(call SUMMARY,$<)
@@ -82,14 +85,20 @@ publish: | all
8285
fi; \
8386
S3BASE=$$(awk -F'/' '/^s9pk-s3base:/ {print $$3}' ~/.startos/config.yaml); \
8487
if [ -z "$$S3BASE" ]; then \
85-
echo "Error: You must define \"s9pk-s3base: https://my-s9pk-s3-bucket.s3-provider.tld\" in ~/.startos/config.yaml"; \
88+
echo "Error: You must define \"s3base: https://s9pks.my-s3-bucket.tld\" in ~/.startos/config.yaml"; \
8689
exit 1; \
8790
fi; \
8891
command -v s3cmd >/dev/null || \
89-
(echo "Error: s3cmd not found. It must be installed to publish using s3." && exit 1)
90-
printf "\n🚀 Publishing $(ALL_TARGETS) to %s; indexing on %s ...\n" "$$S3BASE" "$$REGISTRY"; \
91-
for s9pk in $(ALL_TARGETS); do \
92-
start-cli s9pk publish $$s9pk; \
92+
(echo "Error: s3cmd not found. It must be installed to publish using s3." && exit 1); \
93+
printf "\n🚀 Publishing to %s; indexing on %s ...\n" "$$S3BASE" "$$REGISTRY"; \
94+
for s9pk in *.s9pk; do \
95+
age=$$(( $$(date +%s) - $$(stat -c %Y "$$s9pk") )); \
96+
if [ "$$age" -gt 3600 ]; then \
97+
printf "\033[1;33m⚠️ %s is %d minutes old. Publish anyway? [y/N] \033[0m" "$$s9pk" "$$((age / 60))"; \
98+
read -r ans; \
99+
case "$$ans" in [yY]*) ;; *) echo "Skipping $$s9pk"; continue ;; esac; \
100+
fi; \
101+
start-cli s9pk publish "$$s9pk"; \
93102
done
94103

95104
check-deps:

startos/actions/config.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
import { homeserverYaml } from '../fileModels/homeserver.yml'
22
import { storeJson } from '../fileModels/store.json'
3+
import { i18n } from '../i18n'
34
import { sdk } from '../sdk'
45

56
const { InputSpec, Value, Variants, List } = sdk
67

78
export const inputSpec = InputSpec.of({
89
registration: Value.select({
9-
name: 'Registration',
10-
description: `Allow outsiders to create their own accounts on your homeserver. This is not recommended, as it leaves your server vulnerable to attack. It is preferable for you to create accounts on their behalf using your server's admin portal.`,
10+
name: i18n('Registration'),
11+
description: i18n('Allow outsiders to create their own accounts on your homeserver. This is not recommended, as it leaves your server vulnerable to attack. It is preferable for you to create accounts on their behalf using your server\'s admin portal.'),
1112
default: 'disabled',
1213
values: {
13-
disabled: 'Disabled',
14-
enabled: 'Enabled',
14+
disabled: i18n('Disabled'),
15+
enabled: i18n('Enabled'),
1516
},
1617
}),
1718
federation: Value.union({
18-
name: 'Federation',
19+
name: i18n('Federation'),
1920
default: 'disabled',
2021
description:
21-
'If enabled, users on your homeserver will be able to join rooms on other homeservers and vica versa. If disabled, users on your homeserver will only be able to interact with other users and rooms on your homeserver.',
22+
i18n('If enabled, users on your homeserver will be able to join rooms on other homeservers and vica versa. If disabled, users on your homeserver will only be able to interact with other users and rooms on your homeserver.'),
2223
variants: Variants.of({
23-
disabled: { name: 'Disabled', spec: InputSpec.of({}) },
24+
disabled: { name: i18n('Disabled'), spec: InputSpec.of({}) },
2425
enabled: {
25-
name: 'Enabled',
26+
name: i18n('Enabled'),
2627
spec: InputSpec.of({
2728
federation_domain_whitelist: Value.list(
2829
List.text(
2930
{
30-
name: 'Domain Whitelist (optional)',
31+
name: i18n('Domain Whitelist (optional)'),
3132
default: [],
3233
description:
33-
'If you only want your server to federate with specific homeservers and reject all others, enter the server addresses/domains here. If no domains are provided, your server will be capable of federating with all public Matrix servers',
34+
i18n('If you only want your server to federate with specific homeservers and reject all others, enter the server addresses/domains here. If no domains are provided, your server will be capable of federating with all public Matrix servers'),
3435
},
3536
{
3637
placeholder: 'matrix.start9labs.com',
@@ -42,12 +43,12 @@ export const inputSpec = InputSpec.of({
4243
}),
4344
}),
4445
max_upload_size: Value.number({
45-
name: 'Max Upload Size',
46+
name: i18n('Max Upload Size'),
4647
description:
47-
'The maximum file size that is permitted to be uploaded by users to your homeserver.',
48+
i18n('The maximum file size that is permitted to be uploaded by users to your homeserver.'),
4849
required: true,
4950
default: 50,
50-
units: 'MB',
51+
units: i18n('MB'),
5152
integer: true,
5253
min: 1,
5354
max: 2000,
@@ -61,8 +62,8 @@ export const config = sdk.Action.withInput(
6162

6263
// metadata
6364
async ({ effects }) => ({
64-
name: 'Config',
65-
description: 'Configure your Synapse homeserver.',
65+
name: i18n('Config'),
66+
description: i18n('Configure your Synapse homeserver.'),
6667
warning: null,
6768
allowedStatuses: 'any',
6869
group: null,

startos/actions/createBotUser.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1+
import { i18n } from '../i18n'
12
import { sdk } from '../sdk'
23
import { mount } from '../utils'
34

45
const { InputSpec, Value } = sdk
56

67
export const inputSpec = InputSpec.of({
78
username: Value.dynamicText(async () => ({
8-
name: 'Username',
9+
name: i18n('Username'),
910
description:
10-
'The localpart for the bot user (e.g. "mybot" creates @mybot:your.domain)',
11+
i18n('The localpart for the bot user (e.g. "mybot" creates @mybot:your.domain)'),
1112
required: true as const,
1213
default: null,
1314
placeholder: 'mybot',
1415
masked: false,
15-
disabled: 'Provided by the bridge service',
16+
disabled: i18n('Provided by the bridge service'),
1617
})),
1718
password: Value.dynamicText(async () => ({
18-
name: 'Password',
19-
description: 'The password for the bot user',
19+
name: i18n('Password'),
20+
description: i18n('The password for the bot user'),
2021
required: true as const,
2122
default: null,
2223
placeholder: null,
2324
masked: true,
24-
disabled: 'Provided by the bot service',
25+
disabled: i18n('Provided by the bot service'),
2526
})),
2627
})
2728

2829
export const createBotUser = sdk.Action.withInput(
2930
'create-bot-user',
3031

3132
async ({ effects }) => ({
32-
name: 'Create Bot User',
33-
description: 'Create a new bot (non-admin) user account on the homeserver.',
33+
name: i18n('Create Bot User'),
34+
description: i18n('Create a new bot (non-admin) user account on the homeserver.'),
3435
warning: null,
3536
allowedStatuses: 'only-running',
3637
group: null,

startos/actions/deleteAppservice.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { unlink } from 'node:fs/promises'
22
import { appservicesSubpath } from '../fileModels/appserviceRegistration.yaml'
33
import { homeserverYaml } from '../fileModels/homeserver.yml'
4+
import { i18n } from '../i18n'
45
import { sdk } from '../sdk'
56
import { mountpoint } from '../utils'
67

@@ -21,8 +22,8 @@ export const inputSpec = InputSpec.of({
2122
const keys = Object.keys(values)
2223

2324
return {
24-
name: 'Appservice',
25-
description: 'Select the appservice to remove',
25+
name: i18n('Appservice'),
26+
description: i18n('Select the appservice to remove'),
2627
values,
2728
default: keys[0] || '',
2829
}
@@ -33,10 +34,10 @@ export const deleteAppservice = sdk.Action.withInput(
3334
'delete-appservice',
3435

3536
async ({ effects }) => ({
36-
name: 'Delete Appservice',
37-
description: 'Remove a registered appservice (bridge) from the homeserver.',
37+
name: i18n('Delete Appservice'),
38+
description: i18n('Remove a registered appservice (bridge) from the homeserver.'),
3839
warning:
39-
'This will remove the appservice registration. The bridge service will no longer be able to communicate with Synapse until re-registered.',
40+
i18n('This will remove the appservice registration. The bridge service will no longer be able to communicate with Synapse until re-registered.'),
4041
allowedStatuses: 'any',
4142
group: null,
4243
visibility: 'enabled',

startos/actions/listAppservices.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import {
55
type AppserviceRegistration,
66
} from '../fileModels/appserviceRegistration.yaml'
77
import { homeserverYaml } from '../fileModels/homeserver.yml'
8+
import { i18n } from '../i18n'
89
import { sdk } from '../sdk'
910

1011
const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] => {
1112
const fields: T.ActionResultMember[] = [
1213
{
1314
type: 'single',
14-
name: 'ID',
15+
name: i18n('ID'),
1516
description: null,
1617
value: reg.id,
1718
masked: false,
@@ -20,7 +21,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
2021
},
2122
{
2223
type: 'single',
23-
name: 'URL',
24+
name: i18n('URL'),
2425
description: null,
2526
value: reg.url,
2627
masked: false,
@@ -29,7 +30,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
2930
},
3031
{
3132
type: 'single',
32-
name: 'Sender Localpart',
33+
name: i18n('Sender Localpart'),
3334
description: null,
3435
value: reg.sender_localpart,
3536
masked: false,
@@ -38,7 +39,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
3839
},
3940
{
4041
type: 'single',
41-
name: 'AS Token',
42+
name: i18n('AS Token'),
4243
description: null,
4344
value: reg.as_token,
4445
masked: true,
@@ -47,7 +48,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
4748
},
4849
{
4950
type: 'single',
50-
name: 'HS Token',
51+
name: i18n('HS Token'),
5152
description: null,
5253
value: reg.hs_token,
5354
masked: true,
@@ -56,7 +57,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
5657
},
5758
{
5859
type: 'single',
59-
name: 'Rate Limited',
60+
name: i18n('Rate Limited'),
6061
description: null,
6162
value: String(reg.rate_limited),
6263
masked: false,
@@ -68,7 +69,7 @@ const appserviceFields = (reg: AppserviceRegistration): T.ActionResultMember[] =
6869
if (reg.namespaces.users[0]?.regex) {
6970
fields.push({
7071
type: 'single',
71-
name: 'User Namespace',
72+
name: i18n('User Namespace'),
7273
description: null,
7374
value: reg.namespaces.users[0].regex,
7475
masked: false,
@@ -84,9 +85,9 @@ export const listAppservices = sdk.Action.withoutInput(
8485
'list-appservices',
8586

8687
async ({ effects }) => ({
87-
name: 'List Appservices',
88+
name: i18n('List Appservices'),
8889
description:
89-
'View all registered Matrix appservices (bridges) on this homeserver.',
90+
i18n('View all registered Matrix appservices (bridges) on this homeserver.'),
9091
warning: null,
9192
allowedStatuses: 'any',
9293
group: null,
@@ -101,8 +102,8 @@ export const listAppservices = sdk.Action.withoutInput(
101102
if (files.length === 0) {
102103
return {
103104
version: '1' as const,
104-
title: 'Registered Appservices',
105-
message: 'No appservices are currently registered.',
105+
title: i18n('Registered Appservices'),
106+
message: i18n('No appservices are currently registered.'),
106107
result: null,
107108
}
108109
}
@@ -129,7 +130,7 @@ export const listAppservices = sdk.Action.withoutInput(
129130
type: 'single',
130131
name: id,
131132
description: null,
132-
value: 'Error reading registration file',
133+
value: i18n('Error reading registration file'),
133134
masked: false,
134135
copyable: false,
135136
qr: false,
@@ -139,7 +140,7 @@ export const listAppservices = sdk.Action.withoutInput(
139140

140141
return {
141142
version: '1' as const,
142-
title: 'Registered Appservices',
143+
title: i18n('Registered Appservices'),
143144
message: null,
144145
result: {
145146
type: 'group' as const,

0 commit comments

Comments
 (0)