Pasture: Friendica joins, in the scenarios and the town
Friendica 2026.05 on the shared MySQL and Redis, with its worker daemon as a sidecar. friendica_settle repairs what its install leaves: the system user has no name, so the system account that signs its fetches is never made; the web container cannot see the sidecar's daemon, so a queued job waits for the five-minute cron unless the daemon is declared running; its log needs a file and debugging on. Accounts are saved through its API with locked=0 (a number: "true" reads as 0, unlocked), which makes them soapbox pages that take followers without following back, and each one's outbox is read once: a Follow that reaches an account Friendica has not cached makes it fetch the account from itself, signed, and checking that signature recursed for five minutes, holding PrivaPub's first follow past its timeout. scenarios/friendica.sh passes its 25 checks from a clean install: follows and unfollows, posts (a titled one with its title), comments, likes, Friendica's dislike as a downvote, boosts, edits (through its web editor: its Mastodon API never federates one) and deletes, both ways. The town gets a Friendica driver (HTTP Basic, its MySQL read through mysql_json, edits in the web editor, no bookmark on a reply) and specs/friendica-pair.json, which passes its 275 checks. On the way: - the checker knows Friendica's thread model: a non-public reply reaches an account only under posts it holds, and a Friendica account's non-public reply in a thread another server owns reaches nobody else there; - the seeder answers a follow request the target still holds whatever the follower's server says: Friendica reports a follow of someone already following its account as made at once (and shows that persona's followers-only posts while a locked persona still holds the request); - the selftest skips polls where a platform has none; the shared MySQL helpers move to peers/shared.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
e485f7bd47
commit
a5d493a8c9
17 files changed
+513
-31
No files matched your search
@@ -1,4 +1,5 @@
|
||||
# Services several peers share: one Postgres (each peer gets its own database) and one Redis (each its own db number).
|
||||
# Services several peers share: one Postgres and one MySQL (each peer gets its own database), and one Redis (each its own
|
||||
# db number).
|
||||
shared_postgres_up() {
|
||||
podman container exists pasture-postgres && return 0
|
||||
podman run -d --replace --name pasture-postgres --network $net --network-alias postgres \
|
||||
@@ -20,3 +21,18 @@ pg_db() {
|
||||
podman exec pasture-postgres psql -U pasture -d "$name" -qc "create extension if not exists \"$ext\";" >/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
shared_mysql_up() {
|
||||
podman container exists pasture-mysql && return 0
|
||||
podman run -d --replace --name pasture-mysql --network $net --network-alias mysql \
|
||||
-e MYSQL_ROOT_PASSWORD=pasture -e MYSQL_USER=pasture -e MYSQL_PASSWORD=pasture docker.io/library/mysql:8.4 >/dev/null
|
||||
# its first start runs a temporary server without networking to set itself up: only TCP answers when it is ready
|
||||
for _ in $(seq 1 90); do podman exec pasture-mysql mysqladmin ping -h127.0.0.1 --protocol=tcp -uroot -ppasture --silent >/dev/null 2>&1 && return 0; sleep 2; done
|
||||
echo "mysql did not start" >&2; return 1
|
||||
}
|
||||
|
||||
# mysql_db <name>: a database of the shared MySQL for one peer, the pasture user owning it
|
||||
mysql_db() {
|
||||
podman exec pasture-mysql mysql -uroot -ppasture -e \
|
||||
"create database if not exists \`$1\` character set utf8mb4 collate utf8mb4_unicode_ci; grant all on \`$1\`.* to 'pasture'@'%';" 2>/dev/null
|
||||
}
|
||||
Reference in new issue
Block a user