Initial commit

This commit is contained in:
Oneric 2024-10-03 18:43:37 +02:00
commit 4aa816ffdf
8 changed files with 139 additions and 0 deletions

14
.gitignore vendored Normal file
View file

@ -0,0 +1,14 @@
# build artefacts
/*.stamp
/*.zip
# editor stuff
*.swp
*.bak
*.old
*.orig
~*
# temporary files
tmp_*
*.tmp

8
.gitmodules vendored Normal file
View file

@ -0,0 +1,8 @@
[submodule "akkoma"]
path = akkoma
url = https://akkoma.dev/AkkomagAng/akkoma.git
branch = develop
[submodule "akkoma-fe"]
path = akkoma-fe
url = https://akkoma.dev/AkkomaGang/akkoma-fe.git
branch = develop

51
Makefile Normal file
View file

@ -0,0 +1,51 @@
# Requires GNU Make
export LC_ALL = C.UTF-8
QUILT ::= quilt --quiltrc ../quiltrc
# redefine via `make YARN=yarn` if named differently
YARN ::= yarnpkg
SUBMODULE_NAME ::= akkoma-fe
.PHONY: build
build: patch.stamp
cd $(SUBMODULE_NAME) && \
$(YARN) && \
$(YARN) build
wf_akkoma-fe.zip: build
rm -f $@
cd $(SUBMODULE_NAME) && \
zip -r ../$@ dist
submodule.stamp:
@echo "Ensure submodule is up-to-date"
@if [ ! -f $(SUBMODULE_NAME)/.git ] || \
[ ! -f $@ ] || \
git submodule status $(SUBMODULE_NAME) | grep -qE '^\+' ; then \
git submodule sync && \
git submodule update --init && \
touch $@ ; \
fi
.PHONY: patch
patch: patch.stamp
patch.stamp: submodule.stamp patches/series $(wildcard patches/*.patch)
@echo "Applying patches"
@# `pop -a` return 2 if currently no patches applied, thus ignore exit code
@cd $(SUBMODULE_NAME) && \
$(QUILT) pop -qfa; \
$(QUILT) push -a
@touch $@
# cleaning
.PHONY: clean
clean:
rm -f *.stamp
.PHONY: reset
reset: clean
rm -fr $(SUBMODULE_NAME)/

41
README.md Normal file
View file

@ -0,0 +1,41 @@
# Akkoma-FE: Whimsical Forest Edition
This is [upstream Akkoma-FE `develop`](https://akkoma.dev/AkkomaGang/akkoma-fe/src/branch/develop)
with some additional patches for testing and/or convenience.
*(This will likely be less numerous and more conservative than the backend patches).
All patches (sans the initial wf-ifying one) are intended to reach upstream
eventually and either already have an upstream PR or are intended to be turned
into one once theyve passed initial testing and became more stable.
See `patches/series` for a list of applied changes.
Patch names beginning with `pr111_` indicate its copied from upstream PR `#111`;
`wip_` is used for patches not yet ready for an upstream PR.
If the pr number is suffixed with `-e`, the patch was in some form altered
beyond resolving trivial merge conflicts and/or dropping changelog entries
*(a common source of merge conflicts)*. Details about the changes can be found
in the patch decription.
## Usage
Youre free to use this for your own instance but keep in mind some of those
patches are experimental and might not yet have been merged for a good reason.
Thus you should only do this if youre comfortable with doing beta testing and
capable of debugging upcoming issues on your own far enought to figure out
which patch introduces the problem and create a useful, detailed report for
the corresponding upstream PR.
If a patch changes its database scheme prior to being merged upstream,
some manual DB fixups might be needed.
If you still want to, just clone this repo and run:
```sh
# build
make dist
# install (alternatively just copy the dist folder)
wffdir="$PWD"
cd /akkoma/backend/dir
MIX_ENV=prod mix pleroma.frontend install pleroma-fe --file "$wffdir"/akkoma-fe/dist --ref develop
```

1
akkoma-fe Submodule

@ -0,0 +1 @@
Subproject commit f391cf70a4c9af248494bd859b382b74cacefa6b

View file

@ -0,0 +1,16 @@
From: Oneric <oneric@oneric.stub>
Subject: Prepare for WF patches
Use commit info from WF repo instead of
upstream commit patches are based on
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -12,7 +12,7 @@
: config.build.env
let commitHash = require('child_process')
- .execSync('git rev-parse --short HEAD')
+ .execSync('git -C .. rev-parse --short HEAD')
.toString();
var webpackConfig = merge(baseWebpackConfig, {

1
patches/series Normal file
View file

@ -0,0 +1 @@
000_plant-a-forest.patch

7
quiltrc Normal file
View file

@ -0,0 +1,7 @@
QUILT_PATCHES=../patches
QUILT_NO_DIFF_INDEX=1
QUILT_NO_DIFF_TIMESTAMPS=1
QUILT_REFRESH_ARGS="-p ab"
QUILT_DIFF_ARGS="--color=auto"
QUILT_PATCH_OPTS="--reject-format=unified"
QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"