social.lumbung.space/README.md

62 lines
3.0 KiB
Markdown
Raw Permalink Normal View History

2022-02-07 15:10:19 +00:00
# social.lumbung.space
2022-02-08 12:35:05 +00:00
## fork hell
- https://github.com/mastodon/mastodon/pull/16221
- https://github.com/hometown-fork/hometown/issues/1153
2022-02-07 15:10:19 +00:00
## release management
2022-02-08 13:32:57 +00:00
We're using [Hometown](https://github.com/hometown-fork/hometown) with [this PR](https://github.com/mastodon/mastodon/pull/16221) merged in. Yes, that's a fork of a fork. The process of making a new release is basically merging that PR into the latest Hometown, building, tagging & pushing a container and then updating the [hometown recipe configs](https://git.coopcloud.tech/coop-cloud/hometown/src/branch/main/compose.oidc.yml). Then deploy it and debug any issues.
2022-02-07 15:10:19 +00:00
2022-02-08 12:35:05 +00:00
How to do it, you ask? Abandon all hope. Computers were a mistake.
2022-02-07 15:10:19 +00:00
2022-02-08 12:35:05 +00:00
1. Clone hometown, `git fetch -a`, `git remote add sso https://github.com/chandrn7/smalltown.git`, `git fetch -a sso`
1. Check out the hometown tag you want, start cherrypicking the commits the PR. This [view is handiest](https://github.com/mastodon/mastodon/pull/16221/commits). You can copy/pasta each commit hash with that button and see what conflicts you need to resolve. Yep, you'll be blindly resolving conflicts between two forks.
2022-02-08 13:32:31 +00:00
1. If you're lucky enough to get this far, you now need to build a new container. `docker build -t <name> .` and see what happens . Add `RUN cat /etc/ssl/certs/ca-certificates.crt > /opt/mastodon/vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem` to the `Dockerfile` ([ref](https://github.com/mastodon/mastodon/pull/16221#issuecomment-936108865)). You might need to do this absolutely random [step](https://github.com/hometown-fork/hometown/issues/650#issuecomment-849890952) in order to get bundler/gem/ruby to install the damn thing. Also try wiping out `RUBY VERSION` / `BUNDLED WITH` in the `Gemfile.lock` when running the build. You generally just end up reading the errors and then chaotically hacking the `Gemfile` / `Gemfile.lock` file until it works. If you get to the yarn building step, you might actually make it.
2022-02-08 12:35:05 +00:00
1. Push the container & update the Co-op Cloud recipe (`compose.oidc.yml`)
1. Deploy the thing & pray
1. Hope you never have to do this again
2022-02-08 13:15:05 +00:00
### v3.4.6
```diff
diff --git a/Dockerfile b/Dockerfile
2022-02-08 13:33:54 +00:00
index cbcdb2034..5dc1acc2f 100644
2022-02-08 13:15:05 +00:00
--- a/Dockerfile
+++ b/Dockerfile
2022-02-08 13:33:54 +00:00
@@ -59,6 +59,8 @@ RUN cd /opt/mastodon && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile
2022-02-08 13:15:05 +00:00
2022-02-08 13:33:54 +00:00
+RUN cat /etc/ssl/certs/ca-certificates.crt > /opt/mastodon/vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem
2022-02-08 13:15:05 +00:00
+
2022-02-08 13:33:54 +00:00
FROM ubuntu:20.04
# Copy over all the langs needed for runtime
2022-02-08 13:15:05 +00:00
diff --git a/Gemfile.lock b/Gemfile.lock
index a01341fc9..573c8e776 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -279,8 +279,8 @@ GEM
http-parser (1.2.1)
ffi-compiler (>= 1.0, < 2.0)
http_accept_language (2.1.1)
- httplog (1.5.0)
httpclient (2.8.3)
+ httplog (1.5.0)
rack (>= 1.0)
rainbow (>= 2.0.0)
i18n (1.8.10)
@@ -843,9 +843,3 @@ DEPENDENCIES
webpacker (~> 5.4)
webpush (~> 0.3)
xorcist (~> 1.1)
-
-RUBY VERSION
- ruby 2.6.5p114
-
-BUNDLED WITH
- 1.17.2
```