commit 4aa816ffdfd04967128f146a0793dd7eafafd7e6 Author: Oneric Date: Thu Oct 3 18:43:37 2024 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b72037 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# build artefacts +/*.stamp +/*.zip + +# editor stuff +*.swp +*.bak +*.old +*.orig +~* + +# temporary files +tmp_* +*.tmp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3b7daeb --- /dev/null +++ b/.gitmodules @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..910ea0f --- /dev/null +++ b/Makefile @@ -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)/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5d915d --- /dev/null +++ b/README.md @@ -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 they’ve passed initial testing and became more stable. + +See `patches/series` for a list of applied changes. +Patch names beginning with `pr111_` indicate it’s 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 + +You’re 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 you’re 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 +``` diff --git a/akkoma-fe b/akkoma-fe new file mode 160000 index 0000000..f391cf7 --- /dev/null +++ b/akkoma-fe @@ -0,0 +1 @@ +Subproject commit f391cf70a4c9af248494bd859b382b74cacefa6b diff --git a/patches/000_plant-a-forest.patch b/patches/000_plant-a-forest.patch new file mode 100644 index 0000000..eac98e7 --- /dev/null +++ b/patches/000_plant-a-forest.patch @@ -0,0 +1,16 @@ +From: Oneric +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, { diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..13e34c3 --- /dev/null +++ b/patches/series @@ -0,0 +1 @@ +000_plant-a-forest.patch diff --git a/quiltrc b/quiltrc new file mode 100644 index 0000000..eba770a --- /dev/null +++ b/quiltrc @@ -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"